I need to read and write fuses directly from the application, but I have some issue.
The couple of functions esp_efuse_read_block/esp_efuse_write_block works fine for BLOCK4/BLOCK5/BLOCK6 but if I try on BLOCK0 it returns everytime ESP_ERR_INVALID_ARG. Someone can help me?
Inside the functions, for example in esp_efuse_api.c@211 there is a control that returns this error everytime if the block is BLOCK0.
Code: Select all
esp_err_t esp_efuse_read_block(esp_efuse_block_t blk, void* dst_key, size_t offset_in_bits, size_t size_bits)
{
esp_err_t err = ESP_OK;
if (blk == EFUSE_BLK0 || blk >= EFUSE_BLK_MAX || dst_key == NULL || size_bits == 0) {
err = ESP_ERR_INVALID_ARG;
} else {
const esp_efuse_desc_t field_desc[] = {
{blk, offset_in_bits, size_bits},
};
const esp_efuse_desc_t* field[] = {
&field_desc[0],
NULL
};
err = esp_efuse_read_field_blob(field, dst_key, size_bits);
}
return err;
}
Thanks a lot,
Stefano