Commit Graph

280 Commits

Author SHA1 Message Date
hebinglin 94b54832f8 change(esp_hw_support): remove sleep_mmu_retention related flow for esp32c5 eco1 2026-01-12 14:15:48 +08:00
Li Shuai 3a62fdba66 Merge branch 'bugfix/idfci-7928' into 'master'
fix ci failed test case of Automatic light occurs when tasks are suspended

Closes IDFCI-7928, IDFCI-3963, and IDFCI-4189

See merge request espressif/esp-idf!44895
2026-01-09 10:22:03 +08:00
Li Shuai 1494370a40 change(esp_pm): fix ci failed test case of Automatic light occurs when tasks are suspended 2026-01-08 17:48:33 +08:00
morris ebc68a1910 Merge branch 'refactor/sleep_sys_peripheral' into 'master'
refactor: cleanup dependency of soc_caps & hal components in  sleep_system_peripheral.c

See merge request espressif/esp-idf!44682
2026-01-07 19:29:07 +08:00
Li Shuai 251b395061 fix(esp_pm): fix invalid gpio number used for pm trace 2026-01-06 12:25:59 +08:00
Chen Chen f3b5600bd1 refactor: remove some dependency on hal components 2026-01-05 18:02:29 +08:00
Li Shuai 6e9885f7e6 Merge branch 'bugfix/idfgh-16634' into 'master'
remove the configurable constraint for sleep memory usage optimization option

Closes IDFGH-16634 and IDF-13780

See merge request espressif/esp-idf!42882
2025-12-31 12:57:50 +08:00
Li Shuai a10fbdba4c change(esp_pm): add dependencies on the rtc clock and rtc_time modules for power managment module 2025-12-27 12:34:17 +08:00
Song Ruo Jing 74aeb3f41f refactor(uart): split UART HAL into separate component 2025-12-25 14:41:28 +08:00
Wu Zheng Hui 59fa9f7430 Merge branch 'feat/support_configurable_behavior_for_sleep_console' into 'master'
feat(esp_hw_support): Support configurable console uart behavior before sleep

Closes PM-396

See merge request espressif/esp-idf!38409
2025-12-25 12:31:35 +08:00
Wu Zheng Hui 429c29be1c Merge branch 'fix/fix_pm_lock_statistics_case' into 'master'
fix(esp_pm): prevent RTOS lock interference in PM lock statistics test on multicore

Closes IDFCI-7257

See merge request espressif/esp-idf!44393
2025-12-24 14:29:45 +08:00
wuzhenghui 20c2dab09c feat(esp_hal_pmu): graduate pmu/rtc_cntl hal driver into a new component: esp_hal_pmu 2025-12-22 16:03:43 +08:00
wuzhenghui 47651df567 change(esp_pm): skip vTaskStepTick if lightsleep request is rejected 2025-12-19 17:25:47 +08:00
wuzhenghui c5011bcbf9 fix(esp_pm): prevent RTOS lock interference in PM lock statistics test on multicore 2025-12-18 18:05:19 +08:00
Kevin (Lao Kaiyao) 3665d0b0f6 Merge branch 'feature/graduate_tsens_hal_component' into 'master'
feat(tsens): graduate temperature sensor hal component

Closes IDF-14906

See merge request espressif/esp-idf!44121
2025-12-18 12:44:41 +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
laokaiyao 3cfd8d6906 feat(tsens): graduate temperature sensor hal component 2025-12-17 16:09:21 +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
wuzhenghui f1ca9f93ab feat(esp_pm): enable esp32c61 pm UT test cases 2025-12-15 14:24:19 +08:00
Frantisek Hrbata c847b341fe Merge branch 'feat/cmakev2_depgraph' into 'master'
feat(cmakev2/build): add idf_build_generate_depgraph function

Closes IDF-13072

See merge request espressif/esp-idf!43814
2025-12-12 11:49:49 +01:00
C.S.M f405e51784 ci(esp32s31): Add ci build test for esp32s31 2025-12-11 15:17:15 +08:00
Frantisek Hrbata f88c43a721 fix(esp_pm/cmake): initialize src variable
In cmakev2, a component can be evaluated within the context of another
component, so it's important to properly initialize each variable used
by the component.

Fixes: 0c4cf75c35 ("feat(esp32s31): Introduce esp32s31 hello world")

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2025-12-11 14:00:55 +08:00
C.S.M 0c4cf75c35 feat(esp32s31): Introduce esp32s31 hello world 2025-12-02 10:44:16 +08:00
Wu Zheng Hui 74148161a8 Merge branch 'feat/enable_esp_pm_tests_for_p4_v3' into 'master'
feat(esp_hw_support): re-enable P4 pm tests for rev3.0

Closes IDF-14416

See merge request espressif/esp-idf!43684
2025-12-01 20:42:45 +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
wuzhenghui 6a34f94ab9 feat(esp_hw_support): re-enable P4 sleep wakeup tests for rev3.0 2025-11-26 14:43:22 +08:00
Wu Zheng Hui 27bb77e77c Merge branch 'feat/support_get_pm_lock_aquired_counts' into 'master'
feat(esp_pm): add APIs to get PM lock statistics

Closes IDFGH-16676

See merge request espressif/esp-idf!43002
2025-11-19 10:52:40 +08:00
armando b25ba4a0c1 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-17 12:11:39 +08:00
wuzhenghui 0ce91afc94 feat(esp_pm): add APIs to get PM lock statistics
Add new APIs to retrieve statistics about power management locks:
- esp_pm_get_lock_stats(): Get statistics for all PM lock types
- esp_pm_get_lock_instance_stats(): Get statistics for a single PM lock instance

Also update the test cases to verify the new functionality and
enable PM profiling in test configuration.

Closes https://github.com/espressif/esp-idf/issues/17770
2025-11-14 20:36:44 +08:00
Wu Zheng Hui 10baab1cf8 Merge branch 'fix/check_usj_status_before_access' into 'master'
fix(esp_driver_usb_serial_jtag): check USJ accessibility before read/write

Closes PM-400

See merge request espressif/esp-idf!42562
2025-11-14 16:30:40 +08:00
wuzhenghui 8741edd26d test(esp_pm): add test case for USJ printing performance during wake-up
Add a new test case to verify that USJ printing doesn't block CPU on chip
wake-up from light sleep. The test measures the average time per print
operation and ensures it's below 5000 microseconds.
2025-10-22 17:57:32 +08:00
wuzhenghui b71a6ce55a change(esp_hw_support): update TOP pd sleep dependency
Disable peripheral powerdown lightsleep if PSRAM if enabled on P4 v3
Force powerdown Flash if peripheral power down lightsleep is enabled
2025-10-20 15:56:15 +08:00
wuzhenghui 065dd70056 change(esp_hw_support): move ESP_SLEEP_POWER_DOWN_CPU to Kconfig 2025-10-14 16:33:30 +08:00
wuzhenghui af1c8a568d feat(esp_hw_support): update cpu_pd support for esp32p4 v3.0 2025-10-14 16:33:28 +08:00
Chen Chen a4710cc206 refactor(driver): remove redundant driver dependencies
now the driver component only contains legacy code for i2c, twai and
touch sensor
2025-09-30 15:47:45 +08:00
C.S.M b145ede835 refactor(mspi): Make mspi hal layer independent 2025-09-26 14:57:54 +08:00
Alexey Lapshin 9281e78381 change(esp_libc): rename newlib component to esp_libc 2025-09-09 22:00:44 +08:00
Li Shuai b43f0ddc70 feat(sleep): Modify the build system 2025-08-27 09:50:21 +08:00
Marek Fiala 9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
C.S.M 0121a14699 refactor(temperature_sensor): Move temperature calculation from hw_support to hal 2025-08-11 11:47:20 +08:00
Song Ruo Jing 9a2984b4c0 fix(gpio): fix ESP32 GPIO sleep mode handling
The previous workaround does not work, the backup/restore should apply to RTC IO registers.
Also moved the workaround to sleep_gpio.c to avoid gpio hal using kconfig.
2025-08-05 21:02:09 +08:00
wuzhenghui f861b7dd65 fix(esp_hw_support): config lact in critical 2025-06-13 20:38:46 +08:00
Li Shuai f8832b583c Revert "fix(esp_pm): esp32c5 eco2 disable top pd to avoid mem being changed during sleep"
This reverts commit 8c2ea986b4.
2025-06-04 14:15:16 +08:00
Li Shuai 8c2ea986b4 fix(esp_pm): esp32c5 eco2 disable top pd to avoid mem being changed during sleep 2025-05-29 20:14:13 +08:00
wuzhenghui 65b7e70564 feat(driver): support acquire/release clock source dependency for all drivers 2025-05-27 21:21:38 +08:00
wuzhenghui 022614b1d3 fix(esp_hw_support): update systimer step immediately when XTAL changes on esp32s2 2025-05-22 13:58:54 +08:00
wuzhenghui 2931aa23b6 fix(esp_hw_support): update LACT clock prescale immediately when APB changes on esp32 2025-05-22 13:58:50 +08:00
Wu Zheng Hui fe3da7167e Merge branch 'fix/fix_esp32p4_retention_cost' into 'master'
fix(esp_hw_support): optimize retention cost and update sleep time compensation

See merge request espressif/esp-idf!37920
2025-04-23 13:20:49 +08:00
wuzhenghui a1471f4f78 feat(esp_hw_support): remeasure sleep_time_overhead_out if min_freq_mhz changed 2025-04-22 22:02:34 +08:00
Li Shuai 0cb211489f fix(ci): fix ci build error 2025-04-17 22:06:21 +08:00