bump MSC buffer for RP2040 boards exposing SD-over-USB#10964
bump MSC buffer for RP2040 boards exposing SD-over-USB#10964mikeysklar wants to merge 1 commit intoadafruit:mainfrom
Conversation
In |
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.
8eb8aaa to
04b5120
Compare
|
You're right — my claim of "no RAM cost for non-SD RP2040 boards" was wrong. With I've pivoted to a per-board opt-in: boards that actually expose an SD card over USB MSC set Verified locally on a Feather RP2040 Adalogger (with the opt-in added for testing): with Updated in the latest commit. Thanks for the catch. |
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