From 4bc9e1812449297f91c1fa48dca6d4ca142ba058 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 c3a66e23a5..cf773da678 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 733022f8c0..16cf0b99eb 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 57099df19b..8c85823b4e 100644 --- a/components/hal/esp32s3/include/hal/spi_ll.h +++ b/components/hal/esp32s3/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