diff options
Diffstat (limited to 'chip/stm32/spi.c')
-rw-r--r-- | chip/stm32/spi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chip/stm32/spi.c b/chip/stm32/spi.c index d8c88ba34f..21984618be 100644 --- a/chip/stm32/spi.c +++ b/chip/stm32/spi.c @@ -9,6 +9,7 @@ */ #include "chipset.h" +#include "clock.h" #include "console.h" #include "dma.h" #include "gpio.h" @@ -630,6 +631,9 @@ static void spi_init(void) /* Enable clocks to SPI1 module */ STM32_RCC_APB2ENR |= STM32_RCC_PB2_SPI1; + /* Delay 1 APB clock cycle after the clock is enabled */ + clock_wait_bus_cycles(BUS_APB, 1); + /* * Enable rx/tx DMA and get ready to receive our first transaction and * "disable" FIFO by setting event to happen after only 1 byte |