rst:0x10 (RTCWDT_RTC_RESET) and the other ESP32 reset codes

The ROM bootloader prints this line at every start, before any of your code runs. rst: is why the chip was reset and boot: is the boot mode it read from the strapping pins.

The line

ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)

The first lines of an ESP32 boot. The same line with rst:0x1 (POWERON_RESET) is a normal power-up.

What it means

The number after rst: is the reset reason the ROM read from the chip, in hexadecimal, and the name in the parentheses is the ROM’s label for it. One line by itself is not an error: every boot has one. It becomes evidence when the code is not the one you expect, or when the line keeps coming back without you resetting the board.

The codes are not the same on every chip. The two tables below are taken from the ROM headers that ESP-IDF v5.4 ships for the ESP32 and the ESP32-S3; for another chip, open the same header under that chip’s folder. Inside your application, esp_reset_reason() gives a coarser but chip-independent answer that also tells a panic from a plain software restart.

ESP32 reset codes

Applies to: ESP32 (not S2, S3 or the C series), ESP-IDF v5.4 esp32/rom/rtc.h.

rst:NameROM header commentIn practice
0x1POWERON_RESETVbat power on resetPower was applied or the EN pin was pulsed. Normal after plugging in, pressing EN, or flashing.
0x3SW_RESETSoftware reset digital coreA software reset of the whole digital core.
0x4OWDT_RESETLegacy watch dog reset digital coreThe legacy watchdog expired.
0x5DEEPSLEEP_RESETDeep Sleep reset digital coreThe chip woke from deep sleep. Expected if the firmware sleeps.
0x6SDIO_RESETReset by SLC module, reset digital coreA reset through the SDIO slave interface.
0x7TG0WDT_SYS_RESETTimer Group0 Watch dog reset digital coreA watchdog in timer group 0 expired; ESP-IDF builds its task watchdog on that timer.
0x8TG1WDT_SYS_RESETTimer Group1 Watch dog reset digital coreA watchdog in timer group 1 expired; ESP-IDF’s interrupt watchdog uses it, and its second stage resets the chip when the panic handler cannot run.
0x9RTCWDT_SYS_RESETRTC Watch dog Reset digital coreThe RTC watchdog expired.
0xaINTRUSION_RESETInstrusion tested to reset CPURare; listed for completeness.
0xbTGWDT_CPU_RESETTime Group reset CPUA timer group watchdog reset one CPU.
0xcSW_CPU_RESETSoftware reset CPUesp_restart(), or the panic handler restarting after a Guru Meditation Error or abort(). Read the lines above it.
0xdRTCWDT_CPU_RESETRTC Watch dog Reset CPUThe RTC watchdog reset one CPU.
0xeEXT_CPU_RESETfor APP_CPU, reset by PRO_CPUThe second core being started by the first. Normal during boot.
0xfRTCWDT_BROWN_OUT_RESETReset when the vdd voltage is not stableThe brownout detector fired: the supply dipped below its threshold.
0x10RTCWDT_RTC_RESETRTC Watch dog reset digital core and rtc moduleThe RTC watchdog that guards start-up expired, or the supply was unstable while starting.

Source: ESP-IDF v5.4: components/esp_rom/esp32/include/esp32/rom/rtc.h (RESET_REASON)

ESP32-S3 reset codes

Applies to: ESP32-S3, ESP-IDF v5.4 esp32s3/rom/rtc.h. The S3 ROM prints shortened names for some codes (for example rst:0x1 (POWERON) and rst:0xc (RTC_SW_CPU_RST)), so match on the number.

rst:Name in the headerROM header commentIn practice
0x1POWERON_RESETVbat power on resetPower was applied or the chip enable pin was pulsed.
0x3RTC_SW_SYS_RESETSoftware reset digital coreA software reset of the whole digital core.
0x5DEEPSLEEP_RESETDeep Sleep reset digital coreThe chip woke from deep sleep.
0x7TG0WDT_SYS_RESETTimer Group0 Watch dog reset digital coreA watchdog in timer group 0 expired.
0x8TG1WDT_SYS_RESETTimer Group1 Watch dog reset digital coreA watchdog in timer group 1 expired.
0x9RTCWDT_SYS_RESETRTC Watch dog Reset digital coreThe RTC watchdog expired.
0xaINTRUSION_RESETInstrusion tested to reset CPURare; listed for completeness.
0xbTG0WDT_CPU_RESETTime Group0 reset CPUThe timer group 0 watchdog reset the CPU.
0xcRTC_SW_CPU_RESETSoftware reset CPUesp_restart(), or the panic handler restarting after a crash. Read the lines above it.
0xdRTCWDT_CPU_RESETRTC Watch dog Reset CPUThe RTC watchdog reset the CPU.
0xfRTCWDT_BROWN_OUT_RESETReset when the vdd voltage is not stableThe brownout detector fired.
0x10RTCWDT_RTC_RESETRTC Watch dog reset digital core and rtc moduleThe RTC watchdog that guards start-up expired.
0x11TG1WDT_CPU_RESETTime Group1 reset CPUThe timer group 1 watchdog reset the CPU.
0x12SUPER_WDT_RESETsuper watchdog reset digital core and rtc moduleThe super watchdog expired.
0x13GLITCH_RTC_RESETglitch reset digital core and rtc moduleA clock glitch was detected.
0x14EFUSE_RESETefuse reset digital coreAn eFuse check failed.
0x15USB_UART_CHIP_RESETusb uart reset digital coreA reset requested through the built-in USB serial port, as flashing tools do.
0x16USB_JTAG_CHIP_RESETusb jtag reset digital coreA reset requested through the built-in USB JTAG.
0x17POWER_GLITCH_RESETpower glitch reset digital core and rtc moduleA glitch on the supply was detected.

Source: ESP-IDF v5.4: components/esp_rom/esp32s3/include/esp32s3/rom/rtc.h (RESET_REASON)

Common causes

A restart after a crash or esp_restart(): code 0xc

The panic handler’s default action is to print the registers and the backtrace and then restart the chip, and esp_restart() restarts it on request. Both arrive as a software CPU reset. When 0xc repeats, the reason is in the lines printed before the rst: line: a Guru Meditation Error, an abort() or an assertion.

Sources: ESP-IDF v5.4 Programming Guide: Fatal Errors, Panic Handler · ESP-IDF v5.4 API reference: esp_reset_reason() and esp_restart()

The start-up watchdog: code 0x10 on every boot

The RTC watchdog times the path from the ROM bootloader to app_main(). It is enabled by default, the second-stage bootloader sets it to CONFIG_BOOTLOADER_WDT_TIME_MS (9000 ms by default), and it is switched off just before app_main(). If start-up takes longer than that, or the power source is unstable, it restarts the system and the next boot shows rst:0x10 (RTCWDT_RTC_RESET).

Source: ESP-IDF v5.4 Programming Guide: Fatal Errors, RTC Watchdog Timeout

An interrupt or task watchdog that had to reset the chip: codes 0x7 and 0x8

ESP-IDF’s interrupt watchdog runs on the timer group 1 watchdog and its task watchdog on timer group 0. Normally a timeout goes through the panic handler and ends as code 0xc. A timer group code means the hardware stage fired: the interrupt watchdog’s second stage resets the chip when the panic handler was unable to run.

Source: ESP-IDF v5.4 Programming Guide: Watchdogs

The supply dipped: code 0xf

The built-in brownout detector is on by default and resets the chip when the supply voltage falls below a safe level. It prints Brownout detector was triggered first, but when the voltage drops quickly only part of that message may reach the console, so the rst: line may be all that is left to read.

Source: ESP-IDF v5.4 Programming Guide: Fatal Errors, Brownout

The serial adapter reset the board: code 0x1 when the port opens

Development boards connect the adapter’s DTR and RTS lines to EN and GPIO0 so that esptool can reset the chip into the bootloader. A serial program that drives those lines when it opens the port resets the board as well, and if GPIO0 is low at that moment the boot: field shows a download mode and the chip waits for a download instead of starting your application.

Source: esptool documentation: Boot Mode Selection (automatic bootloader, DTR and RTS)

What to check first

  1. Read the number, not only the name, and look it up in the table for your chip. The same number can mean something else on another chip family.
  2. Read what was printed before the rst: line. A crash dump above code 0xc is the cause; nothing at all above a watchdog or brownout code means the chip was reset from outside your code.
  3. Read the boot: field. SPI_FAST_FLASH_BOOT is a normal start from flash; a DOWNLOAD_BOOT value followed by waiting for download means the boot strapping pin was low at reset.
  4. For code 0xf, or a 0x1 that repeats when nobody touches the board, check the 3.3 V rail under load, the USB cable and the regulator before you look at the firmware.
  5. For code 0x10 on every boot, find out how far start-up gets: bootloader log lines that stop at the same place each time point at the step that hangs or takes longer than the watchdog allows.
  6. Log esp_reset_reason() at the top of app_main(). It separates a panic, an interrupt watchdog, a task watchdog, a brownout and a deep sleep wake, which the ROM line does not always do.

In NeuroTerm

On a serial tab with pattern markers on, NeuroTerm recognises this line as “Board reset: ESP reset”. A coding agent connected through Terminal Use gets that name in its list of tabs and among the markers of the output it reads, with a cursor for reading the lines around it. Setup is in Terminal Use (MCP).