If desired, the current counter value of the timer can be read via the CVAL registers.
The counter period can be restarted, by first disabling, and then enabling the timer with
TCTRLn[TEN]. See the following figure.
p1
Timer enabled
Disable
timer
p1
p1
Start value = p1
Trigger
event
p1
Re-enable
timer
Figure 40-2. Stopping and starting a timer
The counter period of a running timer can be modified, by first disabling the timer,
setting a new load value, and then enabling the timer again. See the following figure.
Timer enabled
Disable timer,
p1
p1
Re-enable
timer
Start value = p1
Trigger
event
Set new load value
p2
p2
p2
Figure 40-3. Modifying running timer period
It is also possible to change the counter period without restarting the timer by writing
LDVAL with the new load value. This value will then be loaded after the next trigger
event. See the following figure.
Timer enabled
p1
p1
Start value = p1
Trigger
event
p2
p2
p1
New start
Value p2 set
Figure 40-4. Dynamically setting a new load value
Functional description
K22F Sub-Family Reference Manual, Rev. 4, 08/2016
1036 NXP Semiconductors