Datasheet

1116
32117D–AVR-01/12
AT32UC3C
36.6.13 Start Of Conversion (SOC)
ADC sequencers conversions can be triggered for each sequencer with the following sources:
The sources must be configured through the Trigger Selection (TRGSEL) field of the
SEQCFGxregister. Selecting the event controller source allows any event controller source to
generate SOC but events must be synchronous with the module PB clock frequency. The event
source event shaper must be configured accordingly (refer to the event controller section).
The ADC can serve a maximum of one SOC per ADC clock cycle. Extra SOC will be ignored
and the Missed Start-Of-Conversion (MSOCx) bit in the SR register will be set. If the SOC fre-
quency provided by the event controller exceeds the ADC capability, the event controller will
generate an underrun status.
36.6.14 Internal Timer
The ADCIFA embeds an internal timer used as a trigger source for SEQ0, SEQ1 and TSSEQ
which can be configured by setting the ITMC fields of the ITIMER register.
Internal Timer Trigger Period= (ITMC+1)*T(CkADC)
The 17 bits counter allows SOC period up to 174ms when CkADC clock frequency is set to
1.5 MHz.
Once set as a SOC source, the internal timer as to be started by writing a '1' in the Internal Timer
Start (TSTART) bit of the CR register. It can be stopped in the same way by writing a '1' in the
TSTOP bit of the CR register. The current status of the internal timer can be read from the Run-
ning timer status (RUN) field of the SR register: 0 means stopped, 1 means running. In addition
when the internal timer is running, if ITIMER register is written to change its frequency, the inter-
nal counter is cleared to avoid rollover phenomena.
Note: It is possible to generate an internal timer event each CkADC time slot by writing 0x0 to
the ITIMER register ITMC field and by selecting the internal timer as a SOC source.
36.6.15 Peripheral DMA
There are two Peripheral DMA Controller (PDC) channels corresponding to the maximum num-
ber of sequencers that can be run at the same time. The Sequencer x Last Converted Value
(LCVx) register contains the last converted value of the sequencer x according to the conversion
result format. The LCV register is updated each time the sequencer ends a conversion.
If the last converted value has not been read when a new one is available, the previous data is
overwritten. This overrun status is signalled by the Sequencer x Last Converted Value Overrun
(LOVRx) bit in the SR register indicating that at least one overrun error occurred concerning
sequencer x.
The OVRx and LOVRx bits of the SR register are cleared by writing a ‘1’ respectively in the
OVRx and LOVRx fields of the SCR register.
Note: PDC transfers are 16 bits wide.
Table 36-9. Trigger of Start Of Conversion
Source
Sequencer
Software
trigger
Internal
Timer
Event
controller Continuous
SEQ0 Y Y Y Y
SEQ1 Y Y Y Y