Skip to content

Commit c0c17bd

Browse files
jjsch-devme-no-dev
andauthored
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 <[email protected]>
1 parent f595abf commit c0c17bd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

target/esp32/ll_cam.c

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ static inline int gpio_ll_get_level(gpio_dev_t *hw, int gpio_num)
4444
#define gpio_matrix_in(a,b,c) esp_rom_gpio_connect_in_signal(a,b,c)
4545
#endif
4646

47+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 2)
48+
#define ets_delay_us esp_rom_delay_us
49+
#endif
50+
4751
static const char *TAG = "esp32 ll_cam";
4852

4953
#define I2S_ISR_ENABLE(i) {I2S0.int_clr.i = 1;I2S0.int_ena.i = 1;}

target/xclk.c

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ esp_err_t xclk_timer_conf(int ledc_timer, int xclk_freq_hz)
2323
timer_conf.freq_hz = xclk_freq_hz;
2424
timer_conf.speed_mode = LEDC_LOW_SPEED_MODE;
2525

26+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0)
27+
timer_conf.deconfigure = false;
28+
#endif
29+
2630
#if ESP_IDF_VERSION_MAJOR >= 4
2731
timer_conf.clk_cfg = LEDC_AUTO_CLK;
2832
#endif

0 commit comments

Comments
 (0)