How to pause interrupts in S32K144

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to pause interrupts in S32K144

3,114件の閲覧回数
panda_fei
Contributor II

How to pause interrupts in S32K144

3 返答(返信)

2,328件の閲覧回数
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,328件の閲覧回数
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 件の賞賛

2,328件の閲覧回数
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 件の賞賛