diff --git a/drivers/spi/spi_ll_stm32.c b/drivers/spi/spi_ll_stm32.c index 5d56ab106b1..f6e6bf7c176 100644 --- a/drivers/spi/spi_ll_stm32.c +++ b/drivers/spi/spi_ll_stm32.c @@ -1186,6 +1186,13 @@ static int transceive_dma(const struct device *dev, /* This is turned off in spi_stm32_complete(). */ spi_stm32_cs_control(dev, true); + uint8_t word_size_bytes = bits2bytes(SPI_WORD_SIZE_GET(config->operation)); + + data->dma_rx.dma_cfg.source_data_size = word_size_bytes; + data->dma_rx.dma_cfg.dest_data_size = word_size_bytes; + data->dma_tx.dma_cfg.source_data_size = word_size_bytes; + data->dma_tx.dma_cfg.dest_data_size = word_size_bytes; + while (data->ctx.rx_len > 0 || data->ctx.tx_len > 0) { size_t dma_len;