feat: enable HMAC peripheral support for ESP32-H4

This commit is contained in:
nilesh.kale
2026-04-09 14:29:57 +05:30
parent ff58d2e93d
commit b3243dc6de
9 changed files with 239 additions and 12 deletions
+5 -1
View File
@@ -16,9 +16,9 @@
#include "esp_crypto_periph_clk.h"
#include "soc/hwcrypto_reg.h"
#include "soc/system_reg.h"
#include "soc/soc_caps.h"
#if !CONFIG_IDF_TARGET_ESP32S2
#include "hal/ds_ll.h"
#include "hal/hmac_hal.h"
#include "hal/hmac_ll.h"
#include "hal/sha_ll.h"
@@ -75,7 +75,9 @@ esp_err_t esp_hmac_calculate(hmac_key_id_t key_id,
esp_crypto_sha_enable_periph_clk(true);
#if SOC_DIG_SIGN_SUPPORTED
esp_crypto_ds_enable_periph_clk(true);
#endif
#if SOC_KEY_MANAGER_HMAC_KEY_DEPLOY
/* Key Manager holds the key usage selector register(efuse vs own key).
@@ -149,7 +151,9 @@ esp_err_t esp_hmac_calculate(hmac_key_id_t key_id,
esp_crypto_key_mgr_enable_periph_clk(false);
#endif /* SOC_KEY_MANAGER_HMAC_KEY_DEPLOY */
#if SOC_DIG_SIGN_SUPPORTED
esp_crypto_ds_enable_periph_clk(false);
#endif
esp_crypto_sha_enable_periph_clk(false);