Skip to content

Commit dc05792

Browse files
committed
fix(esp32h21): Fix eFuse base address
1 parent 777c505 commit dc05792

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

esptool/targets/esp32h21.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,34 @@ class ESP32H21ROM(ESP32H2ROM):
2323
RTC_CNTL_SWD_WPROTECT_REG = DR_REG_LP_WDT_BASE + 0x0024 # LP_WDT_SWD_WPROTECT_REG
2424
RTC_CNTL_SWD_WKEY = 0x50D83AA1 # LP_WDT_SWD_WKEY, same as WDT key in this case
2525

26+
EFUSE_BASE = 0x600B4000
27+
EFUSE_BLOCK1_ADDR = EFUSE_BASE + 0x044
28+
MAC_EFUSE_REG = EFUSE_BASE + 0x044
29+
30+
EFUSE_RD_REG_BASE = EFUSE_BASE + 0x030 # BLOCK0 read base address
31+
32+
EFUSE_PURPOSE_KEY0_REG = EFUSE_BASE + 0x34
33+
EFUSE_PURPOSE_KEY0_SHIFT = 24
34+
EFUSE_PURPOSE_KEY1_REG = EFUSE_BASE + 0x34
35+
EFUSE_PURPOSE_KEY1_SHIFT = 28
36+
EFUSE_PURPOSE_KEY2_REG = EFUSE_BASE + 0x38
37+
EFUSE_PURPOSE_KEY2_SHIFT = 0
38+
EFUSE_PURPOSE_KEY3_REG = EFUSE_BASE + 0x38
39+
EFUSE_PURPOSE_KEY3_SHIFT = 4
40+
EFUSE_PURPOSE_KEY4_REG = EFUSE_BASE + 0x38
41+
EFUSE_PURPOSE_KEY4_SHIFT = 8
42+
EFUSE_PURPOSE_KEY5_REG = EFUSE_BASE + 0x38
43+
EFUSE_PURPOSE_KEY5_SHIFT = 12
44+
45+
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT_REG = EFUSE_RD_REG_BASE
46+
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT = 1 << 20
47+
48+
EFUSE_SPI_BOOT_CRYPT_CNT_REG = EFUSE_BASE + 0x034
49+
EFUSE_SPI_BOOT_CRYPT_CNT_MASK = 0x7 << 18
50+
51+
EFUSE_SECURE_BOOT_EN_REG = EFUSE_BASE + 0x038
52+
EFUSE_SECURE_BOOT_EN_MASK = 1 << 20
53+
2654
def get_pkg_version(self):
2755
return 0
2856

0 commit comments

Comments
 (0)