Capture Units
The capture unit interrupts offer immediate CPU notification of externally captured events. In
situations where this is not required, the interrupts can be masked and flag testing/polling can be
used instead. This offers increased flexibility for resource management. For example, consider a
servo application where a capture unit is being used for low-speed velocity estimation via a
pulsing sensor. The velocity estimate is not used until the next control law calculation is made,
which is driven in real-time using a timer interrupt. Upon entering the timer interrupt service
routine, software can test the capture interrupt flag bit. If sufficient servo motion has occurred
since the last control law calculation, the capture interrupt flag will be set and software can
proceed to compute a new velocity estimate. If the flag is not set, then sufficient motion has not
occurred and some alternate action would be taken for updating the velocity estimate. As a
second example, consider the case where two successive captures are needed before a
computation proceeds (e.g. measuring the width of a pulse). If the width of the pulse is needed as
soon as the pulse ends, then the capture interrupt is the best option. However, the capture
interrupt will occur after each of the two captures, the first of which will waste a small number of
cycles while the CPU is interrupted and then determines that it is indeed only the first capture. If
the width of the pulse is not needed as soon as the pulse ends, the CPU can check, as needed, the
CAPFIFOA register for EVA and CAPFIFOB register for EVB to see if two captures have
occurred, and proceed from there.
Capture Control Register
Capture Control Register
(EVA)
(EVA)
CAPCONA @ 0x007420
CAPCONA @ 0x007420
(lab file:
(lab file:
Ev
Ev
.c)
.c)
14-13
12
10
8
9
11
15
CAP3EN
reserved
CAP3TSEL
CAP3TOADC
CAP12TSEL
CAPRES
CAPQEPN
Capture Reset (not latched)
0 = clear all result FIFO’s and
CAPFIFO register
1 = no action
Unit 1 & 2 Control
00 = disable
01 = enable for capture
10 = reserved
11 = enable for QEP
Unit 3 Control
0 = disable
1 = enable
Timer Select
0 = GP Timer 2
1 = GP Timer 1
ADC Start
0 = no action
1 = CAP3INT flag
5-4
1-0
3-2
7-6
CAP1EDGE
CAP2EDGE
CAP3EDGE
reserved
Edge Detection Control
00 = no detection
10 = falling edge
01 = rising edge
11 = both edges
7 - 30
C28x - Event Manager
Summary of Contents for C28 Series
Page 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Page 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Page 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Page 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Page 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Page 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Page 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Page 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Page 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Page 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...