ESP32-C5 soft locked JTAG but can't soft unlock.
Posted: Tue Oct 07, 2025 2:00 pm
I have been doing a basic test of soft locking and unlocking the JTAG. My SDK = v5.5.0
I have a test key
which is written using
This appears to work as it has returned ESP_OK
I don't need to perform the hmac calculation (keeping things simple) as I know that after the calculation on a 32 byte zero message, it will be
At this point I have confirmed that my device is soft locked by using espefuse to read out the summary and confirming that openocd can't connect. Originaly it could.
I then attempt to soft unlock using
It returns EST_FAIL as ets_jtag_enable_temporarily(), that is within esp_hmac_jtag_enable(), has failed.
I have a test key
Code: Select all
const uint8_t keyData[32] =
{
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10,
0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20
};Code: Select all
esp_efuse_write_key( EFUSE_BLK_KEY3, ESP_EFUSE_KEY_PURPOSE_HMAC_DOWN_JTAG, keyData, sizeof(keyData) );
I don't need to perform the hmac calculation (keeping things simple) as I know that after the calculation on a 32 byte zero message, it will be
Code: Select all
const uint8_t zerosHmac[32] =
{
0xb2, 0xa4, 0x9b, 0x1c, 0xce, 0x1b, 0xe9, 0x22,
0xbb, 0x7e, 0x43, 0x12, 0x77, 0x41, 0x3e, 0x3e,
0x8e, 0x6c, 0x3e, 0x8e, 0x6e, 0x17, 0x62, 0x5c,
0x50, 0xac, 0x66, 0xa9, 0xa8, 0x57, 0x94, 0x9b
};I then attempt to soft unlock using
Code: Select all
esp_hmac_jtag_enable(HMAC_KEY3, zerosHmac);