Commit Graph

810 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
Xiao Xufeng bbafc3375a refactor(startup): make flash_init_state static 2026-01-07 17:41:36 +08:00
Mattias Schäffersmann eda4c247d0 fix(hw_support): Fix crash when reconfiguring flash from 40 to 80 MHz
Reading from the flash while it is being reconfigured leads to data
corruption and a crash when the reconfiguration code is located in flash.
This is only an issue if a device has a bootloader that runs with 40 MHz
flash and an application flashed via OTA that runs with 80 MHz flash.
If bootloader and application run with the same flash speed, the
reconfiguration is basically a no-op and no data corruption occurs.
Fix reconfiguration by placing the code back into IRAM.

Issue introduced in: 7549d08

Closes: https://github.com/espressif/esp-idf/pull/17905
2026-01-07 17:41:36 +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
morris 827cb1b734 Merge branch 'refactor/unify_periph_clk_init' into 'master'
refactor(esp_system): clear dependency on hal components

Closes IDF-14844 and IDF-13980

See merge request espressif/esp-idf!43725
2025-12-16 08:58:51 +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
Samuel Obuch 14fcae7082 fix(esp_hw_support): enable core1 auto clock gating for esp32p4 rev3+ multicore 2025-12-15 12:51:37 +01: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
Alexey Lapshin f6cd2fe970 Merge branch 'feature/update-toolchain-to-esp-15.2.0_20250929.4-6d3fdb7' into 'master'
Make Picolibc the default libc

See merge request espressif/esp-idf!43620
2025-12-04 01:14:01 +04: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
Alexey Lapshin 31810ae993 feat(esp_libc): make picolibc default libc 2025-12-03 13:31:42 +07: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
Mahavir Jain 4186f75296 Merge branch 'feat/esp_tee_hw_stack_guard' into 'master'
feat(esp_tee): Support for the RISC-V H/W stack guard with ESP-TEE enabled

Closes IDF-10770 and IDF-14350

See merge request espressif/esp-idf!43162
2025-11-26 09:42:38 +05:30
C.S.M 4becb6dbf6 feat(esp32s31): Add esp_system component support 2025-11-25 17:11:59 +08:00
Laukik Hase 7c24682643 feat(esp_tee): Add support for the RISC-V H/W stack guard mechanism 2025-11-24 18:49:06 +05:30
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
morris 614221e9d5 Merge branch 'fix/no_function_call_in_min_max' into 'master'
refactor: avoid function calls inside MIN/MAX macros

See merge request espressif/esp-idf!43429
2025-11-18 15:14:48 +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
morris aa1fd9c611 refactor: avoid function calls inside MIN/MAX macros 2025-11-17 22:17:54 +08:00
C.S.M a90c93541c feat(esp32s31): Introduce new target esp32s31 2025-11-17 14:48:55 +08:00
Armando (Dou Yiwen) 8f1e7bc4e0 Merge branch 'feat/cache_mem_iram_h4' into 'master'
cache: use icache memroy as diram when single core

See merge request espressif/esp-idf!43352
2025-11-14 18:06:00 +00:00
Jiang Jiang Jian eaa0e3ab77 Merge branch 'feat/support_p4_unicore_auto_clock_gating' into 'master'
feat(esp_hw_support): support unicore auto clock gating for esp32p4 rev3+

Closes IDF-13501

See merge request espressif/esp-idf!43321
2025-11-14 13:57:48 +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
armando a28d9869c1 feat(cache): use icache memroy as diram when single core 2025-11-14 10:35:39 +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
wuzhenghui 83d91a153d feat(esp_hw_support): support unicore auto clock gating for esp32p4 rev3+ 2025-11-13 14:30:55 +08:00
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
Song Ruo Jing fab48ae1b7 Merge branch 'feature/ledc_etm_support' into 'master'
feat(ledc): add ETM support for LEDC peripheral

Closes IDF-6355, IDFGH-10620, IDFGH-16378, and IDF-10683

See merge request espressif/esp-idf!41543
2025-10-27 18:28:20 +08:00
Song Ruo Jing 4fb40fa91a fix(console): wrong uart console pin info when UART console is not used 2025-10-23 16:24:11 +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