tests: spi: add nucleo_g431rb to spi_loopback test in async mode

Add nucleo_g431rb to spi_loopback test using spi async configuration.
Such that tests do not only run with syncronous spi configuration
(nucleo_g474re), but also with the asyncronous configuration.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This commit is contained in:
Thomas Stranger 2021-04-14 14:57:30 +02:00 committed by Kumar Gala
commit 3c87b7acaa
2 changed files with 35 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=y
CONFIG_SPI_LOOPBACK_MODE_LOOP=n

View file

@ -0,0 +1,27 @@
/*
* Copyright (c) 2021 Thomas Stranger
*
* SPDX-License-Identifier: Apache-2.0
*/
&spi1 {
dmas = <&dmamux1 0 11 0x20440 0
&dmamux1 1 10 0x20480 0>;
dma-names = "tx", "rx";
};
&dma1 {
status = "okay";
};
&dmamux1 {
status = "okay";
};
&rcc {
/*
* Reduce bus clock speed to be able to reach
* SPI_LOOPBACK_SLOW_FREQ = 500000 with max prescaler 256
*/
apb2-prescaler = <2>;
};