Skip to content

fix(waveshare): stabilize RP2350B-Plus-W runtime - #118

Open
h5tark wants to merge 1 commit into
SundayMoments:mainfrom
h5tark:fix/waveshare-rp2350b-plus-w-hardware
Open

fix(waveshare): stabilize RP2350B-Plus-W runtime#118
h5tark wants to merge 1 commit into
SundayMoments:mainfrom
h5tark:fix/waveshare-rp2350b-plus-w-hardware

Conversation

@h5tark

@h5tark h5tark commented Aug 4, 2026

Copy link
Copy Markdown

Summary

  • Move BTstack TLV persistence to a low-flash region validated on physical Waveshare RP2350B-Plus-W hardware.
  • Correct the board's 16 MiB flash metadata and expose the directly connected LED on GPIO23.
  • Serve controller feature reports from fixed storage instead of allocating from TinyUSB control callbacks.
  • Defer HID GET/SET processing to the main loop so USB callbacks do not initiate heap, companion, or Bluetooth work.
  • Retain the enumerated USB controller persona while Bluetooth reconnects.

Root cause

Testing on a physical Waveshare RP2350B-Plus-W showed that BTstack persistence near the end of the advertised 16 MiB flash could stall startup or pairing initialization.

USB control callbacks could also allocate dynamic storage and schedule Bluetooth work while TinyUSB endpoint state was timing-sensitive. This resulted in unstable enumeration or a controller that accepted normal input while advanced features such as rumble, adaptive triggers, feature reports, and audio did not work reliably.

Hardware validation

Validated on a physical Waveshare RP2350B-Plus-W with:

  • Bluetooth pairing and reconnect
  • Controller input
  • Rumble and lightbar output
  • Adaptive triggers
  • Feature reports
  • Native audio haptics
  • Controller speaker audio
  • Controller microphone
  • Windows speaker and microphone endpoints
  • Companion functionality
  • USB and controller reconnects

Build validation

Successfully built the companion firmware with:

  • Pico SDK 2.2.0
  • TinyUSB 0.20.0
  • Arm GNU Toolchain 14.2.Rel1
  • Waveshare RP2350B-Plus-W target
  • Standard Pico 2 W target

The Waveshare-specific runtime behavior is compile-time gated and does not affect the standard Pico 2 W build.

Hardware evidence

Tested on a physical Waveshare RP2350B-Plus-W DS5 Bridge

Use the hardware-validated low-flash BTstack storage layout and correct Waveshare board metadata.

Defer HID feature and output work outside TinyUSB callbacks, cache feature reports in fixed storage, and retain the enumerated USB persona across controller reconnects.

Validated on physical hardware with input, rumble, lightbar, adaptive triggers, audio haptics, speaker, microphone, and reconnect.
@h5tark
h5tark marked this pull request as ready for review August 4, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant