Questions for Entering and Exiting Stop mode on S12XET256

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Questions for Entering and Exiting Stop mode on S12XET256

跳至解决方案
1,938 次查看
luke_5817
Contributor I

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

标签 (1)
0 项奖励
回复
1 解答
1,609 次查看
kef
Specialist I

Are you using PLL? If so, then after wakeup you should not send over SCI anything until PLL is relocked and you switch to PLL clock. 

Is fast wake up enabled (PLLCTL.FSTWKP)? Then you should not print debug message while MCU is in self clock mode (CRGFLG.SCM==1).

在原帖中查看解决方案

2 回复数
1,610 次查看
kef
Specialist I

Are you using PLL? If so, then after wakeup you should not send over SCI anything until PLL is relocked and you switch to PLL clock. 

Is fast wake up enabled (PLLCTL.FSTWKP)? Then you should not print debug message while MCU is in self clock mode (CRGFLG.SCM==1).

1,609 次查看
luke_5817
Contributor I

Hi Kef,

Thank you for your help. It works now.

--Luke

0 项奖励
回复