You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/09/26 23:29:27 UTC

[GitHub] [mynewt-core] agross-korg opened a new pull request, #2885: da1469x: Add option to not disable watchdog on init

agross-korg opened a new pull request, #2885:
URL: https://github.com/apache/mynewt-core/pull/2885

   This patch adds a facility to control whether or not the Dialog watchdog is disabled when the hal_watchdog_init function is being called.  There are some use cases where the watchdog needs to remain running from a previous application or bootloader.
   
   Signed-off-by: Andy Gross <an...@juul.com>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] agross-korg merged pull request #2885: da1469x: Add option to not disable watchdog on init

Posted by GitBox <gi...@apache.org>.
agross-korg merged PR #2885:
URL: https://github.com/apache/mynewt-core/pull/2885


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2885: da1469x: Add option to not disable watchdog on init

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on PR #2885:
URL: https://github.com/apache/mynewt-core/pull/2885#issuecomment-1258786665

   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] apache-mynewt-bot commented on pull request #2885: da1469x: Add option to not disable watchdog on init

Posted by GitBox <gi...@apache.org>.
apache-mynewt-bot commented on PR #2885:
URL: https://github.com/apache/mynewt-core/pull/2885#issuecomment-1259928258

   
   <!-- style-bot -->
   
   ## Style check summary
   
   #### No suggestions at this time!
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] kasjer commented on a diff in pull request #2885: da1469x: Add option to not disable watchdog on init

Posted by GitBox <gi...@apache.org>.
kasjer commented on code in PR #2885:
URL: https://github.com/apache/mynewt-core/pull/2885#discussion_r980770674


##########
hw/mcu/dialog/da1469x/syscfg.yml:
##########
@@ -454,6 +454,11 @@ syscfg.defs:
         restrictions:
             - '!GPADC_BATTERY'
 
+    WATCHDOG_DISABLE_ON_INIT:
+        description: >
+          'Enable watchdog on init'
+        value: 1

Review Comment:
   Name **WATCHDOG_DISABLE_ON_INIT** is not really consistent with description. One can wander which one is true.
   Dialog freezing watchdog is quite unique future (usually when watchdog is enabled it's impossible to stop it till reset).
   I would name it rather more explicit like WATCHDOG_FREEZE_ON_INIT but that's just me (and I will not insist).
   But changing description to something like 'Freez watchdog on init, watchdog will be unfrozen by hal_watchdog_enable()' could be more descriptive.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] andrzej-kaczmarek commented on a diff in pull request #2885: da1469x: Add option to not disable watchdog on init

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek commented on code in PR #2885:
URL: https://github.com/apache/mynewt-core/pull/2885#discussion_r980778077


##########
hw/mcu/dialog/da1469x/syscfg.yml:
##########
@@ -454,6 +454,11 @@ syscfg.defs:
         restrictions:
             - '!GPADC_BATTERY'
 
+    WATCHDOG_DISABLE_ON_INIT:
+        description: >
+          'Enable watchdog on init'
+        value: 1

Review Comment:
   I'd also prefix this option with `MCU_` as it will be more consistent with other syscfg options that are specific to particular MCU rather than a generic ones



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] agross-korg commented on a diff in pull request #2885: da1469x: Add option to not disable watchdog on init

Posted by GitBox <gi...@apache.org>.
agross-korg commented on code in PR #2885:
URL: https://github.com/apache/mynewt-core/pull/2885#discussion_r981599705


##########
hw/mcu/dialog/da1469x/syscfg.yml:
##########
@@ -454,6 +454,11 @@ syscfg.defs:
         restrictions:
             - '!GPADC_BATTERY'
 
+    WATCHDOG_DISABLE_ON_INIT:
+        description: >
+          'Enable watchdog on init'
+        value: 1

Review Comment:
   Updated both and force pushed change.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] agross-korg commented on a diff in pull request #2885: da1469x: Add option to not disable watchdog on init

Posted by GitBox <gi...@apache.org>.
agross-korg commented on code in PR #2885:
URL: https://github.com/apache/mynewt-core/pull/2885#discussion_r981515773


##########
hw/mcu/dialog/da1469x/syscfg.yml:
##########
@@ -454,6 +454,11 @@ syscfg.defs:
         restrictions:
             - '!GPADC_BATTERY'
 
+    WATCHDOG_DISABLE_ON_INIT:
+        description: >
+          'Enable watchdog on init'
+        value: 1

Review Comment:
   Yeah I kind of went back and forth with the name as well.  So some watchdogs are auto-started on reset.  Some are not.  Some are like doomsday devices and you can't freeze them.  This Dialog one is kind of an odd bird.  The implementation we currently have freezes the watchdog during init.  So to keep the default behavior of the driver, I added the DISABLE_ON_INIT and made it the default (=1). 
   
   It didn't matter to me whether we were freezing it or not on init, what mattered to me was that this was the behavior that was coded into the init function and that people are currently used to.  I am quite happy to just remove the freeze altogether.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] agross-korg commented on a diff in pull request #2885: da1469x: Add option to not disable watchdog on init

Posted by GitBox <gi...@apache.org>.
agross-korg commented on code in PR #2885:
URL: https://github.com/apache/mynewt-core/pull/2885#discussion_r981518206


##########
hw/mcu/dialog/da1469x/syscfg.yml:
##########
@@ -454,6 +454,11 @@ syscfg.defs:
         restrictions:
             - '!GPADC_BATTERY'
 
+    WATCHDOG_DISABLE_ON_INIT:
+        description: >
+          'Enable watchdog on init'
+        value: 1

Review Comment:
   The background reason of why I am doing any of this.... So the watchdog is enabled coming out of the ROM bootloader (either by reset or otherwise).  The mcuboot bootloader was freezing it and leaving us in a state where the watchdog was not running for the entiretly of the bootloader.  During production, we are soldering batteries on to the PCBs and the intermittent voltage connection during soldering was allowing chips to boot and then they get hung with a power fluctuation.  The only way to fix these was to somehow manage to attach via JTAG or disconnect the battery or let the battery run out.
   
   Leaving the watchdog running, it could recover itself.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [mynewt-core] agross-korg commented on a diff in pull request #2885: da1469x: Add option to not disable watchdog on init

Posted by GitBox <gi...@apache.org>.
agross-korg commented on code in PR #2885:
URL: https://github.com/apache/mynewt-core/pull/2885#discussion_r981518862


##########
hw/mcu/dialog/da1469x/syscfg.yml:
##########
@@ -454,6 +454,11 @@ syscfg.defs:
         restrictions:
             - '!GPADC_BATTERY'
 
+    WATCHDOG_DISABLE_ON_INIT:
+        description: >
+          'Enable watchdog on init'
+        value: 1

Review Comment:
   Even if we re-enabled the watchdog, there is a window where a power fluctuation could hang us inbetween the _init and the _enable of the watchdog.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org