AnsweredAssumed Answered

HCS08 and stop3 mode

Question asked by Pablo Igor Vicente on Nov 11, 2011
Latest reply on Nov 14, 2011 by Pablo Igor Vicente

Hi,

 

I have a problem with the stop3 mode in MC9S08SH16.

After executing the STOP instruction the MCU enters in stop3 mode, but sometimes stop3 is exited when MTIM (modulo timer) interrupt occurs.

The datasheet doesn't say that MTIM interrupt is a source to exit from stop3 mode, but I have checked that it is.

The STOP instruction first enables the interrupts (the I bit in the condition code register (CCR) is cleared to

enable interrupts) and then inhibits the oscillator to put MCU into the stop condition.

My question is: if the MTIM interrupt takes place between the two steps of the STOP instruction, that is, MTIM interrupt takes place after the STOP instruction enables the interrupts but before the oscillator is inhibited, the MCU doesn't enter in stop3 mode?

 

Thanks in advance.

Outcomes