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

app_timer_start causes a hard fault

The device is connected to Keil for debugging.
When BLE send and timer start-stop is repeated, it may stop at HardFault_Handler.

Looking at the call stack at that time, 0x04 is displayed due to a LOCAL ERROR of app_timer_start.
I think this is the error cause.
However, even if I set breakpoints at the following locations, it still does not stop, but an error of 0x04 occurred in app_timer_start.
I don't know why.

( 0x04: NRF_ERROR_NO_MEM)

****

app_timer.c

  static uint32_t timer_start_op_schedule(timer_node_t * p_node,
                                                                  uint32_t timeout_initial,
                                                                  uint32_t timeout_periodic,
                                                                  void * p_context)
    {
      uint8_t last_index;
      uint32_t err_code = NRF_SUCCESS;

      CRITICAL_REGION_ENTER();
       timer_user_op_t * p_user_op = user_op_alloc(&last_index);
       if (p_user_op == NULL)
       {
         err_code = NRF_ERROR_NO_MEM;      <=Break point
       }

****

Parents Reply Children
No Data
Related