Skip to content

Commit 31d24eb

Browse files
djiatsaf-stfabiobaltieri
authored andcommitted
tests: drivers: adc: adc_api: update adc_api test
-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 <[email protected]> tests: drivers: adc: adc_api: update adc_api test
1 parent bfa6c32 commit 31d24eb

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2024 STMicroelectronics
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
/* adjust channel number according to pinmux in board.dts */
10+
io-channels = <&adc1 0>, <&adc1 1>;
11+
};
12+
};
13+
14+
&adc1 {
15+
#address-cells = <1>;
16+
#size-cells = <0>;
17+
18+
channel@0 {
19+
reg = <0>;
20+
zephyr,gain = "ADC_GAIN_1";
21+
zephyr,reference = "ADC_REF_INTERNAL";
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_INTERNAL";
30+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
31+
zephyr,resolution = <12>;
32+
};
33+
};
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2024 STMicroelectronics
5+
*/
6+
7+
/ {
8+
zephyr,user {
9+
/* adjust channel number according to pinmux in board.dts */
10+
io-channels = <&adc1 0>, <&adc1 1>;
11+
};
12+
};
13+
14+
&adc1 {
15+
#address-cells = <1>;
16+
#size-cells = <0>;
17+
18+
channel@0 {
19+
reg = <0>;
20+
zephyr,gain = "ADC_GAIN_1";
21+
zephyr,reference = "ADC_REF_INTERNAL";
22+
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
23+
zephyr,resolution = <12>;
24+
};
25+
26+
channel@1 {
27+
reg = <1>;
28+
zephyr,gain = "ADC_GAIN_1";
29+
zephyr,reference = "ADC_REF_INTERNAL";
30+
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
31+
zephyr,resolution = <12>;
32+
};
33+
};

tests/drivers/adc/adc_api/testcase.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ tests:
77
drivers.adc:
88
depends_on: adc
99
min_flash: 40
10+
platform_exclude:
11+
- nucleo_u031r8
1012
drivers.adc.b_u585i_iot02a_adc4:
1113
extra_args:
1214
- DTC_OVERLAY_FILE="boards/b_u585i_iot02a_adc4.overlay"
@@ -33,12 +35,14 @@ tests:
3335
- nucleo_l073rz
3436
- nucleo_l152re
3537
- nucleo_l476rg
38+
- nucleo_u083rc
3639
- nucleo_u575zi_q
3740
- nucleo_wb55rg
3841
- nucleo_wba52cg
3942
- nucleo_wl55jc
4043
- stm32f3_disco
4144
- stm32h573i_dk
45+
- stm32u083c_dk
4246
drivers.adc.dma_nxp_kinetis:
4347
extra_args:
4448
- OVERLAY_CONFIG="overlay-dma-kinetis.conf"

0 commit comments

Comments
 (0)