1.5.5.4 Library Interface

The PRIME Firmware Upgrade service library provides the following interfaces:

Table 1-24. Functions
NameDescription
SRV_FU_InitializeInitializes the Firmware Upgrade service
SRV_FU_TasksMaintains the Firmware Upgrade state machine
SRV_FU_StartStarts the firmware upgrade process
SRV_FU_RegisterCallbackFuResultRegisters a function to be called back when a firmware upgrade process has finished
SRV_FU_EndEnds the firmware upgrade process
SRV_FU_SwapFirmwareSwaps the firmware
SRV_FU_SetECDSAPublicKeySet the Firmware Upgrade the public key to be used for the ECDSA-256 signature
SRV_FU_CfgReadReads the firmware upgrade information
SRV_FU_CfgWriteWrites the firmware upgrade information
SRV_FU_RegisterCallbackMemTransferRegisters a function to be called back when a memory operation finishes
SRV_FU_DataReadReads image from memory
SRV_FU_DataWriteWrites image in memory
SRV_FU_RegisterCallbackCrcRegisters a function to be called back when the CRC of the received image has been calculated
SRV_FU_CalculateCrcCalculates the CRC of the received image
SRV_FU_RegisterCallbackVerifyRegisters a function to be called back when the received image has been verified
SRV_FU_VerifyImageVerifies the received image
SRV_FU_GetBitmapGets the bitmap with the information about the status of each page of the image
SRV_FU_RegisterCallbackSwapVersionRegisters a function to be called back when the PRIME stack requests to trigger a PRIME stack version swap
SRV_FU_RequestSwapVersionRequests to swap the PRIME stack version
Table 1-25. Data Types and Constants
NameTypeDescription
SRV_FU_SIGNATURE_ALGOenumSignature algorithms defined for a PRIME firmware upgrade
SRV_FU_RESULTenumResults defined for a PRIME firmware upgrade
SRV_FU_VERIFY_RESULTenumVerification result defined for a PRIME firmware upgrade
SRV_FU_INFOstructData structure with the firmware upgrade information
SRV_FU_CRC_CBFunction pointerCallback function pointer to get the calculated CRC
SRV_FU_IMAGE_VERIFY_CBFunction pointerCallback function pointer to get the result of the image verification
SRV_FU_RESULT_CBFunction pointerCallback function pointer to get the result of the firmware upgrade process
SRV_FU_MEM_TRANSFER_RESULTenumPossible results of a memory transaction
SRV_FU_MEM_TRANSFER_CMDenumPossible commands for a memory transaction
SRV_FU_MEM_TRANSFER_CBFunction PointerCallback function pointer to get the result of a memory transaction
SRV_FU_TRAFFIC_VERSIONenumTraffic versions
SRV_FU_VERSION_SWAP_CBFunction PointerCallback function pointer to trigger a swap of PRIME stack versions