adafruit / circuitpython

CircuitPython - a Python implementation for teaching coding with microcontrollers
https://circuitpython.org
MIT License
3.97k stars 1.16k forks source link

ESP32-S2 SPI speed varies during development #3690

Open emard opened 3 years ago

emard commented 3 years ago

Fast performer is this:

adafruit-circuitpython-espressif_saola_1_wrover-en_US-20201027-563a893.bin
>>> import ecp5f;ecp5f.flash("sdbridge25f.bit",0x200000)
102400 bytes uploaded in 1701 ms (60 kB/s)
4K blocks: 25 total, 0 erased, 0 written.
True
>>> import ecp5f;ecp5f.flash("sdbridge25f.bit",0x201000)
102400 bytes uploaded in 8098 ms (12 kB/s)
4K blocks: 25 total, 24 erased, 24 written.
True

This one is 2-3x slower: adafruit-circuitpython-espressif_saola_1_wrover-en_US-20201113-8d3a878.bin

tannewt commented 3 years ago

Can you please be more specific? Were these examples run one after another? Please provide a test case that uses busio.SPI directly.

Running a python library will have a lot of variation in timing. We make no promises that the timing of python is consistent.

emard commented 3 years ago

Those examples are run in succession one after another. My concern is that this project works fast enough

https://github.com/emard/esp32ecp5/tree/master/circuitpython it turns on and off SPI to make it a JTAG, this is performance that I need fast. Not just SPI alone, this runs great.

Above mentioned run is done one after another, and it is considered fast 60KB/s when reading/verifying, 19KB/s when writing flash.

Latest circuitpython perform slow, about 20KB/s reading/verifying and 6KB/s writing flash.

On 11/13/20, Scott Shawcroft notifications@github.com wrote:

Can you please be more specific? Were these examples run one after another? Please provide a test case that uses busio.SPI directly.

Running a python library will have a lot of variation in timing. We make no promises that the timing of python is consistent.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/adafruit/circuitpython/issues/3690#issuecomment-726880013