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") ;
ret=FlashEraseSector(&flashSSDConfig, flash_prog_address, FEATURE_FLS_PF_BLOCK_SECTOR_SIZE, FlashCommandSequence);
if(C90FL_OK != ret)
// request software reset
S32_SCB->AIRCR = S32_SCB_AIRCR_VECTKEY(0x5FA)| S32_SCB_AIRCR_SYSRESETREQ_MASK;
// wait for reset to occur
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,