AM263Px MCU+ SDK  10.01.00
FOTA Agent

The Fota Agent driver provides API to Update Firmware over The Air by scheduling the writes in chunks of smaller size while the new image is being recieved over a certain protocol(CAN for example).

Features Supported

  • Supports Writes in 4KB chunks
  • Only ELF image format supported
  • Both XIP and Non-XIP files

Features NOT Supported

  • RPRC image format

Example Usage

Include the below file to access the APIs

#include <stdio.h>

Init API

int32_t init_FOTAAgent(void)
{
/* Initialize Fota Agent Driver*/
int32_t status;
status = FOTAAgent_init(&fotaAgentHandle);
return status;
}

Write Start API

FOTAAgent_writeStart(&fotaAgentHandle,flashBaseOffset,offset,isXip);

Write Update API

for(int i=0;i<totalChunks;i++)
{
status += FOTAAgent_writeUpdate(&fotaAgentHandle,gOspiTxBuf + i*WRITE_CHUNK_SIZE,WRITE_CHUNK_SIZE);
}

Write End API

status += FOTAAgent_writeEnd(&fotaAgentHandle);

API

APIs for FOTA Agent

FOTAAgent_writeUpdate
int32_t FOTAAgent_writeUpdate(FOTAAgent_handle *pHandle, uint8_t *buf, uint32_t size)
Sends write scheduling request to hardware IP.
FOTAAgent_init
int32_t FOTAAgent_init(FOTAAgent_handle *pHandle)
Initilize the FOTA Agent and the driver.
FOTAAgent_writeEnd
int32_t FOTAAgent_writeEnd(FOTAAgent_handle *pHandle)
End Fota Write operation.
SystemP_SUCCESS
#define SystemP_SUCCESS
Return status when the API execution was successful.
Definition: SystemP.h:56
FOTAAgent_writeStart
void FOTAAgent_writeStart(FOTAAgent_handle *pHandle, uint32_t baseAddr, uint32_t wrOffset, uint32_t isXip)
Starts Fota write operation.
DebugP_assert
#define DebugP_assert(expression)
Function to call for assert check.
Definition: DebugP.h:177
fota_agent.h
FOTA Agent Driver API/interface file.