1
0

hw_eeprom.h 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. //*****************************************************************************
  2. //
  3. // hw_eeprom.h - Macros used when accessing the EEPROM controller.
  4. //
  5. // Copyright (c) 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_EEPROM_H__
  25. #define __HW_EEPROM_H__
  26. //*****************************************************************************
  27. //
  28. // The following are defines for the EEPROM register offsets.
  29. //
  30. //*****************************************************************************
  31. #define EEPROM_EESIZE 0x400AF000 // EEPROM Size Information
  32. #define EEPROM_EEBLOCK 0x400AF004 // EEPROM Current Block
  33. #define EEPROM_EEOFFSET 0x400AF008 // EEPROM Current Offset
  34. #define EEPROM_EERDWR 0x400AF010 // EEPROM Read-Write
  35. #define EEPROM_EERDWRINC 0x400AF014 // EEPROM Read-Write with Increment
  36. #define EEPROM_EEDONE 0x400AF018 // EEPROM Done Status
  37. #define EEPROM_EESUPP 0x400AF01C // EEPROM Support Control and
  38. // Status
  39. #define EEPROM_EEUNLOCK 0x400AF020 // EEPROM Unlock
  40. #define EEPROM_EEPROT 0x400AF030 // EEPROM Protection
  41. #define EEPROM_EEPASS0 0x400AF034 // EEPROM Password
  42. #define EEPROM_EEPASS1 0x400AF038 // EEPROM Password
  43. #define EEPROM_EEPASS2 0x400AF03C // EEPROM Password
  44. #define EEPROM_EEINT 0x400AF040 // EEPROM Interrupt
  45. #define EEPROM_EEHIDE 0x400AF050 // EEPROM Block Hide
  46. #define EEPROM_EEDBGME 0x400AF080 // EEPROM Debug Mass Erase
  47. #define EEPROM_EEPROMPP 0x400AFFC0 // EEPROM
  48. //*****************************************************************************
  49. //
  50. // The following are defines for the bit fields in the EEPROM_EESIZE register.
  51. //
  52. //*****************************************************************************
  53. #define EEPROM_EESIZE_WORDCNT_M 0x0000FFFF // Number of 32-Bit Words
  54. #define EEPROM_EESIZE_BLKCNT_M 0x07FF0000 // Number of 16-Word Blocks
  55. #define EEPROM_EESIZE_WORDCNT_S 0
  56. #define EEPROM_EESIZE_BLKCNT_S 16
  57. //*****************************************************************************
  58. //
  59. // The following are defines for the bit fields in the EEPROM_EEBLOCK register.
  60. //
  61. //*****************************************************************************
  62. #define EEPROM_EEBLOCK_BLOCK_M 0x0000FFFF // Current Block
  63. #define EEPROM_EEBLOCK_BLOCK_S 0
  64. //*****************************************************************************
  65. //
  66. // The following are defines for the bit fields in the EEPROM_EEOFFSET
  67. // register.
  68. //
  69. //*****************************************************************************
  70. #define EEPROM_EEOFFSET_OFFSET_M \
  71. 0x0000000F // Current Address Offset
  72. #define EEPROM_EEOFFSET_OFFSET_S \
  73. 0
  74. //*****************************************************************************
  75. //
  76. // The following are defines for the bit fields in the EEPROM_EERDWR register.
  77. //
  78. //*****************************************************************************
  79. #define EEPROM_EERDWR_VALUE_M 0xFFFFFFFF // EEPROM Read or Write Data
  80. #define EEPROM_EERDWR_VALUE_S 0
  81. //*****************************************************************************
  82. //
  83. // The following are defines for the bit fields in the EEPROM_EERDWRINC
  84. // register.
  85. //
  86. //*****************************************************************************
  87. #define EEPROM_EERDWRINC_VALUE_M \
  88. 0xFFFFFFFF // EEPROM Read or Write Data with
  89. // Increment
  90. #define EEPROM_EERDWRINC_VALUE_S \
  91. 0
  92. //*****************************************************************************
  93. //
  94. // The following are defines for the bit fields in the EEPROM_EEDONE register.
  95. //
  96. //*****************************************************************************
  97. #define EEPROM_EEDONE_WORKING 0x00000001 // EEPROM Working
  98. #define EEPROM_EEDONE_WKERASE 0x00000004 // Working on an Erase
  99. #define EEPROM_EEDONE_WKCOPY 0x00000008 // Working on a Copy
  100. #define EEPROM_EEDONE_NOPERM 0x00000010 // Write Without Permission
  101. #define EEPROM_EEDONE_WRBUSY 0x00000020 // Write Busy
  102. #define EEPROM_EEDONE_INVPL 0x00000100 // Invalid Program Voltage Level
  103. //*****************************************************************************
  104. //
  105. // The following are defines for the bit fields in the EEPROM_EESUPP register.
  106. //
  107. //*****************************************************************************
  108. #define EEPROM_EESUPP_START 0x00000001 // Start Erase
  109. #define EEPROM_EESUPP_EREQ 0x00000002 // Erase Required
  110. #define EEPROM_EESUPP_ERETRY 0x00000004 // Erase Must Be Retried
  111. #define EEPROM_EESUPP_PRETRY 0x00000008 // Programming Must Be Retried
  112. //*****************************************************************************
  113. //
  114. // The following are defines for the bit fields in the EEPROM_EEUNLOCK
  115. // register.
  116. //
  117. //*****************************************************************************
  118. #define EEPROM_EEUNLOCK_UNLOCK_M \
  119. 0xFFFFFFFF // EEPROM Unlock
  120. //*****************************************************************************
  121. //
  122. // The following are defines for the bit fields in the EEPROM_EEPROT register.
  123. //
  124. //*****************************************************************************
  125. #define EEPROM_EEPROT_PROT_M 0x00000007 // Protection Control
  126. #define EEPROM_EEPROT_PROT_RWNPW \
  127. 0x00000000 // This setting is the default. If
  128. // there is no password, the block
  129. // is not protected and is readable
  130. // and writable
  131. #define EEPROM_EEPROT_PROT_RWPW 0x00000001 // If there is a password, the
  132. // block is readable or writable
  133. // only when unlocked
  134. #define EEPROM_EEPROT_PROT_RONPW \
  135. 0x00000002 // If there is no password, the
  136. // block is readable, not writable
  137. #define EEPROM_EEPROT_ACC 0x00000008 // Access Control
  138. //*****************************************************************************
  139. //
  140. // The following are defines for the bit fields in the EEPROM_EEPASS0 register.
  141. //
  142. //*****************************************************************************
  143. #define EEPROM_EEPASS0_PASS_M 0xFFFFFFFF // Password
  144. #define EEPROM_EEPASS0_PASS_S 0
  145. //*****************************************************************************
  146. //
  147. // The following are defines for the bit fields in the EEPROM_EEPASS1 register.
  148. //
  149. //*****************************************************************************
  150. #define EEPROM_EEPASS1_PASS_M 0xFFFFFFFF // Password
  151. #define EEPROM_EEPASS1_PASS_S 0
  152. //*****************************************************************************
  153. //
  154. // The following are defines for the bit fields in the EEPROM_EEPASS2 register.
  155. //
  156. //*****************************************************************************
  157. #define EEPROM_EEPASS2_PASS_M 0xFFFFFFFF // Password
  158. #define EEPROM_EEPASS2_PASS_S 0
  159. //*****************************************************************************
  160. //
  161. // The following are defines for the bit fields in the EEPROM_EEINT register.
  162. //
  163. //*****************************************************************************
  164. #define EEPROM_EEINT_INT 0x00000001 // Interrupt Enable
  165. //*****************************************************************************
  166. //
  167. // The following are defines for the bit fields in the EEPROM_EEHIDE register.
  168. //
  169. //*****************************************************************************
  170. #define EEPROM_EEHIDE_HN_M 0xFFFFFFFE // Hide Block
  171. //*****************************************************************************
  172. //
  173. // The following are defines for the bit fields in the EEPROM_EEDBGME register.
  174. //
  175. //*****************************************************************************
  176. #define EEPROM_EEDBGME_ME 0x00000001 // Mass Erase
  177. #define EEPROM_EEDBGME_KEY_M 0xFFFF0000 // Erase Key
  178. #define EEPROM_EEDBGME_KEY_S 16
  179. //*****************************************************************************
  180. //
  181. // The following are defines for the bit fields in the EEPROM_EEPROMPP
  182. // register.
  183. //
  184. //*****************************************************************************
  185. #define EEPROM_EEPROMPP_SIZE_M 0x0000001F // EEPROM Size
  186. #define EEPROM_EEPROMPP_SIZE_S 0
  187. #endif // __HW_EEPROM_H__