mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(hal): Force HUK power up when configuring HUK for ESP32-C5
This commit is contained in:
@@ -29,6 +29,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static inline void huk_ll_power_up(void)
|
||||
{
|
||||
/* huk force_pd MUST be cleared!!! */
|
||||
REG_CLR_BIT(LP_AON_MEM_CTRL_REG, LP_AON_HUK_MEM_FORCE_PD);
|
||||
/* huk force_pu MUST be set!!! */
|
||||
REG_SET_BIT(LP_AON_MEM_CTRL_REG, LP_AON_HUK_MEM_FORCE_PU);
|
||||
}
|
||||
|
||||
/* @brief Configure the HUK mode */
|
||||
static inline void huk_ll_configure_mode(const esp_huk_mode_t huk_mode)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -27,6 +27,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static inline void huk_ll_power_up(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/* @brief Configure the HUK mode */
|
||||
static inline void huk_ll_configure_mode(const esp_huk_mode_t huk_mode)
|
||||
{
|
||||
|
||||
@@ -30,6 +30,8 @@ static void inline huk_hal_wait_for_state(esp_huk_state_t state)
|
||||
|
||||
esp_err_t huk_hal_configure(const esp_huk_mode_t huk_mode, uint8_t *huk_info_buf)
|
||||
{
|
||||
huk_ll_power_up();
|
||||
|
||||
if (esp_rom_km_huk_conf(huk_mode, huk_info_buf) != ETS_OK) {
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user