universalisos/hal/espressif/components/esp_hal_wdt
Fábio Coutada 98ed638f3c WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules
All uncommitted work from ESP32 GDB stub development session.
Includes:
- GDB stub (uos_gdbstub.c/.h/_entry.S)
- Startup vector table rewrite
- ESP32 HAL integration files
- Boot chain design docs
- AGENTS.md absolute rules (commit before refactor, no unauthorized changes)
- All prior deepseek session work

This commit prevents further data loss. No claims of correctness.
2026-07-17 01:36:58 +01:00
..
esp32 WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules 2026-07-17 01:36:58 +01:00
esp32s3 WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules 2026-07-17 01:36:58 +01:00
include/hal WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules 2026-07-17 01:36:58 +01:00
CMakeLists.txt WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules 2026-07-17 01:36:58 +01:00
Kconfig.hal_wdt WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules 2026-07-17 01:36:58 +01:00
linker.lf WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules 2026-07-17 01:36:58 +01:00
README.md WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules 2026-07-17 01:36:58 +01:00
rom_patch.c WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules 2026-07-17 01:36:58 +01:00
wdt_hal_iram.c WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules 2026-07-17 01:36:58 +01:00
xt_wdt_hal.c WIP: emergency commit — ESP32 GDB stub, boot chain work, docs, AGENTS.md rules 2026-07-17 01:36:58 +01:00

ESP Hardware Abstraction Layer for Watch Dog Peripheral(s)

Note

This component is currently in beta. Its API, behavior, and compatibility may change at any time and without notice; backward compatibility is not guaranteed. Use caution when integrating into production systems.

Overview

The ESP Hardware Abstraction Layer for Watch Dog Peripherals (esp_hal_wdt) provides a unified interface to interact with various watchdog timer (WDT) peripherals across all ESP chip families. This component abstracts the hardware-specific details of different watchdog implementations, enabling consistent usage patterns regardless of the underlying hardware.

The component supports multiple types of watchdog timers:

  • RTC Watchdog Timer (RWDT)
  • Main System Watchdog Timer (MWDT) of Timer Group(s)
  • XTAL32K Watchdog Timer (where supported)

Architecture

The HAL architecture consists of two primary layers:

  1. HAL Layer (Upper): Defines the operational sequences and data structures required to interact with watch dog peripherals, including:

    • Initialization and de-initialization functions
    • Timer configuration and stage management
    • Feeding (resetting) the watchdog timer
    • Interrupt handling
    • Enable/disable functionality
  2. Low-Level Layer (Bottom): Acts as a translation layer between the HAL and the register definitions in the soc component, handling:

    • Register access abstractions
    • Chip-specific register configurations
    • Hardware feature compatibility
    • Clock and prescaler settings

Features

  • Unified watch dog interface across all ESP chip families
  • Support for multiple watchdog stages with configurable timeout actions
  • Flexible reset signal configuration (length and type)
  • Interrupt management
  • Platform-specific optimizations
  • IRAM-safe implementation for critical sections
  • Chip-specific implementations contained in separate directories

Usage

This component is primarily used by ESP-IDF system services such as interrupt watchdog and task watchdog.

For advanced developers implementing custom watch dog solutions, the HAL functions can be used directly. However, please note that the interfaces provided by this component are internal to ESP-IDF and are subject to change.

Dependencies

  • soc: Provides chip-specific register definitions
  • hal: Core hardware abstraction utilities and macros
  • esp_hal_timg: Timer group HAL for shared resources with the general purpose timer in the same group