Update such that tests pass for v1.2
This includes minor updates for the th different MCU variant, and bugfixes. Resolves #7
This commit is contained in:
@@ -253,11 +253,11 @@ ReturnCode RtcDriver::set_time(const BSP::WallClockTime &wall_time)
|
||||
|
||||
#if defined(STM32L0XX)
|
||||
CLR(RTC->ISR, RTC_ISR_INIT);
|
||||
while (!(RTC->ISR & RTC_ISR_INITF)) {} // FIXME: this is probably inverted
|
||||
while (RTC->ISR & RTC_ISR_INITF) {}
|
||||
while (!(RTC->ISR & RTC_ISR_RSF)) {}
|
||||
#elif defined(STM32L4XX)
|
||||
CLR(RTC->ICSR, RTC_ICSR_INIT);
|
||||
while ((RTC->ICSR & RTC_ICSR_INITF)) {}
|
||||
while (RTC->ICSR & RTC_ICSR_INITF) {}
|
||||
while (!(RTC->ICSR & RTC_ICSR_RSF)) {}
|
||||
#else
|
||||
#error "Unsupported device type"
|
||||
@@ -415,7 +415,9 @@ extern "C" void RTC_IRQHandler()
|
||||
CLR(RTC->ISR, RTC_ISR_WUTF);
|
||||
// Disable the Wakeup timer (its periodic, but we use it as a
|
||||
// one-shot timer
|
||||
RtcDriver::enable_rtc_write();
|
||||
CLR(RTC->CR, RTC_CR_WUTE);
|
||||
RtcDriver::disable_rtc_write();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user