Skip to content

Commit

Permalink
fix(esptool): Fix incorrect chip version for esp32c5
Browse files Browse the repository at this point in the history
  • Loading branch information
KonstantinKondrashov authored and radimkarnis committed Sep 16, 2024
1 parent 2ccddc3 commit 138660b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions esptool/targets/esp32c5.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ class ESP32C5ROM(ESP32C6ROM):
}

def get_pkg_version(self):
num_word = 3
num_word = 2
return (self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 26) & 0x07

def get_minor_chip_version(self):
num_word = 3
num_word = 2
return (self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 0) & 0x0F

def get_major_chip_version(self):
num_word = 3
num_word = 2
return (self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 4) & 0x03

def get_chip_description(self):
Expand Down
6 changes: 3 additions & 3 deletions esptool/targets/esp32c5beta3.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ class ESP32C5BETA3ROM(ESP32C6ROM):
}

def get_pkg_version(self):
num_word = 3
num_word = 2
return (self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 26) & 0x07

def get_minor_chip_version(self):
num_word = 3
num_word = 2
return (self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 0) & 0x0F

def get_major_chip_version(self):
num_word = 3
num_word = 2
return (self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 4) & 0x03

def get_chip_description(self):
Expand Down

0 comments on commit 138660b

Please sign in to comment.