Memory space that remains unaffected on reset on ESP32
Is there any way to store some variables which doesn't get affected on Reset?
I saw this memory partition named as NVS in Arduino ESP32 and ESP-IDF. This might work for me but I guess it hasn't been implemented on Micropython yet.
Any other way to store variables that remain unchanged on reset?
I want to store password credentials after acquiring once into memory space that is unaffected by reset.
sys.exit for esp32?
what is the behaviour of sys.exit for esp32 now? Is there a way to "reset" micropython task without resetting whole esp32. I want a way to exit micropython without reset esp32. I think sys.exit is the correct answer, but it seems not work on esp32 (nothing happened?). Any reason sys.exit does not cause "soft reset" on esp32?
It seems ‘ctrl+d' in repl mode will do "soft reset" which is what I want. But how to do that using python code? I want to upload a script to esp32 (which may be written by user, not me, it may have some loops or threads for example) and want to reset micropython to re-run user script (again, as I do not know what has been written, I cannot "exit"/"kill" the previous one). But I do not want to reset whole esp32 as I'll add code to run some other tasks together with "mp_task", which should not be restarted.
Please share your ideas if this can be done on esp32.
Thanks,
Shenghong