I submitted issues on your GitHub repositories: https://github.com/espressif/ESP8266_NONOS_SDK/issues/269 and https://github.com/espressif/ESP8266_NONOS_SDK/issues/273 but wasn't sure where Espressif monitors for bugs... so adding this post.
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.
SPI Master-Slave errors sending/receiving 32 bytes between two ESP8266
-
- Posts: 22
- Joined: Thu Dec 14, 2017 10:53 am
- Contact:
SPI Master-Slave errors sending/receiving 32 bytes between two ESP8266
Postby Inquisitor » Tue Oct 29, 2019 1:18 am
3 lines of code = App/Web Server w/ GUI Admin, File Mngr, OTA, AP Mgr, Perf Metrics, WebSocket Comms, App API, All running on ESP8266... Even usable on ESP-01S
https://www.esp8266.com/viewtopic.php?f=11&t=23535
https://InqOnThat.com
https://www.esp8266.com/viewtopic.php?f=11&t=23535
https://InqOnThat.com
Re: SPI Master-Slave errors sending/receiving 32 bytes between two ESP8266
Postby Her Mary » Fri Nov 29, 2019 11:26 am
Would you like to try ESP8266 RTOS SDK instead? https://github.com/espressif/ESP8266_RT ... herals/spi
Who is online
Users browsing this forum: No registered users and 3 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.