hi
now we are implemented SPI poling in ESP32-S2-WROOM module. But now I need to implement SPI DMA for Transmit and receive .
is ESP32-S2-WROOM module supports SPI DMA ?
actually we searched in github, I find SPI DMA stack but in that no DMA related functions.
thank you
srikanth
SPI DMA in ESP32-S2-WROOM
-
- Posts: 4574
- Joined: Thu Nov 26, 2015 4:08 am
Re: SPI DMA in ESP32-S2-WROOM
Given that you're using the ESP-IDF SPI driver and assign a DMA channel to the host driver when initializing it, you're already using DMA. The driver will use DMA for data transfers automatically.
-
- Posts: 2
- Joined: Sun Jul 26, 2020 8:09 am
Re: SPI DMA in ESP32-S2-WROOM
thanks for reply.
Actually we are using the code which is present in the link.
link: https://github.com/hideakitai/ESP32DMASPI
In example i am not seen any interrupt routine for checking Transmit complete and Receive Complete. please let me know if any other examples are there for SPI DMA implementation.
thanks in advance
srikanth
Actually we are using the code which is present in the link.
link: https://github.com/hideakitai/ESP32DMASPI
In example i am not seen any interrupt routine for checking Transmit complete and Receive Complete. please let me know if any other examples are there for SPI DMA implementation.
thanks in advance
srikanth
Re: SPI DMA in ESP32-S2-WROOM
Keep in mind that DMA can be counter productive for small transfers. One of my SPI channels is a cheap MPC2515 and that is a very chatty device with between 3 and 8 byte transfers. Latency & setup really kill that through put. On the short transfers I measured that no DMA was faster. Basically the SPI FIFO can handle it, you only get the ISR on CS, you don't get hit by SPI full. DMA adds a setup time to the transaction & if not needed then why spend time configuring those register? Clearly longer transfers (which bust the SPI FIFO) would benefit.
& I also believe that IDF CAN should be fixed.
Re: SPI DMA in ESP32-S2-WROOM
i'm new to the community and esp32 can i get a simple spi loopback example code for esp32
Who is online
Users browsing this forum: No registered users and 36 guests