regssdmaarm.h 109 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546
  1. /*
  2. * Copyright (c) 2012, 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_SDMAARM_REGISTERS_H__
  22. #define __HW_SDMAARM_REGISTERS_H__
  23. #include "regs.h"
  24. /*
  25. * i.MX6UL SDMAARM
  26. *
  27. * SDMA
  28. *
  29. * Registers defined in this header file:
  30. * - HW_SDMAARM_MC0PTR - ARM platform Channel 0 Pointer
  31. * - HW_SDMAARM_INTR - Channel Interrupts
  32. * - HW_SDMAARM_STOP_STAT - Channel Stop/Channel Status
  33. * - HW_SDMAARM_HSTART - Channel Start
  34. * - HW_SDMAARM_EVTOVR - Channel Event Override
  35. * - HW_SDMAARM_DSPOVR - Channel BP Override
  36. * - HW_SDMAARM_HOSTOVR - Channel ARM platform Override
  37. * - HW_SDMAARM_EVTPEND - Channel Event Pending
  38. * - HW_SDMAARM_RESET - Reset Register
  39. * - HW_SDMAARM_EVTERR - DMA Request Error Register
  40. * - HW_SDMAARM_INTRMASK - Channel ARM platform Interrupt Mask
  41. * - HW_SDMAARM_PSW - Schedule Status
  42. * - HW_SDMAARM_EVTERRDBG - DMA Request Error Register
  43. * - HW_SDMAARM_CONFIG - Configuration Register
  44. * - HW_SDMAARM_SDMA_LOCK - SDMA LOCK
  45. * - HW_SDMAARM_ONCE_ENB - OnCE Enable
  46. * - HW_SDMAARM_ONCE_DATA - OnCE Data Register
  47. * - HW_SDMAARM_ONCE_INSTR - OnCE Instruction Register
  48. * - HW_SDMAARM_ONCE_STAT - OnCE Status Register
  49. * - HW_SDMAARM_ONCE_CMD - OnCE Command Register
  50. * - HW_SDMAARM_ILLINSTADDR - Illegal Instruction Trap Address
  51. * - HW_SDMAARM_CHN0ADDR - Channel 0 Boot Address
  52. * - HW_SDMAARM_EVT_MIRROR - DMA Requests
  53. * - HW_SDMAARM_EVT_MIRROR2 - DMA Requests 2
  54. * - HW_SDMAARM_XTRIG_CONF1 - Cross-Trigger Events Configuration Register 1
  55. * - HW_SDMAARM_XTRIG_CONF2 - Cross-Trigger Events Configuration Register 2
  56. * - HW_SDMAARM_SDMA_CHNPRIn - Channel Priority Registers
  57. * - HW_SDMAARM_CHNENBLn - Channel Enable RAM
  58. *
  59. * - hw_sdmaarm_t - Struct containing all module registers.
  60. */
  61. //! @name Module base addresses
  62. //@{
  63. #ifndef REGS_SDMAARM_BASE
  64. #define HW_SDMAARM_INSTANCE_COUNT (1) //!< Number of instances of the SDMAARM module.
  65. #define REGS_SDMAARM_BASE (0x020ec000) //!< Base address for SDMAARM.
  66. #endif
  67. //@}
  68. //-------------------------------------------------------------------------------------------
  69. // HW_SDMAARM_MC0PTR - ARM platform Channel 0 Pointer
  70. //-------------------------------------------------------------------------------------------
  71. #ifndef __LANGUAGE_ASM__
  72. /*!
  73. * @brief HW_SDMAARM_MC0PTR - ARM platform Channel 0 Pointer (RW)
  74. *
  75. * Reset value: 0x00000000
  76. */
  77. typedef union _hw_sdmaarm_mc0ptr
  78. {
  79. reg32_t U;
  80. struct _hw_sdmaarm_mc0ptr_bitfields
  81. {
  82. unsigned MC0PTR : 32; //!< [31:0] Channel 0 Pointer contains the 32-bit address, in ARM platform memory, of channel 0 control block (the boot channel).
  83. } B;
  84. } hw_sdmaarm_mc0ptr_t;
  85. #endif
  86. /*!
  87. * @name Constants and macros for entire SDMAARM_MC0PTR register
  88. */
  89. //@{
  90. #define HW_SDMAARM_MC0PTR_ADDR (REGS_SDMAARM_BASE + 0x0)
  91. #ifndef __LANGUAGE_ASM__
  92. #define HW_SDMAARM_MC0PTR (*(volatile hw_sdmaarm_mc0ptr_t *) HW_SDMAARM_MC0PTR_ADDR)
  93. #define HW_SDMAARM_MC0PTR_RD() (HW_SDMAARM_MC0PTR.U)
  94. #define HW_SDMAARM_MC0PTR_WR(v) (HW_SDMAARM_MC0PTR.U = (v))
  95. #define HW_SDMAARM_MC0PTR_SET(v) (HW_SDMAARM_MC0PTR_WR(HW_SDMAARM_MC0PTR_RD() | (v)))
  96. #define HW_SDMAARM_MC0PTR_CLR(v) (HW_SDMAARM_MC0PTR_WR(HW_SDMAARM_MC0PTR_RD() & ~(v)))
  97. #define HW_SDMAARM_MC0PTR_TOG(v) (HW_SDMAARM_MC0PTR_WR(HW_SDMAARM_MC0PTR_RD() ^ (v)))
  98. #endif
  99. //@}
  100. /*
  101. * constants & macros for individual SDMAARM_MC0PTR bitfields
  102. */
  103. /*! @name Register SDMAARM_MC0PTR, field MC0PTR[31:0] (RW)
  104. *
  105. * Channel 0 Pointer contains the 32-bit address, in ARM platform memory, of channel 0 control block
  106. * (the boot channel). Appendix A fully describes the SDMA Application Programming Interface (API).
  107. * The ARM platform has a read/write access and the SDMA has a read-only access.
  108. */
  109. //@{
  110. #define BP_SDMAARM_MC0PTR_MC0PTR (0) //!< Bit position for SDMAARM_MC0PTR_MC0PTR.
  111. #define BM_SDMAARM_MC0PTR_MC0PTR (0xffffffff) //!< Bit mask for SDMAARM_MC0PTR_MC0PTR.
  112. //! @brief Get value of SDMAARM_MC0PTR_MC0PTR from a register value.
  113. #define BG_SDMAARM_MC0PTR_MC0PTR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_MC0PTR_MC0PTR) >> BP_SDMAARM_MC0PTR_MC0PTR)
  114. //! @brief Format value for bitfield SDMAARM_MC0PTR_MC0PTR.
  115. #define BF_SDMAARM_MC0PTR_MC0PTR(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_MC0PTR_MC0PTR) & BM_SDMAARM_MC0PTR_MC0PTR)
  116. #ifndef __LANGUAGE_ASM__
  117. //! @brief Set the MC0PTR field to a new value.
  118. #define BW_SDMAARM_MC0PTR_MC0PTR(v) (HW_SDMAARM_MC0PTR_WR((HW_SDMAARM_MC0PTR_RD() & ~BM_SDMAARM_MC0PTR_MC0PTR) | BF_SDMAARM_MC0PTR_MC0PTR(v)))
  119. #endif
  120. //@}
  121. //-------------------------------------------------------------------------------------------
  122. // HW_SDMAARM_INTR - Channel Interrupts
  123. //-------------------------------------------------------------------------------------------
  124. #ifndef __LANGUAGE_ASM__
  125. /*!
  126. * @brief HW_SDMAARM_INTR - Channel Interrupts (W1C)
  127. *
  128. * Reset value: 0x00000000
  129. */
  130. typedef union _hw_sdmaarm_intr
  131. {
  132. reg32_t U;
  133. struct _hw_sdmaarm_intr_bitfields
  134. {
  135. unsigned HI : 32; //!< [31:0] The ARM platform Interrupts register contains the 32 HI[i] bits.
  136. } B;
  137. } hw_sdmaarm_intr_t;
  138. #endif
  139. /*!
  140. * @name Constants and macros for entire SDMAARM_INTR register
  141. */
  142. //@{
  143. #define HW_SDMAARM_INTR_ADDR (REGS_SDMAARM_BASE + 0x4)
  144. #ifndef __LANGUAGE_ASM__
  145. #define HW_SDMAARM_INTR (*(volatile hw_sdmaarm_intr_t *) HW_SDMAARM_INTR_ADDR)
  146. #define HW_SDMAARM_INTR_RD() (HW_SDMAARM_INTR.U)
  147. #define HW_SDMAARM_INTR_WR(v) (HW_SDMAARM_INTR.U = (v))
  148. #define HW_SDMAARM_INTR_SET(v) (HW_SDMAARM_INTR_WR(HW_SDMAARM_INTR_RD() | (v)))
  149. #define HW_SDMAARM_INTR_CLR(v) (HW_SDMAARM_INTR_WR(HW_SDMAARM_INTR_RD() & ~(v)))
  150. #define HW_SDMAARM_INTR_TOG(v) (HW_SDMAARM_INTR_WR(HW_SDMAARM_INTR_RD() ^ (v)))
  151. #endif
  152. //@}
  153. /*
  154. * constants & macros for individual SDMAARM_INTR bitfields
  155. */
  156. /*! @name Register SDMAARM_INTR, field HI[31:0] (W1C)
  157. *
  158. * The ARM platform Interrupts register contains the 32 HI[i] bits. If any bit is set, it will cause
  159. * an interrupt to the ARM platform. This register is a "write-ones" register to the ARM platform.
  160. * When the ARM platform sets a bit in this register the corresponding HI[i] bit is cleared. The
  161. * interrupt service routine should clear individual channel bits when their interrupts are
  162. * serviced, failure to do so will cause continuous interrupts. The SDMA is responsible for setting
  163. * the HI[i] bit corresponding to the current channel when the corresponding done instruction is
  164. * executed.
  165. */
  166. //@{
  167. #define BP_SDMAARM_INTR_HI (0) //!< Bit position for SDMAARM_INTR_HI.
  168. #define BM_SDMAARM_INTR_HI (0xffffffff) //!< Bit mask for SDMAARM_INTR_HI.
  169. //! @brief Get value of SDMAARM_INTR_HI from a register value.
  170. #define BG_SDMAARM_INTR_HI(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_INTR_HI) >> BP_SDMAARM_INTR_HI)
  171. //! @brief Format value for bitfield SDMAARM_INTR_HI.
  172. #define BF_SDMAARM_INTR_HI(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_INTR_HI) & BM_SDMAARM_INTR_HI)
  173. #ifndef __LANGUAGE_ASM__
  174. //! @brief Set the HI field to a new value.
  175. #define BW_SDMAARM_INTR_HI(v) (HW_SDMAARM_INTR_WR((HW_SDMAARM_INTR_RD() & ~BM_SDMAARM_INTR_HI) | BF_SDMAARM_INTR_HI(v)))
  176. #endif
  177. //@}
  178. //-------------------------------------------------------------------------------------------
  179. // HW_SDMAARM_STOP_STAT - Channel Stop/Channel Status
  180. //-------------------------------------------------------------------------------------------
  181. #ifndef __LANGUAGE_ASM__
  182. /*!
  183. * @brief HW_SDMAARM_STOP_STAT - Channel Stop/Channel Status (W1C)
  184. *
  185. * Reset value: 0x00000000
  186. */
  187. typedef union _hw_sdmaarm_stop_stat
  188. {
  189. reg32_t U;
  190. struct _hw_sdmaarm_stop_stat_bitfields
  191. {
  192. unsigned HE : 32; //!< [31:0] This 32-bit register gives access to the ARM platform Enable bits.
  193. } B;
  194. } hw_sdmaarm_stop_stat_t;
  195. #endif
  196. /*!
  197. * @name Constants and macros for entire SDMAARM_STOP_STAT register
  198. */
  199. //@{
  200. #define HW_SDMAARM_STOP_STAT_ADDR (REGS_SDMAARM_BASE + 0x8)
  201. #ifndef __LANGUAGE_ASM__
  202. #define HW_SDMAARM_STOP_STAT (*(volatile hw_sdmaarm_stop_stat_t *) HW_SDMAARM_STOP_STAT_ADDR)
  203. #define HW_SDMAARM_STOP_STAT_RD() (HW_SDMAARM_STOP_STAT.U)
  204. #define HW_SDMAARM_STOP_STAT_WR(v) (HW_SDMAARM_STOP_STAT.U = (v))
  205. #define HW_SDMAARM_STOP_STAT_SET(v) (HW_SDMAARM_STOP_STAT_WR(HW_SDMAARM_STOP_STAT_RD() | (v)))
  206. #define HW_SDMAARM_STOP_STAT_CLR(v) (HW_SDMAARM_STOP_STAT_WR(HW_SDMAARM_STOP_STAT_RD() & ~(v)))
  207. #define HW_SDMAARM_STOP_STAT_TOG(v) (HW_SDMAARM_STOP_STAT_WR(HW_SDMAARM_STOP_STAT_RD() ^ (v)))
  208. #endif
  209. //@}
  210. /*
  211. * constants & macros for individual SDMAARM_STOP_STAT bitfields
  212. */
  213. /*! @name Register SDMAARM_STOP_STAT, field HE[31:0] (W1C)
  214. *
  215. * This 32-bit register gives access to the ARM platform Enable bits. There is one bit for every
  216. * channel. This register is a "write-ones" register to the ARM platform. When the ARM platform
  217. * writes 1 in bit i of this register, it clears the HE[i] and HSTART[i] bits. Reading this register
  218. * yields the current state of the HE[i] bits.
  219. */
  220. //@{
  221. #define BP_SDMAARM_STOP_STAT_HE (0) //!< Bit position for SDMAARM_STOP_STAT_HE.
  222. #define BM_SDMAARM_STOP_STAT_HE (0xffffffff) //!< Bit mask for SDMAARM_STOP_STAT_HE.
  223. //! @brief Get value of SDMAARM_STOP_STAT_HE from a register value.
  224. #define BG_SDMAARM_STOP_STAT_HE(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_STOP_STAT_HE) >> BP_SDMAARM_STOP_STAT_HE)
  225. //! @brief Format value for bitfield SDMAARM_STOP_STAT_HE.
  226. #define BF_SDMAARM_STOP_STAT_HE(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_STOP_STAT_HE) & BM_SDMAARM_STOP_STAT_HE)
  227. #ifndef __LANGUAGE_ASM__
  228. //! @brief Set the HE field to a new value.
  229. #define BW_SDMAARM_STOP_STAT_HE(v) (HW_SDMAARM_STOP_STAT_WR((HW_SDMAARM_STOP_STAT_RD() & ~BM_SDMAARM_STOP_STAT_HE) | BF_SDMAARM_STOP_STAT_HE(v)))
  230. #endif
  231. //@}
  232. //-------------------------------------------------------------------------------------------
  233. // HW_SDMAARM_HSTART - Channel Start
  234. //-------------------------------------------------------------------------------------------
  235. #ifndef __LANGUAGE_ASM__
  236. /*!
  237. * @brief HW_SDMAARM_HSTART - Channel Start (RW)
  238. *
  239. * Reset value: 0x00000000
  240. */
  241. typedef union _hw_sdmaarm_hstart
  242. {
  243. reg32_t U;
  244. struct _hw_sdmaarm_hstart_bitfields
  245. {
  246. unsigned HSTART_HE : 32; //!< [31:0] The HSTART_HE registers are 32 bits wide with one bit for every channel.
  247. } B;
  248. } hw_sdmaarm_hstart_t;
  249. #endif
  250. /*!
  251. * @name Constants and macros for entire SDMAARM_HSTART register
  252. */
  253. //@{
  254. #define HW_SDMAARM_HSTART_ADDR (REGS_SDMAARM_BASE + 0xc)
  255. #ifndef __LANGUAGE_ASM__
  256. #define HW_SDMAARM_HSTART (*(volatile hw_sdmaarm_hstart_t *) HW_SDMAARM_HSTART_ADDR)
  257. #define HW_SDMAARM_HSTART_RD() (HW_SDMAARM_HSTART.U)
  258. #define HW_SDMAARM_HSTART_WR(v) (HW_SDMAARM_HSTART.U = (v))
  259. #define HW_SDMAARM_HSTART_SET(v) (HW_SDMAARM_HSTART_WR(HW_SDMAARM_HSTART_RD() | (v)))
  260. #define HW_SDMAARM_HSTART_CLR(v) (HW_SDMAARM_HSTART_WR(HW_SDMAARM_HSTART_RD() & ~(v)))
  261. #define HW_SDMAARM_HSTART_TOG(v) (HW_SDMAARM_HSTART_WR(HW_SDMAARM_HSTART_RD() ^ (v)))
  262. #endif
  263. //@}
  264. /*
  265. * constants & macros for individual SDMAARM_HSTART bitfields
  266. */
  267. /*! @name Register SDMAARM_HSTART, field HSTART_HE[31:0] (W1C)
  268. *
  269. * The HSTART_HE registers are 32 bits wide with one bit for every channel. When a bit is written to
  270. * 1, it enables the corresponding channel. Two physical registers are accessed with that address
  271. * (HSTART and HE), which enables the ARM platform to trigger a channel a second time before the
  272. * first trigger is processed. This register is a "write-ones" register to the ARM platform. Neither
  273. * HSTART[i] bit can be set while the corresponding HE[i] bit is cleared. When the ARM platform
  274. * tries to set the HSTART[i] bit by writing a one (if the corresponding HE[i] bit is clear), the
  275. * bit in the HSTART[i] register will remain cleared and the HE[i] bit will be set. If the
  276. * corresponding HE[i] bit was already set, the HSTART[i] bit will be set. The next time the SDMA
  277. * channel i attempts to clear the HE[i] bit by means of a done instruction, the bit in the
  278. * HSTART[i] register will be cleared and the HE[i] bit will take the old value of the HSTART[i]
  279. * bit. Reading this register yields the current state of the HSTART[i] bits. This mechanism enables
  280. * the ARM platform to pipeline two HSTART commands per channel.
  281. */
  282. //@{
  283. #define BP_SDMAARM_HSTART_HSTART_HE (0) //!< Bit position for SDMAARM_HSTART_HSTART_HE.
  284. #define BM_SDMAARM_HSTART_HSTART_HE (0xffffffff) //!< Bit mask for SDMAARM_HSTART_HSTART_HE.
  285. //! @brief Get value of SDMAARM_HSTART_HSTART_HE from a register value.
  286. #define BG_SDMAARM_HSTART_HSTART_HE(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_HSTART_HSTART_HE) >> BP_SDMAARM_HSTART_HSTART_HE)
  287. //! @brief Format value for bitfield SDMAARM_HSTART_HSTART_HE.
  288. #define BF_SDMAARM_HSTART_HSTART_HE(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_HSTART_HSTART_HE) & BM_SDMAARM_HSTART_HSTART_HE)
  289. #ifndef __LANGUAGE_ASM__
  290. //! @brief Set the HSTART_HE field to a new value.
  291. #define BW_SDMAARM_HSTART_HSTART_HE(v) (HW_SDMAARM_HSTART_WR((HW_SDMAARM_HSTART_RD() & ~BM_SDMAARM_HSTART_HSTART_HE) | BF_SDMAARM_HSTART_HSTART_HE(v)))
  292. #endif
  293. //@}
  294. //-------------------------------------------------------------------------------------------
  295. // HW_SDMAARM_EVTOVR - Channel Event Override
  296. //-------------------------------------------------------------------------------------------
  297. #ifndef __LANGUAGE_ASM__
  298. /*!
  299. * @brief HW_SDMAARM_EVTOVR - Channel Event Override (RW)
  300. *
  301. * Reset value: 0x00000000
  302. */
  303. typedef union _hw_sdmaarm_evtovr
  304. {
  305. reg32_t U;
  306. struct _hw_sdmaarm_evtovr_bitfields
  307. {
  308. unsigned EO : 32; //!< [31:0] The Channel Event Override register contains the 32 EO[i] bits.
  309. } B;
  310. } hw_sdmaarm_evtovr_t;
  311. #endif
  312. /*!
  313. * @name Constants and macros for entire SDMAARM_EVTOVR register
  314. */
  315. //@{
  316. #define HW_SDMAARM_EVTOVR_ADDR (REGS_SDMAARM_BASE + 0x10)
  317. #ifndef __LANGUAGE_ASM__
  318. #define HW_SDMAARM_EVTOVR (*(volatile hw_sdmaarm_evtovr_t *) HW_SDMAARM_EVTOVR_ADDR)
  319. #define HW_SDMAARM_EVTOVR_RD() (HW_SDMAARM_EVTOVR.U)
  320. #define HW_SDMAARM_EVTOVR_WR(v) (HW_SDMAARM_EVTOVR.U = (v))
  321. #define HW_SDMAARM_EVTOVR_SET(v) (HW_SDMAARM_EVTOVR_WR(HW_SDMAARM_EVTOVR_RD() | (v)))
  322. #define HW_SDMAARM_EVTOVR_CLR(v) (HW_SDMAARM_EVTOVR_WR(HW_SDMAARM_EVTOVR_RD() & ~(v)))
  323. #define HW_SDMAARM_EVTOVR_TOG(v) (HW_SDMAARM_EVTOVR_WR(HW_SDMAARM_EVTOVR_RD() ^ (v)))
  324. #endif
  325. //@}
  326. /*
  327. * constants & macros for individual SDMAARM_EVTOVR bitfields
  328. */
  329. /*! @name Register SDMAARM_EVTOVR, field EO[31:0] (RW)
  330. *
  331. * The Channel Event Override register contains the 32 EO[i] bits. A bit set in this register causes
  332. * the SDMA to ignore DMA requests when scheduling the corresponding channel.
  333. */
  334. //@{
  335. #define BP_SDMAARM_EVTOVR_EO (0) //!< Bit position for SDMAARM_EVTOVR_EO.
  336. #define BM_SDMAARM_EVTOVR_EO (0xffffffff) //!< Bit mask for SDMAARM_EVTOVR_EO.
  337. //! @brief Get value of SDMAARM_EVTOVR_EO from a register value.
  338. #define BG_SDMAARM_EVTOVR_EO(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_EVTOVR_EO) >> BP_SDMAARM_EVTOVR_EO)
  339. //! @brief Format value for bitfield SDMAARM_EVTOVR_EO.
  340. #define BF_SDMAARM_EVTOVR_EO(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_EVTOVR_EO) & BM_SDMAARM_EVTOVR_EO)
  341. #ifndef __LANGUAGE_ASM__
  342. //! @brief Set the EO field to a new value.
  343. #define BW_SDMAARM_EVTOVR_EO(v) (HW_SDMAARM_EVTOVR_WR((HW_SDMAARM_EVTOVR_RD() & ~BM_SDMAARM_EVTOVR_EO) | BF_SDMAARM_EVTOVR_EO(v)))
  344. #endif
  345. //@}
  346. //-------------------------------------------------------------------------------------------
  347. // HW_SDMAARM_DSPOVR - Channel BP Override
  348. //-------------------------------------------------------------------------------------------
  349. #ifndef __LANGUAGE_ASM__
  350. /*!
  351. * @brief HW_SDMAARM_DSPOVR - Channel BP Override (RW)
  352. *
  353. * Reset value: 0xffffffff
  354. */
  355. typedef union _hw_sdmaarm_dspovr
  356. {
  357. reg32_t U;
  358. struct _hw_sdmaarm_dspovr_bitfields
  359. {
  360. unsigned DO : 32; //!< [31:0] This register is reserved.
  361. } B;
  362. } hw_sdmaarm_dspovr_t;
  363. #endif
  364. /*!
  365. * @name Constants and macros for entire SDMAARM_DSPOVR register
  366. */
  367. //@{
  368. #define HW_SDMAARM_DSPOVR_ADDR (REGS_SDMAARM_BASE + 0x14)
  369. #ifndef __LANGUAGE_ASM__
  370. #define HW_SDMAARM_DSPOVR (*(volatile hw_sdmaarm_dspovr_t *) HW_SDMAARM_DSPOVR_ADDR)
  371. #define HW_SDMAARM_DSPOVR_RD() (HW_SDMAARM_DSPOVR.U)
  372. #define HW_SDMAARM_DSPOVR_WR(v) (HW_SDMAARM_DSPOVR.U = (v))
  373. #define HW_SDMAARM_DSPOVR_SET(v) (HW_SDMAARM_DSPOVR_WR(HW_SDMAARM_DSPOVR_RD() | (v)))
  374. #define HW_SDMAARM_DSPOVR_CLR(v) (HW_SDMAARM_DSPOVR_WR(HW_SDMAARM_DSPOVR_RD() & ~(v)))
  375. #define HW_SDMAARM_DSPOVR_TOG(v) (HW_SDMAARM_DSPOVR_WR(HW_SDMAARM_DSPOVR_RD() ^ (v)))
  376. #endif
  377. //@}
  378. /*
  379. * constants & macros for individual SDMAARM_DSPOVR bitfields
  380. */
  381. /*! @name Register SDMAARM_DSPOVR, field DO[31:0] (RW)
  382. *
  383. * This register is reserved. All DO bits should be set to the reset value of 1. A setting of 0 will
  384. * prevent SDMA channels from starting according to the condition described in .
  385. *
  386. * Values:
  387. * - 0 - - Reserved
  388. * - 1 - - Reset value.
  389. */
  390. //@{
  391. #define BP_SDMAARM_DSPOVR_DO (0) //!< Bit position for SDMAARM_DSPOVR_DO.
  392. #define BM_SDMAARM_DSPOVR_DO (0xffffffff) //!< Bit mask for SDMAARM_DSPOVR_DO.
  393. //! @brief Get value of SDMAARM_DSPOVR_DO from a register value.
  394. #define BG_SDMAARM_DSPOVR_DO(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_DSPOVR_DO) >> BP_SDMAARM_DSPOVR_DO)
  395. //! @brief Format value for bitfield SDMAARM_DSPOVR_DO.
  396. #define BF_SDMAARM_DSPOVR_DO(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_DSPOVR_DO) & BM_SDMAARM_DSPOVR_DO)
  397. #ifndef __LANGUAGE_ASM__
  398. //! @brief Set the DO field to a new value.
  399. #define BW_SDMAARM_DSPOVR_DO(v) (HW_SDMAARM_DSPOVR_WR((HW_SDMAARM_DSPOVR_RD() & ~BM_SDMAARM_DSPOVR_DO) | BF_SDMAARM_DSPOVR_DO(v)))
  400. #endif
  401. //@}
  402. //-------------------------------------------------------------------------------------------
  403. // HW_SDMAARM_HOSTOVR - Channel ARM platform Override
  404. //-------------------------------------------------------------------------------------------
  405. #ifndef __LANGUAGE_ASM__
  406. /*!
  407. * @brief HW_SDMAARM_HOSTOVR - Channel ARM platform Override (RW)
  408. *
  409. * Reset value: 0x00000000
  410. */
  411. typedef union _hw_sdmaarm_hostovr
  412. {
  413. reg32_t U;
  414. struct _hw_sdmaarm_hostovr_bitfields
  415. {
  416. unsigned HO : 32; //!< [31:0] The Channel ARM platform Override register contains the 32 HO[i] bits.
  417. } B;
  418. } hw_sdmaarm_hostovr_t;
  419. #endif
  420. /*!
  421. * @name Constants and macros for entire SDMAARM_HOSTOVR register
  422. */
  423. //@{
  424. #define HW_SDMAARM_HOSTOVR_ADDR (REGS_SDMAARM_BASE + 0x18)
  425. #ifndef __LANGUAGE_ASM__
  426. #define HW_SDMAARM_HOSTOVR (*(volatile hw_sdmaarm_hostovr_t *) HW_SDMAARM_HOSTOVR_ADDR)
  427. #define HW_SDMAARM_HOSTOVR_RD() (HW_SDMAARM_HOSTOVR.U)
  428. #define HW_SDMAARM_HOSTOVR_WR(v) (HW_SDMAARM_HOSTOVR.U = (v))
  429. #define HW_SDMAARM_HOSTOVR_SET(v) (HW_SDMAARM_HOSTOVR_WR(HW_SDMAARM_HOSTOVR_RD() | (v)))
  430. #define HW_SDMAARM_HOSTOVR_CLR(v) (HW_SDMAARM_HOSTOVR_WR(HW_SDMAARM_HOSTOVR_RD() & ~(v)))
  431. #define HW_SDMAARM_HOSTOVR_TOG(v) (HW_SDMAARM_HOSTOVR_WR(HW_SDMAARM_HOSTOVR_RD() ^ (v)))
  432. #endif
  433. //@}
  434. /*
  435. * constants & macros for individual SDMAARM_HOSTOVR bitfields
  436. */
  437. /*! @name Register SDMAARM_HOSTOVR, field HO[31:0] (RW)
  438. *
  439. * The Channel ARM platform Override register contains the 32 HO[i] bits. A bit set in this register
  440. * causes the SDMA to ignore the ARM platform enable bit (HE) when scheduling the corresponding
  441. * channel.
  442. */
  443. //@{
  444. #define BP_SDMAARM_HOSTOVR_HO (0) //!< Bit position for SDMAARM_HOSTOVR_HO.
  445. #define BM_SDMAARM_HOSTOVR_HO (0xffffffff) //!< Bit mask for SDMAARM_HOSTOVR_HO.
  446. //! @brief Get value of SDMAARM_HOSTOVR_HO from a register value.
  447. #define BG_SDMAARM_HOSTOVR_HO(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_HOSTOVR_HO) >> BP_SDMAARM_HOSTOVR_HO)
  448. //! @brief Format value for bitfield SDMAARM_HOSTOVR_HO.
  449. #define BF_SDMAARM_HOSTOVR_HO(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_HOSTOVR_HO) & BM_SDMAARM_HOSTOVR_HO)
  450. #ifndef __LANGUAGE_ASM__
  451. //! @brief Set the HO field to a new value.
  452. #define BW_SDMAARM_HOSTOVR_HO(v) (HW_SDMAARM_HOSTOVR_WR((HW_SDMAARM_HOSTOVR_RD() & ~BM_SDMAARM_HOSTOVR_HO) | BF_SDMAARM_HOSTOVR_HO(v)))
  453. #endif
  454. //@}
  455. //-------------------------------------------------------------------------------------------
  456. // HW_SDMAARM_EVTPEND - Channel Event Pending
  457. //-------------------------------------------------------------------------------------------
  458. #ifndef __LANGUAGE_ASM__
  459. /*!
  460. * @brief HW_SDMAARM_EVTPEND - Channel Event Pending (W1C)
  461. *
  462. * Reset value: 0x00000000
  463. */
  464. typedef union _hw_sdmaarm_evtpend
  465. {
  466. reg32_t U;
  467. struct _hw_sdmaarm_evtpend_bitfields
  468. {
  469. unsigned EP : 32; //!< [31:0] The Channel Event Pending register contains the 32 EP[i] bits.
  470. } B;
  471. } hw_sdmaarm_evtpend_t;
  472. #endif
  473. /*!
  474. * @name Constants and macros for entire SDMAARM_EVTPEND register
  475. */
  476. //@{
  477. #define HW_SDMAARM_EVTPEND_ADDR (REGS_SDMAARM_BASE + 0x1c)
  478. #ifndef __LANGUAGE_ASM__
  479. #define HW_SDMAARM_EVTPEND (*(volatile hw_sdmaarm_evtpend_t *) HW_SDMAARM_EVTPEND_ADDR)
  480. #define HW_SDMAARM_EVTPEND_RD() (HW_SDMAARM_EVTPEND.U)
  481. #define HW_SDMAARM_EVTPEND_WR(v) (HW_SDMAARM_EVTPEND.U = (v))
  482. #define HW_SDMAARM_EVTPEND_SET(v) (HW_SDMAARM_EVTPEND_WR(HW_SDMAARM_EVTPEND_RD() | (v)))
  483. #define HW_SDMAARM_EVTPEND_CLR(v) (HW_SDMAARM_EVTPEND_WR(HW_SDMAARM_EVTPEND_RD() & ~(v)))
  484. #define HW_SDMAARM_EVTPEND_TOG(v) (HW_SDMAARM_EVTPEND_WR(HW_SDMAARM_EVTPEND_RD() ^ (v)))
  485. #endif
  486. //@}
  487. /*
  488. * constants & macros for individual SDMAARM_EVTPEND bitfields
  489. */
  490. /*! @name Register SDMAARM_EVTPEND, field EP[31:0] (W1C)
  491. *
  492. * The Channel Event Pending register contains the 32 EP[i] bits. Reading this register enables the
  493. * ARM platform to determine what channels are pending after the reception of a DMA request. Setting
  494. * a bit in this register causes the SDMA to reevaluate scheduling as if a DMA request mapped on
  495. * this channel had occurred. This is useful for starting up channels, so that initialization is
  496. * done before awaiting the first request. The scheduler can also set bits in the EVTPEND register
  497. * according to the received DMA requests. The EP[i] bit may be cleared by the done instruction when
  498. * running the channel i script. This a "write-ones" mechanism: Writing a '0' does not clear the
  499. * corresponding bit.
  500. */
  501. //@{
  502. #define BP_SDMAARM_EVTPEND_EP (0) //!< Bit position for SDMAARM_EVTPEND_EP.
  503. #define BM_SDMAARM_EVTPEND_EP (0xffffffff) //!< Bit mask for SDMAARM_EVTPEND_EP.
  504. //! @brief Get value of SDMAARM_EVTPEND_EP from a register value.
  505. #define BG_SDMAARM_EVTPEND_EP(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_EVTPEND_EP) >> BP_SDMAARM_EVTPEND_EP)
  506. //! @brief Format value for bitfield SDMAARM_EVTPEND_EP.
  507. #define BF_SDMAARM_EVTPEND_EP(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_EVTPEND_EP) & BM_SDMAARM_EVTPEND_EP)
  508. #ifndef __LANGUAGE_ASM__
  509. //! @brief Set the EP field to a new value.
  510. #define BW_SDMAARM_EVTPEND_EP(v) (HW_SDMAARM_EVTPEND_WR((HW_SDMAARM_EVTPEND_RD() & ~BM_SDMAARM_EVTPEND_EP) | BF_SDMAARM_EVTPEND_EP(v)))
  511. #endif
  512. //@}
  513. //-------------------------------------------------------------------------------------------
  514. // HW_SDMAARM_RESET - Reset Register
  515. //-------------------------------------------------------------------------------------------
  516. #ifndef __LANGUAGE_ASM__
  517. /*!
  518. * @brief HW_SDMAARM_RESET - Reset Register (RO)
  519. *
  520. * Reset value: 0x00000000
  521. */
  522. typedef union _hw_sdmaarm_reset
  523. {
  524. reg32_t U;
  525. struct _hw_sdmaarm_reset_bitfields
  526. {
  527. unsigned RESET : 1; //!< [0] When set, this bit causes the SDMA to be held in a software reset.
  528. unsigned RESCHED : 1; //!< [1] When set, this bit forces the SDMA to reschedule as if a script had executed a done instruction.
  529. unsigned RESERVED0 : 30; //!< [31:2] Reserved
  530. } B;
  531. } hw_sdmaarm_reset_t;
  532. #endif
  533. /*!
  534. * @name Constants and macros for entire SDMAARM_RESET register
  535. */
  536. //@{
  537. #define HW_SDMAARM_RESET_ADDR (REGS_SDMAARM_BASE + 0x24)
  538. #ifndef __LANGUAGE_ASM__
  539. #define HW_SDMAARM_RESET (*(volatile hw_sdmaarm_reset_t *) HW_SDMAARM_RESET_ADDR)
  540. #define HW_SDMAARM_RESET_RD() (HW_SDMAARM_RESET.U)
  541. #endif
  542. //@}
  543. /*
  544. * constants & macros for individual SDMAARM_RESET bitfields
  545. */
  546. /*! @name Register SDMAARM_RESET, field RESET[0] (RO)
  547. *
  548. * When set, this bit causes the SDMA to be held in a software reset. The internal reset signal is
  549. * held low 16 cycles; the RESET bit is automatically cleared when the internal reset signal rises.
  550. */
  551. //@{
  552. #define BP_SDMAARM_RESET_RESET (0) //!< Bit position for SDMAARM_RESET_RESET.
  553. #define BM_SDMAARM_RESET_RESET (0x00000001) //!< Bit mask for SDMAARM_RESET_RESET.
  554. //! @brief Get value of SDMAARM_RESET_RESET from a register value.
  555. #define BG_SDMAARM_RESET_RESET(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_RESET_RESET) >> BP_SDMAARM_RESET_RESET)
  556. //@}
  557. /*! @name Register SDMAARM_RESET, field RESCHED[1] (RO)
  558. *
  559. * When set, this bit forces the SDMA to reschedule as if a script had executed a done instruction.
  560. * This enables the ARM platform to recover from a runaway script on a channel by clearing its HE[i]
  561. * bit via the STOP register, and then forcing a reschedule via the RESCHED bit. The RESCHED bit is
  562. * cleared when the context switch starts.
  563. */
  564. //@{
  565. #define BP_SDMAARM_RESET_RESCHED (1) //!< Bit position for SDMAARM_RESET_RESCHED.
  566. #define BM_SDMAARM_RESET_RESCHED (0x00000002) //!< Bit mask for SDMAARM_RESET_RESCHED.
  567. //! @brief Get value of SDMAARM_RESET_RESCHED from a register value.
  568. #define BG_SDMAARM_RESET_RESCHED(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_RESET_RESCHED) >> BP_SDMAARM_RESET_RESCHED)
  569. //@}
  570. //-------------------------------------------------------------------------------------------
  571. // HW_SDMAARM_EVTERR - DMA Request Error Register
  572. //-------------------------------------------------------------------------------------------
  573. #ifndef __LANGUAGE_ASM__
  574. /*!
  575. * @brief HW_SDMAARM_EVTERR - DMA Request Error Register (RO)
  576. *
  577. * Reset value: 0x00000000
  578. */
  579. typedef union _hw_sdmaarm_evterr
  580. {
  581. reg32_t U;
  582. struct _hw_sdmaarm_evterr_bitfields
  583. {
  584. unsigned CHNERR : 32; //!< [31:0] This register is used by the SDMA to warn the ARM platform when an incoming DMA request was detected and it triggers a channel that is already pending or being serviced.
  585. } B;
  586. } hw_sdmaarm_evterr_t;
  587. #endif
  588. /*!
  589. * @name Constants and macros for entire SDMAARM_EVTERR register
  590. */
  591. //@{
  592. #define HW_SDMAARM_EVTERR_ADDR (REGS_SDMAARM_BASE + 0x28)
  593. #ifndef __LANGUAGE_ASM__
  594. #define HW_SDMAARM_EVTERR (*(volatile hw_sdmaarm_evterr_t *) HW_SDMAARM_EVTERR_ADDR)
  595. #define HW_SDMAARM_EVTERR_RD() (HW_SDMAARM_EVTERR.U)
  596. #endif
  597. //@}
  598. /*
  599. * constants & macros for individual SDMAARM_EVTERR bitfields
  600. */
  601. /*! @name Register SDMAARM_EVTERR, field CHNERR[31:0] (RO)
  602. *
  603. * This register is used by the SDMA to warn the ARM platform when an incoming DMA request was
  604. * detected and it triggers a channel that is already pending or being serviced. This probably means
  605. * there is an overflow of data for that channel. An interrupt is sent to the ARM platform if the
  606. * corresponding channel bit is set in the INTRMASK register. This is a "write-ones" register for
  607. * the scheduler. It is only able to set the flags. The flags are cleared when the register is read
  608. * by the ARM platform or during SDMA reset. The CHNERR[i] bit is set when a DMA request that
  609. * triggers channel i is received through the corresponding input pins and the EP[i] bit is already
  610. * set; the EVTERR[i] bit is unaffected if the ARM platform tries to set the EP[i] bit, whereas,
  611. * that EP[i] bit is already set.
  612. */
  613. //@{
  614. #define BP_SDMAARM_EVTERR_CHNERR (0) //!< Bit position for SDMAARM_EVTERR_CHNERR.
  615. #define BM_SDMAARM_EVTERR_CHNERR (0xffffffff) //!< Bit mask for SDMAARM_EVTERR_CHNERR.
  616. //! @brief Get value of SDMAARM_EVTERR_CHNERR from a register value.
  617. #define BG_SDMAARM_EVTERR_CHNERR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_EVTERR_CHNERR) >> BP_SDMAARM_EVTERR_CHNERR)
  618. //@}
  619. //-------------------------------------------------------------------------------------------
  620. // HW_SDMAARM_INTRMASK - Channel ARM platform Interrupt Mask
  621. //-------------------------------------------------------------------------------------------
  622. #ifndef __LANGUAGE_ASM__
  623. /*!
  624. * @brief HW_SDMAARM_INTRMASK - Channel ARM platform Interrupt Mask (RW)
  625. *
  626. * Reset value: 0x00000000
  627. */
  628. typedef union _hw_sdmaarm_intrmask
  629. {
  630. reg32_t U;
  631. struct _hw_sdmaarm_intrmask_bitfields
  632. {
  633. unsigned HIMASK : 32; //!< [31:0] The Interrupt Mask Register contains 32 interrupt generation mask bits.
  634. } B;
  635. } hw_sdmaarm_intrmask_t;
  636. #endif
  637. /*!
  638. * @name Constants and macros for entire SDMAARM_INTRMASK register
  639. */
  640. //@{
  641. #define HW_SDMAARM_INTRMASK_ADDR (REGS_SDMAARM_BASE + 0x2c)
  642. #ifndef __LANGUAGE_ASM__
  643. #define HW_SDMAARM_INTRMASK (*(volatile hw_sdmaarm_intrmask_t *) HW_SDMAARM_INTRMASK_ADDR)
  644. #define HW_SDMAARM_INTRMASK_RD() (HW_SDMAARM_INTRMASK.U)
  645. #define HW_SDMAARM_INTRMASK_WR(v) (HW_SDMAARM_INTRMASK.U = (v))
  646. #define HW_SDMAARM_INTRMASK_SET(v) (HW_SDMAARM_INTRMASK_WR(HW_SDMAARM_INTRMASK_RD() | (v)))
  647. #define HW_SDMAARM_INTRMASK_CLR(v) (HW_SDMAARM_INTRMASK_WR(HW_SDMAARM_INTRMASK_RD() & ~(v)))
  648. #define HW_SDMAARM_INTRMASK_TOG(v) (HW_SDMAARM_INTRMASK_WR(HW_SDMAARM_INTRMASK_RD() ^ (v)))
  649. #endif
  650. //@}
  651. /*
  652. * constants & macros for individual SDMAARM_INTRMASK bitfields
  653. */
  654. /*! @name Register SDMAARM_INTRMASK, field HIMASK[31:0] (RW)
  655. *
  656. * The Interrupt Mask Register contains 32 interrupt generation mask bits. If bit HIMASK[i] is set,
  657. * the HI[i] bit is set and an interrupt is sent to the ARM platform when a DMA request error is
  658. * detected on channel i (for example, EVTERR[i] is set).
  659. */
  660. //@{
  661. #define BP_SDMAARM_INTRMASK_HIMASK (0) //!< Bit position for SDMAARM_INTRMASK_HIMASK.
  662. #define BM_SDMAARM_INTRMASK_HIMASK (0xffffffff) //!< Bit mask for SDMAARM_INTRMASK_HIMASK.
  663. //! @brief Get value of SDMAARM_INTRMASK_HIMASK from a register value.
  664. #define BG_SDMAARM_INTRMASK_HIMASK(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_INTRMASK_HIMASK) >> BP_SDMAARM_INTRMASK_HIMASK)
  665. //! @brief Format value for bitfield SDMAARM_INTRMASK_HIMASK.
  666. #define BF_SDMAARM_INTRMASK_HIMASK(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_INTRMASK_HIMASK) & BM_SDMAARM_INTRMASK_HIMASK)
  667. #ifndef __LANGUAGE_ASM__
  668. //! @brief Set the HIMASK field to a new value.
  669. #define BW_SDMAARM_INTRMASK_HIMASK(v) (HW_SDMAARM_INTRMASK_WR((HW_SDMAARM_INTRMASK_RD() & ~BM_SDMAARM_INTRMASK_HIMASK) | BF_SDMAARM_INTRMASK_HIMASK(v)))
  670. #endif
  671. //@}
  672. //-------------------------------------------------------------------------------------------
  673. // HW_SDMAARM_PSW - Schedule Status
  674. //-------------------------------------------------------------------------------------------
  675. #ifndef __LANGUAGE_ASM__
  676. /*!
  677. * @brief HW_SDMAARM_PSW - Schedule Status (RO)
  678. *
  679. * Reset value: 0x00000000
  680. */
  681. typedef union _hw_sdmaarm_psw
  682. {
  683. reg32_t U;
  684. struct _hw_sdmaarm_psw_bitfields
  685. {
  686. unsigned CCR : 4; //!< [3:0] The Current Channel Register indicates the number of the channel that is being executed by the SDMA.
  687. unsigned CCP : 4; //!< [7:4] The Current Channel Priority indicates the priority of the current active channel.
  688. unsigned NCR : 5; //!< [12:8] The Next Channel Register indicates the number of the next scheduled pending channel with the highest priority.
  689. unsigned NCP : 3; //!< [15:13] The Next Channel Priority gives the next pending channel priority.
  690. unsigned RESERVED0 : 16; //!< [31:16] Reserved
  691. } B;
  692. } hw_sdmaarm_psw_t;
  693. #endif
  694. /*!
  695. * @name Constants and macros for entire SDMAARM_PSW register
  696. */
  697. //@{
  698. #define HW_SDMAARM_PSW_ADDR (REGS_SDMAARM_BASE + 0x30)
  699. #ifndef __LANGUAGE_ASM__
  700. #define HW_SDMAARM_PSW (*(volatile hw_sdmaarm_psw_t *) HW_SDMAARM_PSW_ADDR)
  701. #define HW_SDMAARM_PSW_RD() (HW_SDMAARM_PSW.U)
  702. #endif
  703. //@}
  704. /*
  705. * constants & macros for individual SDMAARM_PSW bitfields
  706. */
  707. /*! @name Register SDMAARM_PSW, field CCR[3:0] (RO)
  708. *
  709. * The Current Channel Register indicates the number of the channel that is being executed by the
  710. * SDMA. SDMA. In the case that the SDMA has finished running the channel and has entered sleep
  711. * state, CCR will indicate the previous running channel.
  712. */
  713. //@{
  714. #define BP_SDMAARM_PSW_CCR (0) //!< Bit position for SDMAARM_PSW_CCR.
  715. #define BM_SDMAARM_PSW_CCR (0x0000000f) //!< Bit mask for SDMAARM_PSW_CCR.
  716. //! @brief Get value of SDMAARM_PSW_CCR from a register value.
  717. #define BG_SDMAARM_PSW_CCR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_PSW_CCR) >> BP_SDMAARM_PSW_CCR)
  718. //@}
  719. /*! @name Register SDMAARM_PSW, field CCP[7:4] (RO)
  720. *
  721. * The Current Channel Priority indicates the priority of the current active channel. When the
  722. * priority is 0, no channel is running: The SDMA is idle and the CCR value has no meaning. In the
  723. * case that the SDMA has finished running the channel and has entered sleep state, CCP will
  724. * indicate the priority of previous running channel.
  725. *
  726. * Values:
  727. * - 0 - No running channel
  728. * - 1 - Active channel priority
  729. */
  730. //@{
  731. #define BP_SDMAARM_PSW_CCP (4) //!< Bit position for SDMAARM_PSW_CCP.
  732. #define BM_SDMAARM_PSW_CCP (0x000000f0) //!< Bit mask for SDMAARM_PSW_CCP.
  733. //! @brief Get value of SDMAARM_PSW_CCP from a register value.
  734. #define BG_SDMAARM_PSW_CCP(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_PSW_CCP) >> BP_SDMAARM_PSW_CCP)
  735. //@}
  736. /*! @name Register SDMAARM_PSW, field NCR[12:8] (RO)
  737. *
  738. * The Next Channel Register indicates the number of the next scheduled pending channel with the
  739. * highest priority.
  740. */
  741. //@{
  742. #define BP_SDMAARM_PSW_NCR (8) //!< Bit position for SDMAARM_PSW_NCR.
  743. #define BM_SDMAARM_PSW_NCR (0x00001f00) //!< Bit mask for SDMAARM_PSW_NCR.
  744. //! @brief Get value of SDMAARM_PSW_NCR from a register value.
  745. #define BG_SDMAARM_PSW_NCR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_PSW_NCR) >> BP_SDMAARM_PSW_NCR)
  746. //@}
  747. /*! @name Register SDMAARM_PSW, field NCP[15:13] (RO)
  748. *
  749. * The Next Channel Priority gives the next pending channel priority. When the priority is 0, it
  750. * means there is no pending channel and the NCR value has no meaning.
  751. *
  752. * Values:
  753. * - 0 - No running channel
  754. * - 1 - Active channel priority
  755. */
  756. //@{
  757. #define BP_SDMAARM_PSW_NCP (13) //!< Bit position for SDMAARM_PSW_NCP.
  758. #define BM_SDMAARM_PSW_NCP (0x0000e000) //!< Bit mask for SDMAARM_PSW_NCP.
  759. //! @brief Get value of SDMAARM_PSW_NCP from a register value.
  760. #define BG_SDMAARM_PSW_NCP(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_PSW_NCP) >> BP_SDMAARM_PSW_NCP)
  761. //@}
  762. //-------------------------------------------------------------------------------------------
  763. // HW_SDMAARM_EVTERRDBG - DMA Request Error Register
  764. //-------------------------------------------------------------------------------------------
  765. #ifndef __LANGUAGE_ASM__
  766. /*!
  767. * @brief HW_SDMAARM_EVTERRDBG - DMA Request Error Register (RO)
  768. *
  769. * Reset value: 0x00000000
  770. */
  771. typedef union _hw_sdmaarm_evterrdbg
  772. {
  773. reg32_t U;
  774. struct _hw_sdmaarm_evterrdbg_bitfields
  775. {
  776. unsigned CHNERR : 32; //!< [31:0] This register is the same as EVTERR, except reading it does not clear its contents.
  777. } B;
  778. } hw_sdmaarm_evterrdbg_t;
  779. #endif
  780. /*!
  781. * @name Constants and macros for entire SDMAARM_EVTERRDBG register
  782. */
  783. //@{
  784. #define HW_SDMAARM_EVTERRDBG_ADDR (REGS_SDMAARM_BASE + 0x34)
  785. #ifndef __LANGUAGE_ASM__
  786. #define HW_SDMAARM_EVTERRDBG (*(volatile hw_sdmaarm_evterrdbg_t *) HW_SDMAARM_EVTERRDBG_ADDR)
  787. #define HW_SDMAARM_EVTERRDBG_RD() (HW_SDMAARM_EVTERRDBG.U)
  788. #endif
  789. //@}
  790. /*
  791. * constants & macros for individual SDMAARM_EVTERRDBG bitfields
  792. */
  793. /*! @name Register SDMAARM_EVTERRDBG, field CHNERR[31:0] (RO)
  794. *
  795. * This register is the same as EVTERR, except reading it does not clear its contents. This address
  796. * is meant to be used in debug mode. The ARM platform OnCE may check this register value without
  797. * modifying it.
  798. */
  799. //@{
  800. #define BP_SDMAARM_EVTERRDBG_CHNERR (0) //!< Bit position for SDMAARM_EVTERRDBG_CHNERR.
  801. #define BM_SDMAARM_EVTERRDBG_CHNERR (0xffffffff) //!< Bit mask for SDMAARM_EVTERRDBG_CHNERR.
  802. //! @brief Get value of SDMAARM_EVTERRDBG_CHNERR from a register value.
  803. #define BG_SDMAARM_EVTERRDBG_CHNERR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_EVTERRDBG_CHNERR) >> BP_SDMAARM_EVTERRDBG_CHNERR)
  804. //@}
  805. //-------------------------------------------------------------------------------------------
  806. // HW_SDMAARM_CONFIG - Configuration Register
  807. //-------------------------------------------------------------------------------------------
  808. #ifndef __LANGUAGE_ASM__
  809. /*!
  810. * @brief HW_SDMAARM_CONFIG - Configuration Register (RW)
  811. *
  812. * Reset value: 0x00000003
  813. */
  814. typedef union _hw_sdmaarm_config
  815. {
  816. reg32_t U;
  817. struct _hw_sdmaarm_config_bitfields
  818. {
  819. unsigned CSM : 2; //!< [1:0] Selects the Context Switch Mode.
  820. unsigned RESERVED0 : 2; //!< [3:2] Reserved
  821. unsigned ACR : 1; //!< [4] ARM platform DMA / SDMA Core Clock Ratio.
  822. unsigned RESERVED1 : 6; //!< [10:5] Reserved
  823. unsigned RTDOBS : 1; //!< [11] Indicates if Real-Time Debug pins are used: They do not toggle by default in order to reduce power consumption.
  824. unsigned DSPDMA : 1; //!< [12] This bit's function is reserved and should be configured as zero.
  825. unsigned RESERVED2 : 19; //!< [31:13] Reserved
  826. } B;
  827. } hw_sdmaarm_config_t;
  828. #endif
  829. /*!
  830. * @name Constants and macros for entire SDMAARM_CONFIG register
  831. */
  832. //@{
  833. #define HW_SDMAARM_CONFIG_ADDR (REGS_SDMAARM_BASE + 0x38)
  834. #ifndef __LANGUAGE_ASM__
  835. #define HW_SDMAARM_CONFIG (*(volatile hw_sdmaarm_config_t *) HW_SDMAARM_CONFIG_ADDR)
  836. #define HW_SDMAARM_CONFIG_RD() (HW_SDMAARM_CONFIG.U)
  837. #define HW_SDMAARM_CONFIG_WR(v) (HW_SDMAARM_CONFIG.U = (v))
  838. #define HW_SDMAARM_CONFIG_SET(v) (HW_SDMAARM_CONFIG_WR(HW_SDMAARM_CONFIG_RD() | (v)))
  839. #define HW_SDMAARM_CONFIG_CLR(v) (HW_SDMAARM_CONFIG_WR(HW_SDMAARM_CONFIG_RD() & ~(v)))
  840. #define HW_SDMAARM_CONFIG_TOG(v) (HW_SDMAARM_CONFIG_WR(HW_SDMAARM_CONFIG_RD() ^ (v)))
  841. #endif
  842. //@}
  843. /*
  844. * constants & macros for individual SDMAARM_CONFIG bitfields
  845. */
  846. /*! @name Register SDMAARM_CONFIG, field CSM[1:0] (RW)
  847. *
  848. * Selects the Context Switch Mode. The ARM platform has a read/write access. The SDMA cannot modify
  849. * that register. The value at reset is 3, which selects the dynamic context switch by default. That
  850. * register can be modified at anytime but the new context switch configuration will only be taken
  851. * into account at the start of the next restore phase. NOTE: The first call to SDMA's channel 0
  852. * Bootload script after reset should use static context switch mode to ensure the context RAM for
  853. * channel 0 is initialized in the channel SAVE Phase. After Channel 0 is run once, then any of the
  854. * dynamic context modes can be used.
  855. *
  856. * Values:
  857. * - 0 - static
  858. * - 1 - dynamic low power
  859. * - 2 - dynamic with no loop
  860. * - 3 - dynamic
  861. */
  862. //@{
  863. #define BP_SDMAARM_CONFIG_CSM (0) //!< Bit position for SDMAARM_CONFIG_CSM.
  864. #define BM_SDMAARM_CONFIG_CSM (0x00000003) //!< Bit mask for SDMAARM_CONFIG_CSM.
  865. //! @brief Get value of SDMAARM_CONFIG_CSM from a register value.
  866. #define BG_SDMAARM_CONFIG_CSM(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_CONFIG_CSM) >> BP_SDMAARM_CONFIG_CSM)
  867. //! @brief Format value for bitfield SDMAARM_CONFIG_CSM.
  868. #define BF_SDMAARM_CONFIG_CSM(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_CONFIG_CSM) & BM_SDMAARM_CONFIG_CSM)
  869. #ifndef __LANGUAGE_ASM__
  870. //! @brief Set the CSM field to a new value.
  871. #define BW_SDMAARM_CONFIG_CSM(v) (HW_SDMAARM_CONFIG_WR((HW_SDMAARM_CONFIG_RD() & ~BM_SDMAARM_CONFIG_CSM) | BF_SDMAARM_CONFIG_CSM(v)))
  872. #endif
  873. //@}
  874. /*! @name Register SDMAARM_CONFIG, field ACR[4] (RW)
  875. *
  876. * ARM platform DMA / SDMA Core Clock Ratio. Selects the clock ratio between ARM platform DMA
  877. * interfaces (burst DMA and peripheral DMA ) and the internal SDMA core clock. The frequency
  878. * selection is determined separately by the chip clock controller. This bit has to match the
  879. * configuration of the chip clock controller that generates the clocks used in the SDMA.
  880. *
  881. * Values:
  882. * - 0 - ARM platform DMA interface frequency equals twice core frequency
  883. * - 1 - ARM platform DMA interface frequency equals core frequency
  884. */
  885. //@{
  886. #define BP_SDMAARM_CONFIG_ACR (4) //!< Bit position for SDMAARM_CONFIG_ACR.
  887. #define BM_SDMAARM_CONFIG_ACR (0x00000010) //!< Bit mask for SDMAARM_CONFIG_ACR.
  888. //! @brief Get value of SDMAARM_CONFIG_ACR from a register value.
  889. #define BG_SDMAARM_CONFIG_ACR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_CONFIG_ACR) >> BP_SDMAARM_CONFIG_ACR)
  890. //! @brief Format value for bitfield SDMAARM_CONFIG_ACR.
  891. #define BF_SDMAARM_CONFIG_ACR(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_CONFIG_ACR) & BM_SDMAARM_CONFIG_ACR)
  892. #ifndef __LANGUAGE_ASM__
  893. //! @brief Set the ACR field to a new value.
  894. #define BW_SDMAARM_CONFIG_ACR(v) (HW_SDMAARM_CONFIG_WR((HW_SDMAARM_CONFIG_RD() & ~BM_SDMAARM_CONFIG_ACR) | BF_SDMAARM_CONFIG_ACR(v)))
  895. #endif
  896. //@}
  897. /*! @name Register SDMAARM_CONFIG, field RTDOBS[11] (RW)
  898. *
  899. * Indicates if Real-Time Debug pins are used: They do not toggle by default in order to reduce
  900. * power consumption.
  901. *
  902. * Values:
  903. * - 0 - RTD pins disabled
  904. * - 1 - RTD pins enabled
  905. */
  906. //@{
  907. #define BP_SDMAARM_CONFIG_RTDOBS (11) //!< Bit position for SDMAARM_CONFIG_RTDOBS.
  908. #define BM_SDMAARM_CONFIG_RTDOBS (0x00000800) //!< Bit mask for SDMAARM_CONFIG_RTDOBS.
  909. //! @brief Get value of SDMAARM_CONFIG_RTDOBS from a register value.
  910. #define BG_SDMAARM_CONFIG_RTDOBS(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_CONFIG_RTDOBS) >> BP_SDMAARM_CONFIG_RTDOBS)
  911. //! @brief Format value for bitfield SDMAARM_CONFIG_RTDOBS.
  912. #define BF_SDMAARM_CONFIG_RTDOBS(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_CONFIG_RTDOBS) & BM_SDMAARM_CONFIG_RTDOBS)
  913. #ifndef __LANGUAGE_ASM__
  914. //! @brief Set the RTDOBS field to a new value.
  915. #define BW_SDMAARM_CONFIG_RTDOBS(v) (HW_SDMAARM_CONFIG_WR((HW_SDMAARM_CONFIG_RD() & ~BM_SDMAARM_CONFIG_RTDOBS) | BF_SDMAARM_CONFIG_RTDOBS(v)))
  916. #endif
  917. //@}
  918. /*! @name Register SDMAARM_CONFIG, field DSPDMA[12] (RW)
  919. *
  920. * This bit's function is reserved and should be configured as zero.
  921. *
  922. * Values:
  923. * - 0 - - Reset Value
  924. * - 1 - - Reserved
  925. */
  926. //@{
  927. #define BP_SDMAARM_CONFIG_DSPDMA (12) //!< Bit position for SDMAARM_CONFIG_DSPDMA.
  928. #define BM_SDMAARM_CONFIG_DSPDMA (0x00001000) //!< Bit mask for SDMAARM_CONFIG_DSPDMA.
  929. //! @brief Get value of SDMAARM_CONFIG_DSPDMA from a register value.
  930. #define BG_SDMAARM_CONFIG_DSPDMA(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_CONFIG_DSPDMA) >> BP_SDMAARM_CONFIG_DSPDMA)
  931. //! @brief Format value for bitfield SDMAARM_CONFIG_DSPDMA.
  932. #define BF_SDMAARM_CONFIG_DSPDMA(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_CONFIG_DSPDMA) & BM_SDMAARM_CONFIG_DSPDMA)
  933. #ifndef __LANGUAGE_ASM__
  934. //! @brief Set the DSPDMA field to a new value.
  935. #define BW_SDMAARM_CONFIG_DSPDMA(v) (HW_SDMAARM_CONFIG_WR((HW_SDMAARM_CONFIG_RD() & ~BM_SDMAARM_CONFIG_DSPDMA) | BF_SDMAARM_CONFIG_DSPDMA(v)))
  936. #endif
  937. //@}
  938. //-------------------------------------------------------------------------------------------
  939. // HW_SDMAARM_SDMA_LOCK - SDMA LOCK
  940. //-------------------------------------------------------------------------------------------
  941. #ifndef __LANGUAGE_ASM__
  942. /*!
  943. * @brief HW_SDMAARM_SDMA_LOCK - SDMA LOCK (RW)
  944. *
  945. * Reset value: 0x00000000
  946. */
  947. typedef union _hw_sdmaarm_sdma_lock
  948. {
  949. reg32_t U;
  950. struct _hw_sdmaarm_sdma_lock_bitfields
  951. {
  952. unsigned LOCK : 1; //!< [0] The LOCK bit is used to restrict access to update SDMA script memory through ROM channel zero scripts and through the OnCE interface under ARM platform control.
  953. unsigned SRESET_LOCK_CLR : 1; //!< [1] The SRESET_LOCK_CLR bit determine if the LOCK bit is cleared on a software reset triggered by writing to the RESET register.
  954. unsigned RESERVED0 : 30; //!< [31:2] Reserved
  955. } B;
  956. } hw_sdmaarm_sdma_lock_t;
  957. #endif
  958. /*!
  959. * @name Constants and macros for entire SDMAARM_SDMA_LOCK register
  960. */
  961. //@{
  962. #define HW_SDMAARM_SDMA_LOCK_ADDR (REGS_SDMAARM_BASE + 0x3c)
  963. #ifndef __LANGUAGE_ASM__
  964. #define HW_SDMAARM_SDMA_LOCK (*(volatile hw_sdmaarm_sdma_lock_t *) HW_SDMAARM_SDMA_LOCK_ADDR)
  965. #define HW_SDMAARM_SDMA_LOCK_RD() (HW_SDMAARM_SDMA_LOCK.U)
  966. #define HW_SDMAARM_SDMA_LOCK_WR(v) (HW_SDMAARM_SDMA_LOCK.U = (v))
  967. #define HW_SDMAARM_SDMA_LOCK_SET(v) (HW_SDMAARM_SDMA_LOCK_WR(HW_SDMAARM_SDMA_LOCK_RD() | (v)))
  968. #define HW_SDMAARM_SDMA_LOCK_CLR(v) (HW_SDMAARM_SDMA_LOCK_WR(HW_SDMAARM_SDMA_LOCK_RD() & ~(v)))
  969. #define HW_SDMAARM_SDMA_LOCK_TOG(v) (HW_SDMAARM_SDMA_LOCK_WR(HW_SDMAARM_SDMA_LOCK_RD() ^ (v)))
  970. #endif
  971. //@}
  972. /*
  973. * constants & macros for individual SDMAARM_SDMA_LOCK bitfields
  974. */
  975. /*! @name Register SDMAARM_SDMA_LOCK, field LOCK[0] (RW)
  976. *
  977. * The LOCK bit is used to restrict access to update SDMA script memory through ROM channel zero
  978. * scripts and through the OnCE interface under ARM platform control. The LOCK bit is set: The
  979. * SDMA_LOCK, ONCE_ENB,CH0ADDR, and ILLINSTADDR registers cannot be written. These registers can be
  980. * read, but writes are ignored. SDMA software executing out of ROM or RAM may check the LOCK bit in
  981. * the LOCK register to determine if certain operations are allowed, such as up-loading new scripts.
  982. * Once the LOCK bit is set to 1, only a reset can clear it. The LOCK bit is cleared by a hardware
  983. * reset. LOCK is cleared by a software reset only if SRESET_LOCK_CLR is set.
  984. *
  985. * Values:
  986. * - 0 - LOCK disengaged.
  987. * - 1 - LOCK enabled.
  988. */
  989. //@{
  990. #define BP_SDMAARM_SDMA_LOCK_LOCK (0) //!< Bit position for SDMAARM_SDMA_LOCK_LOCK.
  991. #define BM_SDMAARM_SDMA_LOCK_LOCK (0x00000001) //!< Bit mask for SDMAARM_SDMA_LOCK_LOCK.
  992. //! @brief Get value of SDMAARM_SDMA_LOCK_LOCK from a register value.
  993. #define BG_SDMAARM_SDMA_LOCK_LOCK(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_SDMA_LOCK_LOCK) >> BP_SDMAARM_SDMA_LOCK_LOCK)
  994. //! @brief Format value for bitfield SDMAARM_SDMA_LOCK_LOCK.
  995. #define BF_SDMAARM_SDMA_LOCK_LOCK(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_SDMA_LOCK_LOCK) & BM_SDMAARM_SDMA_LOCK_LOCK)
  996. #ifndef __LANGUAGE_ASM__
  997. //! @brief Set the LOCK field to a new value.
  998. #define BW_SDMAARM_SDMA_LOCK_LOCK(v) (HW_SDMAARM_SDMA_LOCK_WR((HW_SDMAARM_SDMA_LOCK_RD() & ~BM_SDMAARM_SDMA_LOCK_LOCK) | BF_SDMAARM_SDMA_LOCK_LOCK(v)))
  999. #endif
  1000. //@}
  1001. /*! @name Register SDMAARM_SDMA_LOCK, field SRESET_LOCK_CLR[1] (RW)
  1002. *
  1003. * The SRESET_LOCK_CLR bit determine if the LOCK bit is cleared on a software reset triggered by
  1004. * writing to the RESET register. This bit cannot be changed if LOCK=1. SREST_LOCK_CLR is cleared by
  1005. * conditions that clear the LOCK bit.
  1006. *
  1007. * Values:
  1008. * - 0 - Software Reset does not clear the LOCK bit.
  1009. * - 1 - Software Reset clears the LOCK bit.
  1010. */
  1011. //@{
  1012. #define BP_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR (1) //!< Bit position for SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR.
  1013. #define BM_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR (0x00000002) //!< Bit mask for SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR.
  1014. //! @brief Get value of SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR from a register value.
  1015. #define BG_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR) >> BP_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR)
  1016. //! @brief Format value for bitfield SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR.
  1017. #define BF_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR) & BM_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR)
  1018. #ifndef __LANGUAGE_ASM__
  1019. //! @brief Set the SRESET_LOCK_CLR field to a new value.
  1020. #define BW_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR(v) (HW_SDMAARM_SDMA_LOCK_WR((HW_SDMAARM_SDMA_LOCK_RD() & ~BM_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR) | BF_SDMAARM_SDMA_LOCK_SRESET_LOCK_CLR(v)))
  1021. #endif
  1022. //@}
  1023. //-------------------------------------------------------------------------------------------
  1024. // HW_SDMAARM_ONCE_ENB - OnCE Enable
  1025. //-------------------------------------------------------------------------------------------
  1026. #ifndef __LANGUAGE_ASM__
  1027. /*!
  1028. * @brief HW_SDMAARM_ONCE_ENB - OnCE Enable (RW)
  1029. *
  1030. * Reset value: 0x00000000
  1031. */
  1032. typedef union _hw_sdmaarm_once_enb
  1033. {
  1034. reg32_t U;
  1035. struct _hw_sdmaarm_once_enb_bitfields
  1036. {
  1037. unsigned ENB : 1; //!< [0] The OnCE Enable register selects the OnCE control source: When cleared (0), the OnCE registers are accessed through the JTAG interface; when set (1), the OnCE registers may be accessed by the ARM platform through the addresses described, as follows.
  1038. unsigned RESERVED0 : 31; //!< [31:1] Reserved
  1039. } B;
  1040. } hw_sdmaarm_once_enb_t;
  1041. #endif
  1042. /*!
  1043. * @name Constants and macros for entire SDMAARM_ONCE_ENB register
  1044. */
  1045. //@{
  1046. #define HW_SDMAARM_ONCE_ENB_ADDR (REGS_SDMAARM_BASE + 0x40)
  1047. #ifndef __LANGUAGE_ASM__
  1048. #define HW_SDMAARM_ONCE_ENB (*(volatile hw_sdmaarm_once_enb_t *) HW_SDMAARM_ONCE_ENB_ADDR)
  1049. #define HW_SDMAARM_ONCE_ENB_RD() (HW_SDMAARM_ONCE_ENB.U)
  1050. #define HW_SDMAARM_ONCE_ENB_WR(v) (HW_SDMAARM_ONCE_ENB.U = (v))
  1051. #define HW_SDMAARM_ONCE_ENB_SET(v) (HW_SDMAARM_ONCE_ENB_WR(HW_SDMAARM_ONCE_ENB_RD() | (v)))
  1052. #define HW_SDMAARM_ONCE_ENB_CLR(v) (HW_SDMAARM_ONCE_ENB_WR(HW_SDMAARM_ONCE_ENB_RD() & ~(v)))
  1053. #define HW_SDMAARM_ONCE_ENB_TOG(v) (HW_SDMAARM_ONCE_ENB_WR(HW_SDMAARM_ONCE_ENB_RD() ^ (v)))
  1054. #endif
  1055. //@}
  1056. /*
  1057. * constants & macros for individual SDMAARM_ONCE_ENB bitfields
  1058. */
  1059. /*! @name Register SDMAARM_ONCE_ENB, field ENB[0] (RW)
  1060. *
  1061. * The OnCE Enable register selects the OnCE control source: When cleared (0), the OnCE registers
  1062. * are accessed through the JTAG interface; when set (1), the OnCE registers may be accessed by the
  1063. * ARM platform through the addresses described, as follows. After reset, the OnCE registers are
  1064. * accessed through the JTAG interface. Writing a 1 to ENB enables the ARM platform to access the
  1065. * ONCE_* as any other SDMA control register. When cleared (0), all the ONCE_xxx registers cannot be
  1066. * written. The value of ENB cannot be changed if the LOCK bit in the SDMA_LOCK register is set.
  1067. */
  1068. //@{
  1069. #define BP_SDMAARM_ONCE_ENB_ENB (0) //!< Bit position for SDMAARM_ONCE_ENB_ENB.
  1070. #define BM_SDMAARM_ONCE_ENB_ENB (0x00000001) //!< Bit mask for SDMAARM_ONCE_ENB_ENB.
  1071. //! @brief Get value of SDMAARM_ONCE_ENB_ENB from a register value.
  1072. #define BG_SDMAARM_ONCE_ENB_ENB(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_ENB_ENB) >> BP_SDMAARM_ONCE_ENB_ENB)
  1073. //! @brief Format value for bitfield SDMAARM_ONCE_ENB_ENB.
  1074. #define BF_SDMAARM_ONCE_ENB_ENB(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_ONCE_ENB_ENB) & BM_SDMAARM_ONCE_ENB_ENB)
  1075. #ifndef __LANGUAGE_ASM__
  1076. //! @brief Set the ENB field to a new value.
  1077. #define BW_SDMAARM_ONCE_ENB_ENB(v) (HW_SDMAARM_ONCE_ENB_WR((HW_SDMAARM_ONCE_ENB_RD() & ~BM_SDMAARM_ONCE_ENB_ENB) | BF_SDMAARM_ONCE_ENB_ENB(v)))
  1078. #endif
  1079. //@}
  1080. //-------------------------------------------------------------------------------------------
  1081. // HW_SDMAARM_ONCE_DATA - OnCE Data Register
  1082. //-------------------------------------------------------------------------------------------
  1083. #ifndef __LANGUAGE_ASM__
  1084. /*!
  1085. * @brief HW_SDMAARM_ONCE_DATA - OnCE Data Register (RW)
  1086. *
  1087. * Reset value: 0x00000000
  1088. */
  1089. typedef union _hw_sdmaarm_once_data
  1090. {
  1091. reg32_t U;
  1092. struct _hw_sdmaarm_once_data_bitfields
  1093. {
  1094. unsigned DATA : 32; //!< [31:0] Data register of the OnCE JTAG controller.
  1095. } B;
  1096. } hw_sdmaarm_once_data_t;
  1097. #endif
  1098. /*!
  1099. * @name Constants and macros for entire SDMAARM_ONCE_DATA register
  1100. */
  1101. //@{
  1102. #define HW_SDMAARM_ONCE_DATA_ADDR (REGS_SDMAARM_BASE + 0x44)
  1103. #ifndef __LANGUAGE_ASM__
  1104. #define HW_SDMAARM_ONCE_DATA (*(volatile hw_sdmaarm_once_data_t *) HW_SDMAARM_ONCE_DATA_ADDR)
  1105. #define HW_SDMAARM_ONCE_DATA_RD() (HW_SDMAARM_ONCE_DATA.U)
  1106. #define HW_SDMAARM_ONCE_DATA_WR(v) (HW_SDMAARM_ONCE_DATA.U = (v))
  1107. #define HW_SDMAARM_ONCE_DATA_SET(v) (HW_SDMAARM_ONCE_DATA_WR(HW_SDMAARM_ONCE_DATA_RD() | (v)))
  1108. #define HW_SDMAARM_ONCE_DATA_CLR(v) (HW_SDMAARM_ONCE_DATA_WR(HW_SDMAARM_ONCE_DATA_RD() & ~(v)))
  1109. #define HW_SDMAARM_ONCE_DATA_TOG(v) (HW_SDMAARM_ONCE_DATA_WR(HW_SDMAARM_ONCE_DATA_RD() ^ (v)))
  1110. #endif
  1111. //@}
  1112. /*
  1113. * constants & macros for individual SDMAARM_ONCE_DATA bitfields
  1114. */
  1115. /*! @name Register SDMAARM_ONCE_DATA, field DATA[31:0] (RW)
  1116. *
  1117. * Data register of the OnCE JTAG controller. Refer to for information on this register.
  1118. */
  1119. //@{
  1120. #define BP_SDMAARM_ONCE_DATA_DATA (0) //!< Bit position for SDMAARM_ONCE_DATA_DATA.
  1121. #define BM_SDMAARM_ONCE_DATA_DATA (0xffffffff) //!< Bit mask for SDMAARM_ONCE_DATA_DATA.
  1122. //! @brief Get value of SDMAARM_ONCE_DATA_DATA from a register value.
  1123. #define BG_SDMAARM_ONCE_DATA_DATA(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_DATA_DATA) >> BP_SDMAARM_ONCE_DATA_DATA)
  1124. //! @brief Format value for bitfield SDMAARM_ONCE_DATA_DATA.
  1125. #define BF_SDMAARM_ONCE_DATA_DATA(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_ONCE_DATA_DATA) & BM_SDMAARM_ONCE_DATA_DATA)
  1126. #ifndef __LANGUAGE_ASM__
  1127. //! @brief Set the DATA field to a new value.
  1128. #define BW_SDMAARM_ONCE_DATA_DATA(v) (HW_SDMAARM_ONCE_DATA_WR((HW_SDMAARM_ONCE_DATA_RD() & ~BM_SDMAARM_ONCE_DATA_DATA) | BF_SDMAARM_ONCE_DATA_DATA(v)))
  1129. #endif
  1130. //@}
  1131. //-------------------------------------------------------------------------------------------
  1132. // HW_SDMAARM_ONCE_INSTR - OnCE Instruction Register
  1133. //-------------------------------------------------------------------------------------------
  1134. #ifndef __LANGUAGE_ASM__
  1135. /*!
  1136. * @brief HW_SDMAARM_ONCE_INSTR - OnCE Instruction Register (RW)
  1137. *
  1138. * Reset value: 0x00000000
  1139. */
  1140. typedef union _hw_sdmaarm_once_instr
  1141. {
  1142. reg32_t U;
  1143. struct _hw_sdmaarm_once_instr_bitfields
  1144. {
  1145. unsigned INSTR : 16; //!< [15:0] Instruction register of the OnCE JTAG controller.
  1146. unsigned RESERVED0 : 16; //!< [31:16] Reserved
  1147. } B;
  1148. } hw_sdmaarm_once_instr_t;
  1149. #endif
  1150. /*!
  1151. * @name Constants and macros for entire SDMAARM_ONCE_INSTR register
  1152. */
  1153. //@{
  1154. #define HW_SDMAARM_ONCE_INSTR_ADDR (REGS_SDMAARM_BASE + 0x48)
  1155. #ifndef __LANGUAGE_ASM__
  1156. #define HW_SDMAARM_ONCE_INSTR (*(volatile hw_sdmaarm_once_instr_t *) HW_SDMAARM_ONCE_INSTR_ADDR)
  1157. #define HW_SDMAARM_ONCE_INSTR_RD() (HW_SDMAARM_ONCE_INSTR.U)
  1158. #define HW_SDMAARM_ONCE_INSTR_WR(v) (HW_SDMAARM_ONCE_INSTR.U = (v))
  1159. #define HW_SDMAARM_ONCE_INSTR_SET(v) (HW_SDMAARM_ONCE_INSTR_WR(HW_SDMAARM_ONCE_INSTR_RD() | (v)))
  1160. #define HW_SDMAARM_ONCE_INSTR_CLR(v) (HW_SDMAARM_ONCE_INSTR_WR(HW_SDMAARM_ONCE_INSTR_RD() & ~(v)))
  1161. #define HW_SDMAARM_ONCE_INSTR_TOG(v) (HW_SDMAARM_ONCE_INSTR_WR(HW_SDMAARM_ONCE_INSTR_RD() ^ (v)))
  1162. #endif
  1163. //@}
  1164. /*
  1165. * constants & macros for individual SDMAARM_ONCE_INSTR bitfields
  1166. */
  1167. /*! @name Register SDMAARM_ONCE_INSTR, field INSTR[15:0] (RW)
  1168. *
  1169. * Instruction register of the OnCE JTAG controller. Refer to for information on this register.
  1170. */
  1171. //@{
  1172. #define BP_SDMAARM_ONCE_INSTR_INSTR (0) //!< Bit position for SDMAARM_ONCE_INSTR_INSTR.
  1173. #define BM_SDMAARM_ONCE_INSTR_INSTR (0x0000ffff) //!< Bit mask for SDMAARM_ONCE_INSTR_INSTR.
  1174. //! @brief Get value of SDMAARM_ONCE_INSTR_INSTR from a register value.
  1175. #define BG_SDMAARM_ONCE_INSTR_INSTR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_INSTR_INSTR) >> BP_SDMAARM_ONCE_INSTR_INSTR)
  1176. //! @brief Format value for bitfield SDMAARM_ONCE_INSTR_INSTR.
  1177. #define BF_SDMAARM_ONCE_INSTR_INSTR(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_ONCE_INSTR_INSTR) & BM_SDMAARM_ONCE_INSTR_INSTR)
  1178. #ifndef __LANGUAGE_ASM__
  1179. //! @brief Set the INSTR field to a new value.
  1180. #define BW_SDMAARM_ONCE_INSTR_INSTR(v) (HW_SDMAARM_ONCE_INSTR_WR((HW_SDMAARM_ONCE_INSTR_RD() & ~BM_SDMAARM_ONCE_INSTR_INSTR) | BF_SDMAARM_ONCE_INSTR_INSTR(v)))
  1181. #endif
  1182. //@}
  1183. //-------------------------------------------------------------------------------------------
  1184. // HW_SDMAARM_ONCE_STAT - OnCE Status Register
  1185. //-------------------------------------------------------------------------------------------
  1186. #ifndef __LANGUAGE_ASM__
  1187. /*!
  1188. * @brief HW_SDMAARM_ONCE_STAT - OnCE Status Register (RO)
  1189. *
  1190. * Reset value: 0x0000e000
  1191. */
  1192. typedef union _hw_sdmaarm_once_stat
  1193. {
  1194. reg32_t U;
  1195. struct _hw_sdmaarm_once_stat_bitfields
  1196. {
  1197. unsigned ECDR : 3; //!< [2:0] Event Cell Debug Request.
  1198. unsigned RESERVED0 : 4; //!< [6:3] Reserved
  1199. unsigned MST : 1; //!< [7] This flag is raised when the OnCE is controlled from the ARM platform peripheral interface.
  1200. unsigned SWB : 1; //!< [8] This flag is raised when the SDMA has entered debug mode after a software breakpoint.
  1201. unsigned ODR : 1; //!< [9] This flag is raised when the SDMA has entered debug mode after a OnCE debug request.
  1202. unsigned EDR : 1; //!< [10] This flag is raised when the SDMA has entered debug mode after an external debug request.
  1203. unsigned RCV : 1; //!< [11] After each write access to the real time buffer (RTB), the RCV bit is set.
  1204. unsigned PST : 4; //!< [15:12] The Processor Status bits reflect the state of the SDMA RISC engine.
  1205. unsigned RESERVED1 : 16; //!< [31:16] Reserved
  1206. } B;
  1207. } hw_sdmaarm_once_stat_t;
  1208. #endif
  1209. /*!
  1210. * @name Constants and macros for entire SDMAARM_ONCE_STAT register
  1211. */
  1212. //@{
  1213. #define HW_SDMAARM_ONCE_STAT_ADDR (REGS_SDMAARM_BASE + 0x4c)
  1214. #ifndef __LANGUAGE_ASM__
  1215. #define HW_SDMAARM_ONCE_STAT (*(volatile hw_sdmaarm_once_stat_t *) HW_SDMAARM_ONCE_STAT_ADDR)
  1216. #define HW_SDMAARM_ONCE_STAT_RD() (HW_SDMAARM_ONCE_STAT.U)
  1217. #endif
  1218. //@}
  1219. /*
  1220. * constants & macros for individual SDMAARM_ONCE_STAT bitfields
  1221. */
  1222. /*! @name Register SDMAARM_ONCE_STAT, field ECDR[2:0] (RO)
  1223. *
  1224. * Event Cell Debug Request. If the debug request comes from the event cell, the reason for entering
  1225. * debug mode is given by the EDR bits. If all three bits of the EDR are reset, then it did not
  1226. * generate any debug request. If the cell did generate a debug request, then at least one of the
  1227. * EDR bits is set (the meaning of the encoding is given below). The encoding of the EDR bits is
  1228. * useful to find out more precisely why the debug request was generated. A debug request from an
  1229. * event cell is generated for a specific combination of the addra_cond, addrb_cond, and data_cond
  1230. * conditions. The value of those fields is given by the EDR bits.
  1231. *
  1232. * Values:
  1233. * - 0 - 1 matched addra_cond
  1234. * - 1 - 1 matched addrb_cond
  1235. * - 2 - 1 matched data_cond
  1236. */
  1237. //@{
  1238. #define BP_SDMAARM_ONCE_STAT_ECDR (0) //!< Bit position for SDMAARM_ONCE_STAT_ECDR.
  1239. #define BM_SDMAARM_ONCE_STAT_ECDR (0x00000007) //!< Bit mask for SDMAARM_ONCE_STAT_ECDR.
  1240. //! @brief Get value of SDMAARM_ONCE_STAT_ECDR from a register value.
  1241. #define BG_SDMAARM_ONCE_STAT_ECDR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_STAT_ECDR) >> BP_SDMAARM_ONCE_STAT_ECDR)
  1242. //@}
  1243. /*! @name Register SDMAARM_ONCE_STAT, field MST[7] (RO)
  1244. *
  1245. * This flag is raised when the OnCE is controlled from the ARM platform peripheral interface.
  1246. *
  1247. * Values:
  1248. * - 0 - The JTAG interface controls the OnCE.
  1249. * - 1 - The ARM platform peripheral interface controls the OnCE.
  1250. */
  1251. //@{
  1252. #define BP_SDMAARM_ONCE_STAT_MST (7) //!< Bit position for SDMAARM_ONCE_STAT_MST.
  1253. #define BM_SDMAARM_ONCE_STAT_MST (0x00000080) //!< Bit mask for SDMAARM_ONCE_STAT_MST.
  1254. //! @brief Get value of SDMAARM_ONCE_STAT_MST from a register value.
  1255. #define BG_SDMAARM_ONCE_STAT_MST(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_STAT_MST) >> BP_SDMAARM_ONCE_STAT_MST)
  1256. //@}
  1257. /*! @name Register SDMAARM_ONCE_STAT, field SWB[8] (RO)
  1258. *
  1259. * This flag is raised when the SDMA has entered debug mode after a software breakpoint.
  1260. */
  1261. //@{
  1262. #define BP_SDMAARM_ONCE_STAT_SWB (8) //!< Bit position for SDMAARM_ONCE_STAT_SWB.
  1263. #define BM_SDMAARM_ONCE_STAT_SWB (0x00000100) //!< Bit mask for SDMAARM_ONCE_STAT_SWB.
  1264. //! @brief Get value of SDMAARM_ONCE_STAT_SWB from a register value.
  1265. #define BG_SDMAARM_ONCE_STAT_SWB(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_STAT_SWB) >> BP_SDMAARM_ONCE_STAT_SWB)
  1266. //@}
  1267. /*! @name Register SDMAARM_ONCE_STAT, field ODR[9] (RO)
  1268. *
  1269. * This flag is raised when the SDMA has entered debug mode after a OnCE debug request.
  1270. */
  1271. //@{
  1272. #define BP_SDMAARM_ONCE_STAT_ODR (9) //!< Bit position for SDMAARM_ONCE_STAT_ODR.
  1273. #define BM_SDMAARM_ONCE_STAT_ODR (0x00000200) //!< Bit mask for SDMAARM_ONCE_STAT_ODR.
  1274. //! @brief Get value of SDMAARM_ONCE_STAT_ODR from a register value.
  1275. #define BG_SDMAARM_ONCE_STAT_ODR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_STAT_ODR) >> BP_SDMAARM_ONCE_STAT_ODR)
  1276. //@}
  1277. /*! @name Register SDMAARM_ONCE_STAT, field EDR[10] (RO)
  1278. *
  1279. * This flag is raised when the SDMA has entered debug mode after an external debug request.
  1280. */
  1281. //@{
  1282. #define BP_SDMAARM_ONCE_STAT_EDR (10) //!< Bit position for SDMAARM_ONCE_STAT_EDR.
  1283. #define BM_SDMAARM_ONCE_STAT_EDR (0x00000400) //!< Bit mask for SDMAARM_ONCE_STAT_EDR.
  1284. //! @brief Get value of SDMAARM_ONCE_STAT_EDR from a register value.
  1285. #define BG_SDMAARM_ONCE_STAT_EDR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_STAT_EDR) >> BP_SDMAARM_ONCE_STAT_EDR)
  1286. //@}
  1287. /*! @name Register SDMAARM_ONCE_STAT, field RCV[11] (RO)
  1288. *
  1289. * After each write access to the real time buffer (RTB), the RCV bit is set. This bit is cleared
  1290. * after execution of an rbuffer command and on a JTAG reset.
  1291. */
  1292. //@{
  1293. #define BP_SDMAARM_ONCE_STAT_RCV (11) //!< Bit position for SDMAARM_ONCE_STAT_RCV.
  1294. #define BM_SDMAARM_ONCE_STAT_RCV (0x00000800) //!< Bit mask for SDMAARM_ONCE_STAT_RCV.
  1295. //! @brief Get value of SDMAARM_ONCE_STAT_RCV from a register value.
  1296. #define BG_SDMAARM_ONCE_STAT_RCV(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_STAT_RCV) >> BP_SDMAARM_ONCE_STAT_RCV)
  1297. //@}
  1298. /*! @name Register SDMAARM_ONCE_STAT, field PST[15:12] (RO)
  1299. *
  1300. * The Processor Status bits reflect the state of the SDMA RISC engine. Its states are as follows:
  1301. * The "Program" state is the usual instruction execution cycle. The "Data" state is inserted when
  1302. * there are wait-states during a load or a store on the data bus (ld or st). The "Change of Flow"
  1303. * state is the second cycle of any instruction that breaks the sequence of instructions (jumps and
  1304. * channel switching instructions). The "Change of Flow in Loop" state is used when an error causes
  1305. * a hardware loop exit. The "Debug" state means the SDMA is in debug mode. The "Functional Unit"
  1306. * state is inserted when there are wait-states during a load or a store on the functional units bus
  1307. * (ldf or stf). In "Sleep" modes, no script is running (this is the RISC engine idle state). The
  1308. * "after Reset" is slightly different because no context restoring phase will happen when a channel
  1309. * is triggered: The script located at address 0 will be executed (boot operation). The "in Sleep"
  1310. * states are the same as above except they do not have any corresponding channel: They are used
  1311. * when entering debug mode after reset. The reason is that it is necessary to return to the "Sleep
  1312. * after Reset" state when leaving debug mode.
  1313. *
  1314. * Values:
  1315. * - 0 - Program
  1316. * - 1 - Data
  1317. * - 2 - Change of Flow
  1318. * - 3 - Change of Flow in Loop
  1319. * - 4 - Debug
  1320. * - 5 - Functional Unit
  1321. * - 6 - Sleep
  1322. * - 7 - Save
  1323. * - 8 - Program in Sleep
  1324. * - 9 - Data in Sleep
  1325. * - 10 - Change of Flow in Sleep
  1326. * - 11 - Change Flow in Loop in Sleep
  1327. * - 12 - Debug in Sleep
  1328. * - 13 - Functional Unit in Sleep
  1329. * - 14 - Sleep after Reset
  1330. * - 15 - Restore
  1331. */
  1332. //@{
  1333. #define BP_SDMAARM_ONCE_STAT_PST (12) //!< Bit position for SDMAARM_ONCE_STAT_PST.
  1334. #define BM_SDMAARM_ONCE_STAT_PST (0x0000f000) //!< Bit mask for SDMAARM_ONCE_STAT_PST.
  1335. //! @brief Get value of SDMAARM_ONCE_STAT_PST from a register value.
  1336. #define BG_SDMAARM_ONCE_STAT_PST(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_STAT_PST) >> BP_SDMAARM_ONCE_STAT_PST)
  1337. //@}
  1338. //-------------------------------------------------------------------------------------------
  1339. // HW_SDMAARM_ONCE_CMD - OnCE Command Register
  1340. //-------------------------------------------------------------------------------------------
  1341. #ifndef __LANGUAGE_ASM__
  1342. /*!
  1343. * @brief HW_SDMAARM_ONCE_CMD - OnCE Command Register (RW)
  1344. *
  1345. * Reset value: 0x00000000
  1346. */
  1347. typedef union _hw_sdmaarm_once_cmd
  1348. {
  1349. reg32_t U;
  1350. struct _hw_sdmaarm_once_cmd_bitfields
  1351. {
  1352. unsigned CMD : 4; //!< [3:0] Writing to this register will cause the OnCE to execute the command that is written.
  1353. unsigned RESERVED0 : 28; //!< [31:4] Reserved
  1354. } B;
  1355. } hw_sdmaarm_once_cmd_t;
  1356. #endif
  1357. /*!
  1358. * @name Constants and macros for entire SDMAARM_ONCE_CMD register
  1359. */
  1360. //@{
  1361. #define HW_SDMAARM_ONCE_CMD_ADDR (REGS_SDMAARM_BASE + 0x50)
  1362. #ifndef __LANGUAGE_ASM__
  1363. #define HW_SDMAARM_ONCE_CMD (*(volatile hw_sdmaarm_once_cmd_t *) HW_SDMAARM_ONCE_CMD_ADDR)
  1364. #define HW_SDMAARM_ONCE_CMD_RD() (HW_SDMAARM_ONCE_CMD.U)
  1365. #define HW_SDMAARM_ONCE_CMD_WR(v) (HW_SDMAARM_ONCE_CMD.U = (v))
  1366. #define HW_SDMAARM_ONCE_CMD_SET(v) (HW_SDMAARM_ONCE_CMD_WR(HW_SDMAARM_ONCE_CMD_RD() | (v)))
  1367. #define HW_SDMAARM_ONCE_CMD_CLR(v) (HW_SDMAARM_ONCE_CMD_WR(HW_SDMAARM_ONCE_CMD_RD() & ~(v)))
  1368. #define HW_SDMAARM_ONCE_CMD_TOG(v) (HW_SDMAARM_ONCE_CMD_WR(HW_SDMAARM_ONCE_CMD_RD() ^ (v)))
  1369. #endif
  1370. //@}
  1371. /*
  1372. * constants & macros for individual SDMAARM_ONCE_CMD bitfields
  1373. */
  1374. /*! @name Register SDMAARM_ONCE_CMD, field CMD[3:0] (RW)
  1375. *
  1376. * Writing to this register will cause the OnCE to execute the command that is written. When needed,
  1377. * the ONCE_DATA and ONCE_INSTR registers should be loaded with the correct value before writing the
  1378. * command to that register. For a list of the OnCE commands and their usage, see . 7-15 reserved
  1379. *
  1380. * Values:
  1381. * - 0 - rstatus
  1382. * - 1 - dmov
  1383. * - 2 - exec_once
  1384. * - 3 - run_core
  1385. * - 4 - exec_core
  1386. * - 5 - debug_rqst
  1387. * - 6 - rbuffer
  1388. */
  1389. //@{
  1390. #define BP_SDMAARM_ONCE_CMD_CMD (0) //!< Bit position for SDMAARM_ONCE_CMD_CMD.
  1391. #define BM_SDMAARM_ONCE_CMD_CMD (0x0000000f) //!< Bit mask for SDMAARM_ONCE_CMD_CMD.
  1392. //! @brief Get value of SDMAARM_ONCE_CMD_CMD from a register value.
  1393. #define BG_SDMAARM_ONCE_CMD_CMD(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ONCE_CMD_CMD) >> BP_SDMAARM_ONCE_CMD_CMD)
  1394. //! @brief Format value for bitfield SDMAARM_ONCE_CMD_CMD.
  1395. #define BF_SDMAARM_ONCE_CMD_CMD(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_ONCE_CMD_CMD) & BM_SDMAARM_ONCE_CMD_CMD)
  1396. #ifndef __LANGUAGE_ASM__
  1397. //! @brief Set the CMD field to a new value.
  1398. #define BW_SDMAARM_ONCE_CMD_CMD(v) (HW_SDMAARM_ONCE_CMD_WR((HW_SDMAARM_ONCE_CMD_RD() & ~BM_SDMAARM_ONCE_CMD_CMD) | BF_SDMAARM_ONCE_CMD_CMD(v)))
  1399. #endif
  1400. //@}
  1401. //-------------------------------------------------------------------------------------------
  1402. // HW_SDMAARM_ILLINSTADDR - Illegal Instruction Trap Address
  1403. //-------------------------------------------------------------------------------------------
  1404. #ifndef __LANGUAGE_ASM__
  1405. /*!
  1406. * @brief HW_SDMAARM_ILLINSTADDR - Illegal Instruction Trap Address (RW)
  1407. *
  1408. * Reset value: 0x00000001
  1409. */
  1410. typedef union _hw_sdmaarm_illinstaddr
  1411. {
  1412. reg32_t U;
  1413. struct _hw_sdmaarm_illinstaddr_bitfields
  1414. {
  1415. unsigned ILLINSTADDR : 14; //!< [13:0] The Illegal Instruction Trap Address is the address where the SDMA jumps when an illegal instruction is executed.
  1416. unsigned RESERVED0 : 18; //!< [31:14] Reserved
  1417. } B;
  1418. } hw_sdmaarm_illinstaddr_t;
  1419. #endif
  1420. /*!
  1421. * @name Constants and macros for entire SDMAARM_ILLINSTADDR register
  1422. */
  1423. //@{
  1424. #define HW_SDMAARM_ILLINSTADDR_ADDR (REGS_SDMAARM_BASE + 0x58)
  1425. #ifndef __LANGUAGE_ASM__
  1426. #define HW_SDMAARM_ILLINSTADDR (*(volatile hw_sdmaarm_illinstaddr_t *) HW_SDMAARM_ILLINSTADDR_ADDR)
  1427. #define HW_SDMAARM_ILLINSTADDR_RD() (HW_SDMAARM_ILLINSTADDR.U)
  1428. #define HW_SDMAARM_ILLINSTADDR_WR(v) (HW_SDMAARM_ILLINSTADDR.U = (v))
  1429. #define HW_SDMAARM_ILLINSTADDR_SET(v) (HW_SDMAARM_ILLINSTADDR_WR(HW_SDMAARM_ILLINSTADDR_RD() | (v)))
  1430. #define HW_SDMAARM_ILLINSTADDR_CLR(v) (HW_SDMAARM_ILLINSTADDR_WR(HW_SDMAARM_ILLINSTADDR_RD() & ~(v)))
  1431. #define HW_SDMAARM_ILLINSTADDR_TOG(v) (HW_SDMAARM_ILLINSTADDR_WR(HW_SDMAARM_ILLINSTADDR_RD() ^ (v)))
  1432. #endif
  1433. //@}
  1434. /*
  1435. * constants & macros for individual SDMAARM_ILLINSTADDR bitfields
  1436. */
  1437. /*! @name Register SDMAARM_ILLINSTADDR, field ILLINSTADDR[13:0] (RW)
  1438. *
  1439. * The Illegal Instruction Trap Address is the address where the SDMA jumps when an illegal
  1440. * instruction is executed. It is 0x0001 after reset. The value of ILLINSTADDR cannot be changed if
  1441. * the LOCK bit in the SDMA_LOCK register is set.
  1442. */
  1443. //@{
  1444. #define BP_SDMAARM_ILLINSTADDR_ILLINSTADDR (0) //!< Bit position for SDMAARM_ILLINSTADDR_ILLINSTADDR.
  1445. #define BM_SDMAARM_ILLINSTADDR_ILLINSTADDR (0x00003fff) //!< Bit mask for SDMAARM_ILLINSTADDR_ILLINSTADDR.
  1446. //! @brief Get value of SDMAARM_ILLINSTADDR_ILLINSTADDR from a register value.
  1447. #define BG_SDMAARM_ILLINSTADDR_ILLINSTADDR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_ILLINSTADDR_ILLINSTADDR) >> BP_SDMAARM_ILLINSTADDR_ILLINSTADDR)
  1448. //! @brief Format value for bitfield SDMAARM_ILLINSTADDR_ILLINSTADDR.
  1449. #define BF_SDMAARM_ILLINSTADDR_ILLINSTADDR(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_ILLINSTADDR_ILLINSTADDR) & BM_SDMAARM_ILLINSTADDR_ILLINSTADDR)
  1450. #ifndef __LANGUAGE_ASM__
  1451. //! @brief Set the ILLINSTADDR field to a new value.
  1452. #define BW_SDMAARM_ILLINSTADDR_ILLINSTADDR(v) (HW_SDMAARM_ILLINSTADDR_WR((HW_SDMAARM_ILLINSTADDR_RD() & ~BM_SDMAARM_ILLINSTADDR_ILLINSTADDR) | BF_SDMAARM_ILLINSTADDR_ILLINSTADDR(v)))
  1453. #endif
  1454. //@}
  1455. //-------------------------------------------------------------------------------------------
  1456. // HW_SDMAARM_CHN0ADDR - Channel 0 Boot Address
  1457. //-------------------------------------------------------------------------------------------
  1458. #ifndef __LANGUAGE_ASM__
  1459. /*!
  1460. * @brief HW_SDMAARM_CHN0ADDR - Channel 0 Boot Address (RW)
  1461. *
  1462. * Reset value: 0x00000050
  1463. */
  1464. typedef union _hw_sdmaarm_chn0addr
  1465. {
  1466. reg32_t U;
  1467. struct _hw_sdmaarm_chn0addr_bitfields
  1468. {
  1469. unsigned CHN0ADDR : 14; //!< [13:0] This 14-bit register is used by the boot code of the SDMA.
  1470. unsigned SMSZ : 1; //!< [14] The bit 14 (Scratch Memory Size) determines if scratch memory must be available after every channel context.
  1471. unsigned RESERVED0 : 17; //!< [31:15] Reserved
  1472. } B;
  1473. } hw_sdmaarm_chn0addr_t;
  1474. #endif
  1475. /*!
  1476. * @name Constants and macros for entire SDMAARM_CHN0ADDR register
  1477. */
  1478. //@{
  1479. #define HW_SDMAARM_CHN0ADDR_ADDR (REGS_SDMAARM_BASE + 0x5c)
  1480. #ifndef __LANGUAGE_ASM__
  1481. #define HW_SDMAARM_CHN0ADDR (*(volatile hw_sdmaarm_chn0addr_t *) HW_SDMAARM_CHN0ADDR_ADDR)
  1482. #define HW_SDMAARM_CHN0ADDR_RD() (HW_SDMAARM_CHN0ADDR.U)
  1483. #define HW_SDMAARM_CHN0ADDR_WR(v) (HW_SDMAARM_CHN0ADDR.U = (v))
  1484. #define HW_SDMAARM_CHN0ADDR_SET(v) (HW_SDMAARM_CHN0ADDR_WR(HW_SDMAARM_CHN0ADDR_RD() | (v)))
  1485. #define HW_SDMAARM_CHN0ADDR_CLR(v) (HW_SDMAARM_CHN0ADDR_WR(HW_SDMAARM_CHN0ADDR_RD() & ~(v)))
  1486. #define HW_SDMAARM_CHN0ADDR_TOG(v) (HW_SDMAARM_CHN0ADDR_WR(HW_SDMAARM_CHN0ADDR_RD() ^ (v)))
  1487. #endif
  1488. //@}
  1489. /*
  1490. * constants & macros for individual SDMAARM_CHN0ADDR bitfields
  1491. */
  1492. /*! @name Register SDMAARM_CHN0ADDR, field CHN0ADDR[13:0] (RW)
  1493. *
  1494. * This 14-bit register is used by the boot code of the SDMA. After reset, it points to the standard
  1495. * boot routine in ROM (channel 0 routine). By changing this address, you can perform a boot
  1496. * sequence with your own routine. The very first instructions of the boot code fetch the contents
  1497. * of this register (it is also mapped in the SDMA memory space) and jump to the given address. The
  1498. * reset value is 0x0050 (decimal 80). The value of CHN0ADDR cannot be changed if the LOCK bit in
  1499. * the SDMA_LOCK register is set.
  1500. */
  1501. //@{
  1502. #define BP_SDMAARM_CHN0ADDR_CHN0ADDR (0) //!< Bit position for SDMAARM_CHN0ADDR_CHN0ADDR.
  1503. #define BM_SDMAARM_CHN0ADDR_CHN0ADDR (0x00003fff) //!< Bit mask for SDMAARM_CHN0ADDR_CHN0ADDR.
  1504. //! @brief Get value of SDMAARM_CHN0ADDR_CHN0ADDR from a register value.
  1505. #define BG_SDMAARM_CHN0ADDR_CHN0ADDR(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_CHN0ADDR_CHN0ADDR) >> BP_SDMAARM_CHN0ADDR_CHN0ADDR)
  1506. //! @brief Format value for bitfield SDMAARM_CHN0ADDR_CHN0ADDR.
  1507. #define BF_SDMAARM_CHN0ADDR_CHN0ADDR(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_CHN0ADDR_CHN0ADDR) & BM_SDMAARM_CHN0ADDR_CHN0ADDR)
  1508. #ifndef __LANGUAGE_ASM__
  1509. //! @brief Set the CHN0ADDR field to a new value.
  1510. #define BW_SDMAARM_CHN0ADDR_CHN0ADDR(v) (HW_SDMAARM_CHN0ADDR_WR((HW_SDMAARM_CHN0ADDR_RD() & ~BM_SDMAARM_CHN0ADDR_CHN0ADDR) | BF_SDMAARM_CHN0ADDR_CHN0ADDR(v)))
  1511. #endif
  1512. //@}
  1513. /*! @name Register SDMAARM_CHN0ADDR, field SMSZ[14] (RW)
  1514. *
  1515. * The bit 14 (Scratch Memory Size) determines if scratch memory must be available after every
  1516. * channel context. After reset, it is equal to 0, which defines a RAM space of 24 words for each
  1517. * channel. All of this area stores the channel context. By setting this bit, 32 words are reserved
  1518. * for every channel context, which gives eight additional words that can be used by the channel
  1519. * script to store any type of data. Those words are never erased by the context switching
  1520. * mechanism. The value of SMSZ cannot be changed if the LOCK bit in the SDMA_LOCK register is set.
  1521. *
  1522. * Values:
  1523. * - 0 - 24 words per context
  1524. * - 1 - 32 words per context
  1525. */
  1526. //@{
  1527. #define BP_SDMAARM_CHN0ADDR_SMSZ (14) //!< Bit position for SDMAARM_CHN0ADDR_SMSZ.
  1528. #define BM_SDMAARM_CHN0ADDR_SMSZ (0x00004000) //!< Bit mask for SDMAARM_CHN0ADDR_SMSZ.
  1529. //! @brief Get value of SDMAARM_CHN0ADDR_SMSZ from a register value.
  1530. #define BG_SDMAARM_CHN0ADDR_SMSZ(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_CHN0ADDR_SMSZ) >> BP_SDMAARM_CHN0ADDR_SMSZ)
  1531. //! @brief Format value for bitfield SDMAARM_CHN0ADDR_SMSZ.
  1532. #define BF_SDMAARM_CHN0ADDR_SMSZ(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_CHN0ADDR_SMSZ) & BM_SDMAARM_CHN0ADDR_SMSZ)
  1533. #ifndef __LANGUAGE_ASM__
  1534. //! @brief Set the SMSZ field to a new value.
  1535. #define BW_SDMAARM_CHN0ADDR_SMSZ(v) (HW_SDMAARM_CHN0ADDR_WR((HW_SDMAARM_CHN0ADDR_RD() & ~BM_SDMAARM_CHN0ADDR_SMSZ) | BF_SDMAARM_CHN0ADDR_SMSZ(v)))
  1536. #endif
  1537. //@}
  1538. //-------------------------------------------------------------------------------------------
  1539. // HW_SDMAARM_EVT_MIRROR - DMA Requests
  1540. //-------------------------------------------------------------------------------------------
  1541. #ifndef __LANGUAGE_ASM__
  1542. /*!
  1543. * @brief HW_SDMAARM_EVT_MIRROR - DMA Requests (RO)
  1544. *
  1545. * Reset value: 0x00000000
  1546. */
  1547. typedef union _hw_sdmaarm_evt_mirror
  1548. {
  1549. reg32_t U;
  1550. struct _hw_sdmaarm_evt_mirror_bitfields
  1551. {
  1552. unsigned EVENTS : 32; //!< [31:0] This register reflects the DMA requests received by the SDMA for events 31-0.
  1553. } B;
  1554. } hw_sdmaarm_evt_mirror_t;
  1555. #endif
  1556. /*!
  1557. * @name Constants and macros for entire SDMAARM_EVT_MIRROR register
  1558. */
  1559. //@{
  1560. #define HW_SDMAARM_EVT_MIRROR_ADDR (REGS_SDMAARM_BASE + 0x60)
  1561. #ifndef __LANGUAGE_ASM__
  1562. #define HW_SDMAARM_EVT_MIRROR (*(volatile hw_sdmaarm_evt_mirror_t *) HW_SDMAARM_EVT_MIRROR_ADDR)
  1563. #define HW_SDMAARM_EVT_MIRROR_RD() (HW_SDMAARM_EVT_MIRROR.U)
  1564. #endif
  1565. //@}
  1566. /*
  1567. * constants & macros for individual SDMAARM_EVT_MIRROR bitfields
  1568. */
  1569. /*! @name Register SDMAARM_EVT_MIRROR, field EVENTS[31:0] (RO)
  1570. *
  1571. * This register reflects the DMA requests received by the SDMA for events 31-0. The ARM platform
  1572. * and the SDMA have a read-only access. There is one bit associated with each of 32 DMA request
  1573. * events. This information may be useful during debug of the blocks that generate the DMA requests.
  1574. * The EVT_MIRROR register is cleared following read access.
  1575. *
  1576. * Values:
  1577. * - 0 - DMA request event not pending
  1578. * - 1 - DMA request event pending
  1579. */
  1580. //@{
  1581. #define BP_SDMAARM_EVT_MIRROR_EVENTS (0) //!< Bit position for SDMAARM_EVT_MIRROR_EVENTS.
  1582. #define BM_SDMAARM_EVT_MIRROR_EVENTS (0xffffffff) //!< Bit mask for SDMAARM_EVT_MIRROR_EVENTS.
  1583. //! @brief Get value of SDMAARM_EVT_MIRROR_EVENTS from a register value.
  1584. #define BG_SDMAARM_EVT_MIRROR_EVENTS(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_EVT_MIRROR_EVENTS) >> BP_SDMAARM_EVT_MIRROR_EVENTS)
  1585. //@}
  1586. //-------------------------------------------------------------------------------------------
  1587. // HW_SDMAARM_EVT_MIRROR2 - DMA Requests 2
  1588. //-------------------------------------------------------------------------------------------
  1589. #ifndef __LANGUAGE_ASM__
  1590. /*!
  1591. * @brief HW_SDMAARM_EVT_MIRROR2 - DMA Requests 2 (RO)
  1592. *
  1593. * Reset value: 0x00000000
  1594. */
  1595. typedef union _hw_sdmaarm_evt_mirror2
  1596. {
  1597. reg32_t U;
  1598. struct _hw_sdmaarm_evt_mirror2_bitfields
  1599. {
  1600. unsigned EVENTS : 16; //!< [15:0] This register reflects the DMA requests received by the SDMA for events 47-32.
  1601. unsigned RESERVED0 : 16; //!< [31:16] Reserved
  1602. } B;
  1603. } hw_sdmaarm_evt_mirror2_t;
  1604. #endif
  1605. /*!
  1606. * @name Constants and macros for entire SDMAARM_EVT_MIRROR2 register
  1607. */
  1608. //@{
  1609. #define HW_SDMAARM_EVT_MIRROR2_ADDR (REGS_SDMAARM_BASE + 0x64)
  1610. #ifndef __LANGUAGE_ASM__
  1611. #define HW_SDMAARM_EVT_MIRROR2 (*(volatile hw_sdmaarm_evt_mirror2_t *) HW_SDMAARM_EVT_MIRROR2_ADDR)
  1612. #define HW_SDMAARM_EVT_MIRROR2_RD() (HW_SDMAARM_EVT_MIRROR2.U)
  1613. #endif
  1614. //@}
  1615. /*
  1616. * constants & macros for individual SDMAARM_EVT_MIRROR2 bitfields
  1617. */
  1618. /*! @name Register SDMAARM_EVT_MIRROR2, field EVENTS[15:0] (RO)
  1619. *
  1620. * This register reflects the DMA requests received by the SDMA for events 47-32. The ARM platform
  1621. * and the SDMA have a read-only access. There is one bit associated with each of DMA request
  1622. * events. This information may be useful during debug of the blocks that generate the DMA requests.
  1623. * The EVT_MIRROR2 register is cleared following read access.
  1624. *
  1625. * Values:
  1626. * - 0 - - DMA request event not pending
  1627. * - 1- - DMA request event pending
  1628. */
  1629. //@{
  1630. #define BP_SDMAARM_EVT_MIRROR2_EVENTS (0) //!< Bit position for SDMAARM_EVT_MIRROR2_EVENTS.
  1631. #define BM_SDMAARM_EVT_MIRROR2_EVENTS (0x0000ffff) //!< Bit mask for SDMAARM_EVT_MIRROR2_EVENTS.
  1632. //! @brief Get value of SDMAARM_EVT_MIRROR2_EVENTS from a register value.
  1633. #define BG_SDMAARM_EVT_MIRROR2_EVENTS(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_EVT_MIRROR2_EVENTS) >> BP_SDMAARM_EVT_MIRROR2_EVENTS)
  1634. //@}
  1635. //-------------------------------------------------------------------------------------------
  1636. // HW_SDMAARM_XTRIG_CONF1 - Cross-Trigger Events Configuration Register 1
  1637. //-------------------------------------------------------------------------------------------
  1638. #ifndef __LANGUAGE_ASM__
  1639. /*!
  1640. * @brief HW_SDMAARM_XTRIG_CONF1 - Cross-Trigger Events Configuration Register 1 (RW)
  1641. *
  1642. * Reset value: 0x00000000
  1643. */
  1644. typedef union _hw_sdmaarm_xtrig_conf1
  1645. {
  1646. reg32_t U;
  1647. struct _hw_sdmaarm_xtrig_conf1_bitfields
  1648. {
  1649. unsigned NUM0 : 6; //!< [5:0] Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger event line number i .
  1650. unsigned CNF0 : 1; //!< [6] Configuration of the SDMA event line number i that is connected to the cross-trigger.
  1651. unsigned RESERVED0 : 1; //!< [7] Reserved
  1652. unsigned NUM1 : 6; //!< [13:8] Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger event line number i .
  1653. unsigned CNF1 : 1; //!< [14] Configuration of the SDMA event line number i that is connected to the cross-trigger.
  1654. unsigned RESERVED1 : 1; //!< [15] Reserved
  1655. unsigned NUM2 : 6; //!< [21:16] Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger event line number i .
  1656. unsigned CNF2 : 1; //!< [22] Configuration of the SDMA event line number i that is connected to the cross-trigger.
  1657. unsigned RESERVED2 : 1; //!< [23] Reserved
  1658. unsigned NUM3 : 6; //!< [29:24] Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger event line number i .
  1659. unsigned CNF3 : 1; //!< [30] Configuration of the SDMA event line number i that is connected to the cross-trigger.
  1660. unsigned RESERVED3 : 1; //!< [31] Reserved
  1661. } B;
  1662. } hw_sdmaarm_xtrig_conf1_t;
  1663. #endif
  1664. /*!
  1665. * @name Constants and macros for entire SDMAARM_XTRIG_CONF1 register
  1666. */
  1667. //@{
  1668. #define HW_SDMAARM_XTRIG_CONF1_ADDR (REGS_SDMAARM_BASE + 0x70)
  1669. #ifndef __LANGUAGE_ASM__
  1670. #define HW_SDMAARM_XTRIG_CONF1 (*(volatile hw_sdmaarm_xtrig_conf1_t *) HW_SDMAARM_XTRIG_CONF1_ADDR)
  1671. #define HW_SDMAARM_XTRIG_CONF1_RD() (HW_SDMAARM_XTRIG_CONF1.U)
  1672. #define HW_SDMAARM_XTRIG_CONF1_WR(v) (HW_SDMAARM_XTRIG_CONF1.U = (v))
  1673. #define HW_SDMAARM_XTRIG_CONF1_SET(v) (HW_SDMAARM_XTRIG_CONF1_WR(HW_SDMAARM_XTRIG_CONF1_RD() | (v)))
  1674. #define HW_SDMAARM_XTRIG_CONF1_CLR(v) (HW_SDMAARM_XTRIG_CONF1_WR(HW_SDMAARM_XTRIG_CONF1_RD() & ~(v)))
  1675. #define HW_SDMAARM_XTRIG_CONF1_TOG(v) (HW_SDMAARM_XTRIG_CONF1_WR(HW_SDMAARM_XTRIG_CONF1_RD() ^ (v)))
  1676. #endif
  1677. //@}
  1678. /*
  1679. * constants & macros for individual SDMAARM_XTRIG_CONF1 bitfields
  1680. */
  1681. /*! @name Register SDMAARM_XTRIG_CONF1, field NUM0[5:0] (RW)
  1682. *
  1683. * Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger
  1684. * event line number i .
  1685. */
  1686. //@{
  1687. #define BP_SDMAARM_XTRIG_CONF1_NUM0 (0) //!< Bit position for SDMAARM_XTRIG_CONF1_NUM0.
  1688. #define BM_SDMAARM_XTRIG_CONF1_NUM0 (0x0000003f) //!< Bit mask for SDMAARM_XTRIG_CONF1_NUM0.
  1689. //! @brief Get value of SDMAARM_XTRIG_CONF1_NUM0 from a register value.
  1690. #define BG_SDMAARM_XTRIG_CONF1_NUM0(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF1_NUM0) >> BP_SDMAARM_XTRIG_CONF1_NUM0)
  1691. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF1_NUM0.
  1692. #define BF_SDMAARM_XTRIG_CONF1_NUM0(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF1_NUM0) & BM_SDMAARM_XTRIG_CONF1_NUM0)
  1693. #ifndef __LANGUAGE_ASM__
  1694. //! @brief Set the NUM0 field to a new value.
  1695. #define BW_SDMAARM_XTRIG_CONF1_NUM0(v) (HW_SDMAARM_XTRIG_CONF1_WR((HW_SDMAARM_XTRIG_CONF1_RD() & ~BM_SDMAARM_XTRIG_CONF1_NUM0) | BF_SDMAARM_XTRIG_CONF1_NUM0(v)))
  1696. #endif
  1697. //@}
  1698. /*! @name Register SDMAARM_XTRIG_CONF1, field CNF0[6] (RW)
  1699. *
  1700. * Configuration of the SDMA event line number i that is connected to the cross-trigger. It
  1701. * determines whether the event line pulse is generated by receiving a DMA request or by starting a
  1702. * channel script execution.
  1703. *
  1704. * Values:
  1705. * - 0 - channel
  1706. * - 1 - DMA request
  1707. */
  1708. //@{
  1709. #define BP_SDMAARM_XTRIG_CONF1_CNF0 (6) //!< Bit position for SDMAARM_XTRIG_CONF1_CNF0.
  1710. #define BM_SDMAARM_XTRIG_CONF1_CNF0 (0x00000040) //!< Bit mask for SDMAARM_XTRIG_CONF1_CNF0.
  1711. //! @brief Get value of SDMAARM_XTRIG_CONF1_CNF0 from a register value.
  1712. #define BG_SDMAARM_XTRIG_CONF1_CNF0(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF1_CNF0) >> BP_SDMAARM_XTRIG_CONF1_CNF0)
  1713. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF1_CNF0.
  1714. #define BF_SDMAARM_XTRIG_CONF1_CNF0(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF1_CNF0) & BM_SDMAARM_XTRIG_CONF1_CNF0)
  1715. #ifndef __LANGUAGE_ASM__
  1716. //! @brief Set the CNF0 field to a new value.
  1717. #define BW_SDMAARM_XTRIG_CONF1_CNF0(v) (HW_SDMAARM_XTRIG_CONF1_WR((HW_SDMAARM_XTRIG_CONF1_RD() & ~BM_SDMAARM_XTRIG_CONF1_CNF0) | BF_SDMAARM_XTRIG_CONF1_CNF0(v)))
  1718. #endif
  1719. //@}
  1720. /*! @name Register SDMAARM_XTRIG_CONF1, field NUM1[13:8] (RW)
  1721. *
  1722. * Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger
  1723. * event line number i .
  1724. */
  1725. //@{
  1726. #define BP_SDMAARM_XTRIG_CONF1_NUM1 (8) //!< Bit position for SDMAARM_XTRIG_CONF1_NUM1.
  1727. #define BM_SDMAARM_XTRIG_CONF1_NUM1 (0x00003f00) //!< Bit mask for SDMAARM_XTRIG_CONF1_NUM1.
  1728. //! @brief Get value of SDMAARM_XTRIG_CONF1_NUM1 from a register value.
  1729. #define BG_SDMAARM_XTRIG_CONF1_NUM1(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF1_NUM1) >> BP_SDMAARM_XTRIG_CONF1_NUM1)
  1730. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF1_NUM1.
  1731. #define BF_SDMAARM_XTRIG_CONF1_NUM1(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF1_NUM1) & BM_SDMAARM_XTRIG_CONF1_NUM1)
  1732. #ifndef __LANGUAGE_ASM__
  1733. //! @brief Set the NUM1 field to a new value.
  1734. #define BW_SDMAARM_XTRIG_CONF1_NUM1(v) (HW_SDMAARM_XTRIG_CONF1_WR((HW_SDMAARM_XTRIG_CONF1_RD() & ~BM_SDMAARM_XTRIG_CONF1_NUM1) | BF_SDMAARM_XTRIG_CONF1_NUM1(v)))
  1735. #endif
  1736. //@}
  1737. /*! @name Register SDMAARM_XTRIG_CONF1, field CNF1[14] (RW)
  1738. *
  1739. * Configuration of the SDMA event line number i that is connected to the cross-trigger. It
  1740. * determines whether the event line pulse is generated by receiving a DMA request or by starting a
  1741. * channel script execution.
  1742. *
  1743. * Values:
  1744. * - 0 - channel
  1745. * - 1 - DMA request
  1746. */
  1747. //@{
  1748. #define BP_SDMAARM_XTRIG_CONF1_CNF1 (14) //!< Bit position for SDMAARM_XTRIG_CONF1_CNF1.
  1749. #define BM_SDMAARM_XTRIG_CONF1_CNF1 (0x00004000) //!< Bit mask for SDMAARM_XTRIG_CONF1_CNF1.
  1750. //! @brief Get value of SDMAARM_XTRIG_CONF1_CNF1 from a register value.
  1751. #define BG_SDMAARM_XTRIG_CONF1_CNF1(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF1_CNF1) >> BP_SDMAARM_XTRIG_CONF1_CNF1)
  1752. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF1_CNF1.
  1753. #define BF_SDMAARM_XTRIG_CONF1_CNF1(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF1_CNF1) & BM_SDMAARM_XTRIG_CONF1_CNF1)
  1754. #ifndef __LANGUAGE_ASM__
  1755. //! @brief Set the CNF1 field to a new value.
  1756. #define BW_SDMAARM_XTRIG_CONF1_CNF1(v) (HW_SDMAARM_XTRIG_CONF1_WR((HW_SDMAARM_XTRIG_CONF1_RD() & ~BM_SDMAARM_XTRIG_CONF1_CNF1) | BF_SDMAARM_XTRIG_CONF1_CNF1(v)))
  1757. #endif
  1758. //@}
  1759. /*! @name Register SDMAARM_XTRIG_CONF1, field NUM2[21:16] (RW)
  1760. *
  1761. * Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger
  1762. * event line number i .
  1763. */
  1764. //@{
  1765. #define BP_SDMAARM_XTRIG_CONF1_NUM2 (16) //!< Bit position for SDMAARM_XTRIG_CONF1_NUM2.
  1766. #define BM_SDMAARM_XTRIG_CONF1_NUM2 (0x003f0000) //!< Bit mask for SDMAARM_XTRIG_CONF1_NUM2.
  1767. //! @brief Get value of SDMAARM_XTRIG_CONF1_NUM2 from a register value.
  1768. #define BG_SDMAARM_XTRIG_CONF1_NUM2(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF1_NUM2) >> BP_SDMAARM_XTRIG_CONF1_NUM2)
  1769. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF1_NUM2.
  1770. #define BF_SDMAARM_XTRIG_CONF1_NUM2(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF1_NUM2) & BM_SDMAARM_XTRIG_CONF1_NUM2)
  1771. #ifndef __LANGUAGE_ASM__
  1772. //! @brief Set the NUM2 field to a new value.
  1773. #define BW_SDMAARM_XTRIG_CONF1_NUM2(v) (HW_SDMAARM_XTRIG_CONF1_WR((HW_SDMAARM_XTRIG_CONF1_RD() & ~BM_SDMAARM_XTRIG_CONF1_NUM2) | BF_SDMAARM_XTRIG_CONF1_NUM2(v)))
  1774. #endif
  1775. //@}
  1776. /*! @name Register SDMAARM_XTRIG_CONF1, field CNF2[22] (RW)
  1777. *
  1778. * Configuration of the SDMA event line number i that is connected to the cross-trigger. It
  1779. * determines whether the event line pulse is generated by receiving a DMA request or by starting a
  1780. * channel script execution.
  1781. *
  1782. * Values:
  1783. * - 0 - channel
  1784. * - 1 - DMA request
  1785. */
  1786. //@{
  1787. #define BP_SDMAARM_XTRIG_CONF1_CNF2 (22) //!< Bit position for SDMAARM_XTRIG_CONF1_CNF2.
  1788. #define BM_SDMAARM_XTRIG_CONF1_CNF2 (0x00400000) //!< Bit mask for SDMAARM_XTRIG_CONF1_CNF2.
  1789. //! @brief Get value of SDMAARM_XTRIG_CONF1_CNF2 from a register value.
  1790. #define BG_SDMAARM_XTRIG_CONF1_CNF2(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF1_CNF2) >> BP_SDMAARM_XTRIG_CONF1_CNF2)
  1791. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF1_CNF2.
  1792. #define BF_SDMAARM_XTRIG_CONF1_CNF2(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF1_CNF2) & BM_SDMAARM_XTRIG_CONF1_CNF2)
  1793. #ifndef __LANGUAGE_ASM__
  1794. //! @brief Set the CNF2 field to a new value.
  1795. #define BW_SDMAARM_XTRIG_CONF1_CNF2(v) (HW_SDMAARM_XTRIG_CONF1_WR((HW_SDMAARM_XTRIG_CONF1_RD() & ~BM_SDMAARM_XTRIG_CONF1_CNF2) | BF_SDMAARM_XTRIG_CONF1_CNF2(v)))
  1796. #endif
  1797. //@}
  1798. /*! @name Register SDMAARM_XTRIG_CONF1, field NUM3[29:24] (RW)
  1799. *
  1800. * Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger
  1801. * event line number i .
  1802. */
  1803. //@{
  1804. #define BP_SDMAARM_XTRIG_CONF1_NUM3 (24) //!< Bit position for SDMAARM_XTRIG_CONF1_NUM3.
  1805. #define BM_SDMAARM_XTRIG_CONF1_NUM3 (0x3f000000) //!< Bit mask for SDMAARM_XTRIG_CONF1_NUM3.
  1806. //! @brief Get value of SDMAARM_XTRIG_CONF1_NUM3 from a register value.
  1807. #define BG_SDMAARM_XTRIG_CONF1_NUM3(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF1_NUM3) >> BP_SDMAARM_XTRIG_CONF1_NUM3)
  1808. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF1_NUM3.
  1809. #define BF_SDMAARM_XTRIG_CONF1_NUM3(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF1_NUM3) & BM_SDMAARM_XTRIG_CONF1_NUM3)
  1810. #ifndef __LANGUAGE_ASM__
  1811. //! @brief Set the NUM3 field to a new value.
  1812. #define BW_SDMAARM_XTRIG_CONF1_NUM3(v) (HW_SDMAARM_XTRIG_CONF1_WR((HW_SDMAARM_XTRIG_CONF1_RD() & ~BM_SDMAARM_XTRIG_CONF1_NUM3) | BF_SDMAARM_XTRIG_CONF1_NUM3(v)))
  1813. #endif
  1814. //@}
  1815. /*! @name Register SDMAARM_XTRIG_CONF1, field CNF3[30] (RW)
  1816. *
  1817. * Configuration of the SDMA event line number i that is connected to the cross-trigger. It
  1818. * determines whether the event line pulse is generated by the reception of a DMA request or by the
  1819. * starting of a channel script execution.
  1820. *
  1821. * Values:
  1822. * - 0 - channel
  1823. * - 1 - DMA request
  1824. */
  1825. //@{
  1826. #define BP_SDMAARM_XTRIG_CONF1_CNF3 (30) //!< Bit position for SDMAARM_XTRIG_CONF1_CNF3.
  1827. #define BM_SDMAARM_XTRIG_CONF1_CNF3 (0x40000000) //!< Bit mask for SDMAARM_XTRIG_CONF1_CNF3.
  1828. //! @brief Get value of SDMAARM_XTRIG_CONF1_CNF3 from a register value.
  1829. #define BG_SDMAARM_XTRIG_CONF1_CNF3(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF1_CNF3) >> BP_SDMAARM_XTRIG_CONF1_CNF3)
  1830. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF1_CNF3.
  1831. #define BF_SDMAARM_XTRIG_CONF1_CNF3(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF1_CNF3) & BM_SDMAARM_XTRIG_CONF1_CNF3)
  1832. #ifndef __LANGUAGE_ASM__
  1833. //! @brief Set the CNF3 field to a new value.
  1834. #define BW_SDMAARM_XTRIG_CONF1_CNF3(v) (HW_SDMAARM_XTRIG_CONF1_WR((HW_SDMAARM_XTRIG_CONF1_RD() & ~BM_SDMAARM_XTRIG_CONF1_CNF3) | BF_SDMAARM_XTRIG_CONF1_CNF3(v)))
  1835. #endif
  1836. //@}
  1837. //-------------------------------------------------------------------------------------------
  1838. // HW_SDMAARM_XTRIG_CONF2 - Cross-Trigger Events Configuration Register 2
  1839. //-------------------------------------------------------------------------------------------
  1840. #ifndef __LANGUAGE_ASM__
  1841. /*!
  1842. * @brief HW_SDMAARM_XTRIG_CONF2 - Cross-Trigger Events Configuration Register 2 (RW)
  1843. *
  1844. * Reset value: 0x00000000
  1845. */
  1846. typedef union _hw_sdmaarm_xtrig_conf2
  1847. {
  1848. reg32_t U;
  1849. struct _hw_sdmaarm_xtrig_conf2_bitfields
  1850. {
  1851. unsigned NUM4 : 6; //!< [5:0] Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger event line number i .
  1852. unsigned CNF4 : 1; //!< [6] Configuration of the SDMA event line number i that is connected to the cross-trigger.
  1853. unsigned RESERVED0 : 1; //!< [7] Reserved
  1854. unsigned NUM5 : 6; //!< [13:8] Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger event line number i .
  1855. unsigned CNF5 : 1; //!< [14] Configuration of the SDMA event line number i that is connected to the cross-trigger.
  1856. unsigned RESERVED1 : 1; //!< [15] Reserved
  1857. unsigned NUM6 : 6; //!< [21:16] Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger event line number i .
  1858. unsigned CNF6 : 1; //!< [22] Configuration of the SDMA event line number i that is connected to the cross-trigger.
  1859. unsigned RESERVED2 : 1; //!< [23] Reserved
  1860. unsigned NUM7 : 6; //!< [29:24] Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger event line number i .
  1861. unsigned CNF7 : 1; //!< [30] Configuration of the SDMA event line number i that is connected to the cross-trigger.
  1862. unsigned RESERVED3 : 1; //!< [31] Reserved
  1863. } B;
  1864. } hw_sdmaarm_xtrig_conf2_t;
  1865. #endif
  1866. /*!
  1867. * @name Constants and macros for entire SDMAARM_XTRIG_CONF2 register
  1868. */
  1869. //@{
  1870. #define HW_SDMAARM_XTRIG_CONF2_ADDR (REGS_SDMAARM_BASE + 0x74)
  1871. #ifndef __LANGUAGE_ASM__
  1872. #define HW_SDMAARM_XTRIG_CONF2 (*(volatile hw_sdmaarm_xtrig_conf2_t *) HW_SDMAARM_XTRIG_CONF2_ADDR)
  1873. #define HW_SDMAARM_XTRIG_CONF2_RD() (HW_SDMAARM_XTRIG_CONF2.U)
  1874. #define HW_SDMAARM_XTRIG_CONF2_WR(v) (HW_SDMAARM_XTRIG_CONF2.U = (v))
  1875. #define HW_SDMAARM_XTRIG_CONF2_SET(v) (HW_SDMAARM_XTRIG_CONF2_WR(HW_SDMAARM_XTRIG_CONF2_RD() | (v)))
  1876. #define HW_SDMAARM_XTRIG_CONF2_CLR(v) (HW_SDMAARM_XTRIG_CONF2_WR(HW_SDMAARM_XTRIG_CONF2_RD() & ~(v)))
  1877. #define HW_SDMAARM_XTRIG_CONF2_TOG(v) (HW_SDMAARM_XTRIG_CONF2_WR(HW_SDMAARM_XTRIG_CONF2_RD() ^ (v)))
  1878. #endif
  1879. //@}
  1880. /*
  1881. * constants & macros for individual SDMAARM_XTRIG_CONF2 bitfields
  1882. */
  1883. /*! @name Register SDMAARM_XTRIG_CONF2, field NUM4[5:0] (RW)
  1884. *
  1885. * Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger
  1886. * event line number i .
  1887. */
  1888. //@{
  1889. #define BP_SDMAARM_XTRIG_CONF2_NUM4 (0) //!< Bit position for SDMAARM_XTRIG_CONF2_NUM4.
  1890. #define BM_SDMAARM_XTRIG_CONF2_NUM4 (0x0000003f) //!< Bit mask for SDMAARM_XTRIG_CONF2_NUM4.
  1891. //! @brief Get value of SDMAARM_XTRIG_CONF2_NUM4 from a register value.
  1892. #define BG_SDMAARM_XTRIG_CONF2_NUM4(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF2_NUM4) >> BP_SDMAARM_XTRIG_CONF2_NUM4)
  1893. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF2_NUM4.
  1894. #define BF_SDMAARM_XTRIG_CONF2_NUM4(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF2_NUM4) & BM_SDMAARM_XTRIG_CONF2_NUM4)
  1895. #ifndef __LANGUAGE_ASM__
  1896. //! @brief Set the NUM4 field to a new value.
  1897. #define BW_SDMAARM_XTRIG_CONF2_NUM4(v) (HW_SDMAARM_XTRIG_CONF2_WR((HW_SDMAARM_XTRIG_CONF2_RD() & ~BM_SDMAARM_XTRIG_CONF2_NUM4) | BF_SDMAARM_XTRIG_CONF2_NUM4(v)))
  1898. #endif
  1899. //@}
  1900. /*! @name Register SDMAARM_XTRIG_CONF2, field CNF4[6] (RW)
  1901. *
  1902. * Configuration of the SDMA event line number i that is connected to the cross-trigger. It
  1903. * determines whether the event line pulse is generated by receiving a DMA request or by starting a
  1904. * channel script execution.
  1905. *
  1906. * Values:
  1907. * - 0 - channel
  1908. * - 1 - DMA request
  1909. */
  1910. //@{
  1911. #define BP_SDMAARM_XTRIG_CONF2_CNF4 (6) //!< Bit position for SDMAARM_XTRIG_CONF2_CNF4.
  1912. #define BM_SDMAARM_XTRIG_CONF2_CNF4 (0x00000040) //!< Bit mask for SDMAARM_XTRIG_CONF2_CNF4.
  1913. //! @brief Get value of SDMAARM_XTRIG_CONF2_CNF4 from a register value.
  1914. #define BG_SDMAARM_XTRIG_CONF2_CNF4(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF2_CNF4) >> BP_SDMAARM_XTRIG_CONF2_CNF4)
  1915. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF2_CNF4.
  1916. #define BF_SDMAARM_XTRIG_CONF2_CNF4(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF2_CNF4) & BM_SDMAARM_XTRIG_CONF2_CNF4)
  1917. #ifndef __LANGUAGE_ASM__
  1918. //! @brief Set the CNF4 field to a new value.
  1919. #define BW_SDMAARM_XTRIG_CONF2_CNF4(v) (HW_SDMAARM_XTRIG_CONF2_WR((HW_SDMAARM_XTRIG_CONF2_RD() & ~BM_SDMAARM_XTRIG_CONF2_CNF4) | BF_SDMAARM_XTRIG_CONF2_CNF4(v)))
  1920. #endif
  1921. //@}
  1922. /*! @name Register SDMAARM_XTRIG_CONF2, field NUM5[13:8] (RW)
  1923. *
  1924. * Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger
  1925. * event line number i .
  1926. */
  1927. //@{
  1928. #define BP_SDMAARM_XTRIG_CONF2_NUM5 (8) //!< Bit position for SDMAARM_XTRIG_CONF2_NUM5.
  1929. #define BM_SDMAARM_XTRIG_CONF2_NUM5 (0x00003f00) //!< Bit mask for SDMAARM_XTRIG_CONF2_NUM5.
  1930. //! @brief Get value of SDMAARM_XTRIG_CONF2_NUM5 from a register value.
  1931. #define BG_SDMAARM_XTRIG_CONF2_NUM5(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF2_NUM5) >> BP_SDMAARM_XTRIG_CONF2_NUM5)
  1932. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF2_NUM5.
  1933. #define BF_SDMAARM_XTRIG_CONF2_NUM5(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF2_NUM5) & BM_SDMAARM_XTRIG_CONF2_NUM5)
  1934. #ifndef __LANGUAGE_ASM__
  1935. //! @brief Set the NUM5 field to a new value.
  1936. #define BW_SDMAARM_XTRIG_CONF2_NUM5(v) (HW_SDMAARM_XTRIG_CONF2_WR((HW_SDMAARM_XTRIG_CONF2_RD() & ~BM_SDMAARM_XTRIG_CONF2_NUM5) | BF_SDMAARM_XTRIG_CONF2_NUM5(v)))
  1937. #endif
  1938. //@}
  1939. /*! @name Register SDMAARM_XTRIG_CONF2, field CNF5[14] (RW)
  1940. *
  1941. * Configuration of the SDMA event line number i that is connected to the cross-trigger. It
  1942. * determines whether the event line pulse is generated by receiving a DMA request or by starting a
  1943. * channel script execution
  1944. *
  1945. * Values:
  1946. * - 0 - channel
  1947. * - 1 - DMA request
  1948. */
  1949. //@{
  1950. #define BP_SDMAARM_XTRIG_CONF2_CNF5 (14) //!< Bit position for SDMAARM_XTRIG_CONF2_CNF5.
  1951. #define BM_SDMAARM_XTRIG_CONF2_CNF5 (0x00004000) //!< Bit mask for SDMAARM_XTRIG_CONF2_CNF5.
  1952. //! @brief Get value of SDMAARM_XTRIG_CONF2_CNF5 from a register value.
  1953. #define BG_SDMAARM_XTRIG_CONF2_CNF5(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF2_CNF5) >> BP_SDMAARM_XTRIG_CONF2_CNF5)
  1954. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF2_CNF5.
  1955. #define BF_SDMAARM_XTRIG_CONF2_CNF5(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF2_CNF5) & BM_SDMAARM_XTRIG_CONF2_CNF5)
  1956. #ifndef __LANGUAGE_ASM__
  1957. //! @brief Set the CNF5 field to a new value.
  1958. #define BW_SDMAARM_XTRIG_CONF2_CNF5(v) (HW_SDMAARM_XTRIG_CONF2_WR((HW_SDMAARM_XTRIG_CONF2_RD() & ~BM_SDMAARM_XTRIG_CONF2_CNF5) | BF_SDMAARM_XTRIG_CONF2_CNF5(v)))
  1959. #endif
  1960. //@}
  1961. /*! @name Register SDMAARM_XTRIG_CONF2, field NUM6[21:16] (RW)
  1962. *
  1963. * Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger
  1964. * event line number i .
  1965. */
  1966. //@{
  1967. #define BP_SDMAARM_XTRIG_CONF2_NUM6 (16) //!< Bit position for SDMAARM_XTRIG_CONF2_NUM6.
  1968. #define BM_SDMAARM_XTRIG_CONF2_NUM6 (0x003f0000) //!< Bit mask for SDMAARM_XTRIG_CONF2_NUM6.
  1969. //! @brief Get value of SDMAARM_XTRIG_CONF2_NUM6 from a register value.
  1970. #define BG_SDMAARM_XTRIG_CONF2_NUM6(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF2_NUM6) >> BP_SDMAARM_XTRIG_CONF2_NUM6)
  1971. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF2_NUM6.
  1972. #define BF_SDMAARM_XTRIG_CONF2_NUM6(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF2_NUM6) & BM_SDMAARM_XTRIG_CONF2_NUM6)
  1973. #ifndef __LANGUAGE_ASM__
  1974. //! @brief Set the NUM6 field to a new value.
  1975. #define BW_SDMAARM_XTRIG_CONF2_NUM6(v) (HW_SDMAARM_XTRIG_CONF2_WR((HW_SDMAARM_XTRIG_CONF2_RD() & ~BM_SDMAARM_XTRIG_CONF2_NUM6) | BF_SDMAARM_XTRIG_CONF2_NUM6(v)))
  1976. #endif
  1977. //@}
  1978. /*! @name Register SDMAARM_XTRIG_CONF2, field CNF6[22] (RW)
  1979. *
  1980. * Configuration of the SDMA event line number i that is connected to the cross-trigger. It
  1981. * determines whether the event line pulse is generated by receiving a DMA request or by starting a
  1982. * channel script execution.
  1983. *
  1984. * Values:
  1985. * - 0 - channel
  1986. * - 1 - DMA request
  1987. */
  1988. //@{
  1989. #define BP_SDMAARM_XTRIG_CONF2_CNF6 (22) //!< Bit position for SDMAARM_XTRIG_CONF2_CNF6.
  1990. #define BM_SDMAARM_XTRIG_CONF2_CNF6 (0x00400000) //!< Bit mask for SDMAARM_XTRIG_CONF2_CNF6.
  1991. //! @brief Get value of SDMAARM_XTRIG_CONF2_CNF6 from a register value.
  1992. #define BG_SDMAARM_XTRIG_CONF2_CNF6(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF2_CNF6) >> BP_SDMAARM_XTRIG_CONF2_CNF6)
  1993. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF2_CNF6.
  1994. #define BF_SDMAARM_XTRIG_CONF2_CNF6(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF2_CNF6) & BM_SDMAARM_XTRIG_CONF2_CNF6)
  1995. #ifndef __LANGUAGE_ASM__
  1996. //! @brief Set the CNF6 field to a new value.
  1997. #define BW_SDMAARM_XTRIG_CONF2_CNF6(v) (HW_SDMAARM_XTRIG_CONF2_WR((HW_SDMAARM_XTRIG_CONF2_RD() & ~BM_SDMAARM_XTRIG_CONF2_CNF6) | BF_SDMAARM_XTRIG_CONF2_CNF6(v)))
  1998. #endif
  1999. //@}
  2000. /*! @name Register SDMAARM_XTRIG_CONF2, field NUM7[29:24] (RW)
  2001. *
  2002. * Contains the number of the DMA request or channel that triggers the pulse on the cross-trigger
  2003. * event line number i .
  2004. */
  2005. //@{
  2006. #define BP_SDMAARM_XTRIG_CONF2_NUM7 (24) //!< Bit position for SDMAARM_XTRIG_CONF2_NUM7.
  2007. #define BM_SDMAARM_XTRIG_CONF2_NUM7 (0x3f000000) //!< Bit mask for SDMAARM_XTRIG_CONF2_NUM7.
  2008. //! @brief Get value of SDMAARM_XTRIG_CONF2_NUM7 from a register value.
  2009. #define BG_SDMAARM_XTRIG_CONF2_NUM7(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF2_NUM7) >> BP_SDMAARM_XTRIG_CONF2_NUM7)
  2010. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF2_NUM7.
  2011. #define BF_SDMAARM_XTRIG_CONF2_NUM7(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF2_NUM7) & BM_SDMAARM_XTRIG_CONF2_NUM7)
  2012. #ifndef __LANGUAGE_ASM__
  2013. //! @brief Set the NUM7 field to a new value.
  2014. #define BW_SDMAARM_XTRIG_CONF2_NUM7(v) (HW_SDMAARM_XTRIG_CONF2_WR((HW_SDMAARM_XTRIG_CONF2_RD() & ~BM_SDMAARM_XTRIG_CONF2_NUM7) | BF_SDMAARM_XTRIG_CONF2_NUM7(v)))
  2015. #endif
  2016. //@}
  2017. /*! @name Register SDMAARM_XTRIG_CONF2, field CNF7[30] (RW)
  2018. *
  2019. * Configuration of the SDMA event line number i that is connected to the cross-trigger. It
  2020. * determines whether the event line pulse is generated by receiving a DMA request or by starting a
  2021. * channel script execution.
  2022. *
  2023. * Values:
  2024. * - 0 - channel
  2025. * - 1 - DMA request
  2026. */
  2027. //@{
  2028. #define BP_SDMAARM_XTRIG_CONF2_CNF7 (30) //!< Bit position for SDMAARM_XTRIG_CONF2_CNF7.
  2029. #define BM_SDMAARM_XTRIG_CONF2_CNF7 (0x40000000) //!< Bit mask for SDMAARM_XTRIG_CONF2_CNF7.
  2030. //! @brief Get value of SDMAARM_XTRIG_CONF2_CNF7 from a register value.
  2031. #define BG_SDMAARM_XTRIG_CONF2_CNF7(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_XTRIG_CONF2_CNF7) >> BP_SDMAARM_XTRIG_CONF2_CNF7)
  2032. //! @brief Format value for bitfield SDMAARM_XTRIG_CONF2_CNF7.
  2033. #define BF_SDMAARM_XTRIG_CONF2_CNF7(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_XTRIG_CONF2_CNF7) & BM_SDMAARM_XTRIG_CONF2_CNF7)
  2034. #ifndef __LANGUAGE_ASM__
  2035. //! @brief Set the CNF7 field to a new value.
  2036. #define BW_SDMAARM_XTRIG_CONF2_CNF7(v) (HW_SDMAARM_XTRIG_CONF2_WR((HW_SDMAARM_XTRIG_CONF2_RD() & ~BM_SDMAARM_XTRIG_CONF2_CNF7) | BF_SDMAARM_XTRIG_CONF2_CNF7(v)))
  2037. #endif
  2038. //@}
  2039. //-------------------------------------------------------------------------------------------
  2040. // HW_SDMAARM_SDMA_CHNPRIn - Channel Priority Registers
  2041. //-------------------------------------------------------------------------------------------
  2042. #ifndef __LANGUAGE_ASM__
  2043. /*!
  2044. * @brief HW_SDMAARM_SDMA_CHNPRIn - Channel Priority Registers (RW)
  2045. *
  2046. * Reset value: 0x00000000
  2047. */
  2048. typedef union _hw_sdmaarm_sdma_chnprin
  2049. {
  2050. reg32_t U;
  2051. struct _hw_sdmaarm_sdma_chnprin_bitfields
  2052. {
  2053. unsigned CHNPRIN : 3; //!< [2:0] This contains the priority of channel number n .
  2054. unsigned RESERVED0 : 29; //!< [31:3] Reserved
  2055. } B;
  2056. } hw_sdmaarm_sdma_chnprin_t;
  2057. #endif
  2058. /*!
  2059. * @name Constants and macros for entire SDMAARM_SDMA_CHNPRIn register
  2060. */
  2061. //@{
  2062. //! @brief Number of instances of the SDMAARM_SDMA_CHNPRIn register.
  2063. #define HW_SDMAARM_SDMA_CHNPRIn_COUNT (32)
  2064. #define HW_SDMAARM_SDMA_CHNPRIn_ADDR(n) (REGS_SDMAARM_BASE + 0x100 + (0x4 * (n)))
  2065. #ifndef __LANGUAGE_ASM__
  2066. #define HW_SDMAARM_SDMA_CHNPRIn(n) (*(volatile hw_sdmaarm_sdma_chnprin_t *) HW_SDMAARM_SDMA_CHNPRIn_ADDR(n))
  2067. #define HW_SDMAARM_SDMA_CHNPRIn_RD(n) (HW_SDMAARM_SDMA_CHNPRIn(n).U)
  2068. #define HW_SDMAARM_SDMA_CHNPRIn_WR(n, v) (HW_SDMAARM_SDMA_CHNPRIn(n).U = (v))
  2069. #define HW_SDMAARM_SDMA_CHNPRIn_SET(n, v) (HW_SDMAARM_SDMA_CHNPRIn_WR(n, HW_SDMAARM_SDMA_CHNPRIn_RD(n) | (v)))
  2070. #define HW_SDMAARM_SDMA_CHNPRIn_CLR(n, v) (HW_SDMAARM_SDMA_CHNPRIn_WR(n, HW_SDMAARM_SDMA_CHNPRIn_RD(n) & ~(v)))
  2071. #define HW_SDMAARM_SDMA_CHNPRIn_TOG(n, v) (HW_SDMAARM_SDMA_CHNPRIn_WR(n, HW_SDMAARM_SDMA_CHNPRIn_RD(n) ^ (v)))
  2072. #endif
  2073. //@}
  2074. /*
  2075. * constants & macros for individual SDMAARM_SDMA_CHNPRIn bitfields
  2076. */
  2077. /*! @name Register SDMAARM_SDMA_CHNPRIn, field CHNPRIN[2:0] (RW)
  2078. *
  2079. * This contains the priority of channel number n . Useful values are between 1 and 7; 0 is reserved
  2080. * by the SDMA hardware to determine when there is no pending channel. Reset value is 0, which
  2081. * prevents the channels from starting.
  2082. */
  2083. //@{
  2084. #define BP_SDMAARM_SDMA_CHNPRIn_CHNPRIN (0) //!< Bit position for SDMAARM_SDMA_CHNPRIn_CHNPRIN.
  2085. #define BM_SDMAARM_SDMA_CHNPRIn_CHNPRIN (0x00000007) //!< Bit mask for SDMAARM_SDMA_CHNPRIn_CHNPRIN.
  2086. //! @brief Get value of SDMAARM_SDMA_CHNPRIn_CHNPRIN from a register value.
  2087. #define BG_SDMAARM_SDMA_CHNPRIn_CHNPRIN(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_SDMA_CHNPRIn_CHNPRIN) >> BP_SDMAARM_SDMA_CHNPRIn_CHNPRIN)
  2088. //! @brief Format value for bitfield SDMAARM_SDMA_CHNPRIn_CHNPRIN.
  2089. #define BF_SDMAARM_SDMA_CHNPRIn_CHNPRIN(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_SDMA_CHNPRIn_CHNPRIN) & BM_SDMAARM_SDMA_CHNPRIn_CHNPRIN)
  2090. #ifndef __LANGUAGE_ASM__
  2091. //! @brief Set the CHNPRIN field to a new value.
  2092. #define BW_SDMAARM_SDMA_CHNPRIn_CHNPRIN(n, v) (HW_SDMAARM_SDMA_CHNPRIn_WR(n, (HW_SDMAARM_SDMA_CHNPRIn_RD(n) & ~BM_SDMAARM_SDMA_CHNPRIn_CHNPRIN) | BF_SDMAARM_SDMA_CHNPRIn_CHNPRIN(v)))
  2093. #endif
  2094. //@}
  2095. //-------------------------------------------------------------------------------------------
  2096. // HW_SDMAARM_CHNENBLn - Channel Enable RAM
  2097. //-------------------------------------------------------------------------------------------
  2098. #ifndef __LANGUAGE_ASM__
  2099. /*!
  2100. * @brief HW_SDMAARM_CHNENBLn - Channel Enable RAM (RW)
  2101. *
  2102. * Reset value: 0x00000000
  2103. */
  2104. typedef union _hw_sdmaarm_chnenbln
  2105. {
  2106. reg32_t U;
  2107. struct _hw_sdmaarm_chnenbln_bitfields
  2108. {
  2109. unsigned ENBLN : 32; //!< [31:0] This 32-bit value selects the channels that are triggered by the DMA request number n .
  2110. } B;
  2111. } hw_sdmaarm_chnenbln_t;
  2112. #endif
  2113. /*!
  2114. * @name Constants and macros for entire SDMAARM_CHNENBLn register
  2115. */
  2116. //@{
  2117. //! @brief Number of instances of the SDMAARM_CHNENBLn register.
  2118. #define HW_SDMAARM_CHNENBLn_COUNT (48)
  2119. #define HW_SDMAARM_CHNENBLn_ADDR(n) (REGS_SDMAARM_BASE + 0x200 + (0x4 * (n)))
  2120. #ifndef __LANGUAGE_ASM__
  2121. #define HW_SDMAARM_CHNENBLn(n) (*(volatile hw_sdmaarm_chnenbln_t *) HW_SDMAARM_CHNENBLn_ADDR(n))
  2122. #define HW_SDMAARM_CHNENBLn_RD(n) (HW_SDMAARM_CHNENBLn(n).U)
  2123. #define HW_SDMAARM_CHNENBLn_WR(n, v) (HW_SDMAARM_CHNENBLn(n).U = (v))
  2124. #define HW_SDMAARM_CHNENBLn_SET(n, v) (HW_SDMAARM_CHNENBLn_WR(n, HW_SDMAARM_CHNENBLn_RD(n) | (v)))
  2125. #define HW_SDMAARM_CHNENBLn_CLR(n, v) (HW_SDMAARM_CHNENBLn_WR(n, HW_SDMAARM_CHNENBLn_RD(n) & ~(v)))
  2126. #define HW_SDMAARM_CHNENBLn_TOG(n, v) (HW_SDMAARM_CHNENBLn_WR(n, HW_SDMAARM_CHNENBLn_RD(n) ^ (v)))
  2127. #endif
  2128. //@}
  2129. /*
  2130. * constants & macros for individual SDMAARM_CHNENBLn bitfields
  2131. */
  2132. /*! @name Register SDMAARM_CHNENBLn, field ENBLN[31:0] (RW)
  2133. *
  2134. * This 32-bit value selects the channels that are triggered by the DMA request number n . If
  2135. * ENBLn[i] is set to 1, bit EP[i] will be set when the DMA request n is received. These 48 32-bit
  2136. * registers are physically located in a RAM, with no known reset value. It is thus essential for
  2137. * the ARM platform to program them before any DMA request is triggered to the SDMA, otherwise an
  2138. * unpredictable combination of channels may be started.
  2139. */
  2140. //@{
  2141. #define BP_SDMAARM_CHNENBLn_ENBLN (0) //!< Bit position for SDMAARM_CHNENBLn_ENBLN.
  2142. #define BM_SDMAARM_CHNENBLn_ENBLN (0xffffffff) //!< Bit mask for SDMAARM_CHNENBLn_ENBLN.
  2143. //! @brief Get value of SDMAARM_CHNENBLn_ENBLN from a register value.
  2144. #define BG_SDMAARM_CHNENBLn_ENBLN(r) ((__REG_VALUE_TYPE((r), reg32_t) & BM_SDMAARM_CHNENBLn_ENBLN) >> BP_SDMAARM_CHNENBLn_ENBLN)
  2145. //! @brief Format value for bitfield SDMAARM_CHNENBLn_ENBLN.
  2146. #define BF_SDMAARM_CHNENBLn_ENBLN(v) ((__REG_VALUE_TYPE((v), reg32_t) << BP_SDMAARM_CHNENBLn_ENBLN) & BM_SDMAARM_CHNENBLn_ENBLN)
  2147. #ifndef __LANGUAGE_ASM__
  2148. //! @brief Set the ENBLN field to a new value.
  2149. #define BW_SDMAARM_CHNENBLn_ENBLN(n, v) (HW_SDMAARM_CHNENBLn_WR(n, (HW_SDMAARM_CHNENBLn_RD(n) & ~BM_SDMAARM_CHNENBLn_ENBLN) | BF_SDMAARM_CHNENBLn_ENBLN(v)))
  2150. #endif
  2151. //@}
  2152. //-------------------------------------------------------------------------------------------
  2153. // hw_sdmaarm_t - module struct
  2154. //-------------------------------------------------------------------------------------------
  2155. /*!
  2156. * @brief All SDMAARM module registers.
  2157. */
  2158. #ifndef __LANGUAGE_ASM__
  2159. #pragma pack(1)
  2160. typedef struct _hw_sdmaarm
  2161. {
  2162. volatile hw_sdmaarm_mc0ptr_t MC0PTR; //!< ARM platform Channel 0 Pointer
  2163. volatile hw_sdmaarm_intr_t INTR; //!< Channel Interrupts
  2164. volatile hw_sdmaarm_stop_stat_t STOP_STAT; //!< Channel Stop/Channel Status
  2165. volatile hw_sdmaarm_hstart_t HSTART; //!< Channel Start
  2166. volatile hw_sdmaarm_evtovr_t EVTOVR; //!< Channel Event Override
  2167. volatile hw_sdmaarm_dspovr_t DSPOVR; //!< Channel BP Override
  2168. volatile hw_sdmaarm_hostovr_t HOSTOVR; //!< Channel ARM platform Override
  2169. volatile hw_sdmaarm_evtpend_t EVTPEND; //!< Channel Event Pending
  2170. reg32_t _reserved0;
  2171. volatile hw_sdmaarm_reset_t RESET; //!< Reset Register
  2172. volatile hw_sdmaarm_evterr_t EVTERR; //!< DMA Request Error Register
  2173. volatile hw_sdmaarm_intrmask_t INTRMASK; //!< Channel ARM platform Interrupt Mask
  2174. volatile hw_sdmaarm_psw_t PSW; //!< Schedule Status
  2175. volatile hw_sdmaarm_evterrdbg_t EVTERRDBG; //!< DMA Request Error Register
  2176. volatile hw_sdmaarm_config_t CONFIG; //!< Configuration Register
  2177. volatile hw_sdmaarm_sdma_lock_t SDMA_LOCK; //!< SDMA LOCK
  2178. volatile hw_sdmaarm_once_enb_t ONCE_ENB; //!< OnCE Enable
  2179. volatile hw_sdmaarm_once_data_t ONCE_DATA; //!< OnCE Data Register
  2180. volatile hw_sdmaarm_once_instr_t ONCE_INSTR; //!< OnCE Instruction Register
  2181. volatile hw_sdmaarm_once_stat_t ONCE_STAT; //!< OnCE Status Register
  2182. volatile hw_sdmaarm_once_cmd_t ONCE_CMD; //!< OnCE Command Register
  2183. reg32_t _reserved1;
  2184. volatile hw_sdmaarm_illinstaddr_t ILLINSTADDR; //!< Illegal Instruction Trap Address
  2185. volatile hw_sdmaarm_chn0addr_t CHN0ADDR; //!< Channel 0 Boot Address
  2186. volatile hw_sdmaarm_evt_mirror_t EVT_MIRROR; //!< DMA Requests
  2187. volatile hw_sdmaarm_evt_mirror2_t EVT_MIRROR2; //!< DMA Requests 2
  2188. reg32_t _reserved2[2];
  2189. volatile hw_sdmaarm_xtrig_conf1_t XTRIG_CONF1; //!< Cross-Trigger Events Configuration Register 1
  2190. volatile hw_sdmaarm_xtrig_conf2_t XTRIG_CONF2; //!< Cross-Trigger Events Configuration Register 2
  2191. reg32_t _reserved3[34];
  2192. volatile hw_sdmaarm_sdma_chnprin_t SDMA_CHNPRIn[32]; //!< Channel Priority Registers
  2193. reg32_t _reserved4[32];
  2194. volatile hw_sdmaarm_chnenbln_t CHNENBLn[48]; //!< Channel Enable RAM
  2195. } hw_sdmaarm_t;
  2196. #pragma pack()
  2197. //! @brief Macro to access all SDMAARM registers.
  2198. //! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
  2199. //! use the '&' operator, like <code>&HW_SDMAARM</code>.
  2200. #define HW_SDMAARM (*(hw_sdmaarm_t *) REGS_SDMAARM_BASE)
  2201. #endif
  2202. #endif // __HW_SDMAARM_REGISTERS_H__
  2203. // v18/121106/1.2.2
  2204. // EOF