33.3.3.4.4 Adjusting Conversion Time

Both sampling time and sampling length can be adjusted using the Sampling Delay Selection (SAMPDLY) bit field in the Control D (ADCn.CTRLD) register and Sample Length (SAMPLEN) bit field in the Sample Control (ADCn.SAMPCTRL) register. Both of these control the ADC sampling time and sampling length in a number of CLK_ADC cycles. Increasing SAMPLEN allows sampling high-impedance sources without reducing CLK_ADC frequency. Adjusting SAMPDLY is intended for tuning the sampling frequency away from harmonic noise in the analog signal. Total sampling time is given by:

SampleTime = ( 2 + SAMPDLY + SAMPLEN ) f CLK_ADC

The equation above implies that the total conversion time for n samples is now:

Total Conversion Time (12-bit) = 2 f CLK_PER + n ( 1 3 .5 + 2 + S A M P D L Y + S A M P L E N f CLK_ADC + 2 f CLK_PER )

Some of the analog resources used by the ADC require time to initialize before a conversion can start. The Initialization Delay (INITDLY) bit field in the Control D (ADCn.CTRLD) register can be used to prevent starting a conversion prematurely by halting sampling for the configured delay duration.

The figure below shows the timing diagram for the ADC and the usage of the INITDLY, SAMPDLY and SAMPLEN bit fields:

Figure 33-7. Timing Diagram - Conversion with Delays and Custom Sampling Length