Chapter 2. API Reference
Parameters
• [in] field: A pointer to the structure describing the fields of efuse.
• [out] out_cnt: A pointer that will contain the number of programmed as "1"bits.
esp_err_t
esp_efuse_write_field_blob(const
Writes array to EFUSE field.
The number of write bits will be limited to the minimum value from the description of the bits in "field"
structure or"src_size_bits" required size. Use"esp_efuse_get_field_size()" function to determine the length
of the field. After the function is completed, the writing registers are cleared.
Return
• ESP_OK: The operation was successfully completed.
• ESP_ERR_INVALID_ARG: Error in the passed arguments.
• ESP_ERR_EFUSE_REPEATED_PROG: Error repeated programming of programmed bits is
strictly forbidden.
• ESP_ERR_CODING: Error range of data does not match the coding scheme.
Parameters
• [in] field: A pointer to the structure describing the fields of efuse.
• [in] src: A pointer to array that contains the data for writing.
• [in] src_size_bits: The number of bits required to write.
esp_err_t
esp_efuse_write_field_cnt(const
Writes a required count of bits as "1"to EFUSE field.
If there are no free bits in the field to set the required number of bits to "1",
ESP_ERR_EFUSE_CNT_IS_FULL error is returned, the field will not be partially recorded.
the function is completed, the writing registers are cleared.
Return
• ESP_OK: The operation was successfully completed.
• ESP_ERR_INVALID_ARG: Error in the passed arguments.
• ESP_ERR_EFUSE_CNT_IS_FULL: Not all requested cnt bits is set.
Parameters
• [in] field: A pointer to the structure describing the fields of efuse.
• [in] cnt: Required number of programmed as "1"bits.
esp_err_t
esp_efuse_write_field_bit(const
Write a single bit eFuse field to 1.
For use with eFuse fields that are a single bit. This function will write the bit to value 1 if it is not already set,
or does nothing if the bit is already set.
This is equivalent to calling esp_efuse_write_field_cnt() with the cnt parameter equal to 1, except that it will
return ESP_OK if the field is already set to 1.
Return
• ESP_OK: The operation was successfully completed, or the bit was already set to value 1.
• ESP_ERR_INVALID_ARG: Error in the passed arugments, including if the efuse field is not 1 bit
wide.
Parameters
• [in] field: Pointer to the structure describing the efuse field.
esp_err_t
esp_efuse_set_write_protect(esp_efuse_block_t blk)
Sets a write protection for the whole block.
After that, it is impossible to write to this block. The write protection does not apply to block 0.
Return
• ESP_OK: The operation was successfully completed.
• ESP_ERR_INVALID_ARG: Error in the passed arguments.
• ESP_ERR_EFUSE_CNT_IS_FULL: Not all requested cnt bits is set.
• ESP_ERR_NOT_SUPPORTED: The block does not support this command.
Parameters
Espressif Systems
esp_efuse_desc_t
src_size_bits)
esp_efuse_desc_t
esp_efuse_desc_t
816
Submit Document Feedback
*field[], const void *src, size_t
*field[], size_t cnt)
*field[])
After
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?
Questions and answers