Reviewing earlier threads, it seemed that esp_restart() also now resets the hardware, but if I go to light sleep with pad holds and then restart, peripherals using these pins (eg LED and CAN bus) are not able to work. Unless I gpio_hold_dis() before esp_restart(). Or of course if I power cycle.
I don't mind doing this, but the esp_restart() is a lazy way to ensure everything is properly reset and cleared out, and it makes me wonder if there are other things I need to do to before esp_restart() to have a restart like a power cycle.
esp-idf 3.3 beta 2
gpio_hold_en persists over esp_restart()
Re: gpio_hold_en persists over esp_restart()
esp_restart intentionally doesn't touch many bits of hardware. In applications such as light bulbs, even if the program crashes it is still expected that the light should not flicker. GPIOs are also not reconfigured.
esp_restart only resets peripherals which may be doing DMA into RAM, to ensure that DMA process doesn't keep writing to memory after the CPU is reset. Then it resets the CPU.
The closest to a power-on reset is an RTC watchdog reset. Like power-on reset, RTC watchdog resets all the digital and RTC peripherals.
esp_restart only resets peripherals which may be doing DMA into RAM, to ensure that DMA process doesn't keep writing to memory after the CPU is reset. Then it resets the CPU.
The closest to a power-on reset is an RTC watchdog reset. Like power-on reset, RTC watchdog resets all the digital and RTC peripherals.
Who is online
Users browsing this forum: Bing [Bot] and 146 guests