6 years, 5 months ago.

Using the time function under GCC

from (https://os.mbed.com/docs/mbed-os/v5.12/apis/time.html) You cannot use time, mktime and localtime C standard library functions in an interrupt handler with the GCC toolchain. We have added dedicated routines _rtc_mktime and _rtc_localtime, which are optimized and faster than C standard library functions, to overcome this issue.

So if I cant use time, how do I read the value out of the RTC?

The only 2 functions here require a passed in epoc time or a full date string. I need to know what is currently stored in the rtc clock at boot time.

Be the first to answer this question.