Page 1 of 1

What does happen during a soft reset?

Posted: Fri May 15, 2020 6:51 am
by fstengel
The title says it all: what exactly does happen during a soft reset? Looking through the documentation, I only found an explicit reference in the WiPy section:
A soft reset simply clears the state of the MicroPython virtual machine, but leaves hardware peripherals unaffected.
There are many mentions of hard/soft resets throughout the documentation (like paragraph 3.5 of the tutorial) but hardly ever a explanation of what happens.
To enhance my question:
  • Is the micropython virtual machine simply restarted? What is the process of that restart?
  • Is there some clean-up that happens before that restart? If there is, is there a way to hook into it?
  • Is the hardware state left as is or are there bits and bobs that are somehow reset to more or less startup values?
To put some context in my question, I am currently playing with littlevGL on my M5Stack and I noticed that when I do a soft reset, then I get a message telling me that the display driver is deinitializing:

Code: Select all

Deinitializing ILI9341..
MPY: soft reboot