hw_watchdog.h 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. //*****************************************************************************
  2. //
  3. // hw_watchdog.h - Macros used when accessing the Watchdog Timer hardware.
  4. //
  5. // Copyright (c) 2005-2009 Luminary Micro, Inc. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Luminary Micro, Inc. (LMI) is supplying this software for use solely and
  9. // exclusively on LMI's microcontroller products.
  10. //
  11. // The software is owned by LMI and/or its suppliers, and is protected under
  12. // applicable copyright laws. All rights are reserved. You may not combine
  13. // this software with "viral" open-source software in order to form a larger
  14. // program. Any use in violation of the foregoing restrictions may subject
  15. // the user to criminal sanctions under applicable laws, as well as to civil
  16. // liability for the breach of the 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 4694 of the Stellaris Firmware Development Package.
  25. //
  26. //*****************************************************************************
  27. #ifndef __HW_WATCHDOG_H__
  28. #define __HW_WATCHDOG_H__
  29. //*****************************************************************************
  30. //
  31. // The following are defines for the Watchdog Timer register offsets.
  32. //
  33. //*****************************************************************************
  34. #define WDT_O_LOAD 0x00000000 // Load register
  35. #define WDT_O_VALUE 0x00000004 // Current value register
  36. #define WDT_O_CTL 0x00000008 // Control register
  37. #define WDT_O_ICR 0x0000000C // Interrupt clear register
  38. #define WDT_O_RIS 0x00000010 // Raw interrupt status register
  39. #define WDT_O_MIS 0x00000014 // Masked interrupt status register
  40. #define WDT_O_TEST 0x00000418 // Test register
  41. #define WDT_O_LOCK 0x00000C00 // Lock register
  42. //*****************************************************************************
  43. //
  44. // The following are defines for the bit fields in the WDT_CTL register.
  45. //
  46. //*****************************************************************************
  47. #define WDT_CTL_RESEN 0x00000002 // Enable reset output
  48. #define WDT_CTL_INTEN 0x00000001 // Enable the WDT counter and int
  49. //*****************************************************************************
  50. //
  51. // The following are defines for the bit fields in the WDT_ISR, WDT_RIS, and
  52. // WDT_MIS registers.
  53. //
  54. //*****************************************************************************
  55. #define WDT_INT_TIMEOUT 0x00000001 // Watchdog timer expired
  56. //*****************************************************************************
  57. //
  58. // The following are defines for the bit fields in the WDT_TEST register.
  59. //
  60. //*****************************************************************************
  61. #define WDT_TEST_STALL 0x00000100 // Watchdog stall enable
  62. //*****************************************************************************
  63. //
  64. // The following are defines for the bit fields in the WDT_LOCK register.
  65. //
  66. //*****************************************************************************
  67. #define WDT_LOCK_M 0xFFFFFFFF // Watchdog Lock.
  68. #define WDT_LOCK_UNLOCK 0x1ACCE551 // Unlocks the watchdog timer
  69. #define WDT_LOCK_LOCKED 0x00000001 // Watchdog timer is locked
  70. #define WDT_LOCK_UNLOCKED 0x00000000 // Watchdog timer is unlocked
  71. //*****************************************************************************
  72. //
  73. // The following are defines for the bit fields in the WDT_O_LOAD register.
  74. //
  75. //*****************************************************************************
  76. #define WDT_LOAD_M 0xFFFFFFFF // Watchdog Load Value.
  77. #define WDT_LOAD_S 0
  78. //*****************************************************************************
  79. //
  80. // The following are defines for the bit fields in the WDT_O_VALUE register.
  81. //
  82. //*****************************************************************************
  83. #define WDT_VALUE_M 0xFFFFFFFF // Watchdog Value.
  84. #define WDT_VALUE_S 0
  85. //*****************************************************************************
  86. //
  87. // The following are defines for the bit fields in the WDT_O_ICR register.
  88. //
  89. //*****************************************************************************
  90. #define WDT_ICR_M 0xFFFFFFFF // Watchdog Interrupt Clear.
  91. #define WDT_ICR_S 0
  92. //*****************************************************************************
  93. //
  94. // The following are defines for the bit fields in the WDT_O_RIS register.
  95. //
  96. //*****************************************************************************
  97. #define WDT_RIS_WDTRIS 0x00000001 // Watchdog Raw Interrupt Status.
  98. //*****************************************************************************
  99. //
  100. // The following are defines for the bit fields in the WDT_O_MIS register.
  101. //
  102. //*****************************************************************************
  103. #define WDT_MIS_WDTMIS 0x00000001 // Watchdog Masked Interrupt
  104. // Status.
  105. //*****************************************************************************
  106. //
  107. // The following definitions are deprecated.
  108. //
  109. //*****************************************************************************
  110. #ifndef DEPRECATED
  111. //*****************************************************************************
  112. //
  113. // The following are deprecated defines for the Watchdog Timer register
  114. // offsets.
  115. //
  116. //*****************************************************************************
  117. #define WDT_O_PeriphID4 0x00000FD0
  118. #define WDT_O_PeriphID5 0x00000FD4
  119. #define WDT_O_PeriphID6 0x00000FD8
  120. #define WDT_O_PeriphID7 0x00000FDC
  121. #define WDT_O_PeriphID0 0x00000FE0
  122. #define WDT_O_PeriphID1 0x00000FE4
  123. #define WDT_O_PeriphID2 0x00000FE8
  124. #define WDT_O_PeriphID3 0x00000FEC
  125. #define WDT_O_PCellID0 0x00000FF0
  126. #define WDT_O_PCellID1 0x00000FF4
  127. #define WDT_O_PCellID2 0x00000FF8
  128. #define WDT_O_PCellID3 0x00000FFC
  129. //*****************************************************************************
  130. //
  131. // The following are deprecated defines for the bit fields in the WDT_TEST
  132. // register.
  133. //
  134. //*****************************************************************************
  135. #define WDT_TEST_STALL_EN 0x00000100 // Watchdog stall enable
  136. //*****************************************************************************
  137. //
  138. // The following are deprecated defines for the reset values for the WDT
  139. // registers.
  140. //
  141. //*****************************************************************************
  142. #define WDT_RV_VALUE 0xFFFFFFFF // Current value register
  143. #define WDT_RV_LOAD 0xFFFFFFFF // Load register
  144. #define WDT_RV_PCellID1 0x000000F0
  145. #define WDT_RV_PCellID3 0x000000B1
  146. #define WDT_RV_PeriphID1 0x00000018
  147. #define WDT_RV_PeriphID2 0x00000018
  148. #define WDT_RV_PCellID0 0x0000000D
  149. #define WDT_RV_PCellID2 0x00000005
  150. #define WDT_RV_PeriphID0 0x00000005
  151. #define WDT_RV_PeriphID3 0x00000001
  152. #define WDT_RV_PeriphID5 0x00000000
  153. #define WDT_RV_RIS 0x00000000 // Raw interrupt status register
  154. #define WDT_RV_CTL 0x00000000 // Control register
  155. #define WDT_RV_PeriphID4 0x00000000
  156. #define WDT_RV_PeriphID6 0x00000000
  157. #define WDT_RV_PeriphID7 0x00000000
  158. #define WDT_RV_LOCK 0x00000000 // Lock register
  159. #define WDT_RV_MIS 0x00000000 // Masked interrupt status register
  160. #endif
  161. #endif // __HW_WATCHDOG_H__