Replies: 3 comments 2 replies
-
There is no way that machine.reset() returns. Even if the internal call to reboot returns, it runs an endless loop with no output. In the other code you have two places which print dots. And the log shows that the device still responds to Keyboard interrupts. So it is in a kind of active waiting state. The fact the the keyboard interrupt stops at line 83 does not tell more than the code is still executing the |
Beta Was this translation helpful? Give feedback.
-
i don't use threading, at least not directly.
Wifi connect is not instant, so i added dots to see it's not frozen. Good question .. dots were slow. So it was code as seen in stacktrace .. but i don't understand how it get there 2nd time, as in console output we already saw log entry which is printed near the end of do_connect_wifi_as_client method. And i tripple checked... that method is called only using callstack as seen in stacktrace. Actually if it would be called another time, we would see in output another message produced by But we can see also message produced by Hence i'm confused. And it all happend just once. Hundred+ times it rebooted as expected. Background: On ESP8266 i used RTC to hold information, what to do "next". With RPI PICO i faked RTC memory with file ... it basically works, difference is, that on power outage it doens't start with "empty" memory, because file contains last info. |
Beta Was this translation helpful? Give feedback.
-
btw, how is sleep implemented? I was somehow expecting my code will not trigger during sleep, but in fact callback behind timer is executed even if main thread is in sleep method (situation from other project). Thinking if there might be something like kind of callback used internally by sleep method ... which got somehow triggered during reboot... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have weird situation, which normally works, but once it failed. And stacktrace and logs don't fit together... like if during sleep something happened...
(After manual trigger of machine.reboot() it reboots and how works normally - means it reboots automatically).
steps i found important from whole project with this issue:
issue:
this time it didn't reboot, is just writing dots (which i write on 2 places in code) and after ctrl+c in stacktrace it looks like i'm still in wifi connect routine on time.sleep(1) call, but that one was finished already according to log entry which is in code 3 lines below that sleep....
it's all pretty confusing me...
code fragments:
wifi code:
piece of bootstrap code:
log output:
Beta Was this translation helpful? Give feedback.
All reactions