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

Run on 1 PIO #120

Closed sekigon-gonnoc closed 5 months ago

sekigon-gonnoc commented 5 months ago

117

hathach commented 5 months ago

I have no idea why, but this latest changes seems cause the TinyUSB arduino lib not working any more, reported from our user https://forums.adafruit.com/viewtopic.php?t=211162 (confirmed that it does not generate any traffic with 0.6.0 but work well with 0.5.3)

Note: the tinyusb core example still work well though, so I guess it is probably race condition since Arduino typically use core1() for pio-usb, and core0 for other works. stil investigating though.

sekigon-gonnoc commented 5 months ago

Change optimization option to -O solves the problem in my setup

hathach commented 5 months ago

@sekigon-gonnoc ah you are right, it work with -O0. This is a hint, probably race condition as suspected. I am still trying to narrow it down. May take a bit of time since this PR includes quite of lot of change. I will post more update or questions here.

rppicomidi commented 3 months ago

Host mode seems to work for me with every optimization I tried except -Os. Sadly, -Os is Arduino default.