Closed hagai-shatz closed 1 year ago
Created https://github.com/espruino/EspruinoDocs/pull/696 for this
Ok, thanks! I think ideally this is something that would be nice to fix inside Espruino - there seems no reason it couldn't just batch up writes of 4095 bytes automatically, but if that PR fixes it hopefully the performance impact on other devices won't be that big
I am trying the ST7735 display with an ESP32 board.
The suggested code works with software SPI (
var spi = new SPI();
) but the refresh speed is very slow.When trying to use hardware SPI as below, the ESP32 is failing with an error due to the DMA buffer being too large (16bit 128 pixels 16 lines = 4096 bytes, ESP32 DMA max buffer size is 4095).
This can be fixed by reducing the number of lines that are sent in each iteration from 16 to 8:
The result is a much faster refresh of the screen due to the hardware SPI speed.
Code to use ST7735 with hardware SPI: