Commit Graph

822 Commits

Author SHA1 Message Date
Jiang Jiang Jian
08f007f68d Merge branch 'fix-bind_int_wdt_to_cache_livelock_fix_v6.0' into 'release/v6.0'
fix(esp_system): bind int_wdt to cache livelock workaround (v6.0)

See merge request espressif/esp-idf!49169
2026-06-29 15:36:59 +08:00
Jiang Jiang Jian
0855c331d7 Merge branch 'fix/esp32c5_usj_console_stuck_v6.0' into 'release/v6.0'
fix(esp32c5): Do not disable UART0 sclk when USB Serial/JTAG is primary console (v6.0)

See merge request espressif/esp-idf!48874
2026-06-29 15:32:15 +08:00
Laukik Hase
00cff977c6 fix(esp_tee): Avoid crypto peripherals reset with esp_restart() from REE
- Reset the crypto peripherals during TEE initialization
2026-06-26 15:07:23 +05:30
harshal.patil
3195c942da fix(mbedtls): validate ECDSA signature range and harden ECC memory power-down 2026-06-09 15:02:59 +05:30
wuzhenghui
df645d9d05 fix(esp_system): update cache livelock workaround bind to interrupt WDT configuration 2026-06-02 17:31:03 +08:00
Peter Dragun
d9e28fe088 fix(esp32c5): Do not disable UART0 sclk when USB Serial/JTAG is primary console
This is a workaround for rom code issue, which can cause the chip to end in infinite loop
when reset is triggered from esptool/idf-monitor. This is only applicable to ESP32-C5 rev <= 1.0.

Closes https://github.com/espressif/esp-idf/issues/18089
2026-05-25 14:48:06 +02:00
wuzhenghui
fcad5f0a1d fix(esp_system): fix build err if int_wdt is not enabled on esp32 2026-05-25 10:35:34 +08:00
Guillaume Souchere
3e293035e3 fix(esp_system): PSRAM stack crash in esp_restart_noos on RISC-V chips
On RISC-V chips with SPIRAM support (esp32c5, esp32c61, esp32h4, esp32p4,
esp32s31), esp_restart_noos() was disabling the cache while the current
stack pointer could still be in external RAM. Any stack access after cache
disable (function call, local variable spill) would then fault with
"Cache disabled but cached memory region accessed".

Xtensa chips (esp32, esp32s2, esp32s3) already had this guard via the
SET_STACK macro. Add the equivalent for RISC-V:

- Add rv_utils_set_sp() to riscv/rv_utils.h (plain "mv sp, %0" with a
  memory clobber; no window register management needed on RISC-V)
- In each affected system_internal.c, under
  CONFIG_FREERTOS_TASK_CREATE_ALLOW_EXT_MEM, check whether the current
  SP is in PSRAM and if so switch it to the top of internal BSS before
  any cache disable or writeback operation
- Fix xTaskCreateStaticPinnedToCore() stack size argument in the
  spiram_stack test (was passing bytes instead of word count)
- Mark the null-pointer write in func_do_exception() as volatile to
  prevent the compiler from optimizing it away
- Extend the [spiram_stack] tests to RISC-V by sharing fibonacci() and
  the task/finish helpers across architectures, guarding only the
  Xtensa-specific WINDOWBASE/WINDOWSTART prints
2026-05-15 14:00:36 +08:00
sibeibei
51775582e6 bugfix(esp_hw_support):remove ESP32-C5 root clock auto gating bypass in sleep path 2026-05-14 17:16:52 +08:00
sibeibei
aa2bd15d46 Revert "fix(esp_hw_support): fix the issue of wifi rx packet loss when switchng soc root clock source"
This reverts commit 45ea08b955.
2026-05-12 15:37:50 +08:00
Jiang Jiang Jian
85db04992a Merge branch 'fix/fix_esp32_int_wdt_workaround_break_sleep_process_v6.0' into 'release/v6.0'
fix(esp_system): disable esp32 cache livelock int_wdt workaround in ipc_isr_stall (v6.0)

See merge request espressif/esp-idf!46741
2026-03-21 14:11:21 +08:00
wuzhenghui
66f24377fc refactor(esp_system): ind_wdt.c refactor & code clean
1. introduce reconfigure_ticks function for wdt configuration
 2. move esp32eco3 cache livelock workaround code out from int_wdt.c
2026-03-20 10:51:39 +08:00
Song Ruo Jing
c7ae253b89 feat(mspi): support 120MHz flash and psram for esp32c61 2026-03-19 14:30:46 +00:00
Jiang Jiang Jian
cd2a4df5fa Merge branch 'fix/disable_pvt_for_esp32c5_v6.0' into 'release/v6.0'
feat(esp32c5): disable PVT feature for esp32c5 (v6.0)

See merge request espressif/esp-idf!45702
2026-02-12 15:47:21 +08:00
Alexey Lapshin
8c0c59ffc8 fix(panic): fix _bss_end alignment for esp32s2 and esp32s3 2026-02-06 18:44:23 +07:00
Xiao Xufeng
3d263e7304 fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption
This reverts commit 7145fc9558.
2026-02-06 11:48:27 +08:00
yanzihan@espressif.com
d0b1371e34 feat(esp_hw_support): use pvt to auto control digital ldo and rtc ldo for esp32c5 2026-02-01 13:24:49 +08:00
morris
da14c42596 Merge branch 'fix/esp32_flash_cache_crash_v6.0' into 'release/v6.0'
fix(hw_support): Fix crash when reconfiguring flash from 40 to 80 MHz on ESP32 (v6.0)

See merge request espressif/esp-idf!44898
2026-02-01 10:20:19 +08:00
Mahavir Jain
78464dfab7 Merge branch 'refactor/create_esp_hal_security_v6.0' into 'release/v6.0'
refactor: Created esp_hal_security component (v6.0)

See merge request espressif/esp-idf!45349
2026-01-31 10:28:48 +05:30
Mahavir Jain
ee2da28726 Merge branch 'feat/esp_tee_backports_v6.0' into 'release/v6.0'
feat(esp_tee): Feature/fixes backports to `release/v6.0`

See merge request espressif/esp-idf!45095
2026-01-31 10:27:34 +05:30
Aditya Patwardhan
4d3cfefc2e refactor(esp_hal_security): Updated esp_hal_security build and includes 2026-01-30 17:12:54 +05:30
Jiang Jiang Jian
d3e1887bbc Merge branch 'fix/p4_min_rev_usage_v6.0' into 'release/v6.0'
P4: fix wrong rev_min usage in rom and other places (v6.0)

See merge request espressif/esp-idf!45223
2026-01-30 10:50:51 +08:00
Laukik Hase
421246323a feat(esp_tee): Add support for the RISC-V H/W stack guard mechanism 2026-01-29 11:49:14 +05:30
Xiao Xufeng
79f7427729 fix(esp32p4): fix efuse, encryption and other rev_min usage 2026-01-28 21:46:00 +08:00
Xiao Xufeng
32e4e83f84 Revert "fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption"
This reverts commit cca0ac8c56.
2026-01-15 23:44:05 +08:00
Xiao Xufeng
206274d298 refactor(startup): make flash_init_state static 2026-01-13 18:01:32 +08:00
Mattias Schäffersmann
5faff98cc5 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-13 18:01:32 +08:00
Jiang Jiang Jian
12d0df2537 Merge branch 'bugfix/fix_pvt_after_sleep_v6.0' into 'release/v6.0'
fix(pvt): fix pvt retention bug,replace pvt_retention with pvt_init

See merge request espressif/esp-idf!44927
2026-01-12 15:38:56 +08:00
zlq
1d41de96d8 fix(pvt): fix pvt retention bug,replace pvt_retention with pvt_init 2026-01-09 15:44:53 +08:00
Xiao Xufeng
cca0ac8c56 fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption
This reverts commit 7145fc9558.
2025-12-24 02:31:42 +08:00
Jiang Jiang Jian
f409428bf3 Merge branch 'bugfix/esp32c5_encrypted_flash_write_v6.0' into 'release/v6.0'
fix(spi_flash): Add CPU frequency switching during flash encrypted write (v6.0)

See merge request espressif/esp-idf!44304
2025-12-21 15:28:33 +08:00
Jiang Jiang Jian
ac1e81f980 Merge branch 'fix/esp32p4_eco5_multicore_wfi_autoclock_gating_v6.0' into 'release/v6.0'
fix(esp_hw_support): enable core1 auto clock gating for esp32p4 rev3+ multicore (v6.0)

See merge request espressif/esp-idf!44255
2025-12-21 15:22:15 +08:00
Xiao Xufeng
469953bd04 Revert "fix(esp_system): limit CPU clock to 160MHz in ESP32-C5 for flash encryption"
This reverts commit 3c5d2e6b58.
2025-12-17 01:21:46 +08:00
Xiao Xufeng
ae7124abe3 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-17 01:21:45 +08:00
Chen Chen
1b015d22eb refactor(esp_system): clear dependency on hal components 2025-12-16 09:11:59 +08:00
Samuel Obuch
5908c9574c fix(esp_hw_support): enable core1 auto clock gating for esp32p4 rev3+ multicore 2025-12-15 14:47:54 +01:00
Jiang Jiang Jian
3df1ee13fb Merge branch 'fix/fix_mspi_write_stuck_after_reset_v6.0' into 'release/v6.0'
fix(esp_system): fix mspi write stuck after cpu/digital reset on c5/c61 (v6.0)

See merge request espressif/esp-idf!43994
2025-12-11 13:59:25 +08:00
morris
37c614d626 feat(twai): graduate the hal drivers into esp_hal_twai component 2025-12-10 13:56:47 +08:00
wuzhenghui
01ec965252 fix(esp_system): fix mspi write stuck after cpu/digital reset on c5/c61 2025-12-10 12:21:55 +08:00
morris
4ca7b95d83 Merge branch 'refactor/esp_hal_gpio_v6.0' into 'release/v6.0'
refactor(gpio): split GPIO HAL into separate component (v6.0)

See merge request espressif/esp-idf!43895
2025-12-09 16:02:49 +08:00
Alexey Gerenkov
effa1e4248 Merge branch 'feature/update-toolchain-to-esp-15.2.0_20250929.4-6d3fdb7_v6.0' into 'release/v6.0'
Make Picolibc the default libc (v6.0)

See merge request espressif/esp-idf!43966
2025-12-08 18:13:08 +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
Jiang Jiang Jian
c33b848fea Merge branch 'bugfix/fix_chip_hangup_v6.0' into 'release/v6.0'
bugfix: clear regdma status when restart V6.0

See merge request espressif/esp-idf!43908
2025-12-08 11:07:25 +08:00
Alexey Lapshin
ad7f4b9670 feat(esp_libc): make picolibc default libc 2025-12-06 00:08:35 +07:00
sibeibei
e5fb2f50ec bugfix: clear regdma status when restart 2025-12-02 10:31:58 +08:00
Song Ruo Jing
1067b313c6 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-27 11:08:48 +08:00
morris
f050c1deb1 Merge branch 'fix/no_function_call_in_min_max_v6.0' into 'release/v6.0'
refactor: avoid function calls inside MIN/MAX macros (v6.0)

See merge request espressif/esp-idf!43476
2025-11-21 12:03:09 +08:00
morris
8242e6914b Merge branch 'feature/ledc_etm_support_v6.0' into 'release/v6.0'
feat(ledc): add ETM support for LEDC peripheral (v6.0)

See merge request espressif/esp-idf!43401
2025-11-21 10:38:11 +08:00
Jiang Jiang Jian
3584d2273e Merge branch 'feat/support_p4_unicore_auto_clock_gating_v6.0' into 'release/v6.0'
feat(esp_hw_support): support unicore auto clock gating for esp32p4 rev3+ (v6.0)

See merge request espressif/esp-idf!43368
2025-11-20 10:32:40 +08:00
morris
e9539d4560 refactor: avoid function calls inside MIN/MAX macros 2025-11-18 15:18:14 +08:00