fix(rtc): Call RTC_EnableRTCE after RTC_Init
RTC_Init will turn off the RTC and readout will not be possible until RTC_EnableRTCE is called. The previous version worked because the bootloader would call RTC_Init and Epicardium would then call RTC_EnableRTCE. This broke with the hardware-init changes in b76ac8fc and lead to behavior where cold boot would not enable the RTC. This commit switches the order of the two calls in the bootloader so it is always initialized correctly. Because some older bootloaders are already out in the field, this commit also introduces basic rtc init into Epicardium so the new firmware can work correctly with older bootloaders. Signed-off-by:Rahix <rahix@rahix.de>
Please register or sign in to comment