Commit Graph

282 Commits

Author SHA1 Message Date
igor.udot e2a8bbe639 ci: update build-test-rules to use common_components 2026-03-20 15:53:26 +08:00
Jiang Jiang Jian edf0bf67de Merge branch 'fix/use_apb_max_state_for_ble_events_v6.0' into 'release/v6.0'
fix(ble): use apb max state for bt and enable should skip (v6.0)

See merge request espressif/esp-idf!46334
2026-03-20 10:39:19 +08:00
Jiang Jiang Jian 204ad1c7ef Merge branch 'feat/support_rv_fp_retention_v6.0' into 'release/v6.0'
feat(esp_hw_support): support rv fp retention (v6.0)

See merge request espressif/esp-idf!46521
2026-03-20 10:17:11 +08:00
Jiang Jiang Jian 59a686ffac Merge branch 'fix/fix_sleep_exception_in_spi_flash_rom_impl_v6.0' into 'release/v6.0'
fix(esp_hw_support): fix sleep exception in spi flash rom impl (v6.0)

See merge request espressif/esp-idf!46445
2026-03-20 10:16:57 +08:00
Jiang Jiang Jian dfee985a92 Merge branch 'bugfix/esp_idf_s2_options_test_esp_pm_6.0' into 'release/v6.0'
fix(esp_pm): change esp32s2 esp32c5 pm_trace io to avoid conflicts with mspi(v6.0)

See merge request espressif/esp-idf!46266
2026-03-20 10:15:32 +08:00
cjin b1131ae12f fix(pm): expand the number of skip light sleep number 2026-03-16 08:55:02 +08:00
wuzhenghui 58fbca770a feat(esp_hw_support): add RV FP test cases 2026-03-12 11:07:24 +08:00
wuzhenghui ee69886fee fix(esp_hw_support): fix sleep exception if CONFIG_SPI_FLASH_ROM_IMPL enabled 2026-03-10 14:13:57 +08:00
hebinglin f02e1d665c fix(esp_pm): change esp32s2 esp32c5 pm_trace io to avoid conflicts with mspi 2026-03-04 15:53:36 +08:00
wuzhenghui 5a5ef9fb08 feat(pm): add light sleep tick overflow protection configuration 2026-02-13 20:15:58 +08:00
wuzhenghui 257b7033ea 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
2026-02-13 19:49:01 +08:00
Jiang Jiang Jian 31056d5db9 Merge branch 'refactor/spi_flash_private_v6.0' into 'release/v6.0'
refactor(spi_flash): reorganize header files, improve encapsulation and simplify ROM implementation (v6.0)

See merge request espressif/esp-idf!45488
2026-02-02 10:57:34 +08:00
Jiang Jiang Jian 987bbd8646 Merge branch 'fix/backport_wifi_fixes_v6.0' into 'release/v6.0'
fix(esp_wifi): backport some wifi fixes

See merge request espressif/esp-idf!45567
2026-02-02 10:51:00 +08:00
hebinglin dbcc949b1c change(esp_hw_support): remove sleep_mmu_retention related flow for esp32c5 eco1 2026-02-01 11:59:16 +08:00
Song Ruo Jing 89da3742b8 refactor(clk): split clock HAL into separate component 2026-01-31 22:32:37 +08:00
yinqingzhao b5df4b8dfd fix(pm): fix crash issue of esp32 caused by accessing flash in sleep wake process 2026-01-31 13:36:01 +08:00
laokaiyao 2cb958a9e3 feat(tsens): graduate temperature sensor hal component 2026-01-29 10:05:47 +08:00
Xiao Xufeng 3411286544 refactor(spi_flash): reorganize header files and improve API encapsulation
This commit reorganizes SPI flash header files to better reflect their
visibility and intended usage:

1. Rename `esp_flash_port/` to `esp_flash_chips/`:
   - Better reflects that these headers are for chip driver implementations
   - All chip driver headers moved to `esp_flash_chips/` directory
   - Added README.md explaining semi-public nature of these headers

2. Move internal headers to `esp_private/`:
   - `esp_flash_internal.h` -> `esp_private/esp_flash_internal.h`
   - `memspi_host_driver.h` -> `esp_private/memspi_host_driver.h`

3. Move chip driver related headers to `esp_flash_chips/`:
   - `esp_private/esp_flash_types.h` -> `esp_flash_chips/esp_flash_types.h`
   - `spi_flash/spi_flash_defs.h` -> `esp_flash_chips/spi_flash_defs.h`
   - `spi_flash_override.h` -> `esp_flash_chips/spi_flash_override.h`
   - All `spi_flash_chip_*.h` headers moved to `esp_flash_chips/`

4. Code improvements:
   - Remove unused includes (e.g., `spi_flash_override.h` from `cache_utils.c`)
   - Use public API `esp_flash_get_size()` instead of direct member access
   - Add `esp_flash_is_quad_mode` to linker.lf for IRAM placement

5. Documentation updates:
   - Add README.md in `esp_flash_chips/` explaining semi-public headers
   - Update programming guide with warnings about internal headers
   - Update both English and Chinese documentation

6. Update all references across the codebase:
   - Update includes in `spi_flash` component
   - Update `bootloader_support`, `app_update`, `esp_tee`, `espcoredump`
   - Update example projects

Breaking changes:
- Headers moved to new locations require include path updates
- `custom_flash_driver` example temporarily disabled until external
  components are updated
2026-01-29 03:28:30 +08:00
Jiang Jiang Jian 2359d58fbf Merge branch 'refactor/independent_esp_hal_pmu_v6.0' into 'release/v6.0'
feat(hal): graduate pmu/rtc_cntl hal driver into a new component: esp_hal_pmu (v6.0)

See merge request espressif/esp-idf!44954
2026-01-28 19:02:36 +08:00
Jiang Jiang Jian ea33171ec8 Merge branch 'feat/support_configurable_behavior_for_sleep_console_v6.0' into 'release/v6.0'
feat(esp_hw_support): Support configurable console uart behavior before sleep (v6.0)

See merge request espressif/esp-idf!44949
2026-01-28 17:50:23 +08:00
Chen Chen a9d7ccbb15 refactor: remove some dependency on hal components 2026-01-13 10:29:44 +08:00
wuzhenghui de5e57d296 feat(esp_hal_pmu): graduate pmu/rtc_cntl hal driver into a new component: esp_hal_pmu 2026-01-12 14:48:49 +08:00
wuzhenghui 711146de9f change(esp_pm): skip vTaskStepTick if lightsleep request is rejected 2026-01-09 11:09:03 +08:00
Li Shuai 83bd91b9c4 change(esp_pm): fix ci failed test case of Automatic light occurs when tasks are suspended 2026-01-09 10:30:22 +08:00
Jiang Jiang Jian 8d0fc97530 Merge branch 'bugfix/idfgh-16634_v6.0' into 'release/v6.0'
backport v6.0: remove the configurable constraint for sleep memory usage optimization option

See merge request espressif/esp-idf!44754
2026-01-08 13:49:39 +08:00
Song Ruo Jing ce475d901d refactor(uart): split UART HAL into separate component 2026-01-04 16:02:57 +08:00
Li Shuai d5894f3a0a change(esp_pm): add dependencies on the rtc clock and rtc_time modules for power managment module 2026-01-04 10:42:21 +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
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
wuzhenghui 3136994010 feat(esp_hw_support): re-enable P4 sleep wakeup tests for rev3.0 2025-11-26 17:24:21 +08:00
armando 714b022a43 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-21 02:48:05 +00:00
Jiang Jiang Jian 56a284e0aa Merge branch 'fix/check_usj_status_before_access_v6.0' into 'release/v6.0'
fix(esp_driver_usb_serial_jtag): check USJ accessibility before read/write (v6.0)

See merge request espressif/esp-idf!43392
2025-11-18 12:29:48 +08:00
wuzhenghui baa138bf2a 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-11-14 17:10:40 +08:00
wuzhenghui 5c10e4b719 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-11-11 21:56:26 +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