ESP32-S2 Saola: General SPI question

Dadieter
Posts: 3
Joined: Sun Aug 01, 2021 7:25 pm

ESP32-S2 Saola: General SPI question

Postby Dadieter » Wed Aug 04, 2021 8:25 pm

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
Attachments
begin_spi_frame.png
Begin of SPI Frame
begin_spi_frame.png (36.29 KiB) Viewed 2341 times
complete_spi_frame.png
Complete SPI Frame
complete_spi_frame.png (54.47 KiB) Viewed 2341 times

User avatar
fasani
Posts: 197
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: ESP32-S2 Saola: General SPI question

Postby fasani » Tue Aug 10, 2021 10:04 pm

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.
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], Majestic-12 [Bot] and 267 guests