You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# ESP Hardware Abstraction Layer for Timer Groups (`esp_hal_timg`)
2
+
3
+
⚠️ **Notice**: This HAL component is under active development. API stability and backward-compatibility between versions are not guaranteed at this time.
4
+
5
+
## Overview
6
+
7
+
The `esp_hal_timg` component provides a **Hardware Abstraction Layer** for the General Purpose Timer peripherals across all ESP-IDF supported targets. It serves as a foundation for the higher-level timer drivers, offering a consistent interface to interact with timer hardware while hiding the complexities of chip-specific implementations.
8
+
9
+
## Architecture
10
+
11
+
The HAL architecture consists of two primary layers:
12
+
13
+
1.**HAL Layer (Upper)**: Defines the operational sequences and data structures required to interact with timer peripherals, including:
14
+
- Initialization and deinitialization
15
+
- Timer control operations (start, stop, reload)
16
+
- Alarm and event handling
17
+
- Counter operations
18
+
19
+
2.**Low-Level Layer (Bottom)**: Acts as a translation layer between the HAL and the register definitions in the `soc` component, handling:
20
+
- Register access abstractions
21
+
- Chip-specific register configurations
22
+
- Hardware feature compatibility
23
+
24
+
## Features
25
+
26
+
- Unified timer interface across all ESP chip families
27
+
- Support for different timer counting modes (up/down)
28
+
- Alarm functionality with configurable triggers
29
+
- Auto-reload capability
30
+
- ETM (Event Task Matrix) integration on supported chips
31
+
- Multiple clock source options
32
+
33
+
## Usage
34
+
35
+
This component is primarily used by ESP-IDF peripheral drivers such as `esp_driver_gptimer`. It is also utilized by system components like `esp_timer`.
36
+
37
+
For advanced developers implementing custom timer 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.
0 commit comments