diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-04-15 19:14:30 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-15 19:14:30 +0200 |
| commit | 2bb9c0f10dd66f3fcc058897ade0e60415067449 (patch) | |
| tree | ba2240dfc5c7fb938a54c011704146ca3139035a | |
| parent | c955320e5d65005e4cc0c9ca201bd25ad7ff17e2 (diff) | |
| parent | af755a57adbe211e1746790d1b8ba4ee644ef7fc (diff) | |
Merge pull request #4100 from ckrenslehner/fix/stm32wb-low-power
fix: stm32wb55 low power feature did not compile
| -rwxr-xr-x | ci.sh | 1 | ||||
| -rw-r--r-- | embassy-stm32/src/rtc/low_power.rs | 10 | ||||
| -rw-r--r-- | embassy-stm32/src/rtc/v2.rs | 5 |
3 files changed, 14 insertions, 2 deletions
| @@ -168,6 +168,7 @@ cargo batch \ | |||
| 168 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32u5f9zj,defmt,exti,time-driver-any,time \ | 168 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32u5f9zj,defmt,exti,time-driver-any,time \ |
| 169 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32u5g9nj,defmt,exti,time-driver-any,time \ | 169 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32u5g9nj,defmt,exti,time-driver-any,time \ |
| 170 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb35ce,defmt,exti,time-driver-any,time \ | 170 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb35ce,defmt,exti,time-driver-any,time \ |
| 171 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb55rg,defmt,exti,time-driver-any,low-power,time \ | ||
| 171 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u031r8,defmt,exti,time-driver-any,time \ | 172 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u031r8,defmt,exti,time-driver-any,time \ |
| 172 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u073mb,defmt,exti,time-driver-any,time \ | 173 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u073mb,defmt,exti,time-driver-any,time \ |
| 173 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u083rc,defmt,exti,time-driver-any,time \ | 174 | --- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u083rc,defmt,exti,time-driver-any,time \ |
diff --git a/embassy-stm32/src/rtc/low_power.rs b/embassy-stm32/src/rtc/low_power.rs index cf7c4bb28..cd075f3de 100644 --- a/embassy-stm32/src/rtc/low_power.rs +++ b/embassy-stm32/src/rtc/low_power.rs | |||
| @@ -231,7 +231,15 @@ impl Rtc { | |||
| 231 | { | 231 | { |
| 232 | use crate::pac::EXTI; | 232 | use crate::pac::EXTI; |
| 233 | EXTI.rtsr(0).modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true)); | 233 | EXTI.rtsr(0).modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true)); |
| 234 | EXTI.imr(0).modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true)); | 234 | |
| 235 | #[cfg(not(stm32wb))] | ||
| 236 | { | ||
| 237 | EXTI.imr(0).modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true)); | ||
| 238 | } | ||
| 239 | #[cfg(stm32wb)] | ||
| 240 | { | ||
| 241 | EXTI.cpu(0).imr(0).modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true)); | ||
| 242 | } | ||
| 235 | } | 243 | } |
| 236 | #[cfg(stm32u5)] | 244 | #[cfg(stm32u5)] |
| 237 | { | 245 | { |
diff --git a/embassy-stm32/src/rtc/v2.rs b/embassy-stm32/src/rtc/v2.rs index b7d25635b..28380a3c0 100644 --- a/embassy-stm32/src/rtc/v2.rs +++ b/embassy-stm32/src/rtc/v2.rs | |||
| @@ -137,7 +137,10 @@ impl SealedInstance for crate::peripherals::RTC { | |||
| 137 | #[cfg(all(feature = "low-power", stm32l0))] | 137 | #[cfg(all(feature = "low-power", stm32l0))] |
| 138 | const EXTI_WAKEUP_LINE: usize = 20; | 138 | const EXTI_WAKEUP_LINE: usize = 20; |
| 139 | 139 | ||
| 140 | #[cfg(all(feature = "low-power", any(stm32f4, stm32l4)))] | 140 | #[cfg(all(feature = "low-power", stm32wb))] |
| 141 | const EXTI_WAKEUP_LINE: usize = 19; | ||
| 142 | |||
| 143 | #[cfg(all(feature = "low-power", any(stm32f4, stm32l4, stm32wb)))] | ||
| 141 | type WakeupInterrupt = crate::interrupt::typelevel::RTC_WKUP; | 144 | type WakeupInterrupt = crate::interrupt::typelevel::RTC_WKUP; |
| 142 | 145 | ||
| 143 | #[cfg(all(feature = "low-power", stm32l0))] | 146 | #[cfg(all(feature = "low-power", stm32l0))] |
