Page 1 of 1

SPI Usage

Posted: Sun Nov 20, 2016 4:32 am
by jon-ecm
We're evaluating using the ESP32 for a new large scale product and would like more information on using the SPI, it seems from documentation that it can operate at up to 80MHZ but no other specifications are given, is this speed while operating as master? what is the max speed when operating as a slave?

I've searched all of the online documentation and githup extensively but didn't find any library for spi usage, did i miss something or will we be going in the dark?

Kind Regards,
Jon Mundall

FlexSCADA.com

Re: SPI Usage

Posted: Sun Nov 20, 2016 4:52 pm
by kolban
The code for the drivers and much of the "environment" in which we will run ESP32 apps is still being baked. If we loosely think of needing an SDK to build apps properly, then the SDK we have right now is beta. See the following golden post for details:

http://esp32.com/viewtopic.php?f=10&t=375

The desire by Espressif is to have the 1.0 release of the SDK available by December 1st (which is now less than 2 weeks away). When that becomes available, the belief is that we will have SPI drivers and ideally the full docs on how to properly use them with their configuration specs.

Re: SPI Usage

Posted: Sun Nov 20, 2016 5:42 pm
by WiFive
kolban wrote:When that becomes available, the belief is that we will have SPI drivers and ideally the full docs on how to properly use them with their configuration specs.
Although he is talking about spi slave with an external host and that milestone wasn't mentioned yet.

Re: SPI Usage

Posted: Sat Feb 25, 2017 8:59 am
by jspark311
I am also interested in running SPI2/3 as slaves. I saw a few other SPI-related github issues knocked down today, but no word on slave capabilities, nor much indication in the existing SPI driver code base that it is coming soon.

Should I write my own drivers? Extend SPI master to also handle slave capabilities? Write a parallel driver mirroring spi_master's?
How do you recommend I proceed if I want to have it working within the next week or two?

Also: First post. I really like ESP32's architecture so far.

Re: SPI Usage

Posted: Sun Feb 26, 2017 6:19 am
by ESP_Sprite
At the moment, esp-idf only has master drivers, this is true. We are planning to make slave drivers as well, but I'm unsure about the schedule... most people are working right now on validating the new metal revision as well as getting esp-idf v2.0 done. The slave stuff is documented in the TRM, so if you want, you can indeed write your own driver. The esp-idf master driver is mine, and I have thought about implementing the slave driver as well... unfortunately, I think the architecture of the slave is going to be different enough that it cannot be implemented as part of the master driver, although I do think there is shared functionality that can be separated out and re-used for both the slave and master drivers. If you're planning on creating a driver yourself and are open to also licensing it in such a way that integration in esp-idf itself is a possibility, feel free to hit me up at jeroen at espressif dot com if you want to talk about the architecture.

Re: SPI Usage

Posted: Thu Mar 23, 2017 12:27 am
by imtiaz
Hi @ESP_Sprite,

Do we have a SPI slave mode driver yet?

Thank you
Imtiaz

Re: SPI Usage

Posted: Thu Mar 23, 2017 5:58 am
by ESP_Sprite
No, not yet, sorry.

Re: SPI Usage

Posted: Fri Oct 06, 2017 9:03 am
by rahmaevao
I have a problem whith SLAVE MODE in esp-idf.
How to read received data?