diff --git a/components/bt/controller/esp32h2/bt.c b/components/bt/controller/esp32h2/bt.c index e12983f1bc..da0597602b 100644 --- a/components/bt/controller/esp32h2/bt.c +++ b/components/bt/controller/esp32h2/bt.c @@ -224,7 +224,7 @@ struct ext_funcs_t ext_funcs_ro = { static int IRAM_ATTR esp_reset_rpa_moudle(void) { - // periph_module_reset(PERIPH_MODEM_RPA_MODULE); + periph_module_reset(PERIPH_MODEM_RPA_MODULE); return 0; } diff --git a/components/hal/esp32h2/include/hal/clk_gate_ll.h b/components/hal/esp32h2/include/hal/clk_gate_ll.h index 0df0e602ff..6cbd50965e 100644 --- a/components/hal/esp32h2/include/hal/clk_gate_ll.h +++ b/components/hal/esp32h2/include/hal/clk_gate_ll.h @@ -67,6 +67,8 @@ static inline uint32_t periph_ll_get_clk_en_mask(periph_module_t periph) return SYSTEM_TSENS_CLK_EN; case PERIPH_ETM_MODULE: return SYSTEM_ETM_CLK_EN; + case PERIPH_MODEM_RPA_MODULE: + return SYSTEM_BLE_SEC_AAR_CLK_EN; default: return 0; } @@ -142,6 +144,8 @@ static inline uint32_t periph_ll_get_rst_en_mask(periph_module_t periph, bool en return SYSTEM_CRYPTO_DS_RST; case PERIPH_ETM_MODULE: return SYSTEM_ETM_RST; + case PERIPH_MODEM_RPA_MODULE: + return SYSTEM_BLE_SEC_AAR_RST; default: return 0; } @@ -162,6 +166,8 @@ static uint32_t periph_ll_get_clk_en_reg(periph_module_t periph) return SYSTEM_PERIP_CLK_EN1_REG; case PERIPH_BT_MODULE: return SYSTEM_MODEM_CLK_EN_REG; + case PERIPH_MODEM_RPA_MODULE: + return SYSTEM_MODEM_CLK_EN_REG; default: return SYSTEM_PERIP_CLK_EN0_REG; } @@ -182,6 +188,8 @@ static uint32_t periph_ll_get_rst_en_reg(periph_module_t periph) return SYSTEM_PERIP_RST_EN1_REG; case PERIPH_BT_MODULE: return SYSTEM_MODEM_RST_EN_REG; + case PERIPH_MODEM_RPA_MODULE: + return SYSTEM_MODEM_RST_EN_REG; default: return SYSTEM_PERIP_RST_EN0_REG; } diff --git a/components/soc/esp32h2/include/soc/periph_defs.h b/components/soc/esp32h2/include/soc/periph_defs.h index c6785b87dd..352a320924 100644 --- a/components/soc/esp32h2/include/soc/periph_defs.h +++ b/components/soc/esp32h2/include/soc/periph_defs.h @@ -41,6 +41,7 @@ typedef enum { PERIPH_SARADC_MODULE, PERIPH_TEMPSENSOR_MODULE, PERIPH_ETM_MODULE, + PERIPH_MODEM_RPA_MODULE, PERIPH_MODULE_MAX } periph_module_t;