EasyManua.ls Logo

Espressif ESP32-S2 - Page 828

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
[in] blk: Block number of eFuse. (EFUSE_BLK1, EFUSE_BLK2 and EFUSE_BLK3)
esp_err_t esp_efuse_set_read_protect(esp_efuse_block_t blk)
Sets a read protection for the whole block.
After that, it is impossible to read from this block. The read 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
[in] blk: Block number of eFuse. (EFUSE_BLK1, EFUSE_BLK2 and EFUSE_BLK3)
int esp_efuse_get_field_size(const esp_efuse_desc_t *field[])
Returns the number of bits used by field.
Return Returns the number of bits used by field.
Parameters
[in] field: A pointer to the structure describing the fields of efuse.
uint32_t esp_efuse_read_reg(esp_efuse_block_t blk, unsigned int num_reg)
Returns value of efuse register.
This is a thread-safe implementation. Example: EFUSE_BLK2_RDATA3_REG where (blk=2, num_reg=3)
Note Please note that reading in the batch mode does not show uncommitted changes.
Return Value of register
Parameters
[in] blk: Block number of eFuse.
[in] num_reg: The register number in the block.
esp_err_t esp_efuse_write_reg(esp_efuse_block_t blk, unsigned int num_reg, uint32_t val)
Write value to efuse register.
Apply a coding scheme if necessary. This is a thread-safe implementation. Example:
EFUSE_BLK3_WDATA0_REG where (blk=3, num_reg=0)
Return
ESP_OK: The operation was successfully completed.
ESP_ERR_EFUSE_REPEATED_PROG: Error repeated programming of programmed bits is
strictly forbidden.
Parameters
[in] blk: Block number of eFuse.
[in] num_reg: The register number in the block.
[in] val: Value to write.
esp_efuse_coding_scheme_t esp_efuse_get_coding_scheme(esp_efuse_block_t blk)
Return efuse coding scheme for blocks.
Note: The coding scheme is applicable only to 1, 2 and 3 blocks. For 0 block, the coding scheme is always
NONE.
Return Return efuse coding scheme for blocks
Parameters
[in] blk: Block number of eFuse.
esp_err_t esp_efuse_read_block(esp_efuse_block_t blk, void *dst_key, size_t oset_in_bits, size_t
size_bits)
Read key to efuse block starting at the offset and the required size.
Note Please note that reading in the batch mode does not show uncommitted changes.
Return
ESP_OK: The operation was successfully completed.
ESP_ERR_INVALID_ARG: Error in the passed arguments.
Espressif Systems 817
Submit Document Feedback
Release v4.4

Table of Contents