Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By princemoga
#78305 Hi everyone,

I'm working with an ESP8266 in HSPI slave mode connected with an Atmel Atmega 328p in master mode. Communication works fine until I try to share the SPI interface with another device as a slave. Obviously, I have two different chip select (one for esp and one for the other device). Every time I send a message to the other device (with esp's CS set HIGH) the next communications with esp fail. ;)
Has anyone ever faced a similar issue? Is it possible to use esp as a slave with other devices connected?
I'm using the Arduino Core 2.4.0 on the esp with SPISlave library and the classical Arduino SPI library on 328p.

User avatar
By kpwashere
#79416 Sounds like some registers need adjustment. u must have command bits, address bits, and optionally databits along with interrups and overall 'transaction' defined. if you are just using library, they dont have it right. I looked to docs for ESP32 ... much better written!! and almost same for esp8266. Cant use actual register numbers in that doc but u can googoogle the macro names and find better written and more complete header files with register values etc.