Skip to content

Commit c1daae6

Browse files
affrinpinhero-2356galak
authored andcommitted
driver/spi: STM32 Revert while loop on tx only
This commit reverted while loop on tx only. This commit solves SPI loopback failure and SPI wrong behaviour on RX. fix: * #35297 * #35539 Revert "drivers/spi: STM32: This solves SPI infinite loop on Tranceive" This reverts commit 50c2acb. Signed-off-by: Affrin Pinhero <[email protected]>
1 parent 3056c5e commit c1daae6

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

drivers/spi/spi_ll_stm32.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,8 @@ static void spi_stm32_shift_m(SPI_TypeDef *spi, struct spi_stm32_data *data)
294294
spi_context_update_tx(&data->ctx, 2, 1);
295295
}
296296

297-
if (data->ctx.rx_buf) {
298-
while (!ll_func_rx_is_not_empty(spi)) {
299-
/* NOP */
300-
}
301-
} else {
302-
while (!ll_func_tx_is_empty(spi)) {
303-
/* NOP */
304-
}
297+
while (!ll_func_rx_is_not_empty(spi)) {
298+
/* NOP */
305299
}
306300

307301
if (SPI_WORD_SIZE_GET(data->ctx.config->operation) == 8) {

0 commit comments

Comments
 (0)