
25 µs
50 µs
ePWM
counter
PWM A/B
output
I
1
, I
2
, I
3
V
1
, V
2
,V
3
I
1
, I
2
, I
3
V
1
, V
2
, V
3
Uninterrupted Autosequenced Mode
Example 1-4. Sequencer Start/Stop Operation
Requirement: To start three autoconversions (e.g., I
1
,I
2
,I
3
) off trigger 1 (underflow) and three
autoconversions (e.g., V
1
,V
2
,V
3
) off trigger 2 (period). Triggers 1 and 2 are separated in time by 25 µs
and are provided by an ePWM. See Figure 1-7 . Only SEQ1 is used in this case.
Note: Triggers 1 and 2 may be an SOC signal from ePWM, external pin, or software. The same
trigger source may occur twice to satisfy the dual-trigger requirement of this example.
Care must be taken such that multiple ePWM triggers are not lost due sequences already
in progress. See Section 1.3.3 .
Here MAX_CONV1 is set to 2 and the ADC Input Channel Select Sequencing Control Registers
(ADCCHSELSEQn) are set as shown in Table 1-4 .
Once reset and initialized, SEQ1 waits for a trigger. With the first trigger, three conversions with
channel-select values of: CONV00 (I
1
), CONV01 (I
2
), and CONV02 (I
3
) are performed. SEQ1 then waits
at current state for another trigger. Twenty-five microseconds later when the second trigger arrives,
another three conversions occur, with channel-select values of CONV03 (V
1
), CONV04 (V
2
), and
CONV05 (V
3
).
The value of MAX_CONV1 is automatically loaded into SEQ_CNTR for both trigger cases. If a different
number of conversions are required at the second trigger point, you must (at some appropriate time
before the second trigger) change the value of MAX_CONV1 through software, otherwise, the current
(originally loaded) value will be reused. This can be done by an ISR that changes the value of
MAX_CONV1 at the appropriate time. The interrupt operation modes are described in Section 1.3.4 .
At the end of the second autoconversion session, the ADC result registers will have the values shown
in Table 1-5 .
At this point, SEQ1 keeps "waiting" at the current state for another trigger. Now, the user can reset
SEQ1 (by software) to state CONV00 and repeat the same trigger1, 2 sessions.
Figure 1-7. Example of ePWM Triggers to Start the Sequencer
22 Analog-to-Digital Converter (ADC) SPRU812A – September 2007 – Revised October 2007
Submit Documentation Feedback
Comentários a estes Manuais