Page 1 of 1

reset_cause problem

Posted: Thu Feb 10, 2022 7:59 am
by KJM
If I load

Code: Select all

import machine, time
print('pwrup cause', machine.reset_cause())
time.sleep(2)
machine.deepsleep(2 * 1000)
onto an ESP32 it runs & correctly identifies the pwrup cause as a wakeup

Code: Select all

pwrup cause 4
pwrup cause 4
But if I run it from the repl it gives a different answers depending on the IDE (4 for Atom, 5 for Thonny). Any thoughts on why that might be?