9s12 wake up by XIRQ

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

9s12 wake up by XIRQ

719 Views
jiongzhongliu
Contributor III

Now I use the MCU MC9S12XET256,  when the MCU in the Stop or Wait Mode ,I can wake it up by a input Interrupt(PP2),Now I want to wake it up by the PIN XIRQ, which regiter or instruction I should program before it go to stop or wait mode., The datasheet say XIRQ enable by cleaer the X-BIt in CPU conditon code register,and I don't particularly understand.

Labels (1)
0 Kudos
Reply
1 Reply

399 Views
RadekS
NXP Employee
NXP Employee

Hi jiongzhong,

X bit is part of CCR register (Condition code register, one of CPU’s basic registers).

You could clear this bit similar way how you clear S bit prior STOP mode.

So, for example:

asm ANDCC #0x7F; //clear S bit

asm ANDCC #0xBF; //clear X bit

or

asm ANDCC #0x3F; //clear S and X bit

For more detail, please see CPU12X reference manual:

http://www.nxp.com/files/microcontrollers/doc/ref_manual/S12XCPUV2.pdf


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply