1 |
581 |
jeremybenn |
//*****************************************************************************
|
2 |
|
|
//
|
3 |
|
|
// hw_watchdog.h - Macros used when accessing the Watchdog Timer hardware.
|
4 |
|
|
//
|
5 |
|
|
// Copyright (c) 2005,2006 Luminary Micro, Inc. All rights reserved.
|
6 |
|
|
//
|
7 |
|
|
// Software License Agreement
|
8 |
|
|
//
|
9 |
|
|
// Luminary Micro, Inc. (LMI) is supplying this software for use solely and
|
10 |
|
|
// exclusively on LMI's Stellaris Family of microcontroller products.
|
11 |
|
|
//
|
12 |
|
|
// The software is owned by LMI and/or its suppliers, and is protected under
|
13 |
|
|
// applicable copyright laws. All rights are reserved. Any use in violation
|
14 |
|
|
// of the foregoing restrictions may subject the user to criminal sanctions
|
15 |
|
|
// under applicable laws, as well as to civil liability for the breach of the
|
16 |
|
|
// terms and conditions of this license.
|
17 |
|
|
//
|
18 |
|
|
// THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
19 |
|
|
// OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
20 |
|
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
21 |
|
|
// LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
|
22 |
|
|
// CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
23 |
|
|
//
|
24 |
|
|
// This is part of revision 523 of the Stellaris Driver Library.
|
25 |
|
|
//
|
26 |
|
|
//*****************************************************************************
|
27 |
|
|
|
28 |
|
|
#ifndef __HW_WATCHDOG_H__
|
29 |
|
|
#define __HW_WATCHDOG_H__
|
30 |
|
|
|
31 |
|
|
//*****************************************************************************
|
32 |
|
|
//
|
33 |
|
|
// The following define the offsets of the Watchdog Timer registers.
|
34 |
|
|
//
|
35 |
|
|
//*****************************************************************************
|
36 |
|
|
#define WDT_O_LOAD 0x00000000 // Load register
|
37 |
|
|
#define WDT_O_VALUE 0x00000004 // Current value register
|
38 |
|
|
#define WDT_O_CTL 0x00000008 // Control register
|
39 |
|
|
#define WDT_O_ICR 0x0000000C // Interrupt clear register
|
40 |
|
|
#define WDT_O_RIS 0x00000010 // Raw interrupt status register
|
41 |
|
|
#define WDT_O_MIS 0x00000014 // Masked interrupt status register
|
42 |
|
|
#define WDT_O_TEST 0x00000418 // Test register
|
43 |
|
|
#define WDT_O_CAUSE 0x0000041C // Cause register
|
44 |
|
|
#define WDT_O_LOCK 0x00000C00 // Lock register
|
45 |
|
|
|
46 |
|
|
//*****************************************************************************
|
47 |
|
|
//
|
48 |
|
|
// The following define the bit fields in the WDT_CTL register.
|
49 |
|
|
//
|
50 |
|
|
//*****************************************************************************
|
51 |
|
|
#define WDT_CTL_RESEN 0x00000002 // Enable reset output
|
52 |
|
|
#define WDT_CTL_INTEN 0x00000001 // Enable the WDT counter and int
|
53 |
|
|
|
54 |
|
|
//*****************************************************************************
|
55 |
|
|
//
|
56 |
|
|
// The following define the bit fields in the WDT_ISR, WDT_RIS, and WDT_MIS
|
57 |
|
|
// registers.
|
58 |
|
|
//
|
59 |
|
|
//*****************************************************************************
|
60 |
|
|
#define WDT_INT_TIMEOUT 0x00000001 // Watchdog timer expired
|
61 |
|
|
|
62 |
|
|
//*****************************************************************************
|
63 |
|
|
//
|
64 |
|
|
// The following define the bit fields in the WDT_TEST register.
|
65 |
|
|
//
|
66 |
|
|
//*****************************************************************************
|
67 |
|
|
#define WDT_TEST_STALL_EN 0x00000100 // Watchdog stall enable
|
68 |
|
|
#define WDT_TEST_TEST_EN 0x00000001 // Watchdog timer reset int test
|
69 |
|
|
|
70 |
|
|
//*****************************************************************************
|
71 |
|
|
//
|
72 |
|
|
// The following define the bit fields in the WDT_CAUSE register.
|
73 |
|
|
//
|
74 |
|
|
//*****************************************************************************
|
75 |
|
|
#define WDT_CAUSE_WDR 0x00000002 // Watchdog timer reset occurred
|
76 |
|
|
#define WDT_CAUSE_WDI 0x00000001 // Watchdog timer int occurred
|
77 |
|
|
|
78 |
|
|
//*****************************************************************************
|
79 |
|
|
//
|
80 |
|
|
// The following define the bit fields in the WDT_LOCK register.
|
81 |
|
|
//
|
82 |
|
|
//*****************************************************************************
|
83 |
|
|
#define WDT_LOCK_LOCKED 0x00000001 // Watchdog timer is locked
|
84 |
|
|
#define WDT_LOCK_UNLOCKED 0x00000000 // Watchdog timer is unlocked
|
85 |
|
|
#define WDT_LOCK_UNLOCK 0x1ACCE551 // Unlocks the watchdog timer
|
86 |
|
|
|
87 |
|
|
//*****************************************************************************
|
88 |
|
|
//
|
89 |
|
|
// The following define the reset values for the WDT registers.
|
90 |
|
|
//
|
91 |
|
|
//*****************************************************************************
|
92 |
|
|
#define WDT_RV_LOAD 0xFFFFFFFF // Load register
|
93 |
|
|
#define WDT_RV_VALUE 0xFFFFFFFF // Current value register
|
94 |
|
|
#define WDT_RV_CTL 0x00000000 // Control register
|
95 |
|
|
#define WDT_RV_RIS 0x00000000 // Raw interrupt status register
|
96 |
|
|
#define WDT_RV_MIS 0x00000000 // Masked interrupt status register
|
97 |
|
|
#define WDT_RV_LOCK 0x00000000 // Lock register
|
98 |
|
|
|
99 |
|
|
#endif // __HW_WATCHDOG_H__
|