diff --git a/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/mcuconf.h b/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/mcuconf.h index e5a11f7525..f8e9944e0e 100644 --- a/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/mcuconf.h +++ b/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/nanoCLR/mcuconf.h @@ -261,7 +261,7 @@ #define STM32_SPI_USE_SPI1 FALSE #define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_USE_SPI4 FALSE +#define STM32_SPI_USE_SPI4 TRUE #define STM32_SPI_USE_SPI5 TRUE #define STM32_SPI_USE_SPI6 FALSE #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) diff --git a/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/target_windows_devices_spi_config.cpp b/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/target_windows_devices_spi_config.cpp index 82c421f8c7..67d4b401a0 100644 --- a/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/target_windows_devices_spi_config.cpp +++ b/targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/target_windows_devices_spi_config.cpp @@ -5,6 +5,18 @@ #include "win_dev_spi_native_target.h" +////////// +// SPI4 // +////////// + +// pin configuration for SPI4 +// port for SCK pin is: LINE_SPI4_SCK (=PE2) +// port for MISO pin is: LINE_SPI4_MISO (=PE5) +// port for MOSI pin is: LINE_SPI4_MOSI (=PE6) + +// GPIO alternate pin function is 5 (see alternate function mapping table in device datasheet) +SPI_CONFIG_PINS(4, GPIOE, 2, GPIOE, 5, GPIOE, 6, 5) + ////////// // SPI5 // //////////