mirror of
https://github.com/espressif/esp32-camera.git
synced 2025-08-06 16:40:19 +08:00
Fails with ESP32 (Standard) and not run with ESP-IDF v5.2 (#542)
* Fails with ESP32 (standard) and ESP-IDF v5.2 With IDF 5.2 master it works with esp32-s3 but fails with esp32 standard, and has two problems: First is that when compiling it does not find the function: ets_delay_us'. implicit declaration of function 'ets_delay_us'; Second that it fails to initialize xlock. camera_xclk: ledc_timer_config failed, rc=103 The solution is to add #define ets_delay_us esp_rom_delay_us when the idf version is greater than 5 and initialize the variable timer_conf.deconfigure = false; * Build fails with ESP32 (Standard) and does not run with ESP-IDF v5.2 With IDF 5.2 master it works with esp32-s3 but fails with esp32 standard, and has two problems: First is that when compiling it does not find the function: ets_delay_us'. implicit declaration of function 'ets_delay_us'; Second that it fails to initialize xlock. camera_xclk: ledc_timer_config failed, rc=103 The solution is to add #define ets_delay_us esp_rom_delay_us when the idf version is greater than 5 and initialize the variable timer_conf.deconfigure = false; * Fails with ESP32 (Standard) and not run with ESP-IDF v5.2 With IDF 5.2 master it works with esp32-s3 but fails with esp32 standard, and has two problems: First is that when compiling it does not find the function: ets_delay_us'. implicit declaration of function 'ets_delay_us'; Second that it fails to initialize xlock. camera_xclk: ledc_timer_config failed, rc=103 The solution is to add #define ets_delay_us esp_rom_delay_us when the idf version is greater than 5 and initialize the variable timer_conf.deconfigure = false; --------- Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
This commit is contained in:
@ -44,6 +44,10 @@ static inline int gpio_ll_get_level(gpio_dev_t *hw, int gpio_num)
|
|||||||
#define gpio_matrix_in(a,b,c) esp_rom_gpio_connect_in_signal(a,b,c)
|
#define gpio_matrix_in(a,b,c) esp_rom_gpio_connect_in_signal(a,b,c)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 2)
|
||||||
|
#define ets_delay_us esp_rom_delay_us
|
||||||
|
#endif
|
||||||
|
|
||||||
static const char *TAG = "esp32 ll_cam";
|
static const char *TAG = "esp32 ll_cam";
|
||||||
|
|
||||||
#define I2S_ISR_ENABLE(i) {I2S0.int_clr.i = 1;I2S0.int_ena.i = 1;}
|
#define I2S_ISR_ENABLE(i) {I2S0.int_clr.i = 1;I2S0.int_ena.i = 1;}
|
||||||
|
@ -23,6 +23,10 @@ esp_err_t xclk_timer_conf(int ledc_timer, int xclk_freq_hz)
|
|||||||
timer_conf.freq_hz = xclk_freq_hz;
|
timer_conf.freq_hz = xclk_freq_hz;
|
||||||
timer_conf.speed_mode = LEDC_LOW_SPEED_MODE;
|
timer_conf.speed_mode = LEDC_LOW_SPEED_MODE;
|
||||||
|
|
||||||
|
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0)
|
||||||
|
timer_conf.deconfigure = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ESP_IDF_VERSION_MAJOR >= 4
|
#if ESP_IDF_VERSION_MAJOR >= 4
|
||||||
timer_conf.clk_cfg = LEDC_AUTO_CLK;
|
timer_conf.clk_cfg = LEDC_AUTO_CLK;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user