summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2021-03-30 11:34:34 -0700
committerCommit Bot <commit-bot@chromium.org>2021-04-06 04:31:46 +0000
commit149356b7eab0a9104f492d119a86ec39f74a78bc (patch)
tree31fad4a62b8ebf59c60eaa95f242df2e4db50bbc
parentd56812695bf4aae108b8c9d64b42933151afe58e (diff)
downloadchrome-ec-149356b7eab0a9104f492d119a86ec39f74a78bc.tar.gz
zephyr: lazor: enable watchdog
Enable watchdog on Lazor. BUG=b:182398910 BRANCH=None TEST=Modified the `waitms` implementation to disable interrupt during the wait (since Zephyr-EC uses preemptive threads so some other threads can preempt the wait). Called `waitms 2000` which triggered watchdog reset, as watchdog is expired at 1600ms. Called `waitms 1000` which didn't trigger watchdog reset. Change-Id: Ibd8280f5984d1a5fe93cd1b884f5fa9a53edc983 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803971 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--zephyr/projects/trogdor/boards/arm/trogdor/trogdor_defconfig6
1 files changed, 6 insertions, 0 deletions
diff --git a/zephyr/projects/trogdor/boards/arm/trogdor/trogdor_defconfig b/zephyr/projects/trogdor/boards/arm/trogdor/trogdor_defconfig
index 4e275d3573..fa7a688057 100644
--- a/zephyr/projects/trogdor/boards/arm/trogdor/trogdor_defconfig
+++ b/zephyr/projects/trogdor/boards/arm/trogdor/trogdor_defconfig
@@ -53,3 +53,9 @@ CONFIG_CROS_EC_RW_MEM_OFF=0x0
# (CONFIG_CROS_EC_FLASH_SIZE - CONFIG_CROS_EC_RW_MEM_OFF -
# CONFIG_CROS_EC_RO_MEM_OFF)
CONFIG_CROS_EC_RW_SIZE=0x40000
+
+# WATCHDOG configuration
+CONFIG_WATCHDOG=y
+# Set the delay time for printing panic data.
+# 1 cycle is about 32ms. 500ms is about 16 cycles.
+CONFIG_WDT_NPCX_DELAY_CYCLES=16