SPI Usage

jon-ecm
Posts: 1
Joined: Sun Nov 20, 2016 4:28 am

SPI Usage

Postby jon-ecm » Sun Nov 20, 2016 4:32 am

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

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: SPI Usage

Postby kolban » Sun Nov 20, 2016 4:52 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: SPI Usage

Postby WiFive » Sun Nov 20, 2016 5:42 pm

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.

jspark311
Posts: 7
Joined: Tue Feb 21, 2017 9:40 am

Re: SPI Usage

Postby jspark311 » Sat Feb 25, 2017 8:59 am

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.

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

Re: SPI Usage

Postby ESP_Sprite » Sun Feb 26, 2017 6:19 am

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.

imtiaz
Posts: 106
Joined: Wed Oct 26, 2016 1:34 am

Re: SPI Usage

Postby imtiaz » Thu Mar 23, 2017 12:27 am

Hi @ESP_Sprite,

Do we have a SPI slave mode driver yet?

Thank you
Imtiaz

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

Re: SPI Usage

Postby ESP_Sprite » Thu Mar 23, 2017 5:58 am

No, not yet, sorry.

rahmaevao
Posts: 11
Joined: Fri Oct 06, 2017 8:59 am

Re: SPI Usage

Postby rahmaevao » Fri Oct 06, 2017 9:03 am

I have a problem whith SLAVE MODE in esp-idf.
How to read received data?

Who is online

Users browsing this forum: expupil and 98 guests