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
Ray
ESP-32 HSPI+VSPI drive dual-ILI9341
-
- Posts: 633
- Joined: Thu Dec 19, 2019 1:23 am
ESP-32 HSPI+VSPI drive dual-ILI9341
- Attachments
-
- ESP32_HSPI_VSPI_ILI9341_OK.zip
- (58.73 KiB) Downloaded 466 times
Last edited by mrburnette on Thu Jul 01, 2021 6:02 pm, edited 1 time in total.
-
- Posts: 633
- Joined: Thu Dec 19, 2019 1:23 am
Re: ESP-32 HSPI+VSPI drive dual-ILI9341
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:
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.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.
Caveat: Wife does not respect my aspirations