The only way to switch to download mode I've found was to pull some pin physically during power up.
Is there a method to trigger download mode by app?
Is there a way to trigger download boot mode by software?
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: Is there a way to trigger download boot mode by software?
On which chip? The ESP32 doesn't have this, later chips (S2/S3, C series) sometimes do.
Re: Is there a way to trigger download boot mode by software?
On ESP32 S3 and C3.ESP_Sprite wrote: ↑Mon Apr 17, 2023 1:42 amOn which chip? The ESP32 doesn't have this, later chips (S2/S3, C series) sometimes do.
Thanks for reply. Could you give some example please?
Some code snippet will help a lot.
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: Is there a way to trigger download boot mode by software?
You can try:
(Note you probably need to include some headers to make that work, I'll leave that to you.)
Code: Select all
REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT);
esp_restart();
Re: Is there a way to trigger download boot mode by software?
Thanks. It works linke a charm.ESP_Sprite wrote: ↑Sat Apr 22, 2023 3:32 amYou can try:(Note you probably need to include some headers to make that work, I'll leave that to you.)Code: Select all
REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT); esp_restart();
Code: Select all
#include "esp_system.h"
#include "soc/rtc_cntl_reg.h"
/**
* @brief Software triggering download mode for ESP32 S3
*
*/
void GoToDownloadMode(void)
{
REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT);
esp_restart();
}
Re: Is there a way to trigger download boot mode by software?
I have to say that this solution may not work on the S3 (possibly only if you're using USB and TinyUSB in your application). I'm just leaving this here if more people find this thread in a search.
There is a panic in the bootloader. The problem is documented here:
https://github.com/espressif/arduino-esp32/issues/10204
There is a panic in the bootloader. The problem is documented here:
https://github.com/espressif/arduino-esp32/issues/10204
Who is online
Users browsing this forum: MicroController, snutw_ and 78 guests