mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
Increase watchdog timeout to 1.8 second. The pd_task can delay up to 1.5 seconds, so the watchdog must be at least that value. On Zinger, the new timeout period will be 2 seconds with LSI clock at 50kHz and 3.36 seconds with LSI clock at 30kHz. Note: the LSI frequency range is tighter on STM32F0 and cannot go up to 56kHz. BUG=none BRANCH=none TEST=add 1.5 second blocking delay to pd_task and make sure watchdog is normally not firing. Change-Id: I444639ccacd3452181a5fb6caab8e5df7ef3c847 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/204333 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Watchdog driver */
|
|
|
|
#ifndef __CROS_EC_WATCHDOG_H
|
|
#define __CROS_EC_WATCHDOG_H
|
|
|
|
/**
|
|
* Initialize the watchdog.
|
|
*
|
|
* This will cause the CPU to reboot if it has been more than 2 watchdog
|
|
* periods since watchdog_reload() has been called.
|
|
*/
|
|
int watchdog_init(void);
|
|
|
|
/**
|
|
* Display a trace with information about an expired watchdog timer
|
|
*
|
|
* This shows the location in the code where the expiration happened.
|
|
* Usually this helps locate a loop which is blocking execution of the
|
|
* watchdog task.
|
|
*
|
|
* @param excep_lr Value of lr to indicate caller return
|
|
* @param excep_sp Value of sp to indicate caller task id
|
|
*/
|
|
void watchdog_trace(uint32_t excep_lr, uint32_t excep_sp);
|
|
|
|
/**
|
|
* Watchdog has not been tickled recently warning. This function should be
|
|
* called when the watchdog is close to firing.
|
|
*/
|
|
void watchdog_warning_irq(void);
|
|
|
|
/* Reload the watchdog counter */
|
|
#ifdef CONFIG_WATCHDOG
|
|
void watchdog_reload(void);
|
|
#else
|
|
static inline void watchdog_reload(void) { }
|
|
#endif
|
|
|
|
#endif /* __CROS_EC_WATCHDOG_H */
|