hw_hibernate.h 11 KB

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