mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
Merge pull request #1793 from ARizzo35/stm32l4-rtc-pwren
stm32l4: set pwren in rcc regardless of clock source
This commit is contained in:
commit
94fa95c699
@ -410,10 +410,11 @@ pub(crate) unsafe fn init(config: Config) {
|
|||||||
while RCC.cfgr().read().sws() != Sw::MSI {}
|
while RCC.cfgr().read().sws() != Sw::MSI {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RCC.apb1enr1().modify(|w| w.set_pwren(true));
|
||||||
|
|
||||||
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