mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-25 21:03:54 +00:00
Merge branch 'bugfix/fix_chip_hangup' into 'master'
bugfix: clear regdma status when restart See merge request espressif/esp-idf!43860
This commit is contained in:
@@ -58,6 +58,7 @@ void esp_system_reset_modules_on_exit(void)
|
||||
SET_PERI_REG_MASK(PCR_SDIO_SLAVE_CONF_REG, PCR_SDIO_SLAVE_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);
|
||||
@@ -69,6 +70,7 @@ void esp_system_reset_modules_on_exit(void)
|
||||
CLEAR_PERI_REG_MASK(PCR_PWM_CONF_REG, PCR_PWM_RST_EN);
|
||||
CLEAR_PERI_REG_MASK(PCR_SDIO_SLAVE_CONF_REG, PCR_SDIO_SLAVE_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.
|
||||
|
||||
@@ -53,6 +53,7 @@ void 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);
|
||||
@@ -79,6 +80,7 @@ void 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);
|
||||
|
||||
// UART's sclk is controlled in the PCR register and does not reset with the UART module. The ROM missed enabling
|
||||
// it when initializing the ROM UART. If it is not turned on, it will trigger LP_WDT in the ROM.
|
||||
|
||||
@@ -58,6 +58,7 @@ void esp_system_reset_modules_on_exit(void)
|
||||
SET_PERI_REG_MASK(PCR_SDIO_SLAVE_CONF_REG, PCR_SDIO_SLAVE_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);
|
||||
@@ -68,6 +69,7 @@ void esp_system_reset_modules_on_exit(void)
|
||||
CLEAR_PERI_REG_MASK(PCR_MODEM_CONF_REG, PCR_MODEM_RST_EN);
|
||||
CLEAR_PERI_REG_MASK(PCR_SDIO_SLAVE_CONF_REG, PCR_SDIO_SLAVE_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.
|
||||
|
||||
@@ -50,6 +50,7 @@ void 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);
|
||||
@@ -60,6 +61,7 @@ void 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.
|
||||
|
||||
@@ -51,6 +51,7 @@ void 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);
|
||||
@@ -61,6 +62,7 @@ void 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.
|
||||
|
||||
@@ -46,6 +46,7 @@ void esp_system_reset_modules_on_exit(void)
|
||||
SET_PERI_REG_MASK(PCR_PWM1_CONF_REG, PCR_PWM1_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);
|
||||
@@ -57,6 +58,7 @@ void esp_system_reset_modules_on_exit(void)
|
||||
CLEAR_PERI_REG_MASK(PCR_PWM0_CONF_REG, PCR_PWM0_RST_EN);
|
||||
CLEAR_PERI_REG_MASK(PCR_PWM1_CONF_REG, PCR_PWM1_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