English
Language : 

MC9S08RC8 Datasheet, PDF (117/234 Pages) Freescale Semiconductor, Inc – Microcontrollers
Carrier Modulator Transmitter (CMT) Block Description
8.5.5 CMT Interrupts
The end of cycle flag (EOCF) is set when:
• The modulator is not currently active and the MCGEN bit is set to begin the initial CMT
transmission
• At the end of each modulation cycle (when the counter is reloaded from CMTCMD1:CMTCMD2)
while the MCGEN bit is set
In the case where the MCGEN bit is cleared and then set before the end of the modulation cycle, the EOCF
bit will not be set when the MCGEN is set, but will become set at the end of the current modulation cycle.
When the MCGEN becomes disabled, the CMT module does not set the EOC flag at the end of the last
modulation cycle.
The EOCF bit is cleared by reading the CMT modulator status and control register (CMTMSC) followed
by an access of CMTCMD2 or CMTCMD4.
If the EOC interrupt enable (EOCIE) bit is high when the EOCF bit is set, the CMT module will generate
an interrupt request. The EOCF bit must be cleared within the interrupt service routine to prevent another
interrupt from being generated after exiting the interrupt service routine.
The EOC interrupt is coincident with loading the down-counter with the contents of
CMTCMD1:CMTCMD2 and loading the space period register with the contents of
CMTCMD3:CMTCMD4. The EOC interrupt provides a means for the user to reload new mark/space
values into the modulator data registers. Modulator data register updates will take effect at the end of the
current modulation cycle. Note that the down-counter and space period register are updated at the end of
every modulation cycle, regardless of interrupt handling and the state of the EOCF flag.
8.5.6 Wait Mode Operation
During wait mode the CMT, if enabled, will continue to operate normally. However, there will be no new
codes or changes of pattern mode while in wait mode, because the CPU is not operating.
8.5.7 Stop Mode Operation
During all stop modes, clocks to the CMT module are halted.
In stop1 and stop2 modes, all CMT register data is lost and must be re-initialized upon recovery from these
two stop modes.
No CMT module registers are affected in stop3 mode.
Note, because the clocks are halted, the CMT will resume upon exit from stop (only in stop3 mode).
Software should ensure stop2 or stop3 mode is not entered while the modulator is in operation to prevent
the IRO pin from being asserted while in stop mode. This may require a time-out period from the time that
the MCGEN bit is cleared to allow the last modulator cycle to complete.
MC9S08RC/RD/RE/RG Data Sheet, Rev. 1.11
Freescale Semiconductor
117