Skip to content

Commit 2826c4e

Browse files
NeilChen93kartben
authored andcommitted
samples: drivers/adc: Support adc example for NXP frdm_mcxa153
Support adc example for NXP frdm_mcxa153 Signed-off-by: Neil Chen <[email protected]>
1 parent 2b168ad commit 2826c4e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright 2025 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>;
14+
};
15+
};
16+
17+
&lpadc0 {
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
21+
/*
22+
* To use this sample:
23+
* LPADC0 CH0A is set up in single ended mode
24+
* - Connect LPADC0 CH0A signal to voltage between 0~3.3V (J4 pin 8)
25+
*/
26+
27+
channel@0 {
28+
reg = <0>;
29+
zephyr,gain = "ADC_GAIN_1";
30+
zephyr,reference = "ADC_REF_EXTERNAL0";
31+
zephyr,vref-mv = <3300>;
32+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
33+
zephyr,resolution = <16>;
34+
zephyr,input-positive = <MCUX_LPADC_CH0A>;
35+
};
36+
};

0 commit comments

Comments
 (0)