Skip to content

Commit 873fae6

Browse files
mrodgers-witekionashif
authored andcommitted
samples: adc: add board overlays for STM32 differential mode
Add overlays used for testing differential mode support in STM32 ADC driver: - Nucleo F303K8 - Nucleo H753ZI Signed-off-by: Matt Rodgers <[email protected]>
1 parent 56621fa commit 873fae6

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2025 Witekio
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
io-channels = <&adc1 1>;
10+
};
11+
};
12+
13+
&adc1 {
14+
#address-cells = <1>;
15+
#size-cells = <0>;
16+
17+
/* Differential input: must specify pinctrl for both +/- inputs */
18+
pinctrl-0 = <&adc1_in1_pa0 &adc1_in2_pa1>;
19+
20+
channel@1 {
21+
reg = <1>;
22+
zephyr,gain = "ADC_GAIN_1";
23+
zephyr,reference = "ADC_REF_INTERNAL";
24+
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
25+
zephyr,resolution = <12>;
26+
zephyr,differential;
27+
};
28+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2025 Witekio
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
io-channels = <&adc3 5>;
10+
};
11+
};
12+
13+
&adc3 {
14+
#address-cells = <1>;
15+
#size-cells = <0>;
16+
17+
/* Differential input: must specify pinctrl for both +/- inputs */
18+
pinctrl-0 = <&adc3_inp5_pf3 &adc3_inn5_pf4>;
19+
20+
channel@5 {
21+
reg = <5>;
22+
zephyr,gain = "ADC_GAIN_1";
23+
zephyr,reference = "ADC_REF_INTERNAL";
24+
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
25+
zephyr,resolution = <12>;
26+
zephyr,differential;
27+
};
28+
};

0 commit comments

Comments
 (0)