Skip to content

Commit 4b13be6

Browse files
committed
Merge branch 'bugfix/update_jtag_disabling_api_v5.0' into 'release/v5.0'
fix(esp_hw_support): fix API esp_hmac_disable_jtag() to disable JTAG (v5.0) See merge request espressif/esp-idf!28502
2 parents 44593bf + 1cd2bb4 commit 4b13be6

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

components/esp_hw_support/port/esp32c3/esp_hmac.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ esp_err_t esp_hmac_jtag_enable(hmac_key_id_t key_id, const uint8_t *token)
169169
esp_err_t esp_hmac_jtag_disable()
170170
{
171171
esp_crypto_hmac_lock_acquire();
172-
172+
ets_hmac_enable();
173173
REG_SET_BIT(HMAC_SET_INVALIDATE_JTAG_REG, HMAC_INVALIDATE_JTAG);
174-
174+
ets_hmac_disable();
175175
esp_crypto_hmac_lock_release();
176176

177177
ESP_LOGD(TAG, "Invalidate JTAG result register. JTAG disabled.");

components/esp_hw_support/port/esp32h2/esp_hmac.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -169,9 +169,9 @@ esp_err_t esp_hmac_jtag_enable(hmac_key_id_t key_id, const uint8_t *token)
169169
esp_err_t esp_hmac_jtag_disable()
170170
{
171171
esp_crypto_hmac_lock_acquire();
172-
172+
ets_hmac_enable();
173173
REG_SET_BIT(HMAC_SET_INVALIDATE_JTAG_REG, HMAC_INVALIDATE_JTAG);
174-
174+
ets_hmac_disable();
175175
esp_crypto_hmac_lock_release();
176176

177177
ESP_LOGD(TAG, "Invalidate JTAG result register. JTAG disabled.");

components/esp_hw_support/port/esp32s2/esp_hmac.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ esp_err_t esp_hmac_jtag_enable(hmac_key_id_t key_id, const uint8_t *token)
8989
esp_err_t esp_hmac_jtag_disable()
9090
{
9191
esp_crypto_dma_lock_acquire();
92-
92+
ets_hmac_enable();
9393
REG_WRITE(HMAC_SET_INVALIDATE_JTAG_REG, 1);
94-
94+
ets_hmac_disable();
9595
esp_crypto_dma_lock_release();
9696

9797
ESP_LOGD(TAG, "Invalidate JTAG result register. JTAG disabled.");

components/esp_hw_support/port/esp32s3/esp_hmac.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ esp_err_t esp_hmac_jtag_enable(hmac_key_id_t key_id, const uint8_t *token)
170170
esp_err_t esp_hmac_jtag_disable()
171171
{
172172
esp_crypto_hmac_lock_acquire();
173-
173+
ets_hmac_enable();
174174
REG_SET_BIT(HMAC_SET_INVALIDATE_JTAG_REG, HMAC_INVALIDATE_JTAG);
175-
175+
ets_hmac_disable();
176176
esp_crypto_hmac_lock_release();
177177

178178
ESP_LOGD(TAG, "Invalidate JTAG result register. JTAG disabled.");

0 commit comments

Comments
 (0)