Programming Examples
13-36
ADSP-BF50x Blackfin Processor Hardware Reference
“General-Purpose Ports”
for information regarding which GP timer(s) are
associated with which GP counter module(s) for your device. The timer is
configured for
WDTH_CAP
mode, and the period between the last two suc-
cessive counter events is read from within the up count interrupt handler
that was provided in
Listing 13-3 on page 13-30
.
Listing 13-4. Setting Up Timer 7 for Counter Event Period Capture
/* configure the timer for WDTH_CAP mode */
P5.H = hi(TIMER7_CONFIG);
P5.l = lo(TIMER7_CONFIG);
R5 = PULSE_HI | PERIOD_CNT | TIN_SEL | WDTH_CAP (z);
w[P5] = R5.l;
/* Enable Timer 7
P5.H = hi(TIMER_ENABLE0);
P5.L = lo(TIMER_ENABLE0);
R5 = TIMEN7 (z);
w[P5] = R5.L;
...
_IVG11_handler.counter.up_count:
CC = bittst(R5, bitpos(UCII));
IF !CC JUMP _IVG11_handler.counter.down_count;
/* Clear the serviced request */
R6 = UCII (z);
w[P5] = R6;
/* insert up count handler here */
/* Read the period between the last two successive events */
P5.H = hi(TIMER7_PERIOD);
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 ...