EasyManua.ls Logo

NXP Semiconductors KL25 Series - Output Compare Mode

NXP Semiconductors KL25 Series
807 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
channel (n) input
synchronizer
edge
detector
was falling
edge selected?
was rising
edge selected?
rising edge
falling edge
0
1
1
0
0 0
CnV
D Q
CLK
D Q
CLK
channel (n) interrupt
CHnIE
CHnF
timer module clock
timer module counter
Figure 31-81. Input capture mode
The CHnF bit is set on the third rising edge of the counter clock after a valid edge occurs
on the channel input.
31.4.5 Output Compare Mode
The output compare mode is selected when (CPWMS = 0), and (MSnB:MSnA = 0:1).
In output compare mode, the TPM can generate timed pulses with programmable
position, polarity, duration, and frequency. When the counter matches the value in the
CnV register of an output compare channel, the channel (n) output can be set, cleared, or
toggled.
When a channel is initially configured to output compare mode, the channel output
updates with its negated value (logic 0 for set/toggle/pulse high and logic one for clear/
pulse low).
The CHnF bit is set and the channel (n) interrupt is generated (if CHnIE = 1) at the
channel (n) match (TPM counter = CnV).
Chapter 31 Timer/PWM Module (TPM)
KL25 Sub-Family Reference Manual, Rev. 3, September 2012
Freescale Semiconductor, Inc. 565

Table of Contents

Related product manuals