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

Can't enter app_sched_execute, is the scheduler blocked

Hi everyone, I am now writing a program with scheduler. But the program always can't enter app_sched_execute. I don't kow the reason. Is the scheduler blocked.

Firstly, in main I just initialize scheduler, such as APP_SCHED_INIT(0, 5);

Then, in for, for(;;) { app_sched_execute(); power_manage(); }

power_manage:
  static void power_manage(void) 
  {
    uint32_t err_code = sd_app_evt_wait();
    APP_ERROR_CHECK(err_code);
  }

I have a interrupt which has a 3s interval. when the interrupt happens, I just call the function(app_sched_event_put), such as app_sched_event_put(NULL, 0, test_example_sched_event_handler);

My program also have two timers, and the one interval is 1s, the other is 5s, with calling APP_TIMER_INIT and app_timer_create to initialize timer, app_timer_start start the timer.

The program run in the nrf51822. After 15 hours or longer hours, the program can't enter the app_sched_execute.

Parents Reply Children
No Data
Related