← index #4856Issue #4365
Off-topic · high · value 2.086
QUERY · ISSUE

Memory space that remains unaffected on reset on ESP32

openby hetvishah08opened 2019-06-18updated 2020-08-02
port-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.

CANDIDATE · ISSUE

sys.exit for esp32?

closedby gengshenghongopened 2018-12-18updated 2018-12-21

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

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied