Andrew Wright

IIC, RTI and STOP2 MC9S08QG8 Headache!

Discussion created by Andrew Wright on Apr 2, 2009
Latest reply on Apr 6, 2009 by Andrew Wright
Hi All,
 
I am trying to use the RTI, set at a 1024 ms interval, to wake up out of STOP2.  When the MCU wakes up from STOP2 it sends out 2 bytes to a slave on the IIC bus and then go back to sleep in STOP2.  I have it working so that I can go to sleep and wake up from STOP2 using the RTI.  Separately (int another program) I have it so that I can send messages on the IIC as well as do other things in sequence (So I know it isn't stuck in the IIC write function).  When I combine the STOP2 code with the IIC code I am able to write to the IIC when the first time the CPU turns on, I am then able to go into STOP2 and then 1 second later the RTI fires and I wake up.  The problem then comes when I try to write to write to the IIC after waking up from STOP2.  When I try to STOP into STOP2, It just hangs out in STOP2 and my RTI never triggers...
 
Any help would be much appreciated!  

Outcomes