Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Vincent Lê
#30862 Whaoo, thank you very much.

In the same time, I had rephrased my situation @stackexchange: http://electronics.stackexchange.com/qu ... ally-reset

Just one thing: do you have in mind that RST pin should be triggered DOWN? In your circuits, it is linked to Vcc when button is pushed.

I will try your solutions as soon as possible and keep you posted!!
User avatar
By Vincent Lê
#30866 Heeee haaaa!!!! Solved it! (ager 2 full days going crazy)

And the correct answer is the image attached.

I was working in the wrong direction, and your solution with a dual pole switch made me go in the right direction.

I don't need any RC circuit. i was lacking some good sense and also gpio behavior.

With my schema, I need to ALWAYS set the GPIO4 to HIGH before the init. Then if GPIO4 is HIGH at startup, it is a natural wake up. And if it is LOW, it is a user triggered wake up.

I am so happy!
You do not have the required permissions to view the files attached to this post.
User avatar
By jankop
#30888 It is unnecessarily complicated. Just manually perform a power cycle or use the diagram in Fig.
Function node.bootreason() for power on reset has code 1 and for reset has code 2. It is all.
You do not have the required permissions to view the files attached to this post.
User avatar
By Vincent Lê
#30930 This is a very elegant way of doing it, I love it. I didn't know this function since it is not in the API doc (https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en)!

But it is here in the master branch, so I am going to use it. (just a bit frustrated having 2 days spent on this problem, but hey, what did I expect)

One last question: why do you put a resistor between CHIP_PD and VCC ? For the deepsleep function I linked GPIO16 and RST, do I have to also add a resistor?