-->
Page 1 of 1

Communication between ESP8266 and CY8CKIT-059 via SPI

PostPosted: Fri Mar 10, 2023 8:33 am
by Sean Wang
Project description:
1.CY8CKIT-059 is Master and ESP8266 mini d1 is Slave.
2.Master communicate with Slave via SPI per 2 seconds and each time the value increases 1.

Question:
I don't know why my slave device always receive "Master : 0".The value doesn't increase in each time.

Re: Communication between ESP8266 and CY8CKIT-059 via SPI

PostPosted: Wed Apr 19, 2023 2:56 pm
by rooppoorali
Make sure the SPI interface is properly configured on both devices. Check the pin connections, and ensure that the SPI mode, clock frequency, and data order are all set correctly on both devices. If possible, use a logic analyzer to debug the communication between the two devices.

Re: Communication between ESP8266 and CY8CKIT-059 via SPI

PostPosted: Tue May 02, 2023 4:55 am
by djlin
First, check the physical connections between the devices to ensure that the SPI interface is properly connected. Next, review the code for both devices to make sure that the SPI communication settings (such as clock frequency and data mode) are correctly configured.

In the Slave device code, double-check that the SPI interrupt is enabled and that the received data is properly read from the SPI buffer. Also, ensure that the Slave device is properly configured to receive data from the Master device.

Re: Communication between ESP8266 and CY8CKIT-059 via SPI

PostPosted: Fri May 05, 2023 3:52 am
by eriksl
I am afraid the only other way left to debug an SPI device is to attach a logic analyser. If anything is incorrect (e.g. too high speed, distortion on the cable, wrong clock or data polarity, mix-up of wires (i.e. MOSI/MISO the wrong way around) there won't be any error message it just doesn't work.