aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-08-01 08:07:55 +0000
committerGitHub <[email protected]>2023-08-01 08:07:55 +0000
commit5e4f65fe1f64f44d5680b42f02f2d7e5ef9ed6c3 (patch)
treead4cd2b3b737f1f2d399b23a2479c0c579c47cde
parenta1fce1b554bea8cad7f87073748145aaeca634f8 (diff)
parent5fcebd28f477f9e34ae2075b0cb6afdd545689ce (diff)
Merge pull request #1730 from bartekkowalski/main
LSE requires setting PWREN bit on STM32L4
-rw-r--r--embassy-stm32/src/rcc/l4.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/embassy-stm32/src/rcc/l4.rs b/embassy-stm32/src/rcc/l4.rs
index 237b7bc91..36c9eb2f5 100644
--- a/embassy-stm32/src/rcc/l4.rs
+++ b/embassy-stm32/src/rcc/l4.rs
@@ -412,6 +412,7 @@ pub(crate) unsafe fn init(config: Config) {
412 match config.rtc_mux { 412 match config.rtc_mux {
413 RtcClockSource::LSE32 => { 413 RtcClockSource::LSE32 => {
414 // 1. Unlock the backup domain 414 // 1. Unlock the backup domain
415 RCC.apb1enr1().modify(|w| w.set_pwren(true));
415 PWR.cr1().modify(|w| w.set_dbp(true)); 416 PWR.cr1().modify(|w| w.set_dbp(true));
416 417
417 // 2. Setup the LSE 418 // 2. Setup the LSE