ADSP-2126x SHARC Processor Hardware Reference
14-13
Peripheral Timer
The first width value captured in
WDTH_CAP
mode is erroneous due to syn-
chronizer latency. To avoid this error, software must issue two
NOP
instructions between setting
WDTH_CAP
mode and setting
TIMxEN
.
External Event Watchdog Mode (EXT_CLK)
To enable
EXT_CLK
mode, set the
TIMODE1–0
bits in the
TMxCTL
register to
11 in the
TMxCTL
register. This configures the
TIMERx
signal as an input.
The
PULSE
bit determines the
TIMERx
signal polarity. The timer works as a
counter clocked by any external source, which can also be asynchronous to
the DSP clock. Therefore, in
EXT_CLK
mode, the
TMxCNT
register should
not be read when the counter is running.
The operation of the
EXT_CLK
mode is:
1. Program the
TMxPRD
Period register with the value of the maximum
timer external count.
2. Set the
TIMxEN
bits. This loads the period value in the Count regis-
ter and starts the countdown.
3. When the period expires, an interrupt, (
TIMxIRQ
) occurs.
After the timer is enabled, it waits for the first rising edge on the
TIMERx
signal. The
PULSE
bit defines the rising edge and trailing edge. The rising
edge forces the Count register to be loaded by the value
(0xFFFF FFFF –
TMxPRD
). Every subsequent rising edge increments the
Count register. After reaching the count value 0xFFFF FFFE, the
TIMxIRQ
bit is set and an interrupt is generated. The next rising edge reloads the
Count register with (0xFFFF FFFF –
TMxPRD
) again.
The Configuration bit,
PRDCNT
, has no effect in this mode. Also,
TIMxOVF
is never set and the width register is unused.
Содержание ADSP-21261 SHARC
Страница 30: ...Contents xxx ADSP 2126x SHARC Processor Hardware Reference ...
Страница 40: ...Register Diagram Conventions xl ADSP 2126x SHARC Processor Hardware Reference ...
Страница 58: ...Differences From Previous SHARCs 1 18 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 112: ...Secondary Processing Element PEy 2 54 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 178: ...Summary 3 66 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 204: ...DAG Instruction Summary 4 26 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 322: ...Setting Up DMA 7 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 436: ...SPORT Programming Examples 9 86 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 521: ...ADSP 2126x SHARC Processor Hardware Reference 11 31 Input Data Port rts IDP_ISR end ...
Страница 522: ...Input Data Port Programming Example 11 32 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 590: ...Timer Programming Examples 14 20 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 796: ...I O Processor Registers A 174 ADSP 2126x SHARC Processor Hardware Reference ...
Страница 800: ...B 4 ADSP 2126x SHARC Processor Core Manual ...
Страница 846: ...Index I 36 ADSP 2126x SHARC Processor Hardware Reference ...