mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 10:40:47 +03:00
feat(ulp): add support for ulp on esp32s31
This commit is contained in:
@@ -13,6 +13,11 @@
|
||||
#include "esp_cpu.h"
|
||||
|
||||
#include "hal/apm_hal.h"
|
||||
#if CONFIG_IDF_TARGET_ESP32S31
|
||||
#include "soc/hp_peri0_pms_reg.h"
|
||||
#include "soc/hp_peri1_pms_reg.h"
|
||||
#include "soc/lp_peri_pms_reg.h"
|
||||
#endif
|
||||
|
||||
void bootloader_init_mem(void)
|
||||
{
|
||||
@@ -37,6 +42,22 @@ void bootloader_init_mem(void)
|
||||
#endif // SOC_APM_CTRL_FILTER_SUPPORTED
|
||||
#endif
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32S31
|
||||
/* TODO: [ESP32S31] IDF-14620
|
||||
As a temp. fix to allow ULP access to all peripherals during bringup.
|
||||
Open all LP/HP peripheral PMS control registers for all security modes.
|
||||
*/
|
||||
for (uint32_t reg = LP_PERI_PMS_LP_SYSREG_CTRL_REG; reg <= LP_PERI_PMS_LP_DAC_CTRL_REG; reg += 4) {
|
||||
REG_WRITE(reg, 0xFF);
|
||||
}
|
||||
for (uint32_t reg = HP_PERI0_PMS_TRACE0_CTRL_REG; reg <= HP_PERI0_PMS_AXI_PERF_MON_CTRL_REG; reg += 4) {
|
||||
REG_WRITE(reg, 0xFF);
|
||||
}
|
||||
for (uint32_t reg = HP_PERI1_PMS_HP_USBOTG_PHY_CTRL_REG; reg <= HP_PERI1_PMS_HP_PERI1_PMS_CTRL_REG; reg += 4) {
|
||||
REG_WRITE(reg, 0xFF);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE
|
||||
// protect memory region
|
||||
esp_cpu_configure_region_protection();
|
||||
|
||||
Reference in New Issue
Block a user