
MCF5272 ColdFire
®
Integrated Microprocessor User’s Manual, Rev. 3
Freescale Semiconductor
15-1
Chapter 15
Timer Module
This chapter describes configuration and operation of the four general-purpose timer modules, timer 0, 1,
2 and 3.
15.1
Overview
The timer module has four identical general-purpose 16-bit timers and a software watchdog timer,
described in
Chapter 6, “System Integration Module (SIM)
Each general-purpose timer consists of a timer mode register (TMR
n
), a timer capture register (TCAP
n
),
a 16-bit timer counter (TCN
n
), a timer reference register (TRR
n
), and a timer event register (TER
n
). The
TMRs contain the prescaler value programmed by the user. The four timer units have the following
features:
•
Maximum period of 4 seconds at 66 MHz
•
15-nS resolution at 66 MHz
•
Programmable sources for the clock input, including external clock
•
Input capture capability with programmable trigger edge on input pins
•
Output compare with programmable mode for the output pins
•
Free run and restart modes
15.2
Timer Operation
The timer units consist of four identical, independent 16-bit timers, timers 0–3. For timers 0 and 1, the
clock input to the prescaler is selected from the main clock (divided by 1 or 16) or from the corresponding
timer input (TIN0 or TIN1) pin. For timers 2 and 3, the clock input to the prescaler can be selected only
from the main clock (divided by 1 or 16). TIN is internally synchronized to the internal clock, with a
synchronization delay between two and three main clocks. The clock input source is selected by the CLK
bits of the corresponding timer mode register (TMR0–TMR3). The prescaler is programmed to divide the
clock input by values from 1 to 256. The output of the prescaler is used as an input to the 16-bit counter.
The maximum timer resolution is one system clock cycle (15 nS at 66 MHz). The maximum period (the
reference value is all ones) is 268,435,456 cycles = 2
4
×
2
8
×
2
16
(4 seconds at 66 MHz).
The timer can be configured to count until a reference is reached at which point it can either start a new
time count immediately or continue to run. The free run/restart bit, TMR
n
[FRR], selects each mode. Upon
reaching the reference value, the TER0 or TER1 bit is set, and an interrupt is issued if the output reference
interrupt enable bit, TMR[ORI], is set.
Содержание MCF5272 ColdFire
Страница 2: ......
Страница 38: ...MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 xxxviii Freescale Semiconductor...
Страница 60: ...MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 lx Freescale Semiconductor...
Страница 118: ...Local Memory MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 4 16 Freescale Semiconductor...
Страница 160: ...Debug Support MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 5 42 Freescale Semiconductor...
Страница 258: ...Ethernet Module MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 11 40 Freescale Semiconductor...
Страница 296: ...Universal Serial Bus USB MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 12 38 Freescale Semiconductor...
Страница 360: ...Timer Module MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 15 6 Freescale Semiconductor...
Страница 406: ...General Purpose I O Module MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 17 12 Freescale Semiconductor...
Страница 474: ...Bus Operation MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 20 26 Freescale Semiconductor...
Страница 528: ...List of Memory Maps MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 A 12 Freescale Semiconductor...
Страница 540: ...Index MCF5272 ColdFire Integrated Microprocessor User s Manual Rev 3 Index 10 Freescale Semiconductor...
Страница 543: ...blank...