Fix unlocking the backup domain when enabling LSE
Set PWREN bit to enable the power interface clock before enabling access to the backup domain.
This commit is contained in:
parent
a1fce1b554
commit
5fcebd28f4
@ -412,6 +412,7 @@ pub(crate) unsafe fn init(config: Config) {
|
|||||||
match config.rtc_mux {
|
match config.rtc_mux {
|
||||||
RtcClockSource::LSE32 => {
|
RtcClockSource::LSE32 => {
|
||||||
// 1. Unlock the backup domain
|
// 1. Unlock the backup domain
|
||||||
|
RCC.apb1enr1().modify(|w| w.set_pwren(true));
|
||||||
PWR.cr1().modify(|w| w.set_dbp(true));
|
PWR.cr1().modify(|w| w.set_dbp(true));
|
||||||
|
|
||||||
// 2. Setup the LSE
|
// 2. Setup the LSE
|
||||||
|
Loading…
Reference in New Issue
Block a user