summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2019-07-07 09:33:05 +0900
committerjaseg <git@jaseg.net>2019-07-07 09:33:05 +0900
commit8387226298732683e8d95b330fbc741b400436f9 (patch)
tree0370d8f6d981531368bc762f046ac76ac3866de2
parentfa4f717051ae75867c697b624bf35db72e9ac7a3 (diff)
downloadmoargb-8387226298732683e8d95b330fbc741b400436f9.tar.gz
moargb-8387226298732683e8d95b330fbc741b400436f9.tar.bz2
moargb-8387226298732683e8d95b330fbc741b400436f9.zip
Fix initial RTC config
-rw-r--r--main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.c b/main.c
index 2502be5..7fd062b 100644
--- a/main.c
+++ b/main.c
@@ -67,7 +67,6 @@ void rtc_alarm_reset(void) {
}
void rtc_init(void) {
- rtc_bus_sync();
RTC->CRH = 0;
if (((RTC_INITIALIZED_REGISTER_HIGH<<16) | RTC_INITIALIZED_REGISTER_LOW) != COMPILE_TIME) {
RCC->BDCR = RCC_BDCR_RTCEN | (1<<RCC_BDCR_RTCSEL_Pos) | RCC_BDCR_LSEON;
@@ -79,6 +78,7 @@ void rtc_init(void) {
RTC_INITIALIZED_REGISTER_LOW = COMPILE_TIME&0xffff;
REBOOT_REGISTER = 0;
}
+ rtc_bus_sync();
}
void rtc_set_alarm_sec(uint32_t value) {