Report
10 months ago.

RTC time can't count up [ODIN-W2(STM32F439?)]

Everyone, thank you for always answering.

The RTC counter of EVK_ODIN_W2 does not count up. RTC jumpers are connected, but is there a problem with programming problems? If init_rtc () is inserted, a scope error occurs.

RTC test

#include "mbed.h"

DigitalOut myled(LED1);

int main() {
    
    //  Version Output
	{  	printf ("mbed os  version =%d.%d.%d\r\n",MBED_MAJOR_VERSION,MBED_MINOR_VERSION,MBED_PATCH_VERSION);
    	printf ("mbed lib version =%d\r\n",MBED_LIBRARY_VERSION);
    }

    printf("RTC example\n"); 
    
    set_time(1387188323); // Set RTC time to 16 December 2013 10:05:23 UTC
    printf("Date and time are set.\r\n");

    while(1) {
        time_t seconds = time(NULL);
        
        printf("Time as a basic string = %s\r", ctime(&seconds));
        myled = !myled;      
        wait(1);
    }
}

It does not count up.

LOG

mbed os  version =5.7.3
mbed lib version =158
RTC example
 a basic string = Wed Dec 31 23:59:59 1969
Time as a basic string = Wed Dec 31 23:59:59 1969
Time as a basic string = Wed Dec 31 23:59:59 1969
Time as a basic string = Wed Dec 31 23:59:59 1969
Time as a basic string = Wed Dec 31 23:59:59 1969

RTC jumpers are connected. /media/uploads/Okoshi/img_0944.jpg

I tried mbed os 5.8.1 . But same result.(2018/4/11)

5.8.1

mbed lib version =160
RTC example
Date and time are set.
Time as a basic string = Wed Dec 31 23:59:59 1969
Time as a basic string = Wed Dec 31 23:59:59 1969
Time as a basic string = Wed Dec 31 23:59:59 1969

B/R H.Okoshi

Comment on this question

1 Answer

9 months, 1 week ago.

Have you found any solution to this?

I seems to have the same problem: RTC on ODIN-W2 stuck, same code on K64F works.

/Jonas


To post an answer, please log in.