Skip to content

Commit

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

Signed-off-by: Michal Smola <[email protected]>
  • Loading branch information
michal-smola authored and henrikbrixandersen committed Sep 30, 2024
1 parent ff01648 commit f810e13
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_ADC_MCUX_ADC16_VREF_ALTERNATE=y
28 changes: 28 additions & 0 deletions tests/drivers/adc/adc_accuracy_test/boards/frdm_mcxc242.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2024 NXP
*/

/* Please connect voltage reference to J6.AN pin to run the test. */

/ {
zephyr,user {
io-channels = <&adc0 1>;
reference_mv = <1650>;
};
};

&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 tests/drivers/adc/adc_accuracy_test/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ tests:
platform_allow:
- frdm_kl25z
- ek_ra8m1
- frdm_mcxc242
1 change: 1 addition & 0 deletions tests/drivers/adc/adc_api/boards/frdm_mcxc242.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_ADC_MCUX_ADC16_VREF_ALTERNATE=y
34 changes: 34 additions & 0 deletions tests/drivers/adc/adc_api/boards/frdm_mcxc242.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2024 NXP
*/

/ {
zephyr,user {
io-channels = <&adc0 0>, <&adc0 1>;
};
};

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

channel@0 {
reg = <0>;
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>;
};

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>;
};
};

0 comments on commit f810e13

Please sign in to comment.