Skip to content

Commit f34c785

Browse files
mmahadevan108nashif
authored andcommitted
samples: adc_dt: Add overlay for the QSPI variant of FRDM-MCXN947
Add overlay for the QSPI variant of FRDM-MCXN947 Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent bc5c075 commit f34c785

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

boards/nxp/frdm_mcxn947/frdm_mcxn947_mcxn947_cpu0_qspi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ supported:
2626
- counter
2727
- sdhc
2828
- regulator
29+
- adc
2930
- usb_device
3031
vendor: nxp
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 2024 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/adc/adc.h>
8+
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>
9+
10+
/ {
11+
zephyr,user {
12+
/* adjust channel number according to pinmux in board.dts */
13+
io-channels = <&lpadc0 0>, <&lpadc0 1>;
14+
};
15+
};
16+
17+
&lpadc0 {
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
21+
/*
22+
* To use this sample:
23+
* LPADC0 CH1A and CH1B are set up in differential mode (B-A)
24+
* - Connect LPADC0 CH1A signal to voltage between 0~1.8V (J8 pin 20)
25+
* - Connect LPADC0 CH1B signal to voltage between 0~1.8V (J8 pin 24)
26+
* LPADC0 CH2A is set up in single ended mode
27+
* - Connect LPADC0 CH2A signal to voltage between 0~1.8V (J8 pin 28)
28+
*/
29+
30+
channel@0 {
31+
reg = <0>;
32+
zephyr,gain = "ADC_GAIN_1";
33+
zephyr,reference = "ADC_REF_EXTERNAL1";
34+
zephyr,vref-mv = <1800>;
35+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
36+
zephyr,resolution = <13>;
37+
zephyr,input-positive = <MCUX_LPADC_CH1B>;
38+
zephyr,input-negative = <MCUX_LPADC_CH1A>;
39+
};
40+
41+
channel@1 {
42+
reg = <1>;
43+
zephyr,gain = "ADC_GAIN_1";
44+
zephyr,reference = "ADC_REF_EXTERNAL1";
45+
zephyr,vref-mv = <1800>;
46+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
47+
zephyr,resolution = <12>;
48+
zephyr,input-positive = <MCUX_LPADC_CH2A>;
49+
};
50+
};

0 commit comments

Comments
 (0)