IIC, RTI and STOP2 MC9S08QG8 Headache!

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

IIC, RTI and STOP2 MC9S08QG8 Headache!

1,644件の閲覧回数
Rhioponomous
Contributor I
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!  

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

732件の閲覧回数
Rhioponomous
Contributor I

Thanks for your response! 

 

I do re-initialize all peripherals after coming out of STOP2.

 

What is very weird is that I am able to get an ACK after I write the address byte but unable to get an ACK after I write the first byte of data after waking up from SOTP2.

 

What state are the pins held in during stop2? And is there a way to change that? 

0 件の賞賛
返信

732件の閲覧回数
tonyp
Senior Contributor II
Coming out of STOP2 is similar to a reset, so all peripherals must be re-initialized before using.  Do you do that?
0 件の賞賛
返信