We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a416911 commit 655092dCopy full SHA for 655092d
src/portable/microchip/pic/dcd_pic.c
@@ -492,6 +492,9 @@ bool dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
492
tu_memclr(&_dcd, sizeof(_dcd));
493
494
#if TU_PIC_INT_SIZE == 4
495
+ // The USBBUSY bit is present on PIC32s and we're required to check it
496
+ // prior to powering on the USB peripheral (see DS61126F page 27)
497
+ while (U1PWRCbits.USBBUSY);
498
U1PWRCSET = _U1PWRC_USBPWR_MASK;
499
#else
500
U1PWRCbits.USBPWR = 1;
0 commit comments