fmc_reg.h 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. /**************************************************************************//**
  2. * @file fmc_reg.h
  3. * @version V1.00
  4. * @brief FMC register definition header file
  5. *
  6. * SPDX-License-Identifier: Apache-2.0
  7. * @copyright (C) 2017-2020 Nuvoton Technology Corp. All rights reserved.
  8. *****************************************************************************/
  9. #ifndef __FMC_REG_H__
  10. #define __FMC_REG_H__
  11. #if defined ( __CC_ARM )
  12. #pragma anon_unions
  13. #endif
  14. /**
  15. @addtogroup REGISTER Control Register
  16. @{
  17. */
  18. /**
  19. @addtogroup FMC Flash Memory Controller(FMC)
  20. Memory Mapped Structure for FMC Controller
  21. @{ */
  22. typedef struct
  23. {
  24. /**
  25. * @var FMC_T::ISPCTL
  26. * Offset: 0x00 ISP Control Register
  27. * ---------------------------------------------------------------------------------------------------
  28. * |Bits |Field |Descriptions
  29. * | :----: | :----: | :---- |
  30. * |[0] |ISPEN |ISP Enable Bit (Write Protect)
  31. * | | |ISP function enable bit. Set this bit to enable ISP function.
  32. * | | |0 = ISP function Disabled.
  33. * | | |1 = ISP function Enabled.
  34. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  35. * |[1] |BS |Boot Select (Write Protect)
  36. * | | |When MBS in CONFIG0 is 1, set/clear this bit to select next booting from LDROM/APROM, respectively
  37. * | | |This bit also functions as chip booting status flag, which can be used to check where chip booted from
  38. * | | |This bit is initiated with the inversed value of CBS[1] (CONFIG0[7]) after any reset is happened except CPU reset (CPU is 1) or system reset (SYS) is happened
  39. * | | |0 = Booting from APROM when MBS (CONFIG0[5]) is 1.
  40. * | | |1 = Booting from LDROM when MBS (CONFIG0[5]) is 1.
  41. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  42. * |[2] |SPUEN |SPROM Update Enable Bit (Write Protect)
  43. * | | |0 = SPROM cannot be updated.
  44. * | | |1 = SPROM can be updated.
  45. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  46. * |[3] |APUEN |APROM Update Enable Bit (Write Protect)
  47. * | | |0 = APROM cannot be updated when the chip runs in APROM.
  48. * | | |1 = APROM can be updated when the chip runs in APROM.
  49. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  50. * |[4] |CFGUEN |CONFIG Update Enable Bit (Write Protect)
  51. * | | |0 = CONFIG cannot be updated.
  52. * | | |1 = CONFIG can be updated.
  53. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  54. * |[5] |LDUEN |LDROM Update Enable Bit (Write Protect)
  55. * | | |LDROM update enable bit.
  56. * | | |0 = LDROM cannot be updated.
  57. * | | |1 = LDROM can be updated.
  58. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  59. * |[6] |ISPFF |ISP Fail Flag (Write Protect)
  60. * | | |This bit is set by hardware when a triggered ISP meets any of the following conditions:
  61. * | | |This bit needs to be cleared by writing 1 to it.
  62. * | | |(1) APROM writes to itself if APUEN is set to 0.
  63. * | | |(2) LDROM writes to itself if LDUEN is set to 0.
  64. * | | |(3) CONFIG is erased/programmed if CFGUEN is set to 0.
  65. * | | |(4) SPROM is erased/programmed if SPUEN is set to 0
  66. * | | |(5) SPROM is programmed at SPROM secured mode.
  67. * | | |(6) Page Erase command at LOCK mode with ICE connection
  68. * | | |(7) Erase or Program command at brown-out detected
  69. * | | |(8) Destination address is illegal, such as over an available range.
  70. * | | |(9) Invalid ISP commands
  71. * | | |(10) Vector address is mapping to SPROM region
  72. * | | |(11) KPROM is erased/programmed if KEYLOCK is set to 1
  73. * | | |(12) APROM(except for Data Flash) is erased/programmed if KEYLOCK is set to 1
  74. * | | |(13) LDROM is erased/programmed if KEYLOCK is set to 1
  75. * | | |(14) SPROM is erased/programmed if KEYLOCK is set to 1 and KEYENROM[1:0] are 1.
  76. * | | |(15) CONFIG is erased/programmed if KEYLOCK is set to 1 and KEYENROM[1:0] are 1
  77. * | | |(16) Invalid operations (except for chip erase) with ICE connection if SBLOCK is not 0x5A
  78. * | | |(17) Read any content of boot loader with ICE connection
  79. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  80. * |[16] |BL |Boot Loader Booting (Write Protect)
  81. * | | |This bit is initiated with the inversed value of MBS (CONFIG0[5])
  82. * | | |Any reset, except CPU reset (CPU is 1) or system reset (SYS), BL will be reloaded
  83. * | | |This bit is used to check chip boot from Boot Loader or not
  84. * | | |User should keep original value of this bit when updating FMC_ISPCTL register.
  85. * | | |0 = Booting from APROM or LDROM.
  86. * | | |1 = Booting from Boot Loader.
  87. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  88. * @var FMC_T::ISPADDR
  89. * Offset: 0x04 ISP Address Register
  90. * ---------------------------------------------------------------------------------------------------
  91. * |Bits |Field |Descriptions
  92. * | :----: | :----: | :---- |
  93. * |[31:0] |ISPADDR |ISP Address
  94. * | | |The NuMicro M480 series is equipped with embedded flash
  95. * | | |ISPADDR[1:0] must be kept 00 for ISP 32-bit operation
  96. * | | |ISPADDR[2:0] must be kept 000 for ISP 64-bit operation.
  97. * | | |For CRC32 Checksum Calculation command, this field is the flash starting address for checksum calculation, 4 Kbytes alignment is necessary for CRC32 checksum calculation.
  98. * | | |For FLASH 32-bit Program, ISP address needs word alignment (4-byte)
  99. * | | |For FLASH 64-bit Program, ISP address needs double word alignment (8-byte).
  100. * @var FMC_T::ISPDAT
  101. * Offset: 0x08 ISP Data Register
  102. * ---------------------------------------------------------------------------------------------------
  103. * |Bits |Field |Descriptions
  104. * | :----: | :----: | :---- |
  105. * |[31:0] |ISPDAT |ISP Data
  106. * | | |Write data to this register before ISP program operation.
  107. * | | |Read data from this register after ISP read operation.
  108. * | | |When ISPFF (FMC_ISPCTL[6]) is 1, ISPDAT = 0xffff_ffff
  109. * | | |For Run CRC32 Checksum Calculation command, ISPDAT is the memory size (byte) and 4 Kbytes alignment
  110. * | | |For ISP Read CRC32 Checksum command, ISPDAT is the checksum result
  111. * | | |If ISPDAT = 0x0000_0000, it means that (1) the checksum calculation is in progress, or (2) the memory range for checksum calculation is incorrect
  112. * @var FMC_T::ISPCMD
  113. * Offset: 0x0C ISP Command Register
  114. * ---------------------------------------------------------------------------------------------------
  115. * |Bits |Field |Descriptions
  116. * | :----: | :----: | :---- |
  117. * |[6:0] |CMD |ISP Command
  118. * | | |ISP command table is shown below:
  119. * | | |0x00= FLASH Read.
  120. * | | |0x04= Read Unique ID.
  121. * | | |0x08= Read Flash All-One Result.
  122. * | | |0x0B= Read Company ID.
  123. * | | |0x0C= Read Device ID.
  124. * | | |0x0D= Read Checksum.
  125. * | | |0x21= FLASH 32-bit Program.
  126. * | | |0x22= FLASH Page Erase. Erase any page in two banks, except for OTP.
  127. * | | |0x23= FLASH Bank Erase. Erase all pages of APROM in BANK0 or BANK1.
  128. * | | |0x25= FLASH Block Erase. Erase four pages alignment of APROM in BANK0 or BANK1..
  129. * | | |0x27= FLASH Multi-Word Program.
  130. * | | |0x28= Run Flash All-One Verification.
  131. * | | |0x2D= Run Checksum Calculation.
  132. * | | |0x2E= Vector Remap.
  133. * | | |0x40= FLASH 64-bit Read.
  134. * | | |0x61= FLASH 64-bit Program.
  135. * | | |The other commands are invalid.
  136. * @var FMC_T::ISPTRG
  137. * Offset: 0x10 ISP Trigger Control Register
  138. * ---------------------------------------------------------------------------------------------------
  139. * |Bits |Field |Descriptions
  140. * | :----: | :----: | :---- |
  141. * |[0] |ISPGO |ISP Start Trigger (Write Protect)
  142. * | | |Write 1 to start ISP operation and this bit will be cleared to 0 by hardware automatically when ISP operation is finished.
  143. * | | |0 = ISP operation is finished.
  144. * | | |1 = ISP is progressed.
  145. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  146. * @var FMC_T::DFBA
  147. * Offset: 0x14 Data Flash Base Address
  148. * ---------------------------------------------------------------------------------------------------
  149. * |Bits |Field |Descriptions
  150. * | :----: | :----: | :---- |
  151. * |[31:0] |DFBA |Data Flash Base Address
  152. * | | |This register indicates Data Flash start address. It is a read only register.
  153. * | | |The Data Flash is shared with APROM. the content of this register is loaded from CONFIG1
  154. * | | |This register is valid when DFEN (CONFIG0[0]) =0 .
  155. * @var FMC_T::ISPSTS
  156. * Offset: 0x40 ISP Status Register
  157. * ---------------------------------------------------------------------------------------------------
  158. * |Bits |Field |Descriptions
  159. * | :----: | :----: | :---- |
  160. * |[0] |ISPBUSY |ISP Busy Flag (Read Only)
  161. * | | |Write 1 to start ISP operation and this bit will be cleared to 0 by hardware automatically when ISP operation is finished.
  162. * | | |This bit is the mirror of ISPGO(FMC_ISPTRG[0]).
  163. * | | |0 = ISP operation is finished.
  164. * | | |1 = ISP is progressed.
  165. * |[2:1] |CBS |Boot Selection of CONFIG (Read Only)
  166. * | | |This bit is initiated with the CBS (CONFIG0[7:6]) after any reset is happened except CPU reset (CPU is 1) or system reset (SYS) is happened.
  167. * | | |The following function is valid when MBS (FMC_ISPSTS[3])= 1.
  168. * | | |00 = LDROM with IAP mode.
  169. * | | |01 = LDROM without IAP mode.
  170. * | | |10 = APROM with IAP mode.
  171. * | | |11 = APROM without IAP mode.
  172. * |[3] |MBS |Boot From Boot Loader Selection Flag (Read Only)
  173. * | | |This bit is initiated with the MBS (CONFIG0[5]) after any reset is happened except CPU reset (CPU is 1) or system reset (SYS) is happened
  174. * | | |0 = Booting from Boot Loader.
  175. * | | |1 = Booting from LDROM/APROM.(.see CBS bit setting)
  176. * |[4] |FCYCDIS |Flash Access Cycle Auto-tuning Disabled Flag (Read Only)
  177. * | | |This bit is set if flash access cycle auto-tuning function is disabled
  178. * | | |The auto-tunning function is disabled by FADIS(FMC_CYCCTL[8]) or HIRC clock is not ready.
  179. * | | |0 = Flash access cycle auto-tuning is enabled.
  180. * | | |1 = Flash access cycle auto-tuning is disabled.
  181. * |[5] |PGFF |Flash Program with Fast Verification Flag (Read Only)
  182. * | | |This bit is set if data is mismatched at ISP programming verification
  183. * | | |This bit is clear by performing ISP flash erase or ISP read CID operation
  184. * | | |0 = Flash Program is success.
  185. * | | |1 = Flash Program is fail. Program data is different with data in the flash memory
  186. * |[6] |ISPFF |ISP Fail Flag (Write Protect)
  187. * | | |This bit is the mirror of ISPFF (FMC_ISPCTL[6]), it needs to be cleared by writing 1 to FMC_ISPCTL[6] or FMC_ISPSTS[6]
  188. * | | |This bit is set by hardware when a triggered ISP meets any of the following conditions:
  189. * | | |(1) APROM writes to itself if APUEN is set to 0.
  190. * | | |(2) LDROM writes to itself if LDUEN is set to 0.
  191. * | | |(3) CONFIG is erased/programmed if CFGUEN is set to 0.
  192. * | | |(4) SPROM is erased/programmed if SPUEN is set to 0
  193. * | | |(5) SPROM is programmed at SPROM secured mode.
  194. * | | |(6) Page Erase command at LOCK mode with ICE connection
  195. * | | |(7) Erase or Program command at brown-out detected
  196. * | | |(8) Destination address is illegal, such as over an available range.
  197. * | | |(9) Invalid ISP commands
  198. * | | |(10) Vector address is mapping to SPROM region.
  199. * | | |(11) KPROM is erased/programmed if KEYLOCK is set to 1
  200. * | | |(12) APROM(except for Data Flash) is erased/programmed if KEYLOCK is set to 1
  201. * | | |(13) LDROM is erased/programmed if KEYLOCK is set to 1
  202. * | | |(14) SPROM is erased/programmed if KEYLOCK is set to 1 and KEYENROM[1:0] are 1.
  203. * | | |(15) CONFIG is erased/programmed if KEYLOCK is set to 1 and KEYENROM[1:0] are 1.
  204. * | | |(16) Invalid operations (except for chip erase) with ICE connection if SBLOCK is not 0x5A
  205. * | | |(17) Read any content of boot loader with ICE connection
  206. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  207. * |[7] |ALLONE |Flash All-one Verification Flag
  208. * | | |This bit is set by hardware if all of flash bits are 1, and clear if flash bits are not all 1 after "Run Flash All-One Verification" complete; this bit also can be clear by writing 1
  209. * | | |0 = All of flash bits are 1 after "Run Flash All-One Verification" complete.
  210. * | | |1 = Flash bits are not all 1 after "Run Flash All-One Verification" complete.
  211. * |[23:9] |VECMAP |Vector Page Mapping Address (Read Only)
  212. * | | |All access to 0x0000_0000~0x0000_01FF is remapped to the flash memory address {VECMAP[14:0], 9u2019h000} ~ {VECMAP[14:0], 9u2019h1FF}
  213. * |[31] |SCODE |Security Code Active Flag
  214. * | | |This bit is set by hardware when detecting SPROM secured code is active at flash initiation, or software writes 1 to this bit to make secured code active; this bit is clear by SPROM page erase operation.
  215. * | | |0 = Secured code is inactive.
  216. * | | |1 = Secured code is active.
  217. * @var FMC_T::CYCCTL
  218. * Offset: 0x4C Flash Access Cycle Control Register
  219. * ---------------------------------------------------------------------------------------------------
  220. * |Bits |Field |Descriptions
  221. * | :----: | :----: | :---- |
  222. * |[3:0] |CYCLE |Flash Access Cycle Control (Write Protect)
  223. * | | |0001 = CPU access with one wait cycle if cache miss; flash access cycle is 1;.
  224. * | | |The HCLK working frequency range range is<27MHz
  225. * | | |0010 = CPU access with two wait cycles if cache miss; flash access cycle is 2;.
  226. * | | | The optimized HCLK working frequency range is 27~54 MHz
  227. * | | |0011 = CPU access with three wait cycles if cache miss; flash access cycle is 3;.
  228. * | | |The optimized HCLK working frequency range is 54~81MHz
  229. * | | |0100 = CPU access with four wait cycles if cache miss; flash access cycle is 4;.
  230. * | | | The optimized HCLK working frequency range is81~108MHz
  231. * | | |0101 = CPU access with five wait cycles if cache miss; flash access cycle is 5;.
  232. * | | |The optimized HCLK working frequency range is 108~135MHz
  233. * | | |0110 = CPU access with six wait cycles if cache miss; flash access cycle is 6;.
  234. * | | | The optimized HCLK working frequency range is 135~162MHz
  235. * | | |0111 = CPU access with seven wait cycles if cache miss; flash access cycle is 7;.
  236. * | | | The optimized HCLK working frequency range is 162~192MHz
  237. * | | |1000 = CPU access with eight wait cycles if cache miss; flash access cycle is 8;.
  238. * | | |The optimized HCLK working frequency range is >192MHz
  239. * | | |Note: This bit is write protected. Refer to the SYS_REGLCTL register.
  240. * @var FMC_T::KPKEY0
  241. * Offset: 0x50 KPROM KEY0 Data Register
  242. * ---------------------------------------------------------------------------------------------------
  243. * |Bits |Field |Descriptions
  244. * | :----: | :----: | :---- |
  245. * |[31:0] |KPKEY0 |KPROM KEY0 Data (Write Only)
  246. * | | |Write KPKEY0 data to this register before KEY Comparison operation.
  247. * @var FMC_T::KPKEY1
  248. * Offset: 0x54 KPROM KEY1 Data Register
  249. * ---------------------------------------------------------------------------------------------------
  250. * |Bits |Field |Descriptions
  251. * | :----: | :----: | :---- |
  252. * |[31:0] |KPKEY1 |KPROM KEY1 Data (Write Only)
  253. * | | |Write KPKEY1 data to this register before KEY Comparison operation.
  254. * @var FMC_T::KPKEY2
  255. * Offset: 0x58 KPROM KEY2 Data Register
  256. * ---------------------------------------------------------------------------------------------------
  257. * |Bits |Field |Descriptions
  258. * | :----: | :----: | :---- |
  259. * |[31:0] |KPKEY2 |KPROM KEY2 Data (Write Only)
  260. * | | |Write KPKEY2 data to this register before KEY Comparison operation.
  261. * @var FMC_T::KPKEYTRG
  262. * Offset: 0x5C KPROM KEY Comparison Trigger Control Register
  263. * ---------------------------------------------------------------------------------------------------
  264. * |Bits |Field |Descriptions
  265. * | :----: | :----: | :---- |
  266. * |[0] |KPKEYGO |KPROM KEY Comparison Start Trigger (Write Protection)
  267. * | | |Write 1 to start KEY comparison operation and this bit will be cleared to 0 by hardware automatically when KEY comparison operation is finished
  268. * | | |This trigger operation is valid while FORBID (FMC_KPKEYSTS [3]) is 0.
  269. * | | |0 = KEY comparison operation is finished.
  270. * | | |1 = KEY comparison is progressed.
  271. * | | |Note: This bit is write-protected. Refer to the SYS_REGLCTL register.
  272. * |[1] |TCEN |Timeout Counting Enable (Write Protection)
  273. * | | |0 = Timeout counting is disabled.
  274. * | | |1 = Timeout counting is enabled if input key is matched after key comparison finish.
  275. * | | |10 minutes is at least for timeout, and average is about 20 minutes.
  276. * | | |Note: This bit is write-protected. Refer to the SYS_REGLCTL register.
  277. * @var FMC_T::KPKEYSTS
  278. * Offset: 0x60 KPROM KEY Comparison Status Register
  279. * ---------------------------------------------------------------------------------------------------
  280. * |Bits |Field |Descriptions
  281. * | :----: | :----: | :---- |
  282. * |[0] |KEYBUSY |KEY Comparison Busy (Read Only)
  283. * | | |0 = KEY comparison is finished.
  284. * | | |1 = KEY comparison is busy.
  285. * |[1] |KEYLOCK |KEY LOCK Flag
  286. * | | |This bit is set to 1 if KEYMATCH (FMC_KPKEYSTS [2]) is 0 and cleared to 0 if KEYMATCH is 1 in Security Key protection
  287. * | | |After Mass Erase operation, users must reset or power on /off to clear this bit to 0
  288. * | | |This bit also can be set to 1 while
  289. * | | | - CPU write 1 to KEYLOCK(FMC_KPKEYSTS[1]) or
  290. * | | | - KEYFLAG(FMC_KPKEYSTS[4]) is 1 at power-on or reset or
  291. * | | | - KEYENROM is programmed a non-0xFF value or
  292. * | | | - Timeout event or
  293. * | | | - FORBID(FMC_KPKEYSTS[3]) is 1
  294. * | | |0 = KPROM, LDROM and APROM (not include Data Flash) is not in write protection.
  295. * | | |1 = KPROM, LDROM and APROM (not include Data Flash) is in write protection.
  296. * | | |SPROM write protect is depended on SPFLAG.
  297. * | | |CONFIG write protect is depended on CFGFLAG
  298. * |[2] |KEYMATCH |KEY Match Flag (Read Only)
  299. * | | |This bit is set to 1 after KEY comparison complete if the KEY0, KEY1 and KEY2 are matched with the 96-bit security keys in KPROM; and cleared to 0 if KEYs are unmatched
  300. * | | |This bit is also cleared to 0 while
  301. * | | | - CPU writing 1 to KEYLOCK(FMC_KPKEYSTS[1]) or
  302. * | | | - Timeout event or
  303. * | | | - KPROM is erased or
  304. * | | | - KEYENROM is programmed to a non-0xFF value.
  305. * | | | - Chip is in power down mode.
  306. * | | |0 = KEY0, KEY1, and KEY2 are unmatched with the KPROM setting.
  307. * | | |1 = KEY0, KEY1, and KEY2 are matched with the KPROM setting.
  308. * |[3] |FORBID |KEY Comparison Forbidden Flag (Read Only)
  309. * | | |This bit is set to 1 when KPKECNT(FMC_KPKEY0[4:0]) is more than KPKEMAX (FMC_KPKEY0[12:8]) or KPCNT (FMC_KPCNT [2:0]) is more than KPMAX (FMC_KPCNT [10:8]).
  310. * | | |0 = KEY comparison is not forbidden.
  311. * | | |1 = KEY comparison is forbidden, KEYGO (FMC_KEYTRG [0]) cannot trigger.
  312. * |[4] |KEYFLAG |KEY Protection Enabled Flag (Read Only)
  313. * | | |This bit is set while the KEYENROM [7:0] is not 0xFF at power-on or reset
  314. * | | |This bit is cleared to 0 by hardware while KPROM is erased
  315. * | | |This bit is set to 1 by hardware while KEYENROM is programmed to a non-0xFF value.
  316. * | | |0 = Security Key protection is disabled.
  317. * | | |1 = Security Key protection is enabled.
  318. * |[5] |CFGFLAG |CONFIG Write-protection Enabled Flag (Read Only)
  319. * | | |This bit is set while the KEYENROM [0] is 0 at power-on or reset
  320. * | | |This bit is cleared to 0 by hardware while KPROM is erased
  321. * | | |This bit is set to 1 by hardware while KEYENROM[0] is programmed to 0.
  322. * | | |0 = CONFIG write-protection is disabled.
  323. * | | |1 = CONFIG write-protection is enabled.
  324. * |[6] |SPFLAG |SPROM Write-protection Enabled Flag (Read Only)
  325. * | | |This bit is set while the KEYENROM [1] is 0 at power-on or reset
  326. * | | |This bit is cleared to 0 by hardware while KPROM is erased
  327. * | | |This bit is set to 1 by hardware while KEYENROM[1] is programmed to 0.
  328. * | | |0 = SPROM write-protection is disabled.
  329. * | | |1 = SPROM write-protection is enabled.
  330. * @var FMC_T::KPKEYCNT
  331. * Offset: 0x64 KPROM KEY-Unmatched Counting Register
  332. * ---------------------------------------------------------------------------------------------------
  333. * |Bits |Field |Descriptions
  334. * | :----: | :----: | :---- |
  335. * |[5:0] |KPKECNT |Error Key Entry Counter at Each Power-on (Read Only)
  336. * | | |KPKECNT is increased when entry keys is wrong in Security Key protection
  337. * | | |KPKECNT is cleared to 0 if key comparison is matched or system power-on.
  338. * |[13:8] |KPKEMAX |Maximum Number for Error Key Entry at Each Power-on (Read Only)
  339. * | | |KPKEMAX is the maximum error key entry number at each power-on
  340. * | | |When KPKEMAXROM of KPROM is erased or programmed, KPKEMAX will also be updated
  341. * | | |KPKEMAX is used to limit KPKECNT(FMC_KPKEY0[5:0]) maximum counting
  342. * | | |The FORBID (FMC_KPKEYSTS [3]) will be set to 1 when KPKECNT is more than KPKEMAX.
  343. * @var FMC_T::KPCNT
  344. * Offset: 0x68 KPROM KEY-Unmatched Power-On Counting Register
  345. * ---------------------------------------------------------------------------------------------------
  346. * |Bits |Field |Descriptions
  347. * | :----: | :----: | :---- |
  348. * |[3:0] |KPCNT |Power-on Counter for Error Key Entry(Read Only)
  349. * | | |KPCNT is the power-on counting for error key entry in Security Key protection
  350. * | | |KPCNT is cleared to 0 if key comparison is matched.
  351. * |[11:8] |KPMAX |Power-on Maximum Number for Error Key Entry (Read Only)
  352. * | | |KPMAX is the power-on maximum number for error key entry
  353. * | | |When KPMAXROM of KPROM is erased or programmed, KPMAX will also be updated
  354. * | | |KPMAX is used to limit KPCNT (FMC_KPCNT [3:0]) maximum counting
  355. * | | |The FORBID(FMC_KPKEYSTS[3]) will be set to 1 when KPCNT is more than KPMAX
  356. * @var FMC_T::MPDAT0
  357. * Offset: 0x80 ISP Data0 Register
  358. * ---------------------------------------------------------------------------------------------------
  359. * |Bits |Field |Descriptions
  360. * | :----: | :----: | :---- |
  361. * |[31:0] |ISPDAT0 |ISP Data 0
  362. * | | |This register is the first 32-bit data for 32-bit/64-bit/multi-word programming, and it is also the mirror of FMC_ISPDAT, both registers keep the same data
  363. * @var FMC_T::MPDAT1
  364. * Offset: 0x84 ISP Data1 Register
  365. * ---------------------------------------------------------------------------------------------------
  366. * |Bits |Field |Descriptions
  367. * | :----: | :----: | :---- |
  368. * |[31:0] |ISPDAT1 |ISP Data 1
  369. * | | |This register is the second 32-bit data for 64-bit/multi-word programming.
  370. * @var FMC_T::MPDAT2
  371. * Offset: 0x88 ISP Data2 Register
  372. * ---------------------------------------------------------------------------------------------------
  373. * |Bits |Field |Descriptions
  374. * | :----: | :----: | :---- |
  375. * |[31:0] |ISPDAT2 |ISP Data 2
  376. * | | |This register is the third 32-bit data for multi-word programming.
  377. * @var FMC_T::MPDAT3
  378. * Offset: 0x8C ISP Data3 Register
  379. * ---------------------------------------------------------------------------------------------------
  380. * |Bits |Field |Descriptions
  381. * | :----: | :----: | :---- |
  382. * |[31:0] |ISPDAT3 |ISP Data 3
  383. * | | |This register is the fourth 32-bit data for multi-word programming.
  384. * @var FMC_T::MPSTS
  385. * Offset: 0xC0 ISP Multi-Program Status Register
  386. * ---------------------------------------------------------------------------------------------------
  387. * |Bits |Field |Descriptions
  388. * | :----: | :----: | :---- |
  389. * |[0] |MPBUSY |ISP Multi-word Program Busy Flag (Read Only)
  390. * | | |Write 1 to start ISP Multi-Word program operation and this bit will be cleared to 0 by hardware automatically when ISP Multi-Word program operation is finished.
  391. * | | |This bit is the mirror of ISPGO(FMC_ISPTRG[0]).
  392. * | | |0 = ISP Multi-Word program operation is finished.
  393. * | | |1 = ISP Multi-Word program operation is progressed.
  394. * |[1] |PPGO |ISP Multi-program Status (Read Only)
  395. * | | |0 = ISP multi-word program operation is not active.
  396. * | | |1 = ISP multi-word program operation is in progress.
  397. * |[2] |ISPFF |ISP Fail Flag (Read Only)
  398. * | | |This bit is the mirror of ISPFF (FMC_ISPCTL[6]), it needs to be cleared by writing 1 to FMC_ISPCTL[6] or FMC_ISPSTS[6]
  399. * | | |This bit is set by hardware when a triggered ISP meets any of the following conditions:
  400. * | | |(1) APROM writes to itself if APUEN is set to 0.
  401. * | | |(2) LDROM writes to itself if LDUEN is set to 0.
  402. * | | |(3) CONFIG is erased/programmed if CFGUEN is set to 0.
  403. * | | |(4) SPROM is erased/programmed if SPUEN is set to 0
  404. * | | |(5) SPROM is programmed at SPROM secured mode.
  405. * | | |(6) Page Erase command at LOCK mode with ICE connection
  406. * | | |(7) Erase or Program command at brown-out detected
  407. * | | |(8) Destination address is illegal, such as over an available range.
  408. * | | |(9) Invalid ISP commands
  409. * | | |(10) Vector address is mapping to SPROM region.
  410. * |[4] |D0 |ISP DATA 0 Flag (Read Only)
  411. * | | |This bit is set when FMC_MPDAT0 is written and auto-clear to 0 when the FMC_MPDAT0 data is programmed to flash complete.
  412. * | | |0 = FMC_MPDAT0 register is empty, or program to flash complete.
  413. * | | |1 = FMC_MPDAT0 register has been written, and not program to flash complete.
  414. * |[5] |D1 |ISP DATA 1 Flag (Read Only)
  415. * | | |This bit is set when FMC_MPDAT1 is written and auto-clear to 0 when the FMC_MPDAT1 data is programmed to flash complete.
  416. * | | |0 = FMC_MPDAT1 register is empty, or program to flash complete.
  417. * | | |1 = FMC_MPDAT1 register has been written, and not program to flash complete.
  418. * |[6] |D2 |ISP DATA 2 Flag (Read Only)
  419. * | | |This bit is set when FMC_MPDAT2 is written and auto-clear to 0 when the FMC_MPDAT2 data is programmed to flash complete.
  420. * | | |0 = FMC_MPDAT2 register is empty, or program to flash complete.
  421. * | | |1 = FMC_MPDAT2 register has been written, and not program to flash complete.
  422. * |[7] |D3 |ISP DATA 3 Flag (Read Only)
  423. * | | |This bit is set when FMC_MPDAT3 is written and auto-clear to 0 when the FMC_MPDAT3 data is programmed to flash complete.
  424. * | | |0 = FMC_MPDAT3 register is empty, or program to flash complete.
  425. * | | |1 = FMC_MPDAT3 register has been written, and not program to flash complete.
  426. * @var FMC_T::MPADDR
  427. * Offset: 0xC4 ISP Multi-Program Address Register
  428. * ---------------------------------------------------------------------------------------------------
  429. * |Bits |Field |Descriptions
  430. * | :----: | :----: | :---- |
  431. * |[31:0] |MPADDR |ISP Multi-word Program Address
  432. * | | |MPADDR is the address of ISP multi-word program operation when ISPGO flag is 1.
  433. * | | |MPADDR will keep the final ISP address when ISP multi-word program is complete.
  434. */
  435. __IO uint32_t ISPCTL; /*!< [0x0000] ISP Control Register */
  436. __IO uint32_t ISPADDR; /*!< [0x0004] ISP Address Register */
  437. __IO uint32_t ISPDAT; /*!< [0x0008] ISP Data Register */
  438. __IO uint32_t ISPCMD; /*!< [0x000c] ISP Command Register */
  439. __IO uint32_t ISPTRG; /*!< [0x0010] ISP Trigger Control Register */
  440. __I uint32_t DFBA; /*!< [0x0014] Data Flash Base Address */
  441. /// @cond HIDDEN_SYMBOLS
  442. __I uint32_t RESERVE0[10];
  443. /// @endcond //HIDDEN_SYMBOLS
  444. __IO uint32_t ISPSTS; /*!< [0x0040] ISP Status Register */
  445. /// @cond HIDDEN_SYMBOLS
  446. __I uint32_t RESERVE1[2];
  447. /// @endcond //HIDDEN_SYMBOLS
  448. __IO uint32_t CYCCTL; /*!< [0x004c] Flash Access Cycle Control Register */
  449. __O uint32_t KPKEY0; /*!< [0x0050] KPROM KEY0 Data Register */
  450. __O uint32_t KPKEY1; /*!< [0x0054] KPROM KEY1 Data Register */
  451. __O uint32_t KPKEY2; /*!< [0x0058] KPROM KEY2 Data Register */
  452. __IO uint32_t KPKEYTRG; /*!< [0x005c] KPROM KEY Comparison Trigger Control Register */
  453. __IO uint32_t KPKEYSTS; /*!< [0x0060] KPROM KEY Comparison Status Register */
  454. __I uint32_t KPKEYCNT; /*!< [0x0064] KPROM KEY-Unmatched Counting Register */
  455. __I uint32_t KPCNT; /*!< [0x0068] KPROM KEY-Unmatched Power-On Counting Register */
  456. /// @cond HIDDEN_SYMBOLS
  457. __I uint32_t RESERVE2[5];
  458. /// @endcond //HIDDEN_SYMBOLS
  459. __IO uint32_t MPDAT0; /*!< [0x0080] ISP Data0 Register */
  460. __IO uint32_t MPDAT1; /*!< [0x0084] ISP Data1 Register */
  461. __IO uint32_t MPDAT2; /*!< [0x0088] ISP Data2 Register */
  462. __IO uint32_t MPDAT3; /*!< [0x008c] ISP Data3 Register */
  463. /// @cond HIDDEN_SYMBOLS
  464. __I uint32_t RESERVE3[12];
  465. /// @endcond //HIDDEN_SYMBOLS
  466. __I uint32_t MPSTS; /*!< [0x00c0] ISP Multi-Program Status Register */
  467. __I uint32_t MPADDR; /*!< [0x00c4] ISP Multi-Program Address Register */
  468. /// @cond HIDDEN_SYMBOLS
  469. __I uint32_t RESERVE4[2];
  470. /// @endcond //HIDDEN_SYMBOLS
  471. __I uint32_t XOMR0STS; /*!< [0x00d0] XOM Region 0 Status Register */
  472. __I uint32_t XOMR1STS; /*!< [0x00d4] XOM Region 1 Status Register */
  473. __I uint32_t XOMR2STS; /*!< [0x00d8] XOM Region 2 Status Register */
  474. __I uint32_t XOMR3STS; /*!< [0x00dc] XOM Region 3 Status Register */
  475. __I uint32_t XOMSTS; /*!< [0x00e0] XOM Status Register */
  476. } FMC_T;
  477. /**
  478. @addtogroup FMC_CONST FMC Bit Field Definition
  479. Constant Definitions for FMC Controller
  480. @{ */
  481. #define FMC_ISPCTL_ISPEN_Pos (0) /*!< FMC_T::ISPCTL: ISPEN Position */
  482. #define FMC_ISPCTL_ISPEN_Msk (0x1ul << FMC_ISPCTL_ISPEN_Pos) /*!< FMC_T::ISPCTL: ISPEN Mask */
  483. #define FMC_ISPCTL_BS_Pos (1) /*!< FMC_T::ISPCTL: BS Position */
  484. #define FMC_ISPCTL_BS_Msk (0x1ul << FMC_ISPCTL_BS_Pos) /*!< FMC_T::ISPCTL: BS Mask */
  485. #define FMC_ISPCTL_SPUEN_Pos (2) /*!< FMC_T::ISPCTL: SPUEN Position */
  486. #define FMC_ISPCTL_SPUEN_Msk (0x1ul << FMC_ISPCTL_SPUEN_Pos) /*!< FMC_T::ISPCTL: SPUEN Mask */
  487. #define FMC_ISPCTL_APUEN_Pos (3) /*!< FMC_T::ISPCTL: APUEN Position */
  488. #define FMC_ISPCTL_APUEN_Msk (0x1ul << FMC_ISPCTL_APUEN_Pos) /*!< FMC_T::ISPCTL: APUEN Mask */
  489. #define FMC_ISPCTL_CFGUEN_Pos (4) /*!< FMC_T::ISPCTL: CFGUEN Position */
  490. #define FMC_ISPCTL_CFGUEN_Msk (0x1ul << FMC_ISPCTL_CFGUEN_Pos) /*!< FMC_T::ISPCTL: CFGUEN Mask */
  491. #define FMC_ISPCTL_LDUEN_Pos (5) /*!< FMC_T::ISPCTL: LDUEN Position */
  492. #define FMC_ISPCTL_LDUEN_Msk (0x1ul << FMC_ISPCTL_LDUEN_Pos) /*!< FMC_T::ISPCTL: LDUEN Mask */
  493. #define FMC_ISPCTL_ISPFF_Pos (6) /*!< FMC_T::ISPCTL: ISPFF Position */
  494. #define FMC_ISPCTL_ISPFF_Msk (0x1ul << FMC_ISPCTL_ISPFF_Pos) /*!< FMC_T::ISPCTL: ISPFF Mask */
  495. #define FMC_ISPCTL_BL_Pos (16) /*!< FMC_T::ISPCTL: BL Position */
  496. #define FMC_ISPCTL_BL_Msk (0x1ul << FMC_ISPCTL_BL_Pos) /*!< FMC_T::ISPCTL: BL Mask */
  497. #define FMC_ISPADDR_ISPADDR_Pos (0) /*!< FMC_T::ISPADDR: ISPADDR Position */
  498. #define FMC_ISPADDR_ISPADDR_Msk (0xfffffffful << FMC_ISPADDR_ISPADDR_Pos) /*!< FMC_T::ISPADDR: ISPADDR Mask */
  499. #define FMC_ISPDAT_ISPDAT_Pos (0) /*!< FMC_T::ISPDAT: ISPDAT Position */
  500. #define FMC_ISPDAT_ISPDAT_Msk (0xfffffffful << FMC_ISPDAT_ISPDAT_Pos) /*!< FMC_T::ISPDAT: ISPDAT Mask */
  501. #define FMC_ISPCMD_CMD_Pos (0) /*!< FMC_T::ISPCMD: CMD Position */
  502. #define FMC_ISPCMD_CMD_Msk (0x7ful << FMC_ISPCMD_CMD_Pos) /*!< FMC_T::ISPCMD: CMD Mask */
  503. #define FMC_ISPTRG_ISPGO_Pos (0) /*!< FMC_T::ISPTRG: ISPGO Position */
  504. #define FMC_ISPTRG_ISPGO_Msk (0x1ul << FMC_ISPTRG_ISPGO_Pos) /*!< FMC_T::ISPTRG: ISPGO Mask */
  505. #define FMC_DFBA_DFBA_Pos (0) /*!< FMC_T::DFBA: DFBA Position */
  506. #define FMC_DFBA_DFBA_Msk (0xfffffffful << FMC_DFBA_DFBA_Pos) /*!< FMC_T::DFBA: DFBA Mask */
  507. #define FMC_ISPSTS_ISPBUSY_Pos (0) /*!< FMC_T::ISPSTS: ISPBUSY Position */
  508. #define FMC_ISPSTS_ISPBUSY_Msk (0x1ul << FMC_ISPSTS_ISPBUSY_Pos) /*!< FMC_T::ISPSTS: ISPBUSY Mask */
  509. #define FMC_ISPSTS_CBS_Pos (1) /*!< FMC_T::ISPSTS: CBS Position */
  510. #define FMC_ISPSTS_CBS_Msk (0x3ul << FMC_ISPSTS_CBS_Pos) /*!< FMC_T::ISPSTS: CBS Mask */
  511. #define FMC_ISPSTS_MBS_Pos (3) /*!< FMC_T::ISPSTS: MBS Position */
  512. #define FMC_ISPSTS_MBS_Msk (0x1ul << FMC_ISPSTS_MBS_Pos) /*!< FMC_T::ISPSTS: MBS Mask */
  513. #define FMC_ISPSTS_FCYCDIS_Pos (4) /*!< FMC_T::ISPSTS: FCYCDIS Position */
  514. #define FMC_ISPSTS_FCYCDIS_Msk (0x1ul << FMC_ISPSTS_FCYCDIS_Pos) /*!< FMC_T::ISPSTS: FCYCDIS Mask */
  515. #define FMC_ISPSTS_PGFF_Pos (5) /*!< FMC_T::ISPSTS: PGFF Position */
  516. #define FMC_ISPSTS_PGFF_Msk (0x1ul << FMC_ISPSTS_PGFF_Pos) /*!< FMC_T::ISPSTS: PGFF Mask */
  517. #define FMC_ISPSTS_ISPFF_Pos (6) /*!< FMC_T::ISPSTS: ISPFF Position */
  518. #define FMC_ISPSTS_ISPFF_Msk (0x1ul << FMC_ISPSTS_ISPFF_Pos) /*!< FMC_T::ISPSTS: ISPFF Mask */
  519. #define FMC_ISPSTS_ALLONE_Pos (7) /*!< FMC_T::ISPSTS: ALLONE Position */
  520. #define FMC_ISPSTS_ALLONE_Msk (0x1ul << FMC_ISPSTS_ALLONE_Pos) /*!< FMC_T::ISPSTS: ALLONE Mask */
  521. #define FMC_ISPSTS_VECMAP_Pos (9) /*!< FMC_T::ISPSTS: VECMAP Position */
  522. #define FMC_ISPSTS_VECMAP_Msk (0x7ffful << FMC_ISPSTS_VECMAP_Pos) /*!< FMC_T::ISPSTS: VECMAP Mask */
  523. #define FMC_ISPSTS_SCODE_Pos (31) /*!< FMC_T::ISPSTS: SCODE Position */
  524. #define FMC_ISPSTS_SCODE_Msk (0x1ul << FMC_ISPSTS_SCODE_Pos) /*!< FMC_T::ISPSTS: SCODE Mask */
  525. #define FMC_CYCCTL_CYCLE_Pos (0) /*!< FMC_T::CYCCTL: CYCLE Position */
  526. #define FMC_CYCCTL_CYCLE_Msk (0xful << FMC_CYCCTL_CYCLE_Pos) /*!< FMC_T::CYCCTL: CYCLE Mask */
  527. #define FMC_KPKEY0_KPKEY0_Pos (0) /*!< FMC_T::KPKEY0: KPKEY0 Position */
  528. #define FMC_KPKEY0_KPKEY0_Msk (0xfffffffful << FMC_KPKEY0_KPKEY0_Pos) /*!< FMC_T::KPKEY0: KPKEY0 Mask */
  529. #define FMC_KPKEY1_KPKEY1_Pos (0) /*!< FMC_T::KPKEY1: KPKEY1 Position */
  530. #define FMC_KPKEY1_KPKEY1_Msk (0xfffffffful << FMC_KPKEY1_KPKEY1_Pos) /*!< FMC_T::KPKEY1: KPKEY1 Mask */
  531. #define FMC_KPKEY2_KPKEY2_Pos (0) /*!< FMC_T::KPKEY2: KPKEY2 Position */
  532. #define FMC_KPKEY2_KPKEY2_Msk (0xfffffffful << FMC_KPKEY2_KPKEY2_Pos) /*!< FMC_T::KPKEY2: KPKEY2 Mask */
  533. #define FMC_KPKEYTRG_KPKEYGO_Pos (0) /*!< FMC_T::KPKEYTRG: KPKEYGO Position */
  534. #define FMC_KPKEYTRG_KPKEYGO_Msk (0x1ul << FMC_KPKEYTRG_KPKEYGO_Pos) /*!< FMC_T::KPKEYTRG: KPKEYGO Mask */
  535. #define FMC_KPKEYTRG_TCEN_Pos (1) /*!< FMC_T::KPKEYTRG: TCEN Position */
  536. #define FMC_KPKEYTRG_TCEN_Msk (0x1ul << FMC_KPKEYTRG_TCEN_Pos) /*!< FMC_T::KPKEYTRG: TCEN Mask */
  537. #define FMC_KPKEYSTS_KEYBUSY_Pos (0) /*!< FMC_T::KPKEYSTS: KEYBUSY Position */
  538. #define FMC_KPKEYSTS_KEYBUSY_Msk (0x1ul << FMC_KPKEYSTS_KEYBUSY_Pos) /*!< FMC_T::KPKEYSTS: KEYBUSY Mask */
  539. #define FMC_KPKEYSTS_KEYLOCK_Pos (1) /*!< FMC_T::KPKEYSTS: KEYLOCK Position */
  540. #define FMC_KPKEYSTS_KEYLOCK_Msk (0x1ul << FMC_KPKEYSTS_KEYLOCK_Pos) /*!< FMC_T::KPKEYSTS: KEYLOCK Mask */
  541. #define FMC_KPKEYSTS_KEYMATCH_Pos (2) /*!< FMC_T::KPKEYSTS: KEYMATCH Position */
  542. #define FMC_KPKEYSTS_KEYMATCH_Msk (0x1ul << FMC_KPKEYSTS_KEYMATCH_Pos) /*!< FMC_T::KPKEYSTS: KEYMATCH Mask */
  543. #define FMC_KPKEYSTS_FORBID_Pos (3) /*!< FMC_T::KPKEYSTS: FORBID Position */
  544. #define FMC_KPKEYSTS_FORBID_Msk (0x1ul << FMC_KPKEYSTS_FORBID_Pos) /*!< FMC_T::KPKEYSTS: FORBID Mask */
  545. #define FMC_KPKEYSTS_KEYFLAG_Pos (4) /*!< FMC_T::KPKEYSTS: KEYFLAG Position */
  546. #define FMC_KPKEYSTS_KEYFLAG_Msk (0x1ul << FMC_KPKEYSTS_KEYFLAG_Pos) /*!< FMC_T::KPKEYSTS: KEYFLAG Mask */
  547. #define FMC_KPKEYSTS_CFGFLAG_Pos (5) /*!< FMC_T::KPKEYSTS: CFGFLAG Position */
  548. #define FMC_KPKEYSTS_CFGFLAG_Msk (0x1ul << FMC_KPKEYSTS_CFGFLAG_Pos) /*!< FMC_T::KPKEYSTS: CFGFLAG Mask */
  549. #define FMC_KPKEYSTS_SPFLAG_Pos (6) /*!< FMC_T::KPKEYSTS: SPFLAG Position */
  550. #define FMC_KPKEYSTS_SPFLAG_Msk (0x1ul << FMC_KPKEYSTS_SPFLAG_Pos) /*!< FMC_T::KPKEYSTS: SPFLAG Mask */
  551. #define FMC_KPKEYCNT_KPKECNT_Pos (0) /*!< FMC_T::KPKEYCNT: KPKECNT Position */
  552. #define FMC_KPKEYCNT_KPKECNT_Msk (0x3ful << FMC_KPKEYCNT_KPKECNT_Pos) /*!< FMC_T::KPKEYCNT: KPKECNT Mask */
  553. #define FMC_KPKEYCNT_KPKEMAX_Pos (8) /*!< FMC_T::KPKEYCNT: KPKEMAX Position */
  554. #define FMC_KPKEYCNT_KPKEMAX_Msk (0x3ful << FMC_KPKEYCNT_KPKEMAX_Pos) /*!< FMC_T::KPKEYCNT: KPKEMAX Mask */
  555. #define FMC_KPCNT_KPCNT_Pos (0) /*!< FMC_T::KPCNT: KPCNT Position */
  556. #define FMC_KPCNT_KPCNT_Msk (0xful << FMC_KPCNT_KPCNT_Pos) /*!< FMC_T::KPCNT: KPCNT Mask */
  557. #define FMC_KPCNT_KPMAX_Pos (8) /*!< FMC_T::KPCNT: KPMAX Position */
  558. #define FMC_KPCNT_KPMAX_Msk (0xful << FMC_KPCNT_KPMAX_Pos) /*!< FMC_T::KPCNT: KPMAX Mask */
  559. #define FMC_MPDAT0_ISPDAT0_Pos (0) /*!< FMC_T::MPDAT0: ISPDAT0 Position */
  560. #define FMC_MPDAT0_ISPDAT0_Msk (0xfffffffful << FMC_MPDAT0_ISPDAT0_Pos) /*!< FMC_T::MPDAT0: ISPDAT0 Mask */
  561. #define FMC_MPDAT1_ISPDAT1_Pos (0) /*!< FMC_T::MPDAT1: ISPDAT1 Position */
  562. #define FMC_MPDAT1_ISPDAT1_Msk (0xfffffffful << FMC_MPDAT1_ISPDAT1_Pos) /*!< FMC_T::MPDAT1: ISPDAT1 Mask */
  563. #define FMC_MPDAT2_ISPDAT2_Pos (0) /*!< FMC_T::MPDAT2: ISPDAT2 Position */
  564. #define FMC_MPDAT2_ISPDAT2_Msk (0xfffffffful << FMC_MPDAT2_ISPDAT2_Pos) /*!< FMC_T::MPDAT2: ISPDAT2 Mask */
  565. #define FMC_MPDAT3_ISPDAT3_Pos (0) /*!< FMC_T::MPDAT3: ISPDAT3 Position */
  566. #define FMC_MPDAT3_ISPDAT3_Msk (0xfffffffful << FMC_MPDAT3_ISPDAT3_Pos) /*!< FMC_T::MPDAT3: ISPDAT3 Mask */
  567. #define FMC_MPSTS_MPBUSY_Pos (0) /*!< FMC_T::MPSTS: MPBUSY Position */
  568. #define FMC_MPSTS_MPBUSY_Msk (0x1ul << FMC_MPSTS_MPBUSY_Pos) /*!< FMC_T::MPSTS: MPBUSY Mask */
  569. #define FMC_MPSTS_PPGO_Pos (1) /*!< FMC_T::MPSTS: PPGO Position */
  570. #define FMC_MPSTS_PPGO_Msk (0x1ul << FMC_MPSTS_PPGO_Pos) /*!< FMC_T::MPSTS: PPGO Mask */
  571. #define FMC_MPSTS_ISPFF_Pos (2) /*!< FMC_T::MPSTS: ISPFF Position */
  572. #define FMC_MPSTS_ISPFF_Msk (0x1ul << FMC_MPSTS_ISPFF_Pos) /*!< FMC_T::MPSTS: ISPFF Mask */
  573. #define FMC_MPSTS_D0_Pos (4) /*!< FMC_T::MPSTS: D0 Position */
  574. #define FMC_MPSTS_D0_Msk (0x1ul << FMC_MPSTS_D0_Pos) /*!< FMC_T::MPSTS: D0 Mask */
  575. #define FMC_MPSTS_D1_Pos (5) /*!< FMC_T::MPSTS: D1 Position */
  576. #define FMC_MPSTS_D1_Msk (0x1ul << FMC_MPSTS_D1_Pos) /*!< FMC_T::MPSTS: D1 Mask */
  577. #define FMC_MPSTS_D2_Pos (6) /*!< FMC_T::MPSTS: D2 Position */
  578. #define FMC_MPSTS_D2_Msk (0x1ul << FMC_MPSTS_D2_Pos) /*!< FMC_T::MPSTS: D2 Mask */
  579. #define FMC_MPSTS_D3_Pos (7) /*!< FMC_T::MPSTS: D3 Position */
  580. #define FMC_MPSTS_D3_Msk (0x1ul << FMC_MPSTS_D3_Pos) /*!< FMC_T::MPSTS: D3 Mask */
  581. #define FMC_MPADDR_MPADDR_Pos (0) /*!< FMC_T::MPADDR: MPADDR Position */
  582. #define FMC_MPADDR_MPADDR_Msk (0xfffffffful << FMC_MPADDR_MPADDR_Pos) /*!< FMC_T::MPADDR: MPADDR Mask */
  583. #define FMC_XOMR0STS_SIZE_Pos (0) /*!< FMC_T::XOMR0STS: SIZE Position */
  584. #define FMC_XOMR0STS_SIZE_Msk (0xfful << FMC_XOMR0STS_SIZE_Pos) /*!< FMC_T::XOMR0STS: SIZE Mask */
  585. #define FMC_XOMR0STS_BASE_Pos (8) /*!< FMC_T::XOMR0STS: BASE Position */
  586. #define FMC_XOMR0STS_BASE_Msk (0xfffffful << FMC_XOMR0STS_BASE_Pos) /*!< FMC_T::XOMR0STS: BASE Mask */
  587. #define FMC_XOMR1STS_SIZE_Pos (0) /*!< FMC_T::XOMR1STS: SIZE Position */
  588. #define FMC_XOMR1STS_SIZE_Msk (0xfful << FMC_XOMR1STS_SIZE_Pos) /*!< FMC_T::XOMR1STS: SIZE Mask */
  589. #define FMC_XOMR1STS_BASE_Pos (8) /*!< FMC_T::XOMR1STS: BASE Position */
  590. #define FMC_XOMR1STS_BASE_Msk (0xfffffful << FMC_XOMR1STS_BASE_Pos) /*!< FMC_T::XOMR1STS: BASE Mask */
  591. #define FMC_XOMR2STS_SIZE_Pos (0) /*!< FMC_T::XOMR2STS: SIZE Position */
  592. #define FMC_XOMR2STS_SIZE_Msk (0xfful << FMC_XOMR2STS_SIZE_Pos) /*!< FMC_T::XOMR2STS: SIZE Mask */
  593. #define FMC_XOMR2STS_BASE_Pos (8) /*!< FMC_T::XOMR2STS: BASE Position */
  594. #define FMC_XOMR2STS_BASE_Msk (0xfffffful << FMC_XOM20STS_BASE_Pos) /*!< FMC_T::XOMR2STS: BASE Mask */
  595. #define FMC_XOMR3STS_SIZE_Pos (0) /*!< FMC_T::XOMR3STS: SIZE Position */
  596. #define FMC_XOMR3STS_SIZE_Msk (0xfful << FMC_XOMR3STS_SIZE_Pos) /*!< FMC_T::XOMR3STS: SIZE Mask */
  597. #define FMC_XOMR3STS_BASE_Pos (8) /*!< FMC_T::XOMR3STS: BASE Position */
  598. #define FMC_XOMR3STS_BASE_Msk (0xfffffful << FMC_XOMR3STS_BASE_Pos) /*!< FMC_T::XOMR3STS: BASE Mask */
  599. #define FMC_XOMSTS_XOMR0ON_Pos (0) /*!< FMC_T::XOMSTS: XOMR0ON Position */
  600. #define FMC_XOMSTS_XOMR0ON_Msk (0x1ul << FMC_XOMSTS_XOMR0ON_Pos) /*!< FMC_T::XOMSTS: XOMR0ON Mask */
  601. #define FMC_XOMSTS_XOMR1ON_Pos (1) /*!< FMC_T::XOMSTS: XOMR1ON Position */
  602. #define FMC_XOMSTS_XOMR1ON_Msk (0x1ul << FMC_XOMSTS_XOMR1ON_Pos) /*!< FMC_T::XOMSTS: XOMR1ON Mask */
  603. #define FMC_XOMSTS_XOMR2ON_Pos (2) /*!< FMC_T::XOMSTS: XOMR2ON Position */
  604. #define FMC_XOMSTS_XOMR2ON_Msk (0x1ul << FMC_XOMSTS_XOMR2ON_Pos) /*!< FMC_T::XOMSTS: XOMR2ON Mask */
  605. #define FMC_XOMSTS_XOMR3ON_Pos (3) /*!< FMC_T::XOMSTS: XOMR3ON Position */
  606. #define FMC_XOMSTS_XOMR3ON_Msk (0x1ul << FMC_XOMSTS_XOMR3ON_Pos) /*!< FMC_T::XOMSTS: XOMR3ON Mask */
  607. #define FMC_XOMSTS_XOMPEF_Pos (4) /*!< FMC_T::XOMSTS: XOMPEF Position */
  608. #define FMC_XOMSTS_XOMPEF_Msk (0x1ul << FMC_XOMSTS_XOMPEF_Pos) /*!< FMC_T::XOMSTS: XOMPEF Mask */
  609. /**@}*/ /* FMC_CONST */
  610. /**@}*/ /* end of FMC register group */
  611. /**@}*/ /* end of REGISTER group */
  612. #if defined ( __CC_ARM )
  613. #pragma no_anon_unions
  614. #endif
  615. #endif /* __FMC_REG_H__ */