hw_watchdog.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. //*****************************************************************************
  2. //
  3. // hw_watchdog.h - Macros used when accessing the Watchdog Timer hardware.
  4. //
  5. // Copyright (c) 2005-2011 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 8264 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_INTTYPE 0x00000004 // Watchdog Interrupt Type
  60. #define WDT_CTL_RESEN 0x00000002 // Watchdog Reset Enable
  61. #define WDT_CTL_INTEN 0x00000001 // Watchdog Interrupt Enable
  62. //*****************************************************************************
  63. //
  64. // The following are defines for the bit fields in the WDT_O_ICR register.
  65. //
  66. //*****************************************************************************
  67. #define WDT_ICR_M 0xFFFFFFFF // Watchdog Interrupt Clear
  68. #define WDT_ICR_S 0
  69. //*****************************************************************************
  70. //
  71. // The following are defines for the bit fields in the WDT_O_RIS register.
  72. //
  73. //*****************************************************************************
  74. #define WDT_RIS_WDTRIS 0x00000001 // Watchdog Raw Interrupt Status
  75. //*****************************************************************************
  76. //
  77. // The following are defines for the bit fields in the WDT_O_MIS register.
  78. //
  79. //*****************************************************************************
  80. #define WDT_MIS_WDTMIS 0x00000001 // Watchdog Masked Interrupt Status
  81. //*****************************************************************************
  82. //
  83. // The following are defines for the bit fields in the WDT_O_TEST register.
  84. //
  85. //*****************************************************************************
  86. #define WDT_TEST_STALL 0x00000100 // Watchdog Stall Enable
  87. //*****************************************************************************
  88. //
  89. // The following are defines for the bit fields in the WDT_O_LOCK register.
  90. //
  91. //*****************************************************************************
  92. #define WDT_LOCK_M 0xFFFFFFFF // Watchdog Lock
  93. #define WDT_LOCK_UNLOCKED 0x00000000 // Unlocked
  94. #define WDT_LOCK_LOCKED 0x00000001 // Locked
  95. #define WDT_LOCK_UNLOCK 0x1ACCE551 // Unlocks the watchdog timer
  96. //*****************************************************************************
  97. //
  98. // The following are defines for the bit fields in the WDT_ISR, WDT_RIS, and
  99. // WDT_MIS registers.
  100. //
  101. //*****************************************************************************
  102. #define WDT_INT_TIMEOUT 0x00000001 // Watchdog timer expired
  103. //*****************************************************************************
  104. //
  105. // The following definitions are deprecated.
  106. //
  107. //*****************************************************************************
  108. #ifndef DEPRECATED
  109. //*****************************************************************************
  110. //
  111. // The following are deprecated defines for the Watchdog Timer register
  112. // offsets.
  113. //
  114. //*****************************************************************************
  115. #define WDT_O_PeriphID4 0x00000FD0
  116. #define WDT_O_PeriphID5 0x00000FD4
  117. #define WDT_O_PeriphID6 0x00000FD8
  118. #define WDT_O_PeriphID7 0x00000FDC
  119. #define WDT_O_PeriphID0 0x00000FE0
  120. #define WDT_O_PeriphID1 0x00000FE4
  121. #define WDT_O_PeriphID2 0x00000FE8
  122. #define WDT_O_PeriphID3 0x00000FEC
  123. #define WDT_O_PCellID0 0x00000FF0
  124. #define WDT_O_PCellID1 0x00000FF4
  125. #define WDT_O_PCellID2 0x00000FF8
  126. #define WDT_O_PCellID3 0x00000FFC
  127. //*****************************************************************************
  128. //
  129. // The following are deprecated defines for the bit fields in the WDT_O_TEST
  130. // register.
  131. //
  132. //*****************************************************************************
  133. #define WDT_TEST_STALL_EN 0x00000100 // Watchdog stall enable
  134. //*****************************************************************************
  135. //
  136. // The following are deprecated defines for the reset values for the WDT
  137. // registers.
  138. //
  139. //*****************************************************************************
  140. #define WDT_RV_VALUE 0xFFFFFFFF // Current value register
  141. #define WDT_RV_LOAD 0xFFFFFFFF // Load register
  142. #define WDT_RV_PCellID1 0x000000F0
  143. #define WDT_RV_PCellID3 0x000000B1
  144. #define WDT_RV_PeriphID1 0x00000018
  145. #define WDT_RV_PeriphID2 0x00000018
  146. #define WDT_RV_PCellID0 0x0000000D
  147. #define WDT_RV_PCellID2 0x00000005
  148. #define WDT_RV_PeriphID0 0x00000005
  149. #define WDT_RV_PeriphID3 0x00000001
  150. #define WDT_RV_PeriphID5 0x00000000
  151. #define WDT_RV_RIS 0x00000000 // Raw interrupt status register
  152. #define WDT_RV_CTL 0x00000000 // Control register
  153. #define WDT_RV_PeriphID4 0x00000000
  154. #define WDT_RV_PeriphID6 0x00000000
  155. #define WDT_RV_PeriphID7 0x00000000
  156. #define WDT_RV_LOCK 0x00000000 // Lock register
  157. #define WDT_RV_MIS 0x00000000 // Masked interrupt status register
  158. #endif
  159. #endif // __HW_WATCHDOG_H__