EasyManuals Logo

Texas Instruments C28 Series Student Guide

Texas Instruments C28 Series
342 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #144 background imageLoading...
Page #144 background image
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 891115
CAP3EN
reserved
CAP3TSEL
CAP3TOADC
CAP12TSELCAPRES 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-03-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

Table of Contents

Other manuals for Texas Instruments C28 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C28 Series and is the answer not in the manual?

Texas Instruments C28 Series Specifications

General IconGeneral
BrandTexas Instruments
ModelC28 Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals