Rakesh Krishnan

S12XDP512 not entering the Low Power WAIT mode??

Discussion created by Rakesh Krishnan on Nov 5, 2008
Hi All
 
The S12X controller is not entering the Low Power WAIT mode when i used the below code in C
 
This code is in the main function:
 
       _asm("sei");
       _asm("tfr ccr, a");
       _asm("anda #11101111b");
       _asm("tfr a, ccr");//clear i-bit
       _asm("nop");
       _asm("cli");
       _asm("wai");
 
cleared the I bit in CCR but the controller is not going to low power mode.
 
Can anyone help me out on how the S12X can be made to low power WAIT mode and How do i wake it up.
 
If its possible to post the C COde as well it very well appreciated.
 
Thanks
RK

Outcomes