How to pause interrupts in S32K144

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to pause interrupts in S32K144

2,855 Views
panda_fei
Contributor II

How to pause interrupts in S32K144

3 Replies

2,069 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

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.

 

Regards,

Daniel

2,069 Views
panda_fei
Contributor II

If I disable to interrupt, will the registers about  interrupt(like ISER ,ISPR,IABR...) be cleared?

and

pause interrupt means disable the interrupt ?

0 Kudos

2,069 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

 

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.

 

Regards,

Daniel

0 Kudos