When erasing and writting DFLASH and PFLASH, is it necessary to disable all the interrupt and recover the interrupt after finishing erasing and writting DFLASH and PFLASH?
Hi,It depends on where the interrupt vector table and the interrupt routines are located.Because if there are located on the same flash block, they cannot be called while there is a program/erase operation in progress on the same block.Please take a look at 220.127.116.11 Allowed simultaneous flash operations and 36.1.9 Simultaneous operations on PFLASH read partitions, S32K11x RM rev.9.
What I want to ask is that If I Enable all interrupts(like the PIT and CAN interrupt and so on),Can I erase or program the PFLASH and DFLASH at the same time?
Or must I disable all the interrupts before erase or program the PFLASH and DFLASH?
What S32K1xx derivative do you have? S32K116/118/142/144 have only one PFlash block.
Basically, you can't read/execute code from a PFlash block when there is a flash operation (erasing/programming) on the PFlash block in progress. So, if you have the interrupt table or the ISRs functions in the block or the ISR read some data from the PFlash block, you must disable the interrupts before the PFlash operation. Avoid any simultaneous access to the block. Similarly for DFlash.
Retrieving data ...