Files | Data Structures | Typedefs | Enumerations | Functions | Variables
FOTA through SD Card

This module will handle, FOTA related activities like Firmware validation and Firmware update from the SD Card. More...

+ Collaboration diagram for FOTA through SD Card:

Files

file  XDK_FOTA.h
 

Data Structures

struct  Fota_PartitionInfo_S
 Struct to hold the partition information from which fota container API's performed. More...
 

Typedefs

typedef enum Fota_Partition_E Fota_Partition_T
 
typedef struct Fota_PartitionInfo_S Fota_PartitionInfo_T
 

Enumerations

enum  Fota_Partition_E
 Enumeration to represent the Fota container partition. More...
 

Functions

Retcode_T FOTA_ReadFirmwareCRC (Fota_PartitionInfo_T partitionInfo, uint32_t *firmwareCRC)
 This function reads the Fota container firmware CRC on the fota header from the specified partition. More...
 
Retcode_T FOTA_ReadFirmwareVersion (Fota_PartitionInfo_T partitionInfo, uint32_t *firmwareVer)
 This function reads the Fota container firmware version on the fota header from the specified partition. More...
 
Retcode_T FOTA_ReadHeader (Fota_PartitionInfo_T partitionInfo, FWContainer_Header_T *header)
 This function reads the Fota container header from the specified partition. More...
 
Retcode_T FOTA_UpdateSdcardFw (void)
 This function Triggers an firmware update from Sdcard. More...
 
Retcode_T FOTA_ValidateSdcardFw (const char *firmwareName)
 This function Validates the firmware in the Sdcard. More...
 

Variables

enum Fota_Partition_E __attribute__
 

Detailed Description


Data Structure Documentation

struct Fota_PartitionInfo_S

Data Fields

Fota_Partition_T Partition
 
const char * PartitionFileName
 

Field Documentation

Fota_Partition_T Partition

Partition information

const char* PartitionFileName

File name in-case of FOTA_PARTITION_DOWNLOADED partition

Typedef Documentation

Enumeration Type Documentation

Enumerator
FOTA_PARTITION_PRIMARY 

Active running Fota container firmware in the controller FLASH memory

FOTA_PARTITION_DOWNLOADED 

Fota container firmware in SDcard memory

Function Documentation

Retcode_T FOTA_ReadFirmwareCRC ( Fota_PartitionInfo_T  partitionInfo,
uint32_t *  firmwareCRC 
)
Parameters
[in]partitionInfomention the partition information from which firmware CRC info needs to be read. In-case of FOTA_PARTITION_DOWNLOAD specify the file name Incase of FOTA_PARTITION_PRIMARY file name is not used, can be NULL.
[out]firmwareCRCpointer to hold the Fota container firmware CRC information.
Note
  • Storage_Setup & Storage_Enable must be called prior to using this API.
Returns
RETCODE_OK if fota container firmware CRC is read properly, or an error code otherwise.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T FOTA_ReadFirmwareVersion ( Fota_PartitionInfo_T  partitionInfo,
uint32_t *  firmwareVer 
)
Parameters
[in]partitionInfomention the partition information from which Firmware version needs to be read. In-case of FOTA_PARTITION_DOWNLOAD specify the file name Incase of FOTA_PARTITION_PRIMARY file name is not used can be NULL.
[out]firmwareVerpointer to hold the Fota container firmware version information.
Note
  • Storage_Setup & Storage_Enable must be called prior to using this API.
Returns
RETCODE_OK if fota container firmware version is read properly, or an error code otherwise.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T FOTA_ReadHeader ( Fota_PartitionInfo_T  partitionInfo,
FWContainer_Header_T header 
)
Parameters
[in]partitionInfomention the partition information from which header info needs to be read. In-case of FOTA_PARTITION_DOWNLOAD specify the file name Incase of FOTA_PARTITION_PRIMARY file name is not used can be NULL.
[out]headerBuffer pointer to hold the read Fota container header information.
Note
  • Storage_Setup & Storage_Enable must be called prior to using this API.
Returns
RETCODE_OK if fota container header is read properly, or an error code otherwise.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T FOTA_UpdateSdcardFw ( void  )
Note
  • Firmware has to be validated by calling FOTA_ValidateSdcardFw() before updating.
  • latest validated firmware will be updated.
Returns
If firmware is valid.Device will be rebooted so no return value, or an error code otherwise.

+ Here is the call graph for this function:

Retcode_T FOTA_ValidateSdcardFw ( const char *  firmwareName)
Parameters
[in]firmwareNameName of the firmware which needs to be validated.
Note
  • Storage_Setup & Storage_Enable must be called prior to using this API.
  • If Firmware is valid,this API will rename the firmware to "firmware.bin"
  • In-case if "firmware.bin" is already available then it will be overwritten with the new firmware "firmwareName" .
Returns
RETCODE_OK if firmware is valid, or an error code otherwise.

+ Here is the call graph for this function:

Variable Documentation

Usage Fault exception handler

BUS Fault exception handler

Memory Manager Fault exception handler


This documentation file has been automatically generated on Fri Oct 4 2019 03:47:34 by doxygen 1.8.8