Led application: fast blink on reset

leotordo
Posts: 10
Joined: Thu Feb 02, 2023 1:31 pm

Led application: fast blink on reset

Postby leotordo » Fri Nov 03, 2023 12:51 pm

Hello,
on my board I drive a led lamp with a ESP32C3.
I use also PWM engine.
The logic is
GPIO7=0 --> LED OFF
GPIO7=1 --> LED ON

On power on and on rise of EN signal (manual reset) the led flashes for about 0.1s then the led switches off and application starts and it works fine.
I added the instruction to disable the HOLD Feature but nothing changed.
Here you are the starting code

Code: Select all

void app_main()
{
    gpio_set_direction(LEDC_OUTPUT_IO, GPIO_MODE_OUTPUT);
    gpio_set_level(LEDC_OUTPUT_IO,false);
    gpio_hold_dis(LEDC_OUTPUT_IO);
    ....
Any idea to solve it?
Thanks
Leo

Addendum: I've the same problem with a blank device

username
Posts: 520
Joined: Thu May 03, 2018 1:18 pm

Re: Led application: fast blink on reset

Postby username » Fri Nov 03, 2023 8:15 pm

Did you try moving the set_level before setting it as an output ? Not sure if that will help.

leotordo
Posts: 10
Joined: Thu Feb 02, 2023 1:31 pm

Re: Led application: fast blink on reset

Postby leotordo » Sat Nov 04, 2023 9:13 am

Yes but the pulse comes before all instructions.
I've the pulse also in blank device. My hypothesis is that is the first time from reset release when the core checks the strapping pins, but I didn't find any informations in documents I read.

Who is online

Users browsing this forum: Baidu [Spider], ESP_rrtandler and 74 guests