Repository navigation
Update TinyUSB for the DWC2 host abort fix (hathach/tinyusb#4405) - #11836
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ro_s2 With the TinyUSB update these two ESP32-S2 boards overflow dram0_0_seg by 16 bytes. They had 16 bytes free on main; TinyUSB adds 32 bytes of USB state in internal RAM, and audiopwmio's ISR code (added for the S2 in adafruit#11663) takes about 450 bytes of the same area. With audiopwmio off both link with 528 bytes free. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the TinyUSB update, pca10059, makerdiary_nrf52840_mdk_usb_dongle, raytac_mdbt50q-db-40, ssci_isp1807_micro_board and teknikio_bluebird overflow FLASH_FIRMWARE in ru by 60-324 bytes. None has a HUB75 matrix connector, and six nRF boards already turn off msgpack. With both off they have about 9.6 KB free in ru, and the native .mpy loader stays on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This reverts commit 4cc9100. adafruit#11830 turns off msgpack on every nRF52840 board with an internal flash filesystem, which makes these five boards fit in ru. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dhalbert
enabled auto-merge
November 11, 2026 17:28
jedgarpark
added a commit
to adafruit/Adafruit_Learning_System_Guides
that referenced
this pull request
Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jedgarpark
added a commit
to adafruit/Adafruit_Learning_System_Guides
that referenced
this pull request
Nov 11, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jedgarpark
added a commit
to adafruit/Adafruit_Learning_System_Guides
that referenced
this pull request
Nov 11, 2026
adafruit/circuitpython#11836 (92da735b06) brought in the TinyUSB DWC2 abort fix, so a stock main build runs the flasher. Tested with the main-PR11836-92da735 UF2: FM-1 installs directly and through a hub. The README and patches/README.md now point to circuitpython.org; the patches stay as history. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Updates TinyUSB, the USB library, from efab607b8 to 12611f81a (current master) to get the DWC2 host abort fix.
Why
On the Metro ESP32-P4, USB host reads stopped working after a read timed out. With the M-Vave FM-1 (a USB MIDI synth), every firmware install over USB MIDI SysEx failed partway.
The three TinyUSB commits after bab06c109 change only CI, test-rig and docs files, not
src/.Metro ESP32-P4, before and after
The FM-1 installs firmware over USB MIDI SysEx. The host reads until the FM-1 asks for the next block, and aborts a read that times out while the FM-1 NAKs.
One install through the hub, ChoralRoot → V15, ended with "Pipe error" at the very end, although the FM-1 had received V15 and was running it. It looks like the FM-1 flasher, not TinyUSB: after the last block the FM-1 restarts, the host sees the restart late through a hub, and the flasher's reply to a repeated "finish" request can go to a device that has gone. The flasher's console trace doesn't log that exchange, so this is the likely cause rather than a confirmed one. The flasher now ignores a failed reply at that point (adafruit/Adafruit_Learning_System_Guides#3330). Two repeats of the same install through the hub passed.
Board changes
atmegazero_esp32s2andmicrodev_micro_s2overfloweddram0_0_segby 16 bytes with the new TinyUSB, so this turnsaudiopwmiooff on those two boards.On main they had 16 bytes free in that region, which holds static internal RAM plus the code that must run from internal RAM. The new TinyUSB adds 32 bytes of USB state there (
_dcd_data,_usbh_data,_usbd_task_stop, plus alignment).audiopwmio's timer ISR, which has to be in IRAM (#11663), takes about 450 bytes of the same region, so with it off both boards link with 528 bytes free. Neither board has an onboard speaker. Other ESP32-S2 boards still have room, including the FeatherS2 with the same 16 MB flash and 8 MB PSRAM.#11663 checked flash headroom but not this region. If you'd rather keep
audiopwmioon these boards, a port-wide change to move some IRAM code to flash would also do it, but that seemed out of scope here.Five nRF52840 boards (
pca10059,makerdiary_nrf52840_mdk_usb_dongle,raytac_mdbt50q-db-40,ssci_isp1807_micro_board,teknikio_bluebird) overflow flash inruonly, by 60 to 324 bytes. #11830 turns offmsgpackon nRF52840 boards with an internal flash filesystem (cb62fd7), which leaves these boards about 2.5 KB free inru, so this PR should merge after #11830. I'll update the branch from main then.Other TinyUSB changes users may notice
Main only.
Hardware tested
lib/tinyusbchanged. Each round: the board writes 5 x 64 KB to USB serial, then a 64 KB file is written to CIRCUITPY, read on the board and read back on the host after a remount. Main and this branch alternated, 3 to 4 rounds each. No lost bytes and no drive errors on any board at either pin.The ESP32-S2 is about 5% faster and the RP2350 about 2% slower, both in every round. Everything else is within noise. The throughput test differs from #11582's, so these numbers don't line up with that table.
The Metro ESP32-P4 costs 9744 B (macOS build,
TRANSLATION=en_US), most of it the DWC2 host split scheduler. No new warnings.Not tested: USB host on boards other than the Metro ESP32-P4, Windows hosts, and throughput on macOS hosts.
AI assistance
Claude Code made the change and ran the builds. I ran the FM-1 installs on the Metro, and @mikeysklar ran the board farm.
🤖 Generated with Claude Code