sekigon-gonnoc / Pico-PIO-USB

USB host/device implementation using PIO of raspberry pi pico (RP2040).
MIT License
1.37k stars 146 forks source link

Disconnecting a device freezes sometimes #148

Open jfedor2 opened 2 weeks ago

jfedor2 commented 2 weeks ago

I noticed that disconnecting a USB device from a Pico acting as a host sometimes causes the code to freeze.

It doesn't happen every time, but maybe like 1 in 10, often enough to notice.

I have bisected the issue down to this commit: 30283a92c880a215f5073afbc7be397a8913c560

The freeze seems to be happening around here: https://github.com/sekigon-gonnoc/Pico-PIO-USB/blob/528616d809ad3a400dc0cf4dab0f790e62944244/src/pio_usb.c#L195

sweetlilmre commented 2 weeks ago

I think this is a duplicate of #142