English
Language : 

MC9S08RG60 Datasheet, PDF (141/232 Pages) Motorola, Inc – Microcontrollers
SoC Guide — MC9S08RG60/D Rev 1.10
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.
Table 10-3 Mode, Edge, and Level Selection
CPWMS
X
0
1
MSnB:MSnA
XX
00
01
1X
XX
ELSnB:ELSnA
Mode
Configuration
00
Pin not used for TPM channel; use as an external clock for the TPM or
revert to general-purpose I/O
01
Capture on rising edge only
10
Input capture Capture on falling edge only
11
Capture on rising or falling edge
01
Toggle output on compare
10
Output compare Clear output on compare
11
Set output on compare
10
Edge-aligned High-true pulses (clear output on compare)
X1
PWM
Low-true pulses (set output on compare)
10
Center-aligned High-true pulses (clear output on compare-up)
X1
PWM
Low-true pulses (set output on compare-up)
If the associated port pin is not stable for at least two bus clock cycles before changing to input capture
mode, it is possible to get an unexpected indication of an edge trigger. Typically, a program would clear
status flags after changing channel configuration bits and before enabling channel interrupts or using the
status flags to avoid any unexpected behavior.
ELSnB:ELSnA — Edge/Level Select Bits
Depending on the operating mode for the timer channel as set by CPWMS:MSnB:MSnA and shown
in Table 10-3, these bits select the polarity of the input edge that triggers an input capture event, select
the level that will be driven in response to an output compare match, or select the polarity of the PWM
output.
Freescale Semiconductor
MC9S08RC/RD/RE/RG
141