[EPS32S3 study notes] OV2640+OLED image refresh rate

Series Article Directory

提示:这里可以添加系列文章的所有文章的目录,目录需要自己手动添加
For example: the use of pandas in Chapter 1 Introduction to Python Machine Learning


提示:写完文章后,目录可以自动生成,如何生成可参考右边的帮助文档


foreword

提示:这里可以添加本文要记录的大概内容:

After adjusting the OLED+OV2640 before, I made a small demo. At the beginning, the display effect was not very good, the refresh rate could not be increased, and the smear was quite obvious. After adjusting back and forth, the speed is not as good as ideal, but it is barely acceptable. Here are some points that can help improve the refresh rate.


提示:以下是本篇文章正文内容,下面案例可供参考

1. Assignment of tasks

When a task is created, it is possible to specify the CPU on which it will run. In this application, if both the GUI and the Camera are run on the same CPU, there will be some lag, so the CPU must be used reasonably.
Another ESP32S3 CPU frequency can be configured to 240MHz, the SDK configuration seems to be 160MHz by default, since the performance is rich, don't waste it, just run at full speed. Although it has little effect on the refresh rate of the GUI, the actual effect will be better.

Two, Camera configuration

The one that has the greatest impact on Camera speed, or at all. In fact, it is the speed of XCLK. This point has not been studied in depth, but the operation will be abnormal after the speed is increased, which may be the limitation of the hardware itself.
The second is some application level.
If it is for image transmission, the display hardware is separated from the ESP32, and the Camera can be set to transmit images in JPEG, so that the amount of data is low, and the speed of capturing a picture will be much faster under the same clock.
Actual measurement: under the setting of FRAMESIZE_QVGA (320*240), the image acquisition frame rate in PIXFORMAT_RGB565 mode is about 13 frames per second, and the image acquisition frame rate in PIXFORMAT_JPEG mode is about 25 frames per second.

3. GUI related configuration

The refresh rate that affects the GUI part is mainly the SPI rate. The default frequency in the SDK should be 20MHz. This rate is generally good, but it is used to refresh the image, and the entire screen is refreshed every time. Therefore, the speed of SPI directly affects the screen refresh rate. So it is also simple to directly increase the SPI rate in the SDK configuration to 40MHz, which has actually exceeded the maximum frequency in the display IC specification, and the actual SPI SCK waveform has been severely distorted, but everything is displayed to run normally, and it is also luckily.
In addition, pay attention to this component used for image display, do not add other processing, such as flipping, which will greatly affect the speed. If you need to flip and adjust the brightness, you can directly set the image sensor.

Summarize

提示:这里对文章进行总结:

Finally, the actual measurement shows that the GUI refresh rate can maintain 33 frames. The image can barely be seen, but it is mainly limited by the acquisition rate of the camera, and some optimization methods will continue to be shared later.

Guess you like

Origin blog.csdn.net/lunzilx/article/details/128952409