bootloader: Adds an option to leave DIS_CACHE writeable

This commit is contained in:
KonstantinKondrashov
2023-03-25 03:07:10 +08:00
parent 199e5abbf3
commit a3232e4a5b
8 changed files with 48 additions and 7 deletions

View File

@@ -39,7 +39,7 @@ esp_err_t esp_flash_encryption_enable_secure_features(void)
esp_efuse_write_field_bit(ESP_EFUSE_WR_DIS_RD_DIS);
#endif
#ifdef CONFIG_SECURE_FLASH_ENCRYPTION_MODE_RELEASE
#ifndef CONFIG_SECURE_FLASH_SKIP_WRITE_PROTECTION_CACHE
// Set write-protection for DIS_ICACHE to prevent bricking chip in case it will be set accidentally.
// esp32h2 has DIS_ICACHE. Write-protection bit = 2.
// List of eFuses with the same write protection bit: