Node MCU 8266 L0L1n Deep Sleep Mode issue with rst cause 2

Hey guys, I'm new to this world so please excuse me If I'm asking dumb question. I tried to find a solution but here I am here asking :).

I'm using Node MCU 8266 L0L1n ESP-12E Module type and I'm trying to put it into Deep Sleep. Now I don't have anything connected to the board.

Simply only RST to D0 since that's what I was able to read. I need to connect it so it will reset the board after the time of deep sleep.

My code is really basic :

void setup () {
 Serial.begin(74880);
delay(1000);
pinMode(LED_BUILTIN, OUTPUT);

Serial.println("Im awake");
digitalWrite(LED_BUILTIN, HIGH);
delay(3000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
Serial.println("im sleeping");
u32 SLEEP = 30E6;
ESP.deepSleep(SLEEP, WAKE_RF_DISABLED);
}

void loop(){}

So the first time it works nice I can see everything in the serial consoled and also the board blue lamp turns on and off. After that it's printing " I'm sleeping " and after 30 seconds the board indicates restart but the console is showing

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

After that nothing happens.

If I restart manually from the RST button it does the same. It works 1 time before it goes to sleep.

So I read a lot and this rst cause:2, boot mode:(3,6) shows that it's getting out of deep sleep. Atleast of what I was able to find but why it's not executing setup() again and continue doing that ?

Can anyone give me a hand? I have 3 boards and all 3 does the same as above ^. Is there any other way to put this board in deep sleep mode for power consuming?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.