Timer and Sequencing
3-46
ADSP-2126x SHARC Processor Hardware Reference
Timer and Sequencing
The sequencer includes a programmable interval timer, which appears in
MODE2
,
TCOUNT
, and
TPERIOD
registers
control timer operations as described below.
•
Timer enable
MODE2
Bit 5 (
TIMEN
). This bit directs the DSP to
enable (if 1) or disable (if 0) the timer.
•
Timer count
(
TCOUNT
). This register contains the decrementing
timer count value, counting down the cycles between timer
interrupts.
•
Timer period
(
TPERIOD
). This register contains the timer period,
indicating the number of cycles between timer interrupts.
MODE2
register.
The
TCOUNT
register contains the timer counter. The timer decrements the
TCOUNT
register during each clock cycle. When the
TCOUNT
value reaches
zero, the timer generates an interrupt and asserts the
TIMEXP
pin. This sce-
nario applies only when
TCOUNT
is configured as
TIMEXP
output high for
four cycles (when the timer is enabled), as shown in
clock cycle after
TCOUNT
reaches zero, the timer automatically reloads
TCOUNT
from the
TPERIOD
register.
The
TPERIOD
value specifies the frequency of timer interrupts. The num-
ber of cycles between interrupts is
TPERIOD
+ 1. The maximum value of
TPERIOD
is 2
32
– 1. This value is loaded into
TCOUNT
after it decrements to
zero.
To start and stop the timer, programs use the
MODE2
register’s
TIMEN
bit.
With the timer disabled (
TIMEN
=0), the program loads
TCOUNT
with an ini-
tial count value and loads
TPERIOD
with the number of cycles for the
desired interval. Then, the program enables the timer (
TIMEN
=1) to begin
the count.
Summary of Contents for ADSP-21261 SHARC
Page 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Page 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Page 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Page 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Page 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Page 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Page 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Page 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Page 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Page 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Page 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Page 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Page 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...