Hi,
I was making some initial tests with flash encryption in DEVELOPMENT MODE (no secure boot). When I finished, I just disabled flash encryption in menuconfig and then tried to flash again a new firmware version. Unfortunately this is the oputput I get from by board:
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
I have read several posts but I do not know exactly how to recover my boards and be able to get my plain text image running again with flash encryption disabled. I have also checked the efuses and these are their values:
Security fuses:
FLASH_CRYPT_CNT Flash encryption mode counter = 1 R/W (0x1)
FLASH_CRYPT_CONFIG Flash encryption config (key tweak bits) = 15 R/W (0xf)
CONSOLE_DEBUG_DISABLE Disable ROM BASIC interpreter fallback = 1 R/W (0x1)
ABS_DONE_0 secure boot enabled for bootloader = 0 R/W (0x0)
ABS_DONE_1 secure boot abstract 1 locked = 0 R/W (0x0)
JTAG_DISABLE Disable JTAG = 1 R/W (0x1)
DISABLE_DL_ENCRYPT Disable flash encryption in UART bootloader = 0 R/W (0x0)
DISABLE_DL_DECRYPT Disable flash decryption in UART bootloader = 1 R/W (0x1)
DISABLE_DL_CACHE Disable flash cache in UART bootloader = 1 R/W (0x1)
BLK1 Flash encryption key
= ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? -/-
What can I do? Thanks!
Flashing plain text image after enabling flash encryption
Re: Flashing plain text image after enabling flash encryption
Either disable encryption (on the chip, not in the project) using espefuse.py or flash using the encrypt option
Re: Flashing plain text image after enabling flash encryption
Thanks WiFive, yes, that is exactly what I was looking for (disable encryption on the chip) but unfortunately "burn_efuse" with value 0 for DISABLE_DL_ENCRYPT and DISABLE_DL_DECRYPT return "New value is not accepted for this efuse (will always burn 0->1)".WiFive wrote: Either disable encryption (on the chip, not in the project) using espefuse.py or flash using the encrypt option
Could you please elaborate a little bit more your explanation?
Re: Flashing plain text image after enabling flash encryption
To disable encryption you change FLASH_CRYPT_CNT
Re: Flashing plain text image after enabling flash encryption
I forgot to mention it but I also tried to set FLASH_CRYPT_CNT to 0 but this is the output, so I cancelled the operation:
espefuse.py -p COM6 burn_efuse FLASH_CRYPT_CNT 0
espefuse.py v2.8
Connecting....
WARNING: New value contains some bits that cannot be cleared (value will be 0x1)
Burning efuse FLASH_CRYPT_CNT (Flash encryption mode counter) 0x1 -> 0x1. This is an irreversible operation.
Type 'BURN' (all capitals) to continue.
espefuse.py -p COM6 burn_efuse FLASH_CRYPT_CNT 0
espefuse.py v2.8
Connecting....
WARNING: New value contains some bits that cannot be cleared (value will be 0x1)
Burning efuse FLASH_CRYPT_CNT (Flash encryption mode counter) 0x1 -> 0x1. This is an irreversible operation.
Type 'BURN' (all capitals) to continue.
Re: Flashing plain text image after enabling flash encryption
You have to set it to 3. If you don't supply a value it should automatically increment it.
Re: Flashing plain text image after enabling flash encryption
It worked! thanks
Who is online
Users browsing this forum: Bing [Bot] and 235 guests