SPRUJB8 April 2024
Remaps an ECC address to data address and calls Fapi_issueProgrammingCommand().
Fapi_StatusType Fapi_issueProgrammingCommandForEccAddresses(
uint32 *pu32StartAddress,
uint16 *pu16EccBuffer,
uint16 u16EccBufferSizeInBytes
)
pu32StartAddress [in] | ECC start address in Flash for the ECC to be programmed |
pu16EccBuffer [in] | Pointer to the ECC buffer address |
u16EccBufferSizeInBytes [in] | number of bytes in the ECC buffer If the number of bytes is 1, LSB (ECC for lower 64 bits) gets programmed. MSB alone cannot be programmed using this function. If the number of bytes is 2, both LSB and MSB bytes of ECC get programmed. |
This function will remap an address in the ECC memory space to the corresponding data address space and then call Fapi_issueProgrammingCommand() to program the supplied ECC data. The same limitations for Fapi_issueProgrammingCommand() using Fapi_EccOnly mode applies to this function. The LSB of pu16EccBuffer corresponds to the lower 64 bits of the main array and the MSB of pu16EccBuffer corresponds to the upper 64 bits of the main array.
The length of the pu16EccBuffer cannot exceed 2.
This function does not check STATCMD after issuing the program command. The user application must check the STATCMD value when FSM has completed the program operation. STATCMD indicates if there is any failure occurrence during the program operation. The user application can use the Fapi_getFSMStatus function to obtain the STATCMD value.
Fapi_EccOnly mode should not be used for Bank0 DCSM OTP space. If used, an error will be returned. For the DCSM OTP space, either Fapi_AutoEccGeneration or Fapi_DataAndEcc programming modes should be used.
Fapi_Status_Success (success)
Fapi_Status_FsmBusy (FSM busy)
Fapi_Error_InvalidBaseRegCntlAddress (failure: Flash control register base address provided by user does not match the expected address)
Fapi_Error_AsyncIncorrectEccBufferLength (failure: Data buffer size specified is incorrect)
Fapi_Error_FlashRegsNotWritable (failure: Flash register writes failed. The user should make sure that the API is executing from the same zone as that of the target address for flash operation OR the user should unlock before the flash operation.
Fapi_Error_InvalidAddress (failure: User provided an invalid address. For the valid address range, see the TMS320F28P65x Microcontrollers Data Manual.