Skip to content

Commit 2bb9c0f

Browse files
authored
Merge pull request #4100 from ckrenslehner/fix/stm32wb-low-power
fix: stm32wb55 low power feature did not compile
2 parents c955320 + af755a5 commit 2bb9c0f

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

ci.sh

+1
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ cargo batch \
168168
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32u5f9zj,defmt,exti,time-driver-any,time \
169169
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32u5g9nj,defmt,exti,time-driver-any,time \
170170
--- 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 \
171172
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u031r8,defmt,exti,time-driver-any,time \
172173
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u073mb,defmt,exti,time-driver-any,time \
173174
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv6m-none-eabi --features stm32u083rc,defmt,exti,time-driver-any,time \

embassy-stm32/src/rtc/low_power.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,15 @@ impl Rtc {
231231
{
232232
use crate::pac::EXTI;
233233
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+
}
235243
}
236244
#[cfg(stm32u5)]
237245
{

embassy-stm32/src/rtc/v2.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ impl SealedInstance for crate::peripherals::RTC {
137137
#[cfg(all(feature = "low-power", stm32l0))]
138138
const EXTI_WAKEUP_LINE: usize = 20;
139139

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)))]
141144
type WakeupInterrupt = crate::interrupt::typelevel::RTC_WKUP;
142145

143146
#[cfg(all(feature = "low-power", stm32l0))]

0 commit comments

Comments
 (0)