Merge pull request #1730 from bartekkowalski/main

LSE requires setting PWREN bit on STM32L4
This commit is contained in:
Dario Nieuwenhuis
2023-08-01 08:07:55 +00:00
committed by GitHub

View File

@ -412,6 +412,7 @@ pub(crate) unsafe fn init(config: Config) {
match config.rtc_mux {
RtcClockSource::LSE32 => {
// 1. Unlock the backup domain
RCC.apb1enr1().modify(|w| w.set_pwren(true));
PWR.cr1().modify(|w| w.set_dbp(true));
// 2. Setup the LSE