Skip to content

Commit 7c17770

Browse files
authored
IDF 5.5-rc1
IDF 5.5-rc1
2 parents 4a41551 + 8f9b49f commit 7c17770

File tree

15 files changed

+126
-26
lines changed

15 files changed

+126
-26
lines changed

.gitlab/ci/common.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ variables:
4040
GIT_FETCH_EXTRA_FLAGS: "--no-recurse-submodules --prune --prune-tags"
4141
# we're using .cache folder for caches
4242
GIT_CLEAN_FLAGS: -ffdx -e .cache/
43-
LATEST_GIT_TAG: v5.5-beta1
43+
LATEST_GIT_TAG: v5.5-rc1
4444

4545
SUBMODULE_FETCH_TOOL: "tools/ci/ci_fetch_submodule.py"
4646
# by default we will fetch all submodules

components/esp_hw_support/port/esp32c5/pmu_param.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ uint32_t get_act_hp_dbias(void)
439439
hp_cali_dbias = 31;
440440
}
441441
} else {
442-
ESP_HW_LOGW(TAG, "hp_cali_dbias not burnt in efuse, use default.");
442+
ESP_HW_LOGD(TAG, "hp_cali_dbias not burnt in efuse, use default.");
443443
}
444444
return hp_cali_dbias;
445445
}
@@ -463,7 +463,7 @@ uint32_t get_act_lp_dbias(void)
463463
lp_cali_dbias = 31;
464464
}
465465
} else {
466-
ESP_HW_LOGW(TAG, "hp_cali_dbias not burnt in efuse, use default.");
466+
ESP_HW_LOGD(TAG, "lp_cali_dbias not burnt in efuse, use default.");
467467
}
468468

469469
return lp_cali_dbias;

components/esp_hw_support/port/esp32c5/rtc_clk.c

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,21 @@ bool rtc_clk_cpu_freq_mhz_to_config(uint32_t freq_mhz, rtc_cpu_freq_config_t *ou
233233
// 40MHz with PLL_F160M or PLL_F240M clock source. This is a special case, has to handle separately.
234234
if (xtal_freq == SOC_XTAL_FREQ_48M && freq_mhz == 40) {
235235
real_freq_mhz = freq_mhz;
236-
source = SOC_CPU_CLK_SRC_PLL_F160M;
237-
source_freq_mhz = CLK_LL_PLL_160M_FREQ_MHZ;
238-
divider = 4;
236+
if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 101)) {
237+
#if CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240
238+
source = SOC_CPU_CLK_SRC_PLL_F240M;
239+
source_freq_mhz = CLK_LL_PLL_240M_FREQ_MHZ;
240+
divider = 6;
241+
#else
242+
source = SOC_CPU_CLK_SRC_PLL_F160M;
243+
source_freq_mhz = CLK_LL_PLL_160M_FREQ_MHZ;
244+
divider = 4;
245+
#endif
246+
} else {
247+
source = SOC_CPU_CLK_SRC_PLL_F160M;
248+
source_freq_mhz = CLK_LL_PLL_160M_FREQ_MHZ;
249+
divider = 4;
250+
}
239251
} else if (freq_mhz <= xtal_freq && freq_mhz != 0) {
240252
divider = xtal_freq / freq_mhz;
241253
real_freq_mhz = (xtal_freq + divider / 2) / divider; /* round */
@@ -258,12 +270,18 @@ bool rtc_clk_cpu_freq_mhz_to_config(uint32_t freq_mhz, rtc_cpu_freq_config_t *ou
258270
divider = 1;
259271
} else if (freq_mhz == 80) {
260272
real_freq_mhz = freq_mhz;
261-
if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 1)) {
273+
if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 101)) {
262274
/* ESP32C5 has a root clock ICG issue when switching SOC_CPU_CLK_SRC from PLL_F160M to PLL_F240M
263275
* For detailed information, refer to IDF-11064 */
276+
#if CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240
264277
source = SOC_CPU_CLK_SRC_PLL_F240M;
265278
source_freq_mhz = CLK_LL_PLL_240M_FREQ_MHZ;
266279
divider = 3;
280+
#else
281+
source = SOC_CPU_CLK_SRC_PLL_F160M;
282+
source_freq_mhz = CLK_LL_PLL_160M_FREQ_MHZ;
283+
divider = 2;
284+
#endif
267285
} else {
268286
source = SOC_CPU_CLK_SRC_PLL_F160M;
269287
source_freq_mhz = CLK_LL_PLL_160M_FREQ_MHZ;
@@ -393,8 +411,22 @@ void rtc_clk_cpu_freq_set_xtal_for_sleep(void)
393411

394412
void rtc_clk_cpu_freq_to_pll_and_pll_lock_release(int cpu_freq_mhz)
395413
{
396-
// TODO: IDF-8641 CPU_MAX_FREQ don't know what to do... pll_240 or pll_160...
397-
rtc_clk_cpu_freq_to_pll_240_mhz(cpu_freq_mhz);
414+
// IDF-11064
415+
if (cpu_freq_mhz == 240) {
416+
rtc_clk_cpu_freq_to_pll_240_mhz(cpu_freq_mhz);
417+
} else if (cpu_freq_mhz == 160) {
418+
rtc_clk_cpu_freq_to_pll_160_mhz(cpu_freq_mhz);
419+
} else {// cpu_freq_mhz is 80
420+
if (!ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 101)) {// (use 240mhz pll if max cpu freq is 240MHz)
421+
#if CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240
422+
rtc_clk_cpu_freq_to_pll_240_mhz(cpu_freq_mhz);
423+
#else
424+
rtc_clk_cpu_freq_to_pll_160_mhz(cpu_freq_mhz);
425+
#endif
426+
} else {// (fixed for chip rev. >= ECO3)
427+
rtc_clk_cpu_freq_to_pll_160_mhz(cpu_freq_mhz);
428+
}
429+
}
398430
clk_ll_cpu_clk_src_lock_release();
399431
}
400432

components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ pm_rx_beacon_process = 0x40000dac;
133133
pm_rx_data_process = 0x40000db0;
134134
pm_sleep = 0x40000db4;
135135
pm_sleep_for = 0x40000db8;
136-
pm_tbtt_process = 0x40000dbc;
136+
//pm_tbtt_process = 0x40000dbc;
137137
pm_tx_data_done_process = 0x40000dc0;
138138
pm_allow_tx = 0x40000dc4;
139139
pm_extend_tbtt_adaptive_servo = 0x40000dc8;
@@ -151,9 +151,9 @@ pm_twt_set_target_tsf = 0x40000df4;
151151
pm_enable_twt_keep_alive_timer = 0x40000df8;
152152
/*pm_mac_try_enable_modem_state = 0x40000dfc;*/
153153
pm_beacon_monitor_tbtt_timeout_process = 0x40000e00;
154-
pm_update_next_tbtt = 0x40000e04;
154+
//pm_update_next_tbtt = 0x40000e04;
155155
pm_twt_disallow_tx = 0x40000e08;
156-
pm_clear_wakeup_signal = 0x40000e0c;
156+
//pm_clear_wakeup_signal = 0x40000e0c;
157157
//pm_mac_disable_tsf_tbtt_soc_wakeup = 0x40000e10;
158158
//pm_mac_disable_tsf_tbtt_modem_wakeup = 0x40000e14;
159159
//pm_mac_enable_tsf_tbtt_soc_wakeup = 0x40000e18;
@@ -462,9 +462,9 @@ pm_coex_schm_overall_period_get = 0x40001504;
462462
//pm_coex_pwr_update = 0x40001508;
463463
ppRemoveHEAMPDUflags = 0x4000150c;
464464
tsf_hal_get_tbtt_interval = 0x40001510;
465-
pm_beacon_monitor_tbtt_start = 0x40001514;
465+
//pm_beacon_monitor_tbtt_start = 0x40001514;
466466
pm_save_tbtt_info = 0x40001518;
467-
pm_get_tbtt_count = 0x4000151c;
467+
//pm_get_tbtt_count = 0x4000151c;
468468
tsf_hal_get_time = 0x40001520;
469469
tsf_hal_get_counter_value = 0x40001524;
470470

@@ -488,10 +488,10 @@ pm_beacon_offset_is_enabled = 0x400015bc;
488488
pm_beacon_offset_is_sampling = 0x400015c0;
489489
pm_beacon_offset_add_total_counter = 0x400015c4;
490490
pm_beacon_offset_add_loss_counter = 0x400015c8;
491-
pm_beacon_offset_check = 0x400015cc;
492-
pm_beacon_offset_get_average = 0x400015d0;
493-
pm_beacon_offset_get_expect = 0x400015d4;
494-
pm_beacon_offset_get_params = 0x400015d8;
491+
//pm_beacon_offset_check = 0x400015cc;
492+
//pm_beacon_offset_get_average = 0x400015d0;
493+
//pm_beacon_offset_get_expect = 0x400015d4;
494+
//pm_beacon_offset_get_params = 0x400015d8;
495495
/* Data (.data, .bss, .rodata) */
496496
s_tbttstart_ptr = 0x4085fc68;
497497
s_pm_beacon_offset_ptr = 0x4085fc64;

components/esp_system/port/soc/esp32c5/system_internal.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "soc/rtc_periph.h"
2323
#include "soc/uart_reg.h"
2424
#include "hal/wdt_hal.h"
25+
#include "hal/uart_ll.h"
2526
#if SOC_MODEM_CLOCK_SUPPORTED
2627
#include "hal/modem_syscon_ll.h"
2728
#include "hal/modem_lpcon_ll.h"
@@ -82,6 +83,10 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
8283
CLEAR_PERI_REG_MASK(PCR_RSA_CONF_REG, PCR_RSA_RST_EN);
8384
SET_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
8485
CLEAR_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
86+
87+
// UART's sclk is controlled in the PCR register and does not reset with the UART module. The ROM missed enabling
88+
// it when initializing the ROM UART. If it is not turned on, it will trigger LP_WDT in the ROM.
89+
uart_ll_sclk_enable(&UART0);
8590
}
8691

8792
/* "inner" restart function for after RTOS, interrupts & anything else on this

components/esp_system/port/soc/esp32c6/system_internal.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "esp_private/rtc_clk.h"
2121
#include "soc/rtc_periph.h"
2222
#include "soc/uart_reg.h"
23+
#include "hal/uart_ll.h"
2324
#include "hal/wdt_hal.h"
2425
#include "hal/modem_syscon_ll.h"
2526
#include "hal/modem_lpcon_ll.h"
@@ -75,6 +76,10 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
7576
CLEAR_PERI_REG_MASK(PCR_HMAC_CONF_REG, PCR_HMAC_RST_EN);
7677
CLEAR_PERI_REG_MASK(PCR_RSA_CONF_REG, PCR_RSA_RST_EN);
7778
CLEAR_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
79+
80+
// UART's sclk is controlled in the PCR register and does not reset with the UART module. The ROM missed enabling
81+
// it when initializing the ROM UART. If it is not turned on, it will trigger LP_WDT in the ROM.
82+
uart_ll_sclk_enable(&UART0);
7883
}
7984

8085
/* "inner" restart function for after RTOS, interrupts & anything else on this

components/esp_system/port/soc/esp32c61/system_internal.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "esp_private/rtc_clk.h"
2121
#include "soc/rtc_periph.h"
2222
#include "soc/uart_reg.h"
23+
#include "hal/uart_ll.h"
2324
#include "hal/wdt_hal.h"
2425
#include "esp_private/cache_err_int.h"
2526

@@ -82,6 +83,10 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
8283
CLEAR_PERI_REG_MASK(PCR_RSA_CONF_REG, PCR_RSA_RST_EN);
8384
SET_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
8485
CLEAR_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
86+
87+
// UART's sclk is controlled in the PCR register and does not reset with the UART module. The ROM missed enabling
88+
// it when initializing the ROM UART. If it is not turned on, it will trigger LP_WDT in the ROM.
89+
uart_ll_sclk_enable(&UART0);
8590
}
8691

8792
/* "inner" restart function for after RTOS, interrupts & anything else on this

components/esp_system/port/soc/esp32h2/system_internal.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "soc/uart_reg.h"
2424
#include "hal/wdt_hal.h"
2525
#include "hal/spimem_flash_ll.h"
26+
#include "hal/uart_ll.h"
2627
#include "esp_private/cache_err_int.h"
2728
#include "esp_private/mspi_timing_tuning.h"
2829

@@ -73,6 +74,10 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
7374
CLEAR_PERI_REG_MASK(PCR_HMAC_CONF_REG, PCR_HMAC_RST_EN);
7475
CLEAR_PERI_REG_MASK(PCR_RSA_CONF_REG, PCR_RSA_RST_EN);
7576
CLEAR_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
77+
78+
// UART's sclk is controlled in the PCR register and does not reset with the UART module. The ROM missed enabling
79+
// it when initializing the ROM UART. If it is not turned on, it will trigger LP_WDT in the ROM.
80+
uart_ll_sclk_enable(&UART0);
7681
}
7782

7883
/* "inner" restart function for after RTOS, interrupts & anything else on this

components/esp_system/port/soc/esp32h21/system_internal.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "esp_private/rtc_clk.h"
2121
#include "soc/rtc_periph.h"
2222
#include "soc/uart_reg.h"
23+
#include "hal/uart_ll.h"
2324
#include "hal/wdt_hal.h"
2425
#include "hal/spimem_flash_ll.h"
2526
#include "esp_private/cache_err_int.h"
@@ -77,6 +78,10 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
7778
CLEAR_PERI_REG_MASK(PCR_RSA_CONF_REG, PCR_RSA_RST_EN);
7879
SET_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
7980
CLEAR_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
81+
82+
// UART's sclk is controlled in the PCR register and does not reset with the UART module. The ROM missed enabling
83+
// it when initializing the ROM UART. If it is not turned on, it will trigger LP_WDT in the ROM.
84+
uart_ll_sclk_enable(&UART0);
8085
}
8186

8287
/* "inner" restart function for after RTOS, interrupts & anything else on this

components/esp_system/port/soc/esp32h4/system_internal.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "soc/rtc_periph.h"
2121
#include "soc/uart_reg.h"
2222
#include "hal/wdt_hal.h"
23+
#include "hal/uart_ll.h"
2324

2425
#include "esp32h4/rom/cache.h"
2526
// TODO: IDF-11911 need refactor
@@ -69,6 +70,10 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
6970
CLEAR_PERI_REG_MASK(PCR_HMAC_CONF_REG, PCR_HMAC_RST_EN);
7071
SET_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
7172
CLEAR_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
73+
74+
// UART's sclk is controlled in the PCR register and does not reset with the UART module. The ROM missed enabling
75+
// it when initializing the ROM UART. If it is not turned on, it will trigger LP_WDT in the ROM.
76+
uart_ll_sclk_enable(&UART0);
7277
}
7378

7479
/* "inner" restart function for after RTOS, interrupts & anything else on this

0 commit comments

Comments
 (0)