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.
10 years, 9 months ago.
KL46Z RTC in Battery Mode
The embed.h function "time(NULL)" stops as soon as you disconnect USB. Therefore, if you run off the optional 3V coin cell on the board, the real time clock doesn't work.
Is there any way to add a BatteryOperated class (or #define) to the library to fix that?
2 Answers
10 years, 9 months ago.
The KL46 doesn't have an RTC crystal. Instead the interface IC generates a 32kHz clock signal which is used as clock source. But on coin cell that doesn't get powered. So no, you cannot easily change that simply because otherwise there is no clock source.
10 years, 9 months ago.
Unless you replace the 8Mhz crystal with a 32Khz crystal and change the clock set up, the only option is to use an external RTC, for instance one of these: