mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-07 05:54:11 +08:00
Revert the DSB because of RISC-V
This commit is contained in:
parent
00062ddb0c
commit
fb6a6acbff
@ -216,19 +216,19 @@ void dcd_init(uint8_t rhport)
|
|||||||
* Here, the RM is followed. */
|
* Here, the RM is followed. */
|
||||||
|
|
||||||
for (volatile uint32_t i = 0; i < 200; i++) { // should be a few us
|
for (volatile uint32_t i = 0; i < 200; i++) { // should be a few us
|
||||||
__DSB();
|
asm("NOP");
|
||||||
}
|
}
|
||||||
// Perform USB peripheral reset
|
// Perform USB peripheral reset
|
||||||
USB->CNTR = USB_CNTR_FRES | USB_CNTR_PDWN;
|
USB->CNTR = USB_CNTR_FRES | USB_CNTR_PDWN;
|
||||||
for (volatile uint32_t i = 0; i < 200; i++) { // should be a few us
|
for (volatile uint32_t i = 0; i < 200; i++) { // should be a few us
|
||||||
__DSB();
|
asm("NOP");
|
||||||
}
|
}
|
||||||
|
|
||||||
USB->CNTR &= ~USB_CNTR_PDWN;
|
USB->CNTR &= ~USB_CNTR_PDWN;
|
||||||
|
|
||||||
// Wait startup time, for F042 and F070, this is <= 1 us.
|
// 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
|
for (volatile uint32_t i = 0; i < 200; i++) { // should be a few us
|
||||||
__DSB();
|
asm("NOP");
|
||||||
}
|
}
|
||||||
USB->CNTR = 0; // Enable USB
|
USB->CNTR = 0; // Enable USB
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user