Help on eFuse

ifoxbr
Posts: 8
Joined: Mon Jun 20, 2022 1:48 pm

Help on eFuse

Postby ifoxbr » Thu Sep 22, 2022 7:59 pm

Hello,

I need help to be able to read and write the efuse UART_PRINT_CONTROL.
This eFuse is responsible for sending booting messages using UART0 at startup, but I have a printer conected on Uart0.
I used the following code to read this eFuse, but ESP-IDF crashes on PANIC.
I would be very grateful if anyone can help

Regards

Code: Select all

int turns_off_boot_messages(void)
{
    // Read UART_PRINT_CONTROL eFuse
    uint32_t FUSE = esp_efuse_read_reg(EFUSE_BLK0, ESP_EFUSE_UART_PRINT_CONTROL);

    // If Zero, change do 3
    if(FUSE == 0)
    {
        esp_err_t ret = esp_efuse_write_reg(EFUSE_BLK0, ESP_EFUSE_UART_PRINT_CONTROL, 0x03);
        if(ret == 0)
            ret = 1;		// done
        else
            ret = 0;		// error
    }
}

mikemoy
Posts: 627
Joined: Fri Jan 12, 2018 9:10 pm

Re: Help on eFuse

Postby mikemoy » Fri Sep 23, 2022 9:28 am

Why don't you just change it in menuconfig ?

ifoxbr
Posts: 8
Joined: Mon Jun 20, 2022 1:48 pm

Re: Help on eFuse

Postby ifoxbr » Fri Sep 23, 2022 1:44 pm

In MenuConfig when set "Permanent disable logging", still have messages on Uart0.
After displaying eFuses values using "espefuse --port COMx summary", I see UART_PRINT_CONTROL -> DISABLED (b11)
But even disabled, Uart0 displays some messages on UART0

Regards
Attachments
git2.png
message in boot mode
git2.png (6.38 KiB) Viewed 2083 times
git1.png
efuses read using espefuse.py
git1.png (31.13 KiB) Viewed 2083 times
git.png
menuconfig and messages on Uart0
git.png (47.73 KiB) Viewed 2083 times

Who is online

Users browsing this forum: No registered users and 128 guests