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

why I get m_evt_schedule_func error 4

each time my program start, I get the error m_evt_schedule_func error 4

what's the cause of this error? is it because I spend lot of time on the handler??? the handler running long task

Parents
  • The reason is probably that the scheduler queue size is full, therefore app_sched_event_put(...) will return NRF_ERROR_NO_MEM because APP_SCHED_QUEUE_FULL() returns true. The reason is probably that too many app_timer timeouts happens while the you are doing something in the handler (you said you are spending a lot of time in the handler). You can increase the APP_TIMER_OP_QUEUE_SIZE to increase the queue size. If you still are getting the error you need to spend less time in the handler somehow.

Reply
  • The reason is probably that the scheduler queue size is full, therefore app_sched_event_put(...) will return NRF_ERROR_NO_MEM because APP_SCHED_QUEUE_FULL() returns true. The reason is probably that too many app_timer timeouts happens while the you are doing something in the handler (you said you are spending a lot of time in the handler). You can increase the APP_TIMER_OP_QUEUE_SIZE to increase the queue size. If you still are getting the error you need to spend less time in the handler somehow.

Children
Related