esp32c3 entering first stage bootloader programmatically

mejhaMA
Posts: 2
Joined: Thu Nov 16, 2023 5:07 pm

esp32c3 entering first stage bootloader programmatically

Postby mejhaMA » Thu Nov 16, 2023 5:15 pm

I would like to put esp32c3 into first stage bootloader through software or to be more precise from application that is running on device.

I have already read/try this https://stackoverflow.com/questions/671 ... 1#67420591, but from what I can see in esp idf sdk v5.1, functions (rtc_wdt_protect_off, rtc_wdt_set_length_of_reset_signal, ...) are not supported for esp32c3, only for esp32 and esp32s3.

I know that I could create a "own" bootloader application that executes after second stage bootloader, which could behave as first stage bootloader, but I would like to do it through esp first stage bootloader.

Please keep in mind that putting device into first stage bootloader must be done through SW, hardware pin setting is not an option.


Perhaps another idea is to set some flag/parameter in NVS in running application and performing reset and override bootloader (second stage) and try to read that parameter previously saved (from NVS). However I was not able to include NVS component into bootloader, is it possible?

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: esp32c3 entering first stage bootloader programmatically

Postby MicroController » Sat Nov 18, 2023 1:51 am

Like this?

mejhaMA
Posts: 2
Joined: Thu Nov 16, 2023 5:07 pm

Re: esp32c3 entering first stage bootloader programmatically

Postby mejhaMA » Mon Nov 20, 2023 5:47 pm

Yes.
Thanks. This is what I was looking for.
Works as expected.

Who is online

Users browsing this forum: No registered users and 118 guests