mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
f6aadd1e39
- to acknowledge the unused DCACHE added to DRAM for ESP32-S3 - For ESP32-S3, when the DCACHE size is set to 16 kB, the unused 48 kB is added to the heap in 2 blocks of 32 kB (from 0x3FCF0000) and 16 kB (from 0x3C000000). - But, if we try allocating memory from the 16 kB block and run an `esp_ptr_internal` check on that memory pointer, it fails as the address block from 0x3C000000 corresponds to the external memory symbols SOC_DROM_LOW and SOC_EXTRAM_DATA_LOW. (E.g. freertos - If the IDLE task stack buffer gets allocated from this region, the firmware will abort due to this failure). - Thus, the checks `esp_ptr_internal`, `esp_ptr_in_drom` and `esp_ptr_byte_accessible` have been updated to acknowledge this memory as a part of the DRAM. Co-authored-by: Mahavir Jain <mahavir@espressif.com> |
||
---|---|---|
.. | ||
dma | ||
include | ||
port | ||
test_apps | ||
.build-test-rules.yml | ||
adc_share_hw_ctrl.c | ||
clk_ctrl_os.c | ||
CMakeLists.txt | ||
cpu.c | ||
esp_clk.c | ||
esp_ds.c | ||
esp_etm.c | ||
esp_gpio_reserve.c | ||
esp_hmac.c | ||
esp_memory_utils.c | ||
hw_random.c | ||
intr_alloc.c | ||
Kconfig | ||
linker.lf | ||
mac_addr.c | ||
modem_clock.c | ||
mspi_timing_config.h | ||
mspi_timing_tuning.c | ||
periph_ctrl.c | ||
README.md | ||
regi2c_ctrl.c | ||
rtc_module.c | ||
rtc_wdt.c | ||
sdkconfig.rename | ||
sdkconfig.rename.esp32 | ||
sdkconfig.rename.esp32c3 | ||
sdkconfig.rename.esp32s2 | ||
sdkconfig.rename.esp32s3 | ||
sleep_clock.c | ||
sleep_cpu_asm.S | ||
sleep_cpu.c | ||
sleep_gpio.c | ||
sleep_modem.c | ||
sleep_modes.c | ||
sleep_retention.c | ||
sleep_system_peripheral.c | ||
sleep_wake_stub.c |
esp_hw_support
(G1 component)
This component contains hardware-related operations for supporting the system. These operations are one level above that of hal
in that:
- it uses system services such as memory allocation, logging, scheduling
- it may be multi-step operations involving/affecting multiple parts of the SoC
- it offers a service for other components vary from multiple layers (G1, G2 and G3) of ESP-IDF
Implementations 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.
Event-Task Service (esp_etm)
esp_etm driver design
esp_etm
driver is divided into two parts:
- 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.
- 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.
See the following class diagram, we take the GPIO and GPTimer as the example to illustrate the architecture of esp_etm
driver.
classDiagram
esp_etm_channel_t "1" --> "1" esp_etm_event_t : Has
esp_etm_channel_t "1" --> "1" esp_etm_task_t : Has
class esp_etm_channel_t {
-int chan_id
-esp_etm_event_t event
-esp_etm_task_t task
+enable() esp_err_t
+disable() esp_err_t
+connect(event, task) esp_err_t
+dump() esp_err_t
}
class esp_etm_event_t {
<<interface>>
#int event_id
#etm_trigger_peripheral_t trig_periph
#del() esp_err_t
}
class esp_etm_task_t {
<<interface>>
#int task_id
#etm_trigger_peripheral_t trig_periph
#del() esp_err_t
}
gpio_etm_event_t --|> esp_etm_event_t : Inheritance
class gpio_etm_event_t {
-int chan_id
+bind_gpio(gpio_num_t gpio) esp_err_t
}
gpio_etm_task_t --|> esp_etm_task_t : Inheritance
class gpio_etm_task_t {
-int chan_id
+add_gpio(gpio_num) esp_err_t
+rm_gpio(gpio_num) esp_err_t
}
gptimer_t "1" --> "1..*" gptimer_etm_event_t : Has
gptimer_t "1" --> "1..*" gptimer_etm_task_t : Has
class gptimer_t {
-gptimer_etm_event_t[] events
-gptimer_etm_task_t[] tasks
}
gptimer_etm_event_t --|> esp_etm_event_t : Inheritance
class gptimer_etm_event_t {
}
gptimer_etm_task_t --|> esp_etm_task_t : Inheritance
class gptimer_etm_task_t {
}