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 2022/02/25 14:49:30 UTC

[incubator-nuttx] branch master updated (1d15196 -> 1a1409c)

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

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 1d15196  risc-v/esp32c3: Fix detection of CPU reset by Watchdog Timer
     new a6fea1c  risc-v/esp32c3: Enable Timer Groups clocks on timer initialization
     new 1a1409c  drivers/timers: Fix domain of log messages

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/risc-v/src/esp32c3/esp32c3_tim.c | 9 +++++++++
 drivers/timers/oneshot.c              | 6 +++---
 2 files changed, 12 insertions(+), 3 deletions(-)

[incubator-nuttx] 02/02: drivers/timers: Fix domain of log messages

Posted by xi...@apache.org.
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/incubator-nuttx.git

commit 1a1409cbc3cbaf207dae18d60493cc7f86c64cd5
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Thu Feb 24 18:34:31 2022 -0300

    drivers/timers: Fix domain of log messages
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 drivers/timers/oneshot.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/timers/oneshot.c b/drivers/timers/oneshot.c
index c18f453..0bdb5ac 100644
--- a/drivers/timers/oneshot.c
+++ b/drivers/timers/oneshot.c
@@ -331,7 +331,7 @@ int oneshot_register(FAR const char *devname,
   FAR struct oneshot_dev_s *priv;
   int ret;
 
-  sninfo("devname=%s lower=%p\n", devname, lower);
+  tmrinfo("devname=%s lower=%p\n", devname, lower);
   DEBUGASSERT(devname != NULL && lower != NULL);
 
   /* Allocate a new oneshot timer driver instance */
@@ -341,7 +341,7 @@ int oneshot_register(FAR const char *devname,
 
   if (!priv)
     {
-      snerr("ERROR: Failed to allocate device structure\n");
+      tmrerr("ERROR: Failed to allocate device structure\n");
       return -ENOMEM;
     }
 
@@ -355,7 +355,7 @@ int oneshot_register(FAR const char *devname,
   ret = register_driver(devname, &g_oneshot_ops, 0666, priv);
   if (ret < 0)
     {
-      snerr("ERROR: register_driver failed: %d\n", ret);
+      tmrerr("ERROR: register_driver failed: %d\n", ret);
       nxsem_destroy(&priv->od_exclsem);
       kmm_free(priv);
     }

[incubator-nuttx] 01/02: risc-v/esp32c3: Enable Timer Groups clocks on timer initialization

Posted by xi...@apache.org.
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/incubator-nuttx.git

commit a6fea1c3a5ee51c99359e7edaacf745e2b361e6f
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Thu Feb 24 18:33:52 2022 -0300

    risc-v/esp32c3: Enable Timer Groups clocks on timer initialization
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 arch/risc-v/src/esp32c3/esp32c3_tim.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/risc-v/src/esp32c3/esp32c3_tim.c b/arch/risc-v/src/esp32c3/esp32c3_tim.c
index 994aac4..f00c6e1 100644
--- a/arch/risc-v/src/esp32c3/esp32c3_tim.c
+++ b/arch/risc-v/src/esp32c3/esp32c3_tim.c
@@ -917,6 +917,10 @@ struct esp32c3_tim_dev_s *esp32c3_tim_init(int timer)
       case 0:
         {
           tim = &g_esp32c3_tim0_priv;
+
+          modifyreg32(SYSTEM_PERIP_CLK_EN0_REG, 0, SYSTEM_TIMERGROUP_CLK_EN);
+          modifyreg32(SYSTEM_PERIP_RST_EN0_REG, SYSTEM_TIMERGROUP_RST_M, 0);
+
           break;
         }
 #endif
@@ -925,6 +929,11 @@ struct esp32c3_tim_dev_s *esp32c3_tim_init(int timer)
       case 1:
         {
           tim = &g_esp32c3_tim1_priv;
+
+          modifyreg32(SYSTEM_PERIP_CLK_EN0_REG, 0,
+                      SYSTEM_TIMERGROUP1_CLK_EN);
+          modifyreg32(SYSTEM_PERIP_RST_EN0_REG, SYSTEM_TIMERGROUP1_RST_M, 0);
+
           break;
         }
 #endif