English
Language : 

MC9S08GB60 Datasheet, PDF (164/290 Pages) Motorola, Inc – Microcontrollers
Timer/PWM (TPM) Module
CHnF — Channel n Flag
When channel n is configured for input capture, this flag bit is set when an active edge occurs on the
channel n pin. When channel n is an output compare or edge-aligned PWM channel, CHnF is set when
the value in the TPM counter registers matches the value in the TPM channel n value registers. This
flag is seldom used with center-aligned PWMs because it is set every time the counter matches the
channel value register, which correspond to both edges of the active duty cycle period.
A corresponding interrupt is requested when CHnF is set and interrupts are enabled (CHnIE = 1). Clear
CHnF by reading TPMxCnSC while CHnF is set and then writing a 0 to CHnF. If another interrupt
request occurs before the clearing sequence is complete, the sequence is reset so CHnF would remain
set after the clear sequence was completed for the earlier CHnF. This is done so a CHnF interrupt
request cannot be lost by clearing a previous CHnF.
Reset clears the CHnF bit. Writing a 1 to CHnF has no effect.
1 = Input capture or output compare event occurred on channel n.
0 = No input capture or output compare event occurred on channel n.
CHnIE — Channel n Interrupt Enable
This read/write bit enables interrupts from channel n. Reset clears the CHnIE bit.
1 = Channel n interrupt requests enabled.
0 = Channel n interrupt requests disabled (use software polling).
MSnB — Mode Select B for TPM Channel n
When CPWMS = 0, MSnB = 1 configures TPM channel n for edge-aligned PWM mode. For a
summary of channel mode and setup controls, refer to Table 10-3.
MSnA — Mode Select A for TPM Channel n
When CPWMS = 0 and MSnB = 0, MSnA configures TPM channel n for input capture mode or output
compare mode. Refer to Table 10-3 for a summary of channel mode and setup controls.
MC9S08GB/GT Data Sheet, Rev. 2.3
164
Freescale Semiconductor