From 880e96d7bb51e32a04850a769797f568a993e330 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Nihei Date: Tue, 1 Jun 2021 10:28:16 -0300 Subject: [PATCH] spi: Ensure DMA In-Link EOF is generated by trans_done on SPI Slave --- components/hal/esp32c3/include/hal/spi_ll.h | 2 ++ components/hal/esp32s2/include/hal/spi_ll.h | 3 +++ components/hal/esp32s3/include/hal/spi_ll.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/components/hal/esp32c3/include/hal/spi_ll.h b/components/hal/esp32c3/include/hal/spi_ll.h index 9577ecaf23..8cc72b9b6d 100644 --- a/components/hal/esp32c3/include/hal/spi_ll.h +++ b/components/hal/esp32c3/include/hal/spi_ll.h @@ -136,6 +136,8 @@ static inline void spi_ll_slave_init(spi_dev_t *hw) hw->user.usr_miso_highpart = 0; hw->user.usr_mosi_highpart = 0; + // Configure DMA In-Link to not be terminated when transaction bit counter exceeds + hw->dma_conf.rx_eof_en = 0; hw->dma_conf.dma_seg_trans_en = 0; //Disable unneeded ints diff --git a/components/hal/esp32s2/include/hal/spi_ll.h b/components/hal/esp32s2/include/hal/spi_ll.h index 02f111bb11..8571adb7c4 100644 --- a/components/hal/esp32s2/include/hal/spi_ll.h +++ b/components/hal/esp32s2/include/hal/spi_ll.h @@ -137,6 +137,9 @@ static inline void spi_ll_slave_init(spi_dev_t *hw) hw->user.usr_miso_highpart = 0; hw->user.usr_mosi_highpart = 0; + // Configure DMA In-Link to not be terminated when transaction bit counter exceeds + hw->dma_conf.rx_eof_en = 0; + //Disable unneeded ints hw->slave.val &= ~SPI_LL_UNUSED_INT_MASK; } diff --git a/components/hal/esp32s3/include/hal/spi_ll.h b/components/hal/esp32s3/include/hal/spi_ll.h index c842aae549..3cdac824c6 100644 --- a/components/hal/esp32s3/include/hal/spi_ll.h +++ b/components/hal/esp32s3/include/hal/spi_ll.h @@ -135,6 +135,8 @@ static inline void spi_ll_slave_init(spi_dev_t *hw) hw->user.usr_miso_highpart = 0; hw->user.usr_mosi_highpart = 0; + // Configure DMA In-Link to not be terminated when transaction bit counter exceeds + hw->dma_conf.rx_eof_en = 0; hw->dma_conf.dma_seg_trans_en = 0; //Disable unneeded ints