You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2017/04/05 03:32:49 UTC

incubator-mynewt-core git commit: nmgr_os; reduce the chance of triggering watchdog during reboot by tickling it just before doing managed reset.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 46dad8f34 -> 2767d7918


nmgr_os; reduce the chance of triggering watchdog during reboot
by tickling it just before doing managed reset.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/2767d791
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/2767d791
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/2767d791

Branch: refs/heads/develop
Commit: 2767d79188aed7c74c49663604660e35a0f660a0
Parents: 46dad8f
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Apr 4 20:31:07 2017 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Apr 4 20:32:35 2017 -0700

----------------------------------------------------------------------
 mgmt/newtmgr/nmgr_os/src/newtmgr_os.c | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/2767d791/mgmt/newtmgr/nmgr_os/src/newtmgr_os.c
----------------------------------------------------------------------
diff --git a/mgmt/newtmgr/nmgr_os/src/newtmgr_os.c b/mgmt/newtmgr/nmgr_os/src/newtmgr_os.c
index b69766e..b2ebc37 100644
--- a/mgmt/newtmgr/nmgr_os/src/newtmgr_os.c
+++ b/mgmt/newtmgr/nmgr_os/src/newtmgr_os.c
@@ -25,6 +25,7 @@
 #include <string.h>
 
 #include <hal/hal_system.h>
+#include <hal/hal_watchdog.h>
 
 #include <mgmt/mgmt.h>
 
@@ -308,6 +309,12 @@ nmgr_datetime_set(struct mgmt_cbuf *cb)
 static void
 nmgr_reset_tmo(struct os_event *ev)
 {
+    /*
+     * Tickle watchdog just before re-entering bootloader.
+     * Depending on what system has been doing lately, watchdog
+     * timer might be close to firing.
+     */
+    hal_watchdog_tickle();
     hal_system_reset();
 }