From dbf1241ae2399b6678f2a45848985a7727698ffc Mon Sep 17 00:00:00 2001 From: Li Shuai Date: Mon, 17 Oct 2022 11:07:51 +0800 Subject: [PATCH] backup dma: force clear reset signal to fix the backup dma operation failure caused by RTC_SW_CPU_RST --- components/esp_system/port/soc/esp32s3/clk.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/esp_system/port/soc/esp32s3/clk.c b/components/esp_system/port/soc/esp32s3/clk.c index ca2f282820f..3514940dcd1 100644 --- a/components/esp_system/port/soc/esp32s3/clk.c +++ b/components/esp_system/port/soc/esp32s3/clk.c @@ -306,6 +306,11 @@ __attribute__((weak)) void esp_perip_clk_init(void) CLEAR_PERI_REG_MASK(SYSTEM_PERIP_CLK_EN1_REG, hwcrypto_perip_clk); SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN1_REG, hwcrypto_perip_clk); + /* Force clear backup dma reset signal. This is a fix to the backup dma + * implementation in the ROM, the reset signal was not cleared when the + * backup dma was started, which caused the backup dma operation to fail. */ + CLEAR_PERI_REG_MASK(SYSTEM_PERIP_RST_EN1_REG, SYSTEM_PERI_BACKUP_RST); + /* Disable WiFi/BT/SDIO clocks. */ CLEAR_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, wifi_bt_sdio_clk); SET_PERI_REG_MASK(SYSTEM_WIFI_CLK_EN_REG, SYSTEM_WIFI_CLK_EN);