mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 12:44:33 +02:00
system: update edma reset in system_api_esp32c3/s3.c
This commit is contained in:
@@ -100,16 +100,12 @@ void IRAM_ATTR esp_restart_noos(void)
|
|||||||
|
|
||||||
// Reset timer/spi/uart
|
// Reset timer/spi/uart
|
||||||
SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN0_REG,
|
SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN0_REG,
|
||||||
SYSTEM_TIMERS_RST | SYSTEM_SPI01_RST | SYSTEM_UART_RST | SYSTEM_SPI3_DMA_RST | SYSTEM_SPI2_DMA_RST);
|
SYSTEM_TIMERS_RST | SYSTEM_SPI01_RST | SYSTEM_UART_RST);
|
||||||
REG_WRITE(SYSTEM_PERIP_RST_EN0_REG, 0);
|
REG_WRITE(SYSTEM_PERIP_RST_EN0_REG, 0);
|
||||||
|
|
||||||
// Reset dma
|
// Reset dma
|
||||||
SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN1_REG, SYSTEM_DMA_RST);
|
SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN1_REG, SYSTEM_DMA_RST);
|
||||||
REG_WRITE(SYSTEM_PERIP_RST_EN1_REG, 0);
|
REG_WRITE(SYSTEM_PERIP_RST_EN1_REG, 0);
|
||||||
|
|
||||||
SET_PERI_REG_MASK(SYSTEM_EDMA_CTRL_REG, SYSTEM_EDMA_RESET);
|
|
||||||
CLEAR_PERI_REG_MASK(SYSTEM_EDMA_CTRL_REG, SYSTEM_EDMA_RESET);
|
|
||||||
|
|
||||||
// Set CPU back to XTAL source, no PLL, same as hard reset
|
// Set CPU back to XTAL source, no PLL, same as hard reset
|
||||||
#if !CONFIG_IDF_ENV_FPGA
|
#if !CONFIG_IDF_ENV_FPGA
|
||||||
rtc_clk_cpu_freq_set_xtal();
|
rtc_clk_cpu_freq_set_xtal();
|
||||||
|
@@ -98,13 +98,16 @@ void IRAM_ATTR esp_restart_noos(void)
|
|||||||
|
|
||||||
// Reset timer/spi/uart
|
// Reset timer/spi/uart
|
||||||
SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN0_REG,
|
SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN0_REG,
|
||||||
SYSTEM_TIMERS_RST | SYSTEM_SPI01_RST | SYSTEM_UART_RST | SYSTEM_SPI3_DMA_RST | SYSTEM_SPI2_DMA_RST);
|
SYSTEM_TIMERS_RST | SYSTEM_SPI01_RST | SYSTEM_UART_RST);
|
||||||
REG_WRITE(SYSTEM_PERIP_RST_EN0_REG, 0);
|
REG_WRITE(SYSTEM_PERIP_RST_EN0_REG, 0);
|
||||||
|
|
||||||
// Reset dma
|
// Reset dma
|
||||||
SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN1_REG, SYSTEM_DMA_RST);
|
SET_PERI_REG_MASK(SYSTEM_PERIP_RST_EN1_REG, SYSTEM_DMA_RST);
|
||||||
REG_WRITE(SYSTEM_PERIP_RST_EN1_REG, 0);
|
REG_WRITE(SYSTEM_PERIP_RST_EN1_REG, 0);
|
||||||
|
|
||||||
|
SET_PERI_REG_MASK(SYSTEM_EDMA_CTRL_REG, SYSTEM_EDMA_RESET);
|
||||||
|
CLEAR_PERI_REG_MASK(SYSTEM_EDMA_CTRL_REG, SYSTEM_EDMA_RESET);
|
||||||
|
|
||||||
// Set CPU back to XTAL source, no PLL, same as hard reset
|
// Set CPU back to XTAL source, no PLL, same as hard reset
|
||||||
#if !CONFIG_IDF_ENV_FPGA
|
#if !CONFIG_IDF_ENV_FPGA
|
||||||
rtc_clk_cpu_freq_set_xtal();
|
rtc_clk_cpu_freq_set_xtal();
|
||||||
|
Reference in New Issue
Block a user