I have a project where I put an ESP32 to deep sleep for a certain amount of time, eg: 1h
To be able to self-awaken a cable must be connected from GPIO 16 to the reset pin, so basically the ESP pulls down pin 16 and causes itself to reset.
I also need the possibility to manually waken up the ESP, so in parallel to this cable I connect a button to GND, so I can manually reset the ESP and waken it up.
However I need to be able to tell if the ESP has awaken itself because one hour has passed or if it has been manually awaken.
I cannot connect the ESP to a internet time provider to check the time, so my first though wasto connect the button also to an input and read it when the ESP starts.
However the ESP won't start until the button forcing RST low is released and then it's too late to read it and see if it was pressed.
Is there a way that I can tell if the ESP was manually reset or if it woke up by itself?