Skip to content

ESP32-C3 rev3 + 2.0.0-RC2 : permanent reboot w WiFI #5601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
al1fch opened this issue Aug 27, 2021 · 36 comments
Closed

ESP32-C3 rev3 + 2.0.0-RC2 : permanent reboot w WiFI #5601

al1fch opened this issue Aug 27, 2021 · 36 comments

Comments

@al1fch
Copy link

al1fch commented Aug 27, 2021

Board : Lilygo/TTGO T-OI Plus (ESP32-C3)

Core 2.0.0-RC2

IDE 1.8.15 on Ubuntu 21.04

Code : WiFiScan (or any other code with WiFi)

Problem : pemanent reboot with following line :
`rst:0x13 (GLITCH_RTC_RST),boot:0xd (SPI_FAST_FLASH_BOOT)

07:48:06.489 -> ESP-ROM:esp32c3-api1-20210207
07:48:06.522 -> Build:Feb 7 2021
07:48:06.522 -> rst:0x1 (POWERON),boot:0xd (SPI_FAST_FLASH_BOOT)
07:48:06.522 -> SPIWP:0xee
07:48:06.522 -> mode:DIO, clock div:1
07:48:06.522 -> load:0x3fcd6100,len:0x12f4
07:48:06.522 -> load:0x403ce000,len:0x93c
07:48:06.522 -> load:0x403d0000,len:0x292c
07:48:06.522 -> SHA-256 comparison failed:
07:48:06.522 -> Calculated: 8d996f0c10c713e532f0d62ceb5bd044db8011bcaef3163574bcc3fc4768f05d
07:48:06.522 -> Expected: e9d7702986eabdb730063e52592f19701feea7da0d2207d674ef148b8cdb3216
07:48:06.555 -> Attempting to boot anyway...
07:48:06.555 -> entry 0x403ce000
07:48:06.555 -> I (48) boot: ESP-IDF v4.4-dev-2313-gc69f0ec32 2nd stage bootloader
07:48:06.555 -> I (49) boot: compile time 12:10:29
07:48:06.555 -> I (49) boot: chip revision: 3
07:48:06.555 -> I (49) boot_comm: chip revision: 3, min. bootloader chip revision: 0
07:48:06.555 -> I (64) boot.esp32c3: SPI Speed : 80MHz
07:48:06.555 -> I (64) boot.esp32c3: SPI Mode : DIO
07:48:06.555 -> I (64) boot.esp32c3: SPI Flash Size : 4MB
07:48:06.588 -> I (66) boot: Enabling RNG early entropy source...
07:48:06.588 -> I (71) boot: Partition Table:
07:48:06.588 -> I (73) boot: ## Label Usage Type ST Offset Length
07:48:06.588 -> I (80) boot: 0 nvs WiFi data 01 02 00009000 00005000
07:48:06.588 -> I (86) boot: 1 otadata OTA data 01 00 0000e000 00002000
07:48:06.588 -> I (93) boot: 2 app0 OTA app 00 10 00010000 00140000
07:48:06.622 -> I (99) boot: 3 app1 OTA app 00 11 00150000 00140000
07:48:06.622 -> I (106) boot: 4 spiffs Unknown data 01 82 00290000 00170000
07:48:06.622 -> I (112) boot: End of partition table
07:48:06.622 -> I (116) boot_comm: chip revision: 3, min. application chip revision: 0
07:48:06.622 -> I (122) esp_image: segment 0: paddr=00010020 vaddr=3c090020 size=11c68h ( 72808) map
07:48:06.622 -> I (141) esp_image: segment 1: paddr=00021c90 vaddr=3fc8de00 size=03170h ( 12656) load
07:48:06.655 -> I (144) esp_image: segment 2: paddr=00024e08 vaddr=40380000 size=0b210h ( 45584) load
07:48:06.655 -> I (153) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=86b38h (551736) map
07:48:06.721 -> I (240) esp_image: segment 4: paddr=000b6b60 vaddr=4038b210 size=02ad4h ( 10964) load
07:48:06.754 -> I (242) esp_image: segment 5: paddr=000b963c vaddr=50000000 size=00010h ( 16) load
07:48:06.754 -> I (248) boot: Loaded app from partition at offset 0x10000
07:48:06.754 -> I (249) boot: Disabling RNG early entropy source...
07:48:07.020 -> Setup don⸮ESP-ROM:esp32c3-api1-20210207
07:48:07.020 -> Build:Feb 7 2021
07:48:07.020 -> rst:0x13 (GLITCH_RTC_RST),boot:0xd (SPI_FAST_FLASH_BOOT)
07:48:07.020 -> SPIWP:0xee
07:48:07.020 -> mode:DIO, clock div:1
... and so on

@atanisoft
Copy link
Collaborator

This will depend on espressif/esp-idf#7441 being merged/available in arduino-esp32.

@al1fch
Copy link
Author

al1fch commented Aug 27, 2021

Thanks, I'll wait !!

@RandoSY
Copy link

RandoSY commented Sep 6, 2021

I'm seeing this on ESP32-C3 on the recent release 2.0? Could that be right???

@al1fch
Copy link
Author

al1fch commented Sep 7, 2021

Not yet

@Jason2866
Copy link
Collaborator

I have builded the framework with the commits from IDF4.4 (master) from today (include this fix).
Can be used with platformio too. https://github.com/Jason2866/esp32-arduino-lib-builder/releases/download/427/framework-arduinoespressif32-master-583026f04.tar.gz

@RandoSY
Copy link

RandoSY commented Sep 11, 2021

Thanks you!!!

@salvatoreraccardi
Copy link

I have found the same problem - with version 2.0.1. Does anyone know how to fix this problem?

@Jason2866
Copy link
Collaborator

The LilyGo board rev 1 is faulty. You can ask LilyGo for a replacement

@salvatoreraccardi
Copy link

I'm not using the LilyGo board.

@Jason2866
Copy link
Collaborator

We have no problem with the actual released core 2.0.1 using the ESP32-C3 in project Tasmota. Tasmota has many installations.
We have no issue feedback regarding wifi problems

@NiklasVoigt
Copy link
Contributor

NiklasVoigt commented Nov 24, 2021

We have no problem with the actual released core 2.0.1 using the ESP32-C3 in project Tasmota. Tasmota has many installations. We have no issue feedback regarding wifi problems

Well I flashed the latest tasmota c3 target in release and development and both throw "invalid header: 0xffffffffff" and don't run.

The Wifi example from Arduino (w. 2.0.1) causes permanent reboots.

Hardware: ESP32-C3-MINI-1-N4

@Jason2866
Copy link
Collaborator

@NiklasVoigt Looks like a flashing issue/error

@chegewara
Copy link
Contributor

invalid header: 0xffffffffff

this may have 2 reasons. Flash has been erased and no bootloader found or bootstrap pin is in wrong state and flash didnt run.
On C3 we have 3 bootstrap pins: GPIO 2, 8 and 9.
https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf

@NiklasVoigt
Copy link
Contributor

NiklasVoigt commented Nov 24, 2021

The standard sketch of the arduino ide with bluetoothle works like a charm. But every time i try to activate the wifi the esp restarts... this can't have anything to do with flashing.... it can't be the power, the esp is powered by an external voltage source.

In combination with those issue it makes more sense to me that it is a software bug
#5502
cause wifi is attached to ADC2

@Jason2866
Copy link
Collaborator

Why does wifi work for many with the c3 and the actual core 2.0.1?
It is possible that your module is defect.

@NiklasVoigt
Copy link
Contributor

NiklasVoigt commented Nov 24, 2021

this is a good question.. i have two esp32c3-mini-1-n4 and both have the same issue

Maybe my console ouput helps:
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x1 (POWERON),boot:0xa (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x137c
load:0x403ce000,len:0x8c0
load:0x403d0000,len:0x2924
SHA-256 comparison failed:
Calculated: 7e3ee51ec984c760a1ab62bc896f8cccf04acc25ab883634a46a416d68336a07
Expected: 501813b8f071d39ab9aaa8fc873a619c8d797cc47c19b0f957c790f96003ad55
Attempting to boot anyway...
entry 0x403ce000
I (48) boot: ESP-IDF v4.4-dev-1594-g1d7068e4b 2nd stage bootloader
I (49) boot: compile time 15:52:58
I (49) boot: chip revision: 3
I (49) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (55) boot.esp32c3: SPI Speed : 80MHz
I (59) boot.esp32c3: SPI Mode : DIO
I (63) boot.esp32c3: SPI Flash Size : 4MB
I (66) boot: Enabling RNG early entropy source...
I (71) boot: Partition Table:
I (73) boot: ## Label Usage Type ST Offset Length
I (80) boot: 0 nvs WiFi data 01 02 00009000 00005000
I (86) boot: 1 otadata OTA data 01 00 0000e000 00002000
I (93) boot: 2 app0 OTA app 00 10 00010000 00300000
I (99) boot: 3 spiffs Unknown data 01 82 00310000 000f0000
I (106) boot: End of partition table
I (109) boot_comm: chip revision: 3, min. application chip revision: 0
I (115) esp_image: segment 0: paddr=00010020 vaddr=3c090020 size=1b288h (111240) map
I (140) esp_image: segment 1: paddr=0002b2b0 vaddr=3fc8ce00 size=03450h ( 13392) load
I (143) esp_image: segment 2: paddr=0002e708 vaddr=40380000 size=01910h ( 6416) load
I (145) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=8f1bch (586172) map
I (243) esp_image: segment 4: paddr=000bf1e4 vaddr=40381910 size=0b328h ( 45864) load
I (252) esp_image: segment 5: paddr=000ca514 vaddr=50000000 size=00010h ( 16) load
I (256) boot: Loaded app from partition at offset 0x10000
I (256) boot: Disabling RNG early entropy source...

Connecting to WLAN
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0xf (BROWNOUT_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x137c
load:0x403ce000,len:0x8c0
load:0x403d0000,len:0x2924
SHA-256 comparison failed:
Calculated: 7e3ee51ec984c760a1ab62bc896f8cccf04acc25ab883634a46a416d68336a07
Expected: 501813b8f071d39ab9aaa8fc873a619c8d797cc47c19b0f957c790f96003ad55
Attempting to boot anyway...
entry 0x403ce000
I (49) boot: ESP-IDF v4.4-dev-1594-g1d7068e4b 2nd stage bootloader
I (49) boot: compile time 15:52:58
I (49) boot: chip revision: 3
I (49) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (56) boot.esp32c3: SPI Speed : 80MHz
I (59) boot.esp32c3: SPI Mode : DIO
I (63) boot.esp32c3: SPI Flash Size : 4MB
I (67) boot: Enabling RNG early entropy source...
I (71) boot: Partition Table:
I (74) boot: ## Label Usage Type ST Offset Length
I (80) boot: 0 nvs WiFi data 01 02 00009000 00005000
I (87) boot: 1 otadata OTA data 01 00 0000e000 00002000
I (93) boot: 2 app0 OTA app 00 10 00010000 00300000
I (100) boot: 3 spiffs Unknown data 01 82 00310000 000f0000
I (106) boot: End of partition table
I (110) boot_comm: chip revision: 3, min. application chip revision: 0
I (116) esp_image: segment 0: paddr=00010020 vaddr=3c090020 size=1b288h (111240) map
I (141) esp_image: segment 1: paddr=0002b2b0 vaddr=3fc8ce00 size=03450h ( 13392) load
I (144) esp_image: segment 2: paddr=0002e708 vaddr=40380000 size=01910h ( 6416) load
I (146) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=8f1bch (586172) map
I (244) esp_image: segment 4: paddr=000bf1e4 vaddr=40381910 size=0b328h ( 45864) load
I (252) esp_image: segment 5: paddr=000ca514 vaddr=50000000 size=00010h ( 16) load
I (257) boot: Loaded app from partition at offset 0x10000
I (257) boot: Disabling RNG early entropy source...

@chegewara
Copy link
Contributor

rst:0xf (BROWNOUT_RST),

@lukedukeus
Copy link

has anyone found a fix or workaround for this yet?

@Jason2866
Copy link
Collaborator

There is no issue with actual Arduino master and the C3.

@VojtechBartoska
Copy link
Contributor

Yes, please test with the latest master.

@VojtechBartoska VojtechBartoska added the Resolution: Awaiting response Waiting for response of author label Feb 24, 2022
@lukedukeus
Copy link

If I try to compile with esphome, the message I recieve is that the board isn't supported.

Compile log:

INFO Reading configuration /config/esphome/c3-arduino.yaml...
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
WARNING The selected Arduino framework version is not the recommended one. If there are connectivity or build issues please remove the manual version.
INFO Generating C++ source...
INFO Compiling app...
Processing c3-arduino (board: esp32-c3-devkitm-1; framework: arduino; platform: platformio/espressif32 @ 3.5.0)
--------------------------------------------------------------------------------
Tool Manager: Installing git+https://github.com/espressif/arduino-esp32.git
git version 2.30.2
Cloning into '/data/cache/platformio/cache/tmp/pkg-installing-e8t9_rp9'...
Updating files: 100% (6941/6941), done.
Tool Manager: framework-arduinoespressif32 @ 0.0.0+sha.b254765 has been installed!
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
 - framework-arduinoespressif32 0.0.0+sha.b254765 
Error: This board doesn't support arduino framework!
========================= [FAILED] Took 38.81 seconds =========================

my config:

esphome:
  name: c3-arduino
  platformio_options:
    board_build.flash_mode: dio
    
esp32:
  board: esp32-c3-devkitm-1
  framework:
    type: arduino
    version: dev

@Jason2866
Copy link
Collaborator

Jason2866 commented Feb 24, 2022

@lukedukeus Yes since you use old core platformio/espressif32 @ 3.5.0 is Arduino Core 1.0.6
You cant "update" the old Platformio framework with the Arduino Git version

@VojtechBartoska
Copy link
Contributor

@al1fch Did you give it a try with latest release version 2.0.2? The problem seems to be solved. I'm closing the issue, if you will still face this issue, please reopen it. Thanks for your contribution! :))

@VojtechBartoska VojtechBartoska removed the Resolution: Awaiting response Waiting for response of author label Mar 3, 2022
@flyturbo
Copy link

flyturbo commented May 1, 2022

I have same issue with 2.0.2 with 2 C3 minis

@VojtechBartoska
Copy link
Contributor

Hello @flyturbo, also on 2.0.3-rc1?

@flyturbo
Copy link

flyturbo commented May 3, 2022

Hello @flyturbo, also on 2.0.3-rc1?

I don't have that option to download this revision from board manager in Arduino.

@Jason2866
Copy link
Collaborator

Jason2866 commented May 3, 2022

@flyturbo If you have a LOLIN Wemos c3 mini you will have no luck. The board is a design fail. It does not work with IDF, Arduino nor Micropython. Read the comments in the official Aliexpress LOLIN shop. There are many feedbacks.
See arendst/Tasmota#15443 too.
Every other C3 board is working. Lilygo had a faulty C3 board too. The replaced with a new version and users who bought the faulty one could replace against the new.

@flyturbo
Copy link

flyturbo commented May 3, 2022

I have the ESP32-C3-MINI1N4

@lbernstone
Copy link
Contributor

That issue indicates that the problem is the power supply. What power supply/regulator are you using, @flyturbo ?

@flyturbo
Copy link

flyturbo commented May 3, 2022

I connect and power up the C3 mini with a FTDI adapter.

@lukedukeus
Copy link

I had the same issue, The FTDI couldn't provide enough current to the C3, so it would crash/ reboot when it tried to draw more current. You can just connect the gnd, tx, and rx to your c3, then an external 3v3 and gnd to the C3

@lukedukeus
Copy link

I have two ftdis, and only had this issue with one of them, heres how I have mine connected to avoid it
Screenshot 2022-05-03 195552

@flyturbo
Copy link

flyturbo commented May 4, 2022

That's exactly what am doing now, when I need to serial monitor for debugging, I power the C3 mini externally.

@lukedukeus
Copy link

@flyturbo Can you post a boot log?

@flyturbo
Copy link

flyturbo commented May 4, 2022

@lukedukeus

ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0xf (BROWNOUT_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x38c
load:0x403ce000,len:0x6a8
load:0x403d0000,len:0x236c
SHA-256 comparison failed:
Calculated: 86b6856493d23fe741a1623c3d149a38bdf91ca0101173d85f25c3fdb6d605ee
Expected: e7bbd322b12b609ed444a0547cebdc54bbcf46aefed1e04449d9827791f3e8ab
Attempting to boot anyway...
entry 0x403ce000

@lukedukeus
Copy link

@flyturbo
Take a look at this.

BROWNOUT_RST is usually bad power. If you can, try it with a different powersource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests