Files
OpenCellular/chip
Simon Glass 8db2c7f910 stm32: Add an early warning of watchdog firing
Rather than just reset with no information when we hit a watchdog, try
to anticipate the problem and display a trace message as on lm4.

This solution is not ideal since we must constantly reset the WWDG to make
it work. It may be better to look at dedicating a timer to this purpose
instead, since we are really just shadowing the IWDG and don't actually
need the reset functionality.

One problem is that we now have a fairly short time limit on many
operations, since if we can't service an interrupt within about 30ms then
the WWDG will reset the system.

It also affects JTAG since it seems that the watchdog goes off the first
time JTAG is invoked to program the flash. The solution here is to retry.

For these reasons it is implemented as an option, CONFIG_WATCHDOG_HELP.

BUG=chrome-os-partner:10145
TEST=manual:
build for all boards
On snow:
> waitms 500
See that there is no message
> waitms 1300

Time:     0x0000000000733ba3 us
Deadline: 0x00000000006b6db2 ->   -0.511473 s from now
Active timers:
Task Ready Name         Events      Time (s)
   0 R << idle >>       00000000    0.000000
   1 R WATCHDOG         80000000    0.000000
   2   KEYSCAN          00000000    0.000000
   3   GAIAPOWER        00000000    0.000000
   4 R CONSOLE          00000000    0.000000
   5   HOSTCMD          00000000    0.000000

--- UART initialized after reboot ---
[Reset cause: watchdog]
[Image: RO, snow_v1.1.32-8c00326-dirty 2012-06-03 07:54:29 sjg@sglass.mtv.corp.google.com]
done

Change-Id: I042fcc9ecd9c21210ea3826ca69c943aab949d1f
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24398
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2012-06-15 13:39:22 -07:00
..