ESP32C6 burning fuses

stefano664
Posts: 9
Joined: Tue Feb 02, 2021 8:06 am

ESP32C6 burning fuses

Postby stefano664 » Wed Jan 24, 2024 2:56 pm

Hi all,
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;
}
Why? On the documentation I cannot find any indication that forbit these actions.

Thanks a lot,
Stefano

joseMiguel
Posts: 22
Joined: Sun Oct 25, 2020 11:43 pm

Re: ESP32C6 burning fuses

Postby joseMiguel » Wed Jan 24, 2024 5:55 pm

Hello,

Perhaps you need to be in a privileged mode or something like that (Machine mode, ...).

Hope it will help you

José Michel
José Michel

Who is online

Users browsing this forum: No registered users and 46 guests