How to achieve Interrupt nesting for S32K144

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

How to achieve Interrupt nesting for S32K144

跳至解决方案
3,338 次查看
asd046012
Contributor III

Now I use MCU S32K144, SDK version is 2.9.0.

I have used a DMA interrupt, lpit interrupt and CAN send/receive interrupt. 

Now the priority of all interrupt is the default value(0x00);

I wanted to DMA interrupt and lpit interrupt can interrupt CNA CAN send/receive interrupt, So how to configure it? just configure the priority of  DMA interrupt and lpit interrupt is less than the priority of CNA CAN send/receive interrupt?  

 

0 项奖励
回复
1 解答
3,312 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @asd046012,

The DMA interrupt and the LPIT interrupt must have higher interrupt priorities than the SysTick and the FlexCAN.

For example,

DMA, LPIT: priority number 0 (default)

FlexCAN, SysTick: priority number 1

 

The Systick priority is configurable in System Handler Priority Register 3, SHPR3.

ARM®v7-M Architecture
Reference Manual

danielmartynek_0-1639494675535.pngdanielmartynek_0-1639494675535.png

 

 

S32_SCB->SHPR3 |= S32_SCB_SHPR3_PRI_15(0x10); // SysTick Priority 1

 

 

Regards,

Daniel

在原帖中查看解决方案

0 项奖励
回复
2 回复数
3,325 次查看
asd046012
Contributor III

Hello 

     There is also an system tick timer interrupt, I also hope that the DMA interrupt and the LPIT interrupt can interrupt the system tick interrupt.

      could this requirement  be achieved?

0 项奖励
回复
3,313 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @asd046012,

The DMA interrupt and the LPIT interrupt must have higher interrupt priorities than the SysTick and the FlexCAN.

For example,

DMA, LPIT: priority number 0 (default)

FlexCAN, SysTick: priority number 1

 

The Systick priority is configurable in System Handler Priority Register 3, SHPR3.

ARM®v7-M Architecture
Reference Manual

danielmartynek_0-1639494675535.pngdanielmartynek_0-1639494675535.png

 

 

S32_SCB->SHPR3 |= S32_SCB_SHPR3_PRI_15(0x10); // SysTick Priority 1

 

 

Regards,

Daniel

0 项奖励
回复