Commit Graph

422 Commits

Author SHA1 Message Date
zlq
02f3974b6a fix(pvt): fix pvt retention bug,replace pvt_retention with pvt_init 2026-01-09 15:55:38 +08:00
Chen Jichang
8702d5c986 feat(clk): support clk tree on h4mp 2026-01-04 14:07:01 +08:00
Marius Vikhammer
32c6d9d327 feat(rom): added esp-rom support for ESP32-H4 2025-12-29 09:36:32 +08:00
Michael (XIAO Xufeng)
32c31f68c8 Merge branch 'bugfix/esp32c5_encrypted_flash_write' into 'master'
fix(spi_flash): Add CPU frequency switching during flash encrypted write

See merge request espressif/esp-idf!43032
2025-12-17 21:48:05 +08:00
Wu Zheng Hui
3f3100a2c4 Merge branch 'fix/fix_mspi_reset_order' into 'master'
fix(esp_system): fix c61 mspi core/axi reset order

See merge request espressif/esp-idf!44096
2025-12-17 15:12:06 +08:00
Xiao Xufeng
7145fc9558 Revert "fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption"
This reverts commit 3c5d2e6b58.
2025-12-16 17:43:58 +08:00
Xiao Xufeng
230ee88d99 feat(spi_flash): implement dynamic CPU frequency switching workaround for encrypted writes
This commit implements a workaround that allows ESP32-C5 to run at 240MHz CPU frequency
normally, while automatically reducing CPU frequency during encrypted flash writes to
ensure correct operation. The frequency limit is chip revision dependent:
- v1.2 and above: limited to 160MHz during encrypted writes
- v1.0 and below: limited to 80MHz during encrypted writes

Key implementation details:
- Frequency limiting is triggered automatically when esp_flash_write_encrypted() is called
- Uses start() flags (ESP_FLASH_START_FLAG_LIMIT_CPU_FREQ) to integrate with OS layer
- Works with both PM enabled and disabled configurations
- Frequency is automatically restored after encrypted write completes
- For ESP32-C5 with 120MHz flash, Flash clock and timing registers are adjusted when
  CPU frequency is reduced to 80MHz
- SPI1 timing registers are configured during frequency switching since encrypted writes
  use SPI1 and must work correctly at reduced CPU frequencies

Code improvements:
- Use SOC_MSPI_FREQ_AXI_CONSTRAINED capability macro instead of hardcoded chip checks
- Control workaround via Kconfig (CONFIG_PM_WORKAROUND_FREQ_LIMIT_ENABLED) instead of
  hardcoded macros
- Add comprehensive test cases covering various PM configurations and edge cases

This workaround enables ESP32-C5 applications to benefit from 240MHz CPU performance
while maintaining reliable encrypted flash write functionality.
2025-12-16 17:42:44 +08:00
morris
1f04dbb31b Merge branch 'refactor/remove_completed_todos' into 'master'
refactor(global): remove completed todos in the codebase

See merge request espressif/esp-idf!44188
2025-12-16 14:21:25 +08:00
Chen Chen
3cf86e260c refactor(esp_system): clear dependency on hal components 2025-12-15 22:56:09 +08:00
morris
291554cd09 refactor(global): remove completed todos in the codebase 2025-12-15 22:40:15 +08:00
C.S.M
f405e51784 ci(esp32s31): Add ci build test for esp32s31 2025-12-11 15:17:15 +08:00
wuzhenghui
5b827e1b04 fix(esp_system): fix c61 mspi core/axi reset order 2025-12-10 12:08:19 +08:00
Jiang Jiang Jian
c467c91773 Merge branch 'fix/fix_mspi_write_stuck_after_reset' into 'master'
fix(esp_system): fix mspi write stuck after cpu/digital reset on c5/c61

Closes WIFIBUG-1577

See merge request espressif/esp-idf!43731
2025-12-04 10:34:53 +08:00
morris
f8736489fc Merge branch 'feat/esp_hal_twai' into 'master'
feat(twai): graduate the hal drivers into esp_hal_twai component

Closes IDF-14102

See merge request espressif/esp-idf!43557
2025-12-03 16:31:43 +08:00
C.S.M
0c4cf75c35 feat(esp32s31): Introduce esp32s31 hello world 2025-12-02 10:44:16 +08:00
morris
ab4200e6f6 feat(twai): graduate the hal drivers into esp_hal_twai component 2025-12-01 22:32:54 +08:00
Jiang Jiang Jian
dddc0bf6c8 Merge branch 'bugfix/fix_chip_hangup' into 'master'
bugfix: clear regdma status when restart

See merge request espressif/esp-idf!43860
2025-12-01 20:41:20 +08:00
wuzhenghui
925a339e32 fix(esp_system): fix mspi write stuck after cpu/digital reset on c5/c61 2025-12-01 19:40:39 +08:00
sibeibei
c524e1e7e0 bugfix: clear regdma status when restart 2025-11-30 13:21:07 +08:00
Song Ruo Jing
1862fdec74 refactor(gpio): split GPIO HAL into separate component
cleaned up some includes in GPIO peripheral files
2025-11-26 15:35:07 +08:00
C.S.M
4becb6dbf6 feat(esp32s31): Add esp_system component support 2025-11-25 17:11:59 +08:00
C.S.M
961bd0cf78 Merge branch 'feat/introduce_esp32s31' into 'master'
feat(esp32s31): Introduce new target esp32s31

See merge request espressif/esp-idf!43316
2025-11-18 15:55:16 +08:00
Song Ruo Jing
8955f13944 fix(uart): fix some wdt get triggered due to uart sclk not exist on C5
Interrupt wdt would get triggered on uart_driver_install if uart driver was deleted before
Closes https://github.com/espressif/esp-idf/issues/17779

RTC wdt would get triggered on esp_restart if uart driver was deleted before
2025-11-17 22:29:56 +08:00
C.S.M
a90c93541c feat(esp32s31): Introduce new target esp32s31 2025-11-17 14:48:55 +08:00
Wu Zheng Hui
53183f9294 Merge branch 'fix/fix_xtal32k_power_breaks_adc' into 'master'
fix(esp_system): fix XTAL32K power breaks ADC function on 32k XTAL clock pin

See merge request espressif/esp-idf!43208
2025-11-14 12:06:37 +08:00
Mahavir Jain
4a53c4e651 Merge branch 'bugfix/esp32c5_encrypted_flash_write_v2' into 'master'
fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption

See merge request espressif/esp-idf!43301
2025-11-13 18:01:04 +05:30
Mahavir Jain
3c5d2e6b58 fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption
Encrypted flash write operation sometimes result in random corruption in
certain bytes. Root cause points to sudden current surge due to involvement of
encryption block overwhelming LDO supply. More details will be provided
in the ESP32-C5 SoC Errata document.

This fix limits the CPU clock to 160MHz for flash encryption enabled
case. Failing encrypted flash write tests could successfully pass in
this configuration. Going ahead, a dynamic clock adjustment in flash
driver will be considered to mitigate this issue.
2025-11-12 19:14:55 +05:30
Song Ruo Jing
7008558fe5 fix(clk): 400MHz CPU should still be selectable on ESP32-P4 less than rev3 2025-11-11 17:03:25 +08:00
wuzhenghui
d815fdbe70 fix(esp_system): fix XTAL32K power breaks ADC function on 32k XTAL clock pin 2025-11-10 17:40:49 +08:00
Chen Jichang
73bc04afec feat(esp32h4): switch default h4 build to mp version 2025-10-30 11:23:51 +08:00
Xiao Xufeng
40dd5e3957 dma: fixed issue that DMA are not reset when CPU reset
When DMA keep writing the memory, some data may be corrupted after reset. For example, the stack of bootloader may be overwritten and failed to boot until a higher scope of reset (Core).

Also removed the DPORT_PERIP_RST_EN_REG alias on ESP32S2. Now it's the same as some following chips (EN0).
2025-10-20 01:34:32 +08:00
morris
2de3be7300 feat(dma): graduate the dma driver into a single component 2025-10-19 22:06:46 +08:00
Wu Zheng Hui
e1b6006761 Merge branch 'fix/fix_esp32c5_xtal32k_clock_lost_in_sleep' into 'master'
fix(esp_system): manage slow clock sleep pd in select_rtc_slow_clk

See merge request espressif/esp-idf!41591
2025-10-16 15:24:50 +08:00
morris
d5ff73e928 Merge branch 'feature/esp32p4_eco5_support' into 'master'
feat(gpio/ledc/uart/2ddma/ppa): ESP32P4 ECO5 related updates

Closes IDF-13419, IDF-13425, IDF-13427, IDF-13436, IDF-13740, IDF-13741, IDF-13675, IDF-12225, IDF-13823, IDF-13514, IDF-13539, and IDF-13533

See merge request espressif/esp-idf!41980
2025-10-16 11:16:34 +08:00
Song Ruo Jing
dd5d4bd8d7 feat(2ddma): ESP32P4 ECO5 2DDMA related updates
Added one more pair of 2DDMA channels
Priority bit width increased corespondingly
Added three new CSC modes for RX channel 0
Also cleaned up DMA2D capability definitions in soc_caps.h
2025-10-15 16:49:22 +08:00
Song Ruo Jing
08bc91ecc5 fix(clk): allow P4 CPU clk freq can auto switch between 360/400MHz according to revision 2025-10-15 16:49:21 +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
wuzhenghui
4bb6a01959 fix(esp_system): fix ext 32k io revoking breaks sleep io holding 2025-10-10 19:44:07 +08:00
morris
efe05d829b refactor(sleep_cpu): suppress infinite loop warnings with compiler diagnostics 2025-10-10 13:37:29 +08:00
wuzhenghui
aab33f3219 fix(esp_system): manage slow clock sleep pd in select_rtc_slow_clk 2025-10-09 20:03:49 +08:00
Song Ruo Jing
f1e6e66fb5 Merge branch 'bugfix/usb_dp_pin_unusable_after_cpu_reset' into 'master'
fix(gpio): fix USB DP pin unusable after CPU reset for S3/C3

Closes IDFGH-16345

See merge request espressif/esp-idf!41694
2025-09-29 20:10:53 +08:00
Song Ruo Jing
15c5178d5a fix(gpio): fix USB DP pin unusable after CPU reset for S3/C3
Closes https://github.com/espressif/esp-idf/issues/17488
2025-09-28 11:45:37 +08:00
morris
71cb24caab feat(timg): graduate the hal driver into a single component 2025-09-27 17:33:10 +08:00
wuzhenghui
3e7892122e feat(esp_hw_support): support lightsleep and deepsleep on esp32h21 2025-09-26 14:02:55 +08:00
Alexey Lapshin
22cae61ee1 Merge branch 'feature/enable_zc_extensions' into 'master'
Enable zc* extensions for riscv chips supported them

Closes IDF-13918

See merge request espressif/esp-idf!40074
2025-09-25 08:42:07 +04:00
gaoxiaojie
fab0bb1056 fix(esp_system): clear cache error interrupt in panic handler 2025-09-24 21:30:56 +07:00
Chen Jichang
236c10c9a4 fix(clk): clear force_on reg for cache 2025-09-23 15:49:47 +08:00
Konstantin Kondrashov
dcf486359e feat(log): Optimize log tag init for bin logging 2025-09-15 15:59:52 +03:00
hebinglin
88fb870346 change(soc): support xtal32k in esp32h4beta5 2025-09-01 10:13:52 +08:00
armando
179d00a6f8 feat(p4): p4 rev3 real chip support 2025-08-28 17:56:16 +08:00