This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new f375093a257 arch/esp32s3/spi: make sure spi don't send wrong bytes 
when dma is enabled
f375093a257 is described below

commit f375093a257eabe4d948f2c85c57462b2e847714
Author: nope <[email protected]>
AuthorDate: Fri Jan 30 11:05:24 2026 +0800

    arch/esp32s3/spi: make sure spi don't send wrong bytes when dma is enabled
    
    SPI transmits incorrect bytes when DMA is enabled and `txbuffer` of
    `esp32s3_spi_dma_exchange()` is NULL, causing mounted FAT32 SD cards
    to fail with -ENODEV during read operations.
    
    Signed-off-by: liu <[email protected]>
---
 arch/xtensa/src/esp32s3/esp32s3_spi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/xtensa/src/esp32s3/esp32s3_spi.c 
b/arch/xtensa/src/esp32s3/esp32s3_spi.c
index dbaf913e161..a509617add9 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_spi.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_spi.c
@@ -893,6 +893,7 @@ static void esp32s3_spi_dma_exchange(struct 
esp32s3_spi_priv_s *priv,
   if (tp == NULL)
     {
       tp = rp;
+      memset(tp, 0, bytes);
     }
 
   esp32s3_spi_set_regbits(SPI_DMA_INT_CLR_REG(priv->config->id),

Reply via email to