This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Where to find complete list of SDK error codes?

When my program hits an error returned by an NRF API call, I get a hex number corresponding to that error from the app_error.c:

case NRF_FAULT_ID_SDK_ERROR:
    m_error_data.p_error_info = (error_info_t *)info;
    m_error_data.err_code     = m_error_data.p_error_info->err_code;
    m_error_data.line_num     = m_error_data.p_error_info->line_num;
    m_error_data.p_file_name  = m_error_data.p_error_info->p_file_name;
    printf("sdk error %08x: line %d at %s\r\n",
        m_error_data.err_code, m_error_data.line_num, m_error_data.p_file_name);
    break;

Is there a list of those codes so that I can easily find out what a specific code means? For example, now I get an err_code 0x00000011 and cannot find out what does it mean.

Parents
  • Hi,

    This question is answered here: Table of err_codes.

    Error 0x0011 is defined in nrf_error.h as:

    #define NRF_ERROR_BUSY                        (NRF_ERROR_BASE_NUM + 17) ///< Busy
    

    The nrf_error.h file defines "SoftDevice Global Error Codes". If you need help to figure out why you get the error you will need to post the name of the function that returns the error, and preferably some code that shows how you configure the input parameters that you pass to the function.

  • Yes, that was the way I have investigated error codes, but it is pretty difficult. A simple list would be much easier. What comes to that specific error, it is actually that one:

    #define NRF_ERROR_BUSY                        (NRF_ERROR_BASE_NUM + 17) ///< Busy
    

    Because 0x11 is 17 in decimal. And the code that returns the error is:

    nrf_drv_ppi_channel_alloc(&ch);
    nrf_drv_saadc_channel_init(ch, &channel_config);
    

    Any ideas what could be the reason?

Reply
  • Yes, that was the way I have investigated error codes, but it is pretty difficult. A simple list would be much easier. What comes to that specific error, it is actually that one:

    #define NRF_ERROR_BUSY                        (NRF_ERROR_BASE_NUM + 17) ///< Busy
    

    Because 0x11 is 17 in decimal. And the code that returns the error is:

    nrf_drv_ppi_channel_alloc(&ch);
    nrf_drv_saadc_channel_init(ch, &channel_config);
    

    Any ideas what could be the reason?

Children
No Data
Related