You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/12/15 15:45:47 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2543: Documentation: how to use auto monitor feature to keep the chip alive

xiaoxiang781216 commented on a change in pull request #2543:
URL: https://github.com/apache/incubator-nuttx/pull/2543#discussion_r543459009



##########
File path: Documentation/components/drivers/character/watchdog.rst
##########
@@ -153,4 +153,51 @@ This command registers an user callback that will be triggered on timeout. It re
 
 .. c:macro:: WDIOC_KEEPALIVE
 
- This command resets the watchdog timer ("ping",  "pet the dog",  "feed the dog"). 
\ No newline at end of file
+ This command resets the watchdog timer AKA '**ping**", "**kick**", "**pet** the dog",  "**feed** the dog"). 
+
+Using the Auto-monitor feature to reset the watch dog,
+------------------------------------------------------
+
+The auto-monitor provides an OS-internal mechanism to automatically start and repeatedly reset the watchdog.  
+
+To enable it, follow the next instructions:
+
+1. Select a Watchdog Timer Instance
+
+ To select the wdt browse in the ``menuconfig`` using the following path:
+
+ Go into menu :menuselection:`System Type --> <Chip> Peripheral Selection` and press :kbd:`Enter`. Then select one watchdog timer.
+
+2. Enable the Auto-monitor option
+
+ Go into menu :menuselection:`Device Drivers --> Timer Driver Support` and press :kbd:`Enter`. Then enable:
+
+ - [x] Watchdog Timer Support
+
+ Then press :kbd:`Enter` again to enter into the Watchdog Timer Support menu. And finally enable the Auto-monitor option:
+
+ - [x] Auto-monitor
+
+ After selecting the option you may want to configure some parameters:
+
+ * **Timeout**: It is the watchdog timer expiration time in seconds.
+ * **Keep a live interval**: This is the interval in which the watchdog will be fed. It is in seconds. It can't be bigger than the timeout. If this interval is equal to timeout interval, than this interval will automatically change to half timeout. 
+ * **Keep alive by**: This is a choice to determine who is going to feed the dog. There are 4 possible choices that are described as follows.
+
+ ``Capture callback``: This choice registers a watchdog timer callback to reset the watchdog every time it expires, i.e., on timeout. 
+
+ ``Timer callback``: This choice also uses a timer callback to reset the watchdog, but it will reset the watchdog every "keep a live interval".
+
+ ``Worker callback``: This choice uses the Low Priority Work Queue to reset the watchog every "keep a live interval". This choice depends on having the Low Priority Work Queue enabled. 

Review comment:
       not really need Low Priority Work Queue:
   
   1. If only high work enable, the high work queue is used
   2. otherwise the low work queue is used
   
   This is because, high work queue will map to low work queue if only high work queue is enabled.




----------------------------------------------------------------
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.

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