Skip to content

Commit f810e13

Browse files
michal-smolahenrikbrixandersen
authored andcommitted
tests: adc: Enable ADC tests for frdm_mcxc242 board
Enable ADC tests for frdm_mcxc242 board. Signed-off-by: Michal Smola <[email protected]>
1 parent ff01648 commit f810e13

File tree

5 files changed

+65
-0
lines changed

5 files changed

+65
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ADC_MCUX_ADC16_VREF_ALTERNATE=y
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 2024 NXP
5+
*/
6+
7+
/* Please connect voltage reference to J6.AN pin to run the test. */
8+
9+
/ {
10+
zephyr,user {
11+
io-channels = <&adc0 1>;
12+
reference_mv = <1650>;
13+
};
14+
};
15+
16+
&adc0 {
17+
#address-cells = <1>;
18+
#size-cells = <0>;
19+
20+
channel@1 {
21+
reg = <1>;
22+
zephyr,gain = "ADC_GAIN_1";
23+
zephyr,reference = "ADC_REF_VDD_1";
24+
zephyr,vref-mv = <3300>;
25+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
26+
zephyr,resolution = <12>;
27+
};
28+
};

tests/drivers/adc/adc_accuracy_test/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ tests:
1919
platform_allow:
2020
- frdm_kl25z
2121
- ek_ra8m1
22+
- frdm_mcxc242
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ADC_MCUX_ADC16_VREF_ALTERNATE=y
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright 2024 NXP
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
io-channels = <&adc0 0>, <&adc0 1>;
10+
};
11+
};
12+
13+
&adc0 {
14+
#address-cells = <1>;
15+
#size-cells = <0>;
16+
17+
channel@0 {
18+
reg = <0>;
19+
zephyr,gain = "ADC_GAIN_1";
20+
zephyr,reference = "ADC_REF_VDD_1";
21+
zephyr,vref-mv = <3300>;
22+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
23+
zephyr,resolution = <12>;
24+
};
25+
26+
channel@1 {
27+
reg = <1>;
28+
zephyr,gain = "ADC_GAIN_1";
29+
zephyr,reference = "ADC_REF_VDD_1";
30+
zephyr,vref-mv = <3300>;
31+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
32+
zephyr,resolution = <12>;
33+
};
34+
};

0 commit comments

Comments
 (0)