tests: drivers: adc: adc_api: boards: add sequence for b_u585i_iot02a

Add multiple channels in overlay to test the sequencer for ADC4.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
Guillaume Gautier 2023-09-08 10:30:55 +02:00 committed by Carles Cufí
commit 47d1dcda4e
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,38 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2023 STMicroelectronics
*/
/ {
zephyr,user {
/* adjust channel number according to pinmux in board.dts */
io-channels = <&adc4 18>, <&adc4 19>;
};
};
&adc4 {
pinctrl-0 = <&adc4_in18_pb0 &adc4_in19_pb1>;
#address-cells = <1>;
#size-cells = <0>;
channel@12 {
reg = <18>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
zephyr,resolution = <12>;
};
channel@13 {
reg = <19>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
zephyr,resolution = <12>;
};
};
&adc1 {
status = "disabled";
};

View file

@ -7,3 +7,8 @@ tests:
drivers.adc:
depends_on: adc
min_flash: 40
drivers.adc.b_u585i_iot02a_adc4:
extra_args:
DTC_OVERLAY_FILE="boards/b_u585i_iot02a_adc4.overlay"
platform_allow:
- b_u585i_iot02a