diff options
| author | xoviat <[email protected]> | 2025-11-19 16:14:23 -0600 |
|---|---|---|
| committer | xoviat <[email protected]> | 2025-11-19 16:14:23 -0600 |
| commit | 19e61543198e2d15fd4c7aef9377c8f40ae86ae0 (patch) | |
| tree | a6b558ad88cc8ace9559217d126b84f06e405614 /embassy-stm32/src/hsem | |
| parent | 4104d114955be79cf419cb4cfb5c0e72b0abd261 (diff) | |
stm32: impl. low power test for stm32wb55
Diffstat (limited to 'embassy-stm32/src/hsem')
| -rw-r--r-- | embassy-stm32/src/hsem/mod.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/embassy-stm32/src/hsem/mod.rs b/embassy-stm32/src/hsem/mod.rs index 5f1ed9b09..e62de0454 100644 --- a/embassy-stm32/src/hsem/mod.rs +++ b/embassy-stm32/src/hsem/mod.rs | |||
| @@ -293,8 +293,13 @@ impl<T: Instance> HardwareSemaphore<T> { | |||
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | #[cfg(all(stm32wb, feature = "low-power"))] | 295 | #[cfg(all(stm32wb, feature = "low-power"))] |
| 296 | pub(crate) fn init_hsem(_cs: CriticalSection) { | 296 | pub(crate) fn init_hsem(cs: CriticalSection) { |
| 297 | rcc::enable_and_reset::<crate::peripherals::HSEM>(); | 297 | rcc::enable_and_reset_with_cs::<crate::peripherals::HSEM>(cs); |
| 298 | |||
| 299 | unsafe { | ||
| 300 | crate::rcc::REFCOUNT_STOP1 = 0; | ||
| 301 | crate::rcc::REFCOUNT_STOP2 = 0; | ||
| 302 | } | ||
| 298 | } | 303 | } |
| 299 | 304 | ||
| 300 | struct State { | 305 | struct State { |
