Tpm Channel N Status And Control Register (Tpmxcnsc) - ROHS MC9S08QE128 Reference Manual

Table of Contents

Advertisement

7
R
Bit 7
W
Reset
0
Reset the TPM counter before writing to the TPM modulo registers to avoid confusion about when the first
counter overflow will occur.
16.3.4

TPM Channel n Status and Control Register (TPMxCnSC)

TPMxCnSC contains the channel-interrupt-status flag and control bits used to configure the interrupt
enable, channel configuration, and pin function.
7
R
CHnF
W
0
Reset
0
= Unimplemented or Reserved
Figure 16-12. TPM Channel n Status and Control Register (TPMxCnSC)
Field
7
Channel n flag. When channel n is an input-capture channel, this read/write bit is set when an active edge occurs
CHnF
on the channel n pin. When channel n is an output compare or edge-aligned/center-aligned PWM channel, CHnF
is set when the value in the TPM counter registers matches the value in the TPM channel n value registers. When
channel n is an edge-aligned/center-aligned PWM channel and the duty cycle is set to 0% or 100%, CHnF will
not be set even when the value in the TPM counter registers matches the value in the TPM channel n value
registers.
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 logic 0 to CHnF. If another interrupt request occurs
before the clearing sequence is complete, the sequence is reset so CHnF remains set after the clear sequence
completed for the earlier CHnF. This is done so a CHnF interrupt request cannot be lost due to clearing a previous
CHnF.
Reset clears the CHnF bit. Writing a logic 1 to CHnF has no effect.
0 No input capture or output compare event occurred on channel n
1 Input capture or output compare event on channel n
6
Channel n interrupt enable. This read/write bit enables interrupts from channel n. Reset clears CHnIE.
CHnIE
0 Channel n interrupt requests disabled (use for software polling)
1 Channel n interrupt requests enabled
5
Mode select B for TPM channel n. When CPWMS=0, MSnB=1 configures TPM channel n for edge-aligned PWM
MSnB
mode. Refer to the summary of channel mode and setup controls in
Freescale Semiconductor
6
5
6
5
0
0
6
5
CHnIE
MSnB
0
0
Table 16-5. TPMxCnSC Field Descriptions
MC9S08QE128 MCU Series Reference Manual, Rev. 2
4
3
4
3
0
0
4
3
MSnA
ELSnB
0
0
Description
Table
Timer/PWM Module (S08TPMV3)
2
1
2
1
0
0
2
1
0
ELSnA
0
0
16-6.
0
Bit 0
0
0
0
0
295

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for ROHS MC9S08QE128

This manual is also suitable for:

Mc9s08qe96Mc9s08qe64

Table of Contents