I am trying to put microcontroller to stop mode 3 using this code: /* register initialization */ SOPT = 0x73; SPMSC1 = 0x1C; SPMSC2 = 0x00; ICGC1 = 0x3C; ICGC2 = 0x7C;
...
...
MCUInit();
Main(){
...
...
asm STOP
...
}
The problem is that the microcontroller doesn't enter stop mode. It executes the instruction asm STOP and goes to the next line of code, continuing normal work.
What do I do wrong? How should entering (and leaving) stop mode look like?