Commit Graph
204 Commits
Author SHA1 Message Date
Marius Vikhammer 5967653bdd Merge branch 'fix/esp_timer_task_dispatch_wedge_v6.1' into 'release/v6.1'
fix(esp_timer): Fix esp_timer task dispatch stall (v6.1)

See merge request espressif/esp-idf!51610
2026-08-31 15:52:24 +08:00
Konstantin Kondrashov 2f8ef67a2d test(esp_timer): Restrict LAC-timer alarm test to ESP32 only
The "set timer < now_time" test targets the ESP32 LAC timer (magic
constant 0xefffffff/80 and a tick-based tolerance) and is not valid on
systimer-based targets, where it fails under the ISR-dispatch configs.
On master it is already guarded with CONFIG_IDF_TARGET_ESP32; this guard
was not backported to v6.1. Add the same guard here.
2026-08-28 16:52:22 +03:00
Zhou Xiao d11ebac1df fix(esp_timer): prevent restart expiry race 2026-08-27 12:55:13 +03:00
Sudeep Mohanty 6685c636b3 test(esp_timer): Add regression test for esp_timer task dispatch stall 2026-08-27 12:55:06 +03:00
Sudeep Mohanty 0da6fc569a fix(esp_timer): Fix esp_timer task dispatch stall
The task dispatch method for the esp_timer could stall even if it is
armed if ther ISR dispatch alarm triggers close to the task dispatch.
This MR fixes a bug where the esp_timer cleared the incorrect cached
array timer index and subsequently the timer task is never woken up.

Closes https://github.com/espressif/esp-idf/issues/18808
2026-08-27 12:55:06 +03:00
Renz Bagaporo abc386e154 fix(esp_timer): enable dump overflow test on linux 2026-08-27 09:16:02 +08:00
Renz Bagaporo 21c4f307de fix(esp_timer): avoid dump buffer overflow
print_timer_info advanced the dump cursor by snprintf's return value. When a timer line was truncated, snprintf returned the full would-be length, which could move the cursor past the heap buffer and wrap the remaining size before the next write. Add a bounded append helper that clamps truncation to the end of the buffer while preserving the NUL terminator.
2026-08-27 09:16:02 +08:00
Renz Bagaporo 97f9a36b2d fix(esp_timer): add target test for long dump lines 2026-08-27 09:16:02 +08:00
Marius Vikhammer a7cd49bc04 test(esp_timer): increased test latency requirement for H4 2026-06-16 14:38:56 +08:00
Marius VikhammerandCursor 8f6ea2a1ba test(ci): re-enable ESP32-H4 in core system test apps
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-13 09:00:12 +08:00
Chen Jichang 3c3b9a6a4e ci(esp32h4): disable tests which cannot pass 2026-05-11 16:48:58 +08:00
Marius Vikhammer b057a76d28 test(esp_timer): enable ESP32-S31 target tests 2026-04-03 16:11:41 +08:00
Marius VikhammerandCopilot 4ab44312d4 fix(esp_timer): enable systimer functional clock on ESP32-S31
ESP32-S31 has a separate functional clock gate for the systimer
(reg_systimer_clk_en in HP_SYS_CLKRST) that defaults to off. Without
it, the counter snapshot never completes, hanging execution inside
esp_timer_init_nonos.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-18 11:08:40 +08:00
Chen Chen eeb24057c4 refactor(hal): graduate systimer hal driver into esp_hal_systimer 2026-02-06 18:08:57 +08:00
Marius Vikhammer 5f914189c2 ci(core): removed common_components from core test-apps dependencies 2026-01-26 11:47:23 +08:00
igor.udot 4c26ab876b ci: update build-test-rules to use common_components 2026-01-23 10:14:09 +08:00
Marius Vikhammer 99a1bd202f docs(esp_timer): clean up header file documentation 2026-01-19 18:08:44 +08:00
Konstantin Kondrashov 8569da1ba8 feat(esp_timer): Adds blocking stop function 2026-01-07 09:26:57 +02:00
Konstantin Kondrashov 3e74ff2b33 refactor(esp_timer): Remove unnecessary nested list lock 2026-01-06 21:52:53 +02:00
Konstantin Kondrashov 0255a7e164 feat(esp_timer): esp_timer_is_active while callback is running 2026-01-06 21:52:53 +02:00
Xiao Xufeng 73735f3e87 test: merge chip-specific performance data headers 2026-01-01 02:35:58 +08:00
Xiao Xufeng 438e07b30e refactor: Remove idf_test component
Split the idf_performance.h and target ver, which hold the performance
thresholds, into the headers of each testing.

In the past pytest also parse the common header to get the thresholds.
Now the logic is also removed. Performance thresholds are supposed to be
in the pytest scripts.
2026-01-01 02:26:42 +08:00
C.S.M f405e51784 ci(esp32s31): Add ci build test for esp32s31 2025-12-11 15:17:15 +08:00
Huelsenfrucht b3ccc1316d feat(esp_timer): Support absolute timing APIs
Merges https://github.com/espressif/esp-idf/pull/17807
2025-12-09 11:05:40 +02:00
Konstantin Kondrashov 41fddce773 feat(esp_timer): Update depends_components
Where esp_timer is used as depends_components:
- components/esp_timer/test_apps
- examples/system/esp_timer
2025-11-25 19:23:45 +02:00
Marius Vikhammer 9a32500f74 ci(esp_timer): re-enable ci tests for esp-timer on p4 eco5 2025-11-21 09:47:40 +08:00
morris aa1fd9c611 refactor: avoid function calls inside MIN/MAX macros 2025-11-17 22:17:54 +08:00
armando b25ba4a0c1 ci(p4): disable p4 rev3 invalid tests temporarily 2025-11-17 12:11:39 +08:00
Marius Vikhammer 113d69f188 test(core): add WDT protection to detect stuck tests 2025-10-24 10:48:13 +08:00
morris 71cb24caab feat(timg): graduate the hal driver into a single component 2025-09-27 17:33:10 +08:00
Marius Vikhammer 88c9af78a7 Merge branch 'change/allow_esp_timer_init_from_user_code' into 'master'
change(esp_timer): esp_timer_init_os now returns ESP_OK if esp_timer already initialized

Closes IDFGH-8182

See merge request espressif/esp-idf!42069
2025-09-25 10:23:11 +08:00
Marius Vikhammer 16cdbd9f5c change(esp_timer): esp_timer_init_os now returns ESP_OK if already initialized
Previously it would return ESP_ERR_INVALID_STATE, which meant that if called from
user-code before the system tries to initialize the timer then esp-idf would
fail to boot.

This could happen if a user wanted to use esp-timer from a cpp constructor.

Closes https://github.com/espressif/esp-idf/issues/9679
2025-09-22 14:01:56 +08:00
Konstantin Kondrashov dcf486359e feat(log): Optimize log tag init for bin logging 2025-09-15 15:59:52 +03:00
Marius Vikhammer 32d85658fe Merge branch 'bugfix/esp_timer_dump_corruption' into 'master'
fix(esp_timer): fixed potential buffer overflow with esp_timer_dump()

Closes IDFGH-16067

See merge request espressif/esp-idf!41269
2025-08-22 15:10:59 +08:00
Marek Fiala 9d35d63651 feat(cmake): Update minimum cmake version to 3.22 (whole repository) 2025-08-19 14:44:32 +02:00
Marius Vikhammer b0b76f3792 fix(esp_timer): fixed potential buffer overflow with esp_timer_dump()
esp_timer_dump could overflow when dumping a large amount of timers

Closes https://github.com/espressif/esp-idf/issues/17008
2025-08-14 20:01:55 +08:00
Marius Vikhammer 4065fb20f3 Merge branch 'feature/esp_test_utils_component' into 'master'
change(test_utils): moved test_utils out of unit-test-app project

See merge request espressif/esp-idf!40678
2025-08-01 11:04:37 +08:00
Song Ruo Jing f61e780f60 refactor(clk): deprecate rtc_cal_sel_t enum 2025-07-30 20:01:46 +08:00
Marius Vikhammer bf84ab652a change(test_utils): moved test_utils component to tools/test_apps/components/ 2025-07-21 14:05:50 +08:00
wuzhenghui 12d2347e24 change(esp_timer): make esp_timer timming drift always be negative 2025-06-13 20:38:46 +08:00
wuzhenghui f861b7dd65 fix(esp_hw_support): config lact in critical 2025-06-13 20:38:46 +08:00
wuzhenghui 481f42ac9d test(esp_timer): add UT case for esp_timer period alarm with DFS 2025-05-22 13:58:54 +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
Chen Jichang c34b4eb882 feat(esp32h4): enable ESP32H4 ci build 2025-03-28 14:41:28 +08:00
Marius Vikhammer 55be8bdc0d feat(esp_timer): added kconfig option for placing IRAM code into flash 2025-03-18 15:23:43 +08:00
igor.udot daf2d31008 test: format all test scripts 2025-03-05 12:08:48 +08:00
gaoxu 5ef4f20778 feat(esp32h21): disable unsupported build test 2025-02-06 15:47:51 +08:00
Marius Vikhammer 34c7d62855 refactor(hw_support): combine esp_hw_support rtc header to a single file 2024-12-30 10:09:34 +08:00
gaoxu b240defc75 feat(esp32h21): support esp_system, esp_timer and freertos (stage5) 2024-12-20 22:43:10 +08:00