|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| dma/ | | 03-Aug-2024 | - | 1,589 | 1,293 |
| include/ | | 03-Aug-2024 | - | 9,782 | 3,252 |
| port/ | | 03-Aug-2024 | - | 21,058 | 15,603 |
| test_apps/ | | 03-Aug-2024 | - | 6,896 | 5,437 |
| .build-test-rules.yml | D | 03-Aug-2024 | 1,005 | 35 | 27 |
| CMakeLists.txt | D | 03-Aug-2024 | 4.5 KiB | 148 | 119 |
| Kconfig | D | 03-Aug-2024 | 13.4 KiB | 293 | 249 |
| README.md | D | 03-Aug-2024 | 2.7 KiB | 78 | 61 |
| adc_share_hw_ctrl.c | D | 03-Aug-2024 | 6.1 KiB | 201 | 138 |
| clk_ctrl_os.c | D | 03-Aug-2024 | 3.8 KiB | 131 | 102 |
| cpu.c | D | 03-Aug-2024 | 19.8 KiB | 446 | 317 |
| esp_clk.c | D | 03-Aug-2024 | 7.2 KiB | 224 | 161 |
| esp_dpa_protection.c | D | 03-Aug-2024 | 1.1 KiB | 40 | 27 |
| esp_ds.c | D | 03-Aug-2024 | 11.9 KiB | 440 | 316 |
| esp_etm.c | D | 03-Aug-2024 | 11.1 KiB | 322 | 264 |
| esp_gpio_reserve.c | D | 03-Aug-2024 | 672 | 32 | 19 |
| esp_hmac.c | D | 03-Aug-2024 | 8.2 KiB | 274 | 184 |
| esp_memory_utils.c | D | 03-Aug-2024 | 2.1 KiB | 77 | 55 |
| hw_random.c | D | 03-Aug-2024 | 3.6 KiB | 93 | 56 |
| intr_alloc.c | D | 03-Aug-2024 | 30.5 KiB | 905 | 701 |
| linker.lf | D | 03-Aug-2024 | 2.1 KiB | 55 | 53 |
| mac_addr.c | D | 03-Aug-2024 | 12.2 KiB | 416 | 349 |
| modem_clock.c | D | 03-Aug-2024 | 17.4 KiB | 428 | 374 |
| mspi_timing_config.h | D | 03-Aug-2024 | 5.3 KiB | 187 | 40 |
| mspi_timing_tuning.c | D | 03-Aug-2024 | 23.5 KiB | 612 | 415 |
| periph_ctrl.c | D | 03-Aug-2024 | 2.8 KiB | 113 | 95 |
| regi2c_ctrl.c | D | 03-Aug-2024 | 3 KiB | 117 | 84 |
| rtc_module.c | D | 03-Aug-2024 | 6.3 KiB | 206 | 164 |
| rtc_wdt.c | D | 03-Aug-2024 | 4.3 KiB | 154 | 128 |
| sar_periph_ctrl_common.c | D | 03-Aug-2024 | 4.1 KiB | 123 | 85 |
| sdkconfig.rename | D | 03-Aug-2024 | 500 | 9 | 6 |
| sdkconfig.rename.esp32 | D | 03-Aug-2024 | 1.9 KiB | 30 | 24 |
| sdkconfig.rename.esp32c3 | D | 03-Aug-2024 | 633 | 10 | 8 |
| sdkconfig.rename.esp32s2 | D | 03-Aug-2024 | 705 | 12 | 9 |
| sdkconfig.rename.esp32s3 | D | 03-Aug-2024 | 805 | 14 | 10 |
| sleep_clock.c | D | 03-Aug-2024 | 3.8 KiB | 104 | 82 |
| sleep_cpu.c | D | 03-Aug-2024 | 30.9 KiB | 793 | 694 |
| sleep_cpu_asm.S | D | 03-Aug-2024 | 7.6 KiB | 241 | 164 |
| sleep_gpio.c | D | 03-Aug-2024 | 7.3 KiB | 203 | 154 |
| sleep_modem.c | D | 03-Aug-2024 | 16 KiB | 402 | 330 |
| sleep_modes.c | D | 03-Aug-2024 | 63.7 KiB | 1,842 | 1,388 |
| sleep_retention.c | D | 03-Aug-2024 | 25.2 KiB | 558 | 448 |
| sleep_system_peripheral.c | D | 03-Aug-2024 | 18.2 KiB | 261 | 208 |
| sleep_wake_stub.c | D | 03-Aug-2024 | 3.1 KiB | 121 | 91 |
README.md
1# `esp_hw_support` (G1 component)
2
3This component contains hardware-related operations for supporting the system. These operations are one level above that of `hal` in that:
4
51. it uses system services such as memory allocation, logging, scheduling
62. it may be multi-step operations involving/affecting multiple parts of the SoC
73. it offers a service for other components vary from multiple layers (G1, G2 and G3) of ESP-IDF
8
9Implementations that don't fit other components cleanly, but are not worth creating a new component for (yet) may also be placed here as long as they don't pull dependencies other than the core system components.
10
11## Event-Task Service (esp_etm)
12
13### esp_etm driver design
14
15`esp_etm` driver is divided into two parts:
16
17* The **core** driver, which focuses on ETM channel allocation and offers APIs to connect the channel with ETM tasks and ETM events that come from other peripherals.
18* **Peripheral** side extensions, e.g. GPTimer support generating different kinds of ETM events, and accept multiple ETM tasks. These extensions are implemented in the peripheral driver, and can be located in different components. Usually, the task and event extensions will simply inherit the interface that defined in the core driver.
19
20See the following class diagram, we take the GPIO and GPTimer as the example to illustrate the architecture of `esp_etm` driver.
21
22```mermaid
23classDiagram
24 esp_etm_channel_t "1" --> "1" esp_etm_event_t : Has
25 esp_etm_channel_t "1" --> "1" esp_etm_task_t : Has
26 class esp_etm_channel_t {
27 -int chan_id
28 -esp_etm_event_t event
29 -esp_etm_task_t task
30 +enable() esp_err_t
31 +disable() esp_err_t
32 +connect(event, task) esp_err_t
33 +dump() esp_err_t
34 }
35
36 class esp_etm_event_t {
37 <<interface>>
38 #int event_id
39 #etm_trigger_peripheral_t trig_periph
40 #del() esp_err_t
41 }
42
43 class esp_etm_task_t {
44 <<interface>>
45 #int task_id
46 #etm_trigger_peripheral_t trig_periph
47 #del() esp_err_t
48 }
49
50 gpio_etm_event_t --|> esp_etm_event_t : Inheritance
51 class gpio_etm_event_t {
52 -int chan_id
53 +bind_gpio(gpio_num_t gpio) esp_err_t
54 }
55
56 gpio_etm_task_t --|> esp_etm_task_t : Inheritance
57 class gpio_etm_task_t {
58 -int chan_id
59 +add_gpio(gpio_num) esp_err_t
60 +rm_gpio(gpio_num) esp_err_t
61 }
62
63 gptimer_t "1" --> "1..*" gptimer_etm_event_t : Has
64 gptimer_t "1" --> "1..*" gptimer_etm_task_t : Has
65 class gptimer_t {
66 -gptimer_etm_event_t[] events
67 -gptimer_etm_task_t[] tasks
68 }
69
70 gptimer_etm_event_t --|> esp_etm_event_t : Inheritance
71 class gptimer_etm_event_t {
72 }
73
74 gptimer_etm_task_t --|> esp_etm_task_t : Inheritance
75 class gptimer_etm_task_t {
76 }
77```
78