Timer/Pulse-Width Modulator (S08TPMV3)
MC9S08QL8 MCU Series Reference Manual, Rev. 1
NXP Semiconductors
209
be reliably detected—on an input capture pin is four bus clock periods (with ideal clock pulses as near as
two bus clocks can be detected).
When a channel is configured for output compare (CPWMS = 0, MSnB:MSnA = 0:1, and
ELSnB:ELSnA
0:0), the TPMxCHn pin is an output controlled by the TPM. The ELSnB:ELSnA bits
determine whether the TPMxCHn pin is toggled, cleared, or set each time the 16-bit channel value register
matches the TPM counter.
When the output compare toggle mode is initially selected, the previous value on the pin is driven out until
the next output compare event, the pin is then toggled.
When a channel is configured for edge-aligned PWM (CPWMS = 0, MSnB = 1, and
ELSnB:ELSnA
0:0), the TPMxCHn pin is an output controlled by the TPM, and ELSnB:ELSnA bits
control the polarity of the PWM output signal. When ELSnB is set and ELSnA is cleared, the TPMxCHn
pin is forced high at the start of each new period (TPMxCNT=0x0000), and it is forced low when the
channel value register matches the TPM counter. When ELSnA is set, the TPMxCHn pin is forced low at
the start of each new period (TPMxCNT=0x0000), and it is forced high when the channel value register
matches the TPM counter.
Figure 15-2. High-true pulse of an edge-aligned PWM
Figure 15-3. Low-true pulse of an edge-aligned PWM
When the TPM is configured for center-aligned PWM (CPWMS = 1 and ELSnB:ELSnA
0:0), the
TPMxCHn pins are outputs controlled by the TPM, and ELSnB:ELSnA bits control the polarity of the
PWM output signal. If ELSnB is set and ELSnA is cleared, the corresponding TPMxCHn pin is cleared
when the TPM counter is counting up, and the channel value register matches the TPM counter; and it is
CHnF bit
TOF bit
0
...
1
2
3
4
5
6
7
8
0
1
2
...
TPMxMODH:TPMxMODL = 0x0008
TPMxCnVH:TPMxCnVL = 0x0005
TPMxCNTH:TPMxCNTL
TPMxCHn
CHnF bit
TOF bit
0
...
1
2
3
4
5
6
7
8
0
1
2
...
TPMxMODH:TPMxMODL = 0x0008
TPMxCnVH:TPMxCnVL = 0x0005
TPMxCNTH:TPMxCNTL
TPMxCHn
Summary of Contents for MC9S08QL4
Page 4: ...MC9S08QL8 MCU Series Reference Manual Rev 1 4 NXP Semiconductors...
Page 36: ...Chapter 3 Modes of Operation MC9S08QL8 MCU Series Reference Manual Rev 1 36 NXP Semiconductors...
Page 56: ...Chapter 4 Memory MC9S08QL8 MCU Series Reference Manual Rev 1 56 NXP Semiconductors...
Page 172: ...Modulo Timer S08MTIMV1 MC9S08QL8 MCU Series Reference Manual Rev 1 172 NXP Semiconductors...
Page 238: ...Development Support MC9S08QL8 MCU Series Reference Manual Rev 1 238 NXP Semiconductors...
Page 239: ......