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
tud_connected() and tud_mounted() correctly return FALSE before USB is connected, and TRUE when connected. However, they continue to return TRUE indefinitely after USB is no longer connected.
How to reproduce ?
power up Pi Pico from an external source (I feed VBUS thru a diode)
(LED stays off, tud_connected() returning FALSE)
Connect Pico to USB host
(LED turns on, tud_connected() returning TRUE)
Disconnect USB
(LED stays on, tud_connected() keeps returning true)
Scratch head
if USB is reconnected, LED will flicker off a couple of times, then stay on
I'm seeing the same behaviour here too. I'm trying to figure out why sending MIDI notes to the host randomly stops working until I unplug and re-plug the USB, but as in the issue report, once connected tud_connected() and tud_mounted() continue to report that they are connected even when the USB cable is unplugged.
On the PI Pico, depending on your use case, this issue may be worked around by sensing VBUS instead; GPIO 24 is hardwired for that on the Pico. (WL_GPIO 2 on the PicoW) This will only work if VBUS is fed exclusively by USB though.
On the PI Pico, depending on your use case, this issue may be worked around by sensing VBUS instead; GPIO 24 is hardwired for that on the Pico. (WL_GPIO 2 on the PicoW) This will only work if VBUS is fed exclusively by USB though.
Good to know; but in my case the +v USB pin is cut and the Pico (actually Seeed XIAO RP2040) is externally powered so this wouldn't be a suitable workaround.
Operating System
Linux
Board
Raspberry Pi Pico
Firmware
What happened ?
tud_connected() and tud_mounted() correctly return FALSE before USB is connected, and TRUE when connected. However, they continue to return TRUE indefinitely after USB is no longer connected.
How to reproduce ?
Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
usb log.txt
Screenshots
No response
I have checked existing issues, dicussion and documentation
The text was updated successfully, but these errors were encountered: