ADSP-BF50x Blackfin Processor Hardware Reference
13-15
General-Purpose Counter
Typically, this information is sufficient if the speed of GP counter events
is known not to reach very low values.
Figure 13-3
shows the operation of
the GP counter and the GP timer in this mode. TO generates a pulse
every time a count event occurs. The GP timer will update its
TIMER_PERIOD
register with the period (measured from rising edge to rising
edge) of the TO signal. The
TIMER_PERIOD
register is updated at every ris-
ing edge of the TO signal and contains the number of system clock (
SCLK
)
cycles that have elapsed since the previous rising edge.
Incidentally, the
TIMER_WIDTH
register is also updated at the same time,
but is generally of no interest in this mode of operation. If no reads of the
CNT_COUNTER
register occur between counter events, the
TIMER_WIDTH
regis-
ter only contains the width of the TO pulse. If a read of
CNT_COUNTER
has
occurred between events, the
TIMER_WIDTH
register will contain the time
between the read of
CNT_COUNTER
and the next event.
This mode can also be used with
PULSE_HI
= 0. In this case, the period of
TO is measured between falling edges. It will result in the same values as
in the previous case, only the latching occurs one
SCLK
cycle later.
Capturing Counter Interval and
CNT_COUNTER Read Timing
It is possible to also capture the time elapsed since the last count event. In
this mode, the associated timer should be programmed in
WDTH_CAP
mode
with
PULSE_HI
= 0,
PERIOD_CNT
= 0 and
TIN_SEL
= 1. Typically, this addi-
tional information is used to estimate the advancement of the GP counter
since the last count event, when the speed is very low.
Figure 13-4
shows
the operation of the GP counter module and the GP timer module in this
mode. TO generates a pulse every time a count event occurs. In addition,
when the processor reads the
CNT_COUNTER
register, the TO signal presents
a pulse which is extended (high) until the next count event. The GP timer
will update its
TIMER_PERIOD
register with the period (measured from fall-
ing edge to falling edge, because
PULSE_HI
= 0) of the TO signal. The
TIMER_WIDTH
register is updated with the pulse width (the portion where
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 ...