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.
8 years, 8 months ago.
how to set the time?
Hello, set_time(1387188323); Set RTC time to 16 December 2013 10:05:23 UTC how can we set the time? what is the relation between (1387188323) to 16 December 2013 10:05:23.
3 Answers
8 years, 8 months ago.
It is the Unix-Time. For more Information look at [https://en.wikipedia.org/wiki/Unix_time]
8 years, 8 months ago.
Depending on how you want to use the RTC function with the Necleo boards, there are some considerations.
The RTC does work correctly on the boards I have if the crystals and loading capacitors are fitted, HOWEVER if the MCU is reset the RTC time registers are reset. This will happen with or without a 3v back cell connected to RTC Vin.
This renders the platform useless for true RTC functionality.
If you want an easier way to set or read the time on the Nucleo Boards I would suggest looking at Kenji's page: https://developer.mbed.org/users/kenjiArai/ and https://developer.mbed.org/users/kenjiArai/code/RTC_w_COM/
posted by Marcus Parker 19 Aug 2015