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

how can I find out the reason of error_info?

When my program was running,An error occurred.The program ran here

(app_error_handler_bare)and the error_info is

0x00000004, how can I find out the reason of error_info?

void app_error_handler_bare(ret_code_t error_code) { error_info_t error_info = { .line_num = 0, .p_file_name = NULL, .err_code = error_code, };

app_error_fault_handler(NRF_FAULT_ID_SDK_ERROR, 0, (uint32_t)(&error_info));

UNUSED_VARIABLE(error_info);

}

Parents
  • Hi, hong. Can you specify what

    IDE (for instance, Keil ARM-MDK 5 / IAR EWARM 7 / etc.),

    what chip (nRF52832-QFAA, etc)

    and what SDK / SoftDevice version you are using?

    Also, are you running an example project provided by the SDK?

    // In, nrf_error.h (SDK 12)
    #define NRF_ERROR_BASE_NUM      (0x0)       ///< Global error base
    #define NRF_SUCCESS                           (NRF_ERROR_BASE_NUM + 0)  ///< Successful command
    #define NRF_ERROR_NO_MEM                      (NRF_ERROR_BASE_NUM + 4)  ///< No Memory for operation
    

    you've received an "no memory error".

    To answer your question, I suggest using the IDE's help like the below.

    First, set the breakpoint at the app_error_handler_bare like you did.

    Second, the IDEs may provide you call stack / call graph.

    • When using Keil MDK 5

    keil

    • When using IAR EWARM 7

    IAR

    IAR ref. link

    These methods can help you to figure out why the error 0x00000004 was returned from what function.

    Also, the functions, provided from the SDK, has described the reasons for returning those error at the comment sections.

    P.S.) I've only used Keil MDK and IAR EWARM.

    So if you use other IDEs, I suggest you to investigate how to view call stack when debugging with the IDE which you are using.

    -Best Regards, Mango

  • I'm not 100% sure (since I'm a novice developer...) but this might be related with the APP_TIMER_OP_QUEUE_SIZE in the main.c.

    Most of the examples, the value of this will be 4.

    #define APP_TIMER_OP_QUEUE_SIZE     4  /**< Size of timer operation queues. */
    

    How about increasing the value? Also, what example project are you using?

    If this doesn't help, I recommend you to close this case and open a new question to receive support.

    -Best Regards

Reply
  • I'm not 100% sure (since I'm a novice developer...) but this might be related with the APP_TIMER_OP_QUEUE_SIZE in the main.c.

    Most of the examples, the value of this will be 4.

    #define APP_TIMER_OP_QUEUE_SIZE     4  /**< Size of timer operation queues. */
    

    How about increasing the value? Also, what example project are you using?

    If this doesn't help, I recommend you to close this case and open a new question to receive support.

    -Best Regards

Children
No Data
Related