![NXP Semiconductors SAFE ASSURE Qorivva MPC5601P Reference Manual Download Page 795](http://html.mh-extra.com/html/nxp-semiconductors/safe-assure-qorivva-mpc5601p/safe-assure-qorivva-mpc5601p_reference-manual_1721898795.webp)
Chapter 30 Periodic Interrupt Timer (PIT)
MPC5602P Microcontroller Reference Manual, Rev. 4
Freescale Semiconductor
795
30.4.1.1
Timers
The timers generate triggers at periodic intervals, when enabled. They load their start values, as specified
in their LDVAL registers, then count down until they reach 0. Then they load their respective start value
again. Each time a timer reaches 0, it will generate a trigger pulse, and set the interrupt flag.
All interrupts can be enabled or masked (by setting the TIE bits in the TCTRL registers). A new interrupt
can be generated only after the previous one is cleared.
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, then enabling the timer with the TEN bit (see
).
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
It is also possible to change the counter period without restarting the timer by writing the LDVAL register
with the new load value. This value will then be loaded after the next trigger event (see
Figure 30-7. Stopping and starting a timer
Figure 30-8. Modifying running timer period
p1
p1
Timer Enabled
Disable
Timer
p1
Start Value = p1
Trigger
Event
p1
Re-Enable
Timer
p1
Timer Enabled
Disable
Timer,
Start Value = p1
Trigger
Event
Re-Enable
Timer
p1
Set new
Load Value
p2
p2
p2