Hi,
I am working on MPC5554. And I use eeprom emulation functions. I fill all of the flash block. Then I want to erase block(address: 0x60000) on flash, but after erase, some other datas (except 0xFFFFFFFF) can be random in block. After erase, yes most of the flash area are 0xFFFFFFFF but some area can be random data. And FSL_FlashCheckStatus() functions return EE_OK after erasing. how that happens? And why some area don't erase?
The following images are taken after deleting the flash block.


and I use FSL_FlashCheckStatus which is below. that function return EE_OK.
UINT32 FSL_FlashCheckStatus(UINT32 flashRegBase)
{
UINT32 returnCode; /* return code */
/* Initialize return code */
returnCode = EE_OK;
/* Check if MCR DONE is set */
if (READ32(flashRegBase + FLASH_MCR) & FLASH_MCR_DONE)
{
/* Check the operation status */
if (!(READ32(flashRegBase + FLASH_MCR) & FLASH_MCR_PEG))
{
/* high voltage operation failed */
returnCode = EE_ERROR_PE_OPT;
}
/* End the high voltage operation */
CLEAR32(flashRegBase + FLASH_MCR, FLASH_MCR_EHV);
/* Check for program operation */
if (READ32(flashRegBase + FLASH_MCR) & FLASH_MCR_PGM)
{
/* Finish the program operation */
CLEAR32(flashRegBase + FLASH_MCR, FLASH_MCR_PGM);
}
else
{
/* Finish the erase operation */
CLEAR32(flashRegBase + FLASH_MCR, FLASH_MCR_ERS);
}
return (returnCode);
}
return (EE_INFO_HVOP_INPROGRESS);
}
Best Regards.