Closed
Description
This commit added a check of the RTC_ISR_INITS flag in the RTC_ISR register in rtc_init(). This change has broken some RTC functionality for at least the STM32F411 processor.
The following code demonstrates the issue. The RTC is set and read properly when the device is cold booted, but a constant value, 946684800, is read from the RTC after a soft reset of the device.
#include "mbed.h"
int main() {
Serial usb(USBTX, USBRX);
usb.baud(115200);
usb.printf("starting\r\n");
set_time(1450813642);
while (true) {
time_t seconds = time(NULL);
usb.printf("time: %d\r\n", seconds);
wait(5);
}
return 0;
}