Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Vicne
#58399
romuye wrote:I am trying to use STM32 microcontroller as master and ESP8266 as slave for SPI communication.
But unable to get it working...
Following is my console for ESP8266 output

Could you give some information about the code you used ?
Does it work between Arduino and ESP8266 ?
Kind regards,

Vicne
User avatar
By romuye
#58416 Q: Could you give some information about the code you used ?
A:

1) Used following code for master ( STM32 )
http://grauonline.de/wordpress/?page_id=1004

2) Used following code for slave ( ESP8266 )
https://github.com/esp8266/Arduino/blob/master/libraries/SPISlave/examples/SPISlave_Test/SPISlave_Test.ino

Q2: Does it work between Arduino and ESP8266 ?
A: Since i do not have Arduino now, was unable to test.

Thanks,
User avatar
By Maomao23
#58650 Ooops... Looks that Ishould have read the entire thread before posting.

So I added the Vicne finding:
// Additional setting to have MISO change on falling edge
SPI1C2 |= 1 << SPIC2MISODM_S;

And now it's working (not 100% of the time, I will investigate more, surely because of the long wires connecting the 2 ESPs).

Thanks Vicne! (maybe we should put this line somewhere in the ESPSlave examples?)
User avatar
By Vicne
#59326 Hi, all,
I just wanted to let you know I refreshed the "SPI register description" document :

ESP8266 SPI register description 20161210.pdf

Feel free to comment if you spot mistakes or have additional information.
KR,
Vicne
You do not have the required permissions to view the files attached to this post.