Page 1 of 1

ESP-32 HSPI+VSPI drive dual-ILI9341

Posted: Sun Sep 20, 2020 7:16 pm
by mrburnette
Using stock Adadruit libraries, construct dual hardware SPI objects to support dual-ILI9341 TFT-LCD displays.

I no longer participate with Hackster.io ... code attached in this thread.

Registration not required to download example code:
https://www.hackster.io/rayburne/dual-d ... p32-4c75b5

Image


Ray

Re: ESP-32 HSPI+VSPI drive dual-ILI9341

Posted: Tue Sep 22, 2020 5:46 pm
by zoomx
+2!

Re: ESP-32 HSPI+VSPI drive dual-ILI9341

Posted: Tue Sep 22, 2020 9:42 pm
by mrburnette
zoomx wrote: Tue Sep 22, 2020 5:46 pm+2!
I already know how to give Arduino multi-threaded capability across CPU1 (default) and CPU0:
https://www.hackster.io/rayburne/esp32- ... res-8dd948

but I am hoping for some serious play time, from Read The Docs:
SPI Master driver: Overview
The ESP32 has four SPI peripheral devices, called SPI0, SPI1, HSPI and VSPI. SPI0 is entirely dedicated to the flash
cache the ESP32 uses to map the SPI flash device it is connected to into memory. SPI1 is connected to the same
hardware lines as SPI0 and is used to write to the flash chip. HSPI and VSPI are free to use. SPI1, HSPI and VSPI all
have three chip select lines, allowing them to drive up to three SPI devices each as a master.

The spi_master driver
The spi_master driver allows easy communicating with SPI slave devices, even in a multithreaded environment. It
fully transparently handles DMA transfers to read and write data and automatically takes care of multiplexing between
different SPI slaves on the same master.
So, my thinking is to have one LCD (low priority) "steal" from CPU0 (radio) and have graphics, updates (high priority DMA) run in the Arduino default CPU1 context.

Caveat: Wife does not respect my aspirations :lol:

Re: ESP-32 HSPI+VSPI drive dual-ILI9341

Posted: Wed Sep 23, 2020 3:12 pm
by zoomx
:lol: