13-14
DSP56367
MOTOROLA
Timer/ Event Counter
Timer Modes of Operation
–
Toggle, mode 10: Output toggle, internal clock
These modes are described in detail below. Timer modes are selected by setting the TC[3:0]
bits in the TCSR. Table 13-2 and Table 13-3 show how the different timer modes are selected
by setting the bits in the TCSR. Table 13-2 also shows the TIO0 signal direction and the clock
source for each timer mode.
Note:
To ensure proper operation, the TC[3:0] bits should be changed only when the
timer is disabled (i.e., when the TE bit in the TCSR is cleared).
13.4.1
TIMER MODES
13.4.1.1
Timer GPIO (Mode 0)
In this mode, the timer generates an internal interrupt when a counter value is reached (if the
timer compare interrupt is enabled). Note that any of the three timers can be placed in GPIO
mode to generate internal interrupts, but only timer 0 provides actual external GPIO access on
the TIO0 signal.
Set the TE bit to clear the counter and enable the timer. Load the value the timer is to count
into the TCPR. The counter is loaded with the TLR value when the first timer clock signal is
received. The timer clock can be taken from either the DSP56367 clock divided by two
(CLK/2) or from the prescaler clock output. Each subsequent clock signal increments the
counter.
When the counter equals the TCPR value, the TCF bit in TCSR is set, and a compare interrupt
is generated if the TCIE bit is set. If the TRM bit in the TCSR is set, the counter is reloaded
with the TLR value at the next timer clock and the count is resumed. If the TRM bit is cleared,
the counter continues to be incremented on each timer clock signal.
This process is repeated until the timer is disabled (i.e., TE is cleared).
If the counter overflows, the TOF bit is set, and if TOIE is set, an overflow interrupt is
generated.
The counter contents can be read at any time by reading the TCR.
Bit Settings
Mode Characteristics
TC3
TC2
TC1
TC0
TIO0
Clock
#
KIND
NAME
0
0
0
0
GPIO
Internal
0
Timer
GPIO
Summary of Contents for DSP56367
Page 16: ...xvi MOTOROLA CONTENTS Paragraph Number Title Page Number ...
Page 22: ...xxii MOTOROLA List of Figures Figure Number Title Page Number ...
Page 26: ...xxvi MOTOROLA List of Tables Table Number Title Page Number ...
Page 148: ...4 6 DSP56367 MOTOROLA Design Considerations PLL Performance Issues ...
Page 248: ...9 30 DSP56367 MOTOROLA Serial Host Interface SHI Programming Considerations ...
Page 306: ...10 58 DSP56367 MOTOROLA Enhanced Serial Audio Interface ESAI ESAI Initialization Examples ...
Page 389: ...Bootstrap ROM Contents MOTOROLA DSP56367 A 15 end ...
Page 390: ...A 16 DSP56367 MOTOROLA Bootstrap ROM Contents ...
Page 432: ...C 8 DSP56367 MOTOROLA JTAG BSDL ...
Page 484: ...D 52 DSP56367 MOTOROLA Programmer s Reference ...
Page 490: ...E 6 DSP56367 MOTOROLA Power Consumption Benchmark ...
Page 516: ...F 26 DSP56367 MOTOROLA IBIS Model ...
Page 522: ...Index 6 MOTOROLA Index ...
Page 523: ......