Revert the DSB because of RISC-V

This commit is contained in:
Okarss 2024-06-14 18:39:48 +03:00
parent 00062ddb0c
commit fb6a6acbff

View File

@ -216,19 +216,19 @@ void dcd_init(uint8_t rhport)
* Here, the RM is followed. */
for (volatile uint32_t i = 0; i < 200; i++) { // should be a few us
__DSB();
asm("NOP");
}
// Perform USB peripheral reset
USB->CNTR = USB_CNTR_FRES | USB_CNTR_PDWN;
for (volatile uint32_t i = 0; i < 200; i++) { // should be a few us
__DSB();
asm("NOP");
}
USB->CNTR &= ~USB_CNTR_PDWN;
// Wait startup time, for F042 and F070, this is <= 1 us.
for (volatile uint32_t i = 0; i < 200; i++) { // should be a few us
__DSB();
asm("NOP");
}
USB->CNTR = 0; // Enable USB