stm32/rtc: enable lse in examples.
This commit is contained in:
parent
6627824c02
commit
f1e7205055
@ -23,6 +23,7 @@ async fn main(_spawner: Spawner) {
|
||||
PLLMul::Mul20,
|
||||
None,
|
||||
);
|
||||
config.rcc.lse = Some(Hertz(32_768));
|
||||
config.rcc.rtc_mux = rcc::RtcClockSource::LSE;
|
||||
embassy_stm32::init(config)
|
||||
};
|
||||
|
@ -7,6 +7,7 @@ use defmt::*;
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_stm32::rcc::ClockSrc;
|
||||
use embassy_stm32::rtc::{Rtc, RtcClockSource, RtcConfig};
|
||||
use embassy_stm32::time::Hertz;
|
||||
use embassy_stm32::Config;
|
||||
use embassy_time::{Duration, Timer};
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
@ -16,6 +17,7 @@ async fn main(_spawner: Spawner) {
|
||||
let p = {
|
||||
let mut config = Config::default();
|
||||
config.rcc.mux = ClockSrc::HSE32;
|
||||
config.rcc.lse = Some(Hertz(32_768));
|
||||
config.rcc.rtc_mux = RtcClockSource::LSE;
|
||||
embassy_stm32::init(config)
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user