diff --git a/components/esp_security/src/esp_dpa_protection.c b/components/esp_security/src/esp_dpa_protection.c index 19e9435373..f9f5e19714 100644 --- a/components/esp_security/src/esp_dpa_protection.c +++ b/components/esp_security/src/esp_dpa_protection.c @@ -16,10 +16,12 @@ static inline void esp_crypto_dpa_set_level(esp_crypto_dpa_sec_level_t level) REG_SET_FIELD(HP_SYSTEM_SEC_DPA_CONF_REG, HP_SYSTEM_SEC_DPA_LEVEL, level); } +#if CONFIG_ESP_CRYPTO_DPA_PROTECTION_AT_STARTUP void esp_crypto_dpa_protection_startup(void) { esp_crypto_dpa_set_level(CONFIG_ESP_CRYPTO_DPA_PROTECTION_LEVEL); } +#endif void esp_crypto_dpa_protection_enable(esp_crypto_dpa_sec_level_t level) { diff --git a/components/esp_security/src/esp_security_priv.h b/components/esp_security/src/esp_security_priv.h index 18cba2c90f..f17d6c4e4d 100644 --- a/components/esp_security/src/esp_security_priv.h +++ b/components/esp_security/src/esp_security_priv.h @@ -5,7 +5,10 @@ */ #pragma once +#include "sdkconfig.h" /* Private interface file */ +#if CONFIG_ESP_CRYPTO_DPA_PROTECTION_AT_STARTUP void esp_crypto_dpa_protection_startup(void); +#endif