You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/28 02:43:54 UTC
(nuttx) branch master updated: arch/xtensa/esp32s3: fix timer initialization
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang 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 a64171f059 arch/xtensa/esp32s3: fix timer initialization
a64171f059 is described below
commit a64171f059b0c034e26defedda06da225c0c89ca
Author: Filipe Cavalcanti <fi...@espressif.com>
AuthorDate: Wed Sep 25 11:05:08 2024 -0300
arch/xtensa/esp32s3: fix timer initialization
---
arch/xtensa/src/esp32s3/esp32s3_tim.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/xtensa/src/esp32s3/esp32s3_tim.c b/arch/xtensa/src/esp32s3/esp32s3_tim.c
index b9b109f920..95d5fdf878 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_tim.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_tim.c
@@ -37,6 +37,9 @@
#include "esp32s3_irq.h"
#include "esp32s3_gpio.h"
+#include "soc/periph_defs.h"
+#include "esp_private/periph_ctrl.h"
+
/****************************************************************************
* Private Types
****************************************************************************/
@@ -969,6 +972,15 @@ struct esp32s3_tim_dev_s *esp32s3_tim_init(int timer)
}
}
+ if (tim->gid == ESP32S3_TIM_GROUP0)
+ {
+ periph_module_enable(PERIPH_TIMG0_MODULE);
+ }
+ else
+ {
+ periph_module_enable(PERIPH_TIMG1_MODULE);
+ }
+
/* Verify if it is in use */
if (!tim->inuse)