EasyManua.ls Logo

Espressif ESP32-S2 - Page 827

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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 1bits.
esp_err_t esp_efuse_write_field_blob(const esp_efuse_desc_t *field[], const void *src, size_t
src_size_bits)
Writes array to EFUSE field.
The number of write bits will be limited to the minimum value from the description of the bits in eld
structure orsrc_size_bitsrequired size. Useesp_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 esp_efuse_desc_t *field[], size_t cnt)
Writes a required count of bits as 1to 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 eld will not be partially recorded. 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_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 1bits.
esp_err_t esp_efuse_write_field_bit(const esp_efuse_desc_t *field[])
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 816
Submit Document Feedback
Release v4.4

Table of Contents