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
]]>