STOP and Wakeup

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

STOP and Wakeup

567 Views
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 Kudos
1 Reply

556 Views
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 Kudos