Commit Graph
363 Commits
Author SHA1 Message Date
liuning 9c9f884f3a bugfix(wifi): fix incomplete phy initialization due to absence of bb clocks at coexistence scenarios 2026-01-09 16:53:20 +08:00
Song Ruo Jing 6eec16cf66 refactor(uart): clean up uart soc_caps 2026-01-04 16:02:57 +08:00
Song Ruo Jing a0c91ea082 refactor(uart): remove soc/uart_channel.h 2026-01-04 16:02:57 +08:00
Song Ruo Jing ce475d901d refactor(uart): split UART HAL into separate component 2026-01-04 16:02:57 +08:00
Song Ruo Jing 6ca90bd14a refactor(ledc): split ledc hal into a separate component 2025-12-25 17:23:27 +08:00
wanckl d12f941787 feat(driver_spi): split spi hal component 2025-12-16 20:38:09 +08:00
morris 11ce7a9011 refactor(soc): remove soc_caps_full.h 2025-12-11 10:29:01 +08:00
laokaiyao 841cb4caa1 feat(hal): graudate the adc/dac hal driver into a new component 2025-12-11 10:27:00 +08:00
Song Ruo Jing 4d3a9b0157 refactor(esp_hal_gpio): move some caps definitions to esp_hal_gpio 2025-12-08 14:33:26 +08:00
Song Ruo Jing 62899cbba6 refactor(gpio): split GPIO HAL into separate component
cleaned up some includes in GPIO peripheral files
2025-12-08 14:33:26 +08:00
morris 69a76c5170 refactor(hal_dma): move bitscrambler from hal component
because bitscrambler can't live without DMA, it's highly binded with the
GDMA peripheral.
2025-11-27 16:06:52 +08:00
Jiang Jiang Jian 34b0344d32 Merge branch 'fix/backport_some_wifi_fixes_v6.0' into 'release/v6.0'
bugfix(wifi): backport some wifi fixes v6.0

See merge request espressif/esp-idf!43455
2025-11-25 10:02:59 +08:00
Jiang Jiang Jian ee4be1af57 Merge branch 'feat/flash_enc_using_key_manager_v6.0' into 'release/v6.0'
Support Flash Encryption using Key Manager (v6.0)

See merge request espressif/esp-idf!43459
2025-11-24 10:35:48 +08:00
harshal.patil 172f904e23 feat(bootloader_support): Support FE XTS-AES-256 using Key Manager for ESP32-C5 2025-11-20 11:37:07 +05:30
Song Ruo Jing c1209fc2ac refactor(gpio): remove some useless macros from io_mux_reg.h 2025-11-19 12:17:52 +08:00
muhaidong cd2187e026 docs(wifi): update wifi fragment doc 2025-11-18 11:48:28 +08:00
Song Ruo Jing e28ff72154 feat(gpio): add IO hold support for Deep-sleep for ESP32-P4 ECO5 2025-11-12 22:28:03 +08:00
morris 2de3be7300 feat(dma): graduate the dma driver into a single component 2025-10-19 22:06:46 +08:00
morris ab149384e1 Merge branch 'refactor/clean_soc_caps_gptimer' into 'master'
refactor(hal): graduate watch dog hal driver into a new component: esp_hal_wdt

Closes IDF-14091

See merge request espressif/esp-idf!42338
2025-10-15 17:18:20 +08:00
morris e8de5b5a95 refactor(gptimer): clean up SOC capabilities for GPTIMER and Timer Group
- Remove GPTIMER and TIMG related definitions from soc_caps_full.h files
- Move timer peripheral definitions to appropriate HAL layer files
- Update references across components to use proper HAL abstractions
- Consolidate timer group and GPTIMER capabilities organization
- Ensure consistent timer configuration across all ESP32 variants

This refactoring improves the separation of concerns between SOC
capabilities and HAL implementations for timer-related functionality.
2025-10-14 11:44:38 +08:00
morris 56c3dc4755 feat(wdt): graduate watch dog hal driver into a new component: esp_hal_wdt 2025-10-14 11:44:32 +08:00
Song Ruo Jing 9056974051 feat(gpio): ESP32P4 ECO5 GPIO related update 2025-10-13 11:48:47 +08:00
Chen Jichang d0e24e4a81 refactor(hw_support): remove unused periph_module_t members 2025-10-09 15:27:20 +08:00
morris 71cb24caab feat(timg): graduate the hal driver into a single component 2025-09-27 17:33:10 +08:00
Song Ruo Jing addfa2aa01 Merge branch 'feature/esp32h21_esp32h4_ledc_support' into 'master'
feat(ledc): Add LEDC support for ESP32H21 and ESP32H4

Closes IDF-12343, IDF-12344, IDF-12920, IDF-11568, IDF-11569, IDF-12115, and IDF-13672

See merge request espressif/esp-idf!41172
2025-09-17 10:55:00 +08:00
Song Ruo Jing 24a9cb7dde refactor(dedic_gpio): clean up dedic gpio soc caps 2025-09-16 11:18:10 +08:00
C.S.M 5ce39e8878 refactor(i2c): Make i2c hal layer independent 2025-09-15 11:26:48 +08:00
Alexey Lapshin ecc37c12d7 feat(build): enable -mtune=esp-base option for RISC-V targets
The `-mtune=esp-base` option is identical to the default tuning profile,
except that `slow_unaligned_access` is set to false.

This reduces the instruction count for built-in `memcpy` and improves
performance, since our chips can handle misaligned access with minimal
penalty (without triggering exceptions).

Example:

  void load(uint32_t *r, char* x) {
    memcpy(r, x, sizeof(uint32_t));
  }
  void store(char* x, uint32_t v) {
    memcpy(x, &v, sizeof(uint32_t));
  }

Previously generated code:

  load:
        lbu     a5,2(a1)
        lbu     a3,0(a1)
        lbu     a4,1(a1)
        sb      a5,2(a0)
        sb      a3,0(a0)
        sb      a4,1(a0)
        lbu     a5,3(a1)
        sb      a5,3(a0)
        ret
  store:
        srli    a3,a1,8
        srli    a4,a1,16
        srli    a5,a1,24
        addi    sp,sp,-16
        sb      a1,0(a0)
        sb      a3,1(a0)
        sb      a4,2(a0)
        sb      a5,3(a0)
        addi    sp,sp,16
        jr      ra

With `-mtune=esp-base`:

  load:
        lw      a5,0(a1)
        sw      a5,0(a0)
        ret
  store:
        sw      a1,0(a0)
        ret

Inlining behavior
=================

Without `-mtune=esp-base`:
  - `memcpy()` is inlined only when the compile-time size is ≤ 12 bytes.
    - Maximum cost: ~25 instructions

With `-mtune=esp-base`:
  - `memcpy()` is inlined for all compile-time constant sizes.
    - Maximum cost: ~14 instructions

As a result, some applications may see reduced code size, while others
may increase slightly. However, performance always improves because
extra `memcpy` calls are eliminated.

Performance results
===================

esp32p4 (Ethernet iperf):
  - No noticeable difference

esp32c61 (Wi-Fi iperf):
  - ~2 Mb/s increase for TCP and UDP TX (may be within measurement error)

NOTE
====

Applies only to RISC-V chips that do not have the hardware issue marked
by the SOC_CPU_MISALIGNED_ACCESS_ON_PMP_MISMATCH_ISSUE macro.
2025-08-27 12:46:41 +07:00
Alexey Lapshin 913d38ba14 fix(newlib): fix CONFIG_LIBC_OPTIMIZED_MISALIGNED_ACCESS for c2/c3/c6/h2/h21
PMP configurations for load and store addresses may
have different permissions (e.g., "R" vs. "RW").

Due to the timing alignment of internal signals, the address
permission check may be incorrectly applied during the second
part of a misaligned access transaction.

As a workaround, insert two instructions (e.g. ADDI/NOP) between
accessing to different memory regions. This spacing avoids the
false permission check caused by signal timing overlap.
2025-08-22 13:46:43 +08:00
morris 83512e3e7c feat(sdm): enhance the thread safety 2025-08-11 10:13:57 +08:00
Song Ruo Jing 6bfdc93593 feat(uart): add DTR and DSR signals support for UART 2025-08-05 16:45:46 +08:00
Gao Xu 819970f439 Merge branch 'fix/correct_adc_periph_num_on_c2' into 'master'
fix(adc): fix ESP32-C2/P4 wrong adc periph num

See merge request espressif/esp-idf!40542
2025-08-03 14:45:23 +08:00
Song Ruo Jing 48233e0e7e refactor(ledc): remove deprecated LEDC_USE_RTC8M_CLK macro for v6.0 2025-07-30 20:01:47 +08:00
Song Ruo Jing f61e780f60 refactor(clk): deprecate rtc_cal_sel_t enum 2025-07-30 20:01:46 +08:00
Song Ruo Jing 2b01b7c6f8 refactor(clk): add soc_clk_calibration_clk_src_t for all targets
Cleaned up RTC calibration clock selection code
2025-07-30 20:01:46 +08:00
morris 0999aeedbd refactor(timg): clean up soc layer meta data 2025-07-17 10:33:08 +08:00
morris 0296c30908 feat(soc): introduce the soc_caps_full.h for internal use only 2025-07-17 10:33:08 +08:00
gaoxu bc84e7fc99 fix(adc): fix wrong adc periph num on C2/P4 2025-07-14 08:33:18 +08:00
Song Ruo Jing 28df79aee8 feat(clk): Add basic clock support for esp32h4 2025-07-10 16:35:53 +08:00
Armando (Dou Yiwen) 02be119399 Merge branch 'fix/fix_c3_c2_cache_freeze_soc_caps_issue' into 'master'
cache: fixed SOC_CACHE_FREEZE_SUPPORTED not defined on C3 / C2 issue

See merge request espressif/esp-idf!39881
2025-06-17 03:15:07 +00:00
Song Ruo Jing 6d293c8582 feat(clk): Add basic clock support for esp32h21 2025-06-16 15:05:32 +08:00
armando 1c5cadea13 fix(cache): fixed SOC_CACHE_FREEZE_SUPPORTED not defined on c3/c2 issue 2025-06-16 13:13:22 +08:00
Chen Jichang 4bfd180a94 fix(i2c): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:27:18 +08:00
Chen Jichang 9837138659 fix(gptimer): only call esp_pm APIs when CONFIG_PM_ENABLE is enabled 2025-05-22 17:27:18 +08:00
Song Ruo Jing 8262915e28 refactor(regi2c): remove regi2c_defs.h from some targets 2025-05-19 21:46:40 +08:00
Yuan Yu 9a109ca17c fix(peripherals): Correct typo in periph_inttrput_t
Corrected the typo in the type name from 'periph_inttrput_t' to 'periph_interrupt_t'.
2025-05-15 18:40:57 +08:00
Chen Jichang e353f92b66 feat(gdma): support gdma on esp32h4 2025-04-15 11:15:40 +08:00
wanckl 51873d46aa feat(driver_spi): add h21 spi drivers supports 2025-04-03 11:27:29 +08:00
Wu Zheng Hui e95103aa56 Merge branch 'fix/add_sleep_duration_check_for_timer_wakeup' into 'master'
fix(esp_hw_support): add timer wakeup sleep duration check

Closes IDFGH-14485

See merge request espressif/esp-idf!36793
2025-02-13 10:42:58 +08:00
Jiang Jiang Jian c28599dad9 Merge branch 'bugfix/pm-340' into 'master'
revert the fix of idf_size error caused by ldgen

Closes PM-340

See merge request espressif/esp-idf!36763
2025-02-10 10:58:31 +08:00