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

What is error code 0x00000004?

In my debugger, I see that variable error_code is 0x00000004

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);
}

Here is the call stack

image description

What does this error code stand for?

edit

I see that this error stands for NRF_ERROR_NO_MEM and is the return value of softdevice_enable(&ram_start) called in ble_stack_init()

  • 0x00000004 means NRF_ERROR_NO_MEM, see components\softdevice\s140\headers\nrf_error.h file. The question is where you jumped to this assert, it's typically after APP_ERROR_CHECK macro when some of SD API functions return non-OK status code. When you find which SD API function it was and look into it's comments in SDK header files (or documentation if it gets built) you typically get hint about which error codes can be thrown back and why,

Related