Espressif ESP32-S2 Programming Manual page 830

Table of Contents

Advertisement

Chapter 2. API Reference
• log_scheme: Supported ROM log scheme
esp_err_t
esp_efuse_enable_rom_secure_download_mode(void)
Switch ROM Download Mode to Secure Download mode via eFuse.
Permanently enables Secure Download mode. This mode limits the use of ROM Download Mode functions
to simple flash read, write and erase operations, plus a command to return a summary of currently enabled
security features.
Note If Secure Download mode is already enabled, this function does nothing and returns success.
Note Disabling the ROM Download Mode also disables Secure Download Mode.
Return
• ESP_OK If the eFuse was successfully burned, or had already been burned.
• ESP_ERR_INVALID_STATE ROM Download Mode has been disabled via eFuse, so Secure
Download mode is unavailable.
uint32_t esp_efuse_read_secure_version(void)
Return secure_version from efuse field.
Return Secure version from efuse field
bool esp_efuse_check_secure_version(uint32_t secure_version)
Check secure_version from app and secure_version and from efuse field.
Return
• True: If version of app is equal or more then secure_version from efuse.
Parameters
• secure_version: Secure version from app.
esp_err_t
esp_efuse_update_secure_version(uint32_t secure_version)
Write efuse field by secure_version value.
Update the secure_version value is available if the coding scheme is None. Note: Do not use this function in
your applications. This function is called as part of the other API.
Return
• ESP_OK: Successful.
• ESP_FAIL: secure version of app cannot be set to efuse field.
• ESP_ERR_NOT_SUPPORTED: Anti rollback is not supported with the 3/4 and Repeat coding
scheme.
Parameters
• [in] secure_version: Secure version from app.
esp_err_t
esp_efuse_batch_write_begin(void)
Set the batch mode of writing fields.
This mode allows you to write the fields in the batch mode when need to burn several efuses at one time. To
enable batch mode call begin() then perform as usually the necessary operations read and write and at the end
call commit() to actually burn all written efuses. The batch mode can be used nested. The commit will be done
by the last commit() function. The number of begin() functions should be equal to the number of commit()
functions.
Note: If batch mode is enabled by the first task, at this time the second task cannot write/read efuses. The
second task will wait for the first task to complete the batch operation.
Note Please note that reading in the batch mode does not show uncommitted changes.
//
Example of using the batch writing
//
set
the batch writing mode
esp_efuse_batch_write_begin();
//
use
any
writing functions
esp_efuse_write_field_blob(ESP_EFUSE_...);
esp_efuse_write_field_cnt(ESP_EFUSE_...);
Espressif Systems
mode.
as
usual
819
Submit Document Feedback
(continues on next page)
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Table of Contents

Save PDF