Skip to content

Commit

Permalink
tests: drivers: adc: adc_api: update adc_api test
Browse files Browse the repository at this point in the history
-add nucleo_u083rc and stm32u083c_dk overlays files
for testbench purpose.
- add platform_exclude property to skip test on boards
with little ram size.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>

tests: drivers: adc: adc_api: update adc_api test
  • Loading branch information
djiatsaf-st authored and fabiobaltieri committed Sep 27, 2024
1 parent bfa6c32 commit 31d24eb
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/drivers/adc/adc_api/boards/nucleo_u083rc.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2024 STMicroelectronics
*/

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

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

channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};

channel@1 {
reg = <1>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};
};
33 changes: 33 additions & 0 deletions tests/drivers/adc/adc_api/boards/stm32u083c_dk.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2024 STMicroelectronics
*/

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

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

channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
zephyr,resolution = <12>;
};

channel@1 {
reg = <1>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
zephyr,resolution = <12>;
};
};
4 changes: 4 additions & 0 deletions tests/drivers/adc/adc_api/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ tests:
drivers.adc:
depends_on: adc
min_flash: 40
platform_exclude:
- nucleo_u031r8
drivers.adc.b_u585i_iot02a_adc4:
extra_args:
- DTC_OVERLAY_FILE="boards/b_u585i_iot02a_adc4.overlay"
Expand All @@ -33,12 +35,14 @@ tests:
- nucleo_l073rz
- nucleo_l152re
- nucleo_l476rg
- nucleo_u083rc
- nucleo_u575zi_q
- nucleo_wb55rg
- nucleo_wba52cg
- nucleo_wl55jc
- stm32f3_disco
- stm32h573i_dk
- stm32u083c_dk
drivers.adc.dma_nxp_kinetis:
extra_args:
- OVERLAY_CONFIG="overlay-dma-kinetis.conf"
Expand Down

0 comments on commit 31d24eb

Please sign in to comment.