efuse: Add ESP32 V3 'disable Download Mode' functionality

This commit is contained in:
Angus Gratton
2020-04-25 16:36:53 +10:00
parent 363589e849
commit 5a4091a2c0
9 changed files with 125 additions and 31 deletions

View File

@@ -121,6 +121,10 @@ esp_err_t esp_flash_encrypt_region(uint32_t src_addr, size_t data_length);
* is enabled but secure boot is not used. This should protect against
* serial re-flashing of an unauthorised code in absence of secure boot.
*
* @note On ESP32 V3 only, write protecting FLASH_CRYPT_CNT will also prevent
* disabling UART Download Mode. If both are wanted, call
* esp_efuse_disable_rom_download_mode() before calling this function.
*
*/
void esp_flash_write_protect_crypt_cnt();