例外发生在SDK代码中。

11 posts / 0 new
Last post
ericxiong.
Offline
Last seen:2年4个月前
Joined:2015-08-16 08:22
例外发生在SDK代码中。

Hi Dialog,

my device run away after booting for several minutes or hours. It happened not regularly. Exception location is in SDK internal code. The followings are 3 exceptions information captured by UART. SDK is 5.0.3. Could you help me?

Exception 1:

--- HF STATUS
R0 = 0x00000080
R1 = 0x0000000d
r2 = 0x0000000d.
R3 = 0x00000002.
r12=0x00000028
lr =0x200013cb
pc =0x0002401a
psr=0x21000000

map file has this:

lld_data_ind_handler 0x00023fef thumb代码0 rom_symdef.txt绝对
llm_le_enc_cmp_evt_handler 0x000241cf Thumb Code 0 rom_symdef.txt ABSOLUTE

gapm_adv_sanity 0x200012d5 Thumb Code 170 gapm_util.obj(.text)
.text 0x20001384 Section 0 ke_task.obj(.text)
ke_task_schedule 0x20001385 Thumb Code 146 ke_task.obj(.text)
.text 0x2000143c Section 0 smpc.obj(.text)
.text 0x20001598 Section 0 smpc_task.obj(.text)
。text x200017ac节0 llc.obj(。text)
my_llc_le_con_update_cmd_handler 0x200017ad Thumb Code 30 llc.obj(.text)

Exception 2:

--- HF STATUS
R1 = 0x0000000d
r2 = 0x0000000d.
R3 = 0x00000002.
r12=0x00000028
lr = 0x2000141b
PC = 0x0002401A
psr=0x21000000

map file has this:

lld_data_ind_handler 0x00023fef thumb代码0 rom_symdef.txt绝对
llm_le_enc_cmp_evt_handler 0x000241cf Thumb Code 0 rom_symdef.txt ABSOLUTE

GAPM_ADV_SANITY 0x20001325拇指代码170 GAPM_UTIL.OBJ(.text)
.text 0x200013d4部分0 ke_task.obj(.text)
ke_task_schedule 0x200013d5 Thumb Code 146 ke_task.obj(.text)
.text 0x2000148c Section 0 smpc.obj(.text)
.text 0x200015e8第0节SMPC_TASK.OBJ(.text)
.text 0x200017fc Section 0 llc.obj(.text)
my_llc_le_con_update_cmd_handler 0x200017fd thumb代码30 llc.obj(.text)

Exception 3:

--- HF STATUS
R0 = 0x240027FD
R1 = 0x00000000.
r2 =0x0000003f
r3 =0x00000050
R12 = 0x00080EC8.
lr = 0xfffffff9.
PC = 0x240027FC
psr=0x01000014

在地图文件中没有找到LR和PC地址。

Keywords:
设备:
MT_dialog
Offline
Last seen:2个月2周前
Staff
Joined:2015-06-08 11:34
Hi ericxiong,

Hi ericxiong,

Thats a tricky one, its a bit difficult to pin point the problem in something like that since the pc crashed in a ROM function. What i can suggest is to check the allocation of messages you send, perhaps somethings goes wrong, or check if there are any memcpy functions, perhaps there is a mistake with a wrong size etc that corrupts the data in the memory.

Thanks MT_dialog

Joacimwe
Offline
Last seen:1年5个月前
格鲁鲁
Joined:2014-01-14 06:45
例外1和2似乎

例外1和2似乎相同。例外3很难说出任何事情。

In exception 1 and 2, it seems like the lld_data_ind_handler is handling a BLE event even though there is currently no connection established, therefore crashes with a null pointer exception.
我疯狂的猜测是,在发生这种情况之前,连接被撕毁了。

How is your setup? Is your DA14580 a peripheral or central?
您是否有与对等体的永久性主动连接,或者您在发生这种情况时手动连接/断开连接吗?
Are you sending a lot of data over the BLE link or is it idling most of the time?
您是否发送连接参数更新请求或其他类型的非GATT请求?
How often does this happen?

ericxiong.
Offline
Last seen:2年4个月前
Joined:2015-08-16 08:22
你的意思是lld_data_ind

嗨Joacimwe:
你的意思是lld_data_ind_handler is handling a BLE event which is an indication to central device?

I build a new app referring to prox_reporter peripheral sample code. My DA14580 is a peripheral with a 128-bit UUID service which has a 150 bytes size characteric and a 20 bytes size characteric and several 2 or 4 bytes size characterics.
Central device is iOS or Android. connection time is for several minutes and central device will disconnect manually.
After connected, central device will read( or write) about 50 bytes from( to) DA14580. It is idling most of the time.
我使用SDK默认连接参数,不确定iOS或Android是否会发送连接参数更新请求。
This happens about 1 time per day if my test iOS app works which firstly do scanning, then connect to discovered DA14580 and read a few bytes and keep connection for 1 minute, then disconnect with DA14580 and keep idle for 1 minute, periodically. when testing, I sometimes will press key which will trigger a indication to notify central device.

ericxiong.
Offline
Last seen:2年4个月前
Joined:2015-08-16 08:22
--- NMI状态

Two new exceptions:

例外4:

--- NMI状态
R0 = 0x00000000
R1 = 0x00000000.
r2 =0x000805e4
R3 = 0x00000002.
r12=0x00000028
lr =0x00026079
PC = 0x00032102
psr=0x61000000

地图文件是:

lld_evt_schedule 0x00026041 Thumb Code 0 rom_symdef.txt ABSOLUTE
lld_evt_init_func 0x000260e9 Thumb Code 0 rom_symdef.txt ABSOLUTE

KE_EVENT_CLEAR 0x000320DD拇指代码0 rom_symdef.txt绝对
ke_event_get 0x00032109拇指代码0 rom_symdef.txt绝对

例外5:

--- NMI状态
r0 =0x00080fa4
R1 = 0x00008000
r2 =0xffffffff
r3 =0x00000025
r12=0x00000028
lr =0x00025d29
pc =0x0002572e
psr=0x01000000

地图文件:

lld_data_tx_flush 0x00025603 Thumb Code 0 rom_symdef.txt ABSOLUTE
lld_evt_int_extract 0x00025877拇指代码0 rom_symdef.txt绝对
lld_evt_init 0x00025f5f Thumb Code 0 rom_symdef.txt ABSOLUTE

Joacimwe
Offline
Last seen:1年5个月前
格鲁鲁
Joined:2014-01-14 06:45
这些例外似乎非常

These exceptions seem very strange... Are you sure you don't corrupt your stack or something?

ericxiong.
Offline
Last seen:2年4个月前
Joined:2015-08-16 08:22
嗨Joacimwe:

嗨Joacimwe:

什么类型的东西会破坏堆栈?在测试时,我的iOS应用程序只需从DA14580读取几个字节数据。你能告诉避免这些情况吗?谢谢!

LT_Dialog (not verified)
Hi,

Hi,
In Exception 3, the address 0x240027fc the pc pointed to was invalid, which is in a reserved region.

If stack corruption is the primary suspect so far, one thing you could start with is to check if any illegal accesses to data array in your project.

ericxiong.
Offline
Last seen:2年4个月前
Joined:2015-08-16 08:22
Hi LT_Dialog:

Hi LT_Dialog:

My all data are stored in database, and operated via the pointer got by attmdb_att_get_value in profile and App layers. Does attmdb_att_get_value maybe return invalid pointer?

LT_Dialog (not verified)
嗨埃里克,

嗨埃里克,
I mean if there's any illegal accesses in your local buffers, variables, pointers and etc

ericxiong.
Offline
Last seen:2年4个月前
Joined:2015-08-16 08:22
没有违法的访问

没有违法的访问my program. Sometimes It seems a kind of Exceptions maybe happen when program access da14580 register. my device hardware is designed according to dialog reference design. here is an exception happened in GPIO_ConfigurePin which didn't be modified.

lr = 0x200019cd.
PC = 0xFFFFFFFE.

地图文件:

GPIO_ConfigurePin 0x200019b3 Thumb Code 38 gpio.o(.text)
GPIO_GetPinStatus 0x200019d9 Thumb Code 26 gpio.o(.text)