SPI interface between two ESP32

vijay07111998
Posts: 1
Joined: Mon Oct 05, 2020 3:33 am

SPI interface between two ESP32

Postby vijay07111998 » Mon Oct 05, 2020 3:44 am

Hi all,

From last week i am implementing SPI communication between two ESP-WROOM-32D. I am using the code examples given by espressif itself.
C:\esp\esp-idf\examples\peripherals\spi_slave\sender ( Master)
C:\esp\esp-idf\examples\peripherals\spi_slave\reciever(slave)

I am able to read the data from MISO (sender side Master ESP32), in the slave side(MOSI) i was not able to read exact data it's printing some random data.

I tried by changing the clock speed and pin configurations.
I was not able to debug the code and not able to find what exactly wrong in the code.
Please can someone help me with this.

Thanks & regards,
Vijay

ESP_Sprite
Posts: 9746
Joined: Thu Nov 26, 2015 4:08 am

Re: SPI interface between two ESP32

Postby ESP_Sprite » Mon Oct 05, 2020 7:19 am

IIRC that code is tested in CI, it should work. What does your hardware look like?

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: SPI interface between two ESP32

Postby PeterR » Mon Oct 05, 2020 10:49 am

Two guesses; (1) Ground, (2) Clock speed.
What clock speeds did you try? Try 1Mhz at first. Sometimes a pin that is not actually connected can pick up from another pin, along with corruptions.
& I also believe that IDF CAN should be fixed.

Who is online

Users browsing this forum: Bing [Bot] and 92 guests