This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Can you post a sample on how to erase the flash bank7 (eeprom) on Cortex R4 RM48L950
#include "F021_FMC_LE.h"
void EraseBank7 (void)
{
Fapi_StatusType oReturnCheck = Fapi_Status_Success;
uint32 u32ReturnCheck;
/*
* This code example assumes that the device has been initialized, the appropriate EWAIT value has
* been set, and the PLL has set the device to execute with a system clock speed of 200MHz.
*/
/*
* Initialize the Flash API. This examples assumes that this had not be done previously
* for the current system clock speed.
*/
oReturnCheck = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS,200);
if(oReturnCheck == Fapi_Status_Success)
{
/*
* This must be done to make Bank 7 (EEPROM Bank) Active. It only needs to be done once
* as long as no other Flash operations are performed on other banks within the device.
*/
oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank7);
/* Issue the bank erase command on Bank 7 */
oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseBank,(uint32 *)0xf0200000);
/* Poll Flash State Machine until it is at a ready status */
if(oReturnCheck == Fapi_Status_Success)
{
while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy);
}
/* Get erase operation results. If not 0, then an error has occured */
u32ReturnCheck = Fapi_getFsmStatus();
}
}