Other Parts Discussed in Thread: CONTROLSUITE
I add the following section of code in the Example_CallFlashAPI(), file location: C:\ti\controlSUITE\device_support\f28m35x\v207\F28M35x_examples_Dual\flash_prog\m3\flash_programming_m3.c , found that can not be continuous erase sector, sometimes can consecutive erase two or three sectors, sometimes not, always in the Fapi_doBlankCheck fail, reference to the two replies on the e2e link:
e2e.ti.com/.../1233117
Add *(int *)0x400FA160 = 0xC12F59A0 and Fapi_setupBankSectorEnable() in code:
*(int *)0x400FA160 = 0xC12F59A0;
FlashInit();
oLibInfo = Fapi_getLibraryInfo();
Fapi_setupBankSectorEnable();
but, and do not add the same, can not do continuous erase sector, add the code as follows:
uint32 sectorstart,num;
uint32 sectorlength;
sectorstart=0x00208000;
sectorlength=0;
for(num=2;num<oFlashBankSectors.u32NumberOfSectors;num++)
{
if(num>0)
{
sectorstart=sectorstart+sectorlength;
}
else
{sectorstart=oFlashBankSectors.u32BankStartAddress;}
sectorlength=((uint32)oFlashBankSectors.au8SectorSizes[num])*2048;
oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector,
(uint32 *)sectorstart);
// Wait until FSM is done with erase sector operation
while (Fapi_checkFsmForReady() != Fapi_Status_FsmReady){}
oReturnCheck = Fapi_doBlankCheck((uint32 *)sectorstart,
sectorlength,
&oFlashStatusWord);
if(oReturnCheck != Fapi_Status_Success)
{
//Example_Error(oReturnCheck);
}
}
Please help me to solve this problem, why not continuous erase sector?