Chapter 2. API Reference
• ESP_ERR_CODING: Error range of data does not match the coding scheme.
Parameters
• [in] blk: Block number of eFuse.
• [in] dst_key: A pointer to array that will contain the result of reading.
• [in] offset_in_bits: Start bit in block.
• [in] size_bits: The number of bits required to read.
esp_err_t
esp_efuse_write_block(esp_efuse_block_t blk, const void *src_key, size_t offset_in_bits,
Write key to efuse block starting at the offset and the required size.
Return
• ESP_OK: The operation was successfully completed.
• ESP_ERR_INVALID_ARG: Error in the passed arguments.
• ESP_ERR_CODING: Error range of data does not match the coding scheme.
• ESP_ERR_EFUSE_REPEATED_PROG: Error repeated programming of programmed bits
Parameters
• [in] blk: Block number of eFuse.
• [in] src_key: A pointer to array that contains the key for writing.
• [in] offset_in_bits: Start bit in block.
• [in] size_bits: The number of bits required to write.
uint8_t esp_efuse_get_chip_ver(void)
Returns chip version from efuse.
Return chip version
uint32_t esp_efuse_get_pkg_ver(void)
Returns chip package from efuse.
Return chip package
void esp_efuse_reset(void)
Reset efuse write registers.
Efuse write registers are written to zero, to negate any changes that have been staged here.
Note This function is not threadsafe, if calling code updates efuse values from multiple tasks then this is caller'
s responsibility to serialise.
esp_err_t
esp_efuse_disable_rom_download_mode(void)
Disable ROM Download Mode via eFuse.
Permanently disables the ROM Download Mode feature. Once disabled, if the SoC is booted with strapping
pins set for ROM Download Mode then an error is printed instead.
Note Not all SoCs support this option. An error will be returned if called on an ESP32 with a silicon revision
lower than 3, as these revisions do not support this option.
Note If ROM Download Mode is already disabled, this function does nothing and returns success.
Return
• ESP_OK If the eFuse was successfully burned, or had already been burned.
• ESP_ERR_NOT_SUPPORTED (ESP32 only) This SoC is not capable of disabling UART down-
load mode
• ESP_ERR_INVALID_STATE (ESP32 only) This eFuse is write protected and cannot be written
esp_err_t esp_efuse_set_rom_log_scheme(esp_efuse_rom_log_scheme_t
Set boot ROM log scheme via eFuse.
Note By default, the boot ROM will always print to console. This API can be called to set the log scheme
only once per chip, once the value is changed from the default it can't be changed again.
Return
• ESP_OK If the eFuse was successfully burned, or had already been burned.
• ESP_ERR_NOT_SUPPORTED (ESP32 only) This SoC is not capable of setting ROM log scheme
• ESP_ERR_INVALID_STATE This eFuse is write protected or has been burned already
Parameters
Espressif Systems
size_t size_bits)
818
Submit Document Feedback
log_scheme)
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