From 0473cf5bb0051a217993f0179c47f4b15a6acf20 Mon Sep 17 00:00:00 2001 From: Guillaume Gautier Date: Thu, 22 Jun 2023 11:54:19 +0200 Subject: [PATCH] tests: drivers: adc: adc_api: boards: add sequence for nucleo g071rb Add multiple channels in overlay to test the sequencer. Change clock source to correctly pass the test. Signed-off-by: Guillaume Gautier --- boards/arm/nucleo_g071rb/nucleo_g071rb.dts | 2 +- .../drivers/adc/adc_api/boards/nucleo_g071rb.overlay | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/boards/arm/nucleo_g071rb/nucleo_g071rb.dts b/boards/arm/nucleo_g071rb/nucleo_g071rb.dts index c9f1a2b6575..76b2369280e 100644 --- a/boards/arm/nucleo_g071rb/nucleo_g071rb.dts +++ b/boards/arm/nucleo_g071rb/nucleo_g071rb.dts @@ -140,7 +140,7 @@ &adc1 { pinctrl-0 = <&adc1_in0_pa0 &adc1_in1_pa1>; pinctrl-names = "default"; - st,adc-clock-source = ; + st,adc-clock-source = ; st,adc-prescaler = <4>; status = "okay"; vref-mv = <3300>; diff --git a/tests/drivers/adc/adc_api/boards/nucleo_g071rb.overlay b/tests/drivers/adc/adc_api/boards/nucleo_g071rb.overlay index f0d65c1e941..a40478a6ee1 100644 --- a/tests/drivers/adc/adc_api/boards/nucleo_g071rb.overlay +++ b/tests/drivers/adc/adc_api/boards/nucleo_g071rb.overlay @@ -7,7 +7,7 @@ / { zephyr,user { /* adjust channel number according to pinmux in board.dts */ - io-channels = <&adc1 0>; + io-channels = <&adc1 0>, <&adc1 1>; }; }; @@ -19,7 +19,15 @@ reg = <0>; zephyr,gain = "ADC_GAIN_1"; zephyr,reference = "ADC_REF_INTERNAL"; - zephyr,acquisition-time = ; + zephyr,acquisition-time = ; + zephyr,resolution = <12>; + }; + + channel@1 { + reg = <1>; + zephyr,gain = "ADC_GAIN_1"; + zephyr,reference = "ADC_REF_INTERNAL"; + zephyr,acquisition-time = ; zephyr,resolution = <12>; }; };