S32K Interrupt Function

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32K Interrupt Function

3,467 次查看
wanglijun
Contributor II
Hello, I have a question about the interrupt function process: If I don't need interrupt nesting, is there need add disable interrupt at the first of interrupt function, then add enable interrupt at the end of interrupt function? Thank you!
0 项奖励
回复
7 回复数

3,465 次查看
KalaimaniArumugam
Contributor III

Hi @wanglijun 

   If you want to interrupt nesting operation from a particular interrupt means you can disable interrupt and again enable it. In case disable all interrupt nesting means disable the CPU interrupt after completing the operation enable the CPU interrupt it will give complete interrupt nesting on the particular operation.

0 项奖励
回复

3,452 次查看
wanglijun
Contributor II
Hello, I see in the S32DK interrupt functions, not including the interrupt disable and enable operation. It support interrupt or not? Thank you!
0 项奖励
回复

3,447 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi wanglijun,

Please check the ENABLE_INTERRUPTS() and DISABLE_INTERRUPTS() functions.

ENABLE_INTERRUPTS DISABLE_INTERRUPTS.png

Or maybe you can set all interrupts to the same priority.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 项奖励
回复

3,445 次查看
wanglijun
Contributor II
Hello Robbin, In the S32DS provided interrupt function, there is no interrupt disable and enable process. So it means enable interrupt nesting or disable interrupt nesting? Thank you!
0 项奖励
回复

3,440 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

There is no register for enabling or disabling interrupt nesting. In addition, enabling and disabling interrupts is a register of the ARM Cortex core. I suggest you read this article: Cutting Through the Confusion with Arm Cortex-M Interrupt Priorities

Disabling Interrupts with PRIMASK and BASEPRI Registers.png

0 项奖励
回复

3,436 次查看
wanglijun
Contributor II
Hello Robbin, I still can't understand. Does it mean if the interrupt priority is different, there is interrupt nesting? Best Regards, Wang Lijun
0 项奖励
回复

3,421 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi wanglijun,

The default interrupt priority are set to 0, so there should no interrupt nesting happen unless you reconfigure the interrupt priority by using INT_SYS_SetPriority() function.

Best Regards,
Robin

0 项奖励
回复