Skip to content

Commit

Permalink
samples: adc: Enable ADC samples for frdm_mcxc242 board
Browse files Browse the repository at this point in the history
Enable ADC samples for frdm_mcxc242 board.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
  • Loading branch information
michal-smola authored and henrikbrixandersen committed Sep 30, 2024
1 parent 568606f commit ff01648
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 0 deletions.
1 change: 1 addition & 0 deletions samples/drivers/adc/adc_dt/boards/frdm_mcxc242.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_ADC_MCUX_ADC16_VREF_ALTERNATE=y
26 changes: 26 additions & 0 deletions samples/drivers/adc/adc_dt/boards/frdm_mcxc242.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2024 NXP
*/

/ {
zephyr,user {
/* adjust channel number according to pinmux in board.dts */
io-channels = <&adc0 1>;
};
};

&adc0 {
#address-cells = <1>;
#size-cells = <0>;

channel@1 {
reg = <1>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_VDD_1";
zephyr,vref-mv = <3300>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};
};
1 change: 1 addition & 0 deletions samples/drivers/adc/adc_dt/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ tests:
- longan_nano/gd32vf103/lite
- rd_rw612_bga
- frdm_mcxn947/mcxn947/cpu0
- frdm_mcxc242
- ucans32k1sic
integration_platforms:
- nucleo_l073rz
Expand Down
1 change: 1 addition & 0 deletions samples/drivers/adc/adc_sequence/boards/frdm_mcxc242.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_ADC_MCUX_ADC16_VREF_ALTERNATE=y
25 changes: 25 additions & 0 deletions samples/drivers/adc/adc_sequence/boards/frdm_mcxc242.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2024 NXP
*/

/ {
aliases {
adc0 = &adc0;
};
};

&adc0 {
#address-cells = <1>;
#size-cells = <0>;

channel@1 {
reg = <1>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_VDD_1";
zephyr,vref-mv = <3300>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};
};
1 change: 1 addition & 0 deletions samples/drivers/adc/adc_sequence/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tests:
- nrf54l15dk/nrf54l15/cpuapp
- nrf54h20dk/nrf54h20/cpuapp
- ucans32k1sic
- frdm_mcxc242
integration_platforms:
- nrf52840dk/nrf52840
harness: console
Expand Down

0 comments on commit ff01648

Please sign in to comment.