ADSP-BF537 Blackfin Processor Hardware Reference
15-55
General-Purpose Timers
bitset(r7, bitpos(EVT_IVG7));
[p5] = r7;
p5.h = hi(SIC_IMASK);
p5.l = lo(SIC_IMASK);
/* assign timer 5 IRQ = IRQ24 to IVG7 */
r7 = -1 (x);
[p5 + SIC_IAR0 - SIC_IMASK] = r7;
[p5 + SIC_IAR1 - SIC_IMASK] = r7;
[p5 + SIC_IAR2 - SIC_IMASK] = r7;
r7.h = hi(P24_IVG(7));
r7.l = lo(P24_IVG(7));
[p5 + SIC_IAR3 - SIC_IMASK] = r7;
/* enable timer 5 IRQ */
r7 = [p5];
bitset(r7, 24);
[p5] = r7;
/* enable interrupt nesting */
(r7:7, p5:5) = [sp++];
[--sp] = reti;
rts;
timer5_interrupt_setup.end:
The example shown in
TMRx
pin. It gener-
ates periodic interrupt requests every 0x1000 SCLK cycles. If the
preprocessor constant
SINGLE_PULSE
was defined, timer 5 requests an
interrupt only once. Unlike in a real application, the purpose of the inter-
rupt service routine shown in this example is just the clearing of the
interrupt request and counting interrupt occurrences.
Listing 15-4. Periodic Interrupt Requests
// #define SINGLE_PULSE
timer5_interrupt_generation:
[--sp] = (r7:7, p5:5);
p5.h = hi(TIMER_ENABLE);
Summary of Contents for Blackfin ADSP-BF537
Page 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Page 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...