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

vipulrahane pushed a commit to branch vipul/juul-master-steam-10-18-2023
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit 8053334c8827b5f549216941d3ed973384c3869b
Author: Andy Gross <[email protected]>
AuthorDate: Fri Sep 23 13:32:10 2022 -0500

    da1469x: Add option to not disable watchdog on init
    
    This patch adds a facility to control whether or not the Dialog watchdog is
    disabled when the hal_watchdog_init function is being called.
    
    Signed-off-by: Andy Gross <[email protected]>
---
 hw/mcu/dialog/da1469x/src/hal_watchdog.c | 2 +-
 hw/mcu/dialog/da1469x/syscfg.yml         | 9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/hw/mcu/dialog/da1469x/src/hal_watchdog.c 
b/hw/mcu/dialog/da1469x/src/hal_watchdog.c
index d7e1df88a..22a24e7df 100644
--- a/hw/mcu/dialog/da1469x/src/hal_watchdog.c
+++ b/hw/mcu/dialog/da1469x/src/hal_watchdog.c
@@ -29,7 +29,7 @@ hal_watchdog_init(uint32_t expire_msecs)
 {
     SYS_WDOG->WATCHDOG_CTRL_REG = 
SYS_WDOG_WATCHDOG_CTRL_REG_WDOG_FREEZE_EN_Msk;
 
-#if MYNEWT_VAL(MCU_WATCHDOG_DISABLE_ON_INIT)
+#if MYNEWT_VAL(WATCHDOG_DISABLE_ON_INIT)
     GPREG->SET_FREEZE_REG |= GPREG_SET_FREEZE_REG_FRZ_SYS_WDOG_Msk;
 #endif
 
diff --git a/hw/mcu/dialog/da1469x/syscfg.yml b/hw/mcu/dialog/da1469x/syscfg.yml
index 5e808b69b..8e78f5d35 100644
--- a/hw/mcu/dialog/da1469x/syscfg.yml
+++ b/hw/mcu/dialog/da1469x/syscfg.yml
@@ -460,14 +460,13 @@ syscfg.defs:
         restrictions:
             - '!GPADC_BATTERY'
 
-    MCU_WATCHDOG_DISABLE_ON_INIT:
-        description: >
-          'Disable watchdog on init'
-        value: 1
-
     DA1469X_LPCLK_SYSINIT_STAGE:
         description: >
           'Initalization stage for DA1469X'
+
+    WATCHDOG_DISABLE_ON_INIT:
+        description: >
+          'Enable watchdog on init'
         value: 1
 
 syscfg.vals:

Reply via email to