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

How to enable hardfault_handler in SDK12.3.0

Hi, I am using sdk 12.3.0 sd130v2. I have the hardfault_implementation.c included in the project. But I am not able to keep breakpoint anywhere in that file. I have made HARDFAULT_HANDLER_ENABLED 1 in sdk_config.h and included 'HARDFAULT_HANDLER_ENABLED' in project options defines. Still no luck. In other words, how to debug hardfault handler error in sdk 12.3.0?

Parents
  • hi Turbo J and Hung Bui, could you help me about hardfault resetting, i mean that simply i want to reset the chip when hardfault occured , currently i use ble_app_uart example in SDK 12.3.0, in sdk_config.h file i made HARDFAULT_HANDLER_ENABLED 1 but it does not reset itself. (to achieve hardfault i changed to uart priority APP_IRQ_PRIORITY_HIGHEST i dont sure about it but if i send a string ends with CR LF, disconnection occurs and chip hangs on) i saw that hardfault_process function defined in WEAK format so in main file i included hardfault.h and added following function : void HardFault_process(HardFault_stack_t * p_stack) { NVIC_SystemReset(); } unfortunately chip does not reset itself when hardfault occurs, could you help me about my mistake?

Reply
  • hi Turbo J and Hung Bui, could you help me about hardfault resetting, i mean that simply i want to reset the chip when hardfault occured , currently i use ble_app_uart example in SDK 12.3.0, in sdk_config.h file i made HARDFAULT_HANDLER_ENABLED 1 but it does not reset itself. (to achieve hardfault i changed to uart priority APP_IRQ_PRIORITY_HIGHEST i dont sure about it but if i send a string ends with CR LF, disconnection occurs and chip hangs on) i saw that hardfault_process function defined in WEAK format so in main file i included hardfault.h and added following function : void HardFault_process(HardFault_stack_t * p_stack) { NVIC_SystemReset(); } unfortunately chip does not reset itself when hardfault occurs, could you help me about my mistake?

Children
No Data
Related