-->
Page 1 of 8

Wemos D1 mini & deepSleep() hang

PostPosted: Sat Jan 30, 2016 6:42 pm
by redge76
Hi,

I'm trying to get the deepSleep() function working on a Wemos D1 mini. The board hangs after the first wake up.
I connected D0 to the RST pin with a simple wire.
I use the following arduino sketch.
When started, I get the first "Before deepSleep" string. Then, the board goes to deepsleep.
It wakes up exactly after 10s but it hangs. (I know it wakes up because I get garbage in the terminal, but I never get the second "Before deepSleep" string).
How is the CH_PD pin connected on the D1 mini ? From what I read, it may be the cause of this hang.
How should I wire the D1 mini to get the deepsleep function working properly? I already tried to add a pullup on GPIO0 & GPIO2.
The bellow code works fine on one of my nodemcu boards with only a wire connected between D0 and RST.

Regards,
Redge

#define SECONDS_DS(seconds) ((seconds)*1000000UL)
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println(F("Before deepSleep"));
ESP.deepSleep(SECONDS_DS(5), WAKE_RF_DISABLED);
}
void loop() { }

reply quote 0

Re: Wemos D1 mini & deepSleep() hang

PostPosted: Sun Jan 31, 2016 11:34 am
by martinayotte
On my Wemos-D1-Mini, the wakeup from DeepSleep works well with only the wire between RST and D0.
But maybe the subtle difference I did is I used WAKE_RF_DEFAULT, because using WAKE_RF_DISABLED effectively produce some crashes.

Re: Wemos D1 mini & deepSleep() hang

PostPosted: Sun Jan 31, 2016 1:38 pm
by redge76
Hoo please shoot me ! I can't make the difference between a A and a D. Both pin are nearby.
With D0 it works better ....

Re: Wemos D1 mini & deepSleep() hang

PostPosted: Sun Jan 31, 2016 6:10 pm
by martinayotte
:)