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.
Tool/software:
Hi champs,
I am asking this for our customer.
The user refers to
C:\ti\c2000\C2000Ware_5_04_00_00\driverlib\f28004x\examples\flash\flashapi_ex1_program_autoecc.c
The user specifically refers to this part in their application codes.
PS. The user confirms the u32Index is 128-bit aligned on flash 0x90000 and Buffer is also 128-bit aligned on RAM in the user's code.
void Example_CallFlashAPI(void)
{
...
oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)u32Index, Buffer+i, 8,
0, 0, Fapi_AutoEccGeneration);
// Wait until the Flash program operation is over
while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy);
if(oReturnCheck != Fapi_Status_Success)
{
// Check Flash API documentation for possible errors
Example_Error(oReturnCheck);
}
// Read FMSTAT register contents to know the status of FSM after
// program command to see if there are any program operation related errors
oFlashStatus = Fapi_getFsmStatus();
...
}
The user runs all flash API on RAM/bank0 and erase/program bank1 in this case to do live firmware update with reset.
When the issue happened, the user found their code was always stuck at "oFlashStatus = Fapi_getFsmStatus();".
After looking into its assembly codes, the user founds it was stuck at ESTOP when it was stuck at "oFlashStatus = Fapi_getFsmStatus();".
After looking into CCS watch window, the user founds flash errors below when it was stuck at the ESTOP.
FMSTAT.PGV = 1
FMSTAT.CSTAT = 1
However, after looking into the memory browser, the 128-bit data were correctly programmed on the flash location 0x90000 as expected.
Therefore, the user is confused.
The data programmed look good, but there are errors in PGV and CSTAT, which cause the code to stuck at ESTOP in "oFlashStatus = Fapi_getFsmStatus();".
By commenting out "oFlashStatus = Fapi_getFsmStatus();", the user found the code could work.
Questions:
1. Why are there errors in PGV and CSTAT even though the data are correctly programmed?
2. How do you suggest the user debug in this case?
3. The flash API related codes was originally running well on F28003x. Then, the user migrated the codes from F28003x onto F28004x by changing the flash API library/related driverlib. Is there any major difference here between F28003x and F28004x?
Hi,
Our expert is out of office until early January. Please expect a delayed response.
Best Regards,
Ben Collier
Hi,
Yes there is difference between F28003x and F28004x device libraries as devices are different same library can't be used.
Are you using F28004x device or F28003x device?
Regards,
Rajeshwary
Hi Ben,
They are using F280049 and have used F28004x flash API and driverlib. They just don't change the API names because there is no building error or warning, so I was asking if there is any difference or concern when calling these flash API using the same names.
FMSTAT.PGV = 1, FMSTAT.CSTAT = 1 indicates that program command has failed. Are you able to erase the device properly?
Regards,
Rajeshwary
Hi Rajeshwary,
We did not see anything wrong with erase operation.
Only this program part was wrong and the code was stuck.
Wayne,
Their might be possibility that device may be faulty. Did they tried on other device?
Regards,
Rajeshwary