Search found 3 matches

by myetam
Sun Oct 27, 2024 9:13 am
Forum: ESP-IDF
Topic: U8g2 runs 7x slower in ESP-IDF compared to running it in Arduino IDE
Replies: 1
Views: 398

Re: U8g2 runs 7x slower in ESP-IDF compared to running it in Arduino IDE

I found the issue. There is a constant that sets the I2C frequency in the u8g2_esp32_hal.h file. The default is set to 50k.

Code: Select all

#define I2C_MASTER_FREQ_HZ 50000     //  I2C master clock frequency
I changed it to 400k (the I2C standard I think) and now I get about 20 fps which is good enough.
by myetam
Sun Oct 27, 2024 9:08 am
Forum: ESP-IDF
Topic: U8G2 runs very slowly
Replies: 2
Views: 4346

Re: U8G2 runs very slowly

I had a similar issue with u8g2 but I'm using an I2C connection to the display. There is also a constant that sets the I2C frequency but it's defined in the header file u8g2_es32_hal.h , not in the .c file. So, just changing the: #define I2C_MASTER_FREQ_HZ 50000 // I2C master clock frequency from th...
by myetam
Sat Oct 26, 2024 11:55 am
Forum: ESP-IDF
Topic: U8g2 runs 7x slower in ESP-IDF compared to running it in Arduino IDE
Replies: 1
Views: 398

U8g2 runs 7x slower in ESP-IDF compared to running it in Arduino IDE

Edit: TLDR; I found the issue. It is to do with the esp u8g2 compatibility component: https://github.com/mkfrey/u8g2-hal-esp-idf I2C clock rate is defined as a constant in the u8g2_esp32_hal.h file. Default is 50k. I changed it to 400k and now I get about 20fps. #define I2C_MASTER_FREQ_HZ 50000 // I...