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

app_error_handler and IAR 8.22.1

Hi,

I am experiencing problems with the app_error_handler function defined in app_error_handler_iar_c provided with the SDK V15.0.0.

If the function gets called when debugging with IAR, the IAR IDE will hang for ~15 seconds (or even crash), before reappearing in app_error_fault_handler.

Looking at the stack trace, it appears as through app_error_handler has repeatably called itself, before (presumably) running out of stack.

Is anybody else experiencing this problem? Is this a known issue?

Regards

John

Details
----------

My main.c to test this:

-------------------------------->8--------------------------------------------------------
#include "app_error.h"

int main(void)
{
    app_error_handler(100, 100, "blah");
    
    return 0;
}

void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)
{
    app_error_save_and_stop(id, pc, info);
}

-------------------------------->8--------------------------------------------------------

The extract from the stack trace provided by IAR:

-------------------------------->8--------------------------------------------------------
app_error_fault_handler

app_error_handler
app_error_handler
app_error_handler

... {30 more}
app_error_handler
app_error_handler
app_error_handler
app_error_handler
app_error_handler
app_error_handler

-------------------------------->8--------------------------------------------------------

Build details:

Preproc defines:
    BOARD_PCA10040
    CONFIG_GPIO_AS_PINRESET
    FLOAT_ABI_HARD
    NRF52
    NRF52832_XXAA
    NRF52_PAN_74
    NRF_SD_BLE_API_VERSION=6
    S132
    SOFTDEVICE_PRESENT
    SWI_DISABLE0
    DEBUG

My development environment:

SW:
      Windows 10, Version 1803.
      IAR 8.22.1
      Nordic SDK 15.0.0
      JLINK software updated to V6.32g

HW:
     PCA10040, V1.1.1

Related