diff --git a/docs/en/esptool/advanced-options.rst b/docs/en/esptool/advanced-options.rst index 43ef41d4a5..89e87bc364 100644 --- a/docs/en/esptool/advanced-options.rst +++ b/docs/en/esptool/advanced-options.rst @@ -158,5 +158,6 @@ at least one FilterValue for each specified FilterType to be considered. Example * ``--port-filter vid=0x303A --port-filter pid=0x0002`` matches Espressif ESP32-S2 in USB-OTG mode by VID and PID. * ``--port-filter vid=0x303A --port-filter pid=0x1001`` matches Espressif USB-Serial/JTAG unit used by multiple chips by VID and PID. * ``--port-filter name=ttyUSB`` matches ports where the port name contains the specified text. + * ``--port-filter serial=7c98d1065267ee11bcc4c8ab93cd958c`` matches ports where the serial number contains the specified text. See also the `Espressif USB customer-allocated PID repository `_ diff --git a/espefuse/efuse/base_fields.py b/espefuse/efuse/base_fields.py index 654d0fd668..09e0f0d385 100644 --- a/espefuse/efuse/base_fields.py +++ b/espefuse/efuse/base_fields.py @@ -653,6 +653,42 @@ def is_efuses_incompatible_for_burn(self): # Overwrite this function for a specific target if you want to check if a certain eFuse(s) can be burned. return False + def get_major_chip_version(self): + try: + return self["WAFER_VERSION_MAJOR"].get() + except KeyError: + return 0 + + def get_minor_chip_version(self): + try: + return self["WAFER_VERSION_MINOR"].get() + except KeyError: + return 0 + + def get_chip_version(self): + return self.get_major_chip_version() * 100 + self.get_minor_chip_version() + + def get_major_block_version(self): + try: + return self["BLK_VERSION_MAJOR"].get() + except KeyError: + return 0 + + def get_minor_block_version(self): + try: + return self["BLK_VERSION_MINOR"].get() + except KeyError: + return 0 + + def get_block_version(self): + return self.get_major_block_version() * 100 + self.get_minor_block_version() + + def get_pkg_version(self): + try: + return self["PKG_VERSION"].get() + except KeyError: + return 0 + class EfuseFieldBase(EfuseProtectBase): def __init__(self, parent, param): diff --git a/espefuse/efuse/esp32c2/fields.py b/espefuse/efuse/esp32c2/fields.py index a9fe33cce4..c5ccebae44 100644 --- a/espefuse/efuse/esp32c2/fields.py +++ b/espefuse/efuse/esp32c2/fields.py @@ -102,7 +102,7 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - if self["BLK_VERSION_MINOR"].get() == 1: + if self.get_block_version() >= 1: self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES diff --git a/espefuse/efuse/esp32c2/mem_definition.py b/espefuse/efuse/esp32c2/mem_definition.py index 47cd18c047..05b3135cda 100644 --- a/espefuse/efuse/esp32c2/mem_definition.py +++ b/espefuse/efuse/esp32c2/mem_definition.py @@ -97,10 +97,7 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MINOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32c2/operations.py b/espefuse/efuse/esp32c2/operations.py index d23f6a721b..04919004f7 100644 --- a/espefuse/efuse/esp32c2/operations.py +++ b/espefuse/efuse/esp32c2/operations.py @@ -150,9 +150,9 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): - print("") # fmt: off - if efuses["BLK_VERSION_MINOR"].get() == 1: + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 1: print("Temperature Sensor Calibration = {}C".format(efuses["TEMP_CALIB"].get())) print("ADC OCode = ", efuses["OCODE"].get()) print("ADC1:") @@ -160,8 +160,6 @@ def adc_info(esp, efuses, args): print("INIT_CODE_ATTEN3 = ", efuses["ADC1_INIT_CODE_ATTEN3"].get()) print("CAL_VOL_ATTEN0 = ", efuses["ADC1_CAL_VOL_ATTEN0"].get()) print("CAL_VOL_ATTEN3 = ", efuses["ADC1_CAL_VOL_ATTEN3"].get()) - else: - print("BLK_VERSION_MINOR = {}".format(efuses["BLK_VERSION_MINOR"].get_meaning())) # fmt: on diff --git a/espefuse/efuse/esp32c3/fields.py b/espefuse/efuse/esp32c3/fields.py index f367540a80..fd9a3c9777 100644 --- a/espefuse/efuse/esp32c3/fields.py +++ b/espefuse/efuse/esp32c3/fields.py @@ -102,7 +102,7 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - if self["BLK_VERSION_MAJOR"].get() == 1: + if self.get_block_version() >= 100: self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES diff --git a/espefuse/efuse/esp32c3/mem_definition.py b/espefuse/efuse/esp32c3/mem_definition.py index bd13bd7738..105f1ed906 100644 --- a/espefuse/efuse/esp32c3/mem_definition.py +++ b/espefuse/efuse/esp32c3/mem_definition.py @@ -130,12 +130,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MAJOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32c3/operations.py b/espefuse/efuse/esp32c3/operations.py index ff63109570..04b8455f5e 100644 --- a/espefuse/efuse/esp32c3/operations.py +++ b/espefuse/efuse/esp32c3/operations.py @@ -192,9 +192,9 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): - print("") # fmt: off - if efuses["BLK_VERSION_MAJOR"].get() == 1: + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 100: print("Temperature Sensor Calibration = {}C".format(efuses["TEMP_CALIB"].get())) print("ADC OCode = ", efuses["OCODE"].get()) print("ADC1:") @@ -206,8 +206,6 @@ def adc_info(esp, efuses, args): print("CAL_VOL_ATTEN1 = ", efuses["ADC1_CAL_VOL_ATTEN1"].get()) print("CAL_VOL_ATTEN2 = ", efuses["ADC1_CAL_VOL_ATTEN2"].get()) print("CAL_VOL_ATTEN3 = ", efuses["ADC1_CAL_VOL_ATTEN3"].get()) - else: - print("BLK_VERSION_MAJOR = {}".format(efuses["BLK_VERSION_MAJOR"].get_meaning())) # fmt: on diff --git a/espefuse/efuse/esp32c5/fields.py b/espefuse/efuse/esp32c5/fields.py index b61ba6077b..17288784d2 100644 --- a/espefuse/efuse/esp32c5/fields.py +++ b/espefuse/efuse/esp32c5/fields.py @@ -102,11 +102,11 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - # if self["BLK_VERSION_MINOR"].get() == 1: - # self.efuses += [ - # EfuseField.convert(self, efuse) - # for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES - # ] + if self.get_block_version() >= 1: + self.efuses += [ + EfuseField.convert(self, efuse) + for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES + ] self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.CALC ] diff --git a/espefuse/efuse/esp32c5/mem_definition.py b/espefuse/efuse/esp32c5/mem_definition.py index 0520328baf..86743a77f0 100644 --- a/espefuse/efuse/esp32c5/mem_definition.py +++ b/espefuse/efuse/esp32c5/mem_definition.py @@ -114,12 +114,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MINOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32c5/operations.py b/espefuse/efuse/esp32c5/operations.py index 1fca6bcb69..0e82d1fb48 100644 --- a/espefuse/efuse/esp32c5/operations.py +++ b/espefuse/efuse/esp32c5/operations.py @@ -192,7 +192,11 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): - print("not supported yet") + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 1: + for efuse in efuses: + if efuse.category == "calibration": + print(f"{efuse.name:<30} = ", efuses[efuse.name].get()) def burn_key(esp, efuses, args, digest=None): diff --git a/espefuse/efuse/esp32c5beta3/fields.py b/espefuse/efuse/esp32c5beta3/fields.py index 351d73667a..d3788fed5b 100644 --- a/espefuse/efuse/esp32c5beta3/fields.py +++ b/espefuse/efuse/esp32c5beta3/fields.py @@ -102,11 +102,11 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - # if self["BLK_VERSION_MINOR"].get() == 1: - # self.efuses += [ - # EfuseField.convert(self, efuse) - # for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES - # ] + if self.get_block_version() >= 1: + self.efuses += [ + EfuseField.convert(self, efuse) + for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES + ] self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.CALC ] diff --git a/espefuse/efuse/esp32c5beta3/mem_definition.py b/espefuse/efuse/esp32c5beta3/mem_definition.py index 67ffff60ed..9ba5b719ec 100644 --- a/espefuse/efuse/esp32c5beta3/mem_definition.py +++ b/espefuse/efuse/esp32c5beta3/mem_definition.py @@ -114,12 +114,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MINOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32c6/fields.py b/espefuse/efuse/esp32c6/fields.py index 70df55cecd..1e1df13139 100644 --- a/espefuse/efuse/esp32c6/fields.py +++ b/espefuse/efuse/esp32c6/fields.py @@ -102,7 +102,7 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - if self["BLK_VERSION_MINOR"].get() == 1: + if self.get_block_version() >= 1: self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES diff --git a/espefuse/efuse/esp32c6/mem_definition.py b/espefuse/efuse/esp32c6/mem_definition.py index 4574fdf63e..788828a366 100644 --- a/espefuse/efuse/esp32c6/mem_definition.py +++ b/espefuse/efuse/esp32c6/mem_definition.py @@ -114,12 +114,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MINOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32c6/operations.py b/espefuse/efuse/esp32c6/operations.py index 9307ecac3b..b9064ffe05 100644 --- a/espefuse/efuse/esp32c6/operations.py +++ b/espefuse/efuse/esp32c6/operations.py @@ -192,9 +192,9 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): - print("") # fmt: off - if efuses["BLK_VERSION_MINOR"].get() == 1: + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 1: print("Temperature Sensor Calibration = {}C".format(efuses["TEMP_CALIB"].get())) print("ADC OCode = ", efuses["OCODE"].get()) print("ADC1:") @@ -213,8 +213,6 @@ def adc_info(esp, efuses, args): print("INIT_CODE_ATTEN0_CH4 = ", efuses['ADC1_INIT_CODE_ATTEN0_CH4'].get()) print("INIT_CODE_ATTEN0_CH5 = ", efuses['ADC1_INIT_CODE_ATTEN0_CH5'].get()) print("INIT_CODE_ATTEN0_CH6 = ", efuses['ADC1_INIT_CODE_ATTEN0_CH6'].get()) - else: - print("BLK_VERSION_MINOR = {}".format(efuses["BLK_VERSION_MINOR"].get_meaning())) # fmt: on diff --git a/espefuse/efuse/esp32c61/fields.py b/espefuse/efuse/esp32c61/fields.py index 5f6fe7b8cb..6fa74a7d6a 100644 --- a/espefuse/efuse/esp32c61/fields.py +++ b/espefuse/efuse/esp32c61/fields.py @@ -102,11 +102,11 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - # if self["BLK_VERSION_MINOR"].get() == 1: - # self.efuses += [ - # EfuseField.convert(self, efuse) - # for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES - # ] + if self.get_block_version() >= 1: + self.efuses += [ + EfuseField.convert(self, efuse) + for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES + ] self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.CALC ] diff --git a/espefuse/efuse/esp32c61/mem_definition.py b/espefuse/efuse/esp32c61/mem_definition.py index 2f8f818a53..a0f34792bd 100644 --- a/espefuse/efuse/esp32c61/mem_definition.py +++ b/espefuse/efuse/esp32c61/mem_definition.py @@ -114,12 +114,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MINOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC: List = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32c61/operations.py b/espefuse/efuse/esp32c61/operations.py index 2306565554..07c2348833 100644 --- a/espefuse/efuse/esp32c61/operations.py +++ b/espefuse/efuse/esp32c61/operations.py @@ -193,7 +193,11 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): - print("not supported yet") + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 1: + for efuse in efuses: + if efuse.category == "calibration": + print(f"{efuse.name:<30} = ", efuses[efuse.name].get()) def key_block_is_unused(block, key_purpose_block): diff --git a/espefuse/efuse/esp32h2/fields.py b/espefuse/efuse/esp32h2/fields.py index 91ef6c15ca..caf765805d 100644 --- a/espefuse/efuse/esp32h2/fields.py +++ b/espefuse/efuse/esp32h2/fields.py @@ -102,7 +102,7 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - if self["BLK_VERSION_MINOR"].get() == 2: + if self.get_block_version() >= 2: self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES diff --git a/espefuse/efuse/esp32h2/mem_definition.py b/espefuse/efuse/esp32h2/mem_definition.py index 87663e95f7..c6e9fc84c0 100644 --- a/espefuse/efuse/esp32h2/mem_definition.py +++ b/espefuse/efuse/esp32h2/mem_definition.py @@ -114,12 +114,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MINOR is 2, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32h2/operations.py b/espefuse/efuse/esp32h2/operations.py index 2aac7448b7..e340764e6b 100644 --- a/espefuse/efuse/esp32h2/operations.py +++ b/espefuse/efuse/esp32h2/operations.py @@ -191,9 +191,9 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): - print("") # fmt: off - if efuses["BLK_VERSION_MINOR"].get() == 2: + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 2: print("Temperature Sensor Calibration = {}C".format(efuses["TEMP_CALIB"].get())) print("") print("ADC1:") @@ -210,8 +210,6 @@ def adc_info(esp, efuses, args): print("CH2_ATTEN0_INITCODE_DIFF = ", efuses["ADC1_CH2_ATTEN0_INITCODE_DIFF"].get()) print("CH3_ATTEN0_INITCODE_DIFF = ", efuses["ADC1_CH3_ATTEN0_INITCODE_DIFF"].get()) print("CH4_ATTEN0_INITCODE_DIFF = ", efuses["ADC1_CH4_ATTEN0_INITCODE_DIFF"].get()) - else: - print("BLK_VERSION_MINOR = {}".format(efuses["BLK_VERSION_MINOR"].get())) # fmt: on diff --git a/espefuse/efuse/esp32h2beta1/fields.py b/espefuse/efuse/esp32h2beta1/fields.py index 90fb72bb58..92e1d0392b 100644 --- a/espefuse/efuse/esp32h2beta1/fields.py +++ b/espefuse/efuse/esp32h2beta1/fields.py @@ -102,7 +102,7 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - if self["BLK_VERSION_MINOR"].get() == 2: + if self.get_block_version() >= 2: self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES diff --git a/espefuse/efuse/esp32h2beta1/mem_definition.py b/espefuse/efuse/esp32h2beta1/mem_definition.py index 73bfb370ed..360ae73b0a 100644 --- a/espefuse/efuse/esp32h2beta1/mem_definition.py +++ b/espefuse/efuse/esp32h2beta1/mem_definition.py @@ -110,12 +110,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MAJOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC: List = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32h2beta1/operations.py b/espefuse/efuse/esp32h2beta1/operations.py index f884b8aa55..0058a33b90 100644 --- a/espefuse/efuse/esp32h2beta1/operations.py +++ b/espefuse/efuse/esp32h2beta1/operations.py @@ -191,9 +191,9 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): - print("") # fmt: off - if efuses["BLK_VERSION_MINOR"].get() == 2: + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 2: print("Temperature Sensor Calibration = {}C".format(efuses["TEMP_CALIB"].get())) print("") print("ADC1:") @@ -210,8 +210,6 @@ def adc_info(esp, efuses, args): print("CH2_ATTEN0_INITCODE_DIFF = ", efuses["ADC1_CH2_ATTEN0_INITCODE_DIFF"].get()) print("CH3_ATTEN0_INITCODE_DIFF = ", efuses["ADC1_CH3_ATTEN0_INITCODE_DIFF"].get()) print("CH4_ATTEN0_INITCODE_DIFF = ", efuses["ADC1_CH4_ATTEN0_INITCODE_DIFF"].get()) - else: - print("BLK_VERSION_MINOR = {}".format(efuses["BLK_VERSION_MINOR"].get())) # fmt: on diff --git a/espefuse/efuse/esp32p4/fields.py b/espefuse/efuse/esp32p4/fields.py index e28d788dc8..bef267f76d 100644 --- a/espefuse/efuse/esp32p4/fields.py +++ b/espefuse/efuse/esp32p4/fields.py @@ -102,12 +102,11 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - # TODO add processing of self.Fields.BLOCK2_CALIBRATION_EFUSES - # if self["BLK_VERSION_MINOR"].get() == 1: - # self.efuses += [ - # EfuseField.convert(self, efuse) - # for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES - # ] + if self.get_block_version() >= 1: + self.efuses += [ + EfuseField.convert(self, efuse) + for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES + ] self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.CALC ] diff --git a/espefuse/efuse/esp32p4/mem_definition.py b/espefuse/efuse/esp32p4/mem_definition.py index c1427e516a..0865eb38b5 100644 --- a/espefuse/efuse/esp32p4/mem_definition.py +++ b/espefuse/efuse/esp32p4/mem_definition.py @@ -114,12 +114,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MINOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC: List = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32p4/operations.py b/espefuse/efuse/esp32p4/operations.py index b24a735121..3060d01651 100644 --- a/espefuse/efuse/esp32p4/operations.py +++ b/espefuse/efuse/esp32p4/operations.py @@ -189,7 +189,11 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): - print("not supported yet") + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 1: + for efuse in efuses: + if efuse.category == "calibration": + print(f"{efuse.name:<30} = ", efuses[efuse.name].get()) def key_block_is_unused(block, key_purpose_block): diff --git a/espefuse/efuse/esp32s2/fields.py b/espefuse/efuse/esp32s2/fields.py index 1339fdb143..bdf831967d 100644 --- a/espefuse/efuse/esp32s2/fields.py +++ b/espefuse/efuse/esp32s2/fields.py @@ -102,7 +102,7 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - if self["BLK_VERSION_MINOR"].get() == 1: + if self.get_block_version() >= 1: self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES diff --git a/espefuse/efuse/esp32s2/mem_definition.py b/espefuse/efuse/esp32s2/mem_definition.py index 4799751db9..a5888ba5d5 100644 --- a/espefuse/efuse/esp32s2/mem_definition.py +++ b/espefuse/efuse/esp32s2/mem_definition.py @@ -153,12 +153,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MINOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32s2/operations.py b/espefuse/efuse/esp32s2/operations.py index 3f015e2216..f27457bd04 100644 --- a/espefuse/efuse/esp32s2/operations.py +++ b/espefuse/efuse/esp32s2/operations.py @@ -235,9 +235,9 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): - print("") # fmt: off - if efuses["BLK_VERSION_MINOR"].get() == 1: + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 1: print("Temperature Sensor Calibration = {}C".format(efuses["TEMP_CALIB"].get())) print("TADC_CALIB = {}C".format(efuses["ADC_CALIB"].get())) print("RTCCALIB_V1IDX_A10H = ", efuses["RTCCALIB_V1IDX_A10H"].get()) @@ -256,8 +256,6 @@ def adc_info(esp, efuses, args): print("RTCCALIB_V1IDX_A21L = ", efuses["RTCCALIB_V1IDX_A21L"].get()) print("RTCCALIB_V1IDX_A22L = ", efuses["RTCCALIB_V1IDX_A22L"].get()) print("RTCCALIB_V1IDX_A23L = ", efuses["RTCCALIB_V1IDX_A23L"].get()) - else: - print("BLK_VERSION_MINOR = ", efuses["BLK_VERSION_MINOR"].get_meaning()) # fmt: on diff --git a/espefuse/efuse/esp32s3/fields.py b/espefuse/efuse/esp32s3/fields.py index 9bb4eeaf30..e2f0bafef1 100644 --- a/espefuse/efuse/esp32s3/fields.py +++ b/espefuse/efuse/esp32s3/fields.py @@ -102,7 +102,7 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - if self["BLK_VERSION_MAJOR"].get() == 1: + if self.get_block_version() >= 100: self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES @@ -335,9 +335,22 @@ def convert(parent, efuse): "t_sensor": EfuseTempSensor, "adc_tp": EfuseAdcPointCalibration, "wafer": EfuseWafer, + "psram_cap": EfusePsramCap, }.get(efuse.class_type, EfuseField)(parent, efuse) +class EfusePsramCap(EfuseField): + def get(self, from_read=True): + hi_bits = self.parent["PSRAM_CAP_3"].get(from_read) + assert self.parent["PSRAM_CAP_3"].bit_len == 1 + lo_bits = self.parent["PSRAM_CAP"].get(from_read) + assert self.parent["PSRAM_CAP"].bit_len == 2 + return (hi_bits << 2) + lo_bits + + def save(self, new_value): + raise esptool.FatalError("Burning %s is not supported" % self.name) + + class EfuseWafer(EfuseField): def get(self, from_read=True): hi_bits = self.parent["WAFER_VERSION_MINOR_HI"].get(from_read) diff --git a/espefuse/efuse/esp32s3/mem_definition.py b/espefuse/efuse/esp32s3/mem_definition.py index 11aecfa651..361cbb9719 100644 --- a/espefuse/efuse/esp32s3/mem_definition.py +++ b/espefuse/efuse/esp32s3/mem_definition.py @@ -115,12 +115,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MAJOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC = [] dir_name = os.path.dirname(os.path.abspath(__file__)) @@ -163,6 +159,16 @@ def __init__(self, extend_efuse_table) -> None: f.description = "calc WAFER VERSION MINOR = WAFER_VERSION_MINOR_HI << 3 + WAFER_VERSION_MINOR_LO (read only)" self.CALC.append(f) + f = Field() + f.name = "PSRAM_CAPACITY" + f.block = 0 + f.bit_len = 3 + f.type = f"uint:{f.bit_len}" + f.category = "identity" + f.class_type = "psram_cap" + f.description = "calc as = PSRAM_CAP_3 << 2 + PSRAM_CAP (read only)" + self.CALC.append(f) + for efuse in self.ALL_EFUSES: if efuse is not None: self.EFUSES.append(efuse) diff --git a/espefuse/efuse/esp32s3/operations.py b/espefuse/efuse/esp32s3/operations.py index 912ae3f0c0..928d4cf764 100644 --- a/espefuse/efuse/esp32s3/operations.py +++ b/espefuse/efuse/esp32s3/operations.py @@ -236,7 +236,8 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): print("") # fmt: off - if efuses["BLK_VERSION_MAJOR"].get() == 1: + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 100: print("Temperature Sensor Calibration = {}C".format(efuses["TEMP_CALIB"].get())) print("ADC OCode = ", efuses["OCODE"].get()) print("ADC1:") @@ -256,8 +257,6 @@ def adc_info(esp, efuses, args): print("CAL_VOL_ATTEN0 = ", efuses["ADC2_CAL_VOL_ATTEN0"].get()) print("CAL_VOL_ATTEN1 = ", efuses["ADC2_CAL_VOL_ATTEN1"].get()) print("CAL_VOL_ATTEN2 = ", efuses["ADC2_CAL_VOL_ATTEN2"].get()) - else: - print("BLK_VERSION_MAJOR = ", efuses["BLK_VERSION_MAJOR"].get_meaning()) # fmt: on diff --git a/espefuse/efuse/esp32s3beta2/fields.py b/espefuse/efuse/esp32s3beta2/fields.py index 28e03e9cfe..b884ed74d5 100644 --- a/espefuse/efuse/esp32s3beta2/fields.py +++ b/espefuse/efuse/esp32s3beta2/fields.py @@ -102,7 +102,7 @@ def __init__( for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES ] else: - if self["BLK_VERSION_MAJOR"].get() == 1: + if self.get_block_version() >= 100: self.efuses += [ EfuseField.convert(self, efuse) for efuse in self.Fields.BLOCK2_CALIBRATION_EFUSES diff --git a/espefuse/efuse/esp32s3beta2/mem_definition.py b/espefuse/efuse/esp32s3beta2/mem_definition.py index 0fb1ec8bad..0bba61c485 100644 --- a/espefuse/efuse/esp32s3beta2/mem_definition.py +++ b/espefuse/efuse/esp32s3beta2/mem_definition.py @@ -115,12 +115,8 @@ class EfuseDefineFields(EfuseFieldsBase): def __init__(self, extend_efuse_table) -> None: # List of efuse fields from TRM the chapter eFuse Controller. self.EFUSES = [] - self.KEYBLOCKS = [] - - # if BLK_VERSION_MAJOR is 1, these efuse fields are in BLOCK2 self.BLOCK2_CALIBRATION_EFUSES = [] - self.CALC = [] dir_name = os.path.dirname(os.path.abspath(__file__)) diff --git a/espefuse/efuse/esp32s3beta2/operations.py b/espefuse/efuse/esp32s3beta2/operations.py index 229a929023..3b45e79d62 100644 --- a/espefuse/efuse/esp32s3beta2/operations.py +++ b/espefuse/efuse/esp32s3beta2/operations.py @@ -234,9 +234,9 @@ def set_flash_voltage(esp, efuses, args): def adc_info(esp, efuses, args): - print("") # fmt: off - if efuses["BLK_VERSION_MAJOR"].get() == 1: + print("Block version:", efuses.get_block_version()) + if efuses.get_block_version() >= 100: print("Temperature Sensor Calibration = {}C".format(efuses["TEMP_CALIB"].get())) print("ADC OCode = ", efuses["OCODE"].get()) print("ADC1:") @@ -256,8 +256,6 @@ def adc_info(esp, efuses, args): print("CAL_VOL_ATTEN0 = ", efuses["ADC2_CAL_VOL_ATTEN0"].get()) print("CAL_VOL_ATTEN1 = ", efuses["ADC2_CAL_VOL_ATTEN1"].get()) print("CAL_VOL_ATTEN2 = ", efuses["ADC2_CAL_VOL_ATTEN2"].get()) - else: - print("BLK_VERSION_MAJOR = ", efuses["BLK_VERSION_MAJOR"].get_meaning()) # fmt: on diff --git a/espefuse/efuse/mem_definition_base.py b/espefuse/efuse/mem_definition_base.py index f6e2bdc0b2..9e8e16927c 100644 --- a/espefuse/efuse/mem_definition_base.py +++ b/espefuse/efuse/mem_definition_base.py @@ -140,7 +140,20 @@ def includes(name, names): if name == "OPTIONAL_UNIQUE_ID": efuse.class_type = "keyblock" - elif includes(name, ["ADC", "LDO", "DBIAS", "_HVT", "CALIB", "OCODE"]): + elif includes( + name, + [ + "ADC", + "LDO", + "DBIAS", + "_HVT", + "CALIB", + "OCODE", + "TEMPERATURE", + "LSLP", + "DSLP", + ], + ): efuse.category = "calibration" if name == "ADC_VREF": efuse.class_type = "vref" diff --git a/espefuse/efuse_defs/esp32c5.yaml b/espefuse/efuse_defs/esp32c5.yaml index 31af46a56d..acd5afd792 100644 --- a/espefuse/efuse_defs/esp32c5.yaml +++ b/espefuse/efuse_defs/esp32c5.yaml @@ -1,4 +1,4 @@ -VER_NO: b09fa417de505238a601eddce188b696 +VER_NO: 287a0ed4951aba84b9571a5f31000275 EFUSES: WR_DIS : {show: y, blk : 0, word: 0, pos : 0, len : 32, start : 0, type : 'uint:32', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Disable programming of individual eFuses, rloc: EFUSE_RD_WR_DIS0_REG, bloc: 'B0,B1,B2,B3'} RD_DIS : {show: y, blk : 0, word: 1, pos : 0, len : 7, start : 32, type : 'uint:7', wr_dis : 0, rd_dis: null, alt : '', dict : '', desc: Disable reading from BlOCK4-10, rloc: 'EFUSE_RD_REPEAT_DATA0_REG[6:0]', bloc: 'B4[6:0]'} @@ -80,17 +80,33 @@ EFUSES: PA_TRIM_VERSION : {show: y, blk : 1, word: 2, pos: 29, len : 3, start : 93, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: PADC CAL PA trim version, rloc: 'EFUSE_RD_MAC_SYS2_REG[31:29]', bloc: 'B11[7:5]'} TRIM_N_BIAS : {show: y, blk : 1, word: 3, pos : 0, len : 5, start : 96, type : 'uint:5', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: PADC CAL N bias, rloc: 'EFUSE_RD_MAC_SYS3_REG[4:0]', bloc: 'B12[4:0]'} TRIM_P_BIAS : {show: y, blk : 1, word: 3, pos : 5, len : 5, start: 101, type : 'uint:5', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: PADC CAL P bias, rloc: 'EFUSE_RD_MAC_SYS3_REG[9:5]', bloc: 'B12[7:5],B13[1:0]'} - RESERVED_1_106 : {show: n, blk : 1, word: 3, pos: 10, len : 8, start: 106, type : 'uint:8', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_MAC_SYS3_REG[17:10]', bloc: 'B13[7:2],B14[1:0]'} - SYS_DATA_PART0_0 : {show: n, blk : 1, word: 3, pos: 18, len : 14, start: 114, type : 'uint:14', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Represents the first 14-bit of zeroth part of system data, rloc: 'EFUSE_RD_MAC_SYS3_REG[31:18]', bloc: 'B14[7:2],B15'} - SYS_DATA_PART0_1 : {show: n, blk : 1, word: 4, pos : 0, len : 32, start: 128, type : 'uint:32', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Represents the first 14-bit of zeroth part of system data, rloc: EFUSE_RD_MAC_SYS4_REG, bloc: 'B16,B17,B18,B19'} + ACTIVE_HP_DBIAS : {show: y, blk : 1, word: 3, pos: 10, len : 4, start: 106, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Active HP DBIAS of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS3_REG[13:10]', bloc: 'B13[5:2]'} + ACTIVE_LP_DBIAS : {show: y, blk : 1, word: 3, pos: 14, len : 4, start: 110, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Active LP DBIAS of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS3_REG[17:14]', bloc: 'B13[7:6],B14[1:0]'} + LSLP_HP_DBG : {show: y, blk : 1, word: 3, pos: 18, len : 2, start: 114, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: LSLP HP DBG of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS3_REG[19:18]', bloc: 'B14[3:2]'} + LSLP_HP_DBIAS : {show: y, blk : 1, word: 3, pos: 20, len : 4, start: 116, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: LSLP HP DBIAS of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS3_REG[23:20]', bloc: 'B14[7:4]'} + DSLP_LP_DBG : {show: y, blk : 1, word: 3, pos: 24, len : 4, start: 120, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: DSLP LP DBG of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS3_REG[27:24]', bloc: 'B15[3:0]'} + DSLP_LP_DBIAS : {show: y, blk : 1, word: 3, pos: 28, len : 5, start: 124, type : 'uint:5', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: DSLP LP DBIAS of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS3_REG[31:28]', bloc: 'B15[7:4],B16[0]'} + LP_HP_DBIAS_VOL_GAP : {show: y, blk : 1, word: 4, pos : 1, len : 5, start: 129, type : 'uint:5', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: DBIAS gap between LP and HP, rloc: 'EFUSE_RD_MAC_SYS4_REG[5:1]', bloc: 'B16[5:1]'} + RESERVED_1_134 : {show: n, blk : 1, word: 4, pos : 6, len : 26, start: 134, type : 'uint:26', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_MAC_SYS4_REG[31:6]', bloc: 'B16[7:6],B17,B18,B19'} SYS_DATA_PART0_2 : {show: n, blk : 1, word: 5, pos : 0, len : 32, start: 160, type : 'uint:32', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Represents the second 32-bit of zeroth part of system data, rloc: EFUSE_RD_MAC_SYS5_REG, bloc: 'B20,B21,B22,B23'} OPTIONAL_UNIQUE_ID : {show: y, blk : 2, word: 0, pos : 0, len: 128, start : 0, type: 'bytes:16', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Optional unique 128-bit ID, rloc: EFUSE_RD_SYS_PART1_DATA0_REG, bloc: 'B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15'} - RESERVED_2_128 : {show: n, blk : 2, word: 4, pos : 0, len : 9, start: 128, type : 'uint:9', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[8:0]', bloc: 'B16,B17[0]'} + TEMPERATURE_SENSOR : {show: y, blk : 2, word: 4, pos : 0, len : 9, start: 128, type : 'uint:9', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Temperature calibration data, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[8:0]', bloc: 'B16,B17[0]'} OCODE : {show: y, blk : 2, word: 4, pos : 9, len : 8, start: 137, type : 'uint:8', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: ADC OCode, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[16:9]', bloc: 'B17[7:1],B18[0]'} - RESERVED_2_145 : {show: n, blk : 2, word: 4, pos: 17, len : 15, start: 145, type : 'uint:15', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[31:17]', bloc: 'B18[7:1],B19'} - SYS_DATA_PART1_5 : {show: n, blk : 2, word: 5, pos : 0, len : 32, start: 160, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Represents the zeroth 32-bit of first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA5_REG, bloc: 'B20,B21,B22,B23'} - SYS_DATA_PART1_6 : {show: n, blk : 2, word: 6, pos : 0, len : 32, start: 192, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Represents the zeroth 32-bit of first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA6_REG, bloc: 'B24,B25,B26,B27'} - SYS_DATA_PART1_7 : {show: n, blk : 2, word: 7, pos : 0, len : 32, start: 224, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Represents the zeroth 32-bit of first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA7_REG, bloc: 'B28,B29,B30,B31'} + ADC1_AVE_INITCODE_ATTEN0 : {show: y, blk : 2, word: 4, pos: 17, len : 10, start: 145, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten0, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[26:17]', bloc: 'B18[7:1],B19[2:0]'} + ADC1_AVE_INITCODE_ATTEN1 : {show: y, blk : 2, word: 4, pos: 27, len : 10, start: 155, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten0, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[31:27]', bloc: 'B19[7:3],B20[4:0]'} + ADC1_AVE_INITCODE_ATTEN2 : {show: y, blk : 2, word: 5, pos : 5, len : 10, start: 165, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten0, rloc: 'EFUSE_RD_SYS_PART1_DATA5_REG[14:5]', bloc: 'B20[7:5],B21[6:0]'} + ADC1_AVE_INITCODE_ATTEN3 : {show: y, blk : 2, word: 5, pos: 15, len : 10, start: 175, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten0, rloc: 'EFUSE_RD_SYS_PART1_DATA5_REG[24:15]', bloc: 'B21[7],B22,B23[0]'} + ADC1_HI_DOUT_ATTEN0 : {show: y, blk : 2, word: 5, pos: 25, len : 10, start: 185, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI DOUT of ADC1 atten0, rloc: 'EFUSE_RD_SYS_PART1_DATA5_REG[31:25]', bloc: 'B23[7:1],B24[2:0]'} + ADC1_HI_DOUT_ATTEN1 : {show: y, blk : 2, word: 6, pos : 3, len : 10, start: 195, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI DOUT of ADC1 atten1, rloc: 'EFUSE_RD_SYS_PART1_DATA6_REG[12:3]', bloc: 'B24[7:3],B25[4:0]'} + ADC1_HI_DOUT_ATTEN2 : {show: y, blk : 2, word: 6, pos: 13, len : 10, start: 205, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI DOUT of ADC1 atten2, rloc: 'EFUSE_RD_SYS_PART1_DATA6_REG[22:13]', bloc: 'B25[7:5],B26[6:0]'} + ADC1_HI_DOUT_ATTEN3 : {show: y, blk : 2, word: 6, pos: 23, len : 10, start: 215, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI DOUT of ADC1 atten3, rloc: 'EFUSE_RD_SYS_PART1_DATA6_REG[31:23]', bloc: 'B26[7],B27,B28[0]'} + ADC1_CH0_ATTEN0_INITCODE_DIFF : {show: y, blk : 2, word: 7, pos : 1, len : 4, start: 225, type : 'uint:4', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Gap between ADC1 CH0 and average initcode, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[4:1]', bloc: 'B28[4:1]'} + ADC1_CH1_ATTEN0_INITCODE_DIFF : {show: y, blk : 2, word: 7, pos : 5, len : 4, start: 229, type : 'uint:4', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Gap between ADC1 CH1 and average initcode, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[8:5]', bloc: 'B28[7:5],B29[0]'} + ADC1_CH2_ATTEN0_INITCODE_DIFF : {show: y, blk : 2, word: 7, pos : 9, len : 4, start: 233, type : 'uint:4', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Gap between ADC1 CH2 and average initcode, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[12:9]', bloc: 'B29[4:1]'} + ADC1_CH3_ATTEN0_INITCODE_DIFF : {show: y, blk : 2, word: 7, pos: 13, len : 4, start: 237, type : 'uint:4', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Gap between ADC1 CH3 and average initcode, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[16:13]', bloc: 'B29[7:5],B30[0]'} + ADC1_CH4_ATTEN0_INITCODE_DIFF : {show: y, blk : 2, word: 7, pos: 17, len : 4, start: 241, type : 'uint:4', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Gap between ADC1 CH4 and average initcode, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[20:17]', bloc: 'B30[4:1]'} + ADC1_CH5_ATTEN0_INITCODE_DIFF : {show: y, blk : 2, word: 7, pos: 21, len : 4, start: 245, type : 'uint:4', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Gap between ADC1 CH5 and average initcode, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[24:21]', bloc: 'B30[7:5],B31[0]'} + RESERVED_2_249 : {show: n, blk : 2, word: 7, pos: 25, len : 7, start: 249, type : 'uint:7', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[31:25]', bloc: 'B31[7:1]'} BLOCK_USR_DATA : {show: y, blk : 3, word: 0, pos : 0, len: 192, start : 0, type: 'bytes:24', wr_dis : 22, rd_dis: null, alt : USER_DATA, dict : '', desc: User data, rloc: EFUSE_RD_USR_DATA0_REG, bloc: 'B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17,B18,B19,B20,B21,B22,B23'} RESERVED_3_192 : {show: n, blk : 3, word: 6, pos : 0, len : 8, start: 192, type : 'uint:8', wr_dis : 22, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_USR_DATA6_REG[7:0]', bloc: B24} CUSTOM_MAC : {show: y, blk : 3, word: 6, pos : 8, len : 48, start: 200, type : 'bytes:6', wr_dis : 22, rd_dis: null, alt: MAC_CUSTOM USER_DATA_MAC_CUSTOM, dict : '', desc: Custom MAC, rloc: 'EFUSE_RD_USR_DATA6_REG[31:8]', bloc: 'B25,B26,B27,B28,B29,B30'} diff --git a/espefuse/efuse_defs/esp32c61.yaml b/espefuse/efuse_defs/esp32c61.yaml index 3cbd2660e3..da7cdec42d 100644 --- a/espefuse/efuse_defs/esp32c61.yaml +++ b/espefuse/efuse_defs/esp32c61.yaml @@ -1,4 +1,4 @@ -VER_NO: e564f8042b56a475a7714bb28ecdadfa +VER_NO: 8f05ff9d292b10d2360200fae1d15e8d EFUSES: WR_DIS : {show: y, blk : 0, word: 0, pos : 0, len : 32, start : 0, type : 'uint:32', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Disable programming of individual eFuses, rloc: EFUSE_RD_WR_DIS0_REG, bloc: 'B0,B1,B2,B3'} RD_DIS : {show: y, blk : 0, word: 1, pos : 0, len : 7, start : 32, type : 'uint:7', wr_dis : 0, rd_dis: null, alt : '', dict : '', desc: Disable reading from BlOCK4-10, rloc: 'EFUSE_RD_REPEAT_DATA0_REG[6:0]', bloc: 'B4[6:0]'} @@ -48,7 +48,7 @@ EFUSES: REPEAT_DATA3 : {show: n, blk : 0, word: 4, pos : 0, len : 32, start: 128, type : 'uint:32', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Reserved, rloc: EFUSE_RD_REPEAT_DATA3_REG, bloc: 'B16,B17,B18,B19'} REPEAT_DATA4 : {show: n, blk : 0, word: 5, pos : 0, len : 32, start: 160, type : 'uint:32', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Reserved, rloc: EFUSE_RD_REPEAT_DATA4_REG, bloc: 'B20,B21,B22,B23'} MAC : {show: y, blk : 1, word: 0, pos : 0, len : 48, start : 0, type : 'bytes:6', wr_dis : 20, rd_dis: null, alt : MAC_FACTORY, dict : '', desc: MAC address, rloc: EFUSE_RD_MAC_SYS0_REG, bloc: 'B0,B1,B2,B3,B4,B5'} - C61_NO_EXTENTION : {show: n, blk : 1, word: 1, pos: 16, len : 16, start : 48, type : 'uint:16', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Reserved, rloc: 'EFUSE_RD_MAC_SYS1_REG[31:16]', bloc: 'B6,B7'} + RESERVE_1_48 : {show: n, blk : 1, word: 1, pos: 16, len : 16, start : 48, type : 'uint:16', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Reserved; it was created by set_missed_fields_in_regs func, rloc: 'EFUSE_RD_MAC_SYS1_REG[31:16]', bloc: 'B6,B7'} WAFER_VERSION_MINOR : {show: y, blk : 1, word: 2, pos : 0, len : 4, start : 64, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Minor chip version, rloc: 'EFUSE_RD_MAC_SYS2_REG[3:0]', bloc: 'B8[3:0]'} WAFER_VERSION_MAJOR : {show: y, blk : 1, word: 2, pos : 4, len : 2, start : 68, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Major chip version, rloc: 'EFUSE_RD_MAC_SYS2_REG[5:4]', bloc: 'B8[5:4]'} DISABLE_WAFER_VERSION_MAJOR : {show: y, blk : 1, word: 2, pos : 6, len : 1, start : 70, type : bool, wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Disables check of wafer version major, rloc: 'EFUSE_RD_MAC_SYS2_REG[6]', bloc: 'B8[6]'} @@ -67,10 +67,21 @@ EFUSES: SYS_DATA_PART0_1 : {show: n, blk : 1, word: 4, pos : 0, len : 32, start: 128, type : 'uint:32', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Represents the first 14-bit of zeroth part of system data, rloc: EFUSE_RD_MAC_SYS4_REG, bloc: 'B16,B17,B18,B19'} SYS_DATA_PART0_2 : {show: n, blk : 1, word: 5, pos : 0, len : 32, start: 160, type : 'uint:32', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Represents the second 32-bit of zeroth part of system data, rloc: EFUSE_RD_MAC_SYS5_REG, bloc: 'B20,B21,B22,B23'} OPTIONAL_UNIQUE_ID : {show: y, blk : 2, word: 0, pos : 0, len: 128, start : 0, type: 'bytes:16', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Optional unique 128-bit ID, rloc: EFUSE_RD_SYS_PART1_DATA0_REG, bloc: 'B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15'} - SYS_DATA_PART1_4 : {show: n, blk : 2, word: 4, pos : 0, len : 32, start: 128, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Represents the zeroth 32-bit of first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA4_REG, bloc: 'B16,B17,B18,B19'} - SYS_DATA_PART1_5 : {show: n, blk : 2, word: 5, pos : 0, len : 32, start: 160, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Represents the zeroth 32-bit of first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA5_REG, bloc: 'B20,B21,B22,B23'} - SYS_DATA_PART1_6 : {show: n, blk : 2, word: 6, pos : 0, len : 32, start: 192, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Represents the zeroth 32-bit of first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA6_REG, bloc: 'B24,B25,B26,B27'} - SYS_DATA_PART1_7 : {show: n, blk : 2, word: 7, pos : 0, len : 32, start: 224, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Represents the zeroth 32-bit of first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA7_REG, bloc: 'B28,B29,B30,B31'} + TEMPERATURE_SENSOR : {show: y, blk : 2, word: 4, pos : 0, len : 9, start: 128, type : 'uint:9', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Temperature calibration data, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[8:0]', bloc: 'B16,B17[0]'} + OCODE : {show: y, blk : 2, word: 4, pos : 9, len : 8, start: 137, type : 'uint:8', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: ADC OCode calibration, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[16:9]', bloc: 'B17[7:1],B18[0]'} + ADC1_AVE_INIT_CODE_ATTEN0 : {show: y, blk : 2, word: 4, pos: 17, len : 10, start: 145, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten0, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[26:17]', bloc: 'B18[7:1],B19[2:0]'} + ADC1_AVE_INIT_CODE_ATTEN1 : {show: y, blk : 2, word: 4, pos: 27, len : 10, start: 155, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten1, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[31:27]', bloc: 'B19[7:3],B20[4:0]'} + ADC1_AVE_INIT_CODE_ATTEN2 : {show: y, blk : 2, word: 5, pos : 5, len : 10, start: 165, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten2, rloc: 'EFUSE_RD_SYS_PART1_DATA5_REG[14:5]', bloc: 'B20[7:5],B21[6:0]'} + ADC1_AVE_INIT_CODE_ATTEN3 : {show: y, blk : 2, word: 5, pos: 15, len : 10, start: 175, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten3, rloc: 'EFUSE_RD_SYS_PART1_DATA5_REG[24:15]', bloc: 'B21[7],B22,B23[0]'} + ADC1_HI_DOUT_ATTEN0 : {show: y, blk : 2, word: 5, pos: 25, len : 10, start: 185, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI_DOUT of ADC1 atten0, rloc: 'EFUSE_RD_SYS_PART1_DATA5_REG[31:25]', bloc: 'B23[7:1],B24[2:0]'} + ADC1_HI_DOUT_ATTEN1 : {show: y, blk : 2, word: 6, pos : 3, len : 10, start: 195, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI_DOUT of ADC1 atten1, rloc: 'EFUSE_RD_SYS_PART1_DATA6_REG[12:3]', bloc: 'B24[7:3],B25[4:0]'} + ADC1_HI_DOUT_ATTEN2 : {show: y, blk : 2, word: 6, pos: 13, len : 10, start: 205, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI_DOUT of ADC1 atten2, rloc: 'EFUSE_RD_SYS_PART1_DATA6_REG[22:13]', bloc: 'B25[7:5],B26[6:0]'} + ADC1_HI_DOUT_ATTEN3 : {show: y, blk : 2, word: 6, pos: 23, len : 10, start: 215, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI_DOUT of ADC1 atten3, rloc: 'EFUSE_RD_SYS_PART1_DATA6_REG[31:23]', bloc: 'B26[7],B27,B28[0]'} + ADC1_CH0_ATTEN0_INITCODE_DIFF : {show: y, blk : 2, word: 7, pos : 1, len : 4, start: 225, type : 'uint:4', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Gap between ADC1 CH0 and average initcode, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[4:1]', bloc: 'B28[4:1]'} + ADC1_CH1_ATTEN0_INITCODE_DIFF : {show: y, blk : 2, word: 7, pos : 5, len : 4, start: 229, type : 'uint:4', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Gap between ADC1 CH1 and average initcode, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[8:5]', bloc: 'B28[7:5],B29[0]'} + ADC1_CH2_ATTEN0_INITCODE_DIFF : {show: y, blk : 2, word: 7, pos : 9, len : 4, start: 233, type : 'uint:4', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Gap between ADC1 CH2 and average initcode, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[12:9]', bloc: 'B29[4:1]'} + ADC1_CH3_ATTEN0_INITCODE_DIFF : {show: y, blk : 2, word: 7, pos: 13, len : 4, start: 237, type : 'uint:4', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Gap between ADC1 CH3 and average initcode, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[16:13]', bloc: 'B29[7:5],B30[0]'} + RESERVED_2_241 : {show: n, blk : 2, word: 7, pos: 17, len : 15, start: 241, type : 'uint:15', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[31:17]', bloc: 'B30[7:1],B31'} BLOCK_USR_DATA : {show: y, blk : 3, word: 0, pos : 0, len: 192, start : 0, type: 'bytes:24', wr_dis : 22, rd_dis: null, alt : USER_DATA, dict : '', desc: User data, rloc: EFUSE_RD_USR_DATA0_REG, bloc: 'B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17,B18,B19,B20,B21,B22,B23'} RESERVED_3_192 : {show: n, blk : 3, word: 6, pos : 0, len : 8, start: 192, type : 'uint:8', wr_dis : 22, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_USR_DATA6_REG[7:0]', bloc: B24} CUSTOM_MAC : {show: y, blk : 3, word: 6, pos : 8, len : 48, start: 200, type : 'bytes:6', wr_dis : 22, rd_dis: null, alt: MAC_CUSTOM USER_DATA_MAC_CUSTOM, dict : '', desc: Custom MAC, rloc: 'EFUSE_RD_USR_DATA6_REG[31:8]', bloc: 'B25,B26,B27,B28,B29,B30'} diff --git a/espefuse/efuse_defs/esp32p4.yaml b/espefuse/efuse_defs/esp32p4.yaml index e4ffea60d7..788f45e2c2 100644 --- a/espefuse/efuse_defs/esp32p4.yaml +++ b/espefuse/efuse_defs/esp32p4.yaml @@ -1,4 +1,4 @@ -VER_NO: d4a48929387e281bd05db8cfb3a85f60 +VER_NO: 73787d3f5ae45b80abca925a7562120b EFUSES: WR_DIS : {show: y, blk : 0, word: 0, pos : 0, len : 32, start : 0, type : 'uint:32', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Disable programming of individual eFuses, rloc: EFUSE_RD_WR_DIS_REG, bloc: 'B0,B1,B2,B3'} RD_DIS : {show: y, blk : 0, word: 1, pos : 0, len : 7, start : 32, type : 'uint:7', wr_dis : 0, rd_dis: null, alt : '', dict : '', desc: Disable reading from BlOCK4-10, rloc: 'EFUSE_RD_REPEAT_DATA0_REG[6:0]', bloc: 'B4[6:0]'} @@ -83,16 +83,39 @@ EFUSES: TEMP : {show: y, blk : 1, word: 2, pos: 16, len : 2, start : 80, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Operating temperature of the ESP chip, rloc: 'EFUSE_RD_MAC_SYS_2_REG[17:16]', bloc: 'B10[1:0]'} PSRAM_VENDOR : {show: y, blk : 1, word: 2, pos: 18, len : 2, start : 82, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: PSRAM vendor, rloc: 'EFUSE_RD_MAC_SYS_2_REG[19:18]', bloc: 'B10[3:2]'} PKG_VERSION : {show: y, blk : 1, word: 2, pos: 20, len : 3, start : 84, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Package version, rloc: 'EFUSE_RD_MAC_SYS_2_REG[22:20]', bloc: 'B10[6:4]'} - RESERVED_1_87 : {show: n, blk : 1, word: 2, pos: 23, len : 9, start : 87, type : 'uint:9', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_MAC_SYS_2_REG[31:23]', bloc: 'B10[7],B11'} - MAC_RESERVED_2 : {show: n, blk : 1, word: 3, pos : 0, len : 18, start : 96, type : 'uint:18', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Reserved, rloc: 'EFUSE_RD_MAC_SYS_3_REG[17:0]', bloc: 'B12,B13,B14[1:0]'} - SYS_DATA_PART0_0 : {show: n, blk : 1, word: 3, pos: 18, len : 14, start: 114, type : 'uint:14', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Stores the first 14 bits of the zeroth part of system data, rloc: 'EFUSE_RD_MAC_SYS_3_REG[31:18]', bloc: 'B14[7:2],B15'} - SYS_DATA_PART0_1 : {show: n, blk : 1, word: 4, pos : 0, len : 32, start: 128, type : 'uint:32', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Stores the first 32 bits of the zeroth part of system data, rloc: EFUSE_RD_MAC_SYS_4_REG, bloc: 'B16,B17,B18,B19'} - SYS_DATA_PART0_2 : {show: n, blk : 1, word: 5, pos : 0, len : 32, start: 160, type : 'uint:32', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Stores the second 32 bits of the zeroth part of system data, rloc: EFUSE_RD_MAC_SYS_5_REG, bloc: 'B20,B21,B22,B23'} + RESERVED_1_87 : {show: n, blk : 1, word: 2, pos: 23, len : 1, start : 87, type : bool, wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_MAC_SYS_2_REG[23]', bloc: 'B10[7]'} + LDO_VO1_DREF : {show: y, blk : 1, word: 2, pos: 24, len : 4, start : 88, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO1 parameter, rloc: 'EFUSE_RD_MAC_SYS_2_REG[27:24]', bloc: 'B11[3:0]'} + LDO_VO2_DREF : {show: y, blk : 1, word: 2, pos: 28, len : 4, start : 92, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO2 parameter, rloc: 'EFUSE_RD_MAC_SYS_2_REG[31:28]', bloc: 'B11[7:4]'} + LDO_VO1_MUL : {show: y, blk : 1, word: 3, pos : 0, len : 3, start : 96, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO1 parameter, rloc: 'EFUSE_RD_MAC_SYS_3_REG[2:0]', bloc: 'B12[2:0]'} + LDO_VO2_MUL : {show: y, blk : 1, word: 3, pos : 3, len : 3, start : 99, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO2 parameter, rloc: 'EFUSE_RD_MAC_SYS_3_REG[5:3]', bloc: 'B12[5:3]'} + LDO_VO3_K : {show: y, blk : 1, word: 3, pos : 6, len : 8, start: 102, type : 'uint:8', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO3 calibration parameter, rloc: 'EFUSE_RD_MAC_SYS_3_REG[13:6]', bloc: 'B12[7:6],B13[5:0]'} + LDO_VO3_VOS : {show: y, blk : 1, word: 3, pos: 14, len : 6, start: 110, type : 'uint:6', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO3 calibration parameter, rloc: 'EFUSE_RD_MAC_SYS_3_REG[19:14]', bloc: 'B13[7:6],B14[3:0]'} + LDO_VO3_C : {show: y, blk : 1, word: 3, pos: 20, len : 6, start: 116, type : 'uint:6', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO3 calibration parameter, rloc: 'EFUSE_RD_MAC_SYS_3_REG[25:20]', bloc: 'B14[7:4],B15[1:0]'} + LDO_VO4_K : {show: y, blk : 1, word: 3, pos: 26, len : 8, start: 122, type : 'uint:8', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO4 calibration parameter, rloc: 'EFUSE_RD_MAC_SYS_3_REG[31:26]', bloc: 'B15[7:2],B16[1:0]'} + LDO_VO4_VOS : {show: y, blk : 1, word: 4, pos : 2, len : 6, start: 130, type : 'uint:6', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO4 calibration parameter, rloc: 'EFUSE_RD_MAC_SYS_4_REG[7:2]', bloc: 'B16[7:2]'} + LDO_VO4_C : {show: y, blk : 1, word: 4, pos : 8, len : 6, start: 136, type : 'uint:6', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Output VO4 calibration parameter, rloc: 'EFUSE_RD_MAC_SYS_4_REG[13:8]', bloc: 'B17[5:0]'} + RESERVED_1_142 : {show: n, blk : 1, word: 4, pos: 14, len : 2, start: 142, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_MAC_SYS_4_REG[15:14]', bloc: 'B17[7:6]'} + ACTIVE_HP_DBIAS : {show: y, blk : 1, word: 4, pos: 16, len : 4, start: 144, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Active HP DBIAS of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS_4_REG[19:16]', bloc: 'B18[3:0]'} + ACTIVE_LP_DBIAS : {show: y, blk : 1, word: 4, pos: 20, len : 4, start: 148, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: Active LP DBIAS of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS_4_REG[23:20]', bloc: 'B18[7:4]'} + LSLP_HP_DBIAS : {show: y, blk : 1, word: 4, pos: 24, len : 4, start: 152, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: LSLP HP DBIAS of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS_4_REG[27:24]', bloc: 'B19[3:0]'} + DSLP_DBG : {show: y, blk : 1, word: 4, pos: 28, len : 4, start: 156, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: DSLP BDG of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS_4_REG[31:28]', bloc: 'B19[7:4]'} + DSLP_LP_DBIAS : {show: y, blk : 1, word: 5, pos : 0, len : 5, start: 160, type : 'uint:5', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: DSLP LP DBIAS of fixed voltage, rloc: 'EFUSE_RD_MAC_SYS_5_REG[4:0]', bloc: 'B20[4:0]'} + LP_DCDC_DBIAS_VOL_GAP : {show: y, blk : 1, word: 5, pos : 5, len : 5, start: 165, type : 'uint:5', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: DBIAS gap between LP and DCDC, rloc: 'EFUSE_RD_MAC_SYS_5_REG[9:5]', bloc: 'B20[7:5],B21[1:0]'} + RESERVED_1_170 : {show: n, blk : 1, word: 5, pos: 10, len : 22, start: 170, type : 'uint:22', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_MAC_SYS_5_REG[31:10]', bloc: 'B21[7:2],B22,B23'} OPTIONAL_UNIQUE_ID : {show: y, blk : 2, word: 0, pos : 0, len: 128, start : 0, type: 'bytes:16', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Optional unique 128-bit ID, rloc: EFUSE_RD_SYS_PART1_DATA0_REG, bloc: 'B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15'} - SYS_DATA_PART1_4 : {show: n, blk : 2, word: 4, pos : 0, len : 32, start: 128, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Stores the fourth 32 bits of the first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA4_REG, bloc: 'B16,B17,B18,B19'} - SYS_DATA_PART1_5 : {show: n, blk : 2, word: 5, pos : 0, len : 32, start: 160, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Stores the fifth 32 bits of the first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA5_REG, bloc: 'B20,B21,B22,B23'} - SYS_DATA_PART1_6 : {show: n, blk : 2, word: 6, pos : 0, len : 32, start: 192, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Stores the sixth 32 bits of the first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA6_REG, bloc: 'B24,B25,B26,B27'} - SYS_DATA_PART1_7 : {show: n, blk : 2, word: 7, pos : 0, len : 32, start: 224, type : 'uint:32', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Stores the seventh 32 bits of the first part of system data, rloc: EFUSE_RD_SYS_PART1_DATA7_REG, bloc: 'B28,B29,B30,B31'} + ADC1_AVE_INITCODE_ATTEN0 : {show: y, blk : 2, word: 4, pos : 0, len : 10, start: 128, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten0, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[9:0]', bloc: 'B16,B17[1:0]'} + ADC1_AVE_INITCODE_ATTEN1 : {show: y, blk : 2, word: 4, pos: 10, len : 10, start: 138, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten1, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[19:10]', bloc: 'B17[7:2],B18[3:0]'} + ADC1_AVE_INITCODE_ATTEN2 : {show: y, blk : 2, word: 4, pos: 20, len : 10, start: 148, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten2, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[29:20]', bloc: 'B18[7:4],B19[5:0]'} + ADC1_AVE_INITCODE_ATTEN3 : {show: y, blk : 2, word: 4, pos: 30, len : 10, start: 158, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC1 atten3, rloc: 'EFUSE_RD_SYS_PART1_DATA4_REG[31:30]', bloc: 'B19[7:6],B20'} + ADC2_AVE_INITCODE_ATTEN0 : {show: y, blk : 2, word: 5, pos : 8, len : 10, start: 168, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC2 atten0, rloc: 'EFUSE_RD_SYS_PART1_DATA5_REG[17:8]', bloc: 'B21,B22[1:0]'} + ADC2_AVE_INITCODE_ATTEN1 : {show: y, blk : 2, word: 5, pos: 18, len : 10, start: 178, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC2 atten1, rloc: 'EFUSE_RD_SYS_PART1_DATA5_REG[27:18]', bloc: 'B22[7:2],B23[3:0]'} + ADC2_AVE_INITCODE_ATTEN2 : {show: y, blk : 2, word: 5, pos: 28, len : 10, start: 188, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC2 atten2, rloc: 'EFUSE_RD_SYS_PART1_DATA5_REG[31:28]', bloc: 'B23[7:4],B24[5:0]'} + ADC2_AVE_INITCODE_ATTEN3 : {show: y, blk : 2, word: 6, pos : 6, len : 10, start: 198, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: Average initcode of ADC2 atten3, rloc: 'EFUSE_RD_SYS_PART1_DATA6_REG[15:6]', bloc: 'B24[7:6],B25'} + ADC1_HI_DOUT_ATTEN0 : {show: y, blk : 2, word: 6, pos: 16, len : 10, start: 208, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI_DOUT of ADC1 atten0, rloc: 'EFUSE_RD_SYS_PART1_DATA6_REG[25:16]', bloc: 'B26,B27[1:0]'} + ADC1_HI_DOUT_ATTEN1 : {show: y, blk : 2, word: 6, pos: 26, len : 10, start: 218, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI_DOUT of ADC1 atten1, rloc: 'EFUSE_RD_SYS_PART1_DATA6_REG[31:26]', bloc: 'B27[7:2],B28[3:0]'} + ADC1_HI_DOUT_ATTEN2 : {show: y, blk : 2, word: 7, pos : 4, len : 10, start: 228, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI_DOUT of ADC1 atten2, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[13:4]', bloc: 'B28[7:4],B29[5:0]'} + ADC1_HI_DOUT_ATTEN3 : {show: y, blk : 2, word: 7, pos: 14, len : 10, start: 238, type : 'uint:10', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: HI_DOUT of ADC1 atten3, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[23:14]', bloc: 'B29[7:6],B30'} + RESERVED_2_248 : {show: n, blk : 2, word: 7, pos: 24, len : 8, start: 248, type : 'uint:8', wr_dis : 21, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_SYS_PART1_DATA7_REG[31:24]', bloc: B31} BLOCK_USR_DATA : {show: y, blk : 3, word: 0, pos : 0, len: 192, start : 0, type: 'bytes:24', wr_dis : 22, rd_dis: null, alt : USER_DATA, dict : '', desc: User data, rloc: EFUSE_RD_USR_DATA0_REG, bloc: 'B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17,B18,B19,B20,B21,B22,B23'} RESERVED_3_192 : {show: n, blk : 3, word: 6, pos : 0, len : 8, start: 192, type : 'uint:8', wr_dis : 22, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_USR_DATA6_REG[7:0]', bloc: B24} CUSTOM_MAC : {show: y, blk : 3, word: 6, pos : 8, len : 48, start: 200, type : 'bytes:6', wr_dis : 22, rd_dis: null, alt: MAC_CUSTOM USER_DATA_MAC_CUSTOM, dict : '', desc: Custom MAC, rloc: 'EFUSE_RD_USR_DATA6_REG[31:8]', bloc: 'B25,B26,B27,B28,B29,B30'} @@ -103,4 +126,27 @@ EFUSES: BLOCK_KEY3 : {show: y, blk : 7, word: 0, pos : 0, len: 256, start : 0, type: 'bytes:32', wr_dis : 26, rd_dis : 3, alt : KEY3, dict : '', desc: Key3 or user data, rloc: EFUSE_RD_KEY3_DATA0_REG, bloc: 'B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28,B29,B30,B31'} BLOCK_KEY4 : {show: y, blk : 8, word: 0, pos : 0, len: 256, start : 0, type: 'bytes:32', wr_dis : 27, rd_dis : 4, alt : KEY4, dict : '', desc: Key4 or user data, rloc: EFUSE_RD_KEY4_DATA0_REG, bloc: 'B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28,B29,B30,B31'} BLOCK_KEY5 : {show: y, blk : 9, word: 0, pos : 0, len: 256, start : 0, type: 'bytes:32', wr_dis : 28, rd_dis : 5, alt : KEY5, dict : '', desc: Key5 or user data, rloc: EFUSE_RD_KEY5_DATA0_REG, bloc: 'B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28,B29,B30,B31'} - BLOCK_SYS_DATA2 : {show: y, blk: 10, word: 0, pos : 0, len: 256, start : 0, type: 'bytes:32', wr_dis : 29, rd_dis : 6, alt : SYS_DATA_PART2, dict : '', desc: System data part 2 (reserved), rloc: EFUSE_RD_SYS_PART2_DATA0_REG, bloc: 'B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,B11,B12,B13,B14,B15,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25,B26,B27,B28,B29,B30,B31'} + ADC2_HI_DOUT_ATTEN0 : {show: y, blk: 10, word: 0, pos : 0, len : 10, start : 0, type : 'uint:10', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: HI_DOUT of ADC2 atten0, rloc: 'EFUSE_RD_SYS_PART2_DATA0_REG[9:0]', bloc: 'B0,B1[1:0]'} + ADC2_HI_DOUT_ATTEN1 : {show: y, blk: 10, word: 0, pos: 10, len : 10, start : 10, type : 'uint:10', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: HI_DOUT of ADC2 atten1, rloc: 'EFUSE_RD_SYS_PART2_DATA0_REG[19:10]', bloc: 'B1[7:2],B2[3:0]'} + ADC2_HI_DOUT_ATTEN2 : {show: y, blk: 10, word: 0, pos: 20, len : 10, start : 20, type : 'uint:10', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: HI_DOUT of ADC2 atten2, rloc: 'EFUSE_RD_SYS_PART2_DATA0_REG[29:20]', bloc: 'B2[7:4],B3[5:0]'} + ADC2_HI_DOUT_ATTEN3 : {show: y, blk: 10, word: 0, pos: 30, len : 10, start : 30, type : 'uint:10', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: HI_DOUT of ADC2 atten3, rloc: 'EFUSE_RD_SYS_PART2_DATA0_REG[31:30]', bloc: 'B3[7:6],B4'} + ADC1_CH0_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 1, pos : 8, len : 4, start : 40, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC1_ch0 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA1_REG[11:8]', bloc: 'B5[3:0]'} + ADC1_CH1_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 1, pos: 12, len : 4, start : 44, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC1_ch1 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA1_REG[15:12]', bloc: 'B5[7:4]'} + ADC1_CH2_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 1, pos: 16, len : 4, start : 48, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC1_ch2 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA1_REG[19:16]', bloc: 'B6[3:0]'} + ADC1_CH3_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 1, pos: 20, len : 4, start : 52, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC1_ch3 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA1_REG[23:20]', bloc: 'B6[7:4]'} + ADC1_CH4_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 1, pos: 24, len : 4, start : 56, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC1_ch4 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA1_REG[27:24]', bloc: 'B7[3:0]'} + ADC1_CH5_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 1, pos: 28, len : 4, start : 60, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC1_ch5 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA1_REG[31:28]', bloc: 'B7[7:4]'} + ADC1_CH6_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 2, pos : 0, len : 4, start : 64, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC1_ch6 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA2_REG[3:0]', bloc: 'B8[3:0]'} + ADC1_CH7_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 2, pos : 4, len : 4, start : 68, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC1_ch7 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA2_REG[7:4]', bloc: 'B8[7:4]'} + ADC2_CH0_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 2, pos : 8, len : 4, start : 72, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC2_ch0 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA2_REG[11:8]', bloc: 'B9[3:0]'} + ADC2_CH1_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 2, pos: 12, len : 4, start : 76, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC2_ch1 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA2_REG[15:12]', bloc: 'B9[7:4]'} + ADC2_CH2_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 2, pos: 16, len : 4, start : 80, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC2_ch2 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA2_REG[19:16]', bloc: 'B10[3:0]'} + ADC2_CH3_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 2, pos: 20, len : 4, start : 84, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC2_ch3 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA2_REG[23:20]', bloc: 'B10[7:4]'} + ADC2_CH4_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 2, pos: 24, len : 4, start : 88, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC2_ch4 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA2_REG[27:24]', bloc: 'B11[3:0]'} + ADC2_CH5_ATTEN0_INITCODE_DIFF : {show: y, blk: 10, word: 2, pos: 28, len : 4, start : 92, type : 'uint:4', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Gap between ADC2_ch5 and average initcode, rloc: 'EFUSE_RD_SYS_PART2_DATA2_REG[31:28]', bloc: 'B11[7:4]'} + TEMPERATURE_SENSOR : {show: y, blk: 10, word: 3, pos : 0, len : 9, start : 96, type : 'uint:9', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Temperature calibration data, rloc: 'EFUSE_RD_SYS_PART2_DATA3_REG[8:0]', bloc: 'B12,B13[0]'} + RESERVED_10_105 : {show: n, blk: 10, word: 3, pos : 9, len : 23, start: 105, type : 'uint:23', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_SYS_PART2_DATA3_REG[31:9]', bloc: 'B13[7:1],B14,B15'} + SYS_DATA_PART2_4 : {show: n, blk: 10, word: 4, pos : 0, len : 32, start: 128, type : 'uint:32', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Stores the $nth 32 bits of the 2nd part of system data, rloc: EFUSE_RD_SYS_PART2_DATA4_REG, bloc: 'B16,B17,B18,B19'} + SYS_DATA_PART2_5 : {show: n, blk: 10, word: 5, pos : 0, len : 32, start: 160, type : 'uint:32', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Stores the $nth 32 bits of the 2nd part of system data, rloc: EFUSE_RD_SYS_PART2_DATA5_REG, bloc: 'B20,B21,B22,B23'} + SYS_DATA_PART2_6 : {show: n, blk: 10, word: 6, pos : 0, len : 32, start: 192, type : 'uint:32', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Stores the $nth 32 bits of the 2nd part of system data, rloc: EFUSE_RD_SYS_PART2_DATA6_REG, bloc: 'B24,B25,B26,B27'} + SYS_DATA_PART2_7 : {show: n, blk: 10, word: 7, pos : 0, len : 32, start: 224, type : 'uint:32', wr_dis : 29, rd_dis : 6, alt : '', dict : '', desc: Stores the $nth 32 bits of the 2nd part of system data, rloc: EFUSE_RD_SYS_PART2_DATA7_REG, bloc: 'B28,B29,B30,B31'} diff --git a/espefuse/efuse_defs/esp32s3.yaml b/espefuse/efuse_defs/esp32s3.yaml index 4d4c69511d..2594b3ee30 100644 --- a/espefuse/efuse_defs/esp32s3.yaml +++ b/espefuse/efuse_defs/esp32s3.yaml @@ -1,4 +1,4 @@ -VER_NO: f75f74727101326a187188a23f4a6c70 +VER_NO: 7127dd097e72bb90d0b790d460993126 EFUSES: WR_DIS : {show: y, blk : 0, word: 0, pos : 0, len : 32, start : 0, type : 'uint:32', wr_dis: null, rd_dis: null, alt : '', dict : '', desc: Disable programming of individual eFuses, rloc: EFUSE_RD_WR_DIS_REG, bloc: 'B0,B1,B2,B3'} RD_DIS : {show: y, blk : 0, word: 1, pos : 0, len : 7, start : 32, type : 'uint:7', wr_dis : 0, rd_dis: null, alt : '', dict : '', desc: Disable reading from BlOCK4-10, rloc: 'EFUSE_RD_REPEAT_DATA0_REG[6:0]', bloc: 'B4[6:0]'} @@ -87,7 +87,7 @@ EFUSES: FLASH_CAP : {show: y, blk : 1, word: 3, pos: 27, len : 3, start: 123, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict: '{0: "None", 1: "8M", 2: "4M"}', desc: Flash capacity, rloc: 'EFUSE_RD_MAC_SPI_SYS_3_REG[29:27]', bloc: 'B15[5:3]'} FLASH_TEMP : {show: y, blk : 1, word: 3, pos: 30, len : 2, start: 126, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict: '{0: "None", 1: "105C", 2: "85C"}', desc: Flash temperature, rloc: 'EFUSE_RD_MAC_SPI_SYS_3_REG[31:30]', bloc: 'B15[7:6]'} FLASH_VENDOR : {show: y, blk : 1, word: 4, pos : 0, len : 3, start: 128, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict: '{0: "None", 1: "XMC", 2: "GD", 3: "FM", 4: "TT", 5: "BY"}', desc: Flash vendor, rloc: 'EFUSE_RD_MAC_SPI_SYS_4_REG[2:0]', bloc: 'B16[2:0]'} - PSRAM_CAP : {show: y, blk : 1, word: 4, pos : 3, len : 2, start: 131, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict: '{0: "None", 1: "8M", 2: "2M"}', desc: PSRAM capacity, rloc: 'EFUSE_RD_MAC_SPI_SYS_4_REG[4:3]', bloc: 'B16[4:3]'} + PSRAM_CAP : {show: y, blk : 1, word: 4, pos : 3, len : 2, start: 131, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict: '{0: "None", 1: "8M", 2: "2M", 3: "16M", 4: "4M"}', desc: PSRAM capacity, rloc: 'EFUSE_RD_MAC_SPI_SYS_4_REG[4:3]', bloc: 'B16[4:3]'} PSRAM_TEMP : {show: y, blk : 1, word: 4, pos : 5, len : 2, start: 133, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict: '{0: "None", 1: "105C", 2: "85C"}', desc: PSRAM temperature, rloc: 'EFUSE_RD_MAC_SPI_SYS_4_REG[6:5]', bloc: 'B16[6:5]'} PSRAM_VENDOR : {show: y, blk : 1, word: 4, pos : 7, len : 2, start: 135, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict: '{0: "None", 1: "AP_3v3", 2: "AP_1v8"}', desc: PSRAM vendor, rloc: 'EFUSE_RD_MAC_SPI_SYS_4_REG[8:7]', bloc: 'B16[7],B17[0]'} RESERVED_1_137 : {show: n, blk : 1, word: 4, pos : 9, len : 4, start: 137, type : 'uint:4', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_MAC_SPI_SYS_4_REG[12:9]', bloc: 'B17[4:1]'} @@ -96,7 +96,9 @@ EFUSES: V_RTC_DBIAS20 : {show: y, blk : 1, word: 4, pos: 27, len : 8, start: 155, type : 'uint:8', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: BLOCK1 voltage of rtc dbias20, rloc: 'EFUSE_RD_MAC_SPI_SYS_4_REG[31:27]', bloc: 'B19[7:3],B20[2:0]'} V_DIG_DBIAS20 : {show: y, blk : 1, word: 5, pos : 3, len : 8, start: 163, type : 'uint:8', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: BLOCK1 voltage of digital dbias20, rloc: 'EFUSE_RD_MAC_SPI_SYS_5_REG[10:3]', bloc: 'B20[7:3],B21[2:0]'} DIG_DBIAS_HVT : {show: y, blk : 1, word: 5, pos: 11, len : 5, start: 171, type : 'uint:5', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: BLOCK1 digital dbias when hvt, rloc: 'EFUSE_RD_MAC_SPI_SYS_5_REG[15:11]', bloc: 'B21[7:3]'} - RESERVED_1_176 : {show: n, blk : 1, word: 5, pos: 16, len : 7, start: 176, type : 'uint:7', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_MAC_SPI_SYS_5_REG[22:16]', bloc: 'B22[6:0]'} + RESERVED_1_176 : {show: n, blk : 1, word: 5, pos: 16, len : 3, start: 176, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_MAC_SPI_SYS_5_REG[18:16]', bloc: 'B22[2:0]'} + PSRAM_CAP_3 : {show: y, blk : 1, word: 5, pos: 19, len : 1, start: 179, type : bool, wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: PSRAM capacity bit 3, rloc: 'EFUSE_RD_MAC_SPI_SYS_5_REG[19]', bloc: 'B22[3]'} + RESERVED_1_180 : {show: n, blk : 1, word: 5, pos: 20, len : 3, start: 180, type : 'uint:3', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: reserved, rloc: 'EFUSE_RD_MAC_SPI_SYS_5_REG[22:20]', bloc: 'B22[6:4]'} WAFER_VERSION_MINOR_HI : {show: y, blk : 1, word: 5, pos: 23, len : 1, start: 183, type : bool, wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: WAFER_VERSION_MINOR most significant bit, rloc: 'EFUSE_RD_MAC_SPI_SYS_5_REG[23]', bloc: 'B22[7]'} WAFER_VERSION_MAJOR : {show: y, blk : 1, word: 5, pos: 24, len : 2, start: 184, type : 'uint:2', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: WAFER_VERSION_MAJOR, rloc: 'EFUSE_RD_MAC_SPI_SYS_5_REG[25:24]', bloc: 'B23[1:0]'} ADC2_CAL_VOL_ATTEN3 : {show: y, blk : 1, word: 5, pos: 26, len : 6, start: 186, type : 'uint:6', wr_dis : 20, rd_dis: null, alt : '', dict : '', desc: ADC2 calibration voltage at atten3, rloc: 'EFUSE_RD_MAC_SPI_SYS_5_REG[31:26]', bloc: 'B23[7:2]'} diff --git a/esptool/__init__.py b/esptool/__init__.py index 2d94e9d967..0a4f8534b7 100644 --- a/esptool/__init__.py +++ b/esptool/__init__.py @@ -135,7 +135,7 @@ def main(argv=None, esp=None): parser.add_argument( "--port-filter", action="append", - help="Serial port device filter, can be vid=NUMBER, pid=NUMBER, name=SUBSTRING", + help="Serial port device filter, can be vid=NUMBER, pid=NUMBER, name=SUBSTRING, serial=SUBSTRING", type=str, default=[], ) @@ -728,6 +728,7 @@ def add_spi_flash_subparsers( args.filterVids = [] args.filterPids = [] args.filterNames = [] + args.filterSerials = [] for f in args.port_filter: kvp = f.split("=") if len(kvp) != 2: @@ -738,6 +739,8 @@ def add_spi_flash_subparsers( args.filterPids.append(arg_auto_int(kvp[1])) elif kvp[0] == "name": args.filterNames.append(kvp[1]) + elif kvp[0] == "serial": + args.filterSerials.append(kvp[1]) else: raise FatalError("Option --port-filter argument key not recognized") @@ -776,7 +779,9 @@ def add_spi_flash_subparsers( initial_baud = args.baud if args.port is None: - ser_list = get_port_list(args.filterVids, args.filterPids, args.filterNames) + ser_list = get_port_list( + args.filterVids, args.filterPids, args.filterNames, args.filterSerials + ) print("Found %d serial ports" % len(ser_list)) else: ser_list = [args.port] @@ -1082,7 +1087,7 @@ def arg_auto_chunk_size(string: str) -> int: return num -def get_port_list(vids=[], pids=[], names=[]): +def get_port_list(vids=[], pids=[], names=[], serials=[]): if list_ports is None: raise FatalError( "Listing all serial ports is currently not available. " @@ -1103,6 +1108,11 @@ def get_port_list(vids=[], pids=[], names=[]): port.name is None or all(name not in port.name for name in names) ): continue + if serials and ( + port.serial_number is None + or all(serial not in port.serial_number for serial in serials) + ): + continue ports.append(port.device) return sorted(ports) diff --git a/esptool/cmds.py b/esptool/cmds.py index 7c65f9824c..bfed46c272 100644 --- a/esptool/cmds.py +++ b/esptool/cmds.py @@ -97,6 +97,14 @@ def detect_chip( if detect_port.serial_port.startswith("rfc2217:"): detect_port.USES_RFC2217 = True detect_port.connect(connect_mode, connect_attempts, detecting=True) + + def check_if_stub(instance): + print(f" {instance.CHIP_NAME}") + if detect_port.sync_stub_detected: + instance = instance.STUB_CLASS(instance) + instance.sync_stub_detected = True + return instance + try: print("Detecting chip type...", end="") chip_id = detect_port.get_chip_id() @@ -112,6 +120,7 @@ def detect_chip( ) # Dummy read to check Secure Download mode except UnsupportedCommandError: inst.secure_download_mode = True + inst = check_if_stub(inst) inst._post_connect() break else: @@ -137,6 +146,7 @@ def detect_chip( for cls in ROM_LIST: if chip_magic_value in cls.CHIP_DETECT_MAGIC_VALUE: inst = cls(detect_port._port, baud, trace_enabled=trace_enabled) + inst = check_if_stub(inst) inst._post_connect() inst.check_chip_id() break @@ -148,14 +158,9 @@ def detect_chip( "Probably this means Secure Download Mode is enabled, " "autodetection will not work. Need to manually specify the chip." ) - finally: - if inst is not None: - print(" %s" % inst.CHIP_NAME, end="") - if detect_port.sync_stub_detected: - inst = inst.STUB_CLASS(inst) - inst.sync_stub_detected = True - print("") # end line - return inst + if inst is not None: + return inst + raise FatalError( f"{err_msg} Failed to autodetect chip type." "\nProbably it is unsupported by this version of esptool." @@ -1151,12 +1156,27 @@ def erase_flash(esp, args): "please use with caution, otherwise it may brick your device!" ) print("Erasing flash (this may take a while)...") + if esp.CHIP_NAME != "ESP8266" and not esp.IS_STUB: + print( + "Note: You can use the erase_region command in ROM bootloader " + "mode to erase a specific region." + ) t = time.time() esp.erase_flash() - print("Chip erase completed successfully in %.1fs" % (time.time() - t)) + print(f"Chip erase completed successfully in {time.time() - t:.1f} seconds.") def erase_region(esp, args): + if args.address % ESPLoader.FLASH_SECTOR_SIZE != 0: + raise FatalError( + "Offset to erase from must be a multiple " + f"of {ESPLoader.FLASH_SECTOR_SIZE}" + ) + if args.size % ESPLoader.FLASH_SECTOR_SIZE != 0: + raise FatalError( + "Size of data to erase must be a multiple " + f"of {ESPLoader.FLASH_SECTOR_SIZE}" + ) if not args.force and esp.CHIP_NAME != "ESP8266" and not esp.secure_download_mode: if esp.get_flash_encryption_enabled() or esp.get_secure_boot_enabled(): raise FatalError( @@ -1167,8 +1187,12 @@ def erase_region(esp, args): ) print("Erasing region (may be slow depending on size)...") t = time.time() - esp.erase_region(args.address, args.size) - print("Erase completed successfully in %.1f seconds." % (time.time() - t)) + if esp.CHIP_NAME != "ESP8266" and not esp.IS_STUB: + # flash_begin triggers a flash erase, enabling erasing in ROM and SDM + esp.flash_begin(args.size, args.address, logging=False) + else: + esp.erase_region(args.address, args.size) + print(f"Erase completed successfully in {time.time() - t:.1f} seconds.") def run(esp, args): diff --git a/esptool/loader.py b/esptool/loader.py index 1e7c71b41e..883eeb5327 100644 --- a/esptool/loader.py +++ b/esptool/loader.py @@ -891,7 +891,7 @@ def mem_finish(self, entrypoint=0): raise pass - def flash_begin(self, size, offset, begin_rom_encrypted=False): + def flash_begin(self, size, offset, begin_rom_encrypted=False, logging=True): """ Start downloading to Flash (performs an erase) @@ -916,7 +916,7 @@ def flash_begin(self, size, offset, begin_rom_encrypted=False): self.check_command( "enter Flash download mode", self.ESP_FLASH_BEGIN, params, timeout=timeout ) - if size != 0 and not self.IS_STUB: + if size != 0 and not self.IS_STUB and logging: print("Took %.2fs to erase flash block" % (time.time() - t)) return num_blocks @@ -1196,10 +1196,6 @@ def erase_flash(self): @stub_function_only def erase_region(self, offset, size): - if offset % self.FLASH_SECTOR_SIZE != 0: - raise FatalError("Offset to erase from must be a multiple of 4096") - if size % self.FLASH_SECTOR_SIZE != 0: - raise FatalError("Size of data to erase must be a multiple of 4096") timeout = timeout_per_mb(ERASE_REGION_TIMEOUT_PER_MB, size) self.check_command( "erase region", diff --git a/esptool/targets/esp32s3.py b/esptool/targets/esp32s3.py index 90cd63707f..5d811e5c3d 100644 --- a/esptool/targets/esp32s3.py +++ b/esptool/targets/esp32s3.py @@ -209,7 +209,12 @@ def get_flash_vendor(self): def get_psram_cap(self): num_word = 4 - return (self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 3) & 0x03 + psram_cap = (self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 3) & 0x03 + num_word = 5 + psram_cap_hi_bit = ( + self.read_reg(self.EFUSE_BLOCK1_ADDR + (4 * num_word)) >> 19 + ) & 0x01 + return (psram_cap_hi_bit << 2) | psram_cap def get_psram_vendor(self): num_word = 4 @@ -231,6 +236,8 @@ def get_chip_features(self): 0: None, 1: "Embedded PSRAM 8MB", 2: "Embedded PSRAM 2MB", + 3: "Embedded PSRAM 16MB", + 4: "Embedded PSRAM 4MB", }.get(self.get_psram_cap(), "Unknown Embedded PSRAM") if psram is not None: features += [psram + f" ({self.get_psram_vendor()})"] diff --git a/test/images/efuse/256bit_3 b/test/images/efuse/256bit_3 new file mode 100644 index 0000000000..a44d599808 --- /dev/null +++ b/test/images/efuse/256bit_3 @@ -0,0 +1 @@ +w������������������������������� \ No newline at end of file diff --git a/test/test_espefuse.py b/test/test_espefuse.py index 2c7b626c4c..2f73811d27 100755 --- a/test/test_espefuse.py +++ b/test/test_espefuse.py @@ -233,7 +233,7 @@ def test_adc_info_2(self): self.espefuse_py("burn_efuse BLK_VERSION_MAJOR 1") elif arg_chip in ["esp32c2", "esp32s2", "esp32c6"]: self.espefuse_py("burn_efuse BLK_VERSION_MINOR 1") - elif arg_chip in ["esp32h2", "esp32h2beta1"]: + elif arg_chip in ["esp32h2", "esp32h2beta1", "esp32p4"]: self.espefuse_py("burn_efuse BLK_VERSION_MINOR 2") self.espefuse_py("adc_info") @@ -280,6 +280,9 @@ def test_read_protect_efuse(self): output = self.espefuse_py(cmd) assert count_protects == output.count("is already read protected") + @pytest.mark.skipif( + arg_chip == "esp32p4", reason="BLOCK_SYS_DATA2 is used by ADC calib" + ) def test_read_protect_efuse2(self): self.espefuse_py("write_protect_efuse RD_DIS") if arg_chip == "esp32": @@ -1286,13 +1289,15 @@ def test_burn_block_data_with_6_keys(self): ) in output self.check_data_block_in_log(output, f"{IMAGES_DIR}/256bit") - self.espefuse_py( - f"burn_block_data \ - BLOCK10 {IMAGES_DIR}/256bit_1" - ) - self.check_data_block_in_log( - self.espefuse_py("summary -d"), f"{IMAGES_DIR}/256bit_1" - ) + if arg_chip != "esp32p4": + # BLOCK10 is free. In P4 it is used for ADC calib data. + self.espefuse_py( + f"burn_block_data \ + BLOCK10 {IMAGES_DIR}/256bit_3" + ) + self.check_data_block_in_log( + self.espefuse_py("summary -d"), f"{IMAGES_DIR}/256bit_3" + ) self.espefuse_py( f"burn_block_data \ @@ -1306,7 +1311,7 @@ def test_burn_block_data_with_6_keys(self): in output ) self.check_data_block_in_log(output, f"{IMAGES_DIR}/256bit") - self.check_data_block_in_log(output, f"{IMAGES_DIR}/256bit_1", 2) + self.check_data_block_in_log(output, f"{IMAGES_DIR}/256bit_1") self.check_data_block_in_log(output, f"{IMAGES_DIR}/256bit_2") def test_burn_block_data_check_errors(self): diff --git a/test/test_esptool.py b/test/test_esptool.py index 240c178e1d..1690a93d6e 100755 --- a/test/test_esptool.py +++ b/test/test_esptool.py @@ -1067,6 +1067,18 @@ def test_large_region_erase(self): # verifies that erasing a large region doesn't time out self.run_esptool("erase_region 0x0 0x100000") + @pytest.mark.skipif(arg_chip == "esp8266", reason="Not supported on ESP8266") + def test_region_erase_no_stub(self): + self.run_esptool("write_flash 0x10000 images/one_kb.bin") + self.run_esptool("write_flash 0x11000 images/sector.bin") + self.verify_readback(0x10000, 0x400, "images/one_kb.bin") + self.verify_readback(0x11000, 0x1000, "images/sector.bin") + # erase only the flash sector containing one_kb.bin + self.run_esptool("--no-stub erase_region 0x10000 0x1000") + self.verify_readback(0x11000, 0x1000, "images/sector.bin") + empty = self.readback(0x10000, 0x1000) + assert empty == b"\xFF" * 0x1000 + class TestSectorBoundaries(EsptoolTestCase): def test_end_sector(self):