Page 1 of 1

Can't upload to device after Deep Sleep

Posted: Sun Jul 25, 2021 11:33 pm
by dhust
I have a program that just prints "Hi" using

Code: Select all

ampy --port COM15 run something.py
I can run this over and over. When I add deep sleep using this code:

Code: Select all

import machine

print("Hi")

rtc = machine.RTC()
rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
rtc.alarm(rtc.ALARM0, 3000)
machine.deepsleep()
I'm no longer able to upload to the device. I usually have to reflash it. I've also tried using rshell that doesn't work either. It just keeps trying to connect. Am I doing something wrong or is there a way to stop deep sleep so I can upload?