Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion drivers/spi/spi_ll_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,14 @@ static int spi_stm32_half_duplex_switch_to_receive(const struct spi_stm32_config
if (LL_SPI_GetMode(spi) == LL_SPI_MODE_MASTER) {
LL_SPI_StartMasterTransfer(spi);
while (!LL_SPI_IsActiveMasterTransfer(spi)) {
/* NOP */
/*
* Check for the race condition where the transfer completes
* before this loop is entered. If EOT is set, the transfer
* is done and we can break.
*/
if (LL_SPI_IsActiveFlag_EOT(spi)) {
break;
}
}
}
#endif /* DT_HAS_COMPAT_STATUS_OKAY(st_stm32h7_spi) */
Expand Down