Skip to content

ESP32 C3 reboot when OTA #6807

@WangChun420

Description

@WangChun420

Board

LILYGO® T-OI PLUS RISC-V ESP32-C3

Device Description

ESP32C3_DEV

Hardware Configuration

no

Version

v2.0.3

IDE Name

Sloeber

Operating System

Window10

Flash frequency

40Mhz

PSRAM enabled

no

Upload speed

921600

Description

when i use OTA anyway ble ,basic ota or webserver ,the "abort() was called at PC 0x40380fe9 on core 0" accours, i trace the pc at "/esp32-arduino-lib-builder/esp-idf/components/spi_flash/esp_flash_api.c:541 (discriminator 5)", is ther some error?

Sketch

#include <WiFi.h>
#include <ESPmDNS.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>

const char* ssid = "Xiaomi_DA77";
const char* password = "**********";

void setup() {
  Serial.begin(115200);
  Serial.println("Booting");
  WiFi.mode(WIFI_STA);
  WiFi.begin(ssid, password);
  while (WiFi.waitForConnectResult() != WL_CONNECTED) {
    Serial.println("Connection Failed! Rebooting...");
    delay(5000);
    ESP.restart();
  }

  // Port defaults to 3232
   ArduinoOTA.setPort(3232);

  // Hostname defaults to esp3232-[MAC]
  // ArduinoOTA.setHostname("myesp32");

  // No authentication by default
  // ArduinoOTA.setPassword("admin");

  // Password can be set with it's md5 value as well
  // MD5(admin) = 21232f297a57a5a743894a0e4a801fc3
  // ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3");

  ArduinoOTA
    .onStart([]() {
      String type;
      if (ArduinoOTA.getCommand() == U_FLASH)
        type = "sketch";
      else // U_SPIFFS
        type = "filesystem";

      // NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end()
      Serial.println("Start updating " + type);
    })
    .onEnd([]() {
      Serial.println("\nEnd");
    })
    .onProgress([](unsigned int progress, unsigned int total) {
      Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
    })
    .onError([](ota_error_t error) {
      Serial.printf("Error[%u]: ", error);
      if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
      else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
      else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
      else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
      else if (error == OTA_END_ERROR) Serial.println("End Failed");
    });

  ArduinoOTA.begin();

  Serial.println("Ready");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
}

void loop() {
  ArduinoOTA.handle();
}

Debug Message

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xd (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fcd6100,len:0x38c
load:0x403ce000,len:0x6a8
load:0x403d0000,len:0x236c
SHA-256 comparison failed:
Calculated: add61d73313dc1c42721c564614c39a1730db11ed9a0f70b12aa2d493e175109
Expected: f24fa095b9eee178e67fb399bb138b85dabcd0850fd9b144fdce2ba6e429fb35
Attempting to boot anyway...
entry 0x403ce000

.......
Connected to Xiaomi_DA77
IP address: 192.168.31.156
mDNS responder started
Update: OTA.bin

abort() was called at PC 0x40380fe9 on core 0
Core  0 register dump:
MEPC    : 0x40381cae  RA      : 0x40386d2a  SP      : 0x3fc9bed0  GP      : 0x3fc8de00  
TP      : 0x3fc893ac  T0      : 0x37363534  T1      : 0x7271706f  T2      : 0x33323130  
S0/FP   : 0x3fc9bf0c  S1      : 0x3fc9bf0c  A0      : 0x3fc9bf0c  A1      : 0x3fc9beee  
A2      : 0x00000000  A3      : 0x3fc9bf39  A4      : 0x00000001  A5      : 0x3fc95000  
A6      : 0x7a797877  A7      : 0x76757473  S2      : 0x3fc9bef0  S3      : 0x00001000  
S4      : 0x00000b38  S5      : 0x00001000  S6      : 0x3fca96cc  S7      : 0x000004c8  
S8      : 0x00000066  S9      : 0x4200462a  S10     : 0x0000002d  S11     : 0x3c094000  
T3      : 0x6e6d6c6b  T4      : 0x6a696867  T5      : 0x66656463  T6      : 0x62613938  
MSTATUS : 0x00001801  MTVEC   : 0x40380001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000  
MHARTID : 0x00000000  

Stack memory:
3fc9bed0: 0x000005a0 0x3fc9bf6c 0x3fc9bf0c 0x4038c098 0x000005a0 0x3fc9bf6c 0x3fca7018 0x40380030
3fc9bef0: 0x38333034 0x39656630 0x3fc9bf00 0x3fc8fde4 0x3fc9bef0 0x3fc8fe00 0x3fc9beec 0x726f6261
3fc9bf10: 0x20292874 0x20736177 0x6c6c6163 0x61206465 0x43502074 0x34783020 0x30383330 0x20396566
3fc9bf30: 0x63206e6f 0x2065726f 0x00000030 0x40380000 0x00010000 0x3fc8f114 0x00000000 0x40380fec
3fc9bf50: 0x3fc893ac 0x72746e6f 0x00000000 0x3fc8f140 0x3fc9094c 0x00000000 0x3fca7550 0x3fca9c78
3fc9bf70: 0x000000ee 0x3fca7560 0x3fca7560 0x3c094000 0x0000002d 0x4200462a 0x00000066 0x000004c8
3fc9bf90: 0x3fca96cc 0x00001000 0x00000b38 0x3fc95000 0x00000010 0x00000000 0x3fc9094c 0x42004ebe
3fc9bfb0: 0x73646f68 0x74654d2d 0x776f6c6c 0x42004c0a 0x3fc9c030 0x00000007 0x3fc9c010 0x3fca9c6c
3fc9bfd0: 0x3fc90854 0x00000007 0x3fca6984 0x0000059c 0x0000059c 0x00000000 0x3fc9094c 0x42004d94
3fc9bff0: 0x3fc90854 0x42003846 0x3fca6940 0x3fc90854 0x3c091000 0x3fca6940 0x4200462a 0x00000066
3fc9c010: 0x3fc90854 0x00000001 0x3fca9690 0x420002aa 0x3fc90854 0x420037ba 0x3fca6940 0x42004658
3fc9c030: 0x00000000 0x00000000 0x00000000 0x07c90854 0x736c6f63 0x3fca6940 0x3fc90800 0x4200232e
3fc9c050: 0x6470752f 0x00657461 0x00000000 0x87002380 0x0000006c 0x4200462a 0x3fc9c1e0 0x3c09e000
3fc9c070: 0x3fc90828 0x3fc90800 0x3fc9c130 0x42002d48 0x3fca7a80 0x0000004f 0x00000026 0x00094000
3fc9c090: 0x3fca72cc 0x0000001f 0x00000006 0x00091000 0x00000000 0x00000000 0x00000000 0x80c90828
3fc9c0b0: 0x3fca72f0 0x0000001f 0x00000018 0x0a00569c 0x2e41544f 0x006e6962 0x00000000 0x8700251e
3fc9c0d0: 0x00000000 0x00000000 0x00000000 0x0cc90800 0x00000000 0x00000000 0x00000000 0x07002000
3fc9c0f0: 0x3c09e3c8 0x00000000 0x3fc9c1e0 0x3c094000 0x3c091000 0x3c091000 0x3c091000 0x3c091000
3fc9c110: 0x00000000 0x00000001 0x000a7795 0x3fc90828 0x3c09e000 0x00000000 0x3fc90800 0x420036dc
3fc9c130: 0x00000058 0x00000054 0x3fc908d0 0x00000000 0x3fca6800 0x0000009f 0x00000000 0x0e004820
3fc9c150: 0x54534f50 0x00000000 0x00000000 0x84387796 0x6470752f 0x00657461 0x00000000 0x87000000
3fc9c170: 0x00000031 0x00000000 0x00000000 0x81387278 0x00000000 0x00000000 0x00000000 0x80000000
3fc9c190: 0x00000000 0x00000000 0x00000000 0x8002ad82 0x3fca720c 0x0000002f 0x00000026 0x00017d30 
3fc9c1b0: 0x3fca6d18 0x0000001f 0x0000000f 0x06006874 0x3fca7178 0x0000008f 0x0000002f 0x00000000
3fc9c1d0: 0x00000000 0x00000000 0x00000000 0x00019950 0x3fca7298 0x0000002f 0x00000026 0x00006700
3fc9c1f0: 0x00000000 0x3fc90828 0x3fca6cd4 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fc9c210: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x3fc90828 0x3fc90800 0x4200482c
3fc9c230: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000001 0x3fc8d92c 0x420065ce
3fc9c250: 0x00000000 0x00000000 0x00000000 0x42006456 0x00000000 0x3fc95000 0x42004f98 0x42000536
3fc9c270: 0x00000000 0x40240000 0x42004f98 0x42006ae4 0x00000000 0x00000000 0x00000000 0x403898ae
3fc9c290: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fc9c2b0: 0x27146414 0x01010107 0x00000001 0xffffffff 0x7fefffff 0x00000000 0x3fc00000 0x00000000



ELF file SHA256: 0000000000000000

Rebooting...
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
Saved PC:0x403818f0
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fcd6100,len:0x38c
load:0x403ce000,len:0x6a8
load:0x403d0000,len:0x236c
SHA-256 comparison failed:
Calculated: add61d73313dc1c42721c564614c39a1730db11ed9a0f70b12aa2d493e175109
Expected: f24fa095b9eee178e67fb399bb138b85dabcd0850fd9b144fdce2ba6e429fb35
Attempting to boot anyway...
entry 0x403ce000

.......
Connected to Xiaomi_DA77
IP address: 192.168.31.156
mDNS responder started

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions