STOP and Wakeup

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

STOP and Wakeup

934件の閲覧回数
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 返信

923件の閲覧回数
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 件の賞賛
返信