mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-26 20:00:27 +00:00
Added RTC low-power support for STM32WBA65
Also added low-power feature for STM32WBA65RI build
This commit is contained in:
parent
3e1b0e4aec
commit
d9cd93ca22
2
ci.sh
2
ci.sh
@ -172,7 +172,7 @@ cargo batch \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32wba50ke,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32wba55ug,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32wba62cg,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32wba65ri,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32wba65ri,defmt,exti,time-driver-any,low-power,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32u5f9zj,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv8m.main-none-eabihf --features stm32u5g9nj,defmt,exti,time-driver-any,time \
|
||||
--- build --release --manifest-path embassy-stm32/Cargo.toml --target thumbv7em-none-eabi --features stm32wb35ce,defmt,exti,time-driver-any,time \
|
||||
|
@ -66,7 +66,7 @@ pub(crate) enum WakeupPrescaler {
|
||||
}
|
||||
|
||||
#[cfg(any(
|
||||
stm32f4, stm32l0, stm32g4, stm32l4, stm32l5, stm32wb, stm32h5, stm32g0, stm32u5, stm32u0
|
||||
stm32f4, stm32l0, stm32g4, stm32l4, stm32l5, stm32wb, stm32h5, stm32g0, stm32u5, stm32u0, stm32wba
|
||||
))]
|
||||
impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel {
|
||||
fn from(val: WakeupPrescaler) -> Self {
|
||||
@ -82,7 +82,7 @@ impl From<WakeupPrescaler> for crate::pac::rtc::vals::Wucksel {
|
||||
}
|
||||
|
||||
#[cfg(any(
|
||||
stm32f4, stm32l0, stm32g4, stm32l4, stm32l5, stm32wb, stm32h5, stm32g0, stm32u5, stm32u0
|
||||
stm32f4, stm32l0, stm32g4, stm32l4, stm32l5, stm32wb, stm32h5, stm32g0, stm32u5, stm32u0, stm32wba
|
||||
))]
|
||||
impl From<crate::pac::rtc::vals::Wucksel> for WakeupPrescaler {
|
||||
fn from(val: crate::pac::rtc::vals::Wucksel) -> Self {
|
||||
@ -227,7 +227,7 @@ impl Rtc {
|
||||
<RTC as crate::rtc::SealedInstance>::WakeupInterrupt::unpend();
|
||||
unsafe { <RTC as crate::rtc::SealedInstance>::WakeupInterrupt::enable() };
|
||||
|
||||
#[cfg(not(any(stm32u5, stm32u0)))]
|
||||
#[cfg(not(any(stm32u5, stm32u0, stm32wba)))]
|
||||
{
|
||||
use crate::pac::EXTI;
|
||||
EXTI.rtsr(0).modify(|w| w.set_line(RTC::EXTI_WAKEUP_LINE, true));
|
||||
@ -247,5 +247,11 @@ impl Rtc {
|
||||
RCC.srdamr().modify(|w| w.set_rtcapbamen(true));
|
||||
RCC.apb3smenr().modify(|w| w.set_rtcapbsmen(true));
|
||||
}
|
||||
#[cfg(stm32wba)]
|
||||
{
|
||||
use crate::pac::RCC;
|
||||
// RCC.srdamr().modify(|w| w.set_rtcapbamen(true));
|
||||
RCC.apb7smenr().modify(|w| w.set_rtcapbsmen(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ trait SealedInstance {
|
||||
const BACKUP_REGISTER_COUNT: usize;
|
||||
|
||||
#[cfg(feature = "low-power")]
|
||||
#[cfg(not(any(stm32u5, stm32u0)))]
|
||||
#[cfg(not(any(stm32wba, stm32u5, stm32u0)))]
|
||||
const EXTI_WAKEUP_LINE: usize;
|
||||
|
||||
#[cfg(feature = "low-power")]
|
||||
|
@ -146,7 +146,7 @@ impl SealedInstance for crate::peripherals::RTC {
|
||||
type WakeupInterrupt = crate::interrupt::typelevel::RTC_WKUP;
|
||||
} else if #[cfg(any(stm32g0, stm32u0))] {
|
||||
type WakeupInterrupt = crate::interrupt::typelevel::RTC_TAMP;
|
||||
} else if #[cfg(any(stm32l5, stm32h5, stm32u5))] {
|
||||
} else if #[cfg(any(stm32l5, stm32h5, stm32u5, stm32wba))] {
|
||||
type WakeupInterrupt = crate::interrupt::typelevel::RTC;
|
||||
}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user