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

Watch dog and while statement

Based on nRF5_SDK_15.3.0_59ac345 at NRF52810 development board,
1. Enable the watchdog with reload value = 2000, and feed it per 1000ms by app_timer
2. Initialize the FDS and wait its ready

static void _on_fds_event(fds_evt_t const* evt)
{

switch(evt->id){

case FDS_EVT_INIT:
if(evt->result == FDS_SUCCESS){
_fds_ready = true;
}
break;

case FDS_EVT_WRITE:
break;

case FDS_EVT_UPDATE:
break;

default:
break;

}

}

_fds_ready = false;
fds_register(_on_fds_event);
if(fds_init() == NRF_SUCCESS){
while(!_fds_ready){};
}

Each time the power is turned on, a watchdog reset is triggered. The reason is while(!_fds_ready){};
It looks like the while statement affecting the watchdog app_timer.
How can I solve this problem? Thanks!

Parents Reply Children
  • I don't know if you actually opened the link from my previous reply.

    levels 0, 1 and 4 are reserved for the softdevice. 

     

    Edvin said:
    I don't know whether you are using the softdevice

     Do you use the softdevice?

     

    Edvin said:
    Try to set it to 3, and see if that helps.

     so you tried 0, 1 and 5. Did you try 3?

    Check out the link, and pick a value that is higher than the softdevice's "none-time-critical processing" and "SoftDevice memory protection" So you can choose either 2 or 3. If 2 works, then it is fine.

Related