Skip to content

Commit

Permalink
Merge branch 'bugfix/update_jtag_disabling_api_v5.2' into 'release/v5.2'
Browse files Browse the repository at this point in the history
fix(esp_hw_support): fix API esp_hmac_disable_jtag() to disable JTAG (v5.2)

See merge request espressif/esp-idf!28492
  • Loading branch information
mahavirj committed Feb 16, 2024
2 parents 360ecf5 + 8e5347a commit 1bd76ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/esp_hw_support/esp_hmac.c
Expand Up @@ -197,7 +197,9 @@ esp_err_t esp_hmac_jtag_enable(hmac_key_id_t key_id, const uint8_t *token)
esp_err_t esp_hmac_jtag_disable()
{
esp_crypto_hmac_lock_acquire();
ets_hmac_enable();
REG_WRITE(HMAC_SET_INVALIDATE_JTAG_REG, 1);
ets_hmac_disable();
esp_crypto_hmac_lock_release();

ESP_LOGD(TAG, "Invalidate JTAG result register. JTAG disabled.");
Expand Down Expand Up @@ -279,7 +281,9 @@ esp_err_t esp_hmac_jtag_disable()
{
esp_crypto_dma_lock_acquire();

ets_hmac_enable();
REG_WRITE(HMAC_SET_INVALIDATE_JTAG_REG, 1);
ets_hmac_disable();

esp_crypto_dma_lock_release();

Expand Down

0 comments on commit 1bd76ee

Please sign in to comment.