diff options
| author | Joonas Javanainen <[email protected]> | 2024-02-20 21:33:03 +0200 |
|---|---|---|
| committer | Joonas Javanainen <[email protected]> | 2024-02-20 21:47:13 +0200 |
| commit | 9b2d096f4f8b8db3747a29fb96f7b2a228dd571f (patch) | |
| tree | 8670709cdffdf0e9c75dc6b53fabb82633b78175 | |
| parent | 55187c72763a19cd05fa8dff3f335424d5830fcc (diff) | |
USB needs PWR_CR2 USV set on STM32L4
Confirmed to be needed on an STM32L422, and based on a quick look at
L4/L4+ reference manuals, this bit is present and required to be set on
all L4 chips that have some kind of USB peripheral (USB or OTG_FS).
The `usb_otg` driver already sets it for `cfg(stm32l4)` and we should do
the same thing here.
| -rw-r--r-- | embassy-stm32/src/usb/usb.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/embassy-stm32/src/usb/usb.rs b/embassy-stm32/src/usb/usb.rs index 34d6b52fd..be321a19b 100644 --- a/embassy-stm32/src/usb/usb.rs +++ b/embassy-stm32/src/usb/usb.rs | |||
| @@ -264,7 +264,7 @@ impl<'d, T: Instance> Driver<'d, T> { | |||
| 264 | 264 | ||
| 265 | let regs = T::regs(); | 265 | let regs = T::regs(); |
| 266 | 266 | ||
| 267 | #[cfg(any(stm32l5, stm32wb))] | 267 | #[cfg(any(stm32l4, stm32l5, stm32wb))] |
| 268 | crate::pac::PWR.cr2().modify(|w| w.set_usv(true)); | 268 | crate::pac::PWR.cr2().modify(|w| w.set_usv(true)); |
| 269 | 269 | ||
| 270 | #[cfg(pwr_h5)] | 270 | #[cfg(pwr_h5)] |
