ADSP-BF537 Blackfin Processor Hardware Reference
15-53
General-Purpose Timers
p5.h = hi(PORTF_FER);
p5.l = lo(PORTF_FER);
r7.l = PF2|PF3|PF4|PF5|PF6|PF7|PF8|PF9;
w[p5] = r7;
p5.l = lo(PORT_MUX);
r7.l = PFTE;
w[p5] = r7;
(r7:7, p5:5) = [sp++];
rts;
timer_port_setup.end:
TMR4
(
PF5
) and
TMR5
(
PF4
) outputs.
By default, timer 5 generates a continuous PWM signal with a duty cycle
of 50% (period = 0x40 SCLKs, width = 0x20 SCLKs) while the PWM sig-
nal generated by timer 4 has the same period but 25% duty cycle (width =
0x10 SCLKs).
If the preprocessor constant
SINGLE_PULSE
is defined, every
TMRx
pin out-
puts only a single high pulse of 0x20 (timer 4) and 0x10 SCLKs (timer 5)
duration.
In any case the timers are started synchronously and the rising edges are
aligned, that is, the pulses are left aligned.
Listing 15-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;
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 ...