Programming Examples
10-50
ADSP-BF50x Blackfin Processor Hardware Reference
Listing 10-2. Signal Generation
// #define SINGLE_PULSE
timer45_signal_generation:
[--sp] = (r7:7, p5:5);
p5.h = hi(TIMER_ENABLE);
p5.l = lo(TIMER_ENABLE);
#ifdef SINGLE_PULSE
r7.l = PULSE_HI | PWM_OUT;
#else
r7.l = PERIOD_CNT | PULSE_HI | PWM_OUT;
#endif
w[p5 + TIMER5_CONFIG - TIMER_ENABLE] = r7;
w[p5 + TIMER4_CONFIG - TIMER_ENABLE] = r7;
r7 = 0x10 (z);
[p5 + TIMER5_WIDTH - TIMER_ENABLE] = r7;
r7 = 0x20 (z);
[p5 + TIMER4_WIDTH - TIMER_ENABLE] = r7;
#ifndef SINGLE_PULSE
r7 = 0x40 (z);
[p5 + TIMER5_PERIOD - TIMER_ENABLE] = r7;
[p5 + TIMER4_PERIOD - TIMER_ENABLE] = r7;
#endif
r7.l = TIMEN5 | TIMEN4;
w[p5] = r7;
(r7:7, p5:5) = [sp++];
rts;
timer45_signal_generation.end:
All subsequent examples use interrupts. Thus,
Listing 10-3
illustrates how
interrupts are generated and how interrupt service routines can be regis-
tered. In this example, the timer 5 interrupt is assigned to the IVG12
interrupt channel of the CEC controller.
Summary of Contents for EZ-KIT Lite ADSP-BF506F
Page 50: ...Contents l ADSP BF50x Blackfin Processor Hardware Reference ...
Page 92: ...Development Tools 1 30 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 110: ...Interface Overview 3 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 236: ...Internal Flash Memory Control Registers 6 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 650: ...Programming Examples 15 56 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 804: ...Programming Examples 17 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1194: ...Programming Examples 24 90 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1256: ...ACM Registers A 50 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1264: ...Boundary Scan Architecture B 8 ADSP BF50x Blackfin Processor Hardware Reference ...