• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

dma/03-Aug-2024-1,5891,293

include/03-Aug-2024-9,7823,252

port/03-Aug-2024-21,05815,603

test_apps/03-Aug-2024-6,8965,437

.build-test-rules.ymlD03-Aug-20241,005 3527

CMakeLists.txtD03-Aug-20244.5 KiB148119

KconfigD03-Aug-202413.4 KiB293249

README.mdD03-Aug-20242.7 KiB7861

adc_share_hw_ctrl.cD03-Aug-20246.1 KiB201138

clk_ctrl_os.cD03-Aug-20243.8 KiB131102

cpu.cD03-Aug-202419.8 KiB446317

esp_clk.cD03-Aug-20247.2 KiB224161

esp_dpa_protection.cD03-Aug-20241.1 KiB4027

esp_ds.cD03-Aug-202411.9 KiB440316

esp_etm.cD03-Aug-202411.1 KiB322264

esp_gpio_reserve.cD03-Aug-2024672 3219

esp_hmac.cD03-Aug-20248.2 KiB274184

esp_memory_utils.cD03-Aug-20242.1 KiB7755

hw_random.cD03-Aug-20243.6 KiB9356

intr_alloc.cD03-Aug-202430.5 KiB905701

linker.lfD03-Aug-20242.1 KiB5553

mac_addr.cD03-Aug-202412.2 KiB416349

modem_clock.cD03-Aug-202417.4 KiB428374

mspi_timing_config.hD03-Aug-20245.3 KiB18740

mspi_timing_tuning.cD03-Aug-202423.5 KiB612415

periph_ctrl.cD03-Aug-20242.8 KiB11395

regi2c_ctrl.cD03-Aug-20243 KiB11784

rtc_module.cD03-Aug-20246.3 KiB206164

rtc_wdt.cD03-Aug-20244.3 KiB154128

sar_periph_ctrl_common.cD03-Aug-20244.1 KiB12385

sdkconfig.renameD03-Aug-2024500 96

sdkconfig.rename.esp32D03-Aug-20241.9 KiB3024

sdkconfig.rename.esp32c3D03-Aug-2024633 108

sdkconfig.rename.esp32s2D03-Aug-2024705 129

sdkconfig.rename.esp32s3D03-Aug-2024805 1410

sleep_clock.cD03-Aug-20243.8 KiB10482

sleep_cpu.cD03-Aug-202430.9 KiB793694

sleep_cpu_asm.SD03-Aug-20247.6 KiB241164

sleep_gpio.cD03-Aug-20247.3 KiB203154

sleep_modem.cD03-Aug-202416 KiB402330

sleep_modes.cD03-Aug-202463.7 KiB1,8421,388

sleep_retention.cD03-Aug-202425.2 KiB558448

sleep_system_peripheral.cD03-Aug-202418.2 KiB261208

sleep_wake_stub.cD03-Aug-20243.1 KiB12191

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