
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
Summary of Contents for K22F series
Page 2: ...K22F Sub Family Reference Manual Rev 4 08 2016 2 NXP Semiconductors...
Page 168: ...Module clocks K22F Sub Family Reference Manual Rev 4 08 2016 168 NXP Semiconductors...
Page 258: ...Functional description K22F Sub Family Reference Manual Rev 4 08 2016 258 NXP Semiconductors...
Page 292: ...Functional description K22F Sub Family Reference Manual Rev 4 08 2016 292 NXP Semiconductors...
Page 398: ...Functional description K22F Sub Family Reference Manual Rev 4 08 2016 398 NXP Semiconductors...
Page 750: ...Functional description K22F Sub Family Reference Manual Rev 4 08 2016 750 NXP Semiconductors...
Page 816: ...Application information K22F Sub Family Reference Manual Rev 4 08 2016 816 NXP Semiconductors...
Page 890: ...Application information K22F Sub Family Reference Manual Rev 4 08 2016 890 NXP Semiconductors...
Page 1302: ...Application information K22F Sub Family Reference Manual Rev 4 08 2016 1302 NXP Semiconductors...
Page 1374: ...Functional description K22F Sub Family Reference Manual Rev 4 08 2016 1374 NXP Semiconductors...