STM32 SPI: Disable SPI before modifying CR1
This commit is contained in:
parent
26777e9145
commit
bbb65432d9
|
@ -1110,7 +1110,9 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spi_modifycr1(priv, 0, SPI_CR1_SPE);
|
||||||
spi_modifycr1(priv, setbits, clrbits);
|
spi_modifycr1(priv, setbits, clrbits);
|
||||||
|
spi_modifycr1(priv, SPI_CR1_SPE, 0);
|
||||||
|
|
||||||
/* Save the mode so that subsequent re-configurations will be faster */
|
/* Save the mode so that subsequent re-configurations will be faster */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue