Skip to content

Commit 687ae28

Browse files
RSATomdexter93
authored andcommitted
sn32: spi: fixed Auto-SEL disable
if mode other than SPI_SELECT_MODE_LLD
1 parent aaf5977 commit 687ae28

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

os/hal/ports/SN32/LLD/SN32F2xx/SPI/hal_spi_v2_lld.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,7 @@ static void spi_lld_configure(SPIDriver *spip) {
6363

6464
spip->spi->CTRL0 |= (spip->config->slave << 3);
6565
spip->spi->CTRL0_b.SDODIS = false;
66-
67-
#if SPI_SELECT_MODE == SPI_SELECT_MODE_LLD
68-
// Use hardware Auto-SEL
69-
spip->spi->CTRL0_b.SELDIS = false;
70-
#endif
66+
spip->spi->CTRL0_b.SELDIS = SPI_SELECT_MODE != SPI_SELECT_MODE_LLD;
7167

7268
uint32_t sn32_spi_clock = (SN32_HCLK / ((2 * spip->config->clkdiv) + 2));
7369
if (sn32_spi_clock > 6000000) {

0 commit comments

Comments
 (0)