You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
usb,rp2: Fix "TinyUSB callback can't recurse" error when using threads.
Looks like there was a long standing underlying bug here when using rp2
threads, where either CPU may poll CDC input and trigger the TinyUSB task.
TinyUSB could run on both CPUs concurrently, which may have lead to some
incorrect behaviour.
The race started triggering an exception when runtime USB support was
added, and a check was added for the USB task recursing on itself from a
Python handler function.
The race is most commonly triggered when working from the interactive REPL,
even a minimal running thread can trigger it. This commit adds a test case
that triggers it in a different way (polling stdin from a thread).
Fix is to add a port-level macro that indicates whether the TinyUSB task
can run.
Closes#15390.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
0 commit comments