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:
2020-06-03 04:51:19 +00:00
parent 0f0cb73fa5
commit cdf0f4ffc9
22 changed files with 649 additions and 57 deletions

View File

@@ -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();
}
}