Can't upload to device after Deep Sleep

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
dhust
Posts: 40
Joined: Sun Jul 11, 2021 10:59 pm

Can't upload to device after Deep Sleep

Post by dhust » Sun Jul 25, 2021 11:33 pm

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?

Post Reply