AnsweredAssumed Answered

Questions for Entering and Exiting Stop mode on S12XET256

Question asked by Luke Shi on Jan 26, 2012
Latest reply on Jan 27, 2012 by Luke Shi

Dear Sir or Madam,

 

My application uses S12XET256. In order to save power, S12XET256 has to be in STOP (pseudo or full) mode.

 

During the normal operation, debugging information is printed out of SCI port at baud-rate 38400.

 

Based on the documents, the processor can be put into pseudo STOP mode with /XIRQ pull high externally, S-Bit is clear (ANDCC #$7F), X-Bit is set(ORCC #$40), I-bit is clear(CLI), PSTP = 0. It seems S12X goes to the right mode.

 

An external interrupt is configured to Port H. Once the interrupt is fired, S12XET256 goes out of pseudo STOP mode. New debugging information will be printed out of SCI.

 

However, after wakeup, the new debugging information that goes out of SCI are corrupted. It seems that the program does not start right after "STOP" instruction.

 

Where does the processor wake up from STOP mode? Is it possible the SCI baudrate got changes during STOP mode?

 

By using "WAI" Instead of "STOP", everything works fine.

 

Please advice what I have done wrong on entering or exiting STOP mode. 

 

Thank you in advance.

 

--Luke

Outcomes