Hello,
We have a product that sends out an ESB message approximately ever second, it does this using the RTC timer with the following setting:
static void rtc_config(void)
{
uint32_t err_code;
//Initialize RTC instance
nrf_drv_rtc_config_t config = NRF_DRV_RTC_DEFAULT_CONFIG;
config.prescaler = 4095;
err_code = nrf_drv_rtc_init(&rtc, &config, rtc_handler);
APP_ERROR_CHECK(err_code);
//Enable tick event & interrupt
//nrf_drv_rtc_tick_enable(&rtc,true);
//Set compare channel to trigger interrupt after COMPARE_COUNTERTIME seconds
err_code = nrf_drv_rtc_cc_set(&rtc,0,COMPARE_COUNTERTIME * 8,true);
APP_ERROR_CHECK(err_code);
//Power on RTC instance
nrf_drv_rtc_enable(&rtc);
}
It sends the message then, goes into SystemOn sleep using the power manage function:
void power_manage( void )
{
__WFE();
__SEV();
__WFE();
}
We had a batch go out and now a month later they have all stopped functioning, we believe that the processor is stuck in systemOn sleep as the included 3V cell batteries still have charge.
Has anyone come across a similar issue in the past or has any idea how to debug this?
One idea we have had is running a watchdog timer to make sure that the process never stalls for more than 2 seconds, but would still be nice to know what's causing the issue.
Any help appreciated!