ZHCADD5A November 2023 – April 2024 TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DH-Q1 , TMS320F28P659DK-Q1 , TMS320F28P659SH-Q1
ClearFSMStatus() 函数负责清除之前闪存操作的状态。该函数适用于 F280013x、F280015x、F28P65x 和 F28P55x 器件。该函数必须按原样使用。
Fapi_FlashStatusType oFlashStatus;
Fapi_StatusType oReturnCheck;
// Wait until FSM is done with the previous flash operation
while (Fapi_checkFsmForReady() != Fapi_Status_FsmReady){}
oFlashStatus = Fapi_getFsmStatus();
if(oFlashStatus != 0)
{
/* Clear the Status register */
oReturnCheck = Fapi_issueAsyncCommand(Fapi_ClearStatus);
// Wait until status is cleared
while (Fapi_getFsmStatus() != 0) {}
if(oReturnCheck != Fapi_Status_Success)
{
// Check Flash API documentation for possible errors
Sample_Error();
}
}