From d64973287755f45dec03aa027b17659ca7cd6e91 Mon Sep 17 00:00:00 2001 From: Tiago Medicci Serrano Date: Fri, 8 May 2026 13:52:05 -0300 Subject: [PATCH] arch/risc-v: Fix Espressif timer registering ID Fix Espressif timer registering ID. Espressif's general purpose timers are grouped in different Timer Groups, which may contain more than one general purpose timer. The current implementation is related to the timer groups (timer0 refers to Timer Group 0, for instance), but previous registering method was referring to the timer inside each group, which caused it to fail when more than one timer group was being selected because only the first timer on each group is being actually registered. Signed-off-by: Tiago Medicci Serrano --- arch/risc-v/src/common/espressif/esp_gptimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/risc-v/src/common/espressif/esp_gptimer.c b/arch/risc-v/src/common/espressif/esp_gptimer.c index 3fb1c4faa8d..ce9060c9ad2 100644 --- a/arch/risc-v/src/common/espressif/esp_gptimer.c +++ b/arch/risc-v/src/common/espressif/esp_gptimer.c @@ -601,7 +601,7 @@ int esp_timer_initialize(int group_id) return -ENOMEM; } - snprintf(devpath, PATH_MAX, "/dev/timer%" PRIu32, lower->hal.timer_id); + snprintf(devpath, PATH_MAX, "/dev/timer%d", group_id); /* Initialize the elements of lower half state structure */