![NXP Semiconductors MKL27Z128VFM4 Reference Manual Download Page 477](http://html1.mh-extra.com/html/nxp-semiconductors/mkl27z128vfm4/mkl27z128vfm4_reference-manual_1721847477.webp)
0
0
0
1
1
1
1
1
2
2
2
2
2
3
3
3
3
3
4
4
4
TOF bit
set TOF bit
set TOF bit
period of counting = 2 x MOD x period of timer module counter clock
MOD = 0x0004
period of timer module counter clock
Timer module counter
Figure 29-4. Example of up-down counting
29.5.3.3 Counter Reset
Any write to CNT resets the TPM counter and the channel outputs to their initial values
(except for channels in output compare mode).
29.5.3.4 Global time base (GTB)
The global time base (GTB) is a TPM function that allows multiple TPM modules to
share the same timebase. When the global time base is enabled (CONF[GTBEEN] = 1),
the local TPM channels use the counter value, counter enable and overflow indication
from the TPM generating the global time base. If the local TPM counter is not generating
the global time base, then it can be used as an independent counter or pulse accumulator.
The local TPM counter can also be configured to synchronize to the global time base, by
configuring (GTBSYNC = 1). When synchronized to the global time base, the local
counter will use the counter enable and counter overflow indication from the TPM
generating the global time base. This enables multiple TPM to be configured with the
same phase, but with different periods (although the global time base must be configured
with the longest period).
29.5.3.5 Counter trigger
The TPM counter can be configured to start, stop or reset in response to a hardware
trigger input. The trigger input is synchronized to the asynchronous counter clock, so
there is a 3 counter clock delay between the trigger assertion and the counter responding.
Chapter 29 Timer/PWM Module (TPM)
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
Freescale Semiconductor, Inc.
477