Skip to content
Snippets Groups Projects
Commit bbb65432 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

STM32 SPI: Disable SPI before modifying CR1

parent 26777e91
No related branches found
No related tags found
No related merge requests found
......@@ -1110,7 +1110,9 @@ static void spi_setmode(FAR struct spi_dev_s *dev, enum spi_mode_e mode)
return;
}
spi_modifycr1(priv, 0, SPI_CR1_SPE);
spi_modifycr1(priv, setbits, clrbits);
spi_modifycr1(priv, SPI_CR1_SPE, 0);
/* Save the mode so that subsequent re-configurations will be faster */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment