Skip to content

Commit 2b0ec7a

Browse files
KonstantinKondrashovradimkarnis
authored andcommitted
fix(esp32c5): Fix MAC reading for esptool
1 parent c984aa9 commit 2b0ec7a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

esptool/targets/esp32c5.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,32 @@ class ESP32C5ROM(ESP32C6ROM):
1717
IMAGE_CHIP_ID = 23
1818

1919
EFUSE_BASE = 0x600B4800
20+
EFUSE_BLOCK1_ADDR = EFUSE_BASE + 0x044
21+
MAC_EFUSE_REG = EFUSE_BASE + 0x044
22+
23+
EFUSE_RD_REG_BASE = EFUSE_BASE + 0x030 # BLOCK0 read base address
24+
25+
EFUSE_PURPOSE_KEY0_REG = EFUSE_BASE + 0x34
26+
EFUSE_PURPOSE_KEY0_SHIFT = 24
27+
EFUSE_PURPOSE_KEY1_REG = EFUSE_BASE + 0x34
28+
EFUSE_PURPOSE_KEY1_SHIFT = 28
29+
EFUSE_PURPOSE_KEY2_REG = EFUSE_BASE + 0x38
30+
EFUSE_PURPOSE_KEY2_SHIFT = 0
31+
EFUSE_PURPOSE_KEY3_REG = EFUSE_BASE + 0x38
32+
EFUSE_PURPOSE_KEY3_SHIFT = 4
33+
EFUSE_PURPOSE_KEY4_REG = EFUSE_BASE + 0x38
34+
EFUSE_PURPOSE_KEY4_SHIFT = 8
35+
EFUSE_PURPOSE_KEY5_REG = EFUSE_BASE + 0x38
36+
EFUSE_PURPOSE_KEY5_SHIFT = 12
37+
38+
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT_REG = EFUSE_RD_REG_BASE
39+
EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT = 1 << 20
40+
41+
EFUSE_SPI_BOOT_CRYPT_CNT_REG = EFUSE_BASE + 0x034
42+
EFUSE_SPI_BOOT_CRYPT_CNT_MASK = 0x7 << 18
43+
44+
EFUSE_SECURE_BOOT_EN_REG = EFUSE_BASE + 0x038
45+
EFUSE_SECURE_BOOT_EN_MASK = 1 << 20
2046

2147
IROM_MAP_START = 0x42000000
2248
IROM_MAP_END = 0x42800000

0 commit comments

Comments
 (0)