Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

ERROR 4 [NRF_ERROR_NO_MEM] : app_sched_event_put()

Hi all:

SDK17.1.0

softdevice:s112

example:ble_app_hids_keyboard

I add a lot of function in my project ,including gzll, i2c,timer1 ,app timer ,rtc ,flash read/write...

but it shows the error as below

<error> app: ERROR 4 [NRF_ERROR_NO_MEM] at ..\..\..\..\..\..\components\libraries\timer\app_timer2.c:192

app_timer2.c

uint32_t err_code = app_sched_event_put(&timer_event,
sizeof(timer_event),
scheduled_timeout_handler);

The "c:192" is app_sched_event_put().

(1)Could you know what reason cause this issue?

(2)How to solve it?

   Now I just modify the "SCHED_QUEUE_SIZE".

  #define SCHED_QUEUE_SIZE 46

best regards,

Joe

Parents
  • Sounds to me that you are calling app_sched_event_put() must faster than you are able to call app_sched_execute() in your while loop in main().

    You can try to consider increasing SCHED_QUEUE_SIZE a bit more, but if that doesn't help, then you should look into how frequently you are calling your app_timer, and try to reduce how often it's called, or try to look into what may be preventing app_sched_execute() from being called frequently enough.

    Kenneth

Reply
  • Sounds to me that you are calling app_sched_event_put() must faster than you are able to call app_sched_execute() in your while loop in main().

    You can try to consider increasing SCHED_QUEUE_SIZE a bit more, but if that doesn't help, then you should look into how frequently you are calling your app_timer, and try to reduce how often it's called, or try to look into what may be preventing app_sched_execute() from being called frequently enough.

    Kenneth

Children
Related