Merge branch 'feature/esp32c5beta3_light_sleep_support_stage_2' into 'master'

feat(esp_hw_support): esp32c5 sleep support (Stage 3:  support system peripheral sleep retention)

Closes IDF-8640

See merge request espressif/esp-idf!29723
This commit is contained in:
Jiang Jiang Jian
2024-04-15 14:40:52 +08:00
16 changed files with 837 additions and 55 deletions

View File

@@ -13,6 +13,7 @@
#include "soc/soc.h"
#include "soc/pau_reg.h"
#include "soc/pau_struct.h"
#include "soc/pcr_struct.h"
#include "hal/pau_types.h"
#include "hal/assert.h"
@@ -20,6 +21,17 @@
extern "C" {
#endif
static inline void pau_ll_enable_bus_clock(bool enable)
{
if (enable) {
PCR.regdma_conf.regdma_clk_en = 1;
PCR.regdma_conf.regdma_rst_en = 0;
} else {
PCR.regdma_conf.regdma_clk_en = 0;
PCR.regdma_conf.regdma_rst_en = 1;
}
}
static inline uint32_t pau_ll_get_regdma_backup_flow_error(pau_dev_t *dev)
{
#if CONFIG_IDF_TARGET_ESP32C5_BETA3_VERSION