AnsweredAssumed Answered

Unable to Erase Sector

Question asked by BJ RAJENDRANATH on Dec 11, 2019
Latest reply on Dec 18, 2019 by BJ RAJENDRANATH

I'm trying to erase the sector based on the can commands. When I'm trying to erase one of the sector it's not able to erase. 

Code structure is Once CAN command comes, it should disable the interrupts and respond the can message and erase the sector and reset the device, so that it can enter the bootloader.

 

__asm("cpsid i") ;
response_handler(f_info,f_data);
ret=FlashEraseSector(&flashSSDConfig, flash_prog_address, FEATURE_FLS_PF_BLOCK_SECTOR_SIZE, FlashCommandSequence);

if(C90FL_OK != ret)
{
   negative_response(f_info,PROGRAM_FAILURE);
}
else
{

   asm("nop");
   S32_SCB->AIRCR &=0x0000FFFF;
   Delay_in_usec(1000000);
   // request software reset
   S32_SCB->AIRCR = S32_SCB_AIRCR_VECTKEY(0x5FA)| S32_SCB_AIRCR_SYSRESETREQ_MASK;
   // wait for reset to occur
   while(1);

}

 

Below is the CAN Error I can see. I can able to see the reset happening as expected but unable to erase the sector though it gives the successfully executes the function  FlashEraseSector();

 

Is there any chance that the program itself resetting while executing   FlashEraseSector();

 

 

 

Also, I can able to see the things happen as expected (correctly), with Debug window. But not once programmed.

 

I also suspect the device, the samples we got were 2 years back & also not the production samples. Can I know how to check the same.

 

Kindly Help in this regard.

 

Thanks in advance,

Raju

Outcomes