New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test and resolve any issues with ESP8266 hardware SPI #606
Comments
Here is the link to the ESP8266 API docs ... http://bbs.espressif.com/download/file.php?id=571 |
After studying the SPI hardware support docs from Espressif ... I am unable to understand how to use these functions. Looking now for someone who understands ESP8266 SPI details to provide guidance and consultation. |
User @jumjum123 is looking for this ability to drive WS2812 devices. This should indicate to us that the relative priority of this issue should increase. Posted a call for consultation here: http://www.esp8266.com/viewtopic.php?f=6&t=5904 User @markusgritsch has also requested WS2812 support. A link to a potentially useful article on hardware SPI on the ESP8266 has been found here: http://d.av.id.au/blog/hardware-spi-hspi-command-data-registers/ http://d.av.id.au/blog/hardware-spi-clock-registers/ Another interesting link is: http://www.esp8266.com/viewtopic.php?f=13&t=2413 An important library seems to be available here: |
Started examination of what is involved in integrating hardware SPI support. This starts with the examination of the MetalPhreak/ESP8266_SPI_Driver project. I was able to compile this project cleanly with no issues. Started a new Wiki page called Changed the |
With the MetalPhreak/ESP8266_SPI_Driver included in the build and the framework for SPI hardware support examined, changes were made to The testing will consist of examination of the signals shown in the following table:
|
Integration of Espruino with MetalPhreak library happened exactly as desired with no hiccups. We now have a hardware SPI known as |
Another test: SPI1.write([0x55,0x55,0x55])
|
@nkolban this is why I said you couldn't use the library as-is. |
As I understand the Espruino architecture ... when one codes:
That causes 3 distinct calls to Do we have any suggestions for what the design changes might be? |
So it can send one byte, but it doesn't wait for a response, it returns immediately. It can then go away and work out the next byte while it's sending the current one. Not only that but the library you're using does a bunch of setup stuff for every byte, which will delay it more. That's why I said you'd basically have to end up re-writing the library and there wasn't much point pulling it in. |
If we look at @markusgritsch signal trace (which is also what I am seeing on my signal traces) ... we are seeing that the "width" of the 8 bit SPI send is dramatically smaller than the inter byte send duration. In principle, the width of the 8bit send would be 8 * 1.2us = ~10ms while the inter byte processing is between 30-60ms. If we returned immediately when the 8bit SPI send started ... we would save the 10ms wait for the 8bits to complete ... but I'm not seeing how that would reduce (enough) the bill for inter byte processing? |
However even with Once that is sorted (especially if you can put the SPI peripheral into 16 bit mode) there shouldn't be a huge problem with speed. After all, even a 72Mhz STM32 can handle it, and the ESP8266 is 100Mhz. |
It has been found that the |
An additional issue has been created to discuss/conjecture another possibility for internals implementation of data processing for SPI. See #695. A forum thread discussing the use of MetalPhreak's SPI library can be found here: http://forum.espruino.com/conversations/277010/ Changes were made to update the implementation of The Testing seems to show that the JavaScript function of |
#606. Initial framework for hardware SPI for ESP8266.
Can this issue be closed? Is there something left to do? |
Hello Thorsten, from my point of view, this should be closed. Regards from good old Germany(about 8 degrees Celsius and sunny) On Thu, Dec 3, 2015 at 7:52 AM, Thorsten von Eicken <
|
We now have basic testing of software SPI tested and working. It is now time to create a work item for the hardware SPI built into the ESP8266. This work item will track the design and efforts necessary to perform that task.
The text was updated successfully, but these errors were encountered: