ADSP-BF537 Blackfin Processor Hardware Reference
15-21
General-Purpose Timers
When
TOGGLE_HI
=
0
, software updates the timer period and timer pulse
width registers once per waveform period. When
TOGGLE_HI = 1
, software
updates the timer period and timer pulse width registers twice per wave-
form. Period values are half as large. In odd-numbered periods, write
(
Period – Width
) instead of
Width
to the timer pulse width register in
order to obtain center-aligned pulses.
For example, if the pseudo-code when
TOGGLE_HI = 0
is:
int period, width ;
for (;;) {
period = generate_period(...) ;
width = generate_width(...) ;
waitfor (interrupt) ;
write(TIMERx_PERIOD, period) ;
write(TIMERx_WIDTH, width) ;
}
Then when
TOGGLE_HI
=
1
, the pseudo-code would be:
int period, width ;
int per1, per2, wid1, wid2 ;
for (;;) {
period = generate_period(...) ;
width = generate_width(...) ;
per1 = period/2 ;
wid1 = width/2 ;
per2 = period/2 ;
wid2 = width/2 ;
waitfor (interrupt) ;
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 ...