Other Parts Discussed in Thread: TIMAC, Z-STACK
Hi Ti,
there are 2 issues for my project about the OTA.
1:some time the download is failed at the end of the OTA, I debugged and found the image CRC is wrong, I don't know how this occurs?
if ( HalOTAChkDL ( HAL_OTA_CRC_OSET ) != SUCCESS )
{
#if (defined HAL_LCD) && (HAL_LCD == TRUE)
HalLcdWriteString ( "OTA CRC Fail", HAL_LCD_LINE_3 );
#endif
return ZCL_STATUS_INVALID_IMAGE;
}
2:some time it go to the next step when everything is ok and before reset the system it is wrong like below:
if (pMsg->hdr.status == ZSuccess)
{
// Reset the CRC Shadow and reboot. The bootloader will see the
// CRC shadow has been cleared and switch to the new image
//Timac_Zstack_mode=0U;
//osal_nv_write(WTM_IN_TIMAC_OR_ZSTACK_MODE, 0, 1, &Timac_Zstack_mode);
HalOTAInvRC();
SystemReset();
}
I set the breakpoint in the SystemReset(), and it can not arrive here, but it can go into the function HalOTAInvRC();
so I think it is another CRC question.
sometime I just changed a little bit code and compile the .zigbee file for the upgrade.
Thank you can show me some information.
BR,