STOP and Wakeup

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

STOP and Wakeup

1,342 次查看
SCort_li
Contributor II

Hi,

I use the CAN wakeup interrupt to wake up the s12z from pseudo stop mode.

In the CAN receive ISR,I use the instruction “STOP” to make the cpu into the  pseudo stop mode:

 

interrupt void CAN_Receive_IRQHandle(void){

....

EnableInterrupts;

asm ANDCC #0x7F; 

asm STOP;

......

}

I find the CPU enter the pseudo stop mode successfully,but I can not wake up the CPU by CAN wakeup interrupt.

In addition,if I write the instruction “STOP” in the “main” function,the CPU is waken up successfully.

I want to known whether I can "STOP" in the ISR,and what I need to pay attention to?

0 项奖励
回复
1 回复

1,331 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @SCort_li,

Normally, this ISR can't be preempted by itself or by an interrupt with the same or lower priority.

If you need this ISR to be preempted by itself, you would need to overwrite the Condition Code Register (CCR) of the core, bits IPL[2:0] holds the current priority level.

For more information please refer to CPU S12Z Reference Manual

danielmartynek_0-1652270192507.png

https://www.nxp.com/products/processors-and-microcontrollers/additional-mpu-mcus-architectures/s12-m...

 

Regards,

Daniel

 

 

0 项奖励
回复