hw_hibernate.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. //*****************************************************************************
  2. //
  3. // hw_hibernate.h - Defines and Macros for the Hibernation module.
  4. //
  5. // Copyright (c) 2007-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_HIBERNATE_H__
  25. #define __HW_HIBERNATE_H__
  26. //*****************************************************************************
  27. //
  28. // The following are defines for the Hibernation module register addresses.
  29. //
  30. //*****************************************************************************
  31. #define HIB_RTCC 0x400FC000 // Hibernation RTC Counter
  32. #define HIB_RTCM0 0x400FC004 // Hibernation RTC Match 0
  33. #define HIB_RTCM1 0x400FC008 // Hibernation RTC Match 1
  34. #define HIB_RTCLD 0x400FC00C // Hibernation RTC Load
  35. #define HIB_CTL 0x400FC010 // Hibernation Control
  36. #define HIB_IM 0x400FC014 // Hibernation Interrupt Mask
  37. #define HIB_RIS 0x400FC018 // Hibernation Raw Interrupt Status
  38. #define HIB_MIS 0x400FC01C // Hibernation Masked Interrupt
  39. // Status
  40. #define HIB_IC 0x400FC020 // Hibernation Interrupt Clear
  41. #define HIB_RTCT 0x400FC024 // Hibernation RTC Trim
  42. #define HIB_DATA 0x400FC030 // Hibernation Data
  43. //*****************************************************************************
  44. //
  45. // The following are defines for the bit fields in the HIB_RTCC register.
  46. //
  47. //*****************************************************************************
  48. #define HIB_RTCC_M 0xFFFFFFFF // RTC Counter
  49. #define HIB_RTCC_S 0
  50. //*****************************************************************************
  51. //
  52. // The following are defines for the bit fields in the HIB_RTCM0 register.
  53. //
  54. //*****************************************************************************
  55. #define HIB_RTCM0_M 0xFFFFFFFF // RTC Match 0
  56. #define HIB_RTCM0_S 0
  57. //*****************************************************************************
  58. //
  59. // The following are defines for the bit fields in the HIB_RTCM1 register.
  60. //
  61. //*****************************************************************************
  62. #define HIB_RTCM1_M 0xFFFFFFFF // RTC Match 1
  63. #define HIB_RTCM1_S 0
  64. //*****************************************************************************
  65. //
  66. // The following are defines for the bit fields in the HIB_RTCLD register.
  67. //
  68. //*****************************************************************************
  69. #define HIB_RTCLD_M 0xFFFFFFFF // RTC Load
  70. #define HIB_RTCLD_S 0
  71. //*****************************************************************************
  72. //
  73. // The following are defines for the bit fields in the HIB_CTL register.
  74. //
  75. //*****************************************************************************
  76. #define HIB_CTL_WRC 0x80000000 // Write Complete/Capable
  77. #define HIB_CTL_VDD3ON 0x00000100 // VDD Powered
  78. #define HIB_CTL_VABORT 0x00000080 // Power Cut Abort Enable
  79. #define HIB_CTL_CLK32EN 0x00000040 // Clocking Enable
  80. #define HIB_CTL_LOWBATEN 0x00000020 // Low Battery Monitoring Enable
  81. #define HIB_CTL_PINWEN 0x00000010 // External WAKE Pin Enable
  82. #define HIB_CTL_RTCWEN 0x00000008 // RTC Wake-up Enable
  83. #define HIB_CTL_CLKSEL 0x00000004 // Hibernation Module Clock Select
  84. #define HIB_CTL_HIBREQ 0x00000002 // Hibernation Request
  85. #define HIB_CTL_RTCEN 0x00000001 // RTC Timer Enable
  86. //*****************************************************************************
  87. //
  88. // The following are defines for the bit fields in the HIB_IM register.
  89. //
  90. //*****************************************************************************
  91. #define HIB_IM_EXTW 0x00000008 // External Wake-Up Interrupt Mask
  92. #define HIB_IM_LOWBAT 0x00000004 // Low Battery Voltage Interrupt
  93. // Mask
  94. #define HIB_IM_RTCALT1 0x00000002 // RTC Alert 1 Interrupt Mask
  95. #define HIB_IM_RTCALT0 0x00000001 // RTC Alert 0 Interrupt Mask
  96. //*****************************************************************************
  97. //
  98. // The following are defines for the bit fields in the HIB_RIS register.
  99. //
  100. //*****************************************************************************
  101. #define HIB_RIS_EXTW 0x00000008 // External Wake-Up Raw Interrupt
  102. // Status
  103. #define HIB_RIS_LOWBAT 0x00000004 // Low Battery Voltage Raw
  104. // Interrupt Status
  105. #define HIB_RIS_RTCALT1 0x00000002 // RTC Alert 1 Raw Interrupt Status
  106. #define HIB_RIS_RTCALT0 0x00000001 // RTC Alert 0 Raw Interrupt Status
  107. //*****************************************************************************
  108. //
  109. // The following are defines for the bit fields in the HIB_MIS register.
  110. //
  111. //*****************************************************************************
  112. #define HIB_MIS_EXTW 0x00000008 // External Wake-Up Masked
  113. // Interrupt Status
  114. #define HIB_MIS_LOWBAT 0x00000004 // Low Battery Voltage Masked
  115. // Interrupt Status
  116. #define HIB_MIS_RTCALT1 0x00000002 // RTC Alert 1 Masked Interrupt
  117. // Status
  118. #define HIB_MIS_RTCALT0 0x00000001 // RTC Alert 0 Masked Interrupt
  119. // Status
  120. //*****************************************************************************
  121. //
  122. // The following are defines for the bit fields in the HIB_IC register.
  123. //
  124. //*****************************************************************************
  125. #define HIB_IC_EXTW 0x00000008 // External Wake-Up Masked
  126. // Interrupt Clear
  127. #define HIB_IC_LOWBAT 0x00000004 // Low Battery Voltage Masked
  128. // Interrupt Clear
  129. #define HIB_IC_RTCALT1 0x00000002 // RTC Alert1 Masked Interrupt
  130. // Clear
  131. #define HIB_IC_RTCALT0 0x00000001 // RTC Alert0 Masked Interrupt
  132. // Clear
  133. //*****************************************************************************
  134. //
  135. // The following are defines for the bit fields in the HIB_RTCT register.
  136. //
  137. //*****************************************************************************
  138. #define HIB_RTCT_TRIM_M 0x0000FFFF // RTC Trim Value
  139. #define HIB_RTCT_TRIM_S 0
  140. //*****************************************************************************
  141. //
  142. // The following are defines for the bit fields in the HIB_DATA register.
  143. //
  144. //*****************************************************************************
  145. #define HIB_DATA_RTD_M 0xFFFFFFFF // Hibernation Module NV Data
  146. #define HIB_DATA_RTD_S 0
  147. //*****************************************************************************
  148. //
  149. // The following definitions are deprecated.
  150. //
  151. //*****************************************************************************
  152. #ifndef DEPRECATED
  153. //*****************************************************************************
  154. //
  155. // The following are deprecated defines for the Hibernation module register
  156. // addresses.
  157. //
  158. //*****************************************************************************
  159. #define HIB_DATA_END 0x400FC130 // end of data area, exclusive
  160. //*****************************************************************************
  161. //
  162. // The following are deprecated defines for the bit fields in the HIB_RTCC
  163. // register.
  164. //
  165. //*****************************************************************************
  166. #define HIB_RTCC_MASK 0xFFFFFFFF // RTC counter mask
  167. //*****************************************************************************
  168. //
  169. // The following are deprecated defines for the bit fields in the HIB_RTCM0
  170. // register.
  171. //
  172. //*****************************************************************************
  173. #define HIB_RTCM0_MASK 0xFFFFFFFF // RTC match 0 mask
  174. //*****************************************************************************
  175. //
  176. // The following are deprecated defines for the bit fields in the HIB_RTCM1
  177. // register.
  178. //
  179. //*****************************************************************************
  180. #define HIB_RTCM1_MASK 0xFFFFFFFF // RTC match 1 mask
  181. //*****************************************************************************
  182. //
  183. // The following are deprecated defines for the bit fields in the HIB_RTCLD
  184. // register.
  185. //
  186. //*****************************************************************************
  187. #define HIB_RTCLD_MASK 0xFFFFFFFF // RTC load mask
  188. //*****************************************************************************
  189. //
  190. // The following are deprecated defines for the bit fields in the HIB_RIS
  191. // register.
  192. //
  193. //*****************************************************************************
  194. #define HIB_RID_RTCALT0 0x00000001 // RTC match 0 interrupt
  195. //*****************************************************************************
  196. //
  197. // The following are deprecated defines for the bit fields in the HIB_MIS
  198. // register.
  199. //
  200. //*****************************************************************************
  201. #define HIB_MID_RTCALT0 0x00000001 // RTC match 0 interrupt
  202. //*****************************************************************************
  203. //
  204. // The following are deprecated defines for the bit fields in the HIB_RTCT
  205. // register.
  206. //
  207. //*****************************************************************************
  208. #define HIB_RTCT_MASK 0x0000FFFF // RTC trim mask
  209. //*****************************************************************************
  210. //
  211. // The following are deprecated defines for the bit fields in the HIB_DATA
  212. // register.
  213. //
  214. //*****************************************************************************
  215. #define HIB_DATA_MASK 0xFFFFFFFF // NV memory data mask
  216. #endif
  217. #endif // __HW_HIBERNATE_H__