Chapter 2. API Reference
(continued from previous page)
esp_efuse_set_write_protect(EFUSE_BLKx);
esp_efuse_write_reg(EFUSE_BLKx, ...);
esp_efuse_write_block(EFUSE_BLKx, ...);
esp_efuse_write(ESP_EFUSE_1, 3); // ESP_EFUSE_1 == 1, here we write a new␣
,→value = 3. The changes will be burn by the commit() function.
esp_efuse_read_...(ESP_EFUSE_1); // this function returns ESP_EFUSE_1 == 1␣
,→because uncommitted changes are not readable, it will be available only␣
,→after commit.
...
// esp_efuse_batch_write APIs can be called recursively.
esp_efuse_batch_write_begin();
esp_efuse_set_write_protect(EFUSE_BLKx);
esp_efuse_batch_write_commit(); // the burn will be skipped here, it will be␣
,→done in the last commit().
...
// Write all of these fields to the efuse registers
esp_efuse_batch_write_commit();
esp_efuse_read_...(ESP_EFUSE_1); // this function returns ESP_EFUSE_1 == 3.
Return
• ESP_OK: Successful.
esp_err_t esp_efuse_batch_write_cancel(void)
Reset the batch mode of writing fields.
It will reset the batch writing mode and any written changes.
Return
• ESP_OK: Successful.
• ESP_ERR_INVALID_STATE: Tha batch mode was not set.
esp_err_t esp_efuse_batch_write_commit(void)
Writes all prepared data for the batch mode.
Must be called to ensure changes are written to the efuse registers. After this the batch writing mode will be
reset.
Return
• ESP_OK: Successful.
• ESP_ERR_INVALID_STATE: The deferred writing mode was not set.
bool esp_efuse_block_is_empty(esp_efuse_block_t block)
Checks that the given block is empty.
Return
• True: The block is empty.
• False: The block is not empty or was an error.
bool esp_efuse_get_key_dis_read(esp_efuse_block_t block)
Returns a read protection for the key block.
Return True: The key block is read protected False: The key block is readable.
Parameters
• [in] block: A key block in the range EFUSE_BLK_KEY0..EFUSE_BLK_KEY_MAX
esp_err_t esp_efuse_set_key_dis_read(esp_efuse_block_t block)
Sets a read protection for the key block.
Return
• ESP_OK: Successful.
• ESP_ERR_INVALID_ARG: Error in the passed arguments.
Espressif Systems 820
Submit Document Feedback
Release v4.4