Skip to content

Commit

Permalink
[nrf fromlist] samples: drivers: adc: add support for internal nRF54L…
Browse files Browse the repository at this point in the history
… SAADC inputs

SAADC peripheral for nRF54L Series allows to choose internal
voltages as positive inputs and samples shall showcase that.

Upstream PR: zephyrproject-rtos/zephyr#79330

Signed-off-by: Nikodem Kastelik <[email protected]>
(cherry picked from commit c67b5fa3217b21bfe1604126f06cceb2a1f7c3a9)
  • Loading branch information
nika-nordic committed Oct 14, 2024
1 parent a0cc2e9 commit fd4b34f
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 fd4b34f

Please sign in to comment.