1 /* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */
\r
2 /* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */
\r
3 /* ELIGIBILITY FOR ANY PURPOSES. */
\r
4 /* (C) Fujitsu Microelectronics Europe GmbH */
\r
5 /*------------------------------------------------------------------------
\r
7 - This file contains the defines and function declaration for hardware watchdog.
\r
8 -------------------------------------------------------------------------*/
\r
14 * Clear watchdog defines
\r
16 #define WTC_NONE 0 /* Don't initialize and clear watchdog */
\r
17 #define WTC_IN_TASK 1 /* Clear Watchdog in dedicated task */
\r
18 #define WTC_IN_TICK 2 /* Clear Watchdog in TICK Hook */
\r
19 #define WTC_IN_IDLE 3 /* Clear Watchdog in Idle Hook */
\r
21 #define WATCHDOG WTC_IN_TASK /* Clear Watchdog in vWatchdogTask() */
\r
22 /*------------------------------------------------------------------------*/
\r
24 * Watchdog period defines
\r
26 #define WTC_PER_2_16 0 /* The watchdog period is 2^16 CLKRC cycles */
\r
27 #define WTC_PER_2_17 1 /* The watchdog period is 2^17 CLKRC cycles */
\r
28 #define WTC_PER_2_18 2 /* The watchdog period is 2^18 CLKRC cycles */
\r
29 #define WTC_PER_2_19 3 /* The watchdog period is 2^19 CLKRC cycles */
\r
30 /*------------------------------------------------------------------------*/
\r
32 * After every WTC_CLR_PER ticks the watchdog would be cleared in the prvWatchdogTask().
\r
33 * This period needs to be chosen in accordance with the current CLKRC (100KHz or 2MHz)
\r
34 * and the above setting WTC_PER_2_XX.
\r
36 #define WTC_CLR_PER 30 /* The watchdog clear period in RTOS ticks */
\r
37 /*------------------------------------------------------------------------*/
\r
39 * Kick_watchdog Macro to clear watchdog
\r
41 #define Kick_Watchdog() \
\r
44 /*------------------------------------------------------------------------*/
\r
46 * Watchdog function declarations
\r
48 void InitWatchdog (void);
\r
49 void vStartWatchdogTask(unsigned short);
\r