csl_edma3Aux.h 152 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766
  1. /**
  2. * @file csl_edma3Aux.h
  3. *
  4. * @brief
  5. * This is the EDMA Auxilary Header File which exposes the various
  6. * CSL Functional Layer API's to configure the EDMA Module.
  7. *
  8. * \par
  9. * ============================================================================
  10. * @n (C) Copyright 2002, 2003, 2004, 2005, 2008, 2009, 2016 Texas Instruments, Inc.
  11. *
  12. * Redistribution and use in source and binary forms, with or without
  13. * modification, are permitted provided that the following conditions
  14. * are met:
  15. *
  16. * Redistributions of source code must retain the above copyright
  17. * notice, this list of conditions and the following disclaimer.
  18. *
  19. * Redistributions in binary form must reproduce the above copyright
  20. * notice, this list of conditions and the following disclaimer in the
  21. * documentation and/or other materials provided with the
  22. * distribution.
  23. *
  24. * Neither the name of Texas Instruments Incorporated nor the names of
  25. * its contributors may be used to endorse or promote products derived
  26. * from this software without specific prior written permission.
  27. *
  28. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  29. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  30. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  31. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  32. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  33. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  34. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  35. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  36. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  37. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  38. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  39. *
  40. */
  41. #ifndef CSL_EDMA3AUX_H
  42. #define CSL_EDMA3AUX_H
  43. #include <ti/csl/csl_edma3.h>
  44. /** @addtogroup CSL_EDMA3_FUNCTION
  45. @{ */
  46. /** ============================================================================
  47. * @n@b CSL_edma3GetInfo
  48. *
  49. * @b Description
  50. * @n The function gets the EDMA Channel Controller Configuration Information
  51. * which includes reading the peripheral revision register and configuration
  52. * register.
  53. *
  54. * @b Arguments
  55. * @verbatim
  56. hModule Module Handle
  57. response Output parameter populated with the configuration information.
  58. @endverbatim
  59. *
  60. * <b> Return Value </b>
  61. * @n None
  62. *
  63. * <b> Pre Condition </b>
  64. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  65. *
  66. * <b> Post Condition </b>
  67. * @n None
  68. *
  69. * @b Reads
  70. * @n TPCC_TPCC_CFG,TPCC_TPCC_PID
  71. *
  72. * @b Example
  73. * @verbatim
  74. CSL_Edma3Handle hModule;
  75. CSL_Edma3Obj edmaObj;
  76. CSL_Edma3Context context;
  77. CSL_Status status;
  78. CSL_Edma3QueryInfo info;
  79. // Module Initialization
  80. CSL_edma3Init(&context);
  81. // Module Level Open
  82. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  83. // Get Module Info
  84. CSL_edma3GetInfo(hModule,&info);
  85. ...
  86. @endverbatim
  87. * ===========================================================================
  88. */
  89. /* for misra warnings*/
  90. static inline void CSL_edma3GetInfo
  91. (
  92. CSL_Edma3Handle hModule,
  93. CSL_Edma3QueryInfo* response
  94. );
  95. static inline void CSL_edma3GetInfo
  96. (
  97. CSL_Edma3Handle hModule,
  98. CSL_Edma3QueryInfo* response
  99. )
  100. {
  101. /* Populate the configuration and peripheral id. */
  102. response->config = hModule->regs->TPCC_CFG;
  103. response->revision = hModule->regs->TPCC_PID;
  104. return;
  105. }
  106. /** ============================================================================
  107. * @n@b CSL_edma3MapDMAChannelToParamBlock
  108. *
  109. * @b Description
  110. * @n The function maps the DMA Channel to the specified PARAM Entry Block.
  111. *
  112. * @b Arguments
  113. * @verbatim
  114. hModule Module Handle
  115. dmaChannel DMA Channel Number which is to be mapped.
  116. paramId Parameter Identifier to be mapped to.
  117. @endverbatim
  118. *
  119. * <b> Return Value </b>
  120. * @n None
  121. *
  122. * <b> Pre Condition </b>
  123. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  124. *
  125. * <b> Post Condition </b>
  126. * @n DMA Channel is mapped to the specified PARAM Block.
  127. *
  128. * @b Writes
  129. * @n TPCC_TPCC_DCHMAP_PAENTRY
  130. *
  131. * @b Example
  132. * @verbatim
  133. CSL_Edma3Handle hModule;
  134. CSL_Edma3Obj edmaObj;
  135. CSL_Edma3Context context;
  136. CSL_Status status;
  137. // Module Initialization
  138. CSL_edma3Init(&context);
  139. // Module Level Open
  140. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  141. // Maps DMA Channel 1 to Param ID Block 5.
  142. CSL_edma3MapDMAChannelToParamBlock(hModule, 1, 5);
  143. ...
  144. @endverbatim
  145. * ===========================================================================
  146. */
  147. /* for misra warnings*/
  148. static inline void CSL_edma3MapDMAChannelToParamBlock
  149. (
  150. CSL_Edma3Handle hModule,
  151. Uint8 dmaChannel,
  152. Uint16 paramId
  153. );
  154. static inline void CSL_edma3MapDMAChannelToParamBlock
  155. (
  156. CSL_Edma3Handle hModule,
  157. Uint8 dmaChannel,
  158. Uint16 paramId
  159. )
  160. {
  161. /* Map the DMA channel to the parameter block. */
  162. CSL_FINS(hModule->regs->TPCC_DCHMAP[dmaChannel], TPCC_TPCC_DCHMAP0_PAENTRY, (Uint32)paramId);
  163. return;
  164. }
  165. /** ============================================================================
  166. * @n@b CSL_edma3GetDMAChannelToParamBlockMapping
  167. *
  168. * @b Description
  169. * @n The function gets the PARAM Entry ID to which a specific DMA Channel
  170. * is mapped.
  171. *
  172. * @b Arguments
  173. * @verbatim
  174. hModule Module Handle
  175. dmaChannel DMA Channel Number whose mapping is to be found.
  176. @endverbatim
  177. *
  178. * <b> Return Value </b>
  179. * @n Paramater ID to which the specific DMA Channel is mapped to.
  180. *
  181. * <b> Pre Condition </b>
  182. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  183. *
  184. * <b> Post Condition </b>
  185. * @n None
  186. *
  187. * @b Reads
  188. * @n TPCC_TPCC_DCHMAP_PAENTRY
  189. *
  190. * @b Example
  191. * @verbatim
  192. CSL_Edma3Handle hModule;
  193. CSL_Edma3Obj edmaObj;
  194. CSL_Edma3Context context;
  195. CSL_Status status;
  196. Uint16 paramId;
  197. // Module Initialization
  198. CSL_edma3Init(&context);
  199. // Module Level Open
  200. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  201. // Get the mapping information for DMA channel 1.
  202. paramId = CSL_edma3GetDMAChannelToParamBlockMapping(hModule, 1);
  203. ...
  204. @endverbatim
  205. * ===========================================================================
  206. */
  207. /* for misra warnings*/
  208. static inline Uint16 CSL_edma3GetDMAChannelToParamBlockMapping
  209. (
  210. CSL_Edma3Handle hModule,
  211. Uint8 dmaChannel
  212. );
  213. static inline Uint16 CSL_edma3GetDMAChannelToParamBlockMapping
  214. (
  215. CSL_Edma3Handle hModule,
  216. Uint8 dmaChannel
  217. )
  218. {
  219. /* Get the Param Block to which the DMA channel is mapped to. */
  220. return (Uint16) CSL_FEXT(hModule->regs->TPCC_DCHMAP[dmaChannel], TPCC_TPCC_DCHMAP0_PAENTRY);
  221. }
  222. /** ============================================================================
  223. * @n@b CSL_edma3MapQDMAChannelToParamBlock
  224. *
  225. * @b Description
  226. * @n The function maps the QDMA Channel to the specified PARAM Entry Block.
  227. *
  228. * @b Arguments
  229. * @verbatim
  230. hModule Module Handle
  231. qdmaChannel QDMA Channel Number which is to be mapped.
  232. paramId Parameter Identifier to be mapped to.
  233. @endverbatim
  234. *
  235. * <b> Return Value </b>
  236. * @n None
  237. *
  238. * <b> Pre Condition </b>
  239. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  240. *
  241. * <b> Post Condition </b>
  242. * @n QDMA Channel is mapped to the specified PARAM Block.
  243. *
  244. * @b Writes
  245. * @n TPCC_TPCC_QCHMAP_PAENTRY
  246. *
  247. * @b Example
  248. * @verbatim
  249. CSL_Edma3Handle hModule;
  250. CSL_Edma3Obj edmaObj;
  251. CSL_Edma3Context context;
  252. CSL_Status status;
  253. // Module Initialization
  254. CSL_edma3Init(&context);
  255. // Module Level Open
  256. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  257. // Maps QDMA Channel 1 to Param ID Block 5.
  258. CSL_edma3MapQDMAChannelToParamBlock(hModule, 1, 5);
  259. ...
  260. @endverbatim
  261. * ===========================================================================
  262. */
  263. /* for misra warnings*/
  264. static inline void CSL_edma3MapQDMAChannelToParamBlock
  265. (
  266. CSL_Edma3Handle hModule,
  267. Uint8 qdmaChannel,
  268. Uint16 paramId
  269. );
  270. static inline void CSL_edma3MapQDMAChannelToParamBlock
  271. (
  272. CSL_Edma3Handle hModule,
  273. Uint8 qdmaChannel,
  274. Uint16 paramId
  275. )
  276. {
  277. CSL_FINS(hModule->regs->TPCC_QCHMAP[qdmaChannel], TPCC_TPCC_QCHMAP0_PAENTRY, (Uint32)paramId);
  278. return;
  279. }
  280. /** ============================================================================
  281. * @n@b CSL_edma3GetQDMAChannelToParamBlockMapping
  282. *
  283. * @b Description
  284. * @n The function gets the PARAM Entry ID to which a specific QDMA Channel
  285. * is mapped.
  286. *
  287. * @b Arguments
  288. * @verbatim
  289. hModule Module Handle
  290. qdmaChannel QDMA Channel Number whose mapping is to be found.
  291. @endverbatim
  292. *
  293. * <b> Return Value </b>
  294. * @n Paramater ID to which the specific QDMA Channel is mapped to.
  295. *
  296. * <b> Pre Condition </b>
  297. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  298. *
  299. * <b> Post Condition </b>
  300. * @n None
  301. *
  302. * @b Reads
  303. * @n TPCC_TPCC_QCHMAP_PAENTRY
  304. *
  305. * @b Example
  306. * @verbatim
  307. CSL_Edma3Handle hModule;
  308. CSL_Edma3Obj edmaObj;
  309. CSL_Edma3Context context;
  310. CSL_Status status;
  311. // Module Initialization
  312. CSL_edma3Init(&context);
  313. // Module Level Open
  314. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  315. // Get the mapping information for QDMA channel 1.
  316. paramId = CSL_edma3GetQDMAChannelMap(hModule, 1);
  317. ...
  318. @endverbatim
  319. * ===========================================================================
  320. */
  321. /* for misra warnings*/
  322. static inline Uint16 CSL_edma3GetQDMAChannelToParamBlockMapping
  323. (
  324. CSL_Edma3Handle hModule,
  325. Uint8 qdmaChannel
  326. );
  327. static inline Uint16 CSL_edma3GetQDMAChannelToParamBlockMapping
  328. (
  329. CSL_Edma3Handle hModule,
  330. Uint8 qdmaChannel
  331. )
  332. {
  333. return (Uint16) CSL_FEXT(hModule->regs->TPCC_QCHMAP[qdmaChannel], TPCC_TPCC_QCHMAP0_PAENTRY);
  334. }
  335. /** ============================================================================
  336. * @n@b CSL_edma3SetQDMATriggerWord
  337. *
  338. * @b Description
  339. * @n The function sets the trigger word of the PaRAM Entry block.
  340. *
  341. * @b Arguments
  342. * @verbatim
  343. hModule Module Handle
  344. qdmaChannel QDMA Channel Number which is to be configured.
  345. trword Trigger Word to be configured.
  346. @endverbatim
  347. *
  348. * <b> Return Value </b>
  349. * @n None
  350. *
  351. * <b> Pre Condition </b>
  352. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  353. *
  354. * <b> Post Condition </b>
  355. * @n QDMA Channel is mapped to the specified PARAM Block.
  356. *
  357. * @b Writes
  358. * @n TPCC_TPCC_QCHMAP_TRWORD
  359. *
  360. * @b Example
  361. * @verbatim
  362. CSL_Edma3Handle hModule;
  363. CSL_Edma3Obj edmaObj;
  364. CSL_Edma3Context context;
  365. CSL_Status status;
  366. // Module Initialization
  367. CSL_edma3Init(&context);
  368. // Module Level Open
  369. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  370. // Configure QDMA Channel 1 Trigger Word as 0
  371. CSL_edma3SetQDMATriggerWord(hModule, 1, 0);
  372. ...
  373. @endverbatim
  374. * ===========================================================================
  375. */
  376. /* for misra warnings*/
  377. static inline void CSL_edma3SetQDMATriggerWord
  378. (
  379. CSL_Edma3Handle hModule,
  380. Uint8 qdmaChannel,
  381. Uint8 trword
  382. );
  383. static inline void CSL_edma3SetQDMATriggerWord
  384. (
  385. CSL_Edma3Handle hModule,
  386. Uint8 qdmaChannel,
  387. Uint8 trword
  388. )
  389. {
  390. CSL_FINS(hModule->regs->TPCC_QCHMAP[qdmaChannel], TPCC_TPCC_QCHMAP0_TRWORD, (Uint32)trword);
  391. return;
  392. }
  393. /** ============================================================================
  394. * @n@b CSL_edma3GetQDMATriggerWord
  395. *
  396. * @b Description
  397. * @n The function gets the trigger word of the PaRAM Entry block.
  398. *
  399. * @b Arguments
  400. * @verbatim
  401. hModule Module Handle
  402. qdmaChannel QDMA Channel Number which is to be configured.
  403. trword Trigger Word to be retreived populated by this API.
  404. @endverbatim
  405. *
  406. * <b> Return Value </b>
  407. * @n None
  408. *
  409. * <b> Pre Condition </b>
  410. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  411. *
  412. * <b> Post Condition </b>
  413. * @n QDMA Channel is mapped to the specified PARAM Block.
  414. *
  415. * @b Reads
  416. * @n TPCC_TPCC_QCHMAP_TRWORD
  417. *
  418. * @b Example
  419. * @verbatim
  420. CSL_Edma3Handle hModule;
  421. CSL_Edma3Obj edmaObj;
  422. CSL_Edma3Context context;
  423. CSL_Status status;
  424. Uint8 trWord;
  425. // Module Initialization
  426. CSL_edma3Init(&context);
  427. // Module Level Open
  428. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  429. // Get the QDMA Channel 1 Trigger Word
  430. trWord = CSL_edma3SetQDMATriggerWord(hModule, 1);
  431. ...
  432. @endverbatim
  433. * ===========================================================================
  434. */
  435. /* for misra warnings*/
  436. static inline void CSL_edma3GetQDMATriggerWord
  437. (
  438. CSL_Edma3Handle hModule,
  439. Uint8 qdmaChannel,
  440. Uint8* trword
  441. );
  442. static inline void CSL_edma3GetQDMATriggerWord
  443. (
  444. CSL_Edma3Handle hModule,
  445. Uint8 qdmaChannel,
  446. Uint8* trword
  447. )
  448. {
  449. /* Extract the trigger word. */
  450. *trword = (Uint8)CSL_FEXT(hModule->regs->TPCC_QCHMAP[qdmaChannel], TPCC_TPCC_QCHMAP0_TRWORD);
  451. }
  452. /** ============================================================================
  453. * @n@b CSL_edma3MapDMAChannelToEventQueue
  454. *
  455. * @b Description
  456. * @n The function maps the event ID to the specific DMA Queue.
  457. *
  458. * @b Arguments
  459. * @verbatim
  460. hModule Module Handle
  461. dmaChannel DMA Channel to which the event is mapped.
  462. eventQueue Event Queue which is to be mapped.
  463. @endverbatim
  464. *
  465. * <b> Return Value </b>
  466. * @n None
  467. *
  468. * <b> Pre Condition </b>
  469. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  470. *
  471. * <b> Post Condition </b>
  472. * @n DMA Channel is mapped to the specified Event Queue.
  473. *
  474. * @b Writes
  475. * @n TPCC_TPCC_DMAQNUM_E0;TPCC_TPCC_DMAQNUM_E1;TPCC_TPCC_DMAQNUM_E2;
  476. * TPCC_TPCC_DMAQNUM_E3;TPCC_TPCC_DMAQNUM_E4;TPCC_TPCC_DMAQNUM_E5;
  477. * TPCC_TPCC_DMAQNUM_E6;TPCC_TPCC_DMAQNUM_E7
  478. *
  479. * @b Example
  480. * @verbatim
  481. CSL_Edma3Handle hModule;
  482. CSL_Edma3Obj edmaObj;
  483. CSL_Edma3Context context;
  484. CSL_Status status;
  485. // Module Initialization
  486. CSL_edma3Init(&context);
  487. // Module Level Open
  488. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  489. // Maps DMA Channel 1 to Event Queue 2
  490. CSL_edma3MapDMAChannelToEventQueue(hModule, 1, 2);
  491. ...
  492. @endverbatim
  493. * ===========================================================================
  494. */
  495. /* for misra warnings*/
  496. static inline void CSL_edma3MapDMAChannelToEventQueue
  497. (
  498. CSL_Edma3Handle hModule,
  499. Uint8 dmaChannel,
  500. Uint8 eventQueue
  501. );
  502. static inline void CSL_edma3MapDMAChannelToEventQueue
  503. (
  504. CSL_Edma3Handle hModule,
  505. Uint8 dmaChannel,
  506. Uint8 eventQueue
  507. )
  508. {
  509. Uint8 dmaRegIndex;
  510. Uint8 lsb;
  511. /* There are 8 channels per register; use this to determine the DMAQNUM register Index. */
  512. dmaRegIndex = dmaChannel >> 3;
  513. /* Compute the bit position where the value is to be written. */
  514. lsb = (Uint8)((dmaChannel - (Uint8)(dmaRegIndex * ((Uint8)8U))) << 2);
  515. /* Write the event Queue */
  516. Uint32 temp_Var = ((Uint32)lsb) + 2U;
  517. CSL_FINSR(hModule->regs->TPCC_DMAQNUM[dmaRegIndex], (temp_Var), (Uint32)(lsb), (Uint32)eventQueue);
  518. }
  519. /** ============================================================================
  520. * @n@b CSL_edma3GetDMAChannelToEventQueueMapping
  521. *
  522. * @b Description
  523. * @n The function gets the mapping of the DMA Channel to the Event Queue
  524. *
  525. * @b Arguments
  526. * @verbatim
  527. hModule Module Handle
  528. dmaChannel DMA Channel for which the mapping is to be retreived.
  529. @endverbatim
  530. *
  531. * <b> Return Value </b>
  532. * @n Event Queue to which the DMA channel is mapped to
  533. *
  534. * <b> Pre Condition </b>
  535. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  536. *
  537. * <b> Post Condition </b>
  538. * @n None
  539. *
  540. * @b Reads
  541. * @n TPCC_TPCC_DMAQNUM_E0;TPCC_TPCC_DMAQNUM_E1;TPCC_TPCC_DMAQNUM_E2;
  542. * TPCC_TPCC_DMAQNUM_E3;TPCC_TPCC_DMAQNUM_E4;TPCC_TPCC_DMAQNUM_E5;
  543. * TPCC_TPCC_DMAQNUM_E6;TPCC_TPCC_DMAQNUM_E7
  544. *
  545. * @b Example
  546. * @verbatim
  547. CSL_Edma3Handle hModule;
  548. CSL_Edma3Obj edmaObj;
  549. CSL_Edma3Context context;
  550. CSL_Status status;
  551. Uint8 eventQueue;
  552. // Module Initialization
  553. CSL_edma3Init(&context);
  554. // Module Level Open
  555. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  556. // Get the Event Queue mapping of DMA Channel 1
  557. eventQueue = CSL_edma3GetDMAChannelToEventQueueMapping(hModule, 1);
  558. ...
  559. @endverbatim
  560. * ===========================================================================
  561. */
  562. /* for misra warnings*/
  563. static inline Uint8 CSL_edma3GetDMAChannelToEventQueueMapping
  564. (
  565. CSL_Edma3Handle hModule,
  566. Uint8 dmaChannel
  567. );
  568. static inline Uint8 CSL_edma3GetDMAChannelToEventQueueMapping
  569. (
  570. CSL_Edma3Handle hModule,
  571. Uint8 dmaChannel
  572. )
  573. {
  574. Uint8 dmaRegIndex;
  575. Uint8 lsb;
  576. /* There are 8 channels per register; use this to determine the DMAQNUM register Index. */
  577. dmaRegIndex = dmaChannel >> 3;
  578. /* Compute the bit position from where the value is to be retreived. */
  579. lsb = (Uint8)((dmaChannel - (Uint8)(dmaRegIndex * ((Uint8)8U))) << 2);
  580. /* Get the event queue. */
  581. Uint32 temp_Var = ((Uint32)lsb) + 2U;
  582. return (Uint8)(CSL_FEXTR(hModule->regs->TPCC_DMAQNUM[dmaRegIndex], (temp_Var), (Uint32)(lsb)));
  583. }
  584. /** ============================================================================
  585. * @n@b CSL_edma3MapQDMAChannelToEventQueue
  586. *
  587. * @b Description
  588. * @n The function maps the event ID to the specific DMA Queue.
  589. *
  590. * @b Arguments
  591. * @verbatim
  592. hModule Module Handle
  593. qdmaChannel QDMA Channel to which the event is mapped.
  594. eventQueue Event Queue which is to be mapped.
  595. @endverbatim
  596. *
  597. * <b> Return Value </b>
  598. * @n None
  599. *
  600. * <b> Pre Condition </b>
  601. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  602. *
  603. * <b> Post Condition </b>
  604. * @n DMA Channel is mapped to the specified Event Queue.
  605. *
  606. * @b Writes
  607. * @n TPCC_TPCC_QDMAQNUM_E0;TPCC_TPCC_QDMAQNUM_E1;TPCC_TPCC_QDMAQNUM_E2;
  608. * TPCC_TPCC_QDMAQNUM_E3;TPCC_TPCC_QDMAQNUM_E4;TPCC_TPCC_QDMAQNUM_E5;
  609. * TPCC_TPCC_QDMAQNUM_E6;TPCC_TPCC_QDMAQNUM_E7
  610. *
  611. * @b Example
  612. * @verbatim
  613. CSL_Edma3Handle hModule;
  614. CSL_Edma3Obj edmaObj;
  615. CSL_Edma3Context context;
  616. CSL_Status status;
  617. // Module Initialization
  618. CSL_edma3Init(&context);
  619. // Module Level Open
  620. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  621. // Maps QDMA Channel 1 to Event Queue 2
  622. CSL_edma3MapQDMAChannelToEventQueue(hModule, 1, 2);
  623. ...
  624. @endverbatim
  625. * ===========================================================================
  626. */
  627. /* for misra warnings*/
  628. static inline void CSL_edma3MapQDMAChannelToEventQueue
  629. (
  630. CSL_Edma3Handle hModule,
  631. Uint8 qdmaChannel,
  632. Uint8 eventQueue
  633. );
  634. static inline void CSL_edma3MapQDMAChannelToEventQueue
  635. (
  636. CSL_Edma3Handle hModule,
  637. Uint8 qdmaChannel,
  638. Uint8 eventQueue
  639. )
  640. {
  641. Uint8 lsb;
  642. /* Compute the bit position where the value is to be written. */
  643. lsb = (Uint8)(qdmaChannel << 2);
  644. /* Write the event Queue */
  645. Uint32 temp_Var = ((Uint32)lsb) + 2U;
  646. CSL_FINSR(hModule->regs->TPCC_QDMAQNUM, (temp_Var), (Uint32)(lsb), (Uint32)eventQueue);
  647. }
  648. /** ============================================================================
  649. * @n@b CSL_edma3GetQDMAChannelToEventQueueMapping
  650. *
  651. * @b Description
  652. * @n The function gets the mapping of the QDMA Channel to the Event Queue
  653. *
  654. * @b Arguments
  655. * @verbatim
  656. hModule Module Handle
  657. qdmaChannel QDMA Channel for which the mapping is to be retreived.
  658. @endverbatim
  659. *
  660. * <b> Return Value </b>
  661. * @n Event Queue to which the QDMA channel is mapped to
  662. *
  663. * <b> Pre Condition </b>
  664. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  665. *
  666. * <b> Post Condition </b>
  667. * @n None
  668. *
  669. * @b Reads
  670. * @n TPCC_TPCC_QDMAQNUM_E0;TPCC_TPCC_QDMAQNUM_E1;TPCC_TPCC_QDMAQNUM_E2;
  671. * TPCC_TPCC_QDMAQNUM_E3;TPCC_TPCC_QDMAQNUM_E4;TPCC_TPCC_QDMAQNUM_E5;
  672. * TPCC_TPCC_QDMAQNUM_E6;TPCC_TPCC_QDMAQNUM_E7
  673. *
  674. * @b Example
  675. * @verbatim
  676. CSL_Edma3Handle hModule;
  677. CSL_Edma3Obj edmaObj;
  678. CSL_Edma3Context context;
  679. CSL_Status status;
  680. Uint8 eventQueue;
  681. // Module Initialization
  682. CSL_edma3Init(&context);
  683. // Module Level Open
  684. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  685. // Get the Event Queue mapping of QDMA Channel 1
  686. eventQueue = CSL_edma3GetQDMAChannelToEventQueueMapping(hModule, 1);
  687. ...
  688. @endverbatim
  689. * ===========================================================================
  690. */
  691. /* for misra warnings*/
  692. static inline Uint8 CSL_edma3GetQDMAChannelToEventQueueMapping
  693. (
  694. CSL_Edma3Handle hModule,
  695. Uint8 qdmaChannel
  696. );
  697. static inline Uint8 CSL_edma3GetQDMAChannelToEventQueueMapping
  698. (
  699. CSL_Edma3Handle hModule,
  700. Uint8 qdmaChannel
  701. )
  702. {
  703. Uint8 lsb;
  704. /* Compute the bit position from where the value is to be retreived. */
  705. lsb = (Uint8)(qdmaChannel << 2);
  706. /* Get the event Queue */
  707. Uint32 temp_Var = ((Uint32)lsb) + 2U;
  708. return (Uint8)(CSL_FEXTR(hModule->regs->TPCC_QDMAQNUM, (temp_Var), (Uint32)(lsb)));
  709. }
  710. /** ============================================================================
  711. * @n@b CSL_edma3MapEventQueueToTC
  712. *
  713. * @b Description
  714. * @n The function maps the event queue to a specific TC
  715. *
  716. * @b Arguments
  717. * @verbatim
  718. hModule Module Handle
  719. eventQueue Event Queue which is to be mapped.
  720. tcNum TC to which the queue is to be mapped to.
  721. @endverbatim
  722. *
  723. * <b> Return Value </b>
  724. * @n None
  725. *
  726. * <b> Pre Condition </b>
  727. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  728. *
  729. * <b> Post Condition </b>
  730. * @n Event Queue is mapped to the specific TC
  731. *
  732. * @b Writes
  733. * @n TPCC_TPCC_QUETCMAP_TCNUMQ0;TPCC_TPCC_QUETCMAP_TCNUMQ1;TPCC_TPCC_QUETCMAP_TCNUMQ2;
  734. * TPCC_TPCC_QUETCMAP_TCNUMQ3;TPCC_TPCC_QUETCMAP_TCNUMQ4;TPCC_TPCC_QUETCMAP_TCNUMQ5;
  735. * TPCC_TPCC_QUETCMAP_TCNUMQ6;TPCC_TPCC_QUETCMAP_TCNUMQ7
  736. *
  737. * @b Example
  738. * @verbatim
  739. CSL_Edma3Handle hModule;
  740. CSL_Edma3Obj edmaObj;
  741. CSL_Edma3Context context;
  742. CSL_Status status;
  743. // Module Initialization
  744. CSL_edma3Init(&context);
  745. // Module Level Open
  746. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  747. // Maps Event Queue 1 to TC0
  748. CSL_edma3MapEventQueueToTC(hModule, 1, 0);
  749. ...
  750. @endverbatim
  751. * ===========================================================================
  752. */
  753. /* for misra warnings*/
  754. static inline void CSL_edma3MapEventQueueToTC
  755. (
  756. CSL_Edma3Handle hModule,
  757. Uint8 eventQueue,
  758. Uint8 tcNum
  759. );
  760. static inline void CSL_edma3MapEventQueueToTC
  761. (
  762. CSL_Edma3Handle hModule,
  763. Uint8 eventQueue,
  764. Uint8 tcNum
  765. )
  766. {
  767. Uint8 lsb;
  768. /* Compute the bit position where the value is to be written. */
  769. lsb = (Uint8)(eventQueue << 2);
  770. /* Write the event Queue */
  771. Uint32 temp_Var = ((Uint32)lsb) + 2U;
  772. CSL_FINSR(hModule->regs->TPCC_QUETCMAP, (temp_Var), (Uint32)(lsb), (Uint32)tcNum);
  773. return;
  774. }
  775. /** ============================================================================
  776. * @n@b CSL_edma3GetEventQueueToTCMapping
  777. *
  778. * @b Description
  779. * @n The function gets the TC mapping for the specific event queue.
  780. *
  781. * @b Arguments
  782. * @verbatim
  783. hModule Module Handle
  784. eventQueue Event Queue which for which the mapping is needed.
  785. @endverbatim
  786. *
  787. * <b> Return Value </b>
  788. * @n TC Number to which the event queue is mapped to
  789. *
  790. * <b> Pre Condition </b>
  791. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  792. *
  793. * <b> Post Condition </b>
  794. * @n Event Queue is mapped to the specific TC
  795. *
  796. * @b Reads
  797. * @n TPCC_TPCC_QUETCMAP_TCNUMQ0;TPCC_TPCC_QUETCMAP_TCNUMQ1;TPCC_TPCC_QUETCMAP_TCNUMQ2;
  798. * TPCC_TPCC_QUETCMAP_TCNUMQ3;TPCC_TPCC_QUETCMAP_TCNUMQ4;TPCC_TPCC_QUETCMAP_TCNUMQ5;
  799. * TPCC_TPCC_QUETCMAP_TCNUMQ6;TPCC_TPCC_QUETCMAP_TCNUMQ7
  800. *
  801. * @b Example
  802. * @verbatim
  803. CSL_Edma3Handle hModule;
  804. CSL_Edma3Obj edmaObj;
  805. CSL_Edma3Context context;
  806. CSL_Status status;
  807. Uint8 tcNum;
  808. // Module Initialization
  809. CSL_edma3Init(&context);
  810. // Module Level Open
  811. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  812. // Get the TC mapping for Event Queue 1
  813. tcNum = CSL_edma3GetEventQueueToTCMapping(hModule, 1, 0);
  814. ...
  815. @endverbatim
  816. * ===========================================================================
  817. */
  818. /* for misra warnings*/
  819. static inline Uint8 CSL_edma3GetEventQueueToTCMapping
  820. (
  821. CSL_Edma3Handle hModule,
  822. Uint8 eventQueue
  823. );
  824. static inline Uint8 CSL_edma3GetEventQueueToTCMapping
  825. (
  826. CSL_Edma3Handle hModule,
  827. Uint8 eventQueue
  828. )
  829. {
  830. Uint8 lsb;
  831. /* Compute the bit position where the value is to be written. */
  832. lsb = (Uint8)(eventQueue << 2);
  833. /* Get the TC Number */
  834. Uint32 temp_Var = ((Uint32)lsb) + 2U;
  835. return (Uint8)(CSL_FEXTR(hModule->regs->TPCC_QUETCMAP, (temp_Var), (Uint32)(lsb)));
  836. }
  837. /** ============================================================================
  838. * @n@b CSL_edma3SetEventQueuePriority
  839. *
  840. * @b Description
  841. * @n The function sets the priority of the specific event queue.
  842. *
  843. * @b Arguments
  844. * @verbatim
  845. hModule Module Handle
  846. eventQueue Event Queue whose priority is to be configured.
  847. priority Priority to be configured.
  848. @endverbatim
  849. *
  850. * <b> Return Value </b>
  851. * @n None
  852. *
  853. * <b> Pre Condition </b>
  854. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  855. *
  856. * <b> Post Condition </b>
  857. * @n Event Queue is configured to the specific priority.
  858. *
  859. * @b Writes
  860. * @n TPCC_TPCC_QUEPRI_PRIQ0;TPCC_TPCC_QUEPRI_PRIQ1;TPCC_TPCC_QUEPRI_PRIQ2;
  861. * TPCC_TPCC_QUEPRI_PRIQ3;TPCC_TPCC_QUEPRI_PRIQ4;TPCC_TPCC_QUEPRI_PRIQ5;
  862. * TPCC_TPCC_QUEPRI_PRIQ6;TPCC_TPCC_QUEPRI_PRIQ7
  863. *
  864. * @b Example
  865. * @verbatim
  866. CSL_Edma3Handle hModule;
  867. CSL_Edma3Obj edmaObj;
  868. CSL_Edma3Context context;
  869. CSL_Status status;
  870. // Module Initialization
  871. CSL_edma3Init(&context);
  872. // Module Level Open
  873. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  874. // Maps Event Queue 2 to Priority 4
  875. CSL_edma3SetEventQueuePriority(hModule, 2, 4);
  876. ...
  877. @endverbatim
  878. * ===========================================================================
  879. */
  880. /* for misra warnings*/
  881. static inline void CSL_edma3SetEventQueuePriority
  882. (
  883. CSL_Edma3Handle hModule,
  884. Uint8 eventQueue,
  885. Uint8 priority
  886. );
  887. static inline void CSL_edma3SetEventQueuePriority
  888. (
  889. CSL_Edma3Handle hModule,
  890. Uint8 eventQueue,
  891. Uint8 priority
  892. )
  893. {
  894. Uint8 lsb;
  895. /* Compute the bit position where the value is to be written. */
  896. lsb = (Uint8)(eventQueue << 2);
  897. /* Write the priority. */
  898. Uint32 temp_Var = ((Uint32)lsb) + 2U;
  899. CSL_FINSR(hModule->regs->TPCC_QUEPRI, (temp_Var), (Uint32)(lsb), (Uint32)priority);
  900. return;
  901. }
  902. /** ============================================================================
  903. * @n@b CSL_edma3GetEventQueuePriority
  904. *
  905. * @b Description
  906. * @n The function gets the priority of the specific event queue.
  907. *
  908. * @b Arguments
  909. * @verbatim
  910. hModule Module Handle
  911. eventQueue Event Queue whose priority is to be retrieved.
  912. @endverbatim
  913. *
  914. * <b> Return Value </b>
  915. * @n Priority to which the Event Queue is mapped to.
  916. *
  917. * <b> Pre Condition </b>
  918. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  919. *
  920. * <b> Post Condition </b>
  921. * @n Event Queue is configured to the specific priority.
  922. *
  923. * @b Reads
  924. * @n TPCC_TPCC_QUEPRI_PRIQ0;TPCC_TPCC_QUEPRI_PRIQ1;TPCC_TPCC_QUEPRI_PRIQ2;
  925. * TPCC_TPCC_QUEPRI_PRIQ3;TPCC_TPCC_QUEPRI_PRIQ4;TPCC_TPCC_QUEPRI_PRIQ5;
  926. * TPCC_TPCC_QUEPRI_PRIQ6;TPCC_TPCC_QUEPRI_PRIQ7
  927. *
  928. * @b Example
  929. * @verbatim
  930. CSL_Edma3Handle hModule;
  931. CSL_Edma3Obj edmaObj;
  932. CSL_Edma3Context context;
  933. CSL_Status status;
  934. Uint8 priority;
  935. // Module Initialization
  936. CSL_edma3Init(&context);
  937. // Module Level Open
  938. hModule = CSL_edma3Open(&edmaObj, CSL_EDMA3, NULL, &status);
  939. // Get the priority of Event Queue 2.
  940. priority = CSL_edma3GetEventQueuePriority(hModule, 2);
  941. ...
  942. @endverbatim
  943. * ===========================================================================
  944. */
  945. /* for misra warnings*/
  946. static inline Uint8 CSL_edma3GetEventQueuePriority
  947. (
  948. CSL_Edma3Handle hModule,
  949. Uint8 eventQueue
  950. );
  951. static inline Uint8 CSL_edma3GetEventQueuePriority
  952. (
  953. CSL_Edma3Handle hModule,
  954. Uint8 eventQueue
  955. )
  956. {
  957. Uint8 lsb;
  958. /* Compute the bit position where the value is to be written. */
  959. lsb = (Uint8)(eventQueue << 2);
  960. /* Get the priority. */
  961. Uint32 temp_Var = ((Uint32)lsb) + 2U;
  962. return (Uint8)(CSL_FEXTR(hModule->regs->TPCC_QUEPRI, (temp_Var), (Uint32)(lsb)));
  963. }
  964. /** ============================================================================
  965. * @n@b CSL_edma3GetEventMissed
  966. *
  967. * @b Description
  968. * @n Queries all the events missed.Since there may be upto 64 EDMA
  969. * channels + upto 8 QDMA channels,this points to an array of 3,
  970. * 32 bit elements.Gets the status of the missed events.
  971. *
  972. * @b Arguments
  973. * @verbatim
  974. hModule Module Handle
  975. missedLo missed [0] - holds status from EMR
  976. missedHi missed [1] - holds status from EMRH
  977. missedQdma missed [2] - holds status from QEMR
  978. @endverbatim
  979. *
  980. * <b> Return Value </b>
  981. * @n None
  982. *
  983. * <b> Pre Condition </b>
  984. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  985. *
  986. * <b> Post Condition </b>
  987. * @n None
  988. *
  989. * @b Reads
  990. * @n TPCC_TPCC_EMR,TPCC_TPCC_EMRH,TPCC_TPCC_QEMR
  991. *
  992. * @b Example
  993. * @verbatim
  994. CSL_Edma3Handle hModule;
  995. CSL_Edma3Obj edmaObj;
  996. CSL_Edma3Context context;
  997. CSL_Status status;
  998. CSL_BitMask32 missedLo, missedHi, missedQdma;
  999. // Module Initialization
  1000. CSL_edma3Init(&context);
  1001. // Module Level Open
  1002. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1003. ...
  1004. // Get the missed events
  1005. CSL_edma3GetEventMissed(hModule, &missedEdma, &missedEdmaHi, &missedQdma);
  1006. ...
  1007. @endverbatim
  1008. * ===========================================================================
  1009. */
  1010. /* for misra warnings*/
  1011. static inline void CSL_edma3GetEventMissed
  1012. (
  1013. CSL_Edma3Handle hModule,
  1014. CSL_BitMask32* missedLo,
  1015. CSL_BitMask32* missedHi,
  1016. CSL_BitMask32* missedQdma
  1017. );
  1018. static inline void CSL_edma3GetEventMissed
  1019. (
  1020. CSL_Edma3Handle hModule,
  1021. CSL_BitMask32* missedLo,
  1022. CSL_BitMask32* missedHi,
  1023. CSL_BitMask32* missedQdma
  1024. )
  1025. {
  1026. /* Reading the missed Status registers */
  1027. *missedLo = hModule->regs->TPCC_EMR;
  1028. *missedHi = hModule->regs->TPCC_EMRH;
  1029. *missedQdma = hModule->regs->TPCC_QEMR;
  1030. return;
  1031. }
  1032. /** ============================================================================
  1033. * @n@b CSL_edma3IsDMAChannelMissedEventSet
  1034. *
  1035. * @b Description
  1036. * @n The API checks determines if there is a missed Event for a specific
  1037. * DMA channel
  1038. *
  1039. * @b Arguments
  1040. * @verbatim
  1041. hModule Module Handle
  1042. dmaChannel DMA Channel to be checked
  1043. response This is populated by the API and returns TRUE if the
  1044. event was missed else it returns FALSE.
  1045. @endverbatim
  1046. *
  1047. * <b> Return Value </b>
  1048. * @n None
  1049. *
  1050. * <b> Pre Condition </b>
  1051. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1052. *
  1053. * <b> Post Condition </b>
  1054. * @n None
  1055. *
  1056. * @b Reads
  1057. * @n TPCC_TPCC_EMR_EMR0;TPCC_TPCC_EMR_EMR1;TPCC_TPCC_EMR_EMR2;
  1058. * TPCC_TPCC_EMR_EMR3;TPCC_TPCC_EMR_EMR4;TPCC_TPCC_EMR_EMR5;
  1059. * TPCC_TPCC_EMR_EMR6;TPCC_TPCC_EMR_EMR7;TPCC_TPCC_EMR_EMR8;
  1060. * TPCC_TPCC_EMR_EMR9;TPCC_TPCC_EMR_EMR10;TPCC_TPCC_EMR_EMR11;
  1061. * TPCC_TPCC_EMR_EMR12;TPCC_TPCC_EMR_EMR13;TPCC_TPCC_EMR_EMR14;
  1062. * TPCC_TPCC_EMR_EMR15;TPCC_TPCC_EMR_EMR16;TPCC_TPCC_EMR_EMR17;
  1063. * TPCC_TPCC_EMR_EMR18;TPCC_TPCC_EMR_EMR19;TPCC_TPCC_EMR_EMR20;
  1064. * TPCC_TPCC_EMR_EMR21;TPCC_TPCC_EMR_EMR22;TPCC_TPCC_EMR_EMR23;
  1065. * TPCC_TPCC_EMR_EMR24;TPCC_TPCC_EMR_EMR25;TPCC_TPCC_EMR_EMR26;
  1066. * TPCC_TPCC_EMR_EMR27;TPCC_TPCC_EMR_EMR28;TPCC_TPCC_EMR_EMR29;
  1067. * TPCC_TPCC_EMR_EMR30;TPCC_TPCC_EMR_EMR31;
  1068. * TPCC_TPCC_EMRH_EMR32;TPCC_TPCC_EMRH_EMR33;TPCC_TPCC_EMRH_EMR34;
  1069. * TPCC_TPCC_EMRH_EMR35;TPCC_TPCC_EMRH_EMR36;TPCC_TPCC_EMRH_EMR37;
  1070. * TPCC_TPCC_EMRH_EMR38;TPCC_TPCC_EMRH_EMR39;TPCC_TPCC_EMRH_EMR40;
  1071. * TPCC_TPCC_EMRH_EMR41;TPCC_TPCC_EMRH_EMR42;TPCC_TPCC_EMRH_EMR43;
  1072. * TPCC_TPCC_EMRH_EMR44;TPCC_TPCC_EMRH_EMR45;TPCC_TPCC_EMRH_EMR46;
  1073. * TPCC_TPCC_EMRH_EMR47;TPCC_TPCC_EMRH_EMR48;TPCC_TPCC_EMRH_EMR49;
  1074. * TPCC_TPCC_EMRH_EMR50;TPCC_TPCC_EMRH_EMR51;TPCC_TPCC_EMRH_EMR52;
  1075. * TPCC_TPCC_EMRH_EMR53;TPCC_TPCC_EMRH_EMR54;TPCC_TPCC_EMRH_EMR55;
  1076. * TPCC_TPCC_EMRH_EMR56;TPCC_TPCC_EMRH_EMR57;TPCC_TPCC_EMRH_EMR58;
  1077. * TPCC_TPCC_EMRH_EMR59;TPCC_TPCC_EMRH_EMR60;TPCC_TPCC_EMRH_EMR61;
  1078. * TPCC_TPCC_EMRH_EMR62;TPCC_TPCC_EMRH_EMR63;
  1079. *
  1080. * @b Example
  1081. * @verbatim
  1082. CSL_Edma3Handle hModule;
  1083. CSL_Edma3Obj edmaObj;
  1084. CSL_Edma3Context context;
  1085. CSL_Status status;
  1086. Bool missed;
  1087. // Module Initialization
  1088. CSL_edma3Init(&context);
  1089. // Module Level Open
  1090. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1091. ...
  1092. // Check if DMA Channel 1 has an event missed.
  1093. CSL_edma3IsDMAChannelMissedEventSet(hModule, 1, &missed);
  1094. ...
  1095. @endverbatim
  1096. * ===========================================================================
  1097. */
  1098. /* for misra warnings*/
  1099. static inline void CSL_edma3IsDMAChannelMissedEventSet
  1100. (
  1101. CSL_Edma3Handle hModule,
  1102. Uint8 dmaChannel,
  1103. Bool* response
  1104. );
  1105. static inline void CSL_edma3IsDMAChannelMissedEventSet
  1106. (
  1107. CSL_Edma3Handle hModule,
  1108. Uint8 dmaChannel,
  1109. Bool* response
  1110. )
  1111. {
  1112. /* Determine which register needs to be looked into. */
  1113. if (dmaChannel < 32U)
  1114. {
  1115. /* EMR: Extract the appropriate bit. */
  1116. if (CSL_FEXTR(hModule->regs->TPCC_EMR, (Uint32)(dmaChannel), (Uint32)(dmaChannel)))
  1117. {
  1118. *response = TRUE;
  1119. }
  1120. else
  1121. {
  1122. *response = FALSE;
  1123. }
  1124. }
  1125. else
  1126. {
  1127. /* EMRH: Extract the appropriate bit. */
  1128. if (CSL_FEXTR(hModule->regs->TPCC_EMRH, ((Uint32)(dmaChannel)-32U), ((Uint32)(dmaChannel)-32U)))
  1129. {
  1130. *response = TRUE;
  1131. }
  1132. else
  1133. {
  1134. *response = FALSE;
  1135. }
  1136. }
  1137. return;
  1138. }
  1139. /** ============================================================================
  1140. * @n@b CSL_edma3IsQDMAChannelMissedEventSet
  1141. *
  1142. * @b Description
  1143. * @n The API checks determines if there is a missed Event for a specific
  1144. * DMA channel
  1145. *
  1146. * @b Arguments
  1147. * @verbatim
  1148. hModule Module Handle
  1149. qdmaChannel QDMA Channel to be checked
  1150. response This is populated by the API and returns TRUE if the
  1151. event was missed else it returns FALSE.
  1152. @endverbatim
  1153. *
  1154. * <b> Return Value </b>
  1155. * @n None
  1156. *
  1157. * <b> Pre Condition </b>
  1158. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1159. *
  1160. * <b> Post Condition </b>
  1161. * @n None
  1162. *
  1163. * @b Reads
  1164. * @n TPCC_TPCC_QEMR_QEMR0;TPCC_TPCC_QEMR_QEMR1;TPCC_TPCC_QEMR_QEMR2;
  1165. * TPCC_TPCC_QEMR_QEMR3;TPCC_TPCC_QEMR_QEMR4;TPCC_TPCC_QEMR_QEMR5;
  1166. * TPCC_TPCC_QEMR_QEMR6;TPCC_TPCC_QEMR_QEMR7
  1167. *
  1168. * @b Example
  1169. * @verbatim
  1170. CSL_Edma3Handle hModule;
  1171. CSL_Edma3Obj edmaObj;
  1172. CSL_Edma3Context context;
  1173. CSL_Status status;
  1174. Bool missed;
  1175. // Module Initialization
  1176. CSL_edma3Init(&context);
  1177. // Module Level Open
  1178. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1179. ...
  1180. // Check if DMA Channel 0 has an event missed.
  1181. CSL_edma3IsQDMAChannelMissedEventSet(hModule, 0, &missed);
  1182. ...
  1183. @endverbatim
  1184. * ===========================================================================
  1185. */
  1186. /* for misra warnings*/
  1187. static inline void CSL_edma3IsQDMAChannelMissedEventSet
  1188. (
  1189. CSL_Edma3Handle hModule,
  1190. Uint8 qdmaChannel,
  1191. Bool* response
  1192. );
  1193. static inline void CSL_edma3IsQDMAChannelMissedEventSet
  1194. (
  1195. CSL_Edma3Handle hModule,
  1196. Uint8 qdmaChannel,
  1197. Bool* response
  1198. )
  1199. {
  1200. /* Extract the appropriate QDMA Channel bit. */
  1201. if (CSL_FEXTR(hModule->regs->TPCC_QEMR, (Uint32)(qdmaChannel), (Uint32)(qdmaChannel)))
  1202. {
  1203. *response = TRUE;
  1204. }
  1205. else
  1206. {
  1207. *response = FALSE;
  1208. }
  1209. return;
  1210. }
  1211. /** ============================================================================
  1212. * @n@b CSL_edma3EventMissedClear
  1213. *
  1214. * @b Description
  1215. * @n Clear the Event missed errors
  1216. *
  1217. * @b Arguments
  1218. * @verbatim
  1219. hModule Module Handle
  1220. missedLo Lower 32 of of the Event Missed register needing to
  1221. be cleared (This is the same value as EMR)
  1222. missedHi Upper 32 of of the Event Missed register needing to
  1223. be cleared (This is the same value as EMRH)
  1224. missedQdma Bit mask of Qdma events missed needing to be cleared
  1225. @endverbatim
  1226. *
  1227. * <b> Return Value </b>
  1228. * @n None
  1229. *
  1230. * <b> Pre Condition </b>
  1231. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1232. *
  1233. * <b> Post Condition </b>
  1234. * @n Clears all the missed events
  1235. *
  1236. * @b Writes
  1237. * @n TPCC_TPCC_EMCR,TPCC_TPCC_EMCRH,TPCC_TPCC_QEMCR
  1238. *
  1239. * @b Example
  1240. * @verbatim
  1241. CSL_Edma3Handle hModule;
  1242. CSL_Edma3Obj edmaObj;
  1243. CSL_Edma3Context context;
  1244. CSL_Status status;
  1245. CSL_BitMask32 missedLo, missedHi, missedQdma;
  1246. // Module Initialization
  1247. CSL_edma3Init(&context);
  1248. // Module Level Open
  1249. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1250. ...
  1251. // Get the missed events
  1252. CSL_edma3GetEventMissed(hModule, &missedEdma, &missedEdmaHi, &missedQdma);
  1253. ...
  1254. // Clear the error
  1255. CSL_edma3EventMissedClear(hModule,missedLo, missedHi,qdmamissed);
  1256. ...
  1257. @endverbatim
  1258. * ===========================================================================
  1259. */
  1260. /* for misra warnings*/
  1261. static inline void CSL_edma3EventsMissedClear
  1262. (
  1263. CSL_Edma3Handle hModule,
  1264. CSL_BitMask32 missedLo,
  1265. CSL_BitMask32 missedHi,
  1266. CSL_BitMask32 missedQdma
  1267. );
  1268. static inline void CSL_edma3EventsMissedClear
  1269. (
  1270. CSL_Edma3Handle hModule,
  1271. CSL_BitMask32 missedLo,
  1272. CSL_BitMask32 missedHi,
  1273. CSL_BitMask32 missedQdma
  1274. )
  1275. {
  1276. /* Clear the reported missed events. */
  1277. hModule->regs->TPCC_EMCR = missedLo;
  1278. hModule->regs->TPCC_EMCRH = missedHi;
  1279. hModule->regs->TPCC_QEMCR = missedQdma;
  1280. return;
  1281. }
  1282. /** ============================================================================
  1283. * @n@b CSL_edma3ClearDMAMissedEvent
  1284. *
  1285. * @b Description
  1286. * @n The API clears the missed event for the specific DMA Channel.
  1287. *
  1288. * @b Arguments
  1289. * @verbatim
  1290. hModule Module Handle
  1291. dmaChannel DMA Channel for which the event is cleared.
  1292. @endverbatim
  1293. *
  1294. * <b> Return Value </b>
  1295. * @n None
  1296. *
  1297. * <b> Pre Condition </b>
  1298. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1299. *
  1300. * <b> Post Condition </b>
  1301. * @n Clears all the missed events
  1302. *
  1303. * @b Writes
  1304. * @n TPCC_TPCC_EMCR_EMCR0;TPCC_TPCC_EMCR_EMCR1;TPCC_TPCC_EMCR_EMCR2;
  1305. * TPCC_TPCC_EMCR_EMCR3;TPCC_TPCC_EMCR_EMCR4;TPCC_TPCC_EMCR_EMCR5;
  1306. * TPCC_TPCC_EMCR_EMCR6;TPCC_TPCC_EMCR_EMCR7;TPCC_TPCC_EMCR_EMCR8;
  1307. * TPCC_TPCC_EMCR_EMCR9;TPCC_TPCC_EMCR_EMCR10;TPCC_TPCC_EMCR_EMCR11;
  1308. * TPCC_TPCC_EMCR_EMCR12;TPCC_TPCC_EMCR_EMCR13;TPCC_TPCC_EMCR_EMCR14;
  1309. * TPCC_TPCC_EMCR_EMCR15;TPCC_TPCC_EMCR_EMCR16;TPCC_TPCC_EMCR_EMCR17;
  1310. * TPCC_TPCC_EMCR_EMCR18;TPCC_TPCC_EMCR_EMCR19;TPCC_TPCC_EMCR_EMCR20;
  1311. * TPCC_TPCC_EMCR_EMCR21;TPCC_TPCC_EMCR_EMCR22;TPCC_TPCC_EMCR_EMCR23;
  1312. * TPCC_TPCC_EMCR_EMCR24;TPCC_TPCC_EMCR_EMCR25;TPCC_TPCC_EMCR_EMCR26;
  1313. * TPCC_TPCC_EMCR_EMCR27;TPCC_TPCC_EMCR_EMCR28;TPCC_TPCC_EMCR_EMCR29;
  1314. * TPCC_TPCC_EMCR_EMCR30;TPCC_TPCC_EMCR_EMCR31;
  1315. * TPCC_TPCC_EMCRH_EMCR32;TPCC_TPCC_EMCRH_EMCR33;TPCC_TPCC_EMCRH_EMCR34
  1316. * TPCC_TPCC_EMCRH_EMCR35;TPCC_TPCC_EMCRH_EMCR36;TPCC_TPCC_EMCRH_EMCR37
  1317. * TPCC_TPCC_EMCRH_EMCR38;TPCC_TPCC_EMCRH_EMCR39;TPCC_TPCC_EMCRH_EMCR40
  1318. * TPCC_TPCC_EMCRH_EMCR41;TPCC_TPCC_EMCRH_EMCR42;TPCC_TPCC_EMCRH_EMCR43
  1319. * TPCC_TPCC_EMCRH_EMCR44;TPCC_TPCC_EMCRH_EMCR45;TPCC_TPCC_EMCRH_EMCR46
  1320. * TPCC_TPCC_EMCRH_EMCR47;TPCC_TPCC_EMCRH_EMCR48;TPCC_TPCC_EMCRH_EMCR49
  1321. * TPCC_TPCC_EMCRH_EMCR50;TPCC_TPCC_EMCRH_EMCR51;TPCC_TPCC_EMCRH_EMCR52
  1322. * TPCC_TPCC_EMCRH_EMCR53;TPCC_TPCC_EMCRH_EMCR54;TPCC_TPCC_EMCRH_EMCR55
  1323. * TPCC_TPCC_EMCRH_EMCR56;TPCC_TPCC_EMCRH_EMCR57;TPCC_TPCC_EMCRH_EMCR58
  1324. * TPCC_TPCC_EMCRH_EMCR59;TPCC_TPCC_EMCRH_EMCR60;TPCC_TPCC_EMCRH_EMCR61
  1325. * TPCC_TPCC_EMCRH_EMCR62;TPCC_TPCC_EMCRH_EMCR63;
  1326. *
  1327. * @b Example
  1328. * @verbatim
  1329. CSL_Edma3Handle hModule;
  1330. CSL_Edma3Obj edmaObj;
  1331. CSL_Edma3Context context;
  1332. CSL_Status status;
  1333. CSL_BitMask32 missedLo, missedHi, missedQdma;
  1334. // Module Initialization
  1335. CSL_edma3Init(&context);
  1336. // Module Level Open
  1337. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1338. ...
  1339. // Clear missed DMA 1 channel event.
  1340. CSL_edma3ClearDMAMissedEvent(hModule, 1);
  1341. ...
  1342. @endverbatim
  1343. * ===========================================================================
  1344. */
  1345. /* for misra warnings*/
  1346. static inline void CSL_edma3ClearDMAMissedEvent
  1347. (
  1348. CSL_Edma3Handle hModule,
  1349. Uint8 dmaChannel
  1350. );
  1351. static inline void CSL_edma3ClearDMAMissedEvent
  1352. (
  1353. CSL_Edma3Handle hModule,
  1354. Uint8 dmaChannel
  1355. )
  1356. {
  1357. /* Determine which register needs to be looked into. */
  1358. if (dmaChannel < 32U)
  1359. {
  1360. /* EMCR: Set the appropriate DMA Channel bit. */
  1361. hModule->regs->TPCC_EMCR = CSL_FMKR ((uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  1362. }
  1363. else
  1364. {
  1365. /* EMCRH: Set the appropriate DMA Channel bit. */
  1366. dmaChannel = dmaChannel - 32U;
  1367. hModule->regs->TPCC_EMCRH = CSL_FMKR ((uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  1368. }
  1369. return;
  1370. }
  1371. /** ============================================================================
  1372. * @n@b CSL_edma3ClearQDMAMissedEvent
  1373. *
  1374. * @b Description
  1375. * @n The API clears the missed event for the specific QDMA Channel.
  1376. *
  1377. * @b Arguments
  1378. * @verbatim
  1379. hModule Module Handle
  1380. qdmaChannel QDMA Channel for which the event is cleared.
  1381. @endverbatim
  1382. *
  1383. * <b> Return Value </b>
  1384. * @n None
  1385. *
  1386. * <b> Pre Condition </b>
  1387. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1388. *
  1389. * <b> Post Condition </b>
  1390. * @n Clears all the missed events
  1391. *
  1392. * @b Writes
  1393. * @n TPCC_TPCC_QEMCR_QEMCR0;TPCC_TPCC_QEMCR_QEMCR1;TPCC_TPCC_QEMCR_QEMCR2;
  1394. * TPCC_TPCC_QEMCR_QEMCR3;TPCC_TPCC_QEMCR_QEMCR4;TPCC_TPCC_QEMCR_QEMCR5;
  1395. * TPCC_TPCC_QEMCR_QEMCR6;TPCC_TPCC_QEMCR_QEMCR7
  1396. *
  1397. * @b Example
  1398. * @verbatim
  1399. CSL_Edma3Handle hModule;
  1400. CSL_Edma3Obj edmaObj;
  1401. CSL_Edma3Context context;
  1402. CSL_Status status;
  1403. CSL_BitMask32 missedLo, missedHi, missedQdma;
  1404. // Module Initialization
  1405. CSL_edma3Init(&context);
  1406. // Module Level Open
  1407. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1408. ...
  1409. // Clear missed QDMA Channel 1 event.
  1410. CSL_edma3ClearQDMAMissedEvent(hModule, 1);
  1411. ...
  1412. @endverbatim
  1413. * ===========================================================================
  1414. */
  1415. /* for misra warnings*/
  1416. static inline void CSL_edma3ClearQDMAMissedEvent
  1417. (
  1418. CSL_Edma3Handle hModule,
  1419. Uint8 qdmaChannel
  1420. );
  1421. static inline void CSL_edma3ClearQDMAMissedEvent
  1422. (
  1423. CSL_Edma3Handle hModule,
  1424. Uint8 qdmaChannel
  1425. )
  1426. {
  1427. /* Set the appropriate QDMA Channel bit. */
  1428. CSL_FINSR(hModule->regs->TPCC_QEMCR, (uint32_t)qdmaChannel, (uint32_t)qdmaChannel, ((uint32_t)1U));
  1429. return;
  1430. }
  1431. /** ============================================================================
  1432. * @n@b CSL_edma3GetControllerError
  1433. *
  1434. * @b Description
  1435. * @n The function gets the status of the controller error.
  1436. *
  1437. * @b Arguments
  1438. * @verbatim
  1439. hModule Module Handle
  1440. ccStat Controller Error populated by this API
  1441. @endverbatim
  1442. *
  1443. * <b> Return Value </b>
  1444. * @n None
  1445. *
  1446. * <b> Pre Condition </b>
  1447. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1448. *
  1449. * <b> Post Condition </b>
  1450. * @n None
  1451. *
  1452. * @b Reads
  1453. * @n TPCC_TPCC_CCERR_QTHRXD0;TPCC_TPCC_CCERR_QTHRXD1;TPCC_TPCC_CCERR_QTHRXD2;
  1454. * TPCC_TPCC_CCERR_QTHRXD3;TPCC_TPCC_CCERR_QTHRXD4;TPCC_TPCC_CCERR_QTHRXD5;
  1455. * TPCC_TPCC_CCERR_QTHRXD6;TPCC_TPCC_CCERR_QTHRXD7,
  1456. * TPCC_TPCC_CCERR_TCCERR
  1457. *
  1458. * @b Example
  1459. * @verbatim
  1460. CSL_Edma3Handle hModule;
  1461. CSL_Edma3Obj edmaObj;
  1462. CSL_Edma3Context context;
  1463. CSL_Status status;
  1464. CSL_Edma3CtrlErrStat ccError;
  1465. // Module Initialization
  1466. CSL_edma3Init(&context);
  1467. // Module Level Open
  1468. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1469. ...
  1470. // Get Controller Error
  1471. status = CSL_edma3GetControllerError(hModule,&ccError);
  1472. ...
  1473. @endverbatim
  1474. * ===========================================================================
  1475. */
  1476. /* for misra warnings*/
  1477. static inline void CSL_edma3GetControllerError
  1478. (
  1479. CSL_Edma3Handle hModule,
  1480. CSL_Edma3CtrlErrStat* ccStat
  1481. );
  1482. static inline void CSL_edma3GetControllerError
  1483. (
  1484. CSL_Edma3Handle hModule,
  1485. CSL_Edma3CtrlErrStat* ccStat
  1486. )
  1487. {
  1488. /* Extract the Queue Thresholds and TCC-Error. */
  1489. ccStat->error = hModule->regs->TPCC_CCERR & 0xFFU ;
  1490. ccStat->exceedTcc = (Bool)(CSL_FEXT(hModule->regs->TPCC_CCERR, TPCC_TPCC_CCERR_TCCERR));
  1491. return;
  1492. }
  1493. /** ============================================================================
  1494. * @n@b CSL_edma3ClearControllerError
  1495. *
  1496. * @b Description
  1497. * @n Channel Controller Error Fault.
  1498. *
  1499. * @b Arguments
  1500. * @verbatim
  1501. hModule Module Handle
  1502. ccStat Error Status which is to be cleared.
  1503. @endverbatim
  1504. *
  1505. * <b> Return Value </b>
  1506. * @n None
  1507. *
  1508. * <b> Pre Condition </b>
  1509. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1510. *
  1511. * <b> Post Condition </b>
  1512. * @n None
  1513. *
  1514. * @b Writes
  1515. * @n TPCC_TPCC_CCERRCLR_QTHRXD0;TPCC_TPCC_CCERRCLR_QTHRXD1;TPCC_TPCC_CCERRCLR_QTHRXD2;
  1516. * TPCC_TPCC_CCERRCLR_QTHRXD3;TPCC_TPCC_CCERRCLR_QTHRXD4;TPCC_TPCC_CCERRCLR_QTHRXD5;
  1517. * TPCC_TPCC_CCERRCLR_QTHRXD6;TPCC_TPCC_CCERRCLR_QTHRXD7,
  1518. * TPCC_TPCC_CCERR_TCCERR
  1519. *
  1520. * @b Example
  1521. * @verbatim
  1522. CSL_Edma3Handle hModule;
  1523. CSL_Edma3Obj edmaObj;
  1524. CSL_Edma3Context context;
  1525. CSL_Status status;
  1526. CSL_Edma3CtrlErrStat ccError;
  1527. // Module Initialization
  1528. CSL_edma3Init(&context);
  1529. // Module Level Open
  1530. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1531. ...
  1532. // Get Controller Error
  1533. status = CSL_edma3GetControllerError(hModule,&ccError);
  1534. ...
  1535. // Clear the error.
  1536. CSL_edma3ClearControllerError(hModule,&ccError);
  1537. ...
  1538. @endverbatim
  1539. * ===========================================================================
  1540. */
  1541. static inline void CSL_edma3ClearControllerError
  1542. (
  1543. CSL_Edma3Handle hModule,
  1544. const CSL_Edma3CtrlErrStat* ccStat
  1545. );
  1546. static inline void CSL_edma3ClearControllerError
  1547. (
  1548. CSL_Edma3Handle hModule,
  1549. const CSL_Edma3CtrlErrStat* ccStat
  1550. )
  1551. {
  1552. /* Clears the errors */
  1553. hModule->regs->TPCC_CCERRCLR = CSL_FMK(TPCC_TPCC_CCERR_TCCERR, (Uint32)ccStat->exceedTcc) | ccStat->error;
  1554. return;
  1555. }
  1556. /** ============================================================================
  1557. * @n@b CSL_edma3ErrorEval
  1558. *
  1559. * @b Description
  1560. * @n This API enables enables evaluation of errros for the specified
  1561. * view/shadow region.Sets EVAL bit of the EEVAL register in the Global
  1562. * register space
  1563. *
  1564. * @b Arguments
  1565. * @verbatim
  1566. hModule Module Handle
  1567. @endverbatim
  1568. *
  1569. * <b> Return Value </b>
  1570. * @n None
  1571. *
  1572. * <b> Pre Condition </b>
  1573. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1574. *
  1575. * <b> Post Condition </b>
  1576. * @n None
  1577. *
  1578. * @b Writes
  1579. * @n TPCC_TPCC_EEVAL_EVAL=1
  1580. *
  1581. * @b Example
  1582. * @verbatim
  1583. CSL_Edma3Handle hModule;
  1584. CSL_Edma3Obj edmaObj;
  1585. CSL_Edma3Context context;
  1586. CSL_Status status;
  1587. // Module Initialization
  1588. CSL_edma3Init(&context);
  1589. // Module Level Open
  1590. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1591. // Set the Error Interrupt Evaluation
  1592. CSL_edma3ErrorEval(hModule);
  1593. ...
  1594. @endverbatim
  1595. * ===========================================================================
  1596. */
  1597. /* for misra warnings*/
  1598. static inline void CSL_edma3ErrorEval (CSL_Edma3Handle hModule);
  1599. static inline void CSL_edma3ErrorEval (CSL_Edma3Handle hModule)
  1600. {
  1601. hModule->regs->TPCC_EEVAL = CSL_FMK(TPCC_TPCC_EEVAL_EVAL, (Uint32)1U);
  1602. return;
  1603. }
  1604. /** ============================================================================
  1605. * @n@b CSL_edma3DmaRegionAccessEnable
  1606. *
  1607. * @b Description
  1608. * @n This API enables read/write access to the shadow regions for the
  1609. * specific DMA channels.
  1610. *
  1611. * @b Arguments
  1612. * @verbatim
  1613. hModule Module Handle
  1614. edmaRegion Shadow Region
  1615. access Region bits to be programmed
  1616. drae Bitmask to be enabled in DRAE
  1617. draeh Bitmask to be enabled in DRAEH
  1618. @endverbatim
  1619. *
  1620. * <b> Return Value </b>
  1621. * @n None
  1622. *
  1623. * <b> Pre Condition </b>
  1624. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1625. *
  1626. * <b> Post Condition </b>
  1627. * @n None
  1628. *
  1629. * @b Writes
  1630. * @n TPCC_TPCC_DRA_DRAE_E0=1;TPCC_TPCC_DRA_DRAE_E1=1;TPCC_TPCC_DRA_DRAE_E2=1;
  1631. * TPCC_TPCC_DRA_DRAE_E3=1;TPCC_TPCC_DRA_DRAE_E4=1;TPCC_TPCC_DRA_DRAE_E5=1;
  1632. * TPCC_TPCC_DRA_DRAE_E6=1;TPCC_TPCC_DRA_DRAE_E7=1;TPCC_TPCC_DRA_DRAE_E8=1;
  1633. * TPCC_TPCC_DRA_DRAE_E9=1;TPCC_TPCC_DRA_DRAE_E10=1;TPCC_TPCC_DRA_DRAE_E11=1;
  1634. * TPCC_TPCC_DRA_DRAE_E12=1;TPCC_TPCC_DRA_DRAE_E13=1;TPCC_TPCC_DRA_DRAE_E14=1;
  1635. * TPCC_TPCC_DRA_DRAE_E15=1;TPCC_TPCC_DRA_DRAE_E16=1;TPCC_TPCC_DRA_DRAE_E17=1;
  1636. * TPCC_TPCC_DRA_DRAE_E18=1;TPCC_TPCC_DRA_DRAE_E19=1;TPCC_TPCC_DRA_DRAE_E20=1;
  1637. * TPCC_TPCC_DRA_DRAE_E21=1;TPCC_TPCC_DRA_DRAE_E22=1;TPCC_TPCC_DRA_DRAE_E23=1;
  1638. * TPCC_TPCC_DRA_DRAE_E24=1;TPCC_TPCC_DRA_DRAE_E25=1;TPCC_TPCC_DRA_DRAE_E26=1;
  1639. * TPCC_TPCC_DRA_DRAE_E27=1;TPCC_TPCC_DRA_DRAE_E28=1;TPCC_TPCC_DRA_DRAE_E29=1;
  1640. * TPCC_TPCC_DRA_DRAE_E30=1;TPCC_TPCC_DRA_DRAE_E31=1;
  1641. * @n TPCC_TPCC_DRA_DRAEH_E32=1;TPCC_TPCC_DRA_DRAEH_E33=1;TPCC_TPCC_DRA_DRAEH_E34=1;
  1642. * TPCC_TPCC_DRA_DRAEH_E35=1;TPCC_TPCC_DRA_DRAEH_E36=1;TPCC_TPCC_DRA_DRAEH_E37=1;
  1643. * TPCC_TPCC_DRA_DRAEH_E38=1;TPCC_TPCC_DRA_DRAEH_E39=1;TPCC_TPCC_DRA_DRAEH_E40=1;
  1644. * TPCC_TPCC_DRA_DRAEH_E41=1;TPCC_TPCC_DRA_DRAEH_E42=1;TPCC_TPCC_DRA_DRAEH_E43=1;
  1645. * TPCC_TPCC_DRA_DRAEH_E44=1;TPCC_TPCC_DRA_DRAEH_E45=1;TPCC_TPCC_DRA_DRAEH_E46=1;
  1646. * TPCC_TPCC_DRA_DRAEH_E47=1;TPCC_TPCC_DRA_DRAEH_E48=1;TPCC_TPCC_DRA_DRAEH_E49=1;
  1647. * TPCC_TPCC_DRA_DRAEH_E50=1;TPCC_TPCC_DRA_DRAEH_E51=1;TPCC_TPCC_DRA_DRAEH_E52=1;
  1648. * TPCC_TPCC_DRA_DRAEH_E53=1;TPCC_TPCC_DRA_DRAEH_E54=1;TPCC_TPCC_DRA_DRAEH_E55=1;
  1649. * TPCC_TPCC_DRA_DRAEH_E56=1;TPCC_TPCC_DRA_DRAEH_E57=1;TPCC_TPCC_DRA_DRAEH_E58=1;
  1650. * TPCC_TPCC_DRA_DRAEH_E59=1;TPCC_TPCC_DRA_DRAEH_E60=1;TPCC_TPCC_DRA_DRAEH_E61=1;
  1651. * TPCC_TPCC_DRA_DRAEH_E62=1;TPCC_TPCC_DRA_DRAEH_E63=1;
  1652. *
  1653. * @b Example
  1654. * @verbatim
  1655. CSL_Edma3Handle hModule;
  1656. CSL_Edma3Obj edmaObj;
  1657. CSL_Edma3Context context;
  1658. CSL_Status status;
  1659. // Module Initialization
  1660. CSL_edma3Init(&context);
  1661. // Module Level Open
  1662. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1663. // Enable read/write access in Region 0 for DMA Channel 0 to 7
  1664. CSL_edma3DmaRegionAccessEnable(hModule, 0, 0x000000FF, 0x0);
  1665. ...
  1666. @endverbatim
  1667. * ===========================================================================
  1668. */
  1669. /* for misra warnings*/
  1670. static inline void CSL_edma3DmaRegionAccessEnable
  1671. (
  1672. CSL_Edma3Handle hModule,
  1673. Int edmaRegion,
  1674. CSL_BitMask32 drae,
  1675. CSL_BitMask32 draeh
  1676. );
  1677. static inline void CSL_edma3DmaRegionAccessEnable
  1678. (
  1679. CSL_Edma3Handle hModule,
  1680. Int edmaRegion,
  1681. CSL_BitMask32 drae,
  1682. CSL_BitMask32 draeh
  1683. )
  1684. {
  1685. /* Set the appropriate bit masks. */
  1686. hModule->regs->TPCC_DRA[edmaRegion].DRAE |= drae;
  1687. #ifdef SOC_C6678
  1688. if (edmaRegion != 0) {
  1689. #endif
  1690. hModule->regs->TPCC_DRA[edmaRegion].DRAEH |= draeh;
  1691. #ifdef SOC_C6678
  1692. }
  1693. #endif
  1694. return;
  1695. }
  1696. /** ============================================================================
  1697. * @n@b CSL_edma3DmaRegionAccessDisable
  1698. *
  1699. * @b Description
  1700. * @n This API disables read/write access to the shadow regions for the
  1701. * specific DMA channels.
  1702. *
  1703. * @b Arguments
  1704. * @verbatim
  1705. hModule Module Handle
  1706. edmaRegion Shadow Region
  1707. access Region bits to be programmed
  1708. drae Bitmask to be disabled in DRAE
  1709. draeh Bitmask to be disabled in DRAEH
  1710. @endverbatim
  1711. *
  1712. * <b> Return Value </b>
  1713. * @n None
  1714. *
  1715. * <b> Pre Condition </b>
  1716. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1717. *
  1718. * <b> Post Condition </b>
  1719. * @n None
  1720. *
  1721. * @b Writes
  1722. * @n TPCC_TPCC_DRA_DRAE_E0=0;TPCC_TPCC_DRA_DRAE_E1=0;TPCC_TPCC_DRA_DRAE_E2=0;
  1723. * TPCC_TPCC_DRA_DRAE_E3=0;TPCC_TPCC_DRA_DRAE_E4=0;TPCC_TPCC_DRA_DRAE_E5=0;
  1724. * TPCC_TPCC_DRA_DRAE_E6=0;TPCC_TPCC_DRA_DRAE_E7=0;TPCC_TPCC_DRA_DRAE_E8=0;
  1725. * TPCC_TPCC_DRA_DRAE_E9=0;TPCC_TPCC_DRA_DRAE_E10=0;TPCC_TPCC_DRA_DRAE_E11=0;
  1726. * TPCC_TPCC_DRA_DRAE_E12=0;TPCC_TPCC_DRA_DRAE_E13=0;TPCC_TPCC_DRA_DRAE_E14=0;
  1727. * TPCC_TPCC_DRA_DRAE_E15=0;TPCC_TPCC_DRA_DRAE_E16=0;TPCC_TPCC_DRA_DRAE_E17=0;
  1728. * TPCC_TPCC_DRA_DRAE_E18=0;TPCC_TPCC_DRA_DRAE_E19=0;TPCC_TPCC_DRA_DRAE_E20=0;
  1729. * TPCC_TPCC_DRA_DRAE_E21=0;TPCC_TPCC_DRA_DRAE_E22=0;TPCC_TPCC_DRA_DRAE_E23=0;
  1730. * TPCC_TPCC_DRA_DRAE_E24=0;TPCC_TPCC_DRA_DRAE_E25=0;TPCC_TPCC_DRA_DRAE_E26=0;
  1731. * TPCC_TPCC_DRA_DRAE_E27=0;TPCC_TPCC_DRA_DRAE_E28=0;TPCC_TPCC_DRA_DRAE_E29=0;
  1732. * TPCC_TPCC_DRA_DRAE_E30=0;TPCC_TPCC_DRA_DRAE_E31=0;
  1733. * @n TPCC_TPCC_DRA_DRAEH_E32=0;TPCC_TPCC_DRA_DRAEH_E33=0;TPCC_TPCC_DRA_DRAEH_E34=0;
  1734. * TPCC_TPCC_DRA_DRAEH_E35=0;TPCC_TPCC_DRA_DRAEH_E36=0;TPCC_TPCC_DRA_DRAEH_E37=0;
  1735. * TPCC_TPCC_DRA_DRAEH_E38=0;TPCC_TPCC_DRA_DRAEH_E39=0;TPCC_TPCC_DRA_DRAEH_E40=0;
  1736. * TPCC_TPCC_DRA_DRAEH_E41=0;TPCC_TPCC_DRA_DRAEH_E42=0;TPCC_TPCC_DRA_DRAEH_E43=0;
  1737. * TPCC_TPCC_DRA_DRAEH_E44=0;TPCC_TPCC_DRA_DRAEH_E45=0;TPCC_TPCC_DRA_DRAEH_E46=0;
  1738. * TPCC_TPCC_DRA_DRAEH_E47=0;TPCC_TPCC_DRA_DRAEH_E48=0;TPCC_TPCC_DRA_DRAEH_E49=0;
  1739. * TPCC_TPCC_DRA_DRAEH_E50=0;TPCC_TPCC_DRA_DRAEH_E51=0;TPCC_TPCC_DRA_DRAEH_E52=0;
  1740. * TPCC_TPCC_DRA_DRAEH_E53=0;TPCC_TPCC_DRA_DRAEH_E54=0;TPCC_TPCC_DRA_DRAEH_E55=0;
  1741. * TPCC_TPCC_DRA_DRAEH_E56=0;TPCC_TPCC_DRA_DRAEH_E57=0;TPCC_TPCC_DRA_DRAEH_E58=0;
  1742. * TPCC_TPCC_DRA_DRAEH_E59=0;TPCC_TPCC_DRA_DRAEH_E60=0;TPCC_TPCC_DRA_DRAEH_E61=0;
  1743. * TPCC_TPCC_DRA_DRAEH_E62=0;TPCC_TPCC_DRA_DRAEH_E63=0;
  1744. *
  1745. * @b Example
  1746. * @verbatim
  1747. CSL_Edma3Handle hModule;
  1748. CSL_Edma3Obj edmaObj;
  1749. CSL_Edma3Context context;
  1750. CSL_Status status;
  1751. // Module Initialization
  1752. CSL_edma3Init(&context);
  1753. // Module Level Open
  1754. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1755. // Disable read/write access in Region 0 for DMA Channel 0 to 7
  1756. CSL_edma3DmaRegionAccessDisable(hModule, 0, 0x000000FF, 0x0);
  1757. ...
  1758. @endverbatim
  1759. * ===========================================================================
  1760. */
  1761. /* for misra warnings*/
  1762. static inline void CSL_edma3DmaRegionAccessDisable
  1763. (
  1764. CSL_Edma3Handle hModule,
  1765. Int edmaRegion,
  1766. CSL_BitMask32 drae,
  1767. CSL_BitMask32 draeh
  1768. );
  1769. static inline void CSL_edma3DmaRegionAccessDisable
  1770. (
  1771. CSL_Edma3Handle hModule,
  1772. Int edmaRegion,
  1773. CSL_BitMask32 drae,
  1774. CSL_BitMask32 draeh
  1775. )
  1776. {
  1777. /* Clear the appropriate bit masks. */
  1778. hModule->regs->TPCC_DRA[edmaRegion].DRAE &= ~drae;
  1779. hModule->regs->TPCC_DRA[edmaRegion].DRAEH &= ~draeh;
  1780. return;
  1781. }
  1782. /** ============================================================================
  1783. * @n@b CSL_edma3QdmaRegionAccessEnable
  1784. *
  1785. * @b Description
  1786. * @n This API enables read/write access to the shadow regions for the
  1787. * specific QDMA channels.
  1788. *
  1789. * @b Arguments
  1790. * @verbatim
  1791. hModule Module Handle
  1792. edmaRegion Shadow Region
  1793. qrae Bitmask to be enabled in QRAE
  1794. @endverbatim
  1795. *
  1796. * <b> Return Value </b>
  1797. * @n None
  1798. *
  1799. * <b> Pre Condition </b>
  1800. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1801. *
  1802. * <b> Post Condition </b>
  1803. * @n None
  1804. *
  1805. * @b Writes
  1806. * @n TPCC_TPCC_QRAE_E0=1;TPCC_TPCC_QRAE_E1=1;TPCC_TPCC_QRAE_E2=1;
  1807. * TPCC_TPCC_QRAE_E3=1;TPCC_TPCC_QRAE_E4=1;TPCC_TPCC_QRAE_E5=1;
  1808. * TPCC_TPCC_QRAE_E6=1;TPCC_TPCC_QRAE_E7=1
  1809. *
  1810. * @b Example
  1811. * @verbatim
  1812. CSL_Edma3Handle hModule;
  1813. CSL_Edma3Obj edmaObj;
  1814. CSL_Edma3Context context;
  1815. CSL_Status status;
  1816. // Module Initialization
  1817. CSL_edma3Init(&context);
  1818. // Module Level Open
  1819. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1820. // Enable read/write access in Region 0 for QDMA 0 to 3
  1821. CSL_edma3QdmaRegionAccessEnable(hModule, 0, 0x0000000F);
  1822. @endverbatim
  1823. * ===========================================================================
  1824. */
  1825. /* for misra warnings*/
  1826. static inline void CSL_edma3QdmaRegionAccessEnable
  1827. (
  1828. CSL_Edma3Handle hModule,
  1829. Int edmaRegion,
  1830. CSL_BitMask32 qrae
  1831. );
  1832. static inline void CSL_edma3QdmaRegionAccessEnable
  1833. (
  1834. CSL_Edma3Handle hModule,
  1835. Int edmaRegion,
  1836. CSL_BitMask32 qrae
  1837. )
  1838. {
  1839. /* Set the appropriate bit masks. */
  1840. hModule->regs->TPCC_QRAE[edmaRegion] |= qrae;
  1841. return;
  1842. }
  1843. /** ============================================================================
  1844. * @n@b CSL_edma3QdmaRegionAccessDisable
  1845. *
  1846. * @b Description
  1847. * @n This API disables read/write access to the shadow regions for the
  1848. * specific QDMA channels.
  1849. *
  1850. * @b Arguments
  1851. * @verbatim
  1852. hModule Module Handle
  1853. edmaRegion Shadow Region.
  1854. qrae Bitmask to be enabled in QRAE
  1855. @endverbatim
  1856. *
  1857. * <b> Return Value </b>
  1858. * @n None
  1859. *
  1860. * <b> Pre Condition </b>
  1861. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1862. *
  1863. * <b> Post Condition </b>
  1864. * @n None
  1865. *
  1866. * @b Writes
  1867. * @n TPCC_TPCC_QRAE_E0=0;TPCC_TPCC_QRAE_E1=0;TPCC_TPCC_QRAE_E2=0;
  1868. * TPCC_TPCC_QRAE_E3=0;TPCC_TPCC_QRAE_E4=0;TPCC_TPCC_QRAE_E5=0;
  1869. * TPCC_TPCC_QRAE_E6=0;TPCC_TPCC_QRAE_E7=0
  1870. *
  1871. * @b Example
  1872. * @verbatim
  1873. CSL_Edma3Handle hModule;
  1874. CSL_Edma3Obj edmaObj;
  1875. CSL_Edma3Context context;
  1876. CSL_Status status;
  1877. // Module Initialization
  1878. CSL_edma3Init(&context);
  1879. // Module Level Open
  1880. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1881. // Disable read/write access in Region 0 for QDMA 0 to 3
  1882. CSL_edma3QdmaRegionAccessDisable(hModule, 0, 0x0000000F);
  1883. ...
  1884. @endverbatim
  1885. * ===========================================================================
  1886. */
  1887. /* for misra warnings*/
  1888. static inline void CSL_edma3QdmaRegionAccessDisable
  1889. (
  1890. CSL_Edma3Handle hModule,
  1891. Int edmaRegion,
  1892. CSL_BitMask32 qrae
  1893. );
  1894. static inline void CSL_edma3QdmaRegionAccessDisable
  1895. (
  1896. CSL_Edma3Handle hModule,
  1897. Int edmaRegion,
  1898. CSL_BitMask32 qrae
  1899. )
  1900. {
  1901. /* Clear the appropriate bits */
  1902. hModule->regs->TPCC_QRAE[edmaRegion] &= ~qrae;
  1903. return;
  1904. }
  1905. /** ============================================================================
  1906. * @n@b CSL_edma3GetWaterMark
  1907. *
  1908. * @b Description
  1909. * @n The function gets the Queue Watermark for the specific event queue.
  1910. *
  1911. * @b Arguments
  1912. * @verbatim
  1913. hModule Module Handle
  1914. eventQueue Event queue number for which the watermark is retreived.
  1915. waterMark This is populated by the API to the configured water mark
  1916. @endverbatim
  1917. *
  1918. * <b> Return Value </b>
  1919. * @n None
  1920. *
  1921. * <b> Pre Condition </b>
  1922. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1923. *
  1924. * <b> Post Condition </b>
  1925. * @n None
  1926. *
  1927. * @b Reads
  1928. * @n TPCC_TPCC_QSTAT_WM
  1929. *
  1930. * @b Example
  1931. * @verbatim
  1932. CSL_Edma3Handle hModule;
  1933. CSL_Edma3Obj edmaObj;
  1934. CSL_Edma3Context context;
  1935. CSL_Status status;
  1936. Uint8 waterMark;
  1937. // Module Initialization
  1938. CSL_edma3Init(&context);
  1939. // Module Level Open
  1940. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  1941. // Get the Water Mark Queue for event queue 0
  1942. CSL_edma3GetWaterMark(hModule, 0, &waterMark);
  1943. ...
  1944. @endverbatim
  1945. * ===========================================================================
  1946. */
  1947. /* for misra warnings*/
  1948. static inline void CSL_edma3GetWaterMark
  1949. (
  1950. CSL_Edma3Handle hModule,
  1951. Uint8 eventQueue,
  1952. Uint8* waterMark
  1953. );
  1954. static inline void CSL_edma3GetWaterMark
  1955. (
  1956. CSL_Edma3Handle hModule,
  1957. Uint8 eventQueue,
  1958. Uint8* waterMark
  1959. )
  1960. {
  1961. /* Extract the watermark from the appropriate event queue. */
  1962. *waterMark = (Uint8)CSL_FEXT(hModule->regs->TPCC_QSTAT[eventQueue], TPCC_TPCC_QSTAT0_WM);
  1963. return;
  1964. }
  1965. /** ============================================================================
  1966. * @n@b CSL_edma3GetNumberValidEntries
  1967. *
  1968. * @b Description
  1969. * @n The function gets the Number of valid entries for the specific event queue.
  1970. *
  1971. * @b Arguments
  1972. * @verbatim
  1973. hModule Module Handle
  1974. eventQueue Event queue number for which the watermark is retreived.
  1975. numValidEntries This is populated by the API to the number of valid entries
  1976. @endverbatim
  1977. *
  1978. * <b> Return Value </b>
  1979. * @n None
  1980. *
  1981. * <b> Pre Condition </b>
  1982. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  1983. *
  1984. * <b> Post Condition </b>
  1985. * @n None
  1986. *
  1987. * @b Reads
  1988. * @n TPCC_TPCC_QSTAT_NUMVAL
  1989. *
  1990. * @b Example
  1991. * @verbatim
  1992. CSL_Edma3Handle hModule;
  1993. CSL_Edma3Obj edmaObj;
  1994. CSL_Edma3Context context;
  1995. CSL_Status status;
  1996. Uint8 numVal;
  1997. // Module Initialization
  1998. CSL_edma3Init(&context);
  1999. // Module Level Open
  2000. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2001. // Get the Number of valid entries in event queue 0.
  2002. CSL_edma3GetNumberValidEntries(hModule, 0, &numVal);
  2003. ...
  2004. @endverbatim
  2005. * ===========================================================================
  2006. */
  2007. /* for misra warnings*/
  2008. static inline void CSL_edma3GetNumberValidEntries
  2009. (
  2010. CSL_Edma3Handle hModule,
  2011. Uint8 eventQueue,
  2012. Uint8* numValidEntries
  2013. );
  2014. static inline void CSL_edma3GetNumberValidEntries
  2015. (
  2016. CSL_Edma3Handle hModule,
  2017. Uint8 eventQueue,
  2018. Uint8* numValidEntries
  2019. )
  2020. {
  2021. /* Extract the number of valid entries from the appropriate event queue. */
  2022. *numValidEntries = (Uint8)CSL_FEXT(hModule->regs->TPCC_QSTAT[eventQueue], TPCC_TPCC_QSTAT0_NUMVAL);
  2023. return;
  2024. }
  2025. /** ============================================================================
  2026. * @n@b CSL_edma3GetStartPointer
  2027. *
  2028. * @b Description
  2029. * @n The function gets the Number of valid entries for the specific event queue.
  2030. *
  2031. * @b Arguments
  2032. * @verbatim
  2033. hModule Module Handle
  2034. eventQueue Event queue number for which the watermark is retreived.
  2035. startPtr This is populated by the API to the start pointer
  2036. @endverbatim
  2037. *
  2038. * <b> Return Value </b>
  2039. * @n None
  2040. *
  2041. * <b> Pre Condition </b>
  2042. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2043. *
  2044. * <b> Post Condition </b>
  2045. * @n None
  2046. *
  2047. * @b Reads
  2048. * @n TPCC_TPCC_QSTAT_STRPTR
  2049. *
  2050. * @b Example
  2051. * @verbatim
  2052. CSL_Edma3Handle hModule;
  2053. CSL_Edma3Obj edmaObj;
  2054. CSL_Edma3Context context;
  2055. CSL_Status status;
  2056. Uint8 startPtr;
  2057. // Module Initialization
  2058. CSL_edma3Init(&context);
  2059. // Module Level Open
  2060. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2061. // Get the Number of valid entries in event queue 0.
  2062. CSL_edma3GetStartPointer(hModule, 0, &startPtr);
  2063. ...
  2064. @endverbatim
  2065. * ===========================================================================
  2066. */
  2067. /* for misra warnings*/
  2068. static inline void CSL_edma3GetStartPointer
  2069. (
  2070. CSL_Edma3Handle hModule,
  2071. Uint8 eventQueue,
  2072. Uint8* startPtr
  2073. );
  2074. static inline void CSL_edma3GetStartPointer
  2075. (
  2076. CSL_Edma3Handle hModule,
  2077. Uint8 eventQueue,
  2078. Uint8* startPtr
  2079. )
  2080. {
  2081. /* Extract the start pointer from the appropriate event queue. */
  2082. *startPtr = (Uint8)CSL_FEXT(hModule->regs->TPCC_QSTAT[eventQueue], TPCC_TPCC_QSTAT0_STRPTR);
  2083. return;
  2084. }
  2085. /** ============================================================================
  2086. * @n@b CSL_edma3GetThresholdExceeded
  2087. *
  2088. * @b Description
  2089. * @n The function gets the threshold exceeded flag for the specific event queue.
  2090. *
  2091. * @b Arguments
  2092. * @verbatim
  2093. hModule Module Handle
  2094. eventQueue Event queue number for which the watermark is retreived.
  2095. thresholdExceeded This is populated by the API to the threshold exceeded flag
  2096. for the specific event queue.
  2097. @endverbatim
  2098. *
  2099. * <b> Return Value </b>
  2100. * @n None
  2101. *
  2102. * <b> Pre Condition </b>
  2103. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2104. *
  2105. * <b> Post Condition </b>
  2106. * @n None
  2107. *
  2108. * @b Reads
  2109. * @n TPCC_TPCC_QSTAT_THRXCD
  2110. *
  2111. * @b Example
  2112. * @verbatim
  2113. CSL_Edma3Handle hModule;
  2114. CSL_Edma3Obj edmaObj;
  2115. CSL_Edma3Context context;
  2116. CSL_Status status;
  2117. Uint8 thresholdExceeded;
  2118. // Module Initialization
  2119. CSL_edma3Init(&context);
  2120. // Module Level Open
  2121. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2122. // Determine if the threshold has been exceeded or not for Queue 1
  2123. CSL_edma3GetThresholdExceeded(hModule, 1, &thresholdExceeded);
  2124. ...
  2125. @endverbatim
  2126. * ===========================================================================
  2127. */
  2128. /* for misra warnings*/
  2129. static inline void CSL_edma3GetThresholdExceeded
  2130. (
  2131. CSL_Edma3Handle hModule,
  2132. Uint8 eventQueue,
  2133. Bool* thresholdExceeded
  2134. );
  2135. static inline void CSL_edma3GetThresholdExceeded
  2136. (
  2137. CSL_Edma3Handle hModule,
  2138. Uint8 eventQueue,
  2139. Bool* thresholdExceeded
  2140. )
  2141. {
  2142. /* Extract the threshold exceeded from the appropriate event queue. */
  2143. *thresholdExceeded = (Bool)CSL_FEXT(hModule->regs->TPCC_QSTAT[eventQueue], TPCC_TPCC_QSTAT0_THRXCD);
  2144. return;
  2145. }
  2146. /** ============================================================================
  2147. * @n@b CSL_edma3EventQueueThresholdSet
  2148. *
  2149. * @b Description
  2150. * @n The function configures the queue threshold.
  2151. *
  2152. * @b Arguments
  2153. * @verbatim
  2154. hModule Module Handle
  2155. eventQueue Event queue for which the threshold is configured
  2156. threshold Target threshold value.
  2157. @endverbatim
  2158. *
  2159. * <b> Return Value </b>
  2160. * @n None
  2161. *
  2162. * <b> Pre Condition </b>
  2163. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2164. *
  2165. * <b> Post Condition </b>
  2166. * @n None
  2167. *
  2168. * @b Writes
  2169. * @n TPCC_TPCC_QWMTHRA_Q0;TPCC_TPCC_QWMTHRA_Q1;TPCC_TPCC_QWMTHRA_Q2;
  2170. * TPCC_TPCC_QWMTHRA_Q3;
  2171. * @n TPCC_TPCC_QWMTHRB_Q4;TPCC_TPCC_QWMTHRB_Q1;TPCC_TPCC_QWMTHRB_Q2;
  2172. * TPCC_TPCC_QWMTHRB_Q3
  2173. *
  2174. * @b Example
  2175. * @verbatim
  2176. CSL_Edma3Handle hModule;
  2177. CSL_Edma3Obj edmaObj;
  2178. CSL_Edma3Context context;
  2179. CSL_Status status;
  2180. // Module Initialization
  2181. CSL_edma3Init(&context);
  2182. // Module Level Open
  2183. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2184. // Set the Queue threshold for Event Queue 0 to be 9
  2185. CSL_edma3EventQueueThresholdSet(hModule, 0, 9);
  2186. ...
  2187. @endverbatim
  2188. * ===========================================================================
  2189. */
  2190. /* for misra warnings*/
  2191. static inline void CSL_edma3EventQueueThresholdSet
  2192. (
  2193. CSL_Edma3Handle hModule,
  2194. Uint8 eventQueue,
  2195. Uint8 threshold
  2196. );
  2197. static inline void CSL_edma3EventQueueThresholdSet
  2198. (
  2199. CSL_Edma3Handle hModule,
  2200. Uint8 eventQueue,
  2201. Uint8 threshold
  2202. )
  2203. {
  2204. /* Determine which register needs to be configured: QWMTHRA or QWMTHRB */
  2205. if (eventQueue < 4U)
  2206. {
  2207. /* TPCC_QWMTHRA: Set the correct bits with the threshold value. */
  2208. CSL_FINSR(hModule->regs->TPCC_QWMTHRA, (8U * eventQueue + 4U), (8U * eventQueue), (Uint32)threshold);
  2209. }
  2210. else
  2211. {
  2212. /* TPCC_QWMTHRB: Set the correct bits with the threshold value. */
  2213. eventQueue -= 4U;
  2214. CSL_FINSR(hModule->regs->TPCC_QWMTHRB, (8U * eventQueue + 4U), (8U * eventQueue), (Uint32)threshold);
  2215. }
  2216. return;
  2217. }
  2218. /** ============================================================================
  2219. * @n@b CSL_edma3GetActivityStatus
  2220. *
  2221. * @b Description
  2222. * @n Obtains the Channel Controller Activity Status
  2223. *
  2224. * @b Arguments
  2225. * @verbatim
  2226. hModule Module Handle
  2227. activityStat Activity Status populated by this API.
  2228. @endverbatim
  2229. *
  2230. * <b> Return Value </b>
  2231. * @n None
  2232. *
  2233. * <b> Pre Condition </b>
  2234. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2235. *
  2236. * <b> Post Condition </b>
  2237. * @n None
  2238. *
  2239. * @b Reads
  2240. * @n TPCC_TPCC_CCSTAT_EVTACTV,TPCC_TPCC_CCSTAT_QEVTACTV,TPCC_TPCC_CCSTAT_TRACTV,
  2241. * TPCC_TPCC_CCSTAT_ACTV,TPCC_TPCC_CCSTAT_COMP_ACTV
  2242. *
  2243. * @b Example
  2244. * @verbatim
  2245. CSL_Edma3Handle hModule;
  2246. CSL_Edma3Obj edmaObj;
  2247. CSL_Edma3Context context;
  2248. CSL_Status status;
  2249. CSL_Edma3ActivityStat activityStat;
  2250. // Module Initialization
  2251. CSL_edma3Init(&context);
  2252. // Module Level Open
  2253. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2254. ...
  2255. // Get the CC activity status.
  2256. CSL_edma3GetActivityStatus(hModule,&activityStat);
  2257. ...
  2258. @endverbatim
  2259. * ===========================================================================
  2260. */
  2261. /* for misra warnings*/
  2262. static inline void CSL_edma3GetActivityStatus
  2263. (
  2264. CSL_Edma3Handle hModule,
  2265. CSL_Edma3ActivityStat* activityStat
  2266. );
  2267. static inline void CSL_edma3GetActivityStatus
  2268. (
  2269. CSL_Edma3Handle hModule,
  2270. CSL_Edma3ActivityStat* activityStat
  2271. )
  2272. {
  2273. Uint32 value = hModule->regs->TPCC_CCSTAT;
  2274. /* Populate the activity status structure. */
  2275. activityStat->evtActive = (Bool)CSL_FEXT(value, TPCC_TPCC_CCSTAT_EVTACTV);
  2276. activityStat->qevtActive = (Bool)CSL_FEXT(value, TPCC_TPCC_CCSTAT_QEVTACTV);
  2277. activityStat->trActive = (Bool)CSL_FEXT(value, TPCC_TPCC_CCSTAT_TRACTV);
  2278. activityStat->active = (Bool)CSL_FEXT(value, TPCC_TPCC_CCSTAT_ACTV);
  2279. activityStat->outstandingTcc = CSL_FEXT(value, TPCC_TPCC_CCSTAT_COMP_ACTV);
  2280. activityStat->queActive = CSL_FEXTR(value, 23U,16U);
  2281. return;
  2282. }
  2283. /** ============================================================================
  2284. * @n@b CSL_edma3GetMemoryFaultError
  2285. *
  2286. * @b Description
  2287. * @n The function gets the Controllers memory fault error and the error
  2288. * attributes.
  2289. *
  2290. * @b Arguments
  2291. * @verbatim
  2292. hModule Module Handle
  2293. memFault The structure is populated by this API.
  2294. @endverbatim
  2295. *
  2296. * <b> Return Value </b>
  2297. * @n None
  2298. *
  2299. * <b> Pre Condition </b>
  2300. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2301. *
  2302. * <b> Post Condition </b>
  2303. * @n None
  2304. *
  2305. * @b Reads
  2306. * @n TPCC_TPCC_MPFAR_FADDR,TPCC_TPCC_MPFSR_FID,
  2307. * TPCC_TPCC_MPFSR_UXE,TPCC_TPCC_MPFSR_UWE,TPCC_TPCC_MPFSR_URE,
  2308. * TPCC_TPCC_MPFSR_SXE,TPCC_TPCC_MPFSR_SWE,TPCC_TPCC_MPFSR_SRE,
  2309. * TPCC_TPCC_MPFSR_SECE
  2310. *
  2311. * @b Example
  2312. * @verbatim
  2313. CSL_Edma3Handle hModule;
  2314. CSL_Edma3Obj edmaObj;
  2315. CSL_Edma3Context context;
  2316. CSL_Status status;
  2317. CSL_Edma3MemFaultStat memFault;
  2318. // Module Initialization
  2319. CSL_edma3Init(&context);
  2320. // Module Level Open
  2321. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2322. ...
  2323. // Get memory protection fault
  2324. CSL_edma3GetMemoryFaultError(hModule, &memFault);
  2325. ...
  2326. @endverbatim
  2327. * ===========================================================================
  2328. */
  2329. /* for misra warnings*/
  2330. static inline void CSL_edma3GetMemoryFaultError
  2331. (
  2332. CSL_Edma3Handle hModule,
  2333. CSL_Edma3MemFaultStat* memFault
  2334. );
  2335. static inline void CSL_edma3GetMemoryFaultError
  2336. (
  2337. CSL_Edma3Handle hModule,
  2338. CSL_Edma3MemFaultStat* memFault
  2339. )
  2340. {
  2341. Uint32 value = hModule->regs->TPCC_MPFSR;
  2342. /* Extract the memory fault address. */
  2343. memFault->addr = CSL_FEXT(hModule->regs->TPCC_MPFAR, TPCC_TPCC_MPFAR_FADDR);
  2344. /* Extract the fault ID */
  2345. memFault->fid = CSL_FEXT(value, TPCC_TPCC_MPFSR_FID);
  2346. /* Extract the error access bits. */
  2347. memFault->error = CSL_FEXTR(value, 8U, 0U);
  2348. return;
  2349. }
  2350. /** ============================================================================
  2351. * @n@b CSL_edma3MemFaultClear
  2352. *
  2353. * @b Description
  2354. * @n The function clears the memory fault.
  2355. *
  2356. * @b Arguments
  2357. * @verbatim
  2358. hModule Module Handle
  2359. @endverbatim
  2360. *
  2361. * <b> Return Value </b>
  2362. * @n None
  2363. *
  2364. * <b> Pre Condition </b>
  2365. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2366. *
  2367. * <b> Post Condition </b>
  2368. * @n None
  2369. *
  2370. * @b Writes
  2371. * @n TPCC_TPCC_MPFCR_MPFCLR=1
  2372. *
  2373. * @b Example
  2374. * @verbatim
  2375. CSL_Edma3Handle hModule;
  2376. CSL_Edma3Obj edmaObj;
  2377. CSL_Edma3Context context;
  2378. CSL_Status status;
  2379. // Module Initialization
  2380. CSL_edma3Init(&context);
  2381. // Module Level Open
  2382. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2383. ...
  2384. // Clear the memory protection fault
  2385. CSL_edma3MemFaultClear(hModule);
  2386. ...
  2387. @endverbatim
  2388. * ===========================================================================
  2389. */
  2390. static inline void CSL_edma3MemFaultClear (CSL_Edma3Handle hModule);
  2391. static inline void CSL_edma3MemFaultClear (CSL_Edma3Handle hModule)
  2392. {
  2393. /* Write a 1 to clear the memory fault. */
  2394. hModule->regs->TPCC_MPFCR = CSL_FMK(TPCC_TPCC_MPFCR_MPFCLR, (Uint32)1U);
  2395. return;
  2396. }
  2397. /** ============================================================================
  2398. * @n@b CSL_edma3GetMemoryProtectionAttrib
  2399. *
  2400. * @b Description
  2401. * @n The function gets the memory access/protection attributes of the
  2402. * specific region.
  2403. *
  2404. * @b Arguments
  2405. * @verbatim
  2406. hModule Module Handle
  2407. region Region being queried.
  2408. mppa Memory Access/Protection Attributes populated by this API
  2409. @endverbatim
  2410. *
  2411. * <b> Return Value </b>
  2412. * @n None
  2413. *
  2414. * <b> Pre Condition </b>
  2415. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2416. *
  2417. * <b> Post Condition </b>
  2418. * @n None
  2419. *
  2420. * @b Reads
  2421. * @n TPCC_TPCC_MPPAG;TPCC_TPCC_MPPA
  2422. *
  2423. * @b Example
  2424. * @verbatim
  2425. CSL_Edma3Handle hModule;
  2426. CSL_Edma3Obj edmaObj;
  2427. CSL_Edma3Context context;
  2428. CSL_Status status;
  2429. CSL_BitMask32 mppa;
  2430. // Module Initialization
  2431. CSL_edma3Init(&context);
  2432. // Module Level Open
  2433. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2434. ...
  2435. // Get memory protection attributes for the Global Region.
  2436. CSL_edma3GetMemoryProtectionAttrib(hModule, -1, &mppa);
  2437. ...
  2438. // Get memory protection attributes for region 2
  2439. CSL_edma3GetMemoryProtectionAttrib(hModule, 2, &mppa);
  2440. ...
  2441. @endverbatim
  2442. * ===========================================================================
  2443. */
  2444. /* for misra warnings*/
  2445. static inline void CSL_edma3GetMemoryProtectionAttrib
  2446. (
  2447. CSL_Edma3Handle hModule,
  2448. Int region,
  2449. CSL_BitMask32* mppa
  2450. );
  2451. static inline void CSL_edma3GetMemoryProtectionAttrib
  2452. (
  2453. CSL_Edma3Handle hModule,
  2454. Int region,
  2455. CSL_BitMask32* mppa
  2456. )
  2457. {
  2458. /* Determine which region is being queried. */
  2459. if (region < 0)
  2460. {
  2461. /* Get the Global Memory Protection Attributes */
  2462. *mppa = hModule->regs->TPCC_MPPAG;
  2463. }
  2464. else
  2465. {
  2466. /* Get the Memory Protection Attributes for the specific region. */
  2467. *mppa = hModule->regs->TPCC_MPPA[region];
  2468. }
  2469. return;
  2470. }
  2471. /** ============================================================================
  2472. * @n@b CSL_edma3SetMemoryProtectionAttrib
  2473. *
  2474. * @b Description
  2475. * @n This API sets the memory protection attributes for the specified region.
  2476. *
  2477. * @b Arguments
  2478. * @verbatim
  2479. hModule Module Handle
  2480. region Region being configured.
  2481. mpa Value to be programmed into the MPPAG/MPPA[0/1/2/../n]
  2482. This is a Bitmask of the protection attributes.
  2483. @endverbatim
  2484. *
  2485. * <b> Return Value </b>
  2486. * @n None
  2487. *
  2488. * <b> Pre Condition </b>
  2489. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2490. *
  2491. * <b> Post Condition </b>
  2492. * @n None
  2493. *
  2494. * @b Writes
  2495. * @n TPCC_TPCC_MPPAG;TPCC_TPCC_MPPA
  2496. *
  2497. * @b Example
  2498. * @verbatim
  2499. CSL_Edma3Handle hModule;
  2500. CSL_Edma3Obj edmaObj;
  2501. CSL_Edma3Context context;
  2502. CSL_Status status;
  2503. // Module Initialization
  2504. CSL_edma3Init(&context);
  2505. // Module Level Open
  2506. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2507. ...
  2508. // Set the memory protection attributes of region 0.
  2509. CSL_edma3SetMemoryProtectionAttrib (hModule, 0, CSL_EDMA3_MEMACCESS_UX |
  2510. CSL_EDMA3_MEMACCESS_UW |
  2511. CSL_EDMA3_MEMACCESS_UR |
  2512. CSL_EDMA3_MEMACCESS_AID2));
  2513. ...
  2514. @endverbatim
  2515. * ===========================================================================
  2516. */
  2517. /* for misra warnings*/
  2518. static inline void CSL_edma3SetMemoryProtectionAttrib
  2519. (
  2520. CSL_Edma3Handle hModule,
  2521. Int region,
  2522. CSL_BitMask32 mppa
  2523. );
  2524. static inline void CSL_edma3SetMemoryProtectionAttrib
  2525. (
  2526. CSL_Edma3Handle hModule,
  2527. Int region,
  2528. CSL_BitMask32 mppa
  2529. )
  2530. {
  2531. /* Determine which region is being configured.*/
  2532. if (region < 0)
  2533. {
  2534. /* Set the Global Memory Protection Attributes */
  2535. hModule->regs->TPCC_MPPAG = mppa;
  2536. }
  2537. else
  2538. {
  2539. /* Set the Memory Protection Attributes for the specific region. */
  2540. hModule->regs->TPCC_MPPA[region] = mppa;
  2541. }
  2542. return;
  2543. }
  2544. /** ============================================================================
  2545. * @n@b CSL_edma3IsDMAChannelEventPending
  2546. *
  2547. * @b Description
  2548. * @n The function gets the status of the specified DMA channel i.e. if
  2549. * there is a pending event on the specific channel.
  2550. *
  2551. * @b Arguments
  2552. * @verbatim
  2553. hModule Module Handle
  2554. dmaChannel DMA Channel for which status is being inquired.
  2555. response Place holder for whether an event is set(TRUE) or not (FALSE)
  2556. @endverbatim
  2557. *
  2558. * <b> Return Value </b>
  2559. * @n None.
  2560. *
  2561. * <b> Pre Condition </b>
  2562. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2563. *
  2564. * <b> Post Condition </b>
  2565. * @n None
  2566. *
  2567. * @b Reads
  2568. * @n TPCC_TPCC_ER_E0;TPCC_TPCC_ER_E1;TPCC_TPCC_ER_E2;TPCC_TPCC_ER_E3;
  2569. * TPCC_TPCC_ER_E4;TPCC_TPCC_ER_E5;TPCC_TPCC_ER_E6;TPCC_TPCC_ER_E7;
  2570. * TPCC_TPCC_ER_E8;TPCC_TPCC_ER_E9;TPCC_TPCC_ER_E10;TPCC_TPCC_ER_E11;
  2571. * TPCC_TPCC_ER_E12;TPCC_TPCC_ER_E13;TPCC_TPCC_ER_E14;TPCC_TPCC_ER_E15;
  2572. * TPCC_TPCC_ER_E16;TPCC_TPCC_ER_E17;TPCC_TPCC_ER_E18;TPCC_TPCC_ER_E19;
  2573. * TPCC_TPCC_ER_E20;TPCC_TPCC_ER_E21;TPCC_TPCC_ER_E22;TPCC_TPCC_ER_E23;
  2574. * TPCC_TPCC_ER_E24;TPCC_TPCC_ER_E25;TPCC_TPCC_ER_E26;TPCC_TPCC_ER_E27;
  2575. * TPCC_TPCC_ER_E28;TPCC_TPCC_ER_E29;TPCC_TPCC_ER_E30;TPCC_TPCC_ER_E31;
  2576. * @n TPCC_TPCC_ERH_E32;TPCC_TPCC_ERH_E33;TPCC_TPCC_ERH_E34;TPCC_TPCC_ERH_E35;
  2577. * TPCC_TPCC_ERH_E36;TPCC_TPCC_ERH_E37;TPCC_TPCC_ERH_E38;TPCC_TPCC_ERH_E39;
  2578. * TPCC_TPCC_ERH_E40;TPCC_TPCC_ERH_E41;TPCC_TPCC_ERH_E42;TPCC_TPCC_ERH_E43;
  2579. * TPCC_TPCC_ERH_E44;TPCC_TPCC_ERH_E45;TPCC_TPCC_ERH_E46;TPCC_TPCC_ERH_E47;
  2580. * TPCC_TPCC_ERH_E48;TPCC_TPCC_ERH_E49;TPCC_TPCC_ERH_E50;TPCC_TPCC_ERH_E51;
  2581. * TPCC_TPCC_ERH_E52;TPCC_TPCC_ERH_E53;TPCC_TPCC_ERH_E54;TPCC_TPCC_ERH_E55;
  2582. * TPCC_TPCC_ERH_E56;TPCC_TPCC_ERH_E57;TPCC_TPCC_ERH_E58;TPCC_TPCC_ERH_E59;
  2583. * TPCC_TPCC_ERH_E60;TPCC_TPCC_ERH_E61;TPCC_TPCC_ERH_E62;TPCC_TPCC_ERH_E63;
  2584. *
  2585. * @b Example
  2586. * @verbatim
  2587. CSL_Edma3Handle hModule;
  2588. CSL_Edma3Obj edmaObj;
  2589. CSL_Edma3Context context;
  2590. CSL_Status status;
  2591. Bool dmaStatus;
  2592. // Module Initialization
  2593. CSL_edma3Init(&context);
  2594. // Module Level Open
  2595. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2596. ...
  2597. // Determine if there is an event pending on DMA Channel 0.
  2598. CSL_edma3IsDMAChannelEventPending(hModule, 0, &dmaStatus);
  2599. ...
  2600. @endverbatim
  2601. * ===========================================================================
  2602. */
  2603. /* for misra warnings*/
  2604. static inline void CSL_edma3IsDMAChannelEventPending
  2605. (
  2606. CSL_Edma3Handle hModule,
  2607. Uint8 dmaChannel,
  2608. Bool* response
  2609. );
  2610. static inline void CSL_edma3IsDMAChannelEventPending
  2611. (
  2612. CSL_Edma3Handle hModule,
  2613. Uint8 dmaChannel,
  2614. Bool* response
  2615. )
  2616. {
  2617. /* Determine which register needs to be looked into. */
  2618. if (dmaChannel < 32U)
  2619. {
  2620. /* ER: Read the specific DMA Channel bits */
  2621. if (CSL_FEXTR(hModule->regs->TPCC_ER, (Uint32)dmaChannel, (Uint32)dmaChannel))
  2622. {
  2623. *response = TRUE;
  2624. }
  2625. else
  2626. {
  2627. *response = FALSE;
  2628. }
  2629. }
  2630. else
  2631. {
  2632. /* ERH: Read the specific DMA Channel bits */
  2633. if (CSL_FEXTR(hModule->regs->TPCC_ERH, ((Uint32)(dmaChannel) - 32U), ((Uint32)(dmaChannel) - 32U)))
  2634. {
  2635. *response = TRUE;
  2636. }
  2637. else
  2638. {
  2639. *response = FALSE;
  2640. }
  2641. }
  2642. return;
  2643. }
  2644. /** ============================================================================
  2645. * @n@b CSL_edma3ClearDMAChannelEvent
  2646. *
  2647. * @b Description
  2648. * @n This API clears the event for the specific DMA channel.
  2649. *
  2650. * @b Arguments
  2651. * @verbatim
  2652. hModule Module Handle
  2653. region Region (Shadow or Global)
  2654. dmaChannel DMA Channel for which the event is cleared.
  2655. @endverbatim
  2656. *
  2657. * <b> Return Value </b>
  2658. * @n None
  2659. *
  2660. * <b> Pre Condition </b>
  2661. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2662. *
  2663. * <b> Post Condition </b>
  2664. * @n None
  2665. *
  2666. * @b Writes
  2667. * @n TPCC_TPCC_ECR_E0=1;TPCC_TPCC_ECR_E1=1;TPCC_TPCC_ECR_E2=1;TPCC_TPCC_ECR_E3=1;
  2668. * TPCC_TPCC_ECR_E4=1;TPCC_TPCC_ECR_E5=1;TPCC_TPCC_ECR_E6=1;TPCC_TPCC_ECR_E7=1;
  2669. * TPCC_TPCC_ECR_E8=1;TPCC_TPCC_ECR_E9=1;TPCC_TPCC_ECR_E10=1;TPCC_TPCC_ECR_E11=1;
  2670. * TPCC_TPCC_ECR_E12=1;TPCC_TPCC_ECR_E13=1;TPCC_TPCC_ECR_E14=1;TPCC_TPCC_ECR_E15=1;
  2671. * TPCC_TPCC_ECR_E16=1;TPCC_TPCC_ECR_E17=1;TPCC_TPCC_ECR_E18=1;TPCC_TPCC_ECR_E19=1;
  2672. * TPCC_TPCC_ECR_E20=1;TPCC_TPCC_ECR_E21=1;TPCC_TPCC_ECR_E22=1;TPCC_TPCC_ECR_E23=1;
  2673. * TPCC_TPCC_ECR_E24=1;TPCC_TPCC_ECR_E25=1;TPCC_TPCC_ECR_E26=1;TPCC_TPCC_ECR_E27=1;
  2674. * TPCC_TPCC_ECR_E28=1;TPCC_TPCC_ECR_E29=1;TPCC_TPCC_ECR_E30=1;TPCC_TPCC_ECR_E31=1;
  2675. * @n TPCC_TPCC_ECRH_E32=1;TPCC_TPCC_ECRH_E33=1;TPCC_TPCC_ECRH_E34=1;TPCC_TPCC_ECRH_E35=1;
  2676. * TPCC_TPCC_ECRH_E36=1;TPCC_TPCC_ECRH_E37=1;TPCC_TPCC_ECRH_E38=1;TPCC_TPCC_ECRH_E39=1;
  2677. * TPCC_TPCC_ECRH_E40=1;TPCC_TPCC_ECRH_E41=1;TPCC_TPCC_ECRH_E42=1;TPCC_TPCC_ECRH_E43=1;
  2678. * TPCC_TPCC_ECRH_E44=1;TPCC_TPCC_ECRH_E45=1;TPCC_TPCC_ECRH_E46=1;TPCC_TPCC_ECRH_E47=1;
  2679. * TPCC_TPCC_ECRH_E48=1;TPCC_TPCC_ECRH_E49=1;TPCC_TPCC_ECRH_E50=1;TPCC_TPCC_ECRH_E51=1;
  2680. * TPCC_TPCC_ECRH_E52=1;TPCC_TPCC_ECRH_E53=1;TPCC_TPCC_ECRH_E54=1;TPCC_TPCC_ECRH_E55=1;
  2681. * TPCC_TPCC_ECRH_E56=1;TPCC_TPCC_ECRH_E57=1;TPCC_TPCC_ECRH_E58=1;TPCC_TPCC_ECRH_E59=1;
  2682. * TPCC_TPCC_ECRH_E60=1;TPCC_TPCC_ECRH_E61=1;TPCC_TPCC_ECRH_E62=1;TPCC_TPCC_ECRH_E63=1;
  2683. *
  2684. * @b Example
  2685. * @verbatim
  2686. CSL_Edma3Handle hModule;
  2687. CSL_Edma3Obj edmaObj;
  2688. CSL_Edma3Context context;
  2689. CSL_Status status;
  2690. Bool dmaStatus;
  2691. // Module Initialization
  2692. CSL_edma3Init(&context);
  2693. // Module Level Open
  2694. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2695. ...
  2696. // Get DMA Channel 0 Status
  2697. CSL_edma3GetDMAChannelEvent(hModule, 0, &dmaStatus);
  2698. if (dmaStatus == TRUE)
  2699. {
  2700. // DMA Channel 0 is active...
  2701. ...
  2702. // Clear DMA Channel 0.
  2703. CSL_edma3ClearDMAChannelEvent (hModule, CSL_EDMA3_REGION_GLOBAL, 0);
  2704. }
  2705. @endverbatim
  2706. * ===========================================================================
  2707. */
  2708. /* for misra warnings*/
  2709. static inline void CSL_edma3ClearDMAChannelEvent
  2710. (
  2711. CSL_Edma3Handle hModule,
  2712. Int region,
  2713. Uint8 dmaChannel
  2714. );
  2715. static inline void CSL_edma3ClearDMAChannelEvent
  2716. (
  2717. CSL_Edma3Handle hModule,
  2718. Int region,
  2719. Uint8 dmaChannel
  2720. )
  2721. {
  2722. /* Determine the region for which the event is to be cleared. */
  2723. if (region == CSL_EDMA3_REGION_GLOBAL)
  2724. {
  2725. /* Global: Determine which register needs to be looked into. */
  2726. if (dmaChannel < 32U)
  2727. {
  2728. /* ECR: Write to the specific DMA Channel bits */
  2729. CSL_FINSR(hModule->regs->TPCC_ECR, (uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  2730. }
  2731. else
  2732. {
  2733. /* ECRH: Write to the specific DMA Channel bits */
  2734. CSL_FINSR(hModule->regs->TPCC_ECRH, (uint32_t)dmaChannel - (uint32_t)32U, (uint32_t)dmaChannel - (uint32_t)32U, ((uint32_t)1U));
  2735. }
  2736. }
  2737. else
  2738. {
  2739. /* Shadow: Determine which register needs to be looked into. */
  2740. if (dmaChannel < 32U)
  2741. {
  2742. /* ECR: Write to the specific DMA Channel bits */
  2743. CSL_FINSR(hModule->regs->SHADOW[region].TPCC_ECR, (uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  2744. }
  2745. else
  2746. {
  2747. /* ECRH: Write to the specific DMA Channel bits */
  2748. CSL_FINSR(hModule->regs->SHADOW[region].TPCC_ECRH, (uint32_t)dmaChannel - (uint32_t)32U, (uint32_t)dmaChannel - (uint32_t)32U, ((uint32_t)1U));
  2749. }
  2750. }
  2751. return;
  2752. }
  2753. /** ============================================================================
  2754. * @n@b CSL_edma3SetDMAChannelEvent
  2755. *
  2756. * @b Description
  2757. * @n This API sets the event for the specific DMA channel.
  2758. *
  2759. * @b Arguments
  2760. * @verbatim
  2761. hModule Module Handle
  2762. region Region (Shadow or Global)
  2763. dmaChannel DMA Channel for which the event is to be set
  2764. @endverbatim
  2765. *
  2766. * <b> Return Value </b>
  2767. * @n None
  2768. *
  2769. * <b> Pre Condition </b>
  2770. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2771. *
  2772. * <b> Post Condition </b>
  2773. * @n None
  2774. *
  2775. * @b Writes
  2776. * @n TPCC_TPCC_ESR_E0=1;TPCC_TPCC_ESR_E1=1;TPCC_TPCC_ESR_E2=1;TPCC_TPCC_ESR_E3=1;
  2777. * TPCC_TPCC_ESR_E4=1;TPCC_TPCC_ESR_E5=1;TPCC_TPCC_ESR_E6=1;TPCC_TPCC_ESR_E7=1;
  2778. * TPCC_TPCC_ESR_E8=1;TPCC_TPCC_ESR_E9=1;TPCC_TPCC_ESR_E10=1;TPCC_TPCC_ESR_E11=1;
  2779. * TPCC_TPCC_ESR_E12=1;TPCC_TPCC_ESR_E13=1;TPCC_TPCC_ESR_E14=1;TPCC_TPCC_ESR_E15=1;
  2780. * TPCC_TPCC_ESR_E16=1;TPCC_TPCC_ESR_E17=1;TPCC_TPCC_ESR_E18=1;TPCC_TPCC_ESR_E19=1;
  2781. * TPCC_TPCC_ESR_E20=1;TPCC_TPCC_ESR_E21=1;TPCC_TPCC_ESR_E22=1;TPCC_TPCC_ESR_E23=1;
  2782. * TPCC_TPCC_ESR_E24=1;TPCC_TPCC_ESR_E25=1;TPCC_TPCC_ESR_E26=1;TPCC_TPCC_ESR_E27=1;
  2783. * TPCC_TPCC_ESR_E28=1;TPCC_TPCC_ESR_E29=1;TPCC_TPCC_ESR_E30=1;TPCC_TPCC_ESR_E31=1;
  2784. * @n TPCC_TPCC_ESRH_E32=1;TPCC_TPCC_ESRH_E33=1;TPCC_TPCC_ESRH_E34=1;TPCC_TPCC_ESRH_E35=1;
  2785. * TPCC_TPCC_ESRH_E36=1;TPCC_TPCC_ESRH_E37=1;TPCC_TPCC_ESRH_E38=1;TPCC_TPCC_ESRH_E39=1;
  2786. * TPCC_TPCC_ESRH_E40=1;TPCC_TPCC_ESRH_E41=1;TPCC_TPCC_ESRH_E42=1;TPCC_TPCC_ESRH_E43=1;
  2787. * TPCC_TPCC_ESRH_E44=1;TPCC_TPCC_ESRH_E45=1;TPCC_TPCC_ESRH_E46=1;TPCC_TPCC_ESRH_E47=1;
  2788. * TPCC_TPCC_ESRH_E48=1;TPCC_TPCC_ESRH_E49=1;TPCC_TPCC_ESRH_E50=1;TPCC_TPCC_ESRH_E51=1;
  2789. * TPCC_TPCC_ESRH_E52=1;TPCC_TPCC_ESRH_E53=1;TPCC_TPCC_ESRH_E54=1;TPCC_TPCC_ESRH_E55=1;
  2790. * TPCC_TPCC_ESRH_E56=1;TPCC_TPCC_ESRH_E57=1;TPCC_TPCC_ESRH_E58=1;TPCC_TPCC_ESRH_E59=1;
  2791. * TPCC_TPCC_ESRH_E60=1;TPCC_TPCC_ESRH_E61=1;TPCC_TPCC_ESRH_E62=1;TPCC_TPCC_ESRH_E63=1;
  2792. *
  2793. * @b Example
  2794. * @verbatim
  2795. CSL_Edma3Handle hModule;
  2796. CSL_Edma3Obj edmaObj;
  2797. CSL_Edma3Context context;
  2798. CSL_Status status;
  2799. // Module Initialization
  2800. CSL_edma3Init(&context);
  2801. // Module Level Open
  2802. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2803. ...
  2804. // Set the DMA Channel 0 Event for the Global Region.
  2805. CSL_edma3SetDMAChannelEvent(hModule, CSL_EDMA3_REGION_GLOBAL, 0);
  2806. ...
  2807. @endverbatim
  2808. * ===========================================================================
  2809. */
  2810. /* for misra warnings*/
  2811. static inline void CSL_edma3SetDMAChannelEvent
  2812. (
  2813. CSL_Edma3Handle hModule,
  2814. Int region,
  2815. Uint8 dmaChannel
  2816. );
  2817. static inline void CSL_edma3SetDMAChannelEvent
  2818. (
  2819. CSL_Edma3Handle hModule,
  2820. Int region,
  2821. Uint8 dmaChannel
  2822. )
  2823. {
  2824. /* Determine the region for which the event is to be set. */
  2825. if (region == CSL_EDMA3_REGION_GLOBAL)
  2826. {
  2827. /* Global: Determine which register needs to be looked into. */
  2828. if (dmaChannel < 32U)
  2829. {
  2830. /* ESR: Write to the specific DMA Channel bits */
  2831. hModule->regs->TPCC_ESR = CSL_FMKR((uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  2832. }
  2833. else
  2834. {
  2835. /* ESRH: Write to the specific DMA Channel bits */
  2836. hModule->regs->TPCC_ESRH = CSL_FMKR((uint32_t)dmaChannel - (uint32_t)32U, (uint32_t)dmaChannel - (uint32_t)32U, ((uint32_t)1U));
  2837. }
  2838. }
  2839. else
  2840. {
  2841. /* Shadow: Determine which register needs to be looked into. */
  2842. if (dmaChannel < 32U)
  2843. {
  2844. /* ESR: Write to the specific DMA Channel bits */
  2845. hModule->regs->SHADOW[region].TPCC_ESR = CSL_FMKR((uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  2846. }
  2847. else
  2848. {
  2849. /* ESRH: Write to the specific DMA Channel bits */
  2850. hModule->regs->SHADOW[region].TPCC_ESRH = CSL_FMKR((uint32_t)dmaChannel - (uint32_t)32U, (uint32_t)dmaChannel - (uint32_t)32U, ((uint32_t)1U));
  2851. }
  2852. }
  2853. return;
  2854. }
  2855. /** ============================================================================
  2856. * @n@b CSL_edma3DMAChannelDisable
  2857. *
  2858. * @b Description
  2859. * @n This API disables the specified DMA Channel.
  2860. *
  2861. * @b Arguments
  2862. * @verbatim
  2863. hModule Module Handle
  2864. region Region (Shadow or Global)
  2865. dmaChannel DMA Channel to be disabled.
  2866. @endverbatim
  2867. *
  2868. * <b> Return Value </b>
  2869. * @n None
  2870. *
  2871. * <b> Pre Condition </b>
  2872. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2873. *
  2874. * <b> Post Condition </b>
  2875. * @n None
  2876. *
  2877. * @b Writes
  2878. * @n TPCC_TPCC_EECR_E0=1;TPCC_TPCC_EECR_E1=1;TPCC_TPCC_EECR_E2=1;
  2879. * TPCC_TPCC_EECR_E3=1;TPCC_TPCC_EECR_E4=1;TPCC_TPCC_EECR_E5=1;
  2880. * TPCC_TPCC_EECR_E6=1;TPCC_TPCC_EECR_E7=1;TPCC_TPCC_EECR_E8=1;
  2881. * TPCC_TPCC_EECR_E9=1;TPCC_TPCC_EECR_E10=1;TPCC_TPCC_EECR_E11=1;
  2882. * TPCC_TPCC_EECR_E12=1;TPCC_TPCC_EECR_E13=1;TPCC_TPCC_EECR_E14=1;
  2883. * TPCC_TPCC_EECR_E15=1;TPCC_TPCC_EECR_E16=1;TPCC_TPCC_EECR_E17=1;
  2884. * TPCC_TPCC_EECR_E18=1;TPCC_TPCC_EECR_E19=1;TPCC_TPCC_EECR_E20=1;
  2885. * TPCC_TPCC_EECR_E21=1;TPCC_TPCC_EECR_E22=1;TPCC_TPCC_EECR_E23=1;
  2886. * TPCC_TPCC_EECR_E24=1;TPCC_TPCC_EECR_E25=1;TPCC_TPCC_EECR_E26=1;
  2887. * TPCC_TPCC_EECR_E27=1;TPCC_TPCC_EECR_E28=1;TPCC_TPCC_EECR_E29=1;
  2888. * TPCC_TPCC_EECR_E30=1;TPCC_TPCC_EECR_E31=1;
  2889. * @n TPCC_TPCC_EECRH_E32=1;TPCC_TPCC_EECRH_E33=1;TPCC_TPCC_EECRH_E34=1;
  2890. * TPCC_TPCC_EECRH_E35=1;TPCC_TPCC_EECRH_E36=1;TPCC_TPCC_EECRH_E37=1;
  2891. * TPCC_TPCC_EECRH_E38=1;TPCC_TPCC_EECRH_E39=1;TPCC_TPCC_EECRH_E40=1;
  2892. * TPCC_TPCC_EECRH_E41=1;TPCC_TPCC_EECRH_E42=1;TPCC_TPCC_EECRH_E43=1;
  2893. * TPCC_TPCC_EECRH_E44=1;TPCC_TPCC_EECRH_E45=1;TPCC_TPCC_EECRH_E46=1;
  2894. * TPCC_TPCC_EECRH_E47=1;TPCC_TPCC_EECRH_E48=1;TPCC_TPCC_EECRH_E49=1;
  2895. * TPCC_TPCC_EECRH_E50=1;TPCC_TPCC_EECRH_E51=1;TPCC_TPCC_EECRH_E52=1;
  2896. * TPCC_TPCC_EECRH_E53=1;TPCC_TPCC_EECRH_E54=1;TPCC_TPCC_EECRH_E55=1;
  2897. * TPCC_TPCC_EECRH_E56=1;TPCC_TPCC_EECRH_E57=1;TPCC_TPCC_EECRH_E58=1;
  2898. * TPCC_TPCC_EECRH_E59=1;TPCC_TPCC_EECRH_E60=1;TPCC_TPCC_EECRH_E61=1;
  2899. * TPCC_TPCC_EECRH_E62=1;TPCC_TPCC_EECRH_E63=1;
  2900. *
  2901. * @b Example
  2902. * @verbatim
  2903. CSL_Edma3Handle hModule;
  2904. CSL_Edma3Obj edmaObj;
  2905. CSL_Edma3Context context;
  2906. CSL_Status status;
  2907. // Module Initialization
  2908. CSL_edma3Init(&context);
  2909. // Module Level Open
  2910. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  2911. // Disables DMA Channel 0
  2912. CSL_edma3DMAChannelDisable(hModule, 0);
  2913. ...
  2914. @endverbatim
  2915. * ===========================================================================
  2916. */
  2917. /* for misra warnings*/
  2918. static inline void CSL_edma3DMAChannelDisable
  2919. (
  2920. CSL_Edma3Handle hModule,
  2921. Int region,
  2922. Uint8 dmaChannel
  2923. );
  2924. static inline void CSL_edma3DMAChannelDisable
  2925. (
  2926. CSL_Edma3Handle hModule,
  2927. Int region,
  2928. Uint8 dmaChannel
  2929. )
  2930. {
  2931. /* Determine the region for which the DMA channel is to be disabled. */
  2932. if (region == CSL_EDMA3_REGION_GLOBAL)
  2933. {
  2934. /* Global: Determine which register needs to be looked into. */
  2935. if (dmaChannel < 32U)
  2936. {
  2937. /* EECR: Write to the specific DMA Channel bits */
  2938. CSL_FINSR(hModule->regs->TPCC_EECR, (uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  2939. }
  2940. else
  2941. {
  2942. /* EECRH: Write to the specific DMA Channel bits */
  2943. CSL_FINSR(hModule->regs->TPCC_EECRH, (uint32_t)dmaChannel - (uint32_t)32U, (uint32_t)dmaChannel - (uint32_t)32U, ((uint32_t)1U));
  2944. }
  2945. }
  2946. else
  2947. {
  2948. /* Shadow: Determine which register needs to be looked into. */
  2949. if (dmaChannel < 32U)
  2950. {
  2951. /* EECR: Write to the specific DMA Channel bits */
  2952. CSL_FINSR(hModule->regs->SHADOW[region].TPCC_EECR, (uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  2953. }
  2954. else
  2955. {
  2956. /* EECRH: Write to the specific DMA Channel bits */
  2957. CSL_FINSR(hModule->regs->SHADOW[region].TPCC_EECRH, (uint32_t)dmaChannel - (uint32_t)32U, (uint32_t)dmaChannel - (uint32_t)32U, ((uint32_t)1U));
  2958. }
  2959. }
  2960. return;
  2961. }
  2962. /** ============================================================================
  2963. * @n@b CSL_edma3DMAChannelEnable
  2964. *
  2965. * @b Description
  2966. * @n This API enables the specified DMA Channel.
  2967. *
  2968. * @b Arguments
  2969. * @verbatim
  2970. hModule Module Handle
  2971. region Region (Shadow or Global)
  2972. dmaChannel DMA Channel to be enabled.
  2973. @endverbatim
  2974. *
  2975. * <b> Return Value </b>
  2976. * @n None
  2977. *
  2978. * <b> Pre Condition </b>
  2979. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  2980. *
  2981. * <b> Post Condition </b>
  2982. * @n None
  2983. *
  2984. * @b Writes
  2985. * @n TPCC_TPCC_EESR_E0=1;TPCC_TPCC_EESR_E1=1;TPCC_TPCC_EESR_E2=1;
  2986. * TPCC_TPCC_EESR_E3=1;TPCC_TPCC_EESR_E4=1;TPCC_TPCC_EESR_E5=1;
  2987. * TPCC_TPCC_EESR_E6=1;TPCC_TPCC_EESR_E7=1;TPCC_TPCC_EESR_E8=1;
  2988. * TPCC_TPCC_EESR_E9=1;TPCC_TPCC_EESR_E10=1;TPCC_TPCC_EESR_E11=1;
  2989. * TPCC_TPCC_EESR_E12=1;TPCC_TPCC_EESR_E13=1;TPCC_TPCC_EESR_E14=1;
  2990. * TPCC_TPCC_EESR_E15=1;TPCC_TPCC_EESR_E16=1;TPCC_TPCC_EESR_E17=1;
  2991. * TPCC_TPCC_EESR_E18=1;TPCC_TPCC_EESR_E19=1;TPCC_TPCC_EESR_E20=1;
  2992. * TPCC_TPCC_EESR_E21=1;TPCC_TPCC_EESR_E22=1;TPCC_TPCC_EESR_E23=1;
  2993. * TPCC_TPCC_EESR_E24=1;TPCC_TPCC_EESR_E25=1;TPCC_TPCC_EESR_E26=1;
  2994. * TPCC_TPCC_EESR_E27=1;TPCC_TPCC_EESR_E28=1;TPCC_TPCC_EESR_E29=1;
  2995. * TPCC_TPCC_EESR_E30=1;TPCC_TPCC_EESR_E31=1;
  2996. * @n TPCC_TPCC_EESRH_E32=1;TPCC_TPCC_EESRH_E33=1;TPCC_TPCC_EESRH_E34=1;
  2997. * TPCC_TPCC_EESRH_E35=1;TPCC_TPCC_EESRH_E36=1;TPCC_TPCC_EESRH_E37=1;
  2998. * TPCC_TPCC_EESRH_E38=1;TPCC_TPCC_EESRH_E39=1;TPCC_TPCC_EESRH_E40=1;
  2999. * TPCC_TPCC_EESRH_E41=1;TPCC_TPCC_EESRH_E42=1;TPCC_TPCC_EESRH_E43=1;
  3000. * TPCC_TPCC_EESRH_E44=1;TPCC_TPCC_EESRH_E45=1;TPCC_TPCC_EESRH_E46=1;
  3001. * TPCC_TPCC_EESRH_E47=1;TPCC_TPCC_EESRH_E48=1;TPCC_TPCC_EESRH_E49=1;
  3002. * TPCC_TPCC_EESRH_E50=1;TPCC_TPCC_EESRH_E51=1;TPCC_TPCC_EESRH_E52=1;
  3003. * TPCC_TPCC_EESRH_E53=1;TPCC_TPCC_EESRH_E54=1;TPCC_TPCC_EESRH_E55=1;
  3004. * TPCC_TPCC_EESRH_E56=1;TPCC_TPCC_EESRH_E57=1;TPCC_TPCC_EESRH_E58=1;
  3005. * TPCC_TPCC_EESRH_E59=1;TPCC_TPCC_EESRH_E60=1;TPCC_TPCC_EESRH_E61=1;
  3006. * TPCC_TPCC_EESRH_E62=1;TPCC_TPCC_EESRH_E63=1;
  3007. *
  3008. * @b Example
  3009. * @verbatim
  3010. CSL_Edma3Handle hModule;
  3011. CSL_Edma3Obj edmaObj;
  3012. CSL_Edma3Context context;
  3013. CSL_Status status;
  3014. // Module Initialization
  3015. CSL_edma3Init(&context);
  3016. // Module Level Open
  3017. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3018. // Enables DMA Channel 0 for the global region.
  3019. CSL_edma3DMAChannelEnable(hModule, CSL_EDMA3_REGION_GLOBAL, 0);
  3020. ...
  3021. @endverbatim
  3022. * ===========================================================================
  3023. */
  3024. /* for misra warnings*/
  3025. static inline void CSL_edma3DMAChannelEnable
  3026. (
  3027. CSL_Edma3Handle hModule,
  3028. Int region,
  3029. Uint8 dmaChannel
  3030. );
  3031. static inline void CSL_edma3DMAChannelEnable
  3032. (
  3033. CSL_Edma3Handle hModule,
  3034. Int region,
  3035. Uint8 dmaChannel
  3036. )
  3037. {
  3038. /* Determine the region for which the DMA channel is to be enabled. */
  3039. if (region == CSL_EDMA3_REGION_GLOBAL)
  3040. {
  3041. /* Global: Determine which register needs to be looked into. */
  3042. if (dmaChannel < 32U)
  3043. {
  3044. /* EESR: Write to the specific DMA Channel bits */
  3045. hModule->regs->TPCC_EESR = CSL_FMKR((uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  3046. }
  3047. else
  3048. {
  3049. /* EESRH: Write to the specific DMA Channel bits */
  3050. hModule->regs->TPCC_EESRH = CSL_FMKR((uint32_t)dmaChannel - (uint32_t)32U, (uint32_t)dmaChannel - (uint32_t)32U, ((uint32_t)1U));
  3051. }
  3052. }
  3053. else
  3054. {
  3055. /* Shadow: Determine which register needs to be looked into. */
  3056. if (dmaChannel < 32U)
  3057. {
  3058. /* EESR: Write to the specific DMA Channel bits */
  3059. hModule->regs->SHADOW[region].TPCC_EESR = CSL_FMKR((uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  3060. }
  3061. else
  3062. {
  3063. /* EESRH: Write to the specific DMA Channel bits */
  3064. hModule->regs->SHADOW[region].TPCC_EESRH = CSL_FMKR((uint32_t)dmaChannel - (uint32_t)32U, (uint32_t)dmaChannel - (uint32_t)32U, ((uint32_t)1U));
  3065. }
  3066. }
  3067. return;
  3068. }
  3069. /** ============================================================================
  3070. * @n@b CSL_edma3GetDMASecondaryEvents
  3071. *
  3072. * @b Description
  3073. * @n This API gets the DMA secondary events
  3074. *
  3075. * @b Arguments
  3076. * @verbatim
  3077. hModule Module Handle
  3078. secEventLo Lower order 32 bits of secondary events populated by the API
  3079. secEventHi Higher order 32 bits of secondary events populated by the API
  3080. @endverbatim
  3081. *
  3082. * <b> Return Value </b>
  3083. * @n None
  3084. *
  3085. * <b> Pre Condition </b>
  3086. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3087. *
  3088. * <b> Post Condition </b>
  3089. * @n None
  3090. *
  3091. * @b Reads
  3092. * @n TPCC_TPCC_SER,TPCC_TPCC_SERH
  3093. *
  3094. * @b Example
  3095. * @verbatim
  3096. CSL_Edma3Handle hModule;
  3097. CSL_Edma3Obj edmaObj;
  3098. CSL_Edma3Context context;
  3099. CSL_Status status;
  3100. CSL_BitMask32 secEventLo;
  3101. CSL_BitMask32 secEventHi;
  3102. // Module Initialization
  3103. CSL_edma3Init(&context);
  3104. // Module Level Open
  3105. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3106. // Get the DMA Secondary Events.
  3107. CSL_edma3GetDMASecondaryEvents(hModule, &secEventLo, &secEventHi);
  3108. ...
  3109. @endverbatim
  3110. * ===========================================================================
  3111. */
  3112. /* for misra warnings*/
  3113. static inline void CSL_edma3GetDMASecondaryEvents
  3114. (
  3115. CSL_Edma3Handle hModule,
  3116. CSL_BitMask32* secEventLo,
  3117. CSL_BitMask32* secEventHi
  3118. );
  3119. static inline void CSL_edma3GetDMASecondaryEvents
  3120. (
  3121. CSL_Edma3Handle hModule,
  3122. CSL_BitMask32* secEventLo,
  3123. CSL_BitMask32* secEventHi
  3124. )
  3125. {
  3126. /* Read the Secondary Events */
  3127. *secEventLo = hModule->regs->TPCC_SER;
  3128. *secEventHi = hModule->regs->TPCC_SERH;
  3129. return;
  3130. }
  3131. /** ============================================================================
  3132. * @n@b CSL_edma3IsDMAChannelSecondaryEventSet
  3133. *
  3134. * @b Description
  3135. * @n This API is used to determine if the secondary Event for a specific DMA
  3136. * channel is set or not?
  3137. *
  3138. * @b Arguments
  3139. * @verbatim
  3140. hModule Module Handle
  3141. dmaChannel DMA Channel for which secondary Events are being checked
  3142. response Status of the check populated by the API (TRUE if event
  3143. is missed else FALSE)
  3144. @endverbatim
  3145. *
  3146. * <b> Return Value </b>
  3147. * @n None
  3148. *
  3149. * <b> Pre Condition </b>
  3150. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3151. *
  3152. * <b> Post Condition </b>
  3153. * @n None
  3154. *
  3155. * @b Reads
  3156. * @n TPCC_TPCC_SER_SER0;TPCC_TPCC_SER_SER1;TPCC_TPCC_SER_SER2;
  3157. * TPCC_TPCC_SER_SER3;TPCC_TPCC_SER_SER4;TPCC_TPCC_SER_SER5;
  3158. * TPCC_TPCC_SER_SER6;TPCC_TPCC_SER_SER7;TPCC_TPCC_SER_SER8;
  3159. * TPCC_TPCC_SER_SER9;TPCC_TPCC_SER_SER10;TPCC_TPCC_SER_SER11;
  3160. * TPCC_TPCC_SER_SER12;TPCC_TPCC_SER_SER13;TPCC_TPCC_SER_SER14;
  3161. * TPCC_TPCC_SER_SER15;TPCC_TPCC_SER_SER16;TPCC_TPCC_SER_SER17;
  3162. * TPCC_TPCC_SER_SER18;TPCC_TPCC_SER_SER19;TPCC_TPCC_SER_SER20;
  3163. * TPCC_TPCC_SER_SER21;TPCC_TPCC_SER_SER22;TPCC_TPCC_SER_SER23;
  3164. * TPCC_TPCC_SER_SER24;TPCC_TPCC_SER_SER25;TPCC_TPCC_SER_SER26;
  3165. * TPCC_TPCC_SER_SER27;TPCC_TPCC_SER_SER28;TPCC_TPCC_SER_SER29;
  3166. * TPCC_TPCC_SER_SER30;TPCC_TPCC_SER_SER31;
  3167. * @n TPCC_TPCC_SERH_SER32;TPCC_TPCC_SERH_SER33;TPCC_TPCC_SERH_SER34;
  3168. * TPCC_TPCC_SERH_SER35;TPCC_TPCC_SERH_SER36;TPCC_TPCC_SERH_SER37;
  3169. * TPCC_TPCC_SERH_SER38;TPCC_TPCC_SERH_SER39;TPCC_TPCC_SERH_SER40;
  3170. * TPCC_TPCC_SERH_SER41;TPCC_TPCC_SERH_SER42;TPCC_TPCC_SERH_SER43;
  3171. * TPCC_TPCC_SERH_SER44;TPCC_TPCC_SERH_SER45;TPCC_TPCC_SERH_SER46;
  3172. * TPCC_TPCC_SERH_SER47;TPCC_TPCC_SERH_SER48;TPCC_TPCC_SERH_SER49;
  3173. * TPCC_TPCC_SERH_SER50;TPCC_TPCC_SERH_SER51;TPCC_TPCC_SERH_SER52;
  3174. * TPCC_TPCC_SERH_SER53;TPCC_TPCC_SERH_SER54;TPCC_TPCC_SERH_SER55;
  3175. * TPCC_TPCC_SERH_SER56;TPCC_TPCC_SERH_SER57;TPCC_TPCC_SERH_SER58;
  3176. * TPCC_TPCC_SERH_SER59;TPCC_TPCC_SERH_SER60;TPCC_TPCC_SERH_SER61;
  3177. * TPCC_TPCC_SERH_SER62;TPCC_TPCC_SERH_SER63;
  3178. *
  3179. * @b Example
  3180. * @verbatim
  3181. CSL_Edma3Handle hModule;
  3182. CSL_Edma3Obj edmaObj;
  3183. CSL_Edma3Context context;
  3184. CSL_Status status;
  3185. Bool response;
  3186. // Module Initialization
  3187. CSL_edma3Init(&context);
  3188. // Module Level Open
  3189. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3190. // Check if the DMA Channel 1 Secondary Event is set or not?
  3191. CSL_edma3IsDMAChannelSecondaryEventSet(hModule, 1, &response);
  3192. ...
  3193. @endverbatim
  3194. * ===========================================================================
  3195. */
  3196. /* for misra warnings*/
  3197. static inline void CSL_edma3IsDMAChannelSecondaryEventSet
  3198. (
  3199. CSL_Edma3Handle hModule,
  3200. Uint8 dmaChannel,
  3201. Bool* response
  3202. );
  3203. static inline void CSL_edma3IsDMAChannelSecondaryEventSet
  3204. (
  3205. CSL_Edma3Handle hModule,
  3206. Uint8 dmaChannel,
  3207. Bool* response
  3208. )
  3209. {
  3210. /* Determine which register needs to be looked into. */
  3211. if (dmaChannel < 32U)
  3212. {
  3213. /* EMR: Extract the appropriate bit. */
  3214. if (CSL_FEXTR(hModule->regs->TPCC_SER, (Uint32)dmaChannel, (Uint32)dmaChannel))
  3215. {
  3216. *response = TRUE;
  3217. }
  3218. else
  3219. {
  3220. *response = FALSE;
  3221. }
  3222. }
  3223. else
  3224. {
  3225. /* EMRH: Extract the appropriate bit. */
  3226. if (CSL_FEXTR(hModule->regs->TPCC_SERH, ((Uint32)(dmaChannel)-32U), ((Uint32)(dmaChannel)-32U)))
  3227. {
  3228. *response = TRUE;
  3229. }
  3230. else
  3231. {
  3232. *response = FALSE;
  3233. }
  3234. }
  3235. return;
  3236. }
  3237. /** ============================================================================
  3238. * @n@b CSL_edma3ClearDMASecondaryEvents
  3239. *
  3240. * @b Description
  3241. * @n This API clears the DMA secondary events
  3242. *
  3243. * @b Arguments
  3244. * @verbatim
  3245. hModule Module Handle
  3246. secEventLo Lower order 32 bits of secondary events to be cleared
  3247. secEventHi Higher order 32 bits of secondary events to be cleared
  3248. @endverbatim
  3249. *
  3250. * <b> Return Value </b>
  3251. * @n None
  3252. *
  3253. * <b> Pre Condition </b>
  3254. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3255. *
  3256. * <b> Post Condition </b>
  3257. * @n None
  3258. *
  3259. * @b Writes
  3260. * @n TPCC_TPCC_SECR,TPCC_TPCC_SECRH
  3261. *
  3262. * @b Example
  3263. * @verbatim
  3264. CSL_Edma3Handle hModule;
  3265. CSL_Edma3Obj edmaObj;
  3266. CSL_Edma3Context context;
  3267. CSL_Status status;
  3268. CSL_BitMask32 secEventLo;
  3269. CSL_BitMask32 secEventHi;
  3270. // Module Initialization
  3271. CSL_edma3Init(&context);
  3272. // Module Level Open
  3273. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3274. // Get the DMA Secondary Events.
  3275. CSL_edma3GetDMASecondaryEvents(hModule, &secEventLo, &secEventHi);
  3276. ...
  3277. // Clear the DMA Secondary Events
  3278. CSL_edma3ClearDMASecondaryEvents(hModule, secEventLo, secEventHi);
  3279. @endverbatim
  3280. * ===========================================================================
  3281. */
  3282. /* for misra warnings*/
  3283. static inline void CSL_edma3ClearDMASecondaryEvents
  3284. (
  3285. CSL_Edma3Handle hModule,
  3286. CSL_BitMask32 secEventLo,
  3287. CSL_BitMask32 secEventHi
  3288. );
  3289. static inline void CSL_edma3ClearDMASecondaryEvents
  3290. (
  3291. CSL_Edma3Handle hModule,
  3292. CSL_BitMask32 secEventLo,
  3293. CSL_BitMask32 secEventHi
  3294. )
  3295. {
  3296. /* Clear the Secondary Events */
  3297. hModule->regs->TPCC_SECR = secEventLo;
  3298. hModule->regs->TPCC_SECRH = secEventHi;
  3299. return;
  3300. }
  3301. /** ============================================================================
  3302. * @n@b CSL_edma3ClearDMAChannelSecondaryEvents
  3303. *
  3304. * @b Description
  3305. * @n This API clears the DMA Secondary Event for a specific DMA Channel.
  3306. *
  3307. * @b Arguments
  3308. * @verbatim
  3309. hModule Module Handle
  3310. qdmaChannel DMA Channel for which the secondary event is to be cleared.
  3311. @endverbatim
  3312. *
  3313. * <b> Return Value </b>
  3314. * @n None
  3315. *
  3316. * <b> Pre Condition </b>
  3317. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3318. *
  3319. * <b> Post Condition </b>
  3320. * @n None
  3321. *
  3322. * @b Writes
  3323. * @n TPCC_TPCC_SECR_SECR0=1;TPCC_TPCC_SECR_SECR1=1;TPCC_TPCC_SECR_SECR2=1;
  3324. * TPCC_TPCC_SECR_SECR3=1;TPCC_TPCC_SECR_SECR4=1;TPCC_TPCC_SECR_SECR5=1;
  3325. * TPCC_TPCC_SECR_SECR6=1;TPCC_TPCC_SECR_SECR7=1;TPCC_TPCC_SECR_SECR8=1;
  3326. * TPCC_TPCC_SECR_SECR9=1;TPCC_TPCC_SECR_SECR10=1;TPCC_TPCC_SECR_SECR11=1;
  3327. * TPCC_TPCC_SECR_SECR12=1;TPCC_TPCC_SECR_SECR13=1;TPCC_TPCC_SECR_SECR14=1;
  3328. * TPCC_TPCC_SECR_SECR15=1;TPCC_TPCC_SECR_SECR16=1;TPCC_TPCC_SECR_SECR17=1;
  3329. * TPCC_TPCC_SECR_SECR18=1;TPCC_TPCC_SECR_SECR19=1;TPCC_TPCC_SECR_SECR20=1;
  3330. * TPCC_TPCC_SECR_SECR21=1;TPCC_TPCC_SECR_SECR22=1;TPCC_TPCC_SECR_SECR23=1;
  3331. * TPCC_TPCC_SECR_SECR24=1;TPCC_TPCC_SECR_SECR25=1;TPCC_TPCC_SECR_SECR26=1;
  3332. * TPCC_TPCC_SECR_SECR27=1;TPCC_TPCC_SECR_SECR28=1;TPCC_TPCC_SECR_SECR29=1;
  3333. * TPCC_TPCC_SECR_SECR30=1;TPCC_TPCC_SECR_SECR31=1;
  3334. * @n TPCC_TPCC_SECRH_SECR32=1;TPCC_TPCC_SECRH_SECR33=1;TPCC_TPCC_SECRH_SECR34=1;
  3335. * TPCC_TPCC_SECRH_SECR35=1;TPCC_TPCC_SECRH_SECR36=1;TPCC_TPCC_SECRH_SECR37=1;
  3336. * TPCC_TPCC_SECRH_SECR38=1;TPCC_TPCC_SECRH_SECR39=1;TPCC_TPCC_SECRH_SECR40=1;
  3337. * TPCC_TPCC_SECRH_SECR41=1;TPCC_TPCC_SECRH_SECR42=1;TPCC_TPCC_SECRH_SECR43=1;
  3338. * TPCC_TPCC_SECRH_SECR44=1;TPCC_TPCC_SECRH_SECR45=1;TPCC_TPCC_SECRH_SECR46=1;
  3339. * TPCC_TPCC_SECRH_SECR47=1;TPCC_TPCC_SECRH_SECR48=1;TPCC_TPCC_SECRH_SECR49=1;
  3340. * TPCC_TPCC_SECRH_SECR50=1;TPCC_TPCC_SECRH_SECR51=1;TPCC_TPCC_SECRH_SECR52=1;
  3341. * TPCC_TPCC_SECRH_SECR53=1;TPCC_TPCC_SECRH_SECR54=1;TPCC_TPCC_SECRH_SECR55=1;
  3342. * TPCC_TPCC_SECRH_SECR56=1;TPCC_TPCC_SECRH_SECR57=1;TPCC_TPCC_SECRH_SECR58=1;
  3343. * TPCC_TPCC_SECRH_SECR59=1;TPCC_TPCC_SECRH_SECR60=1;TPCC_TPCC_SECRH_SECR61=1;
  3344. * TPCC_TPCC_SECRH_SECR62=1;TPCC_TPCC_SECRH_SECR63=1;
  3345. *
  3346. * @b Example
  3347. * @verbatim
  3348. CSL_Edma3Handle hModule;
  3349. CSL_Edma3Obj edmaObj;
  3350. CSL_Edma3Context context;
  3351. Uint32 qdmaSecEvent;
  3352. // Module Initialization
  3353. CSL_edma3Init(&context);
  3354. // Module Level Open
  3355. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3356. ...
  3357. // Clear the DMA Secondary Event for DMA channel 1
  3358. CSL_edma3ClearDMAChannelSecondaryEvents(hModule, 1);
  3359. ...
  3360. @endverbatim
  3361. * ===========================================================================
  3362. */
  3363. /* for misra warnings*/
  3364. static inline void CSL_edma3ClearDMAChannelSecondaryEvents
  3365. (
  3366. CSL_Edma3Handle hModule,
  3367. Uint8 dmaChannel
  3368. );
  3369. static inline void CSL_edma3ClearDMAChannelSecondaryEvents
  3370. (
  3371. CSL_Edma3Handle hModule,
  3372. Uint8 dmaChannel
  3373. )
  3374. {
  3375. /* Determine which register needs to be looked into. */
  3376. if (dmaChannel < 32U)
  3377. {
  3378. /* SECR: Write to the appropriate channel. */
  3379. hModule->regs->TPCC_SECR = CSL_FMKR ((uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  3380. }
  3381. else
  3382. {
  3383. /* SECRH: Write to the appropriate channel. */
  3384. dmaChannel = dmaChannel - 32U;
  3385. hModule->regs->TPCC_SECRH = CSL_FMKR ((uint32_t)dmaChannel, (uint32_t)dmaChannel, ((uint32_t)1U));
  3386. }
  3387. }
  3388. /** ============================================================================
  3389. * @n@b CSL_edma3InterruptLoDisable
  3390. *
  3391. * @b Description
  3392. * @n The API disables the specified low interrupt Number.
  3393. *
  3394. * @b Arguments
  3395. * @verbatim
  3396. hModule Module Handle
  3397. region Region (Shadow or Global)
  3398. intrLo Interrupt 0-31 (BitMask32) to be disabled
  3399. @endverbatim
  3400. *
  3401. * <b> Return Value </b>
  3402. * @n None
  3403. *
  3404. * <b> Pre Condition </b>
  3405. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3406. *
  3407. * <b> Post Condition </b>
  3408. * @n None
  3409. *
  3410. * @b Writes
  3411. * @n TPCC_TPCC_IECR_IECR0=1;TPCC_TPCC_IECR_IECR1=1;TPCC_TPCC_IECR_IECR2=1;
  3412. * TPCC_TPCC_IECR_IECR3=1;TPCC_TPCC_IECR_IECR4=1;TPCC_TPCC_IECR_IECR5=1;
  3413. * TPCC_TPCC_IECR_IECR6=1;TPCC_TPCC_IECR_IECR7=1;TPCC_TPCC_IECR_IECR8=1;
  3414. * TPCC_TPCC_IECR_IECR9=1;TPCC_TPCC_IECR_IECR10=1;TPCC_TPCC_IECR_IECR11=1;
  3415. * TPCC_TPCC_IECR_IECR12=1;TPCC_TPCC_IECR_IECR13=1;TPCC_TPCC_IECR_IECR14=1;
  3416. * TPCC_TPCC_IECR_IECR15=1;TPCC_TPCC_IECR_IECR16=1;TPCC_TPCC_IECR_IECR17=1;
  3417. * TPCC_TPCC_IECR_IECR18=1;TPCC_TPCC_IECR_IECR19=1;TPCC_TPCC_IECR_IECR20=1;
  3418. * TPCC_TPCC_IECR_IECR21=1;TPCC_TPCC_IECR_IECR22=1;TPCC_TPCC_IECR_IECR23=1;
  3419. * TPCC_TPCC_IECR_IECR24=1;TPCC_TPCC_IECR_IECR25=1;TPCC_TPCC_IECR_IECR26=1;
  3420. * TPCC_TPCC_IECR_IECR27=1;TPCC_TPCC_IECR_IECR28=1;TPCC_TPCC_IECR_IECR29=1;
  3421. * TPCC_TPCC_IECR_IECR30=1;TPCC_TPCC_IECR_IECR31=1;
  3422. *
  3423. * @b Example
  3424. * @verbatim
  3425. CSL_Edma3Handle hModule;
  3426. CSL_Edma3Obj edmaObj;
  3427. CSL_Edma3Context context;
  3428. CSL_Status status;
  3429. // Module Initialization
  3430. CSL_edma3Init(&context);
  3431. // Module Level Open
  3432. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3433. // Interrupts 5-7 disabled for Global Region.
  3434. CSL_edma3InterruptLoDisable(hModule, CSL_EDMA3_REGION_GLOBAL, 0x000000E0);
  3435. ...
  3436. @endverbatim
  3437. * ===========================================================================
  3438. */
  3439. /* for misra warnings*/
  3440. static inline void CSL_edma3InterruptLoDisable
  3441. (
  3442. CSL_Edma3Handle hModule,
  3443. Int region,
  3444. CSL_BitMask32 intrLo
  3445. );
  3446. static inline void CSL_edma3InterruptLoDisable
  3447. (
  3448. CSL_Edma3Handle hModule,
  3449. Int region,
  3450. CSL_BitMask32 intrLo
  3451. )
  3452. {
  3453. /* Disable the interrupts depending on the region. */
  3454. if (region != CSL_EDMA3_REGION_GLOBAL)
  3455. {
  3456. /* Shadow Region */
  3457. hModule->regs->SHADOW[region].TPCC_IECR |= intrLo;
  3458. }
  3459. else
  3460. {
  3461. /* Global Region */
  3462. hModule->regs->TPCC_IECR |= intrLo;
  3463. }
  3464. return;
  3465. }
  3466. /** ============================================================================
  3467. * @n@b CSL_edma3InterruptHiDisable
  3468. *
  3469. * @b Description
  3470. * @n The API disables the specified high interrupt Number.
  3471. *
  3472. * @b Arguments
  3473. * @verbatim
  3474. hModule Module Handle
  3475. region Region (Shadow or Global)
  3476. intrHi Interrupt 32-63 (BitMask32) to be disabled
  3477. @endverbatim
  3478. *
  3479. * <b> Return Value </b>
  3480. * @n None
  3481. *
  3482. * <b> Pre Condition </b>
  3483. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3484. *
  3485. * <b> Post Condition </b>
  3486. * @n None
  3487. *
  3488. * @b Writes
  3489. * @n TPCC_TPCC_IECRH_IECR32=1;TPCC_TPCC_IECRH_IECR33=1;TPCC_TPCC_IECRH_IECR34=1;
  3490. * TPCC_TPCC_IECRH_IECR35=1;TPCC_TPCC_IECRH_IECR36=1;TPCC_TPCC_IECRH_IECR37=1;
  3491. * TPCC_TPCC_IECRH_IECR38=1;TPCC_TPCC_IECRH_IECR39=1;TPCC_TPCC_IECRH_IECR40=1;
  3492. * TPCC_TPCC_IECRH_IECR41=1;TPCC_TPCC_IECRH_IECR42=1;TPCC_TPCC_IECRH_IECR43=1;
  3493. * TPCC_TPCC_IECRH_IECR44=1;TPCC_TPCC_IECRH_IECR45=1;TPCC_TPCC_IECRH_IECR46=1;
  3494. * TPCC_TPCC_IECRH_IECR47=1;TPCC_TPCC_IECRH_IECR48=1;TPCC_TPCC_IECRH_IECR49=1;
  3495. * TPCC_TPCC_IECRH_IECR50=1;TPCC_TPCC_IECRH_IECR51=1;TPCC_TPCC_IECRH_IECR52=1;
  3496. * TPCC_TPCC_IECRH_IECR53=1;TPCC_TPCC_IECRH_IECR54=1;TPCC_TPCC_IECRH_IECR55=1;
  3497. * TPCC_TPCC_IECRH_IECR56=1;TPCC_TPCC_IECRH_IECR57=1;TPCC_TPCC_IECRH_IECR58=1;
  3498. * TPCC_TPCC_IECRH_IECR59=1;TPCC_TPCC_IECRH_IECR60=1;TPCC_TPCC_IECRH_IECR61=1;
  3499. * TPCC_TPCC_IECRH_IECR62=1;TPCC_TPCC_IECRH_IECR63=1;
  3500. *
  3501. * @b Example
  3502. * @verbatim
  3503. CSL_Edma3Handle hModule;
  3504. CSL_Edma3Obj edmaObj;
  3505. CSL_Edma3Context context;
  3506. CSL_Status status;
  3507. // Module Initialization
  3508. CSL_edma3Init(&context);
  3509. // Module Level Open
  3510. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3511. // Interrupts 32 disabled for Global Region.
  3512. CSL_edma3InterruptHiDisable(hModule, CSL_EDMA3_REGION_GLOBAL, 0x1);
  3513. ...
  3514. @endverbatim
  3515. * ===========================================================================
  3516. */
  3517. /* for misra warnings*/
  3518. static inline void CSL_edma3InterruptHiDisable
  3519. (
  3520. CSL_Edma3Handle hModule,
  3521. Int region,
  3522. CSL_BitMask32 intrHi
  3523. );
  3524. static inline void CSL_edma3InterruptHiDisable
  3525. (
  3526. CSL_Edma3Handle hModule,
  3527. Int region,
  3528. CSL_BitMask32 intrHi
  3529. )
  3530. {
  3531. /* Disable the interrupts depending on the region. */
  3532. if (region != CSL_EDMA3_REGION_GLOBAL)
  3533. {
  3534. /* Shadow Region */
  3535. hModule->regs->SHADOW[region].TPCC_IECRH |= intrHi;
  3536. }
  3537. else
  3538. {
  3539. /* Global Region */
  3540. hModule->regs->TPCC_IECRH |= intrHi;
  3541. }
  3542. return;
  3543. }
  3544. /** ============================================================================
  3545. * @n@b CSL_edma3InterruptLoEnable
  3546. *
  3547. * @b Description
  3548. * @n The API enables the specific lower interrupts
  3549. *
  3550. * @b Arguments
  3551. * @verbatim
  3552. hModule Module Handle
  3553. region Region (Shadow or Global)
  3554. intrLo Interrupt 0-31 (BitMask32) to be enabled
  3555. @endverbatim
  3556. *
  3557. * <b> Return Value </b>
  3558. * @n None
  3559. *
  3560. * <b> Pre Condition </b>
  3561. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3562. *
  3563. * <b> Post Condition </b>
  3564. * @n None
  3565. *
  3566. * @b Writes
  3567. * @n TPCC_TPCC_IESR_IESR0=1;TPCC_TPCC_IESR_IESR1=1;TPCC_TPCC_IESR_IESR2=1;
  3568. * TPCC_TPCC_IESR_IESR3=1;TPCC_TPCC_IESR_IESR4=1;TPCC_TPCC_IESR_IESR5=1;
  3569. * TPCC_TPCC_IESR_IESR6=1;TPCC_TPCC_IESR_IESR7=1;TPCC_TPCC_IESR_IESR8=1;
  3570. * TPCC_TPCC_IESR_IESR9=1;TPCC_TPCC_IESR_IESR10=1;TPCC_TPCC_IESR_IESR11=1;
  3571. * TPCC_TPCC_IESR_IESR12=1;TPCC_TPCC_IESR_IESR13=1;TPCC_TPCC_IESR_IESR14=1;
  3572. * TPCC_TPCC_IESR_IESR15=1;TPCC_TPCC_IESR_IESR16=1;TPCC_TPCC_IESR_IESR17=1;
  3573. * TPCC_TPCC_IESR_IESR18=1;TPCC_TPCC_IESR_IESR19=1;TPCC_TPCC_IESR_IESR20=1;
  3574. * TPCC_TPCC_IESR_IESR21=1;TPCC_TPCC_IESR_IESR22=1;TPCC_TPCC_IESR_IESR23=1;
  3575. * TPCC_TPCC_IESR_IESR24=1;TPCC_TPCC_IESR_IESR25=1;TPCC_TPCC_IESR_IESR26=1;
  3576. * TPCC_TPCC_IESR_IESR27=1;TPCC_TPCC_IESR_IESR28=1;TPCC_TPCC_IESR_IESR29=1;
  3577. * TPCC_TPCC_IESR_IESR30=1;TPCC_TPCC_IESR_IESR31=1;
  3578. *
  3579. * @b Example
  3580. * @verbatim
  3581. CSL_Edma3Handle hModule;
  3582. CSL_Edma3Obj edmaObj;
  3583. CSL_Edma3Context context;
  3584. CSL_Status status;
  3585. // Module Initialization
  3586. CSL_edma3Init(&context);
  3587. // Module Level Open
  3588. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3589. // Interrupts 5-7 enabled for the global region.
  3590. CSL_edma3InterruptLoEnable(hModule,CSL_EDMA3_REGION_GLOBAL, 0x000000E0);
  3591. ...
  3592. @endverbatim
  3593. * ===========================================================================
  3594. */
  3595. static inline void CSL_edma3InterruptLoEnable
  3596. (
  3597. CSL_Edma3Handle hModule,
  3598. Int region,
  3599. CSL_BitMask32 intrLo
  3600. );
  3601. static inline void CSL_edma3InterruptLoEnable
  3602. (
  3603. CSL_Edma3Handle hModule,
  3604. Int region,
  3605. CSL_BitMask32 intrLo
  3606. )
  3607. {
  3608. /* Enable the interrupts depending on the region. */
  3609. if (region != CSL_EDMA3_REGION_GLOBAL)
  3610. {
  3611. /* Shadow Region */
  3612. hModule->regs->SHADOW[region].TPCC_IESR |= intrLo;
  3613. }
  3614. else
  3615. {
  3616. /* Global Region */
  3617. hModule->regs->TPCC_IESR |= intrLo;
  3618. }
  3619. return;
  3620. }
  3621. /** ============================================================================
  3622. * @n@b CSL_edma3InterruptHiEnable
  3623. *
  3624. * @b Description
  3625. * @n The API enables the specific High interrupt.
  3626. *
  3627. * @b Arguments
  3628. * @verbatim
  3629. hModule Module Handle
  3630. region Region (Shadow or Global)
  3631. intrHi Interrupt 32-63 (BitMask32) to be enabled
  3632. @endverbatim
  3633. *
  3634. * <b> Return Value </b>
  3635. * @n None
  3636. *
  3637. * <b> Pre Condition </b>
  3638. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3639. *
  3640. * <b> Post Condition </b>
  3641. * @n None
  3642. *
  3643. * @b Writes
  3644. * @n TPCC_TPCC_IESRH_IESR32=1;TPCC_TPCC_IESRH_IESR33=1;TPCC_TPCC_IESRH_IESR34=1;
  3645. * TPCC_TPCC_IESRH_IESR35=1;TPCC_TPCC_IESRH_IESR36=1;TPCC_TPCC_IESRH_IESR37=1;
  3646. * TPCC_TPCC_IESRH_IESR38=1;TPCC_TPCC_IESRH_IESR39=1;TPCC_TPCC_IESRH_IESR40=1;
  3647. * TPCC_TPCC_IESRH_IESR41=1;TPCC_TPCC_IESRH_IESR42=1;TPCC_TPCC_IESRH_IESR43=1;
  3648. * TPCC_TPCC_IESRH_IESR44=1;TPCC_TPCC_IESRH_IESR45=1;TPCC_TPCC_IESRH_IESR46=1;
  3649. * TPCC_TPCC_IESRH_IESR47=1;TPCC_TPCC_IESRH_IESR48=1;TPCC_TPCC_IESRH_IESR49=1;
  3650. * TPCC_TPCC_IESRH_IESR50=1;TPCC_TPCC_IESRH_IESR51=1;TPCC_TPCC_IESRH_IESR52=1;
  3651. * TPCC_TPCC_IESRH_IESR53=1;TPCC_TPCC_IESRH_IESR54=1;TPCC_TPCC_IESRH_IESR55=1;
  3652. * TPCC_TPCC_IESRH_IESR56=1;TPCC_TPCC_IESRH_IESR57=1;TPCC_TPCC_IESRH_IESR58=1;
  3653. * TPCC_TPCC_IESRH_IESR59=1;TPCC_TPCC_IESRH_IESR60=1;TPCC_TPCC_IESRH_IESR61=1;
  3654. * TPCC_TPCC_IESRH_IESR62=1;TPCC_TPCC_IESRH_IESR63=1;
  3655. *
  3656. * @b Example
  3657. * @verbatim
  3658. CSL_Edma3Handle hModule;
  3659. CSL_Edma3Obj edmaObj;
  3660. CSL_Edma3Context context;
  3661. CSL_Status status;
  3662. // Module Initialization
  3663. CSL_edma3Init(&context);
  3664. // Module Level Open
  3665. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3666. // Interrupts 32 enabled for the global region.
  3667. CSL_edma3InterruptHiEnable(hModule,CSL_EDMA3_REGION_GLOBAL, 0x1);
  3668. ...
  3669. @endverbatim
  3670. * ===========================================================================
  3671. */
  3672. static inline void CSL_edma3InterruptHiEnable
  3673. (
  3674. CSL_Edma3Handle hModule,
  3675. Int region,
  3676. CSL_BitMask32 intrHi
  3677. );
  3678. static inline void CSL_edma3InterruptHiEnable
  3679. (
  3680. CSL_Edma3Handle hModule,
  3681. Int region,
  3682. CSL_BitMask32 intrHi
  3683. )
  3684. {
  3685. /* Enable the interrupts depending on the region. */
  3686. if (region != CSL_EDMA3_REGION_GLOBAL)
  3687. {
  3688. /* Shadow Region */
  3689. hModule->regs->SHADOW[region].TPCC_IESRH |= intrHi;
  3690. }
  3691. else
  3692. {
  3693. /* Global Region */
  3694. hModule->regs->TPCC_IESRH |= intrHi;
  3695. }
  3696. return;
  3697. }
  3698. /** ============================================================================
  3699. * @n@b CSL_edma3GetLoPendingInterrupts
  3700. *
  3701. * @b Description
  3702. * @n The API gets a bitmask of all low pending interrupts.
  3703. *
  3704. * @b Arguments
  3705. * @verbatim
  3706. hModule Module Handle
  3707. region Region (Shadown Region or Global)
  3708. intrLo Status 0-31 of the interrupts
  3709. @endverbatim
  3710. *
  3711. * <b> Return Value </b>
  3712. * @n None
  3713. *
  3714. * <b> Pre Condition </b>
  3715. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3716. *
  3717. * <b> Post Condition </b>
  3718. * @n None
  3719. *
  3720. * @b Reads
  3721. * @n TPCC_TPCC_IPR
  3722. *
  3723. * @b Example
  3724. * @verbatim
  3725. CSL_Edma3Handle hModule;
  3726. CSL_Edma3Obj edmaObj;
  3727. CSL_Edma3Context context;
  3728. CSL_Status status;
  3729. CSL_BitMask32 edmaIntrLo;
  3730. // Module Initialization
  3731. CSL_edma3Init(&context);
  3732. // Module Level Open
  3733. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3734. ...
  3735. // Get all low pending interrupts for the global region.
  3736. CSL_edma3GetLoPendingInterrupts(hModule, CSL_EDMA3_REGION_GLOBAL, &edmaIntrLo);
  3737. ...
  3738. @endverbatim
  3739. * ===========================================================================
  3740. */
  3741. /* for misra warnings*/
  3742. static inline void CSL_edma3GetLoPendingInterrupts
  3743. (
  3744. CSL_Edma3Handle hModule,
  3745. Int region,
  3746. CSL_BitMask32* intrLo
  3747. );
  3748. static inline void CSL_edma3GetLoPendingInterrupts
  3749. (
  3750. CSL_Edma3Handle hModule,
  3751. Int region,
  3752. CSL_BitMask32* intrLo
  3753. )
  3754. {
  3755. /* Get the pending interrupts depending on the region */
  3756. if (region != CSL_EDMA3_REGION_GLOBAL)
  3757. {
  3758. /* Shadow Region. */
  3759. *intrLo = hModule->regs->SHADOW[region].TPCC_IPR;
  3760. }
  3761. else
  3762. {
  3763. /* Global Region. */
  3764. *intrLo = hModule->regs->TPCC_IPR;
  3765. }
  3766. return;
  3767. }
  3768. /** ============================================================================
  3769. * @n@b CSL_edma3GetHiPendingInterrupts
  3770. *
  3771. * @b Description
  3772. * @n The API gets a bitmask of all high pending interrupts.
  3773. *
  3774. * @b Arguments
  3775. * @verbatim
  3776. hModule Module Handle
  3777. region Region (Shadown Region or Global)
  3778. intrHi Status 32-63 of the interrupts
  3779. @endverbatim
  3780. *
  3781. * <b> Return Value </b>
  3782. * @n None
  3783. *
  3784. * <b> Pre Condition </b>
  3785. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3786. *
  3787. * <b> Post Condition </b>
  3788. * @n None
  3789. *
  3790. * @b Reads
  3791. * @n TPCC_TPCC_IPRH
  3792. *
  3793. * @b Example
  3794. * @verbatim
  3795. CSL_Edma3Handle hModule;
  3796. CSL_Edma3Obj edmaObj;
  3797. CSL_Edma3Context context;
  3798. CSL_Status status;
  3799. CSL_BitMask32 edmaIntrHi;
  3800. // Module Initialization
  3801. CSL_edma3Init(&context);
  3802. // Module Level Open
  3803. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3804. ...
  3805. // Get all the high pending interrupts for the global region.
  3806. CSL_edma3GetHiPendingInterrupts(hModule, CSL_EDMA3_REGION_GLOBAL, &edmaIntrHi);
  3807. ...
  3808. @endverbatim
  3809. * ===========================================================================
  3810. */
  3811. /* for misra warnings*/
  3812. static inline void CSL_edma3GetHiPendingInterrupts
  3813. (
  3814. CSL_Edma3Handle hModule,
  3815. Int region,
  3816. CSL_BitMask32* intrHi
  3817. );
  3818. static inline void CSL_edma3GetHiPendingInterrupts
  3819. (
  3820. CSL_Edma3Handle hModule,
  3821. Int region,
  3822. CSL_BitMask32* intrHi
  3823. )
  3824. {
  3825. /* Get the pending interrupts depending on the region */
  3826. if (region != CSL_EDMA3_REGION_GLOBAL)
  3827. {
  3828. /* Shadow Region. */
  3829. *intrHi = hModule->regs->SHADOW[region].TPCC_IPRH;
  3830. }
  3831. else
  3832. {
  3833. /* Global Region. */
  3834. *intrHi = hModule->regs->TPCC_IPRH;
  3835. }
  3836. return;
  3837. }
  3838. /** ============================================================================
  3839. * @n@b CSL_edma3ClearLoPendingInterrupts
  3840. *
  3841. * @b Description
  3842. * @n This API clears the low pending interrupts using the interrupt bitmasks
  3843. * provided
  3844. *
  3845. * @b Arguments
  3846. * @verbatim
  3847. hModule Module Handle
  3848. region Region (Shadown Region or Global)
  3849. intrLo Interrupt 0-31 (BitMask32) to be cleared
  3850. @endverbatim
  3851. *
  3852. * <b> Return Value </b>
  3853. * @n None
  3854. *
  3855. * <b> Pre Condition </b>
  3856. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3857. *
  3858. * <b> Post Condition </b>
  3859. * @n None
  3860. *
  3861. * @b Writes
  3862. * @n TPCC_TPCC_ICR
  3863. *
  3864. * @b Example
  3865. * @verbatim
  3866. CSL_Edma3Handle hModule;
  3867. CSL_Edma3Obj edmaObj;
  3868. CSL_Edma3Context context;
  3869. CSL_Status status;
  3870. CSL_BitMask32 edmaIntrLo;
  3871. // Module Initialization
  3872. CSL_edma3Init(&context);
  3873. // Module Level Open
  3874. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3875. ...
  3876. // Get all the pending interrupts for the global region.
  3877. CSL_edma3GetLoPendingInterrupts(hModule, CSL_EDMA3_REGION_GLOBAL, &edmaIntrLo);
  3878. ...
  3879. // Clear the pending interrupts for the global region.
  3880. CSL_edma3ClearLoPendingInterrupts(hModule, CSL_EDMA3_REGION_GLOBAL, edmaIntrLo);
  3881. @endverbatim
  3882. * ===========================================================================
  3883. */
  3884. static inline void CSL_edma3ClearLoPendingInterrupts
  3885. (
  3886. CSL_Edma3Handle hModule,
  3887. Int region,
  3888. CSL_BitMask32 intrLo
  3889. );
  3890. static inline void CSL_edma3ClearLoPendingInterrupts
  3891. (
  3892. CSL_Edma3Handle hModule,
  3893. Int region,
  3894. CSL_BitMask32 intrLo
  3895. )
  3896. {
  3897. /* Clear the pending interrupts depending on the region. */
  3898. if (region != CSL_EDMA3_REGION_GLOBAL)
  3899. {
  3900. /* Shadow Region */
  3901. hModule->regs->SHADOW[region].TPCC_ICR = intrLo;
  3902. }
  3903. else
  3904. {
  3905. /* Global Region */
  3906. hModule->regs->TPCC_ICR = intrLo;
  3907. }
  3908. return;
  3909. }
  3910. /** ============================================================================
  3911. * @n@b CSL_edma3ClearHiPendingInterrupts
  3912. *
  3913. * @b Description
  3914. * @n This API clears the High pending interrupts using the interrupt bitmasks
  3915. * provided
  3916. *
  3917. * @b Arguments
  3918. * @verbatim
  3919. hModule Module Handle
  3920. region Region (Shadown Region or Global)
  3921. intrHi Interrupt 32-63 (BitMask32) to be cleared
  3922. @endverbatim
  3923. *
  3924. * <b> Return Value </b>
  3925. * @n None
  3926. *
  3927. * <b> Pre Condition </b>
  3928. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  3929. *
  3930. * <b> Post Condition </b>
  3931. * @n None
  3932. *
  3933. * @b Writes
  3934. * @n TPCC_TPCC_ICRH
  3935. *
  3936. * @b Example
  3937. * @verbatim
  3938. CSL_Edma3Handle hModule;
  3939. CSL_Edma3Obj edmaObj;
  3940. CSL_Edma3Context context;
  3941. CSL_Status status;
  3942. CSL_BitMask32 edmaIntrHi;
  3943. // Module Initialization
  3944. CSL_edma3Init(&context);
  3945. // Module Level Open
  3946. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  3947. ...
  3948. // Get all the pending interrupts for the global region.
  3949. CSL_edma3GetHiPendingInterrupts(hModule, CSL_EDMA3_REGION_GLOBAL, &edmaIntrHi);
  3950. ...
  3951. // Clear the pending interrupts for the global region.
  3952. CSL_edma3ClearHiPendingInterrupts(hModule, CSL_EDMA3_REGION_GLOBAL, edmaIntrHi);
  3953. @endverbatim
  3954. * ===========================================================================
  3955. */
  3956. static inline void CSL_edma3ClearHiPendingInterrupts
  3957. (
  3958. CSL_Edma3Handle hModule,
  3959. Int region,
  3960. CSL_BitMask32 intrHi
  3961. );
  3962. static inline void CSL_edma3ClearHiPendingInterrupts
  3963. (
  3964. CSL_Edma3Handle hModule,
  3965. Int region,
  3966. CSL_BitMask32 intrHi
  3967. )
  3968. {
  3969. /* Clear the pending interrupts depending on the region. */
  3970. if (region != CSL_EDMA3_REGION_GLOBAL)
  3971. {
  3972. /* Shadow Region */
  3973. hModule->regs->SHADOW[region].TPCC_ICRH = intrHi;
  3974. }
  3975. else
  3976. {
  3977. /* Global Region */
  3978. hModule->regs->TPCC_ICRH = intrHi;
  3979. }
  3980. return;
  3981. }
  3982. /** ============================================================================
  3983. * @n@b CSL_edma3InterruptEval
  3984. *
  3985. * @b Description
  3986. * @n The API is used to set the EVAL bit which will cause an interrupt to be
  3987. * generated if any enabled interrupts are still pending.
  3988. *
  3989. * @b Arguments
  3990. * @verbatim
  3991. hModule Module Handle
  3992. region Region (Shadown Region or Global)
  3993. @endverbatim
  3994. *
  3995. * <b> Return Value </b>
  3996. * @n None
  3997. *
  3998. * <b> Pre Condition </b>
  3999. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  4000. *
  4001. * <b> Post Condition </b>
  4002. * @n None
  4003. *
  4004. * @b Writes
  4005. * @n TPCC_TPCC_IEVAL_EVAL=1
  4006. *
  4007. * @b Example
  4008. * @verbatim
  4009. CSL_Edma3Handle hModule;
  4010. CSL_Edma3Obj edmaObj;
  4011. CSL_Edma3Context context;
  4012. CSL_Status status;
  4013. CSL_BitMask32 edmaIntrLo;
  4014. CSL_BitMask32 edmaIntrHi;
  4015. // Module Initialization
  4016. CSL_edma3Init(&context);
  4017. // Module Level Open
  4018. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  4019. ...
  4020. // Interrupt Evaluate for Global Region.
  4021. status = CSL_edma3InterruptEval(hModule, CSL_EDMA3_REGION_GLOBAL);
  4022. ...
  4023. @endverbatim
  4024. * ===========================================================================
  4025. */
  4026. static inline void CSL_edma3InterruptEval
  4027. (
  4028. CSL_Edma3Handle hModule,
  4029. Int region
  4030. );
  4031. static inline void CSL_edma3InterruptEval
  4032. (
  4033. CSL_Edma3Handle hModule,
  4034. Int region
  4035. )
  4036. {
  4037. /* Determine the region for which the interrupt evaluate needs to be done. */
  4038. if (region != CSL_EDMA3_REGION_GLOBAL)
  4039. {
  4040. /* Shadow Region. */
  4041. hModule->regs->SHADOW[region].TPCC_IEVAL = CSL_FMK(TPCC_TPCC_IEVAL_EVAL, (Uint32)1U);
  4042. }
  4043. else
  4044. {
  4045. /* Global Region. */
  4046. hModule->regs->TPCC_IEVAL = CSL_FMK(TPCC_TPCC_IEVAL_EVAL, (Uint32)1U);
  4047. }
  4048. return;
  4049. }
  4050. /** ============================================================================
  4051. * @n@b CSL_edma3IsQDMAChannelEventPending
  4052. *
  4053. * @b Description
  4054. * @n The function gets the status of the specified QDMA channel i.e. if
  4055. * there is a pending event on the specific channel.
  4056. *
  4057. * @b Arguments
  4058. * @verbatim
  4059. hModule Module Handle
  4060. qdmaChannel QDMA Channel for which status is being inquired.
  4061. response Place holder for whether an event is set(TRUE) or not (FALSE)
  4062. @endverbatim
  4063. *
  4064. * <b> Return Value </b>
  4065. * @n None.
  4066. *
  4067. * <b> Pre Condition </b>
  4068. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  4069. *
  4070. * <b> Post Condition </b>
  4071. * @n None
  4072. *
  4073. * @b Reads
  4074. * @n TPCC_TPCC_QER_QER0;TPCC_TPCC_QER_QER1;TPCC_TPCC_QER_QER2;TPCC_TPCC_QER_QER3;
  4075. * TPCC_TPCC_QER_QER4;TPCC_TPCC_QER_QER5;TPCC_TPCC_QER_QER6;TPCC_TPCC_QER_QER7
  4076. *
  4077. * @b Example
  4078. * @verbatim
  4079. CSL_Edma3Handle hModule;
  4080. CSL_Edma3Obj edmaObj;
  4081. CSL_Edma3Context context;
  4082. CSL_Status status;
  4083. Bool qdmaStatus;
  4084. // Module Initialization
  4085. CSL_edma3Init(&context);
  4086. // Module Level Open
  4087. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  4088. ...
  4089. // Is QDMA Channel 1 event pending.
  4090. CSL_edma3IsQDMAChannelEventPending(hModule, 1, &qdmaStatus);
  4091. ...
  4092. @endverbatim
  4093. * ===========================================================================
  4094. */
  4095. /* for misra warnings*/
  4096. static inline void CSL_edma3IsQDMAChannelEventPending
  4097. (
  4098. CSL_Edma3Handle hModule,
  4099. Uint8 qdmaChannel,
  4100. Bool* response
  4101. );
  4102. static inline void CSL_edma3IsQDMAChannelEventPending
  4103. (
  4104. CSL_Edma3Handle hModule,
  4105. Uint8 qdmaChannel,
  4106. Bool* response
  4107. )
  4108. {
  4109. /* Read the specific QDMA channel bits. */
  4110. if (CSL_FEXTR(hModule->regs->TPCC_QER, (Uint32)qdmaChannel, (Uint32)qdmaChannel))
  4111. {
  4112. *response = TRUE;
  4113. }
  4114. else
  4115. {
  4116. *response = FALSE;
  4117. }
  4118. return;
  4119. }
  4120. /** ============================================================================
  4121. * @n@b CSL_edma3QDMAChannelEnable
  4122. *
  4123. * @b Description
  4124. * @n This API enables the specified QDMA Channel.
  4125. *
  4126. * @b Arguments
  4127. * @verbatim
  4128. hModule Module Handle
  4129. region Region (Shadown Region or Global)
  4130. qdmaChannel QDMA Channel to be enabled.
  4131. @endverbatim
  4132. *
  4133. * <b> Return Value </b>
  4134. * @n None
  4135. *
  4136. * <b> Pre Condition </b>
  4137. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  4138. *
  4139. * <b> Post Condition </b>
  4140. * @n None
  4141. *
  4142. * @b Writes
  4143. * @n TPCC_TPCC_QEESR_QEESR0=1;TPCC_TPCC_QEESR_QEESR1=1;TPCC_TPCC_QEESR_QEESR2=1;
  4144. * TPCC_TPCC_QEESR_QEESR3=1;TPCC_TPCC_QEESR_QEESR4=1;TPCC_TPCC_QEESR_QEESR5=1;
  4145. * TPCC_TPCC_QEESR_QEESR6=1;TPCC_TPCC_QEESR_QEESR7=1;
  4146. *
  4147. * @b Example
  4148. * @verbatim
  4149. CSL_Edma3Handle hModule;
  4150. CSL_Edma3Obj edmaObj;
  4151. CSL_Edma3Context context;
  4152. CSL_Status status;
  4153. // Module Initialization
  4154. CSL_edma3Init(&context);
  4155. // Module Level Open
  4156. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  4157. // Enables QDMA Channel 1 for Global Region.
  4158. CSL_edma3QDMAChannelEnable(hModule, CSL_EDMA3_REGION_GLOBAL, 1);
  4159. ...
  4160. @endverbatim
  4161. * ===========================================================================
  4162. */
  4163. /* for misra warnings*/
  4164. static inline void CSL_edma3QDMAChannelEnable
  4165. (
  4166. CSL_Edma3Handle hModule,
  4167. Int region,
  4168. Uint8 qdmaChannel
  4169. );
  4170. static inline void CSL_edma3QDMAChannelEnable
  4171. (
  4172. CSL_Edma3Handle hModule,
  4173. Int region,
  4174. Uint8 qdmaChannel
  4175. )
  4176. {
  4177. /* Determine the region for which the QDMA channel is to be enabled. */
  4178. if (region == CSL_EDMA3_REGION_GLOBAL)
  4179. {
  4180. /* Global: Write to the specific QDMA Channel bits */
  4181. hModule->regs->TPCC_QEESR = CSL_FMKR((uint32_t)qdmaChannel, (uint32_t)qdmaChannel, ((uint32_t)1U));
  4182. }
  4183. else
  4184. {
  4185. /* Shadow: Write to the specific QDMA Channel bits. */
  4186. hModule->regs->SHADOW[region].TPCC_QEESR = CSL_FMKR((uint32_t)qdmaChannel, (uint32_t)qdmaChannel, ((uint32_t)1U));
  4187. }
  4188. return;
  4189. }
  4190. /** ============================================================================
  4191. * @n@b CSL_edma3QDMAChannelDisable
  4192. *
  4193. * @b Description
  4194. * @n This API disables the specified QDMA Channel.
  4195. *
  4196. * @b Arguments
  4197. * @verbatim
  4198. hModule Module Handle
  4199. region Region (Shadown Region or Global)
  4200. qdmaChannel QDMA Channel to be disabled.
  4201. @endverbatim
  4202. *
  4203. * <b> Return Value </b>
  4204. * @n None
  4205. *
  4206. * <b> Pre Condition </b>
  4207. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  4208. *
  4209. * <b> Post Condition </b>
  4210. * @n None
  4211. *
  4212. * @b Writes
  4213. * @n TPCC_TPCC_QEECR_QEECR0=1;TPCC_TPCC_QEECR_QEECR1=1;TPCC_TPCC_QEECR_QEECR2=1;
  4214. * TPCC_TPCC_QEECR_QEECR3=1;TPCC_TPCC_QEECR_QEECR4=1;TPCC_TPCC_QEECR_QEECR5=1;
  4215. * TPCC_TPCC_QEECR_QEECR6=1;TPCC_TPCC_QEECR_QEECR7=1;
  4216. *
  4217. * @b Example
  4218. * @verbatim
  4219. CSL_Edma3Handle hModule;
  4220. CSL_Edma3Obj edmaObj;
  4221. CSL_Edma3Context context;
  4222. CSL_Status status;
  4223. // Module Initialization
  4224. CSL_edma3Init(&context);
  4225. // Module Level Open
  4226. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  4227. // Disables QDMA Channel 0
  4228. CSL_edma3QDMAChannelDisable(hModule, 0);
  4229. ...
  4230. @endverbatim
  4231. * ===========================================================================
  4232. */
  4233. /* for misra warnings*/
  4234. static inline void CSL_edma3QDMAChannelDisable
  4235. (
  4236. CSL_Edma3Handle hModule,
  4237. Int region,
  4238. Uint8 qdmaChannel
  4239. );
  4240. static inline void CSL_edma3QDMAChannelDisable
  4241. (
  4242. CSL_Edma3Handle hModule,
  4243. Int region,
  4244. Uint8 qdmaChannel
  4245. )
  4246. {
  4247. /* Determine the region for which the QDMA channel is to be disabled. */
  4248. if (region == CSL_EDMA3_REGION_GLOBAL)
  4249. {
  4250. /* Global: Write to the specific QDMA Channel bits */
  4251. CSL_FINSR(hModule->regs->TPCC_QEECR, (uint32_t)qdmaChannel, (uint32_t)qdmaChannel, ((uint32_t)1U));
  4252. }
  4253. else
  4254. {
  4255. /* Shadow: Write to the specific QDMA Channel bits. */
  4256. CSL_FINSR(hModule->regs->SHADOW[region].TPCC_QEECR, (uint32_t)qdmaChannel, (uint32_t)qdmaChannel, ((uint32_t)1U));
  4257. }
  4258. return;
  4259. }
  4260. /** ============================================================================
  4261. * @n@b CSL_edma3GetQDMASecondaryEvents
  4262. *
  4263. * @b Description
  4264. * @n This API reads the QDMA Secondary Event.
  4265. *
  4266. * @b Arguments
  4267. * @verbatim
  4268. hModule Module Handle
  4269. qdmaSecEvent QDMA Secondary Event which is populated by this API
  4270. @endverbatim
  4271. *
  4272. * <b> Return Value </b>
  4273. * @n None
  4274. *
  4275. * <b> Pre Condition </b>
  4276. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  4277. *
  4278. * <b> Post Condition </b>
  4279. * @n None
  4280. *
  4281. * @b Reads
  4282. * @n TPCC_TPCC_QSER
  4283. *
  4284. * @b Example
  4285. * @verbatim
  4286. CSL_Edma3Handle hModule;
  4287. CSL_Edma3Obj edmaObj;
  4288. CSL_Edma3Context context;
  4289. Uint32 qdmaSecEvent;
  4290. // Module Initialization
  4291. CSL_edma3Init(&context);
  4292. // Module Level Open
  4293. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  4294. ...
  4295. // Get the QDMA Secondary Event
  4296. CSL_edma3GetQDMASecondaryEvents(hModule, &qdmaSecEvent);
  4297. ...
  4298. @endverbatim
  4299. * ===========================================================================
  4300. */
  4301. /* for misra warnings*/
  4302. static inline void CSL_edma3GetQDMASecondaryEvents
  4303. (
  4304. CSL_Edma3Handle hModule,
  4305. Uint32* qdmaSecEvent
  4306. );
  4307. static inline void CSL_edma3GetQDMASecondaryEvents
  4308. (
  4309. CSL_Edma3Handle hModule,
  4310. Uint32* qdmaSecEvent
  4311. )
  4312. {
  4313. /* Read the QDMA Secondary Event. */
  4314. *qdmaSecEvent = hModule->regs->TPCC_QSER;
  4315. return;
  4316. }
  4317. /** ============================================================================
  4318. * @n@b CSL_edma3IsDMAChannelSecondaryEventSet
  4319. *
  4320. * @b Description
  4321. * @n This API is used to determine if the secondary Event for a specific DMA
  4322. * channel is set or not?
  4323. *
  4324. * @b Arguments
  4325. * @verbatim
  4326. hModule Module Handle
  4327. qdmaChannel QDMA Channel for which secondary Events are being checked
  4328. response Status of the check populated by the API (TRUE if event
  4329. is missed else FALSE)
  4330. @endverbatim
  4331. *
  4332. * <b> Return Value </b>
  4333. * @n None
  4334. *
  4335. * <b> Pre Condition </b>
  4336. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  4337. *
  4338. * <b> Post Condition </b>
  4339. * @n None
  4340. *
  4341. * @b Reads
  4342. * @n TPCC_TPCC_QSER_QSER0;TPCC_TPCC_QSER_QSER1;TPCC_TPCC_QSER_QSER2;
  4343. * TPCC_TPCC_QSER_QSER3;TPCC_TPCC_QSER_QSER4;TPCC_TPCC_QSER_QSER5;
  4344. * TPCC_TPCC_QSER_QSER6;TPCC_TPCC_QSER_QSER7;
  4345. *
  4346. * @b Example
  4347. * @verbatim
  4348. CSL_Edma3Handle hModule;
  4349. CSL_Edma3Obj edmaObj;
  4350. CSL_Edma3Context context;
  4351. CSL_Status status;
  4352. Bool response;
  4353. // Module Initialization
  4354. CSL_edma3Init(&context);
  4355. // Module Level Open
  4356. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  4357. // Check if the QDMA Channel 1 Secondary Event is set or not?
  4358. CSL_edma3IsQDMAChannelSecondaryEventSet(hModule, 1, &response);
  4359. ...
  4360. @endverbatim
  4361. * ===========================================================================
  4362. */
  4363. /* for misra warnings*/
  4364. static inline void CSL_edma3IsQDMAChannelSecondaryEventSet
  4365. (
  4366. CSL_Edma3Handle hModule,
  4367. Uint8 qdmaChannel,
  4368. Bool* response
  4369. );
  4370. static inline void CSL_edma3IsQDMAChannelSecondaryEventSet
  4371. (
  4372. CSL_Edma3Handle hModule,
  4373. Uint8 qdmaChannel,
  4374. Bool* response
  4375. )
  4376. {
  4377. /* Check if the QDMA channel bit is set or not? */
  4378. if (CSL_FEXTR(hModule->regs->TPCC_QSER, (Uint32)qdmaChannel, (Uint32)qdmaChannel))
  4379. {
  4380. *response = TRUE;
  4381. }
  4382. else
  4383. {
  4384. *response = FALSE;
  4385. }
  4386. return;
  4387. }
  4388. /** ============================================================================
  4389. * @n@b CSL_edma3ClearQDMASecondaryEvents
  4390. *
  4391. * @b Description
  4392. * @n This API clears the QDMA Secondary Event.
  4393. *
  4394. * @b Arguments
  4395. * @verbatim
  4396. hModule Module Handle
  4397. qdmaSecEvent QDMA Secondary Event to be cleared.
  4398. @endverbatim
  4399. *
  4400. * <b> Return Value </b>
  4401. * @n None
  4402. *
  4403. * <b> Pre Condition </b>
  4404. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  4405. *
  4406. * <b> Post Condition </b>
  4407. * @n None
  4408. *
  4409. * @b Writes
  4410. * @n TPCC_TPCC_QSECR
  4411. *
  4412. * @b Example
  4413. * @verbatim
  4414. CSL_Edma3Handle hModule;
  4415. CSL_Edma3Obj edmaObj;
  4416. CSL_Edma3Context context;
  4417. Uint32 qdmaSecEvent;
  4418. // Module Initialization
  4419. CSL_edma3Init(&context);
  4420. // Module Level Open
  4421. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  4422. ...
  4423. // Get the QDMA Secondary Event
  4424. CSL_edma3GetQDMASecondaryEvents(hModule, &qdmaSecEvent);
  4425. ...
  4426. // Clear the QDMA Secondary Event
  4427. CSL_edma3ClearQDMASecondaryEvents(hModule, qdmaSecEvent);
  4428. ...
  4429. @endverbatim
  4430. * ===========================================================================
  4431. */
  4432. /* for misra warnings*/
  4433. static inline void CSL_edma3ClearQDMASecondaryEvents
  4434. (
  4435. CSL_Edma3Handle hModule,
  4436. Uint32 qdmaSecEvent
  4437. );
  4438. static inline void CSL_edma3ClearQDMASecondaryEvents
  4439. (
  4440. CSL_Edma3Handle hModule,
  4441. Uint32 qdmaSecEvent
  4442. )
  4443. {
  4444. /* Clears the QDMA Secondary Event. */
  4445. hModule->regs->TPCC_QSECR = qdmaSecEvent;
  4446. }
  4447. /** ============================================================================
  4448. * @n@b CSL_edma3ClearQDMAChannelSecondaryEvents
  4449. *
  4450. * @b Description
  4451. * @n This API clears the QDMA Secondary Event for a specific QDMA Channel.
  4452. *
  4453. * @b Arguments
  4454. * @verbatim
  4455. hModule Module Handle
  4456. qdmaChannel QDMA Channel for which the secondary event is to be cleared.
  4457. @endverbatim
  4458. *
  4459. * <b> Return Value </b>
  4460. * @n None
  4461. *
  4462. * <b> Pre Condition </b>
  4463. * @n Both @a CSL_edma3Init() and @a CSL_edma3Open() must be called.
  4464. *
  4465. * <b> Post Condition </b>
  4466. * @n None
  4467. *
  4468. * @b Writes
  4469. * @n TPCC_TPCC_QSECR_QSECR0=1;TPCC_TPCC_QSECR_QSECR1=1;TPCC_TPCC_QSECR_QSECR2=1;
  4470. * TPCC_TPCC_QSECR_QSECR3=1;TPCC_TPCC_QSECR_QSECR4=1;TPCC_TPCC_QSECR_QSECR5=1;
  4471. * TPCC_TPCC_QSECR_QSECR6=1;TPCC_TPCC_QSECR_QSECR7=1;
  4472. *
  4473. * @b Example
  4474. * @verbatim
  4475. CSL_Edma3Handle hModule;
  4476. CSL_Edma3Obj edmaObj;
  4477. CSL_Edma3Context context;
  4478. Uint32 qdmaSecEvent;
  4479. // Module Initialization
  4480. CSL_edma3Init(&context);
  4481. // Module Level Open
  4482. hModule = CSL_edma3Open(&edmaObj,CSL_EDMA3,NULL,&status);
  4483. ...
  4484. // Clear the QDMA Secondary Event for QDMA channel 1
  4485. CSL_edma3ClearQDMAChannelSecondaryEvents(hModule, 1);
  4486. ...
  4487. @endverbatim
  4488. * ===========================================================================
  4489. */
  4490. /* for misra warnings*/
  4491. static inline void CSL_edma3ClearQDMAChannelSecondaryEvents
  4492. (
  4493. CSL_Edma3Handle hModule,
  4494. Uint8 qdmaChannel
  4495. );
  4496. static inline void CSL_edma3ClearQDMAChannelSecondaryEvents
  4497. (
  4498. CSL_Edma3Handle hModule,
  4499. Uint8 qdmaChannel
  4500. )
  4501. {
  4502. /* Clears the QDMA Secondary Event. */
  4503. CSL_FINSR (hModule->regs->TPCC_QSECR, (uint32_t)qdmaChannel, (uint32_t)qdmaChannel, ((uint32_t)1U));
  4504. }
  4505. /**
  4506. @}
  4507. */
  4508. #endif /* CSL_EDMA3AUX_H */