fix low-power: APB1 needed for LSE
This commit is contained in:
parent
5626a28af2
commit
ad64d7b20b
@ -88,6 +88,11 @@ impl BackupDomain {
|
||||
))]
|
||||
#[allow(dead_code, unused_variables)]
|
||||
pub fn configure_ls(clock_source: RtcClockSource, lsi: bool, lse: Option<LseDrive>) {
|
||||
if lsi || lse.is_some() {
|
||||
use crate::rtc::sealed::Instance;
|
||||
crate::peripherals::RTC::enable_peripheral_clk();
|
||||
}
|
||||
|
||||
if lsi {
|
||||
#[cfg(rtc_v3u5)]
|
||||
let csr = crate::pac::RCC.bdcr();
|
||||
|
@ -154,8 +154,6 @@ impl Default for RtcCalibrationCyclePeriod {
|
||||
|
||||
impl Rtc {
|
||||
pub fn new(_rtc: impl Peripheral<P = RTC>, rtc_config: RtcConfig) -> Self {
|
||||
RTC::enable_peripheral_clk();
|
||||
|
||||
let mut this = Self {
|
||||
#[cfg(feature = "low-power")]
|
||||
stop_time: Mutex::const_new(CriticalSectionRawMutex::new(), Cell::new(None)),
|
||||
|
Loading…
Reference in New Issue
Block a user