From 4d3fcd8d2d841dc4bce9f2f3308e9e9929a1330a Mon Sep 17 00:00:00 2001 From: Kaitlyn Kenwell Date: Fri, 8 Dec 2023 17:06:37 -0500 Subject: [PATCH 1/2] Assert CR2.USV on stm32wb55, wb35 series chips ref RM0434 p. 175 --- embassy-stm32/src/usb/usb.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embassy-stm32/src/usb/usb.rs b/embassy-stm32/src/usb/usb.rs index 9269ddd8..8b9a47f3 100644 --- a/embassy-stm32/src/usb/usb.rs +++ b/embassy-stm32/src/usb/usb.rs @@ -263,7 +263,7 @@ impl<'d, T: Instance> Driver<'d, T> { let regs = T::regs(); - #[cfg(stm32l5)] + #[cfg(any(stm32l5, stm32wb55, stm32wb35))] crate::pac::PWR.cr2().modify(|w| w.set_usv(true)); #[cfg(pwr_h5)] From 5973e69244e6b4a6f19af84bc004a139cf3f7688 Mon Sep 17 00:00:00 2001 From: Kaitlyn Kenwell Date: Fri, 8 Dec 2023 17:20:23 -0500 Subject: [PATCH 2/2] Conditionally compile line for all stm32wb chips --- embassy-stm32/src/usb/usb.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embassy-stm32/src/usb/usb.rs b/embassy-stm32/src/usb/usb.rs index 8b9a47f3..295dc919 100644 --- a/embassy-stm32/src/usb/usb.rs +++ b/embassy-stm32/src/usb/usb.rs @@ -263,7 +263,7 @@ impl<'d, T: Instance> Driver<'d, T> { let regs = T::regs(); - #[cfg(any(stm32l5, stm32wb55, stm32wb35))] + #[cfg(any(stm32l5, stm32wb))] crate::pac::PWR.cr2().modify(|w| w.set_usv(true)); #[cfg(pwr_h5)]