sekigon-gonnoc / Pico-PIO-USB

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

🪲[BUG] Example usb_device stopped working at release 0.6.0 #127

Open rppicomidi opened 1 month ago

rppicomidi commented 1 month ago

Describe the bug you encountered: I tested the usb_device example with version 0.6.0. The PIO USB device does not enumerate. I have not attached a USB sniffer to the figure out what is going on, but I suspect it would show no response from the device. Version 0.5.3 worked just fine. ...

What did you expect to happen instead? I expected the PIO USB device to enumerate as a HID device and periodically move the mouse pointer to the right. ...

What actually happened in your case? Nothing that I was able to observe.

...

Additional information I reverted to version 0.5.3 and rebuilt the examples. The PIO USB device worked as expected. I suspect something broke the device interface between 0.5.3 and 0.6.0.

I am using an Ubuntu Linux 22.04LTS host. My pico-sdk is on the develop branch, last updated June 13. TinyUSB is in sync with the master branch. Compiler is arm-none-eabi-gcc (15:10.3-2021.07-4) 10.3.1 20210621 (release). Target hardware is a Raspberry Pi Pico board wired to a USB C breakout board. I have set config.pin_dp to 16 before calling pio_usb_device_init() because I have DP wired to Pico board pin 21 and DM wired to Pico board pin 22. USB Ground is wired to Pico board pin 23. There is a 1.5k pull-up between Pico board pin 21 and pin 36. I connect the USB C breakout to the test PC via a USB 2.0 hub.


lyusupov commented 1 month ago

duplicates https://github.com/sekigon-gonnoc/Pico-PIO-USB/issues/122

image
rppicomidi commented 1 month ago

Are you sure this is a duplicate of #122? #122 is about USB Host function. I have no issues with the USB Host interface unless I use optimization -Os. Even debug builds work fine for me. It is the USB Device interface that I am reporting is not working in 0.6.0. For that, no optimization I have tried will suffice.

eriklundh commented 5 days ago

This is NOT a duplicate of #122!