Skip to content
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

Corrupted backtrace #21

Closed
Flow76320 opened this issue Sep 14, 2023 · 12 comments
Closed

Corrupted backtrace #21

Flow76320 opened this issue Sep 14, 2023 · 12 comments

Comments

@Flow76320
Copy link

Hi @zibous!

Thanks for this work/tuto, this works like a charm!

Actually, this worked like a charm for months... But since I wanted to add a case for everything, the ESP seems to be corrupted. My soldering was quite poor for the external antena and it just broke. I made a new one and then...

load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
E (23870) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (23870) task_wdt:  - loopTask (CPU 1)
E (23870) task_wdt: Tasks currently running:
E (23870) task_wdt: CPU 0: IDLE
E (23870) task_wdt: CPU 1: loopTask
E (23870) task_wdt: Aborting.

abort() was called at PC 0x40103a48 on core 0

Backtrace:0x40083915:0x3ffbe9cc |<-CORRUPTED

ELF file SHA256: 0000000000000000

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4

It reboots all the time.

I've checked my soldering, made new ones, changes the CC1101.
Interesting point is that when I remove 3v3 for the CC1101, boot loops stop.

Any idea on how to fix this?

Thanks 🙏

@zibous
Copy link
Owner

zibous commented Sep 14, 2023

Actually, this worked like a charm for months... But since I wanted to add a case for everything, the ESP seems to be corrupted. My soldering was quite poor for the external antena and it just broke. I made a new one and then...

Hi,

How do you flash the firmware ?

Using another microUSB cable helped.

@Flow76320
Copy link
Author

Flow76320 commented Sep 14, 2023 via email

@zibous
Copy link
Owner

zibous commented Sep 14, 2023

I flashed with EspHome from HA, and reset with esptool.py from Espressif website.

Ohh, This explains to some, HA ESPHome is currently unstable and there are some reports that flashing devices and creating firmware is not working !

Here you can test firmware. I would flash with "ESPHOME Flasher".

Firmware : https://github.com/zibous/ha-watermeter/tree/master/esphome/testcases

ESPHOME Flasher: https://github.com/esphome/esphome-flasher/releases

@Flow76320
Copy link
Author

Flow76320 commented Sep 14, 2023 via email

@zibous
Copy link
Owner

zibous commented Sep 15, 2023

After the card change, I had another try for Esp Home / HA v2023.8.3

Esp Home / HA v2023.8.3 do not work, try the test firmware from:

Firmware : https://github.com/zibous/ha-watermeter/tree/master/esphome/testcases
Firmware was build with ESPHOME Docker.

I would flash with "ESPHOME Flasher".

Backtrace Decoder : https://maximeborges.github.io/esp-stacktrace-decoder/

@Flow76320
Copy link
Author

Flow76320 commented Sep 15, 2023 via email

@zibous
Copy link
Owner

zibous commented Sep 15, 2023

Yes I tried your firmware. The logs are those from my previous comment. I installed it with web esp home

Negativ, do not use "web esp home" use the ESPHOME Flasher.

If I flash the firmware water-meter-esp32-izar-test.bin with "web esp home - chrome browser" then I get the same error message.

But if I flash it with the "ESP Home Flasher 1.2.0" then it works without any error messages.

https://github.com/esphome/esphome-flasher/releases/tag/v1.2.0
With all other flash tools I cannot flash the firmware properly.

Using '/dev/cu.SLAB_USBtoUART' as serial port.
Connecting........_
Detecting chip type... ESP32
Connecting........_

Chip Info:
 - Chip Family: ESP32
 - Chip Model: ESP32D0WDQ5 (revision 3)
 - Number of Cores: 2
 - Max CPU Frequency: 240MHz
 - Has Bluetooth: YES
 - Has Embedded Flash: NO
 - Has Factory-Calibrated ADC: YES
 - MAC Address: C8:F0:9E:F3:47:94
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
 - Flash Size: 4MB
 - Flash Mode: dio
 - Flash Frequency: 40MHz
Erasing flash (this may take a while)...
Chip erase completed successfully in 12.8s
Compressed 15872 bytes to 10319...
Writing at 0x00001000... (100 %)Wrote 15872 bytes (10319 compressed) at 0x00001000 in 0.2 seconds (effective 518.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 144...
Writing at 0x00008000... (100 %)Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.0 seconds (effective 1490.1 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 4513.9 kbit/s)...
Hash of data verified.
Compressed 970880 bytes to 634084...
Writing at 0x000a8000... (100 %)Wrote 970880 bytes (634084 compressed) at 0x00010000 in 15.2 seconds (effective 510.4 kbit/s)...
Hash of data verified.

Leaving...
Hard Resetting...
Done! Flashing is complete!

Showing logs:
[09:57:17][     7][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[09:57:17][    34][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 0 - WIFI_READY
[09:57:20][   200][V][WiFiGeneric.cpp:390] _arduino_event_cb(): AP Started
[09:57:20][  2451][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 10 - AP_START
[09:57:20][  2455][V][WiFiGeneric.cpp:393] _arduino_event_cb(): AP Stopped
[09:57:20][  2458][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 11 - AP_STOP
[09:57:20][  2466][V][WiFiGeneric.cpp:390] _arduino_event_cb(): AP Started
[09:57:20][  2471][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 10 - AP_START
[09:57:20][  2482][V][WiFiGeneric.cpp:338] _arduino_event_cb(): STA Started
[09:57:20][  2483][D][WiFiGeneric.cpp:929] _eventCallback(): Arduino Event: 2 - STA_START

@zibous
Copy link
Owner

zibous commented Sep 15, 2023

New Testcase using https://web.esphome.io/ with chrome browser.

  • Connect to the device
  • Prepare for first use
  • When finish set the local WIFI and "Visit Device"
  • OTA Update water-meter-esp32-izar-test.bin

Works for me.

Bildschirmfoto 2023-09-15 um 13 05 12

Result:

Bildschirmfoto 2023-09-15 um 13 08 13

@Flow76320
Copy link
Author

Flow76320 commented Sep 17, 2023 via email

@zibous
Copy link
Owner

zibous commented Sep 17, 2023

The flash / update OTA is successful. The device is stable when I keep the CC1101 unplugged.

In any case, it looks like a bad connection to CC1101, misplaced pins, or a failed CC1101.
see: SzczepanLeon/esphome-components#17

@Flow76320
Copy link
Author

Flow76320 commented Sep 18, 2023 via email

@zibous zibous closed this as completed Oct 13, 2023
@Flow76320
Copy link
Author

Hi @zibous,

Tell me if you want me to open a new issue.
I've received and tested a new E07-900MBL-01 rev v.1.1 to replace the CC1101 cards, tested 2 ESP32, and I still got the corruptions.

After some investigations, they only appear when calling

wmbus:
  mosi_pin: GPIO23  ## SI:   braun   3: MOSI Attached to Hardware SPI controller MOSI SPI Interface
  miso_pin: GPIO19  ## SO:   grün    5: MISO Attached to Hardware SPI controller MISO SPI Interface
  clk_pin: GPIO18   ## SCLK: violett 4: SCK  Attached to Hardware SPI controller CLK
  cs_pin: GPIO05    ## CSN:  orange  8: CSN  Attached to Hardware SPI controller
  gdo0_pin: GPIO16  ## GD00: gelb    7: RX Clock output. High Impedance !
  gdo2_pin: GPIO17  ## GD02: weiss   6: TX FIFO status signals. High Impedance !
  log_unknown: False

I've built the testing code with Web ESP Home and from Docker container, then it can't be related to the compiler.
The pins are good, are I've tested providing power to the network card by the integrated USB or from 3.3V of ESP32.
Cables are all brand new too.

Here is the wired setup
20231020_213411

By any chance, may you have another idea?

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

2 participants