MPU Exception Handler

Hi,

I am using the stack guard and need to implement a custom exception handler. Could you please push me in the right direction.

Thanks,

J

Parents Reply
  • JZone said:
    HardFault_Handler() is triggered by default,  which is a catch all for a variety of issues.

    We have a HardFault handling library in the SDK.
    To use it, add these to your projects:
    $(SDK_ROOT)/components/libraries/hardfault/hardfault_implementation.c
    $(SDK_ROOT)/components/libraries/hardfault/nrf52/handler/hardfault_handler_gcc.c //use the correct file depending on your toolchain
    And set HARDFAULT_HANDLER_ENABLED to 1 in sdk_config.h, and optionally add DEBUG_NRF in your preprocessor definitions(adds breakpoint right before the call to HardFault_process())

    The HardFault_process function is weak, and you can implement your own custom HardFault_process function in your application.

Children
Related