Hi,
Once the main hardware init part is done, system idles for a while and then I get a hardfault (APP_ERROR_CHECK returns fatal)
I reset the chip, and asked it to continue. When I got "Fatal" in the log window, I hit Ctrl-C to give me a prompt, and then looked at the backtrace. Please suggest if there is a better way to get the backtrace.
(gdb) mon reset
Resetting target
(gdb) c
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
HardFault_Handler ()
at ../sdk/components/toolchain/gcc/gcc_startup_nrf52.S:300
300 b .
(gdb) bt
#0 HardFault_Handler ()
at ../sdk/components/toolchain/gcc/gcc_startup_nrf52.S:300
#1 <signal handler called>
#2 0x00024402 in app_error_fault_handler (
id=id@entry=16385, pc=pc@entry=0,
info=info@entry=536935652)
at ../sdk/components/libraries/util/app_error_weak.c:54
#3 0x000243d6 in app_error_handler_bare (
error_code=<optimized out>)
at ../sdk/components/libraries/util/app_error.c:88
#4 0x00029ab8 in ble_advertising_start (
p_advertising=p_advertising@entry=0x20003988 <m_advertising>,
advertising_mode=advertising_mode@entry=BLE_ADV_MODE_SLOW)
at ../sdk/components/ble/ble_advertising/ble_advertising.c:541
#5 0x00029d1e in ble_advertising_start (
advertising_mode=<optimized out>,
p_advertising=<optimized out>)
at ../sdk/components/ble/ble_advertising/ble_advertising.c:454
#6 on_timeout (p_ble_evt=<optimized out>,
p_advertising=<optimized out>)
at ../sdk/components/ble/ble_advertising/ble_advertising.c:145
#7 ble_advertising_on_ble_evt (p_ble_evt=<optimized out>,
p_context=0x20003988 <m_advertising>)
at ../sdk/components/ble/ble_advertising/ble_advertising.c:565
#8 0x0002aea2 in nrf_sdh_ble_evts_poll (
p_context=<optimized out>)
at ../sdk/components/softdevice/common/nrf_sdh_ble.c:285
---Type <return> to continue, or q <return> to quit---
#9 0x0002ae52 in nrf_sdh_evts_poll ()
at ../sdk/components/softdevice/common/nrf_sdh.c:346
#10 SWI2_EGU2_IRQHandler ()
at ../sdk/components/softdevice/common/nrf_sdh.c:355
#11 <signal handler called>
#12 0x00013d6e in ?? ()
#13 0x00013d6c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
What could be the possible causes ? Since the issue happens to be in files I did not modify, I'm not sure how to proceed further to debug.