OtaSupport: Over-the-Air Programming Support
Overview
This module includes APIs for the over-the-air image upgrade process. A Server device receives an image over the serial interface from a PC or other device thorough FSCI commands. If the Server has an image storage, the image is saved locally. If not, the image is requested chunk by chunk: With image storage
OTA_RegisterToFsci()
OTA_InitExternalMemory()
OTA_WriteExternalMemory()
…
OTA_WriteExternalMemory()
Without image storage:
OTA_RegisterToFsci()
OTA_QueryImageReq()
OTA_ImageChunkReq()
…
OTA_ImageChunkReq()
A Client device processes the received image by computing the CRC and filter unused data and stores the received image into a non-volatile storage. After the entire image has been transferred and verified, the Client device informs the Bootloader application that a new image is available, and that the MCU must be reset to start the upgrade process. See the following command sequence:
OTA_StartImage()
OTA_PushImageChunk() and OTA_CrcCompute ()
…
OTA_PushImageChunk() and OTA_CrcCompute ()
OTA_CommitImage()
OTA_SetNewImageFlag()
ResetMCU()