mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/cpu_reset_perip_clk_disable_v4.2' into 'release/v4.2'
esp_system: Peripheral clocks faulty become disabled during cpu reset (backport v4.2) See merge request espressif/esp-idf!15486
This commit is contained in:
commit
a07f18ff9f
@ -263,9 +263,9 @@ void esp_perip_clk_init(void)
|
||||
/* For reason that only reset CPU, do not disable the clocks
|
||||
* that have been enabled before reset.
|
||||
*/
|
||||
if ((rst_reas[0] >= TGWDT_CPU_RESET && rst_reas[0] <= RTCWDT_CPU_RESET)
|
||||
if ((rst_reas[0] == TGWDT_CPU_RESET || rst_reas[0] == SW_CPU_RESET || rst_reas[0] == RTCWDT_CPU_RESET)
|
||||
#if !CONFIG_FREERTOS_UNICORE
|
||||
|| (rst_reas[1] >= TGWDT_CPU_RESET && rst_reas[1] <= RTCWDT_CPU_RESET)
|
||||
|| (rst_reas[1] == TGWDT_CPU_RESET || rst_reas[1] == SW_CPU_RESET || rst_reas[1] == RTCWDT_CPU_RESET)
|
||||
#endif
|
||||
) {
|
||||
common_perip_clk = ~DPORT_READ_PERI_REG(DPORT_PERIP_CLK_EN_REG);
|
||||
|
@ -229,9 +229,10 @@ void esp_perip_clk_init(void)
|
||||
/* For reason that only reset CPU, do not disable the clocks
|
||||
* that have been enabled before reset.
|
||||
*/
|
||||
if (rst_reas[0] >= TG0WDT_CPU_RESET &&
|
||||
rst_reas[0] <= TG0WDT_CPU_RESET &&
|
||||
rst_reas[0] != RTCWDT_BROWN_OUT_RESET) {
|
||||
if (rst_reas[0] == TG0WDT_CPU_RESET ||
|
||||
rst_reas[0] == RTC_SW_CPU_RESET ||
|
||||
rst_reas[0] == RTCWDT_CPU_RESET ||
|
||||
rst_reas[0] == TG1WDT_CPU_RESET) {
|
||||
common_perip_clk = ~DPORT_READ_PERI_REG(DPORT_PERIP_CLK_EN_REG);
|
||||
hwcrypto_perip_clk = ~DPORT_READ_PERI_REG(DPORT_PERIP_CLK_EN1_REG);
|
||||
wifi_bt_sdio_clk = ~DPORT_READ_PERI_REG(DPORT_WIFI_CLK_EN_REG);
|
||||
|
Loading…
Reference in New Issue
Block a user