Bump tinyusb to include MAX3421E host startup-hang fix (#3748)#11093
Bump tinyusb to include MAX3421E host startup-hang fix (#3748)#11093mikeysklar wants to merge 4 commits into
Conversation
|
Flashed and tested USB-host drive detection (MAX3421E FeatherWing, hot-plug SanDisk/PNY/USB-storage) on real hardware with this bump:
espressif and atmel-samd build clean in CI as-is. The RP2350 and nRF52 images above are local builds with
nRF52 needed one more one-liner to build: tinyusb's Neither the audio-disable nor the clock patch is included in this PR.
proof of life |
|
@hathach We could use hathach/tinyusb#3748, but we are well behind in |
|
all changes look good, except the audio since we don't want to haardcode it with FS. Audio HS/FS has different way of calculating timing/samples. It is updated to not hardcored since even with highspeed capable device e.g imxrt, when plugging to FS host, still need to functio as FS audio. However, since cpy mostly work with PC, we can just use the TUD_OPT_HIGH_SPEED. |
Advance lib/tinyusb c1bf19ed6 -> fcd5a0603 to pull in hathach/tinyusb#3748 (adafruit#10053), and adapt to its API drift: XFER_RESULT_ABORTED enum, usbd_control.c merged into usbd.c, TUD_AUDIO_EP_SIZE is_highspeed arg, and CFG_TUD_CDC_EP_BUFSIZE -> RX_EPSIZE. Builds clean on espressif and atmel-samd; nordic still needs a usb_audio descriptor macro migration (see PR). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dd830f1 to
894397c
Compare
|
Thanks @hathach! Updated: both The audio path can't be fully CI-compiled here yet.
|
The tinyusb bump splits the flat UAC descriptor API into version-namespaced
UAC 1.0 and UAC 2.0 variants, so shared-module/usb_audio, which targets
UAC 2.0, no longer compiles against the old names. Three layers moved:
descriptor macros TUD_AUDIO_DESC_IAD -> TUD_AUDIO20_DESC_IAD
enum constants AUDIO_CTRL_RW -> AUDIO20_CTRL_RW
C types audio_control_cur_1_t -> audio20_control_cur_1_t
AUDIO_TERM_TYPE_* is shared between UAC 1.0 and 2.0 upstream and keeps its
old name.
Two of the renames are not a literal insertion of "20":
TUD_AUDIO_DESC_STD_AS_INT_LEN -> TUD_AUDIO20_DESC_STD_AS_LEN
the length macro drops _INT; the emitter keeps it.
TUD_AUDIO_DESC_FEATURE_UNIT_ONE_CHANNEL(unitid, srcid, ch0, ch1, stridx)
-> TUD_AUDIO20_DESC_FEATURE_UNIT(unitid, srcid, stridx, ch0, ch1)
ONE/TWO_CHANNEL collapse into one varargs macro: stridx moves from
last to third and the per-channel controls become trailing varargs.
The paired length macro becomes TUD_AUDIO20_DESC_FEATURE_UNIT_LEN(1),
still 14 bytes, so the *_DESC_LEN totals are unchanged.
Verified by emitting the speaker/headset/mic descriptors before and after
(old source + old tinyusb vs new source + new tinyusb) and diffing the
bytes: identical at 132/230/132. Clean builds of adafruit_feather_rp2350
and feather_bluefruit_sense, both with CIRCUITPY_USB_AUDIO=1.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The tinyusb bump splits the STM32 fsdev driver: fsdev_core_reset, pma_align_buffer_size and btable_set_rx_bufsize moved out of dcd_stm32_fsdev.c into a new fsdev_common.c. Add it to SRC_C, mirroring the dwc2 / dwc2_common.c pattern just below. Only STM32L433xx boards take the fsdev path, so blues_cygnet was the sole board failing to link on the three symbols above. It now builds clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The tinyusb bump grows the binary and this board was already at 100.0% of FLASH_FIRMWARE, so it overflowed by 232 bytes. It never opted into usb_audio; it inherited CIRCUITPY_USB_AUDIO=1 from the rp2 port default. Turning it off frees ~9kB. usb_audio is the USB Audio Class device (enumerating to a host as a mic or speaker). The board's own audio path is the I2S DAC on GPIO26/27/28 driven by audiobusio.I2SOut, which is unaffected, as are audiocore, audiomixer, audiomp3, audiopwmio and synthio. The non-W pimoroni_pico_dv_base has more headroom and keeps usb_audio. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
3 commits pushed. CI green except nordic.
Remaining: 51 nordic + the
@relic-se — #11102 will need a rebase after this. @FoamyGuy — the bump deletes |

Advances
lib/tinyusbfrom the October 2025 commit to current master so hathach/tinyusb#3748 (MAX3421E USB-host startup-hang fix) is available to build and test, per #10053.c1bf19ed6(0.18.0-748) →fcd5a0603(0.21.0-31). API drift adapted:XFER_RESULT_ABORTEDenum →shared-module/usb/core/Device.cusbd_control.cmerged intousbd.c→supervisor/supervisor.mkTUD_AUDIO_EP_SIZEgainedis_highspeedarg →tusb_config.hCFG_TUD_CDC_EP_BUFSIZE→CFG_TUD_CDC_RX_EPSIZE→usb_device.cTested: builds clean on
adafruit_feather_esp32_v2(espressif) andfeather_m4_express(atmel-samd).Known blocker — needs @FoamyGuy: nordic doesn't build yet. The same bump reorganized the USB Audio Class descriptor macros (
TUD_AUDIO_DESC_*→TUD_AUDIO10_/AUDIO20_DESC_*), andshared-module/usb_audio/usb_audio_descriptors.hstill uses the old names. That migration is UAC 1.0/2.0-sensitive and wants USB-audio hardware to verify, so it's left for the module owner. (Verified there's no earlier bump point that includes #3748 without this reorg.)