mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
fix(wifi): clear regdma status when restart
This commit is contained in:
@@ -51,6 +51,7 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
|
||||
SET_PERI_REG_MASK(PCR_PWM_CONF_REG, PCR_PWM_RST_EN);
|
||||
//ETM may directly control the GPIO or other peripherals even after CPU reset. Reset to stop these control.
|
||||
SET_PERI_REG_MASK(PCR_ETM_CONF_REG, PCR_ETM_RST_EN);
|
||||
SET_PERI_REG_MASK(PCR_REGDMA_CONF_REG, PCR_REGDMA_RST_EN);
|
||||
|
||||
// Clear Peripheral clk rst
|
||||
CLEAR_PERI_REG_MASK(PCR_MSPI_CONF_REG, PCR_MSPI_RST_EN);
|
||||
@@ -77,6 +78,7 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
|
||||
CLEAR_PERI_REG_MASK(PCR_HMAC_CONF_REG, PCR_HMAC_RST_EN);
|
||||
CLEAR_PERI_REG_MASK(PCR_RSA_CONF_REG, PCR_RSA_RST_EN);
|
||||
CLEAR_PERI_REG_MASK(PCR_SHA_CONF_REG, PCR_SHA_RST_EN);
|
||||
CLEAR_PERI_REG_MASK(PCR_REGDMA_CONF_REG, PCR_REGDMA_RST_EN);
|
||||
}
|
||||
|
||||
/* "inner" restart function for after RTOS, interrupts & anything else on this
|
||||
|
||||
@@ -48,6 +48,7 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
|
||||
SET_PERI_REG_MASK(PCR_PWM_CONF_REG, PCR_PWM_RST_EN);
|
||||
//ETM may directly control the GPIO or other peripherals even after CPU reset. Reset to stop these control.
|
||||
SET_PERI_REG_MASK(PCR_ETM_CONF_REG, PCR_ETM_RST_EN);
|
||||
SET_PERI_REG_MASK(PCR_REGDMA_CONF_REG, PCR_REGDMA_RST_EN);
|
||||
|
||||
// Clear Peripheral clk rst
|
||||
CLEAR_PERI_REG_MASK(PCR_MSPI_CONF_REG, PCR_MSPI_RST_EN);
|
||||
@@ -58,6 +59,7 @@ void IRAM_ATTR esp_system_reset_modules_on_exit(void)
|
||||
CLEAR_PERI_REG_MASK(PCR_MODEM_CONF_REG, PCR_MODEM_RST_EN);
|
||||
CLEAR_PERI_REG_MASK(PCR_PWM_CONF_REG, PCR_PWM_RST_EN);
|
||||
CLEAR_PERI_REG_MASK(PCR_ETM_CONF_REG, PCR_ETM_RST_EN);
|
||||
CLEAR_PERI_REG_MASK(PCR_REGDMA_CONF_REG, PCR_REGDMA_RST_EN);
|
||||
|
||||
// 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.
|
||||
|
||||
Reference in New Issue
Block a user