31 Commits

Author SHA1 Message Date
Angus Gratton b9cbbf9bfe fix(esp_system): Allow esp_task_wdt_reconfigure() if timer is stopped
If Task WDT is initialised but not start, the call to esp_timer_stop() in
the reconfigure path returns ESP_ERR_INVALID_STATE and reconfiguring the
Task WDT fails. This isn't the case when the Timer Group is used for Task
WDT.

(This failure cascades into the failure due to disabled interrupts, fixed
in the parent commit.)

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2026-02-12 16:42:38 +08:00
Angus Gratton d20510719a fix(esp_system): Handle failures correctly in esp_task_wdt_reconfigure()
- Failures were being masked as function always returned ESP_OK
- In the failure path the spinlock was not unlocked, so interrupts
  became permanently disabled.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2026-02-12 16:42:38 +08:00
morris e8de5b5a95 refactor(gptimer): clean up SOC capabilities for GPTIMER and Timer Group
- Remove GPTIMER and TIMG related definitions from soc_caps_full.h files
- Move timer peripheral definitions to appropriate HAL layer files
- Update references across components to use proper HAL abstractions
- Consolidate timer group and GPTIMER capabilities organization
- Ensure consistent timer configuration across all ESP32 variants

This refactoring improves the separation of concerns between SOC
capabilities and HAL implementations for timer-related functionality.
2025-10-14 11:44:38 +08:00
morris 71cb24caab feat(timg): graduate the hal driver into a single component 2025-09-27 17:33:10 +08:00
Konstantin Kondrashov b7da740f12 Merge branch 'feature/log_v2_optimization' into 'master'
feat(log): Optimize idf components for binary logging

Closes IDF-12775

See merge request espressif/esp-idf!40289
2025-09-19 14:45:43 +08:00
Sudeep Mohanty bb0f072c7a refactor(freertos): Make task snapshot debug API public
This commit makes the task snapshot related API public under the header
freertos_debug.h.
2025-09-15 16:13:29 +02:00
Konstantin Kondrashov dcf486359e feat(log): Optimize log tag init for bin logging 2025-09-15 15:59:52 +03:00
Omar Chebib 20da6a9a5c fix(esp_system): task wdt now checks the interrupt allocator return value 2025-06-26 11:38:38 +08:00
Li Shuai 77a1e2931d change: fix build clang test apps job error 2025-04-17 22:01:10 +08:00
wanckl cfe4bf339f feat(driver_gptimer): esp32h21 add basic gptimer support 2025-02-21 20:22:41 +08:00
Marius Vikhammer 1d0fa29970 Merge branch 'feat/h21_interrupts' into 'master'
feat(intr): clean up and support interrupts on H21

Closes IDF-11535 and IDF-11537

See merge request espressif/esp-idf!36503
2025-01-23 12:13:34 +08:00
Marius Vikhammer 267a8776a0 feat(intr): clean up and support interrupts on H21 2025-01-20 15:10:30 +08:00
Omar Chebib ead2c8655e feat(esp_system): TaskWDT can now use frame pointer to print the backtrace 2025-01-09 11:57:02 +08:00
gaoxu 25731d0c1e feat(esp32h21): finnal introduce hello world support 2024-12-30 20:14:40 +08:00
Li Shuai 8eea8a8ef3 change(esp_hw_support): update some modules sleep retention init dependency bitmap 2024-11-18 15:40:47 +08:00
Marius Vikhammer 0d140f38ea fix(system): fixed warnings related to ununsed var if asserts disabled 2024-08-26 10:25:04 +08:00
wuzhenghui ffd08ac41b change(esp_hw_support): use union retention link priority definiation 2024-05-28 15:19:27 +08:00
wuzhenghui a68668c392 change(esp_hw_support): do timergroup watchdogs retention by needs 2024-05-28 15:17:19 +08:00
fl0wl0w 90d1dcfd76 feat(freertos): Introduced new Kconfig option CONFIG_FREERTOS_NUMBER_OF_CORES
This commit replaces the use of portNUM_PROCESSORS and configNUM_CORES
macros in all of ESP-IDF. These macros are needed to realize an SMP
scenario by fetching the number of active cores FreeRTOS is running on.
Instead, a new Kconfig option, CONFIG_FREERTOS_NUMBER_OF_CORES, has been
added as a proxy for the FreeRTOS config option, configNUMBER_OF_CORES.
This new commit is now used to realize an SMP scenario in various places
in ESP-IDF.

[Sudeep Mohanty: Added new Kconfig option CONFIG_FREERTOS_NUMBER_OF_CORES]

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
2024-02-09 09:11:28 +01:00
Marius Vikhammer 06850e0e1e refactor(system): removed esp_system from astyle ignore list and reformated it 2024-01-30 15:17:15 +08:00
Erhan Kurubas 58ee206c99 feat(coredump): save twdt panic output to coredump elf file 2023-12-05 13:28:51 +01:00
fl0wl0w d149c1b26f Use configuration option instead of in components not related to FreeRTOS
Mergeshttps://github.com/espressif/esp-idf/pull/12481
2023-11-28 07:49:20 +00:00
Sudeep Mohanty d38f100223 change(freertos/idf): Deprecate some FreeRTOS IDF addition functions
This commit deprecates xTaskGetAffinity(), xTaskGetCurrentTaskHandleForCPU()
and xTaskGetIdleTaskHandleForCPU() APIs for IDF-FreeRTOS kernel.
Instead, users are directed to use alternatives. All other
components in IDF using these functions have been updated accordingly.
2023-11-03 14:54:06 +01:00
Marius Vikhammer 22091c8744 feat(wdt): add multicore support for WDTs on RISCV 2023-10-23 18:26:08 +08:00
Darian Leung 9968a48c36 refactor(freertos/task_snapshot): Make task snapshot private
Task snapshot API were never intended to be called from user code. This commit
makes task snapshot a private API thus moves `#include "freertos/task_snapshot.h"`
to `#include "esp_private/freertos_debug.h"`.

Task snapshot related Kconfig options have also been hidden.

Note: Added 'freertos_common' mapping to ldgen mapping execptions lists due to
inlining of 'freertos_debug.h' functions.
2023-10-07 13:14:55 +08:00
morris 71cf16ec01 feat(gptimer): use RCC atomic block to enable/reset peripheral 2023-08-22 17:05:35 +08:00
Armando a336b94527 feat(esp_system): base support on p4 2023-07-25 05:59:10 +00:00
Gustavo Henrique Nihei 2a2bd0f8ff esp_system: Fix TIMG0 still enabled after Timer is freed
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-06 04:58:11 +00:00
Marius Vikhammer 5d26a0de9a wdt: add support for H2 2023-02-23 11:22:51 +08:00
Omar Chebib c8614a0dbf esp_timer: add a function to restart timer
Timers, periodic or not, can now be restarted thanks to esp_timer_restart function.
This is done atomically, which can be used to feed a periodic timer, or simply change the period.
2022-10-18 04:42:27 +00:00
Omar Chebib 30d12af191 TWDT: refactor the TWDT to be driver agnostic
This refactoring brings a private API for the TWDT implementation, which
can now use a hardware timer (Timer Group) or a software timer (esp_timer)
2022-09-15 14:37:59 +08:00