Commit Graph
3077 Commits
Author SHA1 Message Date
Xiao Xufeng 3e8389cc31 fix(mmap): fixed some API read wrong data via mmap when flash being erased/written while XIP on PSRAM
Before:

The cache won't be disabled when XIP on psram. But during flash
erasing/programming, read data will be courrupt.

When XIP in psram is enabled, the image is not mapped to the cache so
usually there will be no flash access. The only way to read from flash
is via the driver or use mmap. The driver has protection during erasing,
while th mmap region not.

Now:

Mmap APIs provide a flag to make mmap->unmap region mutually exclusive
to flash erase/programming when XIP from psram. SPI Flash write APIs
will benefit from this. When the flag is used, no concurrent access to
mapped region will happen while writing; otherwise the cache will be
disable to avoid data corruption.

Most ESP-IDF APIs calls mmap with this flag. As for users calling
mmap-like APIs directly, they can choose whether to enable this by a
flag.

Closes https://github.com/espressif/esp-idf/issues/14897
2026-07-15 18:57:08 +08:00
nilesh.kale 9b243dcf26 fix(esp_hw_support): Keep D-ROM PMP entry so newer apps boot on old bootloaders
ESP32-C6/H2 bootloaders <= v5.2.1 configure and lock PMP entries 3-4 as their
D-ROM region; a locked PMP entry cannot be reconfigured until CPU reset.
Commit 366e4ee944 ("Remove redundant PMP entry for ROM region") dropped the
D-ROM entry, and commit d4167fea60 (which also restructured C6/H2 PMP setup)
then renumbered the regions down, placing the application IRAM/DRAM split on
entries 3-4. On an already-deployed older bootloader those entries are locked,
so IRAM never gains execute permission and the chip resets before app_main()
(GitHub issue #18769).

Restore the separate (redundant) D-ROM PMP entry on indices 3-4 so the
application IRAM/DRAM split stays on entries 5-7, clear of the locked range.
This keeps newer applications bootable on older bootloaders.

Closes https://github.com/espressif/esp-idf/issues/18769
2026-07-03 20:57:04 +05:30
Jiang Jiang Jian edeec716c4 Merge branch 'fix/fix_sleep_cache_writeback_logic_v6.1' into 'release/v6.1'
fix(esp_hw_support): fix esp32s31 sleeping cache writeback logic (v6.1)

See merge request espressif/esp-idf!50347
2026-07-03 22:23:20 +08:00
Jiang Jiang Jian d6d41b0215 Merge branch 'feat/support_esp32s31_icg_control_v6.1' into 'release/v6.1'
feat(esp_hw_support): support PMU clock ICG management for esp32s31 (v6.1)

See merge request espressif/esp-idf!50107
2026-07-03 21:45:42 +08:00
wuzhenghui 3f2d963d47 fix(esp_hw_support): fix esp32s31 sleeping cache writeback logic 2026-07-03 19:13:25 +08:00
Sudeep Mohanty 93d4fad8b1 fix(esp_hw_support): use elif __riscv guard in spinlock.h
spinlock.h used #else to include riscv/rv_utils.h for all non-Xtensa
targets. On Linux host (neither __XTENSA__ nor __riscv defined), this
pulls in a non-existent header. Change to #elif __riscv, matching
esp_cpu.h's existing pattern.
2026-07-01 19:59:05 +08:00
Jiang Jiang Jian cf515d20d7 Merge branch 'feat/support_usb_wakeup_v6.1' into 'release/v6.1'
feat: support usb as wakeup source from light sleep (v6.1)

See merge request espressif/esp-idf!49497
2026-06-30 19:40:33 +08:00
wuzhenghui d5d3cddf23 feat(esp_hw_support): support PMU clock ICG management for esp32s31 2026-06-30 14:23:54 +08:00
Jiang Jiang Jian 3efceac515 Merge branch 'change/esp_idf_dpd_optimize_v6.1' into 'release/v6.1'
Change/esp idf dpd optimize v6.1

See merge request espressif/esp-idf!50039
2026-06-30 14:21:10 +08:00
Jiang Jiang Jian 6076baf054 Merge branch 'fix/use_unilock_for_sleep_process_v6.1' into 'release/v6.1'
fix(esp_hw_support): use same lock for lightsleep/deepsleep process (v6.1)

See merge request espressif/esp-idf!49848
2026-06-30 14:16:41 +08:00
Jiang Jiang Jian 2152f07b36 Merge branch 'backport-49753-to-release/v6.1' into 'release/v6.1'
feat: update_s31_wifi_low_power V6.1

See merge request espressif/esp-idf!49813
2026-06-30 14:15:45 +08:00
Jiang Jiang Jian d7053ae578 Merge branch 'fix/move_system_retention_to_esp_hw_support_v6.1' into 'release/v6.1'
refactor(esp_hw_support): move system_periph_retention from soc to esp_hw_support (v6.1)

See merge request espressif/esp-idf!49749
2026-06-30 14:14:08 +08:00
JiangGuangMingandCursor 5099acf16e feat(usb): add usb wakeup from light sleep example
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 16:08:35 +08:00
JiangGuangMingandCursor 4625335d93 feat(sleep/usb): support usb as wakeup source from light sleep
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 16:08:35 +08:00
hebinglin fba19e1d9a change(esp_hw_support): support optional delay for DPD entry and exit 2026-06-25 16:00:49 +08:00
wuzhenghui ef788b807a fix(esp_hw_support): use same lock for lightsleep/deepsleep process 2026-06-22 11:27:12 +08:00
Si Bei Bei 898dfb8508 update(pmu_param): update mdoem icg func clk
Due to c-channel design, ETM and BUS must be set to 1
2026-06-18 17:14:05 +08:00
Si Bei Bei acf119e26b update(pm_sleep): update modem_wait_target_cycle for s31 2026-06-18 17:13:42 +08:00
wuzhenghui 3ad4cfebd6 refactor(esp_hw_support): move system_periph_retention from soc to esp_hw_support 2026-06-17 12:17:19 +08:00
wuzhenghui 9c17817c98 fix(esp_hw_support): pd hp_alive domain in deepsleep 2026-06-15 10:31:07 +08:00
sibeibei f7a2fc94a6 feat(pm): select XTAL for HP dig_sysclk in modem state
On ESP32-S31, SOC and modem APB are decoupled, so the digital
system can run from XTAL while the modem domain stays in modem state.
2026-06-10 20:41:47 +08:00
sibeibei 1aeb773781 feat(wifi): enable pll clk in modem state 2026-06-10 20:41:04 +08:00
sibeibei 9a3b0b5f02 update(pmu_sleep): enable SOC_PM_PMU_MIN_SLP_SLOW_CLK_CYCLE_FIXED 2026-06-10 20:40:09 +08:00
sibeibei 4c9cdf8710 update(pmu_param): update hp modem clk config 2026-06-10 20:39:53 +08:00
sibeibei 3ec6a50986 update(sleep_clock.c): update clock retention 2026-06-10 20:39:42 +08:00
sibeibei 32a7c32c25 bugfix(apm): workaround to clear apm related reg on S31
Until full TEE/APM retention is supported (IDF-14620).
2026-06-10 20:39:29 +08:00
sibeibei d0434b0ddd change(esp_hw_support): enable wifi beacon wakeup and support wifi modem state for esp32s31 2026-06-10 20:39:21 +08:00
hebinglin f35500a156 fix(esp_hw_support): fix retention hang when no module in link 2026-06-05 11:32:50 +08:00
Jiang Jiang Jian 1280ccfbec Merge branch 'bugfix/add_monitor_en_rst_in_pvt_func_backport_v6.1' into 'release/v6.1'
feat(pvt): fix monitor en rst error in pvt func on v 6.1

See merge request espressif/esp-idf!49028
2026-06-05 10:29:54 +08:00
Jiang Jiang Jian d5ad96e397 Merge branch 'task/v2_aware_component_and_test_gates_v6.1' into 'release/v6.1'
fix(components): linux host-build failure fixes+ disable esp_tee in buildv2 + esp_hw_support and xtensa fixes (v6.1)

See merge request espressif/esp-idf!48919
2026-06-05 10:27:29 +08:00
yanzihan@espressif.com 431ff945c7 feat(pvt): fix monitor en rst error in pvt func on v6.1 2026-06-04 17:34:54 +08:00
morris ce34e39eac Merge branch 'feat/debug_probe_esp32s31_v6.1' into 'release/v6.1'
feat(debug): add esp32s31 debug probe support (v6.1)

See merge request espressif/esp-idf!48893
2026-06-04 11:19:51 +08:00
morris fe819275c0 Merge branch 'doc/update_ldo_doc_esp32s31_v6.1' into 'release/v6.1'
docs(ldo): corrected the LDO channel numbers in the programming guide (v6.1)

See merge request espressif/esp-idf!49159
2026-06-04 11:01:17 +08:00
wuzhenghui 01fff26fee fix(esp_hw_support): fix possible dead lock in deepsleep process 2026-06-02 17:48:02 +08:00
morris 2b36e6308a docs(ldo): corrected the LDO channel numbers in the programming guide 2026-06-02 14:51:17 +08:00
wuzhenghui 93cbc81ecf change(sleep_gpio): streamline GPIO sleep configuration logic 2026-05-29 14:12:09 +08:00
Sudeep Mohanty 29f6318b02 fix(esp_hw_support): move linux spinlock.h to esp_hw_support/include/linux
Moved the linux spinlock.h stub into esp_hw_support/include/linux.
esp_hw_support's INCLUDE_DIRS already places include/linux before
include, so the correct include files are picked up for the linux
target.

- Drop the FreeRTOS-Kernel-SMP linux spinlock.h duplicate.
- rv_decode_test: use PRIV_REQUIRES esp_hw_support instead of
  hardcoding component include paths.
2026-05-26 13:10:41 +02:00
morris e20db709aa feat(debug): add esp32s31 debug probe support
- add ESP32-S31 debug probe LL, target IDs, capability macros, and GPIO signal mapping
- allow LP probe channels to configure four signal bytes while keeping 16 GPIO outputs
- add HP and LP probe read tests, including LP 32-bit read verification
- keep existing vbat LP probe usage aligned with the new LP channel behavior
2026-05-25 19:03:37 +08:00
morris c23e87b81b Merge branch 'bugfix/esp32s31_raise_ahb_clk_freq' into 'master'
fix(clk): raised ESP32S31 axi/ahb clock freq up to 106mhz at max

Closes IDF-14696

See merge request espressif/esp-idf!48207
2026-05-25 18:23:37 +08:00
morris 7ce07cb910 Merge branch 'refactor/enable_io_mux_clock' into 'master'
fix(iomux): move source gating to IOMUX consumers

Closes IDF-12975 and IDF-12852

See merge request espressif/esp-idf!48530
2026-05-25 12:31:50 +08:00
Aditi 18cbdbf2b1 feat(esp_wifi): Add improvements for privacy extension
1) Add support for MAC randomization in Active scan and connect
  2) Add support for randomizaton of sequence numbers
  3) Add support for randomization of dialog token for GAS frames
2026-05-25 11:22:45 +08:00
He Binglin 3bf83125b4 Merge branch 'change/esp_idf_ext1_unhold' into 'master'
Optimize parts of the sleep wake-up flow

See merge request espressif/esp-idf!47322
2026-05-25 11:15:22 +08:00
morris 38c4f27102 fix(iomux): move clock source gating to IOMUX consumers
Remove io_mux_set_clock_source internal source enabling and make SDM,
ana_cmpr, and gpio glitch filter drivers explicitly manage clock source
enable/disable with safe cleanup paths.
2026-05-22 19:10:08 +08:00
He Binglin f3ee69582e Merge branch 'change/esp_idf_h4h21_modem_clock_retention_passive' into 'master'
Change/esp idf h4h21 modem clock retention passive

Closes IDFCI-11613, IDFCI-11628, and IDFCI-11614

See merge request espressif/esp-idf!48557
2026-05-22 18:02:24 +08:00
He Binglin eec18ba80a Merge branch 'doc/esp_idf_flash_pwr_description' into 'master'
docs(pm): add flash sleep strategy recommendations

See merge request espressif/esp-idf!45689
2026-05-22 17:44:50 +08:00
hebinglin b160ba668d change(esp_hw_support): add i2c_mst_st_map and lp_apb_st_map in h4 i2c_mst enable way 2026-05-22 15:18:31 +08:00
hebinglin f73d67acb2 revert(esp_hw_support): add modem_lpcon retention for esp32h21 2026-05-22 15:18:24 +08:00
Wu Zheng Hui 2fcaddb700 Merge branch 'fix/fix_psram_data_corrupt_after_lightsleep' into 'master'
fix(esp_hw_support):fix psram data corrupt after lightsleep

Closes PM-941

See merge request espressif/esp-idf!48322
2026-05-22 15:11:41 +08:00
hebinglin 23f6b5985a change(esp_hw_support): disable flash pd in h4 h21 c5 c61 2026-05-22 12:30:44 +08:00
hebinglin 418ffbe2a6 change(esp_pm): move timer wakeup set out of critical section 2026-05-22 11:45:21 +08:00