Chapter 27 Timers
MPC5606BK Microcontroller Reference Manual, Rev. 2
Freescale Semiconductor
709
27.5.5
Functional description
27.5.5.1
General
This section gives detailed information on the internal operation of the module. Each timer can be used to
generate trigger pulses as well as to generate interrupts, each interrupt will be available on a separate
interrupt line.
27.5.5.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 27-62. Stopping and starting a timer
Table 27-29. TFLG field descriptions
Field
Description
TIF
Time Interrupt Flag
TIF is set to 1 at the end of the timer period. This flag can be cleared only by writing it with a 1. Writing a
0 has no effect. If enabled (TIE = 1), TIF causes an interrupt request.
0 Timeout has not yet occurred
1 Timeout has occurred
p1
p1
Timer Enabled
Disable
Timer
p1
Start Value = p1
Trigger
Event
p1
Re-Enable
Timer
Summary of Contents for MPC5605BK
Page 2: ...This page is intentionally left blank...
Page 20: ...MPC5606BK Microcontroller Reference Manual Rev 2 20 Freescale Semiconductor...
Page 103: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 103 Clocks and power...
Page 645: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 643 Timers...
Page 715: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 713 ADC system...
Page 787: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 787 Memory...
Page 893: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 893 Integrity...
Page 943: ...MPC5606BK Microcontroller Reference Manual Rev 2 Freescale Semiconductor 943 Debug...