memory allocation error from time to time after machine.reset()
Hello,
I'm using ESP32 with MicroPython v1.9.4-684-g51482ba92 without PSRAM
I got lot of stuff some _threads, while writing and changing I often restart the board, using machine.reset()
from time to time i got memory allocation error when my scripts start to load. So question is why, board reboot if some of them are too big it should fail every time. Not from time to time. Is there something that I'm missing?
esp32: Some processes lock at timer single shot executed after machine.reset()
Hello, it is kind a complicated to explain how this bug works, but I will try :)
i'm using micropython 1.9.4 on esp32 (lolin32 lite)
in my startup script I got script that initialize wireless connection and shot single timer to show connection status after 10 seconds:
def ws(timer):
if station.isconnected() == False:
print ("Wifi still not connected")
else:
print(station.ifconfig())
timer.deinit()
exec(open('/alarmprocessor.py').read(),globals())
timer.init(period=10000, mode=machine.Timer.ONE_SHOT, callback=ws)
after that I got few scripts that go into different threads and main is in a loop and display some data in console.
So far so good, all work, but when I interrupt main script with CTRL-C and execute machine.reset()
then start my startup script again it loads, main script start but in the moment when timer should display his message about wireless connection, main script hands and some of _thread scrips also stop working.
If I restart device using reset button it is ok and my start scripts load normally (just first time)
Now I was removed that timer.single.shot and all works fine after machine.reset()
Hope managed to explain bug that I have found.