hello,
my test flow is the following code !!
void EraseFlashSector(void)
{
uint32_t address = 0x00008000;
uint32_t flashData = 0 ;
uint32_t i = 0;
//erase 4KB flash sector (the smallest entity that can be erased)
while((FTFC->FSTAT & FTFC_FSTAT_CCIF_MASK) == 0); // Wait if operation in progress
FTFC->FSTAT = FTFC_FSTAT_ACCERR_MASK | FTFC_FSTAT_FPVIOL_MASK;
FTFC->FCCOB[3] = 0x09; //Erase Flash Sector command (0x09)
FTFC->FCCOB[2] = (address >> 16) & 0xff; //Flash address [23:16]
FTFC->FCCOB[1] = (address >> & 0xff; //Flash address [15:08]
FTFC->FCCOB[0] = address & 0xff; //Flash address [7:0]
FTFC->FSTAT = FTFC_FSTAT_CCIF_MASK; //launch command
while(( FTFC->FSTAT & FTFC_FSTAT_CCIF_MASK) == 0)
{
flashData = *(uint32_t *)(0x8000 + 4);
flashData = *(uint32_t *)(0x8000 + 8);
flashData = *(uint64_t *)(0x8000 + 16);
for(i = 0; i< 1024;i++)
{
flashData = *(uint32_t *)(0x8000 + i*4);
}
}//wait for done
}
main ()
{
/* Enable global interrupt */
INT_SYS_EnableIRQGlobal();
FTFC->FCNFG |= 0x40;// enable read conflcit interrupt
INT_SYS_EnableIRQ(Read_Collision_IRQn);
EraseFlashSector();
}
my it can't generate read conflision interrupt ! can you help me? thanks very much!