SPRUJB8 April 2024
Issues an erase command to the Flash State Machine along with a user-provided sector address.
Fapi_StatusType Fapi_issueAsyncCommandWithAddress(
Fapi_FlashStateCommandsType oCommand,
uint32 *pu32StartAddress
)
oCommand [in] | Command to issue to the FSM. Use Fapi_EraseSector |
pu32StartAddress [in] | Flash sector address for erase operation |
This function issues an erase command to the Flash State Machine for the user-provided sector address. This function does not wait until the erase operation is over; it just issues the command and returns back. Hence, this function always returns success status when the Fapi_EraseSector command is used. The user application must wait for the Flash Wrapper to complete the erase operation before returning to any kind of Flash accesses. The Fapi_checkFsmForReady() function can be used to monitor the status of an issued command.
This function does not check STATCMD after issuing the erase command. The user application must check the STATCMD value when FSM has completed the erase operation. STATCMD indicates if there is any failure occurrence during the erase operation. The user application can use the Fapi_getFSMStatus function to obtain the STATCMD value. Also, the user application should use the Fapi_doBlankCheck() function to verify that the Flash is erased.
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_FeatureNotAvailable (failure: User requested a command that is not supported).
Fapi_Error_FlashRegsNotWritable (failure: Flash register write 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.
(Please refer to the flash programming example provided in C2000Ware at “C2000Ware_.....\driverlib\F28P65x\examples\....\flash\flashapi_128bit_programming\flashapi_cpu1_128bitprogramming.c”)