Skip to content

Commit

Permalink
samples: drivers: adc: add support for internal nRF54L SAADC inputs
Browse files Browse the repository at this point in the history
SAADC peripheral for nRF54L Series allows to choose internal
voltages as positive inputs and samples shall showcase that.

Signed-off-by: Nikodem Kastelik <[email protected]>
  • Loading branch information
nika-nordic committed Oct 15, 2024
1 parent 37292fb commit a3d5e0e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/ {
zephyr,user {
io-channels = <&adc 0>, <&adc 1>, <&adc 7>;
io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 7>;
};
};

Expand All @@ -33,6 +33,16 @@
zephyr,oversampling = <8>;
};

channel@2 {
reg = <2>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,input-positive = <NRF_SAADC_VDD>;
zephyr,resolution = <12>;
zephyr,oversampling = <8>;
};

channel@7 {
reg = <7>;
zephyr,gain = "ADC_GAIN_1";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/ {
zephyr,user {
io-channels = <&adc 0>, <&adc 1>, <&adc 7>;
io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 7>;
};
};

Expand Down Expand Up @@ -39,6 +39,16 @@
zephyr,oversampling = <8>;
};

channel@2 {
reg = <2>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,input-positive = <NRF_SAADC_DVDD>; /* 0.9 V internal */
zephyr,resolution = <12>;
zephyr,oversampling = <8>;
};

channel@7 {
reg = <7>;
zephyr,gain = "ADC_GAIN_1";
Expand Down

0 comments on commit a3d5e0e

Please sign in to comment.