reset_cause problem

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
KJM
Posts: 158
Joined: Sun Nov 18, 2018 10:53 pm
Location: Sydney AU

reset_cause problem

Post by KJM » Thu Feb 10, 2022 7:59 am

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?

Post Reply