Dear TI team,
We have our custom board using TMS320F28384D , our application is to write value in flash sector (Bzero_Sector6_start ) of regular interval 10secs..its working fine in running state,
while(program_start==1)
{
if(Write_Sec>=10){
spindle_parameter();
Flash_claimPumpSemaphore(FLASH_CPU1_WRAPPER);
EEPROM_Erase(Bzero_Sector6_start);
EEPROM_ProgramSingleByte(spindle1_parameter,12,Bzero_Sector6_start);
Flash_releasePumpSemaphore();
Write_Sec=0;}
}
but while I connect debugger in debug mode , we are facing a issue that erase sector function fails and processor gets hang( estop) in EEPROM_Erase(); function
Most case, while in debug mode works fine for 1 to 2 minute ..after that program get strucks in erase function.
processor struck in "oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector,(uint32*)Bzero_SectorB_start2);"" please find function below.
//############################ EEPROM_ERASE_START- Sector C ######################################################################################
void EEPROM_Erase(uint32 ERASESECTOR)
{
DINT;
EALLOW;
uint32 Bzero_SectorB_start2;
Bzero_SectorB_start2= ERASESECTOR;
oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector,(uint32*)Bzero_SectorB_start2);
//
// Wait until FSM is done with erase sector operation
//
while (Fapi_checkFsmForReady() != Fapi_Status_FsmReady){
}
// Read FMSTAT register contents to know the status of FSM after
// erase command to see if there are any erase operation related errors
//
oFlashStatus = Fapi_getFsmStatus();
if(oFlashStatus != 0)
{
//
// Check Flash API documentation for FMSTAT and debug accordingly
// Fapi_getFsmStatus() function gives the FMSTAT register contents.
// Check to see if any of the EV bit, ESUSP bit, CSTAT bit or
// VOLTSTAT bit is set (Refer to API documentation for more details).
//
__asm(" ESTOP0");
}
//
// Verify that SectorL is erased. The Erase step itself does a
// verify as it goes. This verify is a 2nd verification that can be done.
//
oReturnCheck = Fapi_doBlankCheck((uint32 *)Bzero_SectorB_start2,
Bzero_64KSector_u32length,
&oFlashStatusWord);
if(oReturnCheck != Fapi_Status_Success)
{
//
// Check Flash API documentation for possible errors
// If Erase command fails, use Fapi_getFsmStatus() function to get the
// FMSTAT register contents to see if any of the EV bit, ESUSP bit,
// CSTAT bit or VOLTSTAT bit is set (Refer to API documentation for
// more details)
//
Example_Error(oReturnCheck);
}
c1=4;
EDIS;
EINT;
}
kindly, help us to solve this issue and provide a solution
Thanks & Regards,
Ajay S