bump MSC buffer for RP2040 boards exposing SD-over-USB#10964
Open
mikeysklar wants to merge 1 commit intoadafruit:mainfrom
Open
bump MSC buffer for RP2040 boards exposing SD-over-USB#10964mikeysklar wants to merge 1 commit intoadafruit:mainfrom
mikeysklar wants to merge 1 commit intoadafruit:mainfrom
Conversation
On Adafruit Feather RP2040 Adalogger and similar RP2040 boards that expose an SD card as a second USB MSC LUN, the default 1024-byte MSC buffer triggers bulk-IN endpoint stalls on macOS during multi-sector READ(10) probes. macOS retries ~18 times over 5 minutes then gives up; Linux handles the same firmware cleanly. Bumping CFG_TUD_MSC_BUFSIZE to 16384 clears the stall. This PR only applies the bump when CHIP_VARIANT=RP2040 and CIRCUITPY_SDCARDIO=1, so RP2350 boards and non-SD RP2040 boards keep the small buffer and the ~15KB RAM cost. This is a stopgap workaround. Metro RP2350 and Fruit Jam (both RP2350) handle the same macOS traffic fine at 1024 bytes, so the underlying issue is almost certainly in the RP2040 USB peripheral or tinyusb's rp2 device driver. Root-cause ticket will be filed separately.
This was referenced Apr 21, 2026
In |
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.
Workaround for macOS bulk-IN endpoint stalls on RP2040 during multi-sector SD
READ(10)probes with the default 1024-byte MSC buffer. SD card never mounts on macOS; Linux works. Bumping the buffer to 16 KB clears the stall.Applied only when
CHIP_VARIANT=RP2040andCIRCUITPY_SDCARDIO=1. No RAM cost for RP2350 boards or non-SD RP2040 boards.Tested (CP 10.1.4 stable)
Host OSes: macOS 26.x on Apple Silicon M2 (both Mac mini and MacBook Air), Ubuntu 24.04 (kernel 6.17). Linux is unaffected in every cell.
This is a stopgap
Metro RP2350 and Fruit Jam handle the same macOS traffic fine at 1024. The root cause is almost certainly in tinyusb's
rp2device driver or the RP2040 USB peripheral itself. Root-cause ticket: hathach/tinyusb#3607. Once fixed upstream, this conditional can be reverted.Related