ec: stm32: Log watchdog PC |
|||
Issue descriptionOn stm32*, when CONFIG_WATCHDOG_HELP is defined, we should be able to log PC at the time the pre-watchdog interrupt fired for later retrieval in panicinfo. Currently we're not logging any useful info, eg: Saved panic data: (NEW) === PROCESS EXCEPTION: 00 ====== xPSR: ffffffff === r0 : r1 : r2 : r3 : r4 :dead6664 r5 :00000000 r6 :00000000 r7 :00000000 r8 :00000000 r9 :00000000 r10:00000000 r11:00000000 r12: sp :00000000 lr : pc : Probably this entry is created in system_common_pre_init().
,
Dec 1 2017
Yes, see npcx for an example.
,
Dec 1 2017
,
Dec 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/0037fb8dfcd7136d40e608ad9973331bd82d9a80 commit 0037fb8dfcd7136d40e608ad9973331bd82d9a80 Author: Philip Chen <philipchen@google.com> Date: Mon Dec 11 23:16:23 2017 system: Log PC and task id on watchdog For debug, in common code let's log the watchdog PC and task id as our SW panic params. BUG= chromium:790006 BRANCH=none TEST=manually test scarlet rev2 from a1-a3, b1-b2: (a1) Add 'while(1);' in button ISR (a2) Boot and press the button (a3) When watchdog is triggeried, check with 'panicinfo' that saved R5 is the PC for button ISR. (b1) 'crash watchdog' in EC console (b2) Check with 'panicinfo' that CONSOLE task id is saved in EXCEPTION and PC is saved in R5. Change-Id: I64d2fcf594dd24b0951e002ab8e80ebcac2d1def Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/803618 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> [modify] https://crrev.com/0037fb8dfcd7136d40e608ad9973331bd82d9a80/core/cortex-m/watchdog.c [modify] https://crrev.com/0037fb8dfcd7136d40e608ad9973331bd82d9a80/chip/npcx/watchdog.c [modify] https://crrev.com/0037fb8dfcd7136d40e608ad9973331bd82d9a80/common/system.c [modify] https://crrev.com/0037fb8dfcd7136d40e608ad9973331bd82d9a80/core/cortex-m0/watchdog.c
,
Dec 20 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by philipchen@chromium.org
, Dec 1 2017