ESP8266 Developer Zone The Official ESP8266 Forum 2016-07-12T01:46:56+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=2390 2016-07-12T01:46:56+08:00 2016-07-12T01:46:56+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2390&p=7906#p7906 <![CDATA[Re: ESP8266 - SPI Slave]]>
I download the document on suggested topic, there's a "doc" attached but, unfortunately, it is in Chinese only,
This spreadsheet explains a lot about the hardware, but I still couldn't make the SPI works properly.

In the code folder I've found only the driver files, there is no usage example on HSPI in slave mode.

If you have an example with some brief explanations about the expected command and answer, or even an echo example, that I can test and use as a base for my project I ask if you can post it here.

Thanks.

Statistics: Posted by christofer_HC — Tue Jul 12, 2016 1:46 am


]]>
2016-07-05T16:47:21+08:00 2016-07-05T16:47:21+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2390&p=7748#p7748 <![CDATA[Re: ESP8266 - SPI Slave]]>
Here is some raw documentation available right now:
http://bbs.espressif.com/viewtopic.php?t=85

You might be able to get the HSPI up and running in slave mode using the information there. We may have a proper documentation release on this in the near future.

Statistics: Posted by Guest — Tue Jul 05, 2016 4:47 pm


]]>
2016-07-05T03:03:10+08:00 2016-07-05T03:03:10+08:00 https://bbs.espressif.com:443/viewtopic.php?t=2390&p=7720#p7720 <![CDATA[ESP8266 - SPI Slave]]>
I'm trying to understand the ESP8266's SPI peripheral on slave mode, more specifically the HSPI instance.

For that I get the "SPI_slave" example from SDK. I was able to compile and program the ESP8266 successfully but it didn't work.

Reading the sources i found that the function spi_test_init() calls the spi_slave_init(), but I didn't find a call reference for it (directly or via its call hierarchy). So I create a call for spi_test_init() in user_init() and I have commented the user_init()'s previous contents more specific the next function calls: set_data(), spi_master_init(HSPI) (very suspicious for a spi slave example), spi_mast_byte_write(HSPI,0xAA), spi_byte_write_espslave(HSPI,0xAA), spi_WR_espslave(HSPI) and spi_WR_espslave(HSPI).

After those changes the master was able to switch the clk on SPI bus, at least, and I got some random answers from ESP.

I run into several blogs in addition to the official documentation and everything I found are focused in master operation only. I wasn't even able to find a complete reference for esp8266 spi registers and/or SPI usage for slave mode.

Does anyone managed to use the SPI in slave mode successfully or have a complete documentation to guide me?

Best Regards.

Statistics: Posted by christofer_HC — Tue Jul 05, 2016 3:03 am


]]>