How to pause interrupts in S32K144
You can disable and enable interrupts using functions from fsl_core_cm4.h (S32 Design studio).
ENABLE_INTERRUPTS(); // or __asm("cpsie i");
DISABLE_INTERRUPTS(); // or __asm("cpsid i");
If you disable interrupts, pending interrupts will not be executed until they are enabled again.
If I disable to interrupt, will the registers about interrupt(like ISER ,ISPR,IABR...) be cleared?
pause interrupt means disable the interrupt ?
the DISABLE_INTERRUPTS() function only masks interrupts by setting PRIMASK. So it actually doesn’t disable interrupt but if a interrupt flag is set, this interrupt will not be executed, it will become a pending interrupt. So the only registers that will be affected are ISPR (Interrupt Set Pending Register) and ICPR (Interrupt Clear Pending Register). Pending interrupts will be then executed as soon as the PRIMASK is cleared by using the ENABLE_INTERRUPTS() function.
This is a core function, so you may refer to ARM Cortex M4 documentation for more information.