Wipy 3 irregularly crashes after deepsleep
-
Hi,
I have been evaluating the deepsleep capabilities of my Wipy 3 quite intensively during the last days. I noticed that it always crashes after a random amount of deepsleep cycles upon which a hard reset is required.
When it crashed, it has not connected to my WIFI (as specified in boot.py) and also did not setup its own WIFI, so I cannot access the REPL. However, it consumes power as it is warm. I am not sure whether the board crashes while going to deepsleep or while waking up from it.Am I doing something wrong or is this a firmware/hardware issue? Find below a boot.py and main.py that I can use to reproduce the problem, it usually occurs during the first hour.
# boot.py -- run on boot-up import machine import pycom import time def connectToWlan(): from network import WLAN wlan = WLAN(mode=WLAN.STA) nets = wlan.scan() for net in nets: if net.ssid == '<SSID>': print('Network found!') wlan.connect(net.ssid, auth=(net.sec, '<AUTH>'), timeout=5000) while not wlan.isconnected(): pycom.rgbled(0x7f0000) # red machine.idle() # save power while waiting print('WLAN connection succeeded!') wlan.ifconfig(config=('192.168.0.14', '255.255.255.0', '192.168.0.1', '192.168.0.1')) print(wlan.ifconfig()) break # Code to be run on boot-up pycom.heartbeat(False) connectToWlan() pycom.rgbled(0x007f00) # green time.sleep(1) # wait shortly
# main.py -- runs after boot.py import time import pycom ########################################################################### # Constants DEEPSLEEP_TIME = 2 # seconds ########################################################################### print("Going to deepsleep in 10 seconds") for i in range(10): pycom.rgbled(0) # off time.sleep(0.5) pycom.rgbled(0xffa500) # orange time.sleep(0.5) print("Going to deepsleep") time.sleep(1) # better wait a little machine.deepsleep(DEEPSLEEP_TIME * 1000) # must be milliseconds
Personally, I think the Wipy crashes after the wake up and before boot.py is run, but I am not sure how to proof that without staring at the Wipy for an hour.
-
As of last week, I cannot reproduce the error anymore... . If I encounter the issue again, I will write here again.
-
@moewex I have been having the same issue. My deep sleep time is 60 minutes. The WiPy will function fine for 1 - 2 weeks, then it hits this stall out mode where it does not connect to wifi and heats up. Not sure where the issue is on this one.