Clearing or setting the I bit in CCR or not, prior to entering the full stop mode (Low Power Mode)?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clearing or setting the I bit in CCR or not, prior to entering the full stop mode (Low Power Mode)?

591 Views
adelantesey
Contributor IV

  Hi,

Can anybody help me on whether I should clear or set the I bit in the CCR prior to the execution of the STOP instruction in MS9S12XEG128? I mean should I use
_asm(" andcc #$6f") or _asm(" andcc #$7f") before STOP instruction?

Labels (1)
1 Reply

347 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

MCU can enter into stop mode by assembler instruction “asm STOP; //STOP mode”.

Prior to that you have to clear S bit in CCR register for permission stop mode.

For example you can do that by assembler code “asm ANDCC #0x7F; //clear S bit”

clear S bit is to 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.

hope this helps!

==================================================

this answer is for you. if it helps, please click on "correct answer " button. thanks!

Best Regards,

ZhangJun