tests: drivers: adc: adc_dma: add nucleo_u575zi_q

Add the nucleo_u575zi_q board to the ADC DMA tests.

Signed-off-by: Brett Witherspoon <brett@witherspoon.engineering>
This commit is contained in:
Brett Witherspoon 2023-06-26 22:23:59 -04:00 committed by Carles Cufí
commit 3bb5062fae
4 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,8 @@
#
# Copyright (c) 2023 Brett Witherspoon
#
# SPDX-License-Identifier: Apache-2.0
#
CONFIG_ADC_STM32_DMA=y
CONFIG_ADC_ASYNC=y

View file

@ -0,0 +1,26 @@
/*
* Copyright (c) 2023 Brett Witherspoon
*
* SPDX-License-Identifier: Apache-2.0
*/
&adc1 {
dmas = <&gpdma1 0 0 (STM32_DMA_PERIPH_TO_MEMORY |
STM32_DMA_MEM_INC | STM32_DMA_MEM_16BITS | STM32_DMA_PERIPH_16BITS) >;
dma-names = "dmamux";
#address-cells = <1>;
#size-cells = <0>;
channel@1 {
reg = <1>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,resolution = <12>;
};
};
test_dma: &gpdma1 {
status = "okay";
};

View file

@ -50,6 +50,17 @@
#define ALIGNMENT 32 #define ALIGNMENT 32
#define BUFFER_MEM_REGION __attribute__((__section__("SRAM4.dma"))) #define BUFFER_MEM_REGION __attribute__((__section__("SRAM4.dma")))
#elif defined(CONFIG_BOARD_NUCLEO_U575ZI_Q)
#define ADC_DEVICE_NODE DT_INST(0, st_stm32_adc)
#define ADC_RESOLUTION 12
#define ADC_GAIN ADC_GAIN_1
#define ADC_REFERENCE ADC_REF_INTERNAL
#define ADC_ACQUISITION_TIME ADC_ACQ_TIME_DEFAULT
#define ADC_1ST_CHANNEL_ID 1
#define ADC_2ND_CHANNEL_ID 7
#define ALIGNMENT 32
#endif #endif
/* Invalid value that is not supposed to be written by the driver. It is used /* Invalid value that is not supposed to be written by the driver. It is used

View file

@ -12,5 +12,6 @@ tests:
- frdm_k82f - frdm_k82f
- frdm_k64f - frdm_k64f
- nucleo_h743zi - nucleo_h743zi
- nucleo_u575zi_q
integration_platforms: integration_platforms:
- frdm_k82f - frdm_k82f