Awake from deep sleep not working.

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
fruity
Posts: 1
Joined: Sun Jun 16, 2019 10:55 am

Awake from deep sleep not working.

Post by fruity » Sun Jun 16, 2019 11:47 am

Hello, everyone!

I`m new user this hardware and software and I need help, please. I buy nodemcu v3 ESP8266, if this important, on aliexpress.

(ctrl+D):
>>>
PYB: soft reboot
WebREPL daemon started on ws://192.168.4.1:8266
Started webrepl in normal mode
hello!
MicroPython v1.10-8-g8b7039d7d on 2019-01-26; ESP module with ESP8266
Type "help()" for more information.
>>>

Now in main.py:
print("hello")

Now I try use deepsleep and awake.
1.
Connect RST pin to D0 (GPIO 16), now with a 470 ohm resistor, before that just wire.

2.
Connect (I`m use ubuntu), to serial port sudo picocom /dev/ttyUSB0 -b115200.

3.
implement this code:
[CODE]
>>>
>>> import machine
>>> rtc = machine.RTC()
>>> rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
>>> rtc.alarm(rtc.ALARM0, 10000)
>>>
>>> machine.deepsleep()
[/CODE]

LED on the board blink once, device not load. If I press to RST-button afte machine.deepsleep(), but before ALARM0 work, LED on the board blink once, device not load. If I press to RST-button - LED blink twice and device normal boot and work.
---

On windows OS, use putty to connect COM3 speed 748800.

connect to wifi this board, and use webREPL:
[CODE]
>>> import machine
>>> rtc = machine.RTC()
>>> rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
>>> rtc.alarm(rtc.ALARM0, 10000)
>>>
>>> machine.deepsleep()
[/CODE]

afte 10 sec in putty:
[CODE]
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
[/CODE]
and it's all.

But if I press RST button:

[CODE]
ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 31020, room 16
tail 12
chksum 0xd2
ho 0 tail 12 room 4
load 0x3ffe8000, len 1100, room 12
tail 0
chksum 0x9a
load 0x3ffe8450, len 824, room 8
tail 0
chksum 0xbd
csum 0xbd
rf cal sector: 1019
freq trace enable 0
rf[112] : 00
rf[113] : 00
rf[114] : 01

SDK ver: 2.2.0-dev(9422289) compiled @ Nov 3 2017 19:40:08
phy ver: 1136_0, pp ver: 10.2

mode : softAP(3e:71:b▒▒P9@CHN
[/CODE]

If I connect wired to RST and connect/disconnect to GRD, rst cause:2, too.

What can I do to make deep sleep work?
Thanks so much for any help.

Post Reply