Hi,
I'm using KM34Z256 with IAP support. Currently interrupts are disabled during IAP flash write/erase to ensure there is no collision error (IAP code itself is executed in RAM).
However I'd like to have some interrupts available during Flash read/write (for example USART and DMA), my approach is :
1.Copy vector table to RAM and modify SCB->VTOR
2.Define all interrupt handlers as ramfunc
3.Check CCIF in interrupt handler before access to flash resident functions.
__ramfunc void SysTick_Handler(void)
{
msTicks++; /* increment counter necessary in Delay()*/
if(FTFA->FSTAT & FTFA_FSTAT_CCIF_MASK)
{
/* Flash resident function */
DoEvents();
}
}
I want to know if CCIF flag is a reliable indicator of Flash available ?
Thanks,