summaryrefslogtreecommitdiff
path: root/shared/tinyusb/mp_usbd_runtime.c
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2024-06-25 16:20:59 +1000
committerAngus Gratton <angus@redyak.com.au>2024-06-25 16:25:19 +1000
commit068d9bf2cfa9110ae44008da45bfd0419cb45b52 (patch)
treeea8c8a0a5c9927be6b475958223443a887cc3a69 /shared/tinyusb/mp_usbd_runtime.c
parent5dcffb53ab953e8264be33e7cb56280b7e20c345 (diff)
rp2: Fix USB PLL glitch during wake from light sleep.
Follow-up to a84c7a0ed93, this commit works most of the time but has an intermittent bug where USB doesn't resume as expected after waking from light sleep. Turns out waking calls clocks_init() which will re-initialise the USB PLL. Most of the time this is OK but occasionally it seems like the clock glitches the USB peripheral and it stops working until the next hard reset. Adds a machine.lightsleep() test that consistently hangs in the first two dozen iterations on rp2 without this fix. Passed over 100 times in a row with this fix. The test is currently rp2-only as it seems similar lightsleep USB issues exist on other ports (both pyboard and ESP32-S3 native USB don't send any data to the host after waking, until they receive something from the host first.) This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'shared/tinyusb/mp_usbd_runtime.c')
0 files changed, 0 insertions, 0 deletions