Hi All
there is a ZED (battery power supply) .
it should keep LED always blink before it connects ZC。
so i use HalLedBlink () in the ZDO_STATE_CHANGE case like below
uint16 zclTest_event_loop( uint8 task_id, uint16 events ) { afIncomingMSGPacket_t *MSGpkt; (void)task_id; if ( events & SYS_EVENT_MSG ) { while ( (MSGpkt = (afIncomingMSGPacket_t *)osal_msg_receive( zclConnectSwitch_TaskID )) ) { switch ( MSGpkt->hdr.event ) { case ZDO_STATE_CHANGE: zclTest_NwkState = (devStates_t)(MSGpkt->hdr.status); if(zclTest_NwkState == DEV_END_DEVICE ) { HalLedSet ( HAL_LED_1 , HAL_LED_MODE_OFF); }else if(zclTest_NwkState == DEV_NWK_DISC ) { HalLedBlink ( HAL_LED_1, 0,50,1000 ); } break; } } } }
and My Zstack version is 1.2.2 which have a rejoin backoff function .
i turn off the ZC and restart it again, sometime ZED rejoin success ,but sometimes it could not rejoin the network , and the HAL_LED_1 is always blink.
although ZC is OK
so is that using HalLedBlink () function repeatedly will caused the MCU shut down?
or there is some bug of the rejoin backoff function ?
BR