# Use Roadrunner ADC's Enhanced Mode

In this article we will see how to increase the reading resolution of the SAMA5D2 processors by 1 or 2 bits.

Some applications will have high resolution requirements based in the signal’s dynamic range, the smallest change in a parameter that must be measured, and
the signal-to-noise ratio (SNR). Oversampling can increase the resolution in order to get better measurement without expensive off-chip ADC cost and complexity.

<img src="./ADC_Oversampling.png" class="img-responsive center-block" width="40%">

## Sampling Frequency Hints

### Sampling Frequency

The [Nyquist-Shannon theorem](https://it.wikipedia.org/wiki/Teorema_del_campionamento_di_Nyquist-Shannon) states that a signal must be sampled at least twice as fast as
the bandwidth of the signal to accurately reconstruct the waveform. This avoid aliasing into the spectrum of interest.

### SMA5D27 Sampling Frequency



## Device Tree Configuration

Insert this line on your dts to enable ADC:

                        adc: adc@fc030000 {
                                compatible = "atmel,sama5d2-adc";
                                vddana-supply = <&vdd_3v3_lp_reg>;
                                vref-supply = <&vdd_3v3_lp_reg>;
                                pinctrl-names = "default";
                                pinctrl-0 = <&pinctrl_adc_default>;
                                status = "okay";

                                vdd_3v3_lp_reg: REG_LDO2 {
                                        regulator-name = "VDD_3V3_LP";
                                        regulator-min-microvolt = <3300000>;
                                        regulator-max-microvolt = <3300000>;
                                        regulator-always-on;
                                };
                        };

@wip