Modes of Operation
15-22
ADSP-BF537 Blackfin Processor Hardware Reference
write(TIMERx_PERIOD, per1) ;
write(TIMERx_WIDTH, per1 - wid1) ;
waitfor (interrupt) ;
write(TIMERx_PERIOD, per2) ;
write(TIMERx_WIDTH, wid2) ;
}
As shown in this example, the pulses produced do not need to be symmet-
ric (
wid1
does not need to equal
wid2
). The period can be offset to adjust
the phase of the pulses produced (
per1
does not need to equal
per2
).
The timer enable latch (
TRUNx
bit in the
TIMER_STATUS
register) is
updated only at the end of even-numbered periods in
TOGGLE_HI
mode.
When
TIMER_DISABLE
is written to 1, the current pair of counter periods
(one waveform period) completes before the timer is disabled.
As when
TOGGLE_HI
=
0
, errors are reported if the
TIMERx_PERIOD
register
is either set to 0 or 1, or when the width value is greater than or equal to
the period value.
Externally Clocked PWM_OUT
By default, the timer is clocked internally by
SCLK
. Alternatively, if the
CLK_SEL
bit in the Timer Configuration (
TIMERx_CONFIG
)
register is set,
the timer is clocked by
PWM_CLK
. The
PWM_CLK
is normally input from the
TACLKx
pin, but may be taken from the common
TMRCLK
pin regardless of
whether the timers are configured to work with the PPI. Different timers
may receive different signals on their
PWM_CLK
inputs, depending on con-
figuration. As selected by the
PERIOD_CNT
bit, the
PWM_OUT
mode either
generates pulse width modulation waveforms or generates a single pulse
with pulse width defined by the
TIMERx_WIDTH
register.
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 ...