Skip to content

Commit 3ae7483

Browse files
committed
library: spi: set MasterKeepIOState to avoid glitches
Recommanded setting. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 8569eac commit 3ae7483

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/SPI/src/utility/spi_com.c

+3
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,9 @@ void spi_init(spi_t *obj, uint32_t speed, spi_mode_e mode, uint8_t msb)
288288
defined(STM32WBxx) || defined(STM32MP1xx)
289289
handle->Init.NSSPMode = SPI_NSS_PULSE_DISABLE;
290290
#endif
291+
#ifdef SPI_MASTER_KEEP_IO_STATE_ENABLE
292+
handle->Init.MasterKeepIOState = SPI_MASTER_KEEP_IO_STATE_ENABLE; /* Recommanded setting to avoid glitches */
293+
#endif
291294

292295
/* Configure SPI GPIO pins */
293296
pinmap_pinout(obj->pin_mosi, PinMap_SPI_MOSI);

0 commit comments

Comments
 (0)