can any body provide xirq example project of wake up from stop mode  for S12G?

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

can any body provide xirq example project of wake up from stop mode  for S12G?

772 Views
steven_zhang
Contributor V

can any body provide xirq example project of wake up from stop mode  for S12G?

if you have the CAN example ,please gave it to me。

Labels (1)
1 Reply

494 Views
RadekS
NXP Employee
NXP Employee

Hi Steven,

In attachment you could find simple example code for pin (keypad), IRQ and XIRQ example code.

This example code was not created directly for S12G, but behavior should be the same.

STOP mode isn’t implemented in this code but it is simply.

For enter into stop mode you have to clear S bit and execute STOP instruction. For example:

asm ANDCC #0x7F; //clear S bit - enable the stop mode. If the S bit is not

//cleared then STOP instruction has no effect and is

//executed as a dummy instruction NOP.

asm STOP; //STOP mode

Note: Not all interrupts have ability to wake up from stop mode. See Table 1-35. Interrupt Vector Locations in reference manual for more details.

Note: Since clocks are disabled in stop mode, your BDM connection will be interrupted.

Note: Simplest way how to check whether MCU is in stop mode is current consumption measurement or measurement of bus clock. Please use ECLKCTL_NECLK=0; for enabling bus clock at ECLK pin (check your derivative and package for specific routing. In case of S12G, it could be PB0, PS7 or PP1).

More S12G example code could be found here:

https://community.freescale.com/docs/DOC-93792


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!
-----------------------------------------------------------------------------------------------------------------------