Skip to content

Commit ff01648

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

File tree

6 files changed

+55
-0
lines changed

6 files changed

+55
-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: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright 2024 NXP
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
/* adjust channel number according to pinmux in board.dts */
10+
io-channels = <&adc0 1>;
11+
};
12+
};
13+
14+
&adc0 {
15+
#address-cells = <1>;
16+
#size-cells = <0>;
17+
18+
channel@1 {
19+
reg = <1>;
20+
zephyr,gain = "ADC_GAIN_1";
21+
zephyr,reference = "ADC_REF_VDD_1";
22+
zephyr,vref-mv = <3300>;
23+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
24+
zephyr,resolution = <12>;
25+
};
26+
};

samples/drivers/adc/adc_dt/sample.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ tests:
3333
- longan_nano/gd32vf103/lite
3434
- rd_rw612_bga
3535
- frdm_mcxn947/mcxn947/cpu0
36+
- frdm_mcxc242
3637
- ucans32k1sic
3738
integration_platforms:
3839
- nucleo_l073rz
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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright 2024 NXP
5+
*/
6+
7+
/ {
8+
aliases {
9+
adc0 = &adc0;
10+
};
11+
};
12+
13+
&adc0 {
14+
#address-cells = <1>;
15+
#size-cells = <0>;
16+
17+
channel@1 {
18+
reg = <1>;
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+
};

samples/drivers/adc/adc_sequence/sample.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ tests:
1212
- nrf54l15dk/nrf54l15/cpuapp
1313
- nrf54h20dk/nrf54h20/cpuapp
1414
- ucans32k1sic
15+
- frdm_mcxc242
1516
integration_platforms:
1617
- nrf52840dk/nrf52840
1718
harness: console

0 commit comments

Comments
 (0)