This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDK13 nrf_drv_rtc_init bug!

Line 73 in function nrf_drv_rtc_init snippet bellow checks for UNINIT state. It accesses the m_cb array which is an uninitialized global. That condition would intermittently fail.

if (m_cb[p_instance->instance_id].state != NRF_DRV_STATE_UNINITIALIZED)
{
    err_code = NRF_ERROR_INVALID_STATE;
    NRF_LOG_WARNING("Function: %s, error code: %s.\r\n", (uint32_t)__func__, (uint32_t)ERR_TO_STR(err_code));
    return err_code;
}
Related