Datasheet

1109
32117D–AVR-01/12
AT32UC3C
36.6.4.5 Sequencer start/stop mode
Thanks to the Software Acknowledge bit (SA) in the SEQCFGx register, the behavior of
sequencer x at the end of a sequence can be configured.
The Sequencer x Overrun Error bit (OVRx) in SR register indicates that an overrun error
occurred in the sequencer x. This means that the RES0 register has not been read while a new
sequence is starting. Events such as end-of-sequence or end-of-conversion can be caught by
interrupt servicing or polling routines thanks to the SEOSx and SEOCx bits in the SR register.
36.6.4.6 Sequencer free running-mode
Only SEQ0 has the free-running mode capability. In free-running mode the ADC continuously
converts analog values configured in the sequencer. In this mode, the sequence restarts auto-
matically after each end of sequence without waiting for the last conversion to finish. This mode
is configured by setting the Free Running Mode (FRM) bit in the CFG register. The conversion
sequence will start on the first SOC defined by the Trigger Selection (TRGSEL) field in the
SEQCFG0 register. In this mode only SEQ0 is running once triggered.
When converting at full speed the sequencer always wait for the last conversion to be finished to
rise the sequencer end of sequence status bit (EOS). Figure 36-4 shows a 3 conversions
sequence running. When the third channel is sampled the sequencer has to wait for the pipeline
to be flushed. This takes SRES/2+3-SHD clock cycles. To avoid this you can run that sequence
in free running mode. Please refer to Figure 36-5. The sequencer will run the sequence without
waiting for the pipeline to be flushed but the user will have to read the converted value before it
is overwritten by a new conversion.
Figure 36-4. Not Using FRM and Converting at Full Speed
Table 36-6. Sequencer Start/Stop Mode
SA Comment
0
The sequencer waits for software acknowledge.
Acknowledge is done by writing a 1 in the SEOSx bit of the SCR register.
1
The sequencer will restart automatically a new sequence on a new SOC.
Results will be overwritten if not processed.