Commit Graph

271 Commits

Author SHA1 Message Date
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
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
Li Shuai
77a1e2931d change: fix build clang test apps job error 2025-04-17 22:01:10 +08:00
Li Shuai
b7e26d5546 change: power management iram memory usage optimization is only effective for esp32c2 2025-04-17 22:01:10 +08:00
Li Shuai
b47005a030 change: fix esp32h21 ci build error of sar_periph_ctrl_power_disable not found 2025-04-17 22:01:10 +08:00
Li Shuai
954270dda3 change(esp_hw_support): optimize sleep memory (iram or flash) usage control by PM_SLP_IRAM_OPT 2025-04-17 22:01:10 +08:00
Chen Jichang
6c4271d4bb feat(esp32h4): disable unsupported build 2025-03-28 14:41:29 +08:00
Chen Jichang
c34b4eb882 feat(esp32h4): enable ESP32H4 ci build 2025-03-28 14:41:28 +08:00
Chen Ji Chang
6474fd67ae Merge branch 'feat/h4_introduce_step8' into 'master'
feat(esp32h4): introduce hello world to ESP32H4 (stage8)

Closes IDF-9526 and IDF-12333

See merge request espressif/esp-idf!37545
2025-03-20 16:16:05 +08:00
Li Shuai
921cfa0a8e Merge branch 'feat/support_runtime_periphs_icg_ctrl_in_sleep' into 'master'
support runtime ICG control for peripherals to be used/kept during light sleep

Closes IDF-7595

See merge request espressif/esp-idf!37377
2025-03-20 13:03:48 +08:00
Chen Jichang
45ba78940f feat(esp32h4): finnal introduce hello world 2025-03-19 18:48:41 +08:00