Content originally posted in LPCWare by MikeSimmonds on Tue Apr 28 10:45:04 MST 2015
Fundamentally, no other access is possible to the flash ram during erase or program operations.
This rules out executing ANY code in flash because the MPU would have to prefetch (i.e. read) from flash
This rules out interrupts because the vector table is at address zero in flash by default.
The code doing the erasing and programming is in the boot rom (not in flash).
If you relocate the vector table and the (entire) interrupt code (note 1) you will not be accessing flash
while it is busy.
So NO CODE in flash may run regardless of what sector(s) are being erased/programmed.
Note 1: If you want to get fancy, you can disable all interrupts except those that are needed to be active
while the flash array is busy. Those that do remain active must execute entirely in ram.
The vector table always has to be copied to ram and relocated via VTOR.
Bottom line -- while erasing etc, you cannot access anywhere in flash!
Mike