sc9s08mz16 Freescale Semiconductor, Inc, sc9s08mz16 Datasheet - Page 164

no-image

sc9s08mz16

Manufacturer Part Number
sc9s08mz16
Description
Hcs08 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Timer/PWM (S08TPMV3)
164
ELSnB
ELSnA
CHnIE
CHnF
MSnB
MSnA
Field
3–2
7
6
5
4
CPWMS
Channel n flag. When channel n is an input-capture channel, this read/write bit is set when an active edge occurs
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
Channel n interrupt enable. This read/write bit enables interrupts from channel n. Reset clears CHnIE.
0 Channel n interrupt requests disabled (use for software polling)
1 Channel n interrupt requests enabled
Mode select B for TPM channel n. When CPWMS=0, MSnB=1 configures TPM channel n for edge-aligned PWM
mode. Refer to the summary of channel mode and setup controls in
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
controls.
Note: If the associated port pin is not stable for at least two bus clock cycles before changing to input capture
Edge/level select bits. Depending upon the operating mode for the timer channel as set by CPWMS:MSnB:MSnA
and shown in
the level that will be driven in response to an output compare match, or select the polarity of the PWM output.
Setting ELSnB:ELSnA to 0:0 configures the related timer pin as a general purpose I/O pin not related to any timer
functions. This function is typically used to temporarily disable an input capture channel or to make the timer pin
available as a general purpose I/O pin when the associated timer channel is set up as a software timer that does
not require the use of a pin.
X
mode, it is possible to get an unexpected indication of an edge trigger.
MSnB:MSnA
Table
XX
9-8, these bits select the polarity of the input edge that triggers an input capture event, select
Table 9-8. Mode, Edge, and Level Selection
Table 9-7. TPMxCnSC Field Descriptions
ELSnB:ELSnA
SC9S08MZ16 MCU Data Sheet, Rev. 1
00
Pin not used for TPM - revert to general purpose I/O
Description
Mode
Table 9-8
or other peripheral control
for a summary of channel mode and setup
Table
9-8.
Configuration
Freescale Semiconductor

Related parts for sc9s08mz16