Skip to content

STM32F4 RTC broken after soft reset - mbed lib rev 111 #1480

Closed
@mfiore02

Description

@mfiore02

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions