From bbf79b73e687cf46a9178de110eb6b14a6ff49b0 Mon Sep 17 00:00:00 2001 From: Carlo Parata Date: Tue, 31 Oct 2017 14:43:45 +0100 Subject: [PATCH] Add the SPI Fix only for F0, F3, F7 and L4 platforms --- cores/arduino/stm32/spi_com.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cores/arduino/stm32/spi_com.c b/cores/arduino/stm32/spi_com.c index f43b52ca31..2093e4bb48 100644 --- a/cores/arduino/stm32/spi_com.c +++ b/cores/arduino/stm32/spi_com.c @@ -269,6 +269,9 @@ void spi_init(spi_t *obj, uint32_t speed, spi_mode_e mode, uint8_t msb) } handle->Init.TIMode = SPI_TIMODE_DISABLE; +#if defined(STM32F0xx) || defined(STM32F3xx) || defined(STM32F7xx) || defined(STM32L4xx) + handle->Init.NSSPMode = SPI_NSS_PULSE_DISABLE; +#endif if(obj->pin_mosi != NC) { port = set_GPIO_Port_Clock(STM_PORT(obj->pin_mosi));