In my application when I disable NRF_LOG_ENABLED
, HardFault_Handler()
is getting called. To debug this issue I defined a HardFault_Handler() in my code and inserted a break point in it. Below is the backtrace
#0 HardFault_Handler () at main.c:165
#1 <signal handler called>
#2 0x0002b870 in fs_init () at ../../../../Tools/nrf_SDK/nRF5x/components/libraries/fstorage/fstorage.c:290
#3 0x0002af96 in fds_init () at ../../../../Tools/nrf_SDK/nRF5x/components/libraries/fds/fds.c:1621
#4 0x00023630 in pds_init () at ../../../../Tools/nrf_SDK/nRF5x/components/ble/peer_manager/peer_data_storage.c:334
#5 0x000245e2 in pm_init () at ../../../../Tools/nrf_SDK/nRF5x/components/ble/peer_manager/peer_manager.c:470
#6 0x00030744 in peer_manager_init (erase_bonds=false) at main.c:1453
#7 0x00030b04 in main () at main.c:1626
I guess something is breaking when fs_init() is called. Note that the application runs just fine when NRF_LOG_ENABLED
is set to 1. I am clueless about reason that must be triggering this hard fault? Or how to debug this hardware fault?