Interrupts
16-18
ADSP-214xx SHARC Processor Hardware Reference
source without reference to the timer’s interrupt signal. The
TMSTAT
regis-
ter contains an interrupt latch bit (
TIMxIRQ
) and an overflow/error
indicator bit (
TIMxOVF
) for each timer.
These sticky bits are set by the timer hardware and may be watched by
software. They need to be cleared in the
TMSTAT
register by software explic-
itly. To clear, write a one to the corresponding bit in the
TMSTAT
register as
.
Listing 16-1. Clearing Sticky Bits
TMR0_ISR:
ustat2=TIM0IRQ;
dm(TM0STAT)=ustat2; /* W1C the Timer0 bit */
r10=dm(TM0CTL); /* dummy read for write latency */
instructions;
instructions;
RTI;
Interrupt and overflow bits may be cleared simultaneously with
timer enable or disable.
To enable a timer’s interrupt, set the
IRQEN
bit in the timer’s configuration
(
TMxCTL
) register and unmask the timer’s interrupt by setting the corre-
sponding bit of the
IMASK
register. With the
IRQEN
bit cleared, the timer
does not set its interrupt latch (
TIMxIRQ
) bits. To poll the
TIMxIRQ
bits
without generating a timer interrupt, programs can set the
IRQEN
bit while
leaving the timer’s interrupt masked.
With interrupts enabled, ensure that the interrupt service routine (ISR)
clears the
TIMxIRQ
latch before the
RTI
instruction to assure that the inter-
rupt is not serviced erroneously. In external clock (
EXT_CLK
) mode, the
latch should be reset at the very beginning of the interrupt routine so as
not to miss any timer event.
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...