diff options
Diffstat (limited to 'examples/stm32wl/src')
| -rw-r--r-- | examples/stm32wl/src/bin/lora_lorawan.rs | 2 | ||||
| -rw-r--r-- | examples/stm32wl/src/bin/random.rs | 2 | ||||
| -rw-r--r-- | examples/stm32wl/src/bin/rtc.rs | 1 |
3 files changed, 2 insertions, 3 deletions
diff --git a/examples/stm32wl/src/bin/lora_lorawan.rs b/examples/stm32wl/src/bin/lora_lorawan.rs index 2c9c98861..230df4752 100644 --- a/examples/stm32wl/src/bin/lora_lorawan.rs +++ b/examples/stm32wl/src/bin/lora_lorawan.rs | |||
| @@ -33,7 +33,7 @@ bind_interrupts!(struct Irqs{ | |||
| 33 | async fn main(_spawner: Spawner) { | 33 | async fn main(_spawner: Spawner) { |
| 34 | let mut config = embassy_stm32::Config::default(); | 34 | let mut config = embassy_stm32::Config::default(); |
| 35 | config.rcc.mux = embassy_stm32::rcc::ClockSrc::HSE32; | 35 | config.rcc.mux = embassy_stm32::rcc::ClockSrc::HSE32; |
| 36 | config.rcc.enable_lsi = true; // enable RNG | 36 | config.rcc.rtc_mux = embassy_stm32::rcc::RtcClockSource::LSI; |
| 37 | let p = embassy_stm32::init(config); | 37 | let p = embassy_stm32::init(config); |
| 38 | 38 | ||
| 39 | pac::RCC.ccipr().modify(|w| w.set_rngsel(0b01)); | 39 | pac::RCC.ccipr().modify(|w| w.set_rngsel(0b01)); |
diff --git a/examples/stm32wl/src/bin/random.rs b/examples/stm32wl/src/bin/random.rs index 592e65f40..18eeac4fa 100644 --- a/examples/stm32wl/src/bin/random.rs +++ b/examples/stm32wl/src/bin/random.rs | |||
| @@ -16,7 +16,7 @@ bind_interrupts!(struct Irqs{ | |||
| 16 | async fn main(_spawner: Spawner) { | 16 | async fn main(_spawner: Spawner) { |
| 17 | let mut config = embassy_stm32::Config::default(); | 17 | let mut config = embassy_stm32::Config::default(); |
| 18 | config.rcc.mux = embassy_stm32::rcc::ClockSrc::HSE32; | 18 | config.rcc.mux = embassy_stm32::rcc::ClockSrc::HSE32; |
| 19 | config.rcc.enable_lsi = true; //Needed for RNG to work | 19 | config.rcc.rtc_mux = embassy_stm32::rcc::RtcClockSource::LSI; |
| 20 | 20 | ||
| 21 | let p = embassy_stm32::init(config); | 21 | let p = embassy_stm32::init(config); |
| 22 | pac::RCC.ccipr().modify(|w| { | 22 | pac::RCC.ccipr().modify(|w| { |
diff --git a/examples/stm32wl/src/bin/rtc.rs b/examples/stm32wl/src/bin/rtc.rs index 2be6c7b93..e123425a0 100644 --- a/examples/stm32wl/src/bin/rtc.rs +++ b/examples/stm32wl/src/bin/rtc.rs | |||
| @@ -17,7 +17,6 @@ async fn main(_spawner: Spawner) { | |||
| 17 | let mut config = Config::default(); | 17 | let mut config = Config::default(); |
| 18 | config.rcc.mux = ClockSrc::HSE32; | 18 | config.rcc.mux = ClockSrc::HSE32; |
| 19 | config.rcc.rtc_mux = RtcClockSource::LSE; | 19 | config.rcc.rtc_mux = RtcClockSource::LSE; |
| 20 | config.rcc.enable_rtc_apb = true; | ||
| 21 | embassy_stm32::init(config) | 20 | embassy_stm32::init(config) |
| 22 | }; | 21 | }; |
| 23 | info!("Hello World!"); | 22 | info!("Hello World!"); |
