Hi there,
we need to use Flash bank 7 as EEPROM and try it by using an TI-example. Here ist the example code:
Fapi_StatusType oReturnCheck = Fapi_Status_Success;
uint32 u32StartAddress = 0xF0200000U;
uint8 au8MainDataBuffer[16] = {0x78, 0x17, 0x19, 0x2E, 0x0A, 0xB9, 0x11, 0x70, 0x5F, 0xC1, 0x9C, 0xFD, 0x54, 0x51, 0xED, 0x86};
uint32 u32Index;
/*
Add device specific initialization here, including, but not limited to:
pll initialization, setting up RWAIT/EWAIT value, etc.
Assumes, unless otherwise noted, device has 144bit wide Flash Banks.
*/
oReturnCheck = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS,180); /* Example code is assuming operating frequency of 180 MHz */
if((oReturnCheck == Fapi_Status_Success) &&;
(Fapi_checkFsmForReady() != Fapi_Status_FsmBusy))
{
oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank7);
if(oReturnCheck == Fapi_Status_Success)
{
oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)u32StartAddress,au8MainDataBuffer,16,0,0,Fapi_AutoEccGeneration);
}
/* Wait for FSM to finish */
while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy);
/* Check the FSM Status to see if there were no errors */
if (Fapi_getFsmStatus() != 0)
{
/* Put Error handling code here */
}
}
}
As the only difference we have an unsigned integer as data length instead of the direct number "16" (we are going to use the whole code as a function). Now the Problem ist: it does'nt work!
The function "Fapi_setActiveFlashBank" returns "Fapi_Error_InvalidHclkValue"! Do we need any further initialisation or what is wrong!
We are grateful for every hint You may provide! Thanks in advance.