esp-idf-ssd1306/BenchMark
2024-03-26 05:53:32 +09:00
..
main Added BenchMark project 2024-03-26 05:52:48 +09:00
CMakeLists.txt Added BenchMark project 2024-03-26 05:52:48 +09:00
README.md Update README.md 2024-03-26 05:53:32 +09:00
sdkconfig.defaults Added BenchMark project 2024-03-26 05:52:48 +09:00

BenchMark for SSD1306

A new i2c driver is now available in ESP-IDF V5.2.
The previous i2c driver is still available as a Legacy driver.
We measured the performance of new i2c drivers, legacy i2c drivers, and SPI drivers.

Software requirements

ESP-IDF V4.4/V5.x.

Note for new i2c driver
ESP-IDF V5.2 is required when using the new i2c driver.

Installation

git clone https://github.com/nopnop2002/esp-idf-ssd1306
cd esp-idf-ssd1306/BenchMark/
idf.py set-target {esp32/esp32s2/esp32s3/esp32c2/esp32c3/esp32c6/esp32h2}
idf.py menuconfig
idf.py flash

i2c interface benchmark

The maximum i2c clock frequency of SSD1306 is 400KHz.
The i2c clock frequency used by this project is 400KHz.
The measurement result is [FPS].

SoC@CPU Freq Legacy Driver New Driver
ESP32@160 34.0 35.2
ESP32@240 35.4 36.2
ESP32S2@160 36.7 37.8
ESP32S2@240 38.0 38.6
ESP32S3@160 36.1 37.3
ESP32S3@240 37.6 38.4
ESP32C2@120 36.2 37.1 26MHz XTAL
ESP32C3@160 37.0 38.1
ESP32C6@160 37.1 38.2
ESP32H2@96 34.6 36.4

Wire cables should be as short as possible.

ESP32S2@240 gave the fastest results when the Legacy and New i2c driver.

i2c_160MHz i2c_240MHz i2c_legacy i2c_new

SPI interface benchmark

The maximum SPI clock frequency of SSD1306 is 10MHz.
Measurements were made by changing the SPI clock frequency.
The measurement result is [FPS].

SoC@CPU Freq 1MHz 2MHz 4MHz 6MHz 8MHz 10MHz
ESP32@160 90.3 143.8 224.6 272.0 297.0 316.3
ESP32@240 97.4 166.0 271.3 339.2 378.9 417.2
ESP32S2@160 94.5 159.4 244.4 301.0 331.8 356.0
ESP32S2@240 101.7 174.1 290.1 367.1 413.9 458.9
ESP32S3@160 93.7 152.2 240.7 295.0 324.4 347.5
ESP32S3@240 100.1 172.9 286.0 360.9 411.2 449.1
ESP32C2@120 91.6 150.7 226.7 263.5 295.5 314.5 26MHz XTAL
ESP32C3@160 98.0 164.2 265.5 328.1 365.0 394.6
ESP32C6@160 98.2 164.9 268.0 331.9 369.6 399.8
ESP32H2@96 86.6 139.1 202.8 235.5 256.1 267.9

Wire cables should be as short as possible.

ESP32C6 gave the fastest results when the CPU frequency was 160MHz (120MHz or 96MHz for some SoCs).
ESP32C3 is the next fastest.
There are only a few differences between ESP32C6 and ESP32C3.
spi_160MHz spi_160MHz-1MHz spi_160MHz-2MHz spi_160MHz-4MHz spi_160MHz-6MHz spi_160MHz-8MHz spi_160MHz-10MHz

ESP32S2 gave the fastest results when the CPU frequency was 240MHz.
spi_240MHz spi_240MHz-1MHz spi_240MHz-2MHz spi_240MHz-4MHz spi_240MHz-6MHz spi_240MHz-8MHz spi_240MHz-10MHz