Hi,
my device start in advertising forever mode. and start a timer by ke_timer_set. I use the timer to count a day, after timeout call app_easy_gap_advertise_stop in the timer handler, device will crash. What's wrong?
this is app_on_adv_undirect_complete source code:
if (param == GAP_ERR_CANCELED)
arch_ble_ext_wakeup_on();
app_button_enable(); // it will register wakeup callback
default_app_on_adv_undirect_complete(param); // it do nothing
Device:

Hi Eric,
Could you check with the debugger first at which point or function the program stalls?
Hi LT_Dialog:
I check with debugger, it will loop in main_func then crash, debugger will print these message.
debugger output:
**JLink Warning: CPU could not be halted
* * * JLink错误:Can not read register 15 (R15) while CPU is running
* * * JLink错误:Can not read register 16 (XPSR) while CPU is running
* * * JLink错误:Can not read register 0 (R0) while CPU is running
* * * JLink错误:Can not read register 1 (R1) while CPU is running
* * * JLink错误:Can not read register 2 (R2) while CPU is running
* * * JLink错误:Can not read register 3 (R3) while CPU is running
* * * JLink错误:Can not read register 4 (R4) while CPU is running
* * * JLink错误:Can not read register 5 (R5) while CPU is running
* * * JLink错误:Can not read register 6 (R6) while CPU is running
* * * JLink错误:Can not read register 7 (R7) while CPU is running
* * * JLink错误:Can not read register 8 (R8) while CPU is running
* * * JLink错误:Can not read register 9 (R9) while CPU is running
* * * JLink错误:Can not read register 10 (R10) while CPU is running
* * * JLink错误:Can not read register 11 (R11) while CPU is running
* * * JLink错误:Can not read register 12 (R12) while CPU is running
* * * JLink错误:Can not read register 13 (R13) while CPU is running
* * * JLink错误:Can not read register 14 (R14) while CPU is running
* * * JLink错误:Can not read register 15 (R15) while CPU is running
* * * JLink错误:Can not read register 16 (XPSR) while CPU is running
* * * JLink错误:Can not read register 17 (MSP) while CPU is running
* * * JLink错误:Can not read register 18 (PSP) while CPU is running
* * * JLink错误:Can not read register 20 (CFBP) while CPU is running
Hi Eric,
This log meant that the debugger disconnected from DA1458x. You'll need to disable DA1458x's sleep mode to prevent the debugger from disconnection.
Hi LT_Dialog:
I already set sleep mode to ARCH_SLEEP_OFF.
Hi ericxiong,
Most probably you either invoke any of the functions that dynamically change the sleep mode or you disable the debugging module at some point, i can't see any other reason why keil can print out these kind of messages.
Thanks MT_dialog