Skip to content

Commit

Permalink
Revert the DSB because of RISC-V
Browse files Browse the repository at this point in the history
  • Loading branch information
Okarss committed Jun 14, 2024
1 parent 00062dd commit fb6a6ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit fb6a6ac

Please sign in to comment.