aboutsummaryrefslogtreecommitdiff
path: root/embassy-stm32/src/hsem
diff options
context:
space:
mode:
authorxoviat <[email protected]>2025-11-19 16:14:23 -0600
committerxoviat <[email protected]>2025-11-19 16:14:23 -0600
commit19e61543198e2d15fd4c7aef9377c8f40ae86ae0 (patch)
treea6b558ad88cc8ace9559217d126b84f06e405614 /embassy-stm32/src/hsem
parent4104d114955be79cf419cb4cfb5c0e72b0abd261 (diff)
stm32: impl. low power test for stm32wb55
Diffstat (limited to 'embassy-stm32/src/hsem')
-rw-r--r--embassy-stm32/src/hsem/mod.rs9
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"))]
296pub(crate) fn init_hsem(_cs: CriticalSection) { 296pub(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
300struct State { 305struct State {