-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pico_audio_i2s incompatible with USB stdio #76
Comments
I'm afraid this is just a "random guess", but the USB protocol is timing-sensitive, so if the Pico doesn't respond to USB requests from the host "quickly enough", the USB channel might go awry. Do you see any USB-related errors in the In an entirely-separate project I was working on recently, I was able to solve this problem by running the USB-related code (in my case I was using tinyusb to emulate a HID mouse) on core1, with the rest of my application running on core0. (and then using https://www.raspberrypi.com/documentation/pico-sdk/group__multicore__fifo.html to communicate between the two cores) |
I've just checked I've also tried the suggested use of core1 in
Debug probe is arriving tomorrow, which should at least let me see if UART stdio suffers from the same problem. |
yeah UART is likely much better; the stdio_usb stuff has a bunch of IRQ stuff to deal with running TinyUSB in the background, which is likely the source of issues. Note you are much better off running your code on core 1, as all the stdio_usb stuff has already been initialized on core 0 |
It seems that the
pico_audio_i2s
library intermittently breaks the standard USB stdio implementation, resulting in no communication either way between the pico and the USB host after a short time (a few seconds to a minute or so).The host still reports the USB CDC connection (e.g.
/dev/ttyACM0
continues to exist) but communication ceases.For example, the pico-playground
sine_wave
example exhibits this problem, if USB communication is enabled through addingpico_enable_stdio_usb(sine_wave_i2s 1)
to the i2s section ofCMakeLists.txt
. (In that example, the problem is evident as the terminal user interface initially works, then ceases to function).Is this a known issue -- and is there a known workaround?
The text was updated successfully, but these errors were encountered: