Part Number: TMS320F280025C
Hi,
I am working with the TMS320F280025C device and I have met a very strange problem. I have developed the bootloader for erase/program/verify the content of the flash. I can successfuly program the device and erase it but not able to verify the flash. My bootloader is loaded directly to RAM(via parallel boot mode) and run from this location. Everything works fine to the step, when the flash start to verify...
My code looks like this(in accordance with driverlib example):
for(i=0, u32Index = Address;
(u32Index < (Address + WORDS_IN_FLASH_BUFFER));
i+= 8, u32Index+=8)
{
EALLOW;
oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)u32Index,Buffer+i,8,0,0,Fapi_AutoEccGeneration);
// Wait until FSM is done with actual operation
while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy);
if(oReturnCheck != Fapi_Status_Success){
break;
}
oFSM_stat = Fapi_getFsmStatus();
if(oFSM_stat != 0)
{
oReturnCheck = Fapi_Error_FeatureNotAvailable;
break;
}
//verify
oReturnCheck = Fapi_doVerify((uint32 *)u32Index, 4, Buffer32+(i/2), &oFlashStatusWord);
if(oReturnCheck != Fapi_Status_Success){
break;
}
EDIS;
}
The oReturnCheck = Fapi_doVerify exits with the Fapi_Error_Fail and I don't know why. The strange is, when I debug this code from CCS (CCS 10.2.0.00009 ) the code works well. But after loading the generated hex file(from out file) and load to RAM and run, the verify is not working. I have tried the BOOT ROM flash API(FlashAPI_ROM_F28002x_FPU32.lib) and also the software flash API(FlashAPI_F28002x_FPU32), but the result is always the same - the verify is still not working.
Can someone explain, why program and erase works well but the verify not? IS the
Thank you!
Best regards,
Tomas