From 7e46dc94aa5d6bad9ff7e449878f64938b2437f1 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 9 Jan 2018 15:39:54 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11242 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- .../STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.c | 20 ++++++++++++++++++-- .../STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.h | 1 + 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144') diff --git a/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.c b/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.c index 152b669e8..42caab502 100644 --- a/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.c +++ b/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.c @@ -34,10 +34,25 @@ /* Module exported variables. */ /*===========================================================================*/ +void spi_circular_cb(SPIDriver *spip); + +/* + * Circular SPI configuration (25MHz, CPHA=0, CPOL=0, MSb first). + */ +const SPIConfig c_spicfg = { + true, + spi_circular_cb, + GPIOD, + GPIOD_SPI1_NSS, + SPI_CFG1_MBR_DIV8 | SPI_CFG1_DSIZE_VALUE(7), + 0 +}; + /* - * Maximum speed SPI configuration (21MHz, CPHA=0, CPOL=0, MSb first). + * Maximum speed SPI configuration (25MHz, CPHA=0, CPOL=0, MSb first). */ const SPIConfig hs_spicfg = { + false, NULL, GPIOD, GPIOD_SPI1_NSS, @@ -46,9 +61,10 @@ const SPIConfig hs_spicfg = { }; /* - * Low speed SPI configuration (328.125kHz, CPHA=0, CPOL=0, MSb first). + * Low speed SPI configuration (1.5625MHz, CPHA=0, CPOL=0, MSb first). */ const SPIConfig ls_spicfg = { + false, NULL, GPIOD, GPIOD_SPI1_NSS, diff --git a/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.h b/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.h index 901638a7f..b36241ad9 100644 --- a/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.h +++ b/testhal/STM32/multi/SPI/cfg-stm32h743_nucleo144/portab.h @@ -57,6 +57,7 @@ /* External declarations. */ /*===========================================================================*/ +extern const SPIConfig c_spicfg; extern const SPIConfig hs_spicfg; extern const SPIConfig ls_spicfg; -- cgit v1.2.3