I am only using your spi_test.c and the spi_interface files in the driver_lib sections. https://github.com/espressif/ESP8266_NONOS_SDK ESP8266_NONOS_SDK/examples/peripheral_test/user/spi_test.c
The first bug (first link above) I found concerning the slaves not properly receiving the 32bytes - I tracked down to the fact that your spi_test program was sending a 1 byte command, 4 byte address, and 32 bytes data. However, the slave instance, when it uses the SPIInit() in the spi_interface.c file (line 146) expects a 1 byte command, 1 byte address and 32 bytes of data. As soon as I changed the spi_test.c (line 150) to spiData.addrLen = 1; The Master => Slave direction is working correctly.
The second bug concerns when the Master pulls the data back from the Slave. Although a Logic Analyzer shows that Master is transferring the 32 bytes correctly, somewhere in the code that data is being misplaced into the SPI_W0... registers.
Screen dumps of the output from spi_test.c and an image of the logic analyzer retrieved data can be found in the second link above.
For this second bug, I cannot find any parameters that I can change having any affect on the data placement. However, because the Logic Analyzer is seeing the 32 bytes correctly transferred, I suspect the change is in the lower level code on the Master side.
Thank you for any help you can provide fixing this bug.
Who is online
Users browsing this forum: No registered users and 1 guest
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
We also have a RTOS version and a MESH version too!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!