SDK 2.1.0 tinyusb panics on composite usb audio and cdc acm device #2236
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk#2236
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The tinyusb version pulled by SDK 2.1.0 is missing a fix causing panic when using a composite usb device (audio and cdc/acm). The problem seems to be well known and fixed in current versions of tinyusb. See: https://github.com/hathach/tinyusb/pull/1802
A future SDK release needs an updated version of tinyusb.
As a temporary fix for everyone affected, replace the dcd_rp2040.c of the pulled tinyusb library with:
https://raw.githubusercontent.com/howard0su/tinyusb/cd7ee9639ee5ceddcdaecde5842c2ce97a56ce63/src/portable/raspberrypi/rp2040/dcd_rp2040.c
The above fixes the problem for me and the link is included for convenience to reduce search time for everyone affected.
Note that we don't want that particular fix, but we want the change that is being made in TinyUSB upstream (which may or may not be this one https://github.com/hathach/tinyusb/pull/2937 )
OP: is this a regression from earlier SDK, or was that also broken due to TinyUSB/rp2040 issues?
Sorry, don't know. SDK 2.1.0 is the first version I'm using and I never used rp2040, only rp2350.
Is this bug specific to rp2040 or does it affect rp2350 too?
In my case rp2350a, I don't have any rp2040.
@not1337 this should be fixed in the latest version of the SDK (2.1.1) as we now run TinyUSB 0.18.0, which contains this fix here https://github.com/hathach/tinyusb/pull/2847 - can you confirm this works?
The issue is still there on
0.18.0. At least one more PR is missing: https://github.com/hathach/tinyusb/pull/2937Unfortunately I can't test in the next few months as I'm busy with my job.
Hello, I have the same issue when when using the audio_test example on an RP2350 using SDK version 2.2.0.
Edit: Can confirm that https://github.com/hathach/tinyusb/pull/2937 fixes the problem.
Note this is still happening on the current latest SDK (2.2.0)
I also ran into this issue on SDK version 2.2.0. After reading GitHub issues about the problem, I decided to try applying the fix from https://github.com/hathach/tinyusb/pull/2937 as suggested above.
To save someone else time, I used the following commands: