Skip to content

Commit 9c7b747

Browse files
nika-nordicrlubos
authored andcommitted
[nrf fromtree] samples: drivers: adc: add support for internal nRF54L SAADC inputs
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]> (cherry picked from commit e315982)
1 parent b1376e8 commit 9c7b747

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

samples/drivers/adc/adc_dt/boards/nrf54l15dk_nrf54l15_cpuapp.overlay

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/ {
88
zephyr,user {
9-
io-channels = <&adc 0>, <&adc 1>, <&adc 7>;
9+
io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 7>;
1010
};
1111
};
1212

@@ -33,6 +33,16 @@
3333
zephyr,oversampling = <8>;
3434
};
3535

36+
channel@2 {
37+
reg = <2>;
38+
zephyr,gain = "ADC_GAIN_1";
39+
zephyr,reference = "ADC_REF_INTERNAL";
40+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
41+
zephyr,input-positive = <NRF_SAADC_VDD>;
42+
zephyr,resolution = <12>;
43+
zephyr,oversampling = <8>;
44+
};
45+
3646
channel@7 {
3747
reg = <7>;
3848
zephyr,gain = "ADC_GAIN_1";

samples/drivers/adc/adc_sequence/boards/nrf54l15dk_nrf54l15_cpuapp.overlay

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
/ {
88
zephyr,user {
9-
io-channels = <&adc 0>, <&adc 1>, <&adc 7>;
9+
io-channels = <&adc 0>, <&adc 1>, <&adc 2>, <&adc 7>;
1010
};
1111
};
1212

@@ -39,6 +39,16 @@
3939
zephyr,oversampling = <8>;
4040
};
4141

42+
channel@2 {
43+
reg = <2>;
44+
zephyr,gain = "ADC_GAIN_1";
45+
zephyr,reference = "ADC_REF_INTERNAL";
46+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
47+
zephyr,input-positive = <NRF_SAADC_DVDD>; /* 0.9 V internal */
48+
zephyr,resolution = <12>;
49+
zephyr,oversampling = <8>;
50+
};
51+
4252
channel@7 {
4353
reg = <7>;
4454
zephyr,gain = "ADC_GAIN_1";

0 commit comments

Comments
 (0)