How to enter Stop or Wait Mode?

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

How to enter Stop or Wait Mode?

ソリューションへジャンプ
2,091件の閲覧回数
aguo1223
Contributor III

       Hello  all,

                    how to enter Stop or Wait mode  when mcu is running?

                                                                PS:  MC9S12P128.

ラベル(1)
1 解決策
876件の閲覧回数
TomE
Specialist II

The purpose of this forum is to ask questions about how to use the forums, not how to use the products.

Please ask your question in the appropriate 8 or 16 bit forum, but SEARCH those forums first to see if someone else has already asked your question.

8-bit Microcontrollers

16-Bit Microcontrollers

These forums can be accessed directly under the "Products" section of the "Home" page.

Can one of the Administrators move this post please?

Tom

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
875件の閲覧回数
RadekS
NXP Employee
NXP Employee

For entrance into STOP and WAIT mode you should use directly CPU instructions.

You can use for example:

asm STOP;         //STOP mode

asm WAI;      //force the MCU into wait mode

In case of STOP mode, there is necessary also clear S bit in CCR register prior you use STOP instruction, otherwise STOP instruction will be executed as NOP.

So, you can use this code:

asm ANDCC #0x7F;  //clear S bit - enable the stop mode. If the S bit is not

                    //cleared then STOP instruction has no effect and is

                    //executed as a dummy instruction NOP.

asm STOP;         //STOP mode

Note: S bit will be restored during next reset.


877件の閲覧回数
TomE
Specialist II

The purpose of this forum is to ask questions about how to use the forums, not how to use the products.

Please ask your question in the appropriate 8 or 16 bit forum, but SEARCH those forums first to see if someone else has already asked your question.

8-bit Microcontrollers

16-Bit Microcontrollers

These forums can be accessed directly under the "Products" section of the "Home" page.

Can one of the Administrators move this post please?

Tom

0 件の賞賛
876件の閲覧回数
aguo1223
Contributor III

Thanks

0 件の賞賛