
OLED Display driver written for ESP32-C6 / C5 RISC-V LP Core 20MHz (ESP-IDF v6.0+)
I wanted to share a small project I’ve been working on. I couldn't find any ready-made solution to run an OLED screen completely off the LP Core (ULP) while the main HP core is in Deep Sleep, so I wrote a lightweight driver from scratch.
It currently supports three display variations (SSD1306 0.96", SSD1306 0.91", and SSD1312 1.09") using the same unified API.
Key Technical Details:
- Framework: ESP-IDF v6.0+ (master)
- Peripherals: Uses hardware
LP_I2C(no bit-banging or assembly). - RAM Footprint: Total runtime consumption scales to ~6-8 KB (including framebuffer and stack), leaving about 50% of the 16 KB LP SRAM free.
- Features: Basic graphics API (lines, rectangles, circles, capsules, fill) and 5x7 ASCII text engine with scaling.
- Configuration: Auto pin-mapping for C6/C5 at compile-time. Switching between displays very easy.
Project on github: https://github.com/SODAVK/SSD1306_OLED_RISC-V_LP-Core
The library is entirely C-based with static allocation. I’m just leaving it here in case anyone is working on ultra-low-power devices or always-on remote sensors and needs something similar. Demo work on LP core C6 20Mhz, consumption ~500-700 µA per display + board together