Questions for Entering and Exiting Stop mode on S12XET256

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

Questions for Entering and Exiting Stop mode on S12XET256

ソリューションへジャンプ
1,230件の閲覧回数
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 解決策
901件の閲覧回数
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 返答(返信)
902件の閲覧回数
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).

901件の閲覧回数
luke_5817
Contributor I

Hi Kef,

Thank you for your help. It works now.

--Luke

0 件の賞賛
返信