hw_watchdog.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. //*****************************************************************************
  2. //
  3. // hw_watchdog.h - Macros used when accessing the Watchdog Timer hardware.
  4. //
  5. // Copyright (c) 2005-2010 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Texas Instruments (TI) is supplying this software for use solely and
  9. // exclusively on TI's microcontroller products. The software is owned by
  10. // TI and/or its suppliers, and is protected under applicable copyright
  11. // laws. You may not combine this software with "viral" open-source
  12. // software in order to form a larger program.
  13. //
  14. // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
  15. // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
  16. // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  17. // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
  18. // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  19. // DAMAGES, FOR ANY REASON WHATSOEVER.
  20. //
  21. // This is part of revision 6459 of the Stellaris Firmware Development Package.
  22. //
  23. //*****************************************************************************
  24. #ifndef __HW_WATCHDOG_H__
  25. #define __HW_WATCHDOG_H__
  26. //*****************************************************************************
  27. //
  28. // The following are defines for the Watchdog Timer register offsets.
  29. //
  30. //*****************************************************************************
  31. #define WDT_O_LOAD 0x00000000 // Watchdog Load
  32. #define WDT_O_VALUE 0x00000004 // Watchdog Value
  33. #define WDT_O_CTL 0x00000008 // Watchdog Control
  34. #define WDT_O_ICR 0x0000000C // Watchdog Interrupt Clear
  35. #define WDT_O_RIS 0x00000010 // Watchdog Raw Interrupt Status
  36. #define WDT_O_MIS 0x00000014 // Watchdog Masked Interrupt Status
  37. #define WDT_O_TEST 0x00000418 // Watchdog Test
  38. #define WDT_O_LOCK 0x00000C00 // Watchdog Lock
  39. //*****************************************************************************
  40. //
  41. // The following are defines for the bit fields in the WDT_O_LOAD register.
  42. //
  43. //*****************************************************************************
  44. #define WDT_LOAD_M 0xFFFFFFFF // Watchdog Load Value
  45. #define WDT_LOAD_S 0
  46. //*****************************************************************************
  47. //
  48. // The following are defines for the bit fields in the WDT_O_VALUE register.
  49. //
  50. //*****************************************************************************
  51. #define WDT_VALUE_M 0xFFFFFFFF // Watchdog Value
  52. #define WDT_VALUE_S 0
  53. //*****************************************************************************
  54. //
  55. // The following are defines for the bit fields in the WDT_O_CTL register.
  56. //
  57. //*****************************************************************************
  58. #define WDT_CTL_WRC 0x80000000 // Write Complete
  59. #define WDT_CTL_RESEN 0x00000002 // Watchdog Reset Enable
  60. #define WDT_CTL_INTEN 0x00000001 // Watchdog Interrupt Enable
  61. //*****************************************************************************
  62. //
  63. // The following are defines for the bit fields in the WDT_O_ICR register.
  64. //
  65. //*****************************************************************************
  66. #define WDT_ICR_M 0xFFFFFFFF // Watchdog Interrupt Clear
  67. #define WDT_ICR_S 0
  68. //*****************************************************************************
  69. //
  70. // The following are defines for the bit fields in the WDT_O_RIS register.
  71. //
  72. //*****************************************************************************
  73. #define WDT_RIS_WDTRIS 0x00000001 // Watchdog Raw Interrupt Status
  74. //*****************************************************************************
  75. //
  76. // The following are defines for the bit fields in the WDT_O_MIS register.
  77. //
  78. //*****************************************************************************
  79. #define WDT_MIS_WDTMIS 0x00000001 // Watchdog Masked Interrupt Status
  80. //*****************************************************************************
  81. //
  82. // The following are defines for the bit fields in the WDT_O_TEST register.
  83. //
  84. //*****************************************************************************
  85. #define WDT_TEST_STALL 0x00000100 // Watchdog Stall Enable
  86. //*****************************************************************************
  87. //
  88. // The following are defines for the bit fields in the WDT_O_LOCK register.
  89. //
  90. //*****************************************************************************
  91. #define WDT_LOCK_M 0xFFFFFFFF // Watchdog Lock
  92. #define WDT_LOCK_UNLOCKED 0x00000000 // Unlocked
  93. #define WDT_LOCK_LOCKED 0x00000001 // Locked
  94. #define WDT_LOCK_UNLOCK 0x1ACCE551 // Unlocks the watchdog timer
  95. //*****************************************************************************
  96. //
  97. // The following are defines for the bit fields in the WDT_ISR, WDT_RIS, and
  98. // WDT_MIS registers.
  99. //
  100. //*****************************************************************************
  101. #define WDT_INT_TIMEOUT 0x00000001 // Watchdog timer expired
  102. //*****************************************************************************
  103. //
  104. // The following definitions are deprecated.
  105. //
  106. //*****************************************************************************
  107. #ifndef DEPRECATED
  108. //*****************************************************************************
  109. //
  110. // The following are deprecated defines for the Watchdog Timer register
  111. // offsets.
  112. //
  113. //*****************************************************************************
  114. #define WDT_O_PeriphID4 0x00000FD0
  115. #define WDT_O_PeriphID5 0x00000FD4
  116. #define WDT_O_PeriphID6 0x00000FD8
  117. #define WDT_O_PeriphID7 0x00000FDC
  118. #define WDT_O_PeriphID0 0x00000FE0
  119. #define WDT_O_PeriphID1 0x00000FE4
  120. #define WDT_O_PeriphID2 0x00000FE8
  121. #define WDT_O_PeriphID3 0x00000FEC
  122. #define WDT_O_PCellID0 0x00000FF0
  123. #define WDT_O_PCellID1 0x00000FF4
  124. #define WDT_O_PCellID2 0x00000FF8
  125. #define WDT_O_PCellID3 0x00000FFC
  126. //*****************************************************************************
  127. //
  128. // The following are deprecated defines for the bit fields in the WDT_O_TEST
  129. // register.
  130. //
  131. //*****************************************************************************
  132. #define WDT_TEST_STALL_EN 0x00000100 // Watchdog stall enable
  133. //*****************************************************************************
  134. //
  135. // The following are deprecated defines for the reset values for the WDT
  136. // registers.
  137. //
  138. //*****************************************************************************
  139. #define WDT_RV_VALUE 0xFFFFFFFF // Current value register
  140. #define WDT_RV_LOAD 0xFFFFFFFF // Load register
  141. #define WDT_RV_PCellID1 0x000000F0
  142. #define WDT_RV_PCellID3 0x000000B1
  143. #define WDT_RV_PeriphID1 0x00000018
  144. #define WDT_RV_PeriphID2 0x00000018
  145. #define WDT_RV_PCellID0 0x0000000D
  146. #define WDT_RV_PCellID2 0x00000005
  147. #define WDT_RV_PeriphID0 0x00000005
  148. #define WDT_RV_PeriphID3 0x00000001
  149. #define WDT_RV_PeriphID5 0x00000000
  150. #define WDT_RV_RIS 0x00000000 // Raw interrupt status register
  151. #define WDT_RV_CTL 0x00000000 // Control register
  152. #define WDT_RV_PeriphID4 0x00000000
  153. #define WDT_RV_PeriphID6 0x00000000
  154. #define WDT_RV_PeriphID7 0x00000000
  155. #define WDT_RV_LOCK 0x00000000 // Lock register
  156. #define WDT_RV_MIS 0x00000000 // Masked interrupt status register
  157. #endif
  158. #endif // __HW_WATCHDOG_H__