ESP32-S3 and overclocking potential.

VSparxx
Posts: 5
Joined: Thu Dec 19, 2024 11:55 am

ESP32-S3 and overclocking potential.

Postby VSparxx » Thu Dec 19, 2024 12:20 pm

Hi all - so long story short is that i have a fairly complex project on one of the 4.3" ESP32-S3 based LCDs (8MB OPI PSRAM and 16MB QSPI Flash) where i'm running a LVGL interface that writes to a 800x480 IPS panel pinned to one core and a webserver serving a web interface pinned to the other core.
Ofc all of this makes use of mutexes, callbacks and what not to try and avoid unnecessary cpu cycles when and where possible possible in a try to make stuff run faster and smoother.
All is well until the moment when i enable flash encryption which seems to have a dramatic effect on how fast the framebuffer can cycle through both draw buffers that run in DMA as on enabling encryption major flicker starts happening.
Looking through the docs i now understand that everything going into ram is encrypted/decrypted on the fly which i assume is just causing that slight additional mcu load and things start cascading from there.

Now i know this is ABSOLUTELY NOT recommended by any way or means but would there be a way to play a bit wiht the MCU clocks in a way where i could make this LCD usable again, i know overclocking will pose challenges in other areas as all clocks will start changing i'd just be thankful if anyone pointed me in the right direction in terms of where to begin :)

Hope this isn't too controversial of a topic and thanks to anyone reading/helping and participating to the discussion :)

Sprite
Espressif staff
Espressif staff
Posts: 10599
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32-S3 and overclocking potential.

Postby Sprite » Fri Dec 20, 2024 9:33 am

Not likely to work. The PLL is fixed to certain frequencies to make WiFi work; overclocking means that either you have to give up WiFi or increase the speed to the next divider that works with WiFi, and that's likely a gigantic step. Aside from that, the registers that control clocks and dividers aren't really documented, so you'd have to do a bunch of reverse engineering.

MicroController
Posts: 2663
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: ESP32-S3 and overclocking potential.

Postby MicroController » Fri Dec 20, 2024 12:25 pm

pinned to one core and a webserver serving a web interface pinned to the other core
If you're not using floating point or SIMD/PIE, disallowing tasks to use available CPU capacity is likely to reduce throughput.
All is well until the moment when i enable flash encryption which seems to have a dramatic effect on how fast the framebuffer can cycle through both draw buffers that run in DMA as on enabling encryption major flicker starts happening.
Looking through the docs i now understand that everything going into ram is encrypted/decrypted on the fly which i assume is just causing that slight additional mcu load and things start cascading from there.
Hmm. AFAICT (PSRAM) encryption works only via the cache; PSRAM-DMA otoh bypasses the cache. Would have to check how PSRAM encryption and DMA interoperate. Could be that data requires copying between PSRAM and internal RAM buffers by the CPU in order to be usable for DMA.

username
Posts: 593
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32-S3 and overclocking potential.

Postby username » Fri Dec 20, 2024 3:14 pm

I too am using a similar LCD. They recommended the following for a bit of a boost in speed.

In menuconfig, you can search for these and then change them.

CONFIG_IDF_EXPERIMENTAL_FEATURES=y
CONFIG_ESPTOOLPY_FLASHFREQ_120M=y
CONFIG_SPIRAM_SPEED_120M=y

VSparxx
Posts: 5
Joined: Thu Dec 19, 2024 11:55 am

Re: ESP32-S3 and overclocking potential.

Postby VSparxx » Mon Dec 23, 2024 5:47 am

Thanks for the replies guys, been looking more into this issue and it seems it's fairly widespread across the whole RGB displays lineup, the issue seems to be related to the DMA and interrupt routines.
Here's a quote i found in the tasmota docs, they actually reserved a small section to the flickering issue https://michiel.vanderwulp.be/domotica/ ... flickering
Explantion by “qemu2015”: on RGB displays we have heavy DMA from PSRAM to display due to the lack of display RAM inside display. this DMA may not be disturbed in any way, the linked lists are started in IRQ. so disabling IRQ leads to flicker.
Sadly the display type i use does not allow to go as low as 6MHz for the panel frequency, the lowest possible frequency seems to be around 13.5 MHz.
I'll try enable the 120MHz mode for the SPIRAM see if that helps in any way but i'll have to first modify the project so it runs on ISP-IDF framework instead of Arduino to achieve that.

Spikepavel
Posts: 2
Joined: Mon Dec 30, 2024 1:45 am

Re: ESP32-S3 and overclocking potential.

Postby Spikepavel » Mon Dec 30, 2024 1:49 am

Hello. Help please. How to activate these settings in Arduino IDE, I am using Arduino ESP version 3+.

CONFIG_IDF_EXPERIMENTAL_FEATURES=y
CONFIG_ESPTOOLPY_FLASHFREQ_120M=y
CONFIG_SPIRAM_SPEED_120M=y

VSparxx
Posts: 5
Joined: Thu Dec 19, 2024 11:55 am

Re: ESP32-S3 and overclocking potential.

Postby VSparxx » Sun Jan 05, 2025 4:58 pm

You cna just select that in the latest ArduinoIDE Tools menu.

Image

Spikepavel
Posts: 2
Joined: Mon Dec 30, 2024 1:45 am

Re: ESP32-S3 and overclocking potential.

Postby Spikepavel » Tue Jan 07, 2025 9:47 am

Hello. This option is installed: FLASHFREQ_120M.
But SPIRAM_SPEED_120M is not working, PSRAM is running at 80 MHz. If you change the frequency with your hands in the BOARDS file, you get an error that PSRAM does not work at a frequency above 80 Mhz, although if you use ESP IDF?, it works at a frequency of 120 Mhz. How to make the Arduino iDE have a PSRAM speed of 120 Mhz.

Who is online

Users browsing this forum: Pacharne Aparna, Perplexity-User, PetalBot and 4 guests