Hi,
I am using F28388D controller, I am observing a strange behavior during Flash erase operation.
i have written a functionality to load the s2 record format into flash, on power up i can perform the erase operation of sector 7, 8,9 and sector 4,5,6 then i load the s2 record into flash sector 4,5,6 . after successful copying of data into flash sector 7,8,9 i perform a copy of flash from sector 7,8,9 to sector 4,5,6 . i have used a task of 500 u sec to perform this operation and i also need to refresh ext Wd at minimum 500 u sec.
Now consider the sector 4,5,6 is a backup sector and i need to erase it so when i try to erase this sector i can see that the Ext Wd Refresh does not happen and causes a reset , this same behaviour is not seen when i perform erasing sector 7,8,9 at the begining .
What could be the reason behind this difference in behaviour. i tried for sector 4,5,6 also it also show same behaviour.
i have initialized the flash as below
thanks,
Nagesh
#pragma CODE_SECTION(InitFlash, "ramfuncs");
void InitFlash(void)
{
EALLOW;
gstrFlash0CtrlRegs.FPAC1.bit.PMPPWR = 0x1;
gstrFlash0CtrlRegs.FBFALLBACK.bit.BNKPWR0 = 0x3;
gstrFlash0CtrlRegs.FRD_INTF_CTRL.bit.DATA_CACHE_EN = 0;
gstrFlash0CtrlRegs.FRD_INTF_CTRL.bit.PREFETCH_EN = 0;
gstrFlash0CtrlRegs.FRDCNTL.bit.RWAIT = 0xF;
gstrFlash0CtrlRegs.FRD_INTF_CTRL.bit.DATA_CACHE_EN = 1;
gstrFlash0CtrlRegs.FRD_INTF_CTRL.bit.PREFETCH_EN = 1;
//->At reset, ECC is enabled. If it is disabled by application software and
// if application again wants to enable ECC.
// Set ENABLE member of gstrFlash0EccRegs to 0x0.
#warning"ECC disabled!"
gstrFlash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;
EDIS;
//->Force a pipeline flush to ensure that the write to the last register
// configured occurs before returning.
// Invoke __asm with " RPT #7 || NOP" as parameter
__asm(" RPT #7 || NOP");
}
