Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 9 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.

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
1 Answer
7 years, 9 months 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