From 255a594300cb137be16f33a56a3fffaa94693f9c Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 16 Apr 2018 21:52:15 +0000 Subject: [PATCH] stm32: spi-v2: enable SSOE by default for the common case See also https://github.com/libopencm3/libopencm3/commit/f80bff213353b01166c995ade9080de105fb8867 This makes the v2 peripheral behave consistently with the v1 peripheral code, and more in line with users expectations. Fixes: https://github.com/libopencm3/libopencm3/issues/391 Fixes: https://github.com/libopencm3/libopencm3/issues/232 --- lib/stm32/common/spi_common_v2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/stm32/common/spi_common_v2.c b/lib/stm32/common/spi_common_v2.c index dfc591ee..2b0f90d2 100644 --- a/lib/stm32/common/spi_common_v2.c +++ b/lib/stm32/common/spi_common_v2.c @@ -87,8 +87,7 @@ int spi_init_master(uint32_t spi, uint32_t br, uint32_t cpol, uint32_t cpha, reg32 |= cpha; /* Set CPHA value. */ reg32 |= lsbfirst; /* Set frame format (LSB- or MSB-first). */ - /* TODO: NSS pin handling. */ - + SPI_CR2(spi) |= SPI_CR2_SSOE; /* common case */ SPI_CR1(spi) = reg32; return 0; /* TODO */