Merge branch 'feature/esp32c5_apm_api' into 'master'

feat: add APM support for esp32c5

See merge request espressif/esp-idf!31964
This commit is contained in:
Mahavir Jain
2024-07-11 13:22:45 +08:00
9 changed files with 531 additions and 32 deletions
@@ -16,12 +16,6 @@
#include "hal/apm_hal.h"
#endif
#if CONFIG_IDF_TARGET_ESP32C5 // TODO: IDF-8615 Remove the workaround when APM supported on C5!
#include "soc/hp_apm_reg.h"
#include "soc/lp_apm_reg.h"
#include "soc/lp_apm0_reg.h"
#endif
void bootloader_init_mem(void)
{
@@ -38,13 +32,6 @@ void bootloader_init_mem(void)
#endif
#endif
#if CONFIG_IDF_TARGET_ESP32C5 // TODO: IDF-8615 Remove the workaround when APM supported on C5!
// disable apm filter
REG_WRITE(LP_APM_FUNC_CTRL_REG, 0);
REG_WRITE(LP_APM0_FUNC_CTRL_REG, 0);
REG_WRITE(HP_APM_FUNC_CTRL_REG, 0);
#endif
#ifdef CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE
// protect memory region
esp_cpu_configure_region_protection();