Page 1 of 2

SPI support for AT commands?

Posted: Fri Aug 19, 2016 6:26 pm
by edpeckham
With the release of the ESP-WROOM-S2, which looks to add a free SPI interface for Host MCU Master -> WROOM module slave options, will there be a version of the AT application firmware that will response to the SPI interface instead of the UART interface?

Re: SPI support for AT commands?

Posted: Tue Aug 23, 2016 4:04 pm
by pratik

This can be done with the current AT firmware as well, with any module such as ESP-WROOM-02, ESP-12 etc. You just need to write code for accepting the command via HSPI port and not serial port.

Re: SPI support for AT commands?

Posted: Sun Oct 30, 2016 3:24 am
by tilz0R
Where is the actual datasheet regarding SPI/SDIO communication for AT commands?

UART is async between TX and RX, where SPI is not and master always makes transmission.
How does ESP notify user about new data to read via SPI?

How do we know how many bytes is ready to be read from ESP?
These are important facts no-where explained.

Saying "SPI is possible too" is not enough because SPI works totally other way than UART.

I hope I get my answers.

Re: SPI support for AT commands?

Posted: Wed Nov 02, 2016 1:04 pm
by pratik
AT+UART command can enable flow control for UART... you should try that out if you have a host MCU with very low RAM. Then you can have control over when data is sent out. The only reason you should opt for SPI is when you need high data transfer speed.

Officially, there is the SDIO firmware available with the latest nonOS SDK. An SDIO host controller would typically support that directly. You may see the documentation soon though.

As for SPI based communication, you need to implement a mechanism to interrupt the host if ESP8266 is used as SPI slave. Or you may read the status frequently using slave commands. There is no official release for this at this time, probably because that kind of setup is not very practical. I mean... if your host MCU has 512 bytes RAM, having SPI or UART makes no practical difference in most cases. So right now that is a possibility left out for developers who have such highly specific needs.
As with custom AT firmware, you may even combine SPI and UART and use SPI only for block transfers. Endless possibilities! But then it is all application specific.

Re: SPI support for AT commands?

Posted: Wed Nov 02, 2016 1:51 pm
by tilz0R
Having interrupt is something which is important and required capability.

When working with SDIO, I'm sure you need that capability of interrupt too, because host MCU is your master.
Anyway, if you will publish SPI based AT command communication (or not AT, maybe something else) with official software, that would be great.

Re: SPI support for AT commands?

Posted: Thu Nov 03, 2016 12:49 pm
by pratik
Yes, I fully agree with that there should be an interrupt mechanism... which is not there in any usual serial protocols! But there are devices like I/O expanders that include a separate interrupt line.
By the way, I might create SPI based AT firmware as a personal project if it seems to be worth the effort (will take a week's worth of work).
By the way, SDIO specs include an interrupt mechanism. :)

Re: SPI support for AT commands?

Posted: Tue Dec 27, 2016 2:30 pm
by nirajmahapatro
Hello Pratik,

I am working on a similar requirement.
Have you made any update on the SPI based AT+command set implementation?

Re: SPI support for AT commands?

Posted: Tue Dec 27, 2016 10:47 pm
by pratik
Hi! Not really. There's no popular demand for this right now. There may be firmware for this officially from Espressif at some point of time...but please don't take my word for it.
You may post on the Free Market section of the forum regarding this and someone will surely help you out! Using SDKs is better than porting the AT firmware itself. Freelancers are the way to go for this.

Re: SPI support for AT commands?

Posted: Thu Feb 02, 2017 6:06 am
by lloureiro

Someone have developed integration of esp-wroom-s2 with mcu?

What is needed?


Re: SPI support for AT commands?

Posted: Sun Feb 12, 2017 1:51 pm
by pratik
I think there is an STM32 + SDIO demo for WROOM-S2. I don't really recall if that was internal to Espressif team or public.
I will get back to one of your posts when I find out, please allow some time. :)