I use TLSR8258 with ZB_BLE_Concurrent_SDK_2.3.0.0.
When I run function as below.
TL_ZB_TIMER_SCHEDULE(sampleLightAttrsStoreTimerCb, NULL, 200);
TLSR8258 is rebooted after sampleLightAttrsStoreTimerCb() is run by TL_ZB_TIMER_SCHEDULE().
Why it is rebooted ?
You could check in BDT what exception occurs when it happens.
To do it comment SYSTEM_RESET(), and uncomment the while(1) loop in sampleLightSysException() - is shouldn't reboot.
static void sampleLightSysException(void)
{
zcl_onOffAttr_save();
zcl_levelAttr_save();
zcl_colorCtrlAttr_save();
// SYSTEM_RESET();
led_on(LED_POWER);
while(1);
}
Then, if you look in telink_zigbee_ble_concurrent_sdk\proj\os\ev.c, you will find the following:
volatile u16 T_evtExcept[4] = {0};
u8 sys_exceptionPost(u16 line, u8 evt)
{
T_evtExcept[0] = line;
T_evtExcept[1] = evt;
/* TODO: some information stored in NV */
if(g_sysExceptCallbak){
g_sysExceptCallbak();
}
return 0;
} When the exception occurs, you can check in BDT T_evtExcept.
T_evtExcept[1] will give you exception number. You can also check T_evtExcept[0] and post it on the forum. This would probably more helpful for someone to help you
Dear Sir.
I comment out "SYSTEM_RESET();" in sampleLightSysException(void).
// SYSTEM_RESET();
But same problem is appeared.