Skip to content

Feather ESP32 V2: Internal watchdog timer expired after switching to CP 9.0.0 #9066

Closed
@vladak

Description

@vladak

CircuitPython version

Adafruit CircuitPython 9.0.0-rc.0-7-g6a07412b07 on 2024-03-11; Adafruit Feather ESP32 V2 with ESP32

This also happens with CP 9.0.0 final release.

Code/REPL

see https://github.com/vladak/shield

Behavior

I have a simple setup with Feather ESP32 V2, running on battery power, periodically reading metrics from temperature/humidity sensors, publishing them to local MQTT broker and entering deep sleep. The Feather was running CP 8, however in order to make the library installations easier with circup, I upgraded to CP 9 and since then the board enters safe mode after running for half a day or so. This was not happening with CP 8 - the board could run for months without a problem. I can see that especially at night because it continues blinking green three times. When I connect console over USB I can see this:

Adafruit CircuitPython 9.0.0-rc.0-7-g6a07412b07 on 2024-03-11; Adafruit Feather ESP32 V2 with ESP32
>>> 
soft reboot

Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
Internal watchdog timer expired.
Press reset to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.

I have to reset the board after this happens.

Normally the code produces messages like this:

rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 271414342, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:312
load:0x40078000,len:14168
load:0x40080400,len:4
load:0x40080404,len:3268
entry 0x40080580
Serial console setup
Adafruit CircuitPython 9.0.0-rc.0-7-g6a07412b07 on 2024-03-11; Adafruit Feather ESP32 V2 with ESP32
Board ID:adafruit_feather_esp32_v2
UID:8EF9D6220881

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
4.498: INFO - Running
5.552: INFO - No ath20 sensor found: No I2C device at address: 0x38
5.561: INFO - No library for the scd4x sensor
5.567: INFO - Connecting to wifi
5.572: INFO - Connected to XXX
5.581: INFO - Attempting to connect to MQTT broker 172.40.0.3:1883
5.624: INFO - Connected to MQTT Broker!
5.643: INFO - Temperature: 6.4 C
5.648: INFO - Humidity: 55.7 %
5.654: INFO - Battery capacity 88.80 %
5.661: INFO - Publishing to devices/terasa/shield
5.670: INFO - Published to devices/terasa/shield with PID 0
5.677: INFO - Running on battery power, breaking out
5.684: INFO - Going to light sleep for 10 seconds
15.692: INFO - Disconnected from MQTT Broker!
15.701: INFO - battery capacity more than 80, using shorter sleep of 60 seconds
15.711: INFO - Going to deep sleep for 60 seconds

Code done running.

Description

No response

Additional information

The code uses the watchdog module, however as I learned on https://forums.adafruit.com/viewtopic.php?p=994870#p994870 this is a case of internal RTOS watchdog and this should not be happening.

The complete code and description of my setup can be found on https://github.com/vladak/shield

I can test debug versions of CP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions