Hello,
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.
ESP8266 - SPI Slave
-
- Posts: 2
- Joined: Tue Jul 05, 2016 12:02 am
Re: ESP8266 - SPI Slave
Postby pratik » Tue Jul 05, 2016 4:47 pm
Hello Christofer,
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.
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.
-
- Posts: 2
- Joined: Tue Jul 05, 2016 12:02 am
Re: ESP8266 - SPI Slave
Postby christofer_HC » Tue Jul 12, 2016 1:46 am
Hello Pratik,
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.
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.
Who is online
Users browsing this forum: No registered users and 284 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.