File tree Expand file tree Collapse file tree 4 files changed +72
-1
lines changed
boards/arm/mimxrt1170_evk
samples/drivers/adc/boards
tests/drivers/adc/adc_api/boards Expand file tree Collapse file tree 4 files changed +72
-1
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ RT1170 EVKB (`mimxrt1170_evkb_cm7/cm4`)
110
110
+-----------+------------+-------------------------------------+-----------------+-----------------+
111
111
| PWM | on-chip | pwm | Supported | Supported |
112
112
+-----------+------------+-------------------------------------+-----------------+-----------------+
113
- | ADC | on-chip | adc | Supported (M7) | No support |
113
+ | ADC | on-chip | adc | Supported (M7) | Supported (M7) |
114
114
+-----------+------------+-------------------------------------+-----------------+-----------------+
115
115
| UART | on-chip | serial port-polling; | Supported | Supported |
116
116
| | | serial port-interrupt; | | |
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ toolchain:
15
15
ram : 65536
16
16
flash : 65536
17
17
supported :
18
+ - adc
18
19
- counter
19
20
- can
20
21
- gpio
Original file line number Diff line number Diff line change
1
+ /*
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ *
4
+ * Copyright 2023 NXP
5
+ */
6
+
7
+ #include <zephyr/dt-bindings/adc/mcux-lpadc.h>
8
+
9
+ / {
10
+ zephyr,user {
11
+ /* adjust channel number according to pinmux in board.dts */
12
+ io-channels = <&lpadc0 0>;
13
+ };
14
+ };
15
+
16
+ &lpadc0 {
17
+ #address-cells = <1>;
18
+ #size-cells = <0>;
19
+
20
+ /*
21
+ * To use this sample:
22
+ * - Connect LPADC0 CH0 signal to voltage between 0~1.8V (J9 pin 10)
23
+ */
24
+
25
+ channel@0 {
26
+ reg = <0>;
27
+ zephyr,gain = "ADC_GAIN_1";
28
+ zephyr,reference = "ADC_REF_EXTERNAL0";
29
+ zephyr,vref-mv = <1800>;
30
+ zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
31
+ zephyr,resolution = <12>;
32
+ zephyr,input-positive = <MCUX_LPADC_CH0A>;
33
+ };
34
+ };
Original file line number Diff line number Diff line change
1
+ /*
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ *
4
+ * Copyright 2023 NXP
5
+ */
6
+
7
+ #include <zephyr/dt-bindings/adc/mcux-lpadc.h>
8
+
9
+ / {
10
+ zephyr,user {
11
+ io-channels = <&lpadc0 0>, <&lpadc0 1>;
12
+ };
13
+ };
14
+
15
+ &lpadc0 {
16
+ #address-cells = <1>;
17
+ #size-cells = <0>;
18
+
19
+ channel@0 {
20
+ reg = <0>;
21
+ zephyr,gain = "ADC_GAIN_1";
22
+ zephyr,reference = "ADC_REF_EXTERNAL0";
23
+ zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
24
+ zephyr,resolution = <12>;
25
+ zephyr,input-positive = <MCUX_LPADC_CH0A>;
26
+ };
27
+
28
+ channel@1 {
29
+ reg = <1>;
30
+ zephyr,gain = "ADC_GAIN_1";
31
+ zephyr,reference = "ADC_REF_EXTERNAL0";
32
+ zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
33
+ zephyr,resolution = <12>;
34
+ zephyr,input-positive = <MCUX_LPADC_CH1A>;
35
+ };
36
+ };
You can’t perform that action at this time.
0 commit comments