summaryrefslogtreecommitdiff
path: root/chip/stm32/jtag-stm32l15x.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-06-24 11:54:47 -0700
committerGerrit <chrome-bot@google.com>2012-07-02 22:35:51 -0700
commit9b48067b09aaace6e1d5526a65473392f12389c1 (patch)
tree5424744113f2ee5318194ec258de305fa5bef796 /chip/stm32/jtag-stm32l15x.c
parent184eeb65acea77989673920a05f279f5b4fbaef2 (diff)
downloadchrome-ec-9b48067b09aaace6e1d5526a65473392f12389c1.tar.gz
stm32: Use a timer as the watchdog warning
The WWDG is not ideal for this purpose, since if we fail to handle its interrupt withint 60ms or so, we get a reset. This can be a problem when we are reporting a panic, since the uart output takes a long time. Change to using timer 9, which is free, and make it print a watchdog warning after one second. BUG=chrome-os-partner:10146 TEST=manual: build and boot on snow; waitms 1200 and see that a watchdog timeout is reported correctly. See that the panic message is displayed in full without a reset happening before the end. Change-Id: Ifc3671098e1f3a7ef409b8d1fb919d22eaa90358 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/26172
Diffstat (limited to 'chip/stm32/jtag-stm32l15x.c')
-rw-r--r--chip/stm32/jtag-stm32l15x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/stm32/jtag-stm32l15x.c b/chip/stm32/jtag-stm32l15x.c
index 234e2aa967..7b65400b1c 100644
--- a/chip/stm32/jtag-stm32l15x.c
+++ b/chip/stm32/jtag-stm32l15x.c
@@ -9,8 +9,8 @@
int jtag_pre_init(void)
{
- /* stop TIM2, TIM3 and watchdogs when the JTAG stops the CPU */
- STM32_DBGMCU_APB1FZ |= 0x00001803;
+ /* stop TIM2-4 and watchdogs when the JTAG stops the CPU */
+ STM32_DBGMCU_APB1FZ |= 0x00001807;
return EC_SUCCESS;
}