1
0

hw_flash.h 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625
  1. //*****************************************************************************
  2. //
  3. // hw_flash.h - Macros used when accessing the flash controller.
  4. //
  5. // Copyright (c) 2005-2014 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Redistribution and use in source and binary forms, with or without
  9. // modification, are permitted provided that the following conditions
  10. // are met:
  11. //
  12. // Redistributions of source code must retain the above copyright
  13. // notice, this list of conditions and the following disclaimer.
  14. //
  15. // Redistributions in binary form must reproduce the above copyright
  16. // notice, this list of conditions and the following disclaimer in the
  17. // documentation and/or other materials provided with the
  18. // distribution.
  19. //
  20. // Neither the name of Texas Instruments Incorporated nor the names of
  21. // its contributors may be used to endorse or promote products derived
  22. // from this software without specific prior written permission.
  23. //
  24. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  25. // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  26. // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  27. // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  28. // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  29. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  30. // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  31. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  32. // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  33. // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  34. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  35. //
  36. // This is part of revision 2.1.0.12573 of the Tiva Firmware Development Package.
  37. //
  38. //*****************************************************************************
  39. #ifndef __HW_FLASH_H__
  40. #define __HW_FLASH_H__
  41. //*****************************************************************************
  42. //
  43. // The following are defines for the FLASH register offsets.
  44. //
  45. //*****************************************************************************
  46. #define FLASH_FMA 0x400FD000 // Flash Memory Address
  47. #define FLASH_FMD 0x400FD004 // Flash Memory Data
  48. #define FLASH_FMC 0x400FD008 // Flash Memory Control
  49. #define FLASH_FCRIS 0x400FD00C // Flash Controller Raw Interrupt
  50. // Status
  51. #define FLASH_FCIM 0x400FD010 // Flash Controller Interrupt Mask
  52. #define FLASH_FCMISC 0x400FD014 // Flash Controller Masked
  53. // Interrupt Status and Clear
  54. #define FLASH_FMC2 0x400FD020 // Flash Memory Control 2
  55. #define FLASH_FWBVAL 0x400FD030 // Flash Write Buffer Valid
  56. #define FLASH_FLPEKEY 0x400FD03C // Flash Program/Erase Key
  57. #define FLASH_FWBN 0x400FD100 // Flash Write Buffer n
  58. #define FLASH_PP 0x400FDFC0 // Flash Peripheral Properties
  59. #define FLASH_FSIZE 0x400FDFC0 // Flash Size
  60. #define FLASH_SSIZE 0x400FDFC4 // SRAM Size
  61. #define FLASH_CONF 0x400FDFC8 // Flash Configuration Register
  62. #define FLASH_ROMSWMAP 0x400FDFCC // ROM Software Map
  63. #define FLASH_DMASZ 0x400FDFD0 // Flash DMA Address Size
  64. #define FLASH_DMAST 0x400FDFD4 // Flash DMA Starting Address
  65. #define FLASH_RVP 0x400FE0D4 // Reset Vector Pointer
  66. #define FLASH_RMCTL 0x400FE0F0 // ROM Control
  67. #define FLASH_BOOTCFG 0x400FE1D0 // Boot Configuration
  68. #define FLASH_USERREG0 0x400FE1E0 // User Register 0
  69. #define FLASH_USERREG1 0x400FE1E4 // User Register 1
  70. #define FLASH_USERREG2 0x400FE1E8 // User Register 2
  71. #define FLASH_USERREG3 0x400FE1EC // User Register 3
  72. #define FLASH_FMPRE0 0x400FE200 // Flash Memory Protection Read
  73. // Enable 0
  74. #define FLASH_FMPRE1 0x400FE204 // Flash Memory Protection Read
  75. // Enable 1
  76. #define FLASH_FMPRE2 0x400FE208 // Flash Memory Protection Read
  77. // Enable 2
  78. #define FLASH_FMPRE3 0x400FE20C // Flash Memory Protection Read
  79. // Enable 3
  80. #define FLASH_FMPRE4 0x400FE210 // Flash Memory Protection Read
  81. // Enable 4
  82. #define FLASH_FMPRE5 0x400FE214 // Flash Memory Protection Read
  83. // Enable 5
  84. #define FLASH_FMPRE6 0x400FE218 // Flash Memory Protection Read
  85. // Enable 6
  86. #define FLASH_FMPRE7 0x400FE21C // Flash Memory Protection Read
  87. // Enable 7
  88. #define FLASH_FMPRE8 0x400FE220 // Flash Memory Protection Read
  89. // Enable 8
  90. #define FLASH_FMPRE9 0x400FE224 // Flash Memory Protection Read
  91. // Enable 9
  92. #define FLASH_FMPRE10 0x400FE228 // Flash Memory Protection Read
  93. // Enable 10
  94. #define FLASH_FMPRE11 0x400FE22C // Flash Memory Protection Read
  95. // Enable 11
  96. #define FLASH_FMPRE12 0x400FE230 // Flash Memory Protection Read
  97. // Enable 12
  98. #define FLASH_FMPRE13 0x400FE234 // Flash Memory Protection Read
  99. // Enable 13
  100. #define FLASH_FMPRE14 0x400FE238 // Flash Memory Protection Read
  101. // Enable 14
  102. #define FLASH_FMPRE15 0x400FE23C // Flash Memory Protection Read
  103. // Enable 15
  104. #define FLASH_FMPPE0 0x400FE400 // Flash Memory Protection Program
  105. // Enable 0
  106. #define FLASH_FMPPE1 0x400FE404 // Flash Memory Protection Program
  107. // Enable 1
  108. #define FLASH_FMPPE2 0x400FE408 // Flash Memory Protection Program
  109. // Enable 2
  110. #define FLASH_FMPPE3 0x400FE40C // Flash Memory Protection Program
  111. // Enable 3
  112. #define FLASH_FMPPE4 0x400FE410 // Flash Memory Protection Program
  113. // Enable 4
  114. #define FLASH_FMPPE5 0x400FE414 // Flash Memory Protection Program
  115. // Enable 5
  116. #define FLASH_FMPPE6 0x400FE418 // Flash Memory Protection Program
  117. // Enable 6
  118. #define FLASH_FMPPE7 0x400FE41C // Flash Memory Protection Program
  119. // Enable 7
  120. #define FLASH_FMPPE8 0x400FE420 // Flash Memory Protection Program
  121. // Enable 8
  122. #define FLASH_FMPPE9 0x400FE424 // Flash Memory Protection Program
  123. // Enable 9
  124. #define FLASH_FMPPE10 0x400FE428 // Flash Memory Protection Program
  125. // Enable 10
  126. #define FLASH_FMPPE11 0x400FE42C // Flash Memory Protection Program
  127. // Enable 11
  128. #define FLASH_FMPPE12 0x400FE430 // Flash Memory Protection Program
  129. // Enable 12
  130. #define FLASH_FMPPE13 0x400FE434 // Flash Memory Protection Program
  131. // Enable 13
  132. #define FLASH_FMPPE14 0x400FE438 // Flash Memory Protection Program
  133. // Enable 14
  134. #define FLASH_FMPPE15 0x400FE43C // Flash Memory Protection Program
  135. // Enable 15
  136. //*****************************************************************************
  137. //
  138. // The following are defines for the bit fields in the FLASH_FMA register.
  139. //
  140. //*****************************************************************************
  141. #define FLASH_FMA_OFFSET_M 0x000FFFFF // Address Offset
  142. #define FLASH_FMA_OFFSET_S 0
  143. //*****************************************************************************
  144. //
  145. // The following are defines for the bit fields in the FLASH_FMD register.
  146. //
  147. //*****************************************************************************
  148. #define FLASH_FMD_DATA_M 0xFFFFFFFF // Data Value
  149. #define FLASH_FMD_DATA_S 0
  150. //*****************************************************************************
  151. //
  152. // The following are defines for the bit fields in the FLASH_FMC register.
  153. //
  154. //*****************************************************************************
  155. #define FLASH_FMC_WRKEY 0xA4420000 // FLASH write key
  156. #define FLASH_FMC_COMT 0x00000008 // Commit Register Value
  157. #define FLASH_FMC_MERASE 0x00000004 // Mass Erase Flash Memory
  158. #define FLASH_FMC_ERASE 0x00000002 // Erase a Page of Flash Memory
  159. #define FLASH_FMC_WRITE 0x00000001 // Write a Word into Flash Memory
  160. //*****************************************************************************
  161. //
  162. // The following are defines for the bit fields in the FLASH_FCRIS register.
  163. //
  164. //*****************************************************************************
  165. #define FLASH_FCRIS_PROGRIS 0x00002000 // Program Verify Error Raw
  166. // Interrupt Status
  167. #define FLASH_FCRIS_ERRIS 0x00000800 // Erase Verify Error Raw Interrupt
  168. // Status
  169. #define FLASH_FCRIS_INVDRIS 0x00000400 // Invalid Data Raw Interrupt
  170. // Status
  171. #define FLASH_FCRIS_VOLTRIS 0x00000200 // Pump Voltage Raw Interrupt
  172. // Status
  173. #define FLASH_FCRIS_ERIS 0x00000004 // EEPROM Raw Interrupt Status
  174. #define FLASH_FCRIS_PRIS 0x00000002 // Programming Raw Interrupt Status
  175. #define FLASH_FCRIS_ARIS 0x00000001 // Access Raw Interrupt Status
  176. //*****************************************************************************
  177. //
  178. // The following are defines for the bit fields in the FLASH_FCIM register.
  179. //
  180. //*****************************************************************************
  181. #define FLASH_FCIM_PROGMASK 0x00002000 // PROGVER Interrupt Mask
  182. #define FLASH_FCIM_ERMASK 0x00000800 // ERVER Interrupt Mask
  183. #define FLASH_FCIM_INVDMASK 0x00000400 // Invalid Data Interrupt Mask
  184. #define FLASH_FCIM_VOLTMASK 0x00000200 // VOLT Interrupt Mask
  185. #define FLASH_FCIM_EMASK 0x00000004 // EEPROM Interrupt Mask
  186. #define FLASH_FCIM_PMASK 0x00000002 // Programming Interrupt Mask
  187. #define FLASH_FCIM_AMASK 0x00000001 // Access Interrupt Mask
  188. //*****************************************************************************
  189. //
  190. // The following are defines for the bit fields in the FLASH_FCMISC register.
  191. //
  192. //*****************************************************************************
  193. #define FLASH_FCMISC_PROGMISC 0x00002000 // PROGVER Masked Interrupt Status
  194. // and Clear
  195. #define FLASH_FCMISC_ERMISC 0x00000800 // ERVER Masked Interrupt Status
  196. // and Clear
  197. #define FLASH_FCMISC_INVDMISC 0x00000400 // Invalid Data Masked Interrupt
  198. // Status and Clear
  199. #define FLASH_FCMISC_VOLTMISC 0x00000200 // VOLT Masked Interrupt Status and
  200. // Clear
  201. #define FLASH_FCMISC_EMISC 0x00000004 // EEPROM Masked Interrupt Status
  202. // and Clear
  203. #define FLASH_FCMISC_PMISC 0x00000002 // Programming Masked Interrupt
  204. // Status and Clear
  205. #define FLASH_FCMISC_AMISC 0x00000001 // Access Masked Interrupt Status
  206. // and Clear
  207. //*****************************************************************************
  208. //
  209. // The following are defines for the bit fields in the FLASH_FMC2 register.
  210. //
  211. //*****************************************************************************
  212. #define FLASH_FMC2_WRKEY 0xA4420000 // FLASH write key
  213. #define FLASH_FMC2_WRBUF 0x00000001 // Buffered Flash Memory Write
  214. //*****************************************************************************
  215. //
  216. // The following are defines for the bit fields in the FLASH_FWBVAL register.
  217. //
  218. //*****************************************************************************
  219. #define FLASH_FWBVAL_FWB_M 0xFFFFFFFF // Flash Memory Write Buffer
  220. //*****************************************************************************
  221. //
  222. // The following are defines for the bit fields in the FLASH_FLPEKEY register.
  223. //
  224. //*****************************************************************************
  225. #define FLASH_FLPEKEY_PEKEY_M 0x0000FFFF // Key Value
  226. #define FLASH_FLPEKEY_PEKEY_S 0
  227. //*****************************************************************************
  228. //
  229. // The following are defines for the bit fields in the FLASH_FWBN register.
  230. //
  231. //*****************************************************************************
  232. #define FLASH_FWBN_DATA_M 0xFFFFFFFF // Data
  233. //*****************************************************************************
  234. //
  235. // The following are defines for the bit fields in the FLASH_PP register.
  236. //
  237. //*****************************************************************************
  238. #define FLASH_PP_PFC 0x40000000 // Prefetch Buffer Mode
  239. #define FLASH_PP_FMM 0x20000000 // Flash Mirror Mode
  240. #define FLASH_PP_DFA 0x10000000 // DMA Flash Access
  241. #define FLASH_PP_EESS_M 0x00780000 // EEPROM Sector Size of the
  242. // physical bank
  243. #define FLASH_PP_EESS_1KB 0x00000000 // 1 KB
  244. #define FLASH_PP_EESS_2KB 0x00080000 // 2 KB
  245. #define FLASH_PP_EESS_4KB 0x00100000 // 4 KB
  246. #define FLASH_PP_EESS_8KB 0x00180000 // 8 KB
  247. #define FLASH_PP_MAINSS_M 0x00070000 // Flash Sector Size of the
  248. // physical bank
  249. #define FLASH_PP_MAINSS_1KB 0x00000000 // 1 KB
  250. #define FLASH_PP_MAINSS_2KB 0x00010000 // 2 KB
  251. #define FLASH_PP_MAINSS_4KB 0x00020000 // 4 KB
  252. #define FLASH_PP_MAINSS_8KB 0x00030000 // 8 KB
  253. #define FLASH_PP_MAINSS_16KB 0x00040000 // 16 KB
  254. #define FLASH_PP_SIZE_M 0x0000FFFF // Flash Size
  255. #define FLASH_PP_SIZE_512KB 0x000000FF // 512 KB of Flash
  256. #define FLASH_PP_SIZE_1MB 0x000001FF // 1024 KB of Flash
  257. //*****************************************************************************
  258. //
  259. // The following are defines for the bit fields in the FLASH_FSIZE register.
  260. //
  261. //*****************************************************************************
  262. #define FLASH_FSIZE_SIZE_M 0x0000FFFF // Flash Size
  263. #define FLASH_FSIZE_SIZE_32KB 0x0000000F // 32 KB of Flash
  264. #define FLASH_FSIZE_SIZE_64KB 0x0000001F // 64 KB of Flash
  265. #define FLASH_FSIZE_SIZE_128KB 0x0000003F // 128 KB of Flash
  266. #define FLASH_FSIZE_SIZE_256KB 0x0000007F // 256 KB of Flash
  267. //*****************************************************************************
  268. //
  269. // The following are defines for the bit fields in the FLASH_SSIZE register.
  270. //
  271. //*****************************************************************************
  272. #define FLASH_SSIZE_SIZE_M 0x0000FFFF // SRAM Size
  273. #define FLASH_SSIZE_SIZE_12KB 0x0000002F // 12 KB of SRAM
  274. #define FLASH_SSIZE_SIZE_24KB 0x0000005F // 24 KB of SRAM
  275. #define FLASH_SSIZE_SIZE_32KB 0x0000007F // 32 KB of SRAM
  276. #define FLASH_SSIZE_SIZE_256KB 0x000003FF // 256 KB of SRAM
  277. //*****************************************************************************
  278. //
  279. // The following are defines for the bit fields in the FLASH_CONF register.
  280. //
  281. //*****************************************************************************
  282. #define FLASH_CONF_FMME 0x40000000 // Flash Mirror Mode Enable
  283. #define FLASH_CONF_SPFE 0x20000000 // Single Prefetch Mode Enable
  284. #define FLASH_CONF_CLRTV 0x00100000 // Clear Valid Tags
  285. #define FLASH_CONF_FPFON 0x00020000 // Force Prefetch On
  286. #define FLASH_CONF_FPFOFF 0x00010000 // Force Prefetch Off
  287. //*****************************************************************************
  288. //
  289. // The following are defines for the bit fields in the FLASH_ROMSWMAP register.
  290. //
  291. //*****************************************************************************
  292. #define FLASH_ROMSWMAP_SAFERTOS 0x00000001 // SafeRTOS Present
  293. #define FLASH_ROMSWMAP_SW0EN_M 0x00000003 // ROM SW Region 0 Availability
  294. #define FLASH_ROMSWMAP_SW0EN_NOTVIS \
  295. 0x00000000 // Software region not available to
  296. // the core
  297. #define FLASH_ROMSWMAP_SW0EN_CORE \
  298. 0x00000001 // Region available to core
  299. #define FLASH_ROMSWMAP_SW1EN_M 0x0000000C // ROM SW Region 1 Availability
  300. #define FLASH_ROMSWMAP_SW1EN_NOTVIS \
  301. 0x00000000 // Software region not available to
  302. // the core
  303. #define FLASH_ROMSWMAP_SW1EN_CORE \
  304. 0x00000004 // Region available to core
  305. #define FLASH_ROMSWMAP_SW2EN_M 0x00000030 // ROM SW Region 2 Availability
  306. #define FLASH_ROMSWMAP_SW2EN_NOTVIS \
  307. 0x00000000 // Software region not available to
  308. // the core
  309. #define FLASH_ROMSWMAP_SW2EN_CORE \
  310. 0x00000010 // Region available to core
  311. #define FLASH_ROMSWMAP_SW3EN_M 0x000000C0 // ROM SW Region 3 Availability
  312. #define FLASH_ROMSWMAP_SW3EN_NOTVIS \
  313. 0x00000000 // Software region not available to
  314. // the core
  315. #define FLASH_ROMSWMAP_SW3EN_CORE \
  316. 0x00000040 // Region available to core
  317. #define FLASH_ROMSWMAP_SW4EN_M 0x00000300 // ROM SW Region 4 Availability
  318. #define FLASH_ROMSWMAP_SW4EN_NOTVIS \
  319. 0x00000000 // Software region not available to
  320. // the core
  321. #define FLASH_ROMSWMAP_SW4EN_CORE \
  322. 0x00000100 // Region available to core
  323. #define FLASH_ROMSWMAP_SW5EN_M 0x00000C00 // ROM SW Region 5 Availability
  324. #define FLASH_ROMSWMAP_SW5EN_NOTVIS \
  325. 0x00000000 // Software region not available to
  326. // the core
  327. #define FLASH_ROMSWMAP_SW5EN_CORE \
  328. 0x00000400 // Region available to core
  329. #define FLASH_ROMSWMAP_SW6EN_M 0x00003000 // ROM SW Region 6 Availability
  330. #define FLASH_ROMSWMAP_SW6EN_NOTVIS \
  331. 0x00000000 // Software region not available to
  332. // the core
  333. #define FLASH_ROMSWMAP_SW6EN_CORE \
  334. 0x00001000 // Region available to core
  335. #define FLASH_ROMSWMAP_SW7EN_M 0x0000C000 // ROM SW Region 7 Availability
  336. #define FLASH_ROMSWMAP_SW7EN_NOTVIS \
  337. 0x00000000 // Software region not available to
  338. // the core
  339. #define FLASH_ROMSWMAP_SW7EN_CORE \
  340. 0x00004000 // Region available to core
  341. //*****************************************************************************
  342. //
  343. // The following are defines for the bit fields in the FLASH_DMASZ register.
  344. //
  345. //*****************************************************************************
  346. #define FLASH_DMASZ_SIZE_M 0x0003FFFF // uDMA-accessible Memory Size
  347. #define FLASH_DMASZ_SIZE_S 0
  348. //*****************************************************************************
  349. //
  350. // The following are defines for the bit fields in the FLASH_DMAST register.
  351. //
  352. //*****************************************************************************
  353. #define FLASH_DMAST_ADDR_M 0x1FFFF800 // Contains the starting address of
  354. // the flash region accessible by
  355. // uDMA if the FLASHPP register DFA
  356. // bit is set
  357. #define FLASH_DMAST_ADDR_S 11
  358. //*****************************************************************************
  359. //
  360. // The following are defines for the bit fields in the FLASH_RVP register.
  361. //
  362. //*****************************************************************************
  363. #define FLASH_RVP_RV_M 0xFFFFFFFF // Reset Vector Pointer Address
  364. #define FLASH_RVP_RV_S 0
  365. //*****************************************************************************
  366. //
  367. // The following are defines for the bit fields in the FLASH_RMCTL register.
  368. //
  369. //*****************************************************************************
  370. #define FLASH_RMCTL_BA 0x00000001 // Boot Alias
  371. //*****************************************************************************
  372. //
  373. // The following are defines for the bit fields in the FLASH_BOOTCFG register.
  374. //
  375. //*****************************************************************************
  376. #define FLASH_BOOTCFG_NW 0x80000000 // Not Written
  377. #define FLASH_BOOTCFG_PORT_M 0x0000E000 // Boot GPIO Port
  378. #define FLASH_BOOTCFG_PORT_A 0x00000000 // Port A
  379. #define FLASH_BOOTCFG_PORT_B 0x00002000 // Port B
  380. #define FLASH_BOOTCFG_PORT_C 0x00004000 // Port C
  381. #define FLASH_BOOTCFG_PORT_D 0x00006000 // Port D
  382. #define FLASH_BOOTCFG_PORT_E 0x00008000 // Port E
  383. #define FLASH_BOOTCFG_PORT_F 0x0000A000 // Port F
  384. #define FLASH_BOOTCFG_PORT_G 0x0000C000 // Port G
  385. #define FLASH_BOOTCFG_PORT_H 0x0000E000 // Port H
  386. #define FLASH_BOOTCFG_PIN_M 0x00001C00 // Boot GPIO Pin
  387. #define FLASH_BOOTCFG_PIN_0 0x00000000 // Pin 0
  388. #define FLASH_BOOTCFG_PIN_1 0x00000400 // Pin 1
  389. #define FLASH_BOOTCFG_PIN_2 0x00000800 // Pin 2
  390. #define FLASH_BOOTCFG_PIN_3 0x00000C00 // Pin 3
  391. #define FLASH_BOOTCFG_PIN_4 0x00001000 // Pin 4
  392. #define FLASH_BOOTCFG_PIN_5 0x00001400 // Pin 5
  393. #define FLASH_BOOTCFG_PIN_6 0x00001800 // Pin 6
  394. #define FLASH_BOOTCFG_PIN_7 0x00001C00 // Pin 7
  395. #define FLASH_BOOTCFG_POL 0x00000200 // Boot GPIO Polarity
  396. #define FLASH_BOOTCFG_EN 0x00000100 // Boot GPIO Enable
  397. #define FLASH_BOOTCFG_KEY 0x00000010 // KEY Select
  398. #define FLASH_BOOTCFG_DBG1 0x00000002 // Debug Control 1
  399. #define FLASH_BOOTCFG_DBG0 0x00000001 // Debug Control 0
  400. //*****************************************************************************
  401. //
  402. // The following are defines for the bit fields in the FLASH_USERREG0 register.
  403. //
  404. //*****************************************************************************
  405. #define FLASH_USERREG0_DATA_M 0xFFFFFFFF // User Data
  406. #define FLASH_USERREG0_DATA_S 0
  407. //*****************************************************************************
  408. //
  409. // The following are defines for the bit fields in the FLASH_USERREG1 register.
  410. //
  411. //*****************************************************************************
  412. #define FLASH_USERREG1_DATA_M 0xFFFFFFFF // User Data
  413. #define FLASH_USERREG1_DATA_S 0
  414. //*****************************************************************************
  415. //
  416. // The following are defines for the bit fields in the FLASH_USERREG2 register.
  417. //
  418. //*****************************************************************************
  419. #define FLASH_USERREG2_DATA_M 0xFFFFFFFF // User Data
  420. #define FLASH_USERREG2_DATA_S 0
  421. //*****************************************************************************
  422. //
  423. // The following are defines for the bit fields in the FLASH_USERREG3 register.
  424. //
  425. //*****************************************************************************
  426. #define FLASH_USERREG3_DATA_M 0xFFFFFFFF // User Data
  427. #define FLASH_USERREG3_DATA_S 0
  428. //*****************************************************************************
  429. //
  430. // The following are defines for the bit fields in the FLASH_FMPRE8 register.
  431. //
  432. //*****************************************************************************
  433. #define FLASH_FMPRE8_READ_ENABLE_M \
  434. 0xFFFFFFFF // Flash Read Enable
  435. #define FLASH_FMPRE8_READ_ENABLE_S \
  436. 0
  437. //*****************************************************************************
  438. //
  439. // The following are defines for the bit fields in the FLASH_FMPRE9 register.
  440. //
  441. //*****************************************************************************
  442. #define FLASH_FMPRE9_READ_ENABLE_M \
  443. 0xFFFFFFFF // Flash Read Enable
  444. #define FLASH_FMPRE9_READ_ENABLE_S \
  445. 0
  446. //*****************************************************************************
  447. //
  448. // The following are defines for the bit fields in the FLASH_FMPRE10 register.
  449. //
  450. //*****************************************************************************
  451. #define FLASH_FMPRE10_READ_ENABLE_M \
  452. 0xFFFFFFFF // Flash Read Enable
  453. #define FLASH_FMPRE10_READ_ENABLE_S \
  454. 0
  455. //*****************************************************************************
  456. //
  457. // The following are defines for the bit fields in the FLASH_FMPRE11 register.
  458. //
  459. //*****************************************************************************
  460. #define FLASH_FMPRE11_READ_ENABLE_M \
  461. 0xFFFFFFFF // Flash Read Enable
  462. #define FLASH_FMPRE11_READ_ENABLE_S \
  463. 0
  464. //*****************************************************************************
  465. //
  466. // The following are defines for the bit fields in the FLASH_FMPRE12 register.
  467. //
  468. //*****************************************************************************
  469. #define FLASH_FMPRE12_READ_ENABLE_M \
  470. 0xFFFFFFFF // Flash Read Enable
  471. #define FLASH_FMPRE12_READ_ENABLE_S \
  472. 0
  473. //*****************************************************************************
  474. //
  475. // The following are defines for the bit fields in the FLASH_FMPRE13 register.
  476. //
  477. //*****************************************************************************
  478. #define FLASH_FMPRE13_READ_ENABLE_M \
  479. 0xFFFFFFFF // Flash Read Enable
  480. #define FLASH_FMPRE13_READ_ENABLE_S \
  481. 0
  482. //*****************************************************************************
  483. //
  484. // The following are defines for the bit fields in the FLASH_FMPRE14 register.
  485. //
  486. //*****************************************************************************
  487. #define FLASH_FMPRE14_READ_ENABLE_M \
  488. 0xFFFFFFFF // Flash Read Enable
  489. #define FLASH_FMPRE14_READ_ENABLE_S \
  490. 0
  491. //*****************************************************************************
  492. //
  493. // The following are defines for the bit fields in the FLASH_FMPRE15 register.
  494. //
  495. //*****************************************************************************
  496. #define FLASH_FMPRE15_READ_ENABLE_M \
  497. 0xFFFFFFFF // Flash Read Enable
  498. #define FLASH_FMPRE15_READ_ENABLE_S \
  499. 0
  500. //*****************************************************************************
  501. //
  502. // The following are defines for the bit fields in the FLASH_FMPPE8 register.
  503. //
  504. //*****************************************************************************
  505. #define FLASH_FMPPE8_PROG_ENABLE_M \
  506. 0xFFFFFFFF // Flash Programming Enable
  507. #define FLASH_FMPPE8_PROG_ENABLE_S \
  508. 0
  509. //*****************************************************************************
  510. //
  511. // The following are defines for the bit fields in the FLASH_FMPPE9 register.
  512. //
  513. //*****************************************************************************
  514. #define FLASH_FMPPE9_PROG_ENABLE_M \
  515. 0xFFFFFFFF // Flash Programming Enable
  516. #define FLASH_FMPPE9_PROG_ENABLE_S \
  517. 0
  518. //*****************************************************************************
  519. //
  520. // The following are defines for the bit fields in the FLASH_FMPPE10 register.
  521. //
  522. //*****************************************************************************
  523. #define FLASH_FMPPE10_PROG_ENABLE_M \
  524. 0xFFFFFFFF // Flash Programming Enable
  525. #define FLASH_FMPPE10_PROG_ENABLE_S \
  526. 0
  527. //*****************************************************************************
  528. //
  529. // The following are defines for the bit fields in the FLASH_FMPPE11 register.
  530. //
  531. //*****************************************************************************
  532. #define FLASH_FMPPE11_PROG_ENABLE_M \
  533. 0xFFFFFFFF // Flash Programming Enable
  534. #define FLASH_FMPPE11_PROG_ENABLE_S \
  535. 0
  536. //*****************************************************************************
  537. //
  538. // The following are defines for the bit fields in the FLASH_FMPPE12 register.
  539. //
  540. //*****************************************************************************
  541. #define FLASH_FMPPE12_PROG_ENABLE_M \
  542. 0xFFFFFFFF // Flash Programming Enable
  543. #define FLASH_FMPPE12_PROG_ENABLE_S \
  544. 0
  545. //*****************************************************************************
  546. //
  547. // The following are defines for the bit fields in the FLASH_FMPPE13 register.
  548. //
  549. //*****************************************************************************
  550. #define FLASH_FMPPE13_PROG_ENABLE_M \
  551. 0xFFFFFFFF // Flash Programming Enable
  552. #define FLASH_FMPPE13_PROG_ENABLE_S \
  553. 0
  554. //*****************************************************************************
  555. //
  556. // The following are defines for the bit fields in the FLASH_FMPPE14 register.
  557. //
  558. //*****************************************************************************
  559. #define FLASH_FMPPE14_PROG_ENABLE_M \
  560. 0xFFFFFFFF // Flash Programming Enable
  561. #define FLASH_FMPPE14_PROG_ENABLE_S \
  562. 0
  563. //*****************************************************************************
  564. //
  565. // The following are defines for the bit fields in the FLASH_FMPPE15 register.
  566. //
  567. //*****************************************************************************
  568. #define FLASH_FMPPE15_PROG_ENABLE_M \
  569. 0xFFFFFFFF // Flash Programming Enable
  570. #define FLASH_FMPPE15_PROG_ENABLE_S \
  571. 0
  572. //*****************************************************************************
  573. //
  574. // The following are defines for the erase size of the FLASH block that is
  575. // erased by an erase operation, and the protect size is the size of the FLASH
  576. // block that is protected by each protection register.
  577. //
  578. //*****************************************************************************
  579. #define FLASH_PROTECT_SIZE 0x00000800
  580. #define FLASH_ERASE_SIZE 0x00000400
  581. #endif // __HW_FLASH_H__