mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
fix(esp_system): reset EMAC on restart for ESP32-P4
Closes https://github.com/espressif/esp-idf/issues/19085
This commit is contained in:
@@ -113,6 +113,12 @@ void esp_system_reset_modules_on_exit(void)
|
||||
SET_PERI_REG_MASK(LP_CLKRST_HP_SDMMC_EMAC_RST_CTRL_REG, LP_CLKRST_RST_EN_SDMMC);
|
||||
CLEAR_PERI_REG_MASK(LP_CLKRST_HP_SDMMC_EMAC_RST_CTRL_REG, LP_CLKRST_RST_EN_SDMMC);
|
||||
|
||||
// Likewise the EMAC DMA: its descriptor ring and receive buffers live in the
|
||||
// heap, so a receive left running across a restart writes incoming frames
|
||||
// into memory the next boot has already handed out.
|
||||
SET_PERI_REG_MASK(LP_CLKRST_HP_SDMMC_EMAC_RST_CTRL_REG, LP_CLKRST_RST_EN_EMAC);
|
||||
CLEAR_PERI_REG_MASK(LP_CLKRST_HP_SDMMC_EMAC_RST_CTRL_REG, LP_CLKRST_RST_EN_EMAC);
|
||||
|
||||
// Reset crypto peripherals. This ensures a clean state for the crypto peripherals after a CPU restart
|
||||
// and hence avoiding any possibility with crypto failure in ROM security workflows.
|
||||
SET_PERI_REG_MASK(HP_SYS_CLKRST_HP_RST_EN2_REG, HP_SYS_CLKRST_REG_RST_EN_CRYPTO);
|
||||
|
||||
Reference in New Issue
Block a user