🎁📬❄️📦 Holiday Shipping Deadlines are approaching! International customers and domestic ground - get your orders in 12/9/2020 📦❄️📬🎁
0

Metro ESP32-S2 crash on reload with I2C and WiFi
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Metro ESP32-S2 crash on reload with I2C and WiFi

by hsimons on Sat Nov 21, 2020 2:58 pm

I am having an issue on the Metro ESP32-S2 running CircuitPython 6.1.0-beta.1. If I initialize I2C (busio.I2C) the board appears to hang/crash when executing wifi.radio.connect after a reload. It works fine after a hard reset but just the once.

If I comment out the busio.I2C line, I can do repeated reloads and wifi.radio.connect executes fine. I2C alone seems stable as well... I left the board running overnight reading the pressure from 15 sensors I've been testing and it was fine. I am only seeing this issue when using WiFi and I2C simultaneously.

Below is the slimmed down code I've been using for troubleshooting.

Code: Select all | TOGGLE FULL SIZE
import board
import time
import wifi
import busio
from secrets import secrets

time.sleep(2)

print("Connecting to %s"%secrets["ssid"])
wifi.radio.connect(secrets["ssid"], secrets["passphrase"])
print("Connected to %s!"%secrets["ssid"])
print("My IP address is", wifi.radio.ipv4_address)

time.sleep(2)

# Create I2C bus as normal
i2c = busio.I2C(board.SCL, board.SDA)

hsimons
 
Posts: 5
Joined: Thu May 29, 2014 11:20 pm

Re: Metro ESP32-S2 crash on reload with I2C and WiFi

by tannewt on Mon Nov 23, 2020 6:18 pm

Thanks for the report! We've known about this issue for a little while but have had trouble tracking it down.

I believe this is the same issue: https://github.com/adafruit/circuitpython/issues/3743

Please follow that issue to see when we think we have a fix. Thanks!

tannewt
 
Posts: 1922
Joined: Thu Oct 06, 2016 8:48 pm

Re: Metro ESP32-S2 crash on reload with I2C and WiFi

by hsimons on Tue Nov 24, 2020 1:15 pm

Thanks Scott... it appears it could very well be the same issue. I've subscribed to that thread as you've suggested.

Howard

hsimons
 
Posts: 5
Joined: Thu May 29, 2014 11:20 pm

Please be positive and constructive with your questions and comments.