Commit Graph

655 Commits

Author SHA1 Message Date
Jiang Jiang Jian
eb64ef291a Merge branch 'fix/fix_xtal32k_power_breaks_adc_v5.4' into 'release/v5.4'
fix(esp_system): fix XTAL32K power breaks ADC function on 32k XTAL clock pin (v5.4)

See merge request espressif/esp-idf!43372
2025-12-03 10:32:17 +08:00
Song Ruo Jing
7bb3b130ce fix(uart): fix RTC wdt get triggered due to uart sclk not exist on C5
RTC wdt would get triggered on esp_restart if uart driver was deleted before
2025-11-24 11:38:07 +08:00
Song Ruo Jing
aef9061d93 fix(console): release default console UART pins if console is switched in bootloader
Also print out console UART pin number in app cpu_startup stage

Closes https://github.com/espressif/esp-idf/issues/16764
Closes https://github.com/espressif/esp-idf/issues/17459
2025-11-22 17:52:31 +08:00
morris
14dd2d23fa Merge branch 'feature/esp32p4_eco5_io_hold_v5.4' into 'release/v5.4'
feat(gpio): add IO hold support for Deep-sleep for ESP32-P4 ECO5 (v5.4)

See merge request espressif/esp-idf!43309
2025-11-19 16:32:25 +08:00
morris
7f11b39856 Merge branch 'bugfix/usb_dp_pin_unusable_after_cpu_reset_v5.4' into 'release/v5.4'
fix(gpio): fix USB DP pin unusable after CPU reset for S3/C3 (v5.4)

See merge request espressif/esp-idf!42801
2025-11-19 15:45:59 +08:00
Song Ruo Jing
b9819b3ed8 fix(clk): add compile warning if 400MHz CPU freq is used on ESP32P4 less than rev3 2025-11-18 11:30:24 +08:00
Song Ruo Jing
5b576f9ece fix(gpio): fix USB DP pin unusable after CPU reset for S3/C3
Closes https://github.com/espressif/esp-idf/issues/17488
2025-11-14 21:00:50 +08:00
wuzhenghui
7168e29678 fix(esp_system): fix XTAL32K power breaks ADC function on 32k XTAL clock pin 2025-11-14 14:14:29 +08:00
Song Ruo Jing
55f3730ba4 feat(2ddma): ESP32P4 ECO5 2DDMA related updates
Added one more pair of 2DDMA channels
Priority bit width increased corespondingly
Added three new CSC modes for RX channel 0
2025-11-13 15:47:15 +08:00
Marius Vikhammer
477c861339 Merge branch 'fix/cdcacm-callback-placement_v5.4' into 'release/v5.4'
fix(esp_vfs_console): Update placement of cdcacm_xx_cb when ETS print enabled (v5.4)

See merge request espressif/esp-idf!41332
2025-11-10 21:50:23 +08:00
morris
80971b25da Merge branch 'feat/p4_eco5_real_chip_v5.4' into 'release/v5.4'
p4: p4 eco5 real chip (v5.4)

See merge request espressif/esp-idf!42063
2025-10-26 22:38:34 +08:00
morris
5583963765 Merge branch 'fix/clear_force_on_reg_for_cache_v5.4' into 'release/v5.4'
fix(clk): do not clear force_on reg for cache (v5.4)

See merge request espressif/esp-idf!42178
2025-10-26 22:27:28 +08:00
Xiao Xufeng
147ec10b86 dma: fixed issue that DMA are not reset when CPU reset
When DMA keep writing the memory, some data may be corrupted after reset. For example, the stack of bootloader may be overwritten and failed to boot until a higher scope of reset (Core).
2025-10-25 02:15:23 +08:00
armando
a70a29b7a6 feat(p4): p4 rev3 real chip support 2025-10-13 15:24:14 +08:00
yanzihan@espressif.com
ea4451d6b3 feat(clk): add 100m/200m/400m cpu freq & change clk cal & change blk version 2025-10-13 15:24:14 +08:00
armando
b3fd689da9 feat(esp32p4): support rev3 on fpga 2025-10-13 15:24:14 +08:00
wuzhenghui
b20d8c1afb fix(esp_system): fix ext 32k io revoking breaks sleep io holding 2025-10-10 20:20:50 +08:00
Guillaume Souchere
651607d1ed fix(esp_vfs_console): Update placement of cdcacm_xx_cb when ETS print enabled 2025-10-01 08:43:44 +02:00
Chen Jichang
6e5f96136d fix(clk): clear force_on reg for cache 2025-09-29 13:48:09 +08:00
Jiang Jiang Jian
378bab6e55 Merge branch 'feat/usb-cdc-select_v5.4' into 'release/v5.4'
feat(usb_cdc): Add select functionality (backport v5.4)

See merge request espressif/esp-idf!40892
2025-08-26 10:51:11 +08:00
Jiang Jiang Jian
d9251d7efd Merge branch 'bugfix/brownout_log_v5.4' into 'release/v5.4'
fix: change brownout log from INFO to ERROR (v5.4)

See merge request espressif/esp-idf!40960
2025-08-04 10:38:18 +08:00
Mahavir Jain
f778e6fcac fix: change brownout log from INFO to ERROR 2025-08-01 08:48:23 +05:30
Guillaume Souchere
d5dca1a78d feat(usb_cdc): Add select functionality 2025-07-29 10:14:19 +02:00
wuzhenghui
1de92b2e70 fix(esp_hw_support): enable ESP_SLEEP_RTC_FAST_USE_XTAL_MODE only once in RTC_FAST selection 2025-07-25 16:51:58 +08:00
wuzhenghui
37d25de531 fix(esp_system): force enable uart0 sclk in esp_restart 2025-07-03 19:16:56 +08:00
yanzihan@espressif.com
34b8f67a89 feat(esp_hw_support): use pvt to auto control digital ldo and rtc ldo for esp32p4 2025-06-25 18:22:02 +08:00
Sudeep Mohanty
f56cf54183 fix(panic_handler): Prevent race condition in panic handler
This commit updates all RTC WDT contexts to be local instead of global
to avoid race conditions when both cores enter the panic handler
simultaneously.
2025-04-25 09:10:58 +02:00
Mahavir Jain
5cdc53df23 fix(esp_system): reset crypto peripherals before device restart
This change addresses a rare but critical issue observed on certain
ESP32-C3 and ESP32-S3 devices, where secure boot verification
intermittently fails due to improper cleanup of crypto peripherals
during a restart.

Background – Restart Behavior in IDF
------------------------------------
In ESP-IDF, when the device restarts (via `esp_restart()` or due to a
panic/exception), a partial peripheral reset is performed followed by a
CPU reset. However, until now, crypto-related peripherals were not
included in this selective reset sequence.

Problem Scenario
----------------
If a restart occurs while the application is in the middle of a bignum
operation (i.e., using the MPI/Bignum peripheral), the ROM code may
encounter an inconsistent peripheral state during the subsequent boot.
This leads to transient RSA-PSS secure boot verification failures.

Following such a failure, the ROM typically triggers a full-chip reset
via the watchdog timer (WDT). This full reset clears the crypto
peripheral state, allowing secure boot verification to succeed on the
next boot.

Risk with Aggressive Revocation
-------------------------------
If secure boot aggressive revocation is enabled (disabled by default in
IDF), this transient verification failure could mistakenly lead to
revocation of the secure boot digest.

If your product configuration has aggressive revocation enabled,
applying this fix is strongly recommended.

Frequency of Occurrence
-----------------------
The issue is rare and only occurs in corner cases involving
simultaneous use of the MPI peripheral and an immediate CPU reset.

Fix
---
This fix ensures that all crypto peripherals are explicitly reset prior
to any software-triggered restart (including panic scenarios),
guaranteeing a clean peripheral state for the next boot and preventing
incorrect secure boot behavior.
2025-04-23 17:53:09 +08:00
Jiang Jiang Jian
9f8548bb2d Merge branch 'feat/enable_esp32p4_auto_clock_gate_v5.4' into 'release/v5.4'
feat(esp_hw_support): enable auto clock gating for multi peripherals (v5.4)

See merge request espressif/esp-idf!38443
2025-04-17 17:13:40 +08:00
wuzhenghui
7643f77225 feat(esp_hw_support): enable auto clock gating for multi peripherals 2025-04-16 15:08:51 +08:00
wuzhenghui
ba88b91e28 fix(esp_hw_support): fix unused OSC source deinit breaks XTAL32K configuration 2025-04-16 14:56:49 +08:00
wuzhenghui
54c4606111 fix(esp_hw_support): fix current leakage if ext32k slow clock source not exists 2025-04-16 14:56:12 +08:00
Wang Meng Yang
0cecb7bcf3 Merge branch 'bug/xtensa_cpu1_sys_lockup_v5.4' into 'release/v5.4'
fix(panic_handler): Updated panic handler to use RTC WDT (v5.4)

See merge request espressif/esp-idf!37112
2025-04-01 14:51:18 +08:00
wuzhenghui
6de3fde3c2 fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart 2025-03-10 11:40:10 +08:00
Armando
419e8b2e20 fix(mspi): fixed cpu and mspi freq mismatch issue when in dfs/sleep on p4 2025-03-08 14:06:09 +08:00
Sudeep Mohanty
cd887ef59a fix(panic_handler): Updated panic handler to use RTC WDT
This commit updates the following:
- Updates the panic handler to use only the RTC WDT to reset the system.
- Refactors some of the panic handler code.
- Updates Bluetooth files where in they now feed the WDTs instead of
  reconfiguring them.
- Removes some unnecessary configuration of WDTs from various files.
- Added a unit test to verify that the system does not lock up when the
  panic handler is stuck.
- Updates the memprot unit tests to work with the refactored panic
  handler.

Closes https://github.com/espressif/esp-idf/issues/15166
Closes https://github.com/espressif/esp-idf/issues/15018
Closes https://github.com/espressif/esp-idf/issues/10110
2025-03-06 09:17:26 +01:00
wuzhenghui
1e11f287e1 change(esp_hw_support): disable CPU wait-for-event mode on cpu start 2025-02-18 19:21:09 +08:00
Jiang Jiang Jian
97404fa883 Merge branch 'fix/fix_branch_predictor_access_flash_after_cache_diabled_v5.4' into 'release/v5.4'
fix(esp_hw_support): fix branch predictor access flash after cache disabled (v5.4)

See merge request espressif/esp-idf!36558
2025-02-12 17:59:36 +08:00
Li Shuai
c74a5e3e8e change(esp_hw_support): fix wifi mac rx buffer link exception caused by pll clock 2025-01-26 14:54:33 +08:00
wuzhenghui
cfcd8990f6 fix(esp_hw_support): fix branch predictor access flash after cache disabled 2025-01-22 19:24:48 +08:00
laokaiyao
889537960e refactor(lpperi): improve compatibility solution 2025-01-16 10:21:17 +08:00
morris
1cb5c64fc0 Merge branch 'refactor/update_lpperi_regs_for_h2_eco5_v5.4' into 'release/v5.4'
refactor(lpperi): compatible refactor for H2 ECO5 (v5.4)

See merge request espressif/esp-idf!36335
2025-01-15 16:09:59 +08:00
laokaiyao
25f64d9cbd refactor(lpperi): compatible refactor for H2 ECO5 2025-01-13 14:36:00 +08:00
morris
605fb6e894 fix(dma): abort the axi dma gracefully on CPU SW reset 2025-01-10 10:14:36 +08:00
morris
ac6e1341c4 Merge branch 'fix/flash_noos_issues_v5.4' into 'release/v5.4'
flash: fixed some no_os API issues (v5.4)

See merge request espressif/esp-idf!35791
2025-01-08 22:12:16 +08:00
Armando
4a9fb951cf fix(cache): fixed cache hal ctx not initialised in app issue 2025-01-07 20:08:02 +08:00
Erhan Kurubas
954132b68a fix(system): avoid unexcpected hp_sys_wdt reset 2025-01-07 20:07:17 +08:00
Marius Vikhammer
012de83f3c Merge branch 'fix/coredump-gcc-analyzer-warnings_v5.4' into 'release/v5.4'
fix(system): fix GCC-14 analyzer warnings for coredump (v5.4)

See merge request espressif/esp-idf!35521
2025-01-06 14:38:23 +08:00
Song Ruo Jing
77e88f98cd fix(esp_system): still gate hp periph clk on core/system reset for power saving
Leaving only hp periph clk source should not be gated on core/system reset
2024-12-12 21:03:37 +08:00
Song Ruo Jing
192f01c65f fix(esp_system): hp periph clk should not be gated on core/system reset 2024-12-12 21:03:37 +08:00