Operating Modes
16-14
ADSP-214xx SHARC Processor Hardware Reference
The count registers are reset to 0x0000 0001 again, and the timer contin-
ues counting until it is either disabled or the count value reaches
0xFFFF FFFF.
In this mode, programs can measure both the pulse width and the pulse
period of a waveform. To control the definition of the leading edge and
trailing edge of the
TIMERx_I
signal, the
PULSE
bit in the
TMxCTL
register is
set or cleared. If the
PULSE
bit is cleared, the measurement is initiated by a
falling edge, the count register is captured to the
WIDTH
register on the ris-
ing edge, and the period register is captured on the next falling edge.
The
PRDCNT
bit in the
TMxCTL
register controls whether an enabled inter-
rupt is generated when the pulse width or pulse period is captured. If the
PRDCNT
bit is set, the interrupt latch bit (
TIMxIRQ
) gets set when the pulse
period value is captured. If the
PRDCNT
bit is cleared, the
TIMxIRQ
bit gets
set when the pulse width value is captured.
If the
PRDCNT
bit is cleared, the first period value has not yet been mea-
sured when the first interrupt is generated. Therefore, the period value is
not valid. If the interrupt service routine reads the period value anyway,
the timer returns a period value of zero. When the period expires, the
period value is loaded in the
TMxPRD
register.
A timer interrupt (if enabled) is also generated if the count register reaches
a value of 0xFFFF FFFF. At that point, the timer is disabled automati-
cally, and the
TIMxOVF
status bit is set, indicating a count overflow. The
TIMxIRQ
and
TIMxOVF
bits are sticky bits, and programs must explicitly
clear them. The WDTH_CAP timing is shown in
The first width value captured in WDTH_CAP mode is erroneous due to
synchronizer latency. To avoid this error, programs must issue two
NOP
instructions between setting WDTH_CAP mode and setting
TIMxEN
.
www.BDTIC.com/ADI
Содержание SHARC ADSP-214 Series
Страница 60: ...Contents lx ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 72: ...Notation Conventions lxxii ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 130: ...Programming Model 2 52 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 264: ...Programming Models 3 134 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 290: ...Programming Model 4 26 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 296: ...Programming Model 5 6 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 396: ...Effect Latency 7 28 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 520: ...Programming Model 10 62 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 616: ...Debug Features 14 22 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 656: ...Programming Model 15 40 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 714: ...Programming Model 19 10 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 1132: ...Register Listing A 306 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 1192: ...Index I 34 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...