Enabling a Timer
14-10
ADSP-2126x SHARC Processor Hardware Reference
Single-Pulse Generation
If the
PRDCNT
bit is cleared, the
PWM_OUT
mode generates a single pulse on
the
TIMERx
signal. This mode can also be used to implement a well defined
software delay that is often required by state machines. The pulse width
(= 2 x
TMxW
) is defined by the width register and the period register is not
used.
At the end of the pulse, the Interrupt Latch bit (
TIMxIRQ
) is set and the
timer is stopped automatically. If the
PULSE
bit is set, an active high pulse
is generated on the
TIMERx
signal. If the
PULSE
bit is not set, the pulse is
active low.
Using a General-Purpose Timer as a Core Timer
Programs can use a general-purpose timer as a core timer. When in this
mode, the timer can also generate a periodic interrupt in a fashion similar
to the core timer. In this case there is no need to route the timer signal to
an external pin.
To implement this behavior, it is necessary to set the
TIMODEPWM
bits, the
PRDCNT
bit, and the
IRQEN
bit in the applicable
TMxCTL
register. The period
at which the interrupt is latched is the pulse period (2 x value in
TMxPRD
register) in core cycles. Even though the
TMxW
register is not used in this
case, it is necessary to initialize it to a nonzero value less than the value in
the
TMxPRD
register for correct operation.
Unlike the core timer, programs must manually clear the interrupt in the
TMSTAT
register for each interrupt that is serviced.
Pulse Width Count and Capture Mode (WDTH_CAP)
To enable
WDTH_CAP
mode, set the
TIMODE1–0
bits in the
TMxCTL
register to
10. This configures the
TIMERx
signal as an input signal with its polarity
determined by
PULSE
. If
PULSE
is set (= 1), an active high width pulse
waveform is measured at the
TIMERx
signal. If
PULSE
is cleared (= 0), an
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 ...