MK64F12_fmc.h 83 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177
  1. /*
  2. * Copyright (c) 2014, Freescale Semiconductor, Inc.
  3. * All rights reserved.
  4. *
  5. * THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED
  6. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  7. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
  8. * SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  9. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
  10. * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  11. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  12. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  13. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  14. * OF SUCH DAMAGE.
  15. */
  16. /*
  17. * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
  18. *
  19. * This file was generated automatically and any changes may be lost.
  20. */
  21. #ifndef __HW_FMC_REGISTERS_H__
  22. #define __HW_FMC_REGISTERS_H__
  23. #include "regs.h"
  24. /*
  25. * MK64F12 FMC
  26. *
  27. * Flash Memory Controller
  28. *
  29. * Registers defined in this header file:
  30. * - HW_FMC_PFAPR - Flash Access Protection Register
  31. * - HW_FMC_PFB0CR - Flash Bank 0 Control Register
  32. * - HW_FMC_PFB1CR - Flash Bank 1 Control Register
  33. * - HW_FMC_TAGVDW0Sn - Cache Tag Storage
  34. * - HW_FMC_TAGVDW1Sn - Cache Tag Storage
  35. * - HW_FMC_TAGVDW2Sn - Cache Tag Storage
  36. * - HW_FMC_TAGVDW3Sn - Cache Tag Storage
  37. * - HW_FMC_DATAW0SnU - Cache Data Storage (upper word)
  38. * - HW_FMC_DATAW0SnL - Cache Data Storage (lower word)
  39. * - HW_FMC_DATAW1SnU - Cache Data Storage (upper word)
  40. * - HW_FMC_DATAW1SnL - Cache Data Storage (lower word)
  41. * - HW_FMC_DATAW2SnU - Cache Data Storage (upper word)
  42. * - HW_FMC_DATAW2SnL - Cache Data Storage (lower word)
  43. * - HW_FMC_DATAW3SnU - Cache Data Storage (upper word)
  44. * - HW_FMC_DATAW3SnL - Cache Data Storage (lower word)
  45. *
  46. * - hw_fmc_t - Struct containing all module registers.
  47. */
  48. //! @name Module base addresses
  49. //@{
  50. #ifndef REGS_FMC_BASE
  51. #define HW_FMC_INSTANCE_COUNT (1U) //!< Number of instances of the FMC module.
  52. #define REGS_FMC_BASE (0x4001F000U) //!< Base address for FMC.
  53. #endif
  54. //@}
  55. //-------------------------------------------------------------------------------------------
  56. // HW_FMC_PFAPR - Flash Access Protection Register
  57. //-------------------------------------------------------------------------------------------
  58. #ifndef __LANGUAGE_ASM__
  59. /*!
  60. * @brief HW_FMC_PFAPR - Flash Access Protection Register (RW)
  61. *
  62. * Reset value: 0x00F8003FU
  63. */
  64. typedef union _hw_fmc_pfapr
  65. {
  66. uint32_t U;
  67. struct _hw_fmc_pfapr_bitfields
  68. {
  69. uint32_t M0AP : 2; //!< [1:0] Master 0 Access Protection
  70. uint32_t M1AP : 2; //!< [3:2] Master 1 Access Protection
  71. uint32_t M2AP : 2; //!< [5:4] Master 2 Access Protection
  72. uint32_t M3AP : 2; //!< [7:6] Master 3 Access Protection
  73. uint32_t M4AP : 2; //!< [9:8] Master 4 Access Protection
  74. uint32_t M5AP : 2; //!< [11:10] Master 5 Access Protection
  75. uint32_t M6AP : 2; //!< [13:12] Master 6 Access Protection
  76. uint32_t M7AP : 2; //!< [15:14] Master 7 Access Protection
  77. uint32_t M0PFD : 1; //!< [16] Master 0 Prefetch Disable
  78. uint32_t M1PFD : 1; //!< [17] Master 1 Prefetch Disable
  79. uint32_t M2PFD : 1; //!< [18] Master 2 Prefetch Disable
  80. uint32_t M3PFD : 1; //!< [19] Master 3 Prefetch Disable
  81. uint32_t M4PFD : 1; //!< [20] Master 4 Prefetch Disable
  82. uint32_t M5PFD : 1; //!< [21] Master 5 Prefetch Disable
  83. uint32_t M6PFD : 1; //!< [22] Master 6 Prefetch Disable
  84. uint32_t M7PFD : 1; //!< [23] Master 7 Prefetch Disable
  85. uint32_t RESERVED0 : 8; //!< [31:24]
  86. } B;
  87. } hw_fmc_pfapr_t;
  88. #endif
  89. /*!
  90. * @name Constants and macros for entire FMC_PFAPR register
  91. */
  92. //@{
  93. #define HW_FMC_PFAPR_ADDR (REGS_FMC_BASE + 0x0U)
  94. #ifndef __LANGUAGE_ASM__
  95. #define HW_FMC_PFAPR (*(__IO hw_fmc_pfapr_t *) HW_FMC_PFAPR_ADDR)
  96. #define HW_FMC_PFAPR_RD() (HW_FMC_PFAPR.U)
  97. #define HW_FMC_PFAPR_WR(v) (HW_FMC_PFAPR.U = (v))
  98. #define HW_FMC_PFAPR_SET(v) (HW_FMC_PFAPR_WR(HW_FMC_PFAPR_RD() | (v)))
  99. #define HW_FMC_PFAPR_CLR(v) (HW_FMC_PFAPR_WR(HW_FMC_PFAPR_RD() & ~(v)))
  100. #define HW_FMC_PFAPR_TOG(v) (HW_FMC_PFAPR_WR(HW_FMC_PFAPR_RD() ^ (v)))
  101. #endif
  102. //@}
  103. /*
  104. * Constants & macros for individual FMC_PFAPR bitfields
  105. */
  106. /*!
  107. * @name Register FMC_PFAPR, field M0AP[1:0] (RW)
  108. *
  109. * This field controls whether read and write access to the flash are allowed
  110. * based on the logical master number of the requesting crossbar switch master.
  111. *
  112. * Values:
  113. * - 00 - No access may be performed by this master
  114. * - 01 - Only read accesses may be performed by this master
  115. * - 10 - Only write accesses may be performed by this master
  116. * - 11 - Both read and write accesses may be performed by this master
  117. */
  118. //@{
  119. #define BP_FMC_PFAPR_M0AP (0U) //!< Bit position for FMC_PFAPR_M0AP.
  120. #define BM_FMC_PFAPR_M0AP (0x00000003U) //!< Bit mask for FMC_PFAPR_M0AP.
  121. #define BS_FMC_PFAPR_M0AP (2U) //!< Bit field size in bits for FMC_PFAPR_M0AP.
  122. #ifndef __LANGUAGE_ASM__
  123. //! @brief Read current value of the FMC_PFAPR_M0AP field.
  124. #define BR_FMC_PFAPR_M0AP (HW_FMC_PFAPR.B.M0AP)
  125. #endif
  126. //! @brief Format value for bitfield FMC_PFAPR_M0AP.
  127. #define BF_FMC_PFAPR_M0AP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M0AP), uint32_t) & BM_FMC_PFAPR_M0AP)
  128. #ifndef __LANGUAGE_ASM__
  129. //! @brief Set the M0AP field to a new value.
  130. #define BW_FMC_PFAPR_M0AP(v) (HW_FMC_PFAPR_WR((HW_FMC_PFAPR_RD() & ~BM_FMC_PFAPR_M0AP) | BF_FMC_PFAPR_M0AP(v)))
  131. #endif
  132. //@}
  133. /*!
  134. * @name Register FMC_PFAPR, field M1AP[3:2] (RW)
  135. *
  136. * This field controls whether read and write access to the flash are allowed
  137. * based on the logical master number of the requesting crossbar switch master.
  138. *
  139. * Values:
  140. * - 00 - No access may be performed by this master
  141. * - 01 - Only read accesses may be performed by this master
  142. * - 10 - Only write accesses may be performed by this master
  143. * - 11 - Both read and write accesses may be performed by this master
  144. */
  145. //@{
  146. #define BP_FMC_PFAPR_M1AP (2U) //!< Bit position for FMC_PFAPR_M1AP.
  147. #define BM_FMC_PFAPR_M1AP (0x0000000CU) //!< Bit mask for FMC_PFAPR_M1AP.
  148. #define BS_FMC_PFAPR_M1AP (2U) //!< Bit field size in bits for FMC_PFAPR_M1AP.
  149. #ifndef __LANGUAGE_ASM__
  150. //! @brief Read current value of the FMC_PFAPR_M1AP field.
  151. #define BR_FMC_PFAPR_M1AP (HW_FMC_PFAPR.B.M1AP)
  152. #endif
  153. //! @brief Format value for bitfield FMC_PFAPR_M1AP.
  154. #define BF_FMC_PFAPR_M1AP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M1AP), uint32_t) & BM_FMC_PFAPR_M1AP)
  155. #ifndef __LANGUAGE_ASM__
  156. //! @brief Set the M1AP field to a new value.
  157. #define BW_FMC_PFAPR_M1AP(v) (HW_FMC_PFAPR_WR((HW_FMC_PFAPR_RD() & ~BM_FMC_PFAPR_M1AP) | BF_FMC_PFAPR_M1AP(v)))
  158. #endif
  159. //@}
  160. /*!
  161. * @name Register FMC_PFAPR, field M2AP[5:4] (RW)
  162. *
  163. * This field controls whether read and write access to the flash are allowed
  164. * based on the logical master number of the requesting crossbar switch master.
  165. *
  166. * Values:
  167. * - 00 - No access may be performed by this master
  168. * - 01 - Only read accesses may be performed by this master
  169. * - 10 - Only write accesses may be performed by this master
  170. * - 11 - Both read and write accesses may be performed by this master
  171. */
  172. //@{
  173. #define BP_FMC_PFAPR_M2AP (4U) //!< Bit position for FMC_PFAPR_M2AP.
  174. #define BM_FMC_PFAPR_M2AP (0x00000030U) //!< Bit mask for FMC_PFAPR_M2AP.
  175. #define BS_FMC_PFAPR_M2AP (2U) //!< Bit field size in bits for FMC_PFAPR_M2AP.
  176. #ifndef __LANGUAGE_ASM__
  177. //! @brief Read current value of the FMC_PFAPR_M2AP field.
  178. #define BR_FMC_PFAPR_M2AP (HW_FMC_PFAPR.B.M2AP)
  179. #endif
  180. //! @brief Format value for bitfield FMC_PFAPR_M2AP.
  181. #define BF_FMC_PFAPR_M2AP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M2AP), uint32_t) & BM_FMC_PFAPR_M2AP)
  182. #ifndef __LANGUAGE_ASM__
  183. //! @brief Set the M2AP field to a new value.
  184. #define BW_FMC_PFAPR_M2AP(v) (HW_FMC_PFAPR_WR((HW_FMC_PFAPR_RD() & ~BM_FMC_PFAPR_M2AP) | BF_FMC_PFAPR_M2AP(v)))
  185. #endif
  186. //@}
  187. /*!
  188. * @name Register FMC_PFAPR, field M3AP[7:6] (RW)
  189. *
  190. * This field controls whether read and write access to the flash are allowed
  191. * based on the logical master number of the requesting crossbar switch master.
  192. *
  193. * Values:
  194. * - 00 - No access may be performed by this master
  195. * - 01 - Only read accesses may be performed by this master
  196. * - 10 - Only write accesses may be performed by this master
  197. * - 11 - Both read and write accesses may be performed by this master
  198. */
  199. //@{
  200. #define BP_FMC_PFAPR_M3AP (6U) //!< Bit position for FMC_PFAPR_M3AP.
  201. #define BM_FMC_PFAPR_M3AP (0x000000C0U) //!< Bit mask for FMC_PFAPR_M3AP.
  202. #define BS_FMC_PFAPR_M3AP (2U) //!< Bit field size in bits for FMC_PFAPR_M3AP.
  203. #ifndef __LANGUAGE_ASM__
  204. //! @brief Read current value of the FMC_PFAPR_M3AP field.
  205. #define BR_FMC_PFAPR_M3AP (HW_FMC_PFAPR.B.M3AP)
  206. #endif
  207. //! @brief Format value for bitfield FMC_PFAPR_M3AP.
  208. #define BF_FMC_PFAPR_M3AP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M3AP), uint32_t) & BM_FMC_PFAPR_M3AP)
  209. #ifndef __LANGUAGE_ASM__
  210. //! @brief Set the M3AP field to a new value.
  211. #define BW_FMC_PFAPR_M3AP(v) (HW_FMC_PFAPR_WR((HW_FMC_PFAPR_RD() & ~BM_FMC_PFAPR_M3AP) | BF_FMC_PFAPR_M3AP(v)))
  212. #endif
  213. //@}
  214. /*!
  215. * @name Register FMC_PFAPR, field M4AP[9:8] (RW)
  216. *
  217. * This field controls whether read and write access to the flash are allowed
  218. * based on the logical master number of the requesting crossbar switch master.
  219. *
  220. * Values:
  221. * - 00 - No access may be performed by this master
  222. * - 01 - Only read accesses may be performed by this master
  223. * - 10 - Only write accesses may be performed by this master
  224. * - 11 - Both read and write accesses may be performed by this master
  225. */
  226. //@{
  227. #define BP_FMC_PFAPR_M4AP (8U) //!< Bit position for FMC_PFAPR_M4AP.
  228. #define BM_FMC_PFAPR_M4AP (0x00000300U) //!< Bit mask for FMC_PFAPR_M4AP.
  229. #define BS_FMC_PFAPR_M4AP (2U) //!< Bit field size in bits for FMC_PFAPR_M4AP.
  230. #ifndef __LANGUAGE_ASM__
  231. //! @brief Read current value of the FMC_PFAPR_M4AP field.
  232. #define BR_FMC_PFAPR_M4AP (HW_FMC_PFAPR.B.M4AP)
  233. #endif
  234. //! @brief Format value for bitfield FMC_PFAPR_M4AP.
  235. #define BF_FMC_PFAPR_M4AP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M4AP), uint32_t) & BM_FMC_PFAPR_M4AP)
  236. #ifndef __LANGUAGE_ASM__
  237. //! @brief Set the M4AP field to a new value.
  238. #define BW_FMC_PFAPR_M4AP(v) (HW_FMC_PFAPR_WR((HW_FMC_PFAPR_RD() & ~BM_FMC_PFAPR_M4AP) | BF_FMC_PFAPR_M4AP(v)))
  239. #endif
  240. //@}
  241. /*!
  242. * @name Register FMC_PFAPR, field M5AP[11:10] (RW)
  243. *
  244. * This field controls whether read and write access to the flash are allowed
  245. * based on the logical master number of the requesting crossbar switch master.
  246. *
  247. * Values:
  248. * - 00 - No access may be performed by this master
  249. * - 01 - Only read accesses may be performed by this master
  250. * - 10 - Only write accesses may be performed by this master
  251. * - 11 - Both read and write accesses may be performed by this master
  252. */
  253. //@{
  254. #define BP_FMC_PFAPR_M5AP (10U) //!< Bit position for FMC_PFAPR_M5AP.
  255. #define BM_FMC_PFAPR_M5AP (0x00000C00U) //!< Bit mask for FMC_PFAPR_M5AP.
  256. #define BS_FMC_PFAPR_M5AP (2U) //!< Bit field size in bits for FMC_PFAPR_M5AP.
  257. #ifndef __LANGUAGE_ASM__
  258. //! @brief Read current value of the FMC_PFAPR_M5AP field.
  259. #define BR_FMC_PFAPR_M5AP (HW_FMC_PFAPR.B.M5AP)
  260. #endif
  261. //! @brief Format value for bitfield FMC_PFAPR_M5AP.
  262. #define BF_FMC_PFAPR_M5AP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M5AP), uint32_t) & BM_FMC_PFAPR_M5AP)
  263. #ifndef __LANGUAGE_ASM__
  264. //! @brief Set the M5AP field to a new value.
  265. #define BW_FMC_PFAPR_M5AP(v) (HW_FMC_PFAPR_WR((HW_FMC_PFAPR_RD() & ~BM_FMC_PFAPR_M5AP) | BF_FMC_PFAPR_M5AP(v)))
  266. #endif
  267. //@}
  268. /*!
  269. * @name Register FMC_PFAPR, field M6AP[13:12] (RW)
  270. *
  271. * This field controls whether read and write access to the flash are allowed
  272. * based on the logical master number of the requesting crossbar switch master.
  273. *
  274. * Values:
  275. * - 00 - No access may be performed by this master
  276. * - 01 - Only read accesses may be performed by this master
  277. * - 10 - Only write accesses may be performed by this master
  278. * - 11 - Both read and write accesses may be performed by this master
  279. */
  280. //@{
  281. #define BP_FMC_PFAPR_M6AP (12U) //!< Bit position for FMC_PFAPR_M6AP.
  282. #define BM_FMC_PFAPR_M6AP (0x00003000U) //!< Bit mask for FMC_PFAPR_M6AP.
  283. #define BS_FMC_PFAPR_M6AP (2U) //!< Bit field size in bits for FMC_PFAPR_M6AP.
  284. #ifndef __LANGUAGE_ASM__
  285. //! @brief Read current value of the FMC_PFAPR_M6AP field.
  286. #define BR_FMC_PFAPR_M6AP (HW_FMC_PFAPR.B.M6AP)
  287. #endif
  288. //! @brief Format value for bitfield FMC_PFAPR_M6AP.
  289. #define BF_FMC_PFAPR_M6AP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M6AP), uint32_t) & BM_FMC_PFAPR_M6AP)
  290. #ifndef __LANGUAGE_ASM__
  291. //! @brief Set the M6AP field to a new value.
  292. #define BW_FMC_PFAPR_M6AP(v) (HW_FMC_PFAPR_WR((HW_FMC_PFAPR_RD() & ~BM_FMC_PFAPR_M6AP) | BF_FMC_PFAPR_M6AP(v)))
  293. #endif
  294. //@}
  295. /*!
  296. * @name Register FMC_PFAPR, field M7AP[15:14] (RW)
  297. *
  298. * This field controls whether read and write access to the flash are allowed
  299. * based on the logical master number of the requesting crossbar switch master.
  300. *
  301. * Values:
  302. * - 00 - No access may be performed by this master.
  303. * - 01 - Only read accesses may be performed by this master.
  304. * - 10 - Only write accesses may be performed by this master.
  305. * - 11 - Both read and write accesses may be performed by this master.
  306. */
  307. //@{
  308. #define BP_FMC_PFAPR_M7AP (14U) //!< Bit position for FMC_PFAPR_M7AP.
  309. #define BM_FMC_PFAPR_M7AP (0x0000C000U) //!< Bit mask for FMC_PFAPR_M7AP.
  310. #define BS_FMC_PFAPR_M7AP (2U) //!< Bit field size in bits for FMC_PFAPR_M7AP.
  311. #ifndef __LANGUAGE_ASM__
  312. //! @brief Read current value of the FMC_PFAPR_M7AP field.
  313. #define BR_FMC_PFAPR_M7AP (HW_FMC_PFAPR.B.M7AP)
  314. #endif
  315. //! @brief Format value for bitfield FMC_PFAPR_M7AP.
  316. #define BF_FMC_PFAPR_M7AP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M7AP), uint32_t) & BM_FMC_PFAPR_M7AP)
  317. #ifndef __LANGUAGE_ASM__
  318. //! @brief Set the M7AP field to a new value.
  319. #define BW_FMC_PFAPR_M7AP(v) (HW_FMC_PFAPR_WR((HW_FMC_PFAPR_RD() & ~BM_FMC_PFAPR_M7AP) | BF_FMC_PFAPR_M7AP(v)))
  320. #endif
  321. //@}
  322. /*!
  323. * @name Register FMC_PFAPR, field M0PFD[16] (RW)
  324. *
  325. * These bits control whether prefetching is enabled based on the logical number
  326. * of the requesting crossbar switch master. This field is further qualified by
  327. * the PFBnCR[BxDPE,BxIPE] bits.
  328. *
  329. * Values:
  330. * - 0 - Prefetching for this master is enabled.
  331. * - 1 - Prefetching for this master is disabled.
  332. */
  333. //@{
  334. #define BP_FMC_PFAPR_M0PFD (16U) //!< Bit position for FMC_PFAPR_M0PFD.
  335. #define BM_FMC_PFAPR_M0PFD (0x00010000U) //!< Bit mask for FMC_PFAPR_M0PFD.
  336. #define BS_FMC_PFAPR_M0PFD (1U) //!< Bit field size in bits for FMC_PFAPR_M0PFD.
  337. #ifndef __LANGUAGE_ASM__
  338. //! @brief Read current value of the FMC_PFAPR_M0PFD field.
  339. #define BR_FMC_PFAPR_M0PFD (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M0PFD))
  340. #endif
  341. //! @brief Format value for bitfield FMC_PFAPR_M0PFD.
  342. #define BF_FMC_PFAPR_M0PFD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M0PFD), uint32_t) & BM_FMC_PFAPR_M0PFD)
  343. #ifndef __LANGUAGE_ASM__
  344. //! @brief Set the M0PFD field to a new value.
  345. #define BW_FMC_PFAPR_M0PFD(v) (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M0PFD) = (v))
  346. #endif
  347. //@}
  348. /*!
  349. * @name Register FMC_PFAPR, field M1PFD[17] (RW)
  350. *
  351. * These bits control whether prefetching is enabled based on the logical number
  352. * of the requesting crossbar switch master. This field is further qualified by
  353. * the PFBnCR[BxDPE,BxIPE] bits.
  354. *
  355. * Values:
  356. * - 0 - Prefetching for this master is enabled.
  357. * - 1 - Prefetching for this master is disabled.
  358. */
  359. //@{
  360. #define BP_FMC_PFAPR_M1PFD (17U) //!< Bit position for FMC_PFAPR_M1PFD.
  361. #define BM_FMC_PFAPR_M1PFD (0x00020000U) //!< Bit mask for FMC_PFAPR_M1PFD.
  362. #define BS_FMC_PFAPR_M1PFD (1U) //!< Bit field size in bits for FMC_PFAPR_M1PFD.
  363. #ifndef __LANGUAGE_ASM__
  364. //! @brief Read current value of the FMC_PFAPR_M1PFD field.
  365. #define BR_FMC_PFAPR_M1PFD (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M1PFD))
  366. #endif
  367. //! @brief Format value for bitfield FMC_PFAPR_M1PFD.
  368. #define BF_FMC_PFAPR_M1PFD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M1PFD), uint32_t) & BM_FMC_PFAPR_M1PFD)
  369. #ifndef __LANGUAGE_ASM__
  370. //! @brief Set the M1PFD field to a new value.
  371. #define BW_FMC_PFAPR_M1PFD(v) (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M1PFD) = (v))
  372. #endif
  373. //@}
  374. /*!
  375. * @name Register FMC_PFAPR, field M2PFD[18] (RW)
  376. *
  377. * These bits control whether prefetching is enabled based on the logical number
  378. * of the requesting crossbar switch master. This field is further qualified by
  379. * the PFBnCR[BxDPE,BxIPE] bits.
  380. *
  381. * Values:
  382. * - 0 - Prefetching for this master is enabled.
  383. * - 1 - Prefetching for this master is disabled.
  384. */
  385. //@{
  386. #define BP_FMC_PFAPR_M2PFD (18U) //!< Bit position for FMC_PFAPR_M2PFD.
  387. #define BM_FMC_PFAPR_M2PFD (0x00040000U) //!< Bit mask for FMC_PFAPR_M2PFD.
  388. #define BS_FMC_PFAPR_M2PFD (1U) //!< Bit field size in bits for FMC_PFAPR_M2PFD.
  389. #ifndef __LANGUAGE_ASM__
  390. //! @brief Read current value of the FMC_PFAPR_M2PFD field.
  391. #define BR_FMC_PFAPR_M2PFD (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M2PFD))
  392. #endif
  393. //! @brief Format value for bitfield FMC_PFAPR_M2PFD.
  394. #define BF_FMC_PFAPR_M2PFD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M2PFD), uint32_t) & BM_FMC_PFAPR_M2PFD)
  395. #ifndef __LANGUAGE_ASM__
  396. //! @brief Set the M2PFD field to a new value.
  397. #define BW_FMC_PFAPR_M2PFD(v) (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M2PFD) = (v))
  398. #endif
  399. //@}
  400. /*!
  401. * @name Register FMC_PFAPR, field M3PFD[19] (RW)
  402. *
  403. * These bits control whether prefetching is enabled based on the logical number
  404. * of the requesting crossbar switch master. This field is further qualified by
  405. * the PFBnCR[BxDPE,BxIPE] bits.
  406. *
  407. * Values:
  408. * - 0 - Prefetching for this master is enabled.
  409. * - 1 - Prefetching for this master is disabled.
  410. */
  411. //@{
  412. #define BP_FMC_PFAPR_M3PFD (19U) //!< Bit position for FMC_PFAPR_M3PFD.
  413. #define BM_FMC_PFAPR_M3PFD (0x00080000U) //!< Bit mask for FMC_PFAPR_M3PFD.
  414. #define BS_FMC_PFAPR_M3PFD (1U) //!< Bit field size in bits for FMC_PFAPR_M3PFD.
  415. #ifndef __LANGUAGE_ASM__
  416. //! @brief Read current value of the FMC_PFAPR_M3PFD field.
  417. #define BR_FMC_PFAPR_M3PFD (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M3PFD))
  418. #endif
  419. //! @brief Format value for bitfield FMC_PFAPR_M3PFD.
  420. #define BF_FMC_PFAPR_M3PFD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M3PFD), uint32_t) & BM_FMC_PFAPR_M3PFD)
  421. #ifndef __LANGUAGE_ASM__
  422. //! @brief Set the M3PFD field to a new value.
  423. #define BW_FMC_PFAPR_M3PFD(v) (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M3PFD) = (v))
  424. #endif
  425. //@}
  426. /*!
  427. * @name Register FMC_PFAPR, field M4PFD[20] (RW)
  428. *
  429. * These bits control whether prefetching is enabled based on the logical number
  430. * of the requesting crossbar switch master. This field is further qualified by
  431. * the PFBnCR[BxDPE,BxIPE] bits.
  432. *
  433. * Values:
  434. * - 0 - Prefetching for this master is enabled.
  435. * - 1 - Prefetching for this master is disabled.
  436. */
  437. //@{
  438. #define BP_FMC_PFAPR_M4PFD (20U) //!< Bit position for FMC_PFAPR_M4PFD.
  439. #define BM_FMC_PFAPR_M4PFD (0x00100000U) //!< Bit mask for FMC_PFAPR_M4PFD.
  440. #define BS_FMC_PFAPR_M4PFD (1U) //!< Bit field size in bits for FMC_PFAPR_M4PFD.
  441. #ifndef __LANGUAGE_ASM__
  442. //! @brief Read current value of the FMC_PFAPR_M4PFD field.
  443. #define BR_FMC_PFAPR_M4PFD (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M4PFD))
  444. #endif
  445. //! @brief Format value for bitfield FMC_PFAPR_M4PFD.
  446. #define BF_FMC_PFAPR_M4PFD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M4PFD), uint32_t) & BM_FMC_PFAPR_M4PFD)
  447. #ifndef __LANGUAGE_ASM__
  448. //! @brief Set the M4PFD field to a new value.
  449. #define BW_FMC_PFAPR_M4PFD(v) (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M4PFD) = (v))
  450. #endif
  451. //@}
  452. /*!
  453. * @name Register FMC_PFAPR, field M5PFD[21] (RW)
  454. *
  455. * These bits control whether prefetching is enabled based on the logical number
  456. * of the requesting crossbar switch master. This field is further qualified by
  457. * the PFBnCR[BxDPE,BxIPE] bits.
  458. *
  459. * Values:
  460. * - 0 - Prefetching for this master is enabled.
  461. * - 1 - Prefetching for this master is disabled.
  462. */
  463. //@{
  464. #define BP_FMC_PFAPR_M5PFD (21U) //!< Bit position for FMC_PFAPR_M5PFD.
  465. #define BM_FMC_PFAPR_M5PFD (0x00200000U) //!< Bit mask for FMC_PFAPR_M5PFD.
  466. #define BS_FMC_PFAPR_M5PFD (1U) //!< Bit field size in bits for FMC_PFAPR_M5PFD.
  467. #ifndef __LANGUAGE_ASM__
  468. //! @brief Read current value of the FMC_PFAPR_M5PFD field.
  469. #define BR_FMC_PFAPR_M5PFD (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M5PFD))
  470. #endif
  471. //! @brief Format value for bitfield FMC_PFAPR_M5PFD.
  472. #define BF_FMC_PFAPR_M5PFD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M5PFD), uint32_t) & BM_FMC_PFAPR_M5PFD)
  473. #ifndef __LANGUAGE_ASM__
  474. //! @brief Set the M5PFD field to a new value.
  475. #define BW_FMC_PFAPR_M5PFD(v) (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M5PFD) = (v))
  476. #endif
  477. //@}
  478. /*!
  479. * @name Register FMC_PFAPR, field M6PFD[22] (RW)
  480. *
  481. * These bits control whether prefetching is enabled based on the logical number
  482. * of the requesting crossbar switch master. This field is further qualified by
  483. * the PFBnCR[BxDPE,BxIPE] bits.
  484. *
  485. * Values:
  486. * - 0 - Prefetching for this master is enabled.
  487. * - 1 - Prefetching for this master is disabled.
  488. */
  489. //@{
  490. #define BP_FMC_PFAPR_M6PFD (22U) //!< Bit position for FMC_PFAPR_M6PFD.
  491. #define BM_FMC_PFAPR_M6PFD (0x00400000U) //!< Bit mask for FMC_PFAPR_M6PFD.
  492. #define BS_FMC_PFAPR_M6PFD (1U) //!< Bit field size in bits for FMC_PFAPR_M6PFD.
  493. #ifndef __LANGUAGE_ASM__
  494. //! @brief Read current value of the FMC_PFAPR_M6PFD field.
  495. #define BR_FMC_PFAPR_M6PFD (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M6PFD))
  496. #endif
  497. //! @brief Format value for bitfield FMC_PFAPR_M6PFD.
  498. #define BF_FMC_PFAPR_M6PFD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M6PFD), uint32_t) & BM_FMC_PFAPR_M6PFD)
  499. #ifndef __LANGUAGE_ASM__
  500. //! @brief Set the M6PFD field to a new value.
  501. #define BW_FMC_PFAPR_M6PFD(v) (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M6PFD) = (v))
  502. #endif
  503. //@}
  504. /*!
  505. * @name Register FMC_PFAPR, field M7PFD[23] (RW)
  506. *
  507. * These bits control whether prefetching is enabled based on the logical number
  508. * of the requesting crossbar switch master. This field is further qualified by
  509. * the PFBnCR[BxDPE,BxIPE] bits.
  510. *
  511. * Values:
  512. * - 0 - Prefetching for this master is enabled.
  513. * - 1 - Prefetching for this master is disabled.
  514. */
  515. //@{
  516. #define BP_FMC_PFAPR_M7PFD (23U) //!< Bit position for FMC_PFAPR_M7PFD.
  517. #define BM_FMC_PFAPR_M7PFD (0x00800000U) //!< Bit mask for FMC_PFAPR_M7PFD.
  518. #define BS_FMC_PFAPR_M7PFD (1U) //!< Bit field size in bits for FMC_PFAPR_M7PFD.
  519. #ifndef __LANGUAGE_ASM__
  520. //! @brief Read current value of the FMC_PFAPR_M7PFD field.
  521. #define BR_FMC_PFAPR_M7PFD (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M7PFD))
  522. #endif
  523. //! @brief Format value for bitfield FMC_PFAPR_M7PFD.
  524. #define BF_FMC_PFAPR_M7PFD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFAPR_M7PFD), uint32_t) & BM_FMC_PFAPR_M7PFD)
  525. #ifndef __LANGUAGE_ASM__
  526. //! @brief Set the M7PFD field to a new value.
  527. #define BW_FMC_PFAPR_M7PFD(v) (BITBAND_ACCESS32(HW_FMC_PFAPR_ADDR, BP_FMC_PFAPR_M7PFD) = (v))
  528. #endif
  529. //@}
  530. //-------------------------------------------------------------------------------------------
  531. // HW_FMC_PFB0CR - Flash Bank 0 Control Register
  532. //-------------------------------------------------------------------------------------------
  533. #ifndef __LANGUAGE_ASM__
  534. /*!
  535. * @brief HW_FMC_PFB0CR - Flash Bank 0 Control Register (RW)
  536. *
  537. * Reset value: 0x3004001FU
  538. */
  539. typedef union _hw_fmc_pfb0cr
  540. {
  541. uint32_t U;
  542. struct _hw_fmc_pfb0cr_bitfields
  543. {
  544. uint32_t B0SEBE : 1; //!< [0] Bank 0 Single Entry Buffer Enable
  545. uint32_t B0IPE : 1; //!< [1] Bank 0 Instruction Prefetch Enable
  546. uint32_t B0DPE : 1; //!< [2] Bank 0 Data Prefetch Enable
  547. uint32_t B0ICE : 1; //!< [3] Bank 0 Instruction Cache Enable
  548. uint32_t B0DCE : 1; //!< [4] Bank 0 Data Cache Enable
  549. uint32_t CRCb : 3; //!< [7:5] Cache Replacement Control
  550. uint32_t RESERVED0 : 9; //!< [16:8]
  551. uint32_t B0MW : 2; //!< [18:17] Bank 0 Memory Width
  552. uint32_t S_B_INV : 1; //!< [19] Invalidate Prefetch Speculation Buffer
  553. uint32_t CINV_WAY : 4; //!< [23:20] Cache Invalidate Way x
  554. uint32_t CLCK_WAY : 4; //!< [27:24] Cache Lock Way x
  555. uint32_t B0RWSC : 4; //!< [31:28] Bank 0 Read Wait State Control
  556. } B;
  557. } hw_fmc_pfb0cr_t;
  558. #endif
  559. /*!
  560. * @name Constants and macros for entire FMC_PFB0CR register
  561. */
  562. //@{
  563. #define HW_FMC_PFB0CR_ADDR (REGS_FMC_BASE + 0x4U)
  564. #ifndef __LANGUAGE_ASM__
  565. #define HW_FMC_PFB0CR (*(__IO hw_fmc_pfb0cr_t *) HW_FMC_PFB0CR_ADDR)
  566. #define HW_FMC_PFB0CR_RD() (HW_FMC_PFB0CR.U)
  567. #define HW_FMC_PFB0CR_WR(v) (HW_FMC_PFB0CR.U = (v))
  568. #define HW_FMC_PFB0CR_SET(v) (HW_FMC_PFB0CR_WR(HW_FMC_PFB0CR_RD() | (v)))
  569. #define HW_FMC_PFB0CR_CLR(v) (HW_FMC_PFB0CR_WR(HW_FMC_PFB0CR_RD() & ~(v)))
  570. #define HW_FMC_PFB0CR_TOG(v) (HW_FMC_PFB0CR_WR(HW_FMC_PFB0CR_RD() ^ (v)))
  571. #endif
  572. //@}
  573. /*
  574. * Constants & macros for individual FMC_PFB0CR bitfields
  575. */
  576. /*!
  577. * @name Register FMC_PFB0CR, field B0SEBE[0] (RW)
  578. *
  579. * This bit controls whether the single entry page buffer is enabled in response
  580. * to flash read accesses. Its operation is independent from bank 1's cache. A
  581. * high-to-low transition of this enable forces the page buffer to be invalidated.
  582. *
  583. * Values:
  584. * - 0 - Single entry buffer is disabled.
  585. * - 1 - Single entry buffer is enabled.
  586. */
  587. //@{
  588. #define BP_FMC_PFB0CR_B0SEBE (0U) //!< Bit position for FMC_PFB0CR_B0SEBE.
  589. #define BM_FMC_PFB0CR_B0SEBE (0x00000001U) //!< Bit mask for FMC_PFB0CR_B0SEBE.
  590. #define BS_FMC_PFB0CR_B0SEBE (1U) //!< Bit field size in bits for FMC_PFB0CR_B0SEBE.
  591. #ifndef __LANGUAGE_ASM__
  592. //! @brief Read current value of the FMC_PFB0CR_B0SEBE field.
  593. #define BR_FMC_PFB0CR_B0SEBE (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_B0SEBE))
  594. #endif
  595. //! @brief Format value for bitfield FMC_PFB0CR_B0SEBE.
  596. #define BF_FMC_PFB0CR_B0SEBE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB0CR_B0SEBE), uint32_t) & BM_FMC_PFB0CR_B0SEBE)
  597. #ifndef __LANGUAGE_ASM__
  598. //! @brief Set the B0SEBE field to a new value.
  599. #define BW_FMC_PFB0CR_B0SEBE(v) (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_B0SEBE) = (v))
  600. #endif
  601. //@}
  602. /*!
  603. * @name Register FMC_PFB0CR, field B0IPE[1] (RW)
  604. *
  605. * This bit controls whether prefetches (or speculative accesses) are initiated
  606. * in response to instruction fetches.
  607. *
  608. * Values:
  609. * - 0 - Do not prefetch in response to instruction fetches.
  610. * - 1 - Enable prefetches in response to instruction fetches.
  611. */
  612. //@{
  613. #define BP_FMC_PFB0CR_B0IPE (1U) //!< Bit position for FMC_PFB0CR_B0IPE.
  614. #define BM_FMC_PFB0CR_B0IPE (0x00000002U) //!< Bit mask for FMC_PFB0CR_B0IPE.
  615. #define BS_FMC_PFB0CR_B0IPE (1U) //!< Bit field size in bits for FMC_PFB0CR_B0IPE.
  616. #ifndef __LANGUAGE_ASM__
  617. //! @brief Read current value of the FMC_PFB0CR_B0IPE field.
  618. #define BR_FMC_PFB0CR_B0IPE (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_B0IPE))
  619. #endif
  620. //! @brief Format value for bitfield FMC_PFB0CR_B0IPE.
  621. #define BF_FMC_PFB0CR_B0IPE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB0CR_B0IPE), uint32_t) & BM_FMC_PFB0CR_B0IPE)
  622. #ifndef __LANGUAGE_ASM__
  623. //! @brief Set the B0IPE field to a new value.
  624. #define BW_FMC_PFB0CR_B0IPE(v) (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_B0IPE) = (v))
  625. #endif
  626. //@}
  627. /*!
  628. * @name Register FMC_PFB0CR, field B0DPE[2] (RW)
  629. *
  630. * This bit controls whether prefetches (or speculative accesses) are initiated
  631. * in response to data references.
  632. *
  633. * Values:
  634. * - 0 - Do not prefetch in response to data references.
  635. * - 1 - Enable prefetches in response to data references.
  636. */
  637. //@{
  638. #define BP_FMC_PFB0CR_B0DPE (2U) //!< Bit position for FMC_PFB0CR_B0DPE.
  639. #define BM_FMC_PFB0CR_B0DPE (0x00000004U) //!< Bit mask for FMC_PFB0CR_B0DPE.
  640. #define BS_FMC_PFB0CR_B0DPE (1U) //!< Bit field size in bits for FMC_PFB0CR_B0DPE.
  641. #ifndef __LANGUAGE_ASM__
  642. //! @brief Read current value of the FMC_PFB0CR_B0DPE field.
  643. #define BR_FMC_PFB0CR_B0DPE (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_B0DPE))
  644. #endif
  645. //! @brief Format value for bitfield FMC_PFB0CR_B0DPE.
  646. #define BF_FMC_PFB0CR_B0DPE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB0CR_B0DPE), uint32_t) & BM_FMC_PFB0CR_B0DPE)
  647. #ifndef __LANGUAGE_ASM__
  648. //! @brief Set the B0DPE field to a new value.
  649. #define BW_FMC_PFB0CR_B0DPE(v) (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_B0DPE) = (v))
  650. #endif
  651. //@}
  652. /*!
  653. * @name Register FMC_PFB0CR, field B0ICE[3] (RW)
  654. *
  655. * This bit controls whether instruction fetches are loaded into the cache.
  656. *
  657. * Values:
  658. * - 0 - Do not cache instruction fetches.
  659. * - 1 - Cache instruction fetches.
  660. */
  661. //@{
  662. #define BP_FMC_PFB0CR_B0ICE (3U) //!< Bit position for FMC_PFB0CR_B0ICE.
  663. #define BM_FMC_PFB0CR_B0ICE (0x00000008U) //!< Bit mask for FMC_PFB0CR_B0ICE.
  664. #define BS_FMC_PFB0CR_B0ICE (1U) //!< Bit field size in bits for FMC_PFB0CR_B0ICE.
  665. #ifndef __LANGUAGE_ASM__
  666. //! @brief Read current value of the FMC_PFB0CR_B0ICE field.
  667. #define BR_FMC_PFB0CR_B0ICE (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_B0ICE))
  668. #endif
  669. //! @brief Format value for bitfield FMC_PFB0CR_B0ICE.
  670. #define BF_FMC_PFB0CR_B0ICE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB0CR_B0ICE), uint32_t) & BM_FMC_PFB0CR_B0ICE)
  671. #ifndef __LANGUAGE_ASM__
  672. //! @brief Set the B0ICE field to a new value.
  673. #define BW_FMC_PFB0CR_B0ICE(v) (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_B0ICE) = (v))
  674. #endif
  675. //@}
  676. /*!
  677. * @name Register FMC_PFB0CR, field B0DCE[4] (RW)
  678. *
  679. * This bit controls whether data references are loaded into the cache.
  680. *
  681. * Values:
  682. * - 0 - Do not cache data references.
  683. * - 1 - Cache data references.
  684. */
  685. //@{
  686. #define BP_FMC_PFB0CR_B0DCE (4U) //!< Bit position for FMC_PFB0CR_B0DCE.
  687. #define BM_FMC_PFB0CR_B0DCE (0x00000010U) //!< Bit mask for FMC_PFB0CR_B0DCE.
  688. #define BS_FMC_PFB0CR_B0DCE (1U) //!< Bit field size in bits for FMC_PFB0CR_B0DCE.
  689. #ifndef __LANGUAGE_ASM__
  690. //! @brief Read current value of the FMC_PFB0CR_B0DCE field.
  691. #define BR_FMC_PFB0CR_B0DCE (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_B0DCE))
  692. #endif
  693. //! @brief Format value for bitfield FMC_PFB0CR_B0DCE.
  694. #define BF_FMC_PFB0CR_B0DCE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB0CR_B0DCE), uint32_t) & BM_FMC_PFB0CR_B0DCE)
  695. #ifndef __LANGUAGE_ASM__
  696. //! @brief Set the B0DCE field to a new value.
  697. #define BW_FMC_PFB0CR_B0DCE(v) (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_B0DCE) = (v))
  698. #endif
  699. //@}
  700. /*!
  701. * @name Register FMC_PFB0CR, field CRC[7:5] (RW)
  702. *
  703. * This 3-bit field defines the replacement algorithm for accesses that are
  704. * cached.
  705. *
  706. * Values:
  707. * - 000 - LRU replacement algorithm per set across all four ways
  708. * - 001 - Reserved
  709. * - 010 - Independent LRU with ways [0-1] for ifetches, [2-3] for data
  710. * - 011 - Independent LRU with ways [0-2] for ifetches, [3] for data
  711. * - 1xx - Reserved
  712. */
  713. //@{
  714. #define BP_FMC_PFB0CR_CRC (5U) //!< Bit position for FMC_PFB0CR_CRC.
  715. #define BM_FMC_PFB0CR_CRC (0x000000E0U) //!< Bit mask for FMC_PFB0CR_CRC.
  716. #define BS_FMC_PFB0CR_CRC (3U) //!< Bit field size in bits for FMC_PFB0CR_CRC.
  717. #ifndef __LANGUAGE_ASM__
  718. //! @brief Read current value of the FMC_PFB0CR_CRC field.
  719. #define BR_FMC_PFB0CR_CRC (HW_FMC_PFB0CR.B.CRC)
  720. #endif
  721. //! @brief Format value for bitfield FMC_PFB0CR_CRC.
  722. #define BF_FMC_PFB0CR_CRC(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB0CR_CRC), uint32_t) & BM_FMC_PFB0CR_CRC)
  723. #ifndef __LANGUAGE_ASM__
  724. //! @brief Set the CRC field to a new value.
  725. #define BW_FMC_PFB0CR_CRC(v) (HW_FMC_PFB0CR_WR((HW_FMC_PFB0CR_RD() & ~BM_FMC_PFB0CR_CRC) | BF_FMC_PFB0CR_CRC(v)))
  726. #endif
  727. //@}
  728. /*!
  729. * @name Register FMC_PFB0CR, field B0MW[18:17] (RO)
  730. *
  731. * This read-only field defines the width of the bank 0 memory.
  732. *
  733. * Values:
  734. * - 00 - 32 bits
  735. * - 01 - 64 bits
  736. * - 10 - 128 bits
  737. * - 11 - Reserved
  738. */
  739. //@{
  740. #define BP_FMC_PFB0CR_B0MW (17U) //!< Bit position for FMC_PFB0CR_B0MW.
  741. #define BM_FMC_PFB0CR_B0MW (0x00060000U) //!< Bit mask for FMC_PFB0CR_B0MW.
  742. #define BS_FMC_PFB0CR_B0MW (2U) //!< Bit field size in bits for FMC_PFB0CR_B0MW.
  743. #ifndef __LANGUAGE_ASM__
  744. //! @brief Read current value of the FMC_PFB0CR_B0MW field.
  745. #define BR_FMC_PFB0CR_B0MW (HW_FMC_PFB0CR.B.B0MW)
  746. #endif
  747. //@}
  748. /*!
  749. * @name Register FMC_PFB0CR, field S_B_INV[19] (WORZ)
  750. *
  751. * This bit determines if the FMC's prefetch speculation buffer and the single
  752. * entry page buffer are to be invalidated (cleared). When this bit is written,
  753. * the speculation buffer and single entry buffer are immediately cleared. This bit
  754. * always reads as zero.
  755. *
  756. * Values:
  757. * - 0 - Speculation buffer and single entry buffer are not affected.
  758. * - 1 - Invalidate (clear) speculation buffer and single entry buffer.
  759. */
  760. //@{
  761. #define BP_FMC_PFB0CR_S_B_INV (19U) //!< Bit position for FMC_PFB0CR_S_B_INV.
  762. #define BM_FMC_PFB0CR_S_B_INV (0x00080000U) //!< Bit mask for FMC_PFB0CR_S_B_INV.
  763. #define BS_FMC_PFB0CR_S_B_INV (1U) //!< Bit field size in bits for FMC_PFB0CR_S_B_INV.
  764. //! @brief Format value for bitfield FMC_PFB0CR_S_B_INV.
  765. #define BF_FMC_PFB0CR_S_B_INV(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB0CR_S_B_INV), uint32_t) & BM_FMC_PFB0CR_S_B_INV)
  766. #ifndef __LANGUAGE_ASM__
  767. //! @brief Set the S_B_INV field to a new value.
  768. #define BW_FMC_PFB0CR_S_B_INV(v) (BITBAND_ACCESS32(HW_FMC_PFB0CR_ADDR, BP_FMC_PFB0CR_S_B_INV) = (v))
  769. #endif
  770. //@}
  771. /*!
  772. * @name Register FMC_PFB0CR, field CINV_WAY[23:20] (WORZ)
  773. *
  774. * These bits determine if the given cache way is to be invalidated (cleared).
  775. * When a bit within this field is written, the corresponding cache way is
  776. * immediately invalidated: the way's tag, data, and valid contents are cleared. This
  777. * field always reads as zero. Cache invalidation takes precedence over locking.
  778. * The cache is invalidated by system reset. System software is required to
  779. * maintain memory coherency when any segment of the flash memory is programmed or
  780. * erased. Accordingly, cache invalidations must occur after a programming or erase
  781. * event is completed and before the new memory image is accessed. The bit setting
  782. * definitions are for each bit in the field.
  783. *
  784. * Values:
  785. * - 0 - No cache way invalidation for the corresponding cache
  786. * - 1 - Invalidate cache way for the corresponding cache: clear the tag, data,
  787. * and vld bits of ways selected
  788. */
  789. //@{
  790. #define BP_FMC_PFB0CR_CINV_WAY (20U) //!< Bit position for FMC_PFB0CR_CINV_WAY.
  791. #define BM_FMC_PFB0CR_CINV_WAY (0x00F00000U) //!< Bit mask for FMC_PFB0CR_CINV_WAY.
  792. #define BS_FMC_PFB0CR_CINV_WAY (4U) //!< Bit field size in bits for FMC_PFB0CR_CINV_WAY.
  793. //! @brief Format value for bitfield FMC_PFB0CR_CINV_WAY.
  794. #define BF_FMC_PFB0CR_CINV_WAY(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB0CR_CINV_WAY), uint32_t) & BM_FMC_PFB0CR_CINV_WAY)
  795. #ifndef __LANGUAGE_ASM__
  796. //! @brief Set the CINV_WAY field to a new value.
  797. #define BW_FMC_PFB0CR_CINV_WAY(v) (HW_FMC_PFB0CR_WR((HW_FMC_PFB0CR_RD() & ~BM_FMC_PFB0CR_CINV_WAY) | BF_FMC_PFB0CR_CINV_WAY(v)))
  798. #endif
  799. //@}
  800. /*!
  801. * @name Register FMC_PFB0CR, field CLCK_WAY[27:24] (RW)
  802. *
  803. * These bits determine if the given cache way is locked such that its contents
  804. * will not be displaced by future misses. The bit setting definitions are for
  805. * each bit in the field.
  806. *
  807. * Values:
  808. * - 0 - Cache way is unlocked and may be displaced
  809. * - 1 - Cache way is locked and its contents are not displaced
  810. */
  811. //@{
  812. #define BP_FMC_PFB0CR_CLCK_WAY (24U) //!< Bit position for FMC_PFB0CR_CLCK_WAY.
  813. #define BM_FMC_PFB0CR_CLCK_WAY (0x0F000000U) //!< Bit mask for FMC_PFB0CR_CLCK_WAY.
  814. #define BS_FMC_PFB0CR_CLCK_WAY (4U) //!< Bit field size in bits for FMC_PFB0CR_CLCK_WAY.
  815. #ifndef __LANGUAGE_ASM__
  816. //! @brief Read current value of the FMC_PFB0CR_CLCK_WAY field.
  817. #define BR_FMC_PFB0CR_CLCK_WAY (HW_FMC_PFB0CR.B.CLCK_WAY)
  818. #endif
  819. //! @brief Format value for bitfield FMC_PFB0CR_CLCK_WAY.
  820. #define BF_FMC_PFB0CR_CLCK_WAY(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB0CR_CLCK_WAY), uint32_t) & BM_FMC_PFB0CR_CLCK_WAY)
  821. #ifndef __LANGUAGE_ASM__
  822. //! @brief Set the CLCK_WAY field to a new value.
  823. #define BW_FMC_PFB0CR_CLCK_WAY(v) (HW_FMC_PFB0CR_WR((HW_FMC_PFB0CR_RD() & ~BM_FMC_PFB0CR_CLCK_WAY) | BF_FMC_PFB0CR_CLCK_WAY(v)))
  824. #endif
  825. //@}
  826. /*!
  827. * @name Register FMC_PFB0CR, field B0RWSC[31:28] (RO)
  828. *
  829. * This read-only field defines the number of wait states required to access the
  830. * bank 0 flash memory. The relationship between the read access time of the
  831. * flash array (expressed in system clock cycles) and RWSC is defined as: Access
  832. * time of flash array [system clocks] = RWSC + 1 The FMC automatically calculates
  833. * this value based on the ratio of the system clock speed to the flash clock
  834. * speed. For example, when this ratio is 4:1, the field's value is 3h.
  835. */
  836. //@{
  837. #define BP_FMC_PFB0CR_B0RWSC (28U) //!< Bit position for FMC_PFB0CR_B0RWSC.
  838. #define BM_FMC_PFB0CR_B0RWSC (0xF0000000U) //!< Bit mask for FMC_PFB0CR_B0RWSC.
  839. #define BS_FMC_PFB0CR_B0RWSC (4U) //!< Bit field size in bits for FMC_PFB0CR_B0RWSC.
  840. #ifndef __LANGUAGE_ASM__
  841. //! @brief Read current value of the FMC_PFB0CR_B0RWSC field.
  842. #define BR_FMC_PFB0CR_B0RWSC (HW_FMC_PFB0CR.B.B0RWSC)
  843. #endif
  844. //@}
  845. //-------------------------------------------------------------------------------------------
  846. // HW_FMC_PFB1CR - Flash Bank 1 Control Register
  847. //-------------------------------------------------------------------------------------------
  848. #ifndef __LANGUAGE_ASM__
  849. /*!
  850. * @brief HW_FMC_PFB1CR - Flash Bank 1 Control Register (RW)
  851. *
  852. * Reset value: 0x3004001FU
  853. *
  854. * This register has a format similar to that for PFB0CR, except it controls the
  855. * operation of flash bank 1, and the "global" cache control fields are empty.
  856. */
  857. typedef union _hw_fmc_pfb1cr
  858. {
  859. uint32_t U;
  860. struct _hw_fmc_pfb1cr_bitfields
  861. {
  862. uint32_t B1SEBE : 1; //!< [0] Bank 1 Single Entry Buffer Enable
  863. uint32_t B1IPE : 1; //!< [1] Bank 1 Instruction Prefetch Enable
  864. uint32_t B1DPE : 1; //!< [2] Bank 1 Data Prefetch Enable
  865. uint32_t B1ICE : 1; //!< [3] Bank 1 Instruction Cache Enable
  866. uint32_t B1DCE : 1; //!< [4] Bank 1 Data Cache Enable
  867. uint32_t RESERVED0 : 12; //!< [16:5]
  868. uint32_t B1MW : 2; //!< [18:17] Bank 1 Memory Width
  869. uint32_t RESERVED1 : 9; //!< [27:19]
  870. uint32_t B1RWSC : 4; //!< [31:28] Bank 1 Read Wait State Control
  871. } B;
  872. } hw_fmc_pfb1cr_t;
  873. #endif
  874. /*!
  875. * @name Constants and macros for entire FMC_PFB1CR register
  876. */
  877. //@{
  878. #define HW_FMC_PFB1CR_ADDR (REGS_FMC_BASE + 0x8U)
  879. #ifndef __LANGUAGE_ASM__
  880. #define HW_FMC_PFB1CR (*(__IO hw_fmc_pfb1cr_t *) HW_FMC_PFB1CR_ADDR)
  881. #define HW_FMC_PFB1CR_RD() (HW_FMC_PFB1CR.U)
  882. #define HW_FMC_PFB1CR_WR(v) (HW_FMC_PFB1CR.U = (v))
  883. #define HW_FMC_PFB1CR_SET(v) (HW_FMC_PFB1CR_WR(HW_FMC_PFB1CR_RD() | (v)))
  884. #define HW_FMC_PFB1CR_CLR(v) (HW_FMC_PFB1CR_WR(HW_FMC_PFB1CR_RD() & ~(v)))
  885. #define HW_FMC_PFB1CR_TOG(v) (HW_FMC_PFB1CR_WR(HW_FMC_PFB1CR_RD() ^ (v)))
  886. #endif
  887. //@}
  888. /*
  889. * Constants & macros for individual FMC_PFB1CR bitfields
  890. */
  891. /*!
  892. * @name Register FMC_PFB1CR, field B1SEBE[0] (RW)
  893. *
  894. * This bit controls whether the single entry buffer is enabled in response to
  895. * flash read accesses. Its operation is independent from bank 0's cache. A
  896. * high-to-low transition of this enable forces the page buffer to be invalidated.
  897. *
  898. * Values:
  899. * - 0 - Single entry buffer is disabled.
  900. * - 1 - Single entry buffer is enabled.
  901. */
  902. //@{
  903. #define BP_FMC_PFB1CR_B1SEBE (0U) //!< Bit position for FMC_PFB1CR_B1SEBE.
  904. #define BM_FMC_PFB1CR_B1SEBE (0x00000001U) //!< Bit mask for FMC_PFB1CR_B1SEBE.
  905. #define BS_FMC_PFB1CR_B1SEBE (1U) //!< Bit field size in bits for FMC_PFB1CR_B1SEBE.
  906. #ifndef __LANGUAGE_ASM__
  907. //! @brief Read current value of the FMC_PFB1CR_B1SEBE field.
  908. #define BR_FMC_PFB1CR_B1SEBE (BITBAND_ACCESS32(HW_FMC_PFB1CR_ADDR, BP_FMC_PFB1CR_B1SEBE))
  909. #endif
  910. //! @brief Format value for bitfield FMC_PFB1CR_B1SEBE.
  911. #define BF_FMC_PFB1CR_B1SEBE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB1CR_B1SEBE), uint32_t) & BM_FMC_PFB1CR_B1SEBE)
  912. #ifndef __LANGUAGE_ASM__
  913. //! @brief Set the B1SEBE field to a new value.
  914. #define BW_FMC_PFB1CR_B1SEBE(v) (BITBAND_ACCESS32(HW_FMC_PFB1CR_ADDR, BP_FMC_PFB1CR_B1SEBE) = (v))
  915. #endif
  916. //@}
  917. /*!
  918. * @name Register FMC_PFB1CR, field B1IPE[1] (RW)
  919. *
  920. * This bit controls whether prefetches (or speculative accesses) are initiated
  921. * in response to instruction fetches.
  922. *
  923. * Values:
  924. * - 0 - Do not prefetch in response to instruction fetches.
  925. * - 1 - Enable prefetches in response to instruction fetches.
  926. */
  927. //@{
  928. #define BP_FMC_PFB1CR_B1IPE (1U) //!< Bit position for FMC_PFB1CR_B1IPE.
  929. #define BM_FMC_PFB1CR_B1IPE (0x00000002U) //!< Bit mask for FMC_PFB1CR_B1IPE.
  930. #define BS_FMC_PFB1CR_B1IPE (1U) //!< Bit field size in bits for FMC_PFB1CR_B1IPE.
  931. #ifndef __LANGUAGE_ASM__
  932. //! @brief Read current value of the FMC_PFB1CR_B1IPE field.
  933. #define BR_FMC_PFB1CR_B1IPE (BITBAND_ACCESS32(HW_FMC_PFB1CR_ADDR, BP_FMC_PFB1CR_B1IPE))
  934. #endif
  935. //! @brief Format value for bitfield FMC_PFB1CR_B1IPE.
  936. #define BF_FMC_PFB1CR_B1IPE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB1CR_B1IPE), uint32_t) & BM_FMC_PFB1CR_B1IPE)
  937. #ifndef __LANGUAGE_ASM__
  938. //! @brief Set the B1IPE field to a new value.
  939. #define BW_FMC_PFB1CR_B1IPE(v) (BITBAND_ACCESS32(HW_FMC_PFB1CR_ADDR, BP_FMC_PFB1CR_B1IPE) = (v))
  940. #endif
  941. //@}
  942. /*!
  943. * @name Register FMC_PFB1CR, field B1DPE[2] (RW)
  944. *
  945. * This bit controls whether prefetches (or speculative accesses) are initiated
  946. * in response to data references.
  947. *
  948. * Values:
  949. * - 0 - Do not prefetch in response to data references.
  950. * - 1 - Enable prefetches in response to data references.
  951. */
  952. //@{
  953. #define BP_FMC_PFB1CR_B1DPE (2U) //!< Bit position for FMC_PFB1CR_B1DPE.
  954. #define BM_FMC_PFB1CR_B1DPE (0x00000004U) //!< Bit mask for FMC_PFB1CR_B1DPE.
  955. #define BS_FMC_PFB1CR_B1DPE (1U) //!< Bit field size in bits for FMC_PFB1CR_B1DPE.
  956. #ifndef __LANGUAGE_ASM__
  957. //! @brief Read current value of the FMC_PFB1CR_B1DPE field.
  958. #define BR_FMC_PFB1CR_B1DPE (BITBAND_ACCESS32(HW_FMC_PFB1CR_ADDR, BP_FMC_PFB1CR_B1DPE))
  959. #endif
  960. //! @brief Format value for bitfield FMC_PFB1CR_B1DPE.
  961. #define BF_FMC_PFB1CR_B1DPE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB1CR_B1DPE), uint32_t) & BM_FMC_PFB1CR_B1DPE)
  962. #ifndef __LANGUAGE_ASM__
  963. //! @brief Set the B1DPE field to a new value.
  964. #define BW_FMC_PFB1CR_B1DPE(v) (BITBAND_ACCESS32(HW_FMC_PFB1CR_ADDR, BP_FMC_PFB1CR_B1DPE) = (v))
  965. #endif
  966. //@}
  967. /*!
  968. * @name Register FMC_PFB1CR, field B1ICE[3] (RW)
  969. *
  970. * This bit controls whether instruction fetches are loaded into the cache.
  971. *
  972. * Values:
  973. * - 0 - Do not cache instruction fetches.
  974. * - 1 - Cache instruction fetches.
  975. */
  976. //@{
  977. #define BP_FMC_PFB1CR_B1ICE (3U) //!< Bit position for FMC_PFB1CR_B1ICE.
  978. #define BM_FMC_PFB1CR_B1ICE (0x00000008U) //!< Bit mask for FMC_PFB1CR_B1ICE.
  979. #define BS_FMC_PFB1CR_B1ICE (1U) //!< Bit field size in bits for FMC_PFB1CR_B1ICE.
  980. #ifndef __LANGUAGE_ASM__
  981. //! @brief Read current value of the FMC_PFB1CR_B1ICE field.
  982. #define BR_FMC_PFB1CR_B1ICE (BITBAND_ACCESS32(HW_FMC_PFB1CR_ADDR, BP_FMC_PFB1CR_B1ICE))
  983. #endif
  984. //! @brief Format value for bitfield FMC_PFB1CR_B1ICE.
  985. #define BF_FMC_PFB1CR_B1ICE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB1CR_B1ICE), uint32_t) & BM_FMC_PFB1CR_B1ICE)
  986. #ifndef __LANGUAGE_ASM__
  987. //! @brief Set the B1ICE field to a new value.
  988. #define BW_FMC_PFB1CR_B1ICE(v) (BITBAND_ACCESS32(HW_FMC_PFB1CR_ADDR, BP_FMC_PFB1CR_B1ICE) = (v))
  989. #endif
  990. //@}
  991. /*!
  992. * @name Register FMC_PFB1CR, field B1DCE[4] (RW)
  993. *
  994. * This bit controls whether data references are loaded into the cache.
  995. *
  996. * Values:
  997. * - 0 - Do not cache data references.
  998. * - 1 - Cache data references.
  999. */
  1000. //@{
  1001. #define BP_FMC_PFB1CR_B1DCE (4U) //!< Bit position for FMC_PFB1CR_B1DCE.
  1002. #define BM_FMC_PFB1CR_B1DCE (0x00000010U) //!< Bit mask for FMC_PFB1CR_B1DCE.
  1003. #define BS_FMC_PFB1CR_B1DCE (1U) //!< Bit field size in bits for FMC_PFB1CR_B1DCE.
  1004. #ifndef __LANGUAGE_ASM__
  1005. //! @brief Read current value of the FMC_PFB1CR_B1DCE field.
  1006. #define BR_FMC_PFB1CR_B1DCE (BITBAND_ACCESS32(HW_FMC_PFB1CR_ADDR, BP_FMC_PFB1CR_B1DCE))
  1007. #endif
  1008. //! @brief Format value for bitfield FMC_PFB1CR_B1DCE.
  1009. #define BF_FMC_PFB1CR_B1DCE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_PFB1CR_B1DCE), uint32_t) & BM_FMC_PFB1CR_B1DCE)
  1010. #ifndef __LANGUAGE_ASM__
  1011. //! @brief Set the B1DCE field to a new value.
  1012. #define BW_FMC_PFB1CR_B1DCE(v) (BITBAND_ACCESS32(HW_FMC_PFB1CR_ADDR, BP_FMC_PFB1CR_B1DCE) = (v))
  1013. #endif
  1014. //@}
  1015. /*!
  1016. * @name Register FMC_PFB1CR, field B1MW[18:17] (RO)
  1017. *
  1018. * This read-only field defines the width of the bank 1 memory.
  1019. *
  1020. * Values:
  1021. * - 00 - 32 bits
  1022. * - 01 - 64 bits
  1023. * - 10 - 128 bits
  1024. * - 11 - Reserved
  1025. */
  1026. //@{
  1027. #define BP_FMC_PFB1CR_B1MW (17U) //!< Bit position for FMC_PFB1CR_B1MW.
  1028. #define BM_FMC_PFB1CR_B1MW (0x00060000U) //!< Bit mask for FMC_PFB1CR_B1MW.
  1029. #define BS_FMC_PFB1CR_B1MW (2U) //!< Bit field size in bits for FMC_PFB1CR_B1MW.
  1030. #ifndef __LANGUAGE_ASM__
  1031. //! @brief Read current value of the FMC_PFB1CR_B1MW field.
  1032. #define BR_FMC_PFB1CR_B1MW (HW_FMC_PFB1CR.B.B1MW)
  1033. #endif
  1034. //@}
  1035. /*!
  1036. * @name Register FMC_PFB1CR, field B1RWSC[31:28] (RO)
  1037. *
  1038. * This read-only field defines the number of wait states required to access the
  1039. * bank 1 flash memory. The relationship between the read access time of the
  1040. * flash array (expressed in system clock cycles) and RWSC is defined as: Access
  1041. * time of flash array [system clocks] = RWSC + 1 The FMC automatically calculates
  1042. * this value based on the ratio of the system clock speed to the flash clock
  1043. * speed. For example, when this ratio is 4:1, the field's value is 3h.
  1044. */
  1045. //@{
  1046. #define BP_FMC_PFB1CR_B1RWSC (28U) //!< Bit position for FMC_PFB1CR_B1RWSC.
  1047. #define BM_FMC_PFB1CR_B1RWSC (0xF0000000U) //!< Bit mask for FMC_PFB1CR_B1RWSC.
  1048. #define BS_FMC_PFB1CR_B1RWSC (4U) //!< Bit field size in bits for FMC_PFB1CR_B1RWSC.
  1049. #ifndef __LANGUAGE_ASM__
  1050. //! @brief Read current value of the FMC_PFB1CR_B1RWSC field.
  1051. #define BR_FMC_PFB1CR_B1RWSC (HW_FMC_PFB1CR.B.B1RWSC)
  1052. #endif
  1053. //@}
  1054. //-------------------------------------------------------------------------------------------
  1055. // HW_FMC_TAGVDW0Sn - Cache Tag Storage
  1056. //-------------------------------------------------------------------------------------------
  1057. #ifndef __LANGUAGE_ASM__
  1058. /*!
  1059. * @brief HW_FMC_TAGVDW0Sn - Cache Tag Storage (RW)
  1060. *
  1061. * Reset value: 0x00000000U
  1062. *
  1063. * The cache is a 4-way, set-associative cache with 4 sets. The ways are
  1064. * numbered 0-3 and the sets are numbered 0-3. In TAGVDWxSy, x denotes the way, and y
  1065. * denotes the set. This section represents tag/vld information for all sets in the
  1066. * indicated way.
  1067. */
  1068. typedef union _hw_fmc_tagvdw0sn
  1069. {
  1070. uint32_t U;
  1071. struct _hw_fmc_tagvdw0sn_bitfields
  1072. {
  1073. uint32_t valid : 1; //!< [0] 1-bit valid for cache entry
  1074. uint32_t RESERVED0 : 4; //!< [4:1]
  1075. uint32_t tag : 14; //!< [18:5] 14-bit tag for cache entry
  1076. uint32_t RESERVED1 : 13; //!< [31:19]
  1077. } B;
  1078. } hw_fmc_tagvdw0sn_t;
  1079. #endif
  1080. /*!
  1081. * @name Constants and macros for entire FMC_TAGVDW0Sn register
  1082. */
  1083. //@{
  1084. #define HW_FMC_TAGVDW0Sn_COUNT (4U)
  1085. #define HW_FMC_TAGVDW0Sn_ADDR(n) (REGS_FMC_BASE + 0x100U + (0x4U * n))
  1086. #ifndef __LANGUAGE_ASM__
  1087. #define HW_FMC_TAGVDW0Sn(n) (*(__IO hw_fmc_tagvdw0sn_t *) HW_FMC_TAGVDW0Sn_ADDR(n))
  1088. #define HW_FMC_TAGVDW0Sn_RD(n) (HW_FMC_TAGVDW0Sn(n).U)
  1089. #define HW_FMC_TAGVDW0Sn_WR(n, v) (HW_FMC_TAGVDW0Sn(n).U = (v))
  1090. #define HW_FMC_TAGVDW0Sn_SET(n, v) (HW_FMC_TAGVDW0Sn_WR(n, HW_FMC_TAGVDW0Sn_RD(n) | (v)))
  1091. #define HW_FMC_TAGVDW0Sn_CLR(n, v) (HW_FMC_TAGVDW0Sn_WR(n, HW_FMC_TAGVDW0Sn_RD(n) & ~(v)))
  1092. #define HW_FMC_TAGVDW0Sn_TOG(n, v) (HW_FMC_TAGVDW0Sn_WR(n, HW_FMC_TAGVDW0Sn_RD(n) ^ (v)))
  1093. #endif
  1094. //@}
  1095. /*
  1096. * Constants & macros for individual FMC_TAGVDW0Sn bitfields
  1097. */
  1098. /*!
  1099. * @name Register FMC_TAGVDW0Sn, field valid[0] (RW)
  1100. */
  1101. //@{
  1102. #define BP_FMC_TAGVDW0Sn_valid (0U) //!< Bit position for FMC_TAGVDW0Sn_valid.
  1103. #define BM_FMC_TAGVDW0Sn_valid (0x00000001U) //!< Bit mask for FMC_TAGVDW0Sn_valid.
  1104. #define BS_FMC_TAGVDW0Sn_valid (1U) //!< Bit field size in bits for FMC_TAGVDW0Sn_valid.
  1105. #ifndef __LANGUAGE_ASM__
  1106. //! @brief Read current value of the FMC_TAGVDW0Sn_valid field.
  1107. #define BR_FMC_TAGVDW0Sn_valid(n) (BITBAND_ACCESS32(HW_FMC_TAGVDW0Sn_ADDR(n), BP_FMC_TAGVDW0Sn_valid))
  1108. #endif
  1109. //! @brief Format value for bitfield FMC_TAGVDW0Sn_valid.
  1110. #define BF_FMC_TAGVDW0Sn_valid(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_TAGVDW0Sn_valid), uint32_t) & BM_FMC_TAGVDW0Sn_valid)
  1111. #ifndef __LANGUAGE_ASM__
  1112. //! @brief Set the valid field to a new value.
  1113. #define BW_FMC_TAGVDW0Sn_valid(n, v) (BITBAND_ACCESS32(HW_FMC_TAGVDW0Sn_ADDR(n), BP_FMC_TAGVDW0Sn_valid) = (v))
  1114. #endif
  1115. //@}
  1116. /*!
  1117. * @name Register FMC_TAGVDW0Sn, field tag[18:5] (RW)
  1118. */
  1119. //@{
  1120. #define BP_FMC_TAGVDW0Sn_tag (5U) //!< Bit position for FMC_TAGVDW0Sn_tag.
  1121. #define BM_FMC_TAGVDW0Sn_tag (0x0007FFE0U) //!< Bit mask for FMC_TAGVDW0Sn_tag.
  1122. #define BS_FMC_TAGVDW0Sn_tag (14U) //!< Bit field size in bits for FMC_TAGVDW0Sn_tag.
  1123. #ifndef __LANGUAGE_ASM__
  1124. //! @brief Read current value of the FMC_TAGVDW0Sn_tag field.
  1125. #define BR_FMC_TAGVDW0Sn_tag(n) (HW_FMC_TAGVDW0Sn(n).B.tag)
  1126. #endif
  1127. //! @brief Format value for bitfield FMC_TAGVDW0Sn_tag.
  1128. #define BF_FMC_TAGVDW0Sn_tag(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_TAGVDW0Sn_tag), uint32_t) & BM_FMC_TAGVDW0Sn_tag)
  1129. #ifndef __LANGUAGE_ASM__
  1130. //! @brief Set the tag field to a new value.
  1131. #define BW_FMC_TAGVDW0Sn_tag(n, v) (HW_FMC_TAGVDW0Sn_WR(n, (HW_FMC_TAGVDW0Sn_RD(n) & ~BM_FMC_TAGVDW0Sn_tag) | BF_FMC_TAGVDW0Sn_tag(v)))
  1132. #endif
  1133. //@}
  1134. //-------------------------------------------------------------------------------------------
  1135. // HW_FMC_TAGVDW1Sn - Cache Tag Storage
  1136. //-------------------------------------------------------------------------------------------
  1137. #ifndef __LANGUAGE_ASM__
  1138. /*!
  1139. * @brief HW_FMC_TAGVDW1Sn - Cache Tag Storage (RW)
  1140. *
  1141. * Reset value: 0x00000000U
  1142. *
  1143. * The cache is a 4-way, set-associative cache with 4 sets. The ways are
  1144. * numbered 0-3 and the sets are numbered 0-3. In TAGVDWxSy, x denotes the way, and y
  1145. * denotes the set. This section represents tag/vld information for all sets in the
  1146. * indicated way.
  1147. */
  1148. typedef union _hw_fmc_tagvdw1sn
  1149. {
  1150. uint32_t U;
  1151. struct _hw_fmc_tagvdw1sn_bitfields
  1152. {
  1153. uint32_t valid : 1; //!< [0] 1-bit valid for cache entry
  1154. uint32_t RESERVED0 : 4; //!< [4:1]
  1155. uint32_t tag : 14; //!< [18:5] 14-bit tag for cache entry
  1156. uint32_t RESERVED1 : 13; //!< [31:19]
  1157. } B;
  1158. } hw_fmc_tagvdw1sn_t;
  1159. #endif
  1160. /*!
  1161. * @name Constants and macros for entire FMC_TAGVDW1Sn register
  1162. */
  1163. //@{
  1164. #define HW_FMC_TAGVDW1Sn_COUNT (4U)
  1165. #define HW_FMC_TAGVDW1Sn_ADDR(n) (REGS_FMC_BASE + 0x110U + (0x4U * n))
  1166. #ifndef __LANGUAGE_ASM__
  1167. #define HW_FMC_TAGVDW1Sn(n) (*(__IO hw_fmc_tagvdw1sn_t *) HW_FMC_TAGVDW1Sn_ADDR(n))
  1168. #define HW_FMC_TAGVDW1Sn_RD(n) (HW_FMC_TAGVDW1Sn(n).U)
  1169. #define HW_FMC_TAGVDW1Sn_WR(n, v) (HW_FMC_TAGVDW1Sn(n).U = (v))
  1170. #define HW_FMC_TAGVDW1Sn_SET(n, v) (HW_FMC_TAGVDW1Sn_WR(n, HW_FMC_TAGVDW1Sn_RD(n) | (v)))
  1171. #define HW_FMC_TAGVDW1Sn_CLR(n, v) (HW_FMC_TAGVDW1Sn_WR(n, HW_FMC_TAGVDW1Sn_RD(n) & ~(v)))
  1172. #define HW_FMC_TAGVDW1Sn_TOG(n, v) (HW_FMC_TAGVDW1Sn_WR(n, HW_FMC_TAGVDW1Sn_RD(n) ^ (v)))
  1173. #endif
  1174. //@}
  1175. /*
  1176. * Constants & macros for individual FMC_TAGVDW1Sn bitfields
  1177. */
  1178. /*!
  1179. * @name Register FMC_TAGVDW1Sn, field valid[0] (RW)
  1180. */
  1181. //@{
  1182. #define BP_FMC_TAGVDW1Sn_valid (0U) //!< Bit position for FMC_TAGVDW1Sn_valid.
  1183. #define BM_FMC_TAGVDW1Sn_valid (0x00000001U) //!< Bit mask for FMC_TAGVDW1Sn_valid.
  1184. #define BS_FMC_TAGVDW1Sn_valid (1U) //!< Bit field size in bits for FMC_TAGVDW1Sn_valid.
  1185. #ifndef __LANGUAGE_ASM__
  1186. //! @brief Read current value of the FMC_TAGVDW1Sn_valid field.
  1187. #define BR_FMC_TAGVDW1Sn_valid(n) (BITBAND_ACCESS32(HW_FMC_TAGVDW1Sn_ADDR(n), BP_FMC_TAGVDW1Sn_valid))
  1188. #endif
  1189. //! @brief Format value for bitfield FMC_TAGVDW1Sn_valid.
  1190. #define BF_FMC_TAGVDW1Sn_valid(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_TAGVDW1Sn_valid), uint32_t) & BM_FMC_TAGVDW1Sn_valid)
  1191. #ifndef __LANGUAGE_ASM__
  1192. //! @brief Set the valid field to a new value.
  1193. #define BW_FMC_TAGVDW1Sn_valid(n, v) (BITBAND_ACCESS32(HW_FMC_TAGVDW1Sn_ADDR(n), BP_FMC_TAGVDW1Sn_valid) = (v))
  1194. #endif
  1195. //@}
  1196. /*!
  1197. * @name Register FMC_TAGVDW1Sn, field tag[18:5] (RW)
  1198. */
  1199. //@{
  1200. #define BP_FMC_TAGVDW1Sn_tag (5U) //!< Bit position for FMC_TAGVDW1Sn_tag.
  1201. #define BM_FMC_TAGVDW1Sn_tag (0x0007FFE0U) //!< Bit mask for FMC_TAGVDW1Sn_tag.
  1202. #define BS_FMC_TAGVDW1Sn_tag (14U) //!< Bit field size in bits for FMC_TAGVDW1Sn_tag.
  1203. #ifndef __LANGUAGE_ASM__
  1204. //! @brief Read current value of the FMC_TAGVDW1Sn_tag field.
  1205. #define BR_FMC_TAGVDW1Sn_tag(n) (HW_FMC_TAGVDW1Sn(n).B.tag)
  1206. #endif
  1207. //! @brief Format value for bitfield FMC_TAGVDW1Sn_tag.
  1208. #define BF_FMC_TAGVDW1Sn_tag(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_TAGVDW1Sn_tag), uint32_t) & BM_FMC_TAGVDW1Sn_tag)
  1209. #ifndef __LANGUAGE_ASM__
  1210. //! @brief Set the tag field to a new value.
  1211. #define BW_FMC_TAGVDW1Sn_tag(n, v) (HW_FMC_TAGVDW1Sn_WR(n, (HW_FMC_TAGVDW1Sn_RD(n) & ~BM_FMC_TAGVDW1Sn_tag) | BF_FMC_TAGVDW1Sn_tag(v)))
  1212. #endif
  1213. //@}
  1214. //-------------------------------------------------------------------------------------------
  1215. // HW_FMC_TAGVDW2Sn - Cache Tag Storage
  1216. //-------------------------------------------------------------------------------------------
  1217. #ifndef __LANGUAGE_ASM__
  1218. /*!
  1219. * @brief HW_FMC_TAGVDW2Sn - Cache Tag Storage (RW)
  1220. *
  1221. * Reset value: 0x00000000U
  1222. *
  1223. * The cache is a 4-way, set-associative cache with 4 sets. The ways are
  1224. * numbered 0-3 and the sets are numbered 0-3. In TAGVDWxSy, x denotes the way, and y
  1225. * denotes the set. This section represents tag/vld information for all sets in the
  1226. * indicated way.
  1227. */
  1228. typedef union _hw_fmc_tagvdw2sn
  1229. {
  1230. uint32_t U;
  1231. struct _hw_fmc_tagvdw2sn_bitfields
  1232. {
  1233. uint32_t valid : 1; //!< [0] 1-bit valid for cache entry
  1234. uint32_t RESERVED0 : 4; //!< [4:1]
  1235. uint32_t tag : 14; //!< [18:5] 14-bit tag for cache entry
  1236. uint32_t RESERVED1 : 13; //!< [31:19]
  1237. } B;
  1238. } hw_fmc_tagvdw2sn_t;
  1239. #endif
  1240. /*!
  1241. * @name Constants and macros for entire FMC_TAGVDW2Sn register
  1242. */
  1243. //@{
  1244. #define HW_FMC_TAGVDW2Sn_COUNT (4U)
  1245. #define HW_FMC_TAGVDW2Sn_ADDR(n) (REGS_FMC_BASE + 0x120U + (0x4U * n))
  1246. #ifndef __LANGUAGE_ASM__
  1247. #define HW_FMC_TAGVDW2Sn(n) (*(__IO hw_fmc_tagvdw2sn_t *) HW_FMC_TAGVDW2Sn_ADDR(n))
  1248. #define HW_FMC_TAGVDW2Sn_RD(n) (HW_FMC_TAGVDW2Sn(n).U)
  1249. #define HW_FMC_TAGVDW2Sn_WR(n, v) (HW_FMC_TAGVDW2Sn(n).U = (v))
  1250. #define HW_FMC_TAGVDW2Sn_SET(n, v) (HW_FMC_TAGVDW2Sn_WR(n, HW_FMC_TAGVDW2Sn_RD(n) | (v)))
  1251. #define HW_FMC_TAGVDW2Sn_CLR(n, v) (HW_FMC_TAGVDW2Sn_WR(n, HW_FMC_TAGVDW2Sn_RD(n) & ~(v)))
  1252. #define HW_FMC_TAGVDW2Sn_TOG(n, v) (HW_FMC_TAGVDW2Sn_WR(n, HW_FMC_TAGVDW2Sn_RD(n) ^ (v)))
  1253. #endif
  1254. //@}
  1255. /*
  1256. * Constants & macros for individual FMC_TAGVDW2Sn bitfields
  1257. */
  1258. /*!
  1259. * @name Register FMC_TAGVDW2Sn, field valid[0] (RW)
  1260. */
  1261. //@{
  1262. #define BP_FMC_TAGVDW2Sn_valid (0U) //!< Bit position for FMC_TAGVDW2Sn_valid.
  1263. #define BM_FMC_TAGVDW2Sn_valid (0x00000001U) //!< Bit mask for FMC_TAGVDW2Sn_valid.
  1264. #define BS_FMC_TAGVDW2Sn_valid (1U) //!< Bit field size in bits for FMC_TAGVDW2Sn_valid.
  1265. #ifndef __LANGUAGE_ASM__
  1266. //! @brief Read current value of the FMC_TAGVDW2Sn_valid field.
  1267. #define BR_FMC_TAGVDW2Sn_valid(n) (BITBAND_ACCESS32(HW_FMC_TAGVDW2Sn_ADDR(n), BP_FMC_TAGVDW2Sn_valid))
  1268. #endif
  1269. //! @brief Format value for bitfield FMC_TAGVDW2Sn_valid.
  1270. #define BF_FMC_TAGVDW2Sn_valid(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_TAGVDW2Sn_valid), uint32_t) & BM_FMC_TAGVDW2Sn_valid)
  1271. #ifndef __LANGUAGE_ASM__
  1272. //! @brief Set the valid field to a new value.
  1273. #define BW_FMC_TAGVDW2Sn_valid(n, v) (BITBAND_ACCESS32(HW_FMC_TAGVDW2Sn_ADDR(n), BP_FMC_TAGVDW2Sn_valid) = (v))
  1274. #endif
  1275. //@}
  1276. /*!
  1277. * @name Register FMC_TAGVDW2Sn, field tag[18:5] (RW)
  1278. */
  1279. //@{
  1280. #define BP_FMC_TAGVDW2Sn_tag (5U) //!< Bit position for FMC_TAGVDW2Sn_tag.
  1281. #define BM_FMC_TAGVDW2Sn_tag (0x0007FFE0U) //!< Bit mask for FMC_TAGVDW2Sn_tag.
  1282. #define BS_FMC_TAGVDW2Sn_tag (14U) //!< Bit field size in bits for FMC_TAGVDW2Sn_tag.
  1283. #ifndef __LANGUAGE_ASM__
  1284. //! @brief Read current value of the FMC_TAGVDW2Sn_tag field.
  1285. #define BR_FMC_TAGVDW2Sn_tag(n) (HW_FMC_TAGVDW2Sn(n).B.tag)
  1286. #endif
  1287. //! @brief Format value for bitfield FMC_TAGVDW2Sn_tag.
  1288. #define BF_FMC_TAGVDW2Sn_tag(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_TAGVDW2Sn_tag), uint32_t) & BM_FMC_TAGVDW2Sn_tag)
  1289. #ifndef __LANGUAGE_ASM__
  1290. //! @brief Set the tag field to a new value.
  1291. #define BW_FMC_TAGVDW2Sn_tag(n, v) (HW_FMC_TAGVDW2Sn_WR(n, (HW_FMC_TAGVDW2Sn_RD(n) & ~BM_FMC_TAGVDW2Sn_tag) | BF_FMC_TAGVDW2Sn_tag(v)))
  1292. #endif
  1293. //@}
  1294. //-------------------------------------------------------------------------------------------
  1295. // HW_FMC_TAGVDW3Sn - Cache Tag Storage
  1296. //-------------------------------------------------------------------------------------------
  1297. #ifndef __LANGUAGE_ASM__
  1298. /*!
  1299. * @brief HW_FMC_TAGVDW3Sn - Cache Tag Storage (RW)
  1300. *
  1301. * Reset value: 0x00000000U
  1302. *
  1303. * The cache is a 4-way, set-associative cache with 4 sets. The ways are
  1304. * numbered 0-3 and the sets are numbered 0-3. In TAGVDWxSy, x denotes the way, and y
  1305. * denotes the set. This section represents tag/vld information for all sets in the
  1306. * indicated way.
  1307. */
  1308. typedef union _hw_fmc_tagvdw3sn
  1309. {
  1310. uint32_t U;
  1311. struct _hw_fmc_tagvdw3sn_bitfields
  1312. {
  1313. uint32_t valid : 1; //!< [0] 1-bit valid for cache entry
  1314. uint32_t RESERVED0 : 4; //!< [4:1]
  1315. uint32_t tag : 14; //!< [18:5] 14-bit tag for cache entry
  1316. uint32_t RESERVED1 : 13; //!< [31:19]
  1317. } B;
  1318. } hw_fmc_tagvdw3sn_t;
  1319. #endif
  1320. /*!
  1321. * @name Constants and macros for entire FMC_TAGVDW3Sn register
  1322. */
  1323. //@{
  1324. #define HW_FMC_TAGVDW3Sn_COUNT (4U)
  1325. #define HW_FMC_TAGVDW3Sn_ADDR(n) (REGS_FMC_BASE + 0x130U + (0x4U * n))
  1326. #ifndef __LANGUAGE_ASM__
  1327. #define HW_FMC_TAGVDW3Sn(n) (*(__IO hw_fmc_tagvdw3sn_t *) HW_FMC_TAGVDW3Sn_ADDR(n))
  1328. #define HW_FMC_TAGVDW3Sn_RD(n) (HW_FMC_TAGVDW3Sn(n).U)
  1329. #define HW_FMC_TAGVDW3Sn_WR(n, v) (HW_FMC_TAGVDW3Sn(n).U = (v))
  1330. #define HW_FMC_TAGVDW3Sn_SET(n, v) (HW_FMC_TAGVDW3Sn_WR(n, HW_FMC_TAGVDW3Sn_RD(n) | (v)))
  1331. #define HW_FMC_TAGVDW3Sn_CLR(n, v) (HW_FMC_TAGVDW3Sn_WR(n, HW_FMC_TAGVDW3Sn_RD(n) & ~(v)))
  1332. #define HW_FMC_TAGVDW3Sn_TOG(n, v) (HW_FMC_TAGVDW3Sn_WR(n, HW_FMC_TAGVDW3Sn_RD(n) ^ (v)))
  1333. #endif
  1334. //@}
  1335. /*
  1336. * Constants & macros for individual FMC_TAGVDW3Sn bitfields
  1337. */
  1338. /*!
  1339. * @name Register FMC_TAGVDW3Sn, field valid[0] (RW)
  1340. */
  1341. //@{
  1342. #define BP_FMC_TAGVDW3Sn_valid (0U) //!< Bit position for FMC_TAGVDW3Sn_valid.
  1343. #define BM_FMC_TAGVDW3Sn_valid (0x00000001U) //!< Bit mask for FMC_TAGVDW3Sn_valid.
  1344. #define BS_FMC_TAGVDW3Sn_valid (1U) //!< Bit field size in bits for FMC_TAGVDW3Sn_valid.
  1345. #ifndef __LANGUAGE_ASM__
  1346. //! @brief Read current value of the FMC_TAGVDW3Sn_valid field.
  1347. #define BR_FMC_TAGVDW3Sn_valid(n) (BITBAND_ACCESS32(HW_FMC_TAGVDW3Sn_ADDR(n), BP_FMC_TAGVDW3Sn_valid))
  1348. #endif
  1349. //! @brief Format value for bitfield FMC_TAGVDW3Sn_valid.
  1350. #define BF_FMC_TAGVDW3Sn_valid(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_TAGVDW3Sn_valid), uint32_t) & BM_FMC_TAGVDW3Sn_valid)
  1351. #ifndef __LANGUAGE_ASM__
  1352. //! @brief Set the valid field to a new value.
  1353. #define BW_FMC_TAGVDW3Sn_valid(n, v) (BITBAND_ACCESS32(HW_FMC_TAGVDW3Sn_ADDR(n), BP_FMC_TAGVDW3Sn_valid) = (v))
  1354. #endif
  1355. //@}
  1356. /*!
  1357. * @name Register FMC_TAGVDW3Sn, field tag[18:5] (RW)
  1358. */
  1359. //@{
  1360. #define BP_FMC_TAGVDW3Sn_tag (5U) //!< Bit position for FMC_TAGVDW3Sn_tag.
  1361. #define BM_FMC_TAGVDW3Sn_tag (0x0007FFE0U) //!< Bit mask for FMC_TAGVDW3Sn_tag.
  1362. #define BS_FMC_TAGVDW3Sn_tag (14U) //!< Bit field size in bits for FMC_TAGVDW3Sn_tag.
  1363. #ifndef __LANGUAGE_ASM__
  1364. //! @brief Read current value of the FMC_TAGVDW3Sn_tag field.
  1365. #define BR_FMC_TAGVDW3Sn_tag(n) (HW_FMC_TAGVDW3Sn(n).B.tag)
  1366. #endif
  1367. //! @brief Format value for bitfield FMC_TAGVDW3Sn_tag.
  1368. #define BF_FMC_TAGVDW3Sn_tag(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_TAGVDW3Sn_tag), uint32_t) & BM_FMC_TAGVDW3Sn_tag)
  1369. #ifndef __LANGUAGE_ASM__
  1370. //! @brief Set the tag field to a new value.
  1371. #define BW_FMC_TAGVDW3Sn_tag(n, v) (HW_FMC_TAGVDW3Sn_WR(n, (HW_FMC_TAGVDW3Sn_RD(n) & ~BM_FMC_TAGVDW3Sn_tag) | BF_FMC_TAGVDW3Sn_tag(v)))
  1372. #endif
  1373. //@}
  1374. //-------------------------------------------------------------------------------------------
  1375. // HW_FMC_DATAW0SnU - Cache Data Storage (upper word)
  1376. //-------------------------------------------------------------------------------------------
  1377. #ifndef __LANGUAGE_ASM__
  1378. /*!
  1379. * @brief HW_FMC_DATAW0SnU - Cache Data Storage (upper word) (RW)
  1380. *
  1381. * Reset value: 0x00000000U
  1382. *
  1383. * The cache of 64-bit entries is a 4-way, set-associative cache with 4 sets.
  1384. * The ways are numbered 0-3 and the sets are numbered 0-3. In DATAWxSyU and
  1385. * DATAWxSyL, x denotes the way, y denotes the set, and U and L represent upper and
  1386. * lower word, respectively. This section represents data for the upper word (bits
  1387. * [63:32]) of all sets in the indicated way.
  1388. */
  1389. typedef union _hw_fmc_dataw0snu
  1390. {
  1391. uint32_t U;
  1392. struct _hw_fmc_dataw0snu_bitfields
  1393. {
  1394. uint32_t data : 32; //!< [31:0] Bits [63:32] of data entry
  1395. } B;
  1396. } hw_fmc_dataw0snu_t;
  1397. #endif
  1398. /*!
  1399. * @name Constants and macros for entire FMC_DATAW0SnU register
  1400. */
  1401. //@{
  1402. #define HW_FMC_DATAW0SnU_COUNT (4U)
  1403. #define HW_FMC_DATAW0SnU_ADDR(n) (REGS_FMC_BASE + 0x200U + (0x8U * n))
  1404. #ifndef __LANGUAGE_ASM__
  1405. #define HW_FMC_DATAW0SnU(n) (*(__IO hw_fmc_dataw0snu_t *) HW_FMC_DATAW0SnU_ADDR(n))
  1406. #define HW_FMC_DATAW0SnU_RD(n) (HW_FMC_DATAW0SnU(n).U)
  1407. #define HW_FMC_DATAW0SnU_WR(n, v) (HW_FMC_DATAW0SnU(n).U = (v))
  1408. #define HW_FMC_DATAW0SnU_SET(n, v) (HW_FMC_DATAW0SnU_WR(n, HW_FMC_DATAW0SnU_RD(n) | (v)))
  1409. #define HW_FMC_DATAW0SnU_CLR(n, v) (HW_FMC_DATAW0SnU_WR(n, HW_FMC_DATAW0SnU_RD(n) & ~(v)))
  1410. #define HW_FMC_DATAW0SnU_TOG(n, v) (HW_FMC_DATAW0SnU_WR(n, HW_FMC_DATAW0SnU_RD(n) ^ (v)))
  1411. #endif
  1412. //@}
  1413. /*
  1414. * Constants & macros for individual FMC_DATAW0SnU bitfields
  1415. */
  1416. /*!
  1417. * @name Register FMC_DATAW0SnU, field data[31:0] (RW)
  1418. */
  1419. //@{
  1420. #define BP_FMC_DATAW0SnU_data (0U) //!< Bit position for FMC_DATAW0SnU_data.
  1421. #define BM_FMC_DATAW0SnU_data (0xFFFFFFFFU) //!< Bit mask for FMC_DATAW0SnU_data.
  1422. #define BS_FMC_DATAW0SnU_data (32U) //!< Bit field size in bits for FMC_DATAW0SnU_data.
  1423. #ifndef __LANGUAGE_ASM__
  1424. //! @brief Read current value of the FMC_DATAW0SnU_data field.
  1425. #define BR_FMC_DATAW0SnU_data(n) (HW_FMC_DATAW0SnU(n).U)
  1426. #endif
  1427. //! @brief Format value for bitfield FMC_DATAW0SnU_data.
  1428. #define BF_FMC_DATAW0SnU_data(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_DATAW0SnU_data), uint32_t) & BM_FMC_DATAW0SnU_data)
  1429. #ifndef __LANGUAGE_ASM__
  1430. //! @brief Set the data field to a new value.
  1431. #define BW_FMC_DATAW0SnU_data(n, v) (HW_FMC_DATAW0SnU_WR(n, v))
  1432. #endif
  1433. //@}
  1434. //-------------------------------------------------------------------------------------------
  1435. // HW_FMC_DATAW0SnL - Cache Data Storage (lower word)
  1436. //-------------------------------------------------------------------------------------------
  1437. #ifndef __LANGUAGE_ASM__
  1438. /*!
  1439. * @brief HW_FMC_DATAW0SnL - Cache Data Storage (lower word) (RW)
  1440. *
  1441. * Reset value: 0x00000000U
  1442. *
  1443. * The cache of 64-bit entries is a 4-way, set-associative cache with 4 sets.
  1444. * The ways are numbered 0-3 and the sets are numbered 0-3. In DATAWxSyU and
  1445. * DATAWxSyL, x denotes the way, y denotes the set, and U and L represent upper and
  1446. * lower word, respectively. This section represents data for the lower word (bits
  1447. * [31:0]) of all sets in the indicated way.
  1448. */
  1449. typedef union _hw_fmc_dataw0snl
  1450. {
  1451. uint32_t U;
  1452. struct _hw_fmc_dataw0snl_bitfields
  1453. {
  1454. uint32_t data : 32; //!< [31:0] Bits [31:0] of data entry
  1455. } B;
  1456. } hw_fmc_dataw0snl_t;
  1457. #endif
  1458. /*!
  1459. * @name Constants and macros for entire FMC_DATAW0SnL register
  1460. */
  1461. //@{
  1462. #define HW_FMC_DATAW0SnL_COUNT (4U)
  1463. #define HW_FMC_DATAW0SnL_ADDR(n) (REGS_FMC_BASE + 0x204U + (0x8U * n))
  1464. #ifndef __LANGUAGE_ASM__
  1465. #define HW_FMC_DATAW0SnL(n) (*(__IO hw_fmc_dataw0snl_t *) HW_FMC_DATAW0SnL_ADDR(n))
  1466. #define HW_FMC_DATAW0SnL_RD(n) (HW_FMC_DATAW0SnL(n).U)
  1467. #define HW_FMC_DATAW0SnL_WR(n, v) (HW_FMC_DATAW0SnL(n).U = (v))
  1468. #define HW_FMC_DATAW0SnL_SET(n, v) (HW_FMC_DATAW0SnL_WR(n, HW_FMC_DATAW0SnL_RD(n) | (v)))
  1469. #define HW_FMC_DATAW0SnL_CLR(n, v) (HW_FMC_DATAW0SnL_WR(n, HW_FMC_DATAW0SnL_RD(n) & ~(v)))
  1470. #define HW_FMC_DATAW0SnL_TOG(n, v) (HW_FMC_DATAW0SnL_WR(n, HW_FMC_DATAW0SnL_RD(n) ^ (v)))
  1471. #endif
  1472. //@}
  1473. /*
  1474. * Constants & macros for individual FMC_DATAW0SnL bitfields
  1475. */
  1476. /*!
  1477. * @name Register FMC_DATAW0SnL, field data[31:0] (RW)
  1478. */
  1479. //@{
  1480. #define BP_FMC_DATAW0SnL_data (0U) //!< Bit position for FMC_DATAW0SnL_data.
  1481. #define BM_FMC_DATAW0SnL_data (0xFFFFFFFFU) //!< Bit mask for FMC_DATAW0SnL_data.
  1482. #define BS_FMC_DATAW0SnL_data (32U) //!< Bit field size in bits for FMC_DATAW0SnL_data.
  1483. #ifndef __LANGUAGE_ASM__
  1484. //! @brief Read current value of the FMC_DATAW0SnL_data field.
  1485. #define BR_FMC_DATAW0SnL_data(n) (HW_FMC_DATAW0SnL(n).U)
  1486. #endif
  1487. //! @brief Format value for bitfield FMC_DATAW0SnL_data.
  1488. #define BF_FMC_DATAW0SnL_data(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_DATAW0SnL_data), uint32_t) & BM_FMC_DATAW0SnL_data)
  1489. #ifndef __LANGUAGE_ASM__
  1490. //! @brief Set the data field to a new value.
  1491. #define BW_FMC_DATAW0SnL_data(n, v) (HW_FMC_DATAW0SnL_WR(n, v))
  1492. #endif
  1493. //@}
  1494. //-------------------------------------------------------------------------------------------
  1495. // HW_FMC_DATAW1SnU - Cache Data Storage (upper word)
  1496. //-------------------------------------------------------------------------------------------
  1497. #ifndef __LANGUAGE_ASM__
  1498. /*!
  1499. * @brief HW_FMC_DATAW1SnU - Cache Data Storage (upper word) (RW)
  1500. *
  1501. * Reset value: 0x00000000U
  1502. *
  1503. * The cache of 64-bit entries is a 4-way, set-associative cache with 4 sets.
  1504. * The ways are numbered 0-3 and the sets are numbered 0-3. In DATAWxSyU and
  1505. * DATAWxSyL, x denotes the way, y denotes the set, and U and L represent upper and
  1506. * lower word, respectively. This section represents data for the upper word (bits
  1507. * [63:32]) of all sets in the indicated way.
  1508. */
  1509. typedef union _hw_fmc_dataw1snu
  1510. {
  1511. uint32_t U;
  1512. struct _hw_fmc_dataw1snu_bitfields
  1513. {
  1514. uint32_t data : 32; //!< [31:0] Bits [63:32] of data entry
  1515. } B;
  1516. } hw_fmc_dataw1snu_t;
  1517. #endif
  1518. /*!
  1519. * @name Constants and macros for entire FMC_DATAW1SnU register
  1520. */
  1521. //@{
  1522. #define HW_FMC_DATAW1SnU_COUNT (4U)
  1523. #define HW_FMC_DATAW1SnU_ADDR(n) (REGS_FMC_BASE + 0x220U + (0x8U * n))
  1524. #ifndef __LANGUAGE_ASM__
  1525. #define HW_FMC_DATAW1SnU(n) (*(__IO hw_fmc_dataw1snu_t *) HW_FMC_DATAW1SnU_ADDR(n))
  1526. #define HW_FMC_DATAW1SnU_RD(n) (HW_FMC_DATAW1SnU(n).U)
  1527. #define HW_FMC_DATAW1SnU_WR(n, v) (HW_FMC_DATAW1SnU(n).U = (v))
  1528. #define HW_FMC_DATAW1SnU_SET(n, v) (HW_FMC_DATAW1SnU_WR(n, HW_FMC_DATAW1SnU_RD(n) | (v)))
  1529. #define HW_FMC_DATAW1SnU_CLR(n, v) (HW_FMC_DATAW1SnU_WR(n, HW_FMC_DATAW1SnU_RD(n) & ~(v)))
  1530. #define HW_FMC_DATAW1SnU_TOG(n, v) (HW_FMC_DATAW1SnU_WR(n, HW_FMC_DATAW1SnU_RD(n) ^ (v)))
  1531. #endif
  1532. //@}
  1533. /*
  1534. * Constants & macros for individual FMC_DATAW1SnU bitfields
  1535. */
  1536. /*!
  1537. * @name Register FMC_DATAW1SnU, field data[31:0] (RW)
  1538. */
  1539. //@{
  1540. #define BP_FMC_DATAW1SnU_data (0U) //!< Bit position for FMC_DATAW1SnU_data.
  1541. #define BM_FMC_DATAW1SnU_data (0xFFFFFFFFU) //!< Bit mask for FMC_DATAW1SnU_data.
  1542. #define BS_FMC_DATAW1SnU_data (32U) //!< Bit field size in bits for FMC_DATAW1SnU_data.
  1543. #ifndef __LANGUAGE_ASM__
  1544. //! @brief Read current value of the FMC_DATAW1SnU_data field.
  1545. #define BR_FMC_DATAW1SnU_data(n) (HW_FMC_DATAW1SnU(n).U)
  1546. #endif
  1547. //! @brief Format value for bitfield FMC_DATAW1SnU_data.
  1548. #define BF_FMC_DATAW1SnU_data(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_DATAW1SnU_data), uint32_t) & BM_FMC_DATAW1SnU_data)
  1549. #ifndef __LANGUAGE_ASM__
  1550. //! @brief Set the data field to a new value.
  1551. #define BW_FMC_DATAW1SnU_data(n, v) (HW_FMC_DATAW1SnU_WR(n, v))
  1552. #endif
  1553. //@}
  1554. //-------------------------------------------------------------------------------------------
  1555. // HW_FMC_DATAW1SnL - Cache Data Storage (lower word)
  1556. //-------------------------------------------------------------------------------------------
  1557. #ifndef __LANGUAGE_ASM__
  1558. /*!
  1559. * @brief HW_FMC_DATAW1SnL - Cache Data Storage (lower word) (RW)
  1560. *
  1561. * Reset value: 0x00000000U
  1562. *
  1563. * The cache of 64-bit entries is a 4-way, set-associative cache with 4 sets.
  1564. * The ways are numbered 0-3 and the sets are numbered 0-3. In DATAWxSyU and
  1565. * DATAWxSyL, x denotes the way, y denotes the set, and U and L represent upper and
  1566. * lower word, respectively. This section represents data for the lower word (bits
  1567. * [31:0]) of all sets in the indicated way.
  1568. */
  1569. typedef union _hw_fmc_dataw1snl
  1570. {
  1571. uint32_t U;
  1572. struct _hw_fmc_dataw1snl_bitfields
  1573. {
  1574. uint32_t data : 32; //!< [31:0] Bits [31:0] of data entry
  1575. } B;
  1576. } hw_fmc_dataw1snl_t;
  1577. #endif
  1578. /*!
  1579. * @name Constants and macros for entire FMC_DATAW1SnL register
  1580. */
  1581. //@{
  1582. #define HW_FMC_DATAW1SnL_COUNT (4U)
  1583. #define HW_FMC_DATAW1SnL_ADDR(n) (REGS_FMC_BASE + 0x224U + (0x8U * n))
  1584. #ifndef __LANGUAGE_ASM__
  1585. #define HW_FMC_DATAW1SnL(n) (*(__IO hw_fmc_dataw1snl_t *) HW_FMC_DATAW1SnL_ADDR(n))
  1586. #define HW_FMC_DATAW1SnL_RD(n) (HW_FMC_DATAW1SnL(n).U)
  1587. #define HW_FMC_DATAW1SnL_WR(n, v) (HW_FMC_DATAW1SnL(n).U = (v))
  1588. #define HW_FMC_DATAW1SnL_SET(n, v) (HW_FMC_DATAW1SnL_WR(n, HW_FMC_DATAW1SnL_RD(n) | (v)))
  1589. #define HW_FMC_DATAW1SnL_CLR(n, v) (HW_FMC_DATAW1SnL_WR(n, HW_FMC_DATAW1SnL_RD(n) & ~(v)))
  1590. #define HW_FMC_DATAW1SnL_TOG(n, v) (HW_FMC_DATAW1SnL_WR(n, HW_FMC_DATAW1SnL_RD(n) ^ (v)))
  1591. #endif
  1592. //@}
  1593. /*
  1594. * Constants & macros for individual FMC_DATAW1SnL bitfields
  1595. */
  1596. /*!
  1597. * @name Register FMC_DATAW1SnL, field data[31:0] (RW)
  1598. */
  1599. //@{
  1600. #define BP_FMC_DATAW1SnL_data (0U) //!< Bit position for FMC_DATAW1SnL_data.
  1601. #define BM_FMC_DATAW1SnL_data (0xFFFFFFFFU) //!< Bit mask for FMC_DATAW1SnL_data.
  1602. #define BS_FMC_DATAW1SnL_data (32U) //!< Bit field size in bits for FMC_DATAW1SnL_data.
  1603. #ifndef __LANGUAGE_ASM__
  1604. //! @brief Read current value of the FMC_DATAW1SnL_data field.
  1605. #define BR_FMC_DATAW1SnL_data(n) (HW_FMC_DATAW1SnL(n).U)
  1606. #endif
  1607. //! @brief Format value for bitfield FMC_DATAW1SnL_data.
  1608. #define BF_FMC_DATAW1SnL_data(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_DATAW1SnL_data), uint32_t) & BM_FMC_DATAW1SnL_data)
  1609. #ifndef __LANGUAGE_ASM__
  1610. //! @brief Set the data field to a new value.
  1611. #define BW_FMC_DATAW1SnL_data(n, v) (HW_FMC_DATAW1SnL_WR(n, v))
  1612. #endif
  1613. //@}
  1614. //-------------------------------------------------------------------------------------------
  1615. // HW_FMC_DATAW2SnU - Cache Data Storage (upper word)
  1616. //-------------------------------------------------------------------------------------------
  1617. #ifndef __LANGUAGE_ASM__
  1618. /*!
  1619. * @brief HW_FMC_DATAW2SnU - Cache Data Storage (upper word) (RW)
  1620. *
  1621. * Reset value: 0x00000000U
  1622. *
  1623. * The cache of 64-bit entries is a 4-way, set-associative cache with 4 sets.
  1624. * The ways are numbered 0-3 and the sets are numbered 0-3. In DATAWxSyU and
  1625. * DATAWxSyL, x denotes the way, y denotes the set, and U and L represent upper and
  1626. * lower word, respectively. This section represents data for the upper word (bits
  1627. * [63:32]) of all sets in the indicated way.
  1628. */
  1629. typedef union _hw_fmc_dataw2snu
  1630. {
  1631. uint32_t U;
  1632. struct _hw_fmc_dataw2snu_bitfields
  1633. {
  1634. uint32_t data : 32; //!< [31:0] Bits [63:32] of data entry
  1635. } B;
  1636. } hw_fmc_dataw2snu_t;
  1637. #endif
  1638. /*!
  1639. * @name Constants and macros for entire FMC_DATAW2SnU register
  1640. */
  1641. //@{
  1642. #define HW_FMC_DATAW2SnU_COUNT (4U)
  1643. #define HW_FMC_DATAW2SnU_ADDR(n) (REGS_FMC_BASE + 0x240U + (0x8U * n))
  1644. #ifndef __LANGUAGE_ASM__
  1645. #define HW_FMC_DATAW2SnU(n) (*(__IO hw_fmc_dataw2snu_t *) HW_FMC_DATAW2SnU_ADDR(n))
  1646. #define HW_FMC_DATAW2SnU_RD(n) (HW_FMC_DATAW2SnU(n).U)
  1647. #define HW_FMC_DATAW2SnU_WR(n, v) (HW_FMC_DATAW2SnU(n).U = (v))
  1648. #define HW_FMC_DATAW2SnU_SET(n, v) (HW_FMC_DATAW2SnU_WR(n, HW_FMC_DATAW2SnU_RD(n) | (v)))
  1649. #define HW_FMC_DATAW2SnU_CLR(n, v) (HW_FMC_DATAW2SnU_WR(n, HW_FMC_DATAW2SnU_RD(n) & ~(v)))
  1650. #define HW_FMC_DATAW2SnU_TOG(n, v) (HW_FMC_DATAW2SnU_WR(n, HW_FMC_DATAW2SnU_RD(n) ^ (v)))
  1651. #endif
  1652. //@}
  1653. /*
  1654. * Constants & macros for individual FMC_DATAW2SnU bitfields
  1655. */
  1656. /*!
  1657. * @name Register FMC_DATAW2SnU, field data[31:0] (RW)
  1658. */
  1659. //@{
  1660. #define BP_FMC_DATAW2SnU_data (0U) //!< Bit position for FMC_DATAW2SnU_data.
  1661. #define BM_FMC_DATAW2SnU_data (0xFFFFFFFFU) //!< Bit mask for FMC_DATAW2SnU_data.
  1662. #define BS_FMC_DATAW2SnU_data (32U) //!< Bit field size in bits for FMC_DATAW2SnU_data.
  1663. #ifndef __LANGUAGE_ASM__
  1664. //! @brief Read current value of the FMC_DATAW2SnU_data field.
  1665. #define BR_FMC_DATAW2SnU_data(n) (HW_FMC_DATAW2SnU(n).U)
  1666. #endif
  1667. //! @brief Format value for bitfield FMC_DATAW2SnU_data.
  1668. #define BF_FMC_DATAW2SnU_data(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_DATAW2SnU_data), uint32_t) & BM_FMC_DATAW2SnU_data)
  1669. #ifndef __LANGUAGE_ASM__
  1670. //! @brief Set the data field to a new value.
  1671. #define BW_FMC_DATAW2SnU_data(n, v) (HW_FMC_DATAW2SnU_WR(n, v))
  1672. #endif
  1673. //@}
  1674. //-------------------------------------------------------------------------------------------
  1675. // HW_FMC_DATAW2SnL - Cache Data Storage (lower word)
  1676. //-------------------------------------------------------------------------------------------
  1677. #ifndef __LANGUAGE_ASM__
  1678. /*!
  1679. * @brief HW_FMC_DATAW2SnL - Cache Data Storage (lower word) (RW)
  1680. *
  1681. * Reset value: 0x00000000U
  1682. *
  1683. * The cache of 64-bit entries is a 4-way, set-associative cache with 4 sets.
  1684. * The ways are numbered 0-3 and the sets are numbered 0-3. In DATAWxSyU and
  1685. * DATAWxSyL, x denotes the way, y denotes the set, and U and L represent upper and
  1686. * lower word, respectively. This section represents data for the lower word (bits
  1687. * [31:0]) of all sets in the indicated way.
  1688. */
  1689. typedef union _hw_fmc_dataw2snl
  1690. {
  1691. uint32_t U;
  1692. struct _hw_fmc_dataw2snl_bitfields
  1693. {
  1694. uint32_t data : 32; //!< [31:0] Bits [31:0] of data entry
  1695. } B;
  1696. } hw_fmc_dataw2snl_t;
  1697. #endif
  1698. /*!
  1699. * @name Constants and macros for entire FMC_DATAW2SnL register
  1700. */
  1701. //@{
  1702. #define HW_FMC_DATAW2SnL_COUNT (4U)
  1703. #define HW_FMC_DATAW2SnL_ADDR(n) (REGS_FMC_BASE + 0x244U + (0x8U * n))
  1704. #ifndef __LANGUAGE_ASM__
  1705. #define HW_FMC_DATAW2SnL(n) (*(__IO hw_fmc_dataw2snl_t *) HW_FMC_DATAW2SnL_ADDR(n))
  1706. #define HW_FMC_DATAW2SnL_RD(n) (HW_FMC_DATAW2SnL(n).U)
  1707. #define HW_FMC_DATAW2SnL_WR(n, v) (HW_FMC_DATAW2SnL(n).U = (v))
  1708. #define HW_FMC_DATAW2SnL_SET(n, v) (HW_FMC_DATAW2SnL_WR(n, HW_FMC_DATAW2SnL_RD(n) | (v)))
  1709. #define HW_FMC_DATAW2SnL_CLR(n, v) (HW_FMC_DATAW2SnL_WR(n, HW_FMC_DATAW2SnL_RD(n) & ~(v)))
  1710. #define HW_FMC_DATAW2SnL_TOG(n, v) (HW_FMC_DATAW2SnL_WR(n, HW_FMC_DATAW2SnL_RD(n) ^ (v)))
  1711. #endif
  1712. //@}
  1713. /*
  1714. * Constants & macros for individual FMC_DATAW2SnL bitfields
  1715. */
  1716. /*!
  1717. * @name Register FMC_DATAW2SnL, field data[31:0] (RW)
  1718. */
  1719. //@{
  1720. #define BP_FMC_DATAW2SnL_data (0U) //!< Bit position for FMC_DATAW2SnL_data.
  1721. #define BM_FMC_DATAW2SnL_data (0xFFFFFFFFU) //!< Bit mask for FMC_DATAW2SnL_data.
  1722. #define BS_FMC_DATAW2SnL_data (32U) //!< Bit field size in bits for FMC_DATAW2SnL_data.
  1723. #ifndef __LANGUAGE_ASM__
  1724. //! @brief Read current value of the FMC_DATAW2SnL_data field.
  1725. #define BR_FMC_DATAW2SnL_data(n) (HW_FMC_DATAW2SnL(n).U)
  1726. #endif
  1727. //! @brief Format value for bitfield FMC_DATAW2SnL_data.
  1728. #define BF_FMC_DATAW2SnL_data(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_DATAW2SnL_data), uint32_t) & BM_FMC_DATAW2SnL_data)
  1729. #ifndef __LANGUAGE_ASM__
  1730. //! @brief Set the data field to a new value.
  1731. #define BW_FMC_DATAW2SnL_data(n, v) (HW_FMC_DATAW2SnL_WR(n, v))
  1732. #endif
  1733. //@}
  1734. //-------------------------------------------------------------------------------------------
  1735. // HW_FMC_DATAW3SnU - Cache Data Storage (upper word)
  1736. //-------------------------------------------------------------------------------------------
  1737. #ifndef __LANGUAGE_ASM__
  1738. /*!
  1739. * @brief HW_FMC_DATAW3SnU - Cache Data Storage (upper word) (RW)
  1740. *
  1741. * Reset value: 0x00000000U
  1742. *
  1743. * The cache of 64-bit entries is a 4-way, set-associative cache with 4 sets.
  1744. * The ways are numbered 0-3 and the sets are numbered 0-3. In DATAWxSyU and
  1745. * DATAWxSyL, x denotes the way, y denotes the set, and U and L represent upper and
  1746. * lower word, respectively. This section represents data for the upper word (bits
  1747. * [63:32]) of all sets in the indicated way.
  1748. */
  1749. typedef union _hw_fmc_dataw3snu
  1750. {
  1751. uint32_t U;
  1752. struct _hw_fmc_dataw3snu_bitfields
  1753. {
  1754. uint32_t data : 32; //!< [31:0] Bits [63:32] of data entry
  1755. } B;
  1756. } hw_fmc_dataw3snu_t;
  1757. #endif
  1758. /*!
  1759. * @name Constants and macros for entire FMC_DATAW3SnU register
  1760. */
  1761. //@{
  1762. #define HW_FMC_DATAW3SnU_COUNT (4U)
  1763. #define HW_FMC_DATAW3SnU_ADDR(n) (REGS_FMC_BASE + 0x260U + (0x8U * n))
  1764. #ifndef __LANGUAGE_ASM__
  1765. #define HW_FMC_DATAW3SnU(n) (*(__IO hw_fmc_dataw3snu_t *) HW_FMC_DATAW3SnU_ADDR(n))
  1766. #define HW_FMC_DATAW3SnU_RD(n) (HW_FMC_DATAW3SnU(n).U)
  1767. #define HW_FMC_DATAW3SnU_WR(n, v) (HW_FMC_DATAW3SnU(n).U = (v))
  1768. #define HW_FMC_DATAW3SnU_SET(n, v) (HW_FMC_DATAW3SnU_WR(n, HW_FMC_DATAW3SnU_RD(n) | (v)))
  1769. #define HW_FMC_DATAW3SnU_CLR(n, v) (HW_FMC_DATAW3SnU_WR(n, HW_FMC_DATAW3SnU_RD(n) & ~(v)))
  1770. #define HW_FMC_DATAW3SnU_TOG(n, v) (HW_FMC_DATAW3SnU_WR(n, HW_FMC_DATAW3SnU_RD(n) ^ (v)))
  1771. #endif
  1772. //@}
  1773. /*
  1774. * Constants & macros for individual FMC_DATAW3SnU bitfields
  1775. */
  1776. /*!
  1777. * @name Register FMC_DATAW3SnU, field data[31:0] (RW)
  1778. */
  1779. //@{
  1780. #define BP_FMC_DATAW3SnU_data (0U) //!< Bit position for FMC_DATAW3SnU_data.
  1781. #define BM_FMC_DATAW3SnU_data (0xFFFFFFFFU) //!< Bit mask for FMC_DATAW3SnU_data.
  1782. #define BS_FMC_DATAW3SnU_data (32U) //!< Bit field size in bits for FMC_DATAW3SnU_data.
  1783. #ifndef __LANGUAGE_ASM__
  1784. //! @brief Read current value of the FMC_DATAW3SnU_data field.
  1785. #define BR_FMC_DATAW3SnU_data(n) (HW_FMC_DATAW3SnU(n).U)
  1786. #endif
  1787. //! @brief Format value for bitfield FMC_DATAW3SnU_data.
  1788. #define BF_FMC_DATAW3SnU_data(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_DATAW3SnU_data), uint32_t) & BM_FMC_DATAW3SnU_data)
  1789. #ifndef __LANGUAGE_ASM__
  1790. //! @brief Set the data field to a new value.
  1791. #define BW_FMC_DATAW3SnU_data(n, v) (HW_FMC_DATAW3SnU_WR(n, v))
  1792. #endif
  1793. //@}
  1794. //-------------------------------------------------------------------------------------------
  1795. // HW_FMC_DATAW3SnL - Cache Data Storage (lower word)
  1796. //-------------------------------------------------------------------------------------------
  1797. #ifndef __LANGUAGE_ASM__
  1798. /*!
  1799. * @brief HW_FMC_DATAW3SnL - Cache Data Storage (lower word) (RW)
  1800. *
  1801. * Reset value: 0x00000000U
  1802. *
  1803. * The cache of 64-bit entries is a 4-way, set-associative cache with 4 sets.
  1804. * The ways are numbered 0-3 and the sets are numbered 0-3. In DATAWxSyU and
  1805. * DATAWxSyL, x denotes the way, y denotes the set, and U and L represent upper and
  1806. * lower word, respectively. This section represents data for the lower word (bits
  1807. * [31:0]) of all sets in the indicated way.
  1808. */
  1809. typedef union _hw_fmc_dataw3snl
  1810. {
  1811. uint32_t U;
  1812. struct _hw_fmc_dataw3snl_bitfields
  1813. {
  1814. uint32_t data : 32; //!< [31:0] Bits [31:0] of data entry
  1815. } B;
  1816. } hw_fmc_dataw3snl_t;
  1817. #endif
  1818. /*!
  1819. * @name Constants and macros for entire FMC_DATAW3SnL register
  1820. */
  1821. //@{
  1822. #define HW_FMC_DATAW3SnL_COUNT (4U)
  1823. #define HW_FMC_DATAW3SnL_ADDR(n) (REGS_FMC_BASE + 0x264U + (0x8U * n))
  1824. #ifndef __LANGUAGE_ASM__
  1825. #define HW_FMC_DATAW3SnL(n) (*(__IO hw_fmc_dataw3snl_t *) HW_FMC_DATAW3SnL_ADDR(n))
  1826. #define HW_FMC_DATAW3SnL_RD(n) (HW_FMC_DATAW3SnL(n).U)
  1827. #define HW_FMC_DATAW3SnL_WR(n, v) (HW_FMC_DATAW3SnL(n).U = (v))
  1828. #define HW_FMC_DATAW3SnL_SET(n, v) (HW_FMC_DATAW3SnL_WR(n, HW_FMC_DATAW3SnL_RD(n) | (v)))
  1829. #define HW_FMC_DATAW3SnL_CLR(n, v) (HW_FMC_DATAW3SnL_WR(n, HW_FMC_DATAW3SnL_RD(n) & ~(v)))
  1830. #define HW_FMC_DATAW3SnL_TOG(n, v) (HW_FMC_DATAW3SnL_WR(n, HW_FMC_DATAW3SnL_RD(n) ^ (v)))
  1831. #endif
  1832. //@}
  1833. /*
  1834. * Constants & macros for individual FMC_DATAW3SnL bitfields
  1835. */
  1836. /*!
  1837. * @name Register FMC_DATAW3SnL, field data[31:0] (RW)
  1838. */
  1839. //@{
  1840. #define BP_FMC_DATAW3SnL_data (0U) //!< Bit position for FMC_DATAW3SnL_data.
  1841. #define BM_FMC_DATAW3SnL_data (0xFFFFFFFFU) //!< Bit mask for FMC_DATAW3SnL_data.
  1842. #define BS_FMC_DATAW3SnL_data (32U) //!< Bit field size in bits for FMC_DATAW3SnL_data.
  1843. #ifndef __LANGUAGE_ASM__
  1844. //! @brief Read current value of the FMC_DATAW3SnL_data field.
  1845. #define BR_FMC_DATAW3SnL_data(n) (HW_FMC_DATAW3SnL(n).U)
  1846. #endif
  1847. //! @brief Format value for bitfield FMC_DATAW3SnL_data.
  1848. #define BF_FMC_DATAW3SnL_data(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_FMC_DATAW3SnL_data), uint32_t) & BM_FMC_DATAW3SnL_data)
  1849. #ifndef __LANGUAGE_ASM__
  1850. //! @brief Set the data field to a new value.
  1851. #define BW_FMC_DATAW3SnL_data(n, v) (HW_FMC_DATAW3SnL_WR(n, v))
  1852. #endif
  1853. //@}
  1854. //-------------------------------------------------------------------------------------------
  1855. // hw_fmc_t - module struct
  1856. //-------------------------------------------------------------------------------------------
  1857. /*!
  1858. * @brief All FMC module registers.
  1859. */
  1860. #ifndef __LANGUAGE_ASM__
  1861. #pragma pack(1)
  1862. typedef struct _hw_fmc
  1863. {
  1864. __IO hw_fmc_pfapr_t PFAPR; //!< [0x0] Flash Access Protection Register
  1865. __IO hw_fmc_pfb0cr_t PFB0CR; //!< [0x4] Flash Bank 0 Control Register
  1866. __IO hw_fmc_pfb1cr_t PFB1CR; //!< [0x8] Flash Bank 1 Control Register
  1867. uint8_t _reserved0[244];
  1868. __IO hw_fmc_tagvdw0sn_t TAGVDW0Sn[4]; //!< [0x100] Cache Tag Storage
  1869. __IO hw_fmc_tagvdw1sn_t TAGVDW1Sn[4]; //!< [0x110] Cache Tag Storage
  1870. __IO hw_fmc_tagvdw2sn_t TAGVDW2Sn[4]; //!< [0x120] Cache Tag Storage
  1871. __IO hw_fmc_tagvdw3sn_t TAGVDW3Sn[4]; //!< [0x130] Cache Tag Storage
  1872. uint8_t _reserved1[192];
  1873. struct {
  1874. __IO hw_fmc_dataw0snu_t DATAW0SnU; //!< [0x200] Cache Data Storage (upper word)
  1875. __IO hw_fmc_dataw0snl_t DATAW0SnL; //!< [0x204] Cache Data Storage (lower word)
  1876. } DATAW0Sn[4];
  1877. struct {
  1878. __IO hw_fmc_dataw1snu_t DATAW1SnU; //!< [0x220] Cache Data Storage (upper word)
  1879. __IO hw_fmc_dataw1snl_t DATAW1SnL; //!< [0x224] Cache Data Storage (lower word)
  1880. } DATAW1Sn[4];
  1881. struct {
  1882. __IO hw_fmc_dataw2snu_t DATAW2SnU; //!< [0x240] Cache Data Storage (upper word)
  1883. __IO hw_fmc_dataw2snl_t DATAW2SnL; //!< [0x244] Cache Data Storage (lower word)
  1884. } DATAW2Sn[4];
  1885. struct {
  1886. __IO hw_fmc_dataw3snu_t DATAW3SnU; //!< [0x260] Cache Data Storage (upper word)
  1887. __IO hw_fmc_dataw3snl_t DATAW3SnL; //!< [0x264] Cache Data Storage (lower word)
  1888. } DATAW3Sn[4];
  1889. } hw_fmc_t;
  1890. #pragma pack()
  1891. //! @brief Macro to access all FMC registers.
  1892. //! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
  1893. //! use the '&' operator, like <code>&HW_FMC</code>.
  1894. #define HW_FMC (*(hw_fmc_t *) REGS_FMC_BASE)
  1895. #endif
  1896. #endif // __HW_FMC_REGISTERS_H__
  1897. // v22/130726/0.9
  1898. // EOF