Replies: 1 comment
-
It seems Adafruit TinyUSB and RP2040 aren't best friends: I would even say: Status of TinyUSB with MIDI handling (especially callbacks) is broken and unstable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There is an odd problem between RP2040 API and Adafruit_TinyUSB in combination with MIDI:
In the attached file there is a little demo blinking the onboard LED to synced MIDI clock. Normally this example will crash within a few seconds or earlier.
If we change two lines in the library "Adafruit TinyUSB" the file "tusb.c" the code is working. (I really don't know how long, tested minutes). BUT with more code in the callbacks all Windows MIDI apps (Cubase 14, Midi OX) WILL crash and / or freeze.
This problem only occurs with RP2040 (maybe USB serial against USB MIDI?) an no other MCU. So there might be a different approach (or bug) with the USB?
tusb.c, Line 205:
//(void) osal_mutex_lock(mutex, OSAL_TIMEOUT_WAIT_FOREVER);
to
(void) osal_mutex_lock(mutex, OSAL_TIMEOUT_NORMAL);
and line 220
//(void) osal_mutex_lock(mutex, OSAL_TIMEOUT_WAIT_FOREVER);
to
(void) osal_mutex_lock(mutex, OSAL_TIMEOUT_NORMAL);
tinyusb-midiclock-test-crash.zip
Beta Was this translation helpful? Give feedback.
All reactions