device crash when calling app_easy_gap_advertise_stop in a timer handler

6 posts / 0 new
Last post
ericxiong
Offline
Last seen:2 years 2 months ago
加入:2015-08-16 08:22
device crash when calling app_easy_gap_advertise_stop in a timer handler

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:
LT_Dialog(未验证)
Hi Eric,

Hi Eric,
Could you check with the debugger first at which point or function the program stalls?

ericxiong
Offline
Last seen:2 years 2 months ago
加入:2015-08-16 08:22
Hi LT_Dialog:

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

LT_Dialog(未验证)
Hi Eric,

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.

ericxiong
Offline
Last seen:2 years 2 months ago
加入:2015-08-16 08:22
Hi LT_Dialog:

Hi LT_Dialog:

I already set sleep mode to ARCH_SLEEP_OFF.

MT_dialog
Offline
Last seen:2 weeks 5 days ago
Staff
加入:2015-06-08 11:34
Hi ericxiong,

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