Programming Examples
16-8
ADSP-BF537 Blackfin Processor Hardware Reference
r0.l = lo(isr_core_timer);
r0.h = hi(isr_core_timer);
[p1 + EVT6 - IMASK] = r0;
r0 = [p1];
bitset(r0, bitpos(EVT_IVTMR));
[p1] = r0;
/* Prescaler = 50, Period = 10,000,000, First Period = 20,000,000
*/
p1.l = lo(TCNTL);
p1.h = hi(TCNTL);
r0 = 50 (z);
[p1 + TSCALE - TCNTL] = r0;
r0.l = lo(10000000);
r0.h = hi(10000000);
[p1 + TPERIOD - TCNTL] = r0;
r0 <<= 1;
[p1 + TCOUNT - TCNTL] = r0;
/* R6 counts interrupts */
r6 = 0 (z);
/* start in auto-reload mode */
r0 = TAUTORLD | TMPWR | TMREN (z);
[p1] = r0;
_main.forever:
jump _main.forever;
_main.end:
/* interrupt service routine simple increments R6 */
isr_core_timer:
[--sp] = astat;
r6+= 1;
astat = [sp++];
rti;
isr_core_timer.end:
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 ...