Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrcodetastic/esp32s2-24bit-i2s-lcd-parallel
Example of how to clock out 24 bits (3 bytes) in parallel using the ESP32S2's I2S LCD interface, from external RAM (PSRAM) via. EDMA.
https://github.com/mrcodetastic/esp32s2-24bit-i2s-lcd-parallel
Last synced: 17 days ago
JSON representation
Example of how to clock out 24 bits (3 bytes) in parallel using the ESP32S2's I2S LCD interface, from external RAM (PSRAM) via. EDMA.
- Host: GitHub
- URL: https://github.com/mrcodetastic/esp32s2-24bit-i2s-lcd-parallel
- Owner: mrcodetastic
- Created: 2024-06-03T21:10:23.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-21T13:21:37.000Z (4 months ago)
- Last Synced: 2024-10-11T13:36:10.826Z (about 1 month ago)
- Language: C++
- Homepage:
- Size: 125 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
| Supported Targets | ESP32-S2 |
| ----------------- | -------- |# ESP32-S2 24bit LCD DMA output from PSRAM
This is an example of outputting 24bits of data in parallel from PSRAM / SPIRAM via the LCD interface.This esp-idf sketch has been written for the ESP32-S2 only. Specifically the WeMos [ESP32-S2 Mini, or equivalent clones](https://www.wemos.cc/en/latest/s2/s2_mini.html).
## How does this work?
The biggest issue with using PSRAM is "cache coheriency" or something to do with the fact that there's a buffer between the CPU and the PSRAM when writing to it, but NOT when reading from it via DMA.So there's the risk of stuff you write to PSRAM not actually being written as it's sitting in the cache, so the DMA read-out is incomplete.
Extensive use of `Cache_WriteBack_Addr` resolves for this when doing PSRAM write functions.
When using PSRAM on the ESP32-S2 Mini, output clock rate seems to hit a limit at only 1Mhz! After this it is likely the DMA transfer will fail, probably due to the fact the PSRAM is very low throughput.
## Example output as seen in pulseview
Using an 8 channel logic level analyser of bits d0-d6, d15 and d23 (the msb).
![image](pulseview.jpg)
## Disabling PSRAM use
Comment out the following define line in esp32s2_i2s_lcd_24bit_parallel_dma.hpp to simply use the normal internal (and limited) SRAM. You will then be able to use MUCH faster output clock speeds.
```
#define USE_REAL_SLOW_PSRAM 1
```