diff options
| -rw-r--r-- | embassy-stm32/src/usb/usb.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/embassy-stm32/src/usb/usb.rs b/embassy-stm32/src/usb/usb.rs index 94af00b6e..8be051968 100644 --- a/embassy-stm32/src/usb/usb.rs +++ b/embassy-stm32/src/usb/usb.rs | |||
| @@ -305,10 +305,8 @@ impl<'d, T: Instance> Driver<'d, T> { | |||
| 305 | w.set_fres(true); | 305 | w.set_fres(true); |
| 306 | }); | 306 | }); |
| 307 | 307 | ||
| 308 | #[cfg(feature = "time")] | 308 | // wait t_STARTUP = 1us |
| 309 | embassy_time::block_for(embassy_time::Duration::from_millis(100)); | 309 | cortex_m::asm::delay(unsafe { crate::rcc::get_freqs() }.sys.to_hertz().unwrap().0 / 1_000_000); |
| 310 | #[cfg(not(feature = "time"))] | ||
| 311 | cortex_m::asm::delay(unsafe { crate::rcc::get_freqs() }.sys.to_hertz().unwrap().0 / 10); | ||
| 312 | 310 | ||
| 313 | #[cfg(not(usb_v4))] | 311 | #[cfg(not(usb_v4))] |
| 314 | regs.btable().write(|w| w.set_btable(0)); | 312 | regs.btable().write(|w| w.set_btable(0)); |
