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.
我在C:\ti\controlSUITE\device_support\f28m35x\v207\F28M35x_examples_Dual\flash_prog\m3 的示例代码中加入下面一段代码,发现不能连续的擦写sector,有时候能连续的擦除两三个sector,有时候不能,总是在Fapi_doBlankCheck报出错,参考过e2e上两个回复,
按照提示添加了设置:
*(int *)0x400FA160 = 0xC12F59A0;
FlashInit();
oLibInfo = Fapi_getLibraryInfo();
Fapi_setupBankSectorEnable();
都是一样,不能做连续擦除,添加代码如下:
uint32 sectorstart,num;
uint32 sectorlength;
sectorstart=0x00230000;
sectorlength=0;
for(num=6;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);
}
}
我这个就是在例程里面,按照做的例程格式做的。 另外我使用的例程是V207,版本比C:\ti\controlSUITE\libs\utilities\flash_api\f28m35x\v100\example\m3这个例程要新