Commit Graph

19 Commits

Author SHA1 Message Date
Meet Patel c4e2fe2c8b refactor(system): guard WDT with SoC capability macros
Wrap MWDT-related code under SOC_WDT_SUPPORTED so targets without a main
watchdog can compile.

Add SOC_RTC_WDT_SUPPORTED for RTC watchdog usage (bootloader, slow-clock
paths) and regenerate Kconfig.soc_caps.in. Bootloader RWDT setup stays
under SOC_RTC_WDT_SUPPORTED; MWDT flashboot teardown stays under
SOC_WDT_SUPPORTED.

ESP_INT_WDT, ESP_TASK_WDT_EN, and BOOTLOADER_WDT_ENABLE depend on
SOC_WDT_SUPPORTED where applicable. Build xt_wdt.c only when
SOC_XT_WDT_SUPPORTED. Provide no-op panic WDT helpers when
SOC_WDT_SUPPORTED is disabled.
2026-03-24 14:57:43 +05:30
Wu Zheng Hui 3f3100a2c4 Merge branch 'fix/fix_mspi_reset_order' into 'master'
fix(esp_system): fix c61 mspi core/axi reset order

See merge request espressif/esp-idf!44096
2025-12-17 15:12:06 +08:00
morris 291554cd09 refactor(global): remove completed todos in the codebase 2025-12-15 22:40:15 +08:00
wuzhenghui 5b827e1b04 fix(esp_system): fix c61 mspi core/axi reset order 2025-12-10 12:08:19 +08:00
Jiang Jiang Jian c467c91773 Merge branch 'fix/fix_mspi_write_stuck_after_reset' into 'master'
fix(esp_system): fix mspi write stuck after cpu/digital reset on c5/c61

Closes WIFIBUG-1577

See merge request espressif/esp-idf!43731
2025-12-04 10:34:53 +08:00
Jiang Jiang Jian dddc0bf6c8 Merge branch 'bugfix/fix_chip_hangup' into 'master'
bugfix: clear regdma status when restart

See merge request espressif/esp-idf!43860
2025-12-01 20:41:20 +08:00
wuzhenghui 925a339e32 fix(esp_system): fix mspi write stuck after cpu/digital reset on c5/c61 2025-12-01 19:40:39 +08:00
sibeibei c524e1e7e0 bugfix: clear regdma status when restart 2025-11-30 13:21:07 +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
Xiao Xufeng 40dd5e3957 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).

Also removed the DPORT_PERIP_RST_EN_REG alias on ESP32S2. Now it's the same as some following chips (EN0).
2025-10-20 01:34:32 +08:00
morris c4d7b1cfce refactor(uart)!: deprcated esp_rom_uart.h 2025-07-08 18:56:17 +08:00
wuzhenghui 5436d1f0c4 fix(esp_system): force enable uart0 sclk in esp_restart 2025-06-27 20:04:13 +08:00
Konstantin Kondrashov ff0408c087 feat(esp_system): Adds Kconfigs to place code in IRAM 2025-06-23 13:23:33 +03:00
harshal.patil e08189f37b fix(system_internal): Avoid the sec clock reset caused due to resetting all crypto peripherals 2025-05-22 16:01:02 +05:30
Mahavir Jain 55a2ad3df3 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-15 19:06:26 +05:30
Alexey Lapshin 10115792ac fix(espcoredump): fix GCC-14 analyzer warnings for coredump 2024-12-04 18:43:30 +08:00
Lou Tianhao 6274040f38 feat(pm): support modem clock for esp32c61 2024-08-13 11:03:21 +08:00
Song Ruo Jing 335d39b869 feat(clk): Add basic clock support for esp32c61
- Support SOC ROOT clock source switch
- Support CPU frequency change
- Support RTC SLOW clock source switch
- Support RTC SLOW clock + RC FAST calibration
- Remove FPGA build
2024-07-31 22:41:22 +08:00
wanlei a611e91b2f feat(esp32c61): new chip add system and esp_timer support 2024-03-21 11:31:15 +08:00