machine.reset() does nothing? #12856
Replies: 4 comments 1 reply
-
This is to be expected. |
Beta Was this translation helpful? Give feedback.
-
The board does not reset, and neither do any of the peripherals (text stays on the LCD, RGB led keeps its color, ...). I'm using https://micropython.org/resources/firmware/ESP32_GENERIC-OTA-20231005-v1.21.0.bin How does the kernel handle a reset? Does the ESP32 hardware itself even have any feature which actually can reset itself ? |
Beta Was this translation helpful? Give feedback.
-
The devices I have here restart if I call machine.reset(). The code for machine.reset() calls esp_restart(). If you connect to the board by USB using a simple terminal program, and call:
then you should set the usual boot sequence. Any attached peripheral is not affected by this as long as power stays active, unless reset by your code. |
Beta Was this translation helpful? Give feedback.
-
You can test what reset was done on the board recently: >>> import machine
>>> machine.reset_cause()
2 The numbers returned by >>> machine.PWRON_RESET
1
>>> machine.HARD_RESET
2
>>> machine.WDT_RESET
3
>>> machine.DEEPSLEEP_RESET
4
>>> machine.SOFT_RESET
5
>>> CTRL+D
MPY: soft reboot
MicroPython v1.22.0-preview.63.g2fda94c28.dirty on 2023-11-02; ESP32 KAKI5 with ESP32
>>> import machine
>>> machine.reset_cause()
5 |
Beta Was this translation helpful? Give feedback.
-
My web REPL simply disconnects when I machine.reset() (using latest firmware on ESP-WROOM32)
How does the kernel handle a reset? Does the ESP32 hardware itself even have any feature which actually can reset itself ?
Beta Was this translation helpful? Give feedback.
All reactions