Page 1 of 1

ESP32-S2 Saola: General SPI question

Posted: Wed Aug 04, 2021 8:25 pm
by Dadieter
Hello community,

I need your help! I am trying to setup the Saola dev board as little "SPI sniffer", so SPI funktionality is as slave.
I tried solutions in arduino with and without DMA, but it seems my issue has some relation with the "4-bytes bug".
Attached is the complete SPI frame, round about 1550 bytes, but it starts with 1-byte address information, and here is the problem!

The 5 first bytes are:
0x2A, 0x00, 0x00, 0x00, 0x50

Sometimes I got 0x50 directly after 0x2A, sometimes with a random number of "0x00" in between, because the frame is repeated every approx. 40ms
SPI frequency is 8MHz, time between the first 1-byte transmissions, rising and falling edge of #CS, is apprxox 1µs.

Is this issue in general more related to Arduino IDE, maybe due to huge latencys, or also "available" in ESP-IDF environment?

Are the meanwhile workarounds or bugfixes available?

Thank you in advance!
BR
Markus

Re: ESP32-S2 Saola: General SPI question

Posted: Tue Aug 10, 2021 10:04 pm
by fasani
I don’t know if this will really help, but once when I had still no Logic analyzer around,I used this arduino-ESP32 project to sniff aptitude ESP32 acting as slave SPI
https://github.com/martinberlin/esp32-spi-slave
But I was reducing the speed of the master to 4 MHz.