Increase XCLK frequency to 24MHz for higher frame rates on ESP32-S3 boards (#49)

* feat: increase OV2640 clock freq to yield ~70FPS

* fix: cleanup comments
This commit is contained in:
Sebastian Fitt 2023-04-19 22:59:49 +02:00 committed by GitHub
parent e8c6bab99b
commit f496ec4a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,13 @@ void CameraHandler::setupCameraPinout() {
log_i("Camera module is undefined");
#endif
// camera external clock signal frequencies
// 10000000 stable
// 16500000 optimal freq on ESP32-CAM (default)
// 20000000 max freq on ESP32-CAM
// 24000000 optimal freq on ESP32-S3
int xclk_freq_hz = 16500000;
#if CONFIG_CAMERA_MODULE_ESP_EYE
/* IO13, IO14 is designed for JTAG by default,
* to use it as generalized input,
@ -27,6 +34,9 @@ void CameraHandler::setupCameraPinout() {
pinMode(13, INPUT_PULLUP);
pinMode(14, INPUT_PULLUP);
log_i("CAM_BOARD");
#elif CONFIG_CAMERA_MODULE_ESPS3WROVER
/* ESP32-S3 is capable of using higher freqs */
xclk_freq_hz = 24000000;
#endif
config.ledc_channel = LEDC_CHANNEL_0;
@ -48,9 +58,7 @@ void CameraHandler::setupCameraPinout() {
config.pin_sccb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 16500000; // 10000000 stable,
// 16500000 optimal,
// 20000000 max fps
config.xclk_freq_hz = xclk_freq_hz;
}
void CameraHandler::setupBasicResolution() {