SPI slave driver, last 4 Bytes missing (using DMA)
-
- Posts: 9711
- Joined: Thu Nov 26, 2015 4:08 am
Re: SPI slave driver, last 4 Bytes missing (using DMA)
Not that I know. You may be able to use the non-DMA mode up to a point, but that only works up to a limited amount of bytes...
Re: SPI slave driver, last 4 Bytes missing (using DMA)
The non-DMA mode (just using the internal buffer of the ESP32) unfortunately is not a solution for me because I need to receive up to 114 bytes and the internal buffer of the ESP32 is only 32 bytes.
I am wondering if it might be possible to activate an interrupt instead of a DMA transaction. In order to check this I was studying the spi_slave.c driver sources. But for me it is not clear how the HW of the SSI works in detail. Is there some deeper description as given in the ESP32 Technical Refernce Manual?
I am wondering if it might be possible to activate an interrupt instead of a DMA transaction. In order to check this I was studying the spi_slave.c driver sources. But for me it is not clear how the HW of the SSI works in detail. Is there some deeper description as given in the ESP32 Technical Refernce Manual?
"Whoever believes to be someone has stopped becoming someone"
Sokrates
Sokrates
Re: SPI slave driver, last 4 Bytes missing (using DMA)
@ESP_sprite : do you know if there will be a new silicon version of the ESP32 with this issue fixed or at least a workaround in ESP-IDF? If not I will need to switch to a different chip because a SPI slave interface suitable for an arbitrary number of incoming data bytes is mandatory for my project.
"Whoever believes to be someone has stopped becoming someone"
Sokrates
Sokrates
-
- Posts: 9711
- Joined: Thu Nov 26, 2015 4:08 am
Re: SPI slave driver, last 4 Bytes missing (using DMA)
We are working on new silicon, and we're very much aware that the SPI in the ESP32 is not perfect... we're trying as hard as we can to get the most common idiosyncracies in the current SPI peripheral out of the design, and I'd imagine this is one of them.
Re: SPI slave driver, last 4 Bytes missing (using DMA)
@ESP_sprite : Is there a schedule when the new silicon is available? Will it be just a new step of the ESP32 or will it be a feature enhanced version of the ESP32?
"Whoever believes to be someone has stopped becoming someone"
Sokrates
Sokrates
Re: SPI slave driver, last 4 Bytes missing (using DMA)
I am also encountering this issue, and I verified with a signal analyzer on the ESP32 side that the /cs signal goes high well after the clock is done and the transaction is finished. Yet, the last four bytes are still missing. https://github.com/espressif/esp-idf/is ... -456285033ESP_Sprite wrote: ↑Sat Jan 12, 2019 5:24 amAs I said before, for people who run into issues like this: check your /cs signal. The SPI slave logic assumes the /cs signal goes high after the transaction is finished. If for whatever reason (clock slew, difference in wire length, whatever) the ESP32 sees the /cs signal going high before the transaction is done, it aborts the transaction in a weird way that can cause the last 4 bytes to get corrupted or not written.
Who is online
Users browsing this forum: No registered users and 23 guests