We have successfully implemented & tested the working of SYSTEM ON SLEEP MODE feature in our nrf52840 devices.
Please reply to below queries for a similar issue:
- Will TIMESTAMP from internal RTC work in SYSTEM ON SLEEP MODE. We are implementing get_time() as below: https://github.com/NordicPlayground/nrf5-calendar-example
struct tm *nrf_cal_get_time_calibrated(void)
{
time_t uncalibrated_time, calibrated_time;
if(m_calibrate_factor != 0.0f)
{
uncalibrated_time = m_time + CAL_RTC->COUNTER / 8;
calibrated_time = m_last_calibrate_time + (time_t)((float)(uncalibrated_time - m_last_calibrate_time) * m_calibrate_factor + 0.5f);
m_tm_return_time = *localtime(&calibrated_time);
return &m_tm_return_time;
}
else return nrf_cal_get_time();
}
ABOVE IS NOT WORKING NOT ABLE TO SET TIMESTAMP TO CURRENT DATE/TIME OR MAINTAIN TIMESTAMP
- How to properly implement & maintain TIMESTAMP for device with SYSTEM ON SLEEP MODE? Any code snippet or calendar drivers that will work with internal RTC only as we don't have external RTC provision due to device size constrains?
Please check & reply with your valuable feedbacks/suggestions!
--
Regards
Vishal Aditya
Embedded Software Engineer