Dear Team,
We brought a new ESP32_S2-SAOLA-1_V1.2.
When i am trying to erase flash by using Flash_download_tool, I am getting the error: 14-already flash encrypt or secure boot.
Log i attached as a image.
May i know why this error for a new board? Is anything I am doing wrong?
ESP32 S2 - Not able to erase flash using Flash_download_tool_3.8.5
-
- Posts: 63
- Joined: Wed Mar 06, 2019 4:39 am
- Contact:
ESP32 S2 - Not able to erase flash using Flash_download_tool_3.8.5
- Attachments
-
- Log
- error.png (37.29 KiB) Viewed 9941 times
Re: ESP32 S2 - Not able to erase flash using Flash_download_tool_3.8.5
Hi
That's interesting.
can i ask, what espefuse says if you run it?
( espefuse.py summary --port YOURCOMPORT )
example:
C:\Users\RW\Desktop\esp-idf\components\esptool_py\esptool>espefuse.py summary --port COM3
Connecting.....
Detecting chip type... ESP32-S2
espefuse.py v3.0-dev
EFUSE_NAME (Block) Description = [Meaningful Value] [Readable/Writeable] (Hex Value)
----------------------------------------------------------------------------------------
Calibration fuses:
TEMP_SENSOR_CAL (BLOCK2) Temperature calibration = -4.7 R/W (0b100101111)
ADC1_MODE0_D2 (BLOCK2) ADC1 calibration 1 = 96 R/W (0x18)
ADC1_MODE1_D2 (BLOCK2) ADC1 calibration 2 = 104 R/W (0x1a)
ADC1_MODE2_D2 (BLOCK2) ADC1 calibration 3 = 104 R/W (0x1a)
ADC1_MODE3_D2 (BLOCK2) ADC1 calibration 4 = 124 R/W (0x1f)
ADC2_MODE0_D2 (BLOCK2) ADC2 calibration 5 = 76 R/W (0x13)
ADC2_MODE1_D2 (BLOCK2) ADC2 calibration 6 = 68 R/W (0x11)
ADC2_MODE2_D2 (BLOCK2) ADC2 calibration 7 = 72 R/W (0x12)
ADC2_MODE3_D2 (BLOCK2) ADC2 calibration 8 = 80 R/W (0x14)
ADC1_MODE0_D1 (BLOCK2) ADC1 calibration 9 = 16 R/W (0b000100)
ADC1_MODE1_D1 (BLOCK2) ADC1 calibration 10 = 12 R/W (0b000011)
ADC1_MODE2_D1 (BLOCK2) ADC1 calibration 11 = 8 R/W (0b000010)
ADC1_MODE3_D1 (BLOCK2) ADC1 calibration 12 = 4 R/W (0b000001)
ADC2_MODE0_D1 (BLOCK2) ADC2 calibration 13 = 16 R/W (0b000100)
ADC2_MODE1_D1 (BLOCK2) ADC2 calibration 14 = 8 R/W (0b000010)
ADC2_MODE2_D1 (BLOCK2) ADC2 calibration 15 = 12 R/W (0b000011)
ADC2_MODE3_D1 (BLOCK2) ADC2 calibration 16 = 4 R/W (0b000001)
Config fuses:
DIS_RTC_RAM_BOOT (BLOCK0) Disables boot from RTC RAM = False R/W (0b0)
DIS_ICACHE (BLOCK0) Disables ICache = False R/W (0b0)
DIS_DCACHE (BLOCK0) Disables DCache = False R/W (0b0)
DIS_DOWNLOAD_ICACHE (BLOCK0) Disables Icache when SoC is in Download mode = False R/W (0b0)
DIS_DOWNLOAD_DCACHE (BLOCK0) Disables Dcache when SoC is in Download mode = False R/W (0b0)
DIS_FORCE_DOWNLOAD (BLOCK0) Disables forcing chip into Download mode = False R/W (0b0)
DIS_CAN (BLOCK0) Disables the TWAI Controller hardware = False R/W (0b0)
DIS_BOOT_REMAP (BLOCK0) Disables capability to Remap RAM to ROM address sp = False R/W (0b0)
ace
FLASH_TPUW (BLOCK0) Configures flash startup delay after SoC power-up, = 0 R/W (0x0)
unit is (ms/2). When the value is 15, delay is 7.
5 ms
DIS_LEGACY_SPI_BOOT (BLOCK0) Disables Legacy SPI boot mode = False R/W (0b0)
UART_PRINT_CHANNEL (BLOCK0) Selects the default UART for printing boot msg = UART0 R/W (0b0)
DIS_USB_DOWNLOAD_MODE (BLOCK0) Disables use of USB in UART download boot mode = False R/W (0b0)
UART_PRINT_CONTROL (BLOCK0) Sets the default UART boot message output mode = Enabled R/W (0b00)
FLASH_TYPE (BLOCK0) Selects SPI flash type = 4 data lines R/W (0b0)
FORCE_SEND_RESUME (BLOCK0) Forces ROM code to send an SPI flash resume comman = False R/W (0b0)
d during SPI boot
BLOCK_USR_DATA (BLOCK3) User data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
Efuse fuses:
WR_DIS (BLOCK0) Disables programming of individual eFuses = 0 R/W (0x00000000)
RD_DIS (BLOCK0) Disables software reading from BLOCK4-10 = 0 R/W (0b0000000)
Identity fuses:
BLOCK0_VERSION (BLOCK0) BLOCK0 efuse version = 0 R/W (0b00)
SECURE_VERSION (BLOCK0) Secure version (used by ESP-IDF anti-rollback feat = 0 R/W (0x0000)
ure)
MAC (BLOCK1) Factory MAC Address
= 7c:df:a1:30:04:04: (OK) R/W
WAFER_VERSION (BLOCK1) WAFER version = A R/W (0b000)
PKG_VERSION (BLOCK1) Package version
= ESP32-S2FH32, QFN 7x7 56 pins, Flash 32Mb t=105C R/W (0x2)
BLOCK1_VERSION (BLOCK1) BLOCK1 efuse version = 0 R/W (0b000)
OPTIONAL_UNIQUE_ID (BLOCK2)(0 errors): Optional unique 128-bit ID
= fa 1b c1 bb 75 e8 51 26 aa 56 e4 f3 20 cd 33 ad R/W
BLOCK2_VERSION (BLOCK2) Version of BLOCK2 = With calibration R/W (0b001)
Security fuses:
SOFT_DIS_JTAG (BLOCK0) Software disables JTAG. When software disabled, JT = False R/W (0b0)
AG can be activated temporarily by HMAC peripheral
HARD_DIS_JTAG (BLOCK0) Hardware disables JTAG permanently = False R/W (0b0)
DIS_DOWNLOAD_MANUAL_ENCRYPT (BLOCK0) Disables flash encryption when in download boot mo = False R/W (0b0)
des
SPI_BOOT_CRYPT_CNT (BLOCK0) Enables encryption and decryption, when an SPI boo = Disable R/W (0b000)
t mode is set. Enabled when 1 or 3 bits are set,di
sabled otherwise
SECURE_BOOT_KEY_REVOKE0 (BLOCK0) If set, revokes use of secure boot key digest 0 = False R/W (0b0)
SECURE_BOOT_KEY_REVOKE1 (BLOCK0) If set, revokes use of secure boot key digest 1 = False R/W (0b0)
SECURE_BOOT_KEY_REVOKE2 (BLOCK0) If set, revokes use of secure boot key digest 2 = False R/W (0b0)
KEY_PURPOSE_0 (BLOCK0) KEY0 purpose = USER R/W (0x0)
KEY_PURPOSE_1 (BLOCK0) KEY1 purpose = USER R/W (0x0)
KEY_PURPOSE_2 (BLOCK0) KEY2 purpose = USER R/W (0x0)
KEY_PURPOSE_3 (BLOCK0) KEY3 purpose = USER R/W (0x0)
KEY_PURPOSE_4 (BLOCK0) KEY4 purpose = USER R/W (0x0)
KEY_PURPOSE_5 (BLOCK0) KEY5 purpose = USER R/W (0x0)
SECURE_BOOT_EN (BLOCK0) Enables secure boot = False R/W (0b0)
SECURE_BOOT_AGGRESSIVE_REVOKE (BLOCK0) Enables aggressive secure boot key revocation mode = False R/W (0b0)
DIS_DOWNLOAD_MODE (BLOCK0) Disables all Download boot modes = False R/W (0b0)
ENABLE_SECURITY_DOWNLOAD (BLOCK0) Enables secure UART download mode (read/write flas = False R/W (0b0)
h only)
BLOCK_KEY0 (BLOCK4)(0 errors):
Purpose: USER
Encryption key0 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_KEY1 (BLOCK5)(0 errors):
Purpose: USER
Encryption key1 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_KEY2 (BLOCK6)(0 errors):
Purpose: USER
Encryption key2 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_KEY3 (BLOCK7)(0 errors):
Purpose: USER
Encryption key3 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_KEY4 (BLOCK8)(0 errors):
Purpose: USER
Encryption key4 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_KEY5 (BLOCK9)(0 errors):
Purpose: USER
Encryption key5 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_SYS_DATA2 (BLOCK10) System data (part 2)
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
Spi_Pad_Config fuses:
SPI_PAD_CONFIG_CLK (BLOCK1) SPI CLK pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_Q (BLOCK1) SPI Q (D1) pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_D (BLOCK1) SPI D (D0) pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_CS (BLOCK1) SPI CS pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_HD (BLOCK1) SPI HD (D3) pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_WP (BLOCK1) SPI WP (D2) pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_DQS (BLOCK1) SPI DQS pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_D4 (BLOCK1) SPI D4 pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_D5 (BLOCK1) SPI D5 pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_D6 (BLOCK1) SPI D6 pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_D7 (BLOCK1) SPI D7 pad = 0 R/W (0b000000)
Usb Config fuses:
DIS_USB (BLOCK0) Disables the USB OTG hardware = False R/W (0b0)
USB_EXCHG_PINS (BLOCK0) Exchanges USB D+ and D- pins = False R/W (0b0)
EXT_PHY_ENABLE (BLOCK0) Enables external USB PHY = False R/W (0b0)
USB_FORCE_NOPERSIST (BLOCK0) Forces to set USB BVALID to 1 = False R/W (0b0)
Vdd_Spi Config fuses:
VDD_SPI_FORCE (BLOCK0) Force using VDD_SPI_XPD and VDD_SPI_TIEH to config = False R/W (0b0)
ure VDD_SPI LDO
VDD_SPI_XPD (BLOCK0) The VDD_SPI regulator is powered on = False R/W (0b0)
VDD_SPI_TIEH (BLOCK0) The VDD_SPI power supply voltage at reset = Connect to 1.8V LDO R/W (0b0)
PIN_POWER_SELECTION (BLOCK0) Sets default power supply for GPIO33..37, set when = VDD3P3_CPU R/W (0b0)
SPI flash is initialized
Wdt Config fuses:
WDT_DELAY_SEL (BLOCK0) Selects RTC WDT timeout threshold at startup = False R/W (0b0)
Flash voltage (VDD_SPI) determined by GPIO45 on reset (GPIO45=High: VDD_SPI pin is powered from internal 1.8V LDO
GPIO45=Low or NC: VDD_SPI pin is powered directly from VDD3P3_RTC_IO via resistor Rspi. Typically this voltage is 3.3 V).
best wishes
rudi
edit:
Can you erase flash using esptool example from your installed idf-components?
example:
C:\Users\RW\Desktop\esp-idf\components\esptool_py\esptool>esptool.py --port COM3 erase_flash
esptool.py v3.0-dev
Serial port COM3
Connecting.....
Detecting chip type... ESP32-S2
Chip is ESP32-S2FH32
Features: WiFi, Embedded 4MB Flash, 105C temp rating, ADC and temperature sensor calibration in BLK2 of efuse
Crystal is 40MHz
MAC: 7c:df:a1:30:04:04
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 17.9s
Hard resetting via RTS pin...
btw i get same error with the windows Flash_download_tool_3.8.5
======
CONNECT BAUD: 115200
============
.Uploading stub...
Running stub...
Stub running...
Changing baud rate to 1152000
Changed.
[2020-10-21 02:36:39,035][ESP8266Loader_spi[1]][espDownloader.py][line:1767][ERROR]: ESP32 efuse secure check fail:Already secure boot, NOT Allow download bootloader again!!!
[2020-10-21 02:36:39,035][ESP8266Loader_spi[1]][espDownloader.py][line:528][ERROR]: ESP32S2 Secure Encrypt check error flash_erase_func.
======
That's interesting.
can i ask, what espefuse says if you run it?
( espefuse.py summary --port YOURCOMPORT )
example:
C:\Users\RW\Desktop\esp-idf\components\esptool_py\esptool>espefuse.py summary --port COM3
Connecting.....
Detecting chip type... ESP32-S2
espefuse.py v3.0-dev
EFUSE_NAME (Block) Description = [Meaningful Value] [Readable/Writeable] (Hex Value)
----------------------------------------------------------------------------------------
Calibration fuses:
TEMP_SENSOR_CAL (BLOCK2) Temperature calibration = -4.7 R/W (0b100101111)
ADC1_MODE0_D2 (BLOCK2) ADC1 calibration 1 = 96 R/W (0x18)
ADC1_MODE1_D2 (BLOCK2) ADC1 calibration 2 = 104 R/W (0x1a)
ADC1_MODE2_D2 (BLOCK2) ADC1 calibration 3 = 104 R/W (0x1a)
ADC1_MODE3_D2 (BLOCK2) ADC1 calibration 4 = 124 R/W (0x1f)
ADC2_MODE0_D2 (BLOCK2) ADC2 calibration 5 = 76 R/W (0x13)
ADC2_MODE1_D2 (BLOCK2) ADC2 calibration 6 = 68 R/W (0x11)
ADC2_MODE2_D2 (BLOCK2) ADC2 calibration 7 = 72 R/W (0x12)
ADC2_MODE3_D2 (BLOCK2) ADC2 calibration 8 = 80 R/W (0x14)
ADC1_MODE0_D1 (BLOCK2) ADC1 calibration 9 = 16 R/W (0b000100)
ADC1_MODE1_D1 (BLOCK2) ADC1 calibration 10 = 12 R/W (0b000011)
ADC1_MODE2_D1 (BLOCK2) ADC1 calibration 11 = 8 R/W (0b000010)
ADC1_MODE3_D1 (BLOCK2) ADC1 calibration 12 = 4 R/W (0b000001)
ADC2_MODE0_D1 (BLOCK2) ADC2 calibration 13 = 16 R/W (0b000100)
ADC2_MODE1_D1 (BLOCK2) ADC2 calibration 14 = 8 R/W (0b000010)
ADC2_MODE2_D1 (BLOCK2) ADC2 calibration 15 = 12 R/W (0b000011)
ADC2_MODE3_D1 (BLOCK2) ADC2 calibration 16 = 4 R/W (0b000001)
Config fuses:
DIS_RTC_RAM_BOOT (BLOCK0) Disables boot from RTC RAM = False R/W (0b0)
DIS_ICACHE (BLOCK0) Disables ICache = False R/W (0b0)
DIS_DCACHE (BLOCK0) Disables DCache = False R/W (0b0)
DIS_DOWNLOAD_ICACHE (BLOCK0) Disables Icache when SoC is in Download mode = False R/W (0b0)
DIS_DOWNLOAD_DCACHE (BLOCK0) Disables Dcache when SoC is in Download mode = False R/W (0b0)
DIS_FORCE_DOWNLOAD (BLOCK0) Disables forcing chip into Download mode = False R/W (0b0)
DIS_CAN (BLOCK0) Disables the TWAI Controller hardware = False R/W (0b0)
DIS_BOOT_REMAP (BLOCK0) Disables capability to Remap RAM to ROM address sp = False R/W (0b0)
ace
FLASH_TPUW (BLOCK0) Configures flash startup delay after SoC power-up, = 0 R/W (0x0)
unit is (ms/2). When the value is 15, delay is 7.
5 ms
DIS_LEGACY_SPI_BOOT (BLOCK0) Disables Legacy SPI boot mode = False R/W (0b0)
UART_PRINT_CHANNEL (BLOCK0) Selects the default UART for printing boot msg = UART0 R/W (0b0)
DIS_USB_DOWNLOAD_MODE (BLOCK0) Disables use of USB in UART download boot mode = False R/W (0b0)
UART_PRINT_CONTROL (BLOCK0) Sets the default UART boot message output mode = Enabled R/W (0b00)
FLASH_TYPE (BLOCK0) Selects SPI flash type = 4 data lines R/W (0b0)
FORCE_SEND_RESUME (BLOCK0) Forces ROM code to send an SPI flash resume comman = False R/W (0b0)
d during SPI boot
BLOCK_USR_DATA (BLOCK3) User data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
Efuse fuses:
WR_DIS (BLOCK0) Disables programming of individual eFuses = 0 R/W (0x00000000)
RD_DIS (BLOCK0) Disables software reading from BLOCK4-10 = 0 R/W (0b0000000)
Identity fuses:
BLOCK0_VERSION (BLOCK0) BLOCK0 efuse version = 0 R/W (0b00)
SECURE_VERSION (BLOCK0) Secure version (used by ESP-IDF anti-rollback feat = 0 R/W (0x0000)
ure)
MAC (BLOCK1) Factory MAC Address
= 7c:df:a1:30:04:04: (OK) R/W
WAFER_VERSION (BLOCK1) WAFER version = A R/W (0b000)
PKG_VERSION (BLOCK1) Package version
= ESP32-S2FH32, QFN 7x7 56 pins, Flash 32Mb t=105C R/W (0x2)
BLOCK1_VERSION (BLOCK1) BLOCK1 efuse version = 0 R/W (0b000)
OPTIONAL_UNIQUE_ID (BLOCK2)(0 errors): Optional unique 128-bit ID
= fa 1b c1 bb 75 e8 51 26 aa 56 e4 f3 20 cd 33 ad R/W
BLOCK2_VERSION (BLOCK2) Version of BLOCK2 = With calibration R/W (0b001)
Security fuses:
SOFT_DIS_JTAG (BLOCK0) Software disables JTAG. When software disabled, JT = False R/W (0b0)
AG can be activated temporarily by HMAC peripheral
HARD_DIS_JTAG (BLOCK0) Hardware disables JTAG permanently = False R/W (0b0)
DIS_DOWNLOAD_MANUAL_ENCRYPT (BLOCK0) Disables flash encryption when in download boot mo = False R/W (0b0)
des
SPI_BOOT_CRYPT_CNT (BLOCK0) Enables encryption and decryption, when an SPI boo = Disable R/W (0b000)
t mode is set. Enabled when 1 or 3 bits are set,di
sabled otherwise
SECURE_BOOT_KEY_REVOKE0 (BLOCK0) If set, revokes use of secure boot key digest 0 = False R/W (0b0)
SECURE_BOOT_KEY_REVOKE1 (BLOCK0) If set, revokes use of secure boot key digest 1 = False R/W (0b0)
SECURE_BOOT_KEY_REVOKE2 (BLOCK0) If set, revokes use of secure boot key digest 2 = False R/W (0b0)
KEY_PURPOSE_0 (BLOCK0) KEY0 purpose = USER R/W (0x0)
KEY_PURPOSE_1 (BLOCK0) KEY1 purpose = USER R/W (0x0)
KEY_PURPOSE_2 (BLOCK0) KEY2 purpose = USER R/W (0x0)
KEY_PURPOSE_3 (BLOCK0) KEY3 purpose = USER R/W (0x0)
KEY_PURPOSE_4 (BLOCK0) KEY4 purpose = USER R/W (0x0)
KEY_PURPOSE_5 (BLOCK0) KEY5 purpose = USER R/W (0x0)
SECURE_BOOT_EN (BLOCK0) Enables secure boot = False R/W (0b0)
SECURE_BOOT_AGGRESSIVE_REVOKE (BLOCK0) Enables aggressive secure boot key revocation mode = False R/W (0b0)
DIS_DOWNLOAD_MODE (BLOCK0) Disables all Download boot modes = False R/W (0b0)
ENABLE_SECURITY_DOWNLOAD (BLOCK0) Enables secure UART download mode (read/write flas = False R/W (0b0)
h only)
BLOCK_KEY0 (BLOCK4)(0 errors):
Purpose: USER
Encryption key0 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_KEY1 (BLOCK5)(0 errors):
Purpose: USER
Encryption key1 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_KEY2 (BLOCK6)(0 errors):
Purpose: USER
Encryption key2 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_KEY3 (BLOCK7)(0 errors):
Purpose: USER
Encryption key3 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_KEY4 (BLOCK8)(0 errors):
Purpose: USER
Encryption key4 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_KEY5 (BLOCK9)(0 errors):
Purpose: USER
Encryption key5 or user data
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
BLOCK_SYS_DATA2 (BLOCK10) System data (part 2)
= 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 R/W
Spi_Pad_Config fuses:
SPI_PAD_CONFIG_CLK (BLOCK1) SPI CLK pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_Q (BLOCK1) SPI Q (D1) pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_D (BLOCK1) SPI D (D0) pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_CS (BLOCK1) SPI CS pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_HD (BLOCK1) SPI HD (D3) pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_WP (BLOCK1) SPI WP (D2) pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_DQS (BLOCK1) SPI DQS pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_D4 (BLOCK1) SPI D4 pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_D5 (BLOCK1) SPI D5 pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_D6 (BLOCK1) SPI D6 pad = 0 R/W (0b000000)
SPI_PAD_CONFIG_D7 (BLOCK1) SPI D7 pad = 0 R/W (0b000000)
Usb Config fuses:
DIS_USB (BLOCK0) Disables the USB OTG hardware = False R/W (0b0)
USB_EXCHG_PINS (BLOCK0) Exchanges USB D+ and D- pins = False R/W (0b0)
EXT_PHY_ENABLE (BLOCK0) Enables external USB PHY = False R/W (0b0)
USB_FORCE_NOPERSIST (BLOCK0) Forces to set USB BVALID to 1 = False R/W (0b0)
Vdd_Spi Config fuses:
VDD_SPI_FORCE (BLOCK0) Force using VDD_SPI_XPD and VDD_SPI_TIEH to config = False R/W (0b0)
ure VDD_SPI LDO
VDD_SPI_XPD (BLOCK0) The VDD_SPI regulator is powered on = False R/W (0b0)
VDD_SPI_TIEH (BLOCK0) The VDD_SPI power supply voltage at reset = Connect to 1.8V LDO R/W (0b0)
PIN_POWER_SELECTION (BLOCK0) Sets default power supply for GPIO33..37, set when = VDD3P3_CPU R/W (0b0)
SPI flash is initialized
Wdt Config fuses:
WDT_DELAY_SEL (BLOCK0) Selects RTC WDT timeout threshold at startup = False R/W (0b0)
Flash voltage (VDD_SPI) determined by GPIO45 on reset (GPIO45=High: VDD_SPI pin is powered from internal 1.8V LDO
GPIO45=Low or NC: VDD_SPI pin is powered directly from VDD3P3_RTC_IO via resistor Rspi. Typically this voltage is 3.3 V).
best wishes
rudi
edit:
Can you erase flash using esptool example from your installed idf-components?
example:
C:\Users\RW\Desktop\esp-idf\components\esptool_py\esptool>esptool.py --port COM3 erase_flash
esptool.py v3.0-dev
Serial port COM3
Connecting.....
Detecting chip type... ESP32-S2
Chip is ESP32-S2FH32
Features: WiFi, Embedded 4MB Flash, 105C temp rating, ADC and temperature sensor calibration in BLK2 of efuse
Crystal is 40MHz
MAC: 7c:df:a1:30:04:04
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 17.9s
Hard resetting via RTS pin...
btw i get same error with the windows Flash_download_tool_3.8.5
======
CONNECT BAUD: 115200
============
.Uploading stub...
Running stub...
Stub running...
Changing baud rate to 1152000
Changed.
[2020-10-21 02:36:39,035][ESP8266Loader_spi[1]][espDownloader.py][line:1767][ERROR]: ESP32 efuse secure check fail:Already secure boot, NOT Allow download bootloader again!!!
[2020-10-21 02:36:39,035][ESP8266Loader_spi[1]][espDownloader.py][line:528][ERROR]: ESP32S2 Secure Encrypt check error flash_erase_func.
======
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
-
- Posts: 63
- Joined: Wed Mar 06, 2019 4:39 am
- Contact:
Re: ESP32 S2 - Not able to erase flash using Flash_download_tool_3.8.5
Hello rudi,
Sorry for the delay.... Thanks for the suggestion.
I'm not able to run espefuse.py. If i run the following command C:\esp32-cmake\esp-idf\components\esptool_py\esptool>espefuse.py summary --port COM93 there is no response.
Do you have any suggestion?
Sorry for the delay.... Thanks for the suggestion.
I'm not able to run espefuse.py. If i run the following command C:\esp32-cmake\esp-idf\components\esptool_py\esptool>espefuse.py summary --port COM93 there is no response.
Do you have any suggestion?
- Attachments
-
- espefuse
- espefuse.png (2.69 KiB) Viewed 9840 times
Re: ESP32 S2 - Not able to erase flash using Flash_download_tool_3.8.5
HiYuvaraj1867 wrote: ↑Fri Oct 23, 2020 4:09 pmI'm not able to run espefuse.py. If i run the following command C:\esp32-cmake\esp-idf\components\esptool_py\esptool>espefuse.py summary --port COM93 there is no response.
Do you have any suggestion?
ok. so your python shell does not associate with .py files directly.
no problem:
first please check, is your python in the cmd shell path
run in the cmd shell first
c:\<your cmd shell prompt>\python --version
you should become the python version back usually.
if this not work, then you must call the python from installed folder where python is installed
usually likewise this <for version2.7>
c:\python27
example - if you know, that python is installed in
c:\myPython27
then run
c:\myPython27\python.exe --version
this should then return the installed python version.
if this is ok, then you can try the long command like this:
c:\<you python install folder>\python.exe <full path of the espefuse.py and script itself> summary --port COM93
likewise
c:\myPython27\python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\espefuse.py summary --port COM93
hope this helps
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
-
- Posts: 63
- Joined: Wed Mar 06, 2019 4:39 am
- Contact:
Re: ESP32 S2 - Not able to erase flash using Flash_download_tool_3.8.5
Hi,
Your information's are really helpful.
1). If i run this command I'm getting the following data. - C:\Python27>python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\espefuse.py --baud 115200 --port COM93 summary
Log:
C:\Python27>python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\espefuse.py --baud 115200 --port COM93 summary
espefuse.py v2.7-dev
Connecting.....
EFUSE_NAME Description = [Meaningful Value] [Readable/Writeable] (He
x Value)
--------------------------------------------------------------------------------
--------
Efuse fuses:
WR_DIS Efuse write disable mask = 61437R/W (0xeffd)
RD_DIS Efuse read disablemask = 15 R/- (0xf)
CODING_SCHEME Efuse variable block length scheme = ? -/-(0x0)
KEY_STATUS Usage of efuse block 3 (reserved) = 1 -/-(0x1)
Config fuses:
XPD_SDIO_FORCE Ignore MTDI pin (GPIO12) for VDD_SDIO on reset = 0 R/-(0x0)
XPD_SDIO_REG If XPD_SDIO_FORCE, enable VDD_SDIO reg on reset = 0 R/-(0x0)
XPD_SDIO_TIEH If XPD_SDIO_FORCE & XPD_SDIO_REG, 1=3.3V 0=1.8V = 1 R/-(0x1)
CLK8M_FREQ 8MHz clock freq override = 22 R/W (0x16)
SPI_PAD_CONFIG_CLK Override SD_CLK pad (GPIO6/SPICLK) = 6 R/- (0x6)
SPI_PAD_CONFIG_Q Override SD_DATA_0 pad (GPIO7/SPIQ) = 26 R/- (0x1a)
SPI_PAD_CONFIG_D Override SD_DATA_1 pad (GPIO8/SPID) = 8 R/-(0x8)
SPI_PAD_CONFIG_HD Override SD_DATA_2 pad (GPIO9/SPIHD) = 10 R/- (0xa)
SPI_PAD_CONFIG_CS0 Override SD_CMD pad (GPIO11/SPICS0) = 16 R/- (0x10)
DISABLE_SDIO_HOST Disable SDIO host = 0 R/W (0x0)
Security fuses:
FLASH_CRYPT_CNT Flash encryption mode counter = 4 R/-(0x4)
FLASH_CRYPT_CONFIG Flash encryption config (key tweak bits) = 4 -/-(0x4)
CONSOLE_DEBUG_DISABLE Disable ROM BASIC interpreter fallback = 0 R/-(0x0)
ABS_DONE_0 secure boot enabled for bootloader = 0 R/W(0x0)
ABS_DONE_1 secure boot abstract 1 locked = 1 R/-(0x1)
JTAG_DISABLE Disable JTAG = 1 R/-(0x1)
DISABLE_DL_ENCRYPT Disable flash encryption in UART bootloader = 0 R/-(0x0)
DISABLE_DL_DECRYPT Disable flash decryption in UART bootloader = 0 R/-(0x0)
DISABLE_DL_CACHE Disable flash cache in UART bootloader = 0 R/-(0x0)
BLK1 Flash encryption key
= ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 68 eb ?1 a1 df 7c ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/-
BLK2 Secure boot key
= ?? ?? ?? ?? 97 ce b7 33 63 b5 93 48 7? ad b1 68 39 b7 6b c6 9? ae 9b 9b 99 9e af af ad b1 e8 59 -/-
BLK3 Variable Block 3
= 8e b1 ab 9a ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/-
Identity fuses:
MAC Factory MAC Address = 6b:c2:d4:4f:db:b4 (CRC 17 invalid - calculated 0xd3) R/-
CHIP_VER_REV1 Silicon Revision 1 = 1 R/-(0x1)
CHIP_VERSION Reserved for future chip versions = 0 R/-(0x0)
CHIP_PACKAGE Chip package identifier = 3 R/-(0x3)
Calibration fuses:
BLK3_PART_RESERVE BLOCK3 partially served for ADC calibration data = 1 -/- (0x1)
ADC_VREF Voltage reference calibration = 1044R/- (0x18)
ADC1_TP_LOW ADC1 150mV reading = 278 -/- (0x0)
ADC1_TP_HIGH ADC1 850mV reading = 3265-/- (0x0)
ADC2_TP_LOW ADC2 150mV reading = 421 -/- (0x0)
ADC2_TP_HIGH ADC2 850mV reading = 34?6-/- (0x0)
Flash voltage (VDD_SDIO) determined by GPIO12 on reset (High for 1.8V, Low/NC for 3.3V).
WARNING: Coding scheme has encoding bit error warnings (0xbad)
2). For the second command I'm the following attached(Pic no:2) data. - C:\Python27>python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\esptool.py --port COM93 erase_flash
Note: I'm able to see the boot message in the usb uart and factory frimware log also (red, green, blue......)
As per the log details, i think flash was locked. We purchased as a brand new form espressif directly and we are using first time.
May i know the next step...
Your information's are really helpful.
1). If i run this command I'm getting the following data. - C:\Python27>python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\espefuse.py --baud 115200 --port COM93 summary
Log:
C:\Python27>python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\espefuse.py --baud 115200 --port COM93 summary
espefuse.py v2.7-dev
Connecting.....
EFUSE_NAME Description = [Meaningful Value] [Readable/Writeable] (He
x Value)
--------------------------------------------------------------------------------
--------
Efuse fuses:
WR_DIS Efuse write disable mask = 61437R/W (0xeffd)
RD_DIS Efuse read disablemask = 15 R/- (0xf)
CODING_SCHEME Efuse variable block length scheme = ? -/-(0x0)
KEY_STATUS Usage of efuse block 3 (reserved) = 1 -/-(0x1)
Config fuses:
XPD_SDIO_FORCE Ignore MTDI pin (GPIO12) for VDD_SDIO on reset = 0 R/-(0x0)
XPD_SDIO_REG If XPD_SDIO_FORCE, enable VDD_SDIO reg on reset = 0 R/-(0x0)
XPD_SDIO_TIEH If XPD_SDIO_FORCE & XPD_SDIO_REG, 1=3.3V 0=1.8V = 1 R/-(0x1)
CLK8M_FREQ 8MHz clock freq override = 22 R/W (0x16)
SPI_PAD_CONFIG_CLK Override SD_CLK pad (GPIO6/SPICLK) = 6 R/- (0x6)
SPI_PAD_CONFIG_Q Override SD_DATA_0 pad (GPIO7/SPIQ) = 26 R/- (0x1a)
SPI_PAD_CONFIG_D Override SD_DATA_1 pad (GPIO8/SPID) = 8 R/-(0x8)
SPI_PAD_CONFIG_HD Override SD_DATA_2 pad (GPIO9/SPIHD) = 10 R/- (0xa)
SPI_PAD_CONFIG_CS0 Override SD_CMD pad (GPIO11/SPICS0) = 16 R/- (0x10)
DISABLE_SDIO_HOST Disable SDIO host = 0 R/W (0x0)
Security fuses:
FLASH_CRYPT_CNT Flash encryption mode counter = 4 R/-(0x4)
FLASH_CRYPT_CONFIG Flash encryption config (key tweak bits) = 4 -/-(0x4)
CONSOLE_DEBUG_DISABLE Disable ROM BASIC interpreter fallback = 0 R/-(0x0)
ABS_DONE_0 secure boot enabled for bootloader = 0 R/W(0x0)
ABS_DONE_1 secure boot abstract 1 locked = 1 R/-(0x1)
JTAG_DISABLE Disable JTAG = 1 R/-(0x1)
DISABLE_DL_ENCRYPT Disable flash encryption in UART bootloader = 0 R/-(0x0)
DISABLE_DL_DECRYPT Disable flash decryption in UART bootloader = 0 R/-(0x0)
DISABLE_DL_CACHE Disable flash cache in UART bootloader = 0 R/-(0x0)
BLK1 Flash encryption key
= ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 68 eb ?1 a1 df 7c ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/-
BLK2 Secure boot key
= ?? ?? ?? ?? 97 ce b7 33 63 b5 93 48 7? ad b1 68 39 b7 6b c6 9? ae 9b 9b 99 9e af af ad b1 e8 59 -/-
BLK3 Variable Block 3
= 8e b1 ab 9a ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/-
Identity fuses:
MAC Factory MAC Address = 6b:c2:d4:4f:db:b4 (CRC 17 invalid - calculated 0xd3) R/-
CHIP_VER_REV1 Silicon Revision 1 = 1 R/-(0x1)
CHIP_VERSION Reserved for future chip versions = 0 R/-(0x0)
CHIP_PACKAGE Chip package identifier = 3 R/-(0x3)
Calibration fuses:
BLK3_PART_RESERVE BLOCK3 partially served for ADC calibration data = 1 -/- (0x1)
ADC_VREF Voltage reference calibration = 1044R/- (0x18)
ADC1_TP_LOW ADC1 150mV reading = 278 -/- (0x0)
ADC1_TP_HIGH ADC1 850mV reading = 3265-/- (0x0)
ADC2_TP_LOW ADC2 150mV reading = 421 -/- (0x0)
ADC2_TP_HIGH ADC2 850mV reading = 34?6-/- (0x0)
Flash voltage (VDD_SDIO) determined by GPIO12 on reset (High for 1.8V, Low/NC for 3.3V).
WARNING: Coding scheme has encoding bit error warnings (0xbad)
2). For the second command I'm the following attached(Pic no:2) data. - C:\Python27>python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\esptool.py --port COM93 erase_flash
Note: I'm able to see the boot message in the usb uart and factory frimware log also (red, green, blue......)
As per the log details, i think flash was locked. We purchased as a brand new form espressif directly and we are using first time.
May i know the next step...
- Attachments
-
- (Pic no:2)
- Pic_No.2.png (5.21 KiB) Viewed 9731 times
Re: ESP32 S2 - Not able to erase flash using Flash_download_tool_3.8.5
Hi -Yuvaraj1867 wrote: ↑Mon Oct 26, 2020 4:09 pm
1). If i run this command I'm getting the following data. - C:\Python27>python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\espefuse.py --baud 115200 --port COM93 summary
Log:
C:\Python27>python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\espefuse.py --baud 115200 --port COM93 summary
espefuse.py v2.7-dev
Connecting.....
....WARNING: Coding scheme has encoding bit error warnings (0xbad)
can you please use the actually version of esptools.
i think you use v2.7-dev version
perhabs you can check by using this command:
C:\Python27\python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\esptool.py version
you can download the actually version from github, example from here
it should give you then the info likewise
esptool.py v3.0-dev
3.0-dev
now try the same with the actually espool version,Yuvaraj1867 wrote: ↑Mon Oct 26, 2020 4:09 pm
2). For the second command I'm the following attached(Pic no:2) data. - C:\Python27>python.exe C:\esp32-cmake\esp-idf\components\esptool_py\esptool\esptool.py --port COM93 erase_flash
before you can perhabs check fuses with the actually espefuse.py ( is also in this repo and path ) like you did before.
you will get more infos.
you can use the same python path and app and change the argument to your actually downloaded esptool path example.
- check esptool version you use
- update esp-idf or download actually esptool
- check the new downloaded esptool by version check ( actually should be V3.0.. )
- use the actually esptool ( with esp32-s2 support ) for espefuse.py and esptool.py
- try to erase_flash with the actually version
FYI:
you can make a Backup of your Saola with esptool
there are many command args possible, also check the help arg by run esptool with -h
c:\............ .....esptool.py -h
L:\tools\esptool-master>python esptool.py -h
usage: esptool [-h] [--chip {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32c3}]
[--port PORT] [--baud BAUD]
[--before {default_reset,no_reset,no_reset_no_sync}]
[--after {hard_reset,soft_reset,no_reset}] [--no-stub]
[--trace] [--override-vddsdio [{1.8V,1.9V,OFF}]]
[--connect-attempts CONNECT_ATTEMPTS]
{load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,version,get_security_info}
...
esptool.py v3.0-dev - ESP8266 ROM Bootloader Utility
positional arguments:
{load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,
read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,version,get_security_info}
Run esptool {command} -h for additional help
load_ram Download an image to RAM and execute
dump_mem Dump arbitrary memory to disk
read_mem Read arbitrary memory location
write_mem Read-modify-write to arbitrary memory location
write_flash Write a binary blob to flash
run Run application code in flash
image_info Dump headers from an application image
make_image Create an application image from binary files
elf2image Create an application image from ELF file
read_mac Read MAC address from OTP ROM
chip_id Read Chip ID from OTP ROM
flash_id Read SPI flash manufacturer and device ID
read_flash_status Read SPI flash status register
write_flash_status Write SPI flash status register
read_flash Read SPI flash content
verify_flash Verify a binary blob against flash
erase_flash Perform Chip Erase on SPI flash
erase_region Erase a region of the flash
version Print esptool version
get_security_info Get some security-related data
optional arguments:
-h, --help show this help message and exit
--chip {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32c3}, -c {auto,esp8266,esp32,esp32s2,esp32s3beta2,esp32c3}
Target chip type
--port PORT, -p PORT Serial port device
--baud BAUD, -b BAUD Serial port baud rate used when flashing/reading
--before {default_reset,no_reset,no_reset_no_sync}
What to do before connecting to the chip
--after {hard_reset,soft_reset,no_reset}, -a {hard_reset,soft_reset,no_reset}
What to do after esptool.py is finished
--no-stub Disable launching the flasher stub, only talk to ROM
bootloader. Some features will not be available.
--trace, -t Enable trace-level output of esptool.py interactions.
--override-vddsdio [{1.8V,1.9V,OFF}]
Override ESP32 VDDSDIO internal voltage regulator (use
with care)
--connect-attempts CONNECT_ATTEMPTS
Number of attempts to connect, negative or 0 for
infinite. Default: 7.
L:\tools\esptool-master>
hope this helps.
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
-
- Posts: 63
- Joined: Wed Mar 06, 2019 4:39 am
- Contact:
Re: ESP32 S2 - Not able to erase flash using Flash_download_tool_3.8.5
Hi,
I was cloned esptool.py v3.0-dev form the link you shared.
But if i run summary or erase flash it was giving 'no module named bitstring" error.
Images for your reference attached.
I was cloned esptool.py v3.0-dev form the link you shared.
But if i run summary or erase flash it was giving 'no module named bitstring" error.
Images for your reference attached.
- Attachments
-
- 3.png (14.63 KiB) Viewed 9641 times
-
- 2.png (14.58 KiB) Viewed 9641 times
-
- 1.png (2.58 KiB) Viewed 9641 times
Re: ESP32 S2 - Not able to erase flash using Flash_download_tool_3.8.5
Yuvaraj1867 wrote: ↑Tue Oct 27, 2020 3:56 pmHi,
I was cloned esptool.py v3.0-dev form the link you shared.
But if i run summary or erase flash it was giving 'no module named bitstring" error.
Images for your reference attached.
Hi
can i ask you, which ESP-IDF version, Tools and Toolchain you installed / use for the ESP32-S2 Saola ?
Did you follow the instruction Installing for the ESP32-S2 ?
Do you want use the things for developing Firmware for your Saola Board or
do you want use Arduino or other Develop Environment?
For using all ESP32-S2 stuff:
I think your Environment ( python, modules, pip .. ) is not ready for the ESP32-S2.
Did you see the Github ESP-IDF Repo ?
Available for ESP32 and ESP32S2 ( Getting started )
ESP32-S2
FYI: my used Python Version is 3.8.1 in the Esp32-S2 ESP_IDF Path
this was installed with the ESP32-S2 Installer like before linked.
Hope this helps.
Waiting for your answeres first
best wishes
rudi
-------------------------------------
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
love it, change it or leave it.
-------------------------------------
問候飛出去的朋友遍全球魯迪
Who is online
Users browsing this forum: No registered users and 91 guests