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?
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!
Retrieving data ...