tests: drivers: spi loopback test running on the stm32l152re nucleo

add configuration for testing the spi through the dma1
on the nucleo_l152re target. This test requires the MOSI pin
to be connected to the MISO pin on the board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2021-06-18 17:06:06 +02:00 committed by Carles Cufí
commit d36cdd5a27
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,8 @@
CONFIG_SPI_LOOPBACK_DRV_NAME="SPI_1"
CONFIG_SPI_STM32_DMA=y
CONFIG_SPI_STM32_INTERRUPT=n
CONFIG_SPI_ASYNC=n
CONFIG_SPI_LOOPBACK_MODE_LOOP=n

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2021 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
&spi1 {
pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5
&spi1_miso_pa6 &spi1_mosi_pa7>;
dmas = <&dma1 3 0x20440
&dma1 2 0x20480>;
dma-names = "tx", "rx";
status = "okay";
};
&dma1 {
status = "okay";
};