This is an automated email from the ASF dual-hosted git repository.

linguini1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new d6497328775 arch/risc-v: Fix Espressif timer registering ID
d6497328775 is described below

commit d64973287755f45dec03aa027b17659ca7cd6e91
Author: Tiago Medicci Serrano <[email protected]>
AuthorDate: Fri May 8 13:52:05 2026 -0300

    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 <[email protected]>
---
 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 */
 

Reply via email to