MK82F25615.h 1012 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593
  1. /*
  2. ** ###################################################################
  3. ** Processors: MK82FN256CAx15
  4. ** MK82FN256VDC15
  5. ** MK82FN256VLL15
  6. ** MK82FN256VLQ15
  7. **
  8. ** Compilers: Keil ARM C/C++ Compiler
  9. ** Freescale C/C++ for Embedded ARM
  10. ** GNU C Compiler
  11. ** IAR ANSI C/C++ Compiler for ARM
  12. ** MCUXpresso Compiler
  13. **
  14. ** Reference manual: K82P121M150SF5RM, Rev. 0, May 2015
  15. ** Version: rev. 1.2, 2015-07-29
  16. ** Build: b171205
  17. **
  18. ** Abstract:
  19. ** CMSIS Peripheral Access Layer for MK82F25615
  20. **
  21. ** The Clear BSD License
  22. ** Copyright 1997-2016 Freescale Semiconductor, Inc.
  23. ** Copyright 2016-2017 NXP
  24. ** All rights reserved.
  25. **
  26. ** Redistribution and use in source and binary forms, with or without
  27. ** modification, are permitted (subject to the limitations in the
  28. ** disclaimer below) provided that the following conditions are met:
  29. **
  30. ** * Redistributions of source code must retain the above copyright
  31. ** notice, this list of conditions and the following disclaimer.
  32. **
  33. ** * Redistributions in binary form must reproduce the above copyright
  34. ** notice, this list of conditions and the following disclaimer in the
  35. ** documentation and/or other materials provided with the distribution.
  36. **
  37. ** * Neither the name of the copyright holder nor the names of its
  38. ** contributors may be used to endorse or promote products derived from
  39. ** this software without specific prior written permission.
  40. **
  41. ** NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
  42. ** GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
  43. ** HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
  44. ** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  45. ** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  46. ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
  47. ** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  48. ** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  49. ** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  50. ** BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  51. ** WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  52. ** OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  53. ** IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  54. **
  55. ** http: www.nxp.com
  56. ** mail: support@nxp.com
  57. **
  58. ** Revisions:
  59. ** - rev. 1.0 (2015-04-09)
  60. ** Initial version
  61. ** - rev. 1.1 (2015-05-28)
  62. ** Update according to the reference manual Rev. 0.
  63. ** - rev. 1.2 (2015-07-29)
  64. ** Correction of backward compatibility.
  65. **
  66. ** ###################################################################
  67. */
  68. /*!
  69. * @file MK82F25615.h
  70. * @version 1.2
  71. * @date 2015-07-29
  72. * @brief CMSIS Peripheral Access Layer for MK82F25615
  73. *
  74. * CMSIS Peripheral Access Layer for MK82F25615
  75. */
  76. #ifndef _MK82F25615_H_
  77. #define _MK82F25615_H_ /**< Symbol preventing repeated inclusion */
  78. /** Memory map major version (memory maps with equal major version number are
  79. * compatible) */
  80. #define MCU_MEM_MAP_VERSION 0x0100U
  81. /** Memory map minor version */
  82. #define MCU_MEM_MAP_VERSION_MINOR 0x0002U
  83. /**
  84. * @brief Macro to calculate address of an aliased word in the peripheral
  85. * bitband area for a peripheral register and bit (bit band region 0x40000000 to
  86. * 0x400FFFFF).
  87. * @param Reg Register to access.
  88. * @param Bit Bit number to access.
  89. * @return Address of the aliased word in the peripheral bitband area.
  90. */
  91. #define BITBAND_REGADDR(Reg,Bit) (0x42000000u + (32u*((uint32_t)&(Reg) - (uint32_t)0x40000000u)) + (4u*((uint32_t)(Bit))))
  92. /**
  93. * @brief Macro to access a single bit of a peripheral register (bit band region
  94. * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  95. * be used for peripherals with 32bit access allowed.
  96. * @param Reg Register to access.
  97. * @param Bit Bit number to access.
  98. * @return Value of the targeted bit in the bit band region.
  99. */
  100. #define BITBAND_REG32(Reg,Bit) (*((uint32_t volatile*)(BITBAND_REGADDR((Reg),(Bit)))))
  101. #define BITBAND_REG(Reg,Bit) (BITBAND_REG32((Reg),(Bit)))
  102. /**
  103. * @brief Macro to access a single bit of a peripheral register (bit band region
  104. * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  105. * be used for peripherals with 16bit access allowed.
  106. * @param Reg Register to access.
  107. * @param Bit Bit number to access.
  108. * @return Value of the targeted bit in the bit band region.
  109. */
  110. #define BITBAND_REG16(Reg,Bit) (*((uint16_t volatile*)(BITBAND_REGADDR((Reg),(Bit)))))
  111. /**
  112. * @brief Macro to access a single bit of a peripheral register (bit band region
  113. * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  114. * be used for peripherals with 8bit access allowed.
  115. * @param Reg Register to access.
  116. * @param Bit Bit number to access.
  117. * @return Value of the targeted bit in the bit band region.
  118. */
  119. #define BITBAND_REG8(Reg,Bit) (*((uint8_t volatile*)(BITBAND_REGADDR((Reg),(Bit)))))
  120. /* ----------------------------------------------------------------------------
  121. -- Interrupt vector numbers
  122. ---------------------------------------------------------------------------- */
  123. /*!
  124. * @addtogroup Interrupt_vector_numbers Interrupt vector numbers
  125. * @{
  126. */
  127. /** Interrupt Number Definitions */
  128. #define NUMBER_OF_INT_VECTORS 123 /**< Number of interrupts in the Vector table */
  129. typedef enum IRQn {
  130. /* Auxiliary constants */
  131. NotAvail_IRQn = -128, /**< Not available device specific interrupt */
  132. /* Core interrupts */
  133. NonMaskableInt_IRQn = -14, /**< Non Maskable Interrupt */
  134. HardFault_IRQn = -13, /**< Cortex-M4 SV Hard Fault Interrupt */
  135. MemoryManagement_IRQn = -12, /**< Cortex-M4 Memory Management Interrupt */
  136. BusFault_IRQn = -11, /**< Cortex-M4 Bus Fault Interrupt */
  137. UsageFault_IRQn = -10, /**< Cortex-M4 Usage Fault Interrupt */
  138. SVCall_IRQn = -5, /**< Cortex-M4 SV Call Interrupt */
  139. DebugMonitor_IRQn = -4, /**< Cortex-M4 Debug Monitor Interrupt */
  140. PendSV_IRQn = -2, /**< Cortex-M4 Pend SV Interrupt */
  141. SysTick_IRQn = -1, /**< Cortex-M4 System Tick Interrupt */
  142. /* Device specific interrupts */
  143. DMA0_DMA16_IRQn = 0, /**< DMA channel 0,16 transfer complete */
  144. DMA1_DMA17_IRQn = 1, /**< DMA channel 1,17 transfer complete */
  145. DMA2_DMA18_IRQn = 2, /**< DMA channel 2,18 transfer complete */
  146. DMA3_DMA19_IRQn = 3, /**< DMA channel 3,19 transfer complete */
  147. DMA4_DMA20_IRQn = 4, /**< DMA channel 4,20 transfer complete */
  148. DMA5_DMA21_IRQn = 5, /**< DMA channel 5,21 transfer complete */
  149. DMA6_DMA22_IRQn = 6, /**< DMA channel 6,22 transfer complete */
  150. DMA7_DMA23_IRQn = 7, /**< DMA channel 7,23 transfer complete */
  151. DMA8_DMA24_IRQn = 8, /**< DMA channel 8,24 transfer complete */
  152. DMA9_DMA25_IRQn = 9, /**< DMA channel 9,25 transfer complete */
  153. DMA10_DMA26_IRQn = 10, /**< DMA channel 10,26 transfer complete */
  154. DMA11_DMA27_IRQn = 11, /**< DMA channel 11,27 transfer complete */
  155. DMA12_DMA28_IRQn = 12, /**< DMA channel 12,28 transfer complete */
  156. DMA13_DMA29_IRQn = 13, /**< DMA channel 13,29 transfer complete */
  157. DMA14_DMA30_IRQn = 14, /**< DMA channel 14,30 transfer complete */
  158. DMA15_DMA31_IRQn = 15, /**< DMA channel 15,31 transfer complete */
  159. DMA_Error_IRQn = 16, /**< DMA channel 0 - 31 error */
  160. MCM_IRQn = 17, /**< MCM normal interrupt */
  161. FTFA_IRQn = 18, /**< FTFA command complete */
  162. Read_Collision_IRQn = 19, /**< FTFA read collision */
  163. LVD_LVW_IRQn = 20, /**< PMC controller low-voltage detect, low-voltage warning */
  164. LLWU_IRQn = 21, /**< Low leakage wakeup unit */
  165. WDOG_EWM_IRQn = 22, /**< Single interrupt vector for WDOG and EWM */
  166. TRNG0_IRQn = 23, /**< True randon number generator */
  167. I2C0_IRQn = 24, /**< Inter-integrated circuit 0 */
  168. I2C1_IRQn = 25, /**< Inter-integrated circuit 1 */
  169. SPI0_IRQn = 26, /**< Serial peripheral Interface 0 */
  170. SPI1_IRQn = 27, /**< Serial peripheral Interface 1 */
  171. I2S0_Tx_IRQn = 28, /**< Integrated interchip sound 0 transmit interrupt */
  172. I2S0_Rx_IRQn = 29, /**< Integrated interchip sound 0 receive interrupt */
  173. LPUART0_IRQn = 30, /**< LPUART0 receive/transmit/error interrupt */
  174. LPUART1_IRQn = 31, /**< LPUART1 receive/transmit/error interrupt */
  175. LPUART2_IRQn = 32, /**< LPUART2 receive/transmit/error interrupt */
  176. LPUART3_IRQn = 33, /**< LPUART3 receive/transmit/error interrupt */
  177. LPUART4_IRQn = 34, /**< LPUART4 receive/transmit/error interrupt */
  178. Reserved51_IRQn = 35, /**< Reserved interrupt */
  179. Reserved52_IRQn = 36, /**< Reserved interrupt */
  180. EMVSIM0_IRQn = 37, /**< EMVSIM0 common interrupt */
  181. EMVSIM1_IRQn = 38, /**< EMVSIM1 common interrupt */
  182. ADC0_IRQn = 39, /**< Analog-to-digital converter 0 */
  183. CMP0_IRQn = 40, /**< Comparator 0 */
  184. CMP1_IRQn = 41, /**< Comparator 1 */
  185. FTM0_IRQn = 42, /**< FlexTimer module 0 fault, overflow and channels interrupt */
  186. FTM1_IRQn = 43, /**< FlexTimer module 1 fault, overflow and channels interrupt */
  187. FTM2_IRQn = 44, /**< FlexTimer module 2 fault, overflow and channels interrupt */
  188. CMT_IRQn = 45, /**< Carrier modulator transmitter */
  189. RTC_IRQn = 46, /**< Real time clock */
  190. RTC_Seconds_IRQn = 47, /**< Real time clock seconds */
  191. PIT0CH0_IRQn = 48, /**< Periodic interrupt timer 0 channel 0 */
  192. PIT0CH1_IRQn = 49, /**< Periodic interrupt timer 0 channel 1 */
  193. PIT0CH2_IRQn = 50, /**< Periodic interrupt timer 0 channel 2 */
  194. PIT0CH3_IRQn = 51, /**< Periodic interrupt timer 0 channel 3 */
  195. PDB0_IRQn = 52, /**< Programmable delay block */
  196. USB0_IRQn = 53, /**< USB OTG interrupt */
  197. USBDCD_IRQn = 54, /**< USB charger detect */
  198. Reserved71_IRQn = 55, /**< Reserved interrupt */
  199. DAC0_IRQn = 56, /**< Digital-to-analog converter 0 */
  200. MCG_IRQn = 57, /**< Multipurpose clock generator */
  201. LPTMR0_LPTMR1_IRQn = 58, /**< Single interrupt vector for Low Power Timer 0 and 1 */
  202. PORTA_IRQn = 59, /**< Port A pin detect interrupt */
  203. PORTB_IRQn = 60, /**< Port B pin detect interrupt */
  204. PORTC_IRQn = 61, /**< Port C pin detect interrupt */
  205. PORTD_IRQn = 62, /**< Port D pin detect interrupt */
  206. PORTE_IRQn = 63, /**< Port E pin detect interrupt */
  207. SWI_IRQn = 64, /**< Software interrupt */
  208. SPI2_IRQn = 65, /**< Serial peripheral Interface 2 */
  209. Reserved82_IRQn = 66, /**< Reserved interrupt */
  210. Reserved83_IRQn = 67, /**< Reserved interrupt */
  211. Reserved84_IRQn = 68, /**< Reserved interrupt */
  212. Reserved85_IRQn = 69, /**< Reserved interrupt */
  213. FLEXIO0_IRQn = 70, /**< FLEXIO0 */
  214. FTM3_IRQn = 71, /**< FlexTimer module 3 fault, overflow and channels interrupt */
  215. Reserved88_IRQn = 72, /**< Reserved interrupt */
  216. Reserved89_IRQn = 73, /**< Reserved interrupt */
  217. I2C2_IRQn = 74, /**< Inter-integrated circuit 2 */
  218. Reserved91_IRQn = 75, /**< Reserved interrupt */
  219. Reserved92_IRQn = 76, /**< Reserved interrupt */
  220. Reserved93_IRQn = 77, /**< Reserved interrupt */
  221. Reserved94_IRQn = 78, /**< Reserved interrupt */
  222. Reserved95_IRQn = 79, /**< Reserved interrupt */
  223. Reserved96_IRQn = 80, /**< Reserved interrupt */
  224. SDHC_IRQn = 81, /**< Secured digital host controller */
  225. Reserved98_IRQn = 82, /**< Reserved interrupt */
  226. Reserved99_IRQn = 83, /**< Reserved interrupt */
  227. Reserved100_IRQn = 84, /**< Reserved interrupt */
  228. Reserved101_IRQn = 85, /**< Reserved interrupt */
  229. Reserved102_IRQn = 86, /**< Reserved interrupt */
  230. TSI0_IRQn = 87, /**< Touch Sensing Input */
  231. TPM1_IRQn = 88, /**< TPM1 single interrupt vector for all sources */
  232. TPM2_IRQn = 89, /**< TPM2 single interrupt vector for all sources */
  233. Reserved106_IRQn = 90, /**< Reserved interrupt */
  234. I2C3_IRQn = 91, /**< Inter-integrated circuit 3 */
  235. Reserved108_IRQn = 92, /**< Reserved interrupt */
  236. Reserved109_IRQn = 93, /**< Reserved interrupt */
  237. Reserved110_IRQn = 94, /**< Reserved interrupt */
  238. Reserved111_IRQn = 95, /**< Reserved interrupt */
  239. Reserved112_IRQn = 96, /**< Reserved interrupt */
  240. Reserved113_IRQn = 97, /**< Reserved interrupt */
  241. Reserved114_IRQn = 98, /**< Reserved interrupt */
  242. Reserved115_IRQn = 99, /**< Reserved interrupt */
  243. QuadSPI0_IRQn = 100, /**< qspi */
  244. Reserved117_IRQn = 101, /**< Reserved interrupt */
  245. Reserved118_IRQn = 102, /**< Reserved interrupt */
  246. Reserved119_IRQn = 103, /**< Reserved interrupt */
  247. LTC0_IRQn = 104, /**< LP Trusted Cryptography */
  248. Reserved121_IRQn = 105, /**< Reserved interrupt */
  249. Reserved122_IRQn = 106 /**< Reserved interrupt */
  250. } IRQn_Type;
  251. /*!
  252. * @}
  253. */ /* end of group Interrupt_vector_numbers */
  254. /* ----------------------------------------------------------------------------
  255. -- Cortex M4 Core Configuration
  256. ---------------------------------------------------------------------------- */
  257. /*!
  258. * @addtogroup Cortex_Core_Configuration Cortex M4 Core Configuration
  259. * @{
  260. */
  261. #define __MPU_PRESENT 0 /**< Defines if an MPU is present or not */
  262. #define __NVIC_PRIO_BITS 4 /**< Number of priority bits implemented in the NVIC */
  263. #define __Vendor_SysTickConfig 0 /**< Vendor specific implementation of SysTickConfig is defined */
  264. #define __FPU_PRESENT 1 /**< Defines if an FPU is present or not */
  265. #include "core_cm4.h" /* Core Peripheral Access Layer */
  266. #include "system_MK82F25615.h" /* Device specific configuration file */
  267. /*!
  268. * @}
  269. */ /* end of group Cortex_Core_Configuration */
  270. /* ----------------------------------------------------------------------------
  271. -- Mapping Information
  272. ---------------------------------------------------------------------------- */
  273. /*!
  274. * @addtogroup Mapping_Information Mapping Information
  275. * @{
  276. */
  277. /** Mapping Information */
  278. /*!
  279. * @addtogroup edma_request
  280. * @{
  281. */
  282. /*******************************************************************************
  283. * Definitions
  284. ******************************************************************************/
  285. /*!
  286. * @brief Structure for the DMA hardware request
  287. *
  288. * Defines the structure for the DMA hardware request collections. The user can configure the
  289. * hardware request into DMAMUX to trigger the DMA transfer accordingly. The index
  290. * of the hardware request varies according to the to SoC.
  291. */
  292. typedef enum _dma_request_source
  293. {
  294. kDmaRequestMux0Disable = 0|0x100U, /**< DMAMUX TriggerDisabled. */
  295. kDmaRequestMux0TSI0 = 1|0x100U, /**< TSI0. */
  296. kDmaRequestMux0LPUART0Rx = 2|0x100U, /**< LPUART0 Receive. */
  297. kDmaRequestMux0LPUART0Tx = 3|0x100U, /**< LPUART0 Transmit. */
  298. kDmaRequestMux0LPUART1Rx = 4|0x100U, /**< LPUART1 Receive. */
  299. kDmaRequestMux0LPUART1Tx = 5|0x100U, /**< LPUART1 Transmit. */
  300. kDmaRequestMux0LPUART2Rx = 6|0x100U, /**< LPUART2 Receive. */
  301. kDmaRequestMux0LPUART2Tx = 7|0x100U, /**< LPUART2 Transmit. */
  302. kDmaRequestMux0LPUART3Rx = 8|0x100U, /**< LPUART3 Receive. */
  303. kDmaRequestMux0LPUART3Tx = 9|0x100U, /**< LPUART3 Transmit. */
  304. kDmaRequestMux0LPUART4Rx = 10|0x100U, /**< LPUART4 Receive. */
  305. kDmaRequestMux0LPUART4Tx = 11|0x100U, /**< LPUART4 Transmit. */
  306. kDmaRequestMux0I2S0Rx = 12|0x100U, /**< I2S0 Receive. */
  307. kDmaRequestMux0I2S0Tx = 13|0x100U, /**< I2S0 Transmit. */
  308. kDmaRequestMux0SPI0Rx = 14|0x100U, /**< SPI0 Receive. */
  309. kDmaRequestMux0SPI0Tx = 15|0x100U, /**< SPI0 Transmit. */
  310. kDmaRequestMux0SPI1Rx = 16|0x100U, /**< SPI1 Receive. */
  311. kDmaRequestMux0SPI1Tx = 17|0x100U, /**< SPI1 Transmit. */
  312. kDmaRequestMux0I2C0I2C3 = 18|0x100U, /**< I2C0 and I2C3. */
  313. kDmaRequestMux0I2C0 = 18|0x100U, /**< I2C0 and I2C3. */
  314. kDmaRequestMux0I2C3 = 18|0x100U, /**< I2C0 and I2C3. */
  315. kDmaRequestMux0I2C1I2C2 = 19|0x100U, /**< I2C1 and I2C2. */
  316. kDmaRequestMux0I2C1 = 19|0x100U, /**< I2C1 and I2C2. */
  317. kDmaRequestMux0I2C2 = 19|0x100U, /**< I2C1 and I2C2. */
  318. kDmaRequestMux0FTM0Channel0 = 20|0x100U, /**< FTM0 C0V. */
  319. kDmaRequestMux0FTM0Channel1 = 21|0x100U, /**< FTM0 C1V. */
  320. kDmaRequestMux0FTM0Channel2 = 22|0x100U, /**< FTM0 C2V. */
  321. kDmaRequestMux0FTM0Channel3 = 23|0x100U, /**< FTM0 C3V. */
  322. kDmaRequestMux0FTM0Channel4 = 24|0x100U, /**< FTM0 C4V. */
  323. kDmaRequestMux0FTM0Channel5 = 25|0x100U, /**< FTM0 C5V. */
  324. kDmaRequestMux0FTM0Channel6 = 26|0x100U, /**< FTM0 C6V. */
  325. kDmaRequestMux0FTM0Channel7 = 27|0x100U, /**< FTM0 C7V. */
  326. kDmaRequestMux0FTM1Channel0 = 28|0x100U, /**< FTM1 C0V. */
  327. kDmaRequestMux0FTM1Channel1 = 29|0x100U, /**< FTM1 C1V. */
  328. kDmaRequestMux0FTM2Channel0 = 30|0x100U, /**< FTM2 C0V. */
  329. kDmaRequestMux0FTM2Channel1 = 31|0x100U, /**< FTM2 C1V. */
  330. kDmaRequestMux0FTM3Channel0 = 32|0x100U, /**< FTM3 C0V. */
  331. kDmaRequestMux0FTM3Channel1 = 33|0x100U, /**< FTM3 C1V. */
  332. kDmaRequestMux0FTM3Channel2 = 34|0x100U, /**< FTM3 C2V. */
  333. kDmaRequestMux0FTM3Channel3 = 35|0x100U, /**< FTM3 C3V. */
  334. kDmaRequestMux0FTM3Channel4 = 36|0x100U, /**< FTM3 C4V. */
  335. kDmaRequestMux0FTM3Channel5 = 37|0x100U, /**< FTM3 C5V. */
  336. kDmaRequestMux0FTM3Channel6 = 38|0x100U, /**< FTM3 C6V. */
  337. kDmaRequestMux0FTM3Channel7 = 39|0x100U, /**< FTM3 C7V. */
  338. kDmaRequestMux0ADC0 = 40|0x100U, /**< ADC0. */
  339. kDmaRequestMux0Reserved41 = 41|0x100U, /**< Reserved41 */
  340. kDmaRequestMux0CMP0 = 42|0x100U, /**< CMP0. */
  341. kDmaRequestMux0CMP1 = 43|0x100U, /**< CMP1. */
  342. kDmaRequestMux0Reserved44 = 44|0x100U, /**< Reserved44 */
  343. kDmaRequestMux0DAC0 = 45|0x100U, /**< DAC0. */
  344. kDmaRequestMux0Reserved46 = 46|0x100U, /**< Reserved46 */
  345. kDmaRequestMux0CMT = 47|0x100U, /**< CMT. */
  346. kDmaRequestMux0PDB = 48|0x100U, /**< PDB0. */
  347. kDmaRequestMux0PortA = 49|0x100U, /**< PTA. */
  348. kDmaRequestMux0PortB = 50|0x100U, /**< PTB. */
  349. kDmaRequestMux0PortC = 51|0x100U, /**< PTC. */
  350. kDmaRequestMux0PortD = 52|0x100U, /**< PTD. */
  351. kDmaRequestMux0PortE = 53|0x100U, /**< PTE. */
  352. kDmaRequestMux0Reserved54 = 54|0x100U, /**< Reserved54 */
  353. kDmaRequestMux0Reserved55 = 55|0x100U, /**< Reserved55 */
  354. kDmaRequestMux0Reserved56 = 56|0x100U, /**< Reserved56 */
  355. kDmaRequestMux0Reserved57 = 57|0x100U, /**< Reserved57 */
  356. kDmaRequestMux0SPI2Rx = 58|0x100U, /**< SPI2 Receive. */
  357. kDmaRequestMux0SPI2Tx = 59|0x100U, /**< SPI2 Transmit. */
  358. kDmaRequestMux0AlwaysOn60 = 60|0x100U, /**< DMAMUX Always Enabled slot. */
  359. kDmaRequestMux0AlwaysOn61 = 61|0x100U, /**< DMAMUX Always Enabled slot. */
  360. kDmaRequestMux0AlwaysOn62 = 62|0x100U, /**< DMAMUX Always Enabled slot. */
  361. kDmaRequestMux0AlwaysOn63 = 63|0x100U, /**< DMAMUX Always Enabled slot. */
  362. kDmaRequestMux0Group1Disable = 0|0x200U, /**< DMAMUX TriggerDisabled. */
  363. kDmaRequestMux0Group1FlexIO0Channel0 = 1|0x200U, /**< FLEXIO0. */
  364. kDmaRequestMux0Group1FlexIO0Channel1 = 2|0x200U, /**< FLEXIO0. */
  365. kDmaRequestMux0Group1FlexIO0Channel2 = 3|0x200U, /**< FLEXIO0. */
  366. kDmaRequestMux0Group1FlexIO0Channel3 = 4|0x200U, /**< FLEXIO0. */
  367. kDmaRequestMux0Group1FlexIO0Channel4 = 5|0x200U, /**< FLEXIO0. */
  368. kDmaRequestMux0Group1FlexIO0Channel5 = 6|0x200U, /**< FLEXIO0. */
  369. kDmaRequestMux0Group1FlexIO0Channel6 = 7|0x200U, /**< FLEXIO0. */
  370. kDmaRequestMux0Group1FlexIO0Channel7 = 8|0x200U, /**< FLEXIO0. */
  371. kDmaRequestMux0Group1Reserved9 = 9|0x200U, /**< Reserved9 */
  372. kDmaRequestMux0Group1Reserved10 = 10|0x200U, /**< Reserved10 */
  373. kDmaRequestMux0Group1Reserved11 = 11|0x200U, /**< Reserved11 */
  374. kDmaRequestMux0Group1Reserved12 = 12|0x200U, /**< Reserved12 */
  375. kDmaRequestMux0Group1Reserved13 = 13|0x200U, /**< Reserved13 */
  376. kDmaRequestMux0Group1Reserved14 = 14|0x200U, /**< Reserved14 */
  377. kDmaRequestMux0Group1Reserved15 = 15|0x200U, /**< Reserved15 */
  378. kDmaRequestMux0Group1Reserved16 = 16|0x200U, /**< Reserved16 */
  379. kDmaRequestMux0Group1LTC0InputFIFO = 17|0x200U, /**< LTC0 Input FIFO. */
  380. kDmaRequestMux0Group1LTC0OutputFIFO = 18|0x200U, /**< LTC0 Output FIFO. */
  381. kDmaRequestMux0Group1LTC0PKHA = 19|0x200U, /**< LTC0 PKHA. */
  382. kDmaRequestMux0Group1EMVSIM0Rx = 20|0x200U, /**< EMVSIM0 Receive. */
  383. kDmaRequestMux0Group1EMVSIM0Tx = 21|0x200U, /**< EMVSIM0 Transmit. */
  384. kDmaRequestMux0Group1EMVSIM1Rx = 22|0x200U, /**< EMVSIM1 Receive. */
  385. kDmaRequestMux0Group1EMVSIM1Tx = 23|0x200U, /**< EMVSIM1 Transmit. */
  386. kDmaRequestMux0Group1QSPI0Rx = 24|0x200U, /**< QuadSPI0 Receive. */
  387. kDmaRequestMux0Group1QSPI0Tx = 25|0x200U, /**< QuadSPI0 Transmit. */
  388. kDmaRequestMux0Group1Reserved26 = 26|0x200U, /**< Reserved26 */
  389. kDmaRequestMux0Group1Reserved27 = 27|0x200U, /**< Reserved27 */
  390. kDmaRequestMux0Group1SPI0Rx = 28|0x200U, /**< SPI0 Receive. */
  391. kDmaRequestMux0Group1SPI0Tx = 29|0x200U, /**< SPI0 Transmit. */
  392. kDmaRequestMux0Group1SPI1Rx = 30|0x200U, /**< SPI1 Receive. */
  393. kDmaRequestMux0Group1SPI1Tx = 31|0x200U, /**< SPI1 Transmit. */
  394. kDmaRequestMux0Group1Reserved32 = 32|0x200U, /**< Reserved32 */
  395. kDmaRequestMux0Group1Reserved33 = 33|0x200U, /**< Reserved33 */
  396. kDmaRequestMux0Group1Reserved34 = 34|0x200U, /**< Reserved34 */
  397. kDmaRequestMux0Group1Reserved35 = 35|0x200U, /**< Reserved35 */
  398. kDmaRequestMux0Group1Reserved36 = 36|0x200U, /**< Reserved36 */
  399. kDmaRequestMux0Group1Reserved37 = 37|0x200U, /**< Reserved37 */
  400. kDmaRequestMux0Group1Reserved38 = 38|0x200U, /**< Reserved38 */
  401. kDmaRequestMux0Group1Reserved39 = 39|0x200U, /**< Reserved39 */
  402. kDmaRequestMux0Group1Reserved40 = 40|0x200U, /**< Reserved40 */
  403. kDmaRequestMux0Group1Reserved41 = 41|0x200U, /**< Reserved41 */
  404. kDmaRequestMux0Group1TPM1Channel0 = 42|0x200U, /**< TPM1 C0V. */
  405. kDmaRequestMux0Group1TPM1Channel1 = 43|0x200U, /**< TPM1 C1V. */
  406. kDmaRequestMux0Group1TPM2Channel0 = 44|0x200U, /**< TPM2 C0V. */
  407. kDmaRequestMux0Group1TPM2Channel1 = 45|0x200U, /**< TPM2 C1V. */
  408. kDmaRequestMux0Group1Reserved46 = 46|0x200U, /**< Reserved46 */
  409. kDmaRequestMux0Group1Reserved47 = 47|0x200U, /**< Reserved47 */
  410. kDmaRequestMux0Group1Reserved48 = 48|0x200U, /**< Reserved48 */
  411. kDmaRequestMux0Group1Reserved49 = 49|0x200U, /**< Reserved49 */
  412. kDmaRequestMux0Group1Reserved50 = 50|0x200U, /**< Reserved50 */
  413. kDmaRequestMux0Group1Reserved51 = 51|0x200U, /**< Reserved51 */
  414. kDmaRequestMux0Group1Reserved52 = 52|0x200U, /**< Reserved52 */
  415. kDmaRequestMux0Group1Reserved53 = 53|0x200U, /**< Reserved53 */
  416. kDmaRequestMux0Group1Reserved54 = 54|0x200U, /**< Reserved54 */
  417. kDmaRequestMux0Group1TPM1Overflow = 55|0x200U, /**< TPM1. */
  418. kDmaRequestMux0Group1TPM2Overflow = 56|0x200U, /**< TPM2. */
  419. kDmaRequestMux0Group1Reserved57 = 57|0x200U, /**< Reserved57 */
  420. kDmaRequestMux0Group1Reserved58 = 58|0x200U, /**< Reserved58 */
  421. kDmaRequestMux0Group1Reserved59 = 59|0x200U, /**< Reserved59 */
  422. kDmaRequestMux0Group1AlwaysOn60 = 60|0x200U, /**< DMAMUX Always Enabled slot. */
  423. kDmaRequestMux0Group1AlwaysOn61 = 61|0x200U, /**< DMAMUX Always Enabled slot. */
  424. kDmaRequestMux0Group1AlwaysOn62 = 62|0x200U, /**< DMAMUX Always Enabled slot. */
  425. kDmaRequestMux0Group1AlwaysOn63 = 63|0x200U, /**< DMAMUX Always Enabled slot. */
  426. } dma_request_source_t;
  427. /* @} */
  428. /*!
  429. * @}
  430. */ /* end of group Mapping_Information */
  431. /* ----------------------------------------------------------------------------
  432. -- Device Peripheral Access Layer
  433. ---------------------------------------------------------------------------- */
  434. /*!
  435. * @addtogroup Peripheral_access_layer Device Peripheral Access Layer
  436. * @{
  437. */
  438. /*
  439. ** Start of section using anonymous unions
  440. */
  441. #if defined(__ARMCC_VERSION)
  442. #if (__ARMCC_VERSION >= 6010050)
  443. #pragma clang diagnostic push
  444. #else
  445. #pragma push
  446. #pragma anon_unions
  447. #endif
  448. #elif defined(__CWCC__)
  449. #pragma push
  450. #pragma cpp_extensions on
  451. #elif defined(__GNUC__)
  452. /* anonymous unions are enabled by default */
  453. #elif defined(__IAR_SYSTEMS_ICC__)
  454. #pragma language=extended
  455. #else
  456. #error Not supported compiler type
  457. #endif
  458. /* ----------------------------------------------------------------------------
  459. -- ADC Peripheral Access Layer
  460. ---------------------------------------------------------------------------- */
  461. /*!
  462. * @addtogroup ADC_Peripheral_Access_Layer ADC Peripheral Access Layer
  463. * @{
  464. */
  465. /** ADC - Register Layout Typedef */
  466. typedef struct {
  467. __IO uint32_t SC1[2]; /**< ADC Status and Control Registers 1, array offset: 0x0, array step: 0x4 */
  468. __IO uint32_t CFG1; /**< ADC Configuration Register 1, offset: 0x8 */
  469. __IO uint32_t CFG2; /**< ADC Configuration Register 2, offset: 0xC */
  470. __I uint32_t R[2]; /**< ADC Data Result Register, array offset: 0x10, array step: 0x4 */
  471. __IO uint32_t CV1; /**< Compare Value Registers, offset: 0x18 */
  472. __IO uint32_t CV2; /**< Compare Value Registers, offset: 0x1C */
  473. __IO uint32_t SC2; /**< Status and Control Register 2, offset: 0x20 */
  474. __IO uint32_t SC3; /**< Status and Control Register 3, offset: 0x24 */
  475. __IO uint32_t OFS; /**< ADC Offset Correction Register, offset: 0x28 */
  476. __IO uint32_t PG; /**< ADC Plus-Side Gain Register, offset: 0x2C */
  477. __IO uint32_t MG; /**< ADC Minus-Side Gain Register, offset: 0x30 */
  478. __IO uint32_t CLPD; /**< ADC Plus-Side General Calibration Value Register, offset: 0x34 */
  479. __IO uint32_t CLPS; /**< ADC Plus-Side General Calibration Value Register, offset: 0x38 */
  480. __IO uint32_t CLP4; /**< ADC Plus-Side General Calibration Value Register, offset: 0x3C */
  481. __IO uint32_t CLP3; /**< ADC Plus-Side General Calibration Value Register, offset: 0x40 */
  482. __IO uint32_t CLP2; /**< ADC Plus-Side General Calibration Value Register, offset: 0x44 */
  483. __IO uint32_t CLP1; /**< ADC Plus-Side General Calibration Value Register, offset: 0x48 */
  484. __IO uint32_t CLP0; /**< ADC Plus-Side General Calibration Value Register, offset: 0x4C */
  485. uint8_t RESERVED_0[4];
  486. __IO uint32_t CLMD; /**< ADC Minus-Side General Calibration Value Register, offset: 0x54 */
  487. __IO uint32_t CLMS; /**< ADC Minus-Side General Calibration Value Register, offset: 0x58 */
  488. __IO uint32_t CLM4; /**< ADC Minus-Side General Calibration Value Register, offset: 0x5C */
  489. __IO uint32_t CLM3; /**< ADC Minus-Side General Calibration Value Register, offset: 0x60 */
  490. __IO uint32_t CLM2; /**< ADC Minus-Side General Calibration Value Register, offset: 0x64 */
  491. __IO uint32_t CLM1; /**< ADC Minus-Side General Calibration Value Register, offset: 0x68 */
  492. __IO uint32_t CLM0; /**< ADC Minus-Side General Calibration Value Register, offset: 0x6C */
  493. } ADC_Type;
  494. /* ----------------------------------------------------------------------------
  495. -- ADC Register Masks
  496. ---------------------------------------------------------------------------- */
  497. /*!
  498. * @addtogroup ADC_Register_Masks ADC Register Masks
  499. * @{
  500. */
  501. /*! @name SC1 - ADC Status and Control Registers 1 */
  502. #define ADC_SC1_ADCH_MASK (0x1FU)
  503. #define ADC_SC1_ADCH_SHIFT (0U)
  504. #define ADC_SC1_ADCH(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_ADCH_SHIFT)) & ADC_SC1_ADCH_MASK)
  505. #define ADC_SC1_DIFF_MASK (0x20U)
  506. #define ADC_SC1_DIFF_SHIFT (5U)
  507. #define ADC_SC1_DIFF(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_DIFF_SHIFT)) & ADC_SC1_DIFF_MASK)
  508. #define ADC_SC1_AIEN_MASK (0x40U)
  509. #define ADC_SC1_AIEN_SHIFT (6U)
  510. #define ADC_SC1_AIEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_AIEN_SHIFT)) & ADC_SC1_AIEN_MASK)
  511. #define ADC_SC1_COCO_MASK (0x80U)
  512. #define ADC_SC1_COCO_SHIFT (7U)
  513. #define ADC_SC1_COCO(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_COCO_SHIFT)) & ADC_SC1_COCO_MASK)
  514. /* The count of ADC_SC1 */
  515. #define ADC_SC1_COUNT (2U)
  516. /*! @name CFG1 - ADC Configuration Register 1 */
  517. #define ADC_CFG1_ADICLK_MASK (0x3U)
  518. #define ADC_CFG1_ADICLK_SHIFT (0U)
  519. #define ADC_CFG1_ADICLK(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADICLK_SHIFT)) & ADC_CFG1_ADICLK_MASK)
  520. #define ADC_CFG1_MODE_MASK (0xCU)
  521. #define ADC_CFG1_MODE_SHIFT (2U)
  522. #define ADC_CFG1_MODE(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_MODE_SHIFT)) & ADC_CFG1_MODE_MASK)
  523. #define ADC_CFG1_ADLSMP_MASK (0x10U)
  524. #define ADC_CFG1_ADLSMP_SHIFT (4U)
  525. #define ADC_CFG1_ADLSMP(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADLSMP_SHIFT)) & ADC_CFG1_ADLSMP_MASK)
  526. #define ADC_CFG1_ADIV_MASK (0x60U)
  527. #define ADC_CFG1_ADIV_SHIFT (5U)
  528. #define ADC_CFG1_ADIV(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADIV_SHIFT)) & ADC_CFG1_ADIV_MASK)
  529. #define ADC_CFG1_ADLPC_MASK (0x80U)
  530. #define ADC_CFG1_ADLPC_SHIFT (7U)
  531. #define ADC_CFG1_ADLPC(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADLPC_SHIFT)) & ADC_CFG1_ADLPC_MASK)
  532. /*! @name CFG2 - ADC Configuration Register 2 */
  533. #define ADC_CFG2_ADLSTS_MASK (0x3U)
  534. #define ADC_CFG2_ADLSTS_SHIFT (0U)
  535. #define ADC_CFG2_ADLSTS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_ADLSTS_SHIFT)) & ADC_CFG2_ADLSTS_MASK)
  536. #define ADC_CFG2_ADHSC_MASK (0x4U)
  537. #define ADC_CFG2_ADHSC_SHIFT (2U)
  538. #define ADC_CFG2_ADHSC(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_ADHSC_SHIFT)) & ADC_CFG2_ADHSC_MASK)
  539. #define ADC_CFG2_ADACKEN_MASK (0x8U)
  540. #define ADC_CFG2_ADACKEN_SHIFT (3U)
  541. #define ADC_CFG2_ADACKEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_ADACKEN_SHIFT)) & ADC_CFG2_ADACKEN_MASK)
  542. #define ADC_CFG2_MUXSEL_MASK (0x10U)
  543. #define ADC_CFG2_MUXSEL_SHIFT (4U)
  544. #define ADC_CFG2_MUXSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_MUXSEL_SHIFT)) & ADC_CFG2_MUXSEL_MASK)
  545. /*! @name R - ADC Data Result Register */
  546. #define ADC_R_D_MASK (0xFFFFU)
  547. #define ADC_R_D_SHIFT (0U)
  548. #define ADC_R_D(x) (((uint32_t)(((uint32_t)(x)) << ADC_R_D_SHIFT)) & ADC_R_D_MASK)
  549. /* The count of ADC_R */
  550. #define ADC_R_COUNT (2U)
  551. /*! @name CV1 - Compare Value Registers */
  552. #define ADC_CV1_CV_MASK (0xFFFFU)
  553. #define ADC_CV1_CV_SHIFT (0U)
  554. #define ADC_CV1_CV(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV1_CV_SHIFT)) & ADC_CV1_CV_MASK)
  555. /*! @name CV2 - Compare Value Registers */
  556. #define ADC_CV2_CV_MASK (0xFFFFU)
  557. #define ADC_CV2_CV_SHIFT (0U)
  558. #define ADC_CV2_CV(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV2_CV_SHIFT)) & ADC_CV2_CV_MASK)
  559. /*! @name SC2 - Status and Control Register 2 */
  560. #define ADC_SC2_REFSEL_MASK (0x3U)
  561. #define ADC_SC2_REFSEL_SHIFT (0U)
  562. #define ADC_SC2_REFSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_REFSEL_SHIFT)) & ADC_SC2_REFSEL_MASK)
  563. #define ADC_SC2_DMAEN_MASK (0x4U)
  564. #define ADC_SC2_DMAEN_SHIFT (2U)
  565. #define ADC_SC2_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_DMAEN_SHIFT)) & ADC_SC2_DMAEN_MASK)
  566. #define ADC_SC2_ACREN_MASK (0x8U)
  567. #define ADC_SC2_ACREN_SHIFT (3U)
  568. #define ADC_SC2_ACREN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ACREN_SHIFT)) & ADC_SC2_ACREN_MASK)
  569. #define ADC_SC2_ACFGT_MASK (0x10U)
  570. #define ADC_SC2_ACFGT_SHIFT (4U)
  571. #define ADC_SC2_ACFGT(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ACFGT_SHIFT)) & ADC_SC2_ACFGT_MASK)
  572. #define ADC_SC2_ACFE_MASK (0x20U)
  573. #define ADC_SC2_ACFE_SHIFT (5U)
  574. #define ADC_SC2_ACFE(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ACFE_SHIFT)) & ADC_SC2_ACFE_MASK)
  575. #define ADC_SC2_ADTRG_MASK (0x40U)
  576. #define ADC_SC2_ADTRG_SHIFT (6U)
  577. #define ADC_SC2_ADTRG(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ADTRG_SHIFT)) & ADC_SC2_ADTRG_MASK)
  578. #define ADC_SC2_ADACT_MASK (0x80U)
  579. #define ADC_SC2_ADACT_SHIFT (7U)
  580. #define ADC_SC2_ADACT(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ADACT_SHIFT)) & ADC_SC2_ADACT_MASK)
  581. /*! @name SC3 - Status and Control Register 3 */
  582. #define ADC_SC3_AVGS_MASK (0x3U)
  583. #define ADC_SC3_AVGS_SHIFT (0U)
  584. #define ADC_SC3_AVGS(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_AVGS_SHIFT)) & ADC_SC3_AVGS_MASK)
  585. #define ADC_SC3_AVGE_MASK (0x4U)
  586. #define ADC_SC3_AVGE_SHIFT (2U)
  587. #define ADC_SC3_AVGE(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_AVGE_SHIFT)) & ADC_SC3_AVGE_MASK)
  588. #define ADC_SC3_ADCO_MASK (0x8U)
  589. #define ADC_SC3_ADCO_SHIFT (3U)
  590. #define ADC_SC3_ADCO(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_ADCO_SHIFT)) & ADC_SC3_ADCO_MASK)
  591. #define ADC_SC3_CALF_MASK (0x40U)
  592. #define ADC_SC3_CALF_SHIFT (6U)
  593. #define ADC_SC3_CALF(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_CALF_SHIFT)) & ADC_SC3_CALF_MASK)
  594. #define ADC_SC3_CAL_MASK (0x80U)
  595. #define ADC_SC3_CAL_SHIFT (7U)
  596. #define ADC_SC3_CAL(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_CAL_SHIFT)) & ADC_SC3_CAL_MASK)
  597. /*! @name OFS - ADC Offset Correction Register */
  598. #define ADC_OFS_OFS_MASK (0xFFFFU)
  599. #define ADC_OFS_OFS_SHIFT (0U)
  600. #define ADC_OFS_OFS(x) (((uint32_t)(((uint32_t)(x)) << ADC_OFS_OFS_SHIFT)) & ADC_OFS_OFS_MASK)
  601. /*! @name PG - ADC Plus-Side Gain Register */
  602. #define ADC_PG_PG_MASK (0xFFFFU)
  603. #define ADC_PG_PG_SHIFT (0U)
  604. #define ADC_PG_PG(x) (((uint32_t)(((uint32_t)(x)) << ADC_PG_PG_SHIFT)) & ADC_PG_PG_MASK)
  605. /*! @name MG - ADC Minus-Side Gain Register */
  606. #define ADC_MG_MG_MASK (0xFFFFU)
  607. #define ADC_MG_MG_SHIFT (0U)
  608. #define ADC_MG_MG(x) (((uint32_t)(((uint32_t)(x)) << ADC_MG_MG_SHIFT)) & ADC_MG_MG_MASK)
  609. /*! @name CLPD - ADC Plus-Side General Calibration Value Register */
  610. #define ADC_CLPD_CLPD_MASK (0x3FU)
  611. #define ADC_CLPD_CLPD_SHIFT (0U)
  612. #define ADC_CLPD_CLPD(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLPD_CLPD_SHIFT)) & ADC_CLPD_CLPD_MASK)
  613. /*! @name CLPS - ADC Plus-Side General Calibration Value Register */
  614. #define ADC_CLPS_CLPS_MASK (0x3FU)
  615. #define ADC_CLPS_CLPS_SHIFT (0U)
  616. #define ADC_CLPS_CLPS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLPS_CLPS_SHIFT)) & ADC_CLPS_CLPS_MASK)
  617. /*! @name CLP4 - ADC Plus-Side General Calibration Value Register */
  618. #define ADC_CLP4_CLP4_MASK (0x3FFU)
  619. #define ADC_CLP4_CLP4_SHIFT (0U)
  620. #define ADC_CLP4_CLP4(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP4_CLP4_SHIFT)) & ADC_CLP4_CLP4_MASK)
  621. /*! @name CLP3 - ADC Plus-Side General Calibration Value Register */
  622. #define ADC_CLP3_CLP3_MASK (0x1FFU)
  623. #define ADC_CLP3_CLP3_SHIFT (0U)
  624. #define ADC_CLP3_CLP3(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP3_CLP3_SHIFT)) & ADC_CLP3_CLP3_MASK)
  625. /*! @name CLP2 - ADC Plus-Side General Calibration Value Register */
  626. #define ADC_CLP2_CLP2_MASK (0xFFU)
  627. #define ADC_CLP2_CLP2_SHIFT (0U)
  628. #define ADC_CLP2_CLP2(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP2_CLP2_SHIFT)) & ADC_CLP2_CLP2_MASK)
  629. /*! @name CLP1 - ADC Plus-Side General Calibration Value Register */
  630. #define ADC_CLP1_CLP1_MASK (0x7FU)
  631. #define ADC_CLP1_CLP1_SHIFT (0U)
  632. #define ADC_CLP1_CLP1(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP1_CLP1_SHIFT)) & ADC_CLP1_CLP1_MASK)
  633. /*! @name CLP0 - ADC Plus-Side General Calibration Value Register */
  634. #define ADC_CLP0_CLP0_MASK (0x3FU)
  635. #define ADC_CLP0_CLP0_SHIFT (0U)
  636. #define ADC_CLP0_CLP0(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP0_CLP0_SHIFT)) & ADC_CLP0_CLP0_MASK)
  637. /*! @name CLMD - ADC Minus-Side General Calibration Value Register */
  638. #define ADC_CLMD_CLMD_MASK (0x3FU)
  639. #define ADC_CLMD_CLMD_SHIFT (0U)
  640. #define ADC_CLMD_CLMD(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLMD_CLMD_SHIFT)) & ADC_CLMD_CLMD_MASK)
  641. /*! @name CLMS - ADC Minus-Side General Calibration Value Register */
  642. #define ADC_CLMS_CLMS_MASK (0x3FU)
  643. #define ADC_CLMS_CLMS_SHIFT (0U)
  644. #define ADC_CLMS_CLMS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLMS_CLMS_SHIFT)) & ADC_CLMS_CLMS_MASK)
  645. /*! @name CLM4 - ADC Minus-Side General Calibration Value Register */
  646. #define ADC_CLM4_CLM4_MASK (0x3FFU)
  647. #define ADC_CLM4_CLM4_SHIFT (0U)
  648. #define ADC_CLM4_CLM4(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM4_CLM4_SHIFT)) & ADC_CLM4_CLM4_MASK)
  649. /*! @name CLM3 - ADC Minus-Side General Calibration Value Register */
  650. #define ADC_CLM3_CLM3_MASK (0x1FFU)
  651. #define ADC_CLM3_CLM3_SHIFT (0U)
  652. #define ADC_CLM3_CLM3(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM3_CLM3_SHIFT)) & ADC_CLM3_CLM3_MASK)
  653. /*! @name CLM2 - ADC Minus-Side General Calibration Value Register */
  654. #define ADC_CLM2_CLM2_MASK (0xFFU)
  655. #define ADC_CLM2_CLM2_SHIFT (0U)
  656. #define ADC_CLM2_CLM2(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM2_CLM2_SHIFT)) & ADC_CLM2_CLM2_MASK)
  657. /*! @name CLM1 - ADC Minus-Side General Calibration Value Register */
  658. #define ADC_CLM1_CLM1_MASK (0x7FU)
  659. #define ADC_CLM1_CLM1_SHIFT (0U)
  660. #define ADC_CLM1_CLM1(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM1_CLM1_SHIFT)) & ADC_CLM1_CLM1_MASK)
  661. /*! @name CLM0 - ADC Minus-Side General Calibration Value Register */
  662. #define ADC_CLM0_CLM0_MASK (0x3FU)
  663. #define ADC_CLM0_CLM0_SHIFT (0U)
  664. #define ADC_CLM0_CLM0(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM0_CLM0_SHIFT)) & ADC_CLM0_CLM0_MASK)
  665. /*!
  666. * @}
  667. */ /* end of group ADC_Register_Masks */
  668. /* ADC - Peripheral instance base addresses */
  669. /** Peripheral ADC0 base address */
  670. #define ADC0_BASE (0x4003B000u)
  671. /** Peripheral ADC0 base pointer */
  672. #define ADC0 ((ADC_Type *)ADC0_BASE)
  673. /** Array initializer of ADC peripheral base addresses */
  674. #define ADC_BASE_ADDRS { ADC0_BASE }
  675. /** Array initializer of ADC peripheral base pointers */
  676. #define ADC_BASE_PTRS { ADC0 }
  677. /** Interrupt vectors for the ADC peripheral type */
  678. #define ADC_IRQS { ADC0_IRQn }
  679. /*!
  680. * @}
  681. */ /* end of group ADC_Peripheral_Access_Layer */
  682. /* ----------------------------------------------------------------------------
  683. -- AIPS Peripheral Access Layer
  684. ---------------------------------------------------------------------------- */
  685. /*!
  686. * @addtogroup AIPS_Peripheral_Access_Layer AIPS Peripheral Access Layer
  687. * @{
  688. */
  689. /** AIPS - Register Layout Typedef */
  690. typedef struct {
  691. __IO uint32_t MPRA; /**< Master Privilege Register A, offset: 0x0 */
  692. uint8_t RESERVED_0[28];
  693. __IO uint32_t PACRA; /**< Peripheral Access Control Register, offset: 0x20 */
  694. __IO uint32_t PACRB; /**< Peripheral Access Control Register, offset: 0x24 */
  695. __IO uint32_t PACRC; /**< Peripheral Access Control Register, offset: 0x28 */
  696. __IO uint32_t PACRD; /**< Peripheral Access Control Register, offset: 0x2C */
  697. uint8_t RESERVED_1[16];
  698. __IO uint32_t PACRE; /**< Peripheral Access Control Register, offset: 0x40 */
  699. __IO uint32_t PACRF; /**< Peripheral Access Control Register, offset: 0x44 */
  700. __IO uint32_t PACRG; /**< Peripheral Access Control Register, offset: 0x48 */
  701. __IO uint32_t PACRH; /**< Peripheral Access Control Register, offset: 0x4C */
  702. __IO uint32_t PACRI; /**< Peripheral Access Control Register, offset: 0x50 */
  703. __IO uint32_t PACRJ; /**< Peripheral Access Control Register, offset: 0x54 */
  704. __IO uint32_t PACRK; /**< Peripheral Access Control Register, offset: 0x58 */
  705. __IO uint32_t PACRL; /**< Peripheral Access Control Register, offset: 0x5C */
  706. __IO uint32_t PACRM; /**< Peripheral Access Control Register, offset: 0x60 */
  707. __IO uint32_t PACRN; /**< Peripheral Access Control Register, offset: 0x64 */
  708. __IO uint32_t PACRO; /**< Peripheral Access Control Register, offset: 0x68 */
  709. __IO uint32_t PACRP; /**< Peripheral Access Control Register, offset: 0x6C */
  710. } AIPS_Type;
  711. /* ----------------------------------------------------------------------------
  712. -- AIPS Register Masks
  713. ---------------------------------------------------------------------------- */
  714. /*!
  715. * @addtogroup AIPS_Register_Masks AIPS Register Masks
  716. * @{
  717. */
  718. /*! @name MPRA - Master Privilege Register A */
  719. #define AIPS_MPRA_MPL4_MASK (0x1000U)
  720. #define AIPS_MPRA_MPL4_SHIFT (12U)
  721. #define AIPS_MPRA_MPL4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL4_SHIFT)) & AIPS_MPRA_MPL4_MASK)
  722. #define AIPS_MPRA_MTW4_MASK (0x2000U)
  723. #define AIPS_MPRA_MTW4_SHIFT (13U)
  724. #define AIPS_MPRA_MTW4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW4_SHIFT)) & AIPS_MPRA_MTW4_MASK)
  725. #define AIPS_MPRA_MTR4_MASK (0x4000U)
  726. #define AIPS_MPRA_MTR4_SHIFT (14U)
  727. #define AIPS_MPRA_MTR4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR4_SHIFT)) & AIPS_MPRA_MTR4_MASK)
  728. #define AIPS_MPRA_MPL3_MASK (0x10000U)
  729. #define AIPS_MPRA_MPL3_SHIFT (16U)
  730. #define AIPS_MPRA_MPL3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL3_SHIFT)) & AIPS_MPRA_MPL3_MASK)
  731. #define AIPS_MPRA_MTW3_MASK (0x20000U)
  732. #define AIPS_MPRA_MTW3_SHIFT (17U)
  733. #define AIPS_MPRA_MTW3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW3_SHIFT)) & AIPS_MPRA_MTW3_MASK)
  734. #define AIPS_MPRA_MTR3_MASK (0x40000U)
  735. #define AIPS_MPRA_MTR3_SHIFT (18U)
  736. #define AIPS_MPRA_MTR3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR3_SHIFT)) & AIPS_MPRA_MTR3_MASK)
  737. #define AIPS_MPRA_MPL2_MASK (0x100000U)
  738. #define AIPS_MPRA_MPL2_SHIFT (20U)
  739. #define AIPS_MPRA_MPL2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL2_SHIFT)) & AIPS_MPRA_MPL2_MASK)
  740. #define AIPS_MPRA_MTW2_MASK (0x200000U)
  741. #define AIPS_MPRA_MTW2_SHIFT (21U)
  742. #define AIPS_MPRA_MTW2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW2_SHIFT)) & AIPS_MPRA_MTW2_MASK)
  743. #define AIPS_MPRA_MTR2_MASK (0x400000U)
  744. #define AIPS_MPRA_MTR2_SHIFT (22U)
  745. #define AIPS_MPRA_MTR2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR2_SHIFT)) & AIPS_MPRA_MTR2_MASK)
  746. #define AIPS_MPRA_MPL1_MASK (0x1000000U)
  747. #define AIPS_MPRA_MPL1_SHIFT (24U)
  748. #define AIPS_MPRA_MPL1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL1_SHIFT)) & AIPS_MPRA_MPL1_MASK)
  749. #define AIPS_MPRA_MTW1_MASK (0x2000000U)
  750. #define AIPS_MPRA_MTW1_SHIFT (25U)
  751. #define AIPS_MPRA_MTW1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW1_SHIFT)) & AIPS_MPRA_MTW1_MASK)
  752. #define AIPS_MPRA_MTR1_MASK (0x4000000U)
  753. #define AIPS_MPRA_MTR1_SHIFT (26U)
  754. #define AIPS_MPRA_MTR1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR1_SHIFT)) & AIPS_MPRA_MTR1_MASK)
  755. #define AIPS_MPRA_MPL0_MASK (0x10000000U)
  756. #define AIPS_MPRA_MPL0_SHIFT (28U)
  757. #define AIPS_MPRA_MPL0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL0_SHIFT)) & AIPS_MPRA_MPL0_MASK)
  758. #define AIPS_MPRA_MTW0_MASK (0x20000000U)
  759. #define AIPS_MPRA_MTW0_SHIFT (29U)
  760. #define AIPS_MPRA_MTW0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW0_SHIFT)) & AIPS_MPRA_MTW0_MASK)
  761. #define AIPS_MPRA_MTR0_MASK (0x40000000U)
  762. #define AIPS_MPRA_MTR0_SHIFT (30U)
  763. #define AIPS_MPRA_MTR0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR0_SHIFT)) & AIPS_MPRA_MTR0_MASK)
  764. /*! @name PACRA - Peripheral Access Control Register */
  765. #define AIPS_PACRA_TP7_MASK (0x1U)
  766. #define AIPS_PACRA_TP7_SHIFT (0U)
  767. #define AIPS_PACRA_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP7_SHIFT)) & AIPS_PACRA_TP7_MASK)
  768. #define AIPS_PACRA_WP7_MASK (0x2U)
  769. #define AIPS_PACRA_WP7_SHIFT (1U)
  770. #define AIPS_PACRA_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP7_SHIFT)) & AIPS_PACRA_WP7_MASK)
  771. #define AIPS_PACRA_SP7_MASK (0x4U)
  772. #define AIPS_PACRA_SP7_SHIFT (2U)
  773. #define AIPS_PACRA_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP7_SHIFT)) & AIPS_PACRA_SP7_MASK)
  774. #define AIPS_PACRA_TP6_MASK (0x10U)
  775. #define AIPS_PACRA_TP6_SHIFT (4U)
  776. #define AIPS_PACRA_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP6_SHIFT)) & AIPS_PACRA_TP6_MASK)
  777. #define AIPS_PACRA_WP6_MASK (0x20U)
  778. #define AIPS_PACRA_WP6_SHIFT (5U)
  779. #define AIPS_PACRA_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP6_SHIFT)) & AIPS_PACRA_WP6_MASK)
  780. #define AIPS_PACRA_SP6_MASK (0x40U)
  781. #define AIPS_PACRA_SP6_SHIFT (6U)
  782. #define AIPS_PACRA_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP6_SHIFT)) & AIPS_PACRA_SP6_MASK)
  783. #define AIPS_PACRA_TP5_MASK (0x100U)
  784. #define AIPS_PACRA_TP5_SHIFT (8U)
  785. #define AIPS_PACRA_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP5_SHIFT)) & AIPS_PACRA_TP5_MASK)
  786. #define AIPS_PACRA_WP5_MASK (0x200U)
  787. #define AIPS_PACRA_WP5_SHIFT (9U)
  788. #define AIPS_PACRA_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP5_SHIFT)) & AIPS_PACRA_WP5_MASK)
  789. #define AIPS_PACRA_SP5_MASK (0x400U)
  790. #define AIPS_PACRA_SP5_SHIFT (10U)
  791. #define AIPS_PACRA_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP5_SHIFT)) & AIPS_PACRA_SP5_MASK)
  792. #define AIPS_PACRA_TP4_MASK (0x1000U)
  793. #define AIPS_PACRA_TP4_SHIFT (12U)
  794. #define AIPS_PACRA_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP4_SHIFT)) & AIPS_PACRA_TP4_MASK)
  795. #define AIPS_PACRA_WP4_MASK (0x2000U)
  796. #define AIPS_PACRA_WP4_SHIFT (13U)
  797. #define AIPS_PACRA_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP4_SHIFT)) & AIPS_PACRA_WP4_MASK)
  798. #define AIPS_PACRA_SP4_MASK (0x4000U)
  799. #define AIPS_PACRA_SP4_SHIFT (14U)
  800. #define AIPS_PACRA_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP4_SHIFT)) & AIPS_PACRA_SP4_MASK)
  801. #define AIPS_PACRA_TP3_MASK (0x10000U)
  802. #define AIPS_PACRA_TP3_SHIFT (16U)
  803. #define AIPS_PACRA_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP3_SHIFT)) & AIPS_PACRA_TP3_MASK)
  804. #define AIPS_PACRA_WP3_MASK (0x20000U)
  805. #define AIPS_PACRA_WP3_SHIFT (17U)
  806. #define AIPS_PACRA_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP3_SHIFT)) & AIPS_PACRA_WP3_MASK)
  807. #define AIPS_PACRA_SP3_MASK (0x40000U)
  808. #define AIPS_PACRA_SP3_SHIFT (18U)
  809. #define AIPS_PACRA_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP3_SHIFT)) & AIPS_PACRA_SP3_MASK)
  810. #define AIPS_PACRA_TP2_MASK (0x100000U)
  811. #define AIPS_PACRA_TP2_SHIFT (20U)
  812. #define AIPS_PACRA_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP2_SHIFT)) & AIPS_PACRA_TP2_MASK)
  813. #define AIPS_PACRA_WP2_MASK (0x200000U)
  814. #define AIPS_PACRA_WP2_SHIFT (21U)
  815. #define AIPS_PACRA_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP2_SHIFT)) & AIPS_PACRA_WP2_MASK)
  816. #define AIPS_PACRA_SP2_MASK (0x400000U)
  817. #define AIPS_PACRA_SP2_SHIFT (22U)
  818. #define AIPS_PACRA_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP2_SHIFT)) & AIPS_PACRA_SP2_MASK)
  819. #define AIPS_PACRA_TP1_MASK (0x1000000U)
  820. #define AIPS_PACRA_TP1_SHIFT (24U)
  821. #define AIPS_PACRA_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP1_SHIFT)) & AIPS_PACRA_TP1_MASK)
  822. #define AIPS_PACRA_WP1_MASK (0x2000000U)
  823. #define AIPS_PACRA_WP1_SHIFT (25U)
  824. #define AIPS_PACRA_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP1_SHIFT)) & AIPS_PACRA_WP1_MASK)
  825. #define AIPS_PACRA_SP1_MASK (0x4000000U)
  826. #define AIPS_PACRA_SP1_SHIFT (26U)
  827. #define AIPS_PACRA_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP1_SHIFT)) & AIPS_PACRA_SP1_MASK)
  828. #define AIPS_PACRA_TP0_MASK (0x10000000U)
  829. #define AIPS_PACRA_TP0_SHIFT (28U)
  830. #define AIPS_PACRA_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP0_SHIFT)) & AIPS_PACRA_TP0_MASK)
  831. #define AIPS_PACRA_WP0_MASK (0x20000000U)
  832. #define AIPS_PACRA_WP0_SHIFT (29U)
  833. #define AIPS_PACRA_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP0_SHIFT)) & AIPS_PACRA_WP0_MASK)
  834. #define AIPS_PACRA_SP0_MASK (0x40000000U)
  835. #define AIPS_PACRA_SP0_SHIFT (30U)
  836. #define AIPS_PACRA_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP0_SHIFT)) & AIPS_PACRA_SP0_MASK)
  837. /*! @name PACRB - Peripheral Access Control Register */
  838. #define AIPS_PACRB_TP7_MASK (0x1U)
  839. #define AIPS_PACRB_TP7_SHIFT (0U)
  840. #define AIPS_PACRB_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP7_SHIFT)) & AIPS_PACRB_TP7_MASK)
  841. #define AIPS_PACRB_WP7_MASK (0x2U)
  842. #define AIPS_PACRB_WP7_SHIFT (1U)
  843. #define AIPS_PACRB_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP7_SHIFT)) & AIPS_PACRB_WP7_MASK)
  844. #define AIPS_PACRB_SP7_MASK (0x4U)
  845. #define AIPS_PACRB_SP7_SHIFT (2U)
  846. #define AIPS_PACRB_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP7_SHIFT)) & AIPS_PACRB_SP7_MASK)
  847. #define AIPS_PACRB_TP6_MASK (0x10U)
  848. #define AIPS_PACRB_TP6_SHIFT (4U)
  849. #define AIPS_PACRB_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP6_SHIFT)) & AIPS_PACRB_TP6_MASK)
  850. #define AIPS_PACRB_WP6_MASK (0x20U)
  851. #define AIPS_PACRB_WP6_SHIFT (5U)
  852. #define AIPS_PACRB_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP6_SHIFT)) & AIPS_PACRB_WP6_MASK)
  853. #define AIPS_PACRB_SP6_MASK (0x40U)
  854. #define AIPS_PACRB_SP6_SHIFT (6U)
  855. #define AIPS_PACRB_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP6_SHIFT)) & AIPS_PACRB_SP6_MASK)
  856. #define AIPS_PACRB_TP5_MASK (0x100U)
  857. #define AIPS_PACRB_TP5_SHIFT (8U)
  858. #define AIPS_PACRB_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP5_SHIFT)) & AIPS_PACRB_TP5_MASK)
  859. #define AIPS_PACRB_WP5_MASK (0x200U)
  860. #define AIPS_PACRB_WP5_SHIFT (9U)
  861. #define AIPS_PACRB_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP5_SHIFT)) & AIPS_PACRB_WP5_MASK)
  862. #define AIPS_PACRB_SP5_MASK (0x400U)
  863. #define AIPS_PACRB_SP5_SHIFT (10U)
  864. #define AIPS_PACRB_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP5_SHIFT)) & AIPS_PACRB_SP5_MASK)
  865. #define AIPS_PACRB_TP4_MASK (0x1000U)
  866. #define AIPS_PACRB_TP4_SHIFT (12U)
  867. #define AIPS_PACRB_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP4_SHIFT)) & AIPS_PACRB_TP4_MASK)
  868. #define AIPS_PACRB_WP4_MASK (0x2000U)
  869. #define AIPS_PACRB_WP4_SHIFT (13U)
  870. #define AIPS_PACRB_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP4_SHIFT)) & AIPS_PACRB_WP4_MASK)
  871. #define AIPS_PACRB_SP4_MASK (0x4000U)
  872. #define AIPS_PACRB_SP4_SHIFT (14U)
  873. #define AIPS_PACRB_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP4_SHIFT)) & AIPS_PACRB_SP4_MASK)
  874. #define AIPS_PACRB_TP3_MASK (0x10000U)
  875. #define AIPS_PACRB_TP3_SHIFT (16U)
  876. #define AIPS_PACRB_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP3_SHIFT)) & AIPS_PACRB_TP3_MASK)
  877. #define AIPS_PACRB_WP3_MASK (0x20000U)
  878. #define AIPS_PACRB_WP3_SHIFT (17U)
  879. #define AIPS_PACRB_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP3_SHIFT)) & AIPS_PACRB_WP3_MASK)
  880. #define AIPS_PACRB_SP3_MASK (0x40000U)
  881. #define AIPS_PACRB_SP3_SHIFT (18U)
  882. #define AIPS_PACRB_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP3_SHIFT)) & AIPS_PACRB_SP3_MASK)
  883. #define AIPS_PACRB_TP2_MASK (0x100000U)
  884. #define AIPS_PACRB_TP2_SHIFT (20U)
  885. #define AIPS_PACRB_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP2_SHIFT)) & AIPS_PACRB_TP2_MASK)
  886. #define AIPS_PACRB_WP2_MASK (0x200000U)
  887. #define AIPS_PACRB_WP2_SHIFT (21U)
  888. #define AIPS_PACRB_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP2_SHIFT)) & AIPS_PACRB_WP2_MASK)
  889. #define AIPS_PACRB_SP2_MASK (0x400000U)
  890. #define AIPS_PACRB_SP2_SHIFT (22U)
  891. #define AIPS_PACRB_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP2_SHIFT)) & AIPS_PACRB_SP2_MASK)
  892. #define AIPS_PACRB_TP1_MASK (0x1000000U)
  893. #define AIPS_PACRB_TP1_SHIFT (24U)
  894. #define AIPS_PACRB_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP1_SHIFT)) & AIPS_PACRB_TP1_MASK)
  895. #define AIPS_PACRB_WP1_MASK (0x2000000U)
  896. #define AIPS_PACRB_WP1_SHIFT (25U)
  897. #define AIPS_PACRB_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP1_SHIFT)) & AIPS_PACRB_WP1_MASK)
  898. #define AIPS_PACRB_SP1_MASK (0x4000000U)
  899. #define AIPS_PACRB_SP1_SHIFT (26U)
  900. #define AIPS_PACRB_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP1_SHIFT)) & AIPS_PACRB_SP1_MASK)
  901. #define AIPS_PACRB_TP0_MASK (0x10000000U)
  902. #define AIPS_PACRB_TP0_SHIFT (28U)
  903. #define AIPS_PACRB_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP0_SHIFT)) & AIPS_PACRB_TP0_MASK)
  904. #define AIPS_PACRB_WP0_MASK (0x20000000U)
  905. #define AIPS_PACRB_WP0_SHIFT (29U)
  906. #define AIPS_PACRB_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP0_SHIFT)) & AIPS_PACRB_WP0_MASK)
  907. #define AIPS_PACRB_SP0_MASK (0x40000000U)
  908. #define AIPS_PACRB_SP0_SHIFT (30U)
  909. #define AIPS_PACRB_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP0_SHIFT)) & AIPS_PACRB_SP0_MASK)
  910. /*! @name PACRC - Peripheral Access Control Register */
  911. #define AIPS_PACRC_TP7_MASK (0x1U)
  912. #define AIPS_PACRC_TP7_SHIFT (0U)
  913. #define AIPS_PACRC_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP7_SHIFT)) & AIPS_PACRC_TP7_MASK)
  914. #define AIPS_PACRC_WP7_MASK (0x2U)
  915. #define AIPS_PACRC_WP7_SHIFT (1U)
  916. #define AIPS_PACRC_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP7_SHIFT)) & AIPS_PACRC_WP7_MASK)
  917. #define AIPS_PACRC_SP7_MASK (0x4U)
  918. #define AIPS_PACRC_SP7_SHIFT (2U)
  919. #define AIPS_PACRC_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP7_SHIFT)) & AIPS_PACRC_SP7_MASK)
  920. #define AIPS_PACRC_TP6_MASK (0x10U)
  921. #define AIPS_PACRC_TP6_SHIFT (4U)
  922. #define AIPS_PACRC_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP6_SHIFT)) & AIPS_PACRC_TP6_MASK)
  923. #define AIPS_PACRC_WP6_MASK (0x20U)
  924. #define AIPS_PACRC_WP6_SHIFT (5U)
  925. #define AIPS_PACRC_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP6_SHIFT)) & AIPS_PACRC_WP6_MASK)
  926. #define AIPS_PACRC_SP6_MASK (0x40U)
  927. #define AIPS_PACRC_SP6_SHIFT (6U)
  928. #define AIPS_PACRC_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP6_SHIFT)) & AIPS_PACRC_SP6_MASK)
  929. #define AIPS_PACRC_TP5_MASK (0x100U)
  930. #define AIPS_PACRC_TP5_SHIFT (8U)
  931. #define AIPS_PACRC_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP5_SHIFT)) & AIPS_PACRC_TP5_MASK)
  932. #define AIPS_PACRC_WP5_MASK (0x200U)
  933. #define AIPS_PACRC_WP5_SHIFT (9U)
  934. #define AIPS_PACRC_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP5_SHIFT)) & AIPS_PACRC_WP5_MASK)
  935. #define AIPS_PACRC_SP5_MASK (0x400U)
  936. #define AIPS_PACRC_SP5_SHIFT (10U)
  937. #define AIPS_PACRC_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP5_SHIFT)) & AIPS_PACRC_SP5_MASK)
  938. #define AIPS_PACRC_TP4_MASK (0x1000U)
  939. #define AIPS_PACRC_TP4_SHIFT (12U)
  940. #define AIPS_PACRC_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP4_SHIFT)) & AIPS_PACRC_TP4_MASK)
  941. #define AIPS_PACRC_WP4_MASK (0x2000U)
  942. #define AIPS_PACRC_WP4_SHIFT (13U)
  943. #define AIPS_PACRC_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP4_SHIFT)) & AIPS_PACRC_WP4_MASK)
  944. #define AIPS_PACRC_SP4_MASK (0x4000U)
  945. #define AIPS_PACRC_SP4_SHIFT (14U)
  946. #define AIPS_PACRC_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP4_SHIFT)) & AIPS_PACRC_SP4_MASK)
  947. #define AIPS_PACRC_TP3_MASK (0x10000U)
  948. #define AIPS_PACRC_TP3_SHIFT (16U)
  949. #define AIPS_PACRC_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP3_SHIFT)) & AIPS_PACRC_TP3_MASK)
  950. #define AIPS_PACRC_WP3_MASK (0x20000U)
  951. #define AIPS_PACRC_WP3_SHIFT (17U)
  952. #define AIPS_PACRC_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP3_SHIFT)) & AIPS_PACRC_WP3_MASK)
  953. #define AIPS_PACRC_SP3_MASK (0x40000U)
  954. #define AIPS_PACRC_SP3_SHIFT (18U)
  955. #define AIPS_PACRC_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP3_SHIFT)) & AIPS_PACRC_SP3_MASK)
  956. #define AIPS_PACRC_TP2_MASK (0x100000U)
  957. #define AIPS_PACRC_TP2_SHIFT (20U)
  958. #define AIPS_PACRC_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP2_SHIFT)) & AIPS_PACRC_TP2_MASK)
  959. #define AIPS_PACRC_WP2_MASK (0x200000U)
  960. #define AIPS_PACRC_WP2_SHIFT (21U)
  961. #define AIPS_PACRC_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP2_SHIFT)) & AIPS_PACRC_WP2_MASK)
  962. #define AIPS_PACRC_SP2_MASK (0x400000U)
  963. #define AIPS_PACRC_SP2_SHIFT (22U)
  964. #define AIPS_PACRC_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP2_SHIFT)) & AIPS_PACRC_SP2_MASK)
  965. #define AIPS_PACRC_TP1_MASK (0x1000000U)
  966. #define AIPS_PACRC_TP1_SHIFT (24U)
  967. #define AIPS_PACRC_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP1_SHIFT)) & AIPS_PACRC_TP1_MASK)
  968. #define AIPS_PACRC_WP1_MASK (0x2000000U)
  969. #define AIPS_PACRC_WP1_SHIFT (25U)
  970. #define AIPS_PACRC_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP1_SHIFT)) & AIPS_PACRC_WP1_MASK)
  971. #define AIPS_PACRC_SP1_MASK (0x4000000U)
  972. #define AIPS_PACRC_SP1_SHIFT (26U)
  973. #define AIPS_PACRC_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP1_SHIFT)) & AIPS_PACRC_SP1_MASK)
  974. #define AIPS_PACRC_TP0_MASK (0x10000000U)
  975. #define AIPS_PACRC_TP0_SHIFT (28U)
  976. #define AIPS_PACRC_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP0_SHIFT)) & AIPS_PACRC_TP0_MASK)
  977. #define AIPS_PACRC_WP0_MASK (0x20000000U)
  978. #define AIPS_PACRC_WP0_SHIFT (29U)
  979. #define AIPS_PACRC_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP0_SHIFT)) & AIPS_PACRC_WP0_MASK)
  980. #define AIPS_PACRC_SP0_MASK (0x40000000U)
  981. #define AIPS_PACRC_SP0_SHIFT (30U)
  982. #define AIPS_PACRC_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP0_SHIFT)) & AIPS_PACRC_SP0_MASK)
  983. /*! @name PACRD - Peripheral Access Control Register */
  984. #define AIPS_PACRD_TP7_MASK (0x1U)
  985. #define AIPS_PACRD_TP7_SHIFT (0U)
  986. #define AIPS_PACRD_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP7_SHIFT)) & AIPS_PACRD_TP7_MASK)
  987. #define AIPS_PACRD_WP7_MASK (0x2U)
  988. #define AIPS_PACRD_WP7_SHIFT (1U)
  989. #define AIPS_PACRD_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP7_SHIFT)) & AIPS_PACRD_WP7_MASK)
  990. #define AIPS_PACRD_SP7_MASK (0x4U)
  991. #define AIPS_PACRD_SP7_SHIFT (2U)
  992. #define AIPS_PACRD_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP7_SHIFT)) & AIPS_PACRD_SP7_MASK)
  993. #define AIPS_PACRD_TP6_MASK (0x10U)
  994. #define AIPS_PACRD_TP6_SHIFT (4U)
  995. #define AIPS_PACRD_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP6_SHIFT)) & AIPS_PACRD_TP6_MASK)
  996. #define AIPS_PACRD_WP6_MASK (0x20U)
  997. #define AIPS_PACRD_WP6_SHIFT (5U)
  998. #define AIPS_PACRD_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP6_SHIFT)) & AIPS_PACRD_WP6_MASK)
  999. #define AIPS_PACRD_SP6_MASK (0x40U)
  1000. #define AIPS_PACRD_SP6_SHIFT (6U)
  1001. #define AIPS_PACRD_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP6_SHIFT)) & AIPS_PACRD_SP6_MASK)
  1002. #define AIPS_PACRD_TP5_MASK (0x100U)
  1003. #define AIPS_PACRD_TP5_SHIFT (8U)
  1004. #define AIPS_PACRD_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP5_SHIFT)) & AIPS_PACRD_TP5_MASK)
  1005. #define AIPS_PACRD_WP5_MASK (0x200U)
  1006. #define AIPS_PACRD_WP5_SHIFT (9U)
  1007. #define AIPS_PACRD_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP5_SHIFT)) & AIPS_PACRD_WP5_MASK)
  1008. #define AIPS_PACRD_SP5_MASK (0x400U)
  1009. #define AIPS_PACRD_SP5_SHIFT (10U)
  1010. #define AIPS_PACRD_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP5_SHIFT)) & AIPS_PACRD_SP5_MASK)
  1011. #define AIPS_PACRD_TP4_MASK (0x1000U)
  1012. #define AIPS_PACRD_TP4_SHIFT (12U)
  1013. #define AIPS_PACRD_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP4_SHIFT)) & AIPS_PACRD_TP4_MASK)
  1014. #define AIPS_PACRD_WP4_MASK (0x2000U)
  1015. #define AIPS_PACRD_WP4_SHIFT (13U)
  1016. #define AIPS_PACRD_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP4_SHIFT)) & AIPS_PACRD_WP4_MASK)
  1017. #define AIPS_PACRD_SP4_MASK (0x4000U)
  1018. #define AIPS_PACRD_SP4_SHIFT (14U)
  1019. #define AIPS_PACRD_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP4_SHIFT)) & AIPS_PACRD_SP4_MASK)
  1020. #define AIPS_PACRD_TP3_MASK (0x10000U)
  1021. #define AIPS_PACRD_TP3_SHIFT (16U)
  1022. #define AIPS_PACRD_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP3_SHIFT)) & AIPS_PACRD_TP3_MASK)
  1023. #define AIPS_PACRD_WP3_MASK (0x20000U)
  1024. #define AIPS_PACRD_WP3_SHIFT (17U)
  1025. #define AIPS_PACRD_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP3_SHIFT)) & AIPS_PACRD_WP3_MASK)
  1026. #define AIPS_PACRD_SP3_MASK (0x40000U)
  1027. #define AIPS_PACRD_SP3_SHIFT (18U)
  1028. #define AIPS_PACRD_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP3_SHIFT)) & AIPS_PACRD_SP3_MASK)
  1029. #define AIPS_PACRD_TP2_MASK (0x100000U)
  1030. #define AIPS_PACRD_TP2_SHIFT (20U)
  1031. #define AIPS_PACRD_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP2_SHIFT)) & AIPS_PACRD_TP2_MASK)
  1032. #define AIPS_PACRD_WP2_MASK (0x200000U)
  1033. #define AIPS_PACRD_WP2_SHIFT (21U)
  1034. #define AIPS_PACRD_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP2_SHIFT)) & AIPS_PACRD_WP2_MASK)
  1035. #define AIPS_PACRD_SP2_MASK (0x400000U)
  1036. #define AIPS_PACRD_SP2_SHIFT (22U)
  1037. #define AIPS_PACRD_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP2_SHIFT)) & AIPS_PACRD_SP2_MASK)
  1038. #define AIPS_PACRD_TP1_MASK (0x1000000U)
  1039. #define AIPS_PACRD_TP1_SHIFT (24U)
  1040. #define AIPS_PACRD_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP1_SHIFT)) & AIPS_PACRD_TP1_MASK)
  1041. #define AIPS_PACRD_WP1_MASK (0x2000000U)
  1042. #define AIPS_PACRD_WP1_SHIFT (25U)
  1043. #define AIPS_PACRD_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP1_SHIFT)) & AIPS_PACRD_WP1_MASK)
  1044. #define AIPS_PACRD_SP1_MASK (0x4000000U)
  1045. #define AIPS_PACRD_SP1_SHIFT (26U)
  1046. #define AIPS_PACRD_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP1_SHIFT)) & AIPS_PACRD_SP1_MASK)
  1047. #define AIPS_PACRD_TP0_MASK (0x10000000U)
  1048. #define AIPS_PACRD_TP0_SHIFT (28U)
  1049. #define AIPS_PACRD_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP0_SHIFT)) & AIPS_PACRD_TP0_MASK)
  1050. #define AIPS_PACRD_WP0_MASK (0x20000000U)
  1051. #define AIPS_PACRD_WP0_SHIFT (29U)
  1052. #define AIPS_PACRD_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP0_SHIFT)) & AIPS_PACRD_WP0_MASK)
  1053. #define AIPS_PACRD_SP0_MASK (0x40000000U)
  1054. #define AIPS_PACRD_SP0_SHIFT (30U)
  1055. #define AIPS_PACRD_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP0_SHIFT)) & AIPS_PACRD_SP0_MASK)
  1056. /*! @name PACRE - Peripheral Access Control Register */
  1057. #define AIPS_PACRE_TP7_MASK (0x1U)
  1058. #define AIPS_PACRE_TP7_SHIFT (0U)
  1059. #define AIPS_PACRE_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP7_SHIFT)) & AIPS_PACRE_TP7_MASK)
  1060. #define AIPS_PACRE_WP7_MASK (0x2U)
  1061. #define AIPS_PACRE_WP7_SHIFT (1U)
  1062. #define AIPS_PACRE_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP7_SHIFT)) & AIPS_PACRE_WP7_MASK)
  1063. #define AIPS_PACRE_SP7_MASK (0x4U)
  1064. #define AIPS_PACRE_SP7_SHIFT (2U)
  1065. #define AIPS_PACRE_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP7_SHIFT)) & AIPS_PACRE_SP7_MASK)
  1066. #define AIPS_PACRE_TP6_MASK (0x10U)
  1067. #define AIPS_PACRE_TP6_SHIFT (4U)
  1068. #define AIPS_PACRE_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP6_SHIFT)) & AIPS_PACRE_TP6_MASK)
  1069. #define AIPS_PACRE_WP6_MASK (0x20U)
  1070. #define AIPS_PACRE_WP6_SHIFT (5U)
  1071. #define AIPS_PACRE_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP6_SHIFT)) & AIPS_PACRE_WP6_MASK)
  1072. #define AIPS_PACRE_SP6_MASK (0x40U)
  1073. #define AIPS_PACRE_SP6_SHIFT (6U)
  1074. #define AIPS_PACRE_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP6_SHIFT)) & AIPS_PACRE_SP6_MASK)
  1075. #define AIPS_PACRE_TP5_MASK (0x100U)
  1076. #define AIPS_PACRE_TP5_SHIFT (8U)
  1077. #define AIPS_PACRE_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP5_SHIFT)) & AIPS_PACRE_TP5_MASK)
  1078. #define AIPS_PACRE_WP5_MASK (0x200U)
  1079. #define AIPS_PACRE_WP5_SHIFT (9U)
  1080. #define AIPS_PACRE_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP5_SHIFT)) & AIPS_PACRE_WP5_MASK)
  1081. #define AIPS_PACRE_SP5_MASK (0x400U)
  1082. #define AIPS_PACRE_SP5_SHIFT (10U)
  1083. #define AIPS_PACRE_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP5_SHIFT)) & AIPS_PACRE_SP5_MASK)
  1084. #define AIPS_PACRE_TP4_MASK (0x1000U)
  1085. #define AIPS_PACRE_TP4_SHIFT (12U)
  1086. #define AIPS_PACRE_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP4_SHIFT)) & AIPS_PACRE_TP4_MASK)
  1087. #define AIPS_PACRE_WP4_MASK (0x2000U)
  1088. #define AIPS_PACRE_WP4_SHIFT (13U)
  1089. #define AIPS_PACRE_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP4_SHIFT)) & AIPS_PACRE_WP4_MASK)
  1090. #define AIPS_PACRE_SP4_MASK (0x4000U)
  1091. #define AIPS_PACRE_SP4_SHIFT (14U)
  1092. #define AIPS_PACRE_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP4_SHIFT)) & AIPS_PACRE_SP4_MASK)
  1093. #define AIPS_PACRE_TP3_MASK (0x10000U)
  1094. #define AIPS_PACRE_TP3_SHIFT (16U)
  1095. #define AIPS_PACRE_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP3_SHIFT)) & AIPS_PACRE_TP3_MASK)
  1096. #define AIPS_PACRE_WP3_MASK (0x20000U)
  1097. #define AIPS_PACRE_WP3_SHIFT (17U)
  1098. #define AIPS_PACRE_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP3_SHIFT)) & AIPS_PACRE_WP3_MASK)
  1099. #define AIPS_PACRE_SP3_MASK (0x40000U)
  1100. #define AIPS_PACRE_SP3_SHIFT (18U)
  1101. #define AIPS_PACRE_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP3_SHIFT)) & AIPS_PACRE_SP3_MASK)
  1102. #define AIPS_PACRE_TP2_MASK (0x100000U)
  1103. #define AIPS_PACRE_TP2_SHIFT (20U)
  1104. #define AIPS_PACRE_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP2_SHIFT)) & AIPS_PACRE_TP2_MASK)
  1105. #define AIPS_PACRE_WP2_MASK (0x200000U)
  1106. #define AIPS_PACRE_WP2_SHIFT (21U)
  1107. #define AIPS_PACRE_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP2_SHIFT)) & AIPS_PACRE_WP2_MASK)
  1108. #define AIPS_PACRE_SP2_MASK (0x400000U)
  1109. #define AIPS_PACRE_SP2_SHIFT (22U)
  1110. #define AIPS_PACRE_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP2_SHIFT)) & AIPS_PACRE_SP2_MASK)
  1111. #define AIPS_PACRE_TP1_MASK (0x1000000U)
  1112. #define AIPS_PACRE_TP1_SHIFT (24U)
  1113. #define AIPS_PACRE_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP1_SHIFT)) & AIPS_PACRE_TP1_MASK)
  1114. #define AIPS_PACRE_WP1_MASK (0x2000000U)
  1115. #define AIPS_PACRE_WP1_SHIFT (25U)
  1116. #define AIPS_PACRE_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP1_SHIFT)) & AIPS_PACRE_WP1_MASK)
  1117. #define AIPS_PACRE_SP1_MASK (0x4000000U)
  1118. #define AIPS_PACRE_SP1_SHIFT (26U)
  1119. #define AIPS_PACRE_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP1_SHIFT)) & AIPS_PACRE_SP1_MASK)
  1120. #define AIPS_PACRE_TP0_MASK (0x10000000U)
  1121. #define AIPS_PACRE_TP0_SHIFT (28U)
  1122. #define AIPS_PACRE_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP0_SHIFT)) & AIPS_PACRE_TP0_MASK)
  1123. #define AIPS_PACRE_WP0_MASK (0x20000000U)
  1124. #define AIPS_PACRE_WP0_SHIFT (29U)
  1125. #define AIPS_PACRE_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP0_SHIFT)) & AIPS_PACRE_WP0_MASK)
  1126. #define AIPS_PACRE_SP0_MASK (0x40000000U)
  1127. #define AIPS_PACRE_SP0_SHIFT (30U)
  1128. #define AIPS_PACRE_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP0_SHIFT)) & AIPS_PACRE_SP0_MASK)
  1129. /*! @name PACRF - Peripheral Access Control Register */
  1130. #define AIPS_PACRF_TP7_MASK (0x1U)
  1131. #define AIPS_PACRF_TP7_SHIFT (0U)
  1132. #define AIPS_PACRF_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP7_SHIFT)) & AIPS_PACRF_TP7_MASK)
  1133. #define AIPS_PACRF_WP7_MASK (0x2U)
  1134. #define AIPS_PACRF_WP7_SHIFT (1U)
  1135. #define AIPS_PACRF_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP7_SHIFT)) & AIPS_PACRF_WP7_MASK)
  1136. #define AIPS_PACRF_SP7_MASK (0x4U)
  1137. #define AIPS_PACRF_SP7_SHIFT (2U)
  1138. #define AIPS_PACRF_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP7_SHIFT)) & AIPS_PACRF_SP7_MASK)
  1139. #define AIPS_PACRF_TP6_MASK (0x10U)
  1140. #define AIPS_PACRF_TP6_SHIFT (4U)
  1141. #define AIPS_PACRF_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP6_SHIFT)) & AIPS_PACRF_TP6_MASK)
  1142. #define AIPS_PACRF_WP6_MASK (0x20U)
  1143. #define AIPS_PACRF_WP6_SHIFT (5U)
  1144. #define AIPS_PACRF_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP6_SHIFT)) & AIPS_PACRF_WP6_MASK)
  1145. #define AIPS_PACRF_SP6_MASK (0x40U)
  1146. #define AIPS_PACRF_SP6_SHIFT (6U)
  1147. #define AIPS_PACRF_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP6_SHIFT)) & AIPS_PACRF_SP6_MASK)
  1148. #define AIPS_PACRF_TP5_MASK (0x100U)
  1149. #define AIPS_PACRF_TP5_SHIFT (8U)
  1150. #define AIPS_PACRF_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP5_SHIFT)) & AIPS_PACRF_TP5_MASK)
  1151. #define AIPS_PACRF_WP5_MASK (0x200U)
  1152. #define AIPS_PACRF_WP5_SHIFT (9U)
  1153. #define AIPS_PACRF_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP5_SHIFT)) & AIPS_PACRF_WP5_MASK)
  1154. #define AIPS_PACRF_SP5_MASK (0x400U)
  1155. #define AIPS_PACRF_SP5_SHIFT (10U)
  1156. #define AIPS_PACRF_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP5_SHIFT)) & AIPS_PACRF_SP5_MASK)
  1157. #define AIPS_PACRF_TP4_MASK (0x1000U)
  1158. #define AIPS_PACRF_TP4_SHIFT (12U)
  1159. #define AIPS_PACRF_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP4_SHIFT)) & AIPS_PACRF_TP4_MASK)
  1160. #define AIPS_PACRF_WP4_MASK (0x2000U)
  1161. #define AIPS_PACRF_WP4_SHIFT (13U)
  1162. #define AIPS_PACRF_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP4_SHIFT)) & AIPS_PACRF_WP4_MASK)
  1163. #define AIPS_PACRF_SP4_MASK (0x4000U)
  1164. #define AIPS_PACRF_SP4_SHIFT (14U)
  1165. #define AIPS_PACRF_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP4_SHIFT)) & AIPS_PACRF_SP4_MASK)
  1166. #define AIPS_PACRF_TP3_MASK (0x10000U)
  1167. #define AIPS_PACRF_TP3_SHIFT (16U)
  1168. #define AIPS_PACRF_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP3_SHIFT)) & AIPS_PACRF_TP3_MASK)
  1169. #define AIPS_PACRF_WP3_MASK (0x20000U)
  1170. #define AIPS_PACRF_WP3_SHIFT (17U)
  1171. #define AIPS_PACRF_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP3_SHIFT)) & AIPS_PACRF_WP3_MASK)
  1172. #define AIPS_PACRF_SP3_MASK (0x40000U)
  1173. #define AIPS_PACRF_SP3_SHIFT (18U)
  1174. #define AIPS_PACRF_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP3_SHIFT)) & AIPS_PACRF_SP3_MASK)
  1175. #define AIPS_PACRF_TP2_MASK (0x100000U)
  1176. #define AIPS_PACRF_TP2_SHIFT (20U)
  1177. #define AIPS_PACRF_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP2_SHIFT)) & AIPS_PACRF_TP2_MASK)
  1178. #define AIPS_PACRF_WP2_MASK (0x200000U)
  1179. #define AIPS_PACRF_WP2_SHIFT (21U)
  1180. #define AIPS_PACRF_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP2_SHIFT)) & AIPS_PACRF_WP2_MASK)
  1181. #define AIPS_PACRF_SP2_MASK (0x400000U)
  1182. #define AIPS_PACRF_SP2_SHIFT (22U)
  1183. #define AIPS_PACRF_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP2_SHIFT)) & AIPS_PACRF_SP2_MASK)
  1184. #define AIPS_PACRF_TP1_MASK (0x1000000U)
  1185. #define AIPS_PACRF_TP1_SHIFT (24U)
  1186. #define AIPS_PACRF_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP1_SHIFT)) & AIPS_PACRF_TP1_MASK)
  1187. #define AIPS_PACRF_WP1_MASK (0x2000000U)
  1188. #define AIPS_PACRF_WP1_SHIFT (25U)
  1189. #define AIPS_PACRF_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP1_SHIFT)) & AIPS_PACRF_WP1_MASK)
  1190. #define AIPS_PACRF_SP1_MASK (0x4000000U)
  1191. #define AIPS_PACRF_SP1_SHIFT (26U)
  1192. #define AIPS_PACRF_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP1_SHIFT)) & AIPS_PACRF_SP1_MASK)
  1193. #define AIPS_PACRF_TP0_MASK (0x10000000U)
  1194. #define AIPS_PACRF_TP0_SHIFT (28U)
  1195. #define AIPS_PACRF_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP0_SHIFT)) & AIPS_PACRF_TP0_MASK)
  1196. #define AIPS_PACRF_WP0_MASK (0x20000000U)
  1197. #define AIPS_PACRF_WP0_SHIFT (29U)
  1198. #define AIPS_PACRF_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP0_SHIFT)) & AIPS_PACRF_WP0_MASK)
  1199. #define AIPS_PACRF_SP0_MASK (0x40000000U)
  1200. #define AIPS_PACRF_SP0_SHIFT (30U)
  1201. #define AIPS_PACRF_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP0_SHIFT)) & AIPS_PACRF_SP0_MASK)
  1202. /*! @name PACRG - Peripheral Access Control Register */
  1203. #define AIPS_PACRG_TP7_MASK (0x1U)
  1204. #define AIPS_PACRG_TP7_SHIFT (0U)
  1205. #define AIPS_PACRG_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP7_SHIFT)) & AIPS_PACRG_TP7_MASK)
  1206. #define AIPS_PACRG_WP7_MASK (0x2U)
  1207. #define AIPS_PACRG_WP7_SHIFT (1U)
  1208. #define AIPS_PACRG_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP7_SHIFT)) & AIPS_PACRG_WP7_MASK)
  1209. #define AIPS_PACRG_SP7_MASK (0x4U)
  1210. #define AIPS_PACRG_SP7_SHIFT (2U)
  1211. #define AIPS_PACRG_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP7_SHIFT)) & AIPS_PACRG_SP7_MASK)
  1212. #define AIPS_PACRG_TP6_MASK (0x10U)
  1213. #define AIPS_PACRG_TP6_SHIFT (4U)
  1214. #define AIPS_PACRG_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP6_SHIFT)) & AIPS_PACRG_TP6_MASK)
  1215. #define AIPS_PACRG_WP6_MASK (0x20U)
  1216. #define AIPS_PACRG_WP6_SHIFT (5U)
  1217. #define AIPS_PACRG_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP6_SHIFT)) & AIPS_PACRG_WP6_MASK)
  1218. #define AIPS_PACRG_SP6_MASK (0x40U)
  1219. #define AIPS_PACRG_SP6_SHIFT (6U)
  1220. #define AIPS_PACRG_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP6_SHIFT)) & AIPS_PACRG_SP6_MASK)
  1221. #define AIPS_PACRG_TP5_MASK (0x100U)
  1222. #define AIPS_PACRG_TP5_SHIFT (8U)
  1223. #define AIPS_PACRG_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP5_SHIFT)) & AIPS_PACRG_TP5_MASK)
  1224. #define AIPS_PACRG_WP5_MASK (0x200U)
  1225. #define AIPS_PACRG_WP5_SHIFT (9U)
  1226. #define AIPS_PACRG_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP5_SHIFT)) & AIPS_PACRG_WP5_MASK)
  1227. #define AIPS_PACRG_SP5_MASK (0x400U)
  1228. #define AIPS_PACRG_SP5_SHIFT (10U)
  1229. #define AIPS_PACRG_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP5_SHIFT)) & AIPS_PACRG_SP5_MASK)
  1230. #define AIPS_PACRG_TP4_MASK (0x1000U)
  1231. #define AIPS_PACRG_TP4_SHIFT (12U)
  1232. #define AIPS_PACRG_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP4_SHIFT)) & AIPS_PACRG_TP4_MASK)
  1233. #define AIPS_PACRG_WP4_MASK (0x2000U)
  1234. #define AIPS_PACRG_WP4_SHIFT (13U)
  1235. #define AIPS_PACRG_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP4_SHIFT)) & AIPS_PACRG_WP4_MASK)
  1236. #define AIPS_PACRG_SP4_MASK (0x4000U)
  1237. #define AIPS_PACRG_SP4_SHIFT (14U)
  1238. #define AIPS_PACRG_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP4_SHIFT)) & AIPS_PACRG_SP4_MASK)
  1239. #define AIPS_PACRG_TP3_MASK (0x10000U)
  1240. #define AIPS_PACRG_TP3_SHIFT (16U)
  1241. #define AIPS_PACRG_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP3_SHIFT)) & AIPS_PACRG_TP3_MASK)
  1242. #define AIPS_PACRG_WP3_MASK (0x20000U)
  1243. #define AIPS_PACRG_WP3_SHIFT (17U)
  1244. #define AIPS_PACRG_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP3_SHIFT)) & AIPS_PACRG_WP3_MASK)
  1245. #define AIPS_PACRG_SP3_MASK (0x40000U)
  1246. #define AIPS_PACRG_SP3_SHIFT (18U)
  1247. #define AIPS_PACRG_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP3_SHIFT)) & AIPS_PACRG_SP3_MASK)
  1248. #define AIPS_PACRG_TP2_MASK (0x100000U)
  1249. #define AIPS_PACRG_TP2_SHIFT (20U)
  1250. #define AIPS_PACRG_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP2_SHIFT)) & AIPS_PACRG_TP2_MASK)
  1251. #define AIPS_PACRG_WP2_MASK (0x200000U)
  1252. #define AIPS_PACRG_WP2_SHIFT (21U)
  1253. #define AIPS_PACRG_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP2_SHIFT)) & AIPS_PACRG_WP2_MASK)
  1254. #define AIPS_PACRG_SP2_MASK (0x400000U)
  1255. #define AIPS_PACRG_SP2_SHIFT (22U)
  1256. #define AIPS_PACRG_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP2_SHIFT)) & AIPS_PACRG_SP2_MASK)
  1257. #define AIPS_PACRG_TP1_MASK (0x1000000U)
  1258. #define AIPS_PACRG_TP1_SHIFT (24U)
  1259. #define AIPS_PACRG_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP1_SHIFT)) & AIPS_PACRG_TP1_MASK)
  1260. #define AIPS_PACRG_WP1_MASK (0x2000000U)
  1261. #define AIPS_PACRG_WP1_SHIFT (25U)
  1262. #define AIPS_PACRG_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP1_SHIFT)) & AIPS_PACRG_WP1_MASK)
  1263. #define AIPS_PACRG_SP1_MASK (0x4000000U)
  1264. #define AIPS_PACRG_SP1_SHIFT (26U)
  1265. #define AIPS_PACRG_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP1_SHIFT)) & AIPS_PACRG_SP1_MASK)
  1266. #define AIPS_PACRG_TP0_MASK (0x10000000U)
  1267. #define AIPS_PACRG_TP0_SHIFT (28U)
  1268. #define AIPS_PACRG_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP0_SHIFT)) & AIPS_PACRG_TP0_MASK)
  1269. #define AIPS_PACRG_WP0_MASK (0x20000000U)
  1270. #define AIPS_PACRG_WP0_SHIFT (29U)
  1271. #define AIPS_PACRG_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP0_SHIFT)) & AIPS_PACRG_WP0_MASK)
  1272. #define AIPS_PACRG_SP0_MASK (0x40000000U)
  1273. #define AIPS_PACRG_SP0_SHIFT (30U)
  1274. #define AIPS_PACRG_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP0_SHIFT)) & AIPS_PACRG_SP0_MASK)
  1275. /*! @name PACRH - Peripheral Access Control Register */
  1276. #define AIPS_PACRH_TP7_MASK (0x1U)
  1277. #define AIPS_PACRH_TP7_SHIFT (0U)
  1278. #define AIPS_PACRH_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP7_SHIFT)) & AIPS_PACRH_TP7_MASK)
  1279. #define AIPS_PACRH_WP7_MASK (0x2U)
  1280. #define AIPS_PACRH_WP7_SHIFT (1U)
  1281. #define AIPS_PACRH_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP7_SHIFT)) & AIPS_PACRH_WP7_MASK)
  1282. #define AIPS_PACRH_SP7_MASK (0x4U)
  1283. #define AIPS_PACRH_SP7_SHIFT (2U)
  1284. #define AIPS_PACRH_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP7_SHIFT)) & AIPS_PACRH_SP7_MASK)
  1285. #define AIPS_PACRH_TP6_MASK (0x10U)
  1286. #define AIPS_PACRH_TP6_SHIFT (4U)
  1287. #define AIPS_PACRH_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP6_SHIFT)) & AIPS_PACRH_TP6_MASK)
  1288. #define AIPS_PACRH_WP6_MASK (0x20U)
  1289. #define AIPS_PACRH_WP6_SHIFT (5U)
  1290. #define AIPS_PACRH_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP6_SHIFT)) & AIPS_PACRH_WP6_MASK)
  1291. #define AIPS_PACRH_SP6_MASK (0x40U)
  1292. #define AIPS_PACRH_SP6_SHIFT (6U)
  1293. #define AIPS_PACRH_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP6_SHIFT)) & AIPS_PACRH_SP6_MASK)
  1294. #define AIPS_PACRH_TP5_MASK (0x100U)
  1295. #define AIPS_PACRH_TP5_SHIFT (8U)
  1296. #define AIPS_PACRH_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP5_SHIFT)) & AIPS_PACRH_TP5_MASK)
  1297. #define AIPS_PACRH_WP5_MASK (0x200U)
  1298. #define AIPS_PACRH_WP5_SHIFT (9U)
  1299. #define AIPS_PACRH_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP5_SHIFT)) & AIPS_PACRH_WP5_MASK)
  1300. #define AIPS_PACRH_SP5_MASK (0x400U)
  1301. #define AIPS_PACRH_SP5_SHIFT (10U)
  1302. #define AIPS_PACRH_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP5_SHIFT)) & AIPS_PACRH_SP5_MASK)
  1303. #define AIPS_PACRH_TP4_MASK (0x1000U)
  1304. #define AIPS_PACRH_TP4_SHIFT (12U)
  1305. #define AIPS_PACRH_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP4_SHIFT)) & AIPS_PACRH_TP4_MASK)
  1306. #define AIPS_PACRH_WP4_MASK (0x2000U)
  1307. #define AIPS_PACRH_WP4_SHIFT (13U)
  1308. #define AIPS_PACRH_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP4_SHIFT)) & AIPS_PACRH_WP4_MASK)
  1309. #define AIPS_PACRH_SP4_MASK (0x4000U)
  1310. #define AIPS_PACRH_SP4_SHIFT (14U)
  1311. #define AIPS_PACRH_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP4_SHIFT)) & AIPS_PACRH_SP4_MASK)
  1312. #define AIPS_PACRH_TP3_MASK (0x10000U)
  1313. #define AIPS_PACRH_TP3_SHIFT (16U)
  1314. #define AIPS_PACRH_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP3_SHIFT)) & AIPS_PACRH_TP3_MASK)
  1315. #define AIPS_PACRH_WP3_MASK (0x20000U)
  1316. #define AIPS_PACRH_WP3_SHIFT (17U)
  1317. #define AIPS_PACRH_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP3_SHIFT)) & AIPS_PACRH_WP3_MASK)
  1318. #define AIPS_PACRH_SP3_MASK (0x40000U)
  1319. #define AIPS_PACRH_SP3_SHIFT (18U)
  1320. #define AIPS_PACRH_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP3_SHIFT)) & AIPS_PACRH_SP3_MASK)
  1321. #define AIPS_PACRH_TP2_MASK (0x100000U)
  1322. #define AIPS_PACRH_TP2_SHIFT (20U)
  1323. #define AIPS_PACRH_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP2_SHIFT)) & AIPS_PACRH_TP2_MASK)
  1324. #define AIPS_PACRH_WP2_MASK (0x200000U)
  1325. #define AIPS_PACRH_WP2_SHIFT (21U)
  1326. #define AIPS_PACRH_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP2_SHIFT)) & AIPS_PACRH_WP2_MASK)
  1327. #define AIPS_PACRH_SP2_MASK (0x400000U)
  1328. #define AIPS_PACRH_SP2_SHIFT (22U)
  1329. #define AIPS_PACRH_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP2_SHIFT)) & AIPS_PACRH_SP2_MASK)
  1330. #define AIPS_PACRH_TP1_MASK (0x1000000U)
  1331. #define AIPS_PACRH_TP1_SHIFT (24U)
  1332. #define AIPS_PACRH_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP1_SHIFT)) & AIPS_PACRH_TP1_MASK)
  1333. #define AIPS_PACRH_WP1_MASK (0x2000000U)
  1334. #define AIPS_PACRH_WP1_SHIFT (25U)
  1335. #define AIPS_PACRH_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP1_SHIFT)) & AIPS_PACRH_WP1_MASK)
  1336. #define AIPS_PACRH_SP1_MASK (0x4000000U)
  1337. #define AIPS_PACRH_SP1_SHIFT (26U)
  1338. #define AIPS_PACRH_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP1_SHIFT)) & AIPS_PACRH_SP1_MASK)
  1339. #define AIPS_PACRH_TP0_MASK (0x10000000U)
  1340. #define AIPS_PACRH_TP0_SHIFT (28U)
  1341. #define AIPS_PACRH_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP0_SHIFT)) & AIPS_PACRH_TP0_MASK)
  1342. #define AIPS_PACRH_WP0_MASK (0x20000000U)
  1343. #define AIPS_PACRH_WP0_SHIFT (29U)
  1344. #define AIPS_PACRH_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP0_SHIFT)) & AIPS_PACRH_WP0_MASK)
  1345. #define AIPS_PACRH_SP0_MASK (0x40000000U)
  1346. #define AIPS_PACRH_SP0_SHIFT (30U)
  1347. #define AIPS_PACRH_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP0_SHIFT)) & AIPS_PACRH_SP0_MASK)
  1348. /*! @name PACRI - Peripheral Access Control Register */
  1349. #define AIPS_PACRI_TP7_MASK (0x1U)
  1350. #define AIPS_PACRI_TP7_SHIFT (0U)
  1351. #define AIPS_PACRI_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP7_SHIFT)) & AIPS_PACRI_TP7_MASK)
  1352. #define AIPS_PACRI_WP7_MASK (0x2U)
  1353. #define AIPS_PACRI_WP7_SHIFT (1U)
  1354. #define AIPS_PACRI_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP7_SHIFT)) & AIPS_PACRI_WP7_MASK)
  1355. #define AIPS_PACRI_SP7_MASK (0x4U)
  1356. #define AIPS_PACRI_SP7_SHIFT (2U)
  1357. #define AIPS_PACRI_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP7_SHIFT)) & AIPS_PACRI_SP7_MASK)
  1358. #define AIPS_PACRI_TP6_MASK (0x10U)
  1359. #define AIPS_PACRI_TP6_SHIFT (4U)
  1360. #define AIPS_PACRI_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP6_SHIFT)) & AIPS_PACRI_TP6_MASK)
  1361. #define AIPS_PACRI_WP6_MASK (0x20U)
  1362. #define AIPS_PACRI_WP6_SHIFT (5U)
  1363. #define AIPS_PACRI_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP6_SHIFT)) & AIPS_PACRI_WP6_MASK)
  1364. #define AIPS_PACRI_SP6_MASK (0x40U)
  1365. #define AIPS_PACRI_SP6_SHIFT (6U)
  1366. #define AIPS_PACRI_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP6_SHIFT)) & AIPS_PACRI_SP6_MASK)
  1367. #define AIPS_PACRI_TP5_MASK (0x100U)
  1368. #define AIPS_PACRI_TP5_SHIFT (8U)
  1369. #define AIPS_PACRI_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP5_SHIFT)) & AIPS_PACRI_TP5_MASK)
  1370. #define AIPS_PACRI_WP5_MASK (0x200U)
  1371. #define AIPS_PACRI_WP5_SHIFT (9U)
  1372. #define AIPS_PACRI_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP5_SHIFT)) & AIPS_PACRI_WP5_MASK)
  1373. #define AIPS_PACRI_SP5_MASK (0x400U)
  1374. #define AIPS_PACRI_SP5_SHIFT (10U)
  1375. #define AIPS_PACRI_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP5_SHIFT)) & AIPS_PACRI_SP5_MASK)
  1376. #define AIPS_PACRI_TP4_MASK (0x1000U)
  1377. #define AIPS_PACRI_TP4_SHIFT (12U)
  1378. #define AIPS_PACRI_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP4_SHIFT)) & AIPS_PACRI_TP4_MASK)
  1379. #define AIPS_PACRI_WP4_MASK (0x2000U)
  1380. #define AIPS_PACRI_WP4_SHIFT (13U)
  1381. #define AIPS_PACRI_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP4_SHIFT)) & AIPS_PACRI_WP4_MASK)
  1382. #define AIPS_PACRI_SP4_MASK (0x4000U)
  1383. #define AIPS_PACRI_SP4_SHIFT (14U)
  1384. #define AIPS_PACRI_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP4_SHIFT)) & AIPS_PACRI_SP4_MASK)
  1385. #define AIPS_PACRI_TP3_MASK (0x10000U)
  1386. #define AIPS_PACRI_TP3_SHIFT (16U)
  1387. #define AIPS_PACRI_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP3_SHIFT)) & AIPS_PACRI_TP3_MASK)
  1388. #define AIPS_PACRI_WP3_MASK (0x20000U)
  1389. #define AIPS_PACRI_WP3_SHIFT (17U)
  1390. #define AIPS_PACRI_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP3_SHIFT)) & AIPS_PACRI_WP3_MASK)
  1391. #define AIPS_PACRI_SP3_MASK (0x40000U)
  1392. #define AIPS_PACRI_SP3_SHIFT (18U)
  1393. #define AIPS_PACRI_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP3_SHIFT)) & AIPS_PACRI_SP3_MASK)
  1394. #define AIPS_PACRI_TP2_MASK (0x100000U)
  1395. #define AIPS_PACRI_TP2_SHIFT (20U)
  1396. #define AIPS_PACRI_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP2_SHIFT)) & AIPS_PACRI_TP2_MASK)
  1397. #define AIPS_PACRI_WP2_MASK (0x200000U)
  1398. #define AIPS_PACRI_WP2_SHIFT (21U)
  1399. #define AIPS_PACRI_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP2_SHIFT)) & AIPS_PACRI_WP2_MASK)
  1400. #define AIPS_PACRI_SP2_MASK (0x400000U)
  1401. #define AIPS_PACRI_SP2_SHIFT (22U)
  1402. #define AIPS_PACRI_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP2_SHIFT)) & AIPS_PACRI_SP2_MASK)
  1403. #define AIPS_PACRI_TP1_MASK (0x1000000U)
  1404. #define AIPS_PACRI_TP1_SHIFT (24U)
  1405. #define AIPS_PACRI_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP1_SHIFT)) & AIPS_PACRI_TP1_MASK)
  1406. #define AIPS_PACRI_WP1_MASK (0x2000000U)
  1407. #define AIPS_PACRI_WP1_SHIFT (25U)
  1408. #define AIPS_PACRI_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP1_SHIFT)) & AIPS_PACRI_WP1_MASK)
  1409. #define AIPS_PACRI_SP1_MASK (0x4000000U)
  1410. #define AIPS_PACRI_SP1_SHIFT (26U)
  1411. #define AIPS_PACRI_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP1_SHIFT)) & AIPS_PACRI_SP1_MASK)
  1412. #define AIPS_PACRI_TP0_MASK (0x10000000U)
  1413. #define AIPS_PACRI_TP0_SHIFT (28U)
  1414. #define AIPS_PACRI_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP0_SHIFT)) & AIPS_PACRI_TP0_MASK)
  1415. #define AIPS_PACRI_WP0_MASK (0x20000000U)
  1416. #define AIPS_PACRI_WP0_SHIFT (29U)
  1417. #define AIPS_PACRI_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP0_SHIFT)) & AIPS_PACRI_WP0_MASK)
  1418. #define AIPS_PACRI_SP0_MASK (0x40000000U)
  1419. #define AIPS_PACRI_SP0_SHIFT (30U)
  1420. #define AIPS_PACRI_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP0_SHIFT)) & AIPS_PACRI_SP0_MASK)
  1421. /*! @name PACRJ - Peripheral Access Control Register */
  1422. #define AIPS_PACRJ_TP7_MASK (0x1U)
  1423. #define AIPS_PACRJ_TP7_SHIFT (0U)
  1424. #define AIPS_PACRJ_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP7_SHIFT)) & AIPS_PACRJ_TP7_MASK)
  1425. #define AIPS_PACRJ_WP7_MASK (0x2U)
  1426. #define AIPS_PACRJ_WP7_SHIFT (1U)
  1427. #define AIPS_PACRJ_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP7_SHIFT)) & AIPS_PACRJ_WP7_MASK)
  1428. #define AIPS_PACRJ_SP7_MASK (0x4U)
  1429. #define AIPS_PACRJ_SP7_SHIFT (2U)
  1430. #define AIPS_PACRJ_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP7_SHIFT)) & AIPS_PACRJ_SP7_MASK)
  1431. #define AIPS_PACRJ_TP6_MASK (0x10U)
  1432. #define AIPS_PACRJ_TP6_SHIFT (4U)
  1433. #define AIPS_PACRJ_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP6_SHIFT)) & AIPS_PACRJ_TP6_MASK)
  1434. #define AIPS_PACRJ_WP6_MASK (0x20U)
  1435. #define AIPS_PACRJ_WP6_SHIFT (5U)
  1436. #define AIPS_PACRJ_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP6_SHIFT)) & AIPS_PACRJ_WP6_MASK)
  1437. #define AIPS_PACRJ_SP6_MASK (0x40U)
  1438. #define AIPS_PACRJ_SP6_SHIFT (6U)
  1439. #define AIPS_PACRJ_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP6_SHIFT)) & AIPS_PACRJ_SP6_MASK)
  1440. #define AIPS_PACRJ_TP5_MASK (0x100U)
  1441. #define AIPS_PACRJ_TP5_SHIFT (8U)
  1442. #define AIPS_PACRJ_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP5_SHIFT)) & AIPS_PACRJ_TP5_MASK)
  1443. #define AIPS_PACRJ_WP5_MASK (0x200U)
  1444. #define AIPS_PACRJ_WP5_SHIFT (9U)
  1445. #define AIPS_PACRJ_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP5_SHIFT)) & AIPS_PACRJ_WP5_MASK)
  1446. #define AIPS_PACRJ_SP5_MASK (0x400U)
  1447. #define AIPS_PACRJ_SP5_SHIFT (10U)
  1448. #define AIPS_PACRJ_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP5_SHIFT)) & AIPS_PACRJ_SP5_MASK)
  1449. #define AIPS_PACRJ_TP4_MASK (0x1000U)
  1450. #define AIPS_PACRJ_TP4_SHIFT (12U)
  1451. #define AIPS_PACRJ_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP4_SHIFT)) & AIPS_PACRJ_TP4_MASK)
  1452. #define AIPS_PACRJ_WP4_MASK (0x2000U)
  1453. #define AIPS_PACRJ_WP4_SHIFT (13U)
  1454. #define AIPS_PACRJ_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP4_SHIFT)) & AIPS_PACRJ_WP4_MASK)
  1455. #define AIPS_PACRJ_SP4_MASK (0x4000U)
  1456. #define AIPS_PACRJ_SP4_SHIFT (14U)
  1457. #define AIPS_PACRJ_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP4_SHIFT)) & AIPS_PACRJ_SP4_MASK)
  1458. #define AIPS_PACRJ_TP3_MASK (0x10000U)
  1459. #define AIPS_PACRJ_TP3_SHIFT (16U)
  1460. #define AIPS_PACRJ_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP3_SHIFT)) & AIPS_PACRJ_TP3_MASK)
  1461. #define AIPS_PACRJ_WP3_MASK (0x20000U)
  1462. #define AIPS_PACRJ_WP3_SHIFT (17U)
  1463. #define AIPS_PACRJ_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP3_SHIFT)) & AIPS_PACRJ_WP3_MASK)
  1464. #define AIPS_PACRJ_SP3_MASK (0x40000U)
  1465. #define AIPS_PACRJ_SP3_SHIFT (18U)
  1466. #define AIPS_PACRJ_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP3_SHIFT)) & AIPS_PACRJ_SP3_MASK)
  1467. #define AIPS_PACRJ_TP2_MASK (0x100000U)
  1468. #define AIPS_PACRJ_TP2_SHIFT (20U)
  1469. #define AIPS_PACRJ_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP2_SHIFT)) & AIPS_PACRJ_TP2_MASK)
  1470. #define AIPS_PACRJ_WP2_MASK (0x200000U)
  1471. #define AIPS_PACRJ_WP2_SHIFT (21U)
  1472. #define AIPS_PACRJ_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP2_SHIFT)) & AIPS_PACRJ_WP2_MASK)
  1473. #define AIPS_PACRJ_SP2_MASK (0x400000U)
  1474. #define AIPS_PACRJ_SP2_SHIFT (22U)
  1475. #define AIPS_PACRJ_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP2_SHIFT)) & AIPS_PACRJ_SP2_MASK)
  1476. #define AIPS_PACRJ_TP1_MASK (0x1000000U)
  1477. #define AIPS_PACRJ_TP1_SHIFT (24U)
  1478. #define AIPS_PACRJ_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP1_SHIFT)) & AIPS_PACRJ_TP1_MASK)
  1479. #define AIPS_PACRJ_WP1_MASK (0x2000000U)
  1480. #define AIPS_PACRJ_WP1_SHIFT (25U)
  1481. #define AIPS_PACRJ_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP1_SHIFT)) & AIPS_PACRJ_WP1_MASK)
  1482. #define AIPS_PACRJ_SP1_MASK (0x4000000U)
  1483. #define AIPS_PACRJ_SP1_SHIFT (26U)
  1484. #define AIPS_PACRJ_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP1_SHIFT)) & AIPS_PACRJ_SP1_MASK)
  1485. #define AIPS_PACRJ_TP0_MASK (0x10000000U)
  1486. #define AIPS_PACRJ_TP0_SHIFT (28U)
  1487. #define AIPS_PACRJ_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP0_SHIFT)) & AIPS_PACRJ_TP0_MASK)
  1488. #define AIPS_PACRJ_WP0_MASK (0x20000000U)
  1489. #define AIPS_PACRJ_WP0_SHIFT (29U)
  1490. #define AIPS_PACRJ_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP0_SHIFT)) & AIPS_PACRJ_WP0_MASK)
  1491. #define AIPS_PACRJ_SP0_MASK (0x40000000U)
  1492. #define AIPS_PACRJ_SP0_SHIFT (30U)
  1493. #define AIPS_PACRJ_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP0_SHIFT)) & AIPS_PACRJ_SP0_MASK)
  1494. /*! @name PACRK - Peripheral Access Control Register */
  1495. #define AIPS_PACRK_TP7_MASK (0x1U)
  1496. #define AIPS_PACRK_TP7_SHIFT (0U)
  1497. #define AIPS_PACRK_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP7_SHIFT)) & AIPS_PACRK_TP7_MASK)
  1498. #define AIPS_PACRK_WP7_MASK (0x2U)
  1499. #define AIPS_PACRK_WP7_SHIFT (1U)
  1500. #define AIPS_PACRK_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP7_SHIFT)) & AIPS_PACRK_WP7_MASK)
  1501. #define AIPS_PACRK_SP7_MASK (0x4U)
  1502. #define AIPS_PACRK_SP7_SHIFT (2U)
  1503. #define AIPS_PACRK_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP7_SHIFT)) & AIPS_PACRK_SP7_MASK)
  1504. #define AIPS_PACRK_TP6_MASK (0x10U)
  1505. #define AIPS_PACRK_TP6_SHIFT (4U)
  1506. #define AIPS_PACRK_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP6_SHIFT)) & AIPS_PACRK_TP6_MASK)
  1507. #define AIPS_PACRK_WP6_MASK (0x20U)
  1508. #define AIPS_PACRK_WP6_SHIFT (5U)
  1509. #define AIPS_PACRK_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP6_SHIFT)) & AIPS_PACRK_WP6_MASK)
  1510. #define AIPS_PACRK_SP6_MASK (0x40U)
  1511. #define AIPS_PACRK_SP6_SHIFT (6U)
  1512. #define AIPS_PACRK_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP6_SHIFT)) & AIPS_PACRK_SP6_MASK)
  1513. #define AIPS_PACRK_TP5_MASK (0x100U)
  1514. #define AIPS_PACRK_TP5_SHIFT (8U)
  1515. #define AIPS_PACRK_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP5_SHIFT)) & AIPS_PACRK_TP5_MASK)
  1516. #define AIPS_PACRK_WP5_MASK (0x200U)
  1517. #define AIPS_PACRK_WP5_SHIFT (9U)
  1518. #define AIPS_PACRK_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP5_SHIFT)) & AIPS_PACRK_WP5_MASK)
  1519. #define AIPS_PACRK_SP5_MASK (0x400U)
  1520. #define AIPS_PACRK_SP5_SHIFT (10U)
  1521. #define AIPS_PACRK_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP5_SHIFT)) & AIPS_PACRK_SP5_MASK)
  1522. #define AIPS_PACRK_TP4_MASK (0x1000U)
  1523. #define AIPS_PACRK_TP4_SHIFT (12U)
  1524. #define AIPS_PACRK_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP4_SHIFT)) & AIPS_PACRK_TP4_MASK)
  1525. #define AIPS_PACRK_WP4_MASK (0x2000U)
  1526. #define AIPS_PACRK_WP4_SHIFT (13U)
  1527. #define AIPS_PACRK_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP4_SHIFT)) & AIPS_PACRK_WP4_MASK)
  1528. #define AIPS_PACRK_SP4_MASK (0x4000U)
  1529. #define AIPS_PACRK_SP4_SHIFT (14U)
  1530. #define AIPS_PACRK_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP4_SHIFT)) & AIPS_PACRK_SP4_MASK)
  1531. #define AIPS_PACRK_TP3_MASK (0x10000U)
  1532. #define AIPS_PACRK_TP3_SHIFT (16U)
  1533. #define AIPS_PACRK_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP3_SHIFT)) & AIPS_PACRK_TP3_MASK)
  1534. #define AIPS_PACRK_WP3_MASK (0x20000U)
  1535. #define AIPS_PACRK_WP3_SHIFT (17U)
  1536. #define AIPS_PACRK_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP3_SHIFT)) & AIPS_PACRK_WP3_MASK)
  1537. #define AIPS_PACRK_SP3_MASK (0x40000U)
  1538. #define AIPS_PACRK_SP3_SHIFT (18U)
  1539. #define AIPS_PACRK_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP3_SHIFT)) & AIPS_PACRK_SP3_MASK)
  1540. #define AIPS_PACRK_TP2_MASK (0x100000U)
  1541. #define AIPS_PACRK_TP2_SHIFT (20U)
  1542. #define AIPS_PACRK_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP2_SHIFT)) & AIPS_PACRK_TP2_MASK)
  1543. #define AIPS_PACRK_WP2_MASK (0x200000U)
  1544. #define AIPS_PACRK_WP2_SHIFT (21U)
  1545. #define AIPS_PACRK_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP2_SHIFT)) & AIPS_PACRK_WP2_MASK)
  1546. #define AIPS_PACRK_SP2_MASK (0x400000U)
  1547. #define AIPS_PACRK_SP2_SHIFT (22U)
  1548. #define AIPS_PACRK_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP2_SHIFT)) & AIPS_PACRK_SP2_MASK)
  1549. #define AIPS_PACRK_TP1_MASK (0x1000000U)
  1550. #define AIPS_PACRK_TP1_SHIFT (24U)
  1551. #define AIPS_PACRK_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP1_SHIFT)) & AIPS_PACRK_TP1_MASK)
  1552. #define AIPS_PACRK_WP1_MASK (0x2000000U)
  1553. #define AIPS_PACRK_WP1_SHIFT (25U)
  1554. #define AIPS_PACRK_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP1_SHIFT)) & AIPS_PACRK_WP1_MASK)
  1555. #define AIPS_PACRK_SP1_MASK (0x4000000U)
  1556. #define AIPS_PACRK_SP1_SHIFT (26U)
  1557. #define AIPS_PACRK_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP1_SHIFT)) & AIPS_PACRK_SP1_MASK)
  1558. #define AIPS_PACRK_TP0_MASK (0x10000000U)
  1559. #define AIPS_PACRK_TP0_SHIFT (28U)
  1560. #define AIPS_PACRK_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP0_SHIFT)) & AIPS_PACRK_TP0_MASK)
  1561. #define AIPS_PACRK_WP0_MASK (0x20000000U)
  1562. #define AIPS_PACRK_WP0_SHIFT (29U)
  1563. #define AIPS_PACRK_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP0_SHIFT)) & AIPS_PACRK_WP0_MASK)
  1564. #define AIPS_PACRK_SP0_MASK (0x40000000U)
  1565. #define AIPS_PACRK_SP0_SHIFT (30U)
  1566. #define AIPS_PACRK_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP0_SHIFT)) & AIPS_PACRK_SP0_MASK)
  1567. /*! @name PACRL - Peripheral Access Control Register */
  1568. #define AIPS_PACRL_TP7_MASK (0x1U)
  1569. #define AIPS_PACRL_TP7_SHIFT (0U)
  1570. #define AIPS_PACRL_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP7_SHIFT)) & AIPS_PACRL_TP7_MASK)
  1571. #define AIPS_PACRL_WP7_MASK (0x2U)
  1572. #define AIPS_PACRL_WP7_SHIFT (1U)
  1573. #define AIPS_PACRL_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP7_SHIFT)) & AIPS_PACRL_WP7_MASK)
  1574. #define AIPS_PACRL_SP7_MASK (0x4U)
  1575. #define AIPS_PACRL_SP7_SHIFT (2U)
  1576. #define AIPS_PACRL_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP7_SHIFT)) & AIPS_PACRL_SP7_MASK)
  1577. #define AIPS_PACRL_TP6_MASK (0x10U)
  1578. #define AIPS_PACRL_TP6_SHIFT (4U)
  1579. #define AIPS_PACRL_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP6_SHIFT)) & AIPS_PACRL_TP6_MASK)
  1580. #define AIPS_PACRL_WP6_MASK (0x20U)
  1581. #define AIPS_PACRL_WP6_SHIFT (5U)
  1582. #define AIPS_PACRL_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP6_SHIFT)) & AIPS_PACRL_WP6_MASK)
  1583. #define AIPS_PACRL_SP6_MASK (0x40U)
  1584. #define AIPS_PACRL_SP6_SHIFT (6U)
  1585. #define AIPS_PACRL_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP6_SHIFT)) & AIPS_PACRL_SP6_MASK)
  1586. #define AIPS_PACRL_TP5_MASK (0x100U)
  1587. #define AIPS_PACRL_TP5_SHIFT (8U)
  1588. #define AIPS_PACRL_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP5_SHIFT)) & AIPS_PACRL_TP5_MASK)
  1589. #define AIPS_PACRL_WP5_MASK (0x200U)
  1590. #define AIPS_PACRL_WP5_SHIFT (9U)
  1591. #define AIPS_PACRL_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP5_SHIFT)) & AIPS_PACRL_WP5_MASK)
  1592. #define AIPS_PACRL_SP5_MASK (0x400U)
  1593. #define AIPS_PACRL_SP5_SHIFT (10U)
  1594. #define AIPS_PACRL_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP5_SHIFT)) & AIPS_PACRL_SP5_MASK)
  1595. #define AIPS_PACRL_TP4_MASK (0x1000U)
  1596. #define AIPS_PACRL_TP4_SHIFT (12U)
  1597. #define AIPS_PACRL_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP4_SHIFT)) & AIPS_PACRL_TP4_MASK)
  1598. #define AIPS_PACRL_WP4_MASK (0x2000U)
  1599. #define AIPS_PACRL_WP4_SHIFT (13U)
  1600. #define AIPS_PACRL_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP4_SHIFT)) & AIPS_PACRL_WP4_MASK)
  1601. #define AIPS_PACRL_SP4_MASK (0x4000U)
  1602. #define AIPS_PACRL_SP4_SHIFT (14U)
  1603. #define AIPS_PACRL_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP4_SHIFT)) & AIPS_PACRL_SP4_MASK)
  1604. #define AIPS_PACRL_TP3_MASK (0x10000U)
  1605. #define AIPS_PACRL_TP3_SHIFT (16U)
  1606. #define AIPS_PACRL_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP3_SHIFT)) & AIPS_PACRL_TP3_MASK)
  1607. #define AIPS_PACRL_WP3_MASK (0x20000U)
  1608. #define AIPS_PACRL_WP3_SHIFT (17U)
  1609. #define AIPS_PACRL_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP3_SHIFT)) & AIPS_PACRL_WP3_MASK)
  1610. #define AIPS_PACRL_SP3_MASK (0x40000U)
  1611. #define AIPS_PACRL_SP3_SHIFT (18U)
  1612. #define AIPS_PACRL_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP3_SHIFT)) & AIPS_PACRL_SP3_MASK)
  1613. #define AIPS_PACRL_TP2_MASK (0x100000U)
  1614. #define AIPS_PACRL_TP2_SHIFT (20U)
  1615. #define AIPS_PACRL_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP2_SHIFT)) & AIPS_PACRL_TP2_MASK)
  1616. #define AIPS_PACRL_WP2_MASK (0x200000U)
  1617. #define AIPS_PACRL_WP2_SHIFT (21U)
  1618. #define AIPS_PACRL_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP2_SHIFT)) & AIPS_PACRL_WP2_MASK)
  1619. #define AIPS_PACRL_SP2_MASK (0x400000U)
  1620. #define AIPS_PACRL_SP2_SHIFT (22U)
  1621. #define AIPS_PACRL_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP2_SHIFT)) & AIPS_PACRL_SP2_MASK)
  1622. #define AIPS_PACRL_TP1_MASK (0x1000000U)
  1623. #define AIPS_PACRL_TP1_SHIFT (24U)
  1624. #define AIPS_PACRL_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP1_SHIFT)) & AIPS_PACRL_TP1_MASK)
  1625. #define AIPS_PACRL_WP1_MASK (0x2000000U)
  1626. #define AIPS_PACRL_WP1_SHIFT (25U)
  1627. #define AIPS_PACRL_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP1_SHIFT)) & AIPS_PACRL_WP1_MASK)
  1628. #define AIPS_PACRL_SP1_MASK (0x4000000U)
  1629. #define AIPS_PACRL_SP1_SHIFT (26U)
  1630. #define AIPS_PACRL_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP1_SHIFT)) & AIPS_PACRL_SP1_MASK)
  1631. #define AIPS_PACRL_TP0_MASK (0x10000000U)
  1632. #define AIPS_PACRL_TP0_SHIFT (28U)
  1633. #define AIPS_PACRL_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP0_SHIFT)) & AIPS_PACRL_TP0_MASK)
  1634. #define AIPS_PACRL_WP0_MASK (0x20000000U)
  1635. #define AIPS_PACRL_WP0_SHIFT (29U)
  1636. #define AIPS_PACRL_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP0_SHIFT)) & AIPS_PACRL_WP0_MASK)
  1637. #define AIPS_PACRL_SP0_MASK (0x40000000U)
  1638. #define AIPS_PACRL_SP0_SHIFT (30U)
  1639. #define AIPS_PACRL_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP0_SHIFT)) & AIPS_PACRL_SP0_MASK)
  1640. /*! @name PACRM - Peripheral Access Control Register */
  1641. #define AIPS_PACRM_TP7_MASK (0x1U)
  1642. #define AIPS_PACRM_TP7_SHIFT (0U)
  1643. #define AIPS_PACRM_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP7_SHIFT)) & AIPS_PACRM_TP7_MASK)
  1644. #define AIPS_PACRM_WP7_MASK (0x2U)
  1645. #define AIPS_PACRM_WP7_SHIFT (1U)
  1646. #define AIPS_PACRM_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP7_SHIFT)) & AIPS_PACRM_WP7_MASK)
  1647. #define AIPS_PACRM_SP7_MASK (0x4U)
  1648. #define AIPS_PACRM_SP7_SHIFT (2U)
  1649. #define AIPS_PACRM_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP7_SHIFT)) & AIPS_PACRM_SP7_MASK)
  1650. #define AIPS_PACRM_TP6_MASK (0x10U)
  1651. #define AIPS_PACRM_TP6_SHIFT (4U)
  1652. #define AIPS_PACRM_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP6_SHIFT)) & AIPS_PACRM_TP6_MASK)
  1653. #define AIPS_PACRM_WP6_MASK (0x20U)
  1654. #define AIPS_PACRM_WP6_SHIFT (5U)
  1655. #define AIPS_PACRM_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP6_SHIFT)) & AIPS_PACRM_WP6_MASK)
  1656. #define AIPS_PACRM_SP6_MASK (0x40U)
  1657. #define AIPS_PACRM_SP6_SHIFT (6U)
  1658. #define AIPS_PACRM_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP6_SHIFT)) & AIPS_PACRM_SP6_MASK)
  1659. #define AIPS_PACRM_TP5_MASK (0x100U)
  1660. #define AIPS_PACRM_TP5_SHIFT (8U)
  1661. #define AIPS_PACRM_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP5_SHIFT)) & AIPS_PACRM_TP5_MASK)
  1662. #define AIPS_PACRM_WP5_MASK (0x200U)
  1663. #define AIPS_PACRM_WP5_SHIFT (9U)
  1664. #define AIPS_PACRM_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP5_SHIFT)) & AIPS_PACRM_WP5_MASK)
  1665. #define AIPS_PACRM_SP5_MASK (0x400U)
  1666. #define AIPS_PACRM_SP5_SHIFT (10U)
  1667. #define AIPS_PACRM_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP5_SHIFT)) & AIPS_PACRM_SP5_MASK)
  1668. #define AIPS_PACRM_TP4_MASK (0x1000U)
  1669. #define AIPS_PACRM_TP4_SHIFT (12U)
  1670. #define AIPS_PACRM_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP4_SHIFT)) & AIPS_PACRM_TP4_MASK)
  1671. #define AIPS_PACRM_WP4_MASK (0x2000U)
  1672. #define AIPS_PACRM_WP4_SHIFT (13U)
  1673. #define AIPS_PACRM_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP4_SHIFT)) & AIPS_PACRM_WP4_MASK)
  1674. #define AIPS_PACRM_SP4_MASK (0x4000U)
  1675. #define AIPS_PACRM_SP4_SHIFT (14U)
  1676. #define AIPS_PACRM_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP4_SHIFT)) & AIPS_PACRM_SP4_MASK)
  1677. #define AIPS_PACRM_TP3_MASK (0x10000U)
  1678. #define AIPS_PACRM_TP3_SHIFT (16U)
  1679. #define AIPS_PACRM_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP3_SHIFT)) & AIPS_PACRM_TP3_MASK)
  1680. #define AIPS_PACRM_WP3_MASK (0x20000U)
  1681. #define AIPS_PACRM_WP3_SHIFT (17U)
  1682. #define AIPS_PACRM_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP3_SHIFT)) & AIPS_PACRM_WP3_MASK)
  1683. #define AIPS_PACRM_SP3_MASK (0x40000U)
  1684. #define AIPS_PACRM_SP3_SHIFT (18U)
  1685. #define AIPS_PACRM_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP3_SHIFT)) & AIPS_PACRM_SP3_MASK)
  1686. #define AIPS_PACRM_TP2_MASK (0x100000U)
  1687. #define AIPS_PACRM_TP2_SHIFT (20U)
  1688. #define AIPS_PACRM_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP2_SHIFT)) & AIPS_PACRM_TP2_MASK)
  1689. #define AIPS_PACRM_WP2_MASK (0x200000U)
  1690. #define AIPS_PACRM_WP2_SHIFT (21U)
  1691. #define AIPS_PACRM_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP2_SHIFT)) & AIPS_PACRM_WP2_MASK)
  1692. #define AIPS_PACRM_SP2_MASK (0x400000U)
  1693. #define AIPS_PACRM_SP2_SHIFT (22U)
  1694. #define AIPS_PACRM_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP2_SHIFT)) & AIPS_PACRM_SP2_MASK)
  1695. #define AIPS_PACRM_TP1_MASK (0x1000000U)
  1696. #define AIPS_PACRM_TP1_SHIFT (24U)
  1697. #define AIPS_PACRM_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP1_SHIFT)) & AIPS_PACRM_TP1_MASK)
  1698. #define AIPS_PACRM_WP1_MASK (0x2000000U)
  1699. #define AIPS_PACRM_WP1_SHIFT (25U)
  1700. #define AIPS_PACRM_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP1_SHIFT)) & AIPS_PACRM_WP1_MASK)
  1701. #define AIPS_PACRM_SP1_MASK (0x4000000U)
  1702. #define AIPS_PACRM_SP1_SHIFT (26U)
  1703. #define AIPS_PACRM_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP1_SHIFT)) & AIPS_PACRM_SP1_MASK)
  1704. #define AIPS_PACRM_TP0_MASK (0x10000000U)
  1705. #define AIPS_PACRM_TP0_SHIFT (28U)
  1706. #define AIPS_PACRM_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP0_SHIFT)) & AIPS_PACRM_TP0_MASK)
  1707. #define AIPS_PACRM_WP0_MASK (0x20000000U)
  1708. #define AIPS_PACRM_WP0_SHIFT (29U)
  1709. #define AIPS_PACRM_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP0_SHIFT)) & AIPS_PACRM_WP0_MASK)
  1710. #define AIPS_PACRM_SP0_MASK (0x40000000U)
  1711. #define AIPS_PACRM_SP0_SHIFT (30U)
  1712. #define AIPS_PACRM_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP0_SHIFT)) & AIPS_PACRM_SP0_MASK)
  1713. /*! @name PACRN - Peripheral Access Control Register */
  1714. #define AIPS_PACRN_TP7_MASK (0x1U)
  1715. #define AIPS_PACRN_TP7_SHIFT (0U)
  1716. #define AIPS_PACRN_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP7_SHIFT)) & AIPS_PACRN_TP7_MASK)
  1717. #define AIPS_PACRN_WP7_MASK (0x2U)
  1718. #define AIPS_PACRN_WP7_SHIFT (1U)
  1719. #define AIPS_PACRN_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP7_SHIFT)) & AIPS_PACRN_WP7_MASK)
  1720. #define AIPS_PACRN_SP7_MASK (0x4U)
  1721. #define AIPS_PACRN_SP7_SHIFT (2U)
  1722. #define AIPS_PACRN_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP7_SHIFT)) & AIPS_PACRN_SP7_MASK)
  1723. #define AIPS_PACRN_TP6_MASK (0x10U)
  1724. #define AIPS_PACRN_TP6_SHIFT (4U)
  1725. #define AIPS_PACRN_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP6_SHIFT)) & AIPS_PACRN_TP6_MASK)
  1726. #define AIPS_PACRN_WP6_MASK (0x20U)
  1727. #define AIPS_PACRN_WP6_SHIFT (5U)
  1728. #define AIPS_PACRN_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP6_SHIFT)) & AIPS_PACRN_WP6_MASK)
  1729. #define AIPS_PACRN_SP6_MASK (0x40U)
  1730. #define AIPS_PACRN_SP6_SHIFT (6U)
  1731. #define AIPS_PACRN_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP6_SHIFT)) & AIPS_PACRN_SP6_MASK)
  1732. #define AIPS_PACRN_TP5_MASK (0x100U)
  1733. #define AIPS_PACRN_TP5_SHIFT (8U)
  1734. #define AIPS_PACRN_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP5_SHIFT)) & AIPS_PACRN_TP5_MASK)
  1735. #define AIPS_PACRN_WP5_MASK (0x200U)
  1736. #define AIPS_PACRN_WP5_SHIFT (9U)
  1737. #define AIPS_PACRN_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP5_SHIFT)) & AIPS_PACRN_WP5_MASK)
  1738. #define AIPS_PACRN_SP5_MASK (0x400U)
  1739. #define AIPS_PACRN_SP5_SHIFT (10U)
  1740. #define AIPS_PACRN_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP5_SHIFT)) & AIPS_PACRN_SP5_MASK)
  1741. #define AIPS_PACRN_TP4_MASK (0x1000U)
  1742. #define AIPS_PACRN_TP4_SHIFT (12U)
  1743. #define AIPS_PACRN_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP4_SHIFT)) & AIPS_PACRN_TP4_MASK)
  1744. #define AIPS_PACRN_WP4_MASK (0x2000U)
  1745. #define AIPS_PACRN_WP4_SHIFT (13U)
  1746. #define AIPS_PACRN_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP4_SHIFT)) & AIPS_PACRN_WP4_MASK)
  1747. #define AIPS_PACRN_SP4_MASK (0x4000U)
  1748. #define AIPS_PACRN_SP4_SHIFT (14U)
  1749. #define AIPS_PACRN_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP4_SHIFT)) & AIPS_PACRN_SP4_MASK)
  1750. #define AIPS_PACRN_TP3_MASK (0x10000U)
  1751. #define AIPS_PACRN_TP3_SHIFT (16U)
  1752. #define AIPS_PACRN_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP3_SHIFT)) & AIPS_PACRN_TP3_MASK)
  1753. #define AIPS_PACRN_WP3_MASK (0x20000U)
  1754. #define AIPS_PACRN_WP3_SHIFT (17U)
  1755. #define AIPS_PACRN_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP3_SHIFT)) & AIPS_PACRN_WP3_MASK)
  1756. #define AIPS_PACRN_SP3_MASK (0x40000U)
  1757. #define AIPS_PACRN_SP3_SHIFT (18U)
  1758. #define AIPS_PACRN_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP3_SHIFT)) & AIPS_PACRN_SP3_MASK)
  1759. #define AIPS_PACRN_TP2_MASK (0x100000U)
  1760. #define AIPS_PACRN_TP2_SHIFT (20U)
  1761. #define AIPS_PACRN_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP2_SHIFT)) & AIPS_PACRN_TP2_MASK)
  1762. #define AIPS_PACRN_WP2_MASK (0x200000U)
  1763. #define AIPS_PACRN_WP2_SHIFT (21U)
  1764. #define AIPS_PACRN_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP2_SHIFT)) & AIPS_PACRN_WP2_MASK)
  1765. #define AIPS_PACRN_SP2_MASK (0x400000U)
  1766. #define AIPS_PACRN_SP2_SHIFT (22U)
  1767. #define AIPS_PACRN_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP2_SHIFT)) & AIPS_PACRN_SP2_MASK)
  1768. #define AIPS_PACRN_TP1_MASK (0x1000000U)
  1769. #define AIPS_PACRN_TP1_SHIFT (24U)
  1770. #define AIPS_PACRN_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP1_SHIFT)) & AIPS_PACRN_TP1_MASK)
  1771. #define AIPS_PACRN_WP1_MASK (0x2000000U)
  1772. #define AIPS_PACRN_WP1_SHIFT (25U)
  1773. #define AIPS_PACRN_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP1_SHIFT)) & AIPS_PACRN_WP1_MASK)
  1774. #define AIPS_PACRN_SP1_MASK (0x4000000U)
  1775. #define AIPS_PACRN_SP1_SHIFT (26U)
  1776. #define AIPS_PACRN_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP1_SHIFT)) & AIPS_PACRN_SP1_MASK)
  1777. #define AIPS_PACRN_TP0_MASK (0x10000000U)
  1778. #define AIPS_PACRN_TP0_SHIFT (28U)
  1779. #define AIPS_PACRN_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP0_SHIFT)) & AIPS_PACRN_TP0_MASK)
  1780. #define AIPS_PACRN_WP0_MASK (0x20000000U)
  1781. #define AIPS_PACRN_WP0_SHIFT (29U)
  1782. #define AIPS_PACRN_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP0_SHIFT)) & AIPS_PACRN_WP0_MASK)
  1783. #define AIPS_PACRN_SP0_MASK (0x40000000U)
  1784. #define AIPS_PACRN_SP0_SHIFT (30U)
  1785. #define AIPS_PACRN_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP0_SHIFT)) & AIPS_PACRN_SP0_MASK)
  1786. /*! @name PACRO - Peripheral Access Control Register */
  1787. #define AIPS_PACRO_TP7_MASK (0x1U)
  1788. #define AIPS_PACRO_TP7_SHIFT (0U)
  1789. #define AIPS_PACRO_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP7_SHIFT)) & AIPS_PACRO_TP7_MASK)
  1790. #define AIPS_PACRO_WP7_MASK (0x2U)
  1791. #define AIPS_PACRO_WP7_SHIFT (1U)
  1792. #define AIPS_PACRO_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP7_SHIFT)) & AIPS_PACRO_WP7_MASK)
  1793. #define AIPS_PACRO_SP7_MASK (0x4U)
  1794. #define AIPS_PACRO_SP7_SHIFT (2U)
  1795. #define AIPS_PACRO_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP7_SHIFT)) & AIPS_PACRO_SP7_MASK)
  1796. #define AIPS_PACRO_TP6_MASK (0x10U)
  1797. #define AIPS_PACRO_TP6_SHIFT (4U)
  1798. #define AIPS_PACRO_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP6_SHIFT)) & AIPS_PACRO_TP6_MASK)
  1799. #define AIPS_PACRO_WP6_MASK (0x20U)
  1800. #define AIPS_PACRO_WP6_SHIFT (5U)
  1801. #define AIPS_PACRO_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP6_SHIFT)) & AIPS_PACRO_WP6_MASK)
  1802. #define AIPS_PACRO_SP6_MASK (0x40U)
  1803. #define AIPS_PACRO_SP6_SHIFT (6U)
  1804. #define AIPS_PACRO_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP6_SHIFT)) & AIPS_PACRO_SP6_MASK)
  1805. #define AIPS_PACRO_TP5_MASK (0x100U)
  1806. #define AIPS_PACRO_TP5_SHIFT (8U)
  1807. #define AIPS_PACRO_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP5_SHIFT)) & AIPS_PACRO_TP5_MASK)
  1808. #define AIPS_PACRO_WP5_MASK (0x200U)
  1809. #define AIPS_PACRO_WP5_SHIFT (9U)
  1810. #define AIPS_PACRO_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP5_SHIFT)) & AIPS_PACRO_WP5_MASK)
  1811. #define AIPS_PACRO_SP5_MASK (0x400U)
  1812. #define AIPS_PACRO_SP5_SHIFT (10U)
  1813. #define AIPS_PACRO_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP5_SHIFT)) & AIPS_PACRO_SP5_MASK)
  1814. #define AIPS_PACRO_TP4_MASK (0x1000U)
  1815. #define AIPS_PACRO_TP4_SHIFT (12U)
  1816. #define AIPS_PACRO_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP4_SHIFT)) & AIPS_PACRO_TP4_MASK)
  1817. #define AIPS_PACRO_WP4_MASK (0x2000U)
  1818. #define AIPS_PACRO_WP4_SHIFT (13U)
  1819. #define AIPS_PACRO_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP4_SHIFT)) & AIPS_PACRO_WP4_MASK)
  1820. #define AIPS_PACRO_SP4_MASK (0x4000U)
  1821. #define AIPS_PACRO_SP4_SHIFT (14U)
  1822. #define AIPS_PACRO_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP4_SHIFT)) & AIPS_PACRO_SP4_MASK)
  1823. #define AIPS_PACRO_TP3_MASK (0x10000U)
  1824. #define AIPS_PACRO_TP3_SHIFT (16U)
  1825. #define AIPS_PACRO_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP3_SHIFT)) & AIPS_PACRO_TP3_MASK)
  1826. #define AIPS_PACRO_WP3_MASK (0x20000U)
  1827. #define AIPS_PACRO_WP3_SHIFT (17U)
  1828. #define AIPS_PACRO_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP3_SHIFT)) & AIPS_PACRO_WP3_MASK)
  1829. #define AIPS_PACRO_SP3_MASK (0x40000U)
  1830. #define AIPS_PACRO_SP3_SHIFT (18U)
  1831. #define AIPS_PACRO_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP3_SHIFT)) & AIPS_PACRO_SP3_MASK)
  1832. #define AIPS_PACRO_TP2_MASK (0x100000U)
  1833. #define AIPS_PACRO_TP2_SHIFT (20U)
  1834. #define AIPS_PACRO_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP2_SHIFT)) & AIPS_PACRO_TP2_MASK)
  1835. #define AIPS_PACRO_WP2_MASK (0x200000U)
  1836. #define AIPS_PACRO_WP2_SHIFT (21U)
  1837. #define AIPS_PACRO_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP2_SHIFT)) & AIPS_PACRO_WP2_MASK)
  1838. #define AIPS_PACRO_SP2_MASK (0x400000U)
  1839. #define AIPS_PACRO_SP2_SHIFT (22U)
  1840. #define AIPS_PACRO_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP2_SHIFT)) & AIPS_PACRO_SP2_MASK)
  1841. #define AIPS_PACRO_TP1_MASK (0x1000000U)
  1842. #define AIPS_PACRO_TP1_SHIFT (24U)
  1843. #define AIPS_PACRO_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP1_SHIFT)) & AIPS_PACRO_TP1_MASK)
  1844. #define AIPS_PACRO_WP1_MASK (0x2000000U)
  1845. #define AIPS_PACRO_WP1_SHIFT (25U)
  1846. #define AIPS_PACRO_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP1_SHIFT)) & AIPS_PACRO_WP1_MASK)
  1847. #define AIPS_PACRO_SP1_MASK (0x4000000U)
  1848. #define AIPS_PACRO_SP1_SHIFT (26U)
  1849. #define AIPS_PACRO_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP1_SHIFT)) & AIPS_PACRO_SP1_MASK)
  1850. #define AIPS_PACRO_TP0_MASK (0x10000000U)
  1851. #define AIPS_PACRO_TP0_SHIFT (28U)
  1852. #define AIPS_PACRO_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP0_SHIFT)) & AIPS_PACRO_TP0_MASK)
  1853. #define AIPS_PACRO_WP0_MASK (0x20000000U)
  1854. #define AIPS_PACRO_WP0_SHIFT (29U)
  1855. #define AIPS_PACRO_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP0_SHIFT)) & AIPS_PACRO_WP0_MASK)
  1856. #define AIPS_PACRO_SP0_MASK (0x40000000U)
  1857. #define AIPS_PACRO_SP0_SHIFT (30U)
  1858. #define AIPS_PACRO_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP0_SHIFT)) & AIPS_PACRO_SP0_MASK)
  1859. /*! @name PACRP - Peripheral Access Control Register */
  1860. #define AIPS_PACRP_TP7_MASK (0x1U)
  1861. #define AIPS_PACRP_TP7_SHIFT (0U)
  1862. #define AIPS_PACRP_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP7_SHIFT)) & AIPS_PACRP_TP7_MASK)
  1863. #define AIPS_PACRP_WP7_MASK (0x2U)
  1864. #define AIPS_PACRP_WP7_SHIFT (1U)
  1865. #define AIPS_PACRP_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP7_SHIFT)) & AIPS_PACRP_WP7_MASK)
  1866. #define AIPS_PACRP_SP7_MASK (0x4U)
  1867. #define AIPS_PACRP_SP7_SHIFT (2U)
  1868. #define AIPS_PACRP_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP7_SHIFT)) & AIPS_PACRP_SP7_MASK)
  1869. #define AIPS_PACRP_TP6_MASK (0x10U)
  1870. #define AIPS_PACRP_TP6_SHIFT (4U)
  1871. #define AIPS_PACRP_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP6_SHIFT)) & AIPS_PACRP_TP6_MASK)
  1872. #define AIPS_PACRP_WP6_MASK (0x20U)
  1873. #define AIPS_PACRP_WP6_SHIFT (5U)
  1874. #define AIPS_PACRP_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP6_SHIFT)) & AIPS_PACRP_WP6_MASK)
  1875. #define AIPS_PACRP_SP6_MASK (0x40U)
  1876. #define AIPS_PACRP_SP6_SHIFT (6U)
  1877. #define AIPS_PACRP_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP6_SHIFT)) & AIPS_PACRP_SP6_MASK)
  1878. #define AIPS_PACRP_TP5_MASK (0x100U)
  1879. #define AIPS_PACRP_TP5_SHIFT (8U)
  1880. #define AIPS_PACRP_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP5_SHIFT)) & AIPS_PACRP_TP5_MASK)
  1881. #define AIPS_PACRP_WP5_MASK (0x200U)
  1882. #define AIPS_PACRP_WP5_SHIFT (9U)
  1883. #define AIPS_PACRP_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP5_SHIFT)) & AIPS_PACRP_WP5_MASK)
  1884. #define AIPS_PACRP_SP5_MASK (0x400U)
  1885. #define AIPS_PACRP_SP5_SHIFT (10U)
  1886. #define AIPS_PACRP_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP5_SHIFT)) & AIPS_PACRP_SP5_MASK)
  1887. #define AIPS_PACRP_TP4_MASK (0x1000U)
  1888. #define AIPS_PACRP_TP4_SHIFT (12U)
  1889. #define AIPS_PACRP_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP4_SHIFT)) & AIPS_PACRP_TP4_MASK)
  1890. #define AIPS_PACRP_WP4_MASK (0x2000U)
  1891. #define AIPS_PACRP_WP4_SHIFT (13U)
  1892. #define AIPS_PACRP_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP4_SHIFT)) & AIPS_PACRP_WP4_MASK)
  1893. #define AIPS_PACRP_SP4_MASK (0x4000U)
  1894. #define AIPS_PACRP_SP4_SHIFT (14U)
  1895. #define AIPS_PACRP_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP4_SHIFT)) & AIPS_PACRP_SP4_MASK)
  1896. #define AIPS_PACRP_TP3_MASK (0x10000U)
  1897. #define AIPS_PACRP_TP3_SHIFT (16U)
  1898. #define AIPS_PACRP_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP3_SHIFT)) & AIPS_PACRP_TP3_MASK)
  1899. #define AIPS_PACRP_WP3_MASK (0x20000U)
  1900. #define AIPS_PACRP_WP3_SHIFT (17U)
  1901. #define AIPS_PACRP_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP3_SHIFT)) & AIPS_PACRP_WP3_MASK)
  1902. #define AIPS_PACRP_SP3_MASK (0x40000U)
  1903. #define AIPS_PACRP_SP3_SHIFT (18U)
  1904. #define AIPS_PACRP_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP3_SHIFT)) & AIPS_PACRP_SP3_MASK)
  1905. #define AIPS_PACRP_TP2_MASK (0x100000U)
  1906. #define AIPS_PACRP_TP2_SHIFT (20U)
  1907. #define AIPS_PACRP_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP2_SHIFT)) & AIPS_PACRP_TP2_MASK)
  1908. #define AIPS_PACRP_WP2_MASK (0x200000U)
  1909. #define AIPS_PACRP_WP2_SHIFT (21U)
  1910. #define AIPS_PACRP_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP2_SHIFT)) & AIPS_PACRP_WP2_MASK)
  1911. #define AIPS_PACRP_SP2_MASK (0x400000U)
  1912. #define AIPS_PACRP_SP2_SHIFT (22U)
  1913. #define AIPS_PACRP_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP2_SHIFT)) & AIPS_PACRP_SP2_MASK)
  1914. #define AIPS_PACRP_TP1_MASK (0x1000000U)
  1915. #define AIPS_PACRP_TP1_SHIFT (24U)
  1916. #define AIPS_PACRP_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP1_SHIFT)) & AIPS_PACRP_TP1_MASK)
  1917. #define AIPS_PACRP_WP1_MASK (0x2000000U)
  1918. #define AIPS_PACRP_WP1_SHIFT (25U)
  1919. #define AIPS_PACRP_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP1_SHIFT)) & AIPS_PACRP_WP1_MASK)
  1920. #define AIPS_PACRP_SP1_MASK (0x4000000U)
  1921. #define AIPS_PACRP_SP1_SHIFT (26U)
  1922. #define AIPS_PACRP_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP1_SHIFT)) & AIPS_PACRP_SP1_MASK)
  1923. #define AIPS_PACRP_TP0_MASK (0x10000000U)
  1924. #define AIPS_PACRP_TP0_SHIFT (28U)
  1925. #define AIPS_PACRP_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP0_SHIFT)) & AIPS_PACRP_TP0_MASK)
  1926. #define AIPS_PACRP_WP0_MASK (0x20000000U)
  1927. #define AIPS_PACRP_WP0_SHIFT (29U)
  1928. #define AIPS_PACRP_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP0_SHIFT)) & AIPS_PACRP_WP0_MASK)
  1929. #define AIPS_PACRP_SP0_MASK (0x40000000U)
  1930. #define AIPS_PACRP_SP0_SHIFT (30U)
  1931. #define AIPS_PACRP_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP0_SHIFT)) & AIPS_PACRP_SP0_MASK)
  1932. /*!
  1933. * @}
  1934. */ /* end of group AIPS_Register_Masks */
  1935. /* AIPS - Peripheral instance base addresses */
  1936. /** Peripheral AIPS0 base address */
  1937. #define AIPS0_BASE (0x40000000u)
  1938. /** Peripheral AIPS0 base pointer */
  1939. #define AIPS0 ((AIPS_Type *)AIPS0_BASE)
  1940. /** Peripheral AIPS1 base address */
  1941. #define AIPS1_BASE (0x40080000u)
  1942. /** Peripheral AIPS1 base pointer */
  1943. #define AIPS1 ((AIPS_Type *)AIPS1_BASE)
  1944. /** Array initializer of AIPS peripheral base addresses */
  1945. #define AIPS_BASE_ADDRS { AIPS0_BASE, AIPS1_BASE }
  1946. /** Array initializer of AIPS peripheral base pointers */
  1947. #define AIPS_BASE_PTRS { AIPS0, AIPS1 }
  1948. /*!
  1949. * @}
  1950. */ /* end of group AIPS_Peripheral_Access_Layer */
  1951. /* ----------------------------------------------------------------------------
  1952. -- AXBS Peripheral Access Layer
  1953. ---------------------------------------------------------------------------- */
  1954. /*!
  1955. * @addtogroup AXBS_Peripheral_Access_Layer AXBS Peripheral Access Layer
  1956. * @{
  1957. */
  1958. /** AXBS - Register Layout Typedef */
  1959. typedef struct {
  1960. struct { /* offset: 0x0, array step: 0x100 */
  1961. __IO uint32_t PRS; /**< Priority Registers Slave, array offset: 0x0, array step: 0x100 */
  1962. uint8_t RESERVED_0[12];
  1963. __IO uint32_t CRS; /**< Control Register, array offset: 0x10, array step: 0x100 */
  1964. uint8_t RESERVED_1[236];
  1965. } SLAVE[6];
  1966. uint8_t RESERVED_0[512];
  1967. __IO uint32_t MGPCR0; /**< Master General Purpose Control Register, offset: 0x800 */
  1968. uint8_t RESERVED_1[252];
  1969. __IO uint32_t MGPCR1; /**< Master General Purpose Control Register, offset: 0x900 */
  1970. uint8_t RESERVED_2[252];
  1971. __IO uint32_t MGPCR2; /**< Master General Purpose Control Register, offset: 0xA00 */
  1972. uint8_t RESERVED_3[252];
  1973. __IO uint32_t MGPCR3; /**< Master General Purpose Control Register, offset: 0xB00 */
  1974. uint8_t RESERVED_4[252];
  1975. __IO uint32_t MGPCR4; /**< Master General Purpose Control Register, offset: 0xC00 */
  1976. } AXBS_Type;
  1977. /* ----------------------------------------------------------------------------
  1978. -- AXBS Register Masks
  1979. ---------------------------------------------------------------------------- */
  1980. /*!
  1981. * @addtogroup AXBS_Register_Masks AXBS Register Masks
  1982. * @{
  1983. */
  1984. /*! @name PRS - Priority Registers Slave */
  1985. #define AXBS_PRS_M0_MASK (0x7U)
  1986. #define AXBS_PRS_M0_SHIFT (0U)
  1987. #define AXBS_PRS_M0(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M0_SHIFT)) & AXBS_PRS_M0_MASK)
  1988. #define AXBS_PRS_M1_MASK (0x70U)
  1989. #define AXBS_PRS_M1_SHIFT (4U)
  1990. #define AXBS_PRS_M1(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M1_SHIFT)) & AXBS_PRS_M1_MASK)
  1991. #define AXBS_PRS_M2_MASK (0x700U)
  1992. #define AXBS_PRS_M2_SHIFT (8U)
  1993. #define AXBS_PRS_M2(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M2_SHIFT)) & AXBS_PRS_M2_MASK)
  1994. #define AXBS_PRS_M3_MASK (0x7000U)
  1995. #define AXBS_PRS_M3_SHIFT (12U)
  1996. #define AXBS_PRS_M3(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M3_SHIFT)) & AXBS_PRS_M3_MASK)
  1997. #define AXBS_PRS_M4_MASK (0x70000U)
  1998. #define AXBS_PRS_M4_SHIFT (16U)
  1999. #define AXBS_PRS_M4(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M4_SHIFT)) & AXBS_PRS_M4_MASK)
  2000. /* The count of AXBS_PRS */
  2001. #define AXBS_PRS_COUNT (6U)
  2002. /*! @name CRS - Control Register */
  2003. #define AXBS_CRS_PARK_MASK (0x7U)
  2004. #define AXBS_CRS_PARK_SHIFT (0U)
  2005. #define AXBS_CRS_PARK(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_PARK_SHIFT)) & AXBS_CRS_PARK_MASK)
  2006. #define AXBS_CRS_PCTL_MASK (0x30U)
  2007. #define AXBS_CRS_PCTL_SHIFT (4U)
  2008. #define AXBS_CRS_PCTL(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_PCTL_SHIFT)) & AXBS_CRS_PCTL_MASK)
  2009. #define AXBS_CRS_ARB_MASK (0x300U)
  2010. #define AXBS_CRS_ARB_SHIFT (8U)
  2011. #define AXBS_CRS_ARB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_ARB_SHIFT)) & AXBS_CRS_ARB_MASK)
  2012. #define AXBS_CRS_HLP_MASK (0x40000000U)
  2013. #define AXBS_CRS_HLP_SHIFT (30U)
  2014. #define AXBS_CRS_HLP(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_HLP_SHIFT)) & AXBS_CRS_HLP_MASK)
  2015. #define AXBS_CRS_RO_MASK (0x80000000U)
  2016. #define AXBS_CRS_RO_SHIFT (31U)
  2017. #define AXBS_CRS_RO(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_RO_SHIFT)) & AXBS_CRS_RO_MASK)
  2018. /* The count of AXBS_CRS */
  2019. #define AXBS_CRS_COUNT (6U)
  2020. /*! @name MGPCR0 - Master General Purpose Control Register */
  2021. #define AXBS_MGPCR0_AULB_MASK (0x7U)
  2022. #define AXBS_MGPCR0_AULB_SHIFT (0U)
  2023. #define AXBS_MGPCR0_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR0_AULB_SHIFT)) & AXBS_MGPCR0_AULB_MASK)
  2024. /*! @name MGPCR1 - Master General Purpose Control Register */
  2025. #define AXBS_MGPCR1_AULB_MASK (0x7U)
  2026. #define AXBS_MGPCR1_AULB_SHIFT (0U)
  2027. #define AXBS_MGPCR1_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR1_AULB_SHIFT)) & AXBS_MGPCR1_AULB_MASK)
  2028. /*! @name MGPCR2 - Master General Purpose Control Register */
  2029. #define AXBS_MGPCR2_AULB_MASK (0x7U)
  2030. #define AXBS_MGPCR2_AULB_SHIFT (0U)
  2031. #define AXBS_MGPCR2_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR2_AULB_SHIFT)) & AXBS_MGPCR2_AULB_MASK)
  2032. /*! @name MGPCR3 - Master General Purpose Control Register */
  2033. #define AXBS_MGPCR3_AULB_MASK (0x7U)
  2034. #define AXBS_MGPCR3_AULB_SHIFT (0U)
  2035. #define AXBS_MGPCR3_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR3_AULB_SHIFT)) & AXBS_MGPCR3_AULB_MASK)
  2036. /*! @name MGPCR4 - Master General Purpose Control Register */
  2037. #define AXBS_MGPCR4_AULB_MASK (0x7U)
  2038. #define AXBS_MGPCR4_AULB_SHIFT (0U)
  2039. #define AXBS_MGPCR4_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR4_AULB_SHIFT)) & AXBS_MGPCR4_AULB_MASK)
  2040. /*!
  2041. * @}
  2042. */ /* end of group AXBS_Register_Masks */
  2043. /* AXBS - Peripheral instance base addresses */
  2044. /** Peripheral AXBS base address */
  2045. #define AXBS_BASE (0x40004000u)
  2046. /** Peripheral AXBS base pointer */
  2047. #define AXBS ((AXBS_Type *)AXBS_BASE)
  2048. /** Array initializer of AXBS peripheral base addresses */
  2049. #define AXBS_BASE_ADDRS { AXBS_BASE }
  2050. /** Array initializer of AXBS peripheral base pointers */
  2051. #define AXBS_BASE_PTRS { AXBS }
  2052. /*!
  2053. * @}
  2054. */ /* end of group AXBS_Peripheral_Access_Layer */
  2055. /* ----------------------------------------------------------------------------
  2056. -- CAU Peripheral Access Layer
  2057. ---------------------------------------------------------------------------- */
  2058. /*!
  2059. * @addtogroup CAU_Peripheral_Access_Layer CAU Peripheral Access Layer
  2060. * @{
  2061. */
  2062. /** CAU - Register Layout Typedef */
  2063. typedef struct {
  2064. __O uint32_t DIRECT[16]; /**< Direct access register 0..Direct access register 15, array offset: 0x0, array step: 0x4 */
  2065. uint8_t RESERVED_0[2048];
  2066. __O uint32_t LDR_CASR; /**< Status register - Load Register command, offset: 0x840 */
  2067. __O uint32_t LDR_CAA; /**< Accumulator register - Load Register command, offset: 0x844 */
  2068. __O uint32_t LDR_CA[9]; /**< General Purpose Register 0 - Load Register command..General Purpose Register 8 - Load Register command, array offset: 0x848, array step: 0x4 */
  2069. uint8_t RESERVED_1[20];
  2070. __I uint32_t STR_CASR; /**< Status register - Store Register command, offset: 0x880 */
  2071. __I uint32_t STR_CAA; /**< Accumulator register - Store Register command, offset: 0x884 */
  2072. __I uint32_t STR_CA[9]; /**< General Purpose Register 0 - Store Register command..General Purpose Register 8 - Store Register command, array offset: 0x888, array step: 0x4 */
  2073. uint8_t RESERVED_2[20];
  2074. __O uint32_t ADR_CASR; /**< Status register - Add Register command, offset: 0x8C0 */
  2075. __O uint32_t ADR_CAA; /**< Accumulator register - Add to register command, offset: 0x8C4 */
  2076. __O uint32_t ADR_CA[9]; /**< General Purpose Register 0 - Add to register command..General Purpose Register 8 - Add to register command, array offset: 0x8C8, array step: 0x4 */
  2077. uint8_t RESERVED_3[20];
  2078. __O uint32_t RADR_CASR; /**< Status register - Reverse and Add to Register command, offset: 0x900 */
  2079. __O uint32_t RADR_CAA; /**< Accumulator register - Reverse and Add to Register command, offset: 0x904 */
  2080. __O uint32_t RADR_CA[9]; /**< General Purpose Register 0 - Reverse and Add to Register command..General Purpose Register 8 - Reverse and Add to Register command, array offset: 0x908, array step: 0x4 */
  2081. uint8_t RESERVED_4[84];
  2082. __O uint32_t XOR_CASR; /**< Status register - Exclusive Or command, offset: 0x980 */
  2083. __O uint32_t XOR_CAA; /**< Accumulator register - Exclusive Or command, offset: 0x984 */
  2084. __O uint32_t XOR_CA[9]; /**< General Purpose Register 0 - Exclusive Or command..General Purpose Register 8 - Exclusive Or command, array offset: 0x988, array step: 0x4 */
  2085. uint8_t RESERVED_5[20];
  2086. __O uint32_t ROTL_CASR; /**< Status register - Rotate Left command, offset: 0x9C0 */
  2087. __O uint32_t ROTL_CAA; /**< Accumulator register - Rotate Left command, offset: 0x9C4 */
  2088. __O uint32_t ROTL_CA[9]; /**< General Purpose Register 0 - Rotate Left command..General Purpose Register 8 - Rotate Left command, array offset: 0x9C8, array step: 0x4 */
  2089. uint8_t RESERVED_6[276];
  2090. __O uint32_t AESC_CASR; /**< Status register - AES Column Operation command, offset: 0xB00 */
  2091. __O uint32_t AESC_CAA; /**< Accumulator register - AES Column Operation command, offset: 0xB04 */
  2092. __O uint32_t AESC_CA[9]; /**< General Purpose Register 0 - AES Column Operation command..General Purpose Register 8 - AES Column Operation command, array offset: 0xB08, array step: 0x4 */
  2093. uint8_t RESERVED_7[20];
  2094. __O uint32_t AESIC_CASR; /**< Status register - AES Inverse Column Operation command, offset: 0xB40 */
  2095. __O uint32_t AESIC_CAA; /**< Accumulator register - AES Inverse Column Operation command, offset: 0xB44 */
  2096. __O uint32_t AESIC_CA[9]; /**< General Purpose Register 0 - AES Inverse Column Operation command..General Purpose Register 8 - AES Inverse Column Operation command, array offset: 0xB48, array step: 0x4 */
  2097. } CAU_Type;
  2098. /* ----------------------------------------------------------------------------
  2099. -- CAU Register Masks
  2100. ---------------------------------------------------------------------------- */
  2101. /*!
  2102. * @addtogroup CAU_Register_Masks CAU Register Masks
  2103. * @{
  2104. */
  2105. /*! @name DIRECT - Direct access register 0..Direct access register 15 */
  2106. #define CAU_DIRECT_CAU_DIRECT0_MASK (0xFFFFFFFFU)
  2107. #define CAU_DIRECT_CAU_DIRECT0_SHIFT (0U)
  2108. #define CAU_DIRECT_CAU_DIRECT0(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT0_SHIFT)) & CAU_DIRECT_CAU_DIRECT0_MASK)
  2109. #define CAU_DIRECT_CAU_DIRECT1_MASK (0xFFFFFFFFU)
  2110. #define CAU_DIRECT_CAU_DIRECT1_SHIFT (0U)
  2111. #define CAU_DIRECT_CAU_DIRECT1(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT1_SHIFT)) & CAU_DIRECT_CAU_DIRECT1_MASK)
  2112. #define CAU_DIRECT_CAU_DIRECT2_MASK (0xFFFFFFFFU)
  2113. #define CAU_DIRECT_CAU_DIRECT2_SHIFT (0U)
  2114. #define CAU_DIRECT_CAU_DIRECT2(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT2_SHIFT)) & CAU_DIRECT_CAU_DIRECT2_MASK)
  2115. #define CAU_DIRECT_CAU_DIRECT3_MASK (0xFFFFFFFFU)
  2116. #define CAU_DIRECT_CAU_DIRECT3_SHIFT (0U)
  2117. #define CAU_DIRECT_CAU_DIRECT3(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT3_SHIFT)) & CAU_DIRECT_CAU_DIRECT3_MASK)
  2118. #define CAU_DIRECT_CAU_DIRECT4_MASK (0xFFFFFFFFU)
  2119. #define CAU_DIRECT_CAU_DIRECT4_SHIFT (0U)
  2120. #define CAU_DIRECT_CAU_DIRECT4(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT4_SHIFT)) & CAU_DIRECT_CAU_DIRECT4_MASK)
  2121. #define CAU_DIRECT_CAU_DIRECT5_MASK (0xFFFFFFFFU)
  2122. #define CAU_DIRECT_CAU_DIRECT5_SHIFT (0U)
  2123. #define CAU_DIRECT_CAU_DIRECT5(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT5_SHIFT)) & CAU_DIRECT_CAU_DIRECT5_MASK)
  2124. #define CAU_DIRECT_CAU_DIRECT6_MASK (0xFFFFFFFFU)
  2125. #define CAU_DIRECT_CAU_DIRECT6_SHIFT (0U)
  2126. #define CAU_DIRECT_CAU_DIRECT6(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT6_SHIFT)) & CAU_DIRECT_CAU_DIRECT6_MASK)
  2127. #define CAU_DIRECT_CAU_DIRECT7_MASK (0xFFFFFFFFU)
  2128. #define CAU_DIRECT_CAU_DIRECT7_SHIFT (0U)
  2129. #define CAU_DIRECT_CAU_DIRECT7(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT7_SHIFT)) & CAU_DIRECT_CAU_DIRECT7_MASK)
  2130. #define CAU_DIRECT_CAU_DIRECT8_MASK (0xFFFFFFFFU)
  2131. #define CAU_DIRECT_CAU_DIRECT8_SHIFT (0U)
  2132. #define CAU_DIRECT_CAU_DIRECT8(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT8_SHIFT)) & CAU_DIRECT_CAU_DIRECT8_MASK)
  2133. #define CAU_DIRECT_CAU_DIRECT9_MASK (0xFFFFFFFFU)
  2134. #define CAU_DIRECT_CAU_DIRECT9_SHIFT (0U)
  2135. #define CAU_DIRECT_CAU_DIRECT9(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT9_SHIFT)) & CAU_DIRECT_CAU_DIRECT9_MASK)
  2136. #define CAU_DIRECT_CAU_DIRECT10_MASK (0xFFFFFFFFU)
  2137. #define CAU_DIRECT_CAU_DIRECT10_SHIFT (0U)
  2138. #define CAU_DIRECT_CAU_DIRECT10(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT10_SHIFT)) & CAU_DIRECT_CAU_DIRECT10_MASK)
  2139. #define CAU_DIRECT_CAU_DIRECT11_MASK (0xFFFFFFFFU)
  2140. #define CAU_DIRECT_CAU_DIRECT11_SHIFT (0U)
  2141. #define CAU_DIRECT_CAU_DIRECT11(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT11_SHIFT)) & CAU_DIRECT_CAU_DIRECT11_MASK)
  2142. #define CAU_DIRECT_CAU_DIRECT12_MASK (0xFFFFFFFFU)
  2143. #define CAU_DIRECT_CAU_DIRECT12_SHIFT (0U)
  2144. #define CAU_DIRECT_CAU_DIRECT12(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT12_SHIFT)) & CAU_DIRECT_CAU_DIRECT12_MASK)
  2145. #define CAU_DIRECT_CAU_DIRECT13_MASK (0xFFFFFFFFU)
  2146. #define CAU_DIRECT_CAU_DIRECT13_SHIFT (0U)
  2147. #define CAU_DIRECT_CAU_DIRECT13(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT13_SHIFT)) & CAU_DIRECT_CAU_DIRECT13_MASK)
  2148. #define CAU_DIRECT_CAU_DIRECT14_MASK (0xFFFFFFFFU)
  2149. #define CAU_DIRECT_CAU_DIRECT14_SHIFT (0U)
  2150. #define CAU_DIRECT_CAU_DIRECT14(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT14_SHIFT)) & CAU_DIRECT_CAU_DIRECT14_MASK)
  2151. #define CAU_DIRECT_CAU_DIRECT15_MASK (0xFFFFFFFFU)
  2152. #define CAU_DIRECT_CAU_DIRECT15_SHIFT (0U)
  2153. #define CAU_DIRECT_CAU_DIRECT15(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT15_SHIFT)) & CAU_DIRECT_CAU_DIRECT15_MASK)
  2154. /* The count of CAU_DIRECT */
  2155. #define CAU_DIRECT_COUNT (16U)
  2156. /*! @name LDR_CASR - Status register - Load Register command */
  2157. #define CAU_LDR_CASR_IC_MASK (0x1U)
  2158. #define CAU_LDR_CASR_IC_SHIFT (0U)
  2159. #define CAU_LDR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CASR_IC_SHIFT)) & CAU_LDR_CASR_IC_MASK)
  2160. #define CAU_LDR_CASR_DPE_MASK (0x2U)
  2161. #define CAU_LDR_CASR_DPE_SHIFT (1U)
  2162. #define CAU_LDR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CASR_DPE_SHIFT)) & CAU_LDR_CASR_DPE_MASK)
  2163. #define CAU_LDR_CASR_VER_MASK (0xF0000000U)
  2164. #define CAU_LDR_CASR_VER_SHIFT (28U)
  2165. #define CAU_LDR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CASR_VER_SHIFT)) & CAU_LDR_CASR_VER_MASK)
  2166. /*! @name LDR_CAA - Accumulator register - Load Register command */
  2167. #define CAU_LDR_CAA_ACC_MASK (0xFFFFFFFFU)
  2168. #define CAU_LDR_CAA_ACC_SHIFT (0U)
  2169. #define CAU_LDR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CAA_ACC_SHIFT)) & CAU_LDR_CAA_ACC_MASK)
  2170. /*! @name LDR_CA - General Purpose Register 0 - Load Register command..General Purpose Register 8 - Load Register command */
  2171. #define CAU_LDR_CA_CA0_MASK (0xFFFFFFFFU)
  2172. #define CAU_LDR_CA_CA0_SHIFT (0U)
  2173. #define CAU_LDR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA0_SHIFT)) & CAU_LDR_CA_CA0_MASK)
  2174. #define CAU_LDR_CA_CA1_MASK (0xFFFFFFFFU)
  2175. #define CAU_LDR_CA_CA1_SHIFT (0U)
  2176. #define CAU_LDR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA1_SHIFT)) & CAU_LDR_CA_CA1_MASK)
  2177. #define CAU_LDR_CA_CA2_MASK (0xFFFFFFFFU)
  2178. #define CAU_LDR_CA_CA2_SHIFT (0U)
  2179. #define CAU_LDR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA2_SHIFT)) & CAU_LDR_CA_CA2_MASK)
  2180. #define CAU_LDR_CA_CA3_MASK (0xFFFFFFFFU)
  2181. #define CAU_LDR_CA_CA3_SHIFT (0U)
  2182. #define CAU_LDR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA3_SHIFT)) & CAU_LDR_CA_CA3_MASK)
  2183. #define CAU_LDR_CA_CA4_MASK (0xFFFFFFFFU)
  2184. #define CAU_LDR_CA_CA4_SHIFT (0U)
  2185. #define CAU_LDR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA4_SHIFT)) & CAU_LDR_CA_CA4_MASK)
  2186. #define CAU_LDR_CA_CA5_MASK (0xFFFFFFFFU)
  2187. #define CAU_LDR_CA_CA5_SHIFT (0U)
  2188. #define CAU_LDR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA5_SHIFT)) & CAU_LDR_CA_CA5_MASK)
  2189. #define CAU_LDR_CA_CA6_MASK (0xFFFFFFFFU)
  2190. #define CAU_LDR_CA_CA6_SHIFT (0U)
  2191. #define CAU_LDR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA6_SHIFT)) & CAU_LDR_CA_CA6_MASK)
  2192. #define CAU_LDR_CA_CA7_MASK (0xFFFFFFFFU)
  2193. #define CAU_LDR_CA_CA7_SHIFT (0U)
  2194. #define CAU_LDR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA7_SHIFT)) & CAU_LDR_CA_CA7_MASK)
  2195. #define CAU_LDR_CA_CA8_MASK (0xFFFFFFFFU)
  2196. #define CAU_LDR_CA_CA8_SHIFT (0U)
  2197. #define CAU_LDR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA8_SHIFT)) & CAU_LDR_CA_CA8_MASK)
  2198. /* The count of CAU_LDR_CA */
  2199. #define CAU_LDR_CA_COUNT (9U)
  2200. /*! @name STR_CASR - Status register - Store Register command */
  2201. #define CAU_STR_CASR_IC_MASK (0x1U)
  2202. #define CAU_STR_CASR_IC_SHIFT (0U)
  2203. #define CAU_STR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CASR_IC_SHIFT)) & CAU_STR_CASR_IC_MASK)
  2204. #define CAU_STR_CASR_DPE_MASK (0x2U)
  2205. #define CAU_STR_CASR_DPE_SHIFT (1U)
  2206. #define CAU_STR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CASR_DPE_SHIFT)) & CAU_STR_CASR_DPE_MASK)
  2207. #define CAU_STR_CASR_VER_MASK (0xF0000000U)
  2208. #define CAU_STR_CASR_VER_SHIFT (28U)
  2209. #define CAU_STR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CASR_VER_SHIFT)) & CAU_STR_CASR_VER_MASK)
  2210. /*! @name STR_CAA - Accumulator register - Store Register command */
  2211. #define CAU_STR_CAA_ACC_MASK (0xFFFFFFFFU)
  2212. #define CAU_STR_CAA_ACC_SHIFT (0U)
  2213. #define CAU_STR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CAA_ACC_SHIFT)) & CAU_STR_CAA_ACC_MASK)
  2214. /*! @name STR_CA - General Purpose Register 0 - Store Register command..General Purpose Register 8 - Store Register command */
  2215. #define CAU_STR_CA_CA0_MASK (0xFFFFFFFFU)
  2216. #define CAU_STR_CA_CA0_SHIFT (0U)
  2217. #define CAU_STR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA0_SHIFT)) & CAU_STR_CA_CA0_MASK)
  2218. #define CAU_STR_CA_CA1_MASK (0xFFFFFFFFU)
  2219. #define CAU_STR_CA_CA1_SHIFT (0U)
  2220. #define CAU_STR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA1_SHIFT)) & CAU_STR_CA_CA1_MASK)
  2221. #define CAU_STR_CA_CA2_MASK (0xFFFFFFFFU)
  2222. #define CAU_STR_CA_CA2_SHIFT (0U)
  2223. #define CAU_STR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA2_SHIFT)) & CAU_STR_CA_CA2_MASK)
  2224. #define CAU_STR_CA_CA3_MASK (0xFFFFFFFFU)
  2225. #define CAU_STR_CA_CA3_SHIFT (0U)
  2226. #define CAU_STR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA3_SHIFT)) & CAU_STR_CA_CA3_MASK)
  2227. #define CAU_STR_CA_CA4_MASK (0xFFFFFFFFU)
  2228. #define CAU_STR_CA_CA4_SHIFT (0U)
  2229. #define CAU_STR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA4_SHIFT)) & CAU_STR_CA_CA4_MASK)
  2230. #define CAU_STR_CA_CA5_MASK (0xFFFFFFFFU)
  2231. #define CAU_STR_CA_CA5_SHIFT (0U)
  2232. #define CAU_STR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA5_SHIFT)) & CAU_STR_CA_CA5_MASK)
  2233. #define CAU_STR_CA_CA6_MASK (0xFFFFFFFFU)
  2234. #define CAU_STR_CA_CA6_SHIFT (0U)
  2235. #define CAU_STR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA6_SHIFT)) & CAU_STR_CA_CA6_MASK)
  2236. #define CAU_STR_CA_CA7_MASK (0xFFFFFFFFU)
  2237. #define CAU_STR_CA_CA7_SHIFT (0U)
  2238. #define CAU_STR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA7_SHIFT)) & CAU_STR_CA_CA7_MASK)
  2239. #define CAU_STR_CA_CA8_MASK (0xFFFFFFFFU)
  2240. #define CAU_STR_CA_CA8_SHIFT (0U)
  2241. #define CAU_STR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA8_SHIFT)) & CAU_STR_CA_CA8_MASK)
  2242. /* The count of CAU_STR_CA */
  2243. #define CAU_STR_CA_COUNT (9U)
  2244. /*! @name ADR_CASR - Status register - Add Register command */
  2245. #define CAU_ADR_CASR_IC_MASK (0x1U)
  2246. #define CAU_ADR_CASR_IC_SHIFT (0U)
  2247. #define CAU_ADR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CASR_IC_SHIFT)) & CAU_ADR_CASR_IC_MASK)
  2248. #define CAU_ADR_CASR_DPE_MASK (0x2U)
  2249. #define CAU_ADR_CASR_DPE_SHIFT (1U)
  2250. #define CAU_ADR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CASR_DPE_SHIFT)) & CAU_ADR_CASR_DPE_MASK)
  2251. #define CAU_ADR_CASR_VER_MASK (0xF0000000U)
  2252. #define CAU_ADR_CASR_VER_SHIFT (28U)
  2253. #define CAU_ADR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CASR_VER_SHIFT)) & CAU_ADR_CASR_VER_MASK)
  2254. /*! @name ADR_CAA - Accumulator register - Add to register command */
  2255. #define CAU_ADR_CAA_ACC_MASK (0xFFFFFFFFU)
  2256. #define CAU_ADR_CAA_ACC_SHIFT (0U)
  2257. #define CAU_ADR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CAA_ACC_SHIFT)) & CAU_ADR_CAA_ACC_MASK)
  2258. /*! @name ADR_CA - General Purpose Register 0 - Add to register command..General Purpose Register 8 - Add to register command */
  2259. #define CAU_ADR_CA_CA0_MASK (0xFFFFFFFFU)
  2260. #define CAU_ADR_CA_CA0_SHIFT (0U)
  2261. #define CAU_ADR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA0_SHIFT)) & CAU_ADR_CA_CA0_MASK)
  2262. #define CAU_ADR_CA_CA1_MASK (0xFFFFFFFFU)
  2263. #define CAU_ADR_CA_CA1_SHIFT (0U)
  2264. #define CAU_ADR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA1_SHIFT)) & CAU_ADR_CA_CA1_MASK)
  2265. #define CAU_ADR_CA_CA2_MASK (0xFFFFFFFFU)
  2266. #define CAU_ADR_CA_CA2_SHIFT (0U)
  2267. #define CAU_ADR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA2_SHIFT)) & CAU_ADR_CA_CA2_MASK)
  2268. #define CAU_ADR_CA_CA3_MASK (0xFFFFFFFFU)
  2269. #define CAU_ADR_CA_CA3_SHIFT (0U)
  2270. #define CAU_ADR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA3_SHIFT)) & CAU_ADR_CA_CA3_MASK)
  2271. #define CAU_ADR_CA_CA4_MASK (0xFFFFFFFFU)
  2272. #define CAU_ADR_CA_CA4_SHIFT (0U)
  2273. #define CAU_ADR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA4_SHIFT)) & CAU_ADR_CA_CA4_MASK)
  2274. #define CAU_ADR_CA_CA5_MASK (0xFFFFFFFFU)
  2275. #define CAU_ADR_CA_CA5_SHIFT (0U)
  2276. #define CAU_ADR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA5_SHIFT)) & CAU_ADR_CA_CA5_MASK)
  2277. #define CAU_ADR_CA_CA6_MASK (0xFFFFFFFFU)
  2278. #define CAU_ADR_CA_CA6_SHIFT (0U)
  2279. #define CAU_ADR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA6_SHIFT)) & CAU_ADR_CA_CA6_MASK)
  2280. #define CAU_ADR_CA_CA7_MASK (0xFFFFFFFFU)
  2281. #define CAU_ADR_CA_CA7_SHIFT (0U)
  2282. #define CAU_ADR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA7_SHIFT)) & CAU_ADR_CA_CA7_MASK)
  2283. #define CAU_ADR_CA_CA8_MASK (0xFFFFFFFFU)
  2284. #define CAU_ADR_CA_CA8_SHIFT (0U)
  2285. #define CAU_ADR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA8_SHIFT)) & CAU_ADR_CA_CA8_MASK)
  2286. /* The count of CAU_ADR_CA */
  2287. #define CAU_ADR_CA_COUNT (9U)
  2288. /*! @name RADR_CASR - Status register - Reverse and Add to Register command */
  2289. #define CAU_RADR_CASR_IC_MASK (0x1U)
  2290. #define CAU_RADR_CASR_IC_SHIFT (0U)
  2291. #define CAU_RADR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CASR_IC_SHIFT)) & CAU_RADR_CASR_IC_MASK)
  2292. #define CAU_RADR_CASR_DPE_MASK (0x2U)
  2293. #define CAU_RADR_CASR_DPE_SHIFT (1U)
  2294. #define CAU_RADR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CASR_DPE_SHIFT)) & CAU_RADR_CASR_DPE_MASK)
  2295. #define CAU_RADR_CASR_VER_MASK (0xF0000000U)
  2296. #define CAU_RADR_CASR_VER_SHIFT (28U)
  2297. #define CAU_RADR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CASR_VER_SHIFT)) & CAU_RADR_CASR_VER_MASK)
  2298. /*! @name RADR_CAA - Accumulator register - Reverse and Add to Register command */
  2299. #define CAU_RADR_CAA_ACC_MASK (0xFFFFFFFFU)
  2300. #define CAU_RADR_CAA_ACC_SHIFT (0U)
  2301. #define CAU_RADR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CAA_ACC_SHIFT)) & CAU_RADR_CAA_ACC_MASK)
  2302. /*! @name RADR_CA - General Purpose Register 0 - Reverse and Add to Register command..General Purpose Register 8 - Reverse and Add to Register command */
  2303. #define CAU_RADR_CA_CA0_MASK (0xFFFFFFFFU)
  2304. #define CAU_RADR_CA_CA0_SHIFT (0U)
  2305. #define CAU_RADR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA0_SHIFT)) & CAU_RADR_CA_CA0_MASK)
  2306. #define CAU_RADR_CA_CA1_MASK (0xFFFFFFFFU)
  2307. #define CAU_RADR_CA_CA1_SHIFT (0U)
  2308. #define CAU_RADR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA1_SHIFT)) & CAU_RADR_CA_CA1_MASK)
  2309. #define CAU_RADR_CA_CA2_MASK (0xFFFFFFFFU)
  2310. #define CAU_RADR_CA_CA2_SHIFT (0U)
  2311. #define CAU_RADR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA2_SHIFT)) & CAU_RADR_CA_CA2_MASK)
  2312. #define CAU_RADR_CA_CA3_MASK (0xFFFFFFFFU)
  2313. #define CAU_RADR_CA_CA3_SHIFT (0U)
  2314. #define CAU_RADR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA3_SHIFT)) & CAU_RADR_CA_CA3_MASK)
  2315. #define CAU_RADR_CA_CA4_MASK (0xFFFFFFFFU)
  2316. #define CAU_RADR_CA_CA4_SHIFT (0U)
  2317. #define CAU_RADR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA4_SHIFT)) & CAU_RADR_CA_CA4_MASK)
  2318. #define CAU_RADR_CA_CA5_MASK (0xFFFFFFFFU)
  2319. #define CAU_RADR_CA_CA5_SHIFT (0U)
  2320. #define CAU_RADR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA5_SHIFT)) & CAU_RADR_CA_CA5_MASK)
  2321. #define CAU_RADR_CA_CA6_MASK (0xFFFFFFFFU)
  2322. #define CAU_RADR_CA_CA6_SHIFT (0U)
  2323. #define CAU_RADR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA6_SHIFT)) & CAU_RADR_CA_CA6_MASK)
  2324. #define CAU_RADR_CA_CA7_MASK (0xFFFFFFFFU)
  2325. #define CAU_RADR_CA_CA7_SHIFT (0U)
  2326. #define CAU_RADR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA7_SHIFT)) & CAU_RADR_CA_CA7_MASK)
  2327. #define CAU_RADR_CA_CA8_MASK (0xFFFFFFFFU)
  2328. #define CAU_RADR_CA_CA8_SHIFT (0U)
  2329. #define CAU_RADR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA8_SHIFT)) & CAU_RADR_CA_CA8_MASK)
  2330. /* The count of CAU_RADR_CA */
  2331. #define CAU_RADR_CA_COUNT (9U)
  2332. /*! @name XOR_CASR - Status register - Exclusive Or command */
  2333. #define CAU_XOR_CASR_IC_MASK (0x1U)
  2334. #define CAU_XOR_CASR_IC_SHIFT (0U)
  2335. #define CAU_XOR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CASR_IC_SHIFT)) & CAU_XOR_CASR_IC_MASK)
  2336. #define CAU_XOR_CASR_DPE_MASK (0x2U)
  2337. #define CAU_XOR_CASR_DPE_SHIFT (1U)
  2338. #define CAU_XOR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CASR_DPE_SHIFT)) & CAU_XOR_CASR_DPE_MASK)
  2339. #define CAU_XOR_CASR_VER_MASK (0xF0000000U)
  2340. #define CAU_XOR_CASR_VER_SHIFT (28U)
  2341. #define CAU_XOR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CASR_VER_SHIFT)) & CAU_XOR_CASR_VER_MASK)
  2342. /*! @name XOR_CAA - Accumulator register - Exclusive Or command */
  2343. #define CAU_XOR_CAA_ACC_MASK (0xFFFFFFFFU)
  2344. #define CAU_XOR_CAA_ACC_SHIFT (0U)
  2345. #define CAU_XOR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CAA_ACC_SHIFT)) & CAU_XOR_CAA_ACC_MASK)
  2346. /*! @name XOR_CA - General Purpose Register 0 - Exclusive Or command..General Purpose Register 8 - Exclusive Or command */
  2347. #define CAU_XOR_CA_CA0_MASK (0xFFFFFFFFU)
  2348. #define CAU_XOR_CA_CA0_SHIFT (0U)
  2349. #define CAU_XOR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA0_SHIFT)) & CAU_XOR_CA_CA0_MASK)
  2350. #define CAU_XOR_CA_CA1_MASK (0xFFFFFFFFU)
  2351. #define CAU_XOR_CA_CA1_SHIFT (0U)
  2352. #define CAU_XOR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA1_SHIFT)) & CAU_XOR_CA_CA1_MASK)
  2353. #define CAU_XOR_CA_CA2_MASK (0xFFFFFFFFU)
  2354. #define CAU_XOR_CA_CA2_SHIFT (0U)
  2355. #define CAU_XOR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA2_SHIFT)) & CAU_XOR_CA_CA2_MASK)
  2356. #define CAU_XOR_CA_CA3_MASK (0xFFFFFFFFU)
  2357. #define CAU_XOR_CA_CA3_SHIFT (0U)
  2358. #define CAU_XOR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA3_SHIFT)) & CAU_XOR_CA_CA3_MASK)
  2359. #define CAU_XOR_CA_CA4_MASK (0xFFFFFFFFU)
  2360. #define CAU_XOR_CA_CA4_SHIFT (0U)
  2361. #define CAU_XOR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA4_SHIFT)) & CAU_XOR_CA_CA4_MASK)
  2362. #define CAU_XOR_CA_CA5_MASK (0xFFFFFFFFU)
  2363. #define CAU_XOR_CA_CA5_SHIFT (0U)
  2364. #define CAU_XOR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA5_SHIFT)) & CAU_XOR_CA_CA5_MASK)
  2365. #define CAU_XOR_CA_CA6_MASK (0xFFFFFFFFU)
  2366. #define CAU_XOR_CA_CA6_SHIFT (0U)
  2367. #define CAU_XOR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA6_SHIFT)) & CAU_XOR_CA_CA6_MASK)
  2368. #define CAU_XOR_CA_CA7_MASK (0xFFFFFFFFU)
  2369. #define CAU_XOR_CA_CA7_SHIFT (0U)
  2370. #define CAU_XOR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA7_SHIFT)) & CAU_XOR_CA_CA7_MASK)
  2371. #define CAU_XOR_CA_CA8_MASK (0xFFFFFFFFU)
  2372. #define CAU_XOR_CA_CA8_SHIFT (0U)
  2373. #define CAU_XOR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA8_SHIFT)) & CAU_XOR_CA_CA8_MASK)
  2374. /* The count of CAU_XOR_CA */
  2375. #define CAU_XOR_CA_COUNT (9U)
  2376. /*! @name ROTL_CASR - Status register - Rotate Left command */
  2377. #define CAU_ROTL_CASR_IC_MASK (0x1U)
  2378. #define CAU_ROTL_CASR_IC_SHIFT (0U)
  2379. #define CAU_ROTL_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CASR_IC_SHIFT)) & CAU_ROTL_CASR_IC_MASK)
  2380. #define CAU_ROTL_CASR_DPE_MASK (0x2U)
  2381. #define CAU_ROTL_CASR_DPE_SHIFT (1U)
  2382. #define CAU_ROTL_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CASR_DPE_SHIFT)) & CAU_ROTL_CASR_DPE_MASK)
  2383. #define CAU_ROTL_CASR_VER_MASK (0xF0000000U)
  2384. #define CAU_ROTL_CASR_VER_SHIFT (28U)
  2385. #define CAU_ROTL_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CASR_VER_SHIFT)) & CAU_ROTL_CASR_VER_MASK)
  2386. /*! @name ROTL_CAA - Accumulator register - Rotate Left command */
  2387. #define CAU_ROTL_CAA_ACC_MASK (0xFFFFFFFFU)
  2388. #define CAU_ROTL_CAA_ACC_SHIFT (0U)
  2389. #define CAU_ROTL_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CAA_ACC_SHIFT)) & CAU_ROTL_CAA_ACC_MASK)
  2390. /*! @name ROTL_CA - General Purpose Register 0 - Rotate Left command..General Purpose Register 8 - Rotate Left command */
  2391. #define CAU_ROTL_CA_CA0_MASK (0xFFFFFFFFU)
  2392. #define CAU_ROTL_CA_CA0_SHIFT (0U)
  2393. #define CAU_ROTL_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA0_SHIFT)) & CAU_ROTL_CA_CA0_MASK)
  2394. #define CAU_ROTL_CA_CA1_MASK (0xFFFFFFFFU)
  2395. #define CAU_ROTL_CA_CA1_SHIFT (0U)
  2396. #define CAU_ROTL_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA1_SHIFT)) & CAU_ROTL_CA_CA1_MASK)
  2397. #define CAU_ROTL_CA_CA2_MASK (0xFFFFFFFFU)
  2398. #define CAU_ROTL_CA_CA2_SHIFT (0U)
  2399. #define CAU_ROTL_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA2_SHIFT)) & CAU_ROTL_CA_CA2_MASK)
  2400. #define CAU_ROTL_CA_CA3_MASK (0xFFFFFFFFU)
  2401. #define CAU_ROTL_CA_CA3_SHIFT (0U)
  2402. #define CAU_ROTL_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA3_SHIFT)) & CAU_ROTL_CA_CA3_MASK)
  2403. #define CAU_ROTL_CA_CA4_MASK (0xFFFFFFFFU)
  2404. #define CAU_ROTL_CA_CA4_SHIFT (0U)
  2405. #define CAU_ROTL_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA4_SHIFT)) & CAU_ROTL_CA_CA4_MASK)
  2406. #define CAU_ROTL_CA_CA5_MASK (0xFFFFFFFFU)
  2407. #define CAU_ROTL_CA_CA5_SHIFT (0U)
  2408. #define CAU_ROTL_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA5_SHIFT)) & CAU_ROTL_CA_CA5_MASK)
  2409. #define CAU_ROTL_CA_CA6_MASK (0xFFFFFFFFU)
  2410. #define CAU_ROTL_CA_CA6_SHIFT (0U)
  2411. #define CAU_ROTL_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA6_SHIFT)) & CAU_ROTL_CA_CA6_MASK)
  2412. #define CAU_ROTL_CA_CA7_MASK (0xFFFFFFFFU)
  2413. #define CAU_ROTL_CA_CA7_SHIFT (0U)
  2414. #define CAU_ROTL_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA7_SHIFT)) & CAU_ROTL_CA_CA7_MASK)
  2415. #define CAU_ROTL_CA_CA8_MASK (0xFFFFFFFFU)
  2416. #define CAU_ROTL_CA_CA8_SHIFT (0U)
  2417. #define CAU_ROTL_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA8_SHIFT)) & CAU_ROTL_CA_CA8_MASK)
  2418. /* The count of CAU_ROTL_CA */
  2419. #define CAU_ROTL_CA_COUNT (9U)
  2420. /*! @name AESC_CASR - Status register - AES Column Operation command */
  2421. #define CAU_AESC_CASR_IC_MASK (0x1U)
  2422. #define CAU_AESC_CASR_IC_SHIFT (0U)
  2423. #define CAU_AESC_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CASR_IC_SHIFT)) & CAU_AESC_CASR_IC_MASK)
  2424. #define CAU_AESC_CASR_DPE_MASK (0x2U)
  2425. #define CAU_AESC_CASR_DPE_SHIFT (1U)
  2426. #define CAU_AESC_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CASR_DPE_SHIFT)) & CAU_AESC_CASR_DPE_MASK)
  2427. #define CAU_AESC_CASR_VER_MASK (0xF0000000U)
  2428. #define CAU_AESC_CASR_VER_SHIFT (28U)
  2429. #define CAU_AESC_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CASR_VER_SHIFT)) & CAU_AESC_CASR_VER_MASK)
  2430. /*! @name AESC_CAA - Accumulator register - AES Column Operation command */
  2431. #define CAU_AESC_CAA_ACC_MASK (0xFFFFFFFFU)
  2432. #define CAU_AESC_CAA_ACC_SHIFT (0U)
  2433. #define CAU_AESC_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CAA_ACC_SHIFT)) & CAU_AESC_CAA_ACC_MASK)
  2434. /*! @name AESC_CA - General Purpose Register 0 - AES Column Operation command..General Purpose Register 8 - AES Column Operation command */
  2435. #define CAU_AESC_CA_CA0_MASK (0xFFFFFFFFU)
  2436. #define CAU_AESC_CA_CA0_SHIFT (0U)
  2437. #define CAU_AESC_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA0_SHIFT)) & CAU_AESC_CA_CA0_MASK)
  2438. #define CAU_AESC_CA_CA1_MASK (0xFFFFFFFFU)
  2439. #define CAU_AESC_CA_CA1_SHIFT (0U)
  2440. #define CAU_AESC_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA1_SHIFT)) & CAU_AESC_CA_CA1_MASK)
  2441. #define CAU_AESC_CA_CA2_MASK (0xFFFFFFFFU)
  2442. #define CAU_AESC_CA_CA2_SHIFT (0U)
  2443. #define CAU_AESC_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA2_SHIFT)) & CAU_AESC_CA_CA2_MASK)
  2444. #define CAU_AESC_CA_CA3_MASK (0xFFFFFFFFU)
  2445. #define CAU_AESC_CA_CA3_SHIFT (0U)
  2446. #define CAU_AESC_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA3_SHIFT)) & CAU_AESC_CA_CA3_MASK)
  2447. #define CAU_AESC_CA_CA4_MASK (0xFFFFFFFFU)
  2448. #define CAU_AESC_CA_CA4_SHIFT (0U)
  2449. #define CAU_AESC_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA4_SHIFT)) & CAU_AESC_CA_CA4_MASK)
  2450. #define CAU_AESC_CA_CA5_MASK (0xFFFFFFFFU)
  2451. #define CAU_AESC_CA_CA5_SHIFT (0U)
  2452. #define CAU_AESC_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA5_SHIFT)) & CAU_AESC_CA_CA5_MASK)
  2453. #define CAU_AESC_CA_CA6_MASK (0xFFFFFFFFU)
  2454. #define CAU_AESC_CA_CA6_SHIFT (0U)
  2455. #define CAU_AESC_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA6_SHIFT)) & CAU_AESC_CA_CA6_MASK)
  2456. #define CAU_AESC_CA_CA7_MASK (0xFFFFFFFFU)
  2457. #define CAU_AESC_CA_CA7_SHIFT (0U)
  2458. #define CAU_AESC_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA7_SHIFT)) & CAU_AESC_CA_CA7_MASK)
  2459. #define CAU_AESC_CA_CA8_MASK (0xFFFFFFFFU)
  2460. #define CAU_AESC_CA_CA8_SHIFT (0U)
  2461. #define CAU_AESC_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA8_SHIFT)) & CAU_AESC_CA_CA8_MASK)
  2462. /* The count of CAU_AESC_CA */
  2463. #define CAU_AESC_CA_COUNT (9U)
  2464. /*! @name AESIC_CASR - Status register - AES Inverse Column Operation command */
  2465. #define CAU_AESIC_CASR_IC_MASK (0x1U)
  2466. #define CAU_AESIC_CASR_IC_SHIFT (0U)
  2467. #define CAU_AESIC_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CASR_IC_SHIFT)) & CAU_AESIC_CASR_IC_MASK)
  2468. #define CAU_AESIC_CASR_DPE_MASK (0x2U)
  2469. #define CAU_AESIC_CASR_DPE_SHIFT (1U)
  2470. #define CAU_AESIC_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CASR_DPE_SHIFT)) & CAU_AESIC_CASR_DPE_MASK)
  2471. #define CAU_AESIC_CASR_VER_MASK (0xF0000000U)
  2472. #define CAU_AESIC_CASR_VER_SHIFT (28U)
  2473. #define CAU_AESIC_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CASR_VER_SHIFT)) & CAU_AESIC_CASR_VER_MASK)
  2474. /*! @name AESIC_CAA - Accumulator register - AES Inverse Column Operation command */
  2475. #define CAU_AESIC_CAA_ACC_MASK (0xFFFFFFFFU)
  2476. #define CAU_AESIC_CAA_ACC_SHIFT (0U)
  2477. #define CAU_AESIC_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CAA_ACC_SHIFT)) & CAU_AESIC_CAA_ACC_MASK)
  2478. /*! @name AESIC_CA - General Purpose Register 0 - AES Inverse Column Operation command..General Purpose Register 8 - AES Inverse Column Operation command */
  2479. #define CAU_AESIC_CA_CA0_MASK (0xFFFFFFFFU)
  2480. #define CAU_AESIC_CA_CA0_SHIFT (0U)
  2481. #define CAU_AESIC_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA0_SHIFT)) & CAU_AESIC_CA_CA0_MASK)
  2482. #define CAU_AESIC_CA_CA1_MASK (0xFFFFFFFFU)
  2483. #define CAU_AESIC_CA_CA1_SHIFT (0U)
  2484. #define CAU_AESIC_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA1_SHIFT)) & CAU_AESIC_CA_CA1_MASK)
  2485. #define CAU_AESIC_CA_CA2_MASK (0xFFFFFFFFU)
  2486. #define CAU_AESIC_CA_CA2_SHIFT (0U)
  2487. #define CAU_AESIC_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA2_SHIFT)) & CAU_AESIC_CA_CA2_MASK)
  2488. #define CAU_AESIC_CA_CA3_MASK (0xFFFFFFFFU)
  2489. #define CAU_AESIC_CA_CA3_SHIFT (0U)
  2490. #define CAU_AESIC_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA3_SHIFT)) & CAU_AESIC_CA_CA3_MASK)
  2491. #define CAU_AESIC_CA_CA4_MASK (0xFFFFFFFFU)
  2492. #define CAU_AESIC_CA_CA4_SHIFT (0U)
  2493. #define CAU_AESIC_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA4_SHIFT)) & CAU_AESIC_CA_CA4_MASK)
  2494. #define CAU_AESIC_CA_CA5_MASK (0xFFFFFFFFU)
  2495. #define CAU_AESIC_CA_CA5_SHIFT (0U)
  2496. #define CAU_AESIC_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA5_SHIFT)) & CAU_AESIC_CA_CA5_MASK)
  2497. #define CAU_AESIC_CA_CA6_MASK (0xFFFFFFFFU)
  2498. #define CAU_AESIC_CA_CA6_SHIFT (0U)
  2499. #define CAU_AESIC_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA6_SHIFT)) & CAU_AESIC_CA_CA6_MASK)
  2500. #define CAU_AESIC_CA_CA7_MASK (0xFFFFFFFFU)
  2501. #define CAU_AESIC_CA_CA7_SHIFT (0U)
  2502. #define CAU_AESIC_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA7_SHIFT)) & CAU_AESIC_CA_CA7_MASK)
  2503. #define CAU_AESIC_CA_CA8_MASK (0xFFFFFFFFU)
  2504. #define CAU_AESIC_CA_CA8_SHIFT (0U)
  2505. #define CAU_AESIC_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA8_SHIFT)) & CAU_AESIC_CA_CA8_MASK)
  2506. /* The count of CAU_AESIC_CA */
  2507. #define CAU_AESIC_CA_COUNT (9U)
  2508. /*!
  2509. * @}
  2510. */ /* end of group CAU_Register_Masks */
  2511. /* CAU - Peripheral instance base addresses */
  2512. /** Peripheral CAU base address */
  2513. #define CAU_BASE (0xE0081000u)
  2514. /** Peripheral CAU base pointer */
  2515. #define CAU ((CAU_Type *)CAU_BASE)
  2516. /** Array initializer of CAU peripheral base addresses */
  2517. #define CAU_BASE_ADDRS { CAU_BASE }
  2518. /** Array initializer of CAU peripheral base pointers */
  2519. #define CAU_BASE_PTRS { CAU }
  2520. /*!
  2521. * @}
  2522. */ /* end of group CAU_Peripheral_Access_Layer */
  2523. /* ----------------------------------------------------------------------------
  2524. -- CMP Peripheral Access Layer
  2525. ---------------------------------------------------------------------------- */
  2526. /*!
  2527. * @addtogroup CMP_Peripheral_Access_Layer CMP Peripheral Access Layer
  2528. * @{
  2529. */
  2530. /** CMP - Register Layout Typedef */
  2531. typedef struct {
  2532. __IO uint8_t CR0; /**< CMP Control Register 0, offset: 0x0 */
  2533. __IO uint8_t CR1; /**< CMP Control Register 1, offset: 0x1 */
  2534. __IO uint8_t FPR; /**< CMP Filter Period Register, offset: 0x2 */
  2535. __IO uint8_t SCR; /**< CMP Status and Control Register, offset: 0x3 */
  2536. __IO uint8_t DACCR; /**< DAC Control Register, offset: 0x4 */
  2537. __IO uint8_t MUXCR; /**< MUX Control Register, offset: 0x5 */
  2538. } CMP_Type;
  2539. /* ----------------------------------------------------------------------------
  2540. -- CMP Register Masks
  2541. ---------------------------------------------------------------------------- */
  2542. /*!
  2543. * @addtogroup CMP_Register_Masks CMP Register Masks
  2544. * @{
  2545. */
  2546. /*! @name CR0 - CMP Control Register 0 */
  2547. #define CMP_CR0_HYSTCTR_MASK (0x3U)
  2548. #define CMP_CR0_HYSTCTR_SHIFT (0U)
  2549. #define CMP_CR0_HYSTCTR(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR0_HYSTCTR_SHIFT)) & CMP_CR0_HYSTCTR_MASK)
  2550. #define CMP_CR0_FILTER_CNT_MASK (0x70U)
  2551. #define CMP_CR0_FILTER_CNT_SHIFT (4U)
  2552. #define CMP_CR0_FILTER_CNT(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR0_FILTER_CNT_SHIFT)) & CMP_CR0_FILTER_CNT_MASK)
  2553. /*! @name CR1 - CMP Control Register 1 */
  2554. #define CMP_CR1_EN_MASK (0x1U)
  2555. #define CMP_CR1_EN_SHIFT (0U)
  2556. #define CMP_CR1_EN(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_EN_SHIFT)) & CMP_CR1_EN_MASK)
  2557. #define CMP_CR1_OPE_MASK (0x2U)
  2558. #define CMP_CR1_OPE_SHIFT (1U)
  2559. #define CMP_CR1_OPE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_OPE_SHIFT)) & CMP_CR1_OPE_MASK)
  2560. #define CMP_CR1_COS_MASK (0x4U)
  2561. #define CMP_CR1_COS_SHIFT (2U)
  2562. #define CMP_CR1_COS(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_COS_SHIFT)) & CMP_CR1_COS_MASK)
  2563. #define CMP_CR1_INV_MASK (0x8U)
  2564. #define CMP_CR1_INV_SHIFT (3U)
  2565. #define CMP_CR1_INV(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_INV_SHIFT)) & CMP_CR1_INV_MASK)
  2566. #define CMP_CR1_PMODE_MASK (0x10U)
  2567. #define CMP_CR1_PMODE_SHIFT (4U)
  2568. #define CMP_CR1_PMODE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_PMODE_SHIFT)) & CMP_CR1_PMODE_MASK)
  2569. #define CMP_CR1_TRIGM_MASK (0x20U)
  2570. #define CMP_CR1_TRIGM_SHIFT (5U)
  2571. #define CMP_CR1_TRIGM(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_TRIGM_SHIFT)) & CMP_CR1_TRIGM_MASK)
  2572. #define CMP_CR1_WE_MASK (0x40U)
  2573. #define CMP_CR1_WE_SHIFT (6U)
  2574. #define CMP_CR1_WE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_WE_SHIFT)) & CMP_CR1_WE_MASK)
  2575. #define CMP_CR1_SE_MASK (0x80U)
  2576. #define CMP_CR1_SE_SHIFT (7U)
  2577. #define CMP_CR1_SE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_SE_SHIFT)) & CMP_CR1_SE_MASK)
  2578. /*! @name FPR - CMP Filter Period Register */
  2579. #define CMP_FPR_FILT_PER_MASK (0xFFU)
  2580. #define CMP_FPR_FILT_PER_SHIFT (0U)
  2581. #define CMP_FPR_FILT_PER(x) (((uint8_t)(((uint8_t)(x)) << CMP_FPR_FILT_PER_SHIFT)) & CMP_FPR_FILT_PER_MASK)
  2582. /*! @name SCR - CMP Status and Control Register */
  2583. #define CMP_SCR_COUT_MASK (0x1U)
  2584. #define CMP_SCR_COUT_SHIFT (0U)
  2585. #define CMP_SCR_COUT(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_COUT_SHIFT)) & CMP_SCR_COUT_MASK)
  2586. #define CMP_SCR_CFF_MASK (0x2U)
  2587. #define CMP_SCR_CFF_SHIFT (1U)
  2588. #define CMP_SCR_CFF(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_CFF_SHIFT)) & CMP_SCR_CFF_MASK)
  2589. #define CMP_SCR_CFR_MASK (0x4U)
  2590. #define CMP_SCR_CFR_SHIFT (2U)
  2591. #define CMP_SCR_CFR(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_CFR_SHIFT)) & CMP_SCR_CFR_MASK)
  2592. #define CMP_SCR_IEF_MASK (0x8U)
  2593. #define CMP_SCR_IEF_SHIFT (3U)
  2594. #define CMP_SCR_IEF(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_IEF_SHIFT)) & CMP_SCR_IEF_MASK)
  2595. #define CMP_SCR_IER_MASK (0x10U)
  2596. #define CMP_SCR_IER_SHIFT (4U)
  2597. #define CMP_SCR_IER(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_IER_SHIFT)) & CMP_SCR_IER_MASK)
  2598. #define CMP_SCR_DMAEN_MASK (0x40U)
  2599. #define CMP_SCR_DMAEN_SHIFT (6U)
  2600. #define CMP_SCR_DMAEN(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_DMAEN_SHIFT)) & CMP_SCR_DMAEN_MASK)
  2601. /*! @name DACCR - DAC Control Register */
  2602. #define CMP_DACCR_VOSEL_MASK (0x3FU)
  2603. #define CMP_DACCR_VOSEL_SHIFT (0U)
  2604. #define CMP_DACCR_VOSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_DACCR_VOSEL_SHIFT)) & CMP_DACCR_VOSEL_MASK)
  2605. #define CMP_DACCR_VRSEL_MASK (0x40U)
  2606. #define CMP_DACCR_VRSEL_SHIFT (6U)
  2607. #define CMP_DACCR_VRSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_DACCR_VRSEL_SHIFT)) & CMP_DACCR_VRSEL_MASK)
  2608. #define CMP_DACCR_DACEN_MASK (0x80U)
  2609. #define CMP_DACCR_DACEN_SHIFT (7U)
  2610. #define CMP_DACCR_DACEN(x) (((uint8_t)(((uint8_t)(x)) << CMP_DACCR_DACEN_SHIFT)) & CMP_DACCR_DACEN_MASK)
  2611. /*! @name MUXCR - MUX Control Register */
  2612. #define CMP_MUXCR_MSEL_MASK (0x7U)
  2613. #define CMP_MUXCR_MSEL_SHIFT (0U)
  2614. #define CMP_MUXCR_MSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_MUXCR_MSEL_SHIFT)) & CMP_MUXCR_MSEL_MASK)
  2615. #define CMP_MUXCR_PSEL_MASK (0x38U)
  2616. #define CMP_MUXCR_PSEL_SHIFT (3U)
  2617. #define CMP_MUXCR_PSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_MUXCR_PSEL_SHIFT)) & CMP_MUXCR_PSEL_MASK)
  2618. /*!
  2619. * @}
  2620. */ /* end of group CMP_Register_Masks */
  2621. /* CMP - Peripheral instance base addresses */
  2622. /** Peripheral CMP0 base address */
  2623. #define CMP0_BASE (0x40073000u)
  2624. /** Peripheral CMP0 base pointer */
  2625. #define CMP0 ((CMP_Type *)CMP0_BASE)
  2626. /** Peripheral CMP1 base address */
  2627. #define CMP1_BASE (0x40073008u)
  2628. /** Peripheral CMP1 base pointer */
  2629. #define CMP1 ((CMP_Type *)CMP1_BASE)
  2630. /** Array initializer of CMP peripheral base addresses */
  2631. #define CMP_BASE_ADDRS { CMP0_BASE, CMP1_BASE }
  2632. /** Array initializer of CMP peripheral base pointers */
  2633. #define CMP_BASE_PTRS { CMP0, CMP1 }
  2634. /** Interrupt vectors for the CMP peripheral type */
  2635. #define CMP_IRQS { CMP0_IRQn, CMP1_IRQn }
  2636. /*!
  2637. * @}
  2638. */ /* end of group CMP_Peripheral_Access_Layer */
  2639. /* ----------------------------------------------------------------------------
  2640. -- CMT Peripheral Access Layer
  2641. ---------------------------------------------------------------------------- */
  2642. /*!
  2643. * @addtogroup CMT_Peripheral_Access_Layer CMT Peripheral Access Layer
  2644. * @{
  2645. */
  2646. /** CMT - Register Layout Typedef */
  2647. typedef struct {
  2648. __IO uint8_t CGH1; /**< CMT Carrier Generator High Data Register 1, offset: 0x0 */
  2649. __IO uint8_t CGL1; /**< CMT Carrier Generator Low Data Register 1, offset: 0x1 */
  2650. __IO uint8_t CGH2; /**< CMT Carrier Generator High Data Register 2, offset: 0x2 */
  2651. __IO uint8_t CGL2; /**< CMT Carrier Generator Low Data Register 2, offset: 0x3 */
  2652. __IO uint8_t OC; /**< CMT Output Control Register, offset: 0x4 */
  2653. __IO uint8_t MSC; /**< CMT Modulator Status and Control Register, offset: 0x5 */
  2654. __IO uint8_t CMD1; /**< CMT Modulator Data Register Mark High, offset: 0x6 */
  2655. __IO uint8_t CMD2; /**< CMT Modulator Data Register Mark Low, offset: 0x7 */
  2656. __IO uint8_t CMD3; /**< CMT Modulator Data Register Space High, offset: 0x8 */
  2657. __IO uint8_t CMD4; /**< CMT Modulator Data Register Space Low, offset: 0x9 */
  2658. __IO uint8_t PPS; /**< CMT Primary Prescaler Register, offset: 0xA */
  2659. __IO uint8_t DMA; /**< CMT Direct Memory Access Register, offset: 0xB */
  2660. } CMT_Type;
  2661. /* ----------------------------------------------------------------------------
  2662. -- CMT Register Masks
  2663. ---------------------------------------------------------------------------- */
  2664. /*!
  2665. * @addtogroup CMT_Register_Masks CMT Register Masks
  2666. * @{
  2667. */
  2668. /*! @name CGH1 - CMT Carrier Generator High Data Register 1 */
  2669. #define CMT_CGH1_PH_MASK (0xFFU)
  2670. #define CMT_CGH1_PH_SHIFT (0U)
  2671. #define CMT_CGH1_PH(x) (((uint8_t)(((uint8_t)(x)) << CMT_CGH1_PH_SHIFT)) & CMT_CGH1_PH_MASK)
  2672. /*! @name CGL1 - CMT Carrier Generator Low Data Register 1 */
  2673. #define CMT_CGL1_PL_MASK (0xFFU)
  2674. #define CMT_CGL1_PL_SHIFT (0U)
  2675. #define CMT_CGL1_PL(x) (((uint8_t)(((uint8_t)(x)) << CMT_CGL1_PL_SHIFT)) & CMT_CGL1_PL_MASK)
  2676. /*! @name CGH2 - CMT Carrier Generator High Data Register 2 */
  2677. #define CMT_CGH2_SH_MASK (0xFFU)
  2678. #define CMT_CGH2_SH_SHIFT (0U)
  2679. #define CMT_CGH2_SH(x) (((uint8_t)(((uint8_t)(x)) << CMT_CGH2_SH_SHIFT)) & CMT_CGH2_SH_MASK)
  2680. /*! @name CGL2 - CMT Carrier Generator Low Data Register 2 */
  2681. #define CMT_CGL2_SL_MASK (0xFFU)
  2682. #define CMT_CGL2_SL_SHIFT (0U)
  2683. #define CMT_CGL2_SL(x) (((uint8_t)(((uint8_t)(x)) << CMT_CGL2_SL_SHIFT)) & CMT_CGL2_SL_MASK)
  2684. /*! @name OC - CMT Output Control Register */
  2685. #define CMT_OC_IROPEN_MASK (0x20U)
  2686. #define CMT_OC_IROPEN_SHIFT (5U)
  2687. #define CMT_OC_IROPEN(x) (((uint8_t)(((uint8_t)(x)) << CMT_OC_IROPEN_SHIFT)) & CMT_OC_IROPEN_MASK)
  2688. #define CMT_OC_CMTPOL_MASK (0x40U)
  2689. #define CMT_OC_CMTPOL_SHIFT (6U)
  2690. #define CMT_OC_CMTPOL(x) (((uint8_t)(((uint8_t)(x)) << CMT_OC_CMTPOL_SHIFT)) & CMT_OC_CMTPOL_MASK)
  2691. #define CMT_OC_IROL_MASK (0x80U)
  2692. #define CMT_OC_IROL_SHIFT (7U)
  2693. #define CMT_OC_IROL(x) (((uint8_t)(((uint8_t)(x)) << CMT_OC_IROL_SHIFT)) & CMT_OC_IROL_MASK)
  2694. /*! @name MSC - CMT Modulator Status and Control Register */
  2695. #define CMT_MSC_MCGEN_MASK (0x1U)
  2696. #define CMT_MSC_MCGEN_SHIFT (0U)
  2697. #define CMT_MSC_MCGEN(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_MCGEN_SHIFT)) & CMT_MSC_MCGEN_MASK)
  2698. #define CMT_MSC_EOCIE_MASK (0x2U)
  2699. #define CMT_MSC_EOCIE_SHIFT (1U)
  2700. #define CMT_MSC_EOCIE(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_EOCIE_SHIFT)) & CMT_MSC_EOCIE_MASK)
  2701. #define CMT_MSC_FSK_MASK (0x4U)
  2702. #define CMT_MSC_FSK_SHIFT (2U)
  2703. #define CMT_MSC_FSK(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_FSK_SHIFT)) & CMT_MSC_FSK_MASK)
  2704. #define CMT_MSC_BASE_MASK (0x8U)
  2705. #define CMT_MSC_BASE_SHIFT (3U)
  2706. #define CMT_MSC_BASE(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_BASE_SHIFT)) & CMT_MSC_BASE_MASK)
  2707. #define CMT_MSC_EXSPC_MASK (0x10U)
  2708. #define CMT_MSC_EXSPC_SHIFT (4U)
  2709. #define CMT_MSC_EXSPC(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_EXSPC_SHIFT)) & CMT_MSC_EXSPC_MASK)
  2710. #define CMT_MSC_CMTDIV_MASK (0x60U)
  2711. #define CMT_MSC_CMTDIV_SHIFT (5U)
  2712. #define CMT_MSC_CMTDIV(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_CMTDIV_SHIFT)) & CMT_MSC_CMTDIV_MASK)
  2713. #define CMT_MSC_EOCF_MASK (0x80U)
  2714. #define CMT_MSC_EOCF_SHIFT (7U)
  2715. #define CMT_MSC_EOCF(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_EOCF_SHIFT)) & CMT_MSC_EOCF_MASK)
  2716. /*! @name CMD1 - CMT Modulator Data Register Mark High */
  2717. #define CMT_CMD1_MB_MASK (0xFFU)
  2718. #define CMT_CMD1_MB_SHIFT (0U)
  2719. #define CMT_CMD1_MB(x) (((uint8_t)(((uint8_t)(x)) << CMT_CMD1_MB_SHIFT)) & CMT_CMD1_MB_MASK)
  2720. /*! @name CMD2 - CMT Modulator Data Register Mark Low */
  2721. #define CMT_CMD2_MB_MASK (0xFFU)
  2722. #define CMT_CMD2_MB_SHIFT (0U)
  2723. #define CMT_CMD2_MB(x) (((uint8_t)(((uint8_t)(x)) << CMT_CMD2_MB_SHIFT)) & CMT_CMD2_MB_MASK)
  2724. /*! @name CMD3 - CMT Modulator Data Register Space High */
  2725. #define CMT_CMD3_SB_MASK (0xFFU)
  2726. #define CMT_CMD3_SB_SHIFT (0U)
  2727. #define CMT_CMD3_SB(x) (((uint8_t)(((uint8_t)(x)) << CMT_CMD3_SB_SHIFT)) & CMT_CMD3_SB_MASK)
  2728. /*! @name CMD4 - CMT Modulator Data Register Space Low */
  2729. #define CMT_CMD4_SB_MASK (0xFFU)
  2730. #define CMT_CMD4_SB_SHIFT (0U)
  2731. #define CMT_CMD4_SB(x) (((uint8_t)(((uint8_t)(x)) << CMT_CMD4_SB_SHIFT)) & CMT_CMD4_SB_MASK)
  2732. /*! @name PPS - CMT Primary Prescaler Register */
  2733. #define CMT_PPS_PPSDIV_MASK (0xFU)
  2734. #define CMT_PPS_PPSDIV_SHIFT (0U)
  2735. #define CMT_PPS_PPSDIV(x) (((uint8_t)(((uint8_t)(x)) << CMT_PPS_PPSDIV_SHIFT)) & CMT_PPS_PPSDIV_MASK)
  2736. /*! @name DMA - CMT Direct Memory Access Register */
  2737. #define CMT_DMA_DMA_MASK (0x1U)
  2738. #define CMT_DMA_DMA_SHIFT (0U)
  2739. #define CMT_DMA_DMA(x) (((uint8_t)(((uint8_t)(x)) << CMT_DMA_DMA_SHIFT)) & CMT_DMA_DMA_MASK)
  2740. /*!
  2741. * @}
  2742. */ /* end of group CMT_Register_Masks */
  2743. /* CMT - Peripheral instance base addresses */
  2744. /** Peripheral CMT base address */
  2745. #define CMT_BASE (0x40062000u)
  2746. /** Peripheral CMT base pointer */
  2747. #define CMT ((CMT_Type *)CMT_BASE)
  2748. /** Array initializer of CMT peripheral base addresses */
  2749. #define CMT_BASE_ADDRS { CMT_BASE }
  2750. /** Array initializer of CMT peripheral base pointers */
  2751. #define CMT_BASE_PTRS { CMT }
  2752. /** Interrupt vectors for the CMT peripheral type */
  2753. #define CMT_IRQS { CMT_IRQn }
  2754. /*!
  2755. * @}
  2756. */ /* end of group CMT_Peripheral_Access_Layer */
  2757. /* ----------------------------------------------------------------------------
  2758. -- CRC Peripheral Access Layer
  2759. ---------------------------------------------------------------------------- */
  2760. /*!
  2761. * @addtogroup CRC_Peripheral_Access_Layer CRC Peripheral Access Layer
  2762. * @{
  2763. */
  2764. /** CRC - Register Layout Typedef */
  2765. typedef struct {
  2766. union { /* offset: 0x0 */
  2767. struct { /* offset: 0x0 */
  2768. __IO uint16_t DATAL; /**< CRC_DATAL register., offset: 0x0 */
  2769. __IO uint16_t DATAH; /**< CRC_DATAH register., offset: 0x2 */
  2770. } ACCESS16BIT;
  2771. __IO uint32_t DATA; /**< CRC Data register, offset: 0x0 */
  2772. struct { /* offset: 0x0 */
  2773. __IO uint8_t DATALL; /**< CRC_DATALL register., offset: 0x0 */
  2774. __IO uint8_t DATALU; /**< CRC_DATALU register., offset: 0x1 */
  2775. __IO uint8_t DATAHL; /**< CRC_DATAHL register., offset: 0x2 */
  2776. __IO uint8_t DATAHU; /**< CRC_DATAHU register., offset: 0x3 */
  2777. } ACCESS8BIT;
  2778. };
  2779. union { /* offset: 0x4 */
  2780. struct { /* offset: 0x4 */
  2781. __IO uint16_t GPOLYL; /**< CRC_GPOLYL register., offset: 0x4 */
  2782. __IO uint16_t GPOLYH; /**< CRC_GPOLYH register., offset: 0x6 */
  2783. } GPOLY_ACCESS16BIT;
  2784. __IO uint32_t GPOLY; /**< CRC Polynomial register, offset: 0x4 */
  2785. struct { /* offset: 0x4 */
  2786. __IO uint8_t GPOLYLL; /**< CRC_GPOLYLL register., offset: 0x4 */
  2787. __IO uint8_t GPOLYLU; /**< CRC_GPOLYLU register., offset: 0x5 */
  2788. __IO uint8_t GPOLYHL; /**< CRC_GPOLYHL register., offset: 0x6 */
  2789. __IO uint8_t GPOLYHU; /**< CRC_GPOLYHU register., offset: 0x7 */
  2790. } GPOLY_ACCESS8BIT;
  2791. };
  2792. union { /* offset: 0x8 */
  2793. __IO uint32_t CTRL; /**< CRC Control register, offset: 0x8 */
  2794. struct { /* offset: 0x8 */
  2795. uint8_t RESERVED_0[3];
  2796. __IO uint8_t CTRLHU; /**< CRC_CTRLHU register., offset: 0xB */
  2797. } CTRL_ACCESS8BIT;
  2798. };
  2799. } CRC_Type;
  2800. /* ----------------------------------------------------------------------------
  2801. -- CRC Register Masks
  2802. ---------------------------------------------------------------------------- */
  2803. /*!
  2804. * @addtogroup CRC_Register_Masks CRC Register Masks
  2805. * @{
  2806. */
  2807. /*! @name DATAL - CRC_DATAL register. */
  2808. #define CRC_DATAL_DATAL_MASK (0xFFFFU)
  2809. #define CRC_DATAL_DATAL_SHIFT (0U)
  2810. #define CRC_DATAL_DATAL(x) (((uint16_t)(((uint16_t)(x)) << CRC_DATAL_DATAL_SHIFT)) & CRC_DATAL_DATAL_MASK)
  2811. /*! @name DATAH - CRC_DATAH register. */
  2812. #define CRC_DATAH_DATAH_MASK (0xFFFFU)
  2813. #define CRC_DATAH_DATAH_SHIFT (0U)
  2814. #define CRC_DATAH_DATAH(x) (((uint16_t)(((uint16_t)(x)) << CRC_DATAH_DATAH_SHIFT)) & CRC_DATAH_DATAH_MASK)
  2815. /*! @name DATA - CRC Data register */
  2816. #define CRC_DATA_LL_MASK (0xFFU)
  2817. #define CRC_DATA_LL_SHIFT (0U)
  2818. #define CRC_DATA_LL(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_LL_SHIFT)) & CRC_DATA_LL_MASK)
  2819. #define CRC_DATA_LU_MASK (0xFF00U)
  2820. #define CRC_DATA_LU_SHIFT (8U)
  2821. #define CRC_DATA_LU(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_LU_SHIFT)) & CRC_DATA_LU_MASK)
  2822. #define CRC_DATA_HL_MASK (0xFF0000U)
  2823. #define CRC_DATA_HL_SHIFT (16U)
  2824. #define CRC_DATA_HL(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_HL_SHIFT)) & CRC_DATA_HL_MASK)
  2825. #define CRC_DATA_HU_MASK (0xFF000000U)
  2826. #define CRC_DATA_HU_SHIFT (24U)
  2827. #define CRC_DATA_HU(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_HU_SHIFT)) & CRC_DATA_HU_MASK)
  2828. /*! @name DATALL - CRC_DATALL register. */
  2829. #define CRC_DATALL_DATALL_MASK (0xFFU)
  2830. #define CRC_DATALL_DATALL_SHIFT (0U)
  2831. #define CRC_DATALL_DATALL(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATALL_DATALL_SHIFT)) & CRC_DATALL_DATALL_MASK)
  2832. /*! @name DATALU - CRC_DATALU register. */
  2833. #define CRC_DATALU_DATALU_MASK (0xFFU)
  2834. #define CRC_DATALU_DATALU_SHIFT (0U)
  2835. #define CRC_DATALU_DATALU(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATALU_DATALU_SHIFT)) & CRC_DATALU_DATALU_MASK)
  2836. /*! @name DATAHL - CRC_DATAHL register. */
  2837. #define CRC_DATAHL_DATAHL_MASK (0xFFU)
  2838. #define CRC_DATAHL_DATAHL_SHIFT (0U)
  2839. #define CRC_DATAHL_DATAHL(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATAHL_DATAHL_SHIFT)) & CRC_DATAHL_DATAHL_MASK)
  2840. /*! @name DATAHU - CRC_DATAHU register. */
  2841. #define CRC_DATAHU_DATAHU_MASK (0xFFU)
  2842. #define CRC_DATAHU_DATAHU_SHIFT (0U)
  2843. #define CRC_DATAHU_DATAHU(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATAHU_DATAHU_SHIFT)) & CRC_DATAHU_DATAHU_MASK)
  2844. /*! @name GPOLYL - CRC_GPOLYL register. */
  2845. #define CRC_GPOLYL_GPOLYL_MASK (0xFFFFU)
  2846. #define CRC_GPOLYL_GPOLYL_SHIFT (0U)
  2847. #define CRC_GPOLYL_GPOLYL(x) (((uint16_t)(((uint16_t)(x)) << CRC_GPOLYL_GPOLYL_SHIFT)) & CRC_GPOLYL_GPOLYL_MASK)
  2848. /*! @name GPOLYH - CRC_GPOLYH register. */
  2849. #define CRC_GPOLYH_GPOLYH_MASK (0xFFFFU)
  2850. #define CRC_GPOLYH_GPOLYH_SHIFT (0U)
  2851. #define CRC_GPOLYH_GPOLYH(x) (((uint16_t)(((uint16_t)(x)) << CRC_GPOLYH_GPOLYH_SHIFT)) & CRC_GPOLYH_GPOLYH_MASK)
  2852. /*! @name GPOLY - CRC Polynomial register */
  2853. #define CRC_GPOLY_LOW_MASK (0xFFFFU)
  2854. #define CRC_GPOLY_LOW_SHIFT (0U)
  2855. #define CRC_GPOLY_LOW(x) (((uint32_t)(((uint32_t)(x)) << CRC_GPOLY_LOW_SHIFT)) & CRC_GPOLY_LOW_MASK)
  2856. #define CRC_GPOLY_HIGH_MASK (0xFFFF0000U)
  2857. #define CRC_GPOLY_HIGH_SHIFT (16U)
  2858. #define CRC_GPOLY_HIGH(x) (((uint32_t)(((uint32_t)(x)) << CRC_GPOLY_HIGH_SHIFT)) & CRC_GPOLY_HIGH_MASK)
  2859. /*! @name GPOLYLL - CRC_GPOLYLL register. */
  2860. #define CRC_GPOLYLL_GPOLYLL_MASK (0xFFU)
  2861. #define CRC_GPOLYLL_GPOLYLL_SHIFT (0U)
  2862. #define CRC_GPOLYLL_GPOLYLL(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYLL_GPOLYLL_SHIFT)) & CRC_GPOLYLL_GPOLYLL_MASK)
  2863. /*! @name GPOLYLU - CRC_GPOLYLU register. */
  2864. #define CRC_GPOLYLU_GPOLYLU_MASK (0xFFU)
  2865. #define CRC_GPOLYLU_GPOLYLU_SHIFT (0U)
  2866. #define CRC_GPOLYLU_GPOLYLU(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYLU_GPOLYLU_SHIFT)) & CRC_GPOLYLU_GPOLYLU_MASK)
  2867. /*! @name GPOLYHL - CRC_GPOLYHL register. */
  2868. #define CRC_GPOLYHL_GPOLYHL_MASK (0xFFU)
  2869. #define CRC_GPOLYHL_GPOLYHL_SHIFT (0U)
  2870. #define CRC_GPOLYHL_GPOLYHL(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYHL_GPOLYHL_SHIFT)) & CRC_GPOLYHL_GPOLYHL_MASK)
  2871. /*! @name GPOLYHU - CRC_GPOLYHU register. */
  2872. #define CRC_GPOLYHU_GPOLYHU_MASK (0xFFU)
  2873. #define CRC_GPOLYHU_GPOLYHU_SHIFT (0U)
  2874. #define CRC_GPOLYHU_GPOLYHU(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYHU_GPOLYHU_SHIFT)) & CRC_GPOLYHU_GPOLYHU_MASK)
  2875. /*! @name CTRL - CRC Control register */
  2876. #define CRC_CTRL_TCRC_MASK (0x1000000U)
  2877. #define CRC_CTRL_TCRC_SHIFT (24U)
  2878. #define CRC_CTRL_TCRC(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TCRC_SHIFT)) & CRC_CTRL_TCRC_MASK)
  2879. #define CRC_CTRL_WAS_MASK (0x2000000U)
  2880. #define CRC_CTRL_WAS_SHIFT (25U)
  2881. #define CRC_CTRL_WAS(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_WAS_SHIFT)) & CRC_CTRL_WAS_MASK)
  2882. #define CRC_CTRL_FXOR_MASK (0x4000000U)
  2883. #define CRC_CTRL_FXOR_SHIFT (26U)
  2884. #define CRC_CTRL_FXOR(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_FXOR_SHIFT)) & CRC_CTRL_FXOR_MASK)
  2885. #define CRC_CTRL_TOTR_MASK (0x30000000U)
  2886. #define CRC_CTRL_TOTR_SHIFT (28U)
  2887. #define CRC_CTRL_TOTR(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TOTR_SHIFT)) & CRC_CTRL_TOTR_MASK)
  2888. #define CRC_CTRL_TOT_MASK (0xC0000000U)
  2889. #define CRC_CTRL_TOT_SHIFT (30U)
  2890. #define CRC_CTRL_TOT(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TOT_SHIFT)) & CRC_CTRL_TOT_MASK)
  2891. /*! @name CTRLHU - CRC_CTRLHU register. */
  2892. #define CRC_CTRLHU_TCRC_MASK (0x1U)
  2893. #define CRC_CTRLHU_TCRC_SHIFT (0U)
  2894. #define CRC_CTRLHU_TCRC(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TCRC_SHIFT)) & CRC_CTRLHU_TCRC_MASK)
  2895. #define CRC_CTRLHU_WAS_MASK (0x2U)
  2896. #define CRC_CTRLHU_WAS_SHIFT (1U)
  2897. #define CRC_CTRLHU_WAS(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_WAS_SHIFT)) & CRC_CTRLHU_WAS_MASK)
  2898. #define CRC_CTRLHU_FXOR_MASK (0x4U)
  2899. #define CRC_CTRLHU_FXOR_SHIFT (2U)
  2900. #define CRC_CTRLHU_FXOR(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_FXOR_SHIFT)) & CRC_CTRLHU_FXOR_MASK)
  2901. #define CRC_CTRLHU_TOTR_MASK (0x30U)
  2902. #define CRC_CTRLHU_TOTR_SHIFT (4U)
  2903. #define CRC_CTRLHU_TOTR(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TOTR_SHIFT)) & CRC_CTRLHU_TOTR_MASK)
  2904. #define CRC_CTRLHU_TOT_MASK (0xC0U)
  2905. #define CRC_CTRLHU_TOT_SHIFT (6U)
  2906. #define CRC_CTRLHU_TOT(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TOT_SHIFT)) & CRC_CTRLHU_TOT_MASK)
  2907. /*!
  2908. * @}
  2909. */ /* end of group CRC_Register_Masks */
  2910. /* CRC - Peripheral instance base addresses */
  2911. /** Peripheral CRC base address */
  2912. #define CRC_BASE (0x40032000u)
  2913. /** Peripheral CRC base pointer */
  2914. #define CRC0 ((CRC_Type *)CRC_BASE)
  2915. /** Array initializer of CRC peripheral base addresses */
  2916. #define CRC_BASE_ADDRS { CRC_BASE }
  2917. /** Array initializer of CRC peripheral base pointers */
  2918. #define CRC_BASE_PTRS { CRC0 }
  2919. /*!
  2920. * @}
  2921. */ /* end of group CRC_Peripheral_Access_Layer */
  2922. /* ----------------------------------------------------------------------------
  2923. -- DAC Peripheral Access Layer
  2924. ---------------------------------------------------------------------------- */
  2925. /*!
  2926. * @addtogroup DAC_Peripheral_Access_Layer DAC Peripheral Access Layer
  2927. * @{
  2928. */
  2929. /** DAC - Register Layout Typedef */
  2930. typedef struct {
  2931. struct { /* offset: 0x0, array step: 0x2 */
  2932. __IO uint8_t DATL; /**< DAC Data Low Register, array offset: 0x0, array step: 0x2 */
  2933. __IO uint8_t DATH; /**< DAC Data High Register, array offset: 0x1, array step: 0x2 */
  2934. } DAT[16];
  2935. __IO uint8_t SR; /**< DAC Status Register, offset: 0x20 */
  2936. __IO uint8_t C0; /**< DAC Control Register, offset: 0x21 */
  2937. __IO uint8_t C1; /**< DAC Control Register 1, offset: 0x22 */
  2938. __IO uint8_t C2; /**< DAC Control Register 2, offset: 0x23 */
  2939. } DAC_Type;
  2940. /* ----------------------------------------------------------------------------
  2941. -- DAC Register Masks
  2942. ---------------------------------------------------------------------------- */
  2943. /*!
  2944. * @addtogroup DAC_Register_Masks DAC Register Masks
  2945. * @{
  2946. */
  2947. /*! @name DATL - DAC Data Low Register */
  2948. #define DAC_DATL_DATA0_MASK (0xFFU)
  2949. #define DAC_DATL_DATA0_SHIFT (0U)
  2950. #define DAC_DATL_DATA0(x) (((uint8_t)(((uint8_t)(x)) << DAC_DATL_DATA0_SHIFT)) & DAC_DATL_DATA0_MASK)
  2951. /* The count of DAC_DATL */
  2952. #define DAC_DATL_COUNT (16U)
  2953. /*! @name DATH - DAC Data High Register */
  2954. #define DAC_DATH_DATA1_MASK (0xFU)
  2955. #define DAC_DATH_DATA1_SHIFT (0U)
  2956. #define DAC_DATH_DATA1(x) (((uint8_t)(((uint8_t)(x)) << DAC_DATH_DATA1_SHIFT)) & DAC_DATH_DATA1_MASK)
  2957. /* The count of DAC_DATH */
  2958. #define DAC_DATH_COUNT (16U)
  2959. /*! @name SR - DAC Status Register */
  2960. #define DAC_SR_DACBFRPBF_MASK (0x1U)
  2961. #define DAC_SR_DACBFRPBF_SHIFT (0U)
  2962. #define DAC_SR_DACBFRPBF(x) (((uint8_t)(((uint8_t)(x)) << DAC_SR_DACBFRPBF_SHIFT)) & DAC_SR_DACBFRPBF_MASK)
  2963. #define DAC_SR_DACBFRPTF_MASK (0x2U)
  2964. #define DAC_SR_DACBFRPTF_SHIFT (1U)
  2965. #define DAC_SR_DACBFRPTF(x) (((uint8_t)(((uint8_t)(x)) << DAC_SR_DACBFRPTF_SHIFT)) & DAC_SR_DACBFRPTF_MASK)
  2966. #define DAC_SR_DACBFWMF_MASK (0x4U)
  2967. #define DAC_SR_DACBFWMF_SHIFT (2U)
  2968. #define DAC_SR_DACBFWMF(x) (((uint8_t)(((uint8_t)(x)) << DAC_SR_DACBFWMF_SHIFT)) & DAC_SR_DACBFWMF_MASK)
  2969. /*! @name C0 - DAC Control Register */
  2970. #define DAC_C0_DACBBIEN_MASK (0x1U)
  2971. #define DAC_C0_DACBBIEN_SHIFT (0U)
  2972. #define DAC_C0_DACBBIEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACBBIEN_SHIFT)) & DAC_C0_DACBBIEN_MASK)
  2973. #define DAC_C0_DACBTIEN_MASK (0x2U)
  2974. #define DAC_C0_DACBTIEN_SHIFT (1U)
  2975. #define DAC_C0_DACBTIEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACBTIEN_SHIFT)) & DAC_C0_DACBTIEN_MASK)
  2976. #define DAC_C0_DACBWIEN_MASK (0x4U)
  2977. #define DAC_C0_DACBWIEN_SHIFT (2U)
  2978. #define DAC_C0_DACBWIEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACBWIEN_SHIFT)) & DAC_C0_DACBWIEN_MASK)
  2979. #define DAC_C0_LPEN_MASK (0x8U)
  2980. #define DAC_C0_LPEN_SHIFT (3U)
  2981. #define DAC_C0_LPEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_LPEN_SHIFT)) & DAC_C0_LPEN_MASK)
  2982. #define DAC_C0_DACSWTRG_MASK (0x10U)
  2983. #define DAC_C0_DACSWTRG_SHIFT (4U)
  2984. #define DAC_C0_DACSWTRG(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACSWTRG_SHIFT)) & DAC_C0_DACSWTRG_MASK)
  2985. #define DAC_C0_DACTRGSEL_MASK (0x20U)
  2986. #define DAC_C0_DACTRGSEL_SHIFT (5U)
  2987. #define DAC_C0_DACTRGSEL(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACTRGSEL_SHIFT)) & DAC_C0_DACTRGSEL_MASK)
  2988. #define DAC_C0_DACRFS_MASK (0x40U)
  2989. #define DAC_C0_DACRFS_SHIFT (6U)
  2990. #define DAC_C0_DACRFS(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACRFS_SHIFT)) & DAC_C0_DACRFS_MASK)
  2991. #define DAC_C0_DACEN_MASK (0x80U)
  2992. #define DAC_C0_DACEN_SHIFT (7U)
  2993. #define DAC_C0_DACEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACEN_SHIFT)) & DAC_C0_DACEN_MASK)
  2994. /*! @name C1 - DAC Control Register 1 */
  2995. #define DAC_C1_DACBFEN_MASK (0x1U)
  2996. #define DAC_C1_DACBFEN_SHIFT (0U)
  2997. #define DAC_C1_DACBFEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DACBFEN_SHIFT)) & DAC_C1_DACBFEN_MASK)
  2998. #define DAC_C1_DACBFMD_MASK (0x6U)
  2999. #define DAC_C1_DACBFMD_SHIFT (1U)
  3000. #define DAC_C1_DACBFMD(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DACBFMD_SHIFT)) & DAC_C1_DACBFMD_MASK)
  3001. #define DAC_C1_DACBFWM_MASK (0x18U)
  3002. #define DAC_C1_DACBFWM_SHIFT (3U)
  3003. #define DAC_C1_DACBFWM(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DACBFWM_SHIFT)) & DAC_C1_DACBFWM_MASK)
  3004. #define DAC_C1_DMAEN_MASK (0x80U)
  3005. #define DAC_C1_DMAEN_SHIFT (7U)
  3006. #define DAC_C1_DMAEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DMAEN_SHIFT)) & DAC_C1_DMAEN_MASK)
  3007. /*! @name C2 - DAC Control Register 2 */
  3008. #define DAC_C2_DACBFUP_MASK (0xFU)
  3009. #define DAC_C2_DACBFUP_SHIFT (0U)
  3010. #define DAC_C2_DACBFUP(x) (((uint8_t)(((uint8_t)(x)) << DAC_C2_DACBFUP_SHIFT)) & DAC_C2_DACBFUP_MASK)
  3011. #define DAC_C2_DACBFRP_MASK (0xF0U)
  3012. #define DAC_C2_DACBFRP_SHIFT (4U)
  3013. #define DAC_C2_DACBFRP(x) (((uint8_t)(((uint8_t)(x)) << DAC_C2_DACBFRP_SHIFT)) & DAC_C2_DACBFRP_MASK)
  3014. /*!
  3015. * @}
  3016. */ /* end of group DAC_Register_Masks */
  3017. /* DAC - Peripheral instance base addresses */
  3018. /** Peripheral DAC0 base address */
  3019. #define DAC0_BASE (0x400CC000u)
  3020. /** Peripheral DAC0 base pointer */
  3021. #define DAC0 ((DAC_Type *)DAC0_BASE)
  3022. /** Array initializer of DAC peripheral base addresses */
  3023. #define DAC_BASE_ADDRS { DAC0_BASE }
  3024. /** Array initializer of DAC peripheral base pointers */
  3025. #define DAC_BASE_PTRS { DAC0 }
  3026. /** Interrupt vectors for the DAC peripheral type */
  3027. #define DAC_IRQS { DAC0_IRQn }
  3028. /*!
  3029. * @}
  3030. */ /* end of group DAC_Peripheral_Access_Layer */
  3031. /* ----------------------------------------------------------------------------
  3032. -- DMA Peripheral Access Layer
  3033. ---------------------------------------------------------------------------- */
  3034. /*!
  3035. * @addtogroup DMA_Peripheral_Access_Layer DMA Peripheral Access Layer
  3036. * @{
  3037. */
  3038. /** DMA - Register Layout Typedef */
  3039. typedef struct {
  3040. __IO uint32_t CR; /**< Control Register, offset: 0x0 */
  3041. __I uint32_t ES; /**< Error Status Register, offset: 0x4 */
  3042. uint8_t RESERVED_0[4];
  3043. __IO uint32_t ERQ; /**< Enable Request Register, offset: 0xC */
  3044. uint8_t RESERVED_1[4];
  3045. __IO uint32_t EEI; /**< Enable Error Interrupt Register, offset: 0x14 */
  3046. __O uint8_t CEEI; /**< Clear Enable Error Interrupt Register, offset: 0x18 */
  3047. __O uint8_t SEEI; /**< Set Enable Error Interrupt Register, offset: 0x19 */
  3048. __O uint8_t CERQ; /**< Clear Enable Request Register, offset: 0x1A */
  3049. __O uint8_t SERQ; /**< Set Enable Request Register, offset: 0x1B */
  3050. __O uint8_t CDNE; /**< Clear DONE Status Bit Register, offset: 0x1C */
  3051. __O uint8_t SSRT; /**< Set START Bit Register, offset: 0x1D */
  3052. __O uint8_t CERR; /**< Clear Error Register, offset: 0x1E */
  3053. __O uint8_t CINT; /**< Clear Interrupt Request Register, offset: 0x1F */
  3054. uint8_t RESERVED_2[4];
  3055. __IO uint32_t INT; /**< Interrupt Request Register, offset: 0x24 */
  3056. uint8_t RESERVED_3[4];
  3057. __IO uint32_t ERR; /**< Error Register, offset: 0x2C */
  3058. uint8_t RESERVED_4[4];
  3059. __I uint32_t HRS; /**< Hardware Request Status Register, offset: 0x34 */
  3060. uint8_t RESERVED_5[12];
  3061. __IO uint32_t EARS; /**< Enable Asynchronous Request in Stop Register, offset: 0x44 */
  3062. uint8_t RESERVED_6[184];
  3063. __IO uint8_t DCHPRI3; /**< Channel n Priority Register, offset: 0x100 */
  3064. __IO uint8_t DCHPRI2; /**< Channel n Priority Register, offset: 0x101 */
  3065. __IO uint8_t DCHPRI1; /**< Channel n Priority Register, offset: 0x102 */
  3066. __IO uint8_t DCHPRI0; /**< Channel n Priority Register, offset: 0x103 */
  3067. __IO uint8_t DCHPRI7; /**< Channel n Priority Register, offset: 0x104 */
  3068. __IO uint8_t DCHPRI6; /**< Channel n Priority Register, offset: 0x105 */
  3069. __IO uint8_t DCHPRI5; /**< Channel n Priority Register, offset: 0x106 */
  3070. __IO uint8_t DCHPRI4; /**< Channel n Priority Register, offset: 0x107 */
  3071. __IO uint8_t DCHPRI11; /**< Channel n Priority Register, offset: 0x108 */
  3072. __IO uint8_t DCHPRI10; /**< Channel n Priority Register, offset: 0x109 */
  3073. __IO uint8_t DCHPRI9; /**< Channel n Priority Register, offset: 0x10A */
  3074. __IO uint8_t DCHPRI8; /**< Channel n Priority Register, offset: 0x10B */
  3075. __IO uint8_t DCHPRI15; /**< Channel n Priority Register, offset: 0x10C */
  3076. __IO uint8_t DCHPRI14; /**< Channel n Priority Register, offset: 0x10D */
  3077. __IO uint8_t DCHPRI13; /**< Channel n Priority Register, offset: 0x10E */
  3078. __IO uint8_t DCHPRI12; /**< Channel n Priority Register, offset: 0x10F */
  3079. __IO uint8_t DCHPRI19; /**< Channel n Priority Register, offset: 0x110 */
  3080. __IO uint8_t DCHPRI18; /**< Channel n Priority Register, offset: 0x111 */
  3081. __IO uint8_t DCHPRI17; /**< Channel n Priority Register, offset: 0x112 */
  3082. __IO uint8_t DCHPRI16; /**< Channel n Priority Register, offset: 0x113 */
  3083. __IO uint8_t DCHPRI23; /**< Channel n Priority Register, offset: 0x114 */
  3084. __IO uint8_t DCHPRI22; /**< Channel n Priority Register, offset: 0x115 */
  3085. __IO uint8_t DCHPRI21; /**< Channel n Priority Register, offset: 0x116 */
  3086. __IO uint8_t DCHPRI20; /**< Channel n Priority Register, offset: 0x117 */
  3087. __IO uint8_t DCHPRI27; /**< Channel n Priority Register, offset: 0x118 */
  3088. __IO uint8_t DCHPRI26; /**< Channel n Priority Register, offset: 0x119 */
  3089. __IO uint8_t DCHPRI25; /**< Channel n Priority Register, offset: 0x11A */
  3090. __IO uint8_t DCHPRI24; /**< Channel n Priority Register, offset: 0x11B */
  3091. __IO uint8_t DCHPRI31; /**< Channel n Priority Register, offset: 0x11C */
  3092. __IO uint8_t DCHPRI30; /**< Channel n Priority Register, offset: 0x11D */
  3093. __IO uint8_t DCHPRI29; /**< Channel n Priority Register, offset: 0x11E */
  3094. __IO uint8_t DCHPRI28; /**< Channel n Priority Register, offset: 0x11F */
  3095. uint8_t RESERVED_7[3808];
  3096. struct { /* offset: 0x1000, array step: 0x20 */
  3097. __IO uint32_t SADDR; /**< TCD Source Address, array offset: 0x1000, array step: 0x20 */
  3098. __IO uint16_t SOFF; /**< TCD Signed Source Address Offset, array offset: 0x1004, array step: 0x20 */
  3099. __IO uint16_t ATTR; /**< TCD Transfer Attributes, array offset: 0x1006, array step: 0x20 */
  3100. union { /* offset: 0x1008, array step: 0x20 */
  3101. __IO uint32_t NBYTES_MLNO; /**< TCD Minor Byte Count (Minor Loop Mapping Disabled), array offset: 0x1008, array step: 0x20 */
  3102. __IO uint32_t NBYTES_MLOFFNO; /**< TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled), array offset: 0x1008, array step: 0x20 */
  3103. __IO uint32_t NBYTES_MLOFFYES; /**< TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled), array offset: 0x1008, array step: 0x20 */
  3104. };
  3105. __IO uint32_t SLAST; /**< TCD Last Source Address Adjustment, array offset: 0x100C, array step: 0x20 */
  3106. __IO uint32_t DADDR; /**< TCD Destination Address, array offset: 0x1010, array step: 0x20 */
  3107. __IO uint16_t DOFF; /**< TCD Signed Destination Address Offset, array offset: 0x1014, array step: 0x20 */
  3108. union { /* offset: 0x1016, array step: 0x20 */
  3109. __IO uint16_t CITER_ELINKNO; /**< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x1016, array step: 0x20 */
  3110. __IO uint16_t CITER_ELINKYES; /**< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled), array offset: 0x1016, array step: 0x20 */
  3111. };
  3112. __IO uint32_t DLAST_SGA; /**< TCD Last Destination Address Adjustment/Scatter Gather Address, array offset: 0x1018, array step: 0x20 */
  3113. __IO uint16_t CSR; /**< TCD Control and Status, array offset: 0x101C, array step: 0x20 */
  3114. union { /* offset: 0x101E, array step: 0x20 */
  3115. __IO uint16_t BITER_ELINKNO; /**< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x101E, array step: 0x20 */
  3116. __IO uint16_t BITER_ELINKYES; /**< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled), array offset: 0x101E, array step: 0x20 */
  3117. };
  3118. } TCD[32];
  3119. } DMA_Type;
  3120. /* ----------------------------------------------------------------------------
  3121. -- DMA Register Masks
  3122. ---------------------------------------------------------------------------- */
  3123. /*!
  3124. * @addtogroup DMA_Register_Masks DMA Register Masks
  3125. * @{
  3126. */
  3127. /*! @name CR - Control Register */
  3128. #define DMA_CR_EDBG_MASK (0x2U)
  3129. #define DMA_CR_EDBG_SHIFT (1U)
  3130. #define DMA_CR_EDBG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_EDBG_SHIFT)) & DMA_CR_EDBG_MASK)
  3131. #define DMA_CR_ERCA_MASK (0x4U)
  3132. #define DMA_CR_ERCA_SHIFT (2U)
  3133. #define DMA_CR_ERCA(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ERCA_SHIFT)) & DMA_CR_ERCA_MASK)
  3134. #define DMA_CR_ERGA_MASK (0x8U)
  3135. #define DMA_CR_ERGA_SHIFT (3U)
  3136. #define DMA_CR_ERGA(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ERGA_SHIFT)) & DMA_CR_ERGA_MASK)
  3137. #define DMA_CR_HOE_MASK (0x10U)
  3138. #define DMA_CR_HOE_SHIFT (4U)
  3139. #define DMA_CR_HOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_HOE_SHIFT)) & DMA_CR_HOE_MASK)
  3140. #define DMA_CR_HALT_MASK (0x20U)
  3141. #define DMA_CR_HALT_SHIFT (5U)
  3142. #define DMA_CR_HALT(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_HALT_SHIFT)) & DMA_CR_HALT_MASK)
  3143. #define DMA_CR_CLM_MASK (0x40U)
  3144. #define DMA_CR_CLM_SHIFT (6U)
  3145. #define DMA_CR_CLM(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_CLM_SHIFT)) & DMA_CR_CLM_MASK)
  3146. #define DMA_CR_EMLM_MASK (0x80U)
  3147. #define DMA_CR_EMLM_SHIFT (7U)
  3148. #define DMA_CR_EMLM(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_EMLM_SHIFT)) & DMA_CR_EMLM_MASK)
  3149. #define DMA_CR_GRP0PRI_MASK (0x100U)
  3150. #define DMA_CR_GRP0PRI_SHIFT (8U)
  3151. #define DMA_CR_GRP0PRI(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_GRP0PRI_SHIFT)) & DMA_CR_GRP0PRI_MASK)
  3152. #define DMA_CR_GRP1PRI_MASK (0x400U)
  3153. #define DMA_CR_GRP1PRI_SHIFT (10U)
  3154. #define DMA_CR_GRP1PRI(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_GRP1PRI_SHIFT)) & DMA_CR_GRP1PRI_MASK)
  3155. #define DMA_CR_ECX_MASK (0x10000U)
  3156. #define DMA_CR_ECX_SHIFT (16U)
  3157. #define DMA_CR_ECX(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ECX_SHIFT)) & DMA_CR_ECX_MASK)
  3158. #define DMA_CR_CX_MASK (0x20000U)
  3159. #define DMA_CR_CX_SHIFT (17U)
  3160. #define DMA_CR_CX(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_CX_SHIFT)) & DMA_CR_CX_MASK)
  3161. /*! @name ES - Error Status Register */
  3162. #define DMA_ES_DBE_MASK (0x1U)
  3163. #define DMA_ES_DBE_SHIFT (0U)
  3164. #define DMA_ES_DBE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DBE_SHIFT)) & DMA_ES_DBE_MASK)
  3165. #define DMA_ES_SBE_MASK (0x2U)
  3166. #define DMA_ES_SBE_SHIFT (1U)
  3167. #define DMA_ES_SBE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SBE_SHIFT)) & DMA_ES_SBE_MASK)
  3168. #define DMA_ES_SGE_MASK (0x4U)
  3169. #define DMA_ES_SGE_SHIFT (2U)
  3170. #define DMA_ES_SGE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SGE_SHIFT)) & DMA_ES_SGE_MASK)
  3171. #define DMA_ES_NCE_MASK (0x8U)
  3172. #define DMA_ES_NCE_SHIFT (3U)
  3173. #define DMA_ES_NCE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_NCE_SHIFT)) & DMA_ES_NCE_MASK)
  3174. #define DMA_ES_DOE_MASK (0x10U)
  3175. #define DMA_ES_DOE_SHIFT (4U)
  3176. #define DMA_ES_DOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DOE_SHIFT)) & DMA_ES_DOE_MASK)
  3177. #define DMA_ES_DAE_MASK (0x20U)
  3178. #define DMA_ES_DAE_SHIFT (5U)
  3179. #define DMA_ES_DAE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DAE_SHIFT)) & DMA_ES_DAE_MASK)
  3180. #define DMA_ES_SOE_MASK (0x40U)
  3181. #define DMA_ES_SOE_SHIFT (6U)
  3182. #define DMA_ES_SOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SOE_SHIFT)) & DMA_ES_SOE_MASK)
  3183. #define DMA_ES_SAE_MASK (0x80U)
  3184. #define DMA_ES_SAE_SHIFT (7U)
  3185. #define DMA_ES_SAE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SAE_SHIFT)) & DMA_ES_SAE_MASK)
  3186. #define DMA_ES_ERRCHN_MASK (0x1F00U)
  3187. #define DMA_ES_ERRCHN_SHIFT (8U)
  3188. #define DMA_ES_ERRCHN(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_ERRCHN_SHIFT)) & DMA_ES_ERRCHN_MASK)
  3189. #define DMA_ES_CPE_MASK (0x4000U)
  3190. #define DMA_ES_CPE_SHIFT (14U)
  3191. #define DMA_ES_CPE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_CPE_SHIFT)) & DMA_ES_CPE_MASK)
  3192. #define DMA_ES_GPE_MASK (0x8000U)
  3193. #define DMA_ES_GPE_SHIFT (15U)
  3194. #define DMA_ES_GPE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_GPE_SHIFT)) & DMA_ES_GPE_MASK)
  3195. #define DMA_ES_ECX_MASK (0x10000U)
  3196. #define DMA_ES_ECX_SHIFT (16U)
  3197. #define DMA_ES_ECX(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_ECX_SHIFT)) & DMA_ES_ECX_MASK)
  3198. #define DMA_ES_VLD_MASK (0x80000000U)
  3199. #define DMA_ES_VLD_SHIFT (31U)
  3200. #define DMA_ES_VLD(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_VLD_SHIFT)) & DMA_ES_VLD_MASK)
  3201. /*! @name ERQ - Enable Request Register */
  3202. #define DMA_ERQ_ERQ0_MASK (0x1U)
  3203. #define DMA_ERQ_ERQ0_SHIFT (0U)
  3204. #define DMA_ERQ_ERQ0(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ0_SHIFT)) & DMA_ERQ_ERQ0_MASK)
  3205. #define DMA_ERQ_ERQ1_MASK (0x2U)
  3206. #define DMA_ERQ_ERQ1_SHIFT (1U)
  3207. #define DMA_ERQ_ERQ1(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ1_SHIFT)) & DMA_ERQ_ERQ1_MASK)
  3208. #define DMA_ERQ_ERQ2_MASK (0x4U)
  3209. #define DMA_ERQ_ERQ2_SHIFT (2U)
  3210. #define DMA_ERQ_ERQ2(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ2_SHIFT)) & DMA_ERQ_ERQ2_MASK)
  3211. #define DMA_ERQ_ERQ3_MASK (0x8U)
  3212. #define DMA_ERQ_ERQ3_SHIFT (3U)
  3213. #define DMA_ERQ_ERQ3(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ3_SHIFT)) & DMA_ERQ_ERQ3_MASK)
  3214. #define DMA_ERQ_ERQ4_MASK (0x10U)
  3215. #define DMA_ERQ_ERQ4_SHIFT (4U)
  3216. #define DMA_ERQ_ERQ4(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ4_SHIFT)) & DMA_ERQ_ERQ4_MASK)
  3217. #define DMA_ERQ_ERQ5_MASK (0x20U)
  3218. #define DMA_ERQ_ERQ5_SHIFT (5U)
  3219. #define DMA_ERQ_ERQ5(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ5_SHIFT)) & DMA_ERQ_ERQ5_MASK)
  3220. #define DMA_ERQ_ERQ6_MASK (0x40U)
  3221. #define DMA_ERQ_ERQ6_SHIFT (6U)
  3222. #define DMA_ERQ_ERQ6(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ6_SHIFT)) & DMA_ERQ_ERQ6_MASK)
  3223. #define DMA_ERQ_ERQ7_MASK (0x80U)
  3224. #define DMA_ERQ_ERQ7_SHIFT (7U)
  3225. #define DMA_ERQ_ERQ7(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ7_SHIFT)) & DMA_ERQ_ERQ7_MASK)
  3226. #define DMA_ERQ_ERQ8_MASK (0x100U)
  3227. #define DMA_ERQ_ERQ8_SHIFT (8U)
  3228. #define DMA_ERQ_ERQ8(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ8_SHIFT)) & DMA_ERQ_ERQ8_MASK)
  3229. #define DMA_ERQ_ERQ9_MASK (0x200U)
  3230. #define DMA_ERQ_ERQ9_SHIFT (9U)
  3231. #define DMA_ERQ_ERQ9(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ9_SHIFT)) & DMA_ERQ_ERQ9_MASK)
  3232. #define DMA_ERQ_ERQ10_MASK (0x400U)
  3233. #define DMA_ERQ_ERQ10_SHIFT (10U)
  3234. #define DMA_ERQ_ERQ10(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ10_SHIFT)) & DMA_ERQ_ERQ10_MASK)
  3235. #define DMA_ERQ_ERQ11_MASK (0x800U)
  3236. #define DMA_ERQ_ERQ11_SHIFT (11U)
  3237. #define DMA_ERQ_ERQ11(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ11_SHIFT)) & DMA_ERQ_ERQ11_MASK)
  3238. #define DMA_ERQ_ERQ12_MASK (0x1000U)
  3239. #define DMA_ERQ_ERQ12_SHIFT (12U)
  3240. #define DMA_ERQ_ERQ12(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ12_SHIFT)) & DMA_ERQ_ERQ12_MASK)
  3241. #define DMA_ERQ_ERQ13_MASK (0x2000U)
  3242. #define DMA_ERQ_ERQ13_SHIFT (13U)
  3243. #define DMA_ERQ_ERQ13(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ13_SHIFT)) & DMA_ERQ_ERQ13_MASK)
  3244. #define DMA_ERQ_ERQ14_MASK (0x4000U)
  3245. #define DMA_ERQ_ERQ14_SHIFT (14U)
  3246. #define DMA_ERQ_ERQ14(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ14_SHIFT)) & DMA_ERQ_ERQ14_MASK)
  3247. #define DMA_ERQ_ERQ15_MASK (0x8000U)
  3248. #define DMA_ERQ_ERQ15_SHIFT (15U)
  3249. #define DMA_ERQ_ERQ15(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ15_SHIFT)) & DMA_ERQ_ERQ15_MASK)
  3250. #define DMA_ERQ_ERQ16_MASK (0x10000U)
  3251. #define DMA_ERQ_ERQ16_SHIFT (16U)
  3252. #define DMA_ERQ_ERQ16(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ16_SHIFT)) & DMA_ERQ_ERQ16_MASK)
  3253. #define DMA_ERQ_ERQ17_MASK (0x20000U)
  3254. #define DMA_ERQ_ERQ17_SHIFT (17U)
  3255. #define DMA_ERQ_ERQ17(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ17_SHIFT)) & DMA_ERQ_ERQ17_MASK)
  3256. #define DMA_ERQ_ERQ18_MASK (0x40000U)
  3257. #define DMA_ERQ_ERQ18_SHIFT (18U)
  3258. #define DMA_ERQ_ERQ18(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ18_SHIFT)) & DMA_ERQ_ERQ18_MASK)
  3259. #define DMA_ERQ_ERQ19_MASK (0x80000U)
  3260. #define DMA_ERQ_ERQ19_SHIFT (19U)
  3261. #define DMA_ERQ_ERQ19(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ19_SHIFT)) & DMA_ERQ_ERQ19_MASK)
  3262. #define DMA_ERQ_ERQ20_MASK (0x100000U)
  3263. #define DMA_ERQ_ERQ20_SHIFT (20U)
  3264. #define DMA_ERQ_ERQ20(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ20_SHIFT)) & DMA_ERQ_ERQ20_MASK)
  3265. #define DMA_ERQ_ERQ21_MASK (0x200000U)
  3266. #define DMA_ERQ_ERQ21_SHIFT (21U)
  3267. #define DMA_ERQ_ERQ21(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ21_SHIFT)) & DMA_ERQ_ERQ21_MASK)
  3268. #define DMA_ERQ_ERQ22_MASK (0x400000U)
  3269. #define DMA_ERQ_ERQ22_SHIFT (22U)
  3270. #define DMA_ERQ_ERQ22(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ22_SHIFT)) & DMA_ERQ_ERQ22_MASK)
  3271. #define DMA_ERQ_ERQ23_MASK (0x800000U)
  3272. #define DMA_ERQ_ERQ23_SHIFT (23U)
  3273. #define DMA_ERQ_ERQ23(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ23_SHIFT)) & DMA_ERQ_ERQ23_MASK)
  3274. #define DMA_ERQ_ERQ24_MASK (0x1000000U)
  3275. #define DMA_ERQ_ERQ24_SHIFT (24U)
  3276. #define DMA_ERQ_ERQ24(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ24_SHIFT)) & DMA_ERQ_ERQ24_MASK)
  3277. #define DMA_ERQ_ERQ25_MASK (0x2000000U)
  3278. #define DMA_ERQ_ERQ25_SHIFT (25U)
  3279. #define DMA_ERQ_ERQ25(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ25_SHIFT)) & DMA_ERQ_ERQ25_MASK)
  3280. #define DMA_ERQ_ERQ26_MASK (0x4000000U)
  3281. #define DMA_ERQ_ERQ26_SHIFT (26U)
  3282. #define DMA_ERQ_ERQ26(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ26_SHIFT)) & DMA_ERQ_ERQ26_MASK)
  3283. #define DMA_ERQ_ERQ27_MASK (0x8000000U)
  3284. #define DMA_ERQ_ERQ27_SHIFT (27U)
  3285. #define DMA_ERQ_ERQ27(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ27_SHIFT)) & DMA_ERQ_ERQ27_MASK)
  3286. #define DMA_ERQ_ERQ28_MASK (0x10000000U)
  3287. #define DMA_ERQ_ERQ28_SHIFT (28U)
  3288. #define DMA_ERQ_ERQ28(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ28_SHIFT)) & DMA_ERQ_ERQ28_MASK)
  3289. #define DMA_ERQ_ERQ29_MASK (0x20000000U)
  3290. #define DMA_ERQ_ERQ29_SHIFT (29U)
  3291. #define DMA_ERQ_ERQ29(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ29_SHIFT)) & DMA_ERQ_ERQ29_MASK)
  3292. #define DMA_ERQ_ERQ30_MASK (0x40000000U)
  3293. #define DMA_ERQ_ERQ30_SHIFT (30U)
  3294. #define DMA_ERQ_ERQ30(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ30_SHIFT)) & DMA_ERQ_ERQ30_MASK)
  3295. #define DMA_ERQ_ERQ31_MASK (0x80000000U)
  3296. #define DMA_ERQ_ERQ31_SHIFT (31U)
  3297. #define DMA_ERQ_ERQ31(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ31_SHIFT)) & DMA_ERQ_ERQ31_MASK)
  3298. /*! @name EEI - Enable Error Interrupt Register */
  3299. #define DMA_EEI_EEI0_MASK (0x1U)
  3300. #define DMA_EEI_EEI0_SHIFT (0U)
  3301. #define DMA_EEI_EEI0(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI0_SHIFT)) & DMA_EEI_EEI0_MASK)
  3302. #define DMA_EEI_EEI1_MASK (0x2U)
  3303. #define DMA_EEI_EEI1_SHIFT (1U)
  3304. #define DMA_EEI_EEI1(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI1_SHIFT)) & DMA_EEI_EEI1_MASK)
  3305. #define DMA_EEI_EEI2_MASK (0x4U)
  3306. #define DMA_EEI_EEI2_SHIFT (2U)
  3307. #define DMA_EEI_EEI2(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI2_SHIFT)) & DMA_EEI_EEI2_MASK)
  3308. #define DMA_EEI_EEI3_MASK (0x8U)
  3309. #define DMA_EEI_EEI3_SHIFT (3U)
  3310. #define DMA_EEI_EEI3(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI3_SHIFT)) & DMA_EEI_EEI3_MASK)
  3311. #define DMA_EEI_EEI4_MASK (0x10U)
  3312. #define DMA_EEI_EEI4_SHIFT (4U)
  3313. #define DMA_EEI_EEI4(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI4_SHIFT)) & DMA_EEI_EEI4_MASK)
  3314. #define DMA_EEI_EEI5_MASK (0x20U)
  3315. #define DMA_EEI_EEI5_SHIFT (5U)
  3316. #define DMA_EEI_EEI5(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI5_SHIFT)) & DMA_EEI_EEI5_MASK)
  3317. #define DMA_EEI_EEI6_MASK (0x40U)
  3318. #define DMA_EEI_EEI6_SHIFT (6U)
  3319. #define DMA_EEI_EEI6(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI6_SHIFT)) & DMA_EEI_EEI6_MASK)
  3320. #define DMA_EEI_EEI7_MASK (0x80U)
  3321. #define DMA_EEI_EEI7_SHIFT (7U)
  3322. #define DMA_EEI_EEI7(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI7_SHIFT)) & DMA_EEI_EEI7_MASK)
  3323. #define DMA_EEI_EEI8_MASK (0x100U)
  3324. #define DMA_EEI_EEI8_SHIFT (8U)
  3325. #define DMA_EEI_EEI8(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI8_SHIFT)) & DMA_EEI_EEI8_MASK)
  3326. #define DMA_EEI_EEI9_MASK (0x200U)
  3327. #define DMA_EEI_EEI9_SHIFT (9U)
  3328. #define DMA_EEI_EEI9(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI9_SHIFT)) & DMA_EEI_EEI9_MASK)
  3329. #define DMA_EEI_EEI10_MASK (0x400U)
  3330. #define DMA_EEI_EEI10_SHIFT (10U)
  3331. #define DMA_EEI_EEI10(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI10_SHIFT)) & DMA_EEI_EEI10_MASK)
  3332. #define DMA_EEI_EEI11_MASK (0x800U)
  3333. #define DMA_EEI_EEI11_SHIFT (11U)
  3334. #define DMA_EEI_EEI11(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI11_SHIFT)) & DMA_EEI_EEI11_MASK)
  3335. #define DMA_EEI_EEI12_MASK (0x1000U)
  3336. #define DMA_EEI_EEI12_SHIFT (12U)
  3337. #define DMA_EEI_EEI12(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI12_SHIFT)) & DMA_EEI_EEI12_MASK)
  3338. #define DMA_EEI_EEI13_MASK (0x2000U)
  3339. #define DMA_EEI_EEI13_SHIFT (13U)
  3340. #define DMA_EEI_EEI13(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI13_SHIFT)) & DMA_EEI_EEI13_MASK)
  3341. #define DMA_EEI_EEI14_MASK (0x4000U)
  3342. #define DMA_EEI_EEI14_SHIFT (14U)
  3343. #define DMA_EEI_EEI14(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI14_SHIFT)) & DMA_EEI_EEI14_MASK)
  3344. #define DMA_EEI_EEI15_MASK (0x8000U)
  3345. #define DMA_EEI_EEI15_SHIFT (15U)
  3346. #define DMA_EEI_EEI15(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI15_SHIFT)) & DMA_EEI_EEI15_MASK)
  3347. #define DMA_EEI_EEI16_MASK (0x10000U)
  3348. #define DMA_EEI_EEI16_SHIFT (16U)
  3349. #define DMA_EEI_EEI16(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI16_SHIFT)) & DMA_EEI_EEI16_MASK)
  3350. #define DMA_EEI_EEI17_MASK (0x20000U)
  3351. #define DMA_EEI_EEI17_SHIFT (17U)
  3352. #define DMA_EEI_EEI17(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI17_SHIFT)) & DMA_EEI_EEI17_MASK)
  3353. #define DMA_EEI_EEI18_MASK (0x40000U)
  3354. #define DMA_EEI_EEI18_SHIFT (18U)
  3355. #define DMA_EEI_EEI18(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI18_SHIFT)) & DMA_EEI_EEI18_MASK)
  3356. #define DMA_EEI_EEI19_MASK (0x80000U)
  3357. #define DMA_EEI_EEI19_SHIFT (19U)
  3358. #define DMA_EEI_EEI19(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI19_SHIFT)) & DMA_EEI_EEI19_MASK)
  3359. #define DMA_EEI_EEI20_MASK (0x100000U)
  3360. #define DMA_EEI_EEI20_SHIFT (20U)
  3361. #define DMA_EEI_EEI20(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI20_SHIFT)) & DMA_EEI_EEI20_MASK)
  3362. #define DMA_EEI_EEI21_MASK (0x200000U)
  3363. #define DMA_EEI_EEI21_SHIFT (21U)
  3364. #define DMA_EEI_EEI21(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI21_SHIFT)) & DMA_EEI_EEI21_MASK)
  3365. #define DMA_EEI_EEI22_MASK (0x400000U)
  3366. #define DMA_EEI_EEI22_SHIFT (22U)
  3367. #define DMA_EEI_EEI22(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI22_SHIFT)) & DMA_EEI_EEI22_MASK)
  3368. #define DMA_EEI_EEI23_MASK (0x800000U)
  3369. #define DMA_EEI_EEI23_SHIFT (23U)
  3370. #define DMA_EEI_EEI23(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI23_SHIFT)) & DMA_EEI_EEI23_MASK)
  3371. #define DMA_EEI_EEI24_MASK (0x1000000U)
  3372. #define DMA_EEI_EEI24_SHIFT (24U)
  3373. #define DMA_EEI_EEI24(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI24_SHIFT)) & DMA_EEI_EEI24_MASK)
  3374. #define DMA_EEI_EEI25_MASK (0x2000000U)
  3375. #define DMA_EEI_EEI25_SHIFT (25U)
  3376. #define DMA_EEI_EEI25(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI25_SHIFT)) & DMA_EEI_EEI25_MASK)
  3377. #define DMA_EEI_EEI26_MASK (0x4000000U)
  3378. #define DMA_EEI_EEI26_SHIFT (26U)
  3379. #define DMA_EEI_EEI26(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI26_SHIFT)) & DMA_EEI_EEI26_MASK)
  3380. #define DMA_EEI_EEI27_MASK (0x8000000U)
  3381. #define DMA_EEI_EEI27_SHIFT (27U)
  3382. #define DMA_EEI_EEI27(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI27_SHIFT)) & DMA_EEI_EEI27_MASK)
  3383. #define DMA_EEI_EEI28_MASK (0x10000000U)
  3384. #define DMA_EEI_EEI28_SHIFT (28U)
  3385. #define DMA_EEI_EEI28(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI28_SHIFT)) & DMA_EEI_EEI28_MASK)
  3386. #define DMA_EEI_EEI29_MASK (0x20000000U)
  3387. #define DMA_EEI_EEI29_SHIFT (29U)
  3388. #define DMA_EEI_EEI29(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI29_SHIFT)) & DMA_EEI_EEI29_MASK)
  3389. #define DMA_EEI_EEI30_MASK (0x40000000U)
  3390. #define DMA_EEI_EEI30_SHIFT (30U)
  3391. #define DMA_EEI_EEI30(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI30_SHIFT)) & DMA_EEI_EEI30_MASK)
  3392. #define DMA_EEI_EEI31_MASK (0x80000000U)
  3393. #define DMA_EEI_EEI31_SHIFT (31U)
  3394. #define DMA_EEI_EEI31(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI31_SHIFT)) & DMA_EEI_EEI31_MASK)
  3395. /*! @name CEEI - Clear Enable Error Interrupt Register */
  3396. #define DMA_CEEI_CEEI_MASK (0x1FU)
  3397. #define DMA_CEEI_CEEI_SHIFT (0U)
  3398. #define DMA_CEEI_CEEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_CEEI_SHIFT)) & DMA_CEEI_CEEI_MASK)
  3399. #define DMA_CEEI_CAEE_MASK (0x40U)
  3400. #define DMA_CEEI_CAEE_SHIFT (6U)
  3401. #define DMA_CEEI_CAEE(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_CAEE_SHIFT)) & DMA_CEEI_CAEE_MASK)
  3402. #define DMA_CEEI_NOP_MASK (0x80U)
  3403. #define DMA_CEEI_NOP_SHIFT (7U)
  3404. #define DMA_CEEI_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_NOP_SHIFT)) & DMA_CEEI_NOP_MASK)
  3405. /*! @name SEEI - Set Enable Error Interrupt Register */
  3406. #define DMA_SEEI_SEEI_MASK (0x1FU)
  3407. #define DMA_SEEI_SEEI_SHIFT (0U)
  3408. #define DMA_SEEI_SEEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_SEEI_SHIFT)) & DMA_SEEI_SEEI_MASK)
  3409. #define DMA_SEEI_SAEE_MASK (0x40U)
  3410. #define DMA_SEEI_SAEE_SHIFT (6U)
  3411. #define DMA_SEEI_SAEE(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_SAEE_SHIFT)) & DMA_SEEI_SAEE_MASK)
  3412. #define DMA_SEEI_NOP_MASK (0x80U)
  3413. #define DMA_SEEI_NOP_SHIFT (7U)
  3414. #define DMA_SEEI_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_NOP_SHIFT)) & DMA_SEEI_NOP_MASK)
  3415. /*! @name CERQ - Clear Enable Request Register */
  3416. #define DMA_CERQ_CERQ_MASK (0x1FU)
  3417. #define DMA_CERQ_CERQ_SHIFT (0U)
  3418. #define DMA_CERQ_CERQ(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_CERQ_SHIFT)) & DMA_CERQ_CERQ_MASK)
  3419. #define DMA_CERQ_CAER_MASK (0x40U)
  3420. #define DMA_CERQ_CAER_SHIFT (6U)
  3421. #define DMA_CERQ_CAER(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_CAER_SHIFT)) & DMA_CERQ_CAER_MASK)
  3422. #define DMA_CERQ_NOP_MASK (0x80U)
  3423. #define DMA_CERQ_NOP_SHIFT (7U)
  3424. #define DMA_CERQ_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_NOP_SHIFT)) & DMA_CERQ_NOP_MASK)
  3425. /*! @name SERQ - Set Enable Request Register */
  3426. #define DMA_SERQ_SERQ_MASK (0x1FU)
  3427. #define DMA_SERQ_SERQ_SHIFT (0U)
  3428. #define DMA_SERQ_SERQ(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_SERQ_SHIFT)) & DMA_SERQ_SERQ_MASK)
  3429. #define DMA_SERQ_SAER_MASK (0x40U)
  3430. #define DMA_SERQ_SAER_SHIFT (6U)
  3431. #define DMA_SERQ_SAER(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_SAER_SHIFT)) & DMA_SERQ_SAER_MASK)
  3432. #define DMA_SERQ_NOP_MASK (0x80U)
  3433. #define DMA_SERQ_NOP_SHIFT (7U)
  3434. #define DMA_SERQ_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_NOP_SHIFT)) & DMA_SERQ_NOP_MASK)
  3435. /*! @name CDNE - Clear DONE Status Bit Register */
  3436. #define DMA_CDNE_CDNE_MASK (0x1FU)
  3437. #define DMA_CDNE_CDNE_SHIFT (0U)
  3438. #define DMA_CDNE_CDNE(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_CDNE_SHIFT)) & DMA_CDNE_CDNE_MASK)
  3439. #define DMA_CDNE_CADN_MASK (0x40U)
  3440. #define DMA_CDNE_CADN_SHIFT (6U)
  3441. #define DMA_CDNE_CADN(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_CADN_SHIFT)) & DMA_CDNE_CADN_MASK)
  3442. #define DMA_CDNE_NOP_MASK (0x80U)
  3443. #define DMA_CDNE_NOP_SHIFT (7U)
  3444. #define DMA_CDNE_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_NOP_SHIFT)) & DMA_CDNE_NOP_MASK)
  3445. /*! @name SSRT - Set START Bit Register */
  3446. #define DMA_SSRT_SSRT_MASK (0x1FU)
  3447. #define DMA_SSRT_SSRT_SHIFT (0U)
  3448. #define DMA_SSRT_SSRT(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_SSRT_SHIFT)) & DMA_SSRT_SSRT_MASK)
  3449. #define DMA_SSRT_SAST_MASK (0x40U)
  3450. #define DMA_SSRT_SAST_SHIFT (6U)
  3451. #define DMA_SSRT_SAST(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_SAST_SHIFT)) & DMA_SSRT_SAST_MASK)
  3452. #define DMA_SSRT_NOP_MASK (0x80U)
  3453. #define DMA_SSRT_NOP_SHIFT (7U)
  3454. #define DMA_SSRT_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_NOP_SHIFT)) & DMA_SSRT_NOP_MASK)
  3455. /*! @name CERR - Clear Error Register */
  3456. #define DMA_CERR_CERR_MASK (0x1FU)
  3457. #define DMA_CERR_CERR_SHIFT (0U)
  3458. #define DMA_CERR_CERR(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_CERR_SHIFT)) & DMA_CERR_CERR_MASK)
  3459. #define DMA_CERR_CAEI_MASK (0x40U)
  3460. #define DMA_CERR_CAEI_SHIFT (6U)
  3461. #define DMA_CERR_CAEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_CAEI_SHIFT)) & DMA_CERR_CAEI_MASK)
  3462. #define DMA_CERR_NOP_MASK (0x80U)
  3463. #define DMA_CERR_NOP_SHIFT (7U)
  3464. #define DMA_CERR_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_NOP_SHIFT)) & DMA_CERR_NOP_MASK)
  3465. /*! @name CINT - Clear Interrupt Request Register */
  3466. #define DMA_CINT_CINT_MASK (0x1FU)
  3467. #define DMA_CINT_CINT_SHIFT (0U)
  3468. #define DMA_CINT_CINT(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_CINT_SHIFT)) & DMA_CINT_CINT_MASK)
  3469. #define DMA_CINT_CAIR_MASK (0x40U)
  3470. #define DMA_CINT_CAIR_SHIFT (6U)
  3471. #define DMA_CINT_CAIR(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_CAIR_SHIFT)) & DMA_CINT_CAIR_MASK)
  3472. #define DMA_CINT_NOP_MASK (0x80U)
  3473. #define DMA_CINT_NOP_SHIFT (7U)
  3474. #define DMA_CINT_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_NOP_SHIFT)) & DMA_CINT_NOP_MASK)
  3475. /*! @name INT - Interrupt Request Register */
  3476. #define DMA_INT_INT0_MASK (0x1U)
  3477. #define DMA_INT_INT0_SHIFT (0U)
  3478. #define DMA_INT_INT0(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT0_SHIFT)) & DMA_INT_INT0_MASK)
  3479. #define DMA_INT_INT1_MASK (0x2U)
  3480. #define DMA_INT_INT1_SHIFT (1U)
  3481. #define DMA_INT_INT1(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT1_SHIFT)) & DMA_INT_INT1_MASK)
  3482. #define DMA_INT_INT2_MASK (0x4U)
  3483. #define DMA_INT_INT2_SHIFT (2U)
  3484. #define DMA_INT_INT2(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT2_SHIFT)) & DMA_INT_INT2_MASK)
  3485. #define DMA_INT_INT3_MASK (0x8U)
  3486. #define DMA_INT_INT3_SHIFT (3U)
  3487. #define DMA_INT_INT3(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT3_SHIFT)) & DMA_INT_INT3_MASK)
  3488. #define DMA_INT_INT4_MASK (0x10U)
  3489. #define DMA_INT_INT4_SHIFT (4U)
  3490. #define DMA_INT_INT4(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT4_SHIFT)) & DMA_INT_INT4_MASK)
  3491. #define DMA_INT_INT5_MASK (0x20U)
  3492. #define DMA_INT_INT5_SHIFT (5U)
  3493. #define DMA_INT_INT5(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT5_SHIFT)) & DMA_INT_INT5_MASK)
  3494. #define DMA_INT_INT6_MASK (0x40U)
  3495. #define DMA_INT_INT6_SHIFT (6U)
  3496. #define DMA_INT_INT6(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT6_SHIFT)) & DMA_INT_INT6_MASK)
  3497. #define DMA_INT_INT7_MASK (0x80U)
  3498. #define DMA_INT_INT7_SHIFT (7U)
  3499. #define DMA_INT_INT7(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT7_SHIFT)) & DMA_INT_INT7_MASK)
  3500. #define DMA_INT_INT8_MASK (0x100U)
  3501. #define DMA_INT_INT8_SHIFT (8U)
  3502. #define DMA_INT_INT8(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT8_SHIFT)) & DMA_INT_INT8_MASK)
  3503. #define DMA_INT_INT9_MASK (0x200U)
  3504. #define DMA_INT_INT9_SHIFT (9U)
  3505. #define DMA_INT_INT9(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT9_SHIFT)) & DMA_INT_INT9_MASK)
  3506. #define DMA_INT_INT10_MASK (0x400U)
  3507. #define DMA_INT_INT10_SHIFT (10U)
  3508. #define DMA_INT_INT10(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT10_SHIFT)) & DMA_INT_INT10_MASK)
  3509. #define DMA_INT_INT11_MASK (0x800U)
  3510. #define DMA_INT_INT11_SHIFT (11U)
  3511. #define DMA_INT_INT11(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT11_SHIFT)) & DMA_INT_INT11_MASK)
  3512. #define DMA_INT_INT12_MASK (0x1000U)
  3513. #define DMA_INT_INT12_SHIFT (12U)
  3514. #define DMA_INT_INT12(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT12_SHIFT)) & DMA_INT_INT12_MASK)
  3515. #define DMA_INT_INT13_MASK (0x2000U)
  3516. #define DMA_INT_INT13_SHIFT (13U)
  3517. #define DMA_INT_INT13(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT13_SHIFT)) & DMA_INT_INT13_MASK)
  3518. #define DMA_INT_INT14_MASK (0x4000U)
  3519. #define DMA_INT_INT14_SHIFT (14U)
  3520. #define DMA_INT_INT14(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT14_SHIFT)) & DMA_INT_INT14_MASK)
  3521. #define DMA_INT_INT15_MASK (0x8000U)
  3522. #define DMA_INT_INT15_SHIFT (15U)
  3523. #define DMA_INT_INT15(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT15_SHIFT)) & DMA_INT_INT15_MASK)
  3524. #define DMA_INT_INT16_MASK (0x10000U)
  3525. #define DMA_INT_INT16_SHIFT (16U)
  3526. #define DMA_INT_INT16(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT16_SHIFT)) & DMA_INT_INT16_MASK)
  3527. #define DMA_INT_INT17_MASK (0x20000U)
  3528. #define DMA_INT_INT17_SHIFT (17U)
  3529. #define DMA_INT_INT17(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT17_SHIFT)) & DMA_INT_INT17_MASK)
  3530. #define DMA_INT_INT18_MASK (0x40000U)
  3531. #define DMA_INT_INT18_SHIFT (18U)
  3532. #define DMA_INT_INT18(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT18_SHIFT)) & DMA_INT_INT18_MASK)
  3533. #define DMA_INT_INT19_MASK (0x80000U)
  3534. #define DMA_INT_INT19_SHIFT (19U)
  3535. #define DMA_INT_INT19(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT19_SHIFT)) & DMA_INT_INT19_MASK)
  3536. #define DMA_INT_INT20_MASK (0x100000U)
  3537. #define DMA_INT_INT20_SHIFT (20U)
  3538. #define DMA_INT_INT20(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT20_SHIFT)) & DMA_INT_INT20_MASK)
  3539. #define DMA_INT_INT21_MASK (0x200000U)
  3540. #define DMA_INT_INT21_SHIFT (21U)
  3541. #define DMA_INT_INT21(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT21_SHIFT)) & DMA_INT_INT21_MASK)
  3542. #define DMA_INT_INT22_MASK (0x400000U)
  3543. #define DMA_INT_INT22_SHIFT (22U)
  3544. #define DMA_INT_INT22(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT22_SHIFT)) & DMA_INT_INT22_MASK)
  3545. #define DMA_INT_INT23_MASK (0x800000U)
  3546. #define DMA_INT_INT23_SHIFT (23U)
  3547. #define DMA_INT_INT23(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT23_SHIFT)) & DMA_INT_INT23_MASK)
  3548. #define DMA_INT_INT24_MASK (0x1000000U)
  3549. #define DMA_INT_INT24_SHIFT (24U)
  3550. #define DMA_INT_INT24(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT24_SHIFT)) & DMA_INT_INT24_MASK)
  3551. #define DMA_INT_INT25_MASK (0x2000000U)
  3552. #define DMA_INT_INT25_SHIFT (25U)
  3553. #define DMA_INT_INT25(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT25_SHIFT)) & DMA_INT_INT25_MASK)
  3554. #define DMA_INT_INT26_MASK (0x4000000U)
  3555. #define DMA_INT_INT26_SHIFT (26U)
  3556. #define DMA_INT_INT26(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT26_SHIFT)) & DMA_INT_INT26_MASK)
  3557. #define DMA_INT_INT27_MASK (0x8000000U)
  3558. #define DMA_INT_INT27_SHIFT (27U)
  3559. #define DMA_INT_INT27(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT27_SHIFT)) & DMA_INT_INT27_MASK)
  3560. #define DMA_INT_INT28_MASK (0x10000000U)
  3561. #define DMA_INT_INT28_SHIFT (28U)
  3562. #define DMA_INT_INT28(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT28_SHIFT)) & DMA_INT_INT28_MASK)
  3563. #define DMA_INT_INT29_MASK (0x20000000U)
  3564. #define DMA_INT_INT29_SHIFT (29U)
  3565. #define DMA_INT_INT29(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT29_SHIFT)) & DMA_INT_INT29_MASK)
  3566. #define DMA_INT_INT30_MASK (0x40000000U)
  3567. #define DMA_INT_INT30_SHIFT (30U)
  3568. #define DMA_INT_INT30(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT30_SHIFT)) & DMA_INT_INT30_MASK)
  3569. #define DMA_INT_INT31_MASK (0x80000000U)
  3570. #define DMA_INT_INT31_SHIFT (31U)
  3571. #define DMA_INT_INT31(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT31_SHIFT)) & DMA_INT_INT31_MASK)
  3572. /*! @name ERR - Error Register */
  3573. #define DMA_ERR_ERR0_MASK (0x1U)
  3574. #define DMA_ERR_ERR0_SHIFT (0U)
  3575. #define DMA_ERR_ERR0(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR0_SHIFT)) & DMA_ERR_ERR0_MASK)
  3576. #define DMA_ERR_ERR1_MASK (0x2U)
  3577. #define DMA_ERR_ERR1_SHIFT (1U)
  3578. #define DMA_ERR_ERR1(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR1_SHIFT)) & DMA_ERR_ERR1_MASK)
  3579. #define DMA_ERR_ERR2_MASK (0x4U)
  3580. #define DMA_ERR_ERR2_SHIFT (2U)
  3581. #define DMA_ERR_ERR2(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR2_SHIFT)) & DMA_ERR_ERR2_MASK)
  3582. #define DMA_ERR_ERR3_MASK (0x8U)
  3583. #define DMA_ERR_ERR3_SHIFT (3U)
  3584. #define DMA_ERR_ERR3(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR3_SHIFT)) & DMA_ERR_ERR3_MASK)
  3585. #define DMA_ERR_ERR4_MASK (0x10U)
  3586. #define DMA_ERR_ERR4_SHIFT (4U)
  3587. #define DMA_ERR_ERR4(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR4_SHIFT)) & DMA_ERR_ERR4_MASK)
  3588. #define DMA_ERR_ERR5_MASK (0x20U)
  3589. #define DMA_ERR_ERR5_SHIFT (5U)
  3590. #define DMA_ERR_ERR5(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR5_SHIFT)) & DMA_ERR_ERR5_MASK)
  3591. #define DMA_ERR_ERR6_MASK (0x40U)
  3592. #define DMA_ERR_ERR6_SHIFT (6U)
  3593. #define DMA_ERR_ERR6(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR6_SHIFT)) & DMA_ERR_ERR6_MASK)
  3594. #define DMA_ERR_ERR7_MASK (0x80U)
  3595. #define DMA_ERR_ERR7_SHIFT (7U)
  3596. #define DMA_ERR_ERR7(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR7_SHIFT)) & DMA_ERR_ERR7_MASK)
  3597. #define DMA_ERR_ERR8_MASK (0x100U)
  3598. #define DMA_ERR_ERR8_SHIFT (8U)
  3599. #define DMA_ERR_ERR8(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR8_SHIFT)) & DMA_ERR_ERR8_MASK)
  3600. #define DMA_ERR_ERR9_MASK (0x200U)
  3601. #define DMA_ERR_ERR9_SHIFT (9U)
  3602. #define DMA_ERR_ERR9(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR9_SHIFT)) & DMA_ERR_ERR9_MASK)
  3603. #define DMA_ERR_ERR10_MASK (0x400U)
  3604. #define DMA_ERR_ERR10_SHIFT (10U)
  3605. #define DMA_ERR_ERR10(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR10_SHIFT)) & DMA_ERR_ERR10_MASK)
  3606. #define DMA_ERR_ERR11_MASK (0x800U)
  3607. #define DMA_ERR_ERR11_SHIFT (11U)
  3608. #define DMA_ERR_ERR11(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR11_SHIFT)) & DMA_ERR_ERR11_MASK)
  3609. #define DMA_ERR_ERR12_MASK (0x1000U)
  3610. #define DMA_ERR_ERR12_SHIFT (12U)
  3611. #define DMA_ERR_ERR12(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR12_SHIFT)) & DMA_ERR_ERR12_MASK)
  3612. #define DMA_ERR_ERR13_MASK (0x2000U)
  3613. #define DMA_ERR_ERR13_SHIFT (13U)
  3614. #define DMA_ERR_ERR13(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR13_SHIFT)) & DMA_ERR_ERR13_MASK)
  3615. #define DMA_ERR_ERR14_MASK (0x4000U)
  3616. #define DMA_ERR_ERR14_SHIFT (14U)
  3617. #define DMA_ERR_ERR14(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR14_SHIFT)) & DMA_ERR_ERR14_MASK)
  3618. #define DMA_ERR_ERR15_MASK (0x8000U)
  3619. #define DMA_ERR_ERR15_SHIFT (15U)
  3620. #define DMA_ERR_ERR15(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR15_SHIFT)) & DMA_ERR_ERR15_MASK)
  3621. #define DMA_ERR_ERR16_MASK (0x10000U)
  3622. #define DMA_ERR_ERR16_SHIFT (16U)
  3623. #define DMA_ERR_ERR16(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR16_SHIFT)) & DMA_ERR_ERR16_MASK)
  3624. #define DMA_ERR_ERR17_MASK (0x20000U)
  3625. #define DMA_ERR_ERR17_SHIFT (17U)
  3626. #define DMA_ERR_ERR17(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR17_SHIFT)) & DMA_ERR_ERR17_MASK)
  3627. #define DMA_ERR_ERR18_MASK (0x40000U)
  3628. #define DMA_ERR_ERR18_SHIFT (18U)
  3629. #define DMA_ERR_ERR18(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR18_SHIFT)) & DMA_ERR_ERR18_MASK)
  3630. #define DMA_ERR_ERR19_MASK (0x80000U)
  3631. #define DMA_ERR_ERR19_SHIFT (19U)
  3632. #define DMA_ERR_ERR19(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR19_SHIFT)) & DMA_ERR_ERR19_MASK)
  3633. #define DMA_ERR_ERR20_MASK (0x100000U)
  3634. #define DMA_ERR_ERR20_SHIFT (20U)
  3635. #define DMA_ERR_ERR20(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR20_SHIFT)) & DMA_ERR_ERR20_MASK)
  3636. #define DMA_ERR_ERR21_MASK (0x200000U)
  3637. #define DMA_ERR_ERR21_SHIFT (21U)
  3638. #define DMA_ERR_ERR21(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR21_SHIFT)) & DMA_ERR_ERR21_MASK)
  3639. #define DMA_ERR_ERR22_MASK (0x400000U)
  3640. #define DMA_ERR_ERR22_SHIFT (22U)
  3641. #define DMA_ERR_ERR22(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR22_SHIFT)) & DMA_ERR_ERR22_MASK)
  3642. #define DMA_ERR_ERR23_MASK (0x800000U)
  3643. #define DMA_ERR_ERR23_SHIFT (23U)
  3644. #define DMA_ERR_ERR23(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR23_SHIFT)) & DMA_ERR_ERR23_MASK)
  3645. #define DMA_ERR_ERR24_MASK (0x1000000U)
  3646. #define DMA_ERR_ERR24_SHIFT (24U)
  3647. #define DMA_ERR_ERR24(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR24_SHIFT)) & DMA_ERR_ERR24_MASK)
  3648. #define DMA_ERR_ERR25_MASK (0x2000000U)
  3649. #define DMA_ERR_ERR25_SHIFT (25U)
  3650. #define DMA_ERR_ERR25(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR25_SHIFT)) & DMA_ERR_ERR25_MASK)
  3651. #define DMA_ERR_ERR26_MASK (0x4000000U)
  3652. #define DMA_ERR_ERR26_SHIFT (26U)
  3653. #define DMA_ERR_ERR26(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR26_SHIFT)) & DMA_ERR_ERR26_MASK)
  3654. #define DMA_ERR_ERR27_MASK (0x8000000U)
  3655. #define DMA_ERR_ERR27_SHIFT (27U)
  3656. #define DMA_ERR_ERR27(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR27_SHIFT)) & DMA_ERR_ERR27_MASK)
  3657. #define DMA_ERR_ERR28_MASK (0x10000000U)
  3658. #define DMA_ERR_ERR28_SHIFT (28U)
  3659. #define DMA_ERR_ERR28(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR28_SHIFT)) & DMA_ERR_ERR28_MASK)
  3660. #define DMA_ERR_ERR29_MASK (0x20000000U)
  3661. #define DMA_ERR_ERR29_SHIFT (29U)
  3662. #define DMA_ERR_ERR29(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR29_SHIFT)) & DMA_ERR_ERR29_MASK)
  3663. #define DMA_ERR_ERR30_MASK (0x40000000U)
  3664. #define DMA_ERR_ERR30_SHIFT (30U)
  3665. #define DMA_ERR_ERR30(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR30_SHIFT)) & DMA_ERR_ERR30_MASK)
  3666. #define DMA_ERR_ERR31_MASK (0x80000000U)
  3667. #define DMA_ERR_ERR31_SHIFT (31U)
  3668. #define DMA_ERR_ERR31(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR31_SHIFT)) & DMA_ERR_ERR31_MASK)
  3669. /*! @name HRS - Hardware Request Status Register */
  3670. #define DMA_HRS_HRS0_MASK (0x1U)
  3671. #define DMA_HRS_HRS0_SHIFT (0U)
  3672. #define DMA_HRS_HRS0(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS0_SHIFT)) & DMA_HRS_HRS0_MASK)
  3673. #define DMA_HRS_HRS1_MASK (0x2U)
  3674. #define DMA_HRS_HRS1_SHIFT (1U)
  3675. #define DMA_HRS_HRS1(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS1_SHIFT)) & DMA_HRS_HRS1_MASK)
  3676. #define DMA_HRS_HRS2_MASK (0x4U)
  3677. #define DMA_HRS_HRS2_SHIFT (2U)
  3678. #define DMA_HRS_HRS2(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS2_SHIFT)) & DMA_HRS_HRS2_MASK)
  3679. #define DMA_HRS_HRS3_MASK (0x8U)
  3680. #define DMA_HRS_HRS3_SHIFT (3U)
  3681. #define DMA_HRS_HRS3(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS3_SHIFT)) & DMA_HRS_HRS3_MASK)
  3682. #define DMA_HRS_HRS4_MASK (0x10U)
  3683. #define DMA_HRS_HRS4_SHIFT (4U)
  3684. #define DMA_HRS_HRS4(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS4_SHIFT)) & DMA_HRS_HRS4_MASK)
  3685. #define DMA_HRS_HRS5_MASK (0x20U)
  3686. #define DMA_HRS_HRS5_SHIFT (5U)
  3687. #define DMA_HRS_HRS5(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS5_SHIFT)) & DMA_HRS_HRS5_MASK)
  3688. #define DMA_HRS_HRS6_MASK (0x40U)
  3689. #define DMA_HRS_HRS6_SHIFT (6U)
  3690. #define DMA_HRS_HRS6(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS6_SHIFT)) & DMA_HRS_HRS6_MASK)
  3691. #define DMA_HRS_HRS7_MASK (0x80U)
  3692. #define DMA_HRS_HRS7_SHIFT (7U)
  3693. #define DMA_HRS_HRS7(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS7_SHIFT)) & DMA_HRS_HRS7_MASK)
  3694. #define DMA_HRS_HRS8_MASK (0x100U)
  3695. #define DMA_HRS_HRS8_SHIFT (8U)
  3696. #define DMA_HRS_HRS8(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS8_SHIFT)) & DMA_HRS_HRS8_MASK)
  3697. #define DMA_HRS_HRS9_MASK (0x200U)
  3698. #define DMA_HRS_HRS9_SHIFT (9U)
  3699. #define DMA_HRS_HRS9(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS9_SHIFT)) & DMA_HRS_HRS9_MASK)
  3700. #define DMA_HRS_HRS10_MASK (0x400U)
  3701. #define DMA_HRS_HRS10_SHIFT (10U)
  3702. #define DMA_HRS_HRS10(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS10_SHIFT)) & DMA_HRS_HRS10_MASK)
  3703. #define DMA_HRS_HRS11_MASK (0x800U)
  3704. #define DMA_HRS_HRS11_SHIFT (11U)
  3705. #define DMA_HRS_HRS11(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS11_SHIFT)) & DMA_HRS_HRS11_MASK)
  3706. #define DMA_HRS_HRS12_MASK (0x1000U)
  3707. #define DMA_HRS_HRS12_SHIFT (12U)
  3708. #define DMA_HRS_HRS12(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS12_SHIFT)) & DMA_HRS_HRS12_MASK)
  3709. #define DMA_HRS_HRS13_MASK (0x2000U)
  3710. #define DMA_HRS_HRS13_SHIFT (13U)
  3711. #define DMA_HRS_HRS13(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS13_SHIFT)) & DMA_HRS_HRS13_MASK)
  3712. #define DMA_HRS_HRS14_MASK (0x4000U)
  3713. #define DMA_HRS_HRS14_SHIFT (14U)
  3714. #define DMA_HRS_HRS14(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS14_SHIFT)) & DMA_HRS_HRS14_MASK)
  3715. #define DMA_HRS_HRS15_MASK (0x8000U)
  3716. #define DMA_HRS_HRS15_SHIFT (15U)
  3717. #define DMA_HRS_HRS15(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS15_SHIFT)) & DMA_HRS_HRS15_MASK)
  3718. #define DMA_HRS_HRS16_MASK (0x10000U)
  3719. #define DMA_HRS_HRS16_SHIFT (16U)
  3720. #define DMA_HRS_HRS16(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS16_SHIFT)) & DMA_HRS_HRS16_MASK)
  3721. #define DMA_HRS_HRS17_MASK (0x20000U)
  3722. #define DMA_HRS_HRS17_SHIFT (17U)
  3723. #define DMA_HRS_HRS17(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS17_SHIFT)) & DMA_HRS_HRS17_MASK)
  3724. #define DMA_HRS_HRS18_MASK (0x40000U)
  3725. #define DMA_HRS_HRS18_SHIFT (18U)
  3726. #define DMA_HRS_HRS18(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS18_SHIFT)) & DMA_HRS_HRS18_MASK)
  3727. #define DMA_HRS_HRS19_MASK (0x80000U)
  3728. #define DMA_HRS_HRS19_SHIFT (19U)
  3729. #define DMA_HRS_HRS19(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS19_SHIFT)) & DMA_HRS_HRS19_MASK)
  3730. #define DMA_HRS_HRS20_MASK (0x100000U)
  3731. #define DMA_HRS_HRS20_SHIFT (20U)
  3732. #define DMA_HRS_HRS20(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS20_SHIFT)) & DMA_HRS_HRS20_MASK)
  3733. #define DMA_HRS_HRS21_MASK (0x200000U)
  3734. #define DMA_HRS_HRS21_SHIFT (21U)
  3735. #define DMA_HRS_HRS21(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS21_SHIFT)) & DMA_HRS_HRS21_MASK)
  3736. #define DMA_HRS_HRS22_MASK (0x400000U)
  3737. #define DMA_HRS_HRS22_SHIFT (22U)
  3738. #define DMA_HRS_HRS22(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS22_SHIFT)) & DMA_HRS_HRS22_MASK)
  3739. #define DMA_HRS_HRS23_MASK (0x800000U)
  3740. #define DMA_HRS_HRS23_SHIFT (23U)
  3741. #define DMA_HRS_HRS23(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS23_SHIFT)) & DMA_HRS_HRS23_MASK)
  3742. #define DMA_HRS_HRS24_MASK (0x1000000U)
  3743. #define DMA_HRS_HRS24_SHIFT (24U)
  3744. #define DMA_HRS_HRS24(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS24_SHIFT)) & DMA_HRS_HRS24_MASK)
  3745. #define DMA_HRS_HRS25_MASK (0x2000000U)
  3746. #define DMA_HRS_HRS25_SHIFT (25U)
  3747. #define DMA_HRS_HRS25(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS25_SHIFT)) & DMA_HRS_HRS25_MASK)
  3748. #define DMA_HRS_HRS26_MASK (0x4000000U)
  3749. #define DMA_HRS_HRS26_SHIFT (26U)
  3750. #define DMA_HRS_HRS26(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS26_SHIFT)) & DMA_HRS_HRS26_MASK)
  3751. #define DMA_HRS_HRS27_MASK (0x8000000U)
  3752. #define DMA_HRS_HRS27_SHIFT (27U)
  3753. #define DMA_HRS_HRS27(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS27_SHIFT)) & DMA_HRS_HRS27_MASK)
  3754. #define DMA_HRS_HRS28_MASK (0x10000000U)
  3755. #define DMA_HRS_HRS28_SHIFT (28U)
  3756. #define DMA_HRS_HRS28(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS28_SHIFT)) & DMA_HRS_HRS28_MASK)
  3757. #define DMA_HRS_HRS29_MASK (0x20000000U)
  3758. #define DMA_HRS_HRS29_SHIFT (29U)
  3759. #define DMA_HRS_HRS29(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS29_SHIFT)) & DMA_HRS_HRS29_MASK)
  3760. #define DMA_HRS_HRS30_MASK (0x40000000U)
  3761. #define DMA_HRS_HRS30_SHIFT (30U)
  3762. #define DMA_HRS_HRS30(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS30_SHIFT)) & DMA_HRS_HRS30_MASK)
  3763. #define DMA_HRS_HRS31_MASK (0x80000000U)
  3764. #define DMA_HRS_HRS31_SHIFT (31U)
  3765. #define DMA_HRS_HRS31(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS31_SHIFT)) & DMA_HRS_HRS31_MASK)
  3766. /*! @name EARS - Enable Asynchronous Request in Stop Register */
  3767. #define DMA_EARS_EDREQ_0_MASK (0x1U)
  3768. #define DMA_EARS_EDREQ_0_SHIFT (0U)
  3769. #define DMA_EARS_EDREQ_0(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_0_SHIFT)) & DMA_EARS_EDREQ_0_MASK)
  3770. #define DMA_EARS_EDREQ_1_MASK (0x2U)
  3771. #define DMA_EARS_EDREQ_1_SHIFT (1U)
  3772. #define DMA_EARS_EDREQ_1(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_1_SHIFT)) & DMA_EARS_EDREQ_1_MASK)
  3773. #define DMA_EARS_EDREQ_2_MASK (0x4U)
  3774. #define DMA_EARS_EDREQ_2_SHIFT (2U)
  3775. #define DMA_EARS_EDREQ_2(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_2_SHIFT)) & DMA_EARS_EDREQ_2_MASK)
  3776. #define DMA_EARS_EDREQ_3_MASK (0x8U)
  3777. #define DMA_EARS_EDREQ_3_SHIFT (3U)
  3778. #define DMA_EARS_EDREQ_3(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_3_SHIFT)) & DMA_EARS_EDREQ_3_MASK)
  3779. #define DMA_EARS_EDREQ_4_MASK (0x10U)
  3780. #define DMA_EARS_EDREQ_4_SHIFT (4U)
  3781. #define DMA_EARS_EDREQ_4(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_4_SHIFT)) & DMA_EARS_EDREQ_4_MASK)
  3782. #define DMA_EARS_EDREQ_5_MASK (0x20U)
  3783. #define DMA_EARS_EDREQ_5_SHIFT (5U)
  3784. #define DMA_EARS_EDREQ_5(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_5_SHIFT)) & DMA_EARS_EDREQ_5_MASK)
  3785. #define DMA_EARS_EDREQ_6_MASK (0x40U)
  3786. #define DMA_EARS_EDREQ_6_SHIFT (6U)
  3787. #define DMA_EARS_EDREQ_6(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_6_SHIFT)) & DMA_EARS_EDREQ_6_MASK)
  3788. #define DMA_EARS_EDREQ_7_MASK (0x80U)
  3789. #define DMA_EARS_EDREQ_7_SHIFT (7U)
  3790. #define DMA_EARS_EDREQ_7(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_7_SHIFT)) & DMA_EARS_EDREQ_7_MASK)
  3791. #define DMA_EARS_EDREQ_8_MASK (0x100U)
  3792. #define DMA_EARS_EDREQ_8_SHIFT (8U)
  3793. #define DMA_EARS_EDREQ_8(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_8_SHIFT)) & DMA_EARS_EDREQ_8_MASK)
  3794. #define DMA_EARS_EDREQ_9_MASK (0x200U)
  3795. #define DMA_EARS_EDREQ_9_SHIFT (9U)
  3796. #define DMA_EARS_EDREQ_9(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_9_SHIFT)) & DMA_EARS_EDREQ_9_MASK)
  3797. #define DMA_EARS_EDREQ_10_MASK (0x400U)
  3798. #define DMA_EARS_EDREQ_10_SHIFT (10U)
  3799. #define DMA_EARS_EDREQ_10(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_10_SHIFT)) & DMA_EARS_EDREQ_10_MASK)
  3800. #define DMA_EARS_EDREQ_11_MASK (0x800U)
  3801. #define DMA_EARS_EDREQ_11_SHIFT (11U)
  3802. #define DMA_EARS_EDREQ_11(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_11_SHIFT)) & DMA_EARS_EDREQ_11_MASK)
  3803. #define DMA_EARS_EDREQ_12_MASK (0x1000U)
  3804. #define DMA_EARS_EDREQ_12_SHIFT (12U)
  3805. #define DMA_EARS_EDREQ_12(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_12_SHIFT)) & DMA_EARS_EDREQ_12_MASK)
  3806. #define DMA_EARS_EDREQ_13_MASK (0x2000U)
  3807. #define DMA_EARS_EDREQ_13_SHIFT (13U)
  3808. #define DMA_EARS_EDREQ_13(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_13_SHIFT)) & DMA_EARS_EDREQ_13_MASK)
  3809. #define DMA_EARS_EDREQ_14_MASK (0x4000U)
  3810. #define DMA_EARS_EDREQ_14_SHIFT (14U)
  3811. #define DMA_EARS_EDREQ_14(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_14_SHIFT)) & DMA_EARS_EDREQ_14_MASK)
  3812. #define DMA_EARS_EDREQ_15_MASK (0x8000U)
  3813. #define DMA_EARS_EDREQ_15_SHIFT (15U)
  3814. #define DMA_EARS_EDREQ_15(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_15_SHIFT)) & DMA_EARS_EDREQ_15_MASK)
  3815. #define DMA_EARS_EDREQ_16_MASK (0x10000U)
  3816. #define DMA_EARS_EDREQ_16_SHIFT (16U)
  3817. #define DMA_EARS_EDREQ_16(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_16_SHIFT)) & DMA_EARS_EDREQ_16_MASK)
  3818. #define DMA_EARS_EDREQ_17_MASK (0x20000U)
  3819. #define DMA_EARS_EDREQ_17_SHIFT (17U)
  3820. #define DMA_EARS_EDREQ_17(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_17_SHIFT)) & DMA_EARS_EDREQ_17_MASK)
  3821. #define DMA_EARS_EDREQ_18_MASK (0x40000U)
  3822. #define DMA_EARS_EDREQ_18_SHIFT (18U)
  3823. #define DMA_EARS_EDREQ_18(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_18_SHIFT)) & DMA_EARS_EDREQ_18_MASK)
  3824. #define DMA_EARS_EDREQ_19_MASK (0x80000U)
  3825. #define DMA_EARS_EDREQ_19_SHIFT (19U)
  3826. #define DMA_EARS_EDREQ_19(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_19_SHIFT)) & DMA_EARS_EDREQ_19_MASK)
  3827. #define DMA_EARS_EDREQ_20_MASK (0x100000U)
  3828. #define DMA_EARS_EDREQ_20_SHIFT (20U)
  3829. #define DMA_EARS_EDREQ_20(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_20_SHIFT)) & DMA_EARS_EDREQ_20_MASK)
  3830. #define DMA_EARS_EDREQ_21_MASK (0x200000U)
  3831. #define DMA_EARS_EDREQ_21_SHIFT (21U)
  3832. #define DMA_EARS_EDREQ_21(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_21_SHIFT)) & DMA_EARS_EDREQ_21_MASK)
  3833. #define DMA_EARS_EDREQ_22_MASK (0x400000U)
  3834. #define DMA_EARS_EDREQ_22_SHIFT (22U)
  3835. #define DMA_EARS_EDREQ_22(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_22_SHIFT)) & DMA_EARS_EDREQ_22_MASK)
  3836. #define DMA_EARS_EDREQ_23_MASK (0x800000U)
  3837. #define DMA_EARS_EDREQ_23_SHIFT (23U)
  3838. #define DMA_EARS_EDREQ_23(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_23_SHIFT)) & DMA_EARS_EDREQ_23_MASK)
  3839. #define DMA_EARS_EDREQ_24_MASK (0x1000000U)
  3840. #define DMA_EARS_EDREQ_24_SHIFT (24U)
  3841. #define DMA_EARS_EDREQ_24(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_24_SHIFT)) & DMA_EARS_EDREQ_24_MASK)
  3842. #define DMA_EARS_EDREQ_25_MASK (0x2000000U)
  3843. #define DMA_EARS_EDREQ_25_SHIFT (25U)
  3844. #define DMA_EARS_EDREQ_25(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_25_SHIFT)) & DMA_EARS_EDREQ_25_MASK)
  3845. #define DMA_EARS_EDREQ_26_MASK (0x4000000U)
  3846. #define DMA_EARS_EDREQ_26_SHIFT (26U)
  3847. #define DMA_EARS_EDREQ_26(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_26_SHIFT)) & DMA_EARS_EDREQ_26_MASK)
  3848. #define DMA_EARS_EDREQ_27_MASK (0x8000000U)
  3849. #define DMA_EARS_EDREQ_27_SHIFT (27U)
  3850. #define DMA_EARS_EDREQ_27(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_27_SHIFT)) & DMA_EARS_EDREQ_27_MASK)
  3851. #define DMA_EARS_EDREQ_28_MASK (0x10000000U)
  3852. #define DMA_EARS_EDREQ_28_SHIFT (28U)
  3853. #define DMA_EARS_EDREQ_28(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_28_SHIFT)) & DMA_EARS_EDREQ_28_MASK)
  3854. #define DMA_EARS_EDREQ_29_MASK (0x20000000U)
  3855. #define DMA_EARS_EDREQ_29_SHIFT (29U)
  3856. #define DMA_EARS_EDREQ_29(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_29_SHIFT)) & DMA_EARS_EDREQ_29_MASK)
  3857. #define DMA_EARS_EDREQ_30_MASK (0x40000000U)
  3858. #define DMA_EARS_EDREQ_30_SHIFT (30U)
  3859. #define DMA_EARS_EDREQ_30(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_30_SHIFT)) & DMA_EARS_EDREQ_30_MASK)
  3860. #define DMA_EARS_EDREQ_31_MASK (0x80000000U)
  3861. #define DMA_EARS_EDREQ_31_SHIFT (31U)
  3862. #define DMA_EARS_EDREQ_31(x) (((uint32_t)(((uint32_t)(x)) << DMA_EARS_EDREQ_31_SHIFT)) & DMA_EARS_EDREQ_31_MASK)
  3863. /*! @name DCHPRI3 - Channel n Priority Register */
  3864. #define DMA_DCHPRI3_CHPRI_MASK (0xFU)
  3865. #define DMA_DCHPRI3_CHPRI_SHIFT (0U)
  3866. #define DMA_DCHPRI3_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_CHPRI_SHIFT)) & DMA_DCHPRI3_CHPRI_MASK)
  3867. #define DMA_DCHPRI3_GRPPRI_MASK (0x30U)
  3868. #define DMA_DCHPRI3_GRPPRI_SHIFT (4U)
  3869. #define DMA_DCHPRI3_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_GRPPRI_SHIFT)) & DMA_DCHPRI3_GRPPRI_MASK)
  3870. #define DMA_DCHPRI3_DPA_MASK (0x40U)
  3871. #define DMA_DCHPRI3_DPA_SHIFT (6U)
  3872. #define DMA_DCHPRI3_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_DPA_SHIFT)) & DMA_DCHPRI3_DPA_MASK)
  3873. #define DMA_DCHPRI3_ECP_MASK (0x80U)
  3874. #define DMA_DCHPRI3_ECP_SHIFT (7U)
  3875. #define DMA_DCHPRI3_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_ECP_SHIFT)) & DMA_DCHPRI3_ECP_MASK)
  3876. /*! @name DCHPRI2 - Channel n Priority Register */
  3877. #define DMA_DCHPRI2_CHPRI_MASK (0xFU)
  3878. #define DMA_DCHPRI2_CHPRI_SHIFT (0U)
  3879. #define DMA_DCHPRI2_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_CHPRI_SHIFT)) & DMA_DCHPRI2_CHPRI_MASK)
  3880. #define DMA_DCHPRI2_GRPPRI_MASK (0x30U)
  3881. #define DMA_DCHPRI2_GRPPRI_SHIFT (4U)
  3882. #define DMA_DCHPRI2_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_GRPPRI_SHIFT)) & DMA_DCHPRI2_GRPPRI_MASK)
  3883. #define DMA_DCHPRI2_DPA_MASK (0x40U)
  3884. #define DMA_DCHPRI2_DPA_SHIFT (6U)
  3885. #define DMA_DCHPRI2_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_DPA_SHIFT)) & DMA_DCHPRI2_DPA_MASK)
  3886. #define DMA_DCHPRI2_ECP_MASK (0x80U)
  3887. #define DMA_DCHPRI2_ECP_SHIFT (7U)
  3888. #define DMA_DCHPRI2_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_ECP_SHIFT)) & DMA_DCHPRI2_ECP_MASK)
  3889. /*! @name DCHPRI1 - Channel n Priority Register */
  3890. #define DMA_DCHPRI1_CHPRI_MASK (0xFU)
  3891. #define DMA_DCHPRI1_CHPRI_SHIFT (0U)
  3892. #define DMA_DCHPRI1_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_CHPRI_SHIFT)) & DMA_DCHPRI1_CHPRI_MASK)
  3893. #define DMA_DCHPRI1_GRPPRI_MASK (0x30U)
  3894. #define DMA_DCHPRI1_GRPPRI_SHIFT (4U)
  3895. #define DMA_DCHPRI1_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_GRPPRI_SHIFT)) & DMA_DCHPRI1_GRPPRI_MASK)
  3896. #define DMA_DCHPRI1_DPA_MASK (0x40U)
  3897. #define DMA_DCHPRI1_DPA_SHIFT (6U)
  3898. #define DMA_DCHPRI1_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_DPA_SHIFT)) & DMA_DCHPRI1_DPA_MASK)
  3899. #define DMA_DCHPRI1_ECP_MASK (0x80U)
  3900. #define DMA_DCHPRI1_ECP_SHIFT (7U)
  3901. #define DMA_DCHPRI1_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_ECP_SHIFT)) & DMA_DCHPRI1_ECP_MASK)
  3902. /*! @name DCHPRI0 - Channel n Priority Register */
  3903. #define DMA_DCHPRI0_CHPRI_MASK (0xFU)
  3904. #define DMA_DCHPRI0_CHPRI_SHIFT (0U)
  3905. #define DMA_DCHPRI0_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_CHPRI_SHIFT)) & DMA_DCHPRI0_CHPRI_MASK)
  3906. #define DMA_DCHPRI0_GRPPRI_MASK (0x30U)
  3907. #define DMA_DCHPRI0_GRPPRI_SHIFT (4U)
  3908. #define DMA_DCHPRI0_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_GRPPRI_SHIFT)) & DMA_DCHPRI0_GRPPRI_MASK)
  3909. #define DMA_DCHPRI0_DPA_MASK (0x40U)
  3910. #define DMA_DCHPRI0_DPA_SHIFT (6U)
  3911. #define DMA_DCHPRI0_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_DPA_SHIFT)) & DMA_DCHPRI0_DPA_MASK)
  3912. #define DMA_DCHPRI0_ECP_MASK (0x80U)
  3913. #define DMA_DCHPRI0_ECP_SHIFT (7U)
  3914. #define DMA_DCHPRI0_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_ECP_SHIFT)) & DMA_DCHPRI0_ECP_MASK)
  3915. /*! @name DCHPRI7 - Channel n Priority Register */
  3916. #define DMA_DCHPRI7_CHPRI_MASK (0xFU)
  3917. #define DMA_DCHPRI7_CHPRI_SHIFT (0U)
  3918. #define DMA_DCHPRI7_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_CHPRI_SHIFT)) & DMA_DCHPRI7_CHPRI_MASK)
  3919. #define DMA_DCHPRI7_GRPPRI_MASK (0x30U)
  3920. #define DMA_DCHPRI7_GRPPRI_SHIFT (4U)
  3921. #define DMA_DCHPRI7_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_GRPPRI_SHIFT)) & DMA_DCHPRI7_GRPPRI_MASK)
  3922. #define DMA_DCHPRI7_DPA_MASK (0x40U)
  3923. #define DMA_DCHPRI7_DPA_SHIFT (6U)
  3924. #define DMA_DCHPRI7_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_DPA_SHIFT)) & DMA_DCHPRI7_DPA_MASK)
  3925. #define DMA_DCHPRI7_ECP_MASK (0x80U)
  3926. #define DMA_DCHPRI7_ECP_SHIFT (7U)
  3927. #define DMA_DCHPRI7_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_ECP_SHIFT)) & DMA_DCHPRI7_ECP_MASK)
  3928. /*! @name DCHPRI6 - Channel n Priority Register */
  3929. #define DMA_DCHPRI6_CHPRI_MASK (0xFU)
  3930. #define DMA_DCHPRI6_CHPRI_SHIFT (0U)
  3931. #define DMA_DCHPRI6_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_CHPRI_SHIFT)) & DMA_DCHPRI6_CHPRI_MASK)
  3932. #define DMA_DCHPRI6_GRPPRI_MASK (0x30U)
  3933. #define DMA_DCHPRI6_GRPPRI_SHIFT (4U)
  3934. #define DMA_DCHPRI6_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_GRPPRI_SHIFT)) & DMA_DCHPRI6_GRPPRI_MASK)
  3935. #define DMA_DCHPRI6_DPA_MASK (0x40U)
  3936. #define DMA_DCHPRI6_DPA_SHIFT (6U)
  3937. #define DMA_DCHPRI6_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_DPA_SHIFT)) & DMA_DCHPRI6_DPA_MASK)
  3938. #define DMA_DCHPRI6_ECP_MASK (0x80U)
  3939. #define DMA_DCHPRI6_ECP_SHIFT (7U)
  3940. #define DMA_DCHPRI6_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_ECP_SHIFT)) & DMA_DCHPRI6_ECP_MASK)
  3941. /*! @name DCHPRI5 - Channel n Priority Register */
  3942. #define DMA_DCHPRI5_CHPRI_MASK (0xFU)
  3943. #define DMA_DCHPRI5_CHPRI_SHIFT (0U)
  3944. #define DMA_DCHPRI5_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_CHPRI_SHIFT)) & DMA_DCHPRI5_CHPRI_MASK)
  3945. #define DMA_DCHPRI5_GRPPRI_MASK (0x30U)
  3946. #define DMA_DCHPRI5_GRPPRI_SHIFT (4U)
  3947. #define DMA_DCHPRI5_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_GRPPRI_SHIFT)) & DMA_DCHPRI5_GRPPRI_MASK)
  3948. #define DMA_DCHPRI5_DPA_MASK (0x40U)
  3949. #define DMA_DCHPRI5_DPA_SHIFT (6U)
  3950. #define DMA_DCHPRI5_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_DPA_SHIFT)) & DMA_DCHPRI5_DPA_MASK)
  3951. #define DMA_DCHPRI5_ECP_MASK (0x80U)
  3952. #define DMA_DCHPRI5_ECP_SHIFT (7U)
  3953. #define DMA_DCHPRI5_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_ECP_SHIFT)) & DMA_DCHPRI5_ECP_MASK)
  3954. /*! @name DCHPRI4 - Channel n Priority Register */
  3955. #define DMA_DCHPRI4_CHPRI_MASK (0xFU)
  3956. #define DMA_DCHPRI4_CHPRI_SHIFT (0U)
  3957. #define DMA_DCHPRI4_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_CHPRI_SHIFT)) & DMA_DCHPRI4_CHPRI_MASK)
  3958. #define DMA_DCHPRI4_GRPPRI_MASK (0x30U)
  3959. #define DMA_DCHPRI4_GRPPRI_SHIFT (4U)
  3960. #define DMA_DCHPRI4_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_GRPPRI_SHIFT)) & DMA_DCHPRI4_GRPPRI_MASK)
  3961. #define DMA_DCHPRI4_DPA_MASK (0x40U)
  3962. #define DMA_DCHPRI4_DPA_SHIFT (6U)
  3963. #define DMA_DCHPRI4_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_DPA_SHIFT)) & DMA_DCHPRI4_DPA_MASK)
  3964. #define DMA_DCHPRI4_ECP_MASK (0x80U)
  3965. #define DMA_DCHPRI4_ECP_SHIFT (7U)
  3966. #define DMA_DCHPRI4_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_ECP_SHIFT)) & DMA_DCHPRI4_ECP_MASK)
  3967. /*! @name DCHPRI11 - Channel n Priority Register */
  3968. #define DMA_DCHPRI11_CHPRI_MASK (0xFU)
  3969. #define DMA_DCHPRI11_CHPRI_SHIFT (0U)
  3970. #define DMA_DCHPRI11_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_CHPRI_SHIFT)) & DMA_DCHPRI11_CHPRI_MASK)
  3971. #define DMA_DCHPRI11_GRPPRI_MASK (0x30U)
  3972. #define DMA_DCHPRI11_GRPPRI_SHIFT (4U)
  3973. #define DMA_DCHPRI11_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_GRPPRI_SHIFT)) & DMA_DCHPRI11_GRPPRI_MASK)
  3974. #define DMA_DCHPRI11_DPA_MASK (0x40U)
  3975. #define DMA_DCHPRI11_DPA_SHIFT (6U)
  3976. #define DMA_DCHPRI11_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_DPA_SHIFT)) & DMA_DCHPRI11_DPA_MASK)
  3977. #define DMA_DCHPRI11_ECP_MASK (0x80U)
  3978. #define DMA_DCHPRI11_ECP_SHIFT (7U)
  3979. #define DMA_DCHPRI11_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_ECP_SHIFT)) & DMA_DCHPRI11_ECP_MASK)
  3980. /*! @name DCHPRI10 - Channel n Priority Register */
  3981. #define DMA_DCHPRI10_CHPRI_MASK (0xFU)
  3982. #define DMA_DCHPRI10_CHPRI_SHIFT (0U)
  3983. #define DMA_DCHPRI10_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_CHPRI_SHIFT)) & DMA_DCHPRI10_CHPRI_MASK)
  3984. #define DMA_DCHPRI10_GRPPRI_MASK (0x30U)
  3985. #define DMA_DCHPRI10_GRPPRI_SHIFT (4U)
  3986. #define DMA_DCHPRI10_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_GRPPRI_SHIFT)) & DMA_DCHPRI10_GRPPRI_MASK)
  3987. #define DMA_DCHPRI10_DPA_MASK (0x40U)
  3988. #define DMA_DCHPRI10_DPA_SHIFT (6U)
  3989. #define DMA_DCHPRI10_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_DPA_SHIFT)) & DMA_DCHPRI10_DPA_MASK)
  3990. #define DMA_DCHPRI10_ECP_MASK (0x80U)
  3991. #define DMA_DCHPRI10_ECP_SHIFT (7U)
  3992. #define DMA_DCHPRI10_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_ECP_SHIFT)) & DMA_DCHPRI10_ECP_MASK)
  3993. /*! @name DCHPRI9 - Channel n Priority Register */
  3994. #define DMA_DCHPRI9_CHPRI_MASK (0xFU)
  3995. #define DMA_DCHPRI9_CHPRI_SHIFT (0U)
  3996. #define DMA_DCHPRI9_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_CHPRI_SHIFT)) & DMA_DCHPRI9_CHPRI_MASK)
  3997. #define DMA_DCHPRI9_GRPPRI_MASK (0x30U)
  3998. #define DMA_DCHPRI9_GRPPRI_SHIFT (4U)
  3999. #define DMA_DCHPRI9_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_GRPPRI_SHIFT)) & DMA_DCHPRI9_GRPPRI_MASK)
  4000. #define DMA_DCHPRI9_DPA_MASK (0x40U)
  4001. #define DMA_DCHPRI9_DPA_SHIFT (6U)
  4002. #define DMA_DCHPRI9_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_DPA_SHIFT)) & DMA_DCHPRI9_DPA_MASK)
  4003. #define DMA_DCHPRI9_ECP_MASK (0x80U)
  4004. #define DMA_DCHPRI9_ECP_SHIFT (7U)
  4005. #define DMA_DCHPRI9_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_ECP_SHIFT)) & DMA_DCHPRI9_ECP_MASK)
  4006. /*! @name DCHPRI8 - Channel n Priority Register */
  4007. #define DMA_DCHPRI8_CHPRI_MASK (0xFU)
  4008. #define DMA_DCHPRI8_CHPRI_SHIFT (0U)
  4009. #define DMA_DCHPRI8_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_CHPRI_SHIFT)) & DMA_DCHPRI8_CHPRI_MASK)
  4010. #define DMA_DCHPRI8_GRPPRI_MASK (0x30U)
  4011. #define DMA_DCHPRI8_GRPPRI_SHIFT (4U)
  4012. #define DMA_DCHPRI8_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_GRPPRI_SHIFT)) & DMA_DCHPRI8_GRPPRI_MASK)
  4013. #define DMA_DCHPRI8_DPA_MASK (0x40U)
  4014. #define DMA_DCHPRI8_DPA_SHIFT (6U)
  4015. #define DMA_DCHPRI8_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_DPA_SHIFT)) & DMA_DCHPRI8_DPA_MASK)
  4016. #define DMA_DCHPRI8_ECP_MASK (0x80U)
  4017. #define DMA_DCHPRI8_ECP_SHIFT (7U)
  4018. #define DMA_DCHPRI8_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_ECP_SHIFT)) & DMA_DCHPRI8_ECP_MASK)
  4019. /*! @name DCHPRI15 - Channel n Priority Register */
  4020. #define DMA_DCHPRI15_CHPRI_MASK (0xFU)
  4021. #define DMA_DCHPRI15_CHPRI_SHIFT (0U)
  4022. #define DMA_DCHPRI15_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_CHPRI_SHIFT)) & DMA_DCHPRI15_CHPRI_MASK)
  4023. #define DMA_DCHPRI15_GRPPRI_MASK (0x30U)
  4024. #define DMA_DCHPRI15_GRPPRI_SHIFT (4U)
  4025. #define DMA_DCHPRI15_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_GRPPRI_SHIFT)) & DMA_DCHPRI15_GRPPRI_MASK)
  4026. #define DMA_DCHPRI15_DPA_MASK (0x40U)
  4027. #define DMA_DCHPRI15_DPA_SHIFT (6U)
  4028. #define DMA_DCHPRI15_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_DPA_SHIFT)) & DMA_DCHPRI15_DPA_MASK)
  4029. #define DMA_DCHPRI15_ECP_MASK (0x80U)
  4030. #define DMA_DCHPRI15_ECP_SHIFT (7U)
  4031. #define DMA_DCHPRI15_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_ECP_SHIFT)) & DMA_DCHPRI15_ECP_MASK)
  4032. /*! @name DCHPRI14 - Channel n Priority Register */
  4033. #define DMA_DCHPRI14_CHPRI_MASK (0xFU)
  4034. #define DMA_DCHPRI14_CHPRI_SHIFT (0U)
  4035. #define DMA_DCHPRI14_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_CHPRI_SHIFT)) & DMA_DCHPRI14_CHPRI_MASK)
  4036. #define DMA_DCHPRI14_GRPPRI_MASK (0x30U)
  4037. #define DMA_DCHPRI14_GRPPRI_SHIFT (4U)
  4038. #define DMA_DCHPRI14_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_GRPPRI_SHIFT)) & DMA_DCHPRI14_GRPPRI_MASK)
  4039. #define DMA_DCHPRI14_DPA_MASK (0x40U)
  4040. #define DMA_DCHPRI14_DPA_SHIFT (6U)
  4041. #define DMA_DCHPRI14_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_DPA_SHIFT)) & DMA_DCHPRI14_DPA_MASK)
  4042. #define DMA_DCHPRI14_ECP_MASK (0x80U)
  4043. #define DMA_DCHPRI14_ECP_SHIFT (7U)
  4044. #define DMA_DCHPRI14_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_ECP_SHIFT)) & DMA_DCHPRI14_ECP_MASK)
  4045. /*! @name DCHPRI13 - Channel n Priority Register */
  4046. #define DMA_DCHPRI13_CHPRI_MASK (0xFU)
  4047. #define DMA_DCHPRI13_CHPRI_SHIFT (0U)
  4048. #define DMA_DCHPRI13_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_CHPRI_SHIFT)) & DMA_DCHPRI13_CHPRI_MASK)
  4049. #define DMA_DCHPRI13_GRPPRI_MASK (0x30U)
  4050. #define DMA_DCHPRI13_GRPPRI_SHIFT (4U)
  4051. #define DMA_DCHPRI13_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_GRPPRI_SHIFT)) & DMA_DCHPRI13_GRPPRI_MASK)
  4052. #define DMA_DCHPRI13_DPA_MASK (0x40U)
  4053. #define DMA_DCHPRI13_DPA_SHIFT (6U)
  4054. #define DMA_DCHPRI13_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_DPA_SHIFT)) & DMA_DCHPRI13_DPA_MASK)
  4055. #define DMA_DCHPRI13_ECP_MASK (0x80U)
  4056. #define DMA_DCHPRI13_ECP_SHIFT (7U)
  4057. #define DMA_DCHPRI13_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_ECP_SHIFT)) & DMA_DCHPRI13_ECP_MASK)
  4058. /*! @name DCHPRI12 - Channel n Priority Register */
  4059. #define DMA_DCHPRI12_CHPRI_MASK (0xFU)
  4060. #define DMA_DCHPRI12_CHPRI_SHIFT (0U)
  4061. #define DMA_DCHPRI12_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_CHPRI_SHIFT)) & DMA_DCHPRI12_CHPRI_MASK)
  4062. #define DMA_DCHPRI12_GRPPRI_MASK (0x30U)
  4063. #define DMA_DCHPRI12_GRPPRI_SHIFT (4U)
  4064. #define DMA_DCHPRI12_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_GRPPRI_SHIFT)) & DMA_DCHPRI12_GRPPRI_MASK)
  4065. #define DMA_DCHPRI12_DPA_MASK (0x40U)
  4066. #define DMA_DCHPRI12_DPA_SHIFT (6U)
  4067. #define DMA_DCHPRI12_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_DPA_SHIFT)) & DMA_DCHPRI12_DPA_MASK)
  4068. #define DMA_DCHPRI12_ECP_MASK (0x80U)
  4069. #define DMA_DCHPRI12_ECP_SHIFT (7U)
  4070. #define DMA_DCHPRI12_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_ECP_SHIFT)) & DMA_DCHPRI12_ECP_MASK)
  4071. /*! @name DCHPRI19 - Channel n Priority Register */
  4072. #define DMA_DCHPRI19_CHPRI_MASK (0xFU)
  4073. #define DMA_DCHPRI19_CHPRI_SHIFT (0U)
  4074. #define DMA_DCHPRI19_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI19_CHPRI_SHIFT)) & DMA_DCHPRI19_CHPRI_MASK)
  4075. #define DMA_DCHPRI19_GRPPRI_MASK (0x30U)
  4076. #define DMA_DCHPRI19_GRPPRI_SHIFT (4U)
  4077. #define DMA_DCHPRI19_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI19_GRPPRI_SHIFT)) & DMA_DCHPRI19_GRPPRI_MASK)
  4078. #define DMA_DCHPRI19_DPA_MASK (0x40U)
  4079. #define DMA_DCHPRI19_DPA_SHIFT (6U)
  4080. #define DMA_DCHPRI19_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI19_DPA_SHIFT)) & DMA_DCHPRI19_DPA_MASK)
  4081. #define DMA_DCHPRI19_ECP_MASK (0x80U)
  4082. #define DMA_DCHPRI19_ECP_SHIFT (7U)
  4083. #define DMA_DCHPRI19_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI19_ECP_SHIFT)) & DMA_DCHPRI19_ECP_MASK)
  4084. /*! @name DCHPRI18 - Channel n Priority Register */
  4085. #define DMA_DCHPRI18_CHPRI_MASK (0xFU)
  4086. #define DMA_DCHPRI18_CHPRI_SHIFT (0U)
  4087. #define DMA_DCHPRI18_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI18_CHPRI_SHIFT)) & DMA_DCHPRI18_CHPRI_MASK)
  4088. #define DMA_DCHPRI18_GRPPRI_MASK (0x30U)
  4089. #define DMA_DCHPRI18_GRPPRI_SHIFT (4U)
  4090. #define DMA_DCHPRI18_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI18_GRPPRI_SHIFT)) & DMA_DCHPRI18_GRPPRI_MASK)
  4091. #define DMA_DCHPRI18_DPA_MASK (0x40U)
  4092. #define DMA_DCHPRI18_DPA_SHIFT (6U)
  4093. #define DMA_DCHPRI18_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI18_DPA_SHIFT)) & DMA_DCHPRI18_DPA_MASK)
  4094. #define DMA_DCHPRI18_ECP_MASK (0x80U)
  4095. #define DMA_DCHPRI18_ECP_SHIFT (7U)
  4096. #define DMA_DCHPRI18_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI18_ECP_SHIFT)) & DMA_DCHPRI18_ECP_MASK)
  4097. /*! @name DCHPRI17 - Channel n Priority Register */
  4098. #define DMA_DCHPRI17_CHPRI_MASK (0xFU)
  4099. #define DMA_DCHPRI17_CHPRI_SHIFT (0U)
  4100. #define DMA_DCHPRI17_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI17_CHPRI_SHIFT)) & DMA_DCHPRI17_CHPRI_MASK)
  4101. #define DMA_DCHPRI17_GRPPRI_MASK (0x30U)
  4102. #define DMA_DCHPRI17_GRPPRI_SHIFT (4U)
  4103. #define DMA_DCHPRI17_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI17_GRPPRI_SHIFT)) & DMA_DCHPRI17_GRPPRI_MASK)
  4104. #define DMA_DCHPRI17_DPA_MASK (0x40U)
  4105. #define DMA_DCHPRI17_DPA_SHIFT (6U)
  4106. #define DMA_DCHPRI17_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI17_DPA_SHIFT)) & DMA_DCHPRI17_DPA_MASK)
  4107. #define DMA_DCHPRI17_ECP_MASK (0x80U)
  4108. #define DMA_DCHPRI17_ECP_SHIFT (7U)
  4109. #define DMA_DCHPRI17_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI17_ECP_SHIFT)) & DMA_DCHPRI17_ECP_MASK)
  4110. /*! @name DCHPRI16 - Channel n Priority Register */
  4111. #define DMA_DCHPRI16_CHPRI_MASK (0xFU)
  4112. #define DMA_DCHPRI16_CHPRI_SHIFT (0U)
  4113. #define DMA_DCHPRI16_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI16_CHPRI_SHIFT)) & DMA_DCHPRI16_CHPRI_MASK)
  4114. #define DMA_DCHPRI16_GRPPRI_MASK (0x30U)
  4115. #define DMA_DCHPRI16_GRPPRI_SHIFT (4U)
  4116. #define DMA_DCHPRI16_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI16_GRPPRI_SHIFT)) & DMA_DCHPRI16_GRPPRI_MASK)
  4117. #define DMA_DCHPRI16_DPA_MASK (0x40U)
  4118. #define DMA_DCHPRI16_DPA_SHIFT (6U)
  4119. #define DMA_DCHPRI16_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI16_DPA_SHIFT)) & DMA_DCHPRI16_DPA_MASK)
  4120. #define DMA_DCHPRI16_ECP_MASK (0x80U)
  4121. #define DMA_DCHPRI16_ECP_SHIFT (7U)
  4122. #define DMA_DCHPRI16_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI16_ECP_SHIFT)) & DMA_DCHPRI16_ECP_MASK)
  4123. /*! @name DCHPRI23 - Channel n Priority Register */
  4124. #define DMA_DCHPRI23_CHPRI_MASK (0xFU)
  4125. #define DMA_DCHPRI23_CHPRI_SHIFT (0U)
  4126. #define DMA_DCHPRI23_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI23_CHPRI_SHIFT)) & DMA_DCHPRI23_CHPRI_MASK)
  4127. #define DMA_DCHPRI23_GRPPRI_MASK (0x30U)
  4128. #define DMA_DCHPRI23_GRPPRI_SHIFT (4U)
  4129. #define DMA_DCHPRI23_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI23_GRPPRI_SHIFT)) & DMA_DCHPRI23_GRPPRI_MASK)
  4130. #define DMA_DCHPRI23_DPA_MASK (0x40U)
  4131. #define DMA_DCHPRI23_DPA_SHIFT (6U)
  4132. #define DMA_DCHPRI23_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI23_DPA_SHIFT)) & DMA_DCHPRI23_DPA_MASK)
  4133. #define DMA_DCHPRI23_ECP_MASK (0x80U)
  4134. #define DMA_DCHPRI23_ECP_SHIFT (7U)
  4135. #define DMA_DCHPRI23_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI23_ECP_SHIFT)) & DMA_DCHPRI23_ECP_MASK)
  4136. /*! @name DCHPRI22 - Channel n Priority Register */
  4137. #define DMA_DCHPRI22_CHPRI_MASK (0xFU)
  4138. #define DMA_DCHPRI22_CHPRI_SHIFT (0U)
  4139. #define DMA_DCHPRI22_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI22_CHPRI_SHIFT)) & DMA_DCHPRI22_CHPRI_MASK)
  4140. #define DMA_DCHPRI22_GRPPRI_MASK (0x30U)
  4141. #define DMA_DCHPRI22_GRPPRI_SHIFT (4U)
  4142. #define DMA_DCHPRI22_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI22_GRPPRI_SHIFT)) & DMA_DCHPRI22_GRPPRI_MASK)
  4143. #define DMA_DCHPRI22_DPA_MASK (0x40U)
  4144. #define DMA_DCHPRI22_DPA_SHIFT (6U)
  4145. #define DMA_DCHPRI22_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI22_DPA_SHIFT)) & DMA_DCHPRI22_DPA_MASK)
  4146. #define DMA_DCHPRI22_ECP_MASK (0x80U)
  4147. #define DMA_DCHPRI22_ECP_SHIFT (7U)
  4148. #define DMA_DCHPRI22_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI22_ECP_SHIFT)) & DMA_DCHPRI22_ECP_MASK)
  4149. /*! @name DCHPRI21 - Channel n Priority Register */
  4150. #define DMA_DCHPRI21_CHPRI_MASK (0xFU)
  4151. #define DMA_DCHPRI21_CHPRI_SHIFT (0U)
  4152. #define DMA_DCHPRI21_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI21_CHPRI_SHIFT)) & DMA_DCHPRI21_CHPRI_MASK)
  4153. #define DMA_DCHPRI21_GRPPRI_MASK (0x30U)
  4154. #define DMA_DCHPRI21_GRPPRI_SHIFT (4U)
  4155. #define DMA_DCHPRI21_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI21_GRPPRI_SHIFT)) & DMA_DCHPRI21_GRPPRI_MASK)
  4156. #define DMA_DCHPRI21_DPA_MASK (0x40U)
  4157. #define DMA_DCHPRI21_DPA_SHIFT (6U)
  4158. #define DMA_DCHPRI21_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI21_DPA_SHIFT)) & DMA_DCHPRI21_DPA_MASK)
  4159. #define DMA_DCHPRI21_ECP_MASK (0x80U)
  4160. #define DMA_DCHPRI21_ECP_SHIFT (7U)
  4161. #define DMA_DCHPRI21_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI21_ECP_SHIFT)) & DMA_DCHPRI21_ECP_MASK)
  4162. /*! @name DCHPRI20 - Channel n Priority Register */
  4163. #define DMA_DCHPRI20_CHPRI_MASK (0xFU)
  4164. #define DMA_DCHPRI20_CHPRI_SHIFT (0U)
  4165. #define DMA_DCHPRI20_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI20_CHPRI_SHIFT)) & DMA_DCHPRI20_CHPRI_MASK)
  4166. #define DMA_DCHPRI20_GRPPRI_MASK (0x30U)
  4167. #define DMA_DCHPRI20_GRPPRI_SHIFT (4U)
  4168. #define DMA_DCHPRI20_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI20_GRPPRI_SHIFT)) & DMA_DCHPRI20_GRPPRI_MASK)
  4169. #define DMA_DCHPRI20_DPA_MASK (0x40U)
  4170. #define DMA_DCHPRI20_DPA_SHIFT (6U)
  4171. #define DMA_DCHPRI20_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI20_DPA_SHIFT)) & DMA_DCHPRI20_DPA_MASK)
  4172. #define DMA_DCHPRI20_ECP_MASK (0x80U)
  4173. #define DMA_DCHPRI20_ECP_SHIFT (7U)
  4174. #define DMA_DCHPRI20_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI20_ECP_SHIFT)) & DMA_DCHPRI20_ECP_MASK)
  4175. /*! @name DCHPRI27 - Channel n Priority Register */
  4176. #define DMA_DCHPRI27_CHPRI_MASK (0xFU)
  4177. #define DMA_DCHPRI27_CHPRI_SHIFT (0U)
  4178. #define DMA_DCHPRI27_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI27_CHPRI_SHIFT)) & DMA_DCHPRI27_CHPRI_MASK)
  4179. #define DMA_DCHPRI27_GRPPRI_MASK (0x30U)
  4180. #define DMA_DCHPRI27_GRPPRI_SHIFT (4U)
  4181. #define DMA_DCHPRI27_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI27_GRPPRI_SHIFT)) & DMA_DCHPRI27_GRPPRI_MASK)
  4182. #define DMA_DCHPRI27_DPA_MASK (0x40U)
  4183. #define DMA_DCHPRI27_DPA_SHIFT (6U)
  4184. #define DMA_DCHPRI27_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI27_DPA_SHIFT)) & DMA_DCHPRI27_DPA_MASK)
  4185. #define DMA_DCHPRI27_ECP_MASK (0x80U)
  4186. #define DMA_DCHPRI27_ECP_SHIFT (7U)
  4187. #define DMA_DCHPRI27_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI27_ECP_SHIFT)) & DMA_DCHPRI27_ECP_MASK)
  4188. /*! @name DCHPRI26 - Channel n Priority Register */
  4189. #define DMA_DCHPRI26_CHPRI_MASK (0xFU)
  4190. #define DMA_DCHPRI26_CHPRI_SHIFT (0U)
  4191. #define DMA_DCHPRI26_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI26_CHPRI_SHIFT)) & DMA_DCHPRI26_CHPRI_MASK)
  4192. #define DMA_DCHPRI26_GRPPRI_MASK (0x30U)
  4193. #define DMA_DCHPRI26_GRPPRI_SHIFT (4U)
  4194. #define DMA_DCHPRI26_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI26_GRPPRI_SHIFT)) & DMA_DCHPRI26_GRPPRI_MASK)
  4195. #define DMA_DCHPRI26_DPA_MASK (0x40U)
  4196. #define DMA_DCHPRI26_DPA_SHIFT (6U)
  4197. #define DMA_DCHPRI26_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI26_DPA_SHIFT)) & DMA_DCHPRI26_DPA_MASK)
  4198. #define DMA_DCHPRI26_ECP_MASK (0x80U)
  4199. #define DMA_DCHPRI26_ECP_SHIFT (7U)
  4200. #define DMA_DCHPRI26_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI26_ECP_SHIFT)) & DMA_DCHPRI26_ECP_MASK)
  4201. /*! @name DCHPRI25 - Channel n Priority Register */
  4202. #define DMA_DCHPRI25_CHPRI_MASK (0xFU)
  4203. #define DMA_DCHPRI25_CHPRI_SHIFT (0U)
  4204. #define DMA_DCHPRI25_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI25_CHPRI_SHIFT)) & DMA_DCHPRI25_CHPRI_MASK)
  4205. #define DMA_DCHPRI25_GRPPRI_MASK (0x30U)
  4206. #define DMA_DCHPRI25_GRPPRI_SHIFT (4U)
  4207. #define DMA_DCHPRI25_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI25_GRPPRI_SHIFT)) & DMA_DCHPRI25_GRPPRI_MASK)
  4208. #define DMA_DCHPRI25_DPA_MASK (0x40U)
  4209. #define DMA_DCHPRI25_DPA_SHIFT (6U)
  4210. #define DMA_DCHPRI25_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI25_DPA_SHIFT)) & DMA_DCHPRI25_DPA_MASK)
  4211. #define DMA_DCHPRI25_ECP_MASK (0x80U)
  4212. #define DMA_DCHPRI25_ECP_SHIFT (7U)
  4213. #define DMA_DCHPRI25_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI25_ECP_SHIFT)) & DMA_DCHPRI25_ECP_MASK)
  4214. /*! @name DCHPRI24 - Channel n Priority Register */
  4215. #define DMA_DCHPRI24_CHPRI_MASK (0xFU)
  4216. #define DMA_DCHPRI24_CHPRI_SHIFT (0U)
  4217. #define DMA_DCHPRI24_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI24_CHPRI_SHIFT)) & DMA_DCHPRI24_CHPRI_MASK)
  4218. #define DMA_DCHPRI24_GRPPRI_MASK (0x30U)
  4219. #define DMA_DCHPRI24_GRPPRI_SHIFT (4U)
  4220. #define DMA_DCHPRI24_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI24_GRPPRI_SHIFT)) & DMA_DCHPRI24_GRPPRI_MASK)
  4221. #define DMA_DCHPRI24_DPA_MASK (0x40U)
  4222. #define DMA_DCHPRI24_DPA_SHIFT (6U)
  4223. #define DMA_DCHPRI24_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI24_DPA_SHIFT)) & DMA_DCHPRI24_DPA_MASK)
  4224. #define DMA_DCHPRI24_ECP_MASK (0x80U)
  4225. #define DMA_DCHPRI24_ECP_SHIFT (7U)
  4226. #define DMA_DCHPRI24_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI24_ECP_SHIFT)) & DMA_DCHPRI24_ECP_MASK)
  4227. /*! @name DCHPRI31 - Channel n Priority Register */
  4228. #define DMA_DCHPRI31_CHPRI_MASK (0xFU)
  4229. #define DMA_DCHPRI31_CHPRI_SHIFT (0U)
  4230. #define DMA_DCHPRI31_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI31_CHPRI_SHIFT)) & DMA_DCHPRI31_CHPRI_MASK)
  4231. #define DMA_DCHPRI31_GRPPRI_MASK (0x30U)
  4232. #define DMA_DCHPRI31_GRPPRI_SHIFT (4U)
  4233. #define DMA_DCHPRI31_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI31_GRPPRI_SHIFT)) & DMA_DCHPRI31_GRPPRI_MASK)
  4234. #define DMA_DCHPRI31_DPA_MASK (0x40U)
  4235. #define DMA_DCHPRI31_DPA_SHIFT (6U)
  4236. #define DMA_DCHPRI31_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI31_DPA_SHIFT)) & DMA_DCHPRI31_DPA_MASK)
  4237. #define DMA_DCHPRI31_ECP_MASK (0x80U)
  4238. #define DMA_DCHPRI31_ECP_SHIFT (7U)
  4239. #define DMA_DCHPRI31_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI31_ECP_SHIFT)) & DMA_DCHPRI31_ECP_MASK)
  4240. /*! @name DCHPRI30 - Channel n Priority Register */
  4241. #define DMA_DCHPRI30_CHPRI_MASK (0xFU)
  4242. #define DMA_DCHPRI30_CHPRI_SHIFT (0U)
  4243. #define DMA_DCHPRI30_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI30_CHPRI_SHIFT)) & DMA_DCHPRI30_CHPRI_MASK)
  4244. #define DMA_DCHPRI30_GRPPRI_MASK (0x30U)
  4245. #define DMA_DCHPRI30_GRPPRI_SHIFT (4U)
  4246. #define DMA_DCHPRI30_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI30_GRPPRI_SHIFT)) & DMA_DCHPRI30_GRPPRI_MASK)
  4247. #define DMA_DCHPRI30_DPA_MASK (0x40U)
  4248. #define DMA_DCHPRI30_DPA_SHIFT (6U)
  4249. #define DMA_DCHPRI30_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI30_DPA_SHIFT)) & DMA_DCHPRI30_DPA_MASK)
  4250. #define DMA_DCHPRI30_ECP_MASK (0x80U)
  4251. #define DMA_DCHPRI30_ECP_SHIFT (7U)
  4252. #define DMA_DCHPRI30_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI30_ECP_SHIFT)) & DMA_DCHPRI30_ECP_MASK)
  4253. /*! @name DCHPRI29 - Channel n Priority Register */
  4254. #define DMA_DCHPRI29_CHPRI_MASK (0xFU)
  4255. #define DMA_DCHPRI29_CHPRI_SHIFT (0U)
  4256. #define DMA_DCHPRI29_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI29_CHPRI_SHIFT)) & DMA_DCHPRI29_CHPRI_MASK)
  4257. #define DMA_DCHPRI29_GRPPRI_MASK (0x30U)
  4258. #define DMA_DCHPRI29_GRPPRI_SHIFT (4U)
  4259. #define DMA_DCHPRI29_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI29_GRPPRI_SHIFT)) & DMA_DCHPRI29_GRPPRI_MASK)
  4260. #define DMA_DCHPRI29_DPA_MASK (0x40U)
  4261. #define DMA_DCHPRI29_DPA_SHIFT (6U)
  4262. #define DMA_DCHPRI29_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI29_DPA_SHIFT)) & DMA_DCHPRI29_DPA_MASK)
  4263. #define DMA_DCHPRI29_ECP_MASK (0x80U)
  4264. #define DMA_DCHPRI29_ECP_SHIFT (7U)
  4265. #define DMA_DCHPRI29_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI29_ECP_SHIFT)) & DMA_DCHPRI29_ECP_MASK)
  4266. /*! @name DCHPRI28 - Channel n Priority Register */
  4267. #define DMA_DCHPRI28_CHPRI_MASK (0xFU)
  4268. #define DMA_DCHPRI28_CHPRI_SHIFT (0U)
  4269. #define DMA_DCHPRI28_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI28_CHPRI_SHIFT)) & DMA_DCHPRI28_CHPRI_MASK)
  4270. #define DMA_DCHPRI28_GRPPRI_MASK (0x30U)
  4271. #define DMA_DCHPRI28_GRPPRI_SHIFT (4U)
  4272. #define DMA_DCHPRI28_GRPPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI28_GRPPRI_SHIFT)) & DMA_DCHPRI28_GRPPRI_MASK)
  4273. #define DMA_DCHPRI28_DPA_MASK (0x40U)
  4274. #define DMA_DCHPRI28_DPA_SHIFT (6U)
  4275. #define DMA_DCHPRI28_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI28_DPA_SHIFT)) & DMA_DCHPRI28_DPA_MASK)
  4276. #define DMA_DCHPRI28_ECP_MASK (0x80U)
  4277. #define DMA_DCHPRI28_ECP_SHIFT (7U)
  4278. #define DMA_DCHPRI28_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI28_ECP_SHIFT)) & DMA_DCHPRI28_ECP_MASK)
  4279. /*! @name SADDR - TCD Source Address */
  4280. #define DMA_SADDR_SADDR_MASK (0xFFFFFFFFU)
  4281. #define DMA_SADDR_SADDR_SHIFT (0U)
  4282. #define DMA_SADDR_SADDR(x) (((uint32_t)(((uint32_t)(x)) << DMA_SADDR_SADDR_SHIFT)) & DMA_SADDR_SADDR_MASK)
  4283. /* The count of DMA_SADDR */
  4284. #define DMA_SADDR_COUNT (32U)
  4285. /*! @name SOFF - TCD Signed Source Address Offset */
  4286. #define DMA_SOFF_SOFF_MASK (0xFFFFU)
  4287. #define DMA_SOFF_SOFF_SHIFT (0U)
  4288. #define DMA_SOFF_SOFF(x) (((uint16_t)(((uint16_t)(x)) << DMA_SOFF_SOFF_SHIFT)) & DMA_SOFF_SOFF_MASK)
  4289. /* The count of DMA_SOFF */
  4290. #define DMA_SOFF_COUNT (32U)
  4291. /*! @name ATTR - TCD Transfer Attributes */
  4292. #define DMA_ATTR_DSIZE_MASK (0x7U)
  4293. #define DMA_ATTR_DSIZE_SHIFT (0U)
  4294. #define DMA_ATTR_DSIZE(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_DSIZE_SHIFT)) & DMA_ATTR_DSIZE_MASK)
  4295. #define DMA_ATTR_DMOD_MASK (0xF8U)
  4296. #define DMA_ATTR_DMOD_SHIFT (3U)
  4297. #define DMA_ATTR_DMOD(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_DMOD_SHIFT)) & DMA_ATTR_DMOD_MASK)
  4298. #define DMA_ATTR_SSIZE_MASK (0x700U)
  4299. #define DMA_ATTR_SSIZE_SHIFT (8U)
  4300. #define DMA_ATTR_SSIZE(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_SSIZE_SHIFT)) & DMA_ATTR_SSIZE_MASK)
  4301. #define DMA_ATTR_SMOD_MASK (0xF800U)
  4302. #define DMA_ATTR_SMOD_SHIFT (11U)
  4303. #define DMA_ATTR_SMOD(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_SMOD_SHIFT)) & DMA_ATTR_SMOD_MASK)
  4304. /* The count of DMA_ATTR */
  4305. #define DMA_ATTR_COUNT (32U)
  4306. /*! @name NBYTES_MLNO - TCD Minor Byte Count (Minor Loop Mapping Disabled) */
  4307. #define DMA_NBYTES_MLNO_NBYTES_MASK (0xFFFFFFFFU)
  4308. #define DMA_NBYTES_MLNO_NBYTES_SHIFT (0U)
  4309. #define DMA_NBYTES_MLNO_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLNO_NBYTES_SHIFT)) & DMA_NBYTES_MLNO_NBYTES_MASK)
  4310. /* The count of DMA_NBYTES_MLNO */
  4311. #define DMA_NBYTES_MLNO_COUNT (32U)
  4312. /*! @name NBYTES_MLOFFNO - TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled) */
  4313. #define DMA_NBYTES_MLOFFNO_NBYTES_MASK (0x3FFFFFFFU)
  4314. #define DMA_NBYTES_MLOFFNO_NBYTES_SHIFT (0U)
  4315. #define DMA_NBYTES_MLOFFNO_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_NBYTES_SHIFT)) & DMA_NBYTES_MLOFFNO_NBYTES_MASK)
  4316. #define DMA_NBYTES_MLOFFNO_DMLOE_MASK (0x40000000U)
  4317. #define DMA_NBYTES_MLOFFNO_DMLOE_SHIFT (30U)
  4318. #define DMA_NBYTES_MLOFFNO_DMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_DMLOE_SHIFT)) & DMA_NBYTES_MLOFFNO_DMLOE_MASK)
  4319. #define DMA_NBYTES_MLOFFNO_SMLOE_MASK (0x80000000U)
  4320. #define DMA_NBYTES_MLOFFNO_SMLOE_SHIFT (31U)
  4321. #define DMA_NBYTES_MLOFFNO_SMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_SMLOE_SHIFT)) & DMA_NBYTES_MLOFFNO_SMLOE_MASK)
  4322. /* The count of DMA_NBYTES_MLOFFNO */
  4323. #define DMA_NBYTES_MLOFFNO_COUNT (32U)
  4324. /*! @name NBYTES_MLOFFYES - TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled) */
  4325. #define DMA_NBYTES_MLOFFYES_NBYTES_MASK (0x3FFU)
  4326. #define DMA_NBYTES_MLOFFYES_NBYTES_SHIFT (0U)
  4327. #define DMA_NBYTES_MLOFFYES_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_NBYTES_SHIFT)) & DMA_NBYTES_MLOFFYES_NBYTES_MASK)
  4328. #define DMA_NBYTES_MLOFFYES_MLOFF_MASK (0x3FFFFC00U)
  4329. #define DMA_NBYTES_MLOFFYES_MLOFF_SHIFT (10U)
  4330. #define DMA_NBYTES_MLOFFYES_MLOFF(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_MLOFF_SHIFT)) & DMA_NBYTES_MLOFFYES_MLOFF_MASK)
  4331. #define DMA_NBYTES_MLOFFYES_DMLOE_MASK (0x40000000U)
  4332. #define DMA_NBYTES_MLOFFYES_DMLOE_SHIFT (30U)
  4333. #define DMA_NBYTES_MLOFFYES_DMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_DMLOE_SHIFT)) & DMA_NBYTES_MLOFFYES_DMLOE_MASK)
  4334. #define DMA_NBYTES_MLOFFYES_SMLOE_MASK (0x80000000U)
  4335. #define DMA_NBYTES_MLOFFYES_SMLOE_SHIFT (31U)
  4336. #define DMA_NBYTES_MLOFFYES_SMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_SMLOE_SHIFT)) & DMA_NBYTES_MLOFFYES_SMLOE_MASK)
  4337. /* The count of DMA_NBYTES_MLOFFYES */
  4338. #define DMA_NBYTES_MLOFFYES_COUNT (32U)
  4339. /*! @name SLAST - TCD Last Source Address Adjustment */
  4340. #define DMA_SLAST_SLAST_MASK (0xFFFFFFFFU)
  4341. #define DMA_SLAST_SLAST_SHIFT (0U)
  4342. #define DMA_SLAST_SLAST(x) (((uint32_t)(((uint32_t)(x)) << DMA_SLAST_SLAST_SHIFT)) & DMA_SLAST_SLAST_MASK)
  4343. /* The count of DMA_SLAST */
  4344. #define DMA_SLAST_COUNT (32U)
  4345. /*! @name DADDR - TCD Destination Address */
  4346. #define DMA_DADDR_DADDR_MASK (0xFFFFFFFFU)
  4347. #define DMA_DADDR_DADDR_SHIFT (0U)
  4348. #define DMA_DADDR_DADDR(x) (((uint32_t)(((uint32_t)(x)) << DMA_DADDR_DADDR_SHIFT)) & DMA_DADDR_DADDR_MASK)
  4349. /* The count of DMA_DADDR */
  4350. #define DMA_DADDR_COUNT (32U)
  4351. /*! @name DOFF - TCD Signed Destination Address Offset */
  4352. #define DMA_DOFF_DOFF_MASK (0xFFFFU)
  4353. #define DMA_DOFF_DOFF_SHIFT (0U)
  4354. #define DMA_DOFF_DOFF(x) (((uint16_t)(((uint16_t)(x)) << DMA_DOFF_DOFF_SHIFT)) & DMA_DOFF_DOFF_MASK)
  4355. /* The count of DMA_DOFF */
  4356. #define DMA_DOFF_COUNT (32U)
  4357. /*! @name CITER_ELINKNO - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled) */
  4358. #define DMA_CITER_ELINKNO_CITER_MASK (0x7FFFU)
  4359. #define DMA_CITER_ELINKNO_CITER_SHIFT (0U)
  4360. #define DMA_CITER_ELINKNO_CITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKNO_CITER_SHIFT)) & DMA_CITER_ELINKNO_CITER_MASK)
  4361. #define DMA_CITER_ELINKNO_ELINK_MASK (0x8000U)
  4362. #define DMA_CITER_ELINKNO_ELINK_SHIFT (15U)
  4363. #define DMA_CITER_ELINKNO_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKNO_ELINK_SHIFT)) & DMA_CITER_ELINKNO_ELINK_MASK)
  4364. /* The count of DMA_CITER_ELINKNO */
  4365. #define DMA_CITER_ELINKNO_COUNT (32U)
  4366. /*! @name CITER_ELINKYES - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled) */
  4367. #define DMA_CITER_ELINKYES_CITER_MASK (0x1FFU)
  4368. #define DMA_CITER_ELINKYES_CITER_SHIFT (0U)
  4369. #define DMA_CITER_ELINKYES_CITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_CITER_SHIFT)) & DMA_CITER_ELINKYES_CITER_MASK)
  4370. #define DMA_CITER_ELINKYES_LINKCH_MASK (0x3E00U)
  4371. #define DMA_CITER_ELINKYES_LINKCH_SHIFT (9U)
  4372. #define DMA_CITER_ELINKYES_LINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_LINKCH_SHIFT)) & DMA_CITER_ELINKYES_LINKCH_MASK)
  4373. #define DMA_CITER_ELINKYES_ELINK_MASK (0x8000U)
  4374. #define DMA_CITER_ELINKYES_ELINK_SHIFT (15U)
  4375. #define DMA_CITER_ELINKYES_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_ELINK_SHIFT)) & DMA_CITER_ELINKYES_ELINK_MASK)
  4376. /* The count of DMA_CITER_ELINKYES */
  4377. #define DMA_CITER_ELINKYES_COUNT (32U)
  4378. /*! @name DLAST_SGA - TCD Last Destination Address Adjustment/Scatter Gather Address */
  4379. #define DMA_DLAST_SGA_DLASTSGA_MASK (0xFFFFFFFFU)
  4380. #define DMA_DLAST_SGA_DLASTSGA_SHIFT (0U)
  4381. #define DMA_DLAST_SGA_DLASTSGA(x) (((uint32_t)(((uint32_t)(x)) << DMA_DLAST_SGA_DLASTSGA_SHIFT)) & DMA_DLAST_SGA_DLASTSGA_MASK)
  4382. /* The count of DMA_DLAST_SGA */
  4383. #define DMA_DLAST_SGA_COUNT (32U)
  4384. /*! @name CSR - TCD Control and Status */
  4385. #define DMA_CSR_START_MASK (0x1U)
  4386. #define DMA_CSR_START_SHIFT (0U)
  4387. #define DMA_CSR_START(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_START_SHIFT)) & DMA_CSR_START_MASK)
  4388. #define DMA_CSR_INTMAJOR_MASK (0x2U)
  4389. #define DMA_CSR_INTMAJOR_SHIFT (1U)
  4390. #define DMA_CSR_INTMAJOR(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_INTMAJOR_SHIFT)) & DMA_CSR_INTMAJOR_MASK)
  4391. #define DMA_CSR_INTHALF_MASK (0x4U)
  4392. #define DMA_CSR_INTHALF_SHIFT (2U)
  4393. #define DMA_CSR_INTHALF(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_INTHALF_SHIFT)) & DMA_CSR_INTHALF_MASK)
  4394. #define DMA_CSR_DREQ_MASK (0x8U)
  4395. #define DMA_CSR_DREQ_SHIFT (3U)
  4396. #define DMA_CSR_DREQ(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_DREQ_SHIFT)) & DMA_CSR_DREQ_MASK)
  4397. #define DMA_CSR_ESG_MASK (0x10U)
  4398. #define DMA_CSR_ESG_SHIFT (4U)
  4399. #define DMA_CSR_ESG(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_ESG_SHIFT)) & DMA_CSR_ESG_MASK)
  4400. #define DMA_CSR_MAJORELINK_MASK (0x20U)
  4401. #define DMA_CSR_MAJORELINK_SHIFT (5U)
  4402. #define DMA_CSR_MAJORELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_MAJORELINK_SHIFT)) & DMA_CSR_MAJORELINK_MASK)
  4403. #define DMA_CSR_ACTIVE_MASK (0x40U)
  4404. #define DMA_CSR_ACTIVE_SHIFT (6U)
  4405. #define DMA_CSR_ACTIVE(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_ACTIVE_SHIFT)) & DMA_CSR_ACTIVE_MASK)
  4406. #define DMA_CSR_DONE_MASK (0x80U)
  4407. #define DMA_CSR_DONE_SHIFT (7U)
  4408. #define DMA_CSR_DONE(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_DONE_SHIFT)) & DMA_CSR_DONE_MASK)
  4409. #define DMA_CSR_MAJORLINKCH_MASK (0x1F00U)
  4410. #define DMA_CSR_MAJORLINKCH_SHIFT (8U)
  4411. #define DMA_CSR_MAJORLINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_MAJORLINKCH_SHIFT)) & DMA_CSR_MAJORLINKCH_MASK)
  4412. #define DMA_CSR_BWC_MASK (0xC000U)
  4413. #define DMA_CSR_BWC_SHIFT (14U)
  4414. #define DMA_CSR_BWC(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_BWC_SHIFT)) & DMA_CSR_BWC_MASK)
  4415. /* The count of DMA_CSR */
  4416. #define DMA_CSR_COUNT (32U)
  4417. /*! @name BITER_ELINKNO - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled) */
  4418. #define DMA_BITER_ELINKNO_BITER_MASK (0x7FFFU)
  4419. #define DMA_BITER_ELINKNO_BITER_SHIFT (0U)
  4420. #define DMA_BITER_ELINKNO_BITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKNO_BITER_SHIFT)) & DMA_BITER_ELINKNO_BITER_MASK)
  4421. #define DMA_BITER_ELINKNO_ELINK_MASK (0x8000U)
  4422. #define DMA_BITER_ELINKNO_ELINK_SHIFT (15U)
  4423. #define DMA_BITER_ELINKNO_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKNO_ELINK_SHIFT)) & DMA_BITER_ELINKNO_ELINK_MASK)
  4424. /* The count of DMA_BITER_ELINKNO */
  4425. #define DMA_BITER_ELINKNO_COUNT (32U)
  4426. /*! @name BITER_ELINKYES - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled) */
  4427. #define DMA_BITER_ELINKYES_BITER_MASK (0x1FFU)
  4428. #define DMA_BITER_ELINKYES_BITER_SHIFT (0U)
  4429. #define DMA_BITER_ELINKYES_BITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_BITER_SHIFT)) & DMA_BITER_ELINKYES_BITER_MASK)
  4430. #define DMA_BITER_ELINKYES_LINKCH_MASK (0x3E00U)
  4431. #define DMA_BITER_ELINKYES_LINKCH_SHIFT (9U)
  4432. #define DMA_BITER_ELINKYES_LINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_LINKCH_SHIFT)) & DMA_BITER_ELINKYES_LINKCH_MASK)
  4433. #define DMA_BITER_ELINKYES_ELINK_MASK (0x8000U)
  4434. #define DMA_BITER_ELINKYES_ELINK_SHIFT (15U)
  4435. #define DMA_BITER_ELINKYES_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_ELINK_SHIFT)) & DMA_BITER_ELINKYES_ELINK_MASK)
  4436. /* The count of DMA_BITER_ELINKYES */
  4437. #define DMA_BITER_ELINKYES_COUNT (32U)
  4438. /*!
  4439. * @}
  4440. */ /* end of group DMA_Register_Masks */
  4441. /* DMA - Peripheral instance base addresses */
  4442. /** Peripheral DMA base address */
  4443. #define DMA_BASE (0x40008000u)
  4444. /** Peripheral DMA base pointer */
  4445. #define DMA0 ((DMA_Type *)DMA_BASE)
  4446. /** Array initializer of DMA peripheral base addresses */
  4447. #define DMA_BASE_ADDRS { DMA_BASE }
  4448. /** Array initializer of DMA peripheral base pointers */
  4449. #define DMA_BASE_PTRS { DMA0 }
  4450. /** Interrupt vectors for the DMA peripheral type */
  4451. #define DMA_CHN_IRQS { { DMA0_DMA16_IRQn, DMA1_DMA17_IRQn, DMA2_DMA18_IRQn, DMA3_DMA19_IRQn, DMA4_DMA20_IRQn, DMA5_DMA21_IRQn, DMA6_DMA22_IRQn, DMA7_DMA23_IRQn, DMA8_DMA24_IRQn, DMA9_DMA25_IRQn, DMA10_DMA26_IRQn, DMA11_DMA27_IRQn, DMA12_DMA28_IRQn, DMA13_DMA29_IRQn, DMA14_DMA30_IRQn, DMA15_DMA31_IRQn, DMA0_DMA16_IRQn, DMA1_DMA17_IRQn, DMA2_DMA18_IRQn, DMA3_DMA19_IRQn, DMA4_DMA20_IRQn, DMA5_DMA21_IRQn, DMA6_DMA22_IRQn, DMA7_DMA23_IRQn, DMA8_DMA24_IRQn, DMA9_DMA25_IRQn, DMA10_DMA26_IRQn, DMA11_DMA27_IRQn, DMA12_DMA28_IRQn, DMA13_DMA29_IRQn, DMA14_DMA30_IRQn, DMA15_DMA31_IRQn } }
  4452. #define DMA_ERROR_IRQS { DMA_Error_IRQn }
  4453. /*!
  4454. * @}
  4455. */ /* end of group DMA_Peripheral_Access_Layer */
  4456. /* ----------------------------------------------------------------------------
  4457. -- DMAMUX Peripheral Access Layer
  4458. ---------------------------------------------------------------------------- */
  4459. /*!
  4460. * @addtogroup DMAMUX_Peripheral_Access_Layer DMAMUX Peripheral Access Layer
  4461. * @{
  4462. */
  4463. /** DMAMUX - Register Layout Typedef */
  4464. typedef struct {
  4465. __IO uint8_t CHCFG[32]; /**< Channel Configuration register, array offset: 0x0, array step: 0x1 */
  4466. } DMAMUX_Type;
  4467. /* ----------------------------------------------------------------------------
  4468. -- DMAMUX Register Masks
  4469. ---------------------------------------------------------------------------- */
  4470. /*!
  4471. * @addtogroup DMAMUX_Register_Masks DMAMUX Register Masks
  4472. * @{
  4473. */
  4474. /*! @name CHCFG - Channel Configuration register */
  4475. #define DMAMUX_CHCFG_SOURCE_MASK (0x3FU)
  4476. #define DMAMUX_CHCFG_SOURCE_SHIFT (0U)
  4477. #define DMAMUX_CHCFG_SOURCE(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_SOURCE_SHIFT)) & DMAMUX_CHCFG_SOURCE_MASK)
  4478. #define DMAMUX_CHCFG_TRIG_MASK (0x40U)
  4479. #define DMAMUX_CHCFG_TRIG_SHIFT (6U)
  4480. #define DMAMUX_CHCFG_TRIG(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_TRIG_SHIFT)) & DMAMUX_CHCFG_TRIG_MASK)
  4481. #define DMAMUX_CHCFG_ENBL_MASK (0x80U)
  4482. #define DMAMUX_CHCFG_ENBL_SHIFT (7U)
  4483. #define DMAMUX_CHCFG_ENBL(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_ENBL_SHIFT)) & DMAMUX_CHCFG_ENBL_MASK)
  4484. /* The count of DMAMUX_CHCFG */
  4485. #define DMAMUX_CHCFG_COUNT (32U)
  4486. /*!
  4487. * @}
  4488. */ /* end of group DMAMUX_Register_Masks */
  4489. /* DMAMUX - Peripheral instance base addresses */
  4490. /** Peripheral DMAMUX base address */
  4491. #define DMAMUX_BASE (0x40021000u)
  4492. /** Peripheral DMAMUX base pointer */
  4493. #define DMAMUX ((DMAMUX_Type *)DMAMUX_BASE)
  4494. /** Array initializer of DMAMUX peripheral base addresses */
  4495. #define DMAMUX_BASE_ADDRS { DMAMUX_BASE }
  4496. /** Array initializer of DMAMUX peripheral base pointers */
  4497. #define DMAMUX_BASE_PTRS { DMAMUX }
  4498. /*!
  4499. * @}
  4500. */ /* end of group DMAMUX_Peripheral_Access_Layer */
  4501. /* ----------------------------------------------------------------------------
  4502. -- EMVSIM Peripheral Access Layer
  4503. ---------------------------------------------------------------------------- */
  4504. /*!
  4505. * @addtogroup EMVSIM_Peripheral_Access_Layer EMVSIM Peripheral Access Layer
  4506. * @{
  4507. */
  4508. /** EMVSIM - Register Layout Typedef */
  4509. typedef struct {
  4510. __I uint32_t VER_ID; /**< Version ID Register, offset: 0x0 */
  4511. __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */
  4512. __IO uint32_t CLKCFG; /**< Clock Configuration Register, offset: 0x8 */
  4513. __IO uint32_t DIVISOR; /**< Baud Rate Divisor Register, offset: 0xC */
  4514. __IO uint32_t CTRL; /**< Control Register, offset: 0x10 */
  4515. __IO uint32_t INT_MASK; /**< Interrupt Mask Register, offset: 0x14 */
  4516. __IO uint32_t RX_THD; /**< Receiver Threshold Register, offset: 0x18 */
  4517. __IO uint32_t TX_THD; /**< Transmitter Threshold Register, offset: 0x1C */
  4518. __IO uint32_t RX_STATUS; /**< Receive Status Register, offset: 0x20 */
  4519. __IO uint32_t TX_STATUS; /**< Transmitter Status Register, offset: 0x24 */
  4520. __IO uint32_t PCSR; /**< Port Control and Status Register, offset: 0x28 */
  4521. __I uint32_t RX_BUF; /**< Receive Data Read Buffer, offset: 0x2C */
  4522. __O uint32_t TX_BUF; /**< Transmit Data Buffer, offset: 0x30 */
  4523. __IO uint32_t TX_GETU; /**< Transmitter Guard ETU Value Register, offset: 0x34 */
  4524. __IO uint32_t CWT_VAL; /**< Character Wait Time Value Register, offset: 0x38 */
  4525. __IO uint32_t BWT_VAL; /**< Block Wait Time Value Register, offset: 0x3C */
  4526. __IO uint32_t BGT_VAL; /**< Block Guard Time Value Register, offset: 0x40 */
  4527. __IO uint32_t GPCNT0_VAL; /**< General Purpose Counter 0 Timeout Value Register, offset: 0x44 */
  4528. __IO uint32_t GPCNT1_VAL; /**< General Purpose Counter 1 Timeout Value, offset: 0x48 */
  4529. } EMVSIM_Type;
  4530. /* ----------------------------------------------------------------------------
  4531. -- EMVSIM Register Masks
  4532. ---------------------------------------------------------------------------- */
  4533. /*!
  4534. * @addtogroup EMVSIM_Register_Masks EMVSIM Register Masks
  4535. * @{
  4536. */
  4537. /*! @name VER_ID - Version ID Register */
  4538. #define EMVSIM_VER_ID_VER_MASK (0xFFFFFFFFU)
  4539. #define EMVSIM_VER_ID_VER_SHIFT (0U)
  4540. #define EMVSIM_VER_ID_VER(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_VER_ID_VER_SHIFT)) & EMVSIM_VER_ID_VER_MASK)
  4541. /*! @name PARAM - Parameter Register */
  4542. #define EMVSIM_PARAM_RX_FIFO_DEPTH_MASK (0xFFU)
  4543. #define EMVSIM_PARAM_RX_FIFO_DEPTH_SHIFT (0U)
  4544. #define EMVSIM_PARAM_RX_FIFO_DEPTH(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PARAM_RX_FIFO_DEPTH_SHIFT)) & EMVSIM_PARAM_RX_FIFO_DEPTH_MASK)
  4545. #define EMVSIM_PARAM_TX_FIFO_DEPTH_MASK (0xFF00U)
  4546. #define EMVSIM_PARAM_TX_FIFO_DEPTH_SHIFT (8U)
  4547. #define EMVSIM_PARAM_TX_FIFO_DEPTH(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PARAM_TX_FIFO_DEPTH_SHIFT)) & EMVSIM_PARAM_TX_FIFO_DEPTH_MASK)
  4548. /*! @name CLKCFG - Clock Configuration Register */
  4549. #define EMVSIM_CLKCFG_CLK_PRSC_MASK (0xFFU)
  4550. #define EMVSIM_CLKCFG_CLK_PRSC_SHIFT (0U)
  4551. #define EMVSIM_CLKCFG_CLK_PRSC(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CLKCFG_CLK_PRSC_SHIFT)) & EMVSIM_CLKCFG_CLK_PRSC_MASK)
  4552. #define EMVSIM_CLKCFG_GPCNT1_CLK_SEL_MASK (0x300U)
  4553. #define EMVSIM_CLKCFG_GPCNT1_CLK_SEL_SHIFT (8U)
  4554. #define EMVSIM_CLKCFG_GPCNT1_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CLKCFG_GPCNT1_CLK_SEL_SHIFT)) & EMVSIM_CLKCFG_GPCNT1_CLK_SEL_MASK)
  4555. #define EMVSIM_CLKCFG_GPCNT0_CLK_SEL_MASK (0xC00U)
  4556. #define EMVSIM_CLKCFG_GPCNT0_CLK_SEL_SHIFT (10U)
  4557. #define EMVSIM_CLKCFG_GPCNT0_CLK_SEL(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CLKCFG_GPCNT0_CLK_SEL_SHIFT)) & EMVSIM_CLKCFG_GPCNT0_CLK_SEL_MASK)
  4558. /*! @name DIVISOR - Baud Rate Divisor Register */
  4559. #define EMVSIM_DIVISOR_DIVISOR_VALUE_MASK (0x1FFU)
  4560. #define EMVSIM_DIVISOR_DIVISOR_VALUE_SHIFT (0U)
  4561. #define EMVSIM_DIVISOR_DIVISOR_VALUE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_DIVISOR_DIVISOR_VALUE_SHIFT)) & EMVSIM_DIVISOR_DIVISOR_VALUE_MASK)
  4562. /*! @name CTRL - Control Register */
  4563. #define EMVSIM_CTRL_IC_MASK (0x1U)
  4564. #define EMVSIM_CTRL_IC_SHIFT (0U)
  4565. #define EMVSIM_CTRL_IC(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_IC_SHIFT)) & EMVSIM_CTRL_IC_MASK)
  4566. #define EMVSIM_CTRL_ICM_MASK (0x2U)
  4567. #define EMVSIM_CTRL_ICM_SHIFT (1U)
  4568. #define EMVSIM_CTRL_ICM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_ICM_SHIFT)) & EMVSIM_CTRL_ICM_MASK)
  4569. #define EMVSIM_CTRL_ANACK_MASK (0x4U)
  4570. #define EMVSIM_CTRL_ANACK_SHIFT (2U)
  4571. #define EMVSIM_CTRL_ANACK(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_ANACK_SHIFT)) & EMVSIM_CTRL_ANACK_MASK)
  4572. #define EMVSIM_CTRL_ONACK_MASK (0x8U)
  4573. #define EMVSIM_CTRL_ONACK_SHIFT (3U)
  4574. #define EMVSIM_CTRL_ONACK(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_ONACK_SHIFT)) & EMVSIM_CTRL_ONACK_MASK)
  4575. #define EMVSIM_CTRL_FLSH_RX_MASK (0x100U)
  4576. #define EMVSIM_CTRL_FLSH_RX_SHIFT (8U)
  4577. #define EMVSIM_CTRL_FLSH_RX(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_FLSH_RX_SHIFT)) & EMVSIM_CTRL_FLSH_RX_MASK)
  4578. #define EMVSIM_CTRL_FLSH_TX_MASK (0x200U)
  4579. #define EMVSIM_CTRL_FLSH_TX_SHIFT (9U)
  4580. #define EMVSIM_CTRL_FLSH_TX(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_FLSH_TX_SHIFT)) & EMVSIM_CTRL_FLSH_TX_MASK)
  4581. #define EMVSIM_CTRL_SW_RST_MASK (0x400U)
  4582. #define EMVSIM_CTRL_SW_RST_SHIFT (10U)
  4583. #define EMVSIM_CTRL_SW_RST(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_SW_RST_SHIFT)) & EMVSIM_CTRL_SW_RST_MASK)
  4584. #define EMVSIM_CTRL_KILL_CLOCKS_MASK (0x800U)
  4585. #define EMVSIM_CTRL_KILL_CLOCKS_SHIFT (11U)
  4586. #define EMVSIM_CTRL_KILL_CLOCKS(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_KILL_CLOCKS_SHIFT)) & EMVSIM_CTRL_KILL_CLOCKS_MASK)
  4587. #define EMVSIM_CTRL_DOZE_EN_MASK (0x1000U)
  4588. #define EMVSIM_CTRL_DOZE_EN_SHIFT (12U)
  4589. #define EMVSIM_CTRL_DOZE_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_DOZE_EN_SHIFT)) & EMVSIM_CTRL_DOZE_EN_MASK)
  4590. #define EMVSIM_CTRL_STOP_EN_MASK (0x2000U)
  4591. #define EMVSIM_CTRL_STOP_EN_SHIFT (13U)
  4592. #define EMVSIM_CTRL_STOP_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_STOP_EN_SHIFT)) & EMVSIM_CTRL_STOP_EN_MASK)
  4593. #define EMVSIM_CTRL_RCV_EN_MASK (0x10000U)
  4594. #define EMVSIM_CTRL_RCV_EN_SHIFT (16U)
  4595. #define EMVSIM_CTRL_RCV_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_RCV_EN_SHIFT)) & EMVSIM_CTRL_RCV_EN_MASK)
  4596. #define EMVSIM_CTRL_XMT_EN_MASK (0x20000U)
  4597. #define EMVSIM_CTRL_XMT_EN_SHIFT (17U)
  4598. #define EMVSIM_CTRL_XMT_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_XMT_EN_SHIFT)) & EMVSIM_CTRL_XMT_EN_MASK)
  4599. #define EMVSIM_CTRL_RCVR_11_MASK (0x40000U)
  4600. #define EMVSIM_CTRL_RCVR_11_SHIFT (18U)
  4601. #define EMVSIM_CTRL_RCVR_11(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_RCVR_11_SHIFT)) & EMVSIM_CTRL_RCVR_11_MASK)
  4602. #define EMVSIM_CTRL_RX_DMA_EN_MASK (0x80000U)
  4603. #define EMVSIM_CTRL_RX_DMA_EN_SHIFT (19U)
  4604. #define EMVSIM_CTRL_RX_DMA_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_RX_DMA_EN_SHIFT)) & EMVSIM_CTRL_RX_DMA_EN_MASK)
  4605. #define EMVSIM_CTRL_TX_DMA_EN_MASK (0x100000U)
  4606. #define EMVSIM_CTRL_TX_DMA_EN_SHIFT (20U)
  4607. #define EMVSIM_CTRL_TX_DMA_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_TX_DMA_EN_SHIFT)) & EMVSIM_CTRL_TX_DMA_EN_MASK)
  4608. #define EMVSIM_CTRL_INV_CRC_VAL_MASK (0x1000000U)
  4609. #define EMVSIM_CTRL_INV_CRC_VAL_SHIFT (24U)
  4610. #define EMVSIM_CTRL_INV_CRC_VAL(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_INV_CRC_VAL_SHIFT)) & EMVSIM_CTRL_INV_CRC_VAL_MASK)
  4611. #define EMVSIM_CTRL_CRC_OUT_FLIP_MASK (0x2000000U)
  4612. #define EMVSIM_CTRL_CRC_OUT_FLIP_SHIFT (25U)
  4613. #define EMVSIM_CTRL_CRC_OUT_FLIP(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CRC_OUT_FLIP_SHIFT)) & EMVSIM_CTRL_CRC_OUT_FLIP_MASK)
  4614. #define EMVSIM_CTRL_CRC_IN_FLIP_MASK (0x4000000U)
  4615. #define EMVSIM_CTRL_CRC_IN_FLIP_SHIFT (26U)
  4616. #define EMVSIM_CTRL_CRC_IN_FLIP(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CRC_IN_FLIP_SHIFT)) & EMVSIM_CTRL_CRC_IN_FLIP_MASK)
  4617. #define EMVSIM_CTRL_CWT_EN_MASK (0x8000000U)
  4618. #define EMVSIM_CTRL_CWT_EN_SHIFT (27U)
  4619. #define EMVSIM_CTRL_CWT_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CWT_EN_SHIFT)) & EMVSIM_CTRL_CWT_EN_MASK)
  4620. #define EMVSIM_CTRL_LRC_EN_MASK (0x10000000U)
  4621. #define EMVSIM_CTRL_LRC_EN_SHIFT (28U)
  4622. #define EMVSIM_CTRL_LRC_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_LRC_EN_SHIFT)) & EMVSIM_CTRL_LRC_EN_MASK)
  4623. #define EMVSIM_CTRL_CRC_EN_MASK (0x20000000U)
  4624. #define EMVSIM_CTRL_CRC_EN_SHIFT (29U)
  4625. #define EMVSIM_CTRL_CRC_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_CRC_EN_SHIFT)) & EMVSIM_CTRL_CRC_EN_MASK)
  4626. #define EMVSIM_CTRL_XMT_CRC_LRC_MASK (0x40000000U)
  4627. #define EMVSIM_CTRL_XMT_CRC_LRC_SHIFT (30U)
  4628. #define EMVSIM_CTRL_XMT_CRC_LRC(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_XMT_CRC_LRC_SHIFT)) & EMVSIM_CTRL_XMT_CRC_LRC_MASK)
  4629. #define EMVSIM_CTRL_BWT_EN_MASK (0x80000000U)
  4630. #define EMVSIM_CTRL_BWT_EN_SHIFT (31U)
  4631. #define EMVSIM_CTRL_BWT_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CTRL_BWT_EN_SHIFT)) & EMVSIM_CTRL_BWT_EN_MASK)
  4632. /*! @name INT_MASK - Interrupt Mask Register */
  4633. #define EMVSIM_INT_MASK_RDT_IM_MASK (0x1U)
  4634. #define EMVSIM_INT_MASK_RDT_IM_SHIFT (0U)
  4635. #define EMVSIM_INT_MASK_RDT_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RDT_IM_SHIFT)) & EMVSIM_INT_MASK_RDT_IM_MASK)
  4636. #define EMVSIM_INT_MASK_TC_IM_MASK (0x2U)
  4637. #define EMVSIM_INT_MASK_TC_IM_SHIFT (1U)
  4638. #define EMVSIM_INT_MASK_TC_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TC_IM_SHIFT)) & EMVSIM_INT_MASK_TC_IM_MASK)
  4639. #define EMVSIM_INT_MASK_RFO_IM_MASK (0x4U)
  4640. #define EMVSIM_INT_MASK_RFO_IM_SHIFT (2U)
  4641. #define EMVSIM_INT_MASK_RFO_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RFO_IM_SHIFT)) & EMVSIM_INT_MASK_RFO_IM_MASK)
  4642. #define EMVSIM_INT_MASK_ETC_IM_MASK (0x8U)
  4643. #define EMVSIM_INT_MASK_ETC_IM_SHIFT (3U)
  4644. #define EMVSIM_INT_MASK_ETC_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_ETC_IM_SHIFT)) & EMVSIM_INT_MASK_ETC_IM_MASK)
  4645. #define EMVSIM_INT_MASK_TFE_IM_MASK (0x10U)
  4646. #define EMVSIM_INT_MASK_TFE_IM_SHIFT (4U)
  4647. #define EMVSIM_INT_MASK_TFE_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TFE_IM_SHIFT)) & EMVSIM_INT_MASK_TFE_IM_MASK)
  4648. #define EMVSIM_INT_MASK_TNACK_IM_MASK (0x20U)
  4649. #define EMVSIM_INT_MASK_TNACK_IM_SHIFT (5U)
  4650. #define EMVSIM_INT_MASK_TNACK_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TNACK_IM_SHIFT)) & EMVSIM_INT_MASK_TNACK_IM_MASK)
  4651. #define EMVSIM_INT_MASK_TFF_IM_MASK (0x40U)
  4652. #define EMVSIM_INT_MASK_TFF_IM_SHIFT (6U)
  4653. #define EMVSIM_INT_MASK_TFF_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TFF_IM_SHIFT)) & EMVSIM_INT_MASK_TFF_IM_MASK)
  4654. #define EMVSIM_INT_MASK_TDT_IM_MASK (0x80U)
  4655. #define EMVSIM_INT_MASK_TDT_IM_SHIFT (7U)
  4656. #define EMVSIM_INT_MASK_TDT_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_TDT_IM_SHIFT)) & EMVSIM_INT_MASK_TDT_IM_MASK)
  4657. #define EMVSIM_INT_MASK_GPCNT0_IM_MASK (0x100U)
  4658. #define EMVSIM_INT_MASK_GPCNT0_IM_SHIFT (8U)
  4659. #define EMVSIM_INT_MASK_GPCNT0_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_GPCNT0_IM_SHIFT)) & EMVSIM_INT_MASK_GPCNT0_IM_MASK)
  4660. #define EMVSIM_INT_MASK_CWT_ERR_IM_MASK (0x200U)
  4661. #define EMVSIM_INT_MASK_CWT_ERR_IM_SHIFT (9U)
  4662. #define EMVSIM_INT_MASK_CWT_ERR_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_CWT_ERR_IM_SHIFT)) & EMVSIM_INT_MASK_CWT_ERR_IM_MASK)
  4663. #define EMVSIM_INT_MASK_RNACK_IM_MASK (0x400U)
  4664. #define EMVSIM_INT_MASK_RNACK_IM_SHIFT (10U)
  4665. #define EMVSIM_INT_MASK_RNACK_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RNACK_IM_SHIFT)) & EMVSIM_INT_MASK_RNACK_IM_MASK)
  4666. #define EMVSIM_INT_MASK_BWT_ERR_IM_MASK (0x800U)
  4667. #define EMVSIM_INT_MASK_BWT_ERR_IM_SHIFT (11U)
  4668. #define EMVSIM_INT_MASK_BWT_ERR_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_BWT_ERR_IM_SHIFT)) & EMVSIM_INT_MASK_BWT_ERR_IM_MASK)
  4669. #define EMVSIM_INT_MASK_BGT_ERR_IM_MASK (0x1000U)
  4670. #define EMVSIM_INT_MASK_BGT_ERR_IM_SHIFT (12U)
  4671. #define EMVSIM_INT_MASK_BGT_ERR_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_BGT_ERR_IM_SHIFT)) & EMVSIM_INT_MASK_BGT_ERR_IM_MASK)
  4672. #define EMVSIM_INT_MASK_GPCNT1_IM_MASK (0x2000U)
  4673. #define EMVSIM_INT_MASK_GPCNT1_IM_SHIFT (13U)
  4674. #define EMVSIM_INT_MASK_GPCNT1_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_GPCNT1_IM_SHIFT)) & EMVSIM_INT_MASK_GPCNT1_IM_MASK)
  4675. #define EMVSIM_INT_MASK_RX_DATA_IM_MASK (0x4000U)
  4676. #define EMVSIM_INT_MASK_RX_DATA_IM_SHIFT (14U)
  4677. #define EMVSIM_INT_MASK_RX_DATA_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_RX_DATA_IM_SHIFT)) & EMVSIM_INT_MASK_RX_DATA_IM_MASK)
  4678. #define EMVSIM_INT_MASK_PEF_IM_MASK (0x8000U)
  4679. #define EMVSIM_INT_MASK_PEF_IM_SHIFT (15U)
  4680. #define EMVSIM_INT_MASK_PEF_IM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_INT_MASK_PEF_IM_SHIFT)) & EMVSIM_INT_MASK_PEF_IM_MASK)
  4681. /*! @name RX_THD - Receiver Threshold Register */
  4682. #define EMVSIM_RX_THD_RDT_MASK (0xFU)
  4683. #define EMVSIM_RX_THD_RDT_SHIFT (0U)
  4684. #define EMVSIM_RX_THD_RDT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_THD_RDT_SHIFT)) & EMVSIM_RX_THD_RDT_MASK)
  4685. #define EMVSIM_RX_THD_RNCK_THD_MASK (0xF00U)
  4686. #define EMVSIM_RX_THD_RNCK_THD_SHIFT (8U)
  4687. #define EMVSIM_RX_THD_RNCK_THD(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_THD_RNCK_THD_SHIFT)) & EMVSIM_RX_THD_RNCK_THD_MASK)
  4688. /*! @name TX_THD - Transmitter Threshold Register */
  4689. #define EMVSIM_TX_THD_TDT_MASK (0xFU)
  4690. #define EMVSIM_TX_THD_TDT_SHIFT (0U)
  4691. #define EMVSIM_TX_THD_TDT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_THD_TDT_SHIFT)) & EMVSIM_TX_THD_TDT_MASK)
  4692. #define EMVSIM_TX_THD_TNCK_THD_MASK (0xF00U)
  4693. #define EMVSIM_TX_THD_TNCK_THD_SHIFT (8U)
  4694. #define EMVSIM_TX_THD_TNCK_THD(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_THD_TNCK_THD_SHIFT)) & EMVSIM_TX_THD_TNCK_THD_MASK)
  4695. /*! @name RX_STATUS - Receive Status Register */
  4696. #define EMVSIM_RX_STATUS_RFO_MASK (0x1U)
  4697. #define EMVSIM_RX_STATUS_RFO_SHIFT (0U)
  4698. #define EMVSIM_RX_STATUS_RFO(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RFO_SHIFT)) & EMVSIM_RX_STATUS_RFO_MASK)
  4699. #define EMVSIM_RX_STATUS_RX_DATA_MASK (0x10U)
  4700. #define EMVSIM_RX_STATUS_RX_DATA_SHIFT (4U)
  4701. #define EMVSIM_RX_STATUS_RX_DATA(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RX_DATA_SHIFT)) & EMVSIM_RX_STATUS_RX_DATA_MASK)
  4702. #define EMVSIM_RX_STATUS_RDTF_MASK (0x20U)
  4703. #define EMVSIM_RX_STATUS_RDTF_SHIFT (5U)
  4704. #define EMVSIM_RX_STATUS_RDTF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RDTF_SHIFT)) & EMVSIM_RX_STATUS_RDTF_MASK)
  4705. #define EMVSIM_RX_STATUS_LRC_OK_MASK (0x40U)
  4706. #define EMVSIM_RX_STATUS_LRC_OK_SHIFT (6U)
  4707. #define EMVSIM_RX_STATUS_LRC_OK(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_LRC_OK_SHIFT)) & EMVSIM_RX_STATUS_LRC_OK_MASK)
  4708. #define EMVSIM_RX_STATUS_CRC_OK_MASK (0x80U)
  4709. #define EMVSIM_RX_STATUS_CRC_OK_SHIFT (7U)
  4710. #define EMVSIM_RX_STATUS_CRC_OK(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_CRC_OK_SHIFT)) & EMVSIM_RX_STATUS_CRC_OK_MASK)
  4711. #define EMVSIM_RX_STATUS_CWT_ERR_MASK (0x100U)
  4712. #define EMVSIM_RX_STATUS_CWT_ERR_SHIFT (8U)
  4713. #define EMVSIM_RX_STATUS_CWT_ERR(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_CWT_ERR_SHIFT)) & EMVSIM_RX_STATUS_CWT_ERR_MASK)
  4714. #define EMVSIM_RX_STATUS_RTE_MASK (0x200U)
  4715. #define EMVSIM_RX_STATUS_RTE_SHIFT (9U)
  4716. #define EMVSIM_RX_STATUS_RTE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RTE_SHIFT)) & EMVSIM_RX_STATUS_RTE_MASK)
  4717. #define EMVSIM_RX_STATUS_BWT_ERR_MASK (0x400U)
  4718. #define EMVSIM_RX_STATUS_BWT_ERR_SHIFT (10U)
  4719. #define EMVSIM_RX_STATUS_BWT_ERR(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_BWT_ERR_SHIFT)) & EMVSIM_RX_STATUS_BWT_ERR_MASK)
  4720. #define EMVSIM_RX_STATUS_BGT_ERR_MASK (0x800U)
  4721. #define EMVSIM_RX_STATUS_BGT_ERR_SHIFT (11U)
  4722. #define EMVSIM_RX_STATUS_BGT_ERR(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_BGT_ERR_SHIFT)) & EMVSIM_RX_STATUS_BGT_ERR_MASK)
  4723. #define EMVSIM_RX_STATUS_PEF_MASK (0x1000U)
  4724. #define EMVSIM_RX_STATUS_PEF_SHIFT (12U)
  4725. #define EMVSIM_RX_STATUS_PEF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_PEF_SHIFT)) & EMVSIM_RX_STATUS_PEF_MASK)
  4726. #define EMVSIM_RX_STATUS_FEF_MASK (0x2000U)
  4727. #define EMVSIM_RX_STATUS_FEF_SHIFT (13U)
  4728. #define EMVSIM_RX_STATUS_FEF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_FEF_SHIFT)) & EMVSIM_RX_STATUS_FEF_MASK)
  4729. #define EMVSIM_RX_STATUS_RX_WPTR_MASK (0xF0000U)
  4730. #define EMVSIM_RX_STATUS_RX_WPTR_SHIFT (16U)
  4731. #define EMVSIM_RX_STATUS_RX_WPTR(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RX_WPTR_SHIFT)) & EMVSIM_RX_STATUS_RX_WPTR_MASK)
  4732. #define EMVSIM_RX_STATUS_RX_CNT_MASK (0x1F000000U)
  4733. #define EMVSIM_RX_STATUS_RX_CNT_SHIFT (24U)
  4734. #define EMVSIM_RX_STATUS_RX_CNT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_STATUS_RX_CNT_SHIFT)) & EMVSIM_RX_STATUS_RX_CNT_MASK)
  4735. /*! @name TX_STATUS - Transmitter Status Register */
  4736. #define EMVSIM_TX_STATUS_TNTE_MASK (0x1U)
  4737. #define EMVSIM_TX_STATUS_TNTE_SHIFT (0U)
  4738. #define EMVSIM_TX_STATUS_TNTE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TNTE_SHIFT)) & EMVSIM_TX_STATUS_TNTE_MASK)
  4739. #define EMVSIM_TX_STATUS_TFE_MASK (0x8U)
  4740. #define EMVSIM_TX_STATUS_TFE_SHIFT (3U)
  4741. #define EMVSIM_TX_STATUS_TFE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TFE_SHIFT)) & EMVSIM_TX_STATUS_TFE_MASK)
  4742. #define EMVSIM_TX_STATUS_ETCF_MASK (0x10U)
  4743. #define EMVSIM_TX_STATUS_ETCF_SHIFT (4U)
  4744. #define EMVSIM_TX_STATUS_ETCF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_ETCF_SHIFT)) & EMVSIM_TX_STATUS_ETCF_MASK)
  4745. #define EMVSIM_TX_STATUS_TCF_MASK (0x20U)
  4746. #define EMVSIM_TX_STATUS_TCF_SHIFT (5U)
  4747. #define EMVSIM_TX_STATUS_TCF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TCF_SHIFT)) & EMVSIM_TX_STATUS_TCF_MASK)
  4748. #define EMVSIM_TX_STATUS_TFF_MASK (0x40U)
  4749. #define EMVSIM_TX_STATUS_TFF_SHIFT (6U)
  4750. #define EMVSIM_TX_STATUS_TFF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TFF_SHIFT)) & EMVSIM_TX_STATUS_TFF_MASK)
  4751. #define EMVSIM_TX_STATUS_TDTF_MASK (0x80U)
  4752. #define EMVSIM_TX_STATUS_TDTF_SHIFT (7U)
  4753. #define EMVSIM_TX_STATUS_TDTF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TDTF_SHIFT)) & EMVSIM_TX_STATUS_TDTF_MASK)
  4754. #define EMVSIM_TX_STATUS_GPCNT0_TO_MASK (0x100U)
  4755. #define EMVSIM_TX_STATUS_GPCNT0_TO_SHIFT (8U)
  4756. #define EMVSIM_TX_STATUS_GPCNT0_TO(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_GPCNT0_TO_SHIFT)) & EMVSIM_TX_STATUS_GPCNT0_TO_MASK)
  4757. #define EMVSIM_TX_STATUS_GPCNT1_TO_MASK (0x200U)
  4758. #define EMVSIM_TX_STATUS_GPCNT1_TO_SHIFT (9U)
  4759. #define EMVSIM_TX_STATUS_GPCNT1_TO(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_GPCNT1_TO_SHIFT)) & EMVSIM_TX_STATUS_GPCNT1_TO_MASK)
  4760. #define EMVSIM_TX_STATUS_TX_RPTR_MASK (0xF0000U)
  4761. #define EMVSIM_TX_STATUS_TX_RPTR_SHIFT (16U)
  4762. #define EMVSIM_TX_STATUS_TX_RPTR(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TX_RPTR_SHIFT)) & EMVSIM_TX_STATUS_TX_RPTR_MASK)
  4763. #define EMVSIM_TX_STATUS_TX_CNT_MASK (0x1F000000U)
  4764. #define EMVSIM_TX_STATUS_TX_CNT_SHIFT (24U)
  4765. #define EMVSIM_TX_STATUS_TX_CNT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_STATUS_TX_CNT_SHIFT)) & EMVSIM_TX_STATUS_TX_CNT_MASK)
  4766. /*! @name PCSR - Port Control and Status Register */
  4767. #define EMVSIM_PCSR_SAPD_MASK (0x1U)
  4768. #define EMVSIM_PCSR_SAPD_SHIFT (0U)
  4769. #define EMVSIM_PCSR_SAPD(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SAPD_SHIFT)) & EMVSIM_PCSR_SAPD_MASK)
  4770. #define EMVSIM_PCSR_SVCC_EN_MASK (0x2U)
  4771. #define EMVSIM_PCSR_SVCC_EN_SHIFT (1U)
  4772. #define EMVSIM_PCSR_SVCC_EN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SVCC_EN_SHIFT)) & EMVSIM_PCSR_SVCC_EN_MASK)
  4773. #define EMVSIM_PCSR_VCCENP_MASK (0x4U)
  4774. #define EMVSIM_PCSR_VCCENP_SHIFT (2U)
  4775. #define EMVSIM_PCSR_VCCENP(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_VCCENP_SHIFT)) & EMVSIM_PCSR_VCCENP_MASK)
  4776. #define EMVSIM_PCSR_SRST_MASK (0x8U)
  4777. #define EMVSIM_PCSR_SRST_SHIFT (3U)
  4778. #define EMVSIM_PCSR_SRST(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SRST_SHIFT)) & EMVSIM_PCSR_SRST_MASK)
  4779. #define EMVSIM_PCSR_SCEN_MASK (0x10U)
  4780. #define EMVSIM_PCSR_SCEN_SHIFT (4U)
  4781. #define EMVSIM_PCSR_SCEN(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SCEN_SHIFT)) & EMVSIM_PCSR_SCEN_MASK)
  4782. #define EMVSIM_PCSR_SCSP_MASK (0x20U)
  4783. #define EMVSIM_PCSR_SCSP_SHIFT (5U)
  4784. #define EMVSIM_PCSR_SCSP(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SCSP_SHIFT)) & EMVSIM_PCSR_SCSP_MASK)
  4785. #define EMVSIM_PCSR_SPD_MASK (0x80U)
  4786. #define EMVSIM_PCSR_SPD_SHIFT (7U)
  4787. #define EMVSIM_PCSR_SPD(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPD_SHIFT)) & EMVSIM_PCSR_SPD_MASK)
  4788. #define EMVSIM_PCSR_SPDIM_MASK (0x1000000U)
  4789. #define EMVSIM_PCSR_SPDIM_SHIFT (24U)
  4790. #define EMVSIM_PCSR_SPDIM(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDIM_SHIFT)) & EMVSIM_PCSR_SPDIM_MASK)
  4791. #define EMVSIM_PCSR_SPDIF_MASK (0x2000000U)
  4792. #define EMVSIM_PCSR_SPDIF_SHIFT (25U)
  4793. #define EMVSIM_PCSR_SPDIF(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDIF_SHIFT)) & EMVSIM_PCSR_SPDIF_MASK)
  4794. #define EMVSIM_PCSR_SPDP_MASK (0x4000000U)
  4795. #define EMVSIM_PCSR_SPDP_SHIFT (26U)
  4796. #define EMVSIM_PCSR_SPDP(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDP_SHIFT)) & EMVSIM_PCSR_SPDP_MASK)
  4797. #define EMVSIM_PCSR_SPDES_MASK (0x8000000U)
  4798. #define EMVSIM_PCSR_SPDES_SHIFT (27U)
  4799. #define EMVSIM_PCSR_SPDES(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_PCSR_SPDES_SHIFT)) & EMVSIM_PCSR_SPDES_MASK)
  4800. /*! @name RX_BUF - Receive Data Read Buffer */
  4801. #define EMVSIM_RX_BUF_RX_BYTE_MASK (0xFFU)
  4802. #define EMVSIM_RX_BUF_RX_BYTE_SHIFT (0U)
  4803. #define EMVSIM_RX_BUF_RX_BYTE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_RX_BUF_RX_BYTE_SHIFT)) & EMVSIM_RX_BUF_RX_BYTE_MASK)
  4804. /*! @name TX_BUF - Transmit Data Buffer */
  4805. #define EMVSIM_TX_BUF_TX_BYTE_MASK (0xFFU)
  4806. #define EMVSIM_TX_BUF_TX_BYTE_SHIFT (0U)
  4807. #define EMVSIM_TX_BUF_TX_BYTE(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_BUF_TX_BYTE_SHIFT)) & EMVSIM_TX_BUF_TX_BYTE_MASK)
  4808. /*! @name TX_GETU - Transmitter Guard ETU Value Register */
  4809. #define EMVSIM_TX_GETU_GETU_MASK (0xFFU)
  4810. #define EMVSIM_TX_GETU_GETU_SHIFT (0U)
  4811. #define EMVSIM_TX_GETU_GETU(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_TX_GETU_GETU_SHIFT)) & EMVSIM_TX_GETU_GETU_MASK)
  4812. /*! @name CWT_VAL - Character Wait Time Value Register */
  4813. #define EMVSIM_CWT_VAL_CWT_MASK (0xFFFFU)
  4814. #define EMVSIM_CWT_VAL_CWT_SHIFT (0U)
  4815. #define EMVSIM_CWT_VAL_CWT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_CWT_VAL_CWT_SHIFT)) & EMVSIM_CWT_VAL_CWT_MASK)
  4816. /*! @name BWT_VAL - Block Wait Time Value Register */
  4817. #define EMVSIM_BWT_VAL_BWT_MASK (0xFFFFFFFFU)
  4818. #define EMVSIM_BWT_VAL_BWT_SHIFT (0U)
  4819. #define EMVSIM_BWT_VAL_BWT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_BWT_VAL_BWT_SHIFT)) & EMVSIM_BWT_VAL_BWT_MASK)
  4820. /*! @name BGT_VAL - Block Guard Time Value Register */
  4821. #define EMVSIM_BGT_VAL_BGT_MASK (0xFFFFU)
  4822. #define EMVSIM_BGT_VAL_BGT_SHIFT (0U)
  4823. #define EMVSIM_BGT_VAL_BGT(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_BGT_VAL_BGT_SHIFT)) & EMVSIM_BGT_VAL_BGT_MASK)
  4824. /*! @name GPCNT0_VAL - General Purpose Counter 0 Timeout Value Register */
  4825. #define EMVSIM_GPCNT0_VAL_GPCNT0_MASK (0xFFFFU)
  4826. #define EMVSIM_GPCNT0_VAL_GPCNT0_SHIFT (0U)
  4827. #define EMVSIM_GPCNT0_VAL_GPCNT0(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_GPCNT0_VAL_GPCNT0_SHIFT)) & EMVSIM_GPCNT0_VAL_GPCNT0_MASK)
  4828. /*! @name GPCNT1_VAL - General Purpose Counter 1 Timeout Value */
  4829. #define EMVSIM_GPCNT1_VAL_GPCNT1_MASK (0xFFFFU)
  4830. #define EMVSIM_GPCNT1_VAL_GPCNT1_SHIFT (0U)
  4831. #define EMVSIM_GPCNT1_VAL_GPCNT1(x) (((uint32_t)(((uint32_t)(x)) << EMVSIM_GPCNT1_VAL_GPCNT1_SHIFT)) & EMVSIM_GPCNT1_VAL_GPCNT1_MASK)
  4832. /*!
  4833. * @}
  4834. */ /* end of group EMVSIM_Register_Masks */
  4835. /* EMVSIM - Peripheral instance base addresses */
  4836. /** Peripheral EMVSIM0 base address */
  4837. #define EMVSIM0_BASE (0x400D4000u)
  4838. /** Peripheral EMVSIM0 base pointer */
  4839. #define EMVSIM0 ((EMVSIM_Type *)EMVSIM0_BASE)
  4840. /** Peripheral EMVSIM1 base address */
  4841. #define EMVSIM1_BASE (0x400D5000u)
  4842. /** Peripheral EMVSIM1 base pointer */
  4843. #define EMVSIM1 ((EMVSIM_Type *)EMVSIM1_BASE)
  4844. /** Array initializer of EMVSIM peripheral base addresses */
  4845. #define EMVSIM_BASE_ADDRS { EMVSIM0_BASE, EMVSIM1_BASE }
  4846. /** Array initializer of EMVSIM peripheral base pointers */
  4847. #define EMVSIM_BASE_PTRS { EMVSIM0, EMVSIM1 }
  4848. /** Interrupt vectors for the EMVSIM peripheral type */
  4849. #define EMVSIM_IRQS { EMVSIM0_IRQn, EMVSIM1_IRQn }
  4850. /*!
  4851. * @}
  4852. */ /* end of group EMVSIM_Peripheral_Access_Layer */
  4853. /* ----------------------------------------------------------------------------
  4854. -- EWM Peripheral Access Layer
  4855. ---------------------------------------------------------------------------- */
  4856. /*!
  4857. * @addtogroup EWM_Peripheral_Access_Layer EWM Peripheral Access Layer
  4858. * @{
  4859. */
  4860. /** EWM - Register Layout Typedef */
  4861. typedef struct {
  4862. __IO uint8_t CTRL; /**< Control Register, offset: 0x0 */
  4863. __O uint8_t SERV; /**< Service Register, offset: 0x1 */
  4864. __IO uint8_t CMPL; /**< Compare Low Register, offset: 0x2 */
  4865. __IO uint8_t CMPH; /**< Compare High Register, offset: 0x3 */
  4866. __IO uint8_t CLKCTRL; /**< Clock Control Register, offset: 0x4 */
  4867. __IO uint8_t CLKPRESCALER; /**< Clock Prescaler Register, offset: 0x5 */
  4868. } EWM_Type;
  4869. /* ----------------------------------------------------------------------------
  4870. -- EWM Register Masks
  4871. ---------------------------------------------------------------------------- */
  4872. /*!
  4873. * @addtogroup EWM_Register_Masks EWM Register Masks
  4874. * @{
  4875. */
  4876. /*! @name CTRL - Control Register */
  4877. #define EWM_CTRL_EWMEN_MASK (0x1U)
  4878. #define EWM_CTRL_EWMEN_SHIFT (0U)
  4879. #define EWM_CTRL_EWMEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_EWMEN_SHIFT)) & EWM_CTRL_EWMEN_MASK)
  4880. #define EWM_CTRL_ASSIN_MASK (0x2U)
  4881. #define EWM_CTRL_ASSIN_SHIFT (1U)
  4882. #define EWM_CTRL_ASSIN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_ASSIN_SHIFT)) & EWM_CTRL_ASSIN_MASK)
  4883. #define EWM_CTRL_INEN_MASK (0x4U)
  4884. #define EWM_CTRL_INEN_SHIFT (2U)
  4885. #define EWM_CTRL_INEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_INEN_SHIFT)) & EWM_CTRL_INEN_MASK)
  4886. #define EWM_CTRL_INTEN_MASK (0x8U)
  4887. #define EWM_CTRL_INTEN_SHIFT (3U)
  4888. #define EWM_CTRL_INTEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_INTEN_SHIFT)) & EWM_CTRL_INTEN_MASK)
  4889. /*! @name SERV - Service Register */
  4890. #define EWM_SERV_SERVICE_MASK (0xFFU)
  4891. #define EWM_SERV_SERVICE_SHIFT (0U)
  4892. #define EWM_SERV_SERVICE(x) (((uint8_t)(((uint8_t)(x)) << EWM_SERV_SERVICE_SHIFT)) & EWM_SERV_SERVICE_MASK)
  4893. /*! @name CMPL - Compare Low Register */
  4894. #define EWM_CMPL_COMPAREL_MASK (0xFFU)
  4895. #define EWM_CMPL_COMPAREL_SHIFT (0U)
  4896. #define EWM_CMPL_COMPAREL(x) (((uint8_t)(((uint8_t)(x)) << EWM_CMPL_COMPAREL_SHIFT)) & EWM_CMPL_COMPAREL_MASK)
  4897. /*! @name CMPH - Compare High Register */
  4898. #define EWM_CMPH_COMPAREH_MASK (0xFFU)
  4899. #define EWM_CMPH_COMPAREH_SHIFT (0U)
  4900. #define EWM_CMPH_COMPAREH(x) (((uint8_t)(((uint8_t)(x)) << EWM_CMPH_COMPAREH_SHIFT)) & EWM_CMPH_COMPAREH_MASK)
  4901. /*! @name CLKCTRL - Clock Control Register */
  4902. #define EWM_CLKCTRL_CLKSEL_MASK (0x3U)
  4903. #define EWM_CLKCTRL_CLKSEL_SHIFT (0U)
  4904. #define EWM_CLKCTRL_CLKSEL(x) (((uint8_t)(((uint8_t)(x)) << EWM_CLKCTRL_CLKSEL_SHIFT)) & EWM_CLKCTRL_CLKSEL_MASK)
  4905. /*! @name CLKPRESCALER - Clock Prescaler Register */
  4906. #define EWM_CLKPRESCALER_CLK_DIV_MASK (0xFFU)
  4907. #define EWM_CLKPRESCALER_CLK_DIV_SHIFT (0U)
  4908. #define EWM_CLKPRESCALER_CLK_DIV(x) (((uint8_t)(((uint8_t)(x)) << EWM_CLKPRESCALER_CLK_DIV_SHIFT)) & EWM_CLKPRESCALER_CLK_DIV_MASK)
  4909. /*!
  4910. * @}
  4911. */ /* end of group EWM_Register_Masks */
  4912. /* EWM - Peripheral instance base addresses */
  4913. /** Peripheral EWM base address */
  4914. #define EWM_BASE (0x40061000u)
  4915. /** Peripheral EWM base pointer */
  4916. #define EWM ((EWM_Type *)EWM_BASE)
  4917. /** Array initializer of EWM peripheral base addresses */
  4918. #define EWM_BASE_ADDRS { EWM_BASE }
  4919. /** Array initializer of EWM peripheral base pointers */
  4920. #define EWM_BASE_PTRS { EWM }
  4921. /** Interrupt vectors for the EWM peripheral type */
  4922. #define EWM_IRQS { WDOG_EWM_IRQn }
  4923. /*!
  4924. * @}
  4925. */ /* end of group EWM_Peripheral_Access_Layer */
  4926. /* ----------------------------------------------------------------------------
  4927. -- FB Peripheral Access Layer
  4928. ---------------------------------------------------------------------------- */
  4929. /*!
  4930. * @addtogroup FB_Peripheral_Access_Layer FB Peripheral Access Layer
  4931. * @{
  4932. */
  4933. /** FB - Register Layout Typedef */
  4934. typedef struct {
  4935. struct { /* offset: 0x0, array step: 0xC */
  4936. __IO uint32_t CSAR; /**< Chip Select Address Register, array offset: 0x0, array step: 0xC */
  4937. __IO uint32_t CSMR; /**< Chip Select Mask Register, array offset: 0x4, array step: 0xC */
  4938. __IO uint32_t CSCR; /**< Chip Select Control Register, array offset: 0x8, array step: 0xC */
  4939. } CS[6];
  4940. uint8_t RESERVED_0[24];
  4941. __IO uint32_t CSPMCR; /**< Chip Select port Multiplexing Control Register, offset: 0x60 */
  4942. } FB_Type;
  4943. /* ----------------------------------------------------------------------------
  4944. -- FB Register Masks
  4945. ---------------------------------------------------------------------------- */
  4946. /*!
  4947. * @addtogroup FB_Register_Masks FB Register Masks
  4948. * @{
  4949. */
  4950. /*! @name CSAR - Chip Select Address Register */
  4951. #define FB_CSAR_BA_MASK (0xFFFF0000U)
  4952. #define FB_CSAR_BA_SHIFT (16U)
  4953. #define FB_CSAR_BA(x) (((uint32_t)(((uint32_t)(x)) << FB_CSAR_BA_SHIFT)) & FB_CSAR_BA_MASK)
  4954. /* The count of FB_CSAR */
  4955. #define FB_CSAR_COUNT (6U)
  4956. /*! @name CSMR - Chip Select Mask Register */
  4957. #define FB_CSMR_V_MASK (0x1U)
  4958. #define FB_CSMR_V_SHIFT (0U)
  4959. #define FB_CSMR_V(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_V_SHIFT)) & FB_CSMR_V_MASK)
  4960. #define FB_CSMR_WP_MASK (0x100U)
  4961. #define FB_CSMR_WP_SHIFT (8U)
  4962. #define FB_CSMR_WP(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_WP_SHIFT)) & FB_CSMR_WP_MASK)
  4963. #define FB_CSMR_BAM_MASK (0xFFFF0000U)
  4964. #define FB_CSMR_BAM_SHIFT (16U)
  4965. #define FB_CSMR_BAM(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_BAM_SHIFT)) & FB_CSMR_BAM_MASK)
  4966. /* The count of FB_CSMR */
  4967. #define FB_CSMR_COUNT (6U)
  4968. /*! @name CSCR - Chip Select Control Register */
  4969. #define FB_CSCR_BSTW_MASK (0x8U)
  4970. #define FB_CSCR_BSTW_SHIFT (3U)
  4971. #define FB_CSCR_BSTW(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BSTW_SHIFT)) & FB_CSCR_BSTW_MASK)
  4972. #define FB_CSCR_BSTR_MASK (0x10U)
  4973. #define FB_CSCR_BSTR_SHIFT (4U)
  4974. #define FB_CSCR_BSTR(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BSTR_SHIFT)) & FB_CSCR_BSTR_MASK)
  4975. #define FB_CSCR_BEM_MASK (0x20U)
  4976. #define FB_CSCR_BEM_SHIFT (5U)
  4977. #define FB_CSCR_BEM(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BEM_SHIFT)) & FB_CSCR_BEM_MASK)
  4978. #define FB_CSCR_PS_MASK (0xC0U)
  4979. #define FB_CSCR_PS_SHIFT (6U)
  4980. #define FB_CSCR_PS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_PS_SHIFT)) & FB_CSCR_PS_MASK)
  4981. #define FB_CSCR_AA_MASK (0x100U)
  4982. #define FB_CSCR_AA_SHIFT (8U)
  4983. #define FB_CSCR_AA(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_AA_SHIFT)) & FB_CSCR_AA_MASK)
  4984. #define FB_CSCR_BLS_MASK (0x200U)
  4985. #define FB_CSCR_BLS_SHIFT (9U)
  4986. #define FB_CSCR_BLS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BLS_SHIFT)) & FB_CSCR_BLS_MASK)
  4987. #define FB_CSCR_WS_MASK (0xFC00U)
  4988. #define FB_CSCR_WS_SHIFT (10U)
  4989. #define FB_CSCR_WS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_WS_SHIFT)) & FB_CSCR_WS_MASK)
  4990. #define FB_CSCR_WRAH_MASK (0x30000U)
  4991. #define FB_CSCR_WRAH_SHIFT (16U)
  4992. #define FB_CSCR_WRAH(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_WRAH_SHIFT)) & FB_CSCR_WRAH_MASK)
  4993. #define FB_CSCR_RDAH_MASK (0xC0000U)
  4994. #define FB_CSCR_RDAH_SHIFT (18U)
  4995. #define FB_CSCR_RDAH(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_RDAH_SHIFT)) & FB_CSCR_RDAH_MASK)
  4996. #define FB_CSCR_ASET_MASK (0x300000U)
  4997. #define FB_CSCR_ASET_SHIFT (20U)
  4998. #define FB_CSCR_ASET(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_ASET_SHIFT)) & FB_CSCR_ASET_MASK)
  4999. #define FB_CSCR_EXTS_MASK (0x400000U)
  5000. #define FB_CSCR_EXTS_SHIFT (22U)
  5001. #define FB_CSCR_EXTS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_EXTS_SHIFT)) & FB_CSCR_EXTS_MASK)
  5002. #define FB_CSCR_SWSEN_MASK (0x800000U)
  5003. #define FB_CSCR_SWSEN_SHIFT (23U)
  5004. #define FB_CSCR_SWSEN(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_SWSEN_SHIFT)) & FB_CSCR_SWSEN_MASK)
  5005. #define FB_CSCR_SWS_MASK (0xFC000000U)
  5006. #define FB_CSCR_SWS_SHIFT (26U)
  5007. #define FB_CSCR_SWS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_SWS_SHIFT)) & FB_CSCR_SWS_MASK)
  5008. /* The count of FB_CSCR */
  5009. #define FB_CSCR_COUNT (6U)
  5010. /*! @name CSPMCR - Chip Select port Multiplexing Control Register */
  5011. #define FB_CSPMCR_GROUP5_MASK (0xF000U)
  5012. #define FB_CSPMCR_GROUP5_SHIFT (12U)
  5013. #define FB_CSPMCR_GROUP5(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP5_SHIFT)) & FB_CSPMCR_GROUP5_MASK)
  5014. #define FB_CSPMCR_GROUP4_MASK (0xF0000U)
  5015. #define FB_CSPMCR_GROUP4_SHIFT (16U)
  5016. #define FB_CSPMCR_GROUP4(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP4_SHIFT)) & FB_CSPMCR_GROUP4_MASK)
  5017. #define FB_CSPMCR_GROUP3_MASK (0xF00000U)
  5018. #define FB_CSPMCR_GROUP3_SHIFT (20U)
  5019. #define FB_CSPMCR_GROUP3(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP3_SHIFT)) & FB_CSPMCR_GROUP3_MASK)
  5020. #define FB_CSPMCR_GROUP2_MASK (0xF000000U)
  5021. #define FB_CSPMCR_GROUP2_SHIFT (24U)
  5022. #define FB_CSPMCR_GROUP2(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP2_SHIFT)) & FB_CSPMCR_GROUP2_MASK)
  5023. #define FB_CSPMCR_GROUP1_MASK (0xF0000000U)
  5024. #define FB_CSPMCR_GROUP1_SHIFT (28U)
  5025. #define FB_CSPMCR_GROUP1(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP1_SHIFT)) & FB_CSPMCR_GROUP1_MASK)
  5026. /*!
  5027. * @}
  5028. */ /* end of group FB_Register_Masks */
  5029. /* FB - Peripheral instance base addresses */
  5030. /** Peripheral FB base address */
  5031. #define FB_BASE (0x4000C000u)
  5032. /** Peripheral FB base pointer */
  5033. #define FB ((FB_Type *)FB_BASE)
  5034. /** Array initializer of FB peripheral base addresses */
  5035. #define FB_BASE_ADDRS { FB_BASE }
  5036. /** Array initializer of FB peripheral base pointers */
  5037. #define FB_BASE_PTRS { FB }
  5038. /*!
  5039. * @}
  5040. */ /* end of group FB_Peripheral_Access_Layer */
  5041. /* ----------------------------------------------------------------------------
  5042. -- FLEXIO Peripheral Access Layer
  5043. ---------------------------------------------------------------------------- */
  5044. /*!
  5045. * @addtogroup FLEXIO_Peripheral_Access_Layer FLEXIO Peripheral Access Layer
  5046. * @{
  5047. */
  5048. /** FLEXIO - Register Layout Typedef */
  5049. typedef struct {
  5050. __I uint32_t VERID; /**< Version ID Register, offset: 0x0 */
  5051. __I uint32_t PARAM; /**< Parameter Register, offset: 0x4 */
  5052. __IO uint32_t CTRL; /**< FlexIO Control Register, offset: 0x8 */
  5053. __I uint32_t PIN; /**< Pin State Register, offset: 0xC */
  5054. __IO uint32_t SHIFTSTAT; /**< Shifter Status Register, offset: 0x10 */
  5055. __IO uint32_t SHIFTERR; /**< Shifter Error Register, offset: 0x14 */
  5056. __IO uint32_t TIMSTAT; /**< Timer Status Register, offset: 0x18 */
  5057. uint8_t RESERVED_0[4];
  5058. __IO uint32_t SHIFTSIEN; /**< Shifter Status Interrupt Enable, offset: 0x20 */
  5059. __IO uint32_t SHIFTEIEN; /**< Shifter Error Interrupt Enable, offset: 0x24 */
  5060. __IO uint32_t TIMIEN; /**< Timer Interrupt Enable Register, offset: 0x28 */
  5061. uint8_t RESERVED_1[4];
  5062. __IO uint32_t SHIFTSDEN; /**< Shifter Status DMA Enable, offset: 0x30 */
  5063. uint8_t RESERVED_2[12];
  5064. __IO uint32_t SHIFTSTATE; /**< Shifter State Register, offset: 0x40 */
  5065. uint8_t RESERVED_3[60];
  5066. __IO uint32_t SHIFTCTL[8]; /**< Shifter Control N Register, array offset: 0x80, array step: 0x4 */
  5067. uint8_t RESERVED_4[96];
  5068. __IO uint32_t SHIFTCFG[8]; /**< Shifter Configuration N Register, array offset: 0x100, array step: 0x4 */
  5069. uint8_t RESERVED_5[224];
  5070. __IO uint32_t SHIFTBUF[8]; /**< Shifter Buffer N Register, array offset: 0x200, array step: 0x4 */
  5071. uint8_t RESERVED_6[96];
  5072. __IO uint32_t SHIFTBUFBIS[8]; /**< Shifter Buffer N Bit Swapped Register, array offset: 0x280, array step: 0x4 */
  5073. uint8_t RESERVED_7[96];
  5074. __IO uint32_t SHIFTBUFBYS[8]; /**< Shifter Buffer N Byte Swapped Register, array offset: 0x300, array step: 0x4 */
  5075. uint8_t RESERVED_8[96];
  5076. __IO uint32_t SHIFTBUFBBS[8]; /**< Shifter Buffer N Bit Byte Swapped Register, array offset: 0x380, array step: 0x4 */
  5077. uint8_t RESERVED_9[96];
  5078. __IO uint32_t TIMCTL[8]; /**< Timer Control N Register, array offset: 0x400, array step: 0x4 */
  5079. uint8_t RESERVED_10[96];
  5080. __IO uint32_t TIMCFG[8]; /**< Timer Configuration N Register, array offset: 0x480, array step: 0x4 */
  5081. uint8_t RESERVED_11[96];
  5082. __IO uint32_t TIMCMP[8]; /**< Timer Compare N Register, array offset: 0x500, array step: 0x4 */
  5083. uint8_t RESERVED_12[352];
  5084. __IO uint32_t SHIFTBUFNBS[8]; /**< Shifter Buffer N Nibble Byte Swapped Register, array offset: 0x680, array step: 0x4 */
  5085. uint8_t RESERVED_13[96];
  5086. __IO uint32_t SHIFTBUFHWS[8]; /**< Shifter Buffer N Half Word Swapped Register, array offset: 0x700, array step: 0x4 */
  5087. uint8_t RESERVED_14[96];
  5088. __IO uint32_t SHIFTBUFNIS[8]; /**< Shifter Buffer N Nibble Swapped Register, array offset: 0x780, array step: 0x4 */
  5089. } FLEXIO_Type;
  5090. /* ----------------------------------------------------------------------------
  5091. -- FLEXIO Register Masks
  5092. ---------------------------------------------------------------------------- */
  5093. /*!
  5094. * @addtogroup FLEXIO_Register_Masks FLEXIO Register Masks
  5095. * @{
  5096. */
  5097. /*! @name VERID - Version ID Register */
  5098. #define FLEXIO_VERID_FEATURE_MASK (0xFFFFU)
  5099. #define FLEXIO_VERID_FEATURE_SHIFT (0U)
  5100. #define FLEXIO_VERID_FEATURE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_VERID_FEATURE_SHIFT)) & FLEXIO_VERID_FEATURE_MASK)
  5101. #define FLEXIO_VERID_MINOR_MASK (0xFF0000U)
  5102. #define FLEXIO_VERID_MINOR_SHIFT (16U)
  5103. #define FLEXIO_VERID_MINOR(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_VERID_MINOR_SHIFT)) & FLEXIO_VERID_MINOR_MASK)
  5104. #define FLEXIO_VERID_MAJOR_MASK (0xFF000000U)
  5105. #define FLEXIO_VERID_MAJOR_SHIFT (24U)
  5106. #define FLEXIO_VERID_MAJOR(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_VERID_MAJOR_SHIFT)) & FLEXIO_VERID_MAJOR_MASK)
  5107. /*! @name PARAM - Parameter Register */
  5108. #define FLEXIO_PARAM_SHIFTER_MASK (0xFFU)
  5109. #define FLEXIO_PARAM_SHIFTER_SHIFT (0U)
  5110. #define FLEXIO_PARAM_SHIFTER(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_SHIFTER_SHIFT)) & FLEXIO_PARAM_SHIFTER_MASK)
  5111. #define FLEXIO_PARAM_TIMER_MASK (0xFF00U)
  5112. #define FLEXIO_PARAM_TIMER_SHIFT (8U)
  5113. #define FLEXIO_PARAM_TIMER(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_TIMER_SHIFT)) & FLEXIO_PARAM_TIMER_MASK)
  5114. #define FLEXIO_PARAM_PIN_MASK (0xFF0000U)
  5115. #define FLEXIO_PARAM_PIN_SHIFT (16U)
  5116. #define FLEXIO_PARAM_PIN(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_PIN_SHIFT)) & FLEXIO_PARAM_PIN_MASK)
  5117. #define FLEXIO_PARAM_TRIGGER_MASK (0xFF000000U)
  5118. #define FLEXIO_PARAM_TRIGGER_SHIFT (24U)
  5119. #define FLEXIO_PARAM_TRIGGER(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_PARAM_TRIGGER_SHIFT)) & FLEXIO_PARAM_TRIGGER_MASK)
  5120. /*! @name CTRL - FlexIO Control Register */
  5121. #define FLEXIO_CTRL_FLEXEN_MASK (0x1U)
  5122. #define FLEXIO_CTRL_FLEXEN_SHIFT (0U)
  5123. #define FLEXIO_CTRL_FLEXEN(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_FLEXEN_SHIFT)) & FLEXIO_CTRL_FLEXEN_MASK)
  5124. #define FLEXIO_CTRL_SWRST_MASK (0x2U)
  5125. #define FLEXIO_CTRL_SWRST_SHIFT (1U)
  5126. #define FLEXIO_CTRL_SWRST(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_SWRST_SHIFT)) & FLEXIO_CTRL_SWRST_MASK)
  5127. #define FLEXIO_CTRL_FASTACC_MASK (0x4U)
  5128. #define FLEXIO_CTRL_FASTACC_SHIFT (2U)
  5129. #define FLEXIO_CTRL_FASTACC(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_FASTACC_SHIFT)) & FLEXIO_CTRL_FASTACC_MASK)
  5130. #define FLEXIO_CTRL_DBGE_MASK (0x40000000U)
  5131. #define FLEXIO_CTRL_DBGE_SHIFT (30U)
  5132. #define FLEXIO_CTRL_DBGE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_DBGE_SHIFT)) & FLEXIO_CTRL_DBGE_MASK)
  5133. #define FLEXIO_CTRL_DOZEN_MASK (0x80000000U)
  5134. #define FLEXIO_CTRL_DOZEN_SHIFT (31U)
  5135. #define FLEXIO_CTRL_DOZEN(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_CTRL_DOZEN_SHIFT)) & FLEXIO_CTRL_DOZEN_MASK)
  5136. /*! @name PIN - Pin State Register */
  5137. #define FLEXIO_PIN_PDI_MASK (0xFFFFFFFFU)
  5138. #define FLEXIO_PIN_PDI_SHIFT (0U)
  5139. #define FLEXIO_PIN_PDI(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_PIN_PDI_SHIFT)) & FLEXIO_PIN_PDI_MASK)
  5140. /*! @name SHIFTSTAT - Shifter Status Register */
  5141. #define FLEXIO_SHIFTSTAT_SSF_MASK (0xFFU)
  5142. #define FLEXIO_SHIFTSTAT_SSF_SHIFT (0U)
  5143. #define FLEXIO_SHIFTSTAT_SSF(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSTAT_SSF_SHIFT)) & FLEXIO_SHIFTSTAT_SSF_MASK)
  5144. /*! @name SHIFTERR - Shifter Error Register */
  5145. #define FLEXIO_SHIFTERR_SEF_MASK (0xFFU)
  5146. #define FLEXIO_SHIFTERR_SEF_SHIFT (0U)
  5147. #define FLEXIO_SHIFTERR_SEF(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTERR_SEF_SHIFT)) & FLEXIO_SHIFTERR_SEF_MASK)
  5148. /*! @name TIMSTAT - Timer Status Register */
  5149. #define FLEXIO_TIMSTAT_TSF_MASK (0xFFU)
  5150. #define FLEXIO_TIMSTAT_TSF_SHIFT (0U)
  5151. #define FLEXIO_TIMSTAT_TSF(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMSTAT_TSF_SHIFT)) & FLEXIO_TIMSTAT_TSF_MASK)
  5152. /*! @name SHIFTSIEN - Shifter Status Interrupt Enable */
  5153. #define FLEXIO_SHIFTSIEN_SSIE_MASK (0xFFU)
  5154. #define FLEXIO_SHIFTSIEN_SSIE_SHIFT (0U)
  5155. #define FLEXIO_SHIFTSIEN_SSIE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSIEN_SSIE_SHIFT)) & FLEXIO_SHIFTSIEN_SSIE_MASK)
  5156. /*! @name SHIFTEIEN - Shifter Error Interrupt Enable */
  5157. #define FLEXIO_SHIFTEIEN_SEIE_MASK (0xFFU)
  5158. #define FLEXIO_SHIFTEIEN_SEIE_SHIFT (0U)
  5159. #define FLEXIO_SHIFTEIEN_SEIE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTEIEN_SEIE_SHIFT)) & FLEXIO_SHIFTEIEN_SEIE_MASK)
  5160. /*! @name TIMIEN - Timer Interrupt Enable Register */
  5161. #define FLEXIO_TIMIEN_TEIE_MASK (0xFFU)
  5162. #define FLEXIO_TIMIEN_TEIE_SHIFT (0U)
  5163. #define FLEXIO_TIMIEN_TEIE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMIEN_TEIE_SHIFT)) & FLEXIO_TIMIEN_TEIE_MASK)
  5164. /*! @name SHIFTSDEN - Shifter Status DMA Enable */
  5165. #define FLEXIO_SHIFTSDEN_SSDE_MASK (0xFFU)
  5166. #define FLEXIO_SHIFTSDEN_SSDE_SHIFT (0U)
  5167. #define FLEXIO_SHIFTSDEN_SSDE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSDEN_SSDE_SHIFT)) & FLEXIO_SHIFTSDEN_SSDE_MASK)
  5168. /*! @name SHIFTSTATE - Shifter State Register */
  5169. #define FLEXIO_SHIFTSTATE_STATE_MASK (0x7U)
  5170. #define FLEXIO_SHIFTSTATE_STATE_SHIFT (0U)
  5171. #define FLEXIO_SHIFTSTATE_STATE(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTSTATE_STATE_SHIFT)) & FLEXIO_SHIFTSTATE_STATE_MASK)
  5172. /*! @name SHIFTCTL - Shifter Control N Register */
  5173. #define FLEXIO_SHIFTCTL_SMOD_MASK (0x7U)
  5174. #define FLEXIO_SHIFTCTL_SMOD_SHIFT (0U)
  5175. #define FLEXIO_SHIFTCTL_SMOD(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_SMOD_SHIFT)) & FLEXIO_SHIFTCTL_SMOD_MASK)
  5176. #define FLEXIO_SHIFTCTL_PINPOL_MASK (0x80U)
  5177. #define FLEXIO_SHIFTCTL_PINPOL_SHIFT (7U)
  5178. #define FLEXIO_SHIFTCTL_PINPOL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_PINPOL_SHIFT)) & FLEXIO_SHIFTCTL_PINPOL_MASK)
  5179. #define FLEXIO_SHIFTCTL_PINSEL_MASK (0x1F00U)
  5180. #define FLEXIO_SHIFTCTL_PINSEL_SHIFT (8U)
  5181. #define FLEXIO_SHIFTCTL_PINSEL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_PINSEL_SHIFT)) & FLEXIO_SHIFTCTL_PINSEL_MASK)
  5182. #define FLEXIO_SHIFTCTL_PINCFG_MASK (0x30000U)
  5183. #define FLEXIO_SHIFTCTL_PINCFG_SHIFT (16U)
  5184. #define FLEXIO_SHIFTCTL_PINCFG(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_PINCFG_SHIFT)) & FLEXIO_SHIFTCTL_PINCFG_MASK)
  5185. #define FLEXIO_SHIFTCTL_TIMPOL_MASK (0x800000U)
  5186. #define FLEXIO_SHIFTCTL_TIMPOL_SHIFT (23U)
  5187. #define FLEXIO_SHIFTCTL_TIMPOL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_TIMPOL_SHIFT)) & FLEXIO_SHIFTCTL_TIMPOL_MASK)
  5188. #define FLEXIO_SHIFTCTL_TIMSEL_MASK (0x7000000U)
  5189. #define FLEXIO_SHIFTCTL_TIMSEL_SHIFT (24U)
  5190. #define FLEXIO_SHIFTCTL_TIMSEL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCTL_TIMSEL_SHIFT)) & FLEXIO_SHIFTCTL_TIMSEL_MASK)
  5191. /* The count of FLEXIO_SHIFTCTL */
  5192. #define FLEXIO_SHIFTCTL_COUNT (8U)
  5193. /*! @name SHIFTCFG - Shifter Configuration N Register */
  5194. #define FLEXIO_SHIFTCFG_SSTART_MASK (0x3U)
  5195. #define FLEXIO_SHIFTCFG_SSTART_SHIFT (0U)
  5196. #define FLEXIO_SHIFTCFG_SSTART(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_SSTART_SHIFT)) & FLEXIO_SHIFTCFG_SSTART_MASK)
  5197. #define FLEXIO_SHIFTCFG_SSTOP_MASK (0x30U)
  5198. #define FLEXIO_SHIFTCFG_SSTOP_SHIFT (4U)
  5199. #define FLEXIO_SHIFTCFG_SSTOP(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_SSTOP_SHIFT)) & FLEXIO_SHIFTCFG_SSTOP_MASK)
  5200. #define FLEXIO_SHIFTCFG_INSRC_MASK (0x100U)
  5201. #define FLEXIO_SHIFTCFG_INSRC_SHIFT (8U)
  5202. #define FLEXIO_SHIFTCFG_INSRC(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_INSRC_SHIFT)) & FLEXIO_SHIFTCFG_INSRC_MASK)
  5203. #define FLEXIO_SHIFTCFG_PWIDTH_MASK (0x1F0000U)
  5204. #define FLEXIO_SHIFTCFG_PWIDTH_SHIFT (16U)
  5205. #define FLEXIO_SHIFTCFG_PWIDTH(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTCFG_PWIDTH_SHIFT)) & FLEXIO_SHIFTCFG_PWIDTH_MASK)
  5206. /* The count of FLEXIO_SHIFTCFG */
  5207. #define FLEXIO_SHIFTCFG_COUNT (8U)
  5208. /*! @name SHIFTBUF - Shifter Buffer N Register */
  5209. #define FLEXIO_SHIFTBUF_SHIFTBUF_MASK (0xFFFFFFFFU)
  5210. #define FLEXIO_SHIFTBUF_SHIFTBUF_SHIFT (0U)
  5211. #define FLEXIO_SHIFTBUF_SHIFTBUF(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUF_SHIFTBUF_SHIFT)) & FLEXIO_SHIFTBUF_SHIFTBUF_MASK)
  5212. /* The count of FLEXIO_SHIFTBUF */
  5213. #define FLEXIO_SHIFTBUF_COUNT (8U)
  5214. /*! @name SHIFTBUFBIS - Shifter Buffer N Bit Swapped Register */
  5215. #define FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_MASK (0xFFFFFFFFU)
  5216. #define FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_SHIFT (0U)
  5217. #define FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_SHIFT)) & FLEXIO_SHIFTBUFBIS_SHIFTBUFBIS_MASK)
  5218. /* The count of FLEXIO_SHIFTBUFBIS */
  5219. #define FLEXIO_SHIFTBUFBIS_COUNT (8U)
  5220. /*! @name SHIFTBUFBYS - Shifter Buffer N Byte Swapped Register */
  5221. #define FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_MASK (0xFFFFFFFFU)
  5222. #define FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_SHIFT (0U)
  5223. #define FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_SHIFT)) & FLEXIO_SHIFTBUFBYS_SHIFTBUFBYS_MASK)
  5224. /* The count of FLEXIO_SHIFTBUFBYS */
  5225. #define FLEXIO_SHIFTBUFBYS_COUNT (8U)
  5226. /*! @name SHIFTBUFBBS - Shifter Buffer N Bit Byte Swapped Register */
  5227. #define FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_MASK (0xFFFFFFFFU)
  5228. #define FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_SHIFT (0U)
  5229. #define FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_SHIFT)) & FLEXIO_SHIFTBUFBBS_SHIFTBUFBBS_MASK)
  5230. /* The count of FLEXIO_SHIFTBUFBBS */
  5231. #define FLEXIO_SHIFTBUFBBS_COUNT (8U)
  5232. /*! @name TIMCTL - Timer Control N Register */
  5233. #define FLEXIO_TIMCTL_TIMOD_MASK (0x3U)
  5234. #define FLEXIO_TIMCTL_TIMOD_SHIFT (0U)
  5235. #define FLEXIO_TIMCTL_TIMOD(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TIMOD_SHIFT)) & FLEXIO_TIMCTL_TIMOD_MASK)
  5236. #define FLEXIO_TIMCTL_PINPOL_MASK (0x80U)
  5237. #define FLEXIO_TIMCTL_PINPOL_SHIFT (7U)
  5238. #define FLEXIO_TIMCTL_PINPOL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_PINPOL_SHIFT)) & FLEXIO_TIMCTL_PINPOL_MASK)
  5239. #define FLEXIO_TIMCTL_PINSEL_MASK (0x1F00U)
  5240. #define FLEXIO_TIMCTL_PINSEL_SHIFT (8U)
  5241. #define FLEXIO_TIMCTL_PINSEL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_PINSEL_SHIFT)) & FLEXIO_TIMCTL_PINSEL_MASK)
  5242. #define FLEXIO_TIMCTL_PINCFG_MASK (0x30000U)
  5243. #define FLEXIO_TIMCTL_PINCFG_SHIFT (16U)
  5244. #define FLEXIO_TIMCTL_PINCFG(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_PINCFG_SHIFT)) & FLEXIO_TIMCTL_PINCFG_MASK)
  5245. #define FLEXIO_TIMCTL_TRGSRC_MASK (0x400000U)
  5246. #define FLEXIO_TIMCTL_TRGSRC_SHIFT (22U)
  5247. #define FLEXIO_TIMCTL_TRGSRC(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TRGSRC_SHIFT)) & FLEXIO_TIMCTL_TRGSRC_MASK)
  5248. #define FLEXIO_TIMCTL_TRGPOL_MASK (0x800000U)
  5249. #define FLEXIO_TIMCTL_TRGPOL_SHIFT (23U)
  5250. #define FLEXIO_TIMCTL_TRGPOL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TRGPOL_SHIFT)) & FLEXIO_TIMCTL_TRGPOL_MASK)
  5251. #define FLEXIO_TIMCTL_TRGSEL_MASK (0x3F000000U)
  5252. #define FLEXIO_TIMCTL_TRGSEL_SHIFT (24U)
  5253. #define FLEXIO_TIMCTL_TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCTL_TRGSEL_SHIFT)) & FLEXIO_TIMCTL_TRGSEL_MASK)
  5254. /* The count of FLEXIO_TIMCTL */
  5255. #define FLEXIO_TIMCTL_COUNT (8U)
  5256. /*! @name TIMCFG - Timer Configuration N Register */
  5257. #define FLEXIO_TIMCFG_TSTART_MASK (0x2U)
  5258. #define FLEXIO_TIMCFG_TSTART_SHIFT (1U)
  5259. #define FLEXIO_TIMCFG_TSTART(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TSTART_SHIFT)) & FLEXIO_TIMCFG_TSTART_MASK)
  5260. #define FLEXIO_TIMCFG_TSTOP_MASK (0x30U)
  5261. #define FLEXIO_TIMCFG_TSTOP_SHIFT (4U)
  5262. #define FLEXIO_TIMCFG_TSTOP(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TSTOP_SHIFT)) & FLEXIO_TIMCFG_TSTOP_MASK)
  5263. #define FLEXIO_TIMCFG_TIMENA_MASK (0x700U)
  5264. #define FLEXIO_TIMCFG_TIMENA_SHIFT (8U)
  5265. #define FLEXIO_TIMCFG_TIMENA(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMENA_SHIFT)) & FLEXIO_TIMCFG_TIMENA_MASK)
  5266. #define FLEXIO_TIMCFG_TIMDIS_MASK (0x7000U)
  5267. #define FLEXIO_TIMCFG_TIMDIS_SHIFT (12U)
  5268. #define FLEXIO_TIMCFG_TIMDIS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMDIS_SHIFT)) & FLEXIO_TIMCFG_TIMDIS_MASK)
  5269. #define FLEXIO_TIMCFG_TIMRST_MASK (0x70000U)
  5270. #define FLEXIO_TIMCFG_TIMRST_SHIFT (16U)
  5271. #define FLEXIO_TIMCFG_TIMRST(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMRST_SHIFT)) & FLEXIO_TIMCFG_TIMRST_MASK)
  5272. #define FLEXIO_TIMCFG_TIMDEC_MASK (0x300000U)
  5273. #define FLEXIO_TIMCFG_TIMDEC_SHIFT (20U)
  5274. #define FLEXIO_TIMCFG_TIMDEC(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMDEC_SHIFT)) & FLEXIO_TIMCFG_TIMDEC_MASK)
  5275. #define FLEXIO_TIMCFG_TIMOUT_MASK (0x3000000U)
  5276. #define FLEXIO_TIMCFG_TIMOUT_SHIFT (24U)
  5277. #define FLEXIO_TIMCFG_TIMOUT(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCFG_TIMOUT_SHIFT)) & FLEXIO_TIMCFG_TIMOUT_MASK)
  5278. /* The count of FLEXIO_TIMCFG */
  5279. #define FLEXIO_TIMCFG_COUNT (8U)
  5280. /*! @name TIMCMP - Timer Compare N Register */
  5281. #define FLEXIO_TIMCMP_CMP_MASK (0xFFFFU)
  5282. #define FLEXIO_TIMCMP_CMP_SHIFT (0U)
  5283. #define FLEXIO_TIMCMP_CMP(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_TIMCMP_CMP_SHIFT)) & FLEXIO_TIMCMP_CMP_MASK)
  5284. /* The count of FLEXIO_TIMCMP */
  5285. #define FLEXIO_TIMCMP_COUNT (8U)
  5286. /*! @name SHIFTBUFNBS - Shifter Buffer N Nibble Byte Swapped Register */
  5287. #define FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_MASK (0xFFFFFFFFU)
  5288. #define FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_SHIFT (0U)
  5289. #define FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_SHIFT)) & FLEXIO_SHIFTBUFNBS_SHIFTBUFNBS_MASK)
  5290. /* The count of FLEXIO_SHIFTBUFNBS */
  5291. #define FLEXIO_SHIFTBUFNBS_COUNT (8U)
  5292. /*! @name SHIFTBUFHWS - Shifter Buffer N Half Word Swapped Register */
  5293. #define FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_MASK (0xFFFFFFFFU)
  5294. #define FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_SHIFT (0U)
  5295. #define FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_SHIFT)) & FLEXIO_SHIFTBUFHWS_SHIFTBUFHWS_MASK)
  5296. /* The count of FLEXIO_SHIFTBUFHWS */
  5297. #define FLEXIO_SHIFTBUFHWS_COUNT (8U)
  5298. /*! @name SHIFTBUFNIS - Shifter Buffer N Nibble Swapped Register */
  5299. #define FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_MASK (0xFFFFFFFFU)
  5300. #define FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_SHIFT (0U)
  5301. #define FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS(x) (((uint32_t)(((uint32_t)(x)) << FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_SHIFT)) & FLEXIO_SHIFTBUFNIS_SHIFTBUFNIS_MASK)
  5302. /* The count of FLEXIO_SHIFTBUFNIS */
  5303. #define FLEXIO_SHIFTBUFNIS_COUNT (8U)
  5304. /*!
  5305. * @}
  5306. */ /* end of group FLEXIO_Register_Masks */
  5307. /* FLEXIO - Peripheral instance base addresses */
  5308. /** Peripheral FLEXIO0 base address */
  5309. #define FLEXIO0_BASE (0x400DF000u)
  5310. /** Peripheral FLEXIO0 base pointer */
  5311. #define FLEXIO0 ((FLEXIO_Type *)FLEXIO0_BASE)
  5312. /** Array initializer of FLEXIO peripheral base addresses */
  5313. #define FLEXIO_BASE_ADDRS { FLEXIO0_BASE }
  5314. /** Array initializer of FLEXIO peripheral base pointers */
  5315. #define FLEXIO_BASE_PTRS { FLEXIO0 }
  5316. /** Interrupt vectors for the FLEXIO peripheral type */
  5317. #define FLEXIO_IRQS { FLEXIO0_IRQn }
  5318. /*!
  5319. * @}
  5320. */ /* end of group FLEXIO_Peripheral_Access_Layer */
  5321. /* ----------------------------------------------------------------------------
  5322. -- FMC Peripheral Access Layer
  5323. ---------------------------------------------------------------------------- */
  5324. /*!
  5325. * @addtogroup FMC_Peripheral_Access_Layer FMC Peripheral Access Layer
  5326. * @{
  5327. */
  5328. /** FMC - Register Layout Typedef */
  5329. typedef struct {
  5330. __IO uint32_t PFAPR; /**< Flash Access Protection Register, offset: 0x0 */
  5331. __IO uint32_t PFB0CR; /**< Flash Bank 0 Control Register, offset: 0x4 */
  5332. uint32_t RESERVED; /**< Reserved, offset: 0x8 */
  5333. uint8_t RESERVED_0[244];
  5334. __IO uint32_t TAGVDW0S[4]; /**< Cache Tag Storage, array offset: 0x100, array step: 0x4 */
  5335. __IO uint32_t TAGVDW1S[4]; /**< Cache Tag Storage, array offset: 0x110, array step: 0x4 */
  5336. __IO uint32_t TAGVDW2S[4]; /**< Cache Tag Storage, array offset: 0x120, array step: 0x4 */
  5337. __IO uint32_t TAGVDW3S[4]; /**< Cache Tag Storage, array offset: 0x130, array step: 0x4 */
  5338. uint8_t RESERVED_1[192];
  5339. struct { /* offset: 0x200, array step: index*0x40, index2*0x10 */
  5340. __IO uint32_t DATA_UM; /**< Cache Data Storage (uppermost word), array offset: 0x200, array step: index*0x40, index2*0x10 */
  5341. __IO uint32_t DATA_MU; /**< Cache Data Storage (mid-upper word), array offset: 0x204, array step: index*0x40, index2*0x10 */
  5342. __IO uint32_t DATA_ML; /**< Cache Data Storage (mid-lower word), array offset: 0x208, array step: index*0x40, index2*0x10 */
  5343. __IO uint32_t DATA_LM; /**< Cache Data Storage (lowermost word), array offset: 0x20C, array step: index*0x40, index2*0x10 */
  5344. } SET[4][4];
  5345. } FMC_Type;
  5346. /* ----------------------------------------------------------------------------
  5347. -- FMC Register Masks
  5348. ---------------------------------------------------------------------------- */
  5349. /*!
  5350. * @addtogroup FMC_Register_Masks FMC Register Masks
  5351. * @{
  5352. */
  5353. /*! @name PFAPR - Flash Access Protection Register */
  5354. #define FMC_PFAPR_M0AP_MASK (0x3U)
  5355. #define FMC_PFAPR_M0AP_SHIFT (0U)
  5356. #define FMC_PFAPR_M0AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M0AP_SHIFT)) & FMC_PFAPR_M0AP_MASK)
  5357. #define FMC_PFAPR_M1AP_MASK (0xCU)
  5358. #define FMC_PFAPR_M1AP_SHIFT (2U)
  5359. #define FMC_PFAPR_M1AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M1AP_SHIFT)) & FMC_PFAPR_M1AP_MASK)
  5360. #define FMC_PFAPR_M2AP_MASK (0x30U)
  5361. #define FMC_PFAPR_M2AP_SHIFT (4U)
  5362. #define FMC_PFAPR_M2AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M2AP_SHIFT)) & FMC_PFAPR_M2AP_MASK)
  5363. #define FMC_PFAPR_M3AP_MASK (0xC0U)
  5364. #define FMC_PFAPR_M3AP_SHIFT (6U)
  5365. #define FMC_PFAPR_M3AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M3AP_SHIFT)) & FMC_PFAPR_M3AP_MASK)
  5366. #define FMC_PFAPR_M4AP_MASK (0x300U)
  5367. #define FMC_PFAPR_M4AP_SHIFT (8U)
  5368. #define FMC_PFAPR_M4AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M4AP_SHIFT)) & FMC_PFAPR_M4AP_MASK)
  5369. #define FMC_PFAPR_M0PFD_MASK (0x10000U)
  5370. #define FMC_PFAPR_M0PFD_SHIFT (16U)
  5371. #define FMC_PFAPR_M0PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M0PFD_SHIFT)) & FMC_PFAPR_M0PFD_MASK)
  5372. #define FMC_PFAPR_M1PFD_MASK (0x20000U)
  5373. #define FMC_PFAPR_M1PFD_SHIFT (17U)
  5374. #define FMC_PFAPR_M1PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M1PFD_SHIFT)) & FMC_PFAPR_M1PFD_MASK)
  5375. #define FMC_PFAPR_M2PFD_MASK (0x40000U)
  5376. #define FMC_PFAPR_M2PFD_SHIFT (18U)
  5377. #define FMC_PFAPR_M2PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M2PFD_SHIFT)) & FMC_PFAPR_M2PFD_MASK)
  5378. #define FMC_PFAPR_M3PFD_MASK (0x80000U)
  5379. #define FMC_PFAPR_M3PFD_SHIFT (19U)
  5380. #define FMC_PFAPR_M3PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M3PFD_SHIFT)) & FMC_PFAPR_M3PFD_MASK)
  5381. #define FMC_PFAPR_M4PFD_MASK (0x100000U)
  5382. #define FMC_PFAPR_M4PFD_SHIFT (20U)
  5383. #define FMC_PFAPR_M4PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M4PFD_SHIFT)) & FMC_PFAPR_M4PFD_MASK)
  5384. /*! @name PFB0CR - Flash Bank 0 Control Register */
  5385. #define FMC_PFB0CR_B0SEBE_MASK (0x1U)
  5386. #define FMC_PFB0CR_B0SEBE_SHIFT (0U)
  5387. #define FMC_PFB0CR_B0SEBE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0SEBE_SHIFT)) & FMC_PFB0CR_B0SEBE_MASK)
  5388. #define FMC_PFB0CR_B0IPE_MASK (0x2U)
  5389. #define FMC_PFB0CR_B0IPE_SHIFT (1U)
  5390. #define FMC_PFB0CR_B0IPE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0IPE_SHIFT)) & FMC_PFB0CR_B0IPE_MASK)
  5391. #define FMC_PFB0CR_B0DPE_MASK (0x4U)
  5392. #define FMC_PFB0CR_B0DPE_SHIFT (2U)
  5393. #define FMC_PFB0CR_B0DPE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0DPE_SHIFT)) & FMC_PFB0CR_B0DPE_MASK)
  5394. #define FMC_PFB0CR_B0ICE_MASK (0x8U)
  5395. #define FMC_PFB0CR_B0ICE_SHIFT (3U)
  5396. #define FMC_PFB0CR_B0ICE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0ICE_SHIFT)) & FMC_PFB0CR_B0ICE_MASK)
  5397. #define FMC_PFB0CR_B0DCE_MASK (0x10U)
  5398. #define FMC_PFB0CR_B0DCE_SHIFT (4U)
  5399. #define FMC_PFB0CR_B0DCE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0DCE_SHIFT)) & FMC_PFB0CR_B0DCE_MASK)
  5400. #define FMC_PFB0CR_CRC_MASK (0xE0U)
  5401. #define FMC_PFB0CR_CRC_SHIFT (5U)
  5402. #define FMC_PFB0CR_CRC(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_CRC_SHIFT)) & FMC_PFB0CR_CRC_MASK)
  5403. #define FMC_PFB0CR_B0MW_MASK (0x60000U)
  5404. #define FMC_PFB0CR_B0MW_SHIFT (17U)
  5405. #define FMC_PFB0CR_B0MW(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0MW_SHIFT)) & FMC_PFB0CR_B0MW_MASK)
  5406. #define FMC_PFB0CR_S_B_INV_MASK (0x80000U)
  5407. #define FMC_PFB0CR_S_B_INV_SHIFT (19U)
  5408. #define FMC_PFB0CR_S_B_INV(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_S_B_INV_SHIFT)) & FMC_PFB0CR_S_B_INV_MASK)
  5409. #define FMC_PFB0CR_CINV_WAY_MASK (0xF00000U)
  5410. #define FMC_PFB0CR_CINV_WAY_SHIFT (20U)
  5411. #define FMC_PFB0CR_CINV_WAY(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_CINV_WAY_SHIFT)) & FMC_PFB0CR_CINV_WAY_MASK)
  5412. #define FMC_PFB0CR_CLCK_WAY_MASK (0xF000000U)
  5413. #define FMC_PFB0CR_CLCK_WAY_SHIFT (24U)
  5414. #define FMC_PFB0CR_CLCK_WAY(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_CLCK_WAY_SHIFT)) & FMC_PFB0CR_CLCK_WAY_MASK)
  5415. #define FMC_PFB0CR_B0RWSC_MASK (0xF0000000U)
  5416. #define FMC_PFB0CR_B0RWSC_SHIFT (28U)
  5417. #define FMC_PFB0CR_B0RWSC(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0RWSC_SHIFT)) & FMC_PFB0CR_B0RWSC_MASK)
  5418. /*! @name TAGVDW0S - Cache Tag Storage */
  5419. #define FMC_TAGVDW0S_valid_MASK (0x1U)
  5420. #define FMC_TAGVDW0S_valid_SHIFT (0U)
  5421. #define FMC_TAGVDW0S_valid(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW0S_valid_SHIFT)) & FMC_TAGVDW0S_valid_MASK)
  5422. #define FMC_TAGVDW0S_cache_tag_MASK (0xFFFC0U)
  5423. #define FMC_TAGVDW0S_cache_tag_SHIFT (6U)
  5424. #define FMC_TAGVDW0S_cache_tag(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW0S_cache_tag_SHIFT)) & FMC_TAGVDW0S_cache_tag_MASK)
  5425. /* The count of FMC_TAGVDW0S */
  5426. #define FMC_TAGVDW0S_COUNT (4U)
  5427. /*! @name TAGVDW1S - Cache Tag Storage */
  5428. #define FMC_TAGVDW1S_valid_MASK (0x1U)
  5429. #define FMC_TAGVDW1S_valid_SHIFT (0U)
  5430. #define FMC_TAGVDW1S_valid(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW1S_valid_SHIFT)) & FMC_TAGVDW1S_valid_MASK)
  5431. #define FMC_TAGVDW1S_cache_tag_MASK (0xFFFC0U)
  5432. #define FMC_TAGVDW1S_cache_tag_SHIFT (6U)
  5433. #define FMC_TAGVDW1S_cache_tag(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW1S_cache_tag_SHIFT)) & FMC_TAGVDW1S_cache_tag_MASK)
  5434. /* The count of FMC_TAGVDW1S */
  5435. #define FMC_TAGVDW1S_COUNT (4U)
  5436. /*! @name TAGVDW2S - Cache Tag Storage */
  5437. #define FMC_TAGVDW2S_valid_MASK (0x1U)
  5438. #define FMC_TAGVDW2S_valid_SHIFT (0U)
  5439. #define FMC_TAGVDW2S_valid(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW2S_valid_SHIFT)) & FMC_TAGVDW2S_valid_MASK)
  5440. #define FMC_TAGVDW2S_cache_tag_MASK (0xFFFC0U)
  5441. #define FMC_TAGVDW2S_cache_tag_SHIFT (6U)
  5442. #define FMC_TAGVDW2S_cache_tag(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW2S_cache_tag_SHIFT)) & FMC_TAGVDW2S_cache_tag_MASK)
  5443. /* The count of FMC_TAGVDW2S */
  5444. #define FMC_TAGVDW2S_COUNT (4U)
  5445. /*! @name TAGVDW3S - Cache Tag Storage */
  5446. #define FMC_TAGVDW3S_valid_MASK (0x1U)
  5447. #define FMC_TAGVDW3S_valid_SHIFT (0U)
  5448. #define FMC_TAGVDW3S_valid(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW3S_valid_SHIFT)) & FMC_TAGVDW3S_valid_MASK)
  5449. #define FMC_TAGVDW3S_cache_tag_MASK (0xFFFC0U)
  5450. #define FMC_TAGVDW3S_cache_tag_SHIFT (6U)
  5451. #define FMC_TAGVDW3S_cache_tag(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW3S_cache_tag_SHIFT)) & FMC_TAGVDW3S_cache_tag_MASK)
  5452. /* The count of FMC_TAGVDW3S */
  5453. #define FMC_TAGVDW3S_COUNT (4U)
  5454. /*! @name DATA_UM - Cache Data Storage (uppermost word) */
  5455. #define FMC_DATA_UM_data_MASK (0xFFFFFFFFU)
  5456. #define FMC_DATA_UM_data_SHIFT (0U)
  5457. #define FMC_DATA_UM_data(x) (((uint32_t)(((uint32_t)(x)) << FMC_DATA_UM_data_SHIFT)) & FMC_DATA_UM_data_MASK)
  5458. /* The count of FMC_DATA_UM */
  5459. #define FMC_DATA_UM_COUNT (4U)
  5460. /* The count of FMC_DATA_UM */
  5461. #define FMC_DATA_UM_COUNT2 (4U)
  5462. /*! @name DATA_MU - Cache Data Storage (mid-upper word) */
  5463. #define FMC_DATA_MU_data_MASK (0xFFFFFFFFU)
  5464. #define FMC_DATA_MU_data_SHIFT (0U)
  5465. #define FMC_DATA_MU_data(x) (((uint32_t)(((uint32_t)(x)) << FMC_DATA_MU_data_SHIFT)) & FMC_DATA_MU_data_MASK)
  5466. /* The count of FMC_DATA_MU */
  5467. #define FMC_DATA_MU_COUNT (4U)
  5468. /* The count of FMC_DATA_MU */
  5469. #define FMC_DATA_MU_COUNT2 (4U)
  5470. /*! @name DATA_ML - Cache Data Storage (mid-lower word) */
  5471. #define FMC_DATA_ML_data_MASK (0xFFFFFFFFU)
  5472. #define FMC_DATA_ML_data_SHIFT (0U)
  5473. #define FMC_DATA_ML_data(x) (((uint32_t)(((uint32_t)(x)) << FMC_DATA_ML_data_SHIFT)) & FMC_DATA_ML_data_MASK)
  5474. /* The count of FMC_DATA_ML */
  5475. #define FMC_DATA_ML_COUNT (4U)
  5476. /* The count of FMC_DATA_ML */
  5477. #define FMC_DATA_ML_COUNT2 (4U)
  5478. /*! @name DATA_LM - Cache Data Storage (lowermost word) */
  5479. #define FMC_DATA_LM_data_MASK (0xFFFFFFFFU)
  5480. #define FMC_DATA_LM_data_SHIFT (0U)
  5481. #define FMC_DATA_LM_data(x) (((uint32_t)(((uint32_t)(x)) << FMC_DATA_LM_data_SHIFT)) & FMC_DATA_LM_data_MASK)
  5482. /* The count of FMC_DATA_LM */
  5483. #define FMC_DATA_LM_COUNT (4U)
  5484. /* The count of FMC_DATA_LM */
  5485. #define FMC_DATA_LM_COUNT2 (4U)
  5486. /*!
  5487. * @}
  5488. */ /* end of group FMC_Register_Masks */
  5489. /* FMC - Peripheral instance base addresses */
  5490. /** Peripheral FMC base address */
  5491. #define FMC_BASE (0x4001F000u)
  5492. /** Peripheral FMC base pointer */
  5493. #define FMC ((FMC_Type *)FMC_BASE)
  5494. /** Array initializer of FMC peripheral base addresses */
  5495. #define FMC_BASE_ADDRS { FMC_BASE }
  5496. /** Array initializer of FMC peripheral base pointers */
  5497. #define FMC_BASE_PTRS { FMC }
  5498. /*!
  5499. * @}
  5500. */ /* end of group FMC_Peripheral_Access_Layer */
  5501. /* ----------------------------------------------------------------------------
  5502. -- FTFA Peripheral Access Layer
  5503. ---------------------------------------------------------------------------- */
  5504. /*!
  5505. * @addtogroup FTFA_Peripheral_Access_Layer FTFA Peripheral Access Layer
  5506. * @{
  5507. */
  5508. /** FTFA - Register Layout Typedef */
  5509. typedef struct {
  5510. __IO uint8_t FSTAT; /**< Flash Status Register, offset: 0x0 */
  5511. __IO uint8_t FCNFG; /**< Flash Configuration Register, offset: 0x1 */
  5512. __I uint8_t FSEC; /**< Flash Security Register, offset: 0x2 */
  5513. __I uint8_t FOPT; /**< Flash Option Register, offset: 0x3 */
  5514. __IO uint8_t FCCOB3; /**< Flash Common Command Object Registers, offset: 0x4 */
  5515. __IO uint8_t FCCOB2; /**< Flash Common Command Object Registers, offset: 0x5 */
  5516. __IO uint8_t FCCOB1; /**< Flash Common Command Object Registers, offset: 0x6 */
  5517. __IO uint8_t FCCOB0; /**< Flash Common Command Object Registers, offset: 0x7 */
  5518. __IO uint8_t FCCOB7; /**< Flash Common Command Object Registers, offset: 0x8 */
  5519. __IO uint8_t FCCOB6; /**< Flash Common Command Object Registers, offset: 0x9 */
  5520. __IO uint8_t FCCOB5; /**< Flash Common Command Object Registers, offset: 0xA */
  5521. __IO uint8_t FCCOB4; /**< Flash Common Command Object Registers, offset: 0xB */
  5522. __IO uint8_t FCCOBB; /**< Flash Common Command Object Registers, offset: 0xC */
  5523. __IO uint8_t FCCOBA; /**< Flash Common Command Object Registers, offset: 0xD */
  5524. __IO uint8_t FCCOB9; /**< Flash Common Command Object Registers, offset: 0xE */
  5525. __IO uint8_t FCCOB8; /**< Flash Common Command Object Registers, offset: 0xF */
  5526. __IO uint8_t FPROT3; /**< Program Flash Protection Registers, offset: 0x10 */
  5527. __IO uint8_t FPROT2; /**< Program Flash Protection Registers, offset: 0x11 */
  5528. __IO uint8_t FPROT1; /**< Program Flash Protection Registers, offset: 0x12 */
  5529. __IO uint8_t FPROT0; /**< Program Flash Protection Registers, offset: 0x13 */
  5530. uint8_t RESERVED_0[4];
  5531. __I uint8_t XACCH3; /**< Execute-only Access Registers, offset: 0x18 */
  5532. __I uint8_t XACCH2; /**< Execute-only Access Registers, offset: 0x19 */
  5533. __I uint8_t XACCH1; /**< Execute-only Access Registers, offset: 0x1A */
  5534. __I uint8_t XACCH0; /**< Execute-only Access Registers, offset: 0x1B */
  5535. __I uint8_t XACCL3; /**< Execute-only Access Registers, offset: 0x1C */
  5536. __I uint8_t XACCL2; /**< Execute-only Access Registers, offset: 0x1D */
  5537. __I uint8_t XACCL1; /**< Execute-only Access Registers, offset: 0x1E */
  5538. __I uint8_t XACCL0; /**< Execute-only Access Registers, offset: 0x1F */
  5539. __I uint8_t SACCH3; /**< Supervisor-only Access Registers, offset: 0x20 */
  5540. __I uint8_t SACCH2; /**< Supervisor-only Access Registers, offset: 0x21 */
  5541. __I uint8_t SACCH1; /**< Supervisor-only Access Registers, offset: 0x22 */
  5542. __I uint8_t SACCH0; /**< Supervisor-only Access Registers, offset: 0x23 */
  5543. __I uint8_t SACCL3; /**< Supervisor-only Access Registers, offset: 0x24 */
  5544. __I uint8_t SACCL2; /**< Supervisor-only Access Registers, offset: 0x25 */
  5545. __I uint8_t SACCL1; /**< Supervisor-only Access Registers, offset: 0x26 */
  5546. __I uint8_t SACCL0; /**< Supervisor-only Access Registers, offset: 0x27 */
  5547. __I uint8_t FACSS; /**< Flash Access Segment Size Register, offset: 0x28 */
  5548. uint8_t RESERVED_1[2];
  5549. __I uint8_t FACSN; /**< Flash Access Segment Number Register, offset: 0x2B */
  5550. } FTFA_Type;
  5551. /* ----------------------------------------------------------------------------
  5552. -- FTFA Register Masks
  5553. ---------------------------------------------------------------------------- */
  5554. /*!
  5555. * @addtogroup FTFA_Register_Masks FTFA Register Masks
  5556. * @{
  5557. */
  5558. /*! @name FSTAT - Flash Status Register */
  5559. #define FTFA_FSTAT_MGSTAT0_MASK (0x1U)
  5560. #define FTFA_FSTAT_MGSTAT0_SHIFT (0U)
  5561. #define FTFA_FSTAT_MGSTAT0(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FSTAT_MGSTAT0_SHIFT)) & FTFA_FSTAT_MGSTAT0_MASK)
  5562. #define FTFA_FSTAT_FPVIOL_MASK (0x10U)
  5563. #define FTFA_FSTAT_FPVIOL_SHIFT (4U)
  5564. #define FTFA_FSTAT_FPVIOL(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FSTAT_FPVIOL_SHIFT)) & FTFA_FSTAT_FPVIOL_MASK)
  5565. #define FTFA_FSTAT_ACCERR_MASK (0x20U)
  5566. #define FTFA_FSTAT_ACCERR_SHIFT (5U)
  5567. #define FTFA_FSTAT_ACCERR(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FSTAT_ACCERR_SHIFT)) & FTFA_FSTAT_ACCERR_MASK)
  5568. #define FTFA_FSTAT_RDCOLERR_MASK (0x40U)
  5569. #define FTFA_FSTAT_RDCOLERR_SHIFT (6U)
  5570. #define FTFA_FSTAT_RDCOLERR(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FSTAT_RDCOLERR_SHIFT)) & FTFA_FSTAT_RDCOLERR_MASK)
  5571. #define FTFA_FSTAT_CCIF_MASK (0x80U)
  5572. #define FTFA_FSTAT_CCIF_SHIFT (7U)
  5573. #define FTFA_FSTAT_CCIF(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FSTAT_CCIF_SHIFT)) & FTFA_FSTAT_CCIF_MASK)
  5574. /*! @name FCNFG - Flash Configuration Register */
  5575. #define FTFA_FCNFG_ERSSUSP_MASK (0x10U)
  5576. #define FTFA_FCNFG_ERSSUSP_SHIFT (4U)
  5577. #define FTFA_FCNFG_ERSSUSP(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCNFG_ERSSUSP_SHIFT)) & FTFA_FCNFG_ERSSUSP_MASK)
  5578. #define FTFA_FCNFG_ERSAREQ_MASK (0x20U)
  5579. #define FTFA_FCNFG_ERSAREQ_SHIFT (5U)
  5580. #define FTFA_FCNFG_ERSAREQ(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCNFG_ERSAREQ_SHIFT)) & FTFA_FCNFG_ERSAREQ_MASK)
  5581. #define FTFA_FCNFG_RDCOLLIE_MASK (0x40U)
  5582. #define FTFA_FCNFG_RDCOLLIE_SHIFT (6U)
  5583. #define FTFA_FCNFG_RDCOLLIE(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCNFG_RDCOLLIE_SHIFT)) & FTFA_FCNFG_RDCOLLIE_MASK)
  5584. #define FTFA_FCNFG_CCIE_MASK (0x80U)
  5585. #define FTFA_FCNFG_CCIE_SHIFT (7U)
  5586. #define FTFA_FCNFG_CCIE(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCNFG_CCIE_SHIFT)) & FTFA_FCNFG_CCIE_MASK)
  5587. /*! @name FSEC - Flash Security Register */
  5588. #define FTFA_FSEC_SEC_MASK (0x3U)
  5589. #define FTFA_FSEC_SEC_SHIFT (0U)
  5590. #define FTFA_FSEC_SEC(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FSEC_SEC_SHIFT)) & FTFA_FSEC_SEC_MASK)
  5591. #define FTFA_FSEC_FSLACC_MASK (0xCU)
  5592. #define FTFA_FSEC_FSLACC_SHIFT (2U)
  5593. #define FTFA_FSEC_FSLACC(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FSEC_FSLACC_SHIFT)) & FTFA_FSEC_FSLACC_MASK)
  5594. #define FTFA_FSEC_MEEN_MASK (0x30U)
  5595. #define FTFA_FSEC_MEEN_SHIFT (4U)
  5596. #define FTFA_FSEC_MEEN(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FSEC_MEEN_SHIFT)) & FTFA_FSEC_MEEN_MASK)
  5597. #define FTFA_FSEC_KEYEN_MASK (0xC0U)
  5598. #define FTFA_FSEC_KEYEN_SHIFT (6U)
  5599. #define FTFA_FSEC_KEYEN(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FSEC_KEYEN_SHIFT)) & FTFA_FSEC_KEYEN_MASK)
  5600. /*! @name FOPT - Flash Option Register */
  5601. #define FTFA_FOPT_OPT_MASK (0xFFU)
  5602. #define FTFA_FOPT_OPT_SHIFT (0U)
  5603. #define FTFA_FOPT_OPT(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FOPT_OPT_SHIFT)) & FTFA_FOPT_OPT_MASK)
  5604. /*! @name FCCOB3 - Flash Common Command Object Registers */
  5605. #define FTFA_FCCOB3_CCOBn_MASK (0xFFU)
  5606. #define FTFA_FCCOB3_CCOBn_SHIFT (0U)
  5607. #define FTFA_FCCOB3_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOB3_CCOBn_SHIFT)) & FTFA_FCCOB3_CCOBn_MASK)
  5608. /*! @name FCCOB2 - Flash Common Command Object Registers */
  5609. #define FTFA_FCCOB2_CCOBn_MASK (0xFFU)
  5610. #define FTFA_FCCOB2_CCOBn_SHIFT (0U)
  5611. #define FTFA_FCCOB2_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOB2_CCOBn_SHIFT)) & FTFA_FCCOB2_CCOBn_MASK)
  5612. /*! @name FCCOB1 - Flash Common Command Object Registers */
  5613. #define FTFA_FCCOB1_CCOBn_MASK (0xFFU)
  5614. #define FTFA_FCCOB1_CCOBn_SHIFT (0U)
  5615. #define FTFA_FCCOB1_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOB1_CCOBn_SHIFT)) & FTFA_FCCOB1_CCOBn_MASK)
  5616. /*! @name FCCOB0 - Flash Common Command Object Registers */
  5617. #define FTFA_FCCOB0_CCOBn_MASK (0xFFU)
  5618. #define FTFA_FCCOB0_CCOBn_SHIFT (0U)
  5619. #define FTFA_FCCOB0_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOB0_CCOBn_SHIFT)) & FTFA_FCCOB0_CCOBn_MASK)
  5620. /*! @name FCCOB7 - Flash Common Command Object Registers */
  5621. #define FTFA_FCCOB7_CCOBn_MASK (0xFFU)
  5622. #define FTFA_FCCOB7_CCOBn_SHIFT (0U)
  5623. #define FTFA_FCCOB7_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOB7_CCOBn_SHIFT)) & FTFA_FCCOB7_CCOBn_MASK)
  5624. /*! @name FCCOB6 - Flash Common Command Object Registers */
  5625. #define FTFA_FCCOB6_CCOBn_MASK (0xFFU)
  5626. #define FTFA_FCCOB6_CCOBn_SHIFT (0U)
  5627. #define FTFA_FCCOB6_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOB6_CCOBn_SHIFT)) & FTFA_FCCOB6_CCOBn_MASK)
  5628. /*! @name FCCOB5 - Flash Common Command Object Registers */
  5629. #define FTFA_FCCOB5_CCOBn_MASK (0xFFU)
  5630. #define FTFA_FCCOB5_CCOBn_SHIFT (0U)
  5631. #define FTFA_FCCOB5_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOB5_CCOBn_SHIFT)) & FTFA_FCCOB5_CCOBn_MASK)
  5632. /*! @name FCCOB4 - Flash Common Command Object Registers */
  5633. #define FTFA_FCCOB4_CCOBn_MASK (0xFFU)
  5634. #define FTFA_FCCOB4_CCOBn_SHIFT (0U)
  5635. #define FTFA_FCCOB4_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOB4_CCOBn_SHIFT)) & FTFA_FCCOB4_CCOBn_MASK)
  5636. /*! @name FCCOBB - Flash Common Command Object Registers */
  5637. #define FTFA_FCCOBB_CCOBn_MASK (0xFFU)
  5638. #define FTFA_FCCOBB_CCOBn_SHIFT (0U)
  5639. #define FTFA_FCCOBB_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOBB_CCOBn_SHIFT)) & FTFA_FCCOBB_CCOBn_MASK)
  5640. /*! @name FCCOBA - Flash Common Command Object Registers */
  5641. #define FTFA_FCCOBA_CCOBn_MASK (0xFFU)
  5642. #define FTFA_FCCOBA_CCOBn_SHIFT (0U)
  5643. #define FTFA_FCCOBA_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOBA_CCOBn_SHIFT)) & FTFA_FCCOBA_CCOBn_MASK)
  5644. /*! @name FCCOB9 - Flash Common Command Object Registers */
  5645. #define FTFA_FCCOB9_CCOBn_MASK (0xFFU)
  5646. #define FTFA_FCCOB9_CCOBn_SHIFT (0U)
  5647. #define FTFA_FCCOB9_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOB9_CCOBn_SHIFT)) & FTFA_FCCOB9_CCOBn_MASK)
  5648. /*! @name FCCOB8 - Flash Common Command Object Registers */
  5649. #define FTFA_FCCOB8_CCOBn_MASK (0xFFU)
  5650. #define FTFA_FCCOB8_CCOBn_SHIFT (0U)
  5651. #define FTFA_FCCOB8_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FCCOB8_CCOBn_SHIFT)) & FTFA_FCCOB8_CCOBn_MASK)
  5652. /*! @name FPROT3 - Program Flash Protection Registers */
  5653. #define FTFA_FPROT3_PROT_MASK (0xFFU)
  5654. #define FTFA_FPROT3_PROT_SHIFT (0U)
  5655. #define FTFA_FPROT3_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FPROT3_PROT_SHIFT)) & FTFA_FPROT3_PROT_MASK)
  5656. /*! @name FPROT2 - Program Flash Protection Registers */
  5657. #define FTFA_FPROT2_PROT_MASK (0xFFU)
  5658. #define FTFA_FPROT2_PROT_SHIFT (0U)
  5659. #define FTFA_FPROT2_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FPROT2_PROT_SHIFT)) & FTFA_FPROT2_PROT_MASK)
  5660. /*! @name FPROT1 - Program Flash Protection Registers */
  5661. #define FTFA_FPROT1_PROT_MASK (0xFFU)
  5662. #define FTFA_FPROT1_PROT_SHIFT (0U)
  5663. #define FTFA_FPROT1_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FPROT1_PROT_SHIFT)) & FTFA_FPROT1_PROT_MASK)
  5664. /*! @name FPROT0 - Program Flash Protection Registers */
  5665. #define FTFA_FPROT0_PROT_MASK (0xFFU)
  5666. #define FTFA_FPROT0_PROT_SHIFT (0U)
  5667. #define FTFA_FPROT0_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FPROT0_PROT_SHIFT)) & FTFA_FPROT0_PROT_MASK)
  5668. /*! @name XACCH3 - Execute-only Access Registers */
  5669. #define FTFA_XACCH3_XA_MASK (0xFFU)
  5670. #define FTFA_XACCH3_XA_SHIFT (0U)
  5671. #define FTFA_XACCH3_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_XACCH3_XA_SHIFT)) & FTFA_XACCH3_XA_MASK)
  5672. /*! @name XACCH2 - Execute-only Access Registers */
  5673. #define FTFA_XACCH2_XA_MASK (0xFFU)
  5674. #define FTFA_XACCH2_XA_SHIFT (0U)
  5675. #define FTFA_XACCH2_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_XACCH2_XA_SHIFT)) & FTFA_XACCH2_XA_MASK)
  5676. /*! @name XACCH1 - Execute-only Access Registers */
  5677. #define FTFA_XACCH1_XA_MASK (0xFFU)
  5678. #define FTFA_XACCH1_XA_SHIFT (0U)
  5679. #define FTFA_XACCH1_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_XACCH1_XA_SHIFT)) & FTFA_XACCH1_XA_MASK)
  5680. /*! @name XACCH0 - Execute-only Access Registers */
  5681. #define FTFA_XACCH0_XA_MASK (0xFFU)
  5682. #define FTFA_XACCH0_XA_SHIFT (0U)
  5683. #define FTFA_XACCH0_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_XACCH0_XA_SHIFT)) & FTFA_XACCH0_XA_MASK)
  5684. /*! @name XACCL3 - Execute-only Access Registers */
  5685. #define FTFA_XACCL3_XA_MASK (0xFFU)
  5686. #define FTFA_XACCL3_XA_SHIFT (0U)
  5687. #define FTFA_XACCL3_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_XACCL3_XA_SHIFT)) & FTFA_XACCL3_XA_MASK)
  5688. /*! @name XACCL2 - Execute-only Access Registers */
  5689. #define FTFA_XACCL2_XA_MASK (0xFFU)
  5690. #define FTFA_XACCL2_XA_SHIFT (0U)
  5691. #define FTFA_XACCL2_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_XACCL2_XA_SHIFT)) & FTFA_XACCL2_XA_MASK)
  5692. /*! @name XACCL1 - Execute-only Access Registers */
  5693. #define FTFA_XACCL1_XA_MASK (0xFFU)
  5694. #define FTFA_XACCL1_XA_SHIFT (0U)
  5695. #define FTFA_XACCL1_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_XACCL1_XA_SHIFT)) & FTFA_XACCL1_XA_MASK)
  5696. /*! @name XACCL0 - Execute-only Access Registers */
  5697. #define FTFA_XACCL0_XA_MASK (0xFFU)
  5698. #define FTFA_XACCL0_XA_SHIFT (0U)
  5699. #define FTFA_XACCL0_XA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_XACCL0_XA_SHIFT)) & FTFA_XACCL0_XA_MASK)
  5700. /*! @name SACCH3 - Supervisor-only Access Registers */
  5701. #define FTFA_SACCH3_SA_MASK (0xFFU)
  5702. #define FTFA_SACCH3_SA_SHIFT (0U)
  5703. #define FTFA_SACCH3_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_SACCH3_SA_SHIFT)) & FTFA_SACCH3_SA_MASK)
  5704. /*! @name SACCH2 - Supervisor-only Access Registers */
  5705. #define FTFA_SACCH2_SA_MASK (0xFFU)
  5706. #define FTFA_SACCH2_SA_SHIFT (0U)
  5707. #define FTFA_SACCH2_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_SACCH2_SA_SHIFT)) & FTFA_SACCH2_SA_MASK)
  5708. /*! @name SACCH1 - Supervisor-only Access Registers */
  5709. #define FTFA_SACCH1_SA_MASK (0xFFU)
  5710. #define FTFA_SACCH1_SA_SHIFT (0U)
  5711. #define FTFA_SACCH1_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_SACCH1_SA_SHIFT)) & FTFA_SACCH1_SA_MASK)
  5712. /*! @name SACCH0 - Supervisor-only Access Registers */
  5713. #define FTFA_SACCH0_SA_MASK (0xFFU)
  5714. #define FTFA_SACCH0_SA_SHIFT (0U)
  5715. #define FTFA_SACCH0_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_SACCH0_SA_SHIFT)) & FTFA_SACCH0_SA_MASK)
  5716. /*! @name SACCL3 - Supervisor-only Access Registers */
  5717. #define FTFA_SACCL3_SA_MASK (0xFFU)
  5718. #define FTFA_SACCL3_SA_SHIFT (0U)
  5719. #define FTFA_SACCL3_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_SACCL3_SA_SHIFT)) & FTFA_SACCL3_SA_MASK)
  5720. /*! @name SACCL2 - Supervisor-only Access Registers */
  5721. #define FTFA_SACCL2_SA_MASK (0xFFU)
  5722. #define FTFA_SACCL2_SA_SHIFT (0U)
  5723. #define FTFA_SACCL2_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_SACCL2_SA_SHIFT)) & FTFA_SACCL2_SA_MASK)
  5724. /*! @name SACCL1 - Supervisor-only Access Registers */
  5725. #define FTFA_SACCL1_SA_MASK (0xFFU)
  5726. #define FTFA_SACCL1_SA_SHIFT (0U)
  5727. #define FTFA_SACCL1_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_SACCL1_SA_SHIFT)) & FTFA_SACCL1_SA_MASK)
  5728. /*! @name SACCL0 - Supervisor-only Access Registers */
  5729. #define FTFA_SACCL0_SA_MASK (0xFFU)
  5730. #define FTFA_SACCL0_SA_SHIFT (0U)
  5731. #define FTFA_SACCL0_SA(x) (((uint8_t)(((uint8_t)(x)) << FTFA_SACCL0_SA_SHIFT)) & FTFA_SACCL0_SA_MASK)
  5732. /*! @name FACSS - Flash Access Segment Size Register */
  5733. #define FTFA_FACSS_SGSIZE_MASK (0xFFU)
  5734. #define FTFA_FACSS_SGSIZE_SHIFT (0U)
  5735. #define FTFA_FACSS_SGSIZE(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FACSS_SGSIZE_SHIFT)) & FTFA_FACSS_SGSIZE_MASK)
  5736. /*! @name FACSN - Flash Access Segment Number Register */
  5737. #define FTFA_FACSN_NUMSG_MASK (0xFFU)
  5738. #define FTFA_FACSN_NUMSG_SHIFT (0U)
  5739. #define FTFA_FACSN_NUMSG(x) (((uint8_t)(((uint8_t)(x)) << FTFA_FACSN_NUMSG_SHIFT)) & FTFA_FACSN_NUMSG_MASK)
  5740. /*!
  5741. * @}
  5742. */ /* end of group FTFA_Register_Masks */
  5743. /* FTFA - Peripheral instance base addresses */
  5744. /** Peripheral FTFA base address */
  5745. #define FTFA_BASE (0x40020000u)
  5746. /** Peripheral FTFA base pointer */
  5747. #define FTFA ((FTFA_Type *)FTFA_BASE)
  5748. /** Array initializer of FTFA peripheral base addresses */
  5749. #define FTFA_BASE_ADDRS { FTFA_BASE }
  5750. /** Array initializer of FTFA peripheral base pointers */
  5751. #define FTFA_BASE_PTRS { FTFA }
  5752. /** Interrupt vectors for the FTFA peripheral type */
  5753. #define FTFA_COMMAND_COMPLETE_IRQS { FTFA_IRQn }
  5754. #define FTFA_READ_COLLISION_IRQS { Read_Collision_IRQn }
  5755. /*!
  5756. * @}
  5757. */ /* end of group FTFA_Peripheral_Access_Layer */
  5758. /* ----------------------------------------------------------------------------
  5759. -- FTM Peripheral Access Layer
  5760. ---------------------------------------------------------------------------- */
  5761. /*!
  5762. * @addtogroup FTM_Peripheral_Access_Layer FTM Peripheral Access Layer
  5763. * @{
  5764. */
  5765. /** FTM - Register Layout Typedef */
  5766. typedef struct {
  5767. __IO uint32_t SC; /**< Status And Control, offset: 0x0 */
  5768. __IO uint32_t CNT; /**< Counter, offset: 0x4 */
  5769. __IO uint32_t MOD; /**< Modulo, offset: 0x8 */
  5770. struct { /* offset: 0xC, array step: 0x8 */
  5771. __IO uint32_t CnSC; /**< Channel (n) Status And Control, array offset: 0xC, array step: 0x8 */
  5772. __IO uint32_t CnV; /**< Channel (n) Value, array offset: 0x10, array step: 0x8 */
  5773. } CONTROLS[8];
  5774. __IO uint32_t CNTIN; /**< Counter Initial Value, offset: 0x4C */
  5775. __IO uint32_t STATUS; /**< Capture And Compare Status, offset: 0x50 */
  5776. __IO uint32_t MODE; /**< Features Mode Selection, offset: 0x54 */
  5777. __IO uint32_t SYNC; /**< Synchronization, offset: 0x58 */
  5778. __IO uint32_t OUTINIT; /**< Initial State For Channels Output, offset: 0x5C */
  5779. __IO uint32_t OUTMASK; /**< Output Mask, offset: 0x60 */
  5780. __IO uint32_t COMBINE; /**< Function For Linked Channels, offset: 0x64 */
  5781. __IO uint32_t DEADTIME; /**< Deadtime Insertion Control, offset: 0x68 */
  5782. __IO uint32_t EXTTRIG; /**< FTM External Trigger, offset: 0x6C */
  5783. __IO uint32_t POL; /**< Channels Polarity, offset: 0x70 */
  5784. __IO uint32_t FMS; /**< Fault Mode Status, offset: 0x74 */
  5785. __IO uint32_t FILTER; /**< Input Capture Filter Control, offset: 0x78 */
  5786. __IO uint32_t FLTCTRL; /**< Fault Control, offset: 0x7C */
  5787. __IO uint32_t QDCTRL; /**< Quadrature Decoder Control And Status, offset: 0x80 */
  5788. __IO uint32_t CONF; /**< Configuration, offset: 0x84 */
  5789. __IO uint32_t FLTPOL; /**< FTM Fault Input Polarity, offset: 0x88 */
  5790. __IO uint32_t SYNCONF; /**< Synchronization Configuration, offset: 0x8C */
  5791. __IO uint32_t INVCTRL; /**< FTM Inverting Control, offset: 0x90 */
  5792. __IO uint32_t SWOCTRL; /**< FTM Software Output Control, offset: 0x94 */
  5793. __IO uint32_t PWMLOAD; /**< FTM PWM Load, offset: 0x98 */
  5794. } FTM_Type;
  5795. /* ----------------------------------------------------------------------------
  5796. -- FTM Register Masks
  5797. ---------------------------------------------------------------------------- */
  5798. /*!
  5799. * @addtogroup FTM_Register_Masks FTM Register Masks
  5800. * @{
  5801. */
  5802. /*! @name SC - Status And Control */
  5803. #define FTM_SC_PS_MASK (0x7U)
  5804. #define FTM_SC_PS_SHIFT (0U)
  5805. #define FTM_SC_PS(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_PS_SHIFT)) & FTM_SC_PS_MASK)
  5806. #define FTM_SC_CLKS_MASK (0x18U)
  5807. #define FTM_SC_CLKS_SHIFT (3U)
  5808. #define FTM_SC_CLKS(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_CLKS_SHIFT)) & FTM_SC_CLKS_MASK)
  5809. #define FTM_SC_CPWMS_MASK (0x20U)
  5810. #define FTM_SC_CPWMS_SHIFT (5U)
  5811. #define FTM_SC_CPWMS(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_CPWMS_SHIFT)) & FTM_SC_CPWMS_MASK)
  5812. #define FTM_SC_TOIE_MASK (0x40U)
  5813. #define FTM_SC_TOIE_SHIFT (6U)
  5814. #define FTM_SC_TOIE(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_TOIE_SHIFT)) & FTM_SC_TOIE_MASK)
  5815. #define FTM_SC_TOF_MASK (0x80U)
  5816. #define FTM_SC_TOF_SHIFT (7U)
  5817. #define FTM_SC_TOF(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_TOF_SHIFT)) & FTM_SC_TOF_MASK)
  5818. /*! @name CNT - Counter */
  5819. #define FTM_CNT_COUNT_MASK (0xFFFFU)
  5820. #define FTM_CNT_COUNT_SHIFT (0U)
  5821. #define FTM_CNT_COUNT(x) (((uint32_t)(((uint32_t)(x)) << FTM_CNT_COUNT_SHIFT)) & FTM_CNT_COUNT_MASK)
  5822. /*! @name MOD - Modulo */
  5823. #define FTM_MOD_MOD_MASK (0xFFFFU)
  5824. #define FTM_MOD_MOD_SHIFT (0U)
  5825. #define FTM_MOD_MOD(x) (((uint32_t)(((uint32_t)(x)) << FTM_MOD_MOD_SHIFT)) & FTM_MOD_MOD_MASK)
  5826. /*! @name CnSC - Channel (n) Status And Control */
  5827. #define FTM_CnSC_DMA_MASK (0x1U)
  5828. #define FTM_CnSC_DMA_SHIFT (0U)
  5829. #define FTM_CnSC_DMA(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_DMA_SHIFT)) & FTM_CnSC_DMA_MASK)
  5830. #define FTM_CnSC_ICRST_MASK (0x2U)
  5831. #define FTM_CnSC_ICRST_SHIFT (1U)
  5832. #define FTM_CnSC_ICRST(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_ICRST_SHIFT)) & FTM_CnSC_ICRST_MASK)
  5833. #define FTM_CnSC_ELSA_MASK (0x4U)
  5834. #define FTM_CnSC_ELSA_SHIFT (2U)
  5835. #define FTM_CnSC_ELSA(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_ELSA_SHIFT)) & FTM_CnSC_ELSA_MASK)
  5836. #define FTM_CnSC_ELSB_MASK (0x8U)
  5837. #define FTM_CnSC_ELSB_SHIFT (3U)
  5838. #define FTM_CnSC_ELSB(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_ELSB_SHIFT)) & FTM_CnSC_ELSB_MASK)
  5839. #define FTM_CnSC_MSA_MASK (0x10U)
  5840. #define FTM_CnSC_MSA_SHIFT (4U)
  5841. #define FTM_CnSC_MSA(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_MSA_SHIFT)) & FTM_CnSC_MSA_MASK)
  5842. #define FTM_CnSC_MSB_MASK (0x20U)
  5843. #define FTM_CnSC_MSB_SHIFT (5U)
  5844. #define FTM_CnSC_MSB(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_MSB_SHIFT)) & FTM_CnSC_MSB_MASK)
  5845. #define FTM_CnSC_CHIE_MASK (0x40U)
  5846. #define FTM_CnSC_CHIE_SHIFT (6U)
  5847. #define FTM_CnSC_CHIE(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_CHIE_SHIFT)) & FTM_CnSC_CHIE_MASK)
  5848. #define FTM_CnSC_CHF_MASK (0x80U)
  5849. #define FTM_CnSC_CHF_SHIFT (7U)
  5850. #define FTM_CnSC_CHF(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_CHF_SHIFT)) & FTM_CnSC_CHF_MASK)
  5851. /* The count of FTM_CnSC */
  5852. #define FTM_CnSC_COUNT (8U)
  5853. /*! @name CnV - Channel (n) Value */
  5854. #define FTM_CnV_VAL_MASK (0xFFFFU)
  5855. #define FTM_CnV_VAL_SHIFT (0U)
  5856. #define FTM_CnV_VAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnV_VAL_SHIFT)) & FTM_CnV_VAL_MASK)
  5857. /* The count of FTM_CnV */
  5858. #define FTM_CnV_COUNT (8U)
  5859. /*! @name CNTIN - Counter Initial Value */
  5860. #define FTM_CNTIN_INIT_MASK (0xFFFFU)
  5861. #define FTM_CNTIN_INIT_SHIFT (0U)
  5862. #define FTM_CNTIN_INIT(x) (((uint32_t)(((uint32_t)(x)) << FTM_CNTIN_INIT_SHIFT)) & FTM_CNTIN_INIT_MASK)
  5863. /*! @name STATUS - Capture And Compare Status */
  5864. #define FTM_STATUS_CH0F_MASK (0x1U)
  5865. #define FTM_STATUS_CH0F_SHIFT (0U)
  5866. #define FTM_STATUS_CH0F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH0F_SHIFT)) & FTM_STATUS_CH0F_MASK)
  5867. #define FTM_STATUS_CH1F_MASK (0x2U)
  5868. #define FTM_STATUS_CH1F_SHIFT (1U)
  5869. #define FTM_STATUS_CH1F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH1F_SHIFT)) & FTM_STATUS_CH1F_MASK)
  5870. #define FTM_STATUS_CH2F_MASK (0x4U)
  5871. #define FTM_STATUS_CH2F_SHIFT (2U)
  5872. #define FTM_STATUS_CH2F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH2F_SHIFT)) & FTM_STATUS_CH2F_MASK)
  5873. #define FTM_STATUS_CH3F_MASK (0x8U)
  5874. #define FTM_STATUS_CH3F_SHIFT (3U)
  5875. #define FTM_STATUS_CH3F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH3F_SHIFT)) & FTM_STATUS_CH3F_MASK)
  5876. #define FTM_STATUS_CH4F_MASK (0x10U)
  5877. #define FTM_STATUS_CH4F_SHIFT (4U)
  5878. #define FTM_STATUS_CH4F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH4F_SHIFT)) & FTM_STATUS_CH4F_MASK)
  5879. #define FTM_STATUS_CH5F_MASK (0x20U)
  5880. #define FTM_STATUS_CH5F_SHIFT (5U)
  5881. #define FTM_STATUS_CH5F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH5F_SHIFT)) & FTM_STATUS_CH5F_MASK)
  5882. #define FTM_STATUS_CH6F_MASK (0x40U)
  5883. #define FTM_STATUS_CH6F_SHIFT (6U)
  5884. #define FTM_STATUS_CH6F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH6F_SHIFT)) & FTM_STATUS_CH6F_MASK)
  5885. #define FTM_STATUS_CH7F_MASK (0x80U)
  5886. #define FTM_STATUS_CH7F_SHIFT (7U)
  5887. #define FTM_STATUS_CH7F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH7F_SHIFT)) & FTM_STATUS_CH7F_MASK)
  5888. /*! @name MODE - Features Mode Selection */
  5889. #define FTM_MODE_FTMEN_MASK (0x1U)
  5890. #define FTM_MODE_FTMEN_SHIFT (0U)
  5891. #define FTM_MODE_FTMEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_FTMEN_SHIFT)) & FTM_MODE_FTMEN_MASK)
  5892. #define FTM_MODE_INIT_MASK (0x2U)
  5893. #define FTM_MODE_INIT_SHIFT (1U)
  5894. #define FTM_MODE_INIT(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_INIT_SHIFT)) & FTM_MODE_INIT_MASK)
  5895. #define FTM_MODE_WPDIS_MASK (0x4U)
  5896. #define FTM_MODE_WPDIS_SHIFT (2U)
  5897. #define FTM_MODE_WPDIS(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_WPDIS_SHIFT)) & FTM_MODE_WPDIS_MASK)
  5898. #define FTM_MODE_PWMSYNC_MASK (0x8U)
  5899. #define FTM_MODE_PWMSYNC_SHIFT (3U)
  5900. #define FTM_MODE_PWMSYNC(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_PWMSYNC_SHIFT)) & FTM_MODE_PWMSYNC_MASK)
  5901. #define FTM_MODE_CAPTEST_MASK (0x10U)
  5902. #define FTM_MODE_CAPTEST_SHIFT (4U)
  5903. #define FTM_MODE_CAPTEST(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_CAPTEST_SHIFT)) & FTM_MODE_CAPTEST_MASK)
  5904. #define FTM_MODE_FAULTM_MASK (0x60U)
  5905. #define FTM_MODE_FAULTM_SHIFT (5U)
  5906. #define FTM_MODE_FAULTM(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_FAULTM_SHIFT)) & FTM_MODE_FAULTM_MASK)
  5907. #define FTM_MODE_FAULTIE_MASK (0x80U)
  5908. #define FTM_MODE_FAULTIE_SHIFT (7U)
  5909. #define FTM_MODE_FAULTIE(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_FAULTIE_SHIFT)) & FTM_MODE_FAULTIE_MASK)
  5910. /*! @name SYNC - Synchronization */
  5911. #define FTM_SYNC_CNTMIN_MASK (0x1U)
  5912. #define FTM_SYNC_CNTMIN_SHIFT (0U)
  5913. #define FTM_SYNC_CNTMIN(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_CNTMIN_SHIFT)) & FTM_SYNC_CNTMIN_MASK)
  5914. #define FTM_SYNC_CNTMAX_MASK (0x2U)
  5915. #define FTM_SYNC_CNTMAX_SHIFT (1U)
  5916. #define FTM_SYNC_CNTMAX(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_CNTMAX_SHIFT)) & FTM_SYNC_CNTMAX_MASK)
  5917. #define FTM_SYNC_REINIT_MASK (0x4U)
  5918. #define FTM_SYNC_REINIT_SHIFT (2U)
  5919. #define FTM_SYNC_REINIT(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_REINIT_SHIFT)) & FTM_SYNC_REINIT_MASK)
  5920. #define FTM_SYNC_SYNCHOM_MASK (0x8U)
  5921. #define FTM_SYNC_SYNCHOM_SHIFT (3U)
  5922. #define FTM_SYNC_SYNCHOM(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_SYNCHOM_SHIFT)) & FTM_SYNC_SYNCHOM_MASK)
  5923. #define FTM_SYNC_TRIG0_MASK (0x10U)
  5924. #define FTM_SYNC_TRIG0_SHIFT (4U)
  5925. #define FTM_SYNC_TRIG0(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_TRIG0_SHIFT)) & FTM_SYNC_TRIG0_MASK)
  5926. #define FTM_SYNC_TRIG1_MASK (0x20U)
  5927. #define FTM_SYNC_TRIG1_SHIFT (5U)
  5928. #define FTM_SYNC_TRIG1(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_TRIG1_SHIFT)) & FTM_SYNC_TRIG1_MASK)
  5929. #define FTM_SYNC_TRIG2_MASK (0x40U)
  5930. #define FTM_SYNC_TRIG2_SHIFT (6U)
  5931. #define FTM_SYNC_TRIG2(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_TRIG2_SHIFT)) & FTM_SYNC_TRIG2_MASK)
  5932. #define FTM_SYNC_SWSYNC_MASK (0x80U)
  5933. #define FTM_SYNC_SWSYNC_SHIFT (7U)
  5934. #define FTM_SYNC_SWSYNC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_SWSYNC_SHIFT)) & FTM_SYNC_SWSYNC_MASK)
  5935. /*! @name OUTINIT - Initial State For Channels Output */
  5936. #define FTM_OUTINIT_CH0OI_MASK (0x1U)
  5937. #define FTM_OUTINIT_CH0OI_SHIFT (0U)
  5938. #define FTM_OUTINIT_CH0OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH0OI_SHIFT)) & FTM_OUTINIT_CH0OI_MASK)
  5939. #define FTM_OUTINIT_CH1OI_MASK (0x2U)
  5940. #define FTM_OUTINIT_CH1OI_SHIFT (1U)
  5941. #define FTM_OUTINIT_CH1OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH1OI_SHIFT)) & FTM_OUTINIT_CH1OI_MASK)
  5942. #define FTM_OUTINIT_CH2OI_MASK (0x4U)
  5943. #define FTM_OUTINIT_CH2OI_SHIFT (2U)
  5944. #define FTM_OUTINIT_CH2OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH2OI_SHIFT)) & FTM_OUTINIT_CH2OI_MASK)
  5945. #define FTM_OUTINIT_CH3OI_MASK (0x8U)
  5946. #define FTM_OUTINIT_CH3OI_SHIFT (3U)
  5947. #define FTM_OUTINIT_CH3OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH3OI_SHIFT)) & FTM_OUTINIT_CH3OI_MASK)
  5948. #define FTM_OUTINIT_CH4OI_MASK (0x10U)
  5949. #define FTM_OUTINIT_CH4OI_SHIFT (4U)
  5950. #define FTM_OUTINIT_CH4OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH4OI_SHIFT)) & FTM_OUTINIT_CH4OI_MASK)
  5951. #define FTM_OUTINIT_CH5OI_MASK (0x20U)
  5952. #define FTM_OUTINIT_CH5OI_SHIFT (5U)
  5953. #define FTM_OUTINIT_CH5OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH5OI_SHIFT)) & FTM_OUTINIT_CH5OI_MASK)
  5954. #define FTM_OUTINIT_CH6OI_MASK (0x40U)
  5955. #define FTM_OUTINIT_CH6OI_SHIFT (6U)
  5956. #define FTM_OUTINIT_CH6OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH6OI_SHIFT)) & FTM_OUTINIT_CH6OI_MASK)
  5957. #define FTM_OUTINIT_CH7OI_MASK (0x80U)
  5958. #define FTM_OUTINIT_CH7OI_SHIFT (7U)
  5959. #define FTM_OUTINIT_CH7OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH7OI_SHIFT)) & FTM_OUTINIT_CH7OI_MASK)
  5960. /*! @name OUTMASK - Output Mask */
  5961. #define FTM_OUTMASK_CH0OM_MASK (0x1U)
  5962. #define FTM_OUTMASK_CH0OM_SHIFT (0U)
  5963. #define FTM_OUTMASK_CH0OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH0OM_SHIFT)) & FTM_OUTMASK_CH0OM_MASK)
  5964. #define FTM_OUTMASK_CH1OM_MASK (0x2U)
  5965. #define FTM_OUTMASK_CH1OM_SHIFT (1U)
  5966. #define FTM_OUTMASK_CH1OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH1OM_SHIFT)) & FTM_OUTMASK_CH1OM_MASK)
  5967. #define FTM_OUTMASK_CH2OM_MASK (0x4U)
  5968. #define FTM_OUTMASK_CH2OM_SHIFT (2U)
  5969. #define FTM_OUTMASK_CH2OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH2OM_SHIFT)) & FTM_OUTMASK_CH2OM_MASK)
  5970. #define FTM_OUTMASK_CH3OM_MASK (0x8U)
  5971. #define FTM_OUTMASK_CH3OM_SHIFT (3U)
  5972. #define FTM_OUTMASK_CH3OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH3OM_SHIFT)) & FTM_OUTMASK_CH3OM_MASK)
  5973. #define FTM_OUTMASK_CH4OM_MASK (0x10U)
  5974. #define FTM_OUTMASK_CH4OM_SHIFT (4U)
  5975. #define FTM_OUTMASK_CH4OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH4OM_SHIFT)) & FTM_OUTMASK_CH4OM_MASK)
  5976. #define FTM_OUTMASK_CH5OM_MASK (0x20U)
  5977. #define FTM_OUTMASK_CH5OM_SHIFT (5U)
  5978. #define FTM_OUTMASK_CH5OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH5OM_SHIFT)) & FTM_OUTMASK_CH5OM_MASK)
  5979. #define FTM_OUTMASK_CH6OM_MASK (0x40U)
  5980. #define FTM_OUTMASK_CH6OM_SHIFT (6U)
  5981. #define FTM_OUTMASK_CH6OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH6OM_SHIFT)) & FTM_OUTMASK_CH6OM_MASK)
  5982. #define FTM_OUTMASK_CH7OM_MASK (0x80U)
  5983. #define FTM_OUTMASK_CH7OM_SHIFT (7U)
  5984. #define FTM_OUTMASK_CH7OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH7OM_SHIFT)) & FTM_OUTMASK_CH7OM_MASK)
  5985. /*! @name COMBINE - Function For Linked Channels */
  5986. #define FTM_COMBINE_COMBINE0_MASK (0x1U)
  5987. #define FTM_COMBINE_COMBINE0_SHIFT (0U)
  5988. #define FTM_COMBINE_COMBINE0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE0_SHIFT)) & FTM_COMBINE_COMBINE0_MASK)
  5989. #define FTM_COMBINE_COMP0_MASK (0x2U)
  5990. #define FTM_COMBINE_COMP0_SHIFT (1U)
  5991. #define FTM_COMBINE_COMP0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP0_SHIFT)) & FTM_COMBINE_COMP0_MASK)
  5992. #define FTM_COMBINE_DECAPEN0_MASK (0x4U)
  5993. #define FTM_COMBINE_DECAPEN0_SHIFT (2U)
  5994. #define FTM_COMBINE_DECAPEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN0_SHIFT)) & FTM_COMBINE_DECAPEN0_MASK)
  5995. #define FTM_COMBINE_DECAP0_MASK (0x8U)
  5996. #define FTM_COMBINE_DECAP0_SHIFT (3U)
  5997. #define FTM_COMBINE_DECAP0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP0_SHIFT)) & FTM_COMBINE_DECAP0_MASK)
  5998. #define FTM_COMBINE_DTEN0_MASK (0x10U)
  5999. #define FTM_COMBINE_DTEN0_SHIFT (4U)
  6000. #define FTM_COMBINE_DTEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN0_SHIFT)) & FTM_COMBINE_DTEN0_MASK)
  6001. #define FTM_COMBINE_SYNCEN0_MASK (0x20U)
  6002. #define FTM_COMBINE_SYNCEN0_SHIFT (5U)
  6003. #define FTM_COMBINE_SYNCEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN0_SHIFT)) & FTM_COMBINE_SYNCEN0_MASK)
  6004. #define FTM_COMBINE_FAULTEN0_MASK (0x40U)
  6005. #define FTM_COMBINE_FAULTEN0_SHIFT (6U)
  6006. #define FTM_COMBINE_FAULTEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN0_SHIFT)) & FTM_COMBINE_FAULTEN0_MASK)
  6007. #define FTM_COMBINE_COMBINE1_MASK (0x100U)
  6008. #define FTM_COMBINE_COMBINE1_SHIFT (8U)
  6009. #define FTM_COMBINE_COMBINE1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE1_SHIFT)) & FTM_COMBINE_COMBINE1_MASK)
  6010. #define FTM_COMBINE_COMP1_MASK (0x200U)
  6011. #define FTM_COMBINE_COMP1_SHIFT (9U)
  6012. #define FTM_COMBINE_COMP1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP1_SHIFT)) & FTM_COMBINE_COMP1_MASK)
  6013. #define FTM_COMBINE_DECAPEN1_MASK (0x400U)
  6014. #define FTM_COMBINE_DECAPEN1_SHIFT (10U)
  6015. #define FTM_COMBINE_DECAPEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN1_SHIFT)) & FTM_COMBINE_DECAPEN1_MASK)
  6016. #define FTM_COMBINE_DECAP1_MASK (0x800U)
  6017. #define FTM_COMBINE_DECAP1_SHIFT (11U)
  6018. #define FTM_COMBINE_DECAP1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP1_SHIFT)) & FTM_COMBINE_DECAP1_MASK)
  6019. #define FTM_COMBINE_DTEN1_MASK (0x1000U)
  6020. #define FTM_COMBINE_DTEN1_SHIFT (12U)
  6021. #define FTM_COMBINE_DTEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN1_SHIFT)) & FTM_COMBINE_DTEN1_MASK)
  6022. #define FTM_COMBINE_SYNCEN1_MASK (0x2000U)
  6023. #define FTM_COMBINE_SYNCEN1_SHIFT (13U)
  6024. #define FTM_COMBINE_SYNCEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN1_SHIFT)) & FTM_COMBINE_SYNCEN1_MASK)
  6025. #define FTM_COMBINE_FAULTEN1_MASK (0x4000U)
  6026. #define FTM_COMBINE_FAULTEN1_SHIFT (14U)
  6027. #define FTM_COMBINE_FAULTEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN1_SHIFT)) & FTM_COMBINE_FAULTEN1_MASK)
  6028. #define FTM_COMBINE_COMBINE2_MASK (0x10000U)
  6029. #define FTM_COMBINE_COMBINE2_SHIFT (16U)
  6030. #define FTM_COMBINE_COMBINE2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE2_SHIFT)) & FTM_COMBINE_COMBINE2_MASK)
  6031. #define FTM_COMBINE_COMP2_MASK (0x20000U)
  6032. #define FTM_COMBINE_COMP2_SHIFT (17U)
  6033. #define FTM_COMBINE_COMP2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP2_SHIFT)) & FTM_COMBINE_COMP2_MASK)
  6034. #define FTM_COMBINE_DECAPEN2_MASK (0x40000U)
  6035. #define FTM_COMBINE_DECAPEN2_SHIFT (18U)
  6036. #define FTM_COMBINE_DECAPEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN2_SHIFT)) & FTM_COMBINE_DECAPEN2_MASK)
  6037. #define FTM_COMBINE_DECAP2_MASK (0x80000U)
  6038. #define FTM_COMBINE_DECAP2_SHIFT (19U)
  6039. #define FTM_COMBINE_DECAP2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP2_SHIFT)) & FTM_COMBINE_DECAP2_MASK)
  6040. #define FTM_COMBINE_DTEN2_MASK (0x100000U)
  6041. #define FTM_COMBINE_DTEN2_SHIFT (20U)
  6042. #define FTM_COMBINE_DTEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN2_SHIFT)) & FTM_COMBINE_DTEN2_MASK)
  6043. #define FTM_COMBINE_SYNCEN2_MASK (0x200000U)
  6044. #define FTM_COMBINE_SYNCEN2_SHIFT (21U)
  6045. #define FTM_COMBINE_SYNCEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN2_SHIFT)) & FTM_COMBINE_SYNCEN2_MASK)
  6046. #define FTM_COMBINE_FAULTEN2_MASK (0x400000U)
  6047. #define FTM_COMBINE_FAULTEN2_SHIFT (22U)
  6048. #define FTM_COMBINE_FAULTEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN2_SHIFT)) & FTM_COMBINE_FAULTEN2_MASK)
  6049. #define FTM_COMBINE_COMBINE3_MASK (0x1000000U)
  6050. #define FTM_COMBINE_COMBINE3_SHIFT (24U)
  6051. #define FTM_COMBINE_COMBINE3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE3_SHIFT)) & FTM_COMBINE_COMBINE3_MASK)
  6052. #define FTM_COMBINE_COMP3_MASK (0x2000000U)
  6053. #define FTM_COMBINE_COMP3_SHIFT (25U)
  6054. #define FTM_COMBINE_COMP3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP3_SHIFT)) & FTM_COMBINE_COMP3_MASK)
  6055. #define FTM_COMBINE_DECAPEN3_MASK (0x4000000U)
  6056. #define FTM_COMBINE_DECAPEN3_SHIFT (26U)
  6057. #define FTM_COMBINE_DECAPEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN3_SHIFT)) & FTM_COMBINE_DECAPEN3_MASK)
  6058. #define FTM_COMBINE_DECAP3_MASK (0x8000000U)
  6059. #define FTM_COMBINE_DECAP3_SHIFT (27U)
  6060. #define FTM_COMBINE_DECAP3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP3_SHIFT)) & FTM_COMBINE_DECAP3_MASK)
  6061. #define FTM_COMBINE_DTEN3_MASK (0x10000000U)
  6062. #define FTM_COMBINE_DTEN3_SHIFT (28U)
  6063. #define FTM_COMBINE_DTEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN3_SHIFT)) & FTM_COMBINE_DTEN3_MASK)
  6064. #define FTM_COMBINE_SYNCEN3_MASK (0x20000000U)
  6065. #define FTM_COMBINE_SYNCEN3_SHIFT (29U)
  6066. #define FTM_COMBINE_SYNCEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN3_SHIFT)) & FTM_COMBINE_SYNCEN3_MASK)
  6067. #define FTM_COMBINE_FAULTEN3_MASK (0x40000000U)
  6068. #define FTM_COMBINE_FAULTEN3_SHIFT (30U)
  6069. #define FTM_COMBINE_FAULTEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN3_SHIFT)) & FTM_COMBINE_FAULTEN3_MASK)
  6070. /*! @name DEADTIME - Deadtime Insertion Control */
  6071. #define FTM_DEADTIME_DTVAL_MASK (0x3FU)
  6072. #define FTM_DEADTIME_DTVAL_SHIFT (0U)
  6073. #define FTM_DEADTIME_DTVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_DEADTIME_DTVAL_SHIFT)) & FTM_DEADTIME_DTVAL_MASK)
  6074. #define FTM_DEADTIME_DTPS_MASK (0xC0U)
  6075. #define FTM_DEADTIME_DTPS_SHIFT (6U)
  6076. #define FTM_DEADTIME_DTPS(x) (((uint32_t)(((uint32_t)(x)) << FTM_DEADTIME_DTPS_SHIFT)) & FTM_DEADTIME_DTPS_MASK)
  6077. /*! @name EXTTRIG - FTM External Trigger */
  6078. #define FTM_EXTTRIG_CH2TRIG_MASK (0x1U)
  6079. #define FTM_EXTTRIG_CH2TRIG_SHIFT (0U)
  6080. #define FTM_EXTTRIG_CH2TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH2TRIG_SHIFT)) & FTM_EXTTRIG_CH2TRIG_MASK)
  6081. #define FTM_EXTTRIG_CH3TRIG_MASK (0x2U)
  6082. #define FTM_EXTTRIG_CH3TRIG_SHIFT (1U)
  6083. #define FTM_EXTTRIG_CH3TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH3TRIG_SHIFT)) & FTM_EXTTRIG_CH3TRIG_MASK)
  6084. #define FTM_EXTTRIG_CH4TRIG_MASK (0x4U)
  6085. #define FTM_EXTTRIG_CH4TRIG_SHIFT (2U)
  6086. #define FTM_EXTTRIG_CH4TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH4TRIG_SHIFT)) & FTM_EXTTRIG_CH4TRIG_MASK)
  6087. #define FTM_EXTTRIG_CH5TRIG_MASK (0x8U)
  6088. #define FTM_EXTTRIG_CH5TRIG_SHIFT (3U)
  6089. #define FTM_EXTTRIG_CH5TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH5TRIG_SHIFT)) & FTM_EXTTRIG_CH5TRIG_MASK)
  6090. #define FTM_EXTTRIG_CH0TRIG_MASK (0x10U)
  6091. #define FTM_EXTTRIG_CH0TRIG_SHIFT (4U)
  6092. #define FTM_EXTTRIG_CH0TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH0TRIG_SHIFT)) & FTM_EXTTRIG_CH0TRIG_MASK)
  6093. #define FTM_EXTTRIG_CH1TRIG_MASK (0x20U)
  6094. #define FTM_EXTTRIG_CH1TRIG_SHIFT (5U)
  6095. #define FTM_EXTTRIG_CH1TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH1TRIG_SHIFT)) & FTM_EXTTRIG_CH1TRIG_MASK)
  6096. #define FTM_EXTTRIG_INITTRIGEN_MASK (0x40U)
  6097. #define FTM_EXTTRIG_INITTRIGEN_SHIFT (6U)
  6098. #define FTM_EXTTRIG_INITTRIGEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_INITTRIGEN_SHIFT)) & FTM_EXTTRIG_INITTRIGEN_MASK)
  6099. #define FTM_EXTTRIG_TRIGF_MASK (0x80U)
  6100. #define FTM_EXTTRIG_TRIGF_SHIFT (7U)
  6101. #define FTM_EXTTRIG_TRIGF(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_TRIGF_SHIFT)) & FTM_EXTTRIG_TRIGF_MASK)
  6102. /*! @name POL - Channels Polarity */
  6103. #define FTM_POL_POL0_MASK (0x1U)
  6104. #define FTM_POL_POL0_SHIFT (0U)
  6105. #define FTM_POL_POL0(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL0_SHIFT)) & FTM_POL_POL0_MASK)
  6106. #define FTM_POL_POL1_MASK (0x2U)
  6107. #define FTM_POL_POL1_SHIFT (1U)
  6108. #define FTM_POL_POL1(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL1_SHIFT)) & FTM_POL_POL1_MASK)
  6109. #define FTM_POL_POL2_MASK (0x4U)
  6110. #define FTM_POL_POL2_SHIFT (2U)
  6111. #define FTM_POL_POL2(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL2_SHIFT)) & FTM_POL_POL2_MASK)
  6112. #define FTM_POL_POL3_MASK (0x8U)
  6113. #define FTM_POL_POL3_SHIFT (3U)
  6114. #define FTM_POL_POL3(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL3_SHIFT)) & FTM_POL_POL3_MASK)
  6115. #define FTM_POL_POL4_MASK (0x10U)
  6116. #define FTM_POL_POL4_SHIFT (4U)
  6117. #define FTM_POL_POL4(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL4_SHIFT)) & FTM_POL_POL4_MASK)
  6118. #define FTM_POL_POL5_MASK (0x20U)
  6119. #define FTM_POL_POL5_SHIFT (5U)
  6120. #define FTM_POL_POL5(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL5_SHIFT)) & FTM_POL_POL5_MASK)
  6121. #define FTM_POL_POL6_MASK (0x40U)
  6122. #define FTM_POL_POL6_SHIFT (6U)
  6123. #define FTM_POL_POL6(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL6_SHIFT)) & FTM_POL_POL6_MASK)
  6124. #define FTM_POL_POL7_MASK (0x80U)
  6125. #define FTM_POL_POL7_SHIFT (7U)
  6126. #define FTM_POL_POL7(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL7_SHIFT)) & FTM_POL_POL7_MASK)
  6127. /*! @name FMS - Fault Mode Status */
  6128. #define FTM_FMS_FAULTF0_MASK (0x1U)
  6129. #define FTM_FMS_FAULTF0_SHIFT (0U)
  6130. #define FTM_FMS_FAULTF0(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF0_SHIFT)) & FTM_FMS_FAULTF0_MASK)
  6131. #define FTM_FMS_FAULTF1_MASK (0x2U)
  6132. #define FTM_FMS_FAULTF1_SHIFT (1U)
  6133. #define FTM_FMS_FAULTF1(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF1_SHIFT)) & FTM_FMS_FAULTF1_MASK)
  6134. #define FTM_FMS_FAULTF2_MASK (0x4U)
  6135. #define FTM_FMS_FAULTF2_SHIFT (2U)
  6136. #define FTM_FMS_FAULTF2(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF2_SHIFT)) & FTM_FMS_FAULTF2_MASK)
  6137. #define FTM_FMS_FAULTF3_MASK (0x8U)
  6138. #define FTM_FMS_FAULTF3_SHIFT (3U)
  6139. #define FTM_FMS_FAULTF3(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF3_SHIFT)) & FTM_FMS_FAULTF3_MASK)
  6140. #define FTM_FMS_FAULTIN_MASK (0x20U)
  6141. #define FTM_FMS_FAULTIN_SHIFT (5U)
  6142. #define FTM_FMS_FAULTIN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTIN_SHIFT)) & FTM_FMS_FAULTIN_MASK)
  6143. #define FTM_FMS_WPEN_MASK (0x40U)
  6144. #define FTM_FMS_WPEN_SHIFT (6U)
  6145. #define FTM_FMS_WPEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_WPEN_SHIFT)) & FTM_FMS_WPEN_MASK)
  6146. #define FTM_FMS_FAULTF_MASK (0x80U)
  6147. #define FTM_FMS_FAULTF_SHIFT (7U)
  6148. #define FTM_FMS_FAULTF(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF_SHIFT)) & FTM_FMS_FAULTF_MASK)
  6149. /*! @name FILTER - Input Capture Filter Control */
  6150. #define FTM_FILTER_CH0FVAL_MASK (0xFU)
  6151. #define FTM_FILTER_CH0FVAL_SHIFT (0U)
  6152. #define FTM_FILTER_CH0FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH0FVAL_SHIFT)) & FTM_FILTER_CH0FVAL_MASK)
  6153. #define FTM_FILTER_CH1FVAL_MASK (0xF0U)
  6154. #define FTM_FILTER_CH1FVAL_SHIFT (4U)
  6155. #define FTM_FILTER_CH1FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH1FVAL_SHIFT)) & FTM_FILTER_CH1FVAL_MASK)
  6156. #define FTM_FILTER_CH2FVAL_MASK (0xF00U)
  6157. #define FTM_FILTER_CH2FVAL_SHIFT (8U)
  6158. #define FTM_FILTER_CH2FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH2FVAL_SHIFT)) & FTM_FILTER_CH2FVAL_MASK)
  6159. #define FTM_FILTER_CH3FVAL_MASK (0xF000U)
  6160. #define FTM_FILTER_CH3FVAL_SHIFT (12U)
  6161. #define FTM_FILTER_CH3FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH3FVAL_SHIFT)) & FTM_FILTER_CH3FVAL_MASK)
  6162. /*! @name FLTCTRL - Fault Control */
  6163. #define FTM_FLTCTRL_FAULT0EN_MASK (0x1U)
  6164. #define FTM_FLTCTRL_FAULT0EN_SHIFT (0U)
  6165. #define FTM_FLTCTRL_FAULT0EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT0EN_SHIFT)) & FTM_FLTCTRL_FAULT0EN_MASK)
  6166. #define FTM_FLTCTRL_FAULT1EN_MASK (0x2U)
  6167. #define FTM_FLTCTRL_FAULT1EN_SHIFT (1U)
  6168. #define FTM_FLTCTRL_FAULT1EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT1EN_SHIFT)) & FTM_FLTCTRL_FAULT1EN_MASK)
  6169. #define FTM_FLTCTRL_FAULT2EN_MASK (0x4U)
  6170. #define FTM_FLTCTRL_FAULT2EN_SHIFT (2U)
  6171. #define FTM_FLTCTRL_FAULT2EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT2EN_SHIFT)) & FTM_FLTCTRL_FAULT2EN_MASK)
  6172. #define FTM_FLTCTRL_FAULT3EN_MASK (0x8U)
  6173. #define FTM_FLTCTRL_FAULT3EN_SHIFT (3U)
  6174. #define FTM_FLTCTRL_FAULT3EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT3EN_SHIFT)) & FTM_FLTCTRL_FAULT3EN_MASK)
  6175. #define FTM_FLTCTRL_FFLTR0EN_MASK (0x10U)
  6176. #define FTM_FLTCTRL_FFLTR0EN_SHIFT (4U)
  6177. #define FTM_FLTCTRL_FFLTR0EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR0EN_SHIFT)) & FTM_FLTCTRL_FFLTR0EN_MASK)
  6178. #define FTM_FLTCTRL_FFLTR1EN_MASK (0x20U)
  6179. #define FTM_FLTCTRL_FFLTR1EN_SHIFT (5U)
  6180. #define FTM_FLTCTRL_FFLTR1EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR1EN_SHIFT)) & FTM_FLTCTRL_FFLTR1EN_MASK)
  6181. #define FTM_FLTCTRL_FFLTR2EN_MASK (0x40U)
  6182. #define FTM_FLTCTRL_FFLTR2EN_SHIFT (6U)
  6183. #define FTM_FLTCTRL_FFLTR2EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR2EN_SHIFT)) & FTM_FLTCTRL_FFLTR2EN_MASK)
  6184. #define FTM_FLTCTRL_FFLTR3EN_MASK (0x80U)
  6185. #define FTM_FLTCTRL_FFLTR3EN_SHIFT (7U)
  6186. #define FTM_FLTCTRL_FFLTR3EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR3EN_SHIFT)) & FTM_FLTCTRL_FFLTR3EN_MASK)
  6187. #define FTM_FLTCTRL_FFVAL_MASK (0xF00U)
  6188. #define FTM_FLTCTRL_FFVAL_SHIFT (8U)
  6189. #define FTM_FLTCTRL_FFVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFVAL_SHIFT)) & FTM_FLTCTRL_FFVAL_MASK)
  6190. /*! @name QDCTRL - Quadrature Decoder Control And Status */
  6191. #define FTM_QDCTRL_QUADEN_MASK (0x1U)
  6192. #define FTM_QDCTRL_QUADEN_SHIFT (0U)
  6193. #define FTM_QDCTRL_QUADEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_QUADEN_SHIFT)) & FTM_QDCTRL_QUADEN_MASK)
  6194. #define FTM_QDCTRL_TOFDIR_MASK (0x2U)
  6195. #define FTM_QDCTRL_TOFDIR_SHIFT (1U)
  6196. #define FTM_QDCTRL_TOFDIR(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_TOFDIR_SHIFT)) & FTM_QDCTRL_TOFDIR_MASK)
  6197. #define FTM_QDCTRL_QUADIR_MASK (0x4U)
  6198. #define FTM_QDCTRL_QUADIR_SHIFT (2U)
  6199. #define FTM_QDCTRL_QUADIR(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_QUADIR_SHIFT)) & FTM_QDCTRL_QUADIR_MASK)
  6200. #define FTM_QDCTRL_QUADMODE_MASK (0x8U)
  6201. #define FTM_QDCTRL_QUADMODE_SHIFT (3U)
  6202. #define FTM_QDCTRL_QUADMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_QUADMODE_SHIFT)) & FTM_QDCTRL_QUADMODE_MASK)
  6203. #define FTM_QDCTRL_PHBPOL_MASK (0x10U)
  6204. #define FTM_QDCTRL_PHBPOL_SHIFT (4U)
  6205. #define FTM_QDCTRL_PHBPOL(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHBPOL_SHIFT)) & FTM_QDCTRL_PHBPOL_MASK)
  6206. #define FTM_QDCTRL_PHAPOL_MASK (0x20U)
  6207. #define FTM_QDCTRL_PHAPOL_SHIFT (5U)
  6208. #define FTM_QDCTRL_PHAPOL(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHAPOL_SHIFT)) & FTM_QDCTRL_PHAPOL_MASK)
  6209. #define FTM_QDCTRL_PHBFLTREN_MASK (0x40U)
  6210. #define FTM_QDCTRL_PHBFLTREN_SHIFT (6U)
  6211. #define FTM_QDCTRL_PHBFLTREN(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHBFLTREN_SHIFT)) & FTM_QDCTRL_PHBFLTREN_MASK)
  6212. #define FTM_QDCTRL_PHAFLTREN_MASK (0x80U)
  6213. #define FTM_QDCTRL_PHAFLTREN_SHIFT (7U)
  6214. #define FTM_QDCTRL_PHAFLTREN(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHAFLTREN_SHIFT)) & FTM_QDCTRL_PHAFLTREN_MASK)
  6215. /*! @name CONF - Configuration */
  6216. #define FTM_CONF_NUMTOF_MASK (0x1FU)
  6217. #define FTM_CONF_NUMTOF_SHIFT (0U)
  6218. #define FTM_CONF_NUMTOF(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_NUMTOF_SHIFT)) & FTM_CONF_NUMTOF_MASK)
  6219. #define FTM_CONF_BDMMODE_MASK (0xC0U)
  6220. #define FTM_CONF_BDMMODE_SHIFT (6U)
  6221. #define FTM_CONF_BDMMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_BDMMODE_SHIFT)) & FTM_CONF_BDMMODE_MASK)
  6222. #define FTM_CONF_GTBEEN_MASK (0x200U)
  6223. #define FTM_CONF_GTBEEN_SHIFT (9U)
  6224. #define FTM_CONF_GTBEEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_GTBEEN_SHIFT)) & FTM_CONF_GTBEEN_MASK)
  6225. #define FTM_CONF_GTBEOUT_MASK (0x400U)
  6226. #define FTM_CONF_GTBEOUT_SHIFT (10U)
  6227. #define FTM_CONF_GTBEOUT(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_GTBEOUT_SHIFT)) & FTM_CONF_GTBEOUT_MASK)
  6228. /*! @name FLTPOL - FTM Fault Input Polarity */
  6229. #define FTM_FLTPOL_FLT0POL_MASK (0x1U)
  6230. #define FTM_FLTPOL_FLT0POL_SHIFT (0U)
  6231. #define FTM_FLTPOL_FLT0POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT0POL_SHIFT)) & FTM_FLTPOL_FLT0POL_MASK)
  6232. #define FTM_FLTPOL_FLT1POL_MASK (0x2U)
  6233. #define FTM_FLTPOL_FLT1POL_SHIFT (1U)
  6234. #define FTM_FLTPOL_FLT1POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT1POL_SHIFT)) & FTM_FLTPOL_FLT1POL_MASK)
  6235. #define FTM_FLTPOL_FLT2POL_MASK (0x4U)
  6236. #define FTM_FLTPOL_FLT2POL_SHIFT (2U)
  6237. #define FTM_FLTPOL_FLT2POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT2POL_SHIFT)) & FTM_FLTPOL_FLT2POL_MASK)
  6238. #define FTM_FLTPOL_FLT3POL_MASK (0x8U)
  6239. #define FTM_FLTPOL_FLT3POL_SHIFT (3U)
  6240. #define FTM_FLTPOL_FLT3POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT3POL_SHIFT)) & FTM_FLTPOL_FLT3POL_MASK)
  6241. /*! @name SYNCONF - Synchronization Configuration */
  6242. #define FTM_SYNCONF_HWTRIGMODE_MASK (0x1U)
  6243. #define FTM_SYNCONF_HWTRIGMODE_SHIFT (0U)
  6244. #define FTM_SYNCONF_HWTRIGMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWTRIGMODE_SHIFT)) & FTM_SYNCONF_HWTRIGMODE_MASK)
  6245. #define FTM_SYNCONF_CNTINC_MASK (0x4U)
  6246. #define FTM_SYNCONF_CNTINC_SHIFT (2U)
  6247. #define FTM_SYNCONF_CNTINC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_CNTINC_SHIFT)) & FTM_SYNCONF_CNTINC_MASK)
  6248. #define FTM_SYNCONF_INVC_MASK (0x10U)
  6249. #define FTM_SYNCONF_INVC_SHIFT (4U)
  6250. #define FTM_SYNCONF_INVC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_INVC_SHIFT)) & FTM_SYNCONF_INVC_MASK)
  6251. #define FTM_SYNCONF_SWOC_MASK (0x20U)
  6252. #define FTM_SYNCONF_SWOC_SHIFT (5U)
  6253. #define FTM_SYNCONF_SWOC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWOC_SHIFT)) & FTM_SYNCONF_SWOC_MASK)
  6254. #define FTM_SYNCONF_SYNCMODE_MASK (0x80U)
  6255. #define FTM_SYNCONF_SYNCMODE_SHIFT (7U)
  6256. #define FTM_SYNCONF_SYNCMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SYNCMODE_SHIFT)) & FTM_SYNCONF_SYNCMODE_MASK)
  6257. #define FTM_SYNCONF_SWRSTCNT_MASK (0x100U)
  6258. #define FTM_SYNCONF_SWRSTCNT_SHIFT (8U)
  6259. #define FTM_SYNCONF_SWRSTCNT(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWRSTCNT_SHIFT)) & FTM_SYNCONF_SWRSTCNT_MASK)
  6260. #define FTM_SYNCONF_SWWRBUF_MASK (0x200U)
  6261. #define FTM_SYNCONF_SWWRBUF_SHIFT (9U)
  6262. #define FTM_SYNCONF_SWWRBUF(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWWRBUF_SHIFT)) & FTM_SYNCONF_SWWRBUF_MASK)
  6263. #define FTM_SYNCONF_SWOM_MASK (0x400U)
  6264. #define FTM_SYNCONF_SWOM_SHIFT (10U)
  6265. #define FTM_SYNCONF_SWOM(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWOM_SHIFT)) & FTM_SYNCONF_SWOM_MASK)
  6266. #define FTM_SYNCONF_SWINVC_MASK (0x800U)
  6267. #define FTM_SYNCONF_SWINVC_SHIFT (11U)
  6268. #define FTM_SYNCONF_SWINVC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWINVC_SHIFT)) & FTM_SYNCONF_SWINVC_MASK)
  6269. #define FTM_SYNCONF_SWSOC_MASK (0x1000U)
  6270. #define FTM_SYNCONF_SWSOC_SHIFT (12U)
  6271. #define FTM_SYNCONF_SWSOC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWSOC_SHIFT)) & FTM_SYNCONF_SWSOC_MASK)
  6272. #define FTM_SYNCONF_HWRSTCNT_MASK (0x10000U)
  6273. #define FTM_SYNCONF_HWRSTCNT_SHIFT (16U)
  6274. #define FTM_SYNCONF_HWRSTCNT(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWRSTCNT_SHIFT)) & FTM_SYNCONF_HWRSTCNT_MASK)
  6275. #define FTM_SYNCONF_HWWRBUF_MASK (0x20000U)
  6276. #define FTM_SYNCONF_HWWRBUF_SHIFT (17U)
  6277. #define FTM_SYNCONF_HWWRBUF(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWWRBUF_SHIFT)) & FTM_SYNCONF_HWWRBUF_MASK)
  6278. #define FTM_SYNCONF_HWOM_MASK (0x40000U)
  6279. #define FTM_SYNCONF_HWOM_SHIFT (18U)
  6280. #define FTM_SYNCONF_HWOM(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWOM_SHIFT)) & FTM_SYNCONF_HWOM_MASK)
  6281. #define FTM_SYNCONF_HWINVC_MASK (0x80000U)
  6282. #define FTM_SYNCONF_HWINVC_SHIFT (19U)
  6283. #define FTM_SYNCONF_HWINVC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWINVC_SHIFT)) & FTM_SYNCONF_HWINVC_MASK)
  6284. #define FTM_SYNCONF_HWSOC_MASK (0x100000U)
  6285. #define FTM_SYNCONF_HWSOC_SHIFT (20U)
  6286. #define FTM_SYNCONF_HWSOC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWSOC_SHIFT)) & FTM_SYNCONF_HWSOC_MASK)
  6287. /*! @name INVCTRL - FTM Inverting Control */
  6288. #define FTM_INVCTRL_INV0EN_MASK (0x1U)
  6289. #define FTM_INVCTRL_INV0EN_SHIFT (0U)
  6290. #define FTM_INVCTRL_INV0EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV0EN_SHIFT)) & FTM_INVCTRL_INV0EN_MASK)
  6291. #define FTM_INVCTRL_INV1EN_MASK (0x2U)
  6292. #define FTM_INVCTRL_INV1EN_SHIFT (1U)
  6293. #define FTM_INVCTRL_INV1EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV1EN_SHIFT)) & FTM_INVCTRL_INV1EN_MASK)
  6294. #define FTM_INVCTRL_INV2EN_MASK (0x4U)
  6295. #define FTM_INVCTRL_INV2EN_SHIFT (2U)
  6296. #define FTM_INVCTRL_INV2EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV2EN_SHIFT)) & FTM_INVCTRL_INV2EN_MASK)
  6297. #define FTM_INVCTRL_INV3EN_MASK (0x8U)
  6298. #define FTM_INVCTRL_INV3EN_SHIFT (3U)
  6299. #define FTM_INVCTRL_INV3EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV3EN_SHIFT)) & FTM_INVCTRL_INV3EN_MASK)
  6300. /*! @name SWOCTRL - FTM Software Output Control */
  6301. #define FTM_SWOCTRL_CH0OC_MASK (0x1U)
  6302. #define FTM_SWOCTRL_CH0OC_SHIFT (0U)
  6303. #define FTM_SWOCTRL_CH0OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH0OC_SHIFT)) & FTM_SWOCTRL_CH0OC_MASK)
  6304. #define FTM_SWOCTRL_CH1OC_MASK (0x2U)
  6305. #define FTM_SWOCTRL_CH1OC_SHIFT (1U)
  6306. #define FTM_SWOCTRL_CH1OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH1OC_SHIFT)) & FTM_SWOCTRL_CH1OC_MASK)
  6307. #define FTM_SWOCTRL_CH2OC_MASK (0x4U)
  6308. #define FTM_SWOCTRL_CH2OC_SHIFT (2U)
  6309. #define FTM_SWOCTRL_CH2OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH2OC_SHIFT)) & FTM_SWOCTRL_CH2OC_MASK)
  6310. #define FTM_SWOCTRL_CH3OC_MASK (0x8U)
  6311. #define FTM_SWOCTRL_CH3OC_SHIFT (3U)
  6312. #define FTM_SWOCTRL_CH3OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH3OC_SHIFT)) & FTM_SWOCTRL_CH3OC_MASK)
  6313. #define FTM_SWOCTRL_CH4OC_MASK (0x10U)
  6314. #define FTM_SWOCTRL_CH4OC_SHIFT (4U)
  6315. #define FTM_SWOCTRL_CH4OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH4OC_SHIFT)) & FTM_SWOCTRL_CH4OC_MASK)
  6316. #define FTM_SWOCTRL_CH5OC_MASK (0x20U)
  6317. #define FTM_SWOCTRL_CH5OC_SHIFT (5U)
  6318. #define FTM_SWOCTRL_CH5OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH5OC_SHIFT)) & FTM_SWOCTRL_CH5OC_MASK)
  6319. #define FTM_SWOCTRL_CH6OC_MASK (0x40U)
  6320. #define FTM_SWOCTRL_CH6OC_SHIFT (6U)
  6321. #define FTM_SWOCTRL_CH6OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH6OC_SHIFT)) & FTM_SWOCTRL_CH6OC_MASK)
  6322. #define FTM_SWOCTRL_CH7OC_MASK (0x80U)
  6323. #define FTM_SWOCTRL_CH7OC_SHIFT (7U)
  6324. #define FTM_SWOCTRL_CH7OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH7OC_SHIFT)) & FTM_SWOCTRL_CH7OC_MASK)
  6325. #define FTM_SWOCTRL_CH0OCV_MASK (0x100U)
  6326. #define FTM_SWOCTRL_CH0OCV_SHIFT (8U)
  6327. #define FTM_SWOCTRL_CH0OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH0OCV_SHIFT)) & FTM_SWOCTRL_CH0OCV_MASK)
  6328. #define FTM_SWOCTRL_CH1OCV_MASK (0x200U)
  6329. #define FTM_SWOCTRL_CH1OCV_SHIFT (9U)
  6330. #define FTM_SWOCTRL_CH1OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH1OCV_SHIFT)) & FTM_SWOCTRL_CH1OCV_MASK)
  6331. #define FTM_SWOCTRL_CH2OCV_MASK (0x400U)
  6332. #define FTM_SWOCTRL_CH2OCV_SHIFT (10U)
  6333. #define FTM_SWOCTRL_CH2OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH2OCV_SHIFT)) & FTM_SWOCTRL_CH2OCV_MASK)
  6334. #define FTM_SWOCTRL_CH3OCV_MASK (0x800U)
  6335. #define FTM_SWOCTRL_CH3OCV_SHIFT (11U)
  6336. #define FTM_SWOCTRL_CH3OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH3OCV_SHIFT)) & FTM_SWOCTRL_CH3OCV_MASK)
  6337. #define FTM_SWOCTRL_CH4OCV_MASK (0x1000U)
  6338. #define FTM_SWOCTRL_CH4OCV_SHIFT (12U)
  6339. #define FTM_SWOCTRL_CH4OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH4OCV_SHIFT)) & FTM_SWOCTRL_CH4OCV_MASK)
  6340. #define FTM_SWOCTRL_CH5OCV_MASK (0x2000U)
  6341. #define FTM_SWOCTRL_CH5OCV_SHIFT (13U)
  6342. #define FTM_SWOCTRL_CH5OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH5OCV_SHIFT)) & FTM_SWOCTRL_CH5OCV_MASK)
  6343. #define FTM_SWOCTRL_CH6OCV_MASK (0x4000U)
  6344. #define FTM_SWOCTRL_CH6OCV_SHIFT (14U)
  6345. #define FTM_SWOCTRL_CH6OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH6OCV_SHIFT)) & FTM_SWOCTRL_CH6OCV_MASK)
  6346. #define FTM_SWOCTRL_CH7OCV_MASK (0x8000U)
  6347. #define FTM_SWOCTRL_CH7OCV_SHIFT (15U)
  6348. #define FTM_SWOCTRL_CH7OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH7OCV_SHIFT)) & FTM_SWOCTRL_CH7OCV_MASK)
  6349. /*! @name PWMLOAD - FTM PWM Load */
  6350. #define FTM_PWMLOAD_CH0SEL_MASK (0x1U)
  6351. #define FTM_PWMLOAD_CH0SEL_SHIFT (0U)
  6352. #define FTM_PWMLOAD_CH0SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH0SEL_SHIFT)) & FTM_PWMLOAD_CH0SEL_MASK)
  6353. #define FTM_PWMLOAD_CH1SEL_MASK (0x2U)
  6354. #define FTM_PWMLOAD_CH1SEL_SHIFT (1U)
  6355. #define FTM_PWMLOAD_CH1SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH1SEL_SHIFT)) & FTM_PWMLOAD_CH1SEL_MASK)
  6356. #define FTM_PWMLOAD_CH2SEL_MASK (0x4U)
  6357. #define FTM_PWMLOAD_CH2SEL_SHIFT (2U)
  6358. #define FTM_PWMLOAD_CH2SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH2SEL_SHIFT)) & FTM_PWMLOAD_CH2SEL_MASK)
  6359. #define FTM_PWMLOAD_CH3SEL_MASK (0x8U)
  6360. #define FTM_PWMLOAD_CH3SEL_SHIFT (3U)
  6361. #define FTM_PWMLOAD_CH3SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH3SEL_SHIFT)) & FTM_PWMLOAD_CH3SEL_MASK)
  6362. #define FTM_PWMLOAD_CH4SEL_MASK (0x10U)
  6363. #define FTM_PWMLOAD_CH4SEL_SHIFT (4U)
  6364. #define FTM_PWMLOAD_CH4SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH4SEL_SHIFT)) & FTM_PWMLOAD_CH4SEL_MASK)
  6365. #define FTM_PWMLOAD_CH5SEL_MASK (0x20U)
  6366. #define FTM_PWMLOAD_CH5SEL_SHIFT (5U)
  6367. #define FTM_PWMLOAD_CH5SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH5SEL_SHIFT)) & FTM_PWMLOAD_CH5SEL_MASK)
  6368. #define FTM_PWMLOAD_CH6SEL_MASK (0x40U)
  6369. #define FTM_PWMLOAD_CH6SEL_SHIFT (6U)
  6370. #define FTM_PWMLOAD_CH6SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH6SEL_SHIFT)) & FTM_PWMLOAD_CH6SEL_MASK)
  6371. #define FTM_PWMLOAD_CH7SEL_MASK (0x80U)
  6372. #define FTM_PWMLOAD_CH7SEL_SHIFT (7U)
  6373. #define FTM_PWMLOAD_CH7SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH7SEL_SHIFT)) & FTM_PWMLOAD_CH7SEL_MASK)
  6374. #define FTM_PWMLOAD_LDOK_MASK (0x200U)
  6375. #define FTM_PWMLOAD_LDOK_SHIFT (9U)
  6376. #define FTM_PWMLOAD_LDOK(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_LDOK_SHIFT)) & FTM_PWMLOAD_LDOK_MASK)
  6377. /*!
  6378. * @}
  6379. */ /* end of group FTM_Register_Masks */
  6380. /* FTM - Peripheral instance base addresses */
  6381. /** Peripheral FTM0 base address */
  6382. #define FTM0_BASE (0x40038000u)
  6383. /** Peripheral FTM0 base pointer */
  6384. #define FTM0 ((FTM_Type *)FTM0_BASE)
  6385. /** Peripheral FTM1 base address */
  6386. #define FTM1_BASE (0x40039000u)
  6387. /** Peripheral FTM1 base pointer */
  6388. #define FTM1 ((FTM_Type *)FTM1_BASE)
  6389. /** Peripheral FTM2 base address */
  6390. #define FTM2_BASE (0x4003A000u)
  6391. /** Peripheral FTM2 base pointer */
  6392. #define FTM2 ((FTM_Type *)FTM2_BASE)
  6393. /** Peripheral FTM3 base address */
  6394. #define FTM3_BASE (0x400B9000u)
  6395. /** Peripheral FTM3 base pointer */
  6396. #define FTM3 ((FTM_Type *)FTM3_BASE)
  6397. /** Array initializer of FTM peripheral base addresses */
  6398. #define FTM_BASE_ADDRS { FTM0_BASE, FTM1_BASE, FTM2_BASE, FTM3_BASE }
  6399. /** Array initializer of FTM peripheral base pointers */
  6400. #define FTM_BASE_PTRS { FTM0, FTM1, FTM2, FTM3 }
  6401. /** Interrupt vectors for the FTM peripheral type */
  6402. #define FTM_IRQS { FTM0_IRQn, FTM1_IRQn, FTM2_IRQn, FTM3_IRQn }
  6403. /*!
  6404. * @}
  6405. */ /* end of group FTM_Peripheral_Access_Layer */
  6406. /* ----------------------------------------------------------------------------
  6407. -- GPIO Peripheral Access Layer
  6408. ---------------------------------------------------------------------------- */
  6409. /*!
  6410. * @addtogroup GPIO_Peripheral_Access_Layer GPIO Peripheral Access Layer
  6411. * @{
  6412. */
  6413. /** GPIO - Register Layout Typedef */
  6414. typedef struct {
  6415. __IO uint32_t PDOR; /**< Port Data Output Register, offset: 0x0 */
  6416. __O uint32_t PSOR; /**< Port Set Output Register, offset: 0x4 */
  6417. __O uint32_t PCOR; /**< Port Clear Output Register, offset: 0x8 */
  6418. __O uint32_t PTOR; /**< Port Toggle Output Register, offset: 0xC */
  6419. __I uint32_t PDIR; /**< Port Data Input Register, offset: 0x10 */
  6420. __IO uint32_t PDDR; /**< Port Data Direction Register, offset: 0x14 */
  6421. } GPIO_Type;
  6422. /* ----------------------------------------------------------------------------
  6423. -- GPIO Register Masks
  6424. ---------------------------------------------------------------------------- */
  6425. /*!
  6426. * @addtogroup GPIO_Register_Masks GPIO Register Masks
  6427. * @{
  6428. */
  6429. /*! @name PDOR - Port Data Output Register */
  6430. #define GPIO_PDOR_PDO_MASK (0xFFFFFFFFU)
  6431. #define GPIO_PDOR_PDO_SHIFT (0U)
  6432. #define GPIO_PDOR_PDO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDOR_PDO_SHIFT)) & GPIO_PDOR_PDO_MASK)
  6433. /*! @name PSOR - Port Set Output Register */
  6434. #define GPIO_PSOR_PTSO_MASK (0xFFFFFFFFU)
  6435. #define GPIO_PSOR_PTSO_SHIFT (0U)
  6436. #define GPIO_PSOR_PTSO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PSOR_PTSO_SHIFT)) & GPIO_PSOR_PTSO_MASK)
  6437. /*! @name PCOR - Port Clear Output Register */
  6438. #define GPIO_PCOR_PTCO_MASK (0xFFFFFFFFU)
  6439. #define GPIO_PCOR_PTCO_SHIFT (0U)
  6440. #define GPIO_PCOR_PTCO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PCOR_PTCO_SHIFT)) & GPIO_PCOR_PTCO_MASK)
  6441. /*! @name PTOR - Port Toggle Output Register */
  6442. #define GPIO_PTOR_PTTO_MASK (0xFFFFFFFFU)
  6443. #define GPIO_PTOR_PTTO_SHIFT (0U)
  6444. #define GPIO_PTOR_PTTO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PTOR_PTTO_SHIFT)) & GPIO_PTOR_PTTO_MASK)
  6445. /*! @name PDIR - Port Data Input Register */
  6446. #define GPIO_PDIR_PDI_MASK (0xFFFFFFFFU)
  6447. #define GPIO_PDIR_PDI_SHIFT (0U)
  6448. #define GPIO_PDIR_PDI(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDIR_PDI_SHIFT)) & GPIO_PDIR_PDI_MASK)
  6449. /*! @name PDDR - Port Data Direction Register */
  6450. #define GPIO_PDDR_PDD_MASK (0xFFFFFFFFU)
  6451. #define GPIO_PDDR_PDD_SHIFT (0U)
  6452. #define GPIO_PDDR_PDD(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDDR_PDD_SHIFT)) & GPIO_PDDR_PDD_MASK)
  6453. /*!
  6454. * @}
  6455. */ /* end of group GPIO_Register_Masks */
  6456. /* GPIO - Peripheral instance base addresses */
  6457. /** Peripheral GPIOA base address */
  6458. #define GPIOA_BASE (0x400FF000u)
  6459. /** Peripheral GPIOA base pointer */
  6460. #define GPIOA ((GPIO_Type *)GPIOA_BASE)
  6461. /** Peripheral GPIOB base address */
  6462. #define GPIOB_BASE (0x400FF040u)
  6463. /** Peripheral GPIOB base pointer */
  6464. #define GPIOB ((GPIO_Type *)GPIOB_BASE)
  6465. /** Peripheral GPIOC base address */
  6466. #define GPIOC_BASE (0x400FF080u)
  6467. /** Peripheral GPIOC base pointer */
  6468. #define GPIOC ((GPIO_Type *)GPIOC_BASE)
  6469. /** Peripheral GPIOD base address */
  6470. #define GPIOD_BASE (0x400FF0C0u)
  6471. /** Peripheral GPIOD base pointer */
  6472. #define GPIOD ((GPIO_Type *)GPIOD_BASE)
  6473. /** Peripheral GPIOE base address */
  6474. #define GPIOE_BASE (0x400FF100u)
  6475. /** Peripheral GPIOE base pointer */
  6476. #define GPIOE ((GPIO_Type *)GPIOE_BASE)
  6477. /** Array initializer of GPIO peripheral base addresses */
  6478. #define GPIO_BASE_ADDRS { GPIOA_BASE, GPIOB_BASE, GPIOC_BASE, GPIOD_BASE, GPIOE_BASE }
  6479. /** Array initializer of GPIO peripheral base pointers */
  6480. #define GPIO_BASE_PTRS { GPIOA, GPIOB, GPIOC, GPIOD, GPIOE }
  6481. /*!
  6482. * @}
  6483. */ /* end of group GPIO_Peripheral_Access_Layer */
  6484. /* ----------------------------------------------------------------------------
  6485. -- I2C Peripheral Access Layer
  6486. ---------------------------------------------------------------------------- */
  6487. /*!
  6488. * @addtogroup I2C_Peripheral_Access_Layer I2C Peripheral Access Layer
  6489. * @{
  6490. */
  6491. /** I2C - Register Layout Typedef */
  6492. typedef struct {
  6493. __IO uint8_t A1; /**< I2C Address Register 1, offset: 0x0 */
  6494. __IO uint8_t F; /**< I2C Frequency Divider register, offset: 0x1 */
  6495. __IO uint8_t C1; /**< I2C Control Register 1, offset: 0x2 */
  6496. __IO uint8_t S; /**< I2C Status register, offset: 0x3 */
  6497. __IO uint8_t D; /**< I2C Data I/O register, offset: 0x4 */
  6498. __IO uint8_t C2; /**< I2C Control Register 2, offset: 0x5 */
  6499. __IO uint8_t FLT; /**< I2C Programmable Input Glitch Filter Register, offset: 0x6 */
  6500. __IO uint8_t RA; /**< I2C Range Address register, offset: 0x7 */
  6501. __IO uint8_t SMB; /**< I2C SMBus Control and Status register, offset: 0x8 */
  6502. __IO uint8_t A2; /**< I2C Address Register 2, offset: 0x9 */
  6503. __IO uint8_t SLTH; /**< I2C SCL Low Timeout Register High, offset: 0xA */
  6504. __IO uint8_t SLTL; /**< I2C SCL Low Timeout Register Low, offset: 0xB */
  6505. __IO uint8_t S2; /**< I2C Status register 2, offset: 0xC */
  6506. } I2C_Type;
  6507. /* ----------------------------------------------------------------------------
  6508. -- I2C Register Masks
  6509. ---------------------------------------------------------------------------- */
  6510. /*!
  6511. * @addtogroup I2C_Register_Masks I2C Register Masks
  6512. * @{
  6513. */
  6514. /*! @name A1 - I2C Address Register 1 */
  6515. #define I2C_A1_AD_MASK (0xFEU)
  6516. #define I2C_A1_AD_SHIFT (1U)
  6517. #define I2C_A1_AD(x) (((uint8_t)(((uint8_t)(x)) << I2C_A1_AD_SHIFT)) & I2C_A1_AD_MASK)
  6518. /*! @name F - I2C Frequency Divider register */
  6519. #define I2C_F_ICR_MASK (0x3FU)
  6520. #define I2C_F_ICR_SHIFT (0U)
  6521. #define I2C_F_ICR(x) (((uint8_t)(((uint8_t)(x)) << I2C_F_ICR_SHIFT)) & I2C_F_ICR_MASK)
  6522. #define I2C_F_MULT_MASK (0xC0U)
  6523. #define I2C_F_MULT_SHIFT (6U)
  6524. #define I2C_F_MULT(x) (((uint8_t)(((uint8_t)(x)) << I2C_F_MULT_SHIFT)) & I2C_F_MULT_MASK)
  6525. /*! @name C1 - I2C Control Register 1 */
  6526. #define I2C_C1_DMAEN_MASK (0x1U)
  6527. #define I2C_C1_DMAEN_SHIFT (0U)
  6528. #define I2C_C1_DMAEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_DMAEN_SHIFT)) & I2C_C1_DMAEN_MASK)
  6529. #define I2C_C1_WUEN_MASK (0x2U)
  6530. #define I2C_C1_WUEN_SHIFT (1U)
  6531. #define I2C_C1_WUEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_WUEN_SHIFT)) & I2C_C1_WUEN_MASK)
  6532. #define I2C_C1_RSTA_MASK (0x4U)
  6533. #define I2C_C1_RSTA_SHIFT (2U)
  6534. #define I2C_C1_RSTA(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_RSTA_SHIFT)) & I2C_C1_RSTA_MASK)
  6535. #define I2C_C1_TXAK_MASK (0x8U)
  6536. #define I2C_C1_TXAK_SHIFT (3U)
  6537. #define I2C_C1_TXAK(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_TXAK_SHIFT)) & I2C_C1_TXAK_MASK)
  6538. #define I2C_C1_TX_MASK (0x10U)
  6539. #define I2C_C1_TX_SHIFT (4U)
  6540. #define I2C_C1_TX(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_TX_SHIFT)) & I2C_C1_TX_MASK)
  6541. #define I2C_C1_MST_MASK (0x20U)
  6542. #define I2C_C1_MST_SHIFT (5U)
  6543. #define I2C_C1_MST(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_MST_SHIFT)) & I2C_C1_MST_MASK)
  6544. #define I2C_C1_IICIE_MASK (0x40U)
  6545. #define I2C_C1_IICIE_SHIFT (6U)
  6546. #define I2C_C1_IICIE(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_IICIE_SHIFT)) & I2C_C1_IICIE_MASK)
  6547. #define I2C_C1_IICEN_MASK (0x80U)
  6548. #define I2C_C1_IICEN_SHIFT (7U)
  6549. #define I2C_C1_IICEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_IICEN_SHIFT)) & I2C_C1_IICEN_MASK)
  6550. /*! @name S - I2C Status register */
  6551. #define I2C_S_RXAK_MASK (0x1U)
  6552. #define I2C_S_RXAK_SHIFT (0U)
  6553. #define I2C_S_RXAK(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_RXAK_SHIFT)) & I2C_S_RXAK_MASK)
  6554. #define I2C_S_IICIF_MASK (0x2U)
  6555. #define I2C_S_IICIF_SHIFT (1U)
  6556. #define I2C_S_IICIF(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_IICIF_SHIFT)) & I2C_S_IICIF_MASK)
  6557. #define I2C_S_SRW_MASK (0x4U)
  6558. #define I2C_S_SRW_SHIFT (2U)
  6559. #define I2C_S_SRW(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_SRW_SHIFT)) & I2C_S_SRW_MASK)
  6560. #define I2C_S_RAM_MASK (0x8U)
  6561. #define I2C_S_RAM_SHIFT (3U)
  6562. #define I2C_S_RAM(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_RAM_SHIFT)) & I2C_S_RAM_MASK)
  6563. #define I2C_S_ARBL_MASK (0x10U)
  6564. #define I2C_S_ARBL_SHIFT (4U)
  6565. #define I2C_S_ARBL(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_ARBL_SHIFT)) & I2C_S_ARBL_MASK)
  6566. #define I2C_S_BUSY_MASK (0x20U)
  6567. #define I2C_S_BUSY_SHIFT (5U)
  6568. #define I2C_S_BUSY(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_BUSY_SHIFT)) & I2C_S_BUSY_MASK)
  6569. #define I2C_S_IAAS_MASK (0x40U)
  6570. #define I2C_S_IAAS_SHIFT (6U)
  6571. #define I2C_S_IAAS(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_IAAS_SHIFT)) & I2C_S_IAAS_MASK)
  6572. #define I2C_S_TCF_MASK (0x80U)
  6573. #define I2C_S_TCF_SHIFT (7U)
  6574. #define I2C_S_TCF(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_TCF_SHIFT)) & I2C_S_TCF_MASK)
  6575. /*! @name D - I2C Data I/O register */
  6576. #define I2C_D_DATA_MASK (0xFFU)
  6577. #define I2C_D_DATA_SHIFT (0U)
  6578. #define I2C_D_DATA(x) (((uint8_t)(((uint8_t)(x)) << I2C_D_DATA_SHIFT)) & I2C_D_DATA_MASK)
  6579. /*! @name C2 - I2C Control Register 2 */
  6580. #define I2C_C2_AD_MASK (0x7U)
  6581. #define I2C_C2_AD_SHIFT (0U)
  6582. #define I2C_C2_AD(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_AD_SHIFT)) & I2C_C2_AD_MASK)
  6583. #define I2C_C2_RMEN_MASK (0x8U)
  6584. #define I2C_C2_RMEN_SHIFT (3U)
  6585. #define I2C_C2_RMEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_RMEN_SHIFT)) & I2C_C2_RMEN_MASK)
  6586. #define I2C_C2_SBRC_MASK (0x10U)
  6587. #define I2C_C2_SBRC_SHIFT (4U)
  6588. #define I2C_C2_SBRC(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_SBRC_SHIFT)) & I2C_C2_SBRC_MASK)
  6589. #define I2C_C2_HDRS_MASK (0x20U)
  6590. #define I2C_C2_HDRS_SHIFT (5U)
  6591. #define I2C_C2_HDRS(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_HDRS_SHIFT)) & I2C_C2_HDRS_MASK)
  6592. #define I2C_C2_ADEXT_MASK (0x40U)
  6593. #define I2C_C2_ADEXT_SHIFT (6U)
  6594. #define I2C_C2_ADEXT(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_ADEXT_SHIFT)) & I2C_C2_ADEXT_MASK)
  6595. #define I2C_C2_GCAEN_MASK (0x80U)
  6596. #define I2C_C2_GCAEN_SHIFT (7U)
  6597. #define I2C_C2_GCAEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_GCAEN_SHIFT)) & I2C_C2_GCAEN_MASK)
  6598. /*! @name FLT - I2C Programmable Input Glitch Filter Register */
  6599. #define I2C_FLT_FLT_MASK (0xFU)
  6600. #define I2C_FLT_FLT_SHIFT (0U)
  6601. #define I2C_FLT_FLT(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_FLT_SHIFT)) & I2C_FLT_FLT_MASK)
  6602. #define I2C_FLT_STARTF_MASK (0x10U)
  6603. #define I2C_FLT_STARTF_SHIFT (4U)
  6604. #define I2C_FLT_STARTF(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_STARTF_SHIFT)) & I2C_FLT_STARTF_MASK)
  6605. #define I2C_FLT_SSIE_MASK (0x20U)
  6606. #define I2C_FLT_SSIE_SHIFT (5U)
  6607. #define I2C_FLT_SSIE(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_SSIE_SHIFT)) & I2C_FLT_SSIE_MASK)
  6608. #define I2C_FLT_STOPF_MASK (0x40U)
  6609. #define I2C_FLT_STOPF_SHIFT (6U)
  6610. #define I2C_FLT_STOPF(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_STOPF_SHIFT)) & I2C_FLT_STOPF_MASK)
  6611. #define I2C_FLT_SHEN_MASK (0x80U)
  6612. #define I2C_FLT_SHEN_SHIFT (7U)
  6613. #define I2C_FLT_SHEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_SHEN_SHIFT)) & I2C_FLT_SHEN_MASK)
  6614. /*! @name RA - I2C Range Address register */
  6615. #define I2C_RA_RAD_MASK (0xFEU)
  6616. #define I2C_RA_RAD_SHIFT (1U)
  6617. #define I2C_RA_RAD(x) (((uint8_t)(((uint8_t)(x)) << I2C_RA_RAD_SHIFT)) & I2C_RA_RAD_MASK)
  6618. /*! @name SMB - I2C SMBus Control and Status register */
  6619. #define I2C_SMB_SHTF2IE_MASK (0x1U)
  6620. #define I2C_SMB_SHTF2IE_SHIFT (0U)
  6621. #define I2C_SMB_SHTF2IE(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SHTF2IE_SHIFT)) & I2C_SMB_SHTF2IE_MASK)
  6622. #define I2C_SMB_SHTF2_MASK (0x2U)
  6623. #define I2C_SMB_SHTF2_SHIFT (1U)
  6624. #define I2C_SMB_SHTF2(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SHTF2_SHIFT)) & I2C_SMB_SHTF2_MASK)
  6625. #define I2C_SMB_SHTF1_MASK (0x4U)
  6626. #define I2C_SMB_SHTF1_SHIFT (2U)
  6627. #define I2C_SMB_SHTF1(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SHTF1_SHIFT)) & I2C_SMB_SHTF1_MASK)
  6628. #define I2C_SMB_SLTF_MASK (0x8U)
  6629. #define I2C_SMB_SLTF_SHIFT (3U)
  6630. #define I2C_SMB_SLTF(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SLTF_SHIFT)) & I2C_SMB_SLTF_MASK)
  6631. #define I2C_SMB_TCKSEL_MASK (0x10U)
  6632. #define I2C_SMB_TCKSEL_SHIFT (4U)
  6633. #define I2C_SMB_TCKSEL(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_TCKSEL_SHIFT)) & I2C_SMB_TCKSEL_MASK)
  6634. #define I2C_SMB_SIICAEN_MASK (0x20U)
  6635. #define I2C_SMB_SIICAEN_SHIFT (5U)
  6636. #define I2C_SMB_SIICAEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SIICAEN_SHIFT)) & I2C_SMB_SIICAEN_MASK)
  6637. #define I2C_SMB_ALERTEN_MASK (0x40U)
  6638. #define I2C_SMB_ALERTEN_SHIFT (6U)
  6639. #define I2C_SMB_ALERTEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_ALERTEN_SHIFT)) & I2C_SMB_ALERTEN_MASK)
  6640. #define I2C_SMB_FACK_MASK (0x80U)
  6641. #define I2C_SMB_FACK_SHIFT (7U)
  6642. #define I2C_SMB_FACK(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_FACK_SHIFT)) & I2C_SMB_FACK_MASK)
  6643. /*! @name A2 - I2C Address Register 2 */
  6644. #define I2C_A2_SAD_MASK (0xFEU)
  6645. #define I2C_A2_SAD_SHIFT (1U)
  6646. #define I2C_A2_SAD(x) (((uint8_t)(((uint8_t)(x)) << I2C_A2_SAD_SHIFT)) & I2C_A2_SAD_MASK)
  6647. /*! @name SLTH - I2C SCL Low Timeout Register High */
  6648. #define I2C_SLTH_SSLT_MASK (0xFFU)
  6649. #define I2C_SLTH_SSLT_SHIFT (0U)
  6650. #define I2C_SLTH_SSLT(x) (((uint8_t)(((uint8_t)(x)) << I2C_SLTH_SSLT_SHIFT)) & I2C_SLTH_SSLT_MASK)
  6651. /*! @name SLTL - I2C SCL Low Timeout Register Low */
  6652. #define I2C_SLTL_SSLT_MASK (0xFFU)
  6653. #define I2C_SLTL_SSLT_SHIFT (0U)
  6654. #define I2C_SLTL_SSLT(x) (((uint8_t)(((uint8_t)(x)) << I2C_SLTL_SSLT_SHIFT)) & I2C_SLTL_SSLT_MASK)
  6655. /*! @name S2 - I2C Status register 2 */
  6656. #define I2C_S2_EMPTY_MASK (0x1U)
  6657. #define I2C_S2_EMPTY_SHIFT (0U)
  6658. #define I2C_S2_EMPTY(x) (((uint8_t)(((uint8_t)(x)) << I2C_S2_EMPTY_SHIFT)) & I2C_S2_EMPTY_MASK)
  6659. #define I2C_S2_ERROR_MASK (0x2U)
  6660. #define I2C_S2_ERROR_SHIFT (1U)
  6661. #define I2C_S2_ERROR(x) (((uint8_t)(((uint8_t)(x)) << I2C_S2_ERROR_SHIFT)) & I2C_S2_ERROR_MASK)
  6662. /*!
  6663. * @}
  6664. */ /* end of group I2C_Register_Masks */
  6665. /* I2C - Peripheral instance base addresses */
  6666. /** Peripheral I2C0 base address */
  6667. #define I2C0_BASE (0x40066000u)
  6668. /** Peripheral I2C0 base pointer */
  6669. #define I2C0 ((I2C_Type *)I2C0_BASE)
  6670. /** Peripheral I2C1 base address */
  6671. #define I2C1_BASE (0x40067000u)
  6672. /** Peripheral I2C1 base pointer */
  6673. #define I2C1 ((I2C_Type *)I2C1_BASE)
  6674. /** Peripheral I2C2 base address */
  6675. #define I2C2_BASE (0x400E6000u)
  6676. /** Peripheral I2C2 base pointer */
  6677. #define I2C2 ((I2C_Type *)I2C2_BASE)
  6678. /** Peripheral I2C3 base address */
  6679. #define I2C3_BASE (0x400E7000u)
  6680. /** Peripheral I2C3 base pointer */
  6681. #define I2C3 ((I2C_Type *)I2C3_BASE)
  6682. /** Array initializer of I2C peripheral base addresses */
  6683. #define I2C_BASE_ADDRS { I2C0_BASE, I2C1_BASE, I2C2_BASE, I2C3_BASE }
  6684. /** Array initializer of I2C peripheral base pointers */
  6685. #define I2C_BASE_PTRS { I2C0, I2C1, I2C2, I2C3 }
  6686. /** Interrupt vectors for the I2C peripheral type */
  6687. #define I2C_IRQS { I2C0_IRQn, I2C1_IRQn, I2C2_IRQn, I2C3_IRQn }
  6688. /*!
  6689. * @}
  6690. */ /* end of group I2C_Peripheral_Access_Layer */
  6691. /* ----------------------------------------------------------------------------
  6692. -- I2S Peripheral Access Layer
  6693. ---------------------------------------------------------------------------- */
  6694. /*!
  6695. * @addtogroup I2S_Peripheral_Access_Layer I2S Peripheral Access Layer
  6696. * @{
  6697. */
  6698. /** I2S - Register Layout Typedef */
  6699. typedef struct {
  6700. __IO uint32_t TCSR; /**< SAI Transmit Control Register, offset: 0x0 */
  6701. __IO uint32_t TCR1; /**< SAI Transmit Configuration 1 Register, offset: 0x4 */
  6702. __IO uint32_t TCR2; /**< SAI Transmit Configuration 2 Register, offset: 0x8 */
  6703. __IO uint32_t TCR3; /**< SAI Transmit Configuration 3 Register, offset: 0xC */
  6704. __IO uint32_t TCR4; /**< SAI Transmit Configuration 4 Register, offset: 0x10 */
  6705. __IO uint32_t TCR5; /**< SAI Transmit Configuration 5 Register, offset: 0x14 */
  6706. uint8_t RESERVED_0[8];
  6707. __O uint32_t TDR[2]; /**< SAI Transmit Data Register, array offset: 0x20, array step: 0x4 */
  6708. uint8_t RESERVED_1[24];
  6709. __I uint32_t TFR[2]; /**< SAI Transmit FIFO Register, array offset: 0x40, array step: 0x4 */
  6710. uint8_t RESERVED_2[24];
  6711. __IO uint32_t TMR; /**< SAI Transmit Mask Register, offset: 0x60 */
  6712. uint8_t RESERVED_3[28];
  6713. __IO uint32_t RCSR; /**< SAI Receive Control Register, offset: 0x80 */
  6714. __IO uint32_t RCR1; /**< SAI Receive Configuration 1 Register, offset: 0x84 */
  6715. __IO uint32_t RCR2; /**< SAI Receive Configuration 2 Register, offset: 0x88 */
  6716. __IO uint32_t RCR3; /**< SAI Receive Configuration 3 Register, offset: 0x8C */
  6717. __IO uint32_t RCR4; /**< SAI Receive Configuration 4 Register, offset: 0x90 */
  6718. __IO uint32_t RCR5; /**< SAI Receive Configuration 5 Register, offset: 0x94 */
  6719. uint8_t RESERVED_4[8];
  6720. __I uint32_t RDR[2]; /**< SAI Receive Data Register, array offset: 0xA0, array step: 0x4 */
  6721. uint8_t RESERVED_5[24];
  6722. __I uint32_t RFR[2]; /**< SAI Receive FIFO Register, array offset: 0xC0, array step: 0x4 */
  6723. uint8_t RESERVED_6[24];
  6724. __IO uint32_t RMR; /**< SAI Receive Mask Register, offset: 0xE0 */
  6725. uint8_t RESERVED_7[28];
  6726. __IO uint32_t MCR; /**< SAI MCLK Control Register, offset: 0x100 */
  6727. __IO uint32_t MDR; /**< SAI MCLK Divide Register, offset: 0x104 */
  6728. } I2S_Type;
  6729. /* ----------------------------------------------------------------------------
  6730. -- I2S Register Masks
  6731. ---------------------------------------------------------------------------- */
  6732. /*!
  6733. * @addtogroup I2S_Register_Masks I2S Register Masks
  6734. * @{
  6735. */
  6736. /*! @name TCSR - SAI Transmit Control Register */
  6737. #define I2S_TCSR_FRDE_MASK (0x1U)
  6738. #define I2S_TCSR_FRDE_SHIFT (0U)
  6739. #define I2S_TCSR_FRDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRDE_SHIFT)) & I2S_TCSR_FRDE_MASK)
  6740. #define I2S_TCSR_FWDE_MASK (0x2U)
  6741. #define I2S_TCSR_FWDE_SHIFT (1U)
  6742. #define I2S_TCSR_FWDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWDE_SHIFT)) & I2S_TCSR_FWDE_MASK)
  6743. #define I2S_TCSR_FRIE_MASK (0x100U)
  6744. #define I2S_TCSR_FRIE_SHIFT (8U)
  6745. #define I2S_TCSR_FRIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRIE_SHIFT)) & I2S_TCSR_FRIE_MASK)
  6746. #define I2S_TCSR_FWIE_MASK (0x200U)
  6747. #define I2S_TCSR_FWIE_SHIFT (9U)
  6748. #define I2S_TCSR_FWIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWIE_SHIFT)) & I2S_TCSR_FWIE_MASK)
  6749. #define I2S_TCSR_FEIE_MASK (0x400U)
  6750. #define I2S_TCSR_FEIE_SHIFT (10U)
  6751. #define I2S_TCSR_FEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FEIE_SHIFT)) & I2S_TCSR_FEIE_MASK)
  6752. #define I2S_TCSR_SEIE_MASK (0x800U)
  6753. #define I2S_TCSR_SEIE_SHIFT (11U)
  6754. #define I2S_TCSR_SEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SEIE_SHIFT)) & I2S_TCSR_SEIE_MASK)
  6755. #define I2S_TCSR_WSIE_MASK (0x1000U)
  6756. #define I2S_TCSR_WSIE_SHIFT (12U)
  6757. #define I2S_TCSR_WSIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_WSIE_SHIFT)) & I2S_TCSR_WSIE_MASK)
  6758. #define I2S_TCSR_FRF_MASK (0x10000U)
  6759. #define I2S_TCSR_FRF_SHIFT (16U)
  6760. #define I2S_TCSR_FRF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRF_SHIFT)) & I2S_TCSR_FRF_MASK)
  6761. #define I2S_TCSR_FWF_MASK (0x20000U)
  6762. #define I2S_TCSR_FWF_SHIFT (17U)
  6763. #define I2S_TCSR_FWF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWF_SHIFT)) & I2S_TCSR_FWF_MASK)
  6764. #define I2S_TCSR_FEF_MASK (0x40000U)
  6765. #define I2S_TCSR_FEF_SHIFT (18U)
  6766. #define I2S_TCSR_FEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FEF_SHIFT)) & I2S_TCSR_FEF_MASK)
  6767. #define I2S_TCSR_SEF_MASK (0x80000U)
  6768. #define I2S_TCSR_SEF_SHIFT (19U)
  6769. #define I2S_TCSR_SEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SEF_SHIFT)) & I2S_TCSR_SEF_MASK)
  6770. #define I2S_TCSR_WSF_MASK (0x100000U)
  6771. #define I2S_TCSR_WSF_SHIFT (20U)
  6772. #define I2S_TCSR_WSF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_WSF_SHIFT)) & I2S_TCSR_WSF_MASK)
  6773. #define I2S_TCSR_SR_MASK (0x1000000U)
  6774. #define I2S_TCSR_SR_SHIFT (24U)
  6775. #define I2S_TCSR_SR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SR_SHIFT)) & I2S_TCSR_SR_MASK)
  6776. #define I2S_TCSR_FR_MASK (0x2000000U)
  6777. #define I2S_TCSR_FR_SHIFT (25U)
  6778. #define I2S_TCSR_FR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FR_SHIFT)) & I2S_TCSR_FR_MASK)
  6779. #define I2S_TCSR_BCE_MASK (0x10000000U)
  6780. #define I2S_TCSR_BCE_SHIFT (28U)
  6781. #define I2S_TCSR_BCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_BCE_SHIFT)) & I2S_TCSR_BCE_MASK)
  6782. #define I2S_TCSR_DBGE_MASK (0x20000000U)
  6783. #define I2S_TCSR_DBGE_SHIFT (29U)
  6784. #define I2S_TCSR_DBGE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_DBGE_SHIFT)) & I2S_TCSR_DBGE_MASK)
  6785. #define I2S_TCSR_STOPE_MASK (0x40000000U)
  6786. #define I2S_TCSR_STOPE_SHIFT (30U)
  6787. #define I2S_TCSR_STOPE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_STOPE_SHIFT)) & I2S_TCSR_STOPE_MASK)
  6788. #define I2S_TCSR_TE_MASK (0x80000000U)
  6789. #define I2S_TCSR_TE_SHIFT (31U)
  6790. #define I2S_TCSR_TE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_TE_SHIFT)) & I2S_TCSR_TE_MASK)
  6791. /*! @name TCR1 - SAI Transmit Configuration 1 Register */
  6792. #define I2S_TCR1_TFW_MASK (0x7U)
  6793. #define I2S_TCR1_TFW_SHIFT (0U)
  6794. #define I2S_TCR1_TFW(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR1_TFW_SHIFT)) & I2S_TCR1_TFW_MASK)
  6795. /*! @name TCR2 - SAI Transmit Configuration 2 Register */
  6796. #define I2S_TCR2_DIV_MASK (0xFFU)
  6797. #define I2S_TCR2_DIV_SHIFT (0U)
  6798. #define I2S_TCR2_DIV(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_DIV_SHIFT)) & I2S_TCR2_DIV_MASK)
  6799. #define I2S_TCR2_BCD_MASK (0x1000000U)
  6800. #define I2S_TCR2_BCD_SHIFT (24U)
  6801. #define I2S_TCR2_BCD(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCD_SHIFT)) & I2S_TCR2_BCD_MASK)
  6802. #define I2S_TCR2_BCP_MASK (0x2000000U)
  6803. #define I2S_TCR2_BCP_SHIFT (25U)
  6804. #define I2S_TCR2_BCP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCP_SHIFT)) & I2S_TCR2_BCP_MASK)
  6805. #define I2S_TCR2_MSEL_MASK (0xC000000U)
  6806. #define I2S_TCR2_MSEL_SHIFT (26U)
  6807. #define I2S_TCR2_MSEL(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_MSEL_SHIFT)) & I2S_TCR2_MSEL_MASK)
  6808. #define I2S_TCR2_BCI_MASK (0x10000000U)
  6809. #define I2S_TCR2_BCI_SHIFT (28U)
  6810. #define I2S_TCR2_BCI(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCI_SHIFT)) & I2S_TCR2_BCI_MASK)
  6811. #define I2S_TCR2_BCS_MASK (0x20000000U)
  6812. #define I2S_TCR2_BCS_SHIFT (29U)
  6813. #define I2S_TCR2_BCS(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCS_SHIFT)) & I2S_TCR2_BCS_MASK)
  6814. #define I2S_TCR2_SYNC_MASK (0xC0000000U)
  6815. #define I2S_TCR2_SYNC_SHIFT (30U)
  6816. #define I2S_TCR2_SYNC(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_SYNC_SHIFT)) & I2S_TCR2_SYNC_MASK)
  6817. /*! @name TCR3 - SAI Transmit Configuration 3 Register */
  6818. #define I2S_TCR3_WDFL_MASK (0x1FU)
  6819. #define I2S_TCR3_WDFL_SHIFT (0U)
  6820. #define I2S_TCR3_WDFL(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_WDFL_SHIFT)) & I2S_TCR3_WDFL_MASK)
  6821. #define I2S_TCR3_TCE_MASK (0x30000U)
  6822. #define I2S_TCR3_TCE_SHIFT (16U)
  6823. #define I2S_TCR3_TCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_TCE_SHIFT)) & I2S_TCR3_TCE_MASK)
  6824. #define I2S_TCR3_CFR_MASK (0x3000000U)
  6825. #define I2S_TCR3_CFR_SHIFT (24U)
  6826. #define I2S_TCR3_CFR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_CFR_SHIFT)) & I2S_TCR3_CFR_MASK)
  6827. /*! @name TCR4 - SAI Transmit Configuration 4 Register */
  6828. #define I2S_TCR4_FSD_MASK (0x1U)
  6829. #define I2S_TCR4_FSD_SHIFT (0U)
  6830. #define I2S_TCR4_FSD(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSD_SHIFT)) & I2S_TCR4_FSD_MASK)
  6831. #define I2S_TCR4_FSP_MASK (0x2U)
  6832. #define I2S_TCR4_FSP_SHIFT (1U)
  6833. #define I2S_TCR4_FSP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSP_SHIFT)) & I2S_TCR4_FSP_MASK)
  6834. #define I2S_TCR4_ONDEM_MASK (0x4U)
  6835. #define I2S_TCR4_ONDEM_SHIFT (2U)
  6836. #define I2S_TCR4_ONDEM(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_ONDEM_SHIFT)) & I2S_TCR4_ONDEM_MASK)
  6837. #define I2S_TCR4_FSE_MASK (0x8U)
  6838. #define I2S_TCR4_FSE_SHIFT (3U)
  6839. #define I2S_TCR4_FSE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSE_SHIFT)) & I2S_TCR4_FSE_MASK)
  6840. #define I2S_TCR4_MF_MASK (0x10U)
  6841. #define I2S_TCR4_MF_SHIFT (4U)
  6842. #define I2S_TCR4_MF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_MF_SHIFT)) & I2S_TCR4_MF_MASK)
  6843. #define I2S_TCR4_SYWD_MASK (0x1F00U)
  6844. #define I2S_TCR4_SYWD_SHIFT (8U)
  6845. #define I2S_TCR4_SYWD(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_SYWD_SHIFT)) & I2S_TCR4_SYWD_MASK)
  6846. #define I2S_TCR4_FRSZ_MASK (0x1F0000U)
  6847. #define I2S_TCR4_FRSZ_SHIFT (16U)
  6848. #define I2S_TCR4_FRSZ(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FRSZ_SHIFT)) & I2S_TCR4_FRSZ_MASK)
  6849. #define I2S_TCR4_FPACK_MASK (0x3000000U)
  6850. #define I2S_TCR4_FPACK_SHIFT (24U)
  6851. #define I2S_TCR4_FPACK(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FPACK_SHIFT)) & I2S_TCR4_FPACK_MASK)
  6852. #define I2S_TCR4_FCOMB_MASK (0xC000000U)
  6853. #define I2S_TCR4_FCOMB_SHIFT (26U)
  6854. #define I2S_TCR4_FCOMB(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FCOMB_SHIFT)) & I2S_TCR4_FCOMB_MASK)
  6855. #define I2S_TCR4_FCONT_MASK (0x10000000U)
  6856. #define I2S_TCR4_FCONT_SHIFT (28U)
  6857. #define I2S_TCR4_FCONT(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FCONT_SHIFT)) & I2S_TCR4_FCONT_MASK)
  6858. /*! @name TCR5 - SAI Transmit Configuration 5 Register */
  6859. #define I2S_TCR5_FBT_MASK (0x1F00U)
  6860. #define I2S_TCR5_FBT_SHIFT (8U)
  6861. #define I2S_TCR5_FBT(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_FBT_SHIFT)) & I2S_TCR5_FBT_MASK)
  6862. #define I2S_TCR5_W0W_MASK (0x1F0000U)
  6863. #define I2S_TCR5_W0W_SHIFT (16U)
  6864. #define I2S_TCR5_W0W(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_W0W_SHIFT)) & I2S_TCR5_W0W_MASK)
  6865. #define I2S_TCR5_WNW_MASK (0x1F000000U)
  6866. #define I2S_TCR5_WNW_SHIFT (24U)
  6867. #define I2S_TCR5_WNW(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_WNW_SHIFT)) & I2S_TCR5_WNW_MASK)
  6868. /*! @name TDR - SAI Transmit Data Register */
  6869. #define I2S_TDR_TDR_MASK (0xFFFFFFFFU)
  6870. #define I2S_TDR_TDR_SHIFT (0U)
  6871. #define I2S_TDR_TDR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TDR_TDR_SHIFT)) & I2S_TDR_TDR_MASK)
  6872. /* The count of I2S_TDR */
  6873. #define I2S_TDR_COUNT (2U)
  6874. /*! @name TFR - SAI Transmit FIFO Register */
  6875. #define I2S_TFR_RFP_MASK (0xFU)
  6876. #define I2S_TFR_RFP_SHIFT (0U)
  6877. #define I2S_TFR_RFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TFR_RFP_SHIFT)) & I2S_TFR_RFP_MASK)
  6878. #define I2S_TFR_WFP_MASK (0xF0000U)
  6879. #define I2S_TFR_WFP_SHIFT (16U)
  6880. #define I2S_TFR_WFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TFR_WFP_SHIFT)) & I2S_TFR_WFP_MASK)
  6881. #define I2S_TFR_WCP_MASK (0x80000000U)
  6882. #define I2S_TFR_WCP_SHIFT (31U)
  6883. #define I2S_TFR_WCP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TFR_WCP_SHIFT)) & I2S_TFR_WCP_MASK)
  6884. /* The count of I2S_TFR */
  6885. #define I2S_TFR_COUNT (2U)
  6886. /*! @name TMR - SAI Transmit Mask Register */
  6887. #define I2S_TMR_TWM_MASK (0xFFFFFFFFU)
  6888. #define I2S_TMR_TWM_SHIFT (0U)
  6889. #define I2S_TMR_TWM(x) (((uint32_t)(((uint32_t)(x)) << I2S_TMR_TWM_SHIFT)) & I2S_TMR_TWM_MASK)
  6890. /*! @name RCSR - SAI Receive Control Register */
  6891. #define I2S_RCSR_FRDE_MASK (0x1U)
  6892. #define I2S_RCSR_FRDE_SHIFT (0U)
  6893. #define I2S_RCSR_FRDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRDE_SHIFT)) & I2S_RCSR_FRDE_MASK)
  6894. #define I2S_RCSR_FWDE_MASK (0x2U)
  6895. #define I2S_RCSR_FWDE_SHIFT (1U)
  6896. #define I2S_RCSR_FWDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWDE_SHIFT)) & I2S_RCSR_FWDE_MASK)
  6897. #define I2S_RCSR_FRIE_MASK (0x100U)
  6898. #define I2S_RCSR_FRIE_SHIFT (8U)
  6899. #define I2S_RCSR_FRIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRIE_SHIFT)) & I2S_RCSR_FRIE_MASK)
  6900. #define I2S_RCSR_FWIE_MASK (0x200U)
  6901. #define I2S_RCSR_FWIE_SHIFT (9U)
  6902. #define I2S_RCSR_FWIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWIE_SHIFT)) & I2S_RCSR_FWIE_MASK)
  6903. #define I2S_RCSR_FEIE_MASK (0x400U)
  6904. #define I2S_RCSR_FEIE_SHIFT (10U)
  6905. #define I2S_RCSR_FEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FEIE_SHIFT)) & I2S_RCSR_FEIE_MASK)
  6906. #define I2S_RCSR_SEIE_MASK (0x800U)
  6907. #define I2S_RCSR_SEIE_SHIFT (11U)
  6908. #define I2S_RCSR_SEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SEIE_SHIFT)) & I2S_RCSR_SEIE_MASK)
  6909. #define I2S_RCSR_WSIE_MASK (0x1000U)
  6910. #define I2S_RCSR_WSIE_SHIFT (12U)
  6911. #define I2S_RCSR_WSIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_WSIE_SHIFT)) & I2S_RCSR_WSIE_MASK)
  6912. #define I2S_RCSR_FRF_MASK (0x10000U)
  6913. #define I2S_RCSR_FRF_SHIFT (16U)
  6914. #define I2S_RCSR_FRF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRF_SHIFT)) & I2S_RCSR_FRF_MASK)
  6915. #define I2S_RCSR_FWF_MASK (0x20000U)
  6916. #define I2S_RCSR_FWF_SHIFT (17U)
  6917. #define I2S_RCSR_FWF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWF_SHIFT)) & I2S_RCSR_FWF_MASK)
  6918. #define I2S_RCSR_FEF_MASK (0x40000U)
  6919. #define I2S_RCSR_FEF_SHIFT (18U)
  6920. #define I2S_RCSR_FEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FEF_SHIFT)) & I2S_RCSR_FEF_MASK)
  6921. #define I2S_RCSR_SEF_MASK (0x80000U)
  6922. #define I2S_RCSR_SEF_SHIFT (19U)
  6923. #define I2S_RCSR_SEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SEF_SHIFT)) & I2S_RCSR_SEF_MASK)
  6924. #define I2S_RCSR_WSF_MASK (0x100000U)
  6925. #define I2S_RCSR_WSF_SHIFT (20U)
  6926. #define I2S_RCSR_WSF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_WSF_SHIFT)) & I2S_RCSR_WSF_MASK)
  6927. #define I2S_RCSR_SR_MASK (0x1000000U)
  6928. #define I2S_RCSR_SR_SHIFT (24U)
  6929. #define I2S_RCSR_SR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SR_SHIFT)) & I2S_RCSR_SR_MASK)
  6930. #define I2S_RCSR_FR_MASK (0x2000000U)
  6931. #define I2S_RCSR_FR_SHIFT (25U)
  6932. #define I2S_RCSR_FR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FR_SHIFT)) & I2S_RCSR_FR_MASK)
  6933. #define I2S_RCSR_BCE_MASK (0x10000000U)
  6934. #define I2S_RCSR_BCE_SHIFT (28U)
  6935. #define I2S_RCSR_BCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_BCE_SHIFT)) & I2S_RCSR_BCE_MASK)
  6936. #define I2S_RCSR_DBGE_MASK (0x20000000U)
  6937. #define I2S_RCSR_DBGE_SHIFT (29U)
  6938. #define I2S_RCSR_DBGE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_DBGE_SHIFT)) & I2S_RCSR_DBGE_MASK)
  6939. #define I2S_RCSR_STOPE_MASK (0x40000000U)
  6940. #define I2S_RCSR_STOPE_SHIFT (30U)
  6941. #define I2S_RCSR_STOPE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_STOPE_SHIFT)) & I2S_RCSR_STOPE_MASK)
  6942. #define I2S_RCSR_RE_MASK (0x80000000U)
  6943. #define I2S_RCSR_RE_SHIFT (31U)
  6944. #define I2S_RCSR_RE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_RE_SHIFT)) & I2S_RCSR_RE_MASK)
  6945. /*! @name RCR1 - SAI Receive Configuration 1 Register */
  6946. #define I2S_RCR1_RFW_MASK (0x7U)
  6947. #define I2S_RCR1_RFW_SHIFT (0U)
  6948. #define I2S_RCR1_RFW(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR1_RFW_SHIFT)) & I2S_RCR1_RFW_MASK)
  6949. /*! @name RCR2 - SAI Receive Configuration 2 Register */
  6950. #define I2S_RCR2_DIV_MASK (0xFFU)
  6951. #define I2S_RCR2_DIV_SHIFT (0U)
  6952. #define I2S_RCR2_DIV(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_DIV_SHIFT)) & I2S_RCR2_DIV_MASK)
  6953. #define I2S_RCR2_BCD_MASK (0x1000000U)
  6954. #define I2S_RCR2_BCD_SHIFT (24U)
  6955. #define I2S_RCR2_BCD(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCD_SHIFT)) & I2S_RCR2_BCD_MASK)
  6956. #define I2S_RCR2_BCP_MASK (0x2000000U)
  6957. #define I2S_RCR2_BCP_SHIFT (25U)
  6958. #define I2S_RCR2_BCP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCP_SHIFT)) & I2S_RCR2_BCP_MASK)
  6959. #define I2S_RCR2_MSEL_MASK (0xC000000U)
  6960. #define I2S_RCR2_MSEL_SHIFT (26U)
  6961. #define I2S_RCR2_MSEL(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_MSEL_SHIFT)) & I2S_RCR2_MSEL_MASK)
  6962. #define I2S_RCR2_BCI_MASK (0x10000000U)
  6963. #define I2S_RCR2_BCI_SHIFT (28U)
  6964. #define I2S_RCR2_BCI(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCI_SHIFT)) & I2S_RCR2_BCI_MASK)
  6965. #define I2S_RCR2_BCS_MASK (0x20000000U)
  6966. #define I2S_RCR2_BCS_SHIFT (29U)
  6967. #define I2S_RCR2_BCS(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCS_SHIFT)) & I2S_RCR2_BCS_MASK)
  6968. #define I2S_RCR2_SYNC_MASK (0xC0000000U)
  6969. #define I2S_RCR2_SYNC_SHIFT (30U)
  6970. #define I2S_RCR2_SYNC(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_SYNC_SHIFT)) & I2S_RCR2_SYNC_MASK)
  6971. /*! @name RCR3 - SAI Receive Configuration 3 Register */
  6972. #define I2S_RCR3_WDFL_MASK (0x1FU)
  6973. #define I2S_RCR3_WDFL_SHIFT (0U)
  6974. #define I2S_RCR3_WDFL(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_WDFL_SHIFT)) & I2S_RCR3_WDFL_MASK)
  6975. #define I2S_RCR3_RCE_MASK (0x30000U)
  6976. #define I2S_RCR3_RCE_SHIFT (16U)
  6977. #define I2S_RCR3_RCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_RCE_SHIFT)) & I2S_RCR3_RCE_MASK)
  6978. #define I2S_RCR3_CFR_MASK (0x3000000U)
  6979. #define I2S_RCR3_CFR_SHIFT (24U)
  6980. #define I2S_RCR3_CFR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_CFR_SHIFT)) & I2S_RCR3_CFR_MASK)
  6981. /*! @name RCR4 - SAI Receive Configuration 4 Register */
  6982. #define I2S_RCR4_FSD_MASK (0x1U)
  6983. #define I2S_RCR4_FSD_SHIFT (0U)
  6984. #define I2S_RCR4_FSD(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSD_SHIFT)) & I2S_RCR4_FSD_MASK)
  6985. #define I2S_RCR4_FSP_MASK (0x2U)
  6986. #define I2S_RCR4_FSP_SHIFT (1U)
  6987. #define I2S_RCR4_FSP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSP_SHIFT)) & I2S_RCR4_FSP_MASK)
  6988. #define I2S_RCR4_ONDEM_MASK (0x4U)
  6989. #define I2S_RCR4_ONDEM_SHIFT (2U)
  6990. #define I2S_RCR4_ONDEM(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_ONDEM_SHIFT)) & I2S_RCR4_ONDEM_MASK)
  6991. #define I2S_RCR4_FSE_MASK (0x8U)
  6992. #define I2S_RCR4_FSE_SHIFT (3U)
  6993. #define I2S_RCR4_FSE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSE_SHIFT)) & I2S_RCR4_FSE_MASK)
  6994. #define I2S_RCR4_MF_MASK (0x10U)
  6995. #define I2S_RCR4_MF_SHIFT (4U)
  6996. #define I2S_RCR4_MF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_MF_SHIFT)) & I2S_RCR4_MF_MASK)
  6997. #define I2S_RCR4_SYWD_MASK (0x1F00U)
  6998. #define I2S_RCR4_SYWD_SHIFT (8U)
  6999. #define I2S_RCR4_SYWD(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_SYWD_SHIFT)) & I2S_RCR4_SYWD_MASK)
  7000. #define I2S_RCR4_FRSZ_MASK (0x1F0000U)
  7001. #define I2S_RCR4_FRSZ_SHIFT (16U)
  7002. #define I2S_RCR4_FRSZ(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FRSZ_SHIFT)) & I2S_RCR4_FRSZ_MASK)
  7003. #define I2S_RCR4_FPACK_MASK (0x3000000U)
  7004. #define I2S_RCR4_FPACK_SHIFT (24U)
  7005. #define I2S_RCR4_FPACK(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FPACK_SHIFT)) & I2S_RCR4_FPACK_MASK)
  7006. #define I2S_RCR4_FCOMB_MASK (0xC000000U)
  7007. #define I2S_RCR4_FCOMB_SHIFT (26U)
  7008. #define I2S_RCR4_FCOMB(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FCOMB_SHIFT)) & I2S_RCR4_FCOMB_MASK)
  7009. #define I2S_RCR4_FCONT_MASK (0x10000000U)
  7010. #define I2S_RCR4_FCONT_SHIFT (28U)
  7011. #define I2S_RCR4_FCONT(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FCONT_SHIFT)) & I2S_RCR4_FCONT_MASK)
  7012. /*! @name RCR5 - SAI Receive Configuration 5 Register */
  7013. #define I2S_RCR5_FBT_MASK (0x1F00U)
  7014. #define I2S_RCR5_FBT_SHIFT (8U)
  7015. #define I2S_RCR5_FBT(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_FBT_SHIFT)) & I2S_RCR5_FBT_MASK)
  7016. #define I2S_RCR5_W0W_MASK (0x1F0000U)
  7017. #define I2S_RCR5_W0W_SHIFT (16U)
  7018. #define I2S_RCR5_W0W(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_W0W_SHIFT)) & I2S_RCR5_W0W_MASK)
  7019. #define I2S_RCR5_WNW_MASK (0x1F000000U)
  7020. #define I2S_RCR5_WNW_SHIFT (24U)
  7021. #define I2S_RCR5_WNW(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_WNW_SHIFT)) & I2S_RCR5_WNW_MASK)
  7022. /*! @name RDR - SAI Receive Data Register */
  7023. #define I2S_RDR_RDR_MASK (0xFFFFFFFFU)
  7024. #define I2S_RDR_RDR_SHIFT (0U)
  7025. #define I2S_RDR_RDR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RDR_RDR_SHIFT)) & I2S_RDR_RDR_MASK)
  7026. /* The count of I2S_RDR */
  7027. #define I2S_RDR_COUNT (2U)
  7028. /*! @name RFR - SAI Receive FIFO Register */
  7029. #define I2S_RFR_RFP_MASK (0xFU)
  7030. #define I2S_RFR_RFP_SHIFT (0U)
  7031. #define I2S_RFR_RFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RFR_RFP_SHIFT)) & I2S_RFR_RFP_MASK)
  7032. #define I2S_RFR_RCP_MASK (0x8000U)
  7033. #define I2S_RFR_RCP_SHIFT (15U)
  7034. #define I2S_RFR_RCP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RFR_RCP_SHIFT)) & I2S_RFR_RCP_MASK)
  7035. #define I2S_RFR_WFP_MASK (0xF0000U)
  7036. #define I2S_RFR_WFP_SHIFT (16U)
  7037. #define I2S_RFR_WFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RFR_WFP_SHIFT)) & I2S_RFR_WFP_MASK)
  7038. /* The count of I2S_RFR */
  7039. #define I2S_RFR_COUNT (2U)
  7040. /*! @name RMR - SAI Receive Mask Register */
  7041. #define I2S_RMR_RWM_MASK (0xFFFFFFFFU)
  7042. #define I2S_RMR_RWM_SHIFT (0U)
  7043. #define I2S_RMR_RWM(x) (((uint32_t)(((uint32_t)(x)) << I2S_RMR_RWM_SHIFT)) & I2S_RMR_RWM_MASK)
  7044. /*! @name MCR - SAI MCLK Control Register */
  7045. #define I2S_MCR_MICS_MASK (0x3000000U)
  7046. #define I2S_MCR_MICS_SHIFT (24U)
  7047. #define I2S_MCR_MICS(x) (((uint32_t)(((uint32_t)(x)) << I2S_MCR_MICS_SHIFT)) & I2S_MCR_MICS_MASK)
  7048. #define I2S_MCR_MOE_MASK (0x40000000U)
  7049. #define I2S_MCR_MOE_SHIFT (30U)
  7050. #define I2S_MCR_MOE(x) (((uint32_t)(((uint32_t)(x)) << I2S_MCR_MOE_SHIFT)) & I2S_MCR_MOE_MASK)
  7051. #define I2S_MCR_DUF_MASK (0x80000000U)
  7052. #define I2S_MCR_DUF_SHIFT (31U)
  7053. #define I2S_MCR_DUF(x) (((uint32_t)(((uint32_t)(x)) << I2S_MCR_DUF_SHIFT)) & I2S_MCR_DUF_MASK)
  7054. /*! @name MDR - SAI MCLK Divide Register */
  7055. #define I2S_MDR_DIVIDE_MASK (0xFFFU)
  7056. #define I2S_MDR_DIVIDE_SHIFT (0U)
  7057. #define I2S_MDR_DIVIDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_MDR_DIVIDE_SHIFT)) & I2S_MDR_DIVIDE_MASK)
  7058. #define I2S_MDR_FRACT_MASK (0xFF000U)
  7059. #define I2S_MDR_FRACT_SHIFT (12U)
  7060. #define I2S_MDR_FRACT(x) (((uint32_t)(((uint32_t)(x)) << I2S_MDR_FRACT_SHIFT)) & I2S_MDR_FRACT_MASK)
  7061. /*!
  7062. * @}
  7063. */ /* end of group I2S_Register_Masks */
  7064. /* I2S - Peripheral instance base addresses */
  7065. /** Peripheral I2S0 base address */
  7066. #define I2S0_BASE (0x4002F000u)
  7067. /** Peripheral I2S0 base pointer */
  7068. #define I2S0 ((I2S_Type *)I2S0_BASE)
  7069. /** Array initializer of I2S peripheral base addresses */
  7070. #define I2S_BASE_ADDRS { I2S0_BASE }
  7071. /** Array initializer of I2S peripheral base pointers */
  7072. #define I2S_BASE_PTRS { I2S0 }
  7073. /** Interrupt vectors for the I2S peripheral type */
  7074. #define I2S_RX_IRQS { I2S0_Rx_IRQn }
  7075. #define I2S_TX_IRQS { I2S0_Tx_IRQn }
  7076. /*!
  7077. * @}
  7078. */ /* end of group I2S_Peripheral_Access_Layer */
  7079. /* ----------------------------------------------------------------------------
  7080. -- LLWU Peripheral Access Layer
  7081. ---------------------------------------------------------------------------- */
  7082. /*!
  7083. * @addtogroup LLWU_Peripheral_Access_Layer LLWU Peripheral Access Layer
  7084. * @{
  7085. */
  7086. /** LLWU - Register Layout Typedef */
  7087. typedef struct {
  7088. __IO uint8_t PE1; /**< LLWU Pin Enable 1 register, offset: 0x0 */
  7089. __IO uint8_t PE2; /**< LLWU Pin Enable 2 register, offset: 0x1 */
  7090. __IO uint8_t PE3; /**< LLWU Pin Enable 3 register, offset: 0x2 */
  7091. __IO uint8_t PE4; /**< LLWU Pin Enable 4 register, offset: 0x3 */
  7092. __IO uint8_t PE5; /**< LLWU Pin Enable 5 register, offset: 0x4 */
  7093. __IO uint8_t PE6; /**< LLWU Pin Enable 6 register, offset: 0x5 */
  7094. __IO uint8_t PE7; /**< LLWU Pin Enable 7 register, offset: 0x6 */
  7095. __IO uint8_t PE8; /**< LLWU Pin Enable 8 register, offset: 0x7 */
  7096. __IO uint8_t ME; /**< LLWU Module Enable register, offset: 0x8 */
  7097. __IO uint8_t PF1; /**< LLWU Pin Flag 1 register, offset: 0x9 */
  7098. __IO uint8_t PF2; /**< LLWU Pin Flag 2 register, offset: 0xA */
  7099. __IO uint8_t PF3; /**< LLWU Pin Flag 3 register, offset: 0xB */
  7100. __IO uint8_t PF4; /**< LLWU Pin Flag 4 register, offset: 0xC */
  7101. __I uint8_t MF5; /**< LLWU Module Flag 5 register, offset: 0xD */
  7102. __IO uint8_t FILT1; /**< LLWU Pin Filter 1 register, offset: 0xE */
  7103. __IO uint8_t FILT2; /**< LLWU Pin Filter 2 register, offset: 0xF */
  7104. __IO uint8_t FILT3; /**< LLWU Pin Filter 3 register, offset: 0x10 */
  7105. __IO uint8_t FILT4; /**< LLWU Pin Filter 4 register, offset: 0x11 */
  7106. } LLWU_Type;
  7107. /* ----------------------------------------------------------------------------
  7108. -- LLWU Register Masks
  7109. ---------------------------------------------------------------------------- */
  7110. /*!
  7111. * @addtogroup LLWU_Register_Masks LLWU Register Masks
  7112. * @{
  7113. */
  7114. /*! @name PE1 - LLWU Pin Enable 1 register */
  7115. #define LLWU_PE1_WUPE0_MASK (0x3U)
  7116. #define LLWU_PE1_WUPE0_SHIFT (0U)
  7117. #define LLWU_PE1_WUPE0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE0_SHIFT)) & LLWU_PE1_WUPE0_MASK)
  7118. #define LLWU_PE1_WUPE1_MASK (0xCU)
  7119. #define LLWU_PE1_WUPE1_SHIFT (2U)
  7120. #define LLWU_PE1_WUPE1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE1_SHIFT)) & LLWU_PE1_WUPE1_MASK)
  7121. #define LLWU_PE1_WUPE2_MASK (0x30U)
  7122. #define LLWU_PE1_WUPE2_SHIFT (4U)
  7123. #define LLWU_PE1_WUPE2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE2_SHIFT)) & LLWU_PE1_WUPE2_MASK)
  7124. #define LLWU_PE1_WUPE3_MASK (0xC0U)
  7125. #define LLWU_PE1_WUPE3_SHIFT (6U)
  7126. #define LLWU_PE1_WUPE3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE3_SHIFT)) & LLWU_PE1_WUPE3_MASK)
  7127. /*! @name PE2 - LLWU Pin Enable 2 register */
  7128. #define LLWU_PE2_WUPE4_MASK (0x3U)
  7129. #define LLWU_PE2_WUPE4_SHIFT (0U)
  7130. #define LLWU_PE2_WUPE4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE4_SHIFT)) & LLWU_PE2_WUPE4_MASK)
  7131. #define LLWU_PE2_WUPE5_MASK (0xCU)
  7132. #define LLWU_PE2_WUPE5_SHIFT (2U)
  7133. #define LLWU_PE2_WUPE5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE5_SHIFT)) & LLWU_PE2_WUPE5_MASK)
  7134. #define LLWU_PE2_WUPE6_MASK (0x30U)
  7135. #define LLWU_PE2_WUPE6_SHIFT (4U)
  7136. #define LLWU_PE2_WUPE6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE6_SHIFT)) & LLWU_PE2_WUPE6_MASK)
  7137. #define LLWU_PE2_WUPE7_MASK (0xC0U)
  7138. #define LLWU_PE2_WUPE7_SHIFT (6U)
  7139. #define LLWU_PE2_WUPE7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE7_SHIFT)) & LLWU_PE2_WUPE7_MASK)
  7140. /*! @name PE3 - LLWU Pin Enable 3 register */
  7141. #define LLWU_PE3_WUPE8_MASK (0x3U)
  7142. #define LLWU_PE3_WUPE8_SHIFT (0U)
  7143. #define LLWU_PE3_WUPE8(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE8_SHIFT)) & LLWU_PE3_WUPE8_MASK)
  7144. #define LLWU_PE3_WUPE9_MASK (0xCU)
  7145. #define LLWU_PE3_WUPE9_SHIFT (2U)
  7146. #define LLWU_PE3_WUPE9(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE9_SHIFT)) & LLWU_PE3_WUPE9_MASK)
  7147. #define LLWU_PE3_WUPE10_MASK (0x30U)
  7148. #define LLWU_PE3_WUPE10_SHIFT (4U)
  7149. #define LLWU_PE3_WUPE10(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE10_SHIFT)) & LLWU_PE3_WUPE10_MASK)
  7150. #define LLWU_PE3_WUPE11_MASK (0xC0U)
  7151. #define LLWU_PE3_WUPE11_SHIFT (6U)
  7152. #define LLWU_PE3_WUPE11(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE11_SHIFT)) & LLWU_PE3_WUPE11_MASK)
  7153. /*! @name PE4 - LLWU Pin Enable 4 register */
  7154. #define LLWU_PE4_WUPE12_MASK (0x3U)
  7155. #define LLWU_PE4_WUPE12_SHIFT (0U)
  7156. #define LLWU_PE4_WUPE12(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE12_SHIFT)) & LLWU_PE4_WUPE12_MASK)
  7157. #define LLWU_PE4_WUPE13_MASK (0xCU)
  7158. #define LLWU_PE4_WUPE13_SHIFT (2U)
  7159. #define LLWU_PE4_WUPE13(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE13_SHIFT)) & LLWU_PE4_WUPE13_MASK)
  7160. #define LLWU_PE4_WUPE14_MASK (0x30U)
  7161. #define LLWU_PE4_WUPE14_SHIFT (4U)
  7162. #define LLWU_PE4_WUPE14(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE14_SHIFT)) & LLWU_PE4_WUPE14_MASK)
  7163. #define LLWU_PE4_WUPE15_MASK (0xC0U)
  7164. #define LLWU_PE4_WUPE15_SHIFT (6U)
  7165. #define LLWU_PE4_WUPE15(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE15_SHIFT)) & LLWU_PE4_WUPE15_MASK)
  7166. /*! @name PE5 - LLWU Pin Enable 5 register */
  7167. #define LLWU_PE5_WUPE16_MASK (0x3U)
  7168. #define LLWU_PE5_WUPE16_SHIFT (0U)
  7169. #define LLWU_PE5_WUPE16(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE5_WUPE16_SHIFT)) & LLWU_PE5_WUPE16_MASK)
  7170. #define LLWU_PE5_WUPE17_MASK (0xCU)
  7171. #define LLWU_PE5_WUPE17_SHIFT (2U)
  7172. #define LLWU_PE5_WUPE17(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE5_WUPE17_SHIFT)) & LLWU_PE5_WUPE17_MASK)
  7173. #define LLWU_PE5_WUPE18_MASK (0x30U)
  7174. #define LLWU_PE5_WUPE18_SHIFT (4U)
  7175. #define LLWU_PE5_WUPE18(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE5_WUPE18_SHIFT)) & LLWU_PE5_WUPE18_MASK)
  7176. #define LLWU_PE5_WUPE19_MASK (0xC0U)
  7177. #define LLWU_PE5_WUPE19_SHIFT (6U)
  7178. #define LLWU_PE5_WUPE19(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE5_WUPE19_SHIFT)) & LLWU_PE5_WUPE19_MASK)
  7179. /*! @name PE6 - LLWU Pin Enable 6 register */
  7180. #define LLWU_PE6_WUPE20_MASK (0x3U)
  7181. #define LLWU_PE6_WUPE20_SHIFT (0U)
  7182. #define LLWU_PE6_WUPE20(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE6_WUPE20_SHIFT)) & LLWU_PE6_WUPE20_MASK)
  7183. #define LLWU_PE6_WUPE21_MASK (0xCU)
  7184. #define LLWU_PE6_WUPE21_SHIFT (2U)
  7185. #define LLWU_PE6_WUPE21(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE6_WUPE21_SHIFT)) & LLWU_PE6_WUPE21_MASK)
  7186. #define LLWU_PE6_WUPE22_MASK (0x30U)
  7187. #define LLWU_PE6_WUPE22_SHIFT (4U)
  7188. #define LLWU_PE6_WUPE22(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE6_WUPE22_SHIFT)) & LLWU_PE6_WUPE22_MASK)
  7189. #define LLWU_PE6_WUPE23_MASK (0xC0U)
  7190. #define LLWU_PE6_WUPE23_SHIFT (6U)
  7191. #define LLWU_PE6_WUPE23(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE6_WUPE23_SHIFT)) & LLWU_PE6_WUPE23_MASK)
  7192. /*! @name PE7 - LLWU Pin Enable 7 register */
  7193. #define LLWU_PE7_WUPE24_MASK (0x3U)
  7194. #define LLWU_PE7_WUPE24_SHIFT (0U)
  7195. #define LLWU_PE7_WUPE24(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE7_WUPE24_SHIFT)) & LLWU_PE7_WUPE24_MASK)
  7196. #define LLWU_PE7_WUPE25_MASK (0xCU)
  7197. #define LLWU_PE7_WUPE25_SHIFT (2U)
  7198. #define LLWU_PE7_WUPE25(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE7_WUPE25_SHIFT)) & LLWU_PE7_WUPE25_MASK)
  7199. #define LLWU_PE7_WUPE26_MASK (0x30U)
  7200. #define LLWU_PE7_WUPE26_SHIFT (4U)
  7201. #define LLWU_PE7_WUPE26(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE7_WUPE26_SHIFT)) & LLWU_PE7_WUPE26_MASK)
  7202. #define LLWU_PE7_WUPE27_MASK (0xC0U)
  7203. #define LLWU_PE7_WUPE27_SHIFT (6U)
  7204. #define LLWU_PE7_WUPE27(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE7_WUPE27_SHIFT)) & LLWU_PE7_WUPE27_MASK)
  7205. /*! @name PE8 - LLWU Pin Enable 8 register */
  7206. #define LLWU_PE8_WUPE28_MASK (0x3U)
  7207. #define LLWU_PE8_WUPE28_SHIFT (0U)
  7208. #define LLWU_PE8_WUPE28(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE8_WUPE28_SHIFT)) & LLWU_PE8_WUPE28_MASK)
  7209. #define LLWU_PE8_WUPE29_MASK (0xCU)
  7210. #define LLWU_PE8_WUPE29_SHIFT (2U)
  7211. #define LLWU_PE8_WUPE29(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE8_WUPE29_SHIFT)) & LLWU_PE8_WUPE29_MASK)
  7212. #define LLWU_PE8_WUPE30_MASK (0x30U)
  7213. #define LLWU_PE8_WUPE30_SHIFT (4U)
  7214. #define LLWU_PE8_WUPE30(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE8_WUPE30_SHIFT)) & LLWU_PE8_WUPE30_MASK)
  7215. #define LLWU_PE8_WUPE31_MASK (0xC0U)
  7216. #define LLWU_PE8_WUPE31_SHIFT (6U)
  7217. #define LLWU_PE8_WUPE31(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE8_WUPE31_SHIFT)) & LLWU_PE8_WUPE31_MASK)
  7218. /*! @name ME - LLWU Module Enable register */
  7219. #define LLWU_ME_WUME0_MASK (0x1U)
  7220. #define LLWU_ME_WUME0_SHIFT (0U)
  7221. #define LLWU_ME_WUME0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME0_SHIFT)) & LLWU_ME_WUME0_MASK)
  7222. #define LLWU_ME_WUME1_MASK (0x2U)
  7223. #define LLWU_ME_WUME1_SHIFT (1U)
  7224. #define LLWU_ME_WUME1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME1_SHIFT)) & LLWU_ME_WUME1_MASK)
  7225. #define LLWU_ME_WUME2_MASK (0x4U)
  7226. #define LLWU_ME_WUME2_SHIFT (2U)
  7227. #define LLWU_ME_WUME2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME2_SHIFT)) & LLWU_ME_WUME2_MASK)
  7228. #define LLWU_ME_WUME3_MASK (0x8U)
  7229. #define LLWU_ME_WUME3_SHIFT (3U)
  7230. #define LLWU_ME_WUME3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME3_SHIFT)) & LLWU_ME_WUME3_MASK)
  7231. #define LLWU_ME_WUME4_MASK (0x10U)
  7232. #define LLWU_ME_WUME4_SHIFT (4U)
  7233. #define LLWU_ME_WUME4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME4_SHIFT)) & LLWU_ME_WUME4_MASK)
  7234. #define LLWU_ME_WUME5_MASK (0x20U)
  7235. #define LLWU_ME_WUME5_SHIFT (5U)
  7236. #define LLWU_ME_WUME5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME5_SHIFT)) & LLWU_ME_WUME5_MASK)
  7237. #define LLWU_ME_WUME6_MASK (0x40U)
  7238. #define LLWU_ME_WUME6_SHIFT (6U)
  7239. #define LLWU_ME_WUME6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME6_SHIFT)) & LLWU_ME_WUME6_MASK)
  7240. #define LLWU_ME_WUME7_MASK (0x80U)
  7241. #define LLWU_ME_WUME7_SHIFT (7U)
  7242. #define LLWU_ME_WUME7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME7_SHIFT)) & LLWU_ME_WUME7_MASK)
  7243. /*! @name PF1 - LLWU Pin Flag 1 register */
  7244. #define LLWU_PF1_WUF0_MASK (0x1U)
  7245. #define LLWU_PF1_WUF0_SHIFT (0U)
  7246. #define LLWU_PF1_WUF0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF0_SHIFT)) & LLWU_PF1_WUF0_MASK)
  7247. #define LLWU_PF1_WUF1_MASK (0x2U)
  7248. #define LLWU_PF1_WUF1_SHIFT (1U)
  7249. #define LLWU_PF1_WUF1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF1_SHIFT)) & LLWU_PF1_WUF1_MASK)
  7250. #define LLWU_PF1_WUF2_MASK (0x4U)
  7251. #define LLWU_PF1_WUF2_SHIFT (2U)
  7252. #define LLWU_PF1_WUF2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF2_SHIFT)) & LLWU_PF1_WUF2_MASK)
  7253. #define LLWU_PF1_WUF3_MASK (0x8U)
  7254. #define LLWU_PF1_WUF3_SHIFT (3U)
  7255. #define LLWU_PF1_WUF3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF3_SHIFT)) & LLWU_PF1_WUF3_MASK)
  7256. #define LLWU_PF1_WUF4_MASK (0x10U)
  7257. #define LLWU_PF1_WUF4_SHIFT (4U)
  7258. #define LLWU_PF1_WUF4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF4_SHIFT)) & LLWU_PF1_WUF4_MASK)
  7259. #define LLWU_PF1_WUF5_MASK (0x20U)
  7260. #define LLWU_PF1_WUF5_SHIFT (5U)
  7261. #define LLWU_PF1_WUF5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF5_SHIFT)) & LLWU_PF1_WUF5_MASK)
  7262. #define LLWU_PF1_WUF6_MASK (0x40U)
  7263. #define LLWU_PF1_WUF6_SHIFT (6U)
  7264. #define LLWU_PF1_WUF6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF6_SHIFT)) & LLWU_PF1_WUF6_MASK)
  7265. #define LLWU_PF1_WUF7_MASK (0x80U)
  7266. #define LLWU_PF1_WUF7_SHIFT (7U)
  7267. #define LLWU_PF1_WUF7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF1_WUF7_SHIFT)) & LLWU_PF1_WUF7_MASK)
  7268. /*! @name PF2 - LLWU Pin Flag 2 register */
  7269. #define LLWU_PF2_WUF8_MASK (0x1U)
  7270. #define LLWU_PF2_WUF8_SHIFT (0U)
  7271. #define LLWU_PF2_WUF8(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF8_SHIFT)) & LLWU_PF2_WUF8_MASK)
  7272. #define LLWU_PF2_WUF9_MASK (0x2U)
  7273. #define LLWU_PF2_WUF9_SHIFT (1U)
  7274. #define LLWU_PF2_WUF9(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF9_SHIFT)) & LLWU_PF2_WUF9_MASK)
  7275. #define LLWU_PF2_WUF10_MASK (0x4U)
  7276. #define LLWU_PF2_WUF10_SHIFT (2U)
  7277. #define LLWU_PF2_WUF10(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF10_SHIFT)) & LLWU_PF2_WUF10_MASK)
  7278. #define LLWU_PF2_WUF11_MASK (0x8U)
  7279. #define LLWU_PF2_WUF11_SHIFT (3U)
  7280. #define LLWU_PF2_WUF11(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF11_SHIFT)) & LLWU_PF2_WUF11_MASK)
  7281. #define LLWU_PF2_WUF12_MASK (0x10U)
  7282. #define LLWU_PF2_WUF12_SHIFT (4U)
  7283. #define LLWU_PF2_WUF12(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF12_SHIFT)) & LLWU_PF2_WUF12_MASK)
  7284. #define LLWU_PF2_WUF13_MASK (0x20U)
  7285. #define LLWU_PF2_WUF13_SHIFT (5U)
  7286. #define LLWU_PF2_WUF13(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF13_SHIFT)) & LLWU_PF2_WUF13_MASK)
  7287. #define LLWU_PF2_WUF14_MASK (0x40U)
  7288. #define LLWU_PF2_WUF14_SHIFT (6U)
  7289. #define LLWU_PF2_WUF14(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF14_SHIFT)) & LLWU_PF2_WUF14_MASK)
  7290. #define LLWU_PF2_WUF15_MASK (0x80U)
  7291. #define LLWU_PF2_WUF15_SHIFT (7U)
  7292. #define LLWU_PF2_WUF15(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF2_WUF15_SHIFT)) & LLWU_PF2_WUF15_MASK)
  7293. /*! @name PF3 - LLWU Pin Flag 3 register */
  7294. #define LLWU_PF3_WUF16_MASK (0x1U)
  7295. #define LLWU_PF3_WUF16_SHIFT (0U)
  7296. #define LLWU_PF3_WUF16(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF16_SHIFT)) & LLWU_PF3_WUF16_MASK)
  7297. #define LLWU_PF3_WUF17_MASK (0x2U)
  7298. #define LLWU_PF3_WUF17_SHIFT (1U)
  7299. #define LLWU_PF3_WUF17(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF17_SHIFT)) & LLWU_PF3_WUF17_MASK)
  7300. #define LLWU_PF3_WUF18_MASK (0x4U)
  7301. #define LLWU_PF3_WUF18_SHIFT (2U)
  7302. #define LLWU_PF3_WUF18(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF18_SHIFT)) & LLWU_PF3_WUF18_MASK)
  7303. #define LLWU_PF3_WUF19_MASK (0x8U)
  7304. #define LLWU_PF3_WUF19_SHIFT (3U)
  7305. #define LLWU_PF3_WUF19(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF19_SHIFT)) & LLWU_PF3_WUF19_MASK)
  7306. #define LLWU_PF3_WUF20_MASK (0x10U)
  7307. #define LLWU_PF3_WUF20_SHIFT (4U)
  7308. #define LLWU_PF3_WUF20(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF20_SHIFT)) & LLWU_PF3_WUF20_MASK)
  7309. #define LLWU_PF3_WUF21_MASK (0x20U)
  7310. #define LLWU_PF3_WUF21_SHIFT (5U)
  7311. #define LLWU_PF3_WUF21(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF21_SHIFT)) & LLWU_PF3_WUF21_MASK)
  7312. #define LLWU_PF3_WUF22_MASK (0x40U)
  7313. #define LLWU_PF3_WUF22_SHIFT (6U)
  7314. #define LLWU_PF3_WUF22(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF22_SHIFT)) & LLWU_PF3_WUF22_MASK)
  7315. #define LLWU_PF3_WUF23_MASK (0x80U)
  7316. #define LLWU_PF3_WUF23_SHIFT (7U)
  7317. #define LLWU_PF3_WUF23(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF3_WUF23_SHIFT)) & LLWU_PF3_WUF23_MASK)
  7318. /*! @name PF4 - LLWU Pin Flag 4 register */
  7319. #define LLWU_PF4_WUF24_MASK (0x1U)
  7320. #define LLWU_PF4_WUF24_SHIFT (0U)
  7321. #define LLWU_PF4_WUF24(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF24_SHIFT)) & LLWU_PF4_WUF24_MASK)
  7322. #define LLWU_PF4_WUF25_MASK (0x2U)
  7323. #define LLWU_PF4_WUF25_SHIFT (1U)
  7324. #define LLWU_PF4_WUF25(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF25_SHIFT)) & LLWU_PF4_WUF25_MASK)
  7325. #define LLWU_PF4_WUF26_MASK (0x4U)
  7326. #define LLWU_PF4_WUF26_SHIFT (2U)
  7327. #define LLWU_PF4_WUF26(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF26_SHIFT)) & LLWU_PF4_WUF26_MASK)
  7328. #define LLWU_PF4_WUF27_MASK (0x8U)
  7329. #define LLWU_PF4_WUF27_SHIFT (3U)
  7330. #define LLWU_PF4_WUF27(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF27_SHIFT)) & LLWU_PF4_WUF27_MASK)
  7331. #define LLWU_PF4_WUF28_MASK (0x10U)
  7332. #define LLWU_PF4_WUF28_SHIFT (4U)
  7333. #define LLWU_PF4_WUF28(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF28_SHIFT)) & LLWU_PF4_WUF28_MASK)
  7334. #define LLWU_PF4_WUF29_MASK (0x20U)
  7335. #define LLWU_PF4_WUF29_SHIFT (5U)
  7336. #define LLWU_PF4_WUF29(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF29_SHIFT)) & LLWU_PF4_WUF29_MASK)
  7337. #define LLWU_PF4_WUF30_MASK (0x40U)
  7338. #define LLWU_PF4_WUF30_SHIFT (6U)
  7339. #define LLWU_PF4_WUF30(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF30_SHIFT)) & LLWU_PF4_WUF30_MASK)
  7340. #define LLWU_PF4_WUF31_MASK (0x80U)
  7341. #define LLWU_PF4_WUF31_SHIFT (7U)
  7342. #define LLWU_PF4_WUF31(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PF4_WUF31_SHIFT)) & LLWU_PF4_WUF31_MASK)
  7343. /*! @name MF5 - LLWU Module Flag 5 register */
  7344. #define LLWU_MF5_MWUF0_MASK (0x1U)
  7345. #define LLWU_MF5_MWUF0_SHIFT (0U)
  7346. #define LLWU_MF5_MWUF0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF0_SHIFT)) & LLWU_MF5_MWUF0_MASK)
  7347. #define LLWU_MF5_MWUF1_MASK (0x2U)
  7348. #define LLWU_MF5_MWUF1_SHIFT (1U)
  7349. #define LLWU_MF5_MWUF1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF1_SHIFT)) & LLWU_MF5_MWUF1_MASK)
  7350. #define LLWU_MF5_MWUF2_MASK (0x4U)
  7351. #define LLWU_MF5_MWUF2_SHIFT (2U)
  7352. #define LLWU_MF5_MWUF2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF2_SHIFT)) & LLWU_MF5_MWUF2_MASK)
  7353. #define LLWU_MF5_MWUF3_MASK (0x8U)
  7354. #define LLWU_MF5_MWUF3_SHIFT (3U)
  7355. #define LLWU_MF5_MWUF3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF3_SHIFT)) & LLWU_MF5_MWUF3_MASK)
  7356. #define LLWU_MF5_MWUF4_MASK (0x10U)
  7357. #define LLWU_MF5_MWUF4_SHIFT (4U)
  7358. #define LLWU_MF5_MWUF4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF4_SHIFT)) & LLWU_MF5_MWUF4_MASK)
  7359. #define LLWU_MF5_MWUF5_MASK (0x20U)
  7360. #define LLWU_MF5_MWUF5_SHIFT (5U)
  7361. #define LLWU_MF5_MWUF5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF5_SHIFT)) & LLWU_MF5_MWUF5_MASK)
  7362. #define LLWU_MF5_MWUF6_MASK (0x40U)
  7363. #define LLWU_MF5_MWUF6_SHIFT (6U)
  7364. #define LLWU_MF5_MWUF6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF6_SHIFT)) & LLWU_MF5_MWUF6_MASK)
  7365. #define LLWU_MF5_MWUF7_MASK (0x80U)
  7366. #define LLWU_MF5_MWUF7_SHIFT (7U)
  7367. #define LLWU_MF5_MWUF7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_MF5_MWUF7_SHIFT)) & LLWU_MF5_MWUF7_MASK)
  7368. /*! @name FILT1 - LLWU Pin Filter 1 register */
  7369. #define LLWU_FILT1_FILTSEL_MASK (0x1FU)
  7370. #define LLWU_FILT1_FILTSEL_SHIFT (0U)
  7371. #define LLWU_FILT1_FILTSEL(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT1_FILTSEL_SHIFT)) & LLWU_FILT1_FILTSEL_MASK)
  7372. #define LLWU_FILT1_FILTE_MASK (0x60U)
  7373. #define LLWU_FILT1_FILTE_SHIFT (5U)
  7374. #define LLWU_FILT1_FILTE(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT1_FILTE_SHIFT)) & LLWU_FILT1_FILTE_MASK)
  7375. #define LLWU_FILT1_FILTF_MASK (0x80U)
  7376. #define LLWU_FILT1_FILTF_SHIFT (7U)
  7377. #define LLWU_FILT1_FILTF(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT1_FILTF_SHIFT)) & LLWU_FILT1_FILTF_MASK)
  7378. /*! @name FILT2 - LLWU Pin Filter 2 register */
  7379. #define LLWU_FILT2_FILTSEL_MASK (0x1FU)
  7380. #define LLWU_FILT2_FILTSEL_SHIFT (0U)
  7381. #define LLWU_FILT2_FILTSEL(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT2_FILTSEL_SHIFT)) & LLWU_FILT2_FILTSEL_MASK)
  7382. #define LLWU_FILT2_FILTE_MASK (0x60U)
  7383. #define LLWU_FILT2_FILTE_SHIFT (5U)
  7384. #define LLWU_FILT2_FILTE(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT2_FILTE_SHIFT)) & LLWU_FILT2_FILTE_MASK)
  7385. #define LLWU_FILT2_FILTF_MASK (0x80U)
  7386. #define LLWU_FILT2_FILTF_SHIFT (7U)
  7387. #define LLWU_FILT2_FILTF(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT2_FILTF_SHIFT)) & LLWU_FILT2_FILTF_MASK)
  7388. /*! @name FILT3 - LLWU Pin Filter 3 register */
  7389. #define LLWU_FILT3_FILTSEL_MASK (0x1FU)
  7390. #define LLWU_FILT3_FILTSEL_SHIFT (0U)
  7391. #define LLWU_FILT3_FILTSEL(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT3_FILTSEL_SHIFT)) & LLWU_FILT3_FILTSEL_MASK)
  7392. #define LLWU_FILT3_FILTE_MASK (0x60U)
  7393. #define LLWU_FILT3_FILTE_SHIFT (5U)
  7394. #define LLWU_FILT3_FILTE(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT3_FILTE_SHIFT)) & LLWU_FILT3_FILTE_MASK)
  7395. #define LLWU_FILT3_FILTF_MASK (0x80U)
  7396. #define LLWU_FILT3_FILTF_SHIFT (7U)
  7397. #define LLWU_FILT3_FILTF(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT3_FILTF_SHIFT)) & LLWU_FILT3_FILTF_MASK)
  7398. /*! @name FILT4 - LLWU Pin Filter 4 register */
  7399. #define LLWU_FILT4_FILTSEL_MASK (0x1FU)
  7400. #define LLWU_FILT4_FILTSEL_SHIFT (0U)
  7401. #define LLWU_FILT4_FILTSEL(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT4_FILTSEL_SHIFT)) & LLWU_FILT4_FILTSEL_MASK)
  7402. #define LLWU_FILT4_FILTE_MASK (0x60U)
  7403. #define LLWU_FILT4_FILTE_SHIFT (5U)
  7404. #define LLWU_FILT4_FILTE(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT4_FILTE_SHIFT)) & LLWU_FILT4_FILTE_MASK)
  7405. #define LLWU_FILT4_FILTF_MASK (0x80U)
  7406. #define LLWU_FILT4_FILTF_SHIFT (7U)
  7407. #define LLWU_FILT4_FILTF(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT4_FILTF_SHIFT)) & LLWU_FILT4_FILTF_MASK)
  7408. /*!
  7409. * @}
  7410. */ /* end of group LLWU_Register_Masks */
  7411. /* LLWU - Peripheral instance base addresses */
  7412. /** Peripheral LLWU base address */
  7413. #define LLWU_BASE (0x4007C000u)
  7414. /** Peripheral LLWU base pointer */
  7415. #define LLWU ((LLWU_Type *)LLWU_BASE)
  7416. /** Array initializer of LLWU peripheral base addresses */
  7417. #define LLWU_BASE_ADDRS { LLWU_BASE }
  7418. /** Array initializer of LLWU peripheral base pointers */
  7419. #define LLWU_BASE_PTRS { LLWU }
  7420. /** Interrupt vectors for the LLWU peripheral type */
  7421. #define LLWU_IRQS { LLWU_IRQn }
  7422. /*!
  7423. * @}
  7424. */ /* end of group LLWU_Peripheral_Access_Layer */
  7425. /* ----------------------------------------------------------------------------
  7426. -- LMEM Peripheral Access Layer
  7427. ---------------------------------------------------------------------------- */
  7428. /*!
  7429. * @addtogroup LMEM_Peripheral_Access_Layer LMEM Peripheral Access Layer
  7430. * @{
  7431. */
  7432. /** LMEM - Register Layout Typedef */
  7433. typedef struct {
  7434. __IO uint32_t PCCCR; /**< Cache control register, offset: 0x0 */
  7435. __IO uint32_t PCCLCR; /**< Cache line control register, offset: 0x4 */
  7436. __IO uint32_t PCCSAR; /**< Cache search address register, offset: 0x8 */
  7437. __IO uint32_t PCCCVR; /**< Cache read/write value register, offset: 0xC */
  7438. uint8_t RESERVED_0[16];
  7439. __IO uint32_t PCCRMR; /**< Cache regions mode register, offset: 0x20 */
  7440. uint8_t RESERVED_1[2012];
  7441. __IO uint32_t PSCCR; /**< Cache control register, offset: 0x800 */
  7442. __IO uint32_t PSCLCR; /**< Cache line control register, offset: 0x804 */
  7443. __IO uint32_t PSCSAR; /**< Cache search address register, offset: 0x808 */
  7444. __IO uint32_t PSCCVR; /**< Cache read/write value register, offset: 0x80C */
  7445. uint8_t RESERVED_2[16];
  7446. __IO uint32_t PSCRMR; /**< Cache regions mode register, offset: 0x820 */
  7447. } LMEM_Type;
  7448. /* ----------------------------------------------------------------------------
  7449. -- LMEM Register Masks
  7450. ---------------------------------------------------------------------------- */
  7451. /*!
  7452. * @addtogroup LMEM_Register_Masks LMEM Register Masks
  7453. * @{
  7454. */
  7455. /*! @name PCCCR - Cache control register */
  7456. #define LMEM_PCCCR_ENCACHE_MASK (0x1U)
  7457. #define LMEM_PCCCR_ENCACHE_SHIFT (0U)
  7458. #define LMEM_PCCCR_ENCACHE(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCCR_ENCACHE_SHIFT)) & LMEM_PCCCR_ENCACHE_MASK)
  7459. #define LMEM_PCCCR_ENWRBUF_MASK (0x2U)
  7460. #define LMEM_PCCCR_ENWRBUF_SHIFT (1U)
  7461. #define LMEM_PCCCR_ENWRBUF(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCCR_ENWRBUF_SHIFT)) & LMEM_PCCCR_ENWRBUF_MASK)
  7462. #define LMEM_PCCCR_PCCR2_MASK (0x4U)
  7463. #define LMEM_PCCCR_PCCR2_SHIFT (2U)
  7464. #define LMEM_PCCCR_PCCR2(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCCR_PCCR2_SHIFT)) & LMEM_PCCCR_PCCR2_MASK)
  7465. #define LMEM_PCCCR_PCCR3_MASK (0x8U)
  7466. #define LMEM_PCCCR_PCCR3_SHIFT (3U)
  7467. #define LMEM_PCCCR_PCCR3(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCCR_PCCR3_SHIFT)) & LMEM_PCCCR_PCCR3_MASK)
  7468. #define LMEM_PCCCR_INVW0_MASK (0x1000000U)
  7469. #define LMEM_PCCCR_INVW0_SHIFT (24U)
  7470. #define LMEM_PCCCR_INVW0(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCCR_INVW0_SHIFT)) & LMEM_PCCCR_INVW0_MASK)
  7471. #define LMEM_PCCCR_PUSHW0_MASK (0x2000000U)
  7472. #define LMEM_PCCCR_PUSHW0_SHIFT (25U)
  7473. #define LMEM_PCCCR_PUSHW0(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCCR_PUSHW0_SHIFT)) & LMEM_PCCCR_PUSHW0_MASK)
  7474. #define LMEM_PCCCR_INVW1_MASK (0x4000000U)
  7475. #define LMEM_PCCCR_INVW1_SHIFT (26U)
  7476. #define LMEM_PCCCR_INVW1(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCCR_INVW1_SHIFT)) & LMEM_PCCCR_INVW1_MASK)
  7477. #define LMEM_PCCCR_PUSHW1_MASK (0x8000000U)
  7478. #define LMEM_PCCCR_PUSHW1_SHIFT (27U)
  7479. #define LMEM_PCCCR_PUSHW1(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCCR_PUSHW1_SHIFT)) & LMEM_PCCCR_PUSHW1_MASK)
  7480. #define LMEM_PCCCR_GO_MASK (0x80000000U)
  7481. #define LMEM_PCCCR_GO_SHIFT (31U)
  7482. #define LMEM_PCCCR_GO(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCCR_GO_SHIFT)) & LMEM_PCCCR_GO_MASK)
  7483. /*! @name PCCLCR - Cache line control register */
  7484. #define LMEM_PCCLCR_LGO_MASK (0x1U)
  7485. #define LMEM_PCCLCR_LGO_SHIFT (0U)
  7486. #define LMEM_PCCLCR_LGO(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCLCR_LGO_SHIFT)) & LMEM_PCCLCR_LGO_MASK)
  7487. #define LMEM_PCCLCR_CACHEADDR_MASK (0xFFCU)
  7488. #define LMEM_PCCLCR_CACHEADDR_SHIFT (2U)
  7489. #define LMEM_PCCLCR_CACHEADDR(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCLCR_CACHEADDR_SHIFT)) & LMEM_PCCLCR_CACHEADDR_MASK)
  7490. #define LMEM_PCCLCR_WSEL_MASK (0x4000U)
  7491. #define LMEM_PCCLCR_WSEL_SHIFT (14U)
  7492. #define LMEM_PCCLCR_WSEL(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCLCR_WSEL_SHIFT)) & LMEM_PCCLCR_WSEL_MASK)
  7493. #define LMEM_PCCLCR_TDSEL_MASK (0x10000U)
  7494. #define LMEM_PCCLCR_TDSEL_SHIFT (16U)
  7495. #define LMEM_PCCLCR_TDSEL(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCLCR_TDSEL_SHIFT)) & LMEM_PCCLCR_TDSEL_MASK)
  7496. #define LMEM_PCCLCR_LCIVB_MASK (0x100000U)
  7497. #define LMEM_PCCLCR_LCIVB_SHIFT (20U)
  7498. #define LMEM_PCCLCR_LCIVB(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCLCR_LCIVB_SHIFT)) & LMEM_PCCLCR_LCIVB_MASK)
  7499. #define LMEM_PCCLCR_LCIMB_MASK (0x200000U)
  7500. #define LMEM_PCCLCR_LCIMB_SHIFT (21U)
  7501. #define LMEM_PCCLCR_LCIMB(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCLCR_LCIMB_SHIFT)) & LMEM_PCCLCR_LCIMB_MASK)
  7502. #define LMEM_PCCLCR_LCWAY_MASK (0x400000U)
  7503. #define LMEM_PCCLCR_LCWAY_SHIFT (22U)
  7504. #define LMEM_PCCLCR_LCWAY(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCLCR_LCWAY_SHIFT)) & LMEM_PCCLCR_LCWAY_MASK)
  7505. #define LMEM_PCCLCR_LCMD_MASK (0x3000000U)
  7506. #define LMEM_PCCLCR_LCMD_SHIFT (24U)
  7507. #define LMEM_PCCLCR_LCMD(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCLCR_LCMD_SHIFT)) & LMEM_PCCLCR_LCMD_MASK)
  7508. #define LMEM_PCCLCR_LADSEL_MASK (0x4000000U)
  7509. #define LMEM_PCCLCR_LADSEL_SHIFT (26U)
  7510. #define LMEM_PCCLCR_LADSEL(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCLCR_LADSEL_SHIFT)) & LMEM_PCCLCR_LADSEL_MASK)
  7511. #define LMEM_PCCLCR_LACC_MASK (0x8000000U)
  7512. #define LMEM_PCCLCR_LACC_SHIFT (27U)
  7513. #define LMEM_PCCLCR_LACC(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCLCR_LACC_SHIFT)) & LMEM_PCCLCR_LACC_MASK)
  7514. /*! @name PCCSAR - Cache search address register */
  7515. #define LMEM_PCCSAR_LGO_MASK (0x1U)
  7516. #define LMEM_PCCSAR_LGO_SHIFT (0U)
  7517. #define LMEM_PCCSAR_LGO(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCSAR_LGO_SHIFT)) & LMEM_PCCSAR_LGO_MASK)
  7518. #define LMEM_PCCSAR_PHYADDR_MASK (0xFFFFFFFCU)
  7519. #define LMEM_PCCSAR_PHYADDR_SHIFT (2U)
  7520. #define LMEM_PCCSAR_PHYADDR(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCSAR_PHYADDR_SHIFT)) & LMEM_PCCSAR_PHYADDR_MASK)
  7521. /*! @name PCCCVR - Cache read/write value register */
  7522. #define LMEM_PCCCVR_DATA_MASK (0xFFFFFFFFU)
  7523. #define LMEM_PCCCVR_DATA_SHIFT (0U)
  7524. #define LMEM_PCCCVR_DATA(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCCVR_DATA_SHIFT)) & LMEM_PCCCVR_DATA_MASK)
  7525. /*! @name PCCRMR - Cache regions mode register */
  7526. #define LMEM_PCCRMR_R15_MASK (0x3U)
  7527. #define LMEM_PCCRMR_R15_SHIFT (0U)
  7528. #define LMEM_PCCRMR_R15(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R15_SHIFT)) & LMEM_PCCRMR_R15_MASK)
  7529. #define LMEM_PCCRMR_R14_MASK (0xCU)
  7530. #define LMEM_PCCRMR_R14_SHIFT (2U)
  7531. #define LMEM_PCCRMR_R14(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R14_SHIFT)) & LMEM_PCCRMR_R14_MASK)
  7532. #define LMEM_PCCRMR_R13_MASK (0x30U)
  7533. #define LMEM_PCCRMR_R13_SHIFT (4U)
  7534. #define LMEM_PCCRMR_R13(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R13_SHIFT)) & LMEM_PCCRMR_R13_MASK)
  7535. #define LMEM_PCCRMR_R12_MASK (0xC0U)
  7536. #define LMEM_PCCRMR_R12_SHIFT (6U)
  7537. #define LMEM_PCCRMR_R12(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R12_SHIFT)) & LMEM_PCCRMR_R12_MASK)
  7538. #define LMEM_PCCRMR_R11_MASK (0x300U)
  7539. #define LMEM_PCCRMR_R11_SHIFT (8U)
  7540. #define LMEM_PCCRMR_R11(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R11_SHIFT)) & LMEM_PCCRMR_R11_MASK)
  7541. #define LMEM_PCCRMR_R10_MASK (0xC00U)
  7542. #define LMEM_PCCRMR_R10_SHIFT (10U)
  7543. #define LMEM_PCCRMR_R10(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R10_SHIFT)) & LMEM_PCCRMR_R10_MASK)
  7544. #define LMEM_PCCRMR_R9_MASK (0x3000U)
  7545. #define LMEM_PCCRMR_R9_SHIFT (12U)
  7546. #define LMEM_PCCRMR_R9(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R9_SHIFT)) & LMEM_PCCRMR_R9_MASK)
  7547. #define LMEM_PCCRMR_R8_MASK (0xC000U)
  7548. #define LMEM_PCCRMR_R8_SHIFT (14U)
  7549. #define LMEM_PCCRMR_R8(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R8_SHIFT)) & LMEM_PCCRMR_R8_MASK)
  7550. #define LMEM_PCCRMR_R7_MASK (0x30000U)
  7551. #define LMEM_PCCRMR_R7_SHIFT (16U)
  7552. #define LMEM_PCCRMR_R7(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R7_SHIFT)) & LMEM_PCCRMR_R7_MASK)
  7553. #define LMEM_PCCRMR_R6_MASK (0xC0000U)
  7554. #define LMEM_PCCRMR_R6_SHIFT (18U)
  7555. #define LMEM_PCCRMR_R6(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R6_SHIFT)) & LMEM_PCCRMR_R6_MASK)
  7556. #define LMEM_PCCRMR_R5_MASK (0x300000U)
  7557. #define LMEM_PCCRMR_R5_SHIFT (20U)
  7558. #define LMEM_PCCRMR_R5(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R5_SHIFT)) & LMEM_PCCRMR_R5_MASK)
  7559. #define LMEM_PCCRMR_R4_MASK (0xC00000U)
  7560. #define LMEM_PCCRMR_R4_SHIFT (22U)
  7561. #define LMEM_PCCRMR_R4(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R4_SHIFT)) & LMEM_PCCRMR_R4_MASK)
  7562. #define LMEM_PCCRMR_R3_MASK (0x3000000U)
  7563. #define LMEM_PCCRMR_R3_SHIFT (24U)
  7564. #define LMEM_PCCRMR_R3(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R3_SHIFT)) & LMEM_PCCRMR_R3_MASK)
  7565. #define LMEM_PCCRMR_R2_MASK (0xC000000U)
  7566. #define LMEM_PCCRMR_R2_SHIFT (26U)
  7567. #define LMEM_PCCRMR_R2(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R2_SHIFT)) & LMEM_PCCRMR_R2_MASK)
  7568. #define LMEM_PCCRMR_R1_MASK (0x30000000U)
  7569. #define LMEM_PCCRMR_R1_SHIFT (28U)
  7570. #define LMEM_PCCRMR_R1(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R1_SHIFT)) & LMEM_PCCRMR_R1_MASK)
  7571. #define LMEM_PCCRMR_R0_MASK (0xC0000000U)
  7572. #define LMEM_PCCRMR_R0_SHIFT (30U)
  7573. #define LMEM_PCCRMR_R0(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PCCRMR_R0_SHIFT)) & LMEM_PCCRMR_R0_MASK)
  7574. /*! @name PSCCR - Cache control register */
  7575. #define LMEM_PSCCR_ENCACHE_MASK (0x1U)
  7576. #define LMEM_PSCCR_ENCACHE_SHIFT (0U)
  7577. #define LMEM_PSCCR_ENCACHE(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCCR_ENCACHE_SHIFT)) & LMEM_PSCCR_ENCACHE_MASK)
  7578. #define LMEM_PSCCR_ENWRBUF_MASK (0x2U)
  7579. #define LMEM_PSCCR_ENWRBUF_SHIFT (1U)
  7580. #define LMEM_PSCCR_ENWRBUF(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCCR_ENWRBUF_SHIFT)) & LMEM_PSCCR_ENWRBUF_MASK)
  7581. #define LMEM_PSCCR_INVW0_MASK (0x1000000U)
  7582. #define LMEM_PSCCR_INVW0_SHIFT (24U)
  7583. #define LMEM_PSCCR_INVW0(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCCR_INVW0_SHIFT)) & LMEM_PSCCR_INVW0_MASK)
  7584. #define LMEM_PSCCR_PUSHW0_MASK (0x2000000U)
  7585. #define LMEM_PSCCR_PUSHW0_SHIFT (25U)
  7586. #define LMEM_PSCCR_PUSHW0(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCCR_PUSHW0_SHIFT)) & LMEM_PSCCR_PUSHW0_MASK)
  7587. #define LMEM_PSCCR_INVW1_MASK (0x4000000U)
  7588. #define LMEM_PSCCR_INVW1_SHIFT (26U)
  7589. #define LMEM_PSCCR_INVW1(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCCR_INVW1_SHIFT)) & LMEM_PSCCR_INVW1_MASK)
  7590. #define LMEM_PSCCR_PUSHW1_MASK (0x8000000U)
  7591. #define LMEM_PSCCR_PUSHW1_SHIFT (27U)
  7592. #define LMEM_PSCCR_PUSHW1(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCCR_PUSHW1_SHIFT)) & LMEM_PSCCR_PUSHW1_MASK)
  7593. #define LMEM_PSCCR_GO_MASK (0x80000000U)
  7594. #define LMEM_PSCCR_GO_SHIFT (31U)
  7595. #define LMEM_PSCCR_GO(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCCR_GO_SHIFT)) & LMEM_PSCCR_GO_MASK)
  7596. /*! @name PSCLCR - Cache line control register */
  7597. #define LMEM_PSCLCR_LGO_MASK (0x1U)
  7598. #define LMEM_PSCLCR_LGO_SHIFT (0U)
  7599. #define LMEM_PSCLCR_LGO(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCLCR_LGO_SHIFT)) & LMEM_PSCLCR_LGO_MASK)
  7600. #define LMEM_PSCLCR_CACHEADDR_MASK (0xFFCU)
  7601. #define LMEM_PSCLCR_CACHEADDR_SHIFT (2U)
  7602. #define LMEM_PSCLCR_CACHEADDR(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCLCR_CACHEADDR_SHIFT)) & LMEM_PSCLCR_CACHEADDR_MASK)
  7603. #define LMEM_PSCLCR_WSEL_MASK (0x4000U)
  7604. #define LMEM_PSCLCR_WSEL_SHIFT (14U)
  7605. #define LMEM_PSCLCR_WSEL(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCLCR_WSEL_SHIFT)) & LMEM_PSCLCR_WSEL_MASK)
  7606. #define LMEM_PSCLCR_TDSEL_MASK (0x10000U)
  7607. #define LMEM_PSCLCR_TDSEL_SHIFT (16U)
  7608. #define LMEM_PSCLCR_TDSEL(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCLCR_TDSEL_SHIFT)) & LMEM_PSCLCR_TDSEL_MASK)
  7609. #define LMEM_PSCLCR_LCIVB_MASK (0x100000U)
  7610. #define LMEM_PSCLCR_LCIVB_SHIFT (20U)
  7611. #define LMEM_PSCLCR_LCIVB(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCLCR_LCIVB_SHIFT)) & LMEM_PSCLCR_LCIVB_MASK)
  7612. #define LMEM_PSCLCR_LCIMB_MASK (0x200000U)
  7613. #define LMEM_PSCLCR_LCIMB_SHIFT (21U)
  7614. #define LMEM_PSCLCR_LCIMB(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCLCR_LCIMB_SHIFT)) & LMEM_PSCLCR_LCIMB_MASK)
  7615. #define LMEM_PSCLCR_LCWAY_MASK (0x400000U)
  7616. #define LMEM_PSCLCR_LCWAY_SHIFT (22U)
  7617. #define LMEM_PSCLCR_LCWAY(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCLCR_LCWAY_SHIFT)) & LMEM_PSCLCR_LCWAY_MASK)
  7618. #define LMEM_PSCLCR_LCMD_MASK (0x3000000U)
  7619. #define LMEM_PSCLCR_LCMD_SHIFT (24U)
  7620. #define LMEM_PSCLCR_LCMD(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCLCR_LCMD_SHIFT)) & LMEM_PSCLCR_LCMD_MASK)
  7621. #define LMEM_PSCLCR_LADSEL_MASK (0x4000000U)
  7622. #define LMEM_PSCLCR_LADSEL_SHIFT (26U)
  7623. #define LMEM_PSCLCR_LADSEL(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCLCR_LADSEL_SHIFT)) & LMEM_PSCLCR_LADSEL_MASK)
  7624. #define LMEM_PSCLCR_LACC_MASK (0x8000000U)
  7625. #define LMEM_PSCLCR_LACC_SHIFT (27U)
  7626. #define LMEM_PSCLCR_LACC(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCLCR_LACC_SHIFT)) & LMEM_PSCLCR_LACC_MASK)
  7627. /*! @name PSCSAR - Cache search address register */
  7628. #define LMEM_PSCSAR_LGO_MASK (0x1U)
  7629. #define LMEM_PSCSAR_LGO_SHIFT (0U)
  7630. #define LMEM_PSCSAR_LGO(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCSAR_LGO_SHIFT)) & LMEM_PSCSAR_LGO_MASK)
  7631. #define LMEM_PSCSAR_PHYADDR_MASK (0xFFFFFFFCU)
  7632. #define LMEM_PSCSAR_PHYADDR_SHIFT (2U)
  7633. #define LMEM_PSCSAR_PHYADDR(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCSAR_PHYADDR_SHIFT)) & LMEM_PSCSAR_PHYADDR_MASK)
  7634. /*! @name PSCCVR - Cache read/write value register */
  7635. #define LMEM_PSCCVR_DATA_MASK (0xFFFFFFFFU)
  7636. #define LMEM_PSCCVR_DATA_SHIFT (0U)
  7637. #define LMEM_PSCCVR_DATA(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCCVR_DATA_SHIFT)) & LMEM_PSCCVR_DATA_MASK)
  7638. /*! @name PSCRMR - Cache regions mode register */
  7639. #define LMEM_PSCRMR_R15_MASK (0x3U)
  7640. #define LMEM_PSCRMR_R15_SHIFT (0U)
  7641. #define LMEM_PSCRMR_R15(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R15_SHIFT)) & LMEM_PSCRMR_R15_MASK)
  7642. #define LMEM_PSCRMR_R14_MASK (0xCU)
  7643. #define LMEM_PSCRMR_R14_SHIFT (2U)
  7644. #define LMEM_PSCRMR_R14(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R14_SHIFT)) & LMEM_PSCRMR_R14_MASK)
  7645. #define LMEM_PSCRMR_R13_MASK (0x30U)
  7646. #define LMEM_PSCRMR_R13_SHIFT (4U)
  7647. #define LMEM_PSCRMR_R13(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R13_SHIFT)) & LMEM_PSCRMR_R13_MASK)
  7648. #define LMEM_PSCRMR_R12_MASK (0xC0U)
  7649. #define LMEM_PSCRMR_R12_SHIFT (6U)
  7650. #define LMEM_PSCRMR_R12(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R12_SHIFT)) & LMEM_PSCRMR_R12_MASK)
  7651. #define LMEM_PSCRMR_R11_MASK (0x300U)
  7652. #define LMEM_PSCRMR_R11_SHIFT (8U)
  7653. #define LMEM_PSCRMR_R11(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R11_SHIFT)) & LMEM_PSCRMR_R11_MASK)
  7654. #define LMEM_PSCRMR_R10_MASK (0xC00U)
  7655. #define LMEM_PSCRMR_R10_SHIFT (10U)
  7656. #define LMEM_PSCRMR_R10(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R10_SHIFT)) & LMEM_PSCRMR_R10_MASK)
  7657. #define LMEM_PSCRMR_R9_MASK (0x3000U)
  7658. #define LMEM_PSCRMR_R9_SHIFT (12U)
  7659. #define LMEM_PSCRMR_R9(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R9_SHIFT)) & LMEM_PSCRMR_R9_MASK)
  7660. #define LMEM_PSCRMR_R8_MASK (0xC000U)
  7661. #define LMEM_PSCRMR_R8_SHIFT (14U)
  7662. #define LMEM_PSCRMR_R8(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R8_SHIFT)) & LMEM_PSCRMR_R8_MASK)
  7663. #define LMEM_PSCRMR_R7_MASK (0x30000U)
  7664. #define LMEM_PSCRMR_R7_SHIFT (16U)
  7665. #define LMEM_PSCRMR_R7(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R7_SHIFT)) & LMEM_PSCRMR_R7_MASK)
  7666. #define LMEM_PSCRMR_R6_MASK (0xC0000U)
  7667. #define LMEM_PSCRMR_R6_SHIFT (18U)
  7668. #define LMEM_PSCRMR_R6(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R6_SHIFT)) & LMEM_PSCRMR_R6_MASK)
  7669. #define LMEM_PSCRMR_R5_MASK (0x300000U)
  7670. #define LMEM_PSCRMR_R5_SHIFT (20U)
  7671. #define LMEM_PSCRMR_R5(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R5_SHIFT)) & LMEM_PSCRMR_R5_MASK)
  7672. #define LMEM_PSCRMR_R4_MASK (0xC00000U)
  7673. #define LMEM_PSCRMR_R4_SHIFT (22U)
  7674. #define LMEM_PSCRMR_R4(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R4_SHIFT)) & LMEM_PSCRMR_R4_MASK)
  7675. #define LMEM_PSCRMR_R3_MASK (0x3000000U)
  7676. #define LMEM_PSCRMR_R3_SHIFT (24U)
  7677. #define LMEM_PSCRMR_R3(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R3_SHIFT)) & LMEM_PSCRMR_R3_MASK)
  7678. #define LMEM_PSCRMR_R2_MASK (0xC000000U)
  7679. #define LMEM_PSCRMR_R2_SHIFT (26U)
  7680. #define LMEM_PSCRMR_R2(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R2_SHIFT)) & LMEM_PSCRMR_R2_MASK)
  7681. #define LMEM_PSCRMR_R1_MASK (0x30000000U)
  7682. #define LMEM_PSCRMR_R1_SHIFT (28U)
  7683. #define LMEM_PSCRMR_R1(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R1_SHIFT)) & LMEM_PSCRMR_R1_MASK)
  7684. #define LMEM_PSCRMR_R0_MASK (0xC0000000U)
  7685. #define LMEM_PSCRMR_R0_SHIFT (30U)
  7686. #define LMEM_PSCRMR_R0(x) (((uint32_t)(((uint32_t)(x)) << LMEM_PSCRMR_R0_SHIFT)) & LMEM_PSCRMR_R0_MASK)
  7687. /*!
  7688. * @}
  7689. */ /* end of group LMEM_Register_Masks */
  7690. /* LMEM - Peripheral instance base addresses */
  7691. /** Peripheral LMEM base address */
  7692. #define LMEM_BASE (0xE0082000u)
  7693. /** Peripheral LMEM base pointer */
  7694. #define LMEM ((LMEM_Type *)LMEM_BASE)
  7695. /** Array initializer of LMEM peripheral base addresses */
  7696. #define LMEM_BASE_ADDRS { LMEM_BASE }
  7697. /** Array initializer of LMEM peripheral base pointers */
  7698. #define LMEM_BASE_PTRS { LMEM }
  7699. /*!
  7700. * @}
  7701. */ /* end of group LMEM_Peripheral_Access_Layer */
  7702. /* ----------------------------------------------------------------------------
  7703. -- LPTMR Peripheral Access Layer
  7704. ---------------------------------------------------------------------------- */
  7705. /*!
  7706. * @addtogroup LPTMR_Peripheral_Access_Layer LPTMR Peripheral Access Layer
  7707. * @{
  7708. */
  7709. /** LPTMR - Register Layout Typedef */
  7710. typedef struct {
  7711. __IO uint32_t CSR; /**< Low Power Timer Control Status Register, offset: 0x0 */
  7712. __IO uint32_t PSR; /**< Low Power Timer Prescale Register, offset: 0x4 */
  7713. __IO uint32_t CMR; /**< Low Power Timer Compare Register, offset: 0x8 */
  7714. __IO uint32_t CNR; /**< Low Power Timer Counter Register, offset: 0xC */
  7715. } LPTMR_Type;
  7716. /* ----------------------------------------------------------------------------
  7717. -- LPTMR Register Masks
  7718. ---------------------------------------------------------------------------- */
  7719. /*!
  7720. * @addtogroup LPTMR_Register_Masks LPTMR Register Masks
  7721. * @{
  7722. */
  7723. /*! @name CSR - Low Power Timer Control Status Register */
  7724. #define LPTMR_CSR_TEN_MASK (0x1U)
  7725. #define LPTMR_CSR_TEN_SHIFT (0U)
  7726. #define LPTMR_CSR_TEN(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TEN_SHIFT)) & LPTMR_CSR_TEN_MASK)
  7727. #define LPTMR_CSR_TMS_MASK (0x2U)
  7728. #define LPTMR_CSR_TMS_SHIFT (1U)
  7729. #define LPTMR_CSR_TMS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TMS_SHIFT)) & LPTMR_CSR_TMS_MASK)
  7730. #define LPTMR_CSR_TFC_MASK (0x4U)
  7731. #define LPTMR_CSR_TFC_SHIFT (2U)
  7732. #define LPTMR_CSR_TFC(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TFC_SHIFT)) & LPTMR_CSR_TFC_MASK)
  7733. #define LPTMR_CSR_TPP_MASK (0x8U)
  7734. #define LPTMR_CSR_TPP_SHIFT (3U)
  7735. #define LPTMR_CSR_TPP(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TPP_SHIFT)) & LPTMR_CSR_TPP_MASK)
  7736. #define LPTMR_CSR_TPS_MASK (0x30U)
  7737. #define LPTMR_CSR_TPS_SHIFT (4U)
  7738. #define LPTMR_CSR_TPS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TPS_SHIFT)) & LPTMR_CSR_TPS_MASK)
  7739. #define LPTMR_CSR_TIE_MASK (0x40U)
  7740. #define LPTMR_CSR_TIE_SHIFT (6U)
  7741. #define LPTMR_CSR_TIE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TIE_SHIFT)) & LPTMR_CSR_TIE_MASK)
  7742. #define LPTMR_CSR_TCF_MASK (0x80U)
  7743. #define LPTMR_CSR_TCF_SHIFT (7U)
  7744. #define LPTMR_CSR_TCF(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TCF_SHIFT)) & LPTMR_CSR_TCF_MASK)
  7745. /*! @name PSR - Low Power Timer Prescale Register */
  7746. #define LPTMR_PSR_PCS_MASK (0x3U)
  7747. #define LPTMR_PSR_PCS_SHIFT (0U)
  7748. #define LPTMR_PSR_PCS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PCS_SHIFT)) & LPTMR_PSR_PCS_MASK)
  7749. #define LPTMR_PSR_PBYP_MASK (0x4U)
  7750. #define LPTMR_PSR_PBYP_SHIFT (2U)
  7751. #define LPTMR_PSR_PBYP(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PBYP_SHIFT)) & LPTMR_PSR_PBYP_MASK)
  7752. #define LPTMR_PSR_PRESCALE_MASK (0x78U)
  7753. #define LPTMR_PSR_PRESCALE_SHIFT (3U)
  7754. #define LPTMR_PSR_PRESCALE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PRESCALE_SHIFT)) & LPTMR_PSR_PRESCALE_MASK)
  7755. /*! @name CMR - Low Power Timer Compare Register */
  7756. #define LPTMR_CMR_COMPARE_MASK (0xFFFFU)
  7757. #define LPTMR_CMR_COMPARE_SHIFT (0U)
  7758. #define LPTMR_CMR_COMPARE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CMR_COMPARE_SHIFT)) & LPTMR_CMR_COMPARE_MASK)
  7759. /*! @name CNR - Low Power Timer Counter Register */
  7760. #define LPTMR_CNR_COUNTER_MASK (0xFFFFU)
  7761. #define LPTMR_CNR_COUNTER_SHIFT (0U)
  7762. #define LPTMR_CNR_COUNTER(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CNR_COUNTER_SHIFT)) & LPTMR_CNR_COUNTER_MASK)
  7763. /*!
  7764. * @}
  7765. */ /* end of group LPTMR_Register_Masks */
  7766. /* LPTMR - Peripheral instance base addresses */
  7767. /** Peripheral LPTMR0 base address */
  7768. #define LPTMR0_BASE (0x40040000u)
  7769. /** Peripheral LPTMR0 base pointer */
  7770. #define LPTMR0 ((LPTMR_Type *)LPTMR0_BASE)
  7771. /** Peripheral LPTMR1 base address */
  7772. #define LPTMR1_BASE (0x40044000u)
  7773. /** Peripheral LPTMR1 base pointer */
  7774. #define LPTMR1 ((LPTMR_Type *)LPTMR1_BASE)
  7775. /** Array initializer of LPTMR peripheral base addresses */
  7776. #define LPTMR_BASE_ADDRS { LPTMR0_BASE, LPTMR1_BASE }
  7777. /** Array initializer of LPTMR peripheral base pointers */
  7778. #define LPTMR_BASE_PTRS { LPTMR0, LPTMR1 }
  7779. /** Interrupt vectors for the LPTMR peripheral type */
  7780. #define LPTMR_IRQS { LPTMR0_LPTMR1_IRQn, LPTMR0_LPTMR1_IRQn }
  7781. /*!
  7782. * @}
  7783. */ /* end of group LPTMR_Peripheral_Access_Layer */
  7784. /* ----------------------------------------------------------------------------
  7785. -- LPUART Peripheral Access Layer
  7786. ---------------------------------------------------------------------------- */
  7787. /*!
  7788. * @addtogroup LPUART_Peripheral_Access_Layer LPUART Peripheral Access Layer
  7789. * @{
  7790. */
  7791. /** LPUART - Register Layout Typedef */
  7792. typedef struct {
  7793. __IO uint32_t BAUD; /**< LPUART Baud Rate Register, offset: 0x0 */
  7794. __IO uint32_t STAT; /**< LPUART Status Register, offset: 0x4 */
  7795. __IO uint32_t CTRL; /**< LPUART Control Register, offset: 0x8 */
  7796. __IO uint32_t DATA; /**< LPUART Data Register, offset: 0xC */
  7797. __IO uint32_t MATCH; /**< LPUART Match Address Register, offset: 0x10 */
  7798. __IO uint32_t MODIR; /**< LPUART Modem IrDA Register, offset: 0x14 */
  7799. __IO uint32_t FIFO; /**< LPUART FIFO Register, offset: 0x18 */
  7800. __IO uint32_t WATER; /**< LPUART Watermark Register, offset: 0x1C */
  7801. } LPUART_Type;
  7802. /* ----------------------------------------------------------------------------
  7803. -- LPUART Register Masks
  7804. ---------------------------------------------------------------------------- */
  7805. /*!
  7806. * @addtogroup LPUART_Register_Masks LPUART Register Masks
  7807. * @{
  7808. */
  7809. /*! @name BAUD - LPUART Baud Rate Register */
  7810. #define LPUART_BAUD_SBR_MASK (0x1FFFU)
  7811. #define LPUART_BAUD_SBR_SHIFT (0U)
  7812. #define LPUART_BAUD_SBR(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_SBR_SHIFT)) & LPUART_BAUD_SBR_MASK)
  7813. #define LPUART_BAUD_SBNS_MASK (0x2000U)
  7814. #define LPUART_BAUD_SBNS_SHIFT (13U)
  7815. #define LPUART_BAUD_SBNS(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_SBNS_SHIFT)) & LPUART_BAUD_SBNS_MASK)
  7816. #define LPUART_BAUD_RXEDGIE_MASK (0x4000U)
  7817. #define LPUART_BAUD_RXEDGIE_SHIFT (14U)
  7818. #define LPUART_BAUD_RXEDGIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RXEDGIE_SHIFT)) & LPUART_BAUD_RXEDGIE_MASK)
  7819. #define LPUART_BAUD_LBKDIE_MASK (0x8000U)
  7820. #define LPUART_BAUD_LBKDIE_SHIFT (15U)
  7821. #define LPUART_BAUD_LBKDIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_LBKDIE_SHIFT)) & LPUART_BAUD_LBKDIE_MASK)
  7822. #define LPUART_BAUD_RESYNCDIS_MASK (0x10000U)
  7823. #define LPUART_BAUD_RESYNCDIS_SHIFT (16U)
  7824. #define LPUART_BAUD_RESYNCDIS(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RESYNCDIS_SHIFT)) & LPUART_BAUD_RESYNCDIS_MASK)
  7825. #define LPUART_BAUD_BOTHEDGE_MASK (0x20000U)
  7826. #define LPUART_BAUD_BOTHEDGE_SHIFT (17U)
  7827. #define LPUART_BAUD_BOTHEDGE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_BOTHEDGE_SHIFT)) & LPUART_BAUD_BOTHEDGE_MASK)
  7828. #define LPUART_BAUD_MATCFG_MASK (0xC0000U)
  7829. #define LPUART_BAUD_MATCFG_SHIFT (18U)
  7830. #define LPUART_BAUD_MATCFG(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_MATCFG_SHIFT)) & LPUART_BAUD_MATCFG_MASK)
  7831. #define LPUART_BAUD_RDMAE_MASK (0x200000U)
  7832. #define LPUART_BAUD_RDMAE_SHIFT (21U)
  7833. #define LPUART_BAUD_RDMAE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_RDMAE_SHIFT)) & LPUART_BAUD_RDMAE_MASK)
  7834. #define LPUART_BAUD_TDMAE_MASK (0x800000U)
  7835. #define LPUART_BAUD_TDMAE_SHIFT (23U)
  7836. #define LPUART_BAUD_TDMAE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_TDMAE_SHIFT)) & LPUART_BAUD_TDMAE_MASK)
  7837. #define LPUART_BAUD_OSR_MASK (0x1F000000U)
  7838. #define LPUART_BAUD_OSR_SHIFT (24U)
  7839. #define LPUART_BAUD_OSR(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_OSR_SHIFT)) & LPUART_BAUD_OSR_MASK)
  7840. #define LPUART_BAUD_M10_MASK (0x20000000U)
  7841. #define LPUART_BAUD_M10_SHIFT (29U)
  7842. #define LPUART_BAUD_M10(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_M10_SHIFT)) & LPUART_BAUD_M10_MASK)
  7843. #define LPUART_BAUD_MAEN2_MASK (0x40000000U)
  7844. #define LPUART_BAUD_MAEN2_SHIFT (30U)
  7845. #define LPUART_BAUD_MAEN2(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_MAEN2_SHIFT)) & LPUART_BAUD_MAEN2_MASK)
  7846. #define LPUART_BAUD_MAEN1_MASK (0x80000000U)
  7847. #define LPUART_BAUD_MAEN1_SHIFT (31U)
  7848. #define LPUART_BAUD_MAEN1(x) (((uint32_t)(((uint32_t)(x)) << LPUART_BAUD_MAEN1_SHIFT)) & LPUART_BAUD_MAEN1_MASK)
  7849. /*! @name STAT - LPUART Status Register */
  7850. #define LPUART_STAT_MA2F_MASK (0x4000U)
  7851. #define LPUART_STAT_MA2F_SHIFT (14U)
  7852. #define LPUART_STAT_MA2F(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_MA2F_SHIFT)) & LPUART_STAT_MA2F_MASK)
  7853. #define LPUART_STAT_MA1F_MASK (0x8000U)
  7854. #define LPUART_STAT_MA1F_SHIFT (15U)
  7855. #define LPUART_STAT_MA1F(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_MA1F_SHIFT)) & LPUART_STAT_MA1F_MASK)
  7856. #define LPUART_STAT_PF_MASK (0x10000U)
  7857. #define LPUART_STAT_PF_SHIFT (16U)
  7858. #define LPUART_STAT_PF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_PF_SHIFT)) & LPUART_STAT_PF_MASK)
  7859. #define LPUART_STAT_FE_MASK (0x20000U)
  7860. #define LPUART_STAT_FE_SHIFT (17U)
  7861. #define LPUART_STAT_FE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_FE_SHIFT)) & LPUART_STAT_FE_MASK)
  7862. #define LPUART_STAT_NF_MASK (0x40000U)
  7863. #define LPUART_STAT_NF_SHIFT (18U)
  7864. #define LPUART_STAT_NF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_NF_SHIFT)) & LPUART_STAT_NF_MASK)
  7865. #define LPUART_STAT_OR_MASK (0x80000U)
  7866. #define LPUART_STAT_OR_SHIFT (19U)
  7867. #define LPUART_STAT_OR(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_OR_SHIFT)) & LPUART_STAT_OR_MASK)
  7868. #define LPUART_STAT_IDLE_MASK (0x100000U)
  7869. #define LPUART_STAT_IDLE_SHIFT (20U)
  7870. #define LPUART_STAT_IDLE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_IDLE_SHIFT)) & LPUART_STAT_IDLE_MASK)
  7871. #define LPUART_STAT_RDRF_MASK (0x200000U)
  7872. #define LPUART_STAT_RDRF_SHIFT (21U)
  7873. #define LPUART_STAT_RDRF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RDRF_SHIFT)) & LPUART_STAT_RDRF_MASK)
  7874. #define LPUART_STAT_TC_MASK (0x400000U)
  7875. #define LPUART_STAT_TC_SHIFT (22U)
  7876. #define LPUART_STAT_TC(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_TC_SHIFT)) & LPUART_STAT_TC_MASK)
  7877. #define LPUART_STAT_TDRE_MASK (0x800000U)
  7878. #define LPUART_STAT_TDRE_SHIFT (23U)
  7879. #define LPUART_STAT_TDRE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_TDRE_SHIFT)) & LPUART_STAT_TDRE_MASK)
  7880. #define LPUART_STAT_RAF_MASK (0x1000000U)
  7881. #define LPUART_STAT_RAF_SHIFT (24U)
  7882. #define LPUART_STAT_RAF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RAF_SHIFT)) & LPUART_STAT_RAF_MASK)
  7883. #define LPUART_STAT_LBKDE_MASK (0x2000000U)
  7884. #define LPUART_STAT_LBKDE_SHIFT (25U)
  7885. #define LPUART_STAT_LBKDE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_LBKDE_SHIFT)) & LPUART_STAT_LBKDE_MASK)
  7886. #define LPUART_STAT_BRK13_MASK (0x4000000U)
  7887. #define LPUART_STAT_BRK13_SHIFT (26U)
  7888. #define LPUART_STAT_BRK13(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_BRK13_SHIFT)) & LPUART_STAT_BRK13_MASK)
  7889. #define LPUART_STAT_RWUID_MASK (0x8000000U)
  7890. #define LPUART_STAT_RWUID_SHIFT (27U)
  7891. #define LPUART_STAT_RWUID(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RWUID_SHIFT)) & LPUART_STAT_RWUID_MASK)
  7892. #define LPUART_STAT_RXINV_MASK (0x10000000U)
  7893. #define LPUART_STAT_RXINV_SHIFT (28U)
  7894. #define LPUART_STAT_RXINV(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RXINV_SHIFT)) & LPUART_STAT_RXINV_MASK)
  7895. #define LPUART_STAT_MSBF_MASK (0x20000000U)
  7896. #define LPUART_STAT_MSBF_SHIFT (29U)
  7897. #define LPUART_STAT_MSBF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_MSBF_SHIFT)) & LPUART_STAT_MSBF_MASK)
  7898. #define LPUART_STAT_RXEDGIF_MASK (0x40000000U)
  7899. #define LPUART_STAT_RXEDGIF_SHIFT (30U)
  7900. #define LPUART_STAT_RXEDGIF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_RXEDGIF_SHIFT)) & LPUART_STAT_RXEDGIF_MASK)
  7901. #define LPUART_STAT_LBKDIF_MASK (0x80000000U)
  7902. #define LPUART_STAT_LBKDIF_SHIFT (31U)
  7903. #define LPUART_STAT_LBKDIF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_STAT_LBKDIF_SHIFT)) & LPUART_STAT_LBKDIF_MASK)
  7904. /*! @name CTRL - LPUART Control Register */
  7905. #define LPUART_CTRL_PT_MASK (0x1U)
  7906. #define LPUART_CTRL_PT_SHIFT (0U)
  7907. #define LPUART_CTRL_PT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_PT_SHIFT)) & LPUART_CTRL_PT_MASK)
  7908. #define LPUART_CTRL_PE_MASK (0x2U)
  7909. #define LPUART_CTRL_PE_SHIFT (1U)
  7910. #define LPUART_CTRL_PE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_PE_SHIFT)) & LPUART_CTRL_PE_MASK)
  7911. #define LPUART_CTRL_ILT_MASK (0x4U)
  7912. #define LPUART_CTRL_ILT_SHIFT (2U)
  7913. #define LPUART_CTRL_ILT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_ILT_SHIFT)) & LPUART_CTRL_ILT_MASK)
  7914. #define LPUART_CTRL_WAKE_MASK (0x8U)
  7915. #define LPUART_CTRL_WAKE_SHIFT (3U)
  7916. #define LPUART_CTRL_WAKE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_WAKE_SHIFT)) & LPUART_CTRL_WAKE_MASK)
  7917. #define LPUART_CTRL_M_MASK (0x10U)
  7918. #define LPUART_CTRL_M_SHIFT (4U)
  7919. #define LPUART_CTRL_M(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_M_SHIFT)) & LPUART_CTRL_M_MASK)
  7920. #define LPUART_CTRL_RSRC_MASK (0x20U)
  7921. #define LPUART_CTRL_RSRC_SHIFT (5U)
  7922. #define LPUART_CTRL_RSRC(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RSRC_SHIFT)) & LPUART_CTRL_RSRC_MASK)
  7923. #define LPUART_CTRL_DOZEEN_MASK (0x40U)
  7924. #define LPUART_CTRL_DOZEEN_SHIFT (6U)
  7925. #define LPUART_CTRL_DOZEEN(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_DOZEEN_SHIFT)) & LPUART_CTRL_DOZEEN_MASK)
  7926. #define LPUART_CTRL_LOOPS_MASK (0x80U)
  7927. #define LPUART_CTRL_LOOPS_SHIFT (7U)
  7928. #define LPUART_CTRL_LOOPS(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_LOOPS_SHIFT)) & LPUART_CTRL_LOOPS_MASK)
  7929. #define LPUART_CTRL_IDLECFG_MASK (0x700U)
  7930. #define LPUART_CTRL_IDLECFG_SHIFT (8U)
  7931. #define LPUART_CTRL_IDLECFG(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_IDLECFG_SHIFT)) & LPUART_CTRL_IDLECFG_MASK)
  7932. #define LPUART_CTRL_MA2IE_MASK (0x4000U)
  7933. #define LPUART_CTRL_MA2IE_SHIFT (14U)
  7934. #define LPUART_CTRL_MA2IE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_MA2IE_SHIFT)) & LPUART_CTRL_MA2IE_MASK)
  7935. #define LPUART_CTRL_MA1IE_MASK (0x8000U)
  7936. #define LPUART_CTRL_MA1IE_SHIFT (15U)
  7937. #define LPUART_CTRL_MA1IE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_MA1IE_SHIFT)) & LPUART_CTRL_MA1IE_MASK)
  7938. #define LPUART_CTRL_SBK_MASK (0x10000U)
  7939. #define LPUART_CTRL_SBK_SHIFT (16U)
  7940. #define LPUART_CTRL_SBK(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_SBK_SHIFT)) & LPUART_CTRL_SBK_MASK)
  7941. #define LPUART_CTRL_RWU_MASK (0x20000U)
  7942. #define LPUART_CTRL_RWU_SHIFT (17U)
  7943. #define LPUART_CTRL_RWU(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RWU_SHIFT)) & LPUART_CTRL_RWU_MASK)
  7944. #define LPUART_CTRL_RE_MASK (0x40000U)
  7945. #define LPUART_CTRL_RE_SHIFT (18U)
  7946. #define LPUART_CTRL_RE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RE_SHIFT)) & LPUART_CTRL_RE_MASK)
  7947. #define LPUART_CTRL_TE_MASK (0x80000U)
  7948. #define LPUART_CTRL_TE_SHIFT (19U)
  7949. #define LPUART_CTRL_TE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TE_SHIFT)) & LPUART_CTRL_TE_MASK)
  7950. #define LPUART_CTRL_ILIE_MASK (0x100000U)
  7951. #define LPUART_CTRL_ILIE_SHIFT (20U)
  7952. #define LPUART_CTRL_ILIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_ILIE_SHIFT)) & LPUART_CTRL_ILIE_MASK)
  7953. #define LPUART_CTRL_RIE_MASK (0x200000U)
  7954. #define LPUART_CTRL_RIE_SHIFT (21U)
  7955. #define LPUART_CTRL_RIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_RIE_SHIFT)) & LPUART_CTRL_RIE_MASK)
  7956. #define LPUART_CTRL_TCIE_MASK (0x400000U)
  7957. #define LPUART_CTRL_TCIE_SHIFT (22U)
  7958. #define LPUART_CTRL_TCIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TCIE_SHIFT)) & LPUART_CTRL_TCIE_MASK)
  7959. #define LPUART_CTRL_TIE_MASK (0x800000U)
  7960. #define LPUART_CTRL_TIE_SHIFT (23U)
  7961. #define LPUART_CTRL_TIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TIE_SHIFT)) & LPUART_CTRL_TIE_MASK)
  7962. #define LPUART_CTRL_PEIE_MASK (0x1000000U)
  7963. #define LPUART_CTRL_PEIE_SHIFT (24U)
  7964. #define LPUART_CTRL_PEIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_PEIE_SHIFT)) & LPUART_CTRL_PEIE_MASK)
  7965. #define LPUART_CTRL_FEIE_MASK (0x2000000U)
  7966. #define LPUART_CTRL_FEIE_SHIFT (25U)
  7967. #define LPUART_CTRL_FEIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_FEIE_SHIFT)) & LPUART_CTRL_FEIE_MASK)
  7968. #define LPUART_CTRL_NEIE_MASK (0x4000000U)
  7969. #define LPUART_CTRL_NEIE_SHIFT (26U)
  7970. #define LPUART_CTRL_NEIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_NEIE_SHIFT)) & LPUART_CTRL_NEIE_MASK)
  7971. #define LPUART_CTRL_ORIE_MASK (0x8000000U)
  7972. #define LPUART_CTRL_ORIE_SHIFT (27U)
  7973. #define LPUART_CTRL_ORIE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_ORIE_SHIFT)) & LPUART_CTRL_ORIE_MASK)
  7974. #define LPUART_CTRL_TXINV_MASK (0x10000000U)
  7975. #define LPUART_CTRL_TXINV_SHIFT (28U)
  7976. #define LPUART_CTRL_TXINV(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TXINV_SHIFT)) & LPUART_CTRL_TXINV_MASK)
  7977. #define LPUART_CTRL_TXDIR_MASK (0x20000000U)
  7978. #define LPUART_CTRL_TXDIR_SHIFT (29U)
  7979. #define LPUART_CTRL_TXDIR(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_TXDIR_SHIFT)) & LPUART_CTRL_TXDIR_MASK)
  7980. #define LPUART_CTRL_R9T8_MASK (0x40000000U)
  7981. #define LPUART_CTRL_R9T8_SHIFT (30U)
  7982. #define LPUART_CTRL_R9T8(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_R9T8_SHIFT)) & LPUART_CTRL_R9T8_MASK)
  7983. #define LPUART_CTRL_R8T9_MASK (0x80000000U)
  7984. #define LPUART_CTRL_R8T9_SHIFT (31U)
  7985. #define LPUART_CTRL_R8T9(x) (((uint32_t)(((uint32_t)(x)) << LPUART_CTRL_R8T9_SHIFT)) & LPUART_CTRL_R8T9_MASK)
  7986. /*! @name DATA - LPUART Data Register */
  7987. #define LPUART_DATA_R0T0_MASK (0x1U)
  7988. #define LPUART_DATA_R0T0_SHIFT (0U)
  7989. #define LPUART_DATA_R0T0(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R0T0_SHIFT)) & LPUART_DATA_R0T0_MASK)
  7990. #define LPUART_DATA_R1T1_MASK (0x2U)
  7991. #define LPUART_DATA_R1T1_SHIFT (1U)
  7992. #define LPUART_DATA_R1T1(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R1T1_SHIFT)) & LPUART_DATA_R1T1_MASK)
  7993. #define LPUART_DATA_R2T2_MASK (0x4U)
  7994. #define LPUART_DATA_R2T2_SHIFT (2U)
  7995. #define LPUART_DATA_R2T2(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R2T2_SHIFT)) & LPUART_DATA_R2T2_MASK)
  7996. #define LPUART_DATA_R3T3_MASK (0x8U)
  7997. #define LPUART_DATA_R3T3_SHIFT (3U)
  7998. #define LPUART_DATA_R3T3(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R3T3_SHIFT)) & LPUART_DATA_R3T3_MASK)
  7999. #define LPUART_DATA_R4T4_MASK (0x10U)
  8000. #define LPUART_DATA_R4T4_SHIFT (4U)
  8001. #define LPUART_DATA_R4T4(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R4T4_SHIFT)) & LPUART_DATA_R4T4_MASK)
  8002. #define LPUART_DATA_R5T5_MASK (0x20U)
  8003. #define LPUART_DATA_R5T5_SHIFT (5U)
  8004. #define LPUART_DATA_R5T5(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R5T5_SHIFT)) & LPUART_DATA_R5T5_MASK)
  8005. #define LPUART_DATA_R6T6_MASK (0x40U)
  8006. #define LPUART_DATA_R6T6_SHIFT (6U)
  8007. #define LPUART_DATA_R6T6(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R6T6_SHIFT)) & LPUART_DATA_R6T6_MASK)
  8008. #define LPUART_DATA_R7T7_MASK (0x80U)
  8009. #define LPUART_DATA_R7T7_SHIFT (7U)
  8010. #define LPUART_DATA_R7T7(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R7T7_SHIFT)) & LPUART_DATA_R7T7_MASK)
  8011. #define LPUART_DATA_R8T8_MASK (0x100U)
  8012. #define LPUART_DATA_R8T8_SHIFT (8U)
  8013. #define LPUART_DATA_R8T8(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R8T8_SHIFT)) & LPUART_DATA_R8T8_MASK)
  8014. #define LPUART_DATA_R9T9_MASK (0x200U)
  8015. #define LPUART_DATA_R9T9_SHIFT (9U)
  8016. #define LPUART_DATA_R9T9(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_R9T9_SHIFT)) & LPUART_DATA_R9T9_MASK)
  8017. #define LPUART_DATA_IDLINE_MASK (0x800U)
  8018. #define LPUART_DATA_IDLINE_SHIFT (11U)
  8019. #define LPUART_DATA_IDLINE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_IDLINE_SHIFT)) & LPUART_DATA_IDLINE_MASK)
  8020. #define LPUART_DATA_RXEMPT_MASK (0x1000U)
  8021. #define LPUART_DATA_RXEMPT_SHIFT (12U)
  8022. #define LPUART_DATA_RXEMPT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_RXEMPT_SHIFT)) & LPUART_DATA_RXEMPT_MASK)
  8023. #define LPUART_DATA_FRETSC_MASK (0x2000U)
  8024. #define LPUART_DATA_FRETSC_SHIFT (13U)
  8025. #define LPUART_DATA_FRETSC(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_FRETSC_SHIFT)) & LPUART_DATA_FRETSC_MASK)
  8026. #define LPUART_DATA_PARITYE_MASK (0x4000U)
  8027. #define LPUART_DATA_PARITYE_SHIFT (14U)
  8028. #define LPUART_DATA_PARITYE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_PARITYE_SHIFT)) & LPUART_DATA_PARITYE_MASK)
  8029. #define LPUART_DATA_NOISY_MASK (0x8000U)
  8030. #define LPUART_DATA_NOISY_SHIFT (15U)
  8031. #define LPUART_DATA_NOISY(x) (((uint32_t)(((uint32_t)(x)) << LPUART_DATA_NOISY_SHIFT)) & LPUART_DATA_NOISY_MASK)
  8032. /*! @name MATCH - LPUART Match Address Register */
  8033. #define LPUART_MATCH_MA1_MASK (0x3FFU)
  8034. #define LPUART_MATCH_MA1_SHIFT (0U)
  8035. #define LPUART_MATCH_MA1(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MATCH_MA1_SHIFT)) & LPUART_MATCH_MA1_MASK)
  8036. #define LPUART_MATCH_MA2_MASK (0x3FF0000U)
  8037. #define LPUART_MATCH_MA2_SHIFT (16U)
  8038. #define LPUART_MATCH_MA2(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MATCH_MA2_SHIFT)) & LPUART_MATCH_MA2_MASK)
  8039. /*! @name MODIR - LPUART Modem IrDA Register */
  8040. #define LPUART_MODIR_TXCTSE_MASK (0x1U)
  8041. #define LPUART_MODIR_TXCTSE_SHIFT (0U)
  8042. #define LPUART_MODIR_TXCTSE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXCTSE_SHIFT)) & LPUART_MODIR_TXCTSE_MASK)
  8043. #define LPUART_MODIR_TXRTSE_MASK (0x2U)
  8044. #define LPUART_MODIR_TXRTSE_SHIFT (1U)
  8045. #define LPUART_MODIR_TXRTSE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXRTSE_SHIFT)) & LPUART_MODIR_TXRTSE_MASK)
  8046. #define LPUART_MODIR_TXRTSPOL_MASK (0x4U)
  8047. #define LPUART_MODIR_TXRTSPOL_SHIFT (2U)
  8048. #define LPUART_MODIR_TXRTSPOL(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXRTSPOL_SHIFT)) & LPUART_MODIR_TXRTSPOL_MASK)
  8049. #define LPUART_MODIR_RXRTSE_MASK (0x8U)
  8050. #define LPUART_MODIR_RXRTSE_SHIFT (3U)
  8051. #define LPUART_MODIR_RXRTSE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_RXRTSE_SHIFT)) & LPUART_MODIR_RXRTSE_MASK)
  8052. #define LPUART_MODIR_TXCTSC_MASK (0x10U)
  8053. #define LPUART_MODIR_TXCTSC_SHIFT (4U)
  8054. #define LPUART_MODIR_TXCTSC(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXCTSC_SHIFT)) & LPUART_MODIR_TXCTSC_MASK)
  8055. #define LPUART_MODIR_TXCTSSRC_MASK (0x20U)
  8056. #define LPUART_MODIR_TXCTSSRC_SHIFT (5U)
  8057. #define LPUART_MODIR_TXCTSSRC(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TXCTSSRC_SHIFT)) & LPUART_MODIR_TXCTSSRC_MASK)
  8058. #define LPUART_MODIR_RTSWATER_MASK (0xFF00U)
  8059. #define LPUART_MODIR_RTSWATER_SHIFT (8U)
  8060. #define LPUART_MODIR_RTSWATER(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_RTSWATER_SHIFT)) & LPUART_MODIR_RTSWATER_MASK)
  8061. #define LPUART_MODIR_TNP_MASK (0x30000U)
  8062. #define LPUART_MODIR_TNP_SHIFT (16U)
  8063. #define LPUART_MODIR_TNP(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_TNP_SHIFT)) & LPUART_MODIR_TNP_MASK)
  8064. #define LPUART_MODIR_IREN_MASK (0x40000U)
  8065. #define LPUART_MODIR_IREN_SHIFT (18U)
  8066. #define LPUART_MODIR_IREN(x) (((uint32_t)(((uint32_t)(x)) << LPUART_MODIR_IREN_SHIFT)) & LPUART_MODIR_IREN_MASK)
  8067. /*! @name FIFO - LPUART FIFO Register */
  8068. #define LPUART_FIFO_RXFIFOSIZE_MASK (0x7U)
  8069. #define LPUART_FIFO_RXFIFOSIZE_SHIFT (0U)
  8070. #define LPUART_FIFO_RXFIFOSIZE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXFIFOSIZE_SHIFT)) & LPUART_FIFO_RXFIFOSIZE_MASK)
  8071. #define LPUART_FIFO_RXFE_MASK (0x8U)
  8072. #define LPUART_FIFO_RXFE_SHIFT (3U)
  8073. #define LPUART_FIFO_RXFE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXFE_SHIFT)) & LPUART_FIFO_RXFE_MASK)
  8074. #define LPUART_FIFO_TXFIFOSIZE_MASK (0x70U)
  8075. #define LPUART_FIFO_TXFIFOSIZE_SHIFT (4U)
  8076. #define LPUART_FIFO_TXFIFOSIZE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXFIFOSIZE_SHIFT)) & LPUART_FIFO_TXFIFOSIZE_MASK)
  8077. #define LPUART_FIFO_TXFE_MASK (0x80U)
  8078. #define LPUART_FIFO_TXFE_SHIFT (7U)
  8079. #define LPUART_FIFO_TXFE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXFE_SHIFT)) & LPUART_FIFO_TXFE_MASK)
  8080. #define LPUART_FIFO_RXUFE_MASK (0x100U)
  8081. #define LPUART_FIFO_RXUFE_SHIFT (8U)
  8082. #define LPUART_FIFO_RXUFE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXUFE_SHIFT)) & LPUART_FIFO_RXUFE_MASK)
  8083. #define LPUART_FIFO_TXOFE_MASK (0x200U)
  8084. #define LPUART_FIFO_TXOFE_SHIFT (9U)
  8085. #define LPUART_FIFO_TXOFE(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXOFE_SHIFT)) & LPUART_FIFO_TXOFE_MASK)
  8086. #define LPUART_FIFO_RXIDEN_MASK (0x1C00U)
  8087. #define LPUART_FIFO_RXIDEN_SHIFT (10U)
  8088. #define LPUART_FIFO_RXIDEN(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXIDEN_SHIFT)) & LPUART_FIFO_RXIDEN_MASK)
  8089. #define LPUART_FIFO_RXFLUSH_MASK (0x4000U)
  8090. #define LPUART_FIFO_RXFLUSH_SHIFT (14U)
  8091. #define LPUART_FIFO_RXFLUSH(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXFLUSH_SHIFT)) & LPUART_FIFO_RXFLUSH_MASK)
  8092. #define LPUART_FIFO_TXFLUSH_MASK (0x8000U)
  8093. #define LPUART_FIFO_TXFLUSH_SHIFT (15U)
  8094. #define LPUART_FIFO_TXFLUSH(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXFLUSH_SHIFT)) & LPUART_FIFO_TXFLUSH_MASK)
  8095. #define LPUART_FIFO_RXUF_MASK (0x10000U)
  8096. #define LPUART_FIFO_RXUF_SHIFT (16U)
  8097. #define LPUART_FIFO_RXUF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXUF_SHIFT)) & LPUART_FIFO_RXUF_MASK)
  8098. #define LPUART_FIFO_TXOF_MASK (0x20000U)
  8099. #define LPUART_FIFO_TXOF_SHIFT (17U)
  8100. #define LPUART_FIFO_TXOF(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXOF_SHIFT)) & LPUART_FIFO_TXOF_MASK)
  8101. #define LPUART_FIFO_RXEMPT_MASK (0x400000U)
  8102. #define LPUART_FIFO_RXEMPT_SHIFT (22U)
  8103. #define LPUART_FIFO_RXEMPT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_RXEMPT_SHIFT)) & LPUART_FIFO_RXEMPT_MASK)
  8104. #define LPUART_FIFO_TXEMPT_MASK (0x800000U)
  8105. #define LPUART_FIFO_TXEMPT_SHIFT (23U)
  8106. #define LPUART_FIFO_TXEMPT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_FIFO_TXEMPT_SHIFT)) & LPUART_FIFO_TXEMPT_MASK)
  8107. /*! @name WATER - LPUART Watermark Register */
  8108. #define LPUART_WATER_TXWATER_MASK (0xFFU)
  8109. #define LPUART_WATER_TXWATER_SHIFT (0U)
  8110. #define LPUART_WATER_TXWATER(x) (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_TXWATER_SHIFT)) & LPUART_WATER_TXWATER_MASK)
  8111. #define LPUART_WATER_TXCOUNT_MASK (0xFF00U)
  8112. #define LPUART_WATER_TXCOUNT_SHIFT (8U)
  8113. #define LPUART_WATER_TXCOUNT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_TXCOUNT_SHIFT)) & LPUART_WATER_TXCOUNT_MASK)
  8114. #define LPUART_WATER_RXWATER_MASK (0xFF0000U)
  8115. #define LPUART_WATER_RXWATER_SHIFT (16U)
  8116. #define LPUART_WATER_RXWATER(x) (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_RXWATER_SHIFT)) & LPUART_WATER_RXWATER_MASK)
  8117. #define LPUART_WATER_RXCOUNT_MASK (0xFF000000U)
  8118. #define LPUART_WATER_RXCOUNT_SHIFT (24U)
  8119. #define LPUART_WATER_RXCOUNT(x) (((uint32_t)(((uint32_t)(x)) << LPUART_WATER_RXCOUNT_SHIFT)) & LPUART_WATER_RXCOUNT_MASK)
  8120. /*!
  8121. * @}
  8122. */ /* end of group LPUART_Register_Masks */
  8123. /* LPUART - Peripheral instance base addresses */
  8124. /** Peripheral LPUART0 base address */
  8125. #define LPUART0_BASE (0x400C4000u)
  8126. /** Peripheral LPUART0 base pointer */
  8127. #define LPUART0 ((LPUART_Type *)LPUART0_BASE)
  8128. /** Peripheral LPUART1 base address */
  8129. #define LPUART1_BASE (0x400C5000u)
  8130. /** Peripheral LPUART1 base pointer */
  8131. #define LPUART1 ((LPUART_Type *)LPUART1_BASE)
  8132. /** Peripheral LPUART2 base address */
  8133. #define LPUART2_BASE (0x400C6000u)
  8134. /** Peripheral LPUART2 base pointer */
  8135. #define LPUART2 ((LPUART_Type *)LPUART2_BASE)
  8136. /** Peripheral LPUART3 base address */
  8137. #define LPUART3_BASE (0x400C7000u)
  8138. /** Peripheral LPUART3 base pointer */
  8139. #define LPUART3 ((LPUART_Type *)LPUART3_BASE)
  8140. /** Peripheral LPUART4 base address */
  8141. #define LPUART4_BASE (0x400D6000u)
  8142. /** Peripheral LPUART4 base pointer */
  8143. #define LPUART4 ((LPUART_Type *)LPUART4_BASE)
  8144. /** Array initializer of LPUART peripheral base addresses */
  8145. #define LPUART_BASE_ADDRS { LPUART0_BASE, LPUART1_BASE, LPUART2_BASE, LPUART3_BASE, LPUART4_BASE }
  8146. /** Array initializer of LPUART peripheral base pointers */
  8147. #define LPUART_BASE_PTRS { LPUART0, LPUART1, LPUART2, LPUART3, LPUART4 }
  8148. /** Interrupt vectors for the LPUART peripheral type */
  8149. #define LPUART_RX_TX_IRQS { LPUART0_IRQn, LPUART1_IRQn, LPUART2_IRQn, LPUART3_IRQn, LPUART4_IRQn }
  8150. #define LPUART_ERR_IRQS { LPUART0_IRQn, LPUART1_IRQn, LPUART2_IRQn, LPUART3_IRQn, LPUART4_IRQn }
  8151. /*!
  8152. * @}
  8153. */ /* end of group LPUART_Peripheral_Access_Layer */
  8154. /* ----------------------------------------------------------------------------
  8155. -- LTC Peripheral Access Layer
  8156. ---------------------------------------------------------------------------- */
  8157. /*!
  8158. * @addtogroup LTC_Peripheral_Access_Layer LTC Peripheral Access Layer
  8159. * @{
  8160. */
  8161. /** LTC - Register Layout Typedef */
  8162. typedef struct {
  8163. union { /* offset: 0x0 */
  8164. __IO uint32_t MD; /**< LTC Mode Register (non-PKHA/non-RNG use), offset: 0x0 */
  8165. __IO uint32_t MDPK; /**< LTC Mode Register (PublicKey), offset: 0x0 */
  8166. };
  8167. uint8_t RESERVED_0[4];
  8168. __IO uint32_t KS; /**< LTC Key Size Register, offset: 0x8 */
  8169. uint8_t RESERVED_1[4];
  8170. __IO uint32_t DS; /**< LTC Data Size Register, offset: 0x10 */
  8171. uint8_t RESERVED_2[4];
  8172. __IO uint32_t ICVS; /**< LTC ICV Size Register, offset: 0x18 */
  8173. uint8_t RESERVED_3[20];
  8174. __O uint32_t COM; /**< LTC Command Register, offset: 0x30 */
  8175. __IO uint32_t CTL; /**< LTC Control Register, offset: 0x34 */
  8176. uint8_t RESERVED_4[8];
  8177. __O uint32_t CW; /**< LTC Clear Written Register, offset: 0x40 */
  8178. uint8_t RESERVED_5[4];
  8179. __IO uint32_t STA; /**< LTC Status Register, offset: 0x48 */
  8180. __I uint32_t ESTA; /**< LTC Error Status Register, offset: 0x4C */
  8181. uint8_t RESERVED_6[8];
  8182. __IO uint32_t AADSZ; /**< LTC AAD Size Register, offset: 0x58 */
  8183. uint8_t RESERVED_7[4];
  8184. __IO uint32_t IVSZ; /**< LTC IV Size Register, offset: 0x60 */
  8185. uint8_t RESERVED_8[4];
  8186. __O uint32_t DPAMS; /**< LTC DPA Mask Seed Register, offset: 0x68 */
  8187. uint8_t RESERVED_9[20];
  8188. __IO uint32_t PKASZ; /**< LTC PKHA A Size Register, offset: 0x80 */
  8189. uint8_t RESERVED_10[4];
  8190. __IO uint32_t PKBSZ; /**< LTC PKHA B Size Register, offset: 0x88 */
  8191. uint8_t RESERVED_11[4];
  8192. __IO uint32_t PKNSZ; /**< LTC PKHA N Size Register, offset: 0x90 */
  8193. uint8_t RESERVED_12[4];
  8194. __IO uint32_t PKESZ; /**< LTC PKHA E Size Register, offset: 0x98 */
  8195. uint8_t RESERVED_13[100];
  8196. __IO uint32_t CTX[16]; /**< LTC Context Register, array offset: 0x100, array step: 0x4 */
  8197. uint8_t RESERVED_14[192];
  8198. __IO uint32_t KEY[8]; /**< LTC Key Registers, array offset: 0x200, array step: 0x4 */
  8199. uint8_t RESERVED_15[720];
  8200. __I uint32_t VID1; /**< LTC Version ID Register, offset: 0x4F0 */
  8201. uint8_t RESERVED_16[4];
  8202. __I uint32_t CHAVID; /**< LTC CHA Version ID Register, offset: 0x4F8 */
  8203. uint8_t RESERVED_17[708];
  8204. __I uint32_t FIFOSTA; /**< LTC FIFO Status Register, offset: 0x7C0 */
  8205. uint8_t RESERVED_18[28];
  8206. __O uint32_t IFIFO; /**< LTC Input Data FIFO, offset: 0x7E0 */
  8207. uint8_t RESERVED_19[12];
  8208. __I uint32_t OFIFO; /**< LTC Output Data FIFO, offset: 0x7F0 */
  8209. uint8_t RESERVED_20[12];
  8210. union { /* offset: 0x800 */
  8211. uint32_t PKA[64]; /**< LTC PKHA A 0 Register..LTC PKHA A 63 Register, array offset: 0x800, array step: 0x4 */
  8212. struct { /* offset: 0x800 */
  8213. __IO uint32_t PKA0[16]; /**< LTC PKHA A0 0 Register..LTC PKHA A0 15 Register, array offset: 0x800, array step: 0x4 */
  8214. __IO uint32_t PKA1[16]; /**< LTC PKHA A1 0 Register..LTC PKHA A1 15 Register, array offset: 0x840, array step: 0x4 */
  8215. __IO uint32_t PKA2[16]; /**< LTC PKHA A2 0 Register..LTC PKHA A2 15 Register, array offset: 0x880, array step: 0x4 */
  8216. __IO uint32_t PKA3[16]; /**< LTC PKHA A3 0 Register..LTC PKHA A3 15 Register, array offset: 0x8C0, array step: 0x4 */
  8217. } PKA_SHORT;
  8218. };
  8219. uint8_t RESERVED_21[256];
  8220. union { /* offset: 0xA00 */
  8221. uint32_t PKB[64]; /**< LTC PKHA B 0 Register..LTC PKHA B 63 Register, array offset: 0xA00, array step: 0x4 */
  8222. struct { /* offset: 0xA00 */
  8223. __IO uint32_t PKB0[16]; /**< LTC PKHA B0 0 Register..LTC PKHA B0 15 Register, array offset: 0xA00, array step: 0x4 */
  8224. __IO uint32_t PKB1[16]; /**< LTC PKHA B1 0 Register..LTC PKHA B1 15 Register, array offset: 0xA40, array step: 0x4 */
  8225. __IO uint32_t PKB2[16]; /**< LTC PKHA B2 0 Register..LTC PKHA B2 15 Register, array offset: 0xA80, array step: 0x4 */
  8226. __IO uint32_t PKB3[16]; /**< LTC PKHA B3 0 Register..LTC PKHA B3 15 Register, array offset: 0xAC0, array step: 0x4 */
  8227. } PKB_SHORT;
  8228. };
  8229. uint8_t RESERVED_22[256];
  8230. union { /* offset: 0xC00 */
  8231. uint32_t PKN[64]; /**< LTC PKHA N 0 Register..LTC PKHA N 63 Register, array offset: 0xC00, array step: 0x4 */
  8232. struct { /* offset: 0xC00 */
  8233. __IO uint32_t PKN0[16]; /**< LTC PKHA N0 0 Register..LTC PKHA N0 15 Register, array offset: 0xC00, array step: 0x4 */
  8234. __IO uint32_t PKN1[16]; /**< LTC PKHA N1 0 Register..LTC PKHA N1 15 Register, array offset: 0xC40, array step: 0x4 */
  8235. __IO uint32_t PKN2[16]; /**< LTC PKHA N2 0 Register..LTC PKHA N2 15 Register, array offset: 0xC80, array step: 0x4 */
  8236. __IO uint32_t PKN3[16]; /**< LTC PKHA N3 0 Register..LTC PKHA N3 15 Register, array offset: 0xCC0, array step: 0x4 */
  8237. } PKN_SHORT;
  8238. };
  8239. uint8_t RESERVED_23[256];
  8240. union { /* offset: 0xE00 */
  8241. uint32_t PKE[64]; /**< LTC PKHA E 0 Register..LTC PKHA E 63 Register, array offset: 0xE00, array step: 0x4 */
  8242. struct { /* offset: 0xE00 */
  8243. __IO uint32_t PKE0[16]; /**< LTC PKHA E0 0 Register..LTC PKHA E0 15 Register, array offset: 0xE00, array step: 0x4 */
  8244. __IO uint32_t PKE1[16]; /**< LTC PKHA E1 0 Register..LTC PKHA E1 15 Register, array offset: 0xE40, array step: 0x4 */
  8245. __IO uint32_t PKE2[16]; /**< LTC PKHA E2 0 Register..LTC PKHA E2 15 Register, array offset: 0xE80, array step: 0x4 */
  8246. __IO uint32_t PKE3[16]; /**< LTC PKHA E3 0 Register..LTC PKHA E3 15 Register, array offset: 0xEC0, array step: 0x4 */
  8247. } PKE_SHORT;
  8248. };
  8249. } LTC_Type;
  8250. /* ----------------------------------------------------------------------------
  8251. -- LTC Register Masks
  8252. ---------------------------------------------------------------------------- */
  8253. /*!
  8254. * @addtogroup LTC_Register_Masks LTC Register Masks
  8255. * @{
  8256. */
  8257. /*! @name MD - LTC Mode Register (non-PKHA/non-RNG use) */
  8258. #define LTC_MD_ENC_MASK (0x1U)
  8259. #define LTC_MD_ENC_SHIFT (0U)
  8260. #define LTC_MD_ENC(x) (((uint32_t)(((uint32_t)(x)) << LTC_MD_ENC_SHIFT)) & LTC_MD_ENC_MASK)
  8261. #define LTC_MD_ICV_TEST_MASK (0x2U)
  8262. #define LTC_MD_ICV_TEST_SHIFT (1U)
  8263. #define LTC_MD_ICV_TEST(x) (((uint32_t)(((uint32_t)(x)) << LTC_MD_ICV_TEST_SHIFT)) & LTC_MD_ICV_TEST_MASK)
  8264. #define LTC_MD_AS_MASK (0xCU)
  8265. #define LTC_MD_AS_SHIFT (2U)
  8266. #define LTC_MD_AS(x) (((uint32_t)(((uint32_t)(x)) << LTC_MD_AS_SHIFT)) & LTC_MD_AS_MASK)
  8267. #define LTC_MD_AAI_MASK (0x1FF0U)
  8268. #define LTC_MD_AAI_SHIFT (4U)
  8269. #define LTC_MD_AAI(x) (((uint32_t)(((uint32_t)(x)) << LTC_MD_AAI_SHIFT)) & LTC_MD_AAI_MASK)
  8270. #define LTC_MD_ALG_MASK (0xFF0000U)
  8271. #define LTC_MD_ALG_SHIFT (16U)
  8272. #define LTC_MD_ALG(x) (((uint32_t)(((uint32_t)(x)) << LTC_MD_ALG_SHIFT)) & LTC_MD_ALG_MASK)
  8273. /*! @name MDPK - LTC Mode Register (PublicKey) */
  8274. #define LTC_MDPK_PKHA_MODE_LS_MASK (0xFFFU)
  8275. #define LTC_MDPK_PKHA_MODE_LS_SHIFT (0U)
  8276. #define LTC_MDPK_PKHA_MODE_LS(x) (((uint32_t)(((uint32_t)(x)) << LTC_MDPK_PKHA_MODE_LS_SHIFT)) & LTC_MDPK_PKHA_MODE_LS_MASK)
  8277. #define LTC_MDPK_PKHA_MODE_MS_MASK (0xF0000U)
  8278. #define LTC_MDPK_PKHA_MODE_MS_SHIFT (16U)
  8279. #define LTC_MDPK_PKHA_MODE_MS(x) (((uint32_t)(((uint32_t)(x)) << LTC_MDPK_PKHA_MODE_MS_SHIFT)) & LTC_MDPK_PKHA_MODE_MS_MASK)
  8280. #define LTC_MDPK_ALG_MASK (0xF00000U)
  8281. #define LTC_MDPK_ALG_SHIFT (20U)
  8282. #define LTC_MDPK_ALG(x) (((uint32_t)(((uint32_t)(x)) << LTC_MDPK_ALG_SHIFT)) & LTC_MDPK_ALG_MASK)
  8283. /*! @name KS - LTC Key Size Register */
  8284. #define LTC_KS_KS_MASK (0x3FU)
  8285. #define LTC_KS_KS_SHIFT (0U)
  8286. #define LTC_KS_KS(x) (((uint32_t)(((uint32_t)(x)) << LTC_KS_KS_SHIFT)) & LTC_KS_KS_MASK)
  8287. /*! @name DS - LTC Data Size Register */
  8288. #define LTC_DS_DS_MASK (0xFFFU)
  8289. #define LTC_DS_DS_SHIFT (0U)
  8290. #define LTC_DS_DS(x) (((uint32_t)(((uint32_t)(x)) << LTC_DS_DS_SHIFT)) & LTC_DS_DS_MASK)
  8291. /*! @name ICVS - LTC ICV Size Register */
  8292. #define LTC_ICVS_ICVS_MASK (0x1FU)
  8293. #define LTC_ICVS_ICVS_SHIFT (0U)
  8294. #define LTC_ICVS_ICVS(x) (((uint32_t)(((uint32_t)(x)) << LTC_ICVS_ICVS_SHIFT)) & LTC_ICVS_ICVS_MASK)
  8295. /*! @name COM - LTC Command Register */
  8296. #define LTC_COM_ALL_MASK (0x1U)
  8297. #define LTC_COM_ALL_SHIFT (0U)
  8298. #define LTC_COM_ALL(x) (((uint32_t)(((uint32_t)(x)) << LTC_COM_ALL_SHIFT)) & LTC_COM_ALL_MASK)
  8299. #define LTC_COM_AES_MASK (0x2U)
  8300. #define LTC_COM_AES_SHIFT (1U)
  8301. #define LTC_COM_AES(x) (((uint32_t)(((uint32_t)(x)) << LTC_COM_AES_SHIFT)) & LTC_COM_AES_MASK)
  8302. #define LTC_COM_DES_MASK (0x4U)
  8303. #define LTC_COM_DES_SHIFT (2U)
  8304. #define LTC_COM_DES(x) (((uint32_t)(((uint32_t)(x)) << LTC_COM_DES_SHIFT)) & LTC_COM_DES_MASK)
  8305. #define LTC_COM_PK_MASK (0x40U)
  8306. #define LTC_COM_PK_SHIFT (6U)
  8307. #define LTC_COM_PK(x) (((uint32_t)(((uint32_t)(x)) << LTC_COM_PK_SHIFT)) & LTC_COM_PK_MASK)
  8308. /*! @name CTL - LTC Control Register */
  8309. #define LTC_CTL_IM_MASK (0x1U)
  8310. #define LTC_CTL_IM_SHIFT (0U)
  8311. #define LTC_CTL_IM(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_IM_SHIFT)) & LTC_CTL_IM_MASK)
  8312. #define LTC_CTL_PDE_MASK (0x10U)
  8313. #define LTC_CTL_PDE_SHIFT (4U)
  8314. #define LTC_CTL_PDE(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_PDE_SHIFT)) & LTC_CTL_PDE_MASK)
  8315. #define LTC_CTL_IFE_MASK (0x100U)
  8316. #define LTC_CTL_IFE_SHIFT (8U)
  8317. #define LTC_CTL_IFE(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_IFE_SHIFT)) & LTC_CTL_IFE_MASK)
  8318. #define LTC_CTL_IFR_MASK (0x200U)
  8319. #define LTC_CTL_IFR_SHIFT (9U)
  8320. #define LTC_CTL_IFR(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_IFR_SHIFT)) & LTC_CTL_IFR_MASK)
  8321. #define LTC_CTL_OFE_MASK (0x1000U)
  8322. #define LTC_CTL_OFE_SHIFT (12U)
  8323. #define LTC_CTL_OFE(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_OFE_SHIFT)) & LTC_CTL_OFE_MASK)
  8324. #define LTC_CTL_OFR_MASK (0x2000U)
  8325. #define LTC_CTL_OFR_SHIFT (13U)
  8326. #define LTC_CTL_OFR(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_OFR_SHIFT)) & LTC_CTL_OFR_MASK)
  8327. #define LTC_CTL_IFS_MASK (0x10000U)
  8328. #define LTC_CTL_IFS_SHIFT (16U)
  8329. #define LTC_CTL_IFS(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_IFS_SHIFT)) & LTC_CTL_IFS_MASK)
  8330. #define LTC_CTL_OFS_MASK (0x20000U)
  8331. #define LTC_CTL_OFS_SHIFT (17U)
  8332. #define LTC_CTL_OFS(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_OFS_SHIFT)) & LTC_CTL_OFS_MASK)
  8333. #define LTC_CTL_KIS_MASK (0x100000U)
  8334. #define LTC_CTL_KIS_SHIFT (20U)
  8335. #define LTC_CTL_KIS(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_KIS_SHIFT)) & LTC_CTL_KIS_MASK)
  8336. #define LTC_CTL_KOS_MASK (0x200000U)
  8337. #define LTC_CTL_KOS_SHIFT (21U)
  8338. #define LTC_CTL_KOS(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_KOS_SHIFT)) & LTC_CTL_KOS_MASK)
  8339. #define LTC_CTL_CIS_MASK (0x400000U)
  8340. #define LTC_CTL_CIS_SHIFT (22U)
  8341. #define LTC_CTL_CIS(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_CIS_SHIFT)) & LTC_CTL_CIS_MASK)
  8342. #define LTC_CTL_COS_MASK (0x800000U)
  8343. #define LTC_CTL_COS_SHIFT (23U)
  8344. #define LTC_CTL_COS(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_COS_SHIFT)) & LTC_CTL_COS_MASK)
  8345. #define LTC_CTL_KAL_MASK (0x80000000U)
  8346. #define LTC_CTL_KAL_SHIFT (31U)
  8347. #define LTC_CTL_KAL(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTL_KAL_SHIFT)) & LTC_CTL_KAL_MASK)
  8348. /*! @name CW - LTC Clear Written Register */
  8349. #define LTC_CW_CM_MASK (0x1U)
  8350. #define LTC_CW_CM_SHIFT (0U)
  8351. #define LTC_CW_CM(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_CM_SHIFT)) & LTC_CW_CM_MASK)
  8352. #define LTC_CW_CDS_MASK (0x4U)
  8353. #define LTC_CW_CDS_SHIFT (2U)
  8354. #define LTC_CW_CDS(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_CDS_SHIFT)) & LTC_CW_CDS_MASK)
  8355. #define LTC_CW_CICV_MASK (0x8U)
  8356. #define LTC_CW_CICV_SHIFT (3U)
  8357. #define LTC_CW_CICV(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_CICV_SHIFT)) & LTC_CW_CICV_MASK)
  8358. #define LTC_CW_CCR_MASK (0x20U)
  8359. #define LTC_CW_CCR_SHIFT (5U)
  8360. #define LTC_CW_CCR(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_CCR_SHIFT)) & LTC_CW_CCR_MASK)
  8361. #define LTC_CW_CKR_MASK (0x40U)
  8362. #define LTC_CW_CKR_SHIFT (6U)
  8363. #define LTC_CW_CKR(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_CKR_SHIFT)) & LTC_CW_CKR_MASK)
  8364. #define LTC_CW_CPKA_MASK (0x1000U)
  8365. #define LTC_CW_CPKA_SHIFT (12U)
  8366. #define LTC_CW_CPKA(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_CPKA_SHIFT)) & LTC_CW_CPKA_MASK)
  8367. #define LTC_CW_CPKB_MASK (0x2000U)
  8368. #define LTC_CW_CPKB_SHIFT (13U)
  8369. #define LTC_CW_CPKB(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_CPKB_SHIFT)) & LTC_CW_CPKB_MASK)
  8370. #define LTC_CW_CPKN_MASK (0x4000U)
  8371. #define LTC_CW_CPKN_SHIFT (14U)
  8372. #define LTC_CW_CPKN(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_CPKN_SHIFT)) & LTC_CW_CPKN_MASK)
  8373. #define LTC_CW_CPKE_MASK (0x8000U)
  8374. #define LTC_CW_CPKE_SHIFT (15U)
  8375. #define LTC_CW_CPKE(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_CPKE_SHIFT)) & LTC_CW_CPKE_MASK)
  8376. #define LTC_CW_COF_MASK (0x40000000U)
  8377. #define LTC_CW_COF_SHIFT (30U)
  8378. #define LTC_CW_COF(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_COF_SHIFT)) & LTC_CW_COF_MASK)
  8379. #define LTC_CW_CIF_MASK (0x80000000U)
  8380. #define LTC_CW_CIF_SHIFT (31U)
  8381. #define LTC_CW_CIF(x) (((uint32_t)(((uint32_t)(x)) << LTC_CW_CIF_SHIFT)) & LTC_CW_CIF_MASK)
  8382. /*! @name STA - LTC Status Register */
  8383. #define LTC_STA_AB_MASK (0x2U)
  8384. #define LTC_STA_AB_SHIFT (1U)
  8385. #define LTC_STA_AB(x) (((uint32_t)(((uint32_t)(x)) << LTC_STA_AB_SHIFT)) & LTC_STA_AB_MASK)
  8386. #define LTC_STA_DB_MASK (0x4U)
  8387. #define LTC_STA_DB_SHIFT (2U)
  8388. #define LTC_STA_DB(x) (((uint32_t)(((uint32_t)(x)) << LTC_STA_DB_SHIFT)) & LTC_STA_DB_MASK)
  8389. #define LTC_STA_PB_MASK (0x40U)
  8390. #define LTC_STA_PB_SHIFT (6U)
  8391. #define LTC_STA_PB(x) (((uint32_t)(((uint32_t)(x)) << LTC_STA_PB_SHIFT)) & LTC_STA_PB_MASK)
  8392. #define LTC_STA_DI_MASK (0x10000U)
  8393. #define LTC_STA_DI_SHIFT (16U)
  8394. #define LTC_STA_DI(x) (((uint32_t)(((uint32_t)(x)) << LTC_STA_DI_SHIFT)) & LTC_STA_DI_MASK)
  8395. #define LTC_STA_EI_MASK (0x100000U)
  8396. #define LTC_STA_EI_SHIFT (20U)
  8397. #define LTC_STA_EI(x) (((uint32_t)(((uint32_t)(x)) << LTC_STA_EI_SHIFT)) & LTC_STA_EI_MASK)
  8398. #define LTC_STA_PKP_MASK (0x10000000U)
  8399. #define LTC_STA_PKP_SHIFT (28U)
  8400. #define LTC_STA_PKP(x) (((uint32_t)(((uint32_t)(x)) << LTC_STA_PKP_SHIFT)) & LTC_STA_PKP_MASK)
  8401. #define LTC_STA_PKO_MASK (0x20000000U)
  8402. #define LTC_STA_PKO_SHIFT (29U)
  8403. #define LTC_STA_PKO(x) (((uint32_t)(((uint32_t)(x)) << LTC_STA_PKO_SHIFT)) & LTC_STA_PKO_MASK)
  8404. #define LTC_STA_PKZ_MASK (0x40000000U)
  8405. #define LTC_STA_PKZ_SHIFT (30U)
  8406. #define LTC_STA_PKZ(x) (((uint32_t)(((uint32_t)(x)) << LTC_STA_PKZ_SHIFT)) & LTC_STA_PKZ_MASK)
  8407. /*! @name ESTA - LTC Error Status Register */
  8408. #define LTC_ESTA_ERRID1_MASK (0xFU)
  8409. #define LTC_ESTA_ERRID1_SHIFT (0U)
  8410. #define LTC_ESTA_ERRID1(x) (((uint32_t)(((uint32_t)(x)) << LTC_ESTA_ERRID1_SHIFT)) & LTC_ESTA_ERRID1_MASK)
  8411. #define LTC_ESTA_CL1_MASK (0xF00U)
  8412. #define LTC_ESTA_CL1_SHIFT (8U)
  8413. #define LTC_ESTA_CL1(x) (((uint32_t)(((uint32_t)(x)) << LTC_ESTA_CL1_SHIFT)) & LTC_ESTA_CL1_MASK)
  8414. /*! @name AADSZ - LTC AAD Size Register */
  8415. #define LTC_AADSZ_AADSZ_MASK (0xFU)
  8416. #define LTC_AADSZ_AADSZ_SHIFT (0U)
  8417. #define LTC_AADSZ_AADSZ(x) (((uint32_t)(((uint32_t)(x)) << LTC_AADSZ_AADSZ_SHIFT)) & LTC_AADSZ_AADSZ_MASK)
  8418. #define LTC_AADSZ_AL_MASK (0x80000000U)
  8419. #define LTC_AADSZ_AL_SHIFT (31U)
  8420. #define LTC_AADSZ_AL(x) (((uint32_t)(((uint32_t)(x)) << LTC_AADSZ_AL_SHIFT)) & LTC_AADSZ_AL_MASK)
  8421. /*! @name IVSZ - LTC IV Size Register */
  8422. #define LTC_IVSZ_IVSZ_MASK (0xFU)
  8423. #define LTC_IVSZ_IVSZ_SHIFT (0U)
  8424. #define LTC_IVSZ_IVSZ(x) (((uint32_t)(((uint32_t)(x)) << LTC_IVSZ_IVSZ_SHIFT)) & LTC_IVSZ_IVSZ_MASK)
  8425. #define LTC_IVSZ_IL_MASK (0x80000000U)
  8426. #define LTC_IVSZ_IL_SHIFT (31U)
  8427. #define LTC_IVSZ_IL(x) (((uint32_t)(((uint32_t)(x)) << LTC_IVSZ_IL_SHIFT)) & LTC_IVSZ_IL_MASK)
  8428. /*! @name DPAMS - LTC DPA Mask Seed Register */
  8429. #define LTC_DPAMS_DPAMS_MASK (0xFFFFFFFFU)
  8430. #define LTC_DPAMS_DPAMS_SHIFT (0U)
  8431. #define LTC_DPAMS_DPAMS(x) (((uint32_t)(((uint32_t)(x)) << LTC_DPAMS_DPAMS_SHIFT)) & LTC_DPAMS_DPAMS_MASK)
  8432. /*! @name PKASZ - LTC PKHA A Size Register */
  8433. #define LTC_PKASZ_PKASZ_MASK (0x1FFU)
  8434. #define LTC_PKASZ_PKASZ_SHIFT (0U)
  8435. #define LTC_PKASZ_PKASZ(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKASZ_PKASZ_SHIFT)) & LTC_PKASZ_PKASZ_MASK)
  8436. /*! @name PKBSZ - LTC PKHA B Size Register */
  8437. #define LTC_PKBSZ_PKBSZ_MASK (0x1FFU)
  8438. #define LTC_PKBSZ_PKBSZ_SHIFT (0U)
  8439. #define LTC_PKBSZ_PKBSZ(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKBSZ_PKBSZ_SHIFT)) & LTC_PKBSZ_PKBSZ_MASK)
  8440. /*! @name PKNSZ - LTC PKHA N Size Register */
  8441. #define LTC_PKNSZ_PKNSZ_MASK (0x1FFU)
  8442. #define LTC_PKNSZ_PKNSZ_SHIFT (0U)
  8443. #define LTC_PKNSZ_PKNSZ(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKNSZ_PKNSZ_SHIFT)) & LTC_PKNSZ_PKNSZ_MASK)
  8444. /*! @name PKESZ - LTC PKHA E Size Register */
  8445. #define LTC_PKESZ_PKESZ_MASK (0x1FFU)
  8446. #define LTC_PKESZ_PKESZ_SHIFT (0U)
  8447. #define LTC_PKESZ_PKESZ(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKESZ_PKESZ_SHIFT)) & LTC_PKESZ_PKESZ_MASK)
  8448. /*! @name CTX - LTC Context Register */
  8449. #define LTC_CTX_CTX_MASK (0xFFFFFFFFU)
  8450. #define LTC_CTX_CTX_SHIFT (0U)
  8451. #define LTC_CTX_CTX(x) (((uint32_t)(((uint32_t)(x)) << LTC_CTX_CTX_SHIFT)) & LTC_CTX_CTX_MASK)
  8452. /* The count of LTC_CTX */
  8453. #define LTC_CTX_COUNT (16U)
  8454. /*! @name KEY - LTC Key Registers */
  8455. #define LTC_KEY_KEY_MASK (0xFFFFFFFFU)
  8456. #define LTC_KEY_KEY_SHIFT (0U)
  8457. #define LTC_KEY_KEY(x) (((uint32_t)(((uint32_t)(x)) << LTC_KEY_KEY_SHIFT)) & LTC_KEY_KEY_MASK)
  8458. /* The count of LTC_KEY */
  8459. #define LTC_KEY_COUNT (8U)
  8460. /*! @name VID1 - LTC Version ID Register */
  8461. #define LTC_VID1_MIN_REV_MASK (0xFFU)
  8462. #define LTC_VID1_MIN_REV_SHIFT (0U)
  8463. #define LTC_VID1_MIN_REV(x) (((uint32_t)(((uint32_t)(x)) << LTC_VID1_MIN_REV_SHIFT)) & LTC_VID1_MIN_REV_MASK)
  8464. #define LTC_VID1_MAJ_REV_MASK (0xFF00U)
  8465. #define LTC_VID1_MAJ_REV_SHIFT (8U)
  8466. #define LTC_VID1_MAJ_REV(x) (((uint32_t)(((uint32_t)(x)) << LTC_VID1_MAJ_REV_SHIFT)) & LTC_VID1_MAJ_REV_MASK)
  8467. #define LTC_VID1_IP_ID_MASK (0xFFFF0000U)
  8468. #define LTC_VID1_IP_ID_SHIFT (16U)
  8469. #define LTC_VID1_IP_ID(x) (((uint32_t)(((uint32_t)(x)) << LTC_VID1_IP_ID_SHIFT)) & LTC_VID1_IP_ID_MASK)
  8470. /*! @name CHAVID - LTC CHA Version ID Register */
  8471. #define LTC_CHAVID_AESREV_MASK (0xFU)
  8472. #define LTC_CHAVID_AESREV_SHIFT (0U)
  8473. #define LTC_CHAVID_AESREV(x) (((uint32_t)(((uint32_t)(x)) << LTC_CHAVID_AESREV_SHIFT)) & LTC_CHAVID_AESREV_MASK)
  8474. #define LTC_CHAVID_AESVID_MASK (0xF0U)
  8475. #define LTC_CHAVID_AESVID_SHIFT (4U)
  8476. #define LTC_CHAVID_AESVID(x) (((uint32_t)(((uint32_t)(x)) << LTC_CHAVID_AESVID_SHIFT)) & LTC_CHAVID_AESVID_MASK)
  8477. #define LTC_CHAVID_DESREV_MASK (0xF00U)
  8478. #define LTC_CHAVID_DESREV_SHIFT (8U)
  8479. #define LTC_CHAVID_DESREV(x) (((uint32_t)(((uint32_t)(x)) << LTC_CHAVID_DESREV_SHIFT)) & LTC_CHAVID_DESREV_MASK)
  8480. #define LTC_CHAVID_DESVID_MASK (0xF000U)
  8481. #define LTC_CHAVID_DESVID_SHIFT (12U)
  8482. #define LTC_CHAVID_DESVID(x) (((uint32_t)(((uint32_t)(x)) << LTC_CHAVID_DESVID_SHIFT)) & LTC_CHAVID_DESVID_MASK)
  8483. #define LTC_CHAVID_PKHAREV_MASK (0xF0000U)
  8484. #define LTC_CHAVID_PKHAREV_SHIFT (16U)
  8485. #define LTC_CHAVID_PKHAREV(x) (((uint32_t)(((uint32_t)(x)) << LTC_CHAVID_PKHAREV_SHIFT)) & LTC_CHAVID_PKHAREV_MASK)
  8486. #define LTC_CHAVID_PKHAVID_MASK (0xF00000U)
  8487. #define LTC_CHAVID_PKHAVID_SHIFT (20U)
  8488. #define LTC_CHAVID_PKHAVID(x) (((uint32_t)(((uint32_t)(x)) << LTC_CHAVID_PKHAVID_SHIFT)) & LTC_CHAVID_PKHAVID_MASK)
  8489. /*! @name FIFOSTA - LTC FIFO Status Register */
  8490. #define LTC_FIFOSTA_IFL_MASK (0x7FU)
  8491. #define LTC_FIFOSTA_IFL_SHIFT (0U)
  8492. #define LTC_FIFOSTA_IFL(x) (((uint32_t)(((uint32_t)(x)) << LTC_FIFOSTA_IFL_SHIFT)) & LTC_FIFOSTA_IFL_MASK)
  8493. #define LTC_FIFOSTA_IFF_MASK (0x8000U)
  8494. #define LTC_FIFOSTA_IFF_SHIFT (15U)
  8495. #define LTC_FIFOSTA_IFF(x) (((uint32_t)(((uint32_t)(x)) << LTC_FIFOSTA_IFF_SHIFT)) & LTC_FIFOSTA_IFF_MASK)
  8496. #define LTC_FIFOSTA_OFL_MASK (0x7F0000U)
  8497. #define LTC_FIFOSTA_OFL_SHIFT (16U)
  8498. #define LTC_FIFOSTA_OFL(x) (((uint32_t)(((uint32_t)(x)) << LTC_FIFOSTA_OFL_SHIFT)) & LTC_FIFOSTA_OFL_MASK)
  8499. #define LTC_FIFOSTA_OFF_MASK (0x80000000U)
  8500. #define LTC_FIFOSTA_OFF_SHIFT (31U)
  8501. #define LTC_FIFOSTA_OFF(x) (((uint32_t)(((uint32_t)(x)) << LTC_FIFOSTA_OFF_SHIFT)) & LTC_FIFOSTA_OFF_MASK)
  8502. /*! @name IFIFO - LTC Input Data FIFO */
  8503. #define LTC_IFIFO_IFIFO_MASK (0xFFFFFFFFU)
  8504. #define LTC_IFIFO_IFIFO_SHIFT (0U)
  8505. #define LTC_IFIFO_IFIFO(x) (((uint32_t)(((uint32_t)(x)) << LTC_IFIFO_IFIFO_SHIFT)) & LTC_IFIFO_IFIFO_MASK)
  8506. /*! @name OFIFO - LTC Output Data FIFO */
  8507. #define LTC_OFIFO_OFIFO_MASK (0xFFFFFFFFU)
  8508. #define LTC_OFIFO_OFIFO_SHIFT (0U)
  8509. #define LTC_OFIFO_OFIFO(x) (((uint32_t)(((uint32_t)(x)) << LTC_OFIFO_OFIFO_SHIFT)) & LTC_OFIFO_OFIFO_MASK)
  8510. /* The count of LTC_PKA */
  8511. #define LTC_PKA_COUNT (64U)
  8512. /*! @name PKA0 - LTC PKHA A0 0 Register..LTC PKHA A0 15 Register */
  8513. #define LTC_PKA0_PKHA_A0_MASK (0xFFFFFFFFU)
  8514. #define LTC_PKA0_PKHA_A0_SHIFT (0U)
  8515. #define LTC_PKA0_PKHA_A0(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKA0_PKHA_A0_SHIFT)) & LTC_PKA0_PKHA_A0_MASK)
  8516. /* The count of LTC_PKA0 */
  8517. #define LTC_PKA0_COUNT (16U)
  8518. /*! @name PKA1 - LTC PKHA A1 0 Register..LTC PKHA A1 15 Register */
  8519. #define LTC_PKA1_PKHA_A1_MASK (0xFFFFFFFFU)
  8520. #define LTC_PKA1_PKHA_A1_SHIFT (0U)
  8521. #define LTC_PKA1_PKHA_A1(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKA1_PKHA_A1_SHIFT)) & LTC_PKA1_PKHA_A1_MASK)
  8522. /* The count of LTC_PKA1 */
  8523. #define LTC_PKA1_COUNT (16U)
  8524. /*! @name PKA2 - LTC PKHA A2 0 Register..LTC PKHA A2 15 Register */
  8525. #define LTC_PKA2_PKHA_A2_MASK (0xFFFFFFFFU)
  8526. #define LTC_PKA2_PKHA_A2_SHIFT (0U)
  8527. #define LTC_PKA2_PKHA_A2(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKA2_PKHA_A2_SHIFT)) & LTC_PKA2_PKHA_A2_MASK)
  8528. /* The count of LTC_PKA2 */
  8529. #define LTC_PKA2_COUNT (16U)
  8530. /*! @name PKA3 - LTC PKHA A3 0 Register..LTC PKHA A3 15 Register */
  8531. #define LTC_PKA3_PKHA_A3_MASK (0xFFFFFFFFU)
  8532. #define LTC_PKA3_PKHA_A3_SHIFT (0U)
  8533. #define LTC_PKA3_PKHA_A3(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKA3_PKHA_A3_SHIFT)) & LTC_PKA3_PKHA_A3_MASK)
  8534. /* The count of LTC_PKA3 */
  8535. #define LTC_PKA3_COUNT (16U)
  8536. /* The count of LTC_PKB */
  8537. #define LTC_PKB_COUNT (64U)
  8538. /*! @name PKB0 - LTC PKHA B0 0 Register..LTC PKHA B0 15 Register */
  8539. #define LTC_PKB0_PKHA_B0_MASK (0xFFFFFFFFU)
  8540. #define LTC_PKB0_PKHA_B0_SHIFT (0U)
  8541. #define LTC_PKB0_PKHA_B0(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKB0_PKHA_B0_SHIFT)) & LTC_PKB0_PKHA_B0_MASK)
  8542. /* The count of LTC_PKB0 */
  8543. #define LTC_PKB0_COUNT (16U)
  8544. /*! @name PKB1 - LTC PKHA B1 0 Register..LTC PKHA B1 15 Register */
  8545. #define LTC_PKB1_PKHA_B1_MASK (0xFFFFFFFFU)
  8546. #define LTC_PKB1_PKHA_B1_SHIFT (0U)
  8547. #define LTC_PKB1_PKHA_B1(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKB1_PKHA_B1_SHIFT)) & LTC_PKB1_PKHA_B1_MASK)
  8548. /* The count of LTC_PKB1 */
  8549. #define LTC_PKB1_COUNT (16U)
  8550. /*! @name PKB2 - LTC PKHA B2 0 Register..LTC PKHA B2 15 Register */
  8551. #define LTC_PKB2_PKHA_B2_MASK (0xFFFFFFFFU)
  8552. #define LTC_PKB2_PKHA_B2_SHIFT (0U)
  8553. #define LTC_PKB2_PKHA_B2(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKB2_PKHA_B2_SHIFT)) & LTC_PKB2_PKHA_B2_MASK)
  8554. /* The count of LTC_PKB2 */
  8555. #define LTC_PKB2_COUNT (16U)
  8556. /*! @name PKB3 - LTC PKHA B3 0 Register..LTC PKHA B3 15 Register */
  8557. #define LTC_PKB3_PKHA_B3_MASK (0xFFFFFFFFU)
  8558. #define LTC_PKB3_PKHA_B3_SHIFT (0U)
  8559. #define LTC_PKB3_PKHA_B3(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKB3_PKHA_B3_SHIFT)) & LTC_PKB3_PKHA_B3_MASK)
  8560. /* The count of LTC_PKB3 */
  8561. #define LTC_PKB3_COUNT (16U)
  8562. /* The count of LTC_PKN */
  8563. #define LTC_PKN_COUNT (64U)
  8564. /*! @name PKN0 - LTC PKHA N0 0 Register..LTC PKHA N0 15 Register */
  8565. #define LTC_PKN0_PKHA_N0_MASK (0xFFFFFFFFU)
  8566. #define LTC_PKN0_PKHA_N0_SHIFT (0U)
  8567. #define LTC_PKN0_PKHA_N0(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKN0_PKHA_N0_SHIFT)) & LTC_PKN0_PKHA_N0_MASK)
  8568. /* The count of LTC_PKN0 */
  8569. #define LTC_PKN0_COUNT (16U)
  8570. /*! @name PKN1 - LTC PKHA N1 0 Register..LTC PKHA N1 15 Register */
  8571. #define LTC_PKN1_PKHA_N1_MASK (0xFFFFFFFFU)
  8572. #define LTC_PKN1_PKHA_N1_SHIFT (0U)
  8573. #define LTC_PKN1_PKHA_N1(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKN1_PKHA_N1_SHIFT)) & LTC_PKN1_PKHA_N1_MASK)
  8574. /* The count of LTC_PKN1 */
  8575. #define LTC_PKN1_COUNT (16U)
  8576. /*! @name PKN2 - LTC PKHA N2 0 Register..LTC PKHA N2 15 Register */
  8577. #define LTC_PKN2_PKHA_N2_MASK (0xFFFFFFFFU)
  8578. #define LTC_PKN2_PKHA_N2_SHIFT (0U)
  8579. #define LTC_PKN2_PKHA_N2(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKN2_PKHA_N2_SHIFT)) & LTC_PKN2_PKHA_N2_MASK)
  8580. /* The count of LTC_PKN2 */
  8581. #define LTC_PKN2_COUNT (16U)
  8582. /*! @name PKN3 - LTC PKHA N3 0 Register..LTC PKHA N3 15 Register */
  8583. #define LTC_PKN3_PKHA_N3_MASK (0xFFFFFFFFU)
  8584. #define LTC_PKN3_PKHA_N3_SHIFT (0U)
  8585. #define LTC_PKN3_PKHA_N3(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKN3_PKHA_N3_SHIFT)) & LTC_PKN3_PKHA_N3_MASK)
  8586. /* The count of LTC_PKN3 */
  8587. #define LTC_PKN3_COUNT (16U)
  8588. /* The count of LTC_PKE */
  8589. #define LTC_PKE_COUNT (64U)
  8590. /*! @name PKE0 - LTC PKHA E0 0 Register..LTC PKHA E0 15 Register */
  8591. #define LTC_PKE0_PKHA_E0_MASK (0xFFFFFFFFU)
  8592. #define LTC_PKE0_PKHA_E0_SHIFT (0U)
  8593. #define LTC_PKE0_PKHA_E0(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKE0_PKHA_E0_SHIFT)) & LTC_PKE0_PKHA_E0_MASK)
  8594. /* The count of LTC_PKE0 */
  8595. #define LTC_PKE0_COUNT (16U)
  8596. /*! @name PKE1 - LTC PKHA E1 0 Register..LTC PKHA E1 15 Register */
  8597. #define LTC_PKE1_PKHA_E1_MASK (0xFFFFFFFFU)
  8598. #define LTC_PKE1_PKHA_E1_SHIFT (0U)
  8599. #define LTC_PKE1_PKHA_E1(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKE1_PKHA_E1_SHIFT)) & LTC_PKE1_PKHA_E1_MASK)
  8600. /* The count of LTC_PKE1 */
  8601. #define LTC_PKE1_COUNT (16U)
  8602. /*! @name PKE2 - LTC PKHA E2 0 Register..LTC PKHA E2 15 Register */
  8603. #define LTC_PKE2_PKHA_E2_MASK (0xFFFFFFFFU)
  8604. #define LTC_PKE2_PKHA_E2_SHIFT (0U)
  8605. #define LTC_PKE2_PKHA_E2(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKE2_PKHA_E2_SHIFT)) & LTC_PKE2_PKHA_E2_MASK)
  8606. /* The count of LTC_PKE2 */
  8607. #define LTC_PKE2_COUNT (16U)
  8608. /*! @name PKE3 - LTC PKHA E3 0 Register..LTC PKHA E3 15 Register */
  8609. #define LTC_PKE3_PKHA_E3_MASK (0xFFFFFFFFU)
  8610. #define LTC_PKE3_PKHA_E3_SHIFT (0U)
  8611. #define LTC_PKE3_PKHA_E3(x) (((uint32_t)(((uint32_t)(x)) << LTC_PKE3_PKHA_E3_SHIFT)) & LTC_PKE3_PKHA_E3_MASK)
  8612. /* The count of LTC_PKE3 */
  8613. #define LTC_PKE3_COUNT (16U)
  8614. /*!
  8615. * @}
  8616. */ /* end of group LTC_Register_Masks */
  8617. /* LTC - Peripheral instance base addresses */
  8618. /** Peripheral LTC0 base address */
  8619. #define LTC0_BASE (0x400D1000u)
  8620. /** Peripheral LTC0 base pointer */
  8621. #define LTC0 ((LTC_Type *)LTC0_BASE)
  8622. /** Array initializer of LTC peripheral base addresses */
  8623. #define LTC_BASE_ADDRS { LTC0_BASE }
  8624. /** Array initializer of LTC peripheral base pointers */
  8625. #define LTC_BASE_PTRS { LTC0 }
  8626. /** Interrupt vectors for the LTC peripheral type */
  8627. #define LTC_IRQS { LTC0_IRQn }
  8628. /*!
  8629. * @}
  8630. */ /* end of group LTC_Peripheral_Access_Layer */
  8631. /* ----------------------------------------------------------------------------
  8632. -- MCG Peripheral Access Layer
  8633. ---------------------------------------------------------------------------- */
  8634. /*!
  8635. * @addtogroup MCG_Peripheral_Access_Layer MCG Peripheral Access Layer
  8636. * @{
  8637. */
  8638. /** MCG - Register Layout Typedef */
  8639. typedef struct {
  8640. __IO uint8_t C1; /**< MCG Control 1 Register, offset: 0x0 */
  8641. __IO uint8_t C2; /**< MCG Control 2 Register, offset: 0x1 */
  8642. __IO uint8_t C3; /**< MCG Control 3 Register, offset: 0x2 */
  8643. __IO uint8_t C4; /**< MCG Control 4 Register, offset: 0x3 */
  8644. __IO uint8_t C5; /**< MCG Control 5 Register, offset: 0x4 */
  8645. __IO uint8_t C6; /**< MCG Control 6 Register, offset: 0x5 */
  8646. __IO uint8_t S; /**< MCG Status Register, offset: 0x6 */
  8647. uint8_t RESERVED_0[1];
  8648. __IO uint8_t SC; /**< MCG Status and Control Register, offset: 0x8 */
  8649. uint8_t RESERVED_1[1];
  8650. __IO uint8_t ATCVH; /**< MCG Auto Trim Compare Value High Register, offset: 0xA */
  8651. __IO uint8_t ATCVL; /**< MCG Auto Trim Compare Value Low Register, offset: 0xB */
  8652. __IO uint8_t C7; /**< MCG Control 7 Register, offset: 0xC */
  8653. __IO uint8_t C8; /**< MCG Control 8 Register, offset: 0xD */
  8654. } MCG_Type;
  8655. /* ----------------------------------------------------------------------------
  8656. -- MCG Register Masks
  8657. ---------------------------------------------------------------------------- */
  8658. /*!
  8659. * @addtogroup MCG_Register_Masks MCG Register Masks
  8660. * @{
  8661. */
  8662. /*! @name C1 - MCG Control 1 Register */
  8663. #define MCG_C1_IREFSTEN_MASK (0x1U)
  8664. #define MCG_C1_IREFSTEN_SHIFT (0U)
  8665. #define MCG_C1_IREFSTEN(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_IREFSTEN_SHIFT)) & MCG_C1_IREFSTEN_MASK)
  8666. #define MCG_C1_IRCLKEN_MASK (0x2U)
  8667. #define MCG_C1_IRCLKEN_SHIFT (1U)
  8668. #define MCG_C1_IRCLKEN(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_IRCLKEN_SHIFT)) & MCG_C1_IRCLKEN_MASK)
  8669. #define MCG_C1_IREFS_MASK (0x4U)
  8670. #define MCG_C1_IREFS_SHIFT (2U)
  8671. #define MCG_C1_IREFS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_IREFS_SHIFT)) & MCG_C1_IREFS_MASK)
  8672. #define MCG_C1_FRDIV_MASK (0x38U)
  8673. #define MCG_C1_FRDIV_SHIFT (3U)
  8674. #define MCG_C1_FRDIV(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_FRDIV_SHIFT)) & MCG_C1_FRDIV_MASK)
  8675. #define MCG_C1_CLKS_MASK (0xC0U)
  8676. #define MCG_C1_CLKS_SHIFT (6U)
  8677. #define MCG_C1_CLKS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_CLKS_SHIFT)) & MCG_C1_CLKS_MASK)
  8678. /*! @name C2 - MCG Control 2 Register */
  8679. #define MCG_C2_IRCS_MASK (0x1U)
  8680. #define MCG_C2_IRCS_SHIFT (0U)
  8681. #define MCG_C2_IRCS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_IRCS_SHIFT)) & MCG_C2_IRCS_MASK)
  8682. #define MCG_C2_LP_MASK (0x2U)
  8683. #define MCG_C2_LP_SHIFT (1U)
  8684. #define MCG_C2_LP(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_LP_SHIFT)) & MCG_C2_LP_MASK)
  8685. #define MCG_C2_EREFS_MASK (0x4U)
  8686. #define MCG_C2_EREFS_SHIFT (2U)
  8687. #define MCG_C2_EREFS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_EREFS_SHIFT)) & MCG_C2_EREFS_MASK)
  8688. #define MCG_C2_HGO_MASK (0x8U)
  8689. #define MCG_C2_HGO_SHIFT (3U)
  8690. #define MCG_C2_HGO(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_HGO_SHIFT)) & MCG_C2_HGO_MASK)
  8691. #define MCG_C2_RANGE_MASK (0x30U)
  8692. #define MCG_C2_RANGE_SHIFT (4U)
  8693. #define MCG_C2_RANGE(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_RANGE_SHIFT)) & MCG_C2_RANGE_MASK)
  8694. #define MCG_C2_FCFTRIM_MASK (0x40U)
  8695. #define MCG_C2_FCFTRIM_SHIFT (6U)
  8696. #define MCG_C2_FCFTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_FCFTRIM_SHIFT)) & MCG_C2_FCFTRIM_MASK)
  8697. #define MCG_C2_LOCRE0_MASK (0x80U)
  8698. #define MCG_C2_LOCRE0_SHIFT (7U)
  8699. #define MCG_C2_LOCRE0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_LOCRE0_SHIFT)) & MCG_C2_LOCRE0_MASK)
  8700. /*! @name C3 - MCG Control 3 Register */
  8701. #define MCG_C3_SCTRIM_MASK (0xFFU)
  8702. #define MCG_C3_SCTRIM_SHIFT (0U)
  8703. #define MCG_C3_SCTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C3_SCTRIM_SHIFT)) & MCG_C3_SCTRIM_MASK)
  8704. /*! @name C4 - MCG Control 4 Register */
  8705. #define MCG_C4_SCFTRIM_MASK (0x1U)
  8706. #define MCG_C4_SCFTRIM_SHIFT (0U)
  8707. #define MCG_C4_SCFTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_SCFTRIM_SHIFT)) & MCG_C4_SCFTRIM_MASK)
  8708. #define MCG_C4_FCTRIM_MASK (0x1EU)
  8709. #define MCG_C4_FCTRIM_SHIFT (1U)
  8710. #define MCG_C4_FCTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_FCTRIM_SHIFT)) & MCG_C4_FCTRIM_MASK)
  8711. #define MCG_C4_DRST_DRS_MASK (0x60U)
  8712. #define MCG_C4_DRST_DRS_SHIFT (5U)
  8713. #define MCG_C4_DRST_DRS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_DRST_DRS_SHIFT)) & MCG_C4_DRST_DRS_MASK)
  8714. #define MCG_C4_DMX32_MASK (0x80U)
  8715. #define MCG_C4_DMX32_SHIFT (7U)
  8716. #define MCG_C4_DMX32(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_DMX32_SHIFT)) & MCG_C4_DMX32_MASK)
  8717. /*! @name C5 - MCG Control 5 Register */
  8718. #define MCG_C5_PRDIV_MASK (0x7U)
  8719. #define MCG_C5_PRDIV_SHIFT (0U)
  8720. #define MCG_C5_PRDIV(x) (((uint8_t)(((uint8_t)(x)) << MCG_C5_PRDIV_SHIFT)) & MCG_C5_PRDIV_MASK)
  8721. #define MCG_C5_PLLSTEN_MASK (0x20U)
  8722. #define MCG_C5_PLLSTEN_SHIFT (5U)
  8723. #define MCG_C5_PLLSTEN(x) (((uint8_t)(((uint8_t)(x)) << MCG_C5_PLLSTEN_SHIFT)) & MCG_C5_PLLSTEN_MASK)
  8724. #define MCG_C5_PLLCLKEN_MASK (0x40U)
  8725. #define MCG_C5_PLLCLKEN_SHIFT (6U)
  8726. #define MCG_C5_PLLCLKEN(x) (((uint8_t)(((uint8_t)(x)) << MCG_C5_PLLCLKEN_SHIFT)) & MCG_C5_PLLCLKEN_MASK)
  8727. /*! @name C6 - MCG Control 6 Register */
  8728. #define MCG_C6_VDIV_MASK (0x1FU)
  8729. #define MCG_C6_VDIV_SHIFT (0U)
  8730. #define MCG_C6_VDIV(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_VDIV_SHIFT)) & MCG_C6_VDIV_MASK)
  8731. #define MCG_C6_CME0_MASK (0x20U)
  8732. #define MCG_C6_CME0_SHIFT (5U)
  8733. #define MCG_C6_CME0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_CME0_SHIFT)) & MCG_C6_CME0_MASK)
  8734. #define MCG_C6_PLLS_MASK (0x40U)
  8735. #define MCG_C6_PLLS_SHIFT (6U)
  8736. #define MCG_C6_PLLS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_PLLS_SHIFT)) & MCG_C6_PLLS_MASK)
  8737. #define MCG_C6_LOLIE0_MASK (0x80U)
  8738. #define MCG_C6_LOLIE0_SHIFT (7U)
  8739. #define MCG_C6_LOLIE0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_LOLIE0_SHIFT)) & MCG_C6_LOLIE0_MASK)
  8740. /*! @name S - MCG Status Register */
  8741. #define MCG_S_IRCST_MASK (0x1U)
  8742. #define MCG_S_IRCST_SHIFT (0U)
  8743. #define MCG_S_IRCST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_IRCST_SHIFT)) & MCG_S_IRCST_MASK)
  8744. #define MCG_S_OSCINIT0_MASK (0x2U)
  8745. #define MCG_S_OSCINIT0_SHIFT (1U)
  8746. #define MCG_S_OSCINIT0(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_OSCINIT0_SHIFT)) & MCG_S_OSCINIT0_MASK)
  8747. #define MCG_S_CLKST_MASK (0xCU)
  8748. #define MCG_S_CLKST_SHIFT (2U)
  8749. #define MCG_S_CLKST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_CLKST_SHIFT)) & MCG_S_CLKST_MASK)
  8750. #define MCG_S_IREFST_MASK (0x10U)
  8751. #define MCG_S_IREFST_SHIFT (4U)
  8752. #define MCG_S_IREFST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_IREFST_SHIFT)) & MCG_S_IREFST_MASK)
  8753. #define MCG_S_PLLST_MASK (0x20U)
  8754. #define MCG_S_PLLST_SHIFT (5U)
  8755. #define MCG_S_PLLST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_PLLST_SHIFT)) & MCG_S_PLLST_MASK)
  8756. #define MCG_S_LOCK0_MASK (0x40U)
  8757. #define MCG_S_LOCK0_SHIFT (6U)
  8758. #define MCG_S_LOCK0(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_LOCK0_SHIFT)) & MCG_S_LOCK0_MASK)
  8759. #define MCG_S_LOLS0_MASK (0x80U)
  8760. #define MCG_S_LOLS0_SHIFT (7U)
  8761. #define MCG_S_LOLS0(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_LOLS0_SHIFT)) & MCG_S_LOLS0_MASK)
  8762. /*! @name SC - MCG Status and Control Register */
  8763. #define MCG_SC_LOCS0_MASK (0x1U)
  8764. #define MCG_SC_LOCS0_SHIFT (0U)
  8765. #define MCG_SC_LOCS0(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_LOCS0_SHIFT)) & MCG_SC_LOCS0_MASK)
  8766. #define MCG_SC_FCRDIV_MASK (0xEU)
  8767. #define MCG_SC_FCRDIV_SHIFT (1U)
  8768. #define MCG_SC_FCRDIV(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_FCRDIV_SHIFT)) & MCG_SC_FCRDIV_MASK)
  8769. #define MCG_SC_FLTPRSRV_MASK (0x10U)
  8770. #define MCG_SC_FLTPRSRV_SHIFT (4U)
  8771. #define MCG_SC_FLTPRSRV(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_FLTPRSRV_SHIFT)) & MCG_SC_FLTPRSRV_MASK)
  8772. #define MCG_SC_ATMF_MASK (0x20U)
  8773. #define MCG_SC_ATMF_SHIFT (5U)
  8774. #define MCG_SC_ATMF(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_ATMF_SHIFT)) & MCG_SC_ATMF_MASK)
  8775. #define MCG_SC_ATMS_MASK (0x40U)
  8776. #define MCG_SC_ATMS_SHIFT (6U)
  8777. #define MCG_SC_ATMS(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_ATMS_SHIFT)) & MCG_SC_ATMS_MASK)
  8778. #define MCG_SC_ATME_MASK (0x80U)
  8779. #define MCG_SC_ATME_SHIFT (7U)
  8780. #define MCG_SC_ATME(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_ATME_SHIFT)) & MCG_SC_ATME_MASK)
  8781. /*! @name ATCVH - MCG Auto Trim Compare Value High Register */
  8782. #define MCG_ATCVH_ATCVH_MASK (0xFFU)
  8783. #define MCG_ATCVH_ATCVH_SHIFT (0U)
  8784. #define MCG_ATCVH_ATCVH(x) (((uint8_t)(((uint8_t)(x)) << MCG_ATCVH_ATCVH_SHIFT)) & MCG_ATCVH_ATCVH_MASK)
  8785. /*! @name ATCVL - MCG Auto Trim Compare Value Low Register */
  8786. #define MCG_ATCVL_ATCVL_MASK (0xFFU)
  8787. #define MCG_ATCVL_ATCVL_SHIFT (0U)
  8788. #define MCG_ATCVL_ATCVL(x) (((uint8_t)(((uint8_t)(x)) << MCG_ATCVL_ATCVL_SHIFT)) & MCG_ATCVL_ATCVL_MASK)
  8789. /*! @name C7 - MCG Control 7 Register */
  8790. #define MCG_C7_OSCSEL_MASK (0x3U)
  8791. #define MCG_C7_OSCSEL_SHIFT (0U)
  8792. #define MCG_C7_OSCSEL(x) (((uint8_t)(((uint8_t)(x)) << MCG_C7_OSCSEL_SHIFT)) & MCG_C7_OSCSEL_MASK)
  8793. /*! @name C8 - MCG Control 8 Register */
  8794. #define MCG_C8_LOCS1_MASK (0x1U)
  8795. #define MCG_C8_LOCS1_SHIFT (0U)
  8796. #define MCG_C8_LOCS1(x) (((uint8_t)(((uint8_t)(x)) << MCG_C8_LOCS1_SHIFT)) & MCG_C8_LOCS1_MASK)
  8797. #define MCG_C8_CME1_MASK (0x20U)
  8798. #define MCG_C8_CME1_SHIFT (5U)
  8799. #define MCG_C8_CME1(x) (((uint8_t)(((uint8_t)(x)) << MCG_C8_CME1_SHIFT)) & MCG_C8_CME1_MASK)
  8800. #define MCG_C8_LOLRE_MASK (0x40U)
  8801. #define MCG_C8_LOLRE_SHIFT (6U)
  8802. #define MCG_C8_LOLRE(x) (((uint8_t)(((uint8_t)(x)) << MCG_C8_LOLRE_SHIFT)) & MCG_C8_LOLRE_MASK)
  8803. #define MCG_C8_LOCRE1_MASK (0x80U)
  8804. #define MCG_C8_LOCRE1_SHIFT (7U)
  8805. #define MCG_C8_LOCRE1(x) (((uint8_t)(((uint8_t)(x)) << MCG_C8_LOCRE1_SHIFT)) & MCG_C8_LOCRE1_MASK)
  8806. /*!
  8807. * @}
  8808. */ /* end of group MCG_Register_Masks */
  8809. /* MCG - Peripheral instance base addresses */
  8810. /** Peripheral MCG base address */
  8811. #define MCG_BASE (0x40064000u)
  8812. /** Peripheral MCG base pointer */
  8813. #define MCG ((MCG_Type *)MCG_BASE)
  8814. /** Array initializer of MCG peripheral base addresses */
  8815. #define MCG_BASE_ADDRS { MCG_BASE }
  8816. /** Array initializer of MCG peripheral base pointers */
  8817. #define MCG_BASE_PTRS { MCG }
  8818. /** Interrupt vectors for the MCG peripheral type */
  8819. #define MCG_IRQS { MCG_IRQn }
  8820. /* MCG C5[PLLCLKEN0] backward compatibility */
  8821. #define MCG_C5_PLLCLKEN0_MASK (MCG_C5_PLLCLKEN_MASK)
  8822. #define MCG_C5_PLLCLKEN0_SHIFT (MCG_C5_PLLCLKEN_SHIFT)
  8823. #define MCG_C5_PLLCLKEN0_WIDTH (MCG_C5_PLLCLKEN_WIDTH)
  8824. #define MCG_C5_PLLCLKEN0(x) (MCG_C5_PLLCLKEN(x))
  8825. /* MCG C5[PLLSTEN0] backward compatibility */
  8826. #define MCG_C5_PLLSTEN0_MASK (MCG_C5_PLLSTEN_MASK)
  8827. #define MCG_C5_PLLSTEN0_SHIFT (MCG_C5_PLLSTEN_SHIFT)
  8828. #define MCG_C5_PLLSTEN0_WIDTH (MCG_C5_PLLSTEN_WIDTH)
  8829. #define MCG_C5_PLLSTEN0(x) (MCG_C5_PLLSTEN(x))
  8830. /* MCG C5[PRDIV0] backward compatibility */
  8831. #define MCG_C5_PRDIV0_MASK (MCG_C5_PRDIV_MASK)
  8832. #define MCG_C5_PRDIV0_SHIFT (MCG_C5_PRDIV_SHIFT)
  8833. #define MCG_C5_PRDIV0_WIDTH (MCG_C5_PRDIV_WIDTH)
  8834. #define MCG_C5_PRDIV0(x) (MCG_C5_PRDIV(x))
  8835. /* MCG C6[VDIV0] backward compatibility */
  8836. #define MCG_C6_VDIV0_MASK (MCG_C6_VDIV_MASK)
  8837. #define MCG_C6_VDIV0_SHIFT (MCG_C6_VDIV_SHIFT)
  8838. #define MCG_C6_VDIV0_WIDTH (MCG_C6_VDIV_WIDTH)
  8839. #define MCG_C6_VDIV0(x) (MCG_C6_VDIV(x))
  8840. /*!
  8841. * @}
  8842. */ /* end of group MCG_Peripheral_Access_Layer */
  8843. /* ----------------------------------------------------------------------------
  8844. -- MCM Peripheral Access Layer
  8845. ---------------------------------------------------------------------------- */
  8846. /*!
  8847. * @addtogroup MCM_Peripheral_Access_Layer MCM Peripheral Access Layer
  8848. * @{
  8849. */
  8850. /** MCM - Register Layout Typedef */
  8851. typedef struct {
  8852. uint8_t RESERVED_0[8];
  8853. __I uint16_t PLASC; /**< Crossbar Switch (AXBS) Slave Configuration, offset: 0x8 */
  8854. __I uint16_t PLAMC; /**< Crossbar Switch (AXBS) Master Configuration, offset: 0xA */
  8855. __IO uint32_t CR; /**< Control Register, offset: 0xC */
  8856. __IO uint32_t ISCR; /**< Interrupt Status Register, offset: 0x10 */
  8857. uint8_t RESERVED_1[12];
  8858. __I uint32_t FADR; /**< Fault address register, offset: 0x20 */
  8859. __I uint32_t FATR; /**< Fault attributes register, offset: 0x24 */
  8860. __I uint32_t FDR; /**< Fault data register, offset: 0x28 */
  8861. uint8_t RESERVED_2[4];
  8862. __IO uint32_t PID; /**< Process ID register, offset: 0x30 */
  8863. uint8_t RESERVED_3[12];
  8864. __IO uint32_t CPO; /**< Compute Operation Control Register, offset: 0x40 */
  8865. } MCM_Type;
  8866. /* ----------------------------------------------------------------------------
  8867. -- MCM Register Masks
  8868. ---------------------------------------------------------------------------- */
  8869. /*!
  8870. * @addtogroup MCM_Register_Masks MCM Register Masks
  8871. * @{
  8872. */
  8873. /*! @name PLASC - Crossbar Switch (AXBS) Slave Configuration */
  8874. #define MCM_PLASC_ASC_MASK (0xFFU)
  8875. #define MCM_PLASC_ASC_SHIFT (0U)
  8876. #define MCM_PLASC_ASC(x) (((uint16_t)(((uint16_t)(x)) << MCM_PLASC_ASC_SHIFT)) & MCM_PLASC_ASC_MASK)
  8877. /*! @name PLAMC - Crossbar Switch (AXBS) Master Configuration */
  8878. #define MCM_PLAMC_AMC_MASK (0xFFU)
  8879. #define MCM_PLAMC_AMC_SHIFT (0U)
  8880. #define MCM_PLAMC_AMC(x) (((uint16_t)(((uint16_t)(x)) << MCM_PLAMC_AMC_SHIFT)) & MCM_PLAMC_AMC_MASK)
  8881. /*! @name CR - Control Register */
  8882. #define MCM_CR_SRAMUAP_MASK (0x3000000U)
  8883. #define MCM_CR_SRAMUAP_SHIFT (24U)
  8884. #define MCM_CR_SRAMUAP(x) (((uint32_t)(((uint32_t)(x)) << MCM_CR_SRAMUAP_SHIFT)) & MCM_CR_SRAMUAP_MASK)
  8885. #define MCM_CR_SRAMUWP_MASK (0x4000000U)
  8886. #define MCM_CR_SRAMUWP_SHIFT (26U)
  8887. #define MCM_CR_SRAMUWP(x) (((uint32_t)(((uint32_t)(x)) << MCM_CR_SRAMUWP_SHIFT)) & MCM_CR_SRAMUWP_MASK)
  8888. #define MCM_CR_SRAMLAP_MASK (0x30000000U)
  8889. #define MCM_CR_SRAMLAP_SHIFT (28U)
  8890. #define MCM_CR_SRAMLAP(x) (((uint32_t)(((uint32_t)(x)) << MCM_CR_SRAMLAP_SHIFT)) & MCM_CR_SRAMLAP_MASK)
  8891. #define MCM_CR_SRAMLWP_MASK (0x40000000U)
  8892. #define MCM_CR_SRAMLWP_SHIFT (30U)
  8893. #define MCM_CR_SRAMLWP(x) (((uint32_t)(((uint32_t)(x)) << MCM_CR_SRAMLWP_SHIFT)) & MCM_CR_SRAMLWP_MASK)
  8894. /*! @name ISCR - Interrupt Status Register */
  8895. #define MCM_ISCR_FIOC_MASK (0x100U)
  8896. #define MCM_ISCR_FIOC_SHIFT (8U)
  8897. #define MCM_ISCR_FIOC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIOC_SHIFT)) & MCM_ISCR_FIOC_MASK)
  8898. #define MCM_ISCR_FDZC_MASK (0x200U)
  8899. #define MCM_ISCR_FDZC_SHIFT (9U)
  8900. #define MCM_ISCR_FDZC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FDZC_SHIFT)) & MCM_ISCR_FDZC_MASK)
  8901. #define MCM_ISCR_FOFC_MASK (0x400U)
  8902. #define MCM_ISCR_FOFC_SHIFT (10U)
  8903. #define MCM_ISCR_FOFC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FOFC_SHIFT)) & MCM_ISCR_FOFC_MASK)
  8904. #define MCM_ISCR_FUFC_MASK (0x800U)
  8905. #define MCM_ISCR_FUFC_SHIFT (11U)
  8906. #define MCM_ISCR_FUFC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FUFC_SHIFT)) & MCM_ISCR_FUFC_MASK)
  8907. #define MCM_ISCR_FIXC_MASK (0x1000U)
  8908. #define MCM_ISCR_FIXC_SHIFT (12U)
  8909. #define MCM_ISCR_FIXC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIXC_SHIFT)) & MCM_ISCR_FIXC_MASK)
  8910. #define MCM_ISCR_FIDC_MASK (0x8000U)
  8911. #define MCM_ISCR_FIDC_SHIFT (15U)
  8912. #define MCM_ISCR_FIDC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIDC_SHIFT)) & MCM_ISCR_FIDC_MASK)
  8913. #define MCM_ISCR_FIOCE_MASK (0x1000000U)
  8914. #define MCM_ISCR_FIOCE_SHIFT (24U)
  8915. #define MCM_ISCR_FIOCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIOCE_SHIFT)) & MCM_ISCR_FIOCE_MASK)
  8916. #define MCM_ISCR_FDZCE_MASK (0x2000000U)
  8917. #define MCM_ISCR_FDZCE_SHIFT (25U)
  8918. #define MCM_ISCR_FDZCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FDZCE_SHIFT)) & MCM_ISCR_FDZCE_MASK)
  8919. #define MCM_ISCR_FOFCE_MASK (0x4000000U)
  8920. #define MCM_ISCR_FOFCE_SHIFT (26U)
  8921. #define MCM_ISCR_FOFCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FOFCE_SHIFT)) & MCM_ISCR_FOFCE_MASK)
  8922. #define MCM_ISCR_FUFCE_MASK (0x8000000U)
  8923. #define MCM_ISCR_FUFCE_SHIFT (27U)
  8924. #define MCM_ISCR_FUFCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FUFCE_SHIFT)) & MCM_ISCR_FUFCE_MASK)
  8925. #define MCM_ISCR_FIXCE_MASK (0x10000000U)
  8926. #define MCM_ISCR_FIXCE_SHIFT (28U)
  8927. #define MCM_ISCR_FIXCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIXCE_SHIFT)) & MCM_ISCR_FIXCE_MASK)
  8928. #define MCM_ISCR_FIDCE_MASK (0x80000000U)
  8929. #define MCM_ISCR_FIDCE_SHIFT (31U)
  8930. #define MCM_ISCR_FIDCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIDCE_SHIFT)) & MCM_ISCR_FIDCE_MASK)
  8931. /*! @name FADR - Fault address register */
  8932. #define MCM_FADR_ADDRESS_MASK (0xFFFFFFFFU)
  8933. #define MCM_FADR_ADDRESS_SHIFT (0U)
  8934. #define MCM_FADR_ADDRESS(x) (((uint32_t)(((uint32_t)(x)) << MCM_FADR_ADDRESS_SHIFT)) & MCM_FADR_ADDRESS_MASK)
  8935. /*! @name FATR - Fault attributes register */
  8936. #define MCM_FATR_BEDA_MASK (0x1U)
  8937. #define MCM_FATR_BEDA_SHIFT (0U)
  8938. #define MCM_FATR_BEDA(x) (((uint32_t)(((uint32_t)(x)) << MCM_FATR_BEDA_SHIFT)) & MCM_FATR_BEDA_MASK)
  8939. #define MCM_FATR_BEMD_MASK (0x2U)
  8940. #define MCM_FATR_BEMD_SHIFT (1U)
  8941. #define MCM_FATR_BEMD(x) (((uint32_t)(((uint32_t)(x)) << MCM_FATR_BEMD_SHIFT)) & MCM_FATR_BEMD_MASK)
  8942. #define MCM_FATR_BESZ_MASK (0x30U)
  8943. #define MCM_FATR_BESZ_SHIFT (4U)
  8944. #define MCM_FATR_BESZ(x) (((uint32_t)(((uint32_t)(x)) << MCM_FATR_BESZ_SHIFT)) & MCM_FATR_BESZ_MASK)
  8945. #define MCM_FATR_BEWT_MASK (0x80U)
  8946. #define MCM_FATR_BEWT_SHIFT (7U)
  8947. #define MCM_FATR_BEWT(x) (((uint32_t)(((uint32_t)(x)) << MCM_FATR_BEWT_SHIFT)) & MCM_FATR_BEWT_MASK)
  8948. #define MCM_FATR_BEMN_MASK (0xF00U)
  8949. #define MCM_FATR_BEMN_SHIFT (8U)
  8950. #define MCM_FATR_BEMN(x) (((uint32_t)(((uint32_t)(x)) << MCM_FATR_BEMN_SHIFT)) & MCM_FATR_BEMN_MASK)
  8951. #define MCM_FATR_BEOVR_MASK (0x80000000U)
  8952. #define MCM_FATR_BEOVR_SHIFT (31U)
  8953. #define MCM_FATR_BEOVR(x) (((uint32_t)(((uint32_t)(x)) << MCM_FATR_BEOVR_SHIFT)) & MCM_FATR_BEOVR_MASK)
  8954. /*! @name FDR - Fault data register */
  8955. #define MCM_FDR_DATA_MASK (0xFFFFFFFFU)
  8956. #define MCM_FDR_DATA_SHIFT (0U)
  8957. #define MCM_FDR_DATA(x) (((uint32_t)(((uint32_t)(x)) << MCM_FDR_DATA_SHIFT)) & MCM_FDR_DATA_MASK)
  8958. /*! @name PID - Process ID register */
  8959. #define MCM_PID_PID_MASK (0xFFU)
  8960. #define MCM_PID_PID_SHIFT (0U)
  8961. #define MCM_PID_PID(x) (((uint32_t)(((uint32_t)(x)) << MCM_PID_PID_SHIFT)) & MCM_PID_PID_MASK)
  8962. /*! @name CPO - Compute Operation Control Register */
  8963. #define MCM_CPO_CPOREQ_MASK (0x1U)
  8964. #define MCM_CPO_CPOREQ_SHIFT (0U)
  8965. #define MCM_CPO_CPOREQ(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOREQ_SHIFT)) & MCM_CPO_CPOREQ_MASK)
  8966. #define MCM_CPO_CPOACK_MASK (0x2U)
  8967. #define MCM_CPO_CPOACK_SHIFT (1U)
  8968. #define MCM_CPO_CPOACK(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOACK_SHIFT)) & MCM_CPO_CPOACK_MASK)
  8969. #define MCM_CPO_CPOWOI_MASK (0x4U)
  8970. #define MCM_CPO_CPOWOI_SHIFT (2U)
  8971. #define MCM_CPO_CPOWOI(x) (((uint32_t)(((uint32_t)(x)) << MCM_CPO_CPOWOI_SHIFT)) & MCM_CPO_CPOWOI_MASK)
  8972. /*!
  8973. * @}
  8974. */ /* end of group MCM_Register_Masks */
  8975. /* MCM - Peripheral instance base addresses */
  8976. /** Peripheral MCM base address */
  8977. #define MCM_BASE (0xE0080000u)
  8978. /** Peripheral MCM base pointer */
  8979. #define MCM ((MCM_Type *)MCM_BASE)
  8980. /** Array initializer of MCM peripheral base addresses */
  8981. #define MCM_BASE_ADDRS { MCM_BASE }
  8982. /** Array initializer of MCM peripheral base pointers */
  8983. #define MCM_BASE_PTRS { MCM }
  8984. /** Interrupt vectors for the MCM peripheral type */
  8985. #define MCM_IRQS { MCM_IRQn }
  8986. /*!
  8987. * @}
  8988. */ /* end of group MCM_Peripheral_Access_Layer */
  8989. /* ----------------------------------------------------------------------------
  8990. -- NV Peripheral Access Layer
  8991. ---------------------------------------------------------------------------- */
  8992. /*!
  8993. * @addtogroup NV_Peripheral_Access_Layer NV Peripheral Access Layer
  8994. * @{
  8995. */
  8996. /** NV - Register Layout Typedef */
  8997. typedef struct {
  8998. __I uint8_t BACKKEY3; /**< Backdoor Comparison Key 3., offset: 0x0 */
  8999. __I uint8_t BACKKEY2; /**< Backdoor Comparison Key 2., offset: 0x1 */
  9000. __I uint8_t BACKKEY1; /**< Backdoor Comparison Key 1., offset: 0x2 */
  9001. __I uint8_t BACKKEY0; /**< Backdoor Comparison Key 0., offset: 0x3 */
  9002. __I uint8_t BACKKEY7; /**< Backdoor Comparison Key 7., offset: 0x4 */
  9003. __I uint8_t BACKKEY6; /**< Backdoor Comparison Key 6., offset: 0x5 */
  9004. __I uint8_t BACKKEY5; /**< Backdoor Comparison Key 5., offset: 0x6 */
  9005. __I uint8_t BACKKEY4; /**< Backdoor Comparison Key 4., offset: 0x7 */
  9006. __I uint8_t FPROT3; /**< Non-volatile P-Flash Protection 1 - Low Register, offset: 0x8 */
  9007. __I uint8_t FPROT2; /**< Non-volatile P-Flash Protection 1 - High Register, offset: 0x9 */
  9008. __I uint8_t FPROT1; /**< Non-volatile P-Flash Protection 0 - Low Register, offset: 0xA */
  9009. __I uint8_t FPROT0; /**< Non-volatile P-Flash Protection 0 - High Register, offset: 0xB */
  9010. __I uint8_t FSEC; /**< Non-volatile Flash Security Register, offset: 0xC */
  9011. __I uint8_t FOPT; /**< Non-volatile Flash Option Register, offset: 0xD */
  9012. } NV_Type;
  9013. /* ----------------------------------------------------------------------------
  9014. -- NV Register Masks
  9015. ---------------------------------------------------------------------------- */
  9016. /*!
  9017. * @addtogroup NV_Register_Masks NV Register Masks
  9018. * @{
  9019. */
  9020. /*! @name BACKKEY3 - Backdoor Comparison Key 3. */
  9021. #define NV_BACKKEY3_KEY_MASK (0xFFU)
  9022. #define NV_BACKKEY3_KEY_SHIFT (0U)
  9023. #define NV_BACKKEY3_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY3_KEY_SHIFT)) & NV_BACKKEY3_KEY_MASK)
  9024. /*! @name BACKKEY2 - Backdoor Comparison Key 2. */
  9025. #define NV_BACKKEY2_KEY_MASK (0xFFU)
  9026. #define NV_BACKKEY2_KEY_SHIFT (0U)
  9027. #define NV_BACKKEY2_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY2_KEY_SHIFT)) & NV_BACKKEY2_KEY_MASK)
  9028. /*! @name BACKKEY1 - Backdoor Comparison Key 1. */
  9029. #define NV_BACKKEY1_KEY_MASK (0xFFU)
  9030. #define NV_BACKKEY1_KEY_SHIFT (0U)
  9031. #define NV_BACKKEY1_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY1_KEY_SHIFT)) & NV_BACKKEY1_KEY_MASK)
  9032. /*! @name BACKKEY0 - Backdoor Comparison Key 0. */
  9033. #define NV_BACKKEY0_KEY_MASK (0xFFU)
  9034. #define NV_BACKKEY0_KEY_SHIFT (0U)
  9035. #define NV_BACKKEY0_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY0_KEY_SHIFT)) & NV_BACKKEY0_KEY_MASK)
  9036. /*! @name BACKKEY7 - Backdoor Comparison Key 7. */
  9037. #define NV_BACKKEY7_KEY_MASK (0xFFU)
  9038. #define NV_BACKKEY7_KEY_SHIFT (0U)
  9039. #define NV_BACKKEY7_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY7_KEY_SHIFT)) & NV_BACKKEY7_KEY_MASK)
  9040. /*! @name BACKKEY6 - Backdoor Comparison Key 6. */
  9041. #define NV_BACKKEY6_KEY_MASK (0xFFU)
  9042. #define NV_BACKKEY6_KEY_SHIFT (0U)
  9043. #define NV_BACKKEY6_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY6_KEY_SHIFT)) & NV_BACKKEY6_KEY_MASK)
  9044. /*! @name BACKKEY5 - Backdoor Comparison Key 5. */
  9045. #define NV_BACKKEY5_KEY_MASK (0xFFU)
  9046. #define NV_BACKKEY5_KEY_SHIFT (0U)
  9047. #define NV_BACKKEY5_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY5_KEY_SHIFT)) & NV_BACKKEY5_KEY_MASK)
  9048. /*! @name BACKKEY4 - Backdoor Comparison Key 4. */
  9049. #define NV_BACKKEY4_KEY_MASK (0xFFU)
  9050. #define NV_BACKKEY4_KEY_SHIFT (0U)
  9051. #define NV_BACKKEY4_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY4_KEY_SHIFT)) & NV_BACKKEY4_KEY_MASK)
  9052. /*! @name FPROT3 - Non-volatile P-Flash Protection 1 - Low Register */
  9053. #define NV_FPROT3_PROT_MASK (0xFFU)
  9054. #define NV_FPROT3_PROT_SHIFT (0U)
  9055. #define NV_FPROT3_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT3_PROT_SHIFT)) & NV_FPROT3_PROT_MASK)
  9056. /*! @name FPROT2 - Non-volatile P-Flash Protection 1 - High Register */
  9057. #define NV_FPROT2_PROT_MASK (0xFFU)
  9058. #define NV_FPROT2_PROT_SHIFT (0U)
  9059. #define NV_FPROT2_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT2_PROT_SHIFT)) & NV_FPROT2_PROT_MASK)
  9060. /*! @name FPROT1 - Non-volatile P-Flash Protection 0 - Low Register */
  9061. #define NV_FPROT1_PROT_MASK (0xFFU)
  9062. #define NV_FPROT1_PROT_SHIFT (0U)
  9063. #define NV_FPROT1_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT1_PROT_SHIFT)) & NV_FPROT1_PROT_MASK)
  9064. /*! @name FPROT0 - Non-volatile P-Flash Protection 0 - High Register */
  9065. #define NV_FPROT0_PROT_MASK (0xFFU)
  9066. #define NV_FPROT0_PROT_SHIFT (0U)
  9067. #define NV_FPROT0_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT0_PROT_SHIFT)) & NV_FPROT0_PROT_MASK)
  9068. /*! @name FSEC - Non-volatile Flash Security Register */
  9069. #define NV_FSEC_SEC_MASK (0x3U)
  9070. #define NV_FSEC_SEC_SHIFT (0U)
  9071. #define NV_FSEC_SEC(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_SEC_SHIFT)) & NV_FSEC_SEC_MASK)
  9072. #define NV_FSEC_FSLACC_MASK (0xCU)
  9073. #define NV_FSEC_FSLACC_SHIFT (2U)
  9074. #define NV_FSEC_FSLACC(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_FSLACC_SHIFT)) & NV_FSEC_FSLACC_MASK)
  9075. #define NV_FSEC_MEEN_MASK (0x30U)
  9076. #define NV_FSEC_MEEN_SHIFT (4U)
  9077. #define NV_FSEC_MEEN(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_MEEN_SHIFT)) & NV_FSEC_MEEN_MASK)
  9078. #define NV_FSEC_KEYEN_MASK (0xC0U)
  9079. #define NV_FSEC_KEYEN_SHIFT (6U)
  9080. #define NV_FSEC_KEYEN(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_KEYEN_SHIFT)) & NV_FSEC_KEYEN_MASK)
  9081. /*! @name FOPT - Non-volatile Flash Option Register */
  9082. #define NV_FOPT_LPBOOT_MASK (0x1U)
  9083. #define NV_FOPT_LPBOOT_SHIFT (0U)
  9084. #define NV_FOPT_LPBOOT(x) (((uint8_t)(((uint8_t)(x)) << NV_FOPT_LPBOOT_SHIFT)) & NV_FOPT_LPBOOT_MASK)
  9085. #define NV_FOPT_BOOTPIN_OPT_MASK (0x2U)
  9086. #define NV_FOPT_BOOTPIN_OPT_SHIFT (1U)
  9087. #define NV_FOPT_BOOTPIN_OPT(x) (((uint8_t)(((uint8_t)(x)) << NV_FOPT_BOOTPIN_OPT_SHIFT)) & NV_FOPT_BOOTPIN_OPT_MASK)
  9088. #define NV_FOPT_NMI_DIS_MASK (0x4U)
  9089. #define NV_FOPT_NMI_DIS_SHIFT (2U)
  9090. #define NV_FOPT_NMI_DIS(x) (((uint8_t)(((uint8_t)(x)) << NV_FOPT_NMI_DIS_SHIFT)) & NV_FOPT_NMI_DIS_MASK)
  9091. #define NV_FOPT_FAST_INIT_MASK (0x20U)
  9092. #define NV_FOPT_FAST_INIT_SHIFT (5U)
  9093. #define NV_FOPT_FAST_INIT(x) (((uint8_t)(((uint8_t)(x)) << NV_FOPT_FAST_INIT_SHIFT)) & NV_FOPT_FAST_INIT_MASK)
  9094. #define NV_FOPT_BOOTSRC_SEL_MASK (0xC0U)
  9095. #define NV_FOPT_BOOTSRC_SEL_SHIFT (6U)
  9096. #define NV_FOPT_BOOTSRC_SEL(x) (((uint8_t)(((uint8_t)(x)) << NV_FOPT_BOOTSRC_SEL_SHIFT)) & NV_FOPT_BOOTSRC_SEL_MASK)
  9097. /*!
  9098. * @}
  9099. */ /* end of group NV_Register_Masks */
  9100. /* NV - Peripheral instance base addresses */
  9101. /** Peripheral FTFA_FlashConfig base address */
  9102. #define FTFA_FlashConfig_BASE (0x400u)
  9103. /** Peripheral FTFA_FlashConfig base pointer */
  9104. #define FTFA_FlashConfig ((NV_Type *)FTFA_FlashConfig_BASE)
  9105. /** Array initializer of NV peripheral base addresses */
  9106. #define NV_BASE_ADDRS { FTFA_FlashConfig_BASE }
  9107. /** Array initializer of NV peripheral base pointers */
  9108. #define NV_BASE_PTRS { FTFA_FlashConfig }
  9109. /*!
  9110. * @}
  9111. */ /* end of group NV_Peripheral_Access_Layer */
  9112. /* ----------------------------------------------------------------------------
  9113. -- OSC Peripheral Access Layer
  9114. ---------------------------------------------------------------------------- */
  9115. /*!
  9116. * @addtogroup OSC_Peripheral_Access_Layer OSC Peripheral Access Layer
  9117. * @{
  9118. */
  9119. /** OSC - Register Layout Typedef */
  9120. typedef struct {
  9121. __IO uint8_t CR; /**< OSC Control Register, offset: 0x0 */
  9122. uint8_t RESERVED_0[1];
  9123. __IO uint8_t DIV; /**< OSC_DIV, offset: 0x2 */
  9124. } OSC_Type;
  9125. /* ----------------------------------------------------------------------------
  9126. -- OSC Register Masks
  9127. ---------------------------------------------------------------------------- */
  9128. /*!
  9129. * @addtogroup OSC_Register_Masks OSC Register Masks
  9130. * @{
  9131. */
  9132. /*! @name CR - OSC Control Register */
  9133. #define OSC_CR_SC16P_MASK (0x1U)
  9134. #define OSC_CR_SC16P_SHIFT (0U)
  9135. #define OSC_CR_SC16P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC16P_SHIFT)) & OSC_CR_SC16P_MASK)
  9136. #define OSC_CR_SC8P_MASK (0x2U)
  9137. #define OSC_CR_SC8P_SHIFT (1U)
  9138. #define OSC_CR_SC8P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC8P_SHIFT)) & OSC_CR_SC8P_MASK)
  9139. #define OSC_CR_SC4P_MASK (0x4U)
  9140. #define OSC_CR_SC4P_SHIFT (2U)
  9141. #define OSC_CR_SC4P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC4P_SHIFT)) & OSC_CR_SC4P_MASK)
  9142. #define OSC_CR_SC2P_MASK (0x8U)
  9143. #define OSC_CR_SC2P_SHIFT (3U)
  9144. #define OSC_CR_SC2P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC2P_SHIFT)) & OSC_CR_SC2P_MASK)
  9145. #define OSC_CR_EREFSTEN_MASK (0x20U)
  9146. #define OSC_CR_EREFSTEN_SHIFT (5U)
  9147. #define OSC_CR_EREFSTEN(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_EREFSTEN_SHIFT)) & OSC_CR_EREFSTEN_MASK)
  9148. #define OSC_CR_ERCLKEN_MASK (0x80U)
  9149. #define OSC_CR_ERCLKEN_SHIFT (7U)
  9150. #define OSC_CR_ERCLKEN(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_ERCLKEN_SHIFT)) & OSC_CR_ERCLKEN_MASK)
  9151. /*! @name DIV - OSC_DIV */
  9152. #define OSC_DIV_ERPS_MASK (0xC0U)
  9153. #define OSC_DIV_ERPS_SHIFT (6U)
  9154. #define OSC_DIV_ERPS(x) (((uint8_t)(((uint8_t)(x)) << OSC_DIV_ERPS_SHIFT)) & OSC_DIV_ERPS_MASK)
  9155. /*!
  9156. * @}
  9157. */ /* end of group OSC_Register_Masks */
  9158. /* OSC - Peripheral instance base addresses */
  9159. /** Peripheral OSC base address */
  9160. #define OSC_BASE (0x40065000u)
  9161. /** Peripheral OSC base pointer */
  9162. #define OSC ((OSC_Type *)OSC_BASE)
  9163. /** Array initializer of OSC peripheral base addresses */
  9164. #define OSC_BASE_ADDRS { OSC_BASE }
  9165. /** Array initializer of OSC peripheral base pointers */
  9166. #define OSC_BASE_PTRS { OSC }
  9167. /*!
  9168. * @}
  9169. */ /* end of group OSC_Peripheral_Access_Layer */
  9170. /* ----------------------------------------------------------------------------
  9171. -- OTFAD Peripheral Access Layer
  9172. ---------------------------------------------------------------------------- */
  9173. /*!
  9174. * @addtogroup OTFAD_Peripheral_Access_Layer OTFAD Peripheral Access Layer
  9175. * @{
  9176. */
  9177. /** OTFAD - Register Layout Typedef */
  9178. typedef struct {
  9179. __IO uint32_t CR; /**< Control Register, offset: 0x0 */
  9180. __I uint32_t SR; /**< Status Register, offset: 0x4 */
  9181. __IO uint32_t CRC; /**< Cyclic Redundancy Check Register, offset: 0x8 */
  9182. uint8_t RESERVED_0[244];
  9183. struct { /* offset: 0x100, array step: 0x40 */
  9184. __IO uint32_t CTX_KEY[4]; /**< AES Key Word0..AES Key Word3, array offset: 0x100, array step: index*0x40, index2*0x4 */
  9185. __IO uint32_t CTX_CTR[2]; /**< AES Counter Word0..AES Counter Word1, array offset: 0x110, array step: index*0x40, index2*0x4 */
  9186. __IO uint32_t CTX_RGD[2]; /**< AES Region Descriptor Word0..AES Region Descriptor Word1, array offset: 0x118, array step: index*0x40, index2*0x4 */
  9187. uint8_t RESERVED_0[32];
  9188. } CTX[4];
  9189. } OTFAD_Type;
  9190. /* ----------------------------------------------------------------------------
  9191. -- OTFAD Register Masks
  9192. ---------------------------------------------------------------------------- */
  9193. /*!
  9194. * @addtogroup OTFAD_Register_Masks OTFAD Register Masks
  9195. * @{
  9196. */
  9197. /*! @name CR - Control Register */
  9198. #define OTFAD_CR_FSVM_MASK (0x4U)
  9199. #define OTFAD_CR_FSVM_SHIFT (2U)
  9200. #define OTFAD_CR_FSVM(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CR_FSVM_SHIFT)) & OTFAD_CR_FSVM_MASK)
  9201. #define OTFAD_CR_FLDM_MASK (0x8U)
  9202. #define OTFAD_CR_FLDM_SHIFT (3U)
  9203. #define OTFAD_CR_FLDM(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CR_FLDM_SHIFT)) & OTFAD_CR_FLDM_MASK)
  9204. #define OTFAD_CR_RRAE_MASK (0x80U)
  9205. #define OTFAD_CR_RRAE_SHIFT (7U)
  9206. #define OTFAD_CR_RRAE(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CR_RRAE_SHIFT)) & OTFAD_CR_RRAE_MASK)
  9207. #define OTFAD_CR_CCTX_MASK (0x30000U)
  9208. #define OTFAD_CR_CCTX_SHIFT (16U)
  9209. #define OTFAD_CR_CCTX(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CR_CCTX_SHIFT)) & OTFAD_CR_CCTX_MASK)
  9210. #define OTFAD_CR_CRCE_MASK (0x100000U)
  9211. #define OTFAD_CR_CRCE_SHIFT (20U)
  9212. #define OTFAD_CR_CRCE(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CR_CRCE_SHIFT)) & OTFAD_CR_CRCE_MASK)
  9213. #define OTFAD_CR_CRCI_MASK (0x200000U)
  9214. #define OTFAD_CR_CRCI_SHIFT (21U)
  9215. #define OTFAD_CR_CRCI(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CR_CRCI_SHIFT)) & OTFAD_CR_CRCI_MASK)
  9216. #define OTFAD_CR_GE_MASK (0x80000000U)
  9217. #define OTFAD_CR_GE_SHIFT (31U)
  9218. #define OTFAD_CR_GE(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CR_GE_SHIFT)) & OTFAD_CR_GE_MASK)
  9219. /*! @name SR - Status Register */
  9220. #define OTFAD_SR_MDPCP_MASK (0x2U)
  9221. #define OTFAD_SR_MDPCP_SHIFT (1U)
  9222. #define OTFAD_SR_MDPCP(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_SR_MDPCP_SHIFT)) & OTFAD_SR_MDPCP_MASK)
  9223. #define OTFAD_SR_MODE_MASK (0xCU)
  9224. #define OTFAD_SR_MODE_SHIFT (2U)
  9225. #define OTFAD_SR_MODE(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_SR_MODE_SHIFT)) & OTFAD_SR_MODE_MASK)
  9226. #define OTFAD_SR_NCTX_MASK (0xF0U)
  9227. #define OTFAD_SR_NCTX_SHIFT (4U)
  9228. #define OTFAD_SR_NCTX(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_SR_NCTX_SHIFT)) & OTFAD_SR_NCTX_MASK)
  9229. #define OTFAD_SR_HRL_MASK (0xF000000U)
  9230. #define OTFAD_SR_HRL_SHIFT (24U)
  9231. #define OTFAD_SR_HRL(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_SR_HRL_SHIFT)) & OTFAD_SR_HRL_MASK)
  9232. #define OTFAD_SR_RRAM_MASK (0x10000000U)
  9233. #define OTFAD_SR_RRAM_SHIFT (28U)
  9234. #define OTFAD_SR_RRAM(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_SR_RRAM_SHIFT)) & OTFAD_SR_RRAM_MASK)
  9235. #define OTFAD_SR_GEM_MASK (0x20000000U)
  9236. #define OTFAD_SR_GEM_SHIFT (29U)
  9237. #define OTFAD_SR_GEM(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_SR_GEM_SHIFT)) & OTFAD_SR_GEM_MASK)
  9238. /*! @name CRC - Cyclic Redundancy Check Register */
  9239. #define OTFAD_CRC_CRCD_MASK (0xFFFFFFFFU)
  9240. #define OTFAD_CRC_CRCD_SHIFT (0U)
  9241. #define OTFAD_CRC_CRCD(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CRC_CRCD_SHIFT)) & OTFAD_CRC_CRCD_MASK)
  9242. /*! @name CTX_KEY - AES Key Word0..AES Key Word3 */
  9243. #define OTFAD_CTX_KEY_W0KEY_MASK (0xFFFFFFFFU)
  9244. #define OTFAD_CTX_KEY_W0KEY_SHIFT (0U)
  9245. #define OTFAD_CTX_KEY_W0KEY(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_KEY_W0KEY_SHIFT)) & OTFAD_CTX_KEY_W0KEY_MASK)
  9246. #define OTFAD_CTX_KEY_W1KEY_MASK (0xFFFFFFFFU)
  9247. #define OTFAD_CTX_KEY_W1KEY_SHIFT (0U)
  9248. #define OTFAD_CTX_KEY_W1KEY(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_KEY_W1KEY_SHIFT)) & OTFAD_CTX_KEY_W1KEY_MASK)
  9249. #define OTFAD_CTX_KEY_W2KEY_MASK (0xFFFFFFFFU)
  9250. #define OTFAD_CTX_KEY_W2KEY_SHIFT (0U)
  9251. #define OTFAD_CTX_KEY_W2KEY(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_KEY_W2KEY_SHIFT)) & OTFAD_CTX_KEY_W2KEY_MASK)
  9252. #define OTFAD_CTX_KEY_W3KEY_MASK (0xFFFFFFFFU)
  9253. #define OTFAD_CTX_KEY_W3KEY_SHIFT (0U)
  9254. #define OTFAD_CTX_KEY_W3KEY(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_KEY_W3KEY_SHIFT)) & OTFAD_CTX_KEY_W3KEY_MASK)
  9255. /* The count of OTFAD_CTX_KEY */
  9256. #define OTFAD_CTX_KEY_COUNT (4U)
  9257. /* The count of OTFAD_CTX_KEY */
  9258. #define OTFAD_CTX_KEY_COUNT2 (4U)
  9259. /*! @name CTX_CTR - AES Counter Word0..AES Counter Word1 */
  9260. #define OTFAD_CTX_CTR_W0CTR_MASK (0xFFFFFFFFU)
  9261. #define OTFAD_CTX_CTR_W0CTR_SHIFT (0U)
  9262. #define OTFAD_CTX_CTR_W0CTR(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_CTR_W0CTR_SHIFT)) & OTFAD_CTX_CTR_W0CTR_MASK)
  9263. #define OTFAD_CTX_CTR_W1CTR_MASK (0xFFFFFFFFU)
  9264. #define OTFAD_CTX_CTR_W1CTR_SHIFT (0U)
  9265. #define OTFAD_CTX_CTR_W1CTR(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_CTR_W1CTR_SHIFT)) & OTFAD_CTX_CTR_W1CTR_MASK)
  9266. /* The count of OTFAD_CTX_CTR */
  9267. #define OTFAD_CTX_CTR_COUNT (4U)
  9268. /* The count of OTFAD_CTX_CTR */
  9269. #define OTFAD_CTX_CTR_COUNT2 (2U)
  9270. /*! @name CTX_RGD - AES Region Descriptor Word0..AES Region Descriptor Word1 */
  9271. #define OTFAD_CTX_RGD_VLD_MASK (0x1U)
  9272. #define OTFAD_CTX_RGD_VLD_SHIFT (0U)
  9273. #define OTFAD_CTX_RGD_VLD(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_RGD_VLD_SHIFT)) & OTFAD_CTX_RGD_VLD_MASK)
  9274. #define OTFAD_CTX_RGD_ADE_MASK (0x2U)
  9275. #define OTFAD_CTX_RGD_ADE_SHIFT (1U)
  9276. #define OTFAD_CTX_RGD_ADE(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_RGD_ADE_SHIFT)) & OTFAD_CTX_RGD_ADE_MASK)
  9277. #define OTFAD_CTX_RGD_RO_MASK (0x4U)
  9278. #define OTFAD_CTX_RGD_RO_SHIFT (2U)
  9279. #define OTFAD_CTX_RGD_RO(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_RGD_RO_SHIFT)) & OTFAD_CTX_RGD_RO_MASK)
  9280. #define OTFAD_CTX_RGD_ENDADDR_MASK (0xFFFFFC00U)
  9281. #define OTFAD_CTX_RGD_ENDADDR_SHIFT (10U)
  9282. #define OTFAD_CTX_RGD_ENDADDR(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_RGD_ENDADDR_SHIFT)) & OTFAD_CTX_RGD_ENDADDR_MASK)
  9283. #define OTFAD_CTX_RGD_SRTADDR_MASK (0xFFFFFC00U)
  9284. #define OTFAD_CTX_RGD_SRTADDR_SHIFT (10U)
  9285. #define OTFAD_CTX_RGD_SRTADDR(x) (((uint32_t)(((uint32_t)(x)) << OTFAD_CTX_RGD_SRTADDR_SHIFT)) & OTFAD_CTX_RGD_SRTADDR_MASK)
  9286. /* The count of OTFAD_CTX_RGD */
  9287. #define OTFAD_CTX_RGD_COUNT (4U)
  9288. /* The count of OTFAD_CTX_RGD */
  9289. #define OTFAD_CTX_RGD_COUNT2 (2U)
  9290. /*!
  9291. * @}
  9292. */ /* end of group OTFAD_Register_Masks */
  9293. /* OTFAD - Peripheral instance base addresses */
  9294. /** Peripheral OTFAD base address */
  9295. #define OTFAD_BASE (0x400DAC00u)
  9296. /** Peripheral OTFAD base pointer */
  9297. #define OTFAD ((OTFAD_Type *)OTFAD_BASE)
  9298. /** Array initializer of OTFAD peripheral base addresses */
  9299. #define OTFAD_BASE_ADDRS { OTFAD_BASE }
  9300. /** Array initializer of OTFAD peripheral base pointers */
  9301. #define OTFAD_BASE_PTRS { OTFAD }
  9302. /*!
  9303. * @}
  9304. */ /* end of group OTFAD_Peripheral_Access_Layer */
  9305. /* ----------------------------------------------------------------------------
  9306. -- PDB Peripheral Access Layer
  9307. ---------------------------------------------------------------------------- */
  9308. /*!
  9309. * @addtogroup PDB_Peripheral_Access_Layer PDB Peripheral Access Layer
  9310. * @{
  9311. */
  9312. /** PDB - Register Layout Typedef */
  9313. typedef struct {
  9314. __IO uint32_t SC; /**< Status and Control register, offset: 0x0 */
  9315. __IO uint32_t MOD; /**< Modulus register, offset: 0x4 */
  9316. __I uint32_t CNT; /**< Counter register, offset: 0x8 */
  9317. __IO uint32_t IDLY; /**< Interrupt Delay register, offset: 0xC */
  9318. struct { /* offset: 0x10, array step: 0x10 */
  9319. __IO uint32_t C1; /**< Channel n Control register 1, array offset: 0x10, array step: 0x10 */
  9320. __IO uint32_t S; /**< Channel n Status register, array offset: 0x14, array step: 0x10 */
  9321. __IO uint32_t DLY[2]; /**< Channel n Delay 0 register..Channel n Delay 1 register, array offset: 0x18, array step: index*0x10, index2*0x4 */
  9322. } CH[1];
  9323. uint8_t RESERVED_0[304];
  9324. struct { /* offset: 0x150, array step: 0x8 */
  9325. __IO uint32_t INTC; /**< DAC Interval Trigger n Control register, array offset: 0x150, array step: 0x8 */
  9326. __IO uint32_t INT; /**< DAC Interval n register, array offset: 0x154, array step: 0x8 */
  9327. } DAC[1];
  9328. uint8_t RESERVED_1[56];
  9329. __IO uint32_t POEN; /**< Pulse-Out n Enable register, offset: 0x190 */
  9330. __IO uint32_t PODLY[2]; /**< Pulse-Out n Delay register, array offset: 0x194, array step: 0x4 */
  9331. } PDB_Type;
  9332. /* ----------------------------------------------------------------------------
  9333. -- PDB Register Masks
  9334. ---------------------------------------------------------------------------- */
  9335. /*!
  9336. * @addtogroup PDB_Register_Masks PDB Register Masks
  9337. * @{
  9338. */
  9339. /*! @name SC - Status and Control register */
  9340. #define PDB_SC_LDOK_MASK (0x1U)
  9341. #define PDB_SC_LDOK_SHIFT (0U)
  9342. #define PDB_SC_LDOK(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_LDOK_SHIFT)) & PDB_SC_LDOK_MASK)
  9343. #define PDB_SC_CONT_MASK (0x2U)
  9344. #define PDB_SC_CONT_SHIFT (1U)
  9345. #define PDB_SC_CONT(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_CONT_SHIFT)) & PDB_SC_CONT_MASK)
  9346. #define PDB_SC_MULT_MASK (0xCU)
  9347. #define PDB_SC_MULT_SHIFT (2U)
  9348. #define PDB_SC_MULT(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_MULT_SHIFT)) & PDB_SC_MULT_MASK)
  9349. #define PDB_SC_PDBIE_MASK (0x20U)
  9350. #define PDB_SC_PDBIE_SHIFT (5U)
  9351. #define PDB_SC_PDBIE(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBIE_SHIFT)) & PDB_SC_PDBIE_MASK)
  9352. #define PDB_SC_PDBIF_MASK (0x40U)
  9353. #define PDB_SC_PDBIF_SHIFT (6U)
  9354. #define PDB_SC_PDBIF(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBIF_SHIFT)) & PDB_SC_PDBIF_MASK)
  9355. #define PDB_SC_PDBEN_MASK (0x80U)
  9356. #define PDB_SC_PDBEN_SHIFT (7U)
  9357. #define PDB_SC_PDBEN(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBEN_SHIFT)) & PDB_SC_PDBEN_MASK)
  9358. #define PDB_SC_TRGSEL_MASK (0xF00U)
  9359. #define PDB_SC_TRGSEL_SHIFT (8U)
  9360. #define PDB_SC_TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_TRGSEL_SHIFT)) & PDB_SC_TRGSEL_MASK)
  9361. #define PDB_SC_PRESCALER_MASK (0x7000U)
  9362. #define PDB_SC_PRESCALER_SHIFT (12U)
  9363. #define PDB_SC_PRESCALER(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PRESCALER_SHIFT)) & PDB_SC_PRESCALER_MASK)
  9364. #define PDB_SC_DMAEN_MASK (0x8000U)
  9365. #define PDB_SC_DMAEN_SHIFT (15U)
  9366. #define PDB_SC_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_DMAEN_SHIFT)) & PDB_SC_DMAEN_MASK)
  9367. #define PDB_SC_SWTRIG_MASK (0x10000U)
  9368. #define PDB_SC_SWTRIG_SHIFT (16U)
  9369. #define PDB_SC_SWTRIG(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_SWTRIG_SHIFT)) & PDB_SC_SWTRIG_MASK)
  9370. #define PDB_SC_PDBEIE_MASK (0x20000U)
  9371. #define PDB_SC_PDBEIE_SHIFT (17U)
  9372. #define PDB_SC_PDBEIE(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBEIE_SHIFT)) & PDB_SC_PDBEIE_MASK)
  9373. #define PDB_SC_LDMOD_MASK (0xC0000U)
  9374. #define PDB_SC_LDMOD_SHIFT (18U)
  9375. #define PDB_SC_LDMOD(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_LDMOD_SHIFT)) & PDB_SC_LDMOD_MASK)
  9376. /*! @name MOD - Modulus register */
  9377. #define PDB_MOD_MOD_MASK (0xFFFFU)
  9378. #define PDB_MOD_MOD_SHIFT (0U)
  9379. #define PDB_MOD_MOD(x) (((uint32_t)(((uint32_t)(x)) << PDB_MOD_MOD_SHIFT)) & PDB_MOD_MOD_MASK)
  9380. /*! @name CNT - Counter register */
  9381. #define PDB_CNT_CNT_MASK (0xFFFFU)
  9382. #define PDB_CNT_CNT_SHIFT (0U)
  9383. #define PDB_CNT_CNT(x) (((uint32_t)(((uint32_t)(x)) << PDB_CNT_CNT_SHIFT)) & PDB_CNT_CNT_MASK)
  9384. /*! @name IDLY - Interrupt Delay register */
  9385. #define PDB_IDLY_IDLY_MASK (0xFFFFU)
  9386. #define PDB_IDLY_IDLY_SHIFT (0U)
  9387. #define PDB_IDLY_IDLY(x) (((uint32_t)(((uint32_t)(x)) << PDB_IDLY_IDLY_SHIFT)) & PDB_IDLY_IDLY_MASK)
  9388. /*! @name C1 - Channel n Control register 1 */
  9389. #define PDB_C1_EN_MASK (0xFFU)
  9390. #define PDB_C1_EN_SHIFT (0U)
  9391. #define PDB_C1_EN(x) (((uint32_t)(((uint32_t)(x)) << PDB_C1_EN_SHIFT)) & PDB_C1_EN_MASK)
  9392. #define PDB_C1_TOS_MASK (0xFF00U)
  9393. #define PDB_C1_TOS_SHIFT (8U)
  9394. #define PDB_C1_TOS(x) (((uint32_t)(((uint32_t)(x)) << PDB_C1_TOS_SHIFT)) & PDB_C1_TOS_MASK)
  9395. #define PDB_C1_BB_MASK (0xFF0000U)
  9396. #define PDB_C1_BB_SHIFT (16U)
  9397. #define PDB_C1_BB(x) (((uint32_t)(((uint32_t)(x)) << PDB_C1_BB_SHIFT)) & PDB_C1_BB_MASK)
  9398. /* The count of PDB_C1 */
  9399. #define PDB_C1_COUNT (1U)
  9400. /*! @name S - Channel n Status register */
  9401. #define PDB_S_ERR_MASK (0xFFU)
  9402. #define PDB_S_ERR_SHIFT (0U)
  9403. #define PDB_S_ERR(x) (((uint32_t)(((uint32_t)(x)) << PDB_S_ERR_SHIFT)) & PDB_S_ERR_MASK)
  9404. #define PDB_S_CF_MASK (0xFF0000U)
  9405. #define PDB_S_CF_SHIFT (16U)
  9406. #define PDB_S_CF(x) (((uint32_t)(((uint32_t)(x)) << PDB_S_CF_SHIFT)) & PDB_S_CF_MASK)
  9407. /* The count of PDB_S */
  9408. #define PDB_S_COUNT (1U)
  9409. /*! @name DLY - Channel n Delay 0 register..Channel n Delay 1 register */
  9410. #define PDB_DLY_DLY_MASK (0xFFFFU)
  9411. #define PDB_DLY_DLY_SHIFT (0U)
  9412. #define PDB_DLY_DLY(x) (((uint32_t)(((uint32_t)(x)) << PDB_DLY_DLY_SHIFT)) & PDB_DLY_DLY_MASK)
  9413. /* The count of PDB_DLY */
  9414. #define PDB_DLY_COUNT (1U)
  9415. /* The count of PDB_DLY */
  9416. #define PDB_DLY_COUNT2 (2U)
  9417. /*! @name INTC - DAC Interval Trigger n Control register */
  9418. #define PDB_INTC_TOE_MASK (0x1U)
  9419. #define PDB_INTC_TOE_SHIFT (0U)
  9420. #define PDB_INTC_TOE(x) (((uint32_t)(((uint32_t)(x)) << PDB_INTC_TOE_SHIFT)) & PDB_INTC_TOE_MASK)
  9421. #define PDB_INTC_EXT_MASK (0x2U)
  9422. #define PDB_INTC_EXT_SHIFT (1U)
  9423. #define PDB_INTC_EXT(x) (((uint32_t)(((uint32_t)(x)) << PDB_INTC_EXT_SHIFT)) & PDB_INTC_EXT_MASK)
  9424. /* The count of PDB_INTC */
  9425. #define PDB_INTC_COUNT (1U)
  9426. /*! @name INT - DAC Interval n register */
  9427. #define PDB_INT_INT_MASK (0xFFFFU)
  9428. #define PDB_INT_INT_SHIFT (0U)
  9429. #define PDB_INT_INT(x) (((uint32_t)(((uint32_t)(x)) << PDB_INT_INT_SHIFT)) & PDB_INT_INT_MASK)
  9430. /* The count of PDB_INT */
  9431. #define PDB_INT_COUNT (1U)
  9432. /*! @name POEN - Pulse-Out n Enable register */
  9433. #define PDB_POEN_POEN_MASK (0xFFU)
  9434. #define PDB_POEN_POEN_SHIFT (0U)
  9435. #define PDB_POEN_POEN(x) (((uint32_t)(((uint32_t)(x)) << PDB_POEN_POEN_SHIFT)) & PDB_POEN_POEN_MASK)
  9436. /*! @name PODLY - Pulse-Out n Delay register */
  9437. #define PDB_PODLY_DLY2_MASK (0xFFFFU)
  9438. #define PDB_PODLY_DLY2_SHIFT (0U)
  9439. #define PDB_PODLY_DLY2(x) (((uint32_t)(((uint32_t)(x)) << PDB_PODLY_DLY2_SHIFT)) & PDB_PODLY_DLY2_MASK)
  9440. #define PDB_PODLY_DLY1_MASK (0xFFFF0000U)
  9441. #define PDB_PODLY_DLY1_SHIFT (16U)
  9442. #define PDB_PODLY_DLY1(x) (((uint32_t)(((uint32_t)(x)) << PDB_PODLY_DLY1_SHIFT)) & PDB_PODLY_DLY1_MASK)
  9443. /* The count of PDB_PODLY */
  9444. #define PDB_PODLY_COUNT (2U)
  9445. /*!
  9446. * @}
  9447. */ /* end of group PDB_Register_Masks */
  9448. /* PDB - Peripheral instance base addresses */
  9449. /** Peripheral PDB0 base address */
  9450. #define PDB0_BASE (0x40036000u)
  9451. /** Peripheral PDB0 base pointer */
  9452. #define PDB0 ((PDB_Type *)PDB0_BASE)
  9453. /** Array initializer of PDB peripheral base addresses */
  9454. #define PDB_BASE_ADDRS { PDB0_BASE }
  9455. /** Array initializer of PDB peripheral base pointers */
  9456. #define PDB_BASE_PTRS { PDB0 }
  9457. /** Interrupt vectors for the PDB peripheral type */
  9458. #define PDB_IRQS { PDB0_IRQn }
  9459. /*!
  9460. * @}
  9461. */ /* end of group PDB_Peripheral_Access_Layer */
  9462. /* ----------------------------------------------------------------------------
  9463. -- PIT Peripheral Access Layer
  9464. ---------------------------------------------------------------------------- */
  9465. /*!
  9466. * @addtogroup PIT_Peripheral_Access_Layer PIT Peripheral Access Layer
  9467. * @{
  9468. */
  9469. /** PIT - Register Layout Typedef */
  9470. typedef struct {
  9471. __IO uint32_t MCR; /**< PIT Module Control Register, offset: 0x0 */
  9472. uint8_t RESERVED_0[220];
  9473. __I uint32_t LTMR64H; /**< PIT Upper Lifetime Timer Register, offset: 0xE0 */
  9474. __I uint32_t LTMR64L; /**< PIT Lower Lifetime Timer Register, offset: 0xE4 */
  9475. uint8_t RESERVED_1[24];
  9476. struct { /* offset: 0x100, array step: 0x10 */
  9477. __IO uint32_t LDVAL; /**< Timer Load Value Register, array offset: 0x100, array step: 0x10 */
  9478. __I uint32_t CVAL; /**< Current Timer Value Register, array offset: 0x104, array step: 0x10 */
  9479. __IO uint32_t TCTRL; /**< Timer Control Register, array offset: 0x108, array step: 0x10 */
  9480. __IO uint32_t TFLG; /**< Timer Flag Register, array offset: 0x10C, array step: 0x10 */
  9481. } CHANNEL[4];
  9482. } PIT_Type;
  9483. /* ----------------------------------------------------------------------------
  9484. -- PIT Register Masks
  9485. ---------------------------------------------------------------------------- */
  9486. /*!
  9487. * @addtogroup PIT_Register_Masks PIT Register Masks
  9488. * @{
  9489. */
  9490. /*! @name MCR - PIT Module Control Register */
  9491. #define PIT_MCR_FRZ_MASK (0x1U)
  9492. #define PIT_MCR_FRZ_SHIFT (0U)
  9493. #define PIT_MCR_FRZ(x) (((uint32_t)(((uint32_t)(x)) << PIT_MCR_FRZ_SHIFT)) & PIT_MCR_FRZ_MASK)
  9494. #define PIT_MCR_MDIS_MASK (0x2U)
  9495. #define PIT_MCR_MDIS_SHIFT (1U)
  9496. #define PIT_MCR_MDIS(x) (((uint32_t)(((uint32_t)(x)) << PIT_MCR_MDIS_SHIFT)) & PIT_MCR_MDIS_MASK)
  9497. /*! @name LTMR64H - PIT Upper Lifetime Timer Register */
  9498. #define PIT_LTMR64H_LTH_MASK (0xFFFFFFFFU)
  9499. #define PIT_LTMR64H_LTH_SHIFT (0U)
  9500. #define PIT_LTMR64H_LTH(x) (((uint32_t)(((uint32_t)(x)) << PIT_LTMR64H_LTH_SHIFT)) & PIT_LTMR64H_LTH_MASK)
  9501. /*! @name LTMR64L - PIT Lower Lifetime Timer Register */
  9502. #define PIT_LTMR64L_LTL_MASK (0xFFFFFFFFU)
  9503. #define PIT_LTMR64L_LTL_SHIFT (0U)
  9504. #define PIT_LTMR64L_LTL(x) (((uint32_t)(((uint32_t)(x)) << PIT_LTMR64L_LTL_SHIFT)) & PIT_LTMR64L_LTL_MASK)
  9505. /*! @name LDVAL - Timer Load Value Register */
  9506. #define PIT_LDVAL_TSV_MASK (0xFFFFFFFFU)
  9507. #define PIT_LDVAL_TSV_SHIFT (0U)
  9508. #define PIT_LDVAL_TSV(x) (((uint32_t)(((uint32_t)(x)) << PIT_LDVAL_TSV_SHIFT)) & PIT_LDVAL_TSV_MASK)
  9509. /* The count of PIT_LDVAL */
  9510. #define PIT_LDVAL_COUNT (4U)
  9511. /*! @name CVAL - Current Timer Value Register */
  9512. #define PIT_CVAL_TVL_MASK (0xFFFFFFFFU)
  9513. #define PIT_CVAL_TVL_SHIFT (0U)
  9514. #define PIT_CVAL_TVL(x) (((uint32_t)(((uint32_t)(x)) << PIT_CVAL_TVL_SHIFT)) & PIT_CVAL_TVL_MASK)
  9515. /* The count of PIT_CVAL */
  9516. #define PIT_CVAL_COUNT (4U)
  9517. /*! @name TCTRL - Timer Control Register */
  9518. #define PIT_TCTRL_TEN_MASK (0x1U)
  9519. #define PIT_TCTRL_TEN_SHIFT (0U)
  9520. #define PIT_TCTRL_TEN(x) (((uint32_t)(((uint32_t)(x)) << PIT_TCTRL_TEN_SHIFT)) & PIT_TCTRL_TEN_MASK)
  9521. #define PIT_TCTRL_TIE_MASK (0x2U)
  9522. #define PIT_TCTRL_TIE_SHIFT (1U)
  9523. #define PIT_TCTRL_TIE(x) (((uint32_t)(((uint32_t)(x)) << PIT_TCTRL_TIE_SHIFT)) & PIT_TCTRL_TIE_MASK)
  9524. #define PIT_TCTRL_CHN_MASK (0x4U)
  9525. #define PIT_TCTRL_CHN_SHIFT (2U)
  9526. #define PIT_TCTRL_CHN(x) (((uint32_t)(((uint32_t)(x)) << PIT_TCTRL_CHN_SHIFT)) & PIT_TCTRL_CHN_MASK)
  9527. /* The count of PIT_TCTRL */
  9528. #define PIT_TCTRL_COUNT (4U)
  9529. /*! @name TFLG - Timer Flag Register */
  9530. #define PIT_TFLG_TIF_MASK (0x1U)
  9531. #define PIT_TFLG_TIF_SHIFT (0U)
  9532. #define PIT_TFLG_TIF(x) (((uint32_t)(((uint32_t)(x)) << PIT_TFLG_TIF_SHIFT)) & PIT_TFLG_TIF_MASK)
  9533. /* The count of PIT_TFLG */
  9534. #define PIT_TFLG_COUNT (4U)
  9535. /*!
  9536. * @}
  9537. */ /* end of group PIT_Register_Masks */
  9538. /* PIT - Peripheral instance base addresses */
  9539. /** Peripheral PIT0 base address */
  9540. #define PIT0_BASE (0x40037000u)
  9541. /** Peripheral PIT0 base pointer */
  9542. #define PIT0 ((PIT_Type *)PIT0_BASE)
  9543. /** Array initializer of PIT peripheral base addresses */
  9544. #define PIT_BASE_ADDRS { PIT0_BASE }
  9545. /** Array initializer of PIT peripheral base pointers */
  9546. #define PIT_BASE_PTRS { PIT0 }
  9547. /** Interrupt vectors for the PIT peripheral type */
  9548. #define PIT_IRQS { { PIT0CH0_IRQn, PIT0CH1_IRQn, PIT0CH2_IRQn, PIT0CH3_IRQn } }
  9549. /*!
  9550. * @}
  9551. */ /* end of group PIT_Peripheral_Access_Layer */
  9552. /* ----------------------------------------------------------------------------
  9553. -- PMC Peripheral Access Layer
  9554. ---------------------------------------------------------------------------- */
  9555. /*!
  9556. * @addtogroup PMC_Peripheral_Access_Layer PMC Peripheral Access Layer
  9557. * @{
  9558. */
  9559. /** PMC - Register Layout Typedef */
  9560. typedef struct {
  9561. __IO uint8_t LVDSC1; /**< Low Voltage Detect Status And Control 1 register, offset: 0x0 */
  9562. __IO uint8_t LVDSC2; /**< Low Voltage Detect Status And Control 2 register, offset: 0x1 */
  9563. __IO uint8_t REGSC; /**< Regulator Status And Control register, offset: 0x2 */
  9564. uint8_t RESERVED_0[8];
  9565. __IO uint8_t HVDSC1; /**< High Voltage Detect Status And Control 1 register, offset: 0xB */
  9566. } PMC_Type;
  9567. /* ----------------------------------------------------------------------------
  9568. -- PMC Register Masks
  9569. ---------------------------------------------------------------------------- */
  9570. /*!
  9571. * @addtogroup PMC_Register_Masks PMC Register Masks
  9572. * @{
  9573. */
  9574. /*! @name LVDSC1 - Low Voltage Detect Status And Control 1 register */
  9575. #define PMC_LVDSC1_LVDV_MASK (0x3U)
  9576. #define PMC_LVDSC1_LVDV_SHIFT (0U)
  9577. #define PMC_LVDSC1_LVDV(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDV_SHIFT)) & PMC_LVDSC1_LVDV_MASK)
  9578. #define PMC_LVDSC1_LVDRE_MASK (0x10U)
  9579. #define PMC_LVDSC1_LVDRE_SHIFT (4U)
  9580. #define PMC_LVDSC1_LVDRE(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDRE_SHIFT)) & PMC_LVDSC1_LVDRE_MASK)
  9581. #define PMC_LVDSC1_LVDIE_MASK (0x20U)
  9582. #define PMC_LVDSC1_LVDIE_SHIFT (5U)
  9583. #define PMC_LVDSC1_LVDIE(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDIE_SHIFT)) & PMC_LVDSC1_LVDIE_MASK)
  9584. #define PMC_LVDSC1_LVDACK_MASK (0x40U)
  9585. #define PMC_LVDSC1_LVDACK_SHIFT (6U)
  9586. #define PMC_LVDSC1_LVDACK(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDACK_SHIFT)) & PMC_LVDSC1_LVDACK_MASK)
  9587. #define PMC_LVDSC1_LVDF_MASK (0x80U)
  9588. #define PMC_LVDSC1_LVDF_SHIFT (7U)
  9589. #define PMC_LVDSC1_LVDF(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDF_SHIFT)) & PMC_LVDSC1_LVDF_MASK)
  9590. /*! @name LVDSC2 - Low Voltage Detect Status And Control 2 register */
  9591. #define PMC_LVDSC2_LVWV_MASK (0x3U)
  9592. #define PMC_LVDSC2_LVWV_SHIFT (0U)
  9593. #define PMC_LVDSC2_LVWV(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWV_SHIFT)) & PMC_LVDSC2_LVWV_MASK)
  9594. #define PMC_LVDSC2_LVWIE_MASK (0x20U)
  9595. #define PMC_LVDSC2_LVWIE_SHIFT (5U)
  9596. #define PMC_LVDSC2_LVWIE(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWIE_SHIFT)) & PMC_LVDSC2_LVWIE_MASK)
  9597. #define PMC_LVDSC2_LVWACK_MASK (0x40U)
  9598. #define PMC_LVDSC2_LVWACK_SHIFT (6U)
  9599. #define PMC_LVDSC2_LVWACK(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWACK_SHIFT)) & PMC_LVDSC2_LVWACK_MASK)
  9600. #define PMC_LVDSC2_LVWF_MASK (0x80U)
  9601. #define PMC_LVDSC2_LVWF_SHIFT (7U)
  9602. #define PMC_LVDSC2_LVWF(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWF_SHIFT)) & PMC_LVDSC2_LVWF_MASK)
  9603. /*! @name REGSC - Regulator Status And Control register */
  9604. #define PMC_REGSC_BGBE_MASK (0x1U)
  9605. #define PMC_REGSC_BGBE_SHIFT (0U)
  9606. #define PMC_REGSC_BGBE(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_BGBE_SHIFT)) & PMC_REGSC_BGBE_MASK)
  9607. #define PMC_REGSC_REGONS_MASK (0x4U)
  9608. #define PMC_REGSC_REGONS_SHIFT (2U)
  9609. #define PMC_REGSC_REGONS(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_REGONS_SHIFT)) & PMC_REGSC_REGONS_MASK)
  9610. #define PMC_REGSC_ACKISO_MASK (0x8U)
  9611. #define PMC_REGSC_ACKISO_SHIFT (3U)
  9612. #define PMC_REGSC_ACKISO(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_ACKISO_SHIFT)) & PMC_REGSC_ACKISO_MASK)
  9613. #define PMC_REGSC_BGEN_MASK (0x10U)
  9614. #define PMC_REGSC_BGEN_SHIFT (4U)
  9615. #define PMC_REGSC_BGEN(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_BGEN_SHIFT)) & PMC_REGSC_BGEN_MASK)
  9616. /*! @name HVDSC1 - High Voltage Detect Status And Control 1 register */
  9617. #define PMC_HVDSC1_HVDV_MASK (0x1U)
  9618. #define PMC_HVDSC1_HVDV_SHIFT (0U)
  9619. #define PMC_HVDSC1_HVDV(x) (((uint8_t)(((uint8_t)(x)) << PMC_HVDSC1_HVDV_SHIFT)) & PMC_HVDSC1_HVDV_MASK)
  9620. #define PMC_HVDSC1_HVDRE_MASK (0x10U)
  9621. #define PMC_HVDSC1_HVDRE_SHIFT (4U)
  9622. #define PMC_HVDSC1_HVDRE(x) (((uint8_t)(((uint8_t)(x)) << PMC_HVDSC1_HVDRE_SHIFT)) & PMC_HVDSC1_HVDRE_MASK)
  9623. #define PMC_HVDSC1_HVDIE_MASK (0x20U)
  9624. #define PMC_HVDSC1_HVDIE_SHIFT (5U)
  9625. #define PMC_HVDSC1_HVDIE(x) (((uint8_t)(((uint8_t)(x)) << PMC_HVDSC1_HVDIE_SHIFT)) & PMC_HVDSC1_HVDIE_MASK)
  9626. #define PMC_HVDSC1_HVDACK_MASK (0x40U)
  9627. #define PMC_HVDSC1_HVDACK_SHIFT (6U)
  9628. #define PMC_HVDSC1_HVDACK(x) (((uint8_t)(((uint8_t)(x)) << PMC_HVDSC1_HVDACK_SHIFT)) & PMC_HVDSC1_HVDACK_MASK)
  9629. #define PMC_HVDSC1_HVDF_MASK (0x80U)
  9630. #define PMC_HVDSC1_HVDF_SHIFT (7U)
  9631. #define PMC_HVDSC1_HVDF(x) (((uint8_t)(((uint8_t)(x)) << PMC_HVDSC1_HVDF_SHIFT)) & PMC_HVDSC1_HVDF_MASK)
  9632. /*!
  9633. * @}
  9634. */ /* end of group PMC_Register_Masks */
  9635. /* PMC - Peripheral instance base addresses */
  9636. /** Peripheral PMC base address */
  9637. #define PMC_BASE (0x4007D000u)
  9638. /** Peripheral PMC base pointer */
  9639. #define PMC ((PMC_Type *)PMC_BASE)
  9640. /** Array initializer of PMC peripheral base addresses */
  9641. #define PMC_BASE_ADDRS { PMC_BASE }
  9642. /** Array initializer of PMC peripheral base pointers */
  9643. #define PMC_BASE_PTRS { PMC }
  9644. /** Interrupt vectors for the PMC peripheral type */
  9645. #define PMC_IRQS { LVD_LVW_IRQn }
  9646. /*!
  9647. * @}
  9648. */ /* end of group PMC_Peripheral_Access_Layer */
  9649. /* ----------------------------------------------------------------------------
  9650. -- PORT Peripheral Access Layer
  9651. ---------------------------------------------------------------------------- */
  9652. /*!
  9653. * @addtogroup PORT_Peripheral_Access_Layer PORT Peripheral Access Layer
  9654. * @{
  9655. */
  9656. /** PORT - Register Layout Typedef */
  9657. typedef struct {
  9658. __IO uint32_t PCR[32]; /**< Pin Control Register n, array offset: 0x0, array step: 0x4 */
  9659. __O uint32_t GPCLR; /**< Global Pin Control Low Register, offset: 0x80 */
  9660. __O uint32_t GPCHR; /**< Global Pin Control High Register, offset: 0x84 */
  9661. uint8_t RESERVED_0[24];
  9662. __IO uint32_t ISFR; /**< Interrupt Status Flag Register, offset: 0xA0 */
  9663. uint8_t RESERVED_1[28];
  9664. __IO uint32_t DFER; /**< Digital Filter Enable Register, offset: 0xC0 */
  9665. __IO uint32_t DFCR; /**< Digital Filter Clock Register, offset: 0xC4 */
  9666. __IO uint32_t DFWR; /**< Digital Filter Width Register, offset: 0xC8 */
  9667. } PORT_Type;
  9668. /* ----------------------------------------------------------------------------
  9669. -- PORT Register Masks
  9670. ---------------------------------------------------------------------------- */
  9671. /*!
  9672. * @addtogroup PORT_Register_Masks PORT Register Masks
  9673. * @{
  9674. */
  9675. /*! @name PCR - Pin Control Register n */
  9676. #define PORT_PCR_PS_MASK (0x1U)
  9677. #define PORT_PCR_PS_SHIFT (0U)
  9678. #define PORT_PCR_PS(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PS_SHIFT)) & PORT_PCR_PS_MASK)
  9679. #define PORT_PCR_PE_MASK (0x2U)
  9680. #define PORT_PCR_PE_SHIFT (1U)
  9681. #define PORT_PCR_PE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PE_SHIFT)) & PORT_PCR_PE_MASK)
  9682. #define PORT_PCR_SRE_MASK (0x4U)
  9683. #define PORT_PCR_SRE_SHIFT (2U)
  9684. #define PORT_PCR_SRE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_SRE_SHIFT)) & PORT_PCR_SRE_MASK)
  9685. #define PORT_PCR_PFE_MASK (0x10U)
  9686. #define PORT_PCR_PFE_SHIFT (4U)
  9687. #define PORT_PCR_PFE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PFE_SHIFT)) & PORT_PCR_PFE_MASK)
  9688. #define PORT_PCR_ODE_MASK (0x20U)
  9689. #define PORT_PCR_ODE_SHIFT (5U)
  9690. #define PORT_PCR_ODE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_ODE_SHIFT)) & PORT_PCR_ODE_MASK)
  9691. #define PORT_PCR_DSE_MASK (0x40U)
  9692. #define PORT_PCR_DSE_SHIFT (6U)
  9693. #define PORT_PCR_DSE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_DSE_SHIFT)) & PORT_PCR_DSE_MASK)
  9694. #define PORT_PCR_MUX_MASK (0x700U)
  9695. #define PORT_PCR_MUX_SHIFT (8U)
  9696. #define PORT_PCR_MUX(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_MUX_SHIFT)) & PORT_PCR_MUX_MASK)
  9697. #define PORT_PCR_LK_MASK (0x8000U)
  9698. #define PORT_PCR_LK_SHIFT (15U)
  9699. #define PORT_PCR_LK(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_LK_SHIFT)) & PORT_PCR_LK_MASK)
  9700. #define PORT_PCR_IRQC_MASK (0xF0000U)
  9701. #define PORT_PCR_IRQC_SHIFT (16U)
  9702. #define PORT_PCR_IRQC(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_IRQC_SHIFT)) & PORT_PCR_IRQC_MASK)
  9703. #define PORT_PCR_ISF_MASK (0x1000000U)
  9704. #define PORT_PCR_ISF_SHIFT (24U)
  9705. #define PORT_PCR_ISF(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_ISF_SHIFT)) & PORT_PCR_ISF_MASK)
  9706. /* The count of PORT_PCR */
  9707. #define PORT_PCR_COUNT (32U)
  9708. /*! @name GPCLR - Global Pin Control Low Register */
  9709. #define PORT_GPCLR_GPWD_MASK (0xFFFFU)
  9710. #define PORT_GPCLR_GPWD_SHIFT (0U)
  9711. #define PORT_GPCLR_GPWD(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCLR_GPWD_SHIFT)) & PORT_GPCLR_GPWD_MASK)
  9712. #define PORT_GPCLR_GPWE_MASK (0xFFFF0000U)
  9713. #define PORT_GPCLR_GPWE_SHIFT (16U)
  9714. #define PORT_GPCLR_GPWE(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCLR_GPWE_SHIFT)) & PORT_GPCLR_GPWE_MASK)
  9715. /*! @name GPCHR - Global Pin Control High Register */
  9716. #define PORT_GPCHR_GPWD_MASK (0xFFFFU)
  9717. #define PORT_GPCHR_GPWD_SHIFT (0U)
  9718. #define PORT_GPCHR_GPWD(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCHR_GPWD_SHIFT)) & PORT_GPCHR_GPWD_MASK)
  9719. #define PORT_GPCHR_GPWE_MASK (0xFFFF0000U)
  9720. #define PORT_GPCHR_GPWE_SHIFT (16U)
  9721. #define PORT_GPCHR_GPWE(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCHR_GPWE_SHIFT)) & PORT_GPCHR_GPWE_MASK)
  9722. /*! @name ISFR - Interrupt Status Flag Register */
  9723. #define PORT_ISFR_ISF_MASK (0xFFFFFFFFU)
  9724. #define PORT_ISFR_ISF_SHIFT (0U)
  9725. #define PORT_ISFR_ISF(x) (((uint32_t)(((uint32_t)(x)) << PORT_ISFR_ISF_SHIFT)) & PORT_ISFR_ISF_MASK)
  9726. /*! @name DFER - Digital Filter Enable Register */
  9727. #define PORT_DFER_DFE_MASK (0xFFFFFFFFU)
  9728. #define PORT_DFER_DFE_SHIFT (0U)
  9729. #define PORT_DFER_DFE(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFER_DFE_SHIFT)) & PORT_DFER_DFE_MASK)
  9730. /*! @name DFCR - Digital Filter Clock Register */
  9731. #define PORT_DFCR_CS_MASK (0x1U)
  9732. #define PORT_DFCR_CS_SHIFT (0U)
  9733. #define PORT_DFCR_CS(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFCR_CS_SHIFT)) & PORT_DFCR_CS_MASK)
  9734. /*! @name DFWR - Digital Filter Width Register */
  9735. #define PORT_DFWR_FILT_MASK (0x1FU)
  9736. #define PORT_DFWR_FILT_SHIFT (0U)
  9737. #define PORT_DFWR_FILT(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFWR_FILT_SHIFT)) & PORT_DFWR_FILT_MASK)
  9738. /*!
  9739. * @}
  9740. */ /* end of group PORT_Register_Masks */
  9741. /* PORT - Peripheral instance base addresses */
  9742. /** Peripheral PORTA base address */
  9743. #define PORTA_BASE (0x40049000u)
  9744. /** Peripheral PORTA base pointer */
  9745. #define PORTA ((PORT_Type *)PORTA_BASE)
  9746. /** Peripheral PORTB base address */
  9747. #define PORTB_BASE (0x4004A000u)
  9748. /** Peripheral PORTB base pointer */
  9749. #define PORTB ((PORT_Type *)PORTB_BASE)
  9750. /** Peripheral PORTC base address */
  9751. #define PORTC_BASE (0x4004B000u)
  9752. /** Peripheral PORTC base pointer */
  9753. #define PORTC ((PORT_Type *)PORTC_BASE)
  9754. /** Peripheral PORTD base address */
  9755. #define PORTD_BASE (0x4004C000u)
  9756. /** Peripheral PORTD base pointer */
  9757. #define PORTD ((PORT_Type *)PORTD_BASE)
  9758. /** Peripheral PORTE base address */
  9759. #define PORTE_BASE (0x4004D000u)
  9760. /** Peripheral PORTE base pointer */
  9761. #define PORTE ((PORT_Type *)PORTE_BASE)
  9762. /** Array initializer of PORT peripheral base addresses */
  9763. #define PORT_BASE_ADDRS { PORTA_BASE, PORTB_BASE, PORTC_BASE, PORTD_BASE, PORTE_BASE }
  9764. /** Array initializer of PORT peripheral base pointers */
  9765. #define PORT_BASE_PTRS { PORTA, PORTB, PORTC, PORTD, PORTE }
  9766. /** Interrupt vectors for the PORT peripheral type */
  9767. #define PORT_IRQS { PORTA_IRQn, PORTB_IRQn, PORTC_IRQn, PORTD_IRQn, PORTE_IRQn }
  9768. /*!
  9769. * @}
  9770. */ /* end of group PORT_Peripheral_Access_Layer */
  9771. /* ----------------------------------------------------------------------------
  9772. -- QuadSPI Peripheral Access Layer
  9773. ---------------------------------------------------------------------------- */
  9774. /*!
  9775. * @addtogroup QuadSPI_Peripheral_Access_Layer QuadSPI Peripheral Access Layer
  9776. * @{
  9777. */
  9778. /** QuadSPI - Register Layout Typedef */
  9779. typedef struct {
  9780. __IO uint32_t MCR; /**< Module Configuration Register, offset: 0x0 */
  9781. uint8_t RESERVED_0[4];
  9782. __IO uint32_t IPCR; /**< IP Configuration Register, offset: 0x8 */
  9783. __IO uint32_t FLSHCR; /**< Flash Configuration Register, offset: 0xC */
  9784. __IO uint32_t BUF0CR; /**< Buffer0 Configuration Register, offset: 0x10 */
  9785. __IO uint32_t BUF1CR; /**< Buffer1 Configuration Register, offset: 0x14 */
  9786. __IO uint32_t BUF2CR; /**< Buffer2 Configuration Register, offset: 0x18 */
  9787. __IO uint32_t BUF3CR; /**< Buffer3 Configuration Register, offset: 0x1C */
  9788. __IO uint32_t BFGENCR; /**< Buffer Generic Configuration Register, offset: 0x20 */
  9789. __IO uint32_t SOCCR; /**< SOC Configuration Register, offset: 0x24 */
  9790. uint8_t RESERVED_1[8];
  9791. __IO uint32_t BUF0IND; /**< Buffer0 Top Index Register, offset: 0x30 */
  9792. __IO uint32_t BUF1IND; /**< Buffer1 Top Index Register, offset: 0x34 */
  9793. __IO uint32_t BUF2IND; /**< Buffer2 Top Index Register, offset: 0x38 */
  9794. uint8_t RESERVED_2[196];
  9795. __IO uint32_t SFAR; /**< Serial Flash Address Register, offset: 0x100 */
  9796. __IO uint32_t SFACR; /**< Serial Flash Address Configuration Register, offset: 0x104 */
  9797. __IO uint32_t SMPR; /**< Sampling Register, offset: 0x108 */
  9798. __I uint32_t RBSR; /**< RX Buffer Status Register, offset: 0x10C */
  9799. __IO uint32_t RBCT; /**< RX Buffer Control Register, offset: 0x110 */
  9800. uint8_t RESERVED_3[60];
  9801. __I uint32_t TBSR; /**< TX Buffer Status Register, offset: 0x150 */
  9802. __IO uint32_t TBDR; /**< TX Buffer Data Register, offset: 0x154 */
  9803. __IO uint32_t TBCT; /**< Tx Buffer Control Register, offset: 0x158 */
  9804. __I uint32_t SR; /**< Status Register, offset: 0x15C */
  9805. __IO uint32_t FR; /**< Flag Register, offset: 0x160 */
  9806. __IO uint32_t RSER; /**< Interrupt and DMA Request Select and Enable Register, offset: 0x164 */
  9807. __I uint32_t SPNDST; /**< Sequence Suspend Status Register, offset: 0x168 */
  9808. __O uint32_t SPTRCLR; /**< Sequence Pointer Clear Register, offset: 0x16C */
  9809. uint8_t RESERVED_4[16];
  9810. __IO uint32_t SFA1AD; /**< Serial Flash A1 Top Address, offset: 0x180 */
  9811. __IO uint32_t SFA2AD; /**< Serial Flash A2 Top Address, offset: 0x184 */
  9812. __IO uint32_t SFB1AD; /**< Serial Flash B1Top Address, offset: 0x188 */
  9813. __IO uint32_t SFB2AD; /**< Serial Flash B2Top Address, offset: 0x18C */
  9814. __IO uint32_t DLPR; /**< Data Learn Pattern Register, offset: 0x190 */
  9815. uint8_t RESERVED_5[108];
  9816. __I uint32_t RBDR[16]; /**< RX Buffer Data Register, array offset: 0x200, array step: 0x4 */
  9817. uint8_t RESERVED_6[192];
  9818. __IO uint32_t LUTKEY; /**< LUT Key Register, offset: 0x300 */
  9819. __IO uint32_t LCKCR; /**< LUT Lock Configuration Register, offset: 0x304 */
  9820. uint8_t RESERVED_7[8];
  9821. __IO uint32_t LUT[64]; /**< Look-up Table register, array offset: 0x310, array step: 0x4 */
  9822. } QuadSPI_Type;
  9823. /* ----------------------------------------------------------------------------
  9824. -- QuadSPI Register Masks
  9825. ---------------------------------------------------------------------------- */
  9826. /*!
  9827. * @addtogroup QuadSPI_Register_Masks QuadSPI Register Masks
  9828. * @{
  9829. */
  9830. /*! @name MCR - Module Configuration Register */
  9831. #define QuadSPI_MCR_SWRSTSD_MASK (0x1U)
  9832. #define QuadSPI_MCR_SWRSTSD_SHIFT (0U)
  9833. #define QuadSPI_MCR_SWRSTSD(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_MCR_SWRSTSD_SHIFT)) & QuadSPI_MCR_SWRSTSD_MASK)
  9834. #define QuadSPI_MCR_SWRSTHD_MASK (0x2U)
  9835. #define QuadSPI_MCR_SWRSTHD_SHIFT (1U)
  9836. #define QuadSPI_MCR_SWRSTHD(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_MCR_SWRSTHD_SHIFT)) & QuadSPI_MCR_SWRSTHD_MASK)
  9837. #define QuadSPI_MCR_END_CFG_MASK (0xCU)
  9838. #define QuadSPI_MCR_END_CFG_SHIFT (2U)
  9839. #define QuadSPI_MCR_END_CFG(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_MCR_END_CFG_SHIFT)) & QuadSPI_MCR_END_CFG_MASK)
  9840. #define QuadSPI_MCR_DQS_LAT_EN_MASK (0x20U)
  9841. #define QuadSPI_MCR_DQS_LAT_EN_SHIFT (5U)
  9842. #define QuadSPI_MCR_DQS_LAT_EN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_MCR_DQS_LAT_EN_SHIFT)) & QuadSPI_MCR_DQS_LAT_EN_MASK)
  9843. #define QuadSPI_MCR_DQS_EN_MASK (0x40U)
  9844. #define QuadSPI_MCR_DQS_EN_SHIFT (6U)
  9845. #define QuadSPI_MCR_DQS_EN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_MCR_DQS_EN_SHIFT)) & QuadSPI_MCR_DQS_EN_MASK)
  9846. #define QuadSPI_MCR_DDR_EN_MASK (0x80U)
  9847. #define QuadSPI_MCR_DDR_EN_SHIFT (7U)
  9848. #define QuadSPI_MCR_DDR_EN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_MCR_DDR_EN_SHIFT)) & QuadSPI_MCR_DDR_EN_MASK)
  9849. #define QuadSPI_MCR_CLR_RXF_MASK (0x400U)
  9850. #define QuadSPI_MCR_CLR_RXF_SHIFT (10U)
  9851. #define QuadSPI_MCR_CLR_RXF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_MCR_CLR_RXF_SHIFT)) & QuadSPI_MCR_CLR_RXF_MASK)
  9852. #define QuadSPI_MCR_CLR_TXF_MASK (0x800U)
  9853. #define QuadSPI_MCR_CLR_TXF_SHIFT (11U)
  9854. #define QuadSPI_MCR_CLR_TXF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_MCR_CLR_TXF_SHIFT)) & QuadSPI_MCR_CLR_TXF_MASK)
  9855. #define QuadSPI_MCR_MDIS_MASK (0x4000U)
  9856. #define QuadSPI_MCR_MDIS_SHIFT (14U)
  9857. #define QuadSPI_MCR_MDIS(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_MCR_MDIS_SHIFT)) & QuadSPI_MCR_MDIS_MASK)
  9858. #define QuadSPI_MCR_SCLKCFG_MASK (0xFF000000U)
  9859. #define QuadSPI_MCR_SCLKCFG_SHIFT (24U)
  9860. #define QuadSPI_MCR_SCLKCFG(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_MCR_SCLKCFG_SHIFT)) & QuadSPI_MCR_SCLKCFG_MASK)
  9861. /*! @name IPCR - IP Configuration Register */
  9862. #define QuadSPI_IPCR_IDATSZ_MASK (0xFFFFU)
  9863. #define QuadSPI_IPCR_IDATSZ_SHIFT (0U)
  9864. #define QuadSPI_IPCR_IDATSZ(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_IPCR_IDATSZ_SHIFT)) & QuadSPI_IPCR_IDATSZ_MASK)
  9865. #define QuadSPI_IPCR_PAR_EN_MASK (0x10000U)
  9866. #define QuadSPI_IPCR_PAR_EN_SHIFT (16U)
  9867. #define QuadSPI_IPCR_PAR_EN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_IPCR_PAR_EN_SHIFT)) & QuadSPI_IPCR_PAR_EN_MASK)
  9868. #define QuadSPI_IPCR_SEQID_MASK (0xF000000U)
  9869. #define QuadSPI_IPCR_SEQID_SHIFT (24U)
  9870. #define QuadSPI_IPCR_SEQID(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_IPCR_SEQID_SHIFT)) & QuadSPI_IPCR_SEQID_MASK)
  9871. /*! @name FLSHCR - Flash Configuration Register */
  9872. #define QuadSPI_FLSHCR_TCSS_MASK (0xFU)
  9873. #define QuadSPI_FLSHCR_TCSS_SHIFT (0U)
  9874. #define QuadSPI_FLSHCR_TCSS(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FLSHCR_TCSS_SHIFT)) & QuadSPI_FLSHCR_TCSS_MASK)
  9875. #define QuadSPI_FLSHCR_TCSH_MASK (0xF00U)
  9876. #define QuadSPI_FLSHCR_TCSH_SHIFT (8U)
  9877. #define QuadSPI_FLSHCR_TCSH(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FLSHCR_TCSH_SHIFT)) & QuadSPI_FLSHCR_TCSH_MASK)
  9878. #define QuadSPI_FLSHCR_TDH_MASK (0x30000U)
  9879. #define QuadSPI_FLSHCR_TDH_SHIFT (16U)
  9880. #define QuadSPI_FLSHCR_TDH(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FLSHCR_TDH_SHIFT)) & QuadSPI_FLSHCR_TDH_MASK)
  9881. /*! @name BUF0CR - Buffer0 Configuration Register */
  9882. #define QuadSPI_BUF0CR_MSTRID_MASK (0xFU)
  9883. #define QuadSPI_BUF0CR_MSTRID_SHIFT (0U)
  9884. #define QuadSPI_BUF0CR_MSTRID(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF0CR_MSTRID_SHIFT)) & QuadSPI_BUF0CR_MSTRID_MASK)
  9885. #define QuadSPI_BUF0CR_ADATSZ_MASK (0x7F00U)
  9886. #define QuadSPI_BUF0CR_ADATSZ_SHIFT (8U)
  9887. #define QuadSPI_BUF0CR_ADATSZ(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF0CR_ADATSZ_SHIFT)) & QuadSPI_BUF0CR_ADATSZ_MASK)
  9888. #define QuadSPI_BUF0CR_HP_EN_MASK (0x80000000U)
  9889. #define QuadSPI_BUF0CR_HP_EN_SHIFT (31U)
  9890. #define QuadSPI_BUF0CR_HP_EN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF0CR_HP_EN_SHIFT)) & QuadSPI_BUF0CR_HP_EN_MASK)
  9891. /*! @name BUF1CR - Buffer1 Configuration Register */
  9892. #define QuadSPI_BUF1CR_MSTRID_MASK (0xFU)
  9893. #define QuadSPI_BUF1CR_MSTRID_SHIFT (0U)
  9894. #define QuadSPI_BUF1CR_MSTRID(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF1CR_MSTRID_SHIFT)) & QuadSPI_BUF1CR_MSTRID_MASK)
  9895. #define QuadSPI_BUF1CR_ADATSZ_MASK (0x7F00U)
  9896. #define QuadSPI_BUF1CR_ADATSZ_SHIFT (8U)
  9897. #define QuadSPI_BUF1CR_ADATSZ(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF1CR_ADATSZ_SHIFT)) & QuadSPI_BUF1CR_ADATSZ_MASK)
  9898. /*! @name BUF2CR - Buffer2 Configuration Register */
  9899. #define QuadSPI_BUF2CR_MSTRID_MASK (0xFU)
  9900. #define QuadSPI_BUF2CR_MSTRID_SHIFT (0U)
  9901. #define QuadSPI_BUF2CR_MSTRID(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF2CR_MSTRID_SHIFT)) & QuadSPI_BUF2CR_MSTRID_MASK)
  9902. #define QuadSPI_BUF2CR_ADATSZ_MASK (0x7F00U)
  9903. #define QuadSPI_BUF2CR_ADATSZ_SHIFT (8U)
  9904. #define QuadSPI_BUF2CR_ADATSZ(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF2CR_ADATSZ_SHIFT)) & QuadSPI_BUF2CR_ADATSZ_MASK)
  9905. /*! @name BUF3CR - Buffer3 Configuration Register */
  9906. #define QuadSPI_BUF3CR_MSTRID_MASK (0xFU)
  9907. #define QuadSPI_BUF3CR_MSTRID_SHIFT (0U)
  9908. #define QuadSPI_BUF3CR_MSTRID(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF3CR_MSTRID_SHIFT)) & QuadSPI_BUF3CR_MSTRID_MASK)
  9909. #define QuadSPI_BUF3CR_ADATSZ_MASK (0x7F00U)
  9910. #define QuadSPI_BUF3CR_ADATSZ_SHIFT (8U)
  9911. #define QuadSPI_BUF3CR_ADATSZ(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF3CR_ADATSZ_SHIFT)) & QuadSPI_BUF3CR_ADATSZ_MASK)
  9912. #define QuadSPI_BUF3CR_ALLMST_MASK (0x80000000U)
  9913. #define QuadSPI_BUF3CR_ALLMST_SHIFT (31U)
  9914. #define QuadSPI_BUF3CR_ALLMST(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF3CR_ALLMST_SHIFT)) & QuadSPI_BUF3CR_ALLMST_MASK)
  9915. /*! @name BFGENCR - Buffer Generic Configuration Register */
  9916. #define QuadSPI_BFGENCR_SEQID_MASK (0xF000U)
  9917. #define QuadSPI_BFGENCR_SEQID_SHIFT (12U)
  9918. #define QuadSPI_BFGENCR_SEQID(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BFGENCR_SEQID_SHIFT)) & QuadSPI_BFGENCR_SEQID_MASK)
  9919. #define QuadSPI_BFGENCR_PAR_EN_MASK (0x10000U)
  9920. #define QuadSPI_BFGENCR_PAR_EN_SHIFT (16U)
  9921. #define QuadSPI_BFGENCR_PAR_EN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BFGENCR_PAR_EN_SHIFT)) & QuadSPI_BFGENCR_PAR_EN_MASK)
  9922. /*! @name SOCCR - SOC Configuration Register */
  9923. #define QuadSPI_SOCCR_QSPISRC_MASK (0x7U)
  9924. #define QuadSPI_SOCCR_QSPISRC_SHIFT (0U)
  9925. #define QuadSPI_SOCCR_QSPISRC(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SOCCR_QSPISRC_SHIFT)) & QuadSPI_SOCCR_QSPISRC_MASK)
  9926. #define QuadSPI_SOCCR_DQSLPEN_MASK (0x100U)
  9927. #define QuadSPI_SOCCR_DQSLPEN_SHIFT (8U)
  9928. #define QuadSPI_SOCCR_DQSLPEN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SOCCR_DQSLPEN_SHIFT)) & QuadSPI_SOCCR_DQSLPEN_MASK)
  9929. #define QuadSPI_SOCCR_DQSPADLPEN_MASK (0x200U)
  9930. #define QuadSPI_SOCCR_DQSPADLPEN_SHIFT (9U)
  9931. #define QuadSPI_SOCCR_DQSPADLPEN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SOCCR_DQSPADLPEN_SHIFT)) & QuadSPI_SOCCR_DQSPADLPEN_MASK)
  9932. #define QuadSPI_SOCCR_DQSPHASEL_MASK (0xC00U)
  9933. #define QuadSPI_SOCCR_DQSPHASEL_SHIFT (10U)
  9934. #define QuadSPI_SOCCR_DQSPHASEL(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SOCCR_DQSPHASEL_SHIFT)) & QuadSPI_SOCCR_DQSPHASEL_MASK)
  9935. #define QuadSPI_SOCCR_DQSINVSEL_MASK (0x1000U)
  9936. #define QuadSPI_SOCCR_DQSINVSEL_SHIFT (12U)
  9937. #define QuadSPI_SOCCR_DQSINVSEL(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SOCCR_DQSINVSEL_SHIFT)) & QuadSPI_SOCCR_DQSINVSEL_MASK)
  9938. #define QuadSPI_SOCCR_CK2EN_MASK (0x2000U)
  9939. #define QuadSPI_SOCCR_CK2EN_SHIFT (13U)
  9940. #define QuadSPI_SOCCR_CK2EN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SOCCR_CK2EN_SHIFT)) & QuadSPI_SOCCR_CK2EN_MASK)
  9941. #define QuadSPI_SOCCR_DIFFCKEN_MASK (0x4000U)
  9942. #define QuadSPI_SOCCR_DIFFCKEN_SHIFT (14U)
  9943. #define QuadSPI_SOCCR_DIFFCKEN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SOCCR_DIFFCKEN_SHIFT)) & QuadSPI_SOCCR_DIFFCKEN_MASK)
  9944. #define QuadSPI_SOCCR_OCTEN_MASK (0x8000U)
  9945. #define QuadSPI_SOCCR_OCTEN_SHIFT (15U)
  9946. #define QuadSPI_SOCCR_OCTEN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SOCCR_OCTEN_SHIFT)) & QuadSPI_SOCCR_OCTEN_MASK)
  9947. #define QuadSPI_SOCCR_DLYTAPSELA_MASK (0x3F0000U)
  9948. #define QuadSPI_SOCCR_DLYTAPSELA_SHIFT (16U)
  9949. #define QuadSPI_SOCCR_DLYTAPSELA(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SOCCR_DLYTAPSELA_SHIFT)) & QuadSPI_SOCCR_DLYTAPSELA_MASK)
  9950. #define QuadSPI_SOCCR_DLYTAPSELB_MASK (0x3F000000U)
  9951. #define QuadSPI_SOCCR_DLYTAPSELB_SHIFT (24U)
  9952. #define QuadSPI_SOCCR_DLYTAPSELB(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SOCCR_DLYTAPSELB_SHIFT)) & QuadSPI_SOCCR_DLYTAPSELB_MASK)
  9953. /*! @name BUF0IND - Buffer0 Top Index Register */
  9954. #define QuadSPI_BUF0IND_TPINDX0_MASK (0xFFFFFFF8U)
  9955. #define QuadSPI_BUF0IND_TPINDX0_SHIFT (3U)
  9956. #define QuadSPI_BUF0IND_TPINDX0(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF0IND_TPINDX0_SHIFT)) & QuadSPI_BUF0IND_TPINDX0_MASK)
  9957. /*! @name BUF1IND - Buffer1 Top Index Register */
  9958. #define QuadSPI_BUF1IND_TPINDX1_MASK (0xFFFFFFF8U)
  9959. #define QuadSPI_BUF1IND_TPINDX1_SHIFT (3U)
  9960. #define QuadSPI_BUF1IND_TPINDX1(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF1IND_TPINDX1_SHIFT)) & QuadSPI_BUF1IND_TPINDX1_MASK)
  9961. /*! @name BUF2IND - Buffer2 Top Index Register */
  9962. #define QuadSPI_BUF2IND_TPINDX2_MASK (0xFFFFFFF8U)
  9963. #define QuadSPI_BUF2IND_TPINDX2_SHIFT (3U)
  9964. #define QuadSPI_BUF2IND_TPINDX2(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_BUF2IND_TPINDX2_SHIFT)) & QuadSPI_BUF2IND_TPINDX2_MASK)
  9965. /*! @name SFAR - Serial Flash Address Register */
  9966. #define QuadSPI_SFAR_SFADR_MASK (0xFFFFFFFFU)
  9967. #define QuadSPI_SFAR_SFADR_SHIFT (0U)
  9968. #define QuadSPI_SFAR_SFADR(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SFAR_SFADR_SHIFT)) & QuadSPI_SFAR_SFADR_MASK)
  9969. /*! @name SFACR - Serial Flash Address Configuration Register */
  9970. #define QuadSPI_SFACR_CAS_MASK (0xFU)
  9971. #define QuadSPI_SFACR_CAS_SHIFT (0U)
  9972. #define QuadSPI_SFACR_CAS(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SFACR_CAS_SHIFT)) & QuadSPI_SFACR_CAS_MASK)
  9973. #define QuadSPI_SFACR_WA_MASK (0x10000U)
  9974. #define QuadSPI_SFACR_WA_SHIFT (16U)
  9975. #define QuadSPI_SFACR_WA(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SFACR_WA_SHIFT)) & QuadSPI_SFACR_WA_MASK)
  9976. /*! @name SMPR - Sampling Register */
  9977. #define QuadSPI_SMPR_HSENA_MASK (0x1U)
  9978. #define QuadSPI_SMPR_HSENA_SHIFT (0U)
  9979. #define QuadSPI_SMPR_HSENA(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SMPR_HSENA_SHIFT)) & QuadSPI_SMPR_HSENA_MASK)
  9980. #define QuadSPI_SMPR_HSPHS_MASK (0x2U)
  9981. #define QuadSPI_SMPR_HSPHS_SHIFT (1U)
  9982. #define QuadSPI_SMPR_HSPHS(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SMPR_HSPHS_SHIFT)) & QuadSPI_SMPR_HSPHS_MASK)
  9983. #define QuadSPI_SMPR_HSDLY_MASK (0x4U)
  9984. #define QuadSPI_SMPR_HSDLY_SHIFT (2U)
  9985. #define QuadSPI_SMPR_HSDLY(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SMPR_HSDLY_SHIFT)) & QuadSPI_SMPR_HSDLY_MASK)
  9986. #define QuadSPI_SMPR_FSPHS_MASK (0x20U)
  9987. #define QuadSPI_SMPR_FSPHS_SHIFT (5U)
  9988. #define QuadSPI_SMPR_FSPHS(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SMPR_FSPHS_SHIFT)) & QuadSPI_SMPR_FSPHS_MASK)
  9989. #define QuadSPI_SMPR_FSDLY_MASK (0x40U)
  9990. #define QuadSPI_SMPR_FSDLY_SHIFT (6U)
  9991. #define QuadSPI_SMPR_FSDLY(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SMPR_FSDLY_SHIFT)) & QuadSPI_SMPR_FSDLY_MASK)
  9992. #define QuadSPI_SMPR_DDRSMP_MASK (0x70000U)
  9993. #define QuadSPI_SMPR_DDRSMP_SHIFT (16U)
  9994. #define QuadSPI_SMPR_DDRSMP(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SMPR_DDRSMP_SHIFT)) & QuadSPI_SMPR_DDRSMP_MASK)
  9995. /*! @name RBSR - RX Buffer Status Register */
  9996. #define QuadSPI_RBSR_RDBFL_MASK (0x1F00U)
  9997. #define QuadSPI_RBSR_RDBFL_SHIFT (8U)
  9998. #define QuadSPI_RBSR_RDBFL(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RBSR_RDBFL_SHIFT)) & QuadSPI_RBSR_RDBFL_MASK)
  9999. #define QuadSPI_RBSR_RDCTR_MASK (0xFFFF0000U)
  10000. #define QuadSPI_RBSR_RDCTR_SHIFT (16U)
  10001. #define QuadSPI_RBSR_RDCTR(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RBSR_RDCTR_SHIFT)) & QuadSPI_RBSR_RDCTR_MASK)
  10002. /*! @name RBCT - RX Buffer Control Register */
  10003. #define QuadSPI_RBCT_WMRK_MASK (0xFU)
  10004. #define QuadSPI_RBCT_WMRK_SHIFT (0U)
  10005. #define QuadSPI_RBCT_WMRK(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RBCT_WMRK_SHIFT)) & QuadSPI_RBCT_WMRK_MASK)
  10006. #define QuadSPI_RBCT_RXBRD_MASK (0x100U)
  10007. #define QuadSPI_RBCT_RXBRD_SHIFT (8U)
  10008. #define QuadSPI_RBCT_RXBRD(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RBCT_RXBRD_SHIFT)) & QuadSPI_RBCT_RXBRD_MASK)
  10009. /*! @name TBSR - TX Buffer Status Register */
  10010. #define QuadSPI_TBSR_TRBFL_MASK (0x1F00U)
  10011. #define QuadSPI_TBSR_TRBFL_SHIFT (8U)
  10012. #define QuadSPI_TBSR_TRBFL(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_TBSR_TRBFL_SHIFT)) & QuadSPI_TBSR_TRBFL_MASK)
  10013. #define QuadSPI_TBSR_TRCTR_MASK (0xFFFF0000U)
  10014. #define QuadSPI_TBSR_TRCTR_SHIFT (16U)
  10015. #define QuadSPI_TBSR_TRCTR(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_TBSR_TRCTR_SHIFT)) & QuadSPI_TBSR_TRCTR_MASK)
  10016. /*! @name TBDR - TX Buffer Data Register */
  10017. #define QuadSPI_TBDR_TXDATA_MASK (0xFFFFFFFFU)
  10018. #define QuadSPI_TBDR_TXDATA_SHIFT (0U)
  10019. #define QuadSPI_TBDR_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_TBDR_TXDATA_SHIFT)) & QuadSPI_TBDR_TXDATA_MASK)
  10020. /*! @name TBCT - Tx Buffer Control Register */
  10021. #define QuadSPI_TBCT_WMRK_MASK (0xFU)
  10022. #define QuadSPI_TBCT_WMRK_SHIFT (0U)
  10023. #define QuadSPI_TBCT_WMRK(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_TBCT_WMRK_SHIFT)) & QuadSPI_TBCT_WMRK_MASK)
  10024. /*! @name SR - Status Register */
  10025. #define QuadSPI_SR_BUSY_MASK (0x1U)
  10026. #define QuadSPI_SR_BUSY_SHIFT (0U)
  10027. #define QuadSPI_SR_BUSY(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_BUSY_SHIFT)) & QuadSPI_SR_BUSY_MASK)
  10028. #define QuadSPI_SR_IP_ACC_MASK (0x2U)
  10029. #define QuadSPI_SR_IP_ACC_SHIFT (1U)
  10030. #define QuadSPI_SR_IP_ACC(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_IP_ACC_SHIFT)) & QuadSPI_SR_IP_ACC_MASK)
  10031. #define QuadSPI_SR_AHB_ACC_MASK (0x4U)
  10032. #define QuadSPI_SR_AHB_ACC_SHIFT (2U)
  10033. #define QuadSPI_SR_AHB_ACC(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHB_ACC_SHIFT)) & QuadSPI_SR_AHB_ACC_MASK)
  10034. #define QuadSPI_SR_AHBGNT_MASK (0x20U)
  10035. #define QuadSPI_SR_AHBGNT_SHIFT (5U)
  10036. #define QuadSPI_SR_AHBGNT(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHBGNT_SHIFT)) & QuadSPI_SR_AHBGNT_MASK)
  10037. #define QuadSPI_SR_AHBTRN_MASK (0x40U)
  10038. #define QuadSPI_SR_AHBTRN_SHIFT (6U)
  10039. #define QuadSPI_SR_AHBTRN(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHBTRN_SHIFT)) & QuadSPI_SR_AHBTRN_MASK)
  10040. #define QuadSPI_SR_AHB0NE_MASK (0x80U)
  10041. #define QuadSPI_SR_AHB0NE_SHIFT (7U)
  10042. #define QuadSPI_SR_AHB0NE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHB0NE_SHIFT)) & QuadSPI_SR_AHB0NE_MASK)
  10043. #define QuadSPI_SR_AHB1NE_MASK (0x100U)
  10044. #define QuadSPI_SR_AHB1NE_SHIFT (8U)
  10045. #define QuadSPI_SR_AHB1NE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHB1NE_SHIFT)) & QuadSPI_SR_AHB1NE_MASK)
  10046. #define QuadSPI_SR_AHB2NE_MASK (0x200U)
  10047. #define QuadSPI_SR_AHB2NE_SHIFT (9U)
  10048. #define QuadSPI_SR_AHB2NE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHB2NE_SHIFT)) & QuadSPI_SR_AHB2NE_MASK)
  10049. #define QuadSPI_SR_AHB3NE_MASK (0x400U)
  10050. #define QuadSPI_SR_AHB3NE_SHIFT (10U)
  10051. #define QuadSPI_SR_AHB3NE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHB3NE_SHIFT)) & QuadSPI_SR_AHB3NE_MASK)
  10052. #define QuadSPI_SR_AHB0FUL_MASK (0x800U)
  10053. #define QuadSPI_SR_AHB0FUL_SHIFT (11U)
  10054. #define QuadSPI_SR_AHB0FUL(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHB0FUL_SHIFT)) & QuadSPI_SR_AHB0FUL_MASK)
  10055. #define QuadSPI_SR_AHB1FUL_MASK (0x1000U)
  10056. #define QuadSPI_SR_AHB1FUL_SHIFT (12U)
  10057. #define QuadSPI_SR_AHB1FUL(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHB1FUL_SHIFT)) & QuadSPI_SR_AHB1FUL_MASK)
  10058. #define QuadSPI_SR_AHB2FUL_MASK (0x2000U)
  10059. #define QuadSPI_SR_AHB2FUL_SHIFT (13U)
  10060. #define QuadSPI_SR_AHB2FUL(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHB2FUL_SHIFT)) & QuadSPI_SR_AHB2FUL_MASK)
  10061. #define QuadSPI_SR_AHB3FUL_MASK (0x4000U)
  10062. #define QuadSPI_SR_AHB3FUL_SHIFT (14U)
  10063. #define QuadSPI_SR_AHB3FUL(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_AHB3FUL_SHIFT)) & QuadSPI_SR_AHB3FUL_MASK)
  10064. #define QuadSPI_SR_RXWE_MASK (0x10000U)
  10065. #define QuadSPI_SR_RXWE_SHIFT (16U)
  10066. #define QuadSPI_SR_RXWE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_RXWE_SHIFT)) & QuadSPI_SR_RXWE_MASK)
  10067. #define QuadSPI_SR_RXFULL_MASK (0x80000U)
  10068. #define QuadSPI_SR_RXFULL_SHIFT (19U)
  10069. #define QuadSPI_SR_RXFULL(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_RXFULL_SHIFT)) & QuadSPI_SR_RXFULL_MASK)
  10070. #define QuadSPI_SR_RXDMA_MASK (0x800000U)
  10071. #define QuadSPI_SR_RXDMA_SHIFT (23U)
  10072. #define QuadSPI_SR_RXDMA(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_RXDMA_SHIFT)) & QuadSPI_SR_RXDMA_MASK)
  10073. #define QuadSPI_SR_TXEDA_MASK (0x1000000U)
  10074. #define QuadSPI_SR_TXEDA_SHIFT (24U)
  10075. #define QuadSPI_SR_TXEDA(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_TXEDA_SHIFT)) & QuadSPI_SR_TXEDA_MASK)
  10076. #define QuadSPI_SR_TXWA_MASK (0x2000000U)
  10077. #define QuadSPI_SR_TXWA_SHIFT (25U)
  10078. #define QuadSPI_SR_TXWA(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_TXWA_SHIFT)) & QuadSPI_SR_TXWA_MASK)
  10079. #define QuadSPI_SR_TXDMA_MASK (0x4000000U)
  10080. #define QuadSPI_SR_TXDMA_SHIFT (26U)
  10081. #define QuadSPI_SR_TXDMA(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_TXDMA_SHIFT)) & QuadSPI_SR_TXDMA_MASK)
  10082. #define QuadSPI_SR_TXFULL_MASK (0x8000000U)
  10083. #define QuadSPI_SR_TXFULL_SHIFT (27U)
  10084. #define QuadSPI_SR_TXFULL(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_TXFULL_SHIFT)) & QuadSPI_SR_TXFULL_MASK)
  10085. #define QuadSPI_SR_DLPSMP_MASK (0xE0000000U)
  10086. #define QuadSPI_SR_DLPSMP_SHIFT (29U)
  10087. #define QuadSPI_SR_DLPSMP(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SR_DLPSMP_SHIFT)) & QuadSPI_SR_DLPSMP_MASK)
  10088. /*! @name FR - Flag Register */
  10089. #define QuadSPI_FR_TFF_MASK (0x1U)
  10090. #define QuadSPI_FR_TFF_SHIFT (0U)
  10091. #define QuadSPI_FR_TFF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_TFF_SHIFT)) & QuadSPI_FR_TFF_MASK)
  10092. #define QuadSPI_FR_IPGEF_MASK (0x10U)
  10093. #define QuadSPI_FR_IPGEF_SHIFT (4U)
  10094. #define QuadSPI_FR_IPGEF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_IPGEF_SHIFT)) & QuadSPI_FR_IPGEF_MASK)
  10095. #define QuadSPI_FR_IPIEF_MASK (0x40U)
  10096. #define QuadSPI_FR_IPIEF_SHIFT (6U)
  10097. #define QuadSPI_FR_IPIEF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_IPIEF_SHIFT)) & QuadSPI_FR_IPIEF_MASK)
  10098. #define QuadSPI_FR_IPAEF_MASK (0x80U)
  10099. #define QuadSPI_FR_IPAEF_SHIFT (7U)
  10100. #define QuadSPI_FR_IPAEF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_IPAEF_SHIFT)) & QuadSPI_FR_IPAEF_MASK)
  10101. #define QuadSPI_FR_IUEF_MASK (0x800U)
  10102. #define QuadSPI_FR_IUEF_SHIFT (11U)
  10103. #define QuadSPI_FR_IUEF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_IUEF_SHIFT)) & QuadSPI_FR_IUEF_MASK)
  10104. #define QuadSPI_FR_ABOF_MASK (0x1000U)
  10105. #define QuadSPI_FR_ABOF_SHIFT (12U)
  10106. #define QuadSPI_FR_ABOF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_ABOF_SHIFT)) & QuadSPI_FR_ABOF_MASK)
  10107. #define QuadSPI_FR_AIBSEF_MASK (0x2000U)
  10108. #define QuadSPI_FR_AIBSEF_SHIFT (13U)
  10109. #define QuadSPI_FR_AIBSEF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_AIBSEF_SHIFT)) & QuadSPI_FR_AIBSEF_MASK)
  10110. #define QuadSPI_FR_AITEF_MASK (0x4000U)
  10111. #define QuadSPI_FR_AITEF_SHIFT (14U)
  10112. #define QuadSPI_FR_AITEF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_AITEF_SHIFT)) & QuadSPI_FR_AITEF_MASK)
  10113. #define QuadSPI_FR_ABSEF_MASK (0x8000U)
  10114. #define QuadSPI_FR_ABSEF_SHIFT (15U)
  10115. #define QuadSPI_FR_ABSEF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_ABSEF_SHIFT)) & QuadSPI_FR_ABSEF_MASK)
  10116. #define QuadSPI_FR_RBDF_MASK (0x10000U)
  10117. #define QuadSPI_FR_RBDF_SHIFT (16U)
  10118. #define QuadSPI_FR_RBDF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_RBDF_SHIFT)) & QuadSPI_FR_RBDF_MASK)
  10119. #define QuadSPI_FR_RBOF_MASK (0x20000U)
  10120. #define QuadSPI_FR_RBOF_SHIFT (17U)
  10121. #define QuadSPI_FR_RBOF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_RBOF_SHIFT)) & QuadSPI_FR_RBOF_MASK)
  10122. #define QuadSPI_FR_ILLINE_MASK (0x800000U)
  10123. #define QuadSPI_FR_ILLINE_SHIFT (23U)
  10124. #define QuadSPI_FR_ILLINE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_ILLINE_SHIFT)) & QuadSPI_FR_ILLINE_MASK)
  10125. #define QuadSPI_FR_TBUF_MASK (0x4000000U)
  10126. #define QuadSPI_FR_TBUF_SHIFT (26U)
  10127. #define QuadSPI_FR_TBUF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_TBUF_SHIFT)) & QuadSPI_FR_TBUF_MASK)
  10128. #define QuadSPI_FR_TBFF_MASK (0x8000000U)
  10129. #define QuadSPI_FR_TBFF_SHIFT (27U)
  10130. #define QuadSPI_FR_TBFF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_TBFF_SHIFT)) & QuadSPI_FR_TBFF_MASK)
  10131. #define QuadSPI_FR_DLPFF_MASK (0x80000000U)
  10132. #define QuadSPI_FR_DLPFF_SHIFT (31U)
  10133. #define QuadSPI_FR_DLPFF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_FR_DLPFF_SHIFT)) & QuadSPI_FR_DLPFF_MASK)
  10134. /*! @name RSER - Interrupt and DMA Request Select and Enable Register */
  10135. #define QuadSPI_RSER_TFIE_MASK (0x1U)
  10136. #define QuadSPI_RSER_TFIE_SHIFT (0U)
  10137. #define QuadSPI_RSER_TFIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_TFIE_SHIFT)) & QuadSPI_RSER_TFIE_MASK)
  10138. #define QuadSPI_RSER_IPGEIE_MASK (0x10U)
  10139. #define QuadSPI_RSER_IPGEIE_SHIFT (4U)
  10140. #define QuadSPI_RSER_IPGEIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_IPGEIE_SHIFT)) & QuadSPI_RSER_IPGEIE_MASK)
  10141. #define QuadSPI_RSER_IPIEIE_MASK (0x40U)
  10142. #define QuadSPI_RSER_IPIEIE_SHIFT (6U)
  10143. #define QuadSPI_RSER_IPIEIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_IPIEIE_SHIFT)) & QuadSPI_RSER_IPIEIE_MASK)
  10144. #define QuadSPI_RSER_IPAEIE_MASK (0x80U)
  10145. #define QuadSPI_RSER_IPAEIE_SHIFT (7U)
  10146. #define QuadSPI_RSER_IPAEIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_IPAEIE_SHIFT)) & QuadSPI_RSER_IPAEIE_MASK)
  10147. #define QuadSPI_RSER_IUEIE_MASK (0x800U)
  10148. #define QuadSPI_RSER_IUEIE_SHIFT (11U)
  10149. #define QuadSPI_RSER_IUEIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_IUEIE_SHIFT)) & QuadSPI_RSER_IUEIE_MASK)
  10150. #define QuadSPI_RSER_ABOIE_MASK (0x1000U)
  10151. #define QuadSPI_RSER_ABOIE_SHIFT (12U)
  10152. #define QuadSPI_RSER_ABOIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_ABOIE_SHIFT)) & QuadSPI_RSER_ABOIE_MASK)
  10153. #define QuadSPI_RSER_AIBSIE_MASK (0x2000U)
  10154. #define QuadSPI_RSER_AIBSIE_SHIFT (13U)
  10155. #define QuadSPI_RSER_AIBSIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_AIBSIE_SHIFT)) & QuadSPI_RSER_AIBSIE_MASK)
  10156. #define QuadSPI_RSER_AITIE_MASK (0x4000U)
  10157. #define QuadSPI_RSER_AITIE_SHIFT (14U)
  10158. #define QuadSPI_RSER_AITIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_AITIE_SHIFT)) & QuadSPI_RSER_AITIE_MASK)
  10159. #define QuadSPI_RSER_ABSEIE_MASK (0x8000U)
  10160. #define QuadSPI_RSER_ABSEIE_SHIFT (15U)
  10161. #define QuadSPI_RSER_ABSEIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_ABSEIE_SHIFT)) & QuadSPI_RSER_ABSEIE_MASK)
  10162. #define QuadSPI_RSER_RBDIE_MASK (0x10000U)
  10163. #define QuadSPI_RSER_RBDIE_SHIFT (16U)
  10164. #define QuadSPI_RSER_RBDIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_RBDIE_SHIFT)) & QuadSPI_RSER_RBDIE_MASK)
  10165. #define QuadSPI_RSER_RBOIE_MASK (0x20000U)
  10166. #define QuadSPI_RSER_RBOIE_SHIFT (17U)
  10167. #define QuadSPI_RSER_RBOIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_RBOIE_SHIFT)) & QuadSPI_RSER_RBOIE_MASK)
  10168. #define QuadSPI_RSER_RBDDE_MASK (0x200000U)
  10169. #define QuadSPI_RSER_RBDDE_SHIFT (21U)
  10170. #define QuadSPI_RSER_RBDDE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_RBDDE_SHIFT)) & QuadSPI_RSER_RBDDE_MASK)
  10171. #define QuadSPI_RSER_ILLINIE_MASK (0x800000U)
  10172. #define QuadSPI_RSER_ILLINIE_SHIFT (23U)
  10173. #define QuadSPI_RSER_ILLINIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_ILLINIE_SHIFT)) & QuadSPI_RSER_ILLINIE_MASK)
  10174. #define QuadSPI_RSER_TBFDE_MASK (0x2000000U)
  10175. #define QuadSPI_RSER_TBFDE_SHIFT (25U)
  10176. #define QuadSPI_RSER_TBFDE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_TBFDE_SHIFT)) & QuadSPI_RSER_TBFDE_MASK)
  10177. #define QuadSPI_RSER_TBUIE_MASK (0x4000000U)
  10178. #define QuadSPI_RSER_TBUIE_SHIFT (26U)
  10179. #define QuadSPI_RSER_TBUIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_TBUIE_SHIFT)) & QuadSPI_RSER_TBUIE_MASK)
  10180. #define QuadSPI_RSER_TBFIE_MASK (0x8000000U)
  10181. #define QuadSPI_RSER_TBFIE_SHIFT (27U)
  10182. #define QuadSPI_RSER_TBFIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_TBFIE_SHIFT)) & QuadSPI_RSER_TBFIE_MASK)
  10183. #define QuadSPI_RSER_DLPFIE_MASK (0x80000000U)
  10184. #define QuadSPI_RSER_DLPFIE_SHIFT (31U)
  10185. #define QuadSPI_RSER_DLPFIE(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RSER_DLPFIE_SHIFT)) & QuadSPI_RSER_DLPFIE_MASK)
  10186. /*! @name SPNDST - Sequence Suspend Status Register */
  10187. #define QuadSPI_SPNDST_SUSPND_MASK (0x1U)
  10188. #define QuadSPI_SPNDST_SUSPND_SHIFT (0U)
  10189. #define QuadSPI_SPNDST_SUSPND(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SPNDST_SUSPND_SHIFT)) & QuadSPI_SPNDST_SUSPND_MASK)
  10190. #define QuadSPI_SPNDST_SPDBUF_MASK (0xC0U)
  10191. #define QuadSPI_SPNDST_SPDBUF_SHIFT (6U)
  10192. #define QuadSPI_SPNDST_SPDBUF(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SPNDST_SPDBUF_SHIFT)) & QuadSPI_SPNDST_SPDBUF_MASK)
  10193. #define QuadSPI_SPNDST_DATLFT_MASK (0x7E00U)
  10194. #define QuadSPI_SPNDST_DATLFT_SHIFT (9U)
  10195. #define QuadSPI_SPNDST_DATLFT(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SPNDST_DATLFT_SHIFT)) & QuadSPI_SPNDST_DATLFT_MASK)
  10196. /*! @name SPTRCLR - Sequence Pointer Clear Register */
  10197. #define QuadSPI_SPTRCLR_BFPTRC_MASK (0x1U)
  10198. #define QuadSPI_SPTRCLR_BFPTRC_SHIFT (0U)
  10199. #define QuadSPI_SPTRCLR_BFPTRC(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SPTRCLR_BFPTRC_SHIFT)) & QuadSPI_SPTRCLR_BFPTRC_MASK)
  10200. #define QuadSPI_SPTRCLR_IPPTRC_MASK (0x100U)
  10201. #define QuadSPI_SPTRCLR_IPPTRC_SHIFT (8U)
  10202. #define QuadSPI_SPTRCLR_IPPTRC(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SPTRCLR_IPPTRC_SHIFT)) & QuadSPI_SPTRCLR_IPPTRC_MASK)
  10203. /*! @name SFA1AD - Serial Flash A1 Top Address */
  10204. #define QuadSPI_SFA1AD_TPADA1_MASK (0xFFFFFC00U)
  10205. #define QuadSPI_SFA1AD_TPADA1_SHIFT (10U)
  10206. #define QuadSPI_SFA1AD_TPADA1(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SFA1AD_TPADA1_SHIFT)) & QuadSPI_SFA1AD_TPADA1_MASK)
  10207. /*! @name SFA2AD - Serial Flash A2 Top Address */
  10208. #define QuadSPI_SFA2AD_TPADA2_MASK (0xFFFFFC00U)
  10209. #define QuadSPI_SFA2AD_TPADA2_SHIFT (10U)
  10210. #define QuadSPI_SFA2AD_TPADA2(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SFA2AD_TPADA2_SHIFT)) & QuadSPI_SFA2AD_TPADA2_MASK)
  10211. /*! @name SFB1AD - Serial Flash B1Top Address */
  10212. #define QuadSPI_SFB1AD_TPADB1_MASK (0xFFFFFC00U)
  10213. #define QuadSPI_SFB1AD_TPADB1_SHIFT (10U)
  10214. #define QuadSPI_SFB1AD_TPADB1(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SFB1AD_TPADB1_SHIFT)) & QuadSPI_SFB1AD_TPADB1_MASK)
  10215. /*! @name SFB2AD - Serial Flash B2Top Address */
  10216. #define QuadSPI_SFB2AD_TPADB2_MASK (0xFFFFFC00U)
  10217. #define QuadSPI_SFB2AD_TPADB2_SHIFT (10U)
  10218. #define QuadSPI_SFB2AD_TPADB2(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_SFB2AD_TPADB2_SHIFT)) & QuadSPI_SFB2AD_TPADB2_MASK)
  10219. /*! @name DLPR - Data Learn Pattern Register */
  10220. #define QuadSPI_DLPR_DLPV_MASK (0xFFFFFFFFU)
  10221. #define QuadSPI_DLPR_DLPV_SHIFT (0U)
  10222. #define QuadSPI_DLPR_DLPV(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_DLPR_DLPV_SHIFT)) & QuadSPI_DLPR_DLPV_MASK)
  10223. /*! @name RBDR - RX Buffer Data Register */
  10224. #define QuadSPI_RBDR_RXDATA_MASK (0xFFFFFFFFU)
  10225. #define QuadSPI_RBDR_RXDATA_SHIFT (0U)
  10226. #define QuadSPI_RBDR_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_RBDR_RXDATA_SHIFT)) & QuadSPI_RBDR_RXDATA_MASK)
  10227. /* The count of QuadSPI_RBDR */
  10228. #define QuadSPI_RBDR_COUNT (16U)
  10229. /*! @name LUTKEY - LUT Key Register */
  10230. #define QuadSPI_LUTKEY_KEY_MASK (0xFFFFFFFFU)
  10231. #define QuadSPI_LUTKEY_KEY_SHIFT (0U)
  10232. #define QuadSPI_LUTKEY_KEY(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_LUTKEY_KEY_SHIFT)) & QuadSPI_LUTKEY_KEY_MASK)
  10233. /*! @name LCKCR - LUT Lock Configuration Register */
  10234. #define QuadSPI_LCKCR_LOCK_MASK (0x1U)
  10235. #define QuadSPI_LCKCR_LOCK_SHIFT (0U)
  10236. #define QuadSPI_LCKCR_LOCK(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_LCKCR_LOCK_SHIFT)) & QuadSPI_LCKCR_LOCK_MASK)
  10237. #define QuadSPI_LCKCR_UNLOCK_MASK (0x2U)
  10238. #define QuadSPI_LCKCR_UNLOCK_SHIFT (1U)
  10239. #define QuadSPI_LCKCR_UNLOCK(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_LCKCR_UNLOCK_SHIFT)) & QuadSPI_LCKCR_UNLOCK_MASK)
  10240. /*! @name LUT - Look-up Table register */
  10241. #define QuadSPI_LUT_OPRND0_MASK (0xFFU)
  10242. #define QuadSPI_LUT_OPRND0_SHIFT (0U)
  10243. #define QuadSPI_LUT_OPRND0(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_LUT_OPRND0_SHIFT)) & QuadSPI_LUT_OPRND0_MASK)
  10244. #define QuadSPI_LUT_PAD0_MASK (0x300U)
  10245. #define QuadSPI_LUT_PAD0_SHIFT (8U)
  10246. #define QuadSPI_LUT_PAD0(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_LUT_PAD0_SHIFT)) & QuadSPI_LUT_PAD0_MASK)
  10247. #define QuadSPI_LUT_INSTR0_MASK (0xFC00U)
  10248. #define QuadSPI_LUT_INSTR0_SHIFT (10U)
  10249. #define QuadSPI_LUT_INSTR0(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_LUT_INSTR0_SHIFT)) & QuadSPI_LUT_INSTR0_MASK)
  10250. #define QuadSPI_LUT_OPRND1_MASK (0xFF0000U)
  10251. #define QuadSPI_LUT_OPRND1_SHIFT (16U)
  10252. #define QuadSPI_LUT_OPRND1(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_LUT_OPRND1_SHIFT)) & QuadSPI_LUT_OPRND1_MASK)
  10253. #define QuadSPI_LUT_PAD1_MASK (0x3000000U)
  10254. #define QuadSPI_LUT_PAD1_SHIFT (24U)
  10255. #define QuadSPI_LUT_PAD1(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_LUT_PAD1_SHIFT)) & QuadSPI_LUT_PAD1_MASK)
  10256. #define QuadSPI_LUT_INSTR1_MASK (0xFC000000U)
  10257. #define QuadSPI_LUT_INSTR1_SHIFT (26U)
  10258. #define QuadSPI_LUT_INSTR1(x) (((uint32_t)(((uint32_t)(x)) << QuadSPI_LUT_INSTR1_SHIFT)) & QuadSPI_LUT_INSTR1_MASK)
  10259. /* The count of QuadSPI_LUT */
  10260. #define QuadSPI_LUT_COUNT (64U)
  10261. /*!
  10262. * @}
  10263. */ /* end of group QuadSPI_Register_Masks */
  10264. /* QuadSPI - Peripheral instance base addresses */
  10265. /** Peripheral QuadSPI0 base address */
  10266. #define QuadSPI0_BASE (0x400DA000u)
  10267. /** Peripheral QuadSPI0 base pointer */
  10268. #define QuadSPI0 ((QuadSPI_Type *)QuadSPI0_BASE)
  10269. /** Array initializer of QuadSPI peripheral base addresses */
  10270. #define QuadSPI_BASE_ADDRS { QuadSPI0_BASE }
  10271. /** Array initializer of QuadSPI peripheral base pointers */
  10272. #define QuadSPI_BASE_PTRS { QuadSPI0 }
  10273. /** Interrupt vectors for the QuadSPI peripheral type */
  10274. #define QuadSPI_IRQS { QuadSPI0_IRQn }
  10275. /*!
  10276. * @}
  10277. */ /* end of group QuadSPI_Peripheral_Access_Layer */
  10278. /* ----------------------------------------------------------------------------
  10279. -- RCM Peripheral Access Layer
  10280. ---------------------------------------------------------------------------- */
  10281. /*!
  10282. * @addtogroup RCM_Peripheral_Access_Layer RCM Peripheral Access Layer
  10283. * @{
  10284. */
  10285. /** RCM - Register Layout Typedef */
  10286. typedef struct {
  10287. __I uint8_t SRS0; /**< System Reset Status Register 0, offset: 0x0 */
  10288. __I uint8_t SRS1; /**< System Reset Status Register 1, offset: 0x1 */
  10289. uint8_t RESERVED_0[2];
  10290. __IO uint8_t RPFC; /**< Reset Pin Filter Control register, offset: 0x4 */
  10291. __IO uint8_t RPFW; /**< Reset Pin Filter Width register, offset: 0x5 */
  10292. __IO uint8_t FM; /**< Force Mode Register, offset: 0x6 */
  10293. __IO uint8_t MR; /**< Mode Register, offset: 0x7 */
  10294. __IO uint8_t SSRS0; /**< Sticky System Reset Status Register 0, offset: 0x8 */
  10295. __IO uint8_t SSRS1; /**< Sticky System Reset Status Register 1, offset: 0x9 */
  10296. } RCM_Type;
  10297. /* ----------------------------------------------------------------------------
  10298. -- RCM Register Masks
  10299. ---------------------------------------------------------------------------- */
  10300. /*!
  10301. * @addtogroup RCM_Register_Masks RCM Register Masks
  10302. * @{
  10303. */
  10304. /*! @name SRS0 - System Reset Status Register 0 */
  10305. #define RCM_SRS0_WAKEUP_MASK (0x1U)
  10306. #define RCM_SRS0_WAKEUP_SHIFT (0U)
  10307. #define RCM_SRS0_WAKEUP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_WAKEUP_SHIFT)) & RCM_SRS0_WAKEUP_MASK)
  10308. #define RCM_SRS0_LVD_MASK (0x2U)
  10309. #define RCM_SRS0_LVD_SHIFT (1U)
  10310. #define RCM_SRS0_LVD(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_LVD_SHIFT)) & RCM_SRS0_LVD_MASK)
  10311. #define RCM_SRS0_LOC_MASK (0x4U)
  10312. #define RCM_SRS0_LOC_SHIFT (2U)
  10313. #define RCM_SRS0_LOC(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_LOC_SHIFT)) & RCM_SRS0_LOC_MASK)
  10314. #define RCM_SRS0_LOL_MASK (0x8U)
  10315. #define RCM_SRS0_LOL_SHIFT (3U)
  10316. #define RCM_SRS0_LOL(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_LOL_SHIFT)) & RCM_SRS0_LOL_MASK)
  10317. #define RCM_SRS0_WDOG_MASK (0x20U)
  10318. #define RCM_SRS0_WDOG_SHIFT (5U)
  10319. #define RCM_SRS0_WDOG(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_WDOG_SHIFT)) & RCM_SRS0_WDOG_MASK)
  10320. #define RCM_SRS0_PIN_MASK (0x40U)
  10321. #define RCM_SRS0_PIN_SHIFT (6U)
  10322. #define RCM_SRS0_PIN(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_PIN_SHIFT)) & RCM_SRS0_PIN_MASK)
  10323. #define RCM_SRS0_POR_MASK (0x80U)
  10324. #define RCM_SRS0_POR_SHIFT (7U)
  10325. #define RCM_SRS0_POR(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_POR_SHIFT)) & RCM_SRS0_POR_MASK)
  10326. /*! @name SRS1 - System Reset Status Register 1 */
  10327. #define RCM_SRS1_JTAG_MASK (0x1U)
  10328. #define RCM_SRS1_JTAG_SHIFT (0U)
  10329. #define RCM_SRS1_JTAG(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_JTAG_SHIFT)) & RCM_SRS1_JTAG_MASK)
  10330. #define RCM_SRS1_LOCKUP_MASK (0x2U)
  10331. #define RCM_SRS1_LOCKUP_SHIFT (1U)
  10332. #define RCM_SRS1_LOCKUP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_LOCKUP_SHIFT)) & RCM_SRS1_LOCKUP_MASK)
  10333. #define RCM_SRS1_SW_MASK (0x4U)
  10334. #define RCM_SRS1_SW_SHIFT (2U)
  10335. #define RCM_SRS1_SW(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_SW_SHIFT)) & RCM_SRS1_SW_MASK)
  10336. #define RCM_SRS1_MDM_AP_MASK (0x8U)
  10337. #define RCM_SRS1_MDM_AP_SHIFT (3U)
  10338. #define RCM_SRS1_MDM_AP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_MDM_AP_SHIFT)) & RCM_SRS1_MDM_AP_MASK)
  10339. #define RCM_SRS1_SACKERR_MASK (0x20U)
  10340. #define RCM_SRS1_SACKERR_SHIFT (5U)
  10341. #define RCM_SRS1_SACKERR(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_SACKERR_SHIFT)) & RCM_SRS1_SACKERR_MASK)
  10342. /*! @name RPFC - Reset Pin Filter Control register */
  10343. #define RCM_RPFC_RSTFLTSRW_MASK (0x3U)
  10344. #define RCM_RPFC_RSTFLTSRW_SHIFT (0U)
  10345. #define RCM_RPFC_RSTFLTSRW(x) (((uint8_t)(((uint8_t)(x)) << RCM_RPFC_RSTFLTSRW_SHIFT)) & RCM_RPFC_RSTFLTSRW_MASK)
  10346. #define RCM_RPFC_RSTFLTSS_MASK (0x4U)
  10347. #define RCM_RPFC_RSTFLTSS_SHIFT (2U)
  10348. #define RCM_RPFC_RSTFLTSS(x) (((uint8_t)(((uint8_t)(x)) << RCM_RPFC_RSTFLTSS_SHIFT)) & RCM_RPFC_RSTFLTSS_MASK)
  10349. /*! @name RPFW - Reset Pin Filter Width register */
  10350. #define RCM_RPFW_RSTFLTSEL_MASK (0x1FU)
  10351. #define RCM_RPFW_RSTFLTSEL_SHIFT (0U)
  10352. #define RCM_RPFW_RSTFLTSEL(x) (((uint8_t)(((uint8_t)(x)) << RCM_RPFW_RSTFLTSEL_SHIFT)) & RCM_RPFW_RSTFLTSEL_MASK)
  10353. /*! @name FM - Force Mode Register */
  10354. #define RCM_FM_FORCEROM_MASK (0x6U)
  10355. #define RCM_FM_FORCEROM_SHIFT (1U)
  10356. #define RCM_FM_FORCEROM(x) (((uint8_t)(((uint8_t)(x)) << RCM_FM_FORCEROM_SHIFT)) & RCM_FM_FORCEROM_MASK)
  10357. /*! @name MR - Mode Register */
  10358. #define RCM_MR_BOOTROM_MASK (0x6U)
  10359. #define RCM_MR_BOOTROM_SHIFT (1U)
  10360. #define RCM_MR_BOOTROM(x) (((uint8_t)(((uint8_t)(x)) << RCM_MR_BOOTROM_SHIFT)) & RCM_MR_BOOTROM_MASK)
  10361. /*! @name SSRS0 - Sticky System Reset Status Register 0 */
  10362. #define RCM_SSRS0_SWAKEUP_MASK (0x1U)
  10363. #define RCM_SSRS0_SWAKEUP_SHIFT (0U)
  10364. #define RCM_SSRS0_SWAKEUP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SWAKEUP_SHIFT)) & RCM_SSRS0_SWAKEUP_MASK)
  10365. #define RCM_SSRS0_SLVD_MASK (0x2U)
  10366. #define RCM_SSRS0_SLVD_SHIFT (1U)
  10367. #define RCM_SSRS0_SLVD(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SLVD_SHIFT)) & RCM_SSRS0_SLVD_MASK)
  10368. #define RCM_SSRS0_SLOC_MASK (0x4U)
  10369. #define RCM_SSRS0_SLOC_SHIFT (2U)
  10370. #define RCM_SSRS0_SLOC(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SLOC_SHIFT)) & RCM_SSRS0_SLOC_MASK)
  10371. #define RCM_SSRS0_SLOL_MASK (0x8U)
  10372. #define RCM_SSRS0_SLOL_SHIFT (3U)
  10373. #define RCM_SSRS0_SLOL(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SLOL_SHIFT)) & RCM_SSRS0_SLOL_MASK)
  10374. #define RCM_SSRS0_SWDOG_MASK (0x20U)
  10375. #define RCM_SSRS0_SWDOG_SHIFT (5U)
  10376. #define RCM_SSRS0_SWDOG(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SWDOG_SHIFT)) & RCM_SSRS0_SWDOG_MASK)
  10377. #define RCM_SSRS0_SPIN_MASK (0x40U)
  10378. #define RCM_SSRS0_SPIN_SHIFT (6U)
  10379. #define RCM_SSRS0_SPIN(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SPIN_SHIFT)) & RCM_SSRS0_SPIN_MASK)
  10380. #define RCM_SSRS0_SPOR_MASK (0x80U)
  10381. #define RCM_SSRS0_SPOR_SHIFT (7U)
  10382. #define RCM_SSRS0_SPOR(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS0_SPOR_SHIFT)) & RCM_SSRS0_SPOR_MASK)
  10383. /*! @name SSRS1 - Sticky System Reset Status Register 1 */
  10384. #define RCM_SSRS1_SJTAG_MASK (0x1U)
  10385. #define RCM_SSRS1_SJTAG_SHIFT (0U)
  10386. #define RCM_SSRS1_SJTAG(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS1_SJTAG_SHIFT)) & RCM_SSRS1_SJTAG_MASK)
  10387. #define RCM_SSRS1_SLOCKUP_MASK (0x2U)
  10388. #define RCM_SSRS1_SLOCKUP_SHIFT (1U)
  10389. #define RCM_SSRS1_SLOCKUP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS1_SLOCKUP_SHIFT)) & RCM_SSRS1_SLOCKUP_MASK)
  10390. #define RCM_SSRS1_SSW_MASK (0x4U)
  10391. #define RCM_SSRS1_SSW_SHIFT (2U)
  10392. #define RCM_SSRS1_SSW(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS1_SSW_SHIFT)) & RCM_SSRS1_SSW_MASK)
  10393. #define RCM_SSRS1_SMDM_AP_MASK (0x8U)
  10394. #define RCM_SSRS1_SMDM_AP_SHIFT (3U)
  10395. #define RCM_SSRS1_SMDM_AP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS1_SMDM_AP_SHIFT)) & RCM_SSRS1_SMDM_AP_MASK)
  10396. #define RCM_SSRS1_SSACKERR_MASK (0x20U)
  10397. #define RCM_SSRS1_SSACKERR_SHIFT (5U)
  10398. #define RCM_SSRS1_SSACKERR(x) (((uint8_t)(((uint8_t)(x)) << RCM_SSRS1_SSACKERR_SHIFT)) & RCM_SSRS1_SSACKERR_MASK)
  10399. /*!
  10400. * @}
  10401. */ /* end of group RCM_Register_Masks */
  10402. /* RCM - Peripheral instance base addresses */
  10403. /** Peripheral RCM base address */
  10404. #define RCM_BASE (0x4007F000u)
  10405. /** Peripheral RCM base pointer */
  10406. #define RCM ((RCM_Type *)RCM_BASE)
  10407. /** Array initializer of RCM peripheral base addresses */
  10408. #define RCM_BASE_ADDRS { RCM_BASE }
  10409. /** Array initializer of RCM peripheral base pointers */
  10410. #define RCM_BASE_PTRS { RCM }
  10411. /*!
  10412. * @}
  10413. */ /* end of group RCM_Peripheral_Access_Layer */
  10414. /* ----------------------------------------------------------------------------
  10415. -- RFSYS Peripheral Access Layer
  10416. ---------------------------------------------------------------------------- */
  10417. /*!
  10418. * @addtogroup RFSYS_Peripheral_Access_Layer RFSYS Peripheral Access Layer
  10419. * @{
  10420. */
  10421. /** RFSYS - Register Layout Typedef */
  10422. typedef struct {
  10423. __IO uint32_t REG[8]; /**< Register file register, array offset: 0x0, array step: 0x4 */
  10424. } RFSYS_Type;
  10425. /* ----------------------------------------------------------------------------
  10426. -- RFSYS Register Masks
  10427. ---------------------------------------------------------------------------- */
  10428. /*!
  10429. * @addtogroup RFSYS_Register_Masks RFSYS Register Masks
  10430. * @{
  10431. */
  10432. /*! @name REG - Register file register */
  10433. #define RFSYS_REG_LL_MASK (0xFFU)
  10434. #define RFSYS_REG_LL_SHIFT (0U)
  10435. #define RFSYS_REG_LL(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_LL_SHIFT)) & RFSYS_REG_LL_MASK)
  10436. #define RFSYS_REG_LH_MASK (0xFF00U)
  10437. #define RFSYS_REG_LH_SHIFT (8U)
  10438. #define RFSYS_REG_LH(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_LH_SHIFT)) & RFSYS_REG_LH_MASK)
  10439. #define RFSYS_REG_HL_MASK (0xFF0000U)
  10440. #define RFSYS_REG_HL_SHIFT (16U)
  10441. #define RFSYS_REG_HL(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_HL_SHIFT)) & RFSYS_REG_HL_MASK)
  10442. #define RFSYS_REG_HH_MASK (0xFF000000U)
  10443. #define RFSYS_REG_HH_SHIFT (24U)
  10444. #define RFSYS_REG_HH(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_HH_SHIFT)) & RFSYS_REG_HH_MASK)
  10445. /* The count of RFSYS_REG */
  10446. #define RFSYS_REG_COUNT (8U)
  10447. /*!
  10448. * @}
  10449. */ /* end of group RFSYS_Register_Masks */
  10450. /* RFSYS - Peripheral instance base addresses */
  10451. /** Peripheral RFSYS base address */
  10452. #define RFSYS_BASE (0x40041000u)
  10453. /** Peripheral RFSYS base pointer */
  10454. #define RFSYS ((RFSYS_Type *)RFSYS_BASE)
  10455. /** Array initializer of RFSYS peripheral base addresses */
  10456. #define RFSYS_BASE_ADDRS { RFSYS_BASE }
  10457. /** Array initializer of RFSYS peripheral base pointers */
  10458. #define RFSYS_BASE_PTRS { RFSYS }
  10459. /*!
  10460. * @}
  10461. */ /* end of group RFSYS_Peripheral_Access_Layer */
  10462. /* ----------------------------------------------------------------------------
  10463. -- RFVBAT Peripheral Access Layer
  10464. ---------------------------------------------------------------------------- */
  10465. /*!
  10466. * @addtogroup RFVBAT_Peripheral_Access_Layer RFVBAT Peripheral Access Layer
  10467. * @{
  10468. */
  10469. /** RFVBAT - Register Layout Typedef */
  10470. typedef struct {
  10471. __IO uint32_t REG[8]; /**< VBAT register file register, array offset: 0x0, array step: 0x4 */
  10472. } RFVBAT_Type;
  10473. /* ----------------------------------------------------------------------------
  10474. -- RFVBAT Register Masks
  10475. ---------------------------------------------------------------------------- */
  10476. /*!
  10477. * @addtogroup RFVBAT_Register_Masks RFVBAT Register Masks
  10478. * @{
  10479. */
  10480. /*! @name REG - VBAT register file register */
  10481. #define RFVBAT_REG_LL_MASK (0xFFU)
  10482. #define RFVBAT_REG_LL_SHIFT (0U)
  10483. #define RFVBAT_REG_LL(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_LL_SHIFT)) & RFVBAT_REG_LL_MASK)
  10484. #define RFVBAT_REG_LH_MASK (0xFF00U)
  10485. #define RFVBAT_REG_LH_SHIFT (8U)
  10486. #define RFVBAT_REG_LH(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_LH_SHIFT)) & RFVBAT_REG_LH_MASK)
  10487. #define RFVBAT_REG_HL_MASK (0xFF0000U)
  10488. #define RFVBAT_REG_HL_SHIFT (16U)
  10489. #define RFVBAT_REG_HL(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_HL_SHIFT)) & RFVBAT_REG_HL_MASK)
  10490. #define RFVBAT_REG_HH_MASK (0xFF000000U)
  10491. #define RFVBAT_REG_HH_SHIFT (24U)
  10492. #define RFVBAT_REG_HH(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_HH_SHIFT)) & RFVBAT_REG_HH_MASK)
  10493. /* The count of RFVBAT_REG */
  10494. #define RFVBAT_REG_COUNT (8U)
  10495. /*!
  10496. * @}
  10497. */ /* end of group RFVBAT_Register_Masks */
  10498. /* RFVBAT - Peripheral instance base addresses */
  10499. /** Peripheral RFVBAT base address */
  10500. #define RFVBAT_BASE (0x4003E000u)
  10501. /** Peripheral RFVBAT base pointer */
  10502. #define RFVBAT ((RFVBAT_Type *)RFVBAT_BASE)
  10503. /** Array initializer of RFVBAT peripheral base addresses */
  10504. #define RFVBAT_BASE_ADDRS { RFVBAT_BASE }
  10505. /** Array initializer of RFVBAT peripheral base pointers */
  10506. #define RFVBAT_BASE_PTRS { RFVBAT }
  10507. /*!
  10508. * @}
  10509. */ /* end of group RFVBAT_Peripheral_Access_Layer */
  10510. /* ----------------------------------------------------------------------------
  10511. -- RTC Peripheral Access Layer
  10512. ---------------------------------------------------------------------------- */
  10513. /*!
  10514. * @addtogroup RTC_Peripheral_Access_Layer RTC Peripheral Access Layer
  10515. * @{
  10516. */
  10517. /** RTC - Register Layout Typedef */
  10518. typedef struct {
  10519. __IO uint32_t TSR; /**< RTC Time Seconds Register, offset: 0x0 */
  10520. __IO uint32_t TPR; /**< RTC Time Prescaler Register, offset: 0x4 */
  10521. __IO uint32_t TAR; /**< RTC Time Alarm Register, offset: 0x8 */
  10522. __IO uint32_t TCR; /**< RTC Time Compensation Register, offset: 0xC */
  10523. __IO uint32_t CR; /**< RTC Control Register, offset: 0x10 */
  10524. __IO uint32_t SR; /**< RTC Status Register, offset: 0x14 */
  10525. __IO uint32_t LR; /**< RTC Lock Register, offset: 0x18 */
  10526. __IO uint32_t IER; /**< RTC Interrupt Enable Register, offset: 0x1C */
  10527. uint8_t RESERVED_0[2016];
  10528. __IO uint32_t WAR; /**< RTC Write Access Register, offset: 0x800 */
  10529. __IO uint32_t RAR; /**< RTC Read Access Register, offset: 0x804 */
  10530. } RTC_Type;
  10531. /* ----------------------------------------------------------------------------
  10532. -- RTC Register Masks
  10533. ---------------------------------------------------------------------------- */
  10534. /*!
  10535. * @addtogroup RTC_Register_Masks RTC Register Masks
  10536. * @{
  10537. */
  10538. /*! @name TSR - RTC Time Seconds Register */
  10539. #define RTC_TSR_TSR_MASK (0xFFFFFFFFU)
  10540. #define RTC_TSR_TSR_SHIFT (0U)
  10541. #define RTC_TSR_TSR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TSR_TSR_SHIFT)) & RTC_TSR_TSR_MASK)
  10542. /*! @name TPR - RTC Time Prescaler Register */
  10543. #define RTC_TPR_TPR_MASK (0xFFFFU)
  10544. #define RTC_TPR_TPR_SHIFT (0U)
  10545. #define RTC_TPR_TPR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TPR_TPR_SHIFT)) & RTC_TPR_TPR_MASK)
  10546. /*! @name TAR - RTC Time Alarm Register */
  10547. #define RTC_TAR_TAR_MASK (0xFFFFFFFFU)
  10548. #define RTC_TAR_TAR_SHIFT (0U)
  10549. #define RTC_TAR_TAR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TAR_TAR_SHIFT)) & RTC_TAR_TAR_MASK)
  10550. /*! @name TCR - RTC Time Compensation Register */
  10551. #define RTC_TCR_TCR_MASK (0xFFU)
  10552. #define RTC_TCR_TCR_SHIFT (0U)
  10553. #define RTC_TCR_TCR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_TCR_SHIFT)) & RTC_TCR_TCR_MASK)
  10554. #define RTC_TCR_CIR_MASK (0xFF00U)
  10555. #define RTC_TCR_CIR_SHIFT (8U)
  10556. #define RTC_TCR_CIR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_CIR_SHIFT)) & RTC_TCR_CIR_MASK)
  10557. #define RTC_TCR_TCV_MASK (0xFF0000U)
  10558. #define RTC_TCR_TCV_SHIFT (16U)
  10559. #define RTC_TCR_TCV(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_TCV_SHIFT)) & RTC_TCR_TCV_MASK)
  10560. #define RTC_TCR_CIC_MASK (0xFF000000U)
  10561. #define RTC_TCR_CIC_SHIFT (24U)
  10562. #define RTC_TCR_CIC(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_CIC_SHIFT)) & RTC_TCR_CIC_MASK)
  10563. /*! @name CR - RTC Control Register */
  10564. #define RTC_CR_SWR_MASK (0x1U)
  10565. #define RTC_CR_SWR_SHIFT (0U)
  10566. #define RTC_CR_SWR(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SWR_SHIFT)) & RTC_CR_SWR_MASK)
  10567. #define RTC_CR_WPE_MASK (0x2U)
  10568. #define RTC_CR_WPE_SHIFT (1U)
  10569. #define RTC_CR_WPE(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_WPE_SHIFT)) & RTC_CR_WPE_MASK)
  10570. #define RTC_CR_SUP_MASK (0x4U)
  10571. #define RTC_CR_SUP_SHIFT (2U)
  10572. #define RTC_CR_SUP(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SUP_SHIFT)) & RTC_CR_SUP_MASK)
  10573. #define RTC_CR_UM_MASK (0x8U)
  10574. #define RTC_CR_UM_SHIFT (3U)
  10575. #define RTC_CR_UM(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_UM_SHIFT)) & RTC_CR_UM_MASK)
  10576. #define RTC_CR_WPS_MASK (0x10U)
  10577. #define RTC_CR_WPS_SHIFT (4U)
  10578. #define RTC_CR_WPS(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_WPS_SHIFT)) & RTC_CR_WPS_MASK)
  10579. #define RTC_CR_OSCE_MASK (0x100U)
  10580. #define RTC_CR_OSCE_SHIFT (8U)
  10581. #define RTC_CR_OSCE(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_OSCE_SHIFT)) & RTC_CR_OSCE_MASK)
  10582. #define RTC_CR_CLKO_MASK (0x200U)
  10583. #define RTC_CR_CLKO_SHIFT (9U)
  10584. #define RTC_CR_CLKO(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_CLKO_SHIFT)) & RTC_CR_CLKO_MASK)
  10585. #define RTC_CR_SC16P_MASK (0x400U)
  10586. #define RTC_CR_SC16P_SHIFT (10U)
  10587. #define RTC_CR_SC16P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC16P_SHIFT)) & RTC_CR_SC16P_MASK)
  10588. #define RTC_CR_SC8P_MASK (0x800U)
  10589. #define RTC_CR_SC8P_SHIFT (11U)
  10590. #define RTC_CR_SC8P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC8P_SHIFT)) & RTC_CR_SC8P_MASK)
  10591. #define RTC_CR_SC4P_MASK (0x1000U)
  10592. #define RTC_CR_SC4P_SHIFT (12U)
  10593. #define RTC_CR_SC4P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC4P_SHIFT)) & RTC_CR_SC4P_MASK)
  10594. #define RTC_CR_SC2P_MASK (0x2000U)
  10595. #define RTC_CR_SC2P_SHIFT (13U)
  10596. #define RTC_CR_SC2P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC2P_SHIFT)) & RTC_CR_SC2P_MASK)
  10597. /*! @name SR - RTC Status Register */
  10598. #define RTC_SR_TIF_MASK (0x1U)
  10599. #define RTC_SR_TIF_SHIFT (0U)
  10600. #define RTC_SR_TIF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TIF_SHIFT)) & RTC_SR_TIF_MASK)
  10601. #define RTC_SR_TOF_MASK (0x2U)
  10602. #define RTC_SR_TOF_SHIFT (1U)
  10603. #define RTC_SR_TOF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TOF_SHIFT)) & RTC_SR_TOF_MASK)
  10604. #define RTC_SR_TAF_MASK (0x4U)
  10605. #define RTC_SR_TAF_SHIFT (2U)
  10606. #define RTC_SR_TAF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TAF_SHIFT)) & RTC_SR_TAF_MASK)
  10607. #define RTC_SR_TCE_MASK (0x10U)
  10608. #define RTC_SR_TCE_SHIFT (4U)
  10609. #define RTC_SR_TCE(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TCE_SHIFT)) & RTC_SR_TCE_MASK)
  10610. /*! @name LR - RTC Lock Register */
  10611. #define RTC_LR_TCL_MASK (0x8U)
  10612. #define RTC_LR_TCL_SHIFT (3U)
  10613. #define RTC_LR_TCL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_TCL_SHIFT)) & RTC_LR_TCL_MASK)
  10614. #define RTC_LR_CRL_MASK (0x10U)
  10615. #define RTC_LR_CRL_SHIFT (4U)
  10616. #define RTC_LR_CRL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_CRL_SHIFT)) & RTC_LR_CRL_MASK)
  10617. #define RTC_LR_SRL_MASK (0x20U)
  10618. #define RTC_LR_SRL_SHIFT (5U)
  10619. #define RTC_LR_SRL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_SRL_SHIFT)) & RTC_LR_SRL_MASK)
  10620. #define RTC_LR_LRL_MASK (0x40U)
  10621. #define RTC_LR_LRL_SHIFT (6U)
  10622. #define RTC_LR_LRL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_LRL_SHIFT)) & RTC_LR_LRL_MASK)
  10623. /*! @name IER - RTC Interrupt Enable Register */
  10624. #define RTC_IER_TIIE_MASK (0x1U)
  10625. #define RTC_IER_TIIE_SHIFT (0U)
  10626. #define RTC_IER_TIIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TIIE_SHIFT)) & RTC_IER_TIIE_MASK)
  10627. #define RTC_IER_TOIE_MASK (0x2U)
  10628. #define RTC_IER_TOIE_SHIFT (1U)
  10629. #define RTC_IER_TOIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TOIE_SHIFT)) & RTC_IER_TOIE_MASK)
  10630. #define RTC_IER_TAIE_MASK (0x4U)
  10631. #define RTC_IER_TAIE_SHIFT (2U)
  10632. #define RTC_IER_TAIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TAIE_SHIFT)) & RTC_IER_TAIE_MASK)
  10633. #define RTC_IER_TSIE_MASK (0x10U)
  10634. #define RTC_IER_TSIE_SHIFT (4U)
  10635. #define RTC_IER_TSIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TSIE_SHIFT)) & RTC_IER_TSIE_MASK)
  10636. #define RTC_IER_WPON_MASK (0x80U)
  10637. #define RTC_IER_WPON_SHIFT (7U)
  10638. #define RTC_IER_WPON(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_WPON_SHIFT)) & RTC_IER_WPON_MASK)
  10639. /*! @name WAR - RTC Write Access Register */
  10640. #define RTC_WAR_TSRW_MASK (0x1U)
  10641. #define RTC_WAR_TSRW_SHIFT (0U)
  10642. #define RTC_WAR_TSRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TSRW_SHIFT)) & RTC_WAR_TSRW_MASK)
  10643. #define RTC_WAR_TPRW_MASK (0x2U)
  10644. #define RTC_WAR_TPRW_SHIFT (1U)
  10645. #define RTC_WAR_TPRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TPRW_SHIFT)) & RTC_WAR_TPRW_MASK)
  10646. #define RTC_WAR_TARW_MASK (0x4U)
  10647. #define RTC_WAR_TARW_SHIFT (2U)
  10648. #define RTC_WAR_TARW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TARW_SHIFT)) & RTC_WAR_TARW_MASK)
  10649. #define RTC_WAR_TCRW_MASK (0x8U)
  10650. #define RTC_WAR_TCRW_SHIFT (3U)
  10651. #define RTC_WAR_TCRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TCRW_SHIFT)) & RTC_WAR_TCRW_MASK)
  10652. #define RTC_WAR_CRW_MASK (0x10U)
  10653. #define RTC_WAR_CRW_SHIFT (4U)
  10654. #define RTC_WAR_CRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_CRW_SHIFT)) & RTC_WAR_CRW_MASK)
  10655. #define RTC_WAR_SRW_MASK (0x20U)
  10656. #define RTC_WAR_SRW_SHIFT (5U)
  10657. #define RTC_WAR_SRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_SRW_SHIFT)) & RTC_WAR_SRW_MASK)
  10658. #define RTC_WAR_LRW_MASK (0x40U)
  10659. #define RTC_WAR_LRW_SHIFT (6U)
  10660. #define RTC_WAR_LRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_LRW_SHIFT)) & RTC_WAR_LRW_MASK)
  10661. #define RTC_WAR_IERW_MASK (0x80U)
  10662. #define RTC_WAR_IERW_SHIFT (7U)
  10663. #define RTC_WAR_IERW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_IERW_SHIFT)) & RTC_WAR_IERW_MASK)
  10664. /*! @name RAR - RTC Read Access Register */
  10665. #define RTC_RAR_TSRR_MASK (0x1U)
  10666. #define RTC_RAR_TSRR_SHIFT (0U)
  10667. #define RTC_RAR_TSRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TSRR_SHIFT)) & RTC_RAR_TSRR_MASK)
  10668. #define RTC_RAR_TPRR_MASK (0x2U)
  10669. #define RTC_RAR_TPRR_SHIFT (1U)
  10670. #define RTC_RAR_TPRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TPRR_SHIFT)) & RTC_RAR_TPRR_MASK)
  10671. #define RTC_RAR_TARR_MASK (0x4U)
  10672. #define RTC_RAR_TARR_SHIFT (2U)
  10673. #define RTC_RAR_TARR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TARR_SHIFT)) & RTC_RAR_TARR_MASK)
  10674. #define RTC_RAR_TCRR_MASK (0x8U)
  10675. #define RTC_RAR_TCRR_SHIFT (3U)
  10676. #define RTC_RAR_TCRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TCRR_SHIFT)) & RTC_RAR_TCRR_MASK)
  10677. #define RTC_RAR_CRR_MASK (0x10U)
  10678. #define RTC_RAR_CRR_SHIFT (4U)
  10679. #define RTC_RAR_CRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_CRR_SHIFT)) & RTC_RAR_CRR_MASK)
  10680. #define RTC_RAR_SRR_MASK (0x20U)
  10681. #define RTC_RAR_SRR_SHIFT (5U)
  10682. #define RTC_RAR_SRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_SRR_SHIFT)) & RTC_RAR_SRR_MASK)
  10683. #define RTC_RAR_LRR_MASK (0x40U)
  10684. #define RTC_RAR_LRR_SHIFT (6U)
  10685. #define RTC_RAR_LRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_LRR_SHIFT)) & RTC_RAR_LRR_MASK)
  10686. #define RTC_RAR_IERR_MASK (0x80U)
  10687. #define RTC_RAR_IERR_SHIFT (7U)
  10688. #define RTC_RAR_IERR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_IERR_SHIFT)) & RTC_RAR_IERR_MASK)
  10689. /*!
  10690. * @}
  10691. */ /* end of group RTC_Register_Masks */
  10692. /* RTC - Peripheral instance base addresses */
  10693. /** Peripheral RTC base address */
  10694. #define RTC_BASE (0x4003D000u)
  10695. /** Peripheral RTC base pointer */
  10696. #define RTC ((RTC_Type *)RTC_BASE)
  10697. /** Array initializer of RTC peripheral base addresses */
  10698. #define RTC_BASE_ADDRS { RTC_BASE }
  10699. /** Array initializer of RTC peripheral base pointers */
  10700. #define RTC_BASE_PTRS { RTC }
  10701. /** Interrupt vectors for the RTC peripheral type */
  10702. #define RTC_IRQS { RTC_IRQn }
  10703. #define RTC_SECONDS_IRQS { RTC_Seconds_IRQn }
  10704. /*!
  10705. * @}
  10706. */ /* end of group RTC_Peripheral_Access_Layer */
  10707. /* ----------------------------------------------------------------------------
  10708. -- SDHC Peripheral Access Layer
  10709. ---------------------------------------------------------------------------- */
  10710. /*!
  10711. * @addtogroup SDHC_Peripheral_Access_Layer SDHC Peripheral Access Layer
  10712. * @{
  10713. */
  10714. /** SDHC - Register Layout Typedef */
  10715. typedef struct {
  10716. __IO uint32_t DSADDR; /**< DMA System Address register, offset: 0x0 */
  10717. __IO uint32_t BLKATTR; /**< Block Attributes register, offset: 0x4 */
  10718. __IO uint32_t CMDARG; /**< Command Argument register, offset: 0x8 */
  10719. __IO uint32_t XFERTYP; /**< Transfer Type register, offset: 0xC */
  10720. __I uint32_t CMDRSP[4]; /**< Command Response 0..Command Response 3, array offset: 0x10, array step: 0x4 */
  10721. __IO uint32_t DATPORT; /**< Buffer Data Port register, offset: 0x20 */
  10722. __I uint32_t PRSSTAT; /**< Present State register, offset: 0x24 */
  10723. __IO uint32_t PROCTL; /**< Protocol Control register, offset: 0x28 */
  10724. __IO uint32_t SYSCTL; /**< System Control register, offset: 0x2C */
  10725. __IO uint32_t IRQSTAT; /**< Interrupt Status register, offset: 0x30 */
  10726. __IO uint32_t IRQSTATEN; /**< Interrupt Status Enable register, offset: 0x34 */
  10727. __IO uint32_t IRQSIGEN; /**< Interrupt Signal Enable register, offset: 0x38 */
  10728. __I uint32_t AC12ERR; /**< Auto CMD12 Error Status Register, offset: 0x3C */
  10729. __I uint32_t HTCAPBLT; /**< Host Controller Capabilities, offset: 0x40 */
  10730. __IO uint32_t WML; /**< Watermark Level Register, offset: 0x44 */
  10731. uint8_t RESERVED_0[8];
  10732. __O uint32_t FEVT; /**< Force Event register, offset: 0x50 */
  10733. __I uint32_t ADMAES; /**< ADMA Error Status register, offset: 0x54 */
  10734. __IO uint32_t ADSADDR; /**< ADMA System Addressregister, offset: 0x58 */
  10735. uint8_t RESERVED_1[100];
  10736. __IO uint32_t VENDOR; /**< Vendor Specific register, offset: 0xC0 */
  10737. __IO uint32_t MMCBOOT; /**< MMC Boot register, offset: 0xC4 */
  10738. uint8_t RESERVED_2[52];
  10739. __I uint32_t HOSTVER; /**< Host Controller Version, offset: 0xFC */
  10740. } SDHC_Type;
  10741. /* ----------------------------------------------------------------------------
  10742. -- SDHC Register Masks
  10743. ---------------------------------------------------------------------------- */
  10744. /*!
  10745. * @addtogroup SDHC_Register_Masks SDHC Register Masks
  10746. * @{
  10747. */
  10748. /*! @name DSADDR - DMA System Address register */
  10749. #define SDHC_DSADDR_DSADDR_MASK (0xFFFFFFFCU)
  10750. #define SDHC_DSADDR_DSADDR_SHIFT (2U)
  10751. #define SDHC_DSADDR_DSADDR(x) (((uint32_t)(((uint32_t)(x)) << SDHC_DSADDR_DSADDR_SHIFT)) & SDHC_DSADDR_DSADDR_MASK)
  10752. /*! @name BLKATTR - Block Attributes register */
  10753. #define SDHC_BLKATTR_BLKSIZE_MASK (0x1FFFU)
  10754. #define SDHC_BLKATTR_BLKSIZE_SHIFT (0U)
  10755. #define SDHC_BLKATTR_BLKSIZE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_BLKATTR_BLKSIZE_SHIFT)) & SDHC_BLKATTR_BLKSIZE_MASK)
  10756. #define SDHC_BLKATTR_BLKCNT_MASK (0xFFFF0000U)
  10757. #define SDHC_BLKATTR_BLKCNT_SHIFT (16U)
  10758. #define SDHC_BLKATTR_BLKCNT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_BLKATTR_BLKCNT_SHIFT)) & SDHC_BLKATTR_BLKCNT_MASK)
  10759. /*! @name CMDARG - Command Argument register */
  10760. #define SDHC_CMDARG_CMDARG_MASK (0xFFFFFFFFU)
  10761. #define SDHC_CMDARG_CMDARG_SHIFT (0U)
  10762. #define SDHC_CMDARG_CMDARG(x) (((uint32_t)(((uint32_t)(x)) << SDHC_CMDARG_CMDARG_SHIFT)) & SDHC_CMDARG_CMDARG_MASK)
  10763. /*! @name XFERTYP - Transfer Type register */
  10764. #define SDHC_XFERTYP_DMAEN_MASK (0x1U)
  10765. #define SDHC_XFERTYP_DMAEN_SHIFT (0U)
  10766. #define SDHC_XFERTYP_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_DMAEN_SHIFT)) & SDHC_XFERTYP_DMAEN_MASK)
  10767. #define SDHC_XFERTYP_BCEN_MASK (0x2U)
  10768. #define SDHC_XFERTYP_BCEN_SHIFT (1U)
  10769. #define SDHC_XFERTYP_BCEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_BCEN_SHIFT)) & SDHC_XFERTYP_BCEN_MASK)
  10770. #define SDHC_XFERTYP_AC12EN_MASK (0x4U)
  10771. #define SDHC_XFERTYP_AC12EN_SHIFT (2U)
  10772. #define SDHC_XFERTYP_AC12EN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_AC12EN_SHIFT)) & SDHC_XFERTYP_AC12EN_MASK)
  10773. #define SDHC_XFERTYP_DTDSEL_MASK (0x10U)
  10774. #define SDHC_XFERTYP_DTDSEL_SHIFT (4U)
  10775. #define SDHC_XFERTYP_DTDSEL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_DTDSEL_SHIFT)) & SDHC_XFERTYP_DTDSEL_MASK)
  10776. #define SDHC_XFERTYP_MSBSEL_MASK (0x20U)
  10777. #define SDHC_XFERTYP_MSBSEL_SHIFT (5U)
  10778. #define SDHC_XFERTYP_MSBSEL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_MSBSEL_SHIFT)) & SDHC_XFERTYP_MSBSEL_MASK)
  10779. #define SDHC_XFERTYP_RSPTYP_MASK (0x30000U)
  10780. #define SDHC_XFERTYP_RSPTYP_SHIFT (16U)
  10781. #define SDHC_XFERTYP_RSPTYP(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_RSPTYP_SHIFT)) & SDHC_XFERTYP_RSPTYP_MASK)
  10782. #define SDHC_XFERTYP_CCCEN_MASK (0x80000U)
  10783. #define SDHC_XFERTYP_CCCEN_SHIFT (19U)
  10784. #define SDHC_XFERTYP_CCCEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_CCCEN_SHIFT)) & SDHC_XFERTYP_CCCEN_MASK)
  10785. #define SDHC_XFERTYP_CICEN_MASK (0x100000U)
  10786. #define SDHC_XFERTYP_CICEN_SHIFT (20U)
  10787. #define SDHC_XFERTYP_CICEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_CICEN_SHIFT)) & SDHC_XFERTYP_CICEN_MASK)
  10788. #define SDHC_XFERTYP_DPSEL_MASK (0x200000U)
  10789. #define SDHC_XFERTYP_DPSEL_SHIFT (21U)
  10790. #define SDHC_XFERTYP_DPSEL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_DPSEL_SHIFT)) & SDHC_XFERTYP_DPSEL_MASK)
  10791. #define SDHC_XFERTYP_CMDTYP_MASK (0xC00000U)
  10792. #define SDHC_XFERTYP_CMDTYP_SHIFT (22U)
  10793. #define SDHC_XFERTYP_CMDTYP(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_CMDTYP_SHIFT)) & SDHC_XFERTYP_CMDTYP_MASK)
  10794. #define SDHC_XFERTYP_CMDINX_MASK (0x3F000000U)
  10795. #define SDHC_XFERTYP_CMDINX_SHIFT (24U)
  10796. #define SDHC_XFERTYP_CMDINX(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_CMDINX_SHIFT)) & SDHC_XFERTYP_CMDINX_MASK)
  10797. /*! @name CMDRSP - Command Response 0..Command Response 3 */
  10798. #define SDHC_CMDRSP_CMDRSP0_MASK (0xFFFFFFFFU)
  10799. #define SDHC_CMDRSP_CMDRSP0_SHIFT (0U)
  10800. #define SDHC_CMDRSP_CMDRSP0(x) (((uint32_t)(((uint32_t)(x)) << SDHC_CMDRSP_CMDRSP0_SHIFT)) & SDHC_CMDRSP_CMDRSP0_MASK)
  10801. #define SDHC_CMDRSP_CMDRSP1_MASK (0xFFFFFFFFU)
  10802. #define SDHC_CMDRSP_CMDRSP1_SHIFT (0U)
  10803. #define SDHC_CMDRSP_CMDRSP1(x) (((uint32_t)(((uint32_t)(x)) << SDHC_CMDRSP_CMDRSP1_SHIFT)) & SDHC_CMDRSP_CMDRSP1_MASK)
  10804. #define SDHC_CMDRSP_CMDRSP2_MASK (0xFFFFFFFFU)
  10805. #define SDHC_CMDRSP_CMDRSP2_SHIFT (0U)
  10806. #define SDHC_CMDRSP_CMDRSP2(x) (((uint32_t)(((uint32_t)(x)) << SDHC_CMDRSP_CMDRSP2_SHIFT)) & SDHC_CMDRSP_CMDRSP2_MASK)
  10807. #define SDHC_CMDRSP_CMDRSP3_MASK (0xFFFFFFFFU)
  10808. #define SDHC_CMDRSP_CMDRSP3_SHIFT (0U)
  10809. #define SDHC_CMDRSP_CMDRSP3(x) (((uint32_t)(((uint32_t)(x)) << SDHC_CMDRSP_CMDRSP3_SHIFT)) & SDHC_CMDRSP_CMDRSP3_MASK)
  10810. /* The count of SDHC_CMDRSP */
  10811. #define SDHC_CMDRSP_COUNT (4U)
  10812. /*! @name DATPORT - Buffer Data Port register */
  10813. #define SDHC_DATPORT_DATCONT_MASK (0xFFFFFFFFU)
  10814. #define SDHC_DATPORT_DATCONT_SHIFT (0U)
  10815. #define SDHC_DATPORT_DATCONT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_DATPORT_DATCONT_SHIFT)) & SDHC_DATPORT_DATCONT_MASK)
  10816. /*! @name PRSSTAT - Present State register */
  10817. #define SDHC_PRSSTAT_CIHB_MASK (0x1U)
  10818. #define SDHC_PRSSTAT_CIHB_SHIFT (0U)
  10819. #define SDHC_PRSSTAT_CIHB(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_CIHB_SHIFT)) & SDHC_PRSSTAT_CIHB_MASK)
  10820. #define SDHC_PRSSTAT_CDIHB_MASK (0x2U)
  10821. #define SDHC_PRSSTAT_CDIHB_SHIFT (1U)
  10822. #define SDHC_PRSSTAT_CDIHB(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_CDIHB_SHIFT)) & SDHC_PRSSTAT_CDIHB_MASK)
  10823. #define SDHC_PRSSTAT_DLA_MASK (0x4U)
  10824. #define SDHC_PRSSTAT_DLA_SHIFT (2U)
  10825. #define SDHC_PRSSTAT_DLA(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_DLA_SHIFT)) & SDHC_PRSSTAT_DLA_MASK)
  10826. #define SDHC_PRSSTAT_SDSTB_MASK (0x8U)
  10827. #define SDHC_PRSSTAT_SDSTB_SHIFT (3U)
  10828. #define SDHC_PRSSTAT_SDSTB(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_SDSTB_SHIFT)) & SDHC_PRSSTAT_SDSTB_MASK)
  10829. #define SDHC_PRSSTAT_IPGOFF_MASK (0x10U)
  10830. #define SDHC_PRSSTAT_IPGOFF_SHIFT (4U)
  10831. #define SDHC_PRSSTAT_IPGOFF(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_IPGOFF_SHIFT)) & SDHC_PRSSTAT_IPGOFF_MASK)
  10832. #define SDHC_PRSSTAT_HCKOFF_MASK (0x20U)
  10833. #define SDHC_PRSSTAT_HCKOFF_SHIFT (5U)
  10834. #define SDHC_PRSSTAT_HCKOFF(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_HCKOFF_SHIFT)) & SDHC_PRSSTAT_HCKOFF_MASK)
  10835. #define SDHC_PRSSTAT_PEROFF_MASK (0x40U)
  10836. #define SDHC_PRSSTAT_PEROFF_SHIFT (6U)
  10837. #define SDHC_PRSSTAT_PEROFF(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_PEROFF_SHIFT)) & SDHC_PRSSTAT_PEROFF_MASK)
  10838. #define SDHC_PRSSTAT_SDOFF_MASK (0x80U)
  10839. #define SDHC_PRSSTAT_SDOFF_SHIFT (7U)
  10840. #define SDHC_PRSSTAT_SDOFF(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_SDOFF_SHIFT)) & SDHC_PRSSTAT_SDOFF_MASK)
  10841. #define SDHC_PRSSTAT_WTA_MASK (0x100U)
  10842. #define SDHC_PRSSTAT_WTA_SHIFT (8U)
  10843. #define SDHC_PRSSTAT_WTA(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_WTA_SHIFT)) & SDHC_PRSSTAT_WTA_MASK)
  10844. #define SDHC_PRSSTAT_RTA_MASK (0x200U)
  10845. #define SDHC_PRSSTAT_RTA_SHIFT (9U)
  10846. #define SDHC_PRSSTAT_RTA(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_RTA_SHIFT)) & SDHC_PRSSTAT_RTA_MASK)
  10847. #define SDHC_PRSSTAT_BWEN_MASK (0x400U)
  10848. #define SDHC_PRSSTAT_BWEN_SHIFT (10U)
  10849. #define SDHC_PRSSTAT_BWEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_BWEN_SHIFT)) & SDHC_PRSSTAT_BWEN_MASK)
  10850. #define SDHC_PRSSTAT_BREN_MASK (0x800U)
  10851. #define SDHC_PRSSTAT_BREN_SHIFT (11U)
  10852. #define SDHC_PRSSTAT_BREN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_BREN_SHIFT)) & SDHC_PRSSTAT_BREN_MASK)
  10853. #define SDHC_PRSSTAT_CINS_MASK (0x10000U)
  10854. #define SDHC_PRSSTAT_CINS_SHIFT (16U)
  10855. #define SDHC_PRSSTAT_CINS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_CINS_SHIFT)) & SDHC_PRSSTAT_CINS_MASK)
  10856. #define SDHC_PRSSTAT_CLSL_MASK (0x800000U)
  10857. #define SDHC_PRSSTAT_CLSL_SHIFT (23U)
  10858. #define SDHC_PRSSTAT_CLSL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_CLSL_SHIFT)) & SDHC_PRSSTAT_CLSL_MASK)
  10859. #define SDHC_PRSSTAT_DLSL_MASK (0xFF000000U)
  10860. #define SDHC_PRSSTAT_DLSL_SHIFT (24U)
  10861. #define SDHC_PRSSTAT_DLSL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_DLSL_SHIFT)) & SDHC_PRSSTAT_DLSL_MASK)
  10862. /*! @name PROCTL - Protocol Control register */
  10863. #define SDHC_PROCTL_LCTL_MASK (0x1U)
  10864. #define SDHC_PROCTL_LCTL_SHIFT (0U)
  10865. #define SDHC_PROCTL_LCTL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_LCTL_SHIFT)) & SDHC_PROCTL_LCTL_MASK)
  10866. #define SDHC_PROCTL_DTW_MASK (0x6U)
  10867. #define SDHC_PROCTL_DTW_SHIFT (1U)
  10868. #define SDHC_PROCTL_DTW(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_DTW_SHIFT)) & SDHC_PROCTL_DTW_MASK)
  10869. #define SDHC_PROCTL_D3CD_MASK (0x8U)
  10870. #define SDHC_PROCTL_D3CD_SHIFT (3U)
  10871. #define SDHC_PROCTL_D3CD(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_D3CD_SHIFT)) & SDHC_PROCTL_D3CD_MASK)
  10872. #define SDHC_PROCTL_EMODE_MASK (0x30U)
  10873. #define SDHC_PROCTL_EMODE_SHIFT (4U)
  10874. #define SDHC_PROCTL_EMODE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_EMODE_SHIFT)) & SDHC_PROCTL_EMODE_MASK)
  10875. #define SDHC_PROCTL_CDTL_MASK (0x40U)
  10876. #define SDHC_PROCTL_CDTL_SHIFT (6U)
  10877. #define SDHC_PROCTL_CDTL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_CDTL_SHIFT)) & SDHC_PROCTL_CDTL_MASK)
  10878. #define SDHC_PROCTL_CDSS_MASK (0x80U)
  10879. #define SDHC_PROCTL_CDSS_SHIFT (7U)
  10880. #define SDHC_PROCTL_CDSS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_CDSS_SHIFT)) & SDHC_PROCTL_CDSS_MASK)
  10881. #define SDHC_PROCTL_DMAS_MASK (0x300U)
  10882. #define SDHC_PROCTL_DMAS_SHIFT (8U)
  10883. #define SDHC_PROCTL_DMAS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_DMAS_SHIFT)) & SDHC_PROCTL_DMAS_MASK)
  10884. #define SDHC_PROCTL_SABGREQ_MASK (0x10000U)
  10885. #define SDHC_PROCTL_SABGREQ_SHIFT (16U)
  10886. #define SDHC_PROCTL_SABGREQ(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_SABGREQ_SHIFT)) & SDHC_PROCTL_SABGREQ_MASK)
  10887. #define SDHC_PROCTL_CREQ_MASK (0x20000U)
  10888. #define SDHC_PROCTL_CREQ_SHIFT (17U)
  10889. #define SDHC_PROCTL_CREQ(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_CREQ_SHIFT)) & SDHC_PROCTL_CREQ_MASK)
  10890. #define SDHC_PROCTL_RWCTL_MASK (0x40000U)
  10891. #define SDHC_PROCTL_RWCTL_SHIFT (18U)
  10892. #define SDHC_PROCTL_RWCTL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_RWCTL_SHIFT)) & SDHC_PROCTL_RWCTL_MASK)
  10893. #define SDHC_PROCTL_IABG_MASK (0x80000U)
  10894. #define SDHC_PROCTL_IABG_SHIFT (19U)
  10895. #define SDHC_PROCTL_IABG(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_IABG_SHIFT)) & SDHC_PROCTL_IABG_MASK)
  10896. #define SDHC_PROCTL_WECINT_MASK (0x1000000U)
  10897. #define SDHC_PROCTL_WECINT_SHIFT (24U)
  10898. #define SDHC_PROCTL_WECINT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_WECINT_SHIFT)) & SDHC_PROCTL_WECINT_MASK)
  10899. #define SDHC_PROCTL_WECINS_MASK (0x2000000U)
  10900. #define SDHC_PROCTL_WECINS_SHIFT (25U)
  10901. #define SDHC_PROCTL_WECINS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_WECINS_SHIFT)) & SDHC_PROCTL_WECINS_MASK)
  10902. #define SDHC_PROCTL_WECRM_MASK (0x4000000U)
  10903. #define SDHC_PROCTL_WECRM_SHIFT (26U)
  10904. #define SDHC_PROCTL_WECRM(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_WECRM_SHIFT)) & SDHC_PROCTL_WECRM_MASK)
  10905. /*! @name SYSCTL - System Control register */
  10906. #define SDHC_SYSCTL_IPGEN_MASK (0x1U)
  10907. #define SDHC_SYSCTL_IPGEN_SHIFT (0U)
  10908. #define SDHC_SYSCTL_IPGEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_IPGEN_SHIFT)) & SDHC_SYSCTL_IPGEN_MASK)
  10909. #define SDHC_SYSCTL_HCKEN_MASK (0x2U)
  10910. #define SDHC_SYSCTL_HCKEN_SHIFT (1U)
  10911. #define SDHC_SYSCTL_HCKEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_HCKEN_SHIFT)) & SDHC_SYSCTL_HCKEN_MASK)
  10912. #define SDHC_SYSCTL_PEREN_MASK (0x4U)
  10913. #define SDHC_SYSCTL_PEREN_SHIFT (2U)
  10914. #define SDHC_SYSCTL_PEREN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_PEREN_SHIFT)) & SDHC_SYSCTL_PEREN_MASK)
  10915. #define SDHC_SYSCTL_SDCLKEN_MASK (0x8U)
  10916. #define SDHC_SYSCTL_SDCLKEN_SHIFT (3U)
  10917. #define SDHC_SYSCTL_SDCLKEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_SDCLKEN_SHIFT)) & SDHC_SYSCTL_SDCLKEN_MASK)
  10918. #define SDHC_SYSCTL_DVS_MASK (0xF0U)
  10919. #define SDHC_SYSCTL_DVS_SHIFT (4U)
  10920. #define SDHC_SYSCTL_DVS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_DVS_SHIFT)) & SDHC_SYSCTL_DVS_MASK)
  10921. #define SDHC_SYSCTL_SDCLKFS_MASK (0xFF00U)
  10922. #define SDHC_SYSCTL_SDCLKFS_SHIFT (8U)
  10923. #define SDHC_SYSCTL_SDCLKFS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_SDCLKFS_SHIFT)) & SDHC_SYSCTL_SDCLKFS_MASK)
  10924. #define SDHC_SYSCTL_DTOCV_MASK (0xF0000U)
  10925. #define SDHC_SYSCTL_DTOCV_SHIFT (16U)
  10926. #define SDHC_SYSCTL_DTOCV(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_DTOCV_SHIFT)) & SDHC_SYSCTL_DTOCV_MASK)
  10927. #define SDHC_SYSCTL_RSTA_MASK (0x1000000U)
  10928. #define SDHC_SYSCTL_RSTA_SHIFT (24U)
  10929. #define SDHC_SYSCTL_RSTA(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_RSTA_SHIFT)) & SDHC_SYSCTL_RSTA_MASK)
  10930. #define SDHC_SYSCTL_RSTC_MASK (0x2000000U)
  10931. #define SDHC_SYSCTL_RSTC_SHIFT (25U)
  10932. #define SDHC_SYSCTL_RSTC(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_RSTC_SHIFT)) & SDHC_SYSCTL_RSTC_MASK)
  10933. #define SDHC_SYSCTL_RSTD_MASK (0x4000000U)
  10934. #define SDHC_SYSCTL_RSTD_SHIFT (26U)
  10935. #define SDHC_SYSCTL_RSTD(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_RSTD_SHIFT)) & SDHC_SYSCTL_RSTD_MASK)
  10936. #define SDHC_SYSCTL_INITA_MASK (0x8000000U)
  10937. #define SDHC_SYSCTL_INITA_SHIFT (27U)
  10938. #define SDHC_SYSCTL_INITA(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_INITA_SHIFT)) & SDHC_SYSCTL_INITA_MASK)
  10939. /*! @name IRQSTAT - Interrupt Status register */
  10940. #define SDHC_IRQSTAT_CC_MASK (0x1U)
  10941. #define SDHC_IRQSTAT_CC_SHIFT (0U)
  10942. #define SDHC_IRQSTAT_CC(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CC_SHIFT)) & SDHC_IRQSTAT_CC_MASK)
  10943. #define SDHC_IRQSTAT_TC_MASK (0x2U)
  10944. #define SDHC_IRQSTAT_TC_SHIFT (1U)
  10945. #define SDHC_IRQSTAT_TC(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_TC_SHIFT)) & SDHC_IRQSTAT_TC_MASK)
  10946. #define SDHC_IRQSTAT_BGE_MASK (0x4U)
  10947. #define SDHC_IRQSTAT_BGE_SHIFT (2U)
  10948. #define SDHC_IRQSTAT_BGE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_BGE_SHIFT)) & SDHC_IRQSTAT_BGE_MASK)
  10949. #define SDHC_IRQSTAT_DINT_MASK (0x8U)
  10950. #define SDHC_IRQSTAT_DINT_SHIFT (3U)
  10951. #define SDHC_IRQSTAT_DINT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_DINT_SHIFT)) & SDHC_IRQSTAT_DINT_MASK)
  10952. #define SDHC_IRQSTAT_BWR_MASK (0x10U)
  10953. #define SDHC_IRQSTAT_BWR_SHIFT (4U)
  10954. #define SDHC_IRQSTAT_BWR(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_BWR_SHIFT)) & SDHC_IRQSTAT_BWR_MASK)
  10955. #define SDHC_IRQSTAT_BRR_MASK (0x20U)
  10956. #define SDHC_IRQSTAT_BRR_SHIFT (5U)
  10957. #define SDHC_IRQSTAT_BRR(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_BRR_SHIFT)) & SDHC_IRQSTAT_BRR_MASK)
  10958. #define SDHC_IRQSTAT_CINS_MASK (0x40U)
  10959. #define SDHC_IRQSTAT_CINS_SHIFT (6U)
  10960. #define SDHC_IRQSTAT_CINS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CINS_SHIFT)) & SDHC_IRQSTAT_CINS_MASK)
  10961. #define SDHC_IRQSTAT_CRM_MASK (0x80U)
  10962. #define SDHC_IRQSTAT_CRM_SHIFT (7U)
  10963. #define SDHC_IRQSTAT_CRM(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CRM_SHIFT)) & SDHC_IRQSTAT_CRM_MASK)
  10964. #define SDHC_IRQSTAT_CINT_MASK (0x100U)
  10965. #define SDHC_IRQSTAT_CINT_SHIFT (8U)
  10966. #define SDHC_IRQSTAT_CINT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CINT_SHIFT)) & SDHC_IRQSTAT_CINT_MASK)
  10967. #define SDHC_IRQSTAT_CTOE_MASK (0x10000U)
  10968. #define SDHC_IRQSTAT_CTOE_SHIFT (16U)
  10969. #define SDHC_IRQSTAT_CTOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CTOE_SHIFT)) & SDHC_IRQSTAT_CTOE_MASK)
  10970. #define SDHC_IRQSTAT_CCE_MASK (0x20000U)
  10971. #define SDHC_IRQSTAT_CCE_SHIFT (17U)
  10972. #define SDHC_IRQSTAT_CCE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CCE_SHIFT)) & SDHC_IRQSTAT_CCE_MASK)
  10973. #define SDHC_IRQSTAT_CEBE_MASK (0x40000U)
  10974. #define SDHC_IRQSTAT_CEBE_SHIFT (18U)
  10975. #define SDHC_IRQSTAT_CEBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CEBE_SHIFT)) & SDHC_IRQSTAT_CEBE_MASK)
  10976. #define SDHC_IRQSTAT_CIE_MASK (0x80000U)
  10977. #define SDHC_IRQSTAT_CIE_SHIFT (19U)
  10978. #define SDHC_IRQSTAT_CIE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CIE_SHIFT)) & SDHC_IRQSTAT_CIE_MASK)
  10979. #define SDHC_IRQSTAT_DTOE_MASK (0x100000U)
  10980. #define SDHC_IRQSTAT_DTOE_SHIFT (20U)
  10981. #define SDHC_IRQSTAT_DTOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_DTOE_SHIFT)) & SDHC_IRQSTAT_DTOE_MASK)
  10982. #define SDHC_IRQSTAT_DCE_MASK (0x200000U)
  10983. #define SDHC_IRQSTAT_DCE_SHIFT (21U)
  10984. #define SDHC_IRQSTAT_DCE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_DCE_SHIFT)) & SDHC_IRQSTAT_DCE_MASK)
  10985. #define SDHC_IRQSTAT_DEBE_MASK (0x400000U)
  10986. #define SDHC_IRQSTAT_DEBE_SHIFT (22U)
  10987. #define SDHC_IRQSTAT_DEBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_DEBE_SHIFT)) & SDHC_IRQSTAT_DEBE_MASK)
  10988. #define SDHC_IRQSTAT_AC12E_MASK (0x1000000U)
  10989. #define SDHC_IRQSTAT_AC12E_SHIFT (24U)
  10990. #define SDHC_IRQSTAT_AC12E(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_AC12E_SHIFT)) & SDHC_IRQSTAT_AC12E_MASK)
  10991. #define SDHC_IRQSTAT_DMAE_MASK (0x10000000U)
  10992. #define SDHC_IRQSTAT_DMAE_SHIFT (28U)
  10993. #define SDHC_IRQSTAT_DMAE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_DMAE_SHIFT)) & SDHC_IRQSTAT_DMAE_MASK)
  10994. /*! @name IRQSTATEN - Interrupt Status Enable register */
  10995. #define SDHC_IRQSTATEN_CCSEN_MASK (0x1U)
  10996. #define SDHC_IRQSTATEN_CCSEN_SHIFT (0U)
  10997. #define SDHC_IRQSTATEN_CCSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CCSEN_SHIFT)) & SDHC_IRQSTATEN_CCSEN_MASK)
  10998. #define SDHC_IRQSTATEN_TCSEN_MASK (0x2U)
  10999. #define SDHC_IRQSTATEN_TCSEN_SHIFT (1U)
  11000. #define SDHC_IRQSTATEN_TCSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_TCSEN_SHIFT)) & SDHC_IRQSTATEN_TCSEN_MASK)
  11001. #define SDHC_IRQSTATEN_BGESEN_MASK (0x4U)
  11002. #define SDHC_IRQSTATEN_BGESEN_SHIFT (2U)
  11003. #define SDHC_IRQSTATEN_BGESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_BGESEN_SHIFT)) & SDHC_IRQSTATEN_BGESEN_MASK)
  11004. #define SDHC_IRQSTATEN_DINTSEN_MASK (0x8U)
  11005. #define SDHC_IRQSTATEN_DINTSEN_SHIFT (3U)
  11006. #define SDHC_IRQSTATEN_DINTSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_DINTSEN_SHIFT)) & SDHC_IRQSTATEN_DINTSEN_MASK)
  11007. #define SDHC_IRQSTATEN_BWRSEN_MASK (0x10U)
  11008. #define SDHC_IRQSTATEN_BWRSEN_SHIFT (4U)
  11009. #define SDHC_IRQSTATEN_BWRSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_BWRSEN_SHIFT)) & SDHC_IRQSTATEN_BWRSEN_MASK)
  11010. #define SDHC_IRQSTATEN_BRRSEN_MASK (0x20U)
  11011. #define SDHC_IRQSTATEN_BRRSEN_SHIFT (5U)
  11012. #define SDHC_IRQSTATEN_BRRSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_BRRSEN_SHIFT)) & SDHC_IRQSTATEN_BRRSEN_MASK)
  11013. #define SDHC_IRQSTATEN_CINSEN_MASK (0x40U)
  11014. #define SDHC_IRQSTATEN_CINSEN_SHIFT (6U)
  11015. #define SDHC_IRQSTATEN_CINSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CINSEN_SHIFT)) & SDHC_IRQSTATEN_CINSEN_MASK)
  11016. #define SDHC_IRQSTATEN_CRMSEN_MASK (0x80U)
  11017. #define SDHC_IRQSTATEN_CRMSEN_SHIFT (7U)
  11018. #define SDHC_IRQSTATEN_CRMSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CRMSEN_SHIFT)) & SDHC_IRQSTATEN_CRMSEN_MASK)
  11019. #define SDHC_IRQSTATEN_CINTSEN_MASK (0x100U)
  11020. #define SDHC_IRQSTATEN_CINTSEN_SHIFT (8U)
  11021. #define SDHC_IRQSTATEN_CINTSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CINTSEN_SHIFT)) & SDHC_IRQSTATEN_CINTSEN_MASK)
  11022. #define SDHC_IRQSTATEN_CTOESEN_MASK (0x10000U)
  11023. #define SDHC_IRQSTATEN_CTOESEN_SHIFT (16U)
  11024. #define SDHC_IRQSTATEN_CTOESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CTOESEN_SHIFT)) & SDHC_IRQSTATEN_CTOESEN_MASK)
  11025. #define SDHC_IRQSTATEN_CCESEN_MASK (0x20000U)
  11026. #define SDHC_IRQSTATEN_CCESEN_SHIFT (17U)
  11027. #define SDHC_IRQSTATEN_CCESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CCESEN_SHIFT)) & SDHC_IRQSTATEN_CCESEN_MASK)
  11028. #define SDHC_IRQSTATEN_CEBESEN_MASK (0x40000U)
  11029. #define SDHC_IRQSTATEN_CEBESEN_SHIFT (18U)
  11030. #define SDHC_IRQSTATEN_CEBESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CEBESEN_SHIFT)) & SDHC_IRQSTATEN_CEBESEN_MASK)
  11031. #define SDHC_IRQSTATEN_CIESEN_MASK (0x80000U)
  11032. #define SDHC_IRQSTATEN_CIESEN_SHIFT (19U)
  11033. #define SDHC_IRQSTATEN_CIESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CIESEN_SHIFT)) & SDHC_IRQSTATEN_CIESEN_MASK)
  11034. #define SDHC_IRQSTATEN_DTOESEN_MASK (0x100000U)
  11035. #define SDHC_IRQSTATEN_DTOESEN_SHIFT (20U)
  11036. #define SDHC_IRQSTATEN_DTOESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_DTOESEN_SHIFT)) & SDHC_IRQSTATEN_DTOESEN_MASK)
  11037. #define SDHC_IRQSTATEN_DCESEN_MASK (0x200000U)
  11038. #define SDHC_IRQSTATEN_DCESEN_SHIFT (21U)
  11039. #define SDHC_IRQSTATEN_DCESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_DCESEN_SHIFT)) & SDHC_IRQSTATEN_DCESEN_MASK)
  11040. #define SDHC_IRQSTATEN_DEBESEN_MASK (0x400000U)
  11041. #define SDHC_IRQSTATEN_DEBESEN_SHIFT (22U)
  11042. #define SDHC_IRQSTATEN_DEBESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_DEBESEN_SHIFT)) & SDHC_IRQSTATEN_DEBESEN_MASK)
  11043. #define SDHC_IRQSTATEN_AC12ESEN_MASK (0x1000000U)
  11044. #define SDHC_IRQSTATEN_AC12ESEN_SHIFT (24U)
  11045. #define SDHC_IRQSTATEN_AC12ESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_AC12ESEN_SHIFT)) & SDHC_IRQSTATEN_AC12ESEN_MASK)
  11046. #define SDHC_IRQSTATEN_DMAESEN_MASK (0x10000000U)
  11047. #define SDHC_IRQSTATEN_DMAESEN_SHIFT (28U)
  11048. #define SDHC_IRQSTATEN_DMAESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_DMAESEN_SHIFT)) & SDHC_IRQSTATEN_DMAESEN_MASK)
  11049. /*! @name IRQSIGEN - Interrupt Signal Enable register */
  11050. #define SDHC_IRQSIGEN_CCIEN_MASK (0x1U)
  11051. #define SDHC_IRQSIGEN_CCIEN_SHIFT (0U)
  11052. #define SDHC_IRQSIGEN_CCIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CCIEN_SHIFT)) & SDHC_IRQSIGEN_CCIEN_MASK)
  11053. #define SDHC_IRQSIGEN_TCIEN_MASK (0x2U)
  11054. #define SDHC_IRQSIGEN_TCIEN_SHIFT (1U)
  11055. #define SDHC_IRQSIGEN_TCIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_TCIEN_SHIFT)) & SDHC_IRQSIGEN_TCIEN_MASK)
  11056. #define SDHC_IRQSIGEN_BGEIEN_MASK (0x4U)
  11057. #define SDHC_IRQSIGEN_BGEIEN_SHIFT (2U)
  11058. #define SDHC_IRQSIGEN_BGEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_BGEIEN_SHIFT)) & SDHC_IRQSIGEN_BGEIEN_MASK)
  11059. #define SDHC_IRQSIGEN_DINTIEN_MASK (0x8U)
  11060. #define SDHC_IRQSIGEN_DINTIEN_SHIFT (3U)
  11061. #define SDHC_IRQSIGEN_DINTIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_DINTIEN_SHIFT)) & SDHC_IRQSIGEN_DINTIEN_MASK)
  11062. #define SDHC_IRQSIGEN_BWRIEN_MASK (0x10U)
  11063. #define SDHC_IRQSIGEN_BWRIEN_SHIFT (4U)
  11064. #define SDHC_IRQSIGEN_BWRIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_BWRIEN_SHIFT)) & SDHC_IRQSIGEN_BWRIEN_MASK)
  11065. #define SDHC_IRQSIGEN_BRRIEN_MASK (0x20U)
  11066. #define SDHC_IRQSIGEN_BRRIEN_SHIFT (5U)
  11067. #define SDHC_IRQSIGEN_BRRIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_BRRIEN_SHIFT)) & SDHC_IRQSIGEN_BRRIEN_MASK)
  11068. #define SDHC_IRQSIGEN_CINSIEN_MASK (0x40U)
  11069. #define SDHC_IRQSIGEN_CINSIEN_SHIFT (6U)
  11070. #define SDHC_IRQSIGEN_CINSIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CINSIEN_SHIFT)) & SDHC_IRQSIGEN_CINSIEN_MASK)
  11071. #define SDHC_IRQSIGEN_CRMIEN_MASK (0x80U)
  11072. #define SDHC_IRQSIGEN_CRMIEN_SHIFT (7U)
  11073. #define SDHC_IRQSIGEN_CRMIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CRMIEN_SHIFT)) & SDHC_IRQSIGEN_CRMIEN_MASK)
  11074. #define SDHC_IRQSIGEN_CINTIEN_MASK (0x100U)
  11075. #define SDHC_IRQSIGEN_CINTIEN_SHIFT (8U)
  11076. #define SDHC_IRQSIGEN_CINTIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CINTIEN_SHIFT)) & SDHC_IRQSIGEN_CINTIEN_MASK)
  11077. #define SDHC_IRQSIGEN_CTOEIEN_MASK (0x10000U)
  11078. #define SDHC_IRQSIGEN_CTOEIEN_SHIFT (16U)
  11079. #define SDHC_IRQSIGEN_CTOEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CTOEIEN_SHIFT)) & SDHC_IRQSIGEN_CTOEIEN_MASK)
  11080. #define SDHC_IRQSIGEN_CCEIEN_MASK (0x20000U)
  11081. #define SDHC_IRQSIGEN_CCEIEN_SHIFT (17U)
  11082. #define SDHC_IRQSIGEN_CCEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CCEIEN_SHIFT)) & SDHC_IRQSIGEN_CCEIEN_MASK)
  11083. #define SDHC_IRQSIGEN_CEBEIEN_MASK (0x40000U)
  11084. #define SDHC_IRQSIGEN_CEBEIEN_SHIFT (18U)
  11085. #define SDHC_IRQSIGEN_CEBEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CEBEIEN_SHIFT)) & SDHC_IRQSIGEN_CEBEIEN_MASK)
  11086. #define SDHC_IRQSIGEN_CIEIEN_MASK (0x80000U)
  11087. #define SDHC_IRQSIGEN_CIEIEN_SHIFT (19U)
  11088. #define SDHC_IRQSIGEN_CIEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CIEIEN_SHIFT)) & SDHC_IRQSIGEN_CIEIEN_MASK)
  11089. #define SDHC_IRQSIGEN_DTOEIEN_MASK (0x100000U)
  11090. #define SDHC_IRQSIGEN_DTOEIEN_SHIFT (20U)
  11091. #define SDHC_IRQSIGEN_DTOEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_DTOEIEN_SHIFT)) & SDHC_IRQSIGEN_DTOEIEN_MASK)
  11092. #define SDHC_IRQSIGEN_DCEIEN_MASK (0x200000U)
  11093. #define SDHC_IRQSIGEN_DCEIEN_SHIFT (21U)
  11094. #define SDHC_IRQSIGEN_DCEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_DCEIEN_SHIFT)) & SDHC_IRQSIGEN_DCEIEN_MASK)
  11095. #define SDHC_IRQSIGEN_DEBEIEN_MASK (0x400000U)
  11096. #define SDHC_IRQSIGEN_DEBEIEN_SHIFT (22U)
  11097. #define SDHC_IRQSIGEN_DEBEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_DEBEIEN_SHIFT)) & SDHC_IRQSIGEN_DEBEIEN_MASK)
  11098. #define SDHC_IRQSIGEN_AC12EIEN_MASK (0x1000000U)
  11099. #define SDHC_IRQSIGEN_AC12EIEN_SHIFT (24U)
  11100. #define SDHC_IRQSIGEN_AC12EIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_AC12EIEN_SHIFT)) & SDHC_IRQSIGEN_AC12EIEN_MASK)
  11101. #define SDHC_IRQSIGEN_DMAEIEN_MASK (0x10000000U)
  11102. #define SDHC_IRQSIGEN_DMAEIEN_SHIFT (28U)
  11103. #define SDHC_IRQSIGEN_DMAEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_DMAEIEN_SHIFT)) & SDHC_IRQSIGEN_DMAEIEN_MASK)
  11104. /*! @name AC12ERR - Auto CMD12 Error Status Register */
  11105. #define SDHC_AC12ERR_AC12NE_MASK (0x1U)
  11106. #define SDHC_AC12ERR_AC12NE_SHIFT (0U)
  11107. #define SDHC_AC12ERR_AC12NE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_AC12NE_SHIFT)) & SDHC_AC12ERR_AC12NE_MASK)
  11108. #define SDHC_AC12ERR_AC12TOE_MASK (0x2U)
  11109. #define SDHC_AC12ERR_AC12TOE_SHIFT (1U)
  11110. #define SDHC_AC12ERR_AC12TOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_AC12TOE_SHIFT)) & SDHC_AC12ERR_AC12TOE_MASK)
  11111. #define SDHC_AC12ERR_AC12EBE_MASK (0x4U)
  11112. #define SDHC_AC12ERR_AC12EBE_SHIFT (2U)
  11113. #define SDHC_AC12ERR_AC12EBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_AC12EBE_SHIFT)) & SDHC_AC12ERR_AC12EBE_MASK)
  11114. #define SDHC_AC12ERR_AC12CE_MASK (0x8U)
  11115. #define SDHC_AC12ERR_AC12CE_SHIFT (3U)
  11116. #define SDHC_AC12ERR_AC12CE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_AC12CE_SHIFT)) & SDHC_AC12ERR_AC12CE_MASK)
  11117. #define SDHC_AC12ERR_AC12IE_MASK (0x10U)
  11118. #define SDHC_AC12ERR_AC12IE_SHIFT (4U)
  11119. #define SDHC_AC12ERR_AC12IE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_AC12IE_SHIFT)) & SDHC_AC12ERR_AC12IE_MASK)
  11120. #define SDHC_AC12ERR_CNIBAC12E_MASK (0x80U)
  11121. #define SDHC_AC12ERR_CNIBAC12E_SHIFT (7U)
  11122. #define SDHC_AC12ERR_CNIBAC12E(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_CNIBAC12E_SHIFT)) & SDHC_AC12ERR_CNIBAC12E_MASK)
  11123. /*! @name HTCAPBLT - Host Controller Capabilities */
  11124. #define SDHC_HTCAPBLT_MBL_MASK (0x70000U)
  11125. #define SDHC_HTCAPBLT_MBL_SHIFT (16U)
  11126. #define SDHC_HTCAPBLT_MBL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_MBL_SHIFT)) & SDHC_HTCAPBLT_MBL_MASK)
  11127. #define SDHC_HTCAPBLT_ADMAS_MASK (0x100000U)
  11128. #define SDHC_HTCAPBLT_ADMAS_SHIFT (20U)
  11129. #define SDHC_HTCAPBLT_ADMAS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_ADMAS_SHIFT)) & SDHC_HTCAPBLT_ADMAS_MASK)
  11130. #define SDHC_HTCAPBLT_HSS_MASK (0x200000U)
  11131. #define SDHC_HTCAPBLT_HSS_SHIFT (21U)
  11132. #define SDHC_HTCAPBLT_HSS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_HSS_SHIFT)) & SDHC_HTCAPBLT_HSS_MASK)
  11133. #define SDHC_HTCAPBLT_DMAS_MASK (0x400000U)
  11134. #define SDHC_HTCAPBLT_DMAS_SHIFT (22U)
  11135. #define SDHC_HTCAPBLT_DMAS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_DMAS_SHIFT)) & SDHC_HTCAPBLT_DMAS_MASK)
  11136. #define SDHC_HTCAPBLT_SRS_MASK (0x800000U)
  11137. #define SDHC_HTCAPBLT_SRS_SHIFT (23U)
  11138. #define SDHC_HTCAPBLT_SRS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_SRS_SHIFT)) & SDHC_HTCAPBLT_SRS_MASK)
  11139. #define SDHC_HTCAPBLT_VS33_MASK (0x1000000U)
  11140. #define SDHC_HTCAPBLT_VS33_SHIFT (24U)
  11141. #define SDHC_HTCAPBLT_VS33(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_VS33_SHIFT)) & SDHC_HTCAPBLT_VS33_MASK)
  11142. /*! @name WML - Watermark Level Register */
  11143. #define SDHC_WML_RDWML_MASK (0xFFU)
  11144. #define SDHC_WML_RDWML_SHIFT (0U)
  11145. #define SDHC_WML_RDWML(x) (((uint32_t)(((uint32_t)(x)) << SDHC_WML_RDWML_SHIFT)) & SDHC_WML_RDWML_MASK)
  11146. #define SDHC_WML_WRWML_MASK (0xFF0000U)
  11147. #define SDHC_WML_WRWML_SHIFT (16U)
  11148. #define SDHC_WML_WRWML(x) (((uint32_t)(((uint32_t)(x)) << SDHC_WML_WRWML_SHIFT)) & SDHC_WML_WRWML_MASK)
  11149. /*! @name FEVT - Force Event register */
  11150. #define SDHC_FEVT_AC12NE_MASK (0x1U)
  11151. #define SDHC_FEVT_AC12NE_SHIFT (0U)
  11152. #define SDHC_FEVT_AC12NE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12NE_SHIFT)) & SDHC_FEVT_AC12NE_MASK)
  11153. #define SDHC_FEVT_AC12TOE_MASK (0x2U)
  11154. #define SDHC_FEVT_AC12TOE_SHIFT (1U)
  11155. #define SDHC_FEVT_AC12TOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12TOE_SHIFT)) & SDHC_FEVT_AC12TOE_MASK)
  11156. #define SDHC_FEVT_AC12CE_MASK (0x4U)
  11157. #define SDHC_FEVT_AC12CE_SHIFT (2U)
  11158. #define SDHC_FEVT_AC12CE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12CE_SHIFT)) & SDHC_FEVT_AC12CE_MASK)
  11159. #define SDHC_FEVT_AC12EBE_MASK (0x8U)
  11160. #define SDHC_FEVT_AC12EBE_SHIFT (3U)
  11161. #define SDHC_FEVT_AC12EBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12EBE_SHIFT)) & SDHC_FEVT_AC12EBE_MASK)
  11162. #define SDHC_FEVT_AC12IE_MASK (0x10U)
  11163. #define SDHC_FEVT_AC12IE_SHIFT (4U)
  11164. #define SDHC_FEVT_AC12IE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12IE_SHIFT)) & SDHC_FEVT_AC12IE_MASK)
  11165. #define SDHC_FEVT_CNIBAC12E_MASK (0x80U)
  11166. #define SDHC_FEVT_CNIBAC12E_SHIFT (7U)
  11167. #define SDHC_FEVT_CNIBAC12E(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CNIBAC12E_SHIFT)) & SDHC_FEVT_CNIBAC12E_MASK)
  11168. #define SDHC_FEVT_CTOE_MASK (0x10000U)
  11169. #define SDHC_FEVT_CTOE_SHIFT (16U)
  11170. #define SDHC_FEVT_CTOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CTOE_SHIFT)) & SDHC_FEVT_CTOE_MASK)
  11171. #define SDHC_FEVT_CCE_MASK (0x20000U)
  11172. #define SDHC_FEVT_CCE_SHIFT (17U)
  11173. #define SDHC_FEVT_CCE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CCE_SHIFT)) & SDHC_FEVT_CCE_MASK)
  11174. #define SDHC_FEVT_CEBE_MASK (0x40000U)
  11175. #define SDHC_FEVT_CEBE_SHIFT (18U)
  11176. #define SDHC_FEVT_CEBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CEBE_SHIFT)) & SDHC_FEVT_CEBE_MASK)
  11177. #define SDHC_FEVT_CIE_MASK (0x80000U)
  11178. #define SDHC_FEVT_CIE_SHIFT (19U)
  11179. #define SDHC_FEVT_CIE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CIE_SHIFT)) & SDHC_FEVT_CIE_MASK)
  11180. #define SDHC_FEVT_DTOE_MASK (0x100000U)
  11181. #define SDHC_FEVT_DTOE_SHIFT (20U)
  11182. #define SDHC_FEVT_DTOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_DTOE_SHIFT)) & SDHC_FEVT_DTOE_MASK)
  11183. #define SDHC_FEVT_DCE_MASK (0x200000U)
  11184. #define SDHC_FEVT_DCE_SHIFT (21U)
  11185. #define SDHC_FEVT_DCE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_DCE_SHIFT)) & SDHC_FEVT_DCE_MASK)
  11186. #define SDHC_FEVT_DEBE_MASK (0x400000U)
  11187. #define SDHC_FEVT_DEBE_SHIFT (22U)
  11188. #define SDHC_FEVT_DEBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_DEBE_SHIFT)) & SDHC_FEVT_DEBE_MASK)
  11189. #define SDHC_FEVT_AC12E_MASK (0x1000000U)
  11190. #define SDHC_FEVT_AC12E_SHIFT (24U)
  11191. #define SDHC_FEVT_AC12E(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12E_SHIFT)) & SDHC_FEVT_AC12E_MASK)
  11192. #define SDHC_FEVT_DMAE_MASK (0x10000000U)
  11193. #define SDHC_FEVT_DMAE_SHIFT (28U)
  11194. #define SDHC_FEVT_DMAE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_DMAE_SHIFT)) & SDHC_FEVT_DMAE_MASK)
  11195. #define SDHC_FEVT_CINT_MASK (0x80000000U)
  11196. #define SDHC_FEVT_CINT_SHIFT (31U)
  11197. #define SDHC_FEVT_CINT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CINT_SHIFT)) & SDHC_FEVT_CINT_MASK)
  11198. /*! @name ADMAES - ADMA Error Status register */
  11199. #define SDHC_ADMAES_ADMAES_MASK (0x3U)
  11200. #define SDHC_ADMAES_ADMAES_SHIFT (0U)
  11201. #define SDHC_ADMAES_ADMAES(x) (((uint32_t)(((uint32_t)(x)) << SDHC_ADMAES_ADMAES_SHIFT)) & SDHC_ADMAES_ADMAES_MASK)
  11202. #define SDHC_ADMAES_ADMALME_MASK (0x4U)
  11203. #define SDHC_ADMAES_ADMALME_SHIFT (2U)
  11204. #define SDHC_ADMAES_ADMALME(x) (((uint32_t)(((uint32_t)(x)) << SDHC_ADMAES_ADMALME_SHIFT)) & SDHC_ADMAES_ADMALME_MASK)
  11205. #define SDHC_ADMAES_ADMADCE_MASK (0x8U)
  11206. #define SDHC_ADMAES_ADMADCE_SHIFT (3U)
  11207. #define SDHC_ADMAES_ADMADCE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_ADMAES_ADMADCE_SHIFT)) & SDHC_ADMAES_ADMADCE_MASK)
  11208. /*! @name ADSADDR - ADMA System Addressregister */
  11209. #define SDHC_ADSADDR_ADSADDR_MASK (0xFFFFFFFCU)
  11210. #define SDHC_ADSADDR_ADSADDR_SHIFT (2U)
  11211. #define SDHC_ADSADDR_ADSADDR(x) (((uint32_t)(((uint32_t)(x)) << SDHC_ADSADDR_ADSADDR_SHIFT)) & SDHC_ADSADDR_ADSADDR_MASK)
  11212. /*! @name VENDOR - Vendor Specific register */
  11213. #define SDHC_VENDOR_EXBLKNU_MASK (0x2U)
  11214. #define SDHC_VENDOR_EXBLKNU_SHIFT (1U)
  11215. #define SDHC_VENDOR_EXBLKNU(x) (((uint32_t)(((uint32_t)(x)) << SDHC_VENDOR_EXBLKNU_SHIFT)) & SDHC_VENDOR_EXBLKNU_MASK)
  11216. #define SDHC_VENDOR_INTSTVAL_MASK (0xFF0000U)
  11217. #define SDHC_VENDOR_INTSTVAL_SHIFT (16U)
  11218. #define SDHC_VENDOR_INTSTVAL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_VENDOR_INTSTVAL_SHIFT)) & SDHC_VENDOR_INTSTVAL_MASK)
  11219. /*! @name MMCBOOT - MMC Boot register */
  11220. #define SDHC_MMCBOOT_DTOCVACK_MASK (0xFU)
  11221. #define SDHC_MMCBOOT_DTOCVACK_SHIFT (0U)
  11222. #define SDHC_MMCBOOT_DTOCVACK(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_DTOCVACK_SHIFT)) & SDHC_MMCBOOT_DTOCVACK_MASK)
  11223. #define SDHC_MMCBOOT_BOOTACK_MASK (0x10U)
  11224. #define SDHC_MMCBOOT_BOOTACK_SHIFT (4U)
  11225. #define SDHC_MMCBOOT_BOOTACK(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_BOOTACK_SHIFT)) & SDHC_MMCBOOT_BOOTACK_MASK)
  11226. #define SDHC_MMCBOOT_BOOTMODE_MASK (0x20U)
  11227. #define SDHC_MMCBOOT_BOOTMODE_SHIFT (5U)
  11228. #define SDHC_MMCBOOT_BOOTMODE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_BOOTMODE_SHIFT)) & SDHC_MMCBOOT_BOOTMODE_MASK)
  11229. #define SDHC_MMCBOOT_BOOTEN_MASK (0x40U)
  11230. #define SDHC_MMCBOOT_BOOTEN_SHIFT (6U)
  11231. #define SDHC_MMCBOOT_BOOTEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_BOOTEN_SHIFT)) & SDHC_MMCBOOT_BOOTEN_MASK)
  11232. #define SDHC_MMCBOOT_AUTOSABGEN_MASK (0x80U)
  11233. #define SDHC_MMCBOOT_AUTOSABGEN_SHIFT (7U)
  11234. #define SDHC_MMCBOOT_AUTOSABGEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_AUTOSABGEN_SHIFT)) & SDHC_MMCBOOT_AUTOSABGEN_MASK)
  11235. #define SDHC_MMCBOOT_BOOTBLKCNT_MASK (0xFFFF0000U)
  11236. #define SDHC_MMCBOOT_BOOTBLKCNT_SHIFT (16U)
  11237. #define SDHC_MMCBOOT_BOOTBLKCNT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_BOOTBLKCNT_SHIFT)) & SDHC_MMCBOOT_BOOTBLKCNT_MASK)
  11238. /*! @name HOSTVER - Host Controller Version */
  11239. #define SDHC_HOSTVER_SVN_MASK (0xFFU)
  11240. #define SDHC_HOSTVER_SVN_SHIFT (0U)
  11241. #define SDHC_HOSTVER_SVN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HOSTVER_SVN_SHIFT)) & SDHC_HOSTVER_SVN_MASK)
  11242. #define SDHC_HOSTVER_VVN_MASK (0xFF00U)
  11243. #define SDHC_HOSTVER_VVN_SHIFT (8U)
  11244. #define SDHC_HOSTVER_VVN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HOSTVER_VVN_SHIFT)) & SDHC_HOSTVER_VVN_MASK)
  11245. /*!
  11246. * @}
  11247. */ /* end of group SDHC_Register_Masks */
  11248. /* SDHC - Peripheral instance base addresses */
  11249. /** Peripheral SDHC base address */
  11250. #define SDHC_BASE (0x400B1000u)
  11251. /** Peripheral SDHC base pointer */
  11252. #define SDHC ((SDHC_Type *)SDHC_BASE)
  11253. /** Array initializer of SDHC peripheral base addresses */
  11254. #define SDHC_BASE_ADDRS { SDHC_BASE }
  11255. /** Array initializer of SDHC peripheral base pointers */
  11256. #define SDHC_BASE_PTRS { SDHC }
  11257. /** Interrupt vectors for the SDHC peripheral type */
  11258. #define SDHC_IRQS { SDHC_IRQn }
  11259. /*!
  11260. * @}
  11261. */ /* end of group SDHC_Peripheral_Access_Layer */
  11262. /* ----------------------------------------------------------------------------
  11263. -- SDRAM Peripheral Access Layer
  11264. ---------------------------------------------------------------------------- */
  11265. /*!
  11266. * @addtogroup SDRAM_Peripheral_Access_Layer SDRAM Peripheral Access Layer
  11267. * @{
  11268. */
  11269. /** SDRAM - Register Layout Typedef */
  11270. typedef struct {
  11271. uint8_t RESERVED_0[66];
  11272. __IO uint16_t CTRL; /**< Control Register, offset: 0x42 */
  11273. uint8_t RESERVED_1[4];
  11274. struct { /* offset: 0x48, array step: 0x8 */
  11275. __IO uint32_t AC; /**< Address and Control Register, array offset: 0x48, array step: 0x8 */
  11276. __IO uint32_t CM; /**< Control Mask, array offset: 0x4C, array step: 0x8 */
  11277. } BLOCK[2];
  11278. } SDRAM_Type;
  11279. /* ----------------------------------------------------------------------------
  11280. -- SDRAM Register Masks
  11281. ---------------------------------------------------------------------------- */
  11282. /*!
  11283. * @addtogroup SDRAM_Register_Masks SDRAM Register Masks
  11284. * @{
  11285. */
  11286. /*! @name CTRL - Control Register */
  11287. #define SDRAM_CTRL_RC_MASK (0x1FFU)
  11288. #define SDRAM_CTRL_RC_SHIFT (0U)
  11289. #define SDRAM_CTRL_RC(x) (((uint16_t)(((uint16_t)(x)) << SDRAM_CTRL_RC_SHIFT)) & SDRAM_CTRL_RC_MASK)
  11290. #define SDRAM_CTRL_RTIM_MASK (0x600U)
  11291. #define SDRAM_CTRL_RTIM_SHIFT (9U)
  11292. #define SDRAM_CTRL_RTIM(x) (((uint16_t)(((uint16_t)(x)) << SDRAM_CTRL_RTIM_SHIFT)) & SDRAM_CTRL_RTIM_MASK)
  11293. #define SDRAM_CTRL_IS_MASK (0x800U)
  11294. #define SDRAM_CTRL_IS_SHIFT (11U)
  11295. #define SDRAM_CTRL_IS(x) (((uint16_t)(((uint16_t)(x)) << SDRAM_CTRL_IS_SHIFT)) & SDRAM_CTRL_IS_MASK)
  11296. /*! @name AC - Address and Control Register */
  11297. #define SDRAM_AC_IP_MASK (0x8U)
  11298. #define SDRAM_AC_IP_SHIFT (3U)
  11299. #define SDRAM_AC_IP(x) (((uint32_t)(((uint32_t)(x)) << SDRAM_AC_IP_SHIFT)) & SDRAM_AC_IP_MASK)
  11300. #define SDRAM_AC_PS_MASK (0x30U)
  11301. #define SDRAM_AC_PS_SHIFT (4U)
  11302. #define SDRAM_AC_PS(x) (((uint32_t)(((uint32_t)(x)) << SDRAM_AC_PS_SHIFT)) & SDRAM_AC_PS_MASK)
  11303. #define SDRAM_AC_IMRS_MASK (0x40U)
  11304. #define SDRAM_AC_IMRS_SHIFT (6U)
  11305. #define SDRAM_AC_IMRS(x) (((uint32_t)(((uint32_t)(x)) << SDRAM_AC_IMRS_SHIFT)) & SDRAM_AC_IMRS_MASK)
  11306. #define SDRAM_AC_CBM_MASK (0x700U)
  11307. #define SDRAM_AC_CBM_SHIFT (8U)
  11308. #define SDRAM_AC_CBM(x) (((uint32_t)(((uint32_t)(x)) << SDRAM_AC_CBM_SHIFT)) & SDRAM_AC_CBM_MASK)
  11309. #define SDRAM_AC_CASL_MASK (0x3000U)
  11310. #define SDRAM_AC_CASL_SHIFT (12U)
  11311. #define SDRAM_AC_CASL(x) (((uint32_t)(((uint32_t)(x)) << SDRAM_AC_CASL_SHIFT)) & SDRAM_AC_CASL_MASK)
  11312. #define SDRAM_AC_RE_MASK (0x8000U)
  11313. #define SDRAM_AC_RE_SHIFT (15U)
  11314. #define SDRAM_AC_RE(x) (((uint32_t)(((uint32_t)(x)) << SDRAM_AC_RE_SHIFT)) & SDRAM_AC_RE_MASK)
  11315. #define SDRAM_AC_BA_MASK (0xFFFC0000U)
  11316. #define SDRAM_AC_BA_SHIFT (18U)
  11317. #define SDRAM_AC_BA(x) (((uint32_t)(((uint32_t)(x)) << SDRAM_AC_BA_SHIFT)) & SDRAM_AC_BA_MASK)
  11318. /* The count of SDRAM_AC */
  11319. #define SDRAM_AC_COUNT (2U)
  11320. /*! @name CM - Control Mask */
  11321. #define SDRAM_CM_V_MASK (0x1U)
  11322. #define SDRAM_CM_V_SHIFT (0U)
  11323. #define SDRAM_CM_V(x) (((uint32_t)(((uint32_t)(x)) << SDRAM_CM_V_SHIFT)) & SDRAM_CM_V_MASK)
  11324. #define SDRAM_CM_WP_MASK (0x100U)
  11325. #define SDRAM_CM_WP_SHIFT (8U)
  11326. #define SDRAM_CM_WP(x) (((uint32_t)(((uint32_t)(x)) << SDRAM_CM_WP_SHIFT)) & SDRAM_CM_WP_MASK)
  11327. #define SDRAM_CM_BAM_MASK (0xFFFC0000U)
  11328. #define SDRAM_CM_BAM_SHIFT (18U)
  11329. #define SDRAM_CM_BAM(x) (((uint32_t)(((uint32_t)(x)) << SDRAM_CM_BAM_SHIFT)) & SDRAM_CM_BAM_MASK)
  11330. /* The count of SDRAM_CM */
  11331. #define SDRAM_CM_COUNT (2U)
  11332. /*!
  11333. * @}
  11334. */ /* end of group SDRAM_Register_Masks */
  11335. /* SDRAM - Peripheral instance base addresses */
  11336. /** Peripheral SDRAM base address */
  11337. #define SDRAM_BASE (0x4000F000u)
  11338. /** Peripheral SDRAM base pointer */
  11339. #define SDRAM ((SDRAM_Type *)SDRAM_BASE)
  11340. /** Array initializer of SDRAM peripheral base addresses */
  11341. #define SDRAM_BASE_ADDRS { SDRAM_BASE }
  11342. /** Array initializer of SDRAM peripheral base pointers */
  11343. #define SDRAM_BASE_PTRS { SDRAM }
  11344. /*!
  11345. * @}
  11346. */ /* end of group SDRAM_Peripheral_Access_Layer */
  11347. /* ----------------------------------------------------------------------------
  11348. -- SIM Peripheral Access Layer
  11349. ---------------------------------------------------------------------------- */
  11350. /*!
  11351. * @addtogroup SIM_Peripheral_Access_Layer SIM Peripheral Access Layer
  11352. * @{
  11353. */
  11354. /** SIM - Register Layout Typedef */
  11355. typedef struct {
  11356. __IO uint32_t SOPT1; /**< System Options Register 1, offset: 0x0 */
  11357. __IO uint32_t SOPT1CFG; /**< SOPT1 Configuration Register, offset: 0x4 */
  11358. uint8_t RESERVED_0[4092];
  11359. __IO uint32_t SOPT2; /**< System Options Register 2, offset: 0x1004 */
  11360. uint8_t RESERVED_1[4];
  11361. __IO uint32_t SOPT4; /**< System Options Register 4, offset: 0x100C */
  11362. __IO uint32_t SOPT5; /**< System Options Register 5, offset: 0x1010 */
  11363. uint8_t RESERVED_2[4];
  11364. __IO uint32_t SOPT7; /**< System Options Register 7, offset: 0x1018 */
  11365. __IO uint32_t SOPT8; /**< System Options Register 8, offset: 0x101C */
  11366. __IO uint32_t SOPT9; /**< System Options Register 9, offset: 0x1020 */
  11367. __I uint32_t SDID; /**< System Device Identification Register, offset: 0x1024 */
  11368. __IO uint32_t SCGC1; /**< System Clock Gating Control Register 1, offset: 0x1028 */
  11369. __IO uint32_t SCGC2; /**< System Clock Gating Control Register 2, offset: 0x102C */
  11370. __IO uint32_t SCGC3; /**< System Clock Gating Control Register 3, offset: 0x1030 */
  11371. __IO uint32_t SCGC4; /**< System Clock Gating Control Register 4, offset: 0x1034 */
  11372. __IO uint32_t SCGC5; /**< System Clock Gating Control Register 5, offset: 0x1038 */
  11373. __IO uint32_t SCGC6; /**< System Clock Gating Control Register 6, offset: 0x103C */
  11374. __IO uint32_t SCGC7; /**< System Clock Gating Control Register 7, offset: 0x1040 */
  11375. __IO uint32_t CLKDIV1; /**< System Clock Divider Register 1, offset: 0x1044 */
  11376. __IO uint32_t CLKDIV2; /**< System Clock Divider Register 2, offset: 0x1048 */
  11377. __IO uint32_t FCFG1; /**< Flash Configuration Register 1, offset: 0x104C */
  11378. __I uint32_t FCFG2; /**< Flash Configuration Register 2, offset: 0x1050 */
  11379. __I uint32_t UIDH; /**< Unique Identification Register High, offset: 0x1054 */
  11380. __I uint32_t UIDMH; /**< Unique Identification Register Mid-High, offset: 0x1058 */
  11381. __I uint32_t UIDML; /**< Unique Identification Register Mid Low, offset: 0x105C */
  11382. __I uint32_t UIDL; /**< Unique Identification Register Low, offset: 0x1060 */
  11383. __IO uint32_t CLKDIV3; /**< System Clock Divider Register 3, offset: 0x1064 */
  11384. __IO uint32_t CLKDIV4; /**< System Clock Divider Register 4, offset: 0x1068 */
  11385. } SIM_Type;
  11386. /* ----------------------------------------------------------------------------
  11387. -- SIM Register Masks
  11388. ---------------------------------------------------------------------------- */
  11389. /*!
  11390. * @addtogroup SIM_Register_Masks SIM Register Masks
  11391. * @{
  11392. */
  11393. /*! @name SOPT1 - System Options Register 1 */
  11394. #define SIM_SOPT1_RAMSIZE_MASK (0xF000U)
  11395. #define SIM_SOPT1_RAMSIZE_SHIFT (12U)
  11396. #define SIM_SOPT1_RAMSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_RAMSIZE_SHIFT)) & SIM_SOPT1_RAMSIZE_MASK)
  11397. #define SIM_SOPT1_OSC32KSEL_MASK (0xC0000U)
  11398. #define SIM_SOPT1_OSC32KSEL_SHIFT (18U)
  11399. #define SIM_SOPT1_OSC32KSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_OSC32KSEL_SHIFT)) & SIM_SOPT1_OSC32KSEL_MASK)
  11400. #define SIM_SOPT1_USBVSTBY_MASK (0x20000000U)
  11401. #define SIM_SOPT1_USBVSTBY_SHIFT (29U)
  11402. #define SIM_SOPT1_USBVSTBY(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_USBVSTBY_SHIFT)) & SIM_SOPT1_USBVSTBY_MASK)
  11403. #define SIM_SOPT1_USBSSTBY_MASK (0x40000000U)
  11404. #define SIM_SOPT1_USBSSTBY_SHIFT (30U)
  11405. #define SIM_SOPT1_USBSSTBY(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_USBSSTBY_SHIFT)) & SIM_SOPT1_USBSSTBY_MASK)
  11406. #define SIM_SOPT1_USBREGEN_MASK (0x80000000U)
  11407. #define SIM_SOPT1_USBREGEN_SHIFT (31U)
  11408. #define SIM_SOPT1_USBREGEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_USBREGEN_SHIFT)) & SIM_SOPT1_USBREGEN_MASK)
  11409. /*! @name SOPT1CFG - SOPT1 Configuration Register */
  11410. #define SIM_SOPT1CFG_URWE_MASK (0x1000000U)
  11411. #define SIM_SOPT1CFG_URWE_SHIFT (24U)
  11412. #define SIM_SOPT1CFG_URWE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1CFG_URWE_SHIFT)) & SIM_SOPT1CFG_URWE_MASK)
  11413. #define SIM_SOPT1CFG_UVSWE_MASK (0x2000000U)
  11414. #define SIM_SOPT1CFG_UVSWE_SHIFT (25U)
  11415. #define SIM_SOPT1CFG_UVSWE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1CFG_UVSWE_SHIFT)) & SIM_SOPT1CFG_UVSWE_MASK)
  11416. #define SIM_SOPT1CFG_USSWE_MASK (0x4000000U)
  11417. #define SIM_SOPT1CFG_USSWE_SHIFT (26U)
  11418. #define SIM_SOPT1CFG_USSWE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1CFG_USSWE_SHIFT)) & SIM_SOPT1CFG_USSWE_MASK)
  11419. /*! @name SOPT2 - System Options Register 2 */
  11420. #define SIM_SOPT2_RTCCLKOUTSEL_MASK (0x10U)
  11421. #define SIM_SOPT2_RTCCLKOUTSEL_SHIFT (4U)
  11422. #define SIM_SOPT2_RTCCLKOUTSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_RTCCLKOUTSEL_SHIFT)) & SIM_SOPT2_RTCCLKOUTSEL_MASK)
  11423. #define SIM_SOPT2_CLKOUTSEL_MASK (0xE0U)
  11424. #define SIM_SOPT2_CLKOUTSEL_SHIFT (5U)
  11425. #define SIM_SOPT2_CLKOUTSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_CLKOUTSEL_SHIFT)) & SIM_SOPT2_CLKOUTSEL_MASK)
  11426. #define SIM_SOPT2_FBSL_MASK (0x300U)
  11427. #define SIM_SOPT2_FBSL_SHIFT (8U)
  11428. #define SIM_SOPT2_FBSL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_FBSL_SHIFT)) & SIM_SOPT2_FBSL_MASK)
  11429. #define SIM_SOPT2_TRACECLKSEL_MASK (0x1000U)
  11430. #define SIM_SOPT2_TRACECLKSEL_SHIFT (12U)
  11431. #define SIM_SOPT2_TRACECLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_TRACECLKSEL_SHIFT)) & SIM_SOPT2_TRACECLKSEL_MASK)
  11432. #define SIM_SOPT2_PLLFLLSEL_MASK (0x30000U)
  11433. #define SIM_SOPT2_PLLFLLSEL_SHIFT (16U)
  11434. #define SIM_SOPT2_PLLFLLSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_PLLFLLSEL_SHIFT)) & SIM_SOPT2_PLLFLLSEL_MASK)
  11435. #define SIM_SOPT2_USBSRC_MASK (0x40000U)
  11436. #define SIM_SOPT2_USBSRC_SHIFT (18U)
  11437. #define SIM_SOPT2_USBSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_USBSRC_SHIFT)) & SIM_SOPT2_USBSRC_MASK)
  11438. #define SIM_SOPT2_FLEXIOSRC_MASK (0xC00000U)
  11439. #define SIM_SOPT2_FLEXIOSRC_SHIFT (22U)
  11440. #define SIM_SOPT2_FLEXIOSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_FLEXIOSRC_SHIFT)) & SIM_SOPT2_FLEXIOSRC_MASK)
  11441. #define SIM_SOPT2_TPMSRC_MASK (0x3000000U)
  11442. #define SIM_SOPT2_TPMSRC_SHIFT (24U)
  11443. #define SIM_SOPT2_TPMSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_TPMSRC_SHIFT)) & SIM_SOPT2_TPMSRC_MASK)
  11444. #define SIM_SOPT2_LPUARTSRC_MASK (0xC000000U)
  11445. #define SIM_SOPT2_LPUARTSRC_SHIFT (26U)
  11446. #define SIM_SOPT2_LPUARTSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_LPUARTSRC_SHIFT)) & SIM_SOPT2_LPUARTSRC_MASK)
  11447. #define SIM_SOPT2_SDHCSRC_MASK (0x30000000U)
  11448. #define SIM_SOPT2_SDHCSRC_SHIFT (28U)
  11449. #define SIM_SOPT2_SDHCSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_SDHCSRC_SHIFT)) & SIM_SOPT2_SDHCSRC_MASK)
  11450. #define SIM_SOPT2_EMVSIMSRC_MASK (0xC0000000U)
  11451. #define SIM_SOPT2_EMVSIMSRC_SHIFT (30U)
  11452. #define SIM_SOPT2_EMVSIMSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_EMVSIMSRC_SHIFT)) & SIM_SOPT2_EMVSIMSRC_MASK)
  11453. /*! @name SOPT4 - System Options Register 4 */
  11454. #define SIM_SOPT4_FTM0FLT0_MASK (0x1U)
  11455. #define SIM_SOPT4_FTM0FLT0_SHIFT (0U)
  11456. #define SIM_SOPT4_FTM0FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0FLT0_SHIFT)) & SIM_SOPT4_FTM0FLT0_MASK)
  11457. #define SIM_SOPT4_FTM0FLT1_MASK (0x2U)
  11458. #define SIM_SOPT4_FTM0FLT1_SHIFT (1U)
  11459. #define SIM_SOPT4_FTM0FLT1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0FLT1_SHIFT)) & SIM_SOPT4_FTM0FLT1_MASK)
  11460. #define SIM_SOPT4_FTM1FLT0_MASK (0x10U)
  11461. #define SIM_SOPT4_FTM1FLT0_SHIFT (4U)
  11462. #define SIM_SOPT4_FTM1FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM1FLT0_SHIFT)) & SIM_SOPT4_FTM1FLT0_MASK)
  11463. #define SIM_SOPT4_FTM2FLT0_MASK (0x100U)
  11464. #define SIM_SOPT4_FTM2FLT0_SHIFT (8U)
  11465. #define SIM_SOPT4_FTM2FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM2FLT0_SHIFT)) & SIM_SOPT4_FTM2FLT0_MASK)
  11466. #define SIM_SOPT4_FTM3FLT0_MASK (0x1000U)
  11467. #define SIM_SOPT4_FTM3FLT0_SHIFT (12U)
  11468. #define SIM_SOPT4_FTM3FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3FLT0_SHIFT)) & SIM_SOPT4_FTM3FLT0_MASK)
  11469. #define SIM_SOPT4_FTM1CH0SRC_MASK (0xC0000U)
  11470. #define SIM_SOPT4_FTM1CH0SRC_SHIFT (18U)
  11471. #define SIM_SOPT4_FTM1CH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM1CH0SRC_SHIFT)) & SIM_SOPT4_FTM1CH0SRC_MASK)
  11472. #define SIM_SOPT4_FTM2CH0SRC_MASK (0x300000U)
  11473. #define SIM_SOPT4_FTM2CH0SRC_SHIFT (20U)
  11474. #define SIM_SOPT4_FTM2CH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM2CH0SRC_SHIFT)) & SIM_SOPT4_FTM2CH0SRC_MASK)
  11475. #define SIM_SOPT4_FTM2CH1SRC_MASK (0x400000U)
  11476. #define SIM_SOPT4_FTM2CH1SRC_SHIFT (22U)
  11477. #define SIM_SOPT4_FTM2CH1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM2CH1SRC_SHIFT)) & SIM_SOPT4_FTM2CH1SRC_MASK)
  11478. #define SIM_SOPT4_FTM0CLKSEL_MASK (0x1000000U)
  11479. #define SIM_SOPT4_FTM0CLKSEL_SHIFT (24U)
  11480. #define SIM_SOPT4_FTM0CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0CLKSEL_SHIFT)) & SIM_SOPT4_FTM0CLKSEL_MASK)
  11481. #define SIM_SOPT4_FTM1CLKSEL_MASK (0x2000000U)
  11482. #define SIM_SOPT4_FTM1CLKSEL_SHIFT (25U)
  11483. #define SIM_SOPT4_FTM1CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM1CLKSEL_SHIFT)) & SIM_SOPT4_FTM1CLKSEL_MASK)
  11484. #define SIM_SOPT4_FTM2CLKSEL_MASK (0x4000000U)
  11485. #define SIM_SOPT4_FTM2CLKSEL_SHIFT (26U)
  11486. #define SIM_SOPT4_FTM2CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM2CLKSEL_SHIFT)) & SIM_SOPT4_FTM2CLKSEL_MASK)
  11487. #define SIM_SOPT4_FTM3CLKSEL_MASK (0x8000000U)
  11488. #define SIM_SOPT4_FTM3CLKSEL_SHIFT (27U)
  11489. #define SIM_SOPT4_FTM3CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3CLKSEL_SHIFT)) & SIM_SOPT4_FTM3CLKSEL_MASK)
  11490. #define SIM_SOPT4_FTM0TRG0SRC_MASK (0x10000000U)
  11491. #define SIM_SOPT4_FTM0TRG0SRC_SHIFT (28U)
  11492. #define SIM_SOPT4_FTM0TRG0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0TRG0SRC_SHIFT)) & SIM_SOPT4_FTM0TRG0SRC_MASK)
  11493. #define SIM_SOPT4_FTM0TRG1SRC_MASK (0x20000000U)
  11494. #define SIM_SOPT4_FTM0TRG1SRC_SHIFT (29U)
  11495. #define SIM_SOPT4_FTM0TRG1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0TRG1SRC_SHIFT)) & SIM_SOPT4_FTM0TRG1SRC_MASK)
  11496. #define SIM_SOPT4_FTM3TRG0SRC_MASK (0x40000000U)
  11497. #define SIM_SOPT4_FTM3TRG0SRC_SHIFT (30U)
  11498. #define SIM_SOPT4_FTM3TRG0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3TRG0SRC_SHIFT)) & SIM_SOPT4_FTM3TRG0SRC_MASK)
  11499. #define SIM_SOPT4_FTM3TRG1SRC_MASK (0x80000000U)
  11500. #define SIM_SOPT4_FTM3TRG1SRC_SHIFT (31U)
  11501. #define SIM_SOPT4_FTM3TRG1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3TRG1SRC_SHIFT)) & SIM_SOPT4_FTM3TRG1SRC_MASK)
  11502. /*! @name SOPT5 - System Options Register 5 */
  11503. #define SIM_SOPT5_LPUART0TXSRC_MASK (0x30000U)
  11504. #define SIM_SOPT5_LPUART0TXSRC_SHIFT (16U)
  11505. #define SIM_SOPT5_LPUART0TXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_LPUART0TXSRC_SHIFT)) & SIM_SOPT5_LPUART0TXSRC_MASK)
  11506. #define SIM_SOPT5_LPUART0RXSRC_MASK (0xC0000U)
  11507. #define SIM_SOPT5_LPUART0RXSRC_SHIFT (18U)
  11508. #define SIM_SOPT5_LPUART0RXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_LPUART0RXSRC_SHIFT)) & SIM_SOPT5_LPUART0RXSRC_MASK)
  11509. #define SIM_SOPT5_LPUART1TXSRC_MASK (0x300000U)
  11510. #define SIM_SOPT5_LPUART1TXSRC_SHIFT (20U)
  11511. #define SIM_SOPT5_LPUART1TXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_LPUART1TXSRC_SHIFT)) & SIM_SOPT5_LPUART1TXSRC_MASK)
  11512. #define SIM_SOPT5_LPUART1RXSRC_MASK (0xC00000U)
  11513. #define SIM_SOPT5_LPUART1RXSRC_SHIFT (22U)
  11514. #define SIM_SOPT5_LPUART1RXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_LPUART1RXSRC_SHIFT)) & SIM_SOPT5_LPUART1RXSRC_MASK)
  11515. /*! @name SOPT7 - System Options Register 7 */
  11516. #define SIM_SOPT7_ADC0TRGSEL_MASK (0xFU)
  11517. #define SIM_SOPT7_ADC0TRGSEL_SHIFT (0U)
  11518. #define SIM_SOPT7_ADC0TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_ADC0TRGSEL_SHIFT)) & SIM_SOPT7_ADC0TRGSEL_MASK)
  11519. #define SIM_SOPT7_ADC0PRETRGSEL_MASK (0x10U)
  11520. #define SIM_SOPT7_ADC0PRETRGSEL_SHIFT (4U)
  11521. #define SIM_SOPT7_ADC0PRETRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_ADC0PRETRGSEL_SHIFT)) & SIM_SOPT7_ADC0PRETRGSEL_MASK)
  11522. #define SIM_SOPT7_ADC0ALTTRGEN_MASK (0x80U)
  11523. #define SIM_SOPT7_ADC0ALTTRGEN_SHIFT (7U)
  11524. #define SIM_SOPT7_ADC0ALTTRGEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_ADC0ALTTRGEN_SHIFT)) & SIM_SOPT7_ADC0ALTTRGEN_MASK)
  11525. /*! @name SOPT8 - System Options Register 8 */
  11526. #define SIM_SOPT8_FTM0SYNCBIT_MASK (0x1U)
  11527. #define SIM_SOPT8_FTM0SYNCBIT_SHIFT (0U)
  11528. #define SIM_SOPT8_FTM0SYNCBIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0SYNCBIT_SHIFT)) & SIM_SOPT8_FTM0SYNCBIT_MASK)
  11529. #define SIM_SOPT8_FTM1SYNCBIT_MASK (0x2U)
  11530. #define SIM_SOPT8_FTM1SYNCBIT_SHIFT (1U)
  11531. #define SIM_SOPT8_FTM1SYNCBIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM1SYNCBIT_SHIFT)) & SIM_SOPT8_FTM1SYNCBIT_MASK)
  11532. #define SIM_SOPT8_FTM2SYNCBIT_MASK (0x4U)
  11533. #define SIM_SOPT8_FTM2SYNCBIT_SHIFT (2U)
  11534. #define SIM_SOPT8_FTM2SYNCBIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM2SYNCBIT_SHIFT)) & SIM_SOPT8_FTM2SYNCBIT_MASK)
  11535. #define SIM_SOPT8_FTM3SYNCBIT_MASK (0x8U)
  11536. #define SIM_SOPT8_FTM3SYNCBIT_SHIFT (3U)
  11537. #define SIM_SOPT8_FTM3SYNCBIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3SYNCBIT_SHIFT)) & SIM_SOPT8_FTM3SYNCBIT_MASK)
  11538. #define SIM_SOPT8_FTM0OCH0SRC_MASK (0x10000U)
  11539. #define SIM_SOPT8_FTM0OCH0SRC_SHIFT (16U)
  11540. #define SIM_SOPT8_FTM0OCH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH0SRC_SHIFT)) & SIM_SOPT8_FTM0OCH0SRC_MASK)
  11541. #define SIM_SOPT8_FTM0OCH1SRC_MASK (0x20000U)
  11542. #define SIM_SOPT8_FTM0OCH1SRC_SHIFT (17U)
  11543. #define SIM_SOPT8_FTM0OCH1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH1SRC_SHIFT)) & SIM_SOPT8_FTM0OCH1SRC_MASK)
  11544. #define SIM_SOPT8_FTM0OCH2SRC_MASK (0x40000U)
  11545. #define SIM_SOPT8_FTM0OCH2SRC_SHIFT (18U)
  11546. #define SIM_SOPT8_FTM0OCH2SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH2SRC_SHIFT)) & SIM_SOPT8_FTM0OCH2SRC_MASK)
  11547. #define SIM_SOPT8_FTM0OCH3SRC_MASK (0x80000U)
  11548. #define SIM_SOPT8_FTM0OCH3SRC_SHIFT (19U)
  11549. #define SIM_SOPT8_FTM0OCH3SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH3SRC_SHIFT)) & SIM_SOPT8_FTM0OCH3SRC_MASK)
  11550. #define SIM_SOPT8_FTM0OCH4SRC_MASK (0x100000U)
  11551. #define SIM_SOPT8_FTM0OCH4SRC_SHIFT (20U)
  11552. #define SIM_SOPT8_FTM0OCH4SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH4SRC_SHIFT)) & SIM_SOPT8_FTM0OCH4SRC_MASK)
  11553. #define SIM_SOPT8_FTM0OCH5SRC_MASK (0x200000U)
  11554. #define SIM_SOPT8_FTM0OCH5SRC_SHIFT (21U)
  11555. #define SIM_SOPT8_FTM0OCH5SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH5SRC_SHIFT)) & SIM_SOPT8_FTM0OCH5SRC_MASK)
  11556. #define SIM_SOPT8_FTM0OCH6SRC_MASK (0x400000U)
  11557. #define SIM_SOPT8_FTM0OCH6SRC_SHIFT (22U)
  11558. #define SIM_SOPT8_FTM0OCH6SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH6SRC_SHIFT)) & SIM_SOPT8_FTM0OCH6SRC_MASK)
  11559. #define SIM_SOPT8_FTM0OCH7SRC_MASK (0x800000U)
  11560. #define SIM_SOPT8_FTM0OCH7SRC_SHIFT (23U)
  11561. #define SIM_SOPT8_FTM0OCH7SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM0OCH7SRC_SHIFT)) & SIM_SOPT8_FTM0OCH7SRC_MASK)
  11562. #define SIM_SOPT8_FTM3OCH0SRC_MASK (0x1000000U)
  11563. #define SIM_SOPT8_FTM3OCH0SRC_SHIFT (24U)
  11564. #define SIM_SOPT8_FTM3OCH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH0SRC_SHIFT)) & SIM_SOPT8_FTM3OCH0SRC_MASK)
  11565. #define SIM_SOPT8_FTM3OCH1SRC_MASK (0x2000000U)
  11566. #define SIM_SOPT8_FTM3OCH1SRC_SHIFT (25U)
  11567. #define SIM_SOPT8_FTM3OCH1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH1SRC_SHIFT)) & SIM_SOPT8_FTM3OCH1SRC_MASK)
  11568. #define SIM_SOPT8_FTM3OCH2SRC_MASK (0x4000000U)
  11569. #define SIM_SOPT8_FTM3OCH2SRC_SHIFT (26U)
  11570. #define SIM_SOPT8_FTM3OCH2SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH2SRC_SHIFT)) & SIM_SOPT8_FTM3OCH2SRC_MASK)
  11571. #define SIM_SOPT8_FTM3OCH3SRC_MASK (0x8000000U)
  11572. #define SIM_SOPT8_FTM3OCH3SRC_SHIFT (27U)
  11573. #define SIM_SOPT8_FTM3OCH3SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH3SRC_SHIFT)) & SIM_SOPT8_FTM3OCH3SRC_MASK)
  11574. #define SIM_SOPT8_FTM3OCH4SRC_MASK (0x10000000U)
  11575. #define SIM_SOPT8_FTM3OCH4SRC_SHIFT (28U)
  11576. #define SIM_SOPT8_FTM3OCH4SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH4SRC_SHIFT)) & SIM_SOPT8_FTM3OCH4SRC_MASK)
  11577. #define SIM_SOPT8_FTM3OCH5SRC_MASK (0x20000000U)
  11578. #define SIM_SOPT8_FTM3OCH5SRC_SHIFT (29U)
  11579. #define SIM_SOPT8_FTM3OCH5SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH5SRC_SHIFT)) & SIM_SOPT8_FTM3OCH5SRC_MASK)
  11580. #define SIM_SOPT8_FTM3OCH6SRC_MASK (0x40000000U)
  11581. #define SIM_SOPT8_FTM3OCH6SRC_SHIFT (30U)
  11582. #define SIM_SOPT8_FTM3OCH6SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH6SRC_SHIFT)) & SIM_SOPT8_FTM3OCH6SRC_MASK)
  11583. #define SIM_SOPT8_FTM3OCH7SRC_MASK (0x80000000U)
  11584. #define SIM_SOPT8_FTM3OCH7SRC_SHIFT (31U)
  11585. #define SIM_SOPT8_FTM3OCH7SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT8_FTM3OCH7SRC_SHIFT)) & SIM_SOPT8_FTM3OCH7SRC_MASK)
  11586. /*! @name SOPT9 - System Options Register 9 */
  11587. #define SIM_SOPT9_TPM1CH0SRC_MASK (0xC0000U)
  11588. #define SIM_SOPT9_TPM1CH0SRC_SHIFT (18U)
  11589. #define SIM_SOPT9_TPM1CH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_TPM1CH0SRC_SHIFT)) & SIM_SOPT9_TPM1CH0SRC_MASK)
  11590. #define SIM_SOPT9_TPM2CH0SRC_MASK (0x300000U)
  11591. #define SIM_SOPT9_TPM2CH0SRC_SHIFT (20U)
  11592. #define SIM_SOPT9_TPM2CH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_TPM2CH0SRC_SHIFT)) & SIM_SOPT9_TPM2CH0SRC_MASK)
  11593. #define SIM_SOPT9_TPM1CLKSEL_MASK (0x2000000U)
  11594. #define SIM_SOPT9_TPM1CLKSEL_SHIFT (25U)
  11595. #define SIM_SOPT9_TPM1CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_TPM1CLKSEL_SHIFT)) & SIM_SOPT9_TPM1CLKSEL_MASK)
  11596. #define SIM_SOPT9_TPM2CLKSEL_MASK (0x4000000U)
  11597. #define SIM_SOPT9_TPM2CLKSEL_SHIFT (26U)
  11598. #define SIM_SOPT9_TPM2CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT9_TPM2CLKSEL_SHIFT)) & SIM_SOPT9_TPM2CLKSEL_MASK)
  11599. /*! @name SDID - System Device Identification Register */
  11600. #define SIM_SDID_PINID_MASK (0xFU)
  11601. #define SIM_SDID_PINID_SHIFT (0U)
  11602. #define SIM_SDID_PINID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_PINID_SHIFT)) & SIM_SDID_PINID_MASK)
  11603. #define SIM_SDID_FAMID_MASK (0x70U)
  11604. #define SIM_SDID_FAMID_SHIFT (4U)
  11605. #define SIM_SDID_FAMID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_FAMID_SHIFT)) & SIM_SDID_FAMID_MASK)
  11606. #define SIM_SDID_DIEID_MASK (0xF80U)
  11607. #define SIM_SDID_DIEID_SHIFT (7U)
  11608. #define SIM_SDID_DIEID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_DIEID_SHIFT)) & SIM_SDID_DIEID_MASK)
  11609. #define SIM_SDID_REVID_MASK (0xF000U)
  11610. #define SIM_SDID_REVID_SHIFT (12U)
  11611. #define SIM_SDID_REVID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_REVID_SHIFT)) & SIM_SDID_REVID_MASK)
  11612. #define SIM_SDID_SERIESID_MASK (0xF00000U)
  11613. #define SIM_SDID_SERIESID_SHIFT (20U)
  11614. #define SIM_SDID_SERIESID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SERIESID_SHIFT)) & SIM_SDID_SERIESID_MASK)
  11615. #define SIM_SDID_SUBFAMID_MASK (0xF000000U)
  11616. #define SIM_SDID_SUBFAMID_SHIFT (24U)
  11617. #define SIM_SDID_SUBFAMID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SUBFAMID_SHIFT)) & SIM_SDID_SUBFAMID_MASK)
  11618. #define SIM_SDID_FAMILYID_MASK (0xF0000000U)
  11619. #define SIM_SDID_FAMILYID_SHIFT (28U)
  11620. #define SIM_SDID_FAMILYID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_FAMILYID_SHIFT)) & SIM_SDID_FAMILYID_MASK)
  11621. /*! @name SCGC1 - System Clock Gating Control Register 1 */
  11622. #define SIM_SCGC1_I2C2_MASK (0x40U)
  11623. #define SIM_SCGC1_I2C2_SHIFT (6U)
  11624. #define SIM_SCGC1_I2C2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_I2C2_SHIFT)) & SIM_SCGC1_I2C2_MASK)
  11625. #define SIM_SCGC1_I2C3_MASK (0x80U)
  11626. #define SIM_SCGC1_I2C3_SHIFT (7U)
  11627. #define SIM_SCGC1_I2C3(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_I2C3_SHIFT)) & SIM_SCGC1_I2C3_MASK)
  11628. /*! @name SCGC2 - System Clock Gating Control Register 2 */
  11629. #define SIM_SCGC2_LPUART0_MASK (0x10U)
  11630. #define SIM_SCGC2_LPUART0_SHIFT (4U)
  11631. #define SIM_SCGC2_LPUART0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_LPUART0_SHIFT)) & SIM_SCGC2_LPUART0_MASK)
  11632. #define SIM_SCGC2_LPUART1_MASK (0x20U)
  11633. #define SIM_SCGC2_LPUART1_SHIFT (5U)
  11634. #define SIM_SCGC2_LPUART1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_LPUART1_SHIFT)) & SIM_SCGC2_LPUART1_MASK)
  11635. #define SIM_SCGC2_LPUART2_MASK (0x40U)
  11636. #define SIM_SCGC2_LPUART2_SHIFT (6U)
  11637. #define SIM_SCGC2_LPUART2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_LPUART2_SHIFT)) & SIM_SCGC2_LPUART2_MASK)
  11638. #define SIM_SCGC2_LPUART3_MASK (0x80U)
  11639. #define SIM_SCGC2_LPUART3_SHIFT (7U)
  11640. #define SIM_SCGC2_LPUART3(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_LPUART3_SHIFT)) & SIM_SCGC2_LPUART3_MASK)
  11641. #define SIM_SCGC2_TPM1_MASK (0x200U)
  11642. #define SIM_SCGC2_TPM1_SHIFT (9U)
  11643. #define SIM_SCGC2_TPM1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_TPM1_SHIFT)) & SIM_SCGC2_TPM1_MASK)
  11644. #define SIM_SCGC2_TPM2_MASK (0x400U)
  11645. #define SIM_SCGC2_TPM2_SHIFT (10U)
  11646. #define SIM_SCGC2_TPM2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_TPM2_SHIFT)) & SIM_SCGC2_TPM2_MASK)
  11647. #define SIM_SCGC2_DAC0_MASK (0x1000U)
  11648. #define SIM_SCGC2_DAC0_SHIFT (12U)
  11649. #define SIM_SCGC2_DAC0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_DAC0_SHIFT)) & SIM_SCGC2_DAC0_MASK)
  11650. #define SIM_SCGC2_LTC_MASK (0x20000U)
  11651. #define SIM_SCGC2_LTC_SHIFT (17U)
  11652. #define SIM_SCGC2_LTC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_LTC_SHIFT)) & SIM_SCGC2_LTC_MASK)
  11653. #define SIM_SCGC2_EMVSIM0_MASK (0x100000U)
  11654. #define SIM_SCGC2_EMVSIM0_SHIFT (20U)
  11655. #define SIM_SCGC2_EMVSIM0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_EMVSIM0_SHIFT)) & SIM_SCGC2_EMVSIM0_MASK)
  11656. #define SIM_SCGC2_EMVSIM1_MASK (0x200000U)
  11657. #define SIM_SCGC2_EMVSIM1_SHIFT (21U)
  11658. #define SIM_SCGC2_EMVSIM1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_EMVSIM1_SHIFT)) & SIM_SCGC2_EMVSIM1_MASK)
  11659. #define SIM_SCGC2_LPUART4_MASK (0x400000U)
  11660. #define SIM_SCGC2_LPUART4_SHIFT (22U)
  11661. #define SIM_SCGC2_LPUART4(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_LPUART4_SHIFT)) & SIM_SCGC2_LPUART4_MASK)
  11662. #define SIM_SCGC2_QSPI_MASK (0x4000000U)
  11663. #define SIM_SCGC2_QSPI_SHIFT (26U)
  11664. #define SIM_SCGC2_QSPI(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_QSPI_SHIFT)) & SIM_SCGC2_QSPI_MASK)
  11665. #define SIM_SCGC2_FLEXIO_MASK (0x80000000U)
  11666. #define SIM_SCGC2_FLEXIO_SHIFT (31U)
  11667. #define SIM_SCGC2_FLEXIO(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_FLEXIO_SHIFT)) & SIM_SCGC2_FLEXIO_MASK)
  11668. /*! @name SCGC3 - System Clock Gating Control Register 3 */
  11669. #define SIM_SCGC3_TRNG_MASK (0x1U)
  11670. #define SIM_SCGC3_TRNG_SHIFT (0U)
  11671. #define SIM_SCGC3_TRNG(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_TRNG_SHIFT)) & SIM_SCGC3_TRNG_MASK)
  11672. #define SIM_SCGC3_SPI2_MASK (0x1000U)
  11673. #define SIM_SCGC3_SPI2_SHIFT (12U)
  11674. #define SIM_SCGC3_SPI2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_SPI2_SHIFT)) & SIM_SCGC3_SPI2_MASK)
  11675. #define SIM_SCGC3_SDHC_MASK (0x20000U)
  11676. #define SIM_SCGC3_SDHC_SHIFT (17U)
  11677. #define SIM_SCGC3_SDHC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_SDHC_SHIFT)) & SIM_SCGC3_SDHC_MASK)
  11678. #define SIM_SCGC3_FTM2_MASK (0x1000000U)
  11679. #define SIM_SCGC3_FTM2_SHIFT (24U)
  11680. #define SIM_SCGC3_FTM2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_FTM2_SHIFT)) & SIM_SCGC3_FTM2_MASK)
  11681. #define SIM_SCGC3_FTM3_MASK (0x2000000U)
  11682. #define SIM_SCGC3_FTM3_SHIFT (25U)
  11683. #define SIM_SCGC3_FTM3(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_FTM3_SHIFT)) & SIM_SCGC3_FTM3_MASK)
  11684. /*! @name SCGC4 - System Clock Gating Control Register 4 */
  11685. #define SIM_SCGC4_EWM_MASK (0x2U)
  11686. #define SIM_SCGC4_EWM_SHIFT (1U)
  11687. #define SIM_SCGC4_EWM(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_EWM_SHIFT)) & SIM_SCGC4_EWM_MASK)
  11688. #define SIM_SCGC4_CMT_MASK (0x4U)
  11689. #define SIM_SCGC4_CMT_SHIFT (2U)
  11690. #define SIM_SCGC4_CMT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_CMT_SHIFT)) & SIM_SCGC4_CMT_MASK)
  11691. #define SIM_SCGC4_I2C0_MASK (0x40U)
  11692. #define SIM_SCGC4_I2C0_SHIFT (6U)
  11693. #define SIM_SCGC4_I2C0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_I2C0_SHIFT)) & SIM_SCGC4_I2C0_MASK)
  11694. #define SIM_SCGC4_I2C1_MASK (0x80U)
  11695. #define SIM_SCGC4_I2C1_SHIFT (7U)
  11696. #define SIM_SCGC4_I2C1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_I2C1_SHIFT)) & SIM_SCGC4_I2C1_MASK)
  11697. #define SIM_SCGC4_USBOTG_MASK (0x40000U)
  11698. #define SIM_SCGC4_USBOTG_SHIFT (18U)
  11699. #define SIM_SCGC4_USBOTG(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_USBOTG_SHIFT)) & SIM_SCGC4_USBOTG_MASK)
  11700. #define SIM_SCGC4_CMP_MASK (0x80000U)
  11701. #define SIM_SCGC4_CMP_SHIFT (19U)
  11702. #define SIM_SCGC4_CMP(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_CMP_SHIFT)) & SIM_SCGC4_CMP_MASK)
  11703. #define SIM_SCGC4_VREF_MASK (0x100000U)
  11704. #define SIM_SCGC4_VREF_SHIFT (20U)
  11705. #define SIM_SCGC4_VREF(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_VREF_SHIFT)) & SIM_SCGC4_VREF_MASK)
  11706. /*! @name SCGC5 - System Clock Gating Control Register 5 */
  11707. #define SIM_SCGC5_LPTMR_MASK (0x1U)
  11708. #define SIM_SCGC5_LPTMR_SHIFT (0U)
  11709. #define SIM_SCGC5_LPTMR(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_LPTMR_SHIFT)) & SIM_SCGC5_LPTMR_MASK)
  11710. #define SIM_SCGC5_LPTMR1_MASK (0x10U)
  11711. #define SIM_SCGC5_LPTMR1_SHIFT (4U)
  11712. #define SIM_SCGC5_LPTMR1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_LPTMR1_SHIFT)) & SIM_SCGC5_LPTMR1_MASK)
  11713. #define SIM_SCGC5_TSI_MASK (0x20U)
  11714. #define SIM_SCGC5_TSI_SHIFT (5U)
  11715. #define SIM_SCGC5_TSI(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_TSI_SHIFT)) & SIM_SCGC5_TSI_MASK)
  11716. #define SIM_SCGC5_PORTA_MASK (0x200U)
  11717. #define SIM_SCGC5_PORTA_SHIFT (9U)
  11718. #define SIM_SCGC5_PORTA(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTA_SHIFT)) & SIM_SCGC5_PORTA_MASK)
  11719. #define SIM_SCGC5_PORTB_MASK (0x400U)
  11720. #define SIM_SCGC5_PORTB_SHIFT (10U)
  11721. #define SIM_SCGC5_PORTB(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTB_SHIFT)) & SIM_SCGC5_PORTB_MASK)
  11722. #define SIM_SCGC5_PORTC_MASK (0x800U)
  11723. #define SIM_SCGC5_PORTC_SHIFT (11U)
  11724. #define SIM_SCGC5_PORTC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTC_SHIFT)) & SIM_SCGC5_PORTC_MASK)
  11725. #define SIM_SCGC5_PORTD_MASK (0x1000U)
  11726. #define SIM_SCGC5_PORTD_SHIFT (12U)
  11727. #define SIM_SCGC5_PORTD(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTD_SHIFT)) & SIM_SCGC5_PORTD_MASK)
  11728. #define SIM_SCGC5_PORTE_MASK (0x2000U)
  11729. #define SIM_SCGC5_PORTE_SHIFT (13U)
  11730. #define SIM_SCGC5_PORTE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTE_SHIFT)) & SIM_SCGC5_PORTE_MASK)
  11731. /*! @name SCGC6 - System Clock Gating Control Register 6 */
  11732. #define SIM_SCGC6_FTF_MASK (0x1U)
  11733. #define SIM_SCGC6_FTF_SHIFT (0U)
  11734. #define SIM_SCGC6_FTF(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTF_SHIFT)) & SIM_SCGC6_FTF_MASK)
  11735. #define SIM_SCGC6_DMAMUX_MASK (0x2U)
  11736. #define SIM_SCGC6_DMAMUX_SHIFT (1U)
  11737. #define SIM_SCGC6_DMAMUX(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_DMAMUX_SHIFT)) & SIM_SCGC6_DMAMUX_MASK)
  11738. #define SIM_SCGC6_SPI0_MASK (0x1000U)
  11739. #define SIM_SCGC6_SPI0_SHIFT (12U)
  11740. #define SIM_SCGC6_SPI0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_SPI0_SHIFT)) & SIM_SCGC6_SPI0_MASK)
  11741. #define SIM_SCGC6_SPI1_MASK (0x2000U)
  11742. #define SIM_SCGC6_SPI1_SHIFT (13U)
  11743. #define SIM_SCGC6_SPI1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_SPI1_SHIFT)) & SIM_SCGC6_SPI1_MASK)
  11744. #define SIM_SCGC6_I2S_MASK (0x8000U)
  11745. #define SIM_SCGC6_I2S_SHIFT (15U)
  11746. #define SIM_SCGC6_I2S(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_I2S_SHIFT)) & SIM_SCGC6_I2S_MASK)
  11747. #define SIM_SCGC6_CRC_MASK (0x40000U)
  11748. #define SIM_SCGC6_CRC_SHIFT (18U)
  11749. #define SIM_SCGC6_CRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_CRC_SHIFT)) & SIM_SCGC6_CRC_MASK)
  11750. #define SIM_SCGC6_USBDCD_MASK (0x200000U)
  11751. #define SIM_SCGC6_USBDCD_SHIFT (21U)
  11752. #define SIM_SCGC6_USBDCD(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_USBDCD_SHIFT)) & SIM_SCGC6_USBDCD_MASK)
  11753. #define SIM_SCGC6_PDB_MASK (0x400000U)
  11754. #define SIM_SCGC6_PDB_SHIFT (22U)
  11755. #define SIM_SCGC6_PDB(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_PDB_SHIFT)) & SIM_SCGC6_PDB_MASK)
  11756. #define SIM_SCGC6_PIT_MASK (0x800000U)
  11757. #define SIM_SCGC6_PIT_SHIFT (23U)
  11758. #define SIM_SCGC6_PIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_PIT_SHIFT)) & SIM_SCGC6_PIT_MASK)
  11759. #define SIM_SCGC6_FTM0_MASK (0x1000000U)
  11760. #define SIM_SCGC6_FTM0_SHIFT (24U)
  11761. #define SIM_SCGC6_FTM0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTM0_SHIFT)) & SIM_SCGC6_FTM0_MASK)
  11762. #define SIM_SCGC6_FTM1_MASK (0x2000000U)
  11763. #define SIM_SCGC6_FTM1_SHIFT (25U)
  11764. #define SIM_SCGC6_FTM1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTM1_SHIFT)) & SIM_SCGC6_FTM1_MASK)
  11765. #define SIM_SCGC6_FTM2_MASK (0x4000000U)
  11766. #define SIM_SCGC6_FTM2_SHIFT (26U)
  11767. #define SIM_SCGC6_FTM2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTM2_SHIFT)) & SIM_SCGC6_FTM2_MASK)
  11768. #define SIM_SCGC6_ADC0_MASK (0x8000000U)
  11769. #define SIM_SCGC6_ADC0_SHIFT (27U)
  11770. #define SIM_SCGC6_ADC0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_ADC0_SHIFT)) & SIM_SCGC6_ADC0_MASK)
  11771. #define SIM_SCGC6_RTC_MASK (0x20000000U)
  11772. #define SIM_SCGC6_RTC_SHIFT (29U)
  11773. #define SIM_SCGC6_RTC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_RTC_SHIFT)) & SIM_SCGC6_RTC_MASK)
  11774. #define SIM_SCGC6_DAC0_MASK (0x80000000U)
  11775. #define SIM_SCGC6_DAC0_SHIFT (31U)
  11776. #define SIM_SCGC6_DAC0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_DAC0_SHIFT)) & SIM_SCGC6_DAC0_MASK)
  11777. /*! @name SCGC7 - System Clock Gating Control Register 7 */
  11778. #define SIM_SCGC7_FLEXBUS_MASK (0x1U)
  11779. #define SIM_SCGC7_FLEXBUS_SHIFT (0U)
  11780. #define SIM_SCGC7_FLEXBUS(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC7_FLEXBUS_SHIFT)) & SIM_SCGC7_FLEXBUS_MASK)
  11781. #define SIM_SCGC7_DMA_MASK (0x2U)
  11782. #define SIM_SCGC7_DMA_SHIFT (1U)
  11783. #define SIM_SCGC7_DMA(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC7_DMA_SHIFT)) & SIM_SCGC7_DMA_MASK)
  11784. #define SIM_SCGC7_MPU_MASK (0x4U)
  11785. #define SIM_SCGC7_MPU_SHIFT (2U)
  11786. #define SIM_SCGC7_MPU(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC7_MPU_SHIFT)) & SIM_SCGC7_MPU_MASK)
  11787. #define SIM_SCGC7_SDRAMC_MASK (0x8U)
  11788. #define SIM_SCGC7_SDRAMC_SHIFT (3U)
  11789. #define SIM_SCGC7_SDRAMC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC7_SDRAMC_SHIFT)) & SIM_SCGC7_SDRAMC_MASK)
  11790. /*! @name CLKDIV1 - System Clock Divider Register 1 */
  11791. #define SIM_CLKDIV1_OUTDIV4_MASK (0xF0000U)
  11792. #define SIM_CLKDIV1_OUTDIV4_SHIFT (16U)
  11793. #define SIM_CLKDIV1_OUTDIV4(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV4_SHIFT)) & SIM_CLKDIV1_OUTDIV4_MASK)
  11794. #define SIM_CLKDIV1_OUTDIV3_MASK (0xF00000U)
  11795. #define SIM_CLKDIV1_OUTDIV3_SHIFT (20U)
  11796. #define SIM_CLKDIV1_OUTDIV3(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV3_SHIFT)) & SIM_CLKDIV1_OUTDIV3_MASK)
  11797. #define SIM_CLKDIV1_OUTDIV2_MASK (0xF000000U)
  11798. #define SIM_CLKDIV1_OUTDIV2_SHIFT (24U)
  11799. #define SIM_CLKDIV1_OUTDIV2(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV2_SHIFT)) & SIM_CLKDIV1_OUTDIV2_MASK)
  11800. #define SIM_CLKDIV1_OUTDIV1_MASK (0xF0000000U)
  11801. #define SIM_CLKDIV1_OUTDIV1_SHIFT (28U)
  11802. #define SIM_CLKDIV1_OUTDIV1(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV1_SHIFT)) & SIM_CLKDIV1_OUTDIV1_MASK)
  11803. /*! @name CLKDIV2 - System Clock Divider Register 2 */
  11804. #define SIM_CLKDIV2_USBFRAC_MASK (0x1U)
  11805. #define SIM_CLKDIV2_USBFRAC_SHIFT (0U)
  11806. #define SIM_CLKDIV2_USBFRAC(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV2_USBFRAC_SHIFT)) & SIM_CLKDIV2_USBFRAC_MASK)
  11807. #define SIM_CLKDIV2_USBDIV_MASK (0xEU)
  11808. #define SIM_CLKDIV2_USBDIV_SHIFT (1U)
  11809. #define SIM_CLKDIV2_USBDIV(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV2_USBDIV_SHIFT)) & SIM_CLKDIV2_USBDIV_MASK)
  11810. /*! @name FCFG1 - Flash Configuration Register 1 */
  11811. #define SIM_FCFG1_FLASHDIS_MASK (0x1U)
  11812. #define SIM_FCFG1_FLASHDIS_SHIFT (0U)
  11813. #define SIM_FCFG1_FLASHDIS(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLASHDIS_SHIFT)) & SIM_FCFG1_FLASHDIS_MASK)
  11814. #define SIM_FCFG1_FLASHDOZE_MASK (0x2U)
  11815. #define SIM_FCFG1_FLASHDOZE_SHIFT (1U)
  11816. #define SIM_FCFG1_FLASHDOZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLASHDOZE_SHIFT)) & SIM_FCFG1_FLASHDOZE_MASK)
  11817. #define SIM_FCFG1_PFSIZE_MASK (0xF000000U)
  11818. #define SIM_FCFG1_PFSIZE_SHIFT (24U)
  11819. #define SIM_FCFG1_PFSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_PFSIZE_SHIFT)) & SIM_FCFG1_PFSIZE_MASK)
  11820. /*! @name FCFG2 - Flash Configuration Register 2 */
  11821. #define SIM_FCFG2_MAXADDR1_MASK (0x7F0000U)
  11822. #define SIM_FCFG2_MAXADDR1_SHIFT (16U)
  11823. #define SIM_FCFG2_MAXADDR1(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_MAXADDR1_SHIFT)) & SIM_FCFG2_MAXADDR1_MASK)
  11824. #define SIM_FCFG2_MAXADDR0_MASK (0x7F000000U)
  11825. #define SIM_FCFG2_MAXADDR0_SHIFT (24U)
  11826. #define SIM_FCFG2_MAXADDR0(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_MAXADDR0_SHIFT)) & SIM_FCFG2_MAXADDR0_MASK)
  11827. /*! @name UIDH - Unique Identification Register High */
  11828. #define SIM_UIDH_UID_MASK (0xFFFFFFFFU)
  11829. #define SIM_UIDH_UID_SHIFT (0U)
  11830. #define SIM_UIDH_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDH_UID_SHIFT)) & SIM_UIDH_UID_MASK)
  11831. /*! @name UIDMH - Unique Identification Register Mid-High */
  11832. #define SIM_UIDMH_UID_MASK (0xFFFFFFFFU)
  11833. #define SIM_UIDMH_UID_SHIFT (0U)
  11834. #define SIM_UIDMH_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDMH_UID_SHIFT)) & SIM_UIDMH_UID_MASK)
  11835. /*! @name UIDML - Unique Identification Register Mid Low */
  11836. #define SIM_UIDML_UID_MASK (0xFFFFFFFFU)
  11837. #define SIM_UIDML_UID_SHIFT (0U)
  11838. #define SIM_UIDML_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDML_UID_SHIFT)) & SIM_UIDML_UID_MASK)
  11839. /*! @name UIDL - Unique Identification Register Low */
  11840. #define SIM_UIDL_UID_MASK (0xFFFFFFFFU)
  11841. #define SIM_UIDL_UID_SHIFT (0U)
  11842. #define SIM_UIDL_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDL_UID_SHIFT)) & SIM_UIDL_UID_MASK)
  11843. /*! @name CLKDIV3 - System Clock Divider Register 3 */
  11844. #define SIM_CLKDIV3_PLLFLLFRAC_MASK (0x1U)
  11845. #define SIM_CLKDIV3_PLLFLLFRAC_SHIFT (0U)
  11846. #define SIM_CLKDIV3_PLLFLLFRAC(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV3_PLLFLLFRAC_SHIFT)) & SIM_CLKDIV3_PLLFLLFRAC_MASK)
  11847. #define SIM_CLKDIV3_PLLFLLDIV_MASK (0xEU)
  11848. #define SIM_CLKDIV3_PLLFLLDIV_SHIFT (1U)
  11849. #define SIM_CLKDIV3_PLLFLLDIV(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV3_PLLFLLDIV_SHIFT)) & SIM_CLKDIV3_PLLFLLDIV_MASK)
  11850. /*! @name CLKDIV4 - System Clock Divider Register 4 */
  11851. #define SIM_CLKDIV4_TRACEFRAC_MASK (0x1U)
  11852. #define SIM_CLKDIV4_TRACEFRAC_SHIFT (0U)
  11853. #define SIM_CLKDIV4_TRACEFRAC(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV4_TRACEFRAC_SHIFT)) & SIM_CLKDIV4_TRACEFRAC_MASK)
  11854. #define SIM_CLKDIV4_TRACEDIV_MASK (0xEU)
  11855. #define SIM_CLKDIV4_TRACEDIV_SHIFT (1U)
  11856. #define SIM_CLKDIV4_TRACEDIV(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV4_TRACEDIV_SHIFT)) & SIM_CLKDIV4_TRACEDIV_MASK)
  11857. /*!
  11858. * @}
  11859. */ /* end of group SIM_Register_Masks */
  11860. /* SIM - Peripheral instance base addresses */
  11861. /** Peripheral SIM base address */
  11862. #define SIM_BASE (0x40047000u)
  11863. /** Peripheral SIM base pointer */
  11864. #define SIM ((SIM_Type *)SIM_BASE)
  11865. /** Array initializer of SIM peripheral base addresses */
  11866. #define SIM_BASE_ADDRS { SIM_BASE }
  11867. /** Array initializer of SIM peripheral base pointers */
  11868. #define SIM_BASE_PTRS { SIM }
  11869. /*!
  11870. * @}
  11871. */ /* end of group SIM_Peripheral_Access_Layer */
  11872. /* ----------------------------------------------------------------------------
  11873. -- SMC Peripheral Access Layer
  11874. ---------------------------------------------------------------------------- */
  11875. /*!
  11876. * @addtogroup SMC_Peripheral_Access_Layer SMC Peripheral Access Layer
  11877. * @{
  11878. */
  11879. /** SMC - Register Layout Typedef */
  11880. typedef struct {
  11881. __IO uint8_t PMPROT; /**< Power Mode Protection register, offset: 0x0 */
  11882. __IO uint8_t PMCTRL; /**< Power Mode Control register, offset: 0x1 */
  11883. __IO uint8_t STOPCTRL; /**< Stop Control Register, offset: 0x2 */
  11884. __I uint8_t PMSTAT; /**< Power Mode Status register, offset: 0x3 */
  11885. } SMC_Type;
  11886. /* ----------------------------------------------------------------------------
  11887. -- SMC Register Masks
  11888. ---------------------------------------------------------------------------- */
  11889. /*!
  11890. * @addtogroup SMC_Register_Masks SMC Register Masks
  11891. * @{
  11892. */
  11893. /*! @name PMPROT - Power Mode Protection register */
  11894. #define SMC_PMPROT_AVLLS_MASK (0x2U)
  11895. #define SMC_PMPROT_AVLLS_SHIFT (1U)
  11896. #define SMC_PMPROT_AVLLS(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMPROT_AVLLS_SHIFT)) & SMC_PMPROT_AVLLS_MASK)
  11897. #define SMC_PMPROT_ALLS_MASK (0x8U)
  11898. #define SMC_PMPROT_ALLS_SHIFT (3U)
  11899. #define SMC_PMPROT_ALLS(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMPROT_ALLS_SHIFT)) & SMC_PMPROT_ALLS_MASK)
  11900. #define SMC_PMPROT_AVLP_MASK (0x20U)
  11901. #define SMC_PMPROT_AVLP_SHIFT (5U)
  11902. #define SMC_PMPROT_AVLP(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMPROT_AVLP_SHIFT)) & SMC_PMPROT_AVLP_MASK)
  11903. #define SMC_PMPROT_AHSRUN_MASK (0x80U)
  11904. #define SMC_PMPROT_AHSRUN_SHIFT (7U)
  11905. #define SMC_PMPROT_AHSRUN(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMPROT_AHSRUN_SHIFT)) & SMC_PMPROT_AHSRUN_MASK)
  11906. /*! @name PMCTRL - Power Mode Control register */
  11907. #define SMC_PMCTRL_STOPM_MASK (0x7U)
  11908. #define SMC_PMCTRL_STOPM_SHIFT (0U)
  11909. #define SMC_PMCTRL_STOPM(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMCTRL_STOPM_SHIFT)) & SMC_PMCTRL_STOPM_MASK)
  11910. #define SMC_PMCTRL_STOPA_MASK (0x8U)
  11911. #define SMC_PMCTRL_STOPA_SHIFT (3U)
  11912. #define SMC_PMCTRL_STOPA(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMCTRL_STOPA_SHIFT)) & SMC_PMCTRL_STOPA_MASK)
  11913. #define SMC_PMCTRL_RUNM_MASK (0x60U)
  11914. #define SMC_PMCTRL_RUNM_SHIFT (5U)
  11915. #define SMC_PMCTRL_RUNM(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMCTRL_RUNM_SHIFT)) & SMC_PMCTRL_RUNM_MASK)
  11916. /*! @name STOPCTRL - Stop Control Register */
  11917. #define SMC_STOPCTRL_LLSM_MASK (0x7U)
  11918. #define SMC_STOPCTRL_LLSM_SHIFT (0U)
  11919. #define SMC_STOPCTRL_LLSM(x) (((uint8_t)(((uint8_t)(x)) << SMC_STOPCTRL_LLSM_SHIFT)) & SMC_STOPCTRL_LLSM_MASK)
  11920. #define SMC_STOPCTRL_LPOPO_MASK (0x8U)
  11921. #define SMC_STOPCTRL_LPOPO_SHIFT (3U)
  11922. #define SMC_STOPCTRL_LPOPO(x) (((uint8_t)(((uint8_t)(x)) << SMC_STOPCTRL_LPOPO_SHIFT)) & SMC_STOPCTRL_LPOPO_MASK)
  11923. #define SMC_STOPCTRL_RAM2PO_MASK (0x10U)
  11924. #define SMC_STOPCTRL_RAM2PO_SHIFT (4U)
  11925. #define SMC_STOPCTRL_RAM2PO(x) (((uint8_t)(((uint8_t)(x)) << SMC_STOPCTRL_RAM2PO_SHIFT)) & SMC_STOPCTRL_RAM2PO_MASK)
  11926. #define SMC_STOPCTRL_PORPO_MASK (0x20U)
  11927. #define SMC_STOPCTRL_PORPO_SHIFT (5U)
  11928. #define SMC_STOPCTRL_PORPO(x) (((uint8_t)(((uint8_t)(x)) << SMC_STOPCTRL_PORPO_SHIFT)) & SMC_STOPCTRL_PORPO_MASK)
  11929. #define SMC_STOPCTRL_PSTOPO_MASK (0xC0U)
  11930. #define SMC_STOPCTRL_PSTOPO_SHIFT (6U)
  11931. #define SMC_STOPCTRL_PSTOPO(x) (((uint8_t)(((uint8_t)(x)) << SMC_STOPCTRL_PSTOPO_SHIFT)) & SMC_STOPCTRL_PSTOPO_MASK)
  11932. /*! @name PMSTAT - Power Mode Status register */
  11933. #define SMC_PMSTAT_PMSTAT_MASK (0xFFU)
  11934. #define SMC_PMSTAT_PMSTAT_SHIFT (0U)
  11935. #define SMC_PMSTAT_PMSTAT(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMSTAT_PMSTAT_SHIFT)) & SMC_PMSTAT_PMSTAT_MASK)
  11936. /*!
  11937. * @}
  11938. */ /* end of group SMC_Register_Masks */
  11939. /* SMC - Peripheral instance base addresses */
  11940. /** Peripheral SMC base address */
  11941. #define SMC_BASE (0x4007E000u)
  11942. /** Peripheral SMC base pointer */
  11943. #define SMC ((SMC_Type *)SMC_BASE)
  11944. /** Array initializer of SMC peripheral base addresses */
  11945. #define SMC_BASE_ADDRS { SMC_BASE }
  11946. /** Array initializer of SMC peripheral base pointers */
  11947. #define SMC_BASE_PTRS { SMC }
  11948. /*!
  11949. * @}
  11950. */ /* end of group SMC_Peripheral_Access_Layer */
  11951. /* ----------------------------------------------------------------------------
  11952. -- SPI Peripheral Access Layer
  11953. ---------------------------------------------------------------------------- */
  11954. /*!
  11955. * @addtogroup SPI_Peripheral_Access_Layer SPI Peripheral Access Layer
  11956. * @{
  11957. */
  11958. /** SPI - Register Layout Typedef */
  11959. typedef struct {
  11960. __IO uint32_t MCR; /**< Module Configuration Register, offset: 0x0 */
  11961. uint8_t RESERVED_0[4];
  11962. __IO uint32_t TCR; /**< Transfer Count Register, offset: 0x8 */
  11963. union { /* offset: 0xC */
  11964. __IO uint32_t CTAR[2]; /**< Clock and Transfer Attributes Register (In Master Mode), array offset: 0xC, array step: 0x4 */
  11965. __IO uint32_t CTAR_SLAVE[1]; /**< Clock and Transfer Attributes Register (In Slave Mode), array offset: 0xC, array step: 0x4 */
  11966. };
  11967. uint8_t RESERVED_1[24];
  11968. __IO uint32_t SR; /**< Status Register, offset: 0x2C */
  11969. __IO uint32_t RSER; /**< DMA/Interrupt Request Select and Enable Register, offset: 0x30 */
  11970. union { /* offset: 0x34 */
  11971. __IO uint32_t PUSHR; /**< PUSH TX FIFO Register In Master Mode, offset: 0x34 */
  11972. __IO uint32_t PUSHR_SLAVE; /**< PUSH TX FIFO Register In Slave Mode, offset: 0x34 */
  11973. };
  11974. __I uint32_t POPR; /**< POP RX FIFO Register, offset: 0x38 */
  11975. __I uint32_t TXFR0; /**< Transmit FIFO Registers, offset: 0x3C */
  11976. __I uint32_t TXFR1; /**< Transmit FIFO Registers, offset: 0x40 */
  11977. __I uint32_t TXFR2; /**< Transmit FIFO Registers, offset: 0x44 */
  11978. __I uint32_t TXFR3; /**< Transmit FIFO Registers, offset: 0x48 */
  11979. uint8_t RESERVED_2[48];
  11980. __I uint32_t RXFR0; /**< Receive FIFO Registers, offset: 0x7C */
  11981. __I uint32_t RXFR1; /**< Receive FIFO Registers, offset: 0x80 */
  11982. __I uint32_t RXFR2; /**< Receive FIFO Registers, offset: 0x84 */
  11983. __I uint32_t RXFR3; /**< Receive FIFO Registers, offset: 0x88 */
  11984. } SPI_Type;
  11985. /* ----------------------------------------------------------------------------
  11986. -- SPI Register Masks
  11987. ---------------------------------------------------------------------------- */
  11988. /*!
  11989. * @addtogroup SPI_Register_Masks SPI Register Masks
  11990. * @{
  11991. */
  11992. /*! @name MCR - Module Configuration Register */
  11993. #define SPI_MCR_HALT_MASK (0x1U)
  11994. #define SPI_MCR_HALT_SHIFT (0U)
  11995. #define SPI_MCR_HALT(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_HALT_SHIFT)) & SPI_MCR_HALT_MASK)
  11996. #define SPI_MCR_SMPL_PT_MASK (0x300U)
  11997. #define SPI_MCR_SMPL_PT_SHIFT (8U)
  11998. #define SPI_MCR_SMPL_PT(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_SMPL_PT_SHIFT)) & SPI_MCR_SMPL_PT_MASK)
  11999. #define SPI_MCR_CLR_RXF_MASK (0x400U)
  12000. #define SPI_MCR_CLR_RXF_SHIFT (10U)
  12001. #define SPI_MCR_CLR_RXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_CLR_RXF_SHIFT)) & SPI_MCR_CLR_RXF_MASK)
  12002. #define SPI_MCR_CLR_TXF_MASK (0x800U)
  12003. #define SPI_MCR_CLR_TXF_SHIFT (11U)
  12004. #define SPI_MCR_CLR_TXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_CLR_TXF_SHIFT)) & SPI_MCR_CLR_TXF_MASK)
  12005. #define SPI_MCR_DIS_RXF_MASK (0x1000U)
  12006. #define SPI_MCR_DIS_RXF_SHIFT (12U)
  12007. #define SPI_MCR_DIS_RXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DIS_RXF_SHIFT)) & SPI_MCR_DIS_RXF_MASK)
  12008. #define SPI_MCR_DIS_TXF_MASK (0x2000U)
  12009. #define SPI_MCR_DIS_TXF_SHIFT (13U)
  12010. #define SPI_MCR_DIS_TXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DIS_TXF_SHIFT)) & SPI_MCR_DIS_TXF_MASK)
  12011. #define SPI_MCR_MDIS_MASK (0x4000U)
  12012. #define SPI_MCR_MDIS_SHIFT (14U)
  12013. #define SPI_MCR_MDIS(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_MDIS_SHIFT)) & SPI_MCR_MDIS_MASK)
  12014. #define SPI_MCR_DOZE_MASK (0x8000U)
  12015. #define SPI_MCR_DOZE_SHIFT (15U)
  12016. #define SPI_MCR_DOZE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DOZE_SHIFT)) & SPI_MCR_DOZE_MASK)
  12017. #define SPI_MCR_PCSIS_MASK (0x3F0000U)
  12018. #define SPI_MCR_PCSIS_SHIFT (16U)
  12019. #define SPI_MCR_PCSIS(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_PCSIS_SHIFT)) & SPI_MCR_PCSIS_MASK)
  12020. #define SPI_MCR_ROOE_MASK (0x1000000U)
  12021. #define SPI_MCR_ROOE_SHIFT (24U)
  12022. #define SPI_MCR_ROOE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_ROOE_SHIFT)) & SPI_MCR_ROOE_MASK)
  12023. #define SPI_MCR_PCSSE_MASK (0x2000000U)
  12024. #define SPI_MCR_PCSSE_SHIFT (25U)
  12025. #define SPI_MCR_PCSSE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_PCSSE_SHIFT)) & SPI_MCR_PCSSE_MASK)
  12026. #define SPI_MCR_MTFE_MASK (0x4000000U)
  12027. #define SPI_MCR_MTFE_SHIFT (26U)
  12028. #define SPI_MCR_MTFE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_MTFE_SHIFT)) & SPI_MCR_MTFE_MASK)
  12029. #define SPI_MCR_FRZ_MASK (0x8000000U)
  12030. #define SPI_MCR_FRZ_SHIFT (27U)
  12031. #define SPI_MCR_FRZ(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_FRZ_SHIFT)) & SPI_MCR_FRZ_MASK)
  12032. #define SPI_MCR_DCONF_MASK (0x30000000U)
  12033. #define SPI_MCR_DCONF_SHIFT (28U)
  12034. #define SPI_MCR_DCONF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DCONF_SHIFT)) & SPI_MCR_DCONF_MASK)
  12035. #define SPI_MCR_CONT_SCKE_MASK (0x40000000U)
  12036. #define SPI_MCR_CONT_SCKE_SHIFT (30U)
  12037. #define SPI_MCR_CONT_SCKE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_CONT_SCKE_SHIFT)) & SPI_MCR_CONT_SCKE_MASK)
  12038. #define SPI_MCR_MSTR_MASK (0x80000000U)
  12039. #define SPI_MCR_MSTR_SHIFT (31U)
  12040. #define SPI_MCR_MSTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_MSTR_SHIFT)) & SPI_MCR_MSTR_MASK)
  12041. /*! @name TCR - Transfer Count Register */
  12042. #define SPI_TCR_SPI_TCNT_MASK (0xFFFF0000U)
  12043. #define SPI_TCR_SPI_TCNT_SHIFT (16U)
  12044. #define SPI_TCR_SPI_TCNT(x) (((uint32_t)(((uint32_t)(x)) << SPI_TCR_SPI_TCNT_SHIFT)) & SPI_TCR_SPI_TCNT_MASK)
  12045. /*! @name CTAR - Clock and Transfer Attributes Register (In Master Mode) */
  12046. #define SPI_CTAR_BR_MASK (0xFU)
  12047. #define SPI_CTAR_BR_SHIFT (0U)
  12048. #define SPI_CTAR_BR(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_BR_SHIFT)) & SPI_CTAR_BR_MASK)
  12049. #define SPI_CTAR_DT_MASK (0xF0U)
  12050. #define SPI_CTAR_DT_SHIFT (4U)
  12051. #define SPI_CTAR_DT(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_DT_SHIFT)) & SPI_CTAR_DT_MASK)
  12052. #define SPI_CTAR_ASC_MASK (0xF00U)
  12053. #define SPI_CTAR_ASC_SHIFT (8U)
  12054. #define SPI_CTAR_ASC(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_ASC_SHIFT)) & SPI_CTAR_ASC_MASK)
  12055. #define SPI_CTAR_CSSCK_MASK (0xF000U)
  12056. #define SPI_CTAR_CSSCK_SHIFT (12U)
  12057. #define SPI_CTAR_CSSCK(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_CSSCK_SHIFT)) & SPI_CTAR_CSSCK_MASK)
  12058. #define SPI_CTAR_PBR_MASK (0x30000U)
  12059. #define SPI_CTAR_PBR_SHIFT (16U)
  12060. #define SPI_CTAR_PBR(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PBR_SHIFT)) & SPI_CTAR_PBR_MASK)
  12061. #define SPI_CTAR_PDT_MASK (0xC0000U)
  12062. #define SPI_CTAR_PDT_SHIFT (18U)
  12063. #define SPI_CTAR_PDT(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PDT_SHIFT)) & SPI_CTAR_PDT_MASK)
  12064. #define SPI_CTAR_PASC_MASK (0x300000U)
  12065. #define SPI_CTAR_PASC_SHIFT (20U)
  12066. #define SPI_CTAR_PASC(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PASC_SHIFT)) & SPI_CTAR_PASC_MASK)
  12067. #define SPI_CTAR_PCSSCK_MASK (0xC00000U)
  12068. #define SPI_CTAR_PCSSCK_SHIFT (22U)
  12069. #define SPI_CTAR_PCSSCK(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PCSSCK_SHIFT)) & SPI_CTAR_PCSSCK_MASK)
  12070. #define SPI_CTAR_LSBFE_MASK (0x1000000U)
  12071. #define SPI_CTAR_LSBFE_SHIFT (24U)
  12072. #define SPI_CTAR_LSBFE(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_LSBFE_SHIFT)) & SPI_CTAR_LSBFE_MASK)
  12073. #define SPI_CTAR_CPHA_MASK (0x2000000U)
  12074. #define SPI_CTAR_CPHA_SHIFT (25U)
  12075. #define SPI_CTAR_CPHA(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_CPHA_SHIFT)) & SPI_CTAR_CPHA_MASK)
  12076. #define SPI_CTAR_CPOL_MASK (0x4000000U)
  12077. #define SPI_CTAR_CPOL_SHIFT (26U)
  12078. #define SPI_CTAR_CPOL(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_CPOL_SHIFT)) & SPI_CTAR_CPOL_MASK)
  12079. #define SPI_CTAR_FMSZ_MASK (0x78000000U)
  12080. #define SPI_CTAR_FMSZ_SHIFT (27U)
  12081. #define SPI_CTAR_FMSZ(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_FMSZ_SHIFT)) & SPI_CTAR_FMSZ_MASK)
  12082. #define SPI_CTAR_DBR_MASK (0x80000000U)
  12083. #define SPI_CTAR_DBR_SHIFT (31U)
  12084. #define SPI_CTAR_DBR(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_DBR_SHIFT)) & SPI_CTAR_DBR_MASK)
  12085. /* The count of SPI_CTAR */
  12086. #define SPI_CTAR_COUNT (2U)
  12087. /*! @name CTAR_SLAVE - Clock and Transfer Attributes Register (In Slave Mode) */
  12088. #define SPI_CTAR_SLAVE_CPHA_MASK (0x2000000U)
  12089. #define SPI_CTAR_SLAVE_CPHA_SHIFT (25U)
  12090. #define SPI_CTAR_SLAVE_CPHA(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_SLAVE_CPHA_SHIFT)) & SPI_CTAR_SLAVE_CPHA_MASK)
  12091. #define SPI_CTAR_SLAVE_CPOL_MASK (0x4000000U)
  12092. #define SPI_CTAR_SLAVE_CPOL_SHIFT (26U)
  12093. #define SPI_CTAR_SLAVE_CPOL(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_SLAVE_CPOL_SHIFT)) & SPI_CTAR_SLAVE_CPOL_MASK)
  12094. #define SPI_CTAR_SLAVE_FMSZ_MASK (0x78000000U)
  12095. #define SPI_CTAR_SLAVE_FMSZ_SHIFT (27U)
  12096. #define SPI_CTAR_SLAVE_FMSZ(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_SLAVE_FMSZ_SHIFT)) & SPI_CTAR_SLAVE_FMSZ_MASK)
  12097. /* The count of SPI_CTAR_SLAVE */
  12098. #define SPI_CTAR_SLAVE_COUNT (1U)
  12099. /*! @name SR - Status Register */
  12100. #define SPI_SR_POPNXTPTR_MASK (0xFU)
  12101. #define SPI_SR_POPNXTPTR_SHIFT (0U)
  12102. #define SPI_SR_POPNXTPTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_POPNXTPTR_SHIFT)) & SPI_SR_POPNXTPTR_MASK)
  12103. #define SPI_SR_RXCTR_MASK (0xF0U)
  12104. #define SPI_SR_RXCTR_SHIFT (4U)
  12105. #define SPI_SR_RXCTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_RXCTR_SHIFT)) & SPI_SR_RXCTR_MASK)
  12106. #define SPI_SR_TXNXTPTR_MASK (0xF00U)
  12107. #define SPI_SR_TXNXTPTR_SHIFT (8U)
  12108. #define SPI_SR_TXNXTPTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TXNXTPTR_SHIFT)) & SPI_SR_TXNXTPTR_MASK)
  12109. #define SPI_SR_TXCTR_MASK (0xF000U)
  12110. #define SPI_SR_TXCTR_SHIFT (12U)
  12111. #define SPI_SR_TXCTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TXCTR_SHIFT)) & SPI_SR_TXCTR_MASK)
  12112. #define SPI_SR_RFDF_MASK (0x20000U)
  12113. #define SPI_SR_RFDF_SHIFT (17U)
  12114. #define SPI_SR_RFDF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_RFDF_SHIFT)) & SPI_SR_RFDF_MASK)
  12115. #define SPI_SR_RFOF_MASK (0x80000U)
  12116. #define SPI_SR_RFOF_SHIFT (19U)
  12117. #define SPI_SR_RFOF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_RFOF_SHIFT)) & SPI_SR_RFOF_MASK)
  12118. #define SPI_SR_TFFF_MASK (0x2000000U)
  12119. #define SPI_SR_TFFF_SHIFT (25U)
  12120. #define SPI_SR_TFFF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TFFF_SHIFT)) & SPI_SR_TFFF_MASK)
  12121. #define SPI_SR_TFUF_MASK (0x8000000U)
  12122. #define SPI_SR_TFUF_SHIFT (27U)
  12123. #define SPI_SR_TFUF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TFUF_SHIFT)) & SPI_SR_TFUF_MASK)
  12124. #define SPI_SR_EOQF_MASK (0x10000000U)
  12125. #define SPI_SR_EOQF_SHIFT (28U)
  12126. #define SPI_SR_EOQF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_EOQF_SHIFT)) & SPI_SR_EOQF_MASK)
  12127. #define SPI_SR_TXRXS_MASK (0x40000000U)
  12128. #define SPI_SR_TXRXS_SHIFT (30U)
  12129. #define SPI_SR_TXRXS(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TXRXS_SHIFT)) & SPI_SR_TXRXS_MASK)
  12130. #define SPI_SR_TCF_MASK (0x80000000U)
  12131. #define SPI_SR_TCF_SHIFT (31U)
  12132. #define SPI_SR_TCF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TCF_SHIFT)) & SPI_SR_TCF_MASK)
  12133. /*! @name RSER - DMA/Interrupt Request Select and Enable Register */
  12134. #define SPI_RSER_RFDF_DIRS_MASK (0x10000U)
  12135. #define SPI_RSER_RFDF_DIRS_SHIFT (16U)
  12136. #define SPI_RSER_RFDF_DIRS(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_RFDF_DIRS_SHIFT)) & SPI_RSER_RFDF_DIRS_MASK)
  12137. #define SPI_RSER_RFDF_RE_MASK (0x20000U)
  12138. #define SPI_RSER_RFDF_RE_SHIFT (17U)
  12139. #define SPI_RSER_RFDF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_RFDF_RE_SHIFT)) & SPI_RSER_RFDF_RE_MASK)
  12140. #define SPI_RSER_RFOF_RE_MASK (0x80000U)
  12141. #define SPI_RSER_RFOF_RE_SHIFT (19U)
  12142. #define SPI_RSER_RFOF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_RFOF_RE_SHIFT)) & SPI_RSER_RFOF_RE_MASK)
  12143. #define SPI_RSER_TFFF_DIRS_MASK (0x1000000U)
  12144. #define SPI_RSER_TFFF_DIRS_SHIFT (24U)
  12145. #define SPI_RSER_TFFF_DIRS(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TFFF_DIRS_SHIFT)) & SPI_RSER_TFFF_DIRS_MASK)
  12146. #define SPI_RSER_TFFF_RE_MASK (0x2000000U)
  12147. #define SPI_RSER_TFFF_RE_SHIFT (25U)
  12148. #define SPI_RSER_TFFF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TFFF_RE_SHIFT)) & SPI_RSER_TFFF_RE_MASK)
  12149. #define SPI_RSER_TFUF_RE_MASK (0x8000000U)
  12150. #define SPI_RSER_TFUF_RE_SHIFT (27U)
  12151. #define SPI_RSER_TFUF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TFUF_RE_SHIFT)) & SPI_RSER_TFUF_RE_MASK)
  12152. #define SPI_RSER_EOQF_RE_MASK (0x10000000U)
  12153. #define SPI_RSER_EOQF_RE_SHIFT (28U)
  12154. #define SPI_RSER_EOQF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_EOQF_RE_SHIFT)) & SPI_RSER_EOQF_RE_MASK)
  12155. #define SPI_RSER_TCF_RE_MASK (0x80000000U)
  12156. #define SPI_RSER_TCF_RE_SHIFT (31U)
  12157. #define SPI_RSER_TCF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TCF_RE_SHIFT)) & SPI_RSER_TCF_RE_MASK)
  12158. /*! @name PUSHR - PUSH TX FIFO Register In Master Mode */
  12159. #define SPI_PUSHR_TXDATA_MASK (0xFFFFU)
  12160. #define SPI_PUSHR_TXDATA_SHIFT (0U)
  12161. #define SPI_PUSHR_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_TXDATA_SHIFT)) & SPI_PUSHR_TXDATA_MASK)
  12162. #define SPI_PUSHR_PCS_MASK (0x3F0000U)
  12163. #define SPI_PUSHR_PCS_SHIFT (16U)
  12164. #define SPI_PUSHR_PCS(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_PCS_SHIFT)) & SPI_PUSHR_PCS_MASK)
  12165. #define SPI_PUSHR_CTCNT_MASK (0x4000000U)
  12166. #define SPI_PUSHR_CTCNT_SHIFT (26U)
  12167. #define SPI_PUSHR_CTCNT(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_CTCNT_SHIFT)) & SPI_PUSHR_CTCNT_MASK)
  12168. #define SPI_PUSHR_EOQ_MASK (0x8000000U)
  12169. #define SPI_PUSHR_EOQ_SHIFT (27U)
  12170. #define SPI_PUSHR_EOQ(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_EOQ_SHIFT)) & SPI_PUSHR_EOQ_MASK)
  12171. #define SPI_PUSHR_CTAS_MASK (0x70000000U)
  12172. #define SPI_PUSHR_CTAS_SHIFT (28U)
  12173. #define SPI_PUSHR_CTAS(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_CTAS_SHIFT)) & SPI_PUSHR_CTAS_MASK)
  12174. #define SPI_PUSHR_CONT_MASK (0x80000000U)
  12175. #define SPI_PUSHR_CONT_SHIFT (31U)
  12176. #define SPI_PUSHR_CONT(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_CONT_SHIFT)) & SPI_PUSHR_CONT_MASK)
  12177. /*! @name PUSHR_SLAVE - PUSH TX FIFO Register In Slave Mode */
  12178. #define SPI_PUSHR_SLAVE_TXDATA_MASK (0xFFFFU)
  12179. #define SPI_PUSHR_SLAVE_TXDATA_SHIFT (0U)
  12180. #define SPI_PUSHR_SLAVE_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_SLAVE_TXDATA_SHIFT)) & SPI_PUSHR_SLAVE_TXDATA_MASK)
  12181. /*! @name POPR - POP RX FIFO Register */
  12182. #define SPI_POPR_RXDATA_MASK (0xFFFFFFFFU)
  12183. #define SPI_POPR_RXDATA_SHIFT (0U)
  12184. #define SPI_POPR_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_POPR_RXDATA_SHIFT)) & SPI_POPR_RXDATA_MASK)
  12185. /*! @name TXFR0 - Transmit FIFO Registers */
  12186. #define SPI_TXFR0_TXDATA_MASK (0xFFFFU)
  12187. #define SPI_TXFR0_TXDATA_SHIFT (0U)
  12188. #define SPI_TXFR0_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR0_TXDATA_SHIFT)) & SPI_TXFR0_TXDATA_MASK)
  12189. #define SPI_TXFR0_TXCMD_TXDATA_MASK (0xFFFF0000U)
  12190. #define SPI_TXFR0_TXCMD_TXDATA_SHIFT (16U)
  12191. #define SPI_TXFR0_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR0_TXCMD_TXDATA_SHIFT)) & SPI_TXFR0_TXCMD_TXDATA_MASK)
  12192. /*! @name TXFR1 - Transmit FIFO Registers */
  12193. #define SPI_TXFR1_TXDATA_MASK (0xFFFFU)
  12194. #define SPI_TXFR1_TXDATA_SHIFT (0U)
  12195. #define SPI_TXFR1_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR1_TXDATA_SHIFT)) & SPI_TXFR1_TXDATA_MASK)
  12196. #define SPI_TXFR1_TXCMD_TXDATA_MASK (0xFFFF0000U)
  12197. #define SPI_TXFR1_TXCMD_TXDATA_SHIFT (16U)
  12198. #define SPI_TXFR1_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR1_TXCMD_TXDATA_SHIFT)) & SPI_TXFR1_TXCMD_TXDATA_MASK)
  12199. /*! @name TXFR2 - Transmit FIFO Registers */
  12200. #define SPI_TXFR2_TXDATA_MASK (0xFFFFU)
  12201. #define SPI_TXFR2_TXDATA_SHIFT (0U)
  12202. #define SPI_TXFR2_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR2_TXDATA_SHIFT)) & SPI_TXFR2_TXDATA_MASK)
  12203. #define SPI_TXFR2_TXCMD_TXDATA_MASK (0xFFFF0000U)
  12204. #define SPI_TXFR2_TXCMD_TXDATA_SHIFT (16U)
  12205. #define SPI_TXFR2_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR2_TXCMD_TXDATA_SHIFT)) & SPI_TXFR2_TXCMD_TXDATA_MASK)
  12206. /*! @name TXFR3 - Transmit FIFO Registers */
  12207. #define SPI_TXFR3_TXDATA_MASK (0xFFFFU)
  12208. #define SPI_TXFR3_TXDATA_SHIFT (0U)
  12209. #define SPI_TXFR3_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR3_TXDATA_SHIFT)) & SPI_TXFR3_TXDATA_MASK)
  12210. #define SPI_TXFR3_TXCMD_TXDATA_MASK (0xFFFF0000U)
  12211. #define SPI_TXFR3_TXCMD_TXDATA_SHIFT (16U)
  12212. #define SPI_TXFR3_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR3_TXCMD_TXDATA_SHIFT)) & SPI_TXFR3_TXCMD_TXDATA_MASK)
  12213. /*! @name RXFR0 - Receive FIFO Registers */
  12214. #define SPI_RXFR0_RXDATA_MASK (0xFFFFFFFFU)
  12215. #define SPI_RXFR0_RXDATA_SHIFT (0U)
  12216. #define SPI_RXFR0_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR0_RXDATA_SHIFT)) & SPI_RXFR0_RXDATA_MASK)
  12217. /*! @name RXFR1 - Receive FIFO Registers */
  12218. #define SPI_RXFR1_RXDATA_MASK (0xFFFFFFFFU)
  12219. #define SPI_RXFR1_RXDATA_SHIFT (0U)
  12220. #define SPI_RXFR1_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR1_RXDATA_SHIFT)) & SPI_RXFR1_RXDATA_MASK)
  12221. /*! @name RXFR2 - Receive FIFO Registers */
  12222. #define SPI_RXFR2_RXDATA_MASK (0xFFFFFFFFU)
  12223. #define SPI_RXFR2_RXDATA_SHIFT (0U)
  12224. #define SPI_RXFR2_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR2_RXDATA_SHIFT)) & SPI_RXFR2_RXDATA_MASK)
  12225. /*! @name RXFR3 - Receive FIFO Registers */
  12226. #define SPI_RXFR3_RXDATA_MASK (0xFFFFFFFFU)
  12227. #define SPI_RXFR3_RXDATA_SHIFT (0U)
  12228. #define SPI_RXFR3_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR3_RXDATA_SHIFT)) & SPI_RXFR3_RXDATA_MASK)
  12229. /*!
  12230. * @}
  12231. */ /* end of group SPI_Register_Masks */
  12232. /* SPI - Peripheral instance base addresses */
  12233. /** Peripheral SPI0 base address */
  12234. #define SPI0_BASE (0x4002C000u)
  12235. /** Peripheral SPI0 base pointer */
  12236. #define SPI0 ((SPI_Type *)SPI0_BASE)
  12237. /** Peripheral SPI1 base address */
  12238. #define SPI1_BASE (0x4002D000u)
  12239. /** Peripheral SPI1 base pointer */
  12240. #define SPI1 ((SPI_Type *)SPI1_BASE)
  12241. /** Peripheral SPI2 base address */
  12242. #define SPI2_BASE (0x400AC000u)
  12243. /** Peripheral SPI2 base pointer */
  12244. #define SPI2 ((SPI_Type *)SPI2_BASE)
  12245. /** Array initializer of SPI peripheral base addresses */
  12246. #define SPI_BASE_ADDRS { SPI0_BASE, SPI1_BASE, SPI2_BASE }
  12247. /** Array initializer of SPI peripheral base pointers */
  12248. #define SPI_BASE_PTRS { SPI0, SPI1, SPI2 }
  12249. /** Interrupt vectors for the SPI peripheral type */
  12250. #define SPI_IRQS { SPI0_IRQn, SPI1_IRQn, SPI2_IRQn }
  12251. /*!
  12252. * @}
  12253. */ /* end of group SPI_Peripheral_Access_Layer */
  12254. /* ----------------------------------------------------------------------------
  12255. -- SYSMPU Peripheral Access Layer
  12256. ---------------------------------------------------------------------------- */
  12257. /*!
  12258. * @addtogroup SYSMPU_Peripheral_Access_Layer SYSMPU Peripheral Access Layer
  12259. * @{
  12260. */
  12261. /** SYSMPU - Register Layout Typedef */
  12262. typedef struct {
  12263. __IO uint32_t CESR; /**< Control/Error Status Register, offset: 0x0 */
  12264. uint8_t RESERVED_0[12];
  12265. struct { /* offset: 0x10, array step: 0x8 */
  12266. __I uint32_t EAR; /**< Error Address Register, slave port n, array offset: 0x10, array step: 0x8 */
  12267. __I uint32_t EDR; /**< Error Detail Register, slave port n, array offset: 0x14, array step: 0x8 */
  12268. } SP[5];
  12269. uint8_t RESERVED_1[968];
  12270. __IO uint32_t WORD[12][4]; /**< Region Descriptor n, Word 0..Region Descriptor n, Word 3, array offset: 0x400, array step: index*0x10, index2*0x4 */
  12271. uint8_t RESERVED_2[832];
  12272. __IO uint32_t RGDAAC[12]; /**< Region Descriptor Alternate Access Control n, array offset: 0x800, array step: 0x4 */
  12273. } SYSMPU_Type;
  12274. /* ----------------------------------------------------------------------------
  12275. -- SYSMPU Register Masks
  12276. ---------------------------------------------------------------------------- */
  12277. /*!
  12278. * @addtogroup SYSMPU_Register_Masks SYSMPU Register Masks
  12279. * @{
  12280. */
  12281. /*! @name CESR - Control/Error Status Register */
  12282. #define SYSMPU_CESR_VLD_MASK (0x1U)
  12283. #define SYSMPU_CESR_VLD_SHIFT (0U)
  12284. #define SYSMPU_CESR_VLD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_VLD_SHIFT)) & SYSMPU_CESR_VLD_MASK)
  12285. #define SYSMPU_CESR_NRGD_MASK (0xF00U)
  12286. #define SYSMPU_CESR_NRGD_SHIFT (8U)
  12287. #define SYSMPU_CESR_NRGD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_NRGD_SHIFT)) & SYSMPU_CESR_NRGD_MASK)
  12288. #define SYSMPU_CESR_NSP_MASK (0xF000U)
  12289. #define SYSMPU_CESR_NSP_SHIFT (12U)
  12290. #define SYSMPU_CESR_NSP(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_NSP_SHIFT)) & SYSMPU_CESR_NSP_MASK)
  12291. #define SYSMPU_CESR_HRL_MASK (0xF0000U)
  12292. #define SYSMPU_CESR_HRL_SHIFT (16U)
  12293. #define SYSMPU_CESR_HRL(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_HRL_SHIFT)) & SYSMPU_CESR_HRL_MASK)
  12294. #define SYSMPU_CESR_SPERR_MASK (0xF8000000U)
  12295. #define SYSMPU_CESR_SPERR_SHIFT (27U)
  12296. #define SYSMPU_CESR_SPERR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_SPERR_SHIFT)) & SYSMPU_CESR_SPERR_MASK)
  12297. /*! @name EAR - Error Address Register, slave port n */
  12298. #define SYSMPU_EAR_EADDR_MASK (0xFFFFFFFFU)
  12299. #define SYSMPU_EAR_EADDR_SHIFT (0U)
  12300. #define SYSMPU_EAR_EADDR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EAR_EADDR_SHIFT)) & SYSMPU_EAR_EADDR_MASK)
  12301. /* The count of SYSMPU_EAR */
  12302. #define SYSMPU_EAR_COUNT (5U)
  12303. /*! @name EDR - Error Detail Register, slave port n */
  12304. #define SYSMPU_EDR_ERW_MASK (0x1U)
  12305. #define SYSMPU_EDR_ERW_SHIFT (0U)
  12306. #define SYSMPU_EDR_ERW(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_ERW_SHIFT)) & SYSMPU_EDR_ERW_MASK)
  12307. #define SYSMPU_EDR_EATTR_MASK (0xEU)
  12308. #define SYSMPU_EDR_EATTR_SHIFT (1U)
  12309. #define SYSMPU_EDR_EATTR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EATTR_SHIFT)) & SYSMPU_EDR_EATTR_MASK)
  12310. #define SYSMPU_EDR_EMN_MASK (0xF0U)
  12311. #define SYSMPU_EDR_EMN_SHIFT (4U)
  12312. #define SYSMPU_EDR_EMN(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EMN_SHIFT)) & SYSMPU_EDR_EMN_MASK)
  12313. #define SYSMPU_EDR_EPID_MASK (0xFF00U)
  12314. #define SYSMPU_EDR_EPID_SHIFT (8U)
  12315. #define SYSMPU_EDR_EPID(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EPID_SHIFT)) & SYSMPU_EDR_EPID_MASK)
  12316. #define SYSMPU_EDR_EACD_MASK (0xFFFF0000U)
  12317. #define SYSMPU_EDR_EACD_SHIFT (16U)
  12318. #define SYSMPU_EDR_EACD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EACD_SHIFT)) & SYSMPU_EDR_EACD_MASK)
  12319. /* The count of SYSMPU_EDR */
  12320. #define SYSMPU_EDR_COUNT (5U)
  12321. /*! @name WORD - Region Descriptor n, Word 0..Region Descriptor n, Word 3 */
  12322. #define SYSMPU_WORD_VLD_MASK (0x1U)
  12323. #define SYSMPU_WORD_VLD_SHIFT (0U)
  12324. #define SYSMPU_WORD_VLD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_VLD_SHIFT)) & SYSMPU_WORD_VLD_MASK)
  12325. #define SYSMPU_WORD_M0UM_MASK (0x7U)
  12326. #define SYSMPU_WORD_M0UM_SHIFT (0U)
  12327. #define SYSMPU_WORD_M0UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M0UM_SHIFT)) & SYSMPU_WORD_M0UM_MASK)
  12328. #define SYSMPU_WORD_M0SM_MASK (0x18U)
  12329. #define SYSMPU_WORD_M0SM_SHIFT (3U)
  12330. #define SYSMPU_WORD_M0SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M0SM_SHIFT)) & SYSMPU_WORD_M0SM_MASK)
  12331. #define SYSMPU_WORD_M0PE_MASK (0x20U)
  12332. #define SYSMPU_WORD_M0PE_SHIFT (5U)
  12333. #define SYSMPU_WORD_M0PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M0PE_SHIFT)) & SYSMPU_WORD_M0PE_MASK)
  12334. #define SYSMPU_WORD_ENDADDR_MASK (0xFFFFFFE0U)
  12335. #define SYSMPU_WORD_ENDADDR_SHIFT (5U)
  12336. #define SYSMPU_WORD_ENDADDR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_ENDADDR_SHIFT)) & SYSMPU_WORD_ENDADDR_MASK)
  12337. #define SYSMPU_WORD_SRTADDR_MASK (0xFFFFFFE0U)
  12338. #define SYSMPU_WORD_SRTADDR_SHIFT (5U)
  12339. #define SYSMPU_WORD_SRTADDR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_SRTADDR_SHIFT)) & SYSMPU_WORD_SRTADDR_MASK)
  12340. #define SYSMPU_WORD_M1UM_MASK (0x1C0U)
  12341. #define SYSMPU_WORD_M1UM_SHIFT (6U)
  12342. #define SYSMPU_WORD_M1UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M1UM_SHIFT)) & SYSMPU_WORD_M1UM_MASK)
  12343. #define SYSMPU_WORD_M1SM_MASK (0x600U)
  12344. #define SYSMPU_WORD_M1SM_SHIFT (9U)
  12345. #define SYSMPU_WORD_M1SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M1SM_SHIFT)) & SYSMPU_WORD_M1SM_MASK)
  12346. #define SYSMPU_WORD_M1PE_MASK (0x800U)
  12347. #define SYSMPU_WORD_M1PE_SHIFT (11U)
  12348. #define SYSMPU_WORD_M1PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M1PE_SHIFT)) & SYSMPU_WORD_M1PE_MASK)
  12349. #define SYSMPU_WORD_M2UM_MASK (0x7000U)
  12350. #define SYSMPU_WORD_M2UM_SHIFT (12U)
  12351. #define SYSMPU_WORD_M2UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M2UM_SHIFT)) & SYSMPU_WORD_M2UM_MASK)
  12352. #define SYSMPU_WORD_M2SM_MASK (0x18000U)
  12353. #define SYSMPU_WORD_M2SM_SHIFT (15U)
  12354. #define SYSMPU_WORD_M2SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M2SM_SHIFT)) & SYSMPU_WORD_M2SM_MASK)
  12355. #define SYSMPU_WORD_PIDMASK_MASK (0xFF0000U)
  12356. #define SYSMPU_WORD_PIDMASK_SHIFT (16U)
  12357. #define SYSMPU_WORD_PIDMASK(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_PIDMASK_SHIFT)) & SYSMPU_WORD_PIDMASK_MASK)
  12358. #define SYSMPU_WORD_M2PE_MASK (0x20000U)
  12359. #define SYSMPU_WORD_M2PE_SHIFT (17U)
  12360. #define SYSMPU_WORD_M2PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M2PE_SHIFT)) & SYSMPU_WORD_M2PE_MASK)
  12361. #define SYSMPU_WORD_M3UM_MASK (0x1C0000U)
  12362. #define SYSMPU_WORD_M3UM_SHIFT (18U)
  12363. #define SYSMPU_WORD_M3UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M3UM_SHIFT)) & SYSMPU_WORD_M3UM_MASK)
  12364. #define SYSMPU_WORD_M3SM_MASK (0x600000U)
  12365. #define SYSMPU_WORD_M3SM_SHIFT (21U)
  12366. #define SYSMPU_WORD_M3SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M3SM_SHIFT)) & SYSMPU_WORD_M3SM_MASK)
  12367. #define SYSMPU_WORD_M3PE_MASK (0x800000U)
  12368. #define SYSMPU_WORD_M3PE_SHIFT (23U)
  12369. #define SYSMPU_WORD_M3PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M3PE_SHIFT)) & SYSMPU_WORD_M3PE_MASK)
  12370. #define SYSMPU_WORD_PID_MASK (0xFF000000U)
  12371. #define SYSMPU_WORD_PID_SHIFT (24U)
  12372. #define SYSMPU_WORD_PID(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_PID_SHIFT)) & SYSMPU_WORD_PID_MASK)
  12373. #define SYSMPU_WORD_M4WE_MASK (0x1000000U)
  12374. #define SYSMPU_WORD_M4WE_SHIFT (24U)
  12375. #define SYSMPU_WORD_M4WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M4WE_SHIFT)) & SYSMPU_WORD_M4WE_MASK)
  12376. #define SYSMPU_WORD_M4RE_MASK (0x2000000U)
  12377. #define SYSMPU_WORD_M4RE_SHIFT (25U)
  12378. #define SYSMPU_WORD_M4RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M4RE_SHIFT)) & SYSMPU_WORD_M4RE_MASK)
  12379. #define SYSMPU_WORD_M5WE_MASK (0x4000000U)
  12380. #define SYSMPU_WORD_M5WE_SHIFT (26U)
  12381. #define SYSMPU_WORD_M5WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M5WE_SHIFT)) & SYSMPU_WORD_M5WE_MASK)
  12382. #define SYSMPU_WORD_M5RE_MASK (0x8000000U)
  12383. #define SYSMPU_WORD_M5RE_SHIFT (27U)
  12384. #define SYSMPU_WORD_M5RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M5RE_SHIFT)) & SYSMPU_WORD_M5RE_MASK)
  12385. #define SYSMPU_WORD_M6WE_MASK (0x10000000U)
  12386. #define SYSMPU_WORD_M6WE_SHIFT (28U)
  12387. #define SYSMPU_WORD_M6WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M6WE_SHIFT)) & SYSMPU_WORD_M6WE_MASK)
  12388. #define SYSMPU_WORD_M6RE_MASK (0x20000000U)
  12389. #define SYSMPU_WORD_M6RE_SHIFT (29U)
  12390. #define SYSMPU_WORD_M6RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M6RE_SHIFT)) & SYSMPU_WORD_M6RE_MASK)
  12391. #define SYSMPU_WORD_M7WE_MASK (0x40000000U)
  12392. #define SYSMPU_WORD_M7WE_SHIFT (30U)
  12393. #define SYSMPU_WORD_M7WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M7WE_SHIFT)) & SYSMPU_WORD_M7WE_MASK)
  12394. #define SYSMPU_WORD_M7RE_MASK (0x80000000U)
  12395. #define SYSMPU_WORD_M7RE_SHIFT (31U)
  12396. #define SYSMPU_WORD_M7RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M7RE_SHIFT)) & SYSMPU_WORD_M7RE_MASK)
  12397. /* The count of SYSMPU_WORD */
  12398. #define SYSMPU_WORD_COUNT (12U)
  12399. /* The count of SYSMPU_WORD */
  12400. #define SYSMPU_WORD_COUNT2 (4U)
  12401. /*! @name RGDAAC - Region Descriptor Alternate Access Control n */
  12402. #define SYSMPU_RGDAAC_M0UM_MASK (0x7U)
  12403. #define SYSMPU_RGDAAC_M0UM_SHIFT (0U)
  12404. #define SYSMPU_RGDAAC_M0UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M0UM_SHIFT)) & SYSMPU_RGDAAC_M0UM_MASK)
  12405. #define SYSMPU_RGDAAC_M0SM_MASK (0x18U)
  12406. #define SYSMPU_RGDAAC_M0SM_SHIFT (3U)
  12407. #define SYSMPU_RGDAAC_M0SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M0SM_SHIFT)) & SYSMPU_RGDAAC_M0SM_MASK)
  12408. #define SYSMPU_RGDAAC_M0PE_MASK (0x20U)
  12409. #define SYSMPU_RGDAAC_M0PE_SHIFT (5U)
  12410. #define SYSMPU_RGDAAC_M0PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M0PE_SHIFT)) & SYSMPU_RGDAAC_M0PE_MASK)
  12411. #define SYSMPU_RGDAAC_M1UM_MASK (0x1C0U)
  12412. #define SYSMPU_RGDAAC_M1UM_SHIFT (6U)
  12413. #define SYSMPU_RGDAAC_M1UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M1UM_SHIFT)) & SYSMPU_RGDAAC_M1UM_MASK)
  12414. #define SYSMPU_RGDAAC_M1SM_MASK (0x600U)
  12415. #define SYSMPU_RGDAAC_M1SM_SHIFT (9U)
  12416. #define SYSMPU_RGDAAC_M1SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M1SM_SHIFT)) & SYSMPU_RGDAAC_M1SM_MASK)
  12417. #define SYSMPU_RGDAAC_M1PE_MASK (0x800U)
  12418. #define SYSMPU_RGDAAC_M1PE_SHIFT (11U)
  12419. #define SYSMPU_RGDAAC_M1PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M1PE_SHIFT)) & SYSMPU_RGDAAC_M1PE_MASK)
  12420. #define SYSMPU_RGDAAC_M2UM_MASK (0x7000U)
  12421. #define SYSMPU_RGDAAC_M2UM_SHIFT (12U)
  12422. #define SYSMPU_RGDAAC_M2UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M2UM_SHIFT)) & SYSMPU_RGDAAC_M2UM_MASK)
  12423. #define SYSMPU_RGDAAC_M2SM_MASK (0x18000U)
  12424. #define SYSMPU_RGDAAC_M2SM_SHIFT (15U)
  12425. #define SYSMPU_RGDAAC_M2SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M2SM_SHIFT)) & SYSMPU_RGDAAC_M2SM_MASK)
  12426. #define SYSMPU_RGDAAC_M2PE_MASK (0x20000U)
  12427. #define SYSMPU_RGDAAC_M2PE_SHIFT (17U)
  12428. #define SYSMPU_RGDAAC_M2PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M2PE_SHIFT)) & SYSMPU_RGDAAC_M2PE_MASK)
  12429. #define SYSMPU_RGDAAC_M3UM_MASK (0x1C0000U)
  12430. #define SYSMPU_RGDAAC_M3UM_SHIFT (18U)
  12431. #define SYSMPU_RGDAAC_M3UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M3UM_SHIFT)) & SYSMPU_RGDAAC_M3UM_MASK)
  12432. #define SYSMPU_RGDAAC_M3SM_MASK (0x600000U)
  12433. #define SYSMPU_RGDAAC_M3SM_SHIFT (21U)
  12434. #define SYSMPU_RGDAAC_M3SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M3SM_SHIFT)) & SYSMPU_RGDAAC_M3SM_MASK)
  12435. #define SYSMPU_RGDAAC_M3PE_MASK (0x800000U)
  12436. #define SYSMPU_RGDAAC_M3PE_SHIFT (23U)
  12437. #define SYSMPU_RGDAAC_M3PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M3PE_SHIFT)) & SYSMPU_RGDAAC_M3PE_MASK)
  12438. #define SYSMPU_RGDAAC_M4WE_MASK (0x1000000U)
  12439. #define SYSMPU_RGDAAC_M4WE_SHIFT (24U)
  12440. #define SYSMPU_RGDAAC_M4WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M4WE_SHIFT)) & SYSMPU_RGDAAC_M4WE_MASK)
  12441. #define SYSMPU_RGDAAC_M4RE_MASK (0x2000000U)
  12442. #define SYSMPU_RGDAAC_M4RE_SHIFT (25U)
  12443. #define SYSMPU_RGDAAC_M4RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M4RE_SHIFT)) & SYSMPU_RGDAAC_M4RE_MASK)
  12444. #define SYSMPU_RGDAAC_M5WE_MASK (0x4000000U)
  12445. #define SYSMPU_RGDAAC_M5WE_SHIFT (26U)
  12446. #define SYSMPU_RGDAAC_M5WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M5WE_SHIFT)) & SYSMPU_RGDAAC_M5WE_MASK)
  12447. #define SYSMPU_RGDAAC_M5RE_MASK (0x8000000U)
  12448. #define SYSMPU_RGDAAC_M5RE_SHIFT (27U)
  12449. #define SYSMPU_RGDAAC_M5RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M5RE_SHIFT)) & SYSMPU_RGDAAC_M5RE_MASK)
  12450. #define SYSMPU_RGDAAC_M6WE_MASK (0x10000000U)
  12451. #define SYSMPU_RGDAAC_M6WE_SHIFT (28U)
  12452. #define SYSMPU_RGDAAC_M6WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M6WE_SHIFT)) & SYSMPU_RGDAAC_M6WE_MASK)
  12453. #define SYSMPU_RGDAAC_M6RE_MASK (0x20000000U)
  12454. #define SYSMPU_RGDAAC_M6RE_SHIFT (29U)
  12455. #define SYSMPU_RGDAAC_M6RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M6RE_SHIFT)) & SYSMPU_RGDAAC_M6RE_MASK)
  12456. #define SYSMPU_RGDAAC_M7WE_MASK (0x40000000U)
  12457. #define SYSMPU_RGDAAC_M7WE_SHIFT (30U)
  12458. #define SYSMPU_RGDAAC_M7WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M7WE_SHIFT)) & SYSMPU_RGDAAC_M7WE_MASK)
  12459. #define SYSMPU_RGDAAC_M7RE_MASK (0x80000000U)
  12460. #define SYSMPU_RGDAAC_M7RE_SHIFT (31U)
  12461. #define SYSMPU_RGDAAC_M7RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M7RE_SHIFT)) & SYSMPU_RGDAAC_M7RE_MASK)
  12462. /* The count of SYSMPU_RGDAAC */
  12463. #define SYSMPU_RGDAAC_COUNT (12U)
  12464. /*!
  12465. * @}
  12466. */ /* end of group SYSMPU_Register_Masks */
  12467. /* SYSMPU - Peripheral instance base addresses */
  12468. /** Peripheral SYSMPU base address */
  12469. #define SYSMPU_BASE (0x4000D000u)
  12470. /** Peripheral SYSMPU base pointer */
  12471. #define SYSMPU ((SYSMPU_Type *)SYSMPU_BASE)
  12472. /** Array initializer of SYSMPU peripheral base addresses */
  12473. #define SYSMPU_BASE_ADDRS { SYSMPU_BASE }
  12474. /** Array initializer of SYSMPU peripheral base pointers */
  12475. #define SYSMPU_BASE_PTRS { SYSMPU }
  12476. /*!
  12477. * @}
  12478. */ /* end of group SYSMPU_Peripheral_Access_Layer */
  12479. /* ----------------------------------------------------------------------------
  12480. -- TPM Peripheral Access Layer
  12481. ---------------------------------------------------------------------------- */
  12482. /*!
  12483. * @addtogroup TPM_Peripheral_Access_Layer TPM Peripheral Access Layer
  12484. * @{
  12485. */
  12486. /** TPM - Register Layout Typedef */
  12487. typedef struct {
  12488. __IO uint32_t SC; /**< Status and Control, offset: 0x0 */
  12489. __IO uint32_t CNT; /**< Counter, offset: 0x4 */
  12490. __IO uint32_t MOD; /**< Modulo, offset: 0x8 */
  12491. struct { /* offset: 0xC, array step: 0x8 */
  12492. __IO uint32_t CnSC; /**< Channel (n) Status and Control, array offset: 0xC, array step: 0x8 */
  12493. __IO uint32_t CnV; /**< Channel (n) Value, array offset: 0x10, array step: 0x8 */
  12494. } CONTROLS[2];
  12495. uint8_t RESERVED_0[52];
  12496. __IO uint32_t STATUS; /**< Capture and Compare Status, offset: 0x50 */
  12497. uint8_t RESERVED_1[16];
  12498. __IO uint32_t COMBINE; /**< Combine Channel Register, offset: 0x64 */
  12499. uint8_t RESERVED_2[8];
  12500. __IO uint32_t POL; /**< Channel Polarity, offset: 0x70 */
  12501. uint8_t RESERVED_3[4];
  12502. __IO uint32_t FILTER; /**< Filter Control, offset: 0x78 */
  12503. uint8_t RESERVED_4[4];
  12504. __IO uint32_t QDCTRL; /**< Quadrature Decoder Control and Status, offset: 0x80 */
  12505. __IO uint32_t CONF; /**< Configuration, offset: 0x84 */
  12506. } TPM_Type;
  12507. /* ----------------------------------------------------------------------------
  12508. -- TPM Register Masks
  12509. ---------------------------------------------------------------------------- */
  12510. /*!
  12511. * @addtogroup TPM_Register_Masks TPM Register Masks
  12512. * @{
  12513. */
  12514. /*! @name SC - Status and Control */
  12515. #define TPM_SC_PS_MASK (0x7U)
  12516. #define TPM_SC_PS_SHIFT (0U)
  12517. #define TPM_SC_PS(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_PS_SHIFT)) & TPM_SC_PS_MASK)
  12518. #define TPM_SC_CMOD_MASK (0x18U)
  12519. #define TPM_SC_CMOD_SHIFT (3U)
  12520. #define TPM_SC_CMOD(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_CMOD_SHIFT)) & TPM_SC_CMOD_MASK)
  12521. #define TPM_SC_CPWMS_MASK (0x20U)
  12522. #define TPM_SC_CPWMS_SHIFT (5U)
  12523. #define TPM_SC_CPWMS(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_CPWMS_SHIFT)) & TPM_SC_CPWMS_MASK)
  12524. #define TPM_SC_TOIE_MASK (0x40U)
  12525. #define TPM_SC_TOIE_SHIFT (6U)
  12526. #define TPM_SC_TOIE(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_TOIE_SHIFT)) & TPM_SC_TOIE_MASK)
  12527. #define TPM_SC_TOF_MASK (0x80U)
  12528. #define TPM_SC_TOF_SHIFT (7U)
  12529. #define TPM_SC_TOF(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_TOF_SHIFT)) & TPM_SC_TOF_MASK)
  12530. #define TPM_SC_DMA_MASK (0x100U)
  12531. #define TPM_SC_DMA_SHIFT (8U)
  12532. #define TPM_SC_DMA(x) (((uint32_t)(((uint32_t)(x)) << TPM_SC_DMA_SHIFT)) & TPM_SC_DMA_MASK)
  12533. /*! @name CNT - Counter */
  12534. #define TPM_CNT_COUNT_MASK (0xFFFFU)
  12535. #define TPM_CNT_COUNT_SHIFT (0U)
  12536. #define TPM_CNT_COUNT(x) (((uint32_t)(((uint32_t)(x)) << TPM_CNT_COUNT_SHIFT)) & TPM_CNT_COUNT_MASK)
  12537. /*! @name MOD - Modulo */
  12538. #define TPM_MOD_MOD_MASK (0xFFFFU)
  12539. #define TPM_MOD_MOD_SHIFT (0U)
  12540. #define TPM_MOD_MOD(x) (((uint32_t)(((uint32_t)(x)) << TPM_MOD_MOD_SHIFT)) & TPM_MOD_MOD_MASK)
  12541. /*! @name CnSC - Channel (n) Status and Control */
  12542. #define TPM_CnSC_DMA_MASK (0x1U)
  12543. #define TPM_CnSC_DMA_SHIFT (0U)
  12544. #define TPM_CnSC_DMA(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_DMA_SHIFT)) & TPM_CnSC_DMA_MASK)
  12545. #define TPM_CnSC_ELSA_MASK (0x4U)
  12546. #define TPM_CnSC_ELSA_SHIFT (2U)
  12547. #define TPM_CnSC_ELSA(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_ELSA_SHIFT)) & TPM_CnSC_ELSA_MASK)
  12548. #define TPM_CnSC_ELSB_MASK (0x8U)
  12549. #define TPM_CnSC_ELSB_SHIFT (3U)
  12550. #define TPM_CnSC_ELSB(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_ELSB_SHIFT)) & TPM_CnSC_ELSB_MASK)
  12551. #define TPM_CnSC_MSA_MASK (0x10U)
  12552. #define TPM_CnSC_MSA_SHIFT (4U)
  12553. #define TPM_CnSC_MSA(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_MSA_SHIFT)) & TPM_CnSC_MSA_MASK)
  12554. #define TPM_CnSC_MSB_MASK (0x20U)
  12555. #define TPM_CnSC_MSB_SHIFT (5U)
  12556. #define TPM_CnSC_MSB(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_MSB_SHIFT)) & TPM_CnSC_MSB_MASK)
  12557. #define TPM_CnSC_CHIE_MASK (0x40U)
  12558. #define TPM_CnSC_CHIE_SHIFT (6U)
  12559. #define TPM_CnSC_CHIE(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_CHIE_SHIFT)) & TPM_CnSC_CHIE_MASK)
  12560. #define TPM_CnSC_CHF_MASK (0x80U)
  12561. #define TPM_CnSC_CHF_SHIFT (7U)
  12562. #define TPM_CnSC_CHF(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnSC_CHF_SHIFT)) & TPM_CnSC_CHF_MASK)
  12563. /* The count of TPM_CnSC */
  12564. #define TPM_CnSC_COUNT (2U)
  12565. /*! @name CnV - Channel (n) Value */
  12566. #define TPM_CnV_VAL_MASK (0xFFFFU)
  12567. #define TPM_CnV_VAL_SHIFT (0U)
  12568. #define TPM_CnV_VAL(x) (((uint32_t)(((uint32_t)(x)) << TPM_CnV_VAL_SHIFT)) & TPM_CnV_VAL_MASK)
  12569. /* The count of TPM_CnV */
  12570. #define TPM_CnV_COUNT (2U)
  12571. /*! @name STATUS - Capture and Compare Status */
  12572. #define TPM_STATUS_CH0F_MASK (0x1U)
  12573. #define TPM_STATUS_CH0F_SHIFT (0U)
  12574. #define TPM_STATUS_CH0F(x) (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH0F_SHIFT)) & TPM_STATUS_CH0F_MASK)
  12575. #define TPM_STATUS_CH1F_MASK (0x2U)
  12576. #define TPM_STATUS_CH1F_SHIFT (1U)
  12577. #define TPM_STATUS_CH1F(x) (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_CH1F_SHIFT)) & TPM_STATUS_CH1F_MASK)
  12578. #define TPM_STATUS_TOF_MASK (0x100U)
  12579. #define TPM_STATUS_TOF_SHIFT (8U)
  12580. #define TPM_STATUS_TOF(x) (((uint32_t)(((uint32_t)(x)) << TPM_STATUS_TOF_SHIFT)) & TPM_STATUS_TOF_MASK)
  12581. /*! @name COMBINE - Combine Channel Register */
  12582. #define TPM_COMBINE_COMBINE0_MASK (0x1U)
  12583. #define TPM_COMBINE_COMBINE0_SHIFT (0U)
  12584. #define TPM_COMBINE_COMBINE0(x) (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMBINE0_SHIFT)) & TPM_COMBINE_COMBINE0_MASK)
  12585. #define TPM_COMBINE_COMSWAP0_MASK (0x2U)
  12586. #define TPM_COMBINE_COMSWAP0_SHIFT (1U)
  12587. #define TPM_COMBINE_COMSWAP0(x) (((uint32_t)(((uint32_t)(x)) << TPM_COMBINE_COMSWAP0_SHIFT)) & TPM_COMBINE_COMSWAP0_MASK)
  12588. /*! @name POL - Channel Polarity */
  12589. #define TPM_POL_POL0_MASK (0x1U)
  12590. #define TPM_POL_POL0_SHIFT (0U)
  12591. #define TPM_POL_POL0(x) (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL0_SHIFT)) & TPM_POL_POL0_MASK)
  12592. #define TPM_POL_POL1_MASK (0x2U)
  12593. #define TPM_POL_POL1_SHIFT (1U)
  12594. #define TPM_POL_POL1(x) (((uint32_t)(((uint32_t)(x)) << TPM_POL_POL1_SHIFT)) & TPM_POL_POL1_MASK)
  12595. /*! @name FILTER - Filter Control */
  12596. #define TPM_FILTER_CH0FVAL_MASK (0xFU)
  12597. #define TPM_FILTER_CH0FVAL_SHIFT (0U)
  12598. #define TPM_FILTER_CH0FVAL(x) (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH0FVAL_SHIFT)) & TPM_FILTER_CH0FVAL_MASK)
  12599. #define TPM_FILTER_CH1FVAL_MASK (0xF0U)
  12600. #define TPM_FILTER_CH1FVAL_SHIFT (4U)
  12601. #define TPM_FILTER_CH1FVAL(x) (((uint32_t)(((uint32_t)(x)) << TPM_FILTER_CH1FVAL_SHIFT)) & TPM_FILTER_CH1FVAL_MASK)
  12602. /*! @name QDCTRL - Quadrature Decoder Control and Status */
  12603. #define TPM_QDCTRL_QUADEN_MASK (0x1U)
  12604. #define TPM_QDCTRL_QUADEN_SHIFT (0U)
  12605. #define TPM_QDCTRL_QUADEN(x) (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_QUADEN_SHIFT)) & TPM_QDCTRL_QUADEN_MASK)
  12606. #define TPM_QDCTRL_TOFDIR_MASK (0x2U)
  12607. #define TPM_QDCTRL_TOFDIR_SHIFT (1U)
  12608. #define TPM_QDCTRL_TOFDIR(x) (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_TOFDIR_SHIFT)) & TPM_QDCTRL_TOFDIR_MASK)
  12609. #define TPM_QDCTRL_QUADIR_MASK (0x4U)
  12610. #define TPM_QDCTRL_QUADIR_SHIFT (2U)
  12611. #define TPM_QDCTRL_QUADIR(x) (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_QUADIR_SHIFT)) & TPM_QDCTRL_QUADIR_MASK)
  12612. #define TPM_QDCTRL_QUADMODE_MASK (0x8U)
  12613. #define TPM_QDCTRL_QUADMODE_SHIFT (3U)
  12614. #define TPM_QDCTRL_QUADMODE(x) (((uint32_t)(((uint32_t)(x)) << TPM_QDCTRL_QUADMODE_SHIFT)) & TPM_QDCTRL_QUADMODE_MASK)
  12615. /*! @name CONF - Configuration */
  12616. #define TPM_CONF_DOZEEN_MASK (0x20U)
  12617. #define TPM_CONF_DOZEEN_SHIFT (5U)
  12618. #define TPM_CONF_DOZEEN(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_DOZEEN_SHIFT)) & TPM_CONF_DOZEEN_MASK)
  12619. #define TPM_CONF_DBGMODE_MASK (0xC0U)
  12620. #define TPM_CONF_DBGMODE_SHIFT (6U)
  12621. #define TPM_CONF_DBGMODE(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_DBGMODE_SHIFT)) & TPM_CONF_DBGMODE_MASK)
  12622. #define TPM_CONF_GTBSYNC_MASK (0x100U)
  12623. #define TPM_CONF_GTBSYNC_SHIFT (8U)
  12624. #define TPM_CONF_GTBSYNC(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_GTBSYNC_SHIFT)) & TPM_CONF_GTBSYNC_MASK)
  12625. #define TPM_CONF_GTBEEN_MASK (0x200U)
  12626. #define TPM_CONF_GTBEEN_SHIFT (9U)
  12627. #define TPM_CONF_GTBEEN(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_GTBEEN_SHIFT)) & TPM_CONF_GTBEEN_MASK)
  12628. #define TPM_CONF_CSOT_MASK (0x10000U)
  12629. #define TPM_CONF_CSOT_SHIFT (16U)
  12630. #define TPM_CONF_CSOT(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CSOT_SHIFT)) & TPM_CONF_CSOT_MASK)
  12631. #define TPM_CONF_CSOO_MASK (0x20000U)
  12632. #define TPM_CONF_CSOO_SHIFT (17U)
  12633. #define TPM_CONF_CSOO(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CSOO_SHIFT)) & TPM_CONF_CSOO_MASK)
  12634. #define TPM_CONF_CROT_MASK (0x40000U)
  12635. #define TPM_CONF_CROT_SHIFT (18U)
  12636. #define TPM_CONF_CROT(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CROT_SHIFT)) & TPM_CONF_CROT_MASK)
  12637. #define TPM_CONF_CPOT_MASK (0x80000U)
  12638. #define TPM_CONF_CPOT_SHIFT (19U)
  12639. #define TPM_CONF_CPOT(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_CPOT_SHIFT)) & TPM_CONF_CPOT_MASK)
  12640. #define TPM_CONF_TRGPOL_MASK (0x400000U)
  12641. #define TPM_CONF_TRGPOL_SHIFT (22U)
  12642. #define TPM_CONF_TRGPOL(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_TRGPOL_SHIFT)) & TPM_CONF_TRGPOL_MASK)
  12643. #define TPM_CONF_TRGSRC_MASK (0x800000U)
  12644. #define TPM_CONF_TRGSRC_SHIFT (23U)
  12645. #define TPM_CONF_TRGSRC(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_TRGSRC_SHIFT)) & TPM_CONF_TRGSRC_MASK)
  12646. #define TPM_CONF_TRGSEL_MASK (0xF000000U)
  12647. #define TPM_CONF_TRGSEL_SHIFT (24U)
  12648. #define TPM_CONF_TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << TPM_CONF_TRGSEL_SHIFT)) & TPM_CONF_TRGSEL_MASK)
  12649. /*!
  12650. * @}
  12651. */ /* end of group TPM_Register_Masks */
  12652. /* TPM - Peripheral instance base addresses */
  12653. /** Peripheral TPM1 base address */
  12654. #define TPM1_BASE (0x400C9000u)
  12655. /** Peripheral TPM1 base pointer */
  12656. #define TPM1 ((TPM_Type *)TPM1_BASE)
  12657. /** Peripheral TPM2 base address */
  12658. #define TPM2_BASE (0x400CA000u)
  12659. /** Peripheral TPM2 base pointer */
  12660. #define TPM2 ((TPM_Type *)TPM2_BASE)
  12661. /** Array initializer of TPM peripheral base addresses */
  12662. #define TPM_BASE_ADDRS { 0u, TPM1_BASE, TPM2_BASE }
  12663. /** Array initializer of TPM peripheral base pointers */
  12664. #define TPM_BASE_PTRS { (TPM_Type *)0u, TPM1, TPM2 }
  12665. /** Interrupt vectors for the TPM peripheral type */
  12666. #define TPM_IRQS { NotAvail_IRQn, TPM1_IRQn, TPM2_IRQn }
  12667. /*!
  12668. * @}
  12669. */ /* end of group TPM_Peripheral_Access_Layer */
  12670. /* ----------------------------------------------------------------------------
  12671. -- TRNG Peripheral Access Layer
  12672. ---------------------------------------------------------------------------- */
  12673. /*!
  12674. * @addtogroup TRNG_Peripheral_Access_Layer TRNG Peripheral Access Layer
  12675. * @{
  12676. */
  12677. /** TRNG - Register Layout Typedef */
  12678. typedef struct {
  12679. __IO uint32_t MCTL; /**< RNG Miscellaneous Control Register, offset: 0x0 */
  12680. __IO uint32_t SCMISC; /**< RNG Statistical Check Miscellaneous Register, offset: 0x4 */
  12681. __IO uint32_t PKRRNG; /**< RNG Poker Range Register, offset: 0x8 */
  12682. union { /* offset: 0xC */
  12683. __IO uint32_t PKRMAX; /**< RNG Poker Maximum Limit Register, offset: 0xC */
  12684. __I uint32_t PKRSQ; /**< RNG Poker Square Calculation Result Register, offset: 0xC */
  12685. };
  12686. __IO uint32_t SDCTL; /**< RNG Seed Control Register, offset: 0x10 */
  12687. union { /* offset: 0x14 */
  12688. __IO uint32_t SBLIM; /**< RNG Sparse Bit Limit Register, offset: 0x14 */
  12689. __I uint32_t TOTSAM; /**< RNG Total Samples Register, offset: 0x14 */
  12690. };
  12691. __IO uint32_t FRQMIN; /**< RNG Frequency Count Minimum Limit Register, offset: 0x18 */
  12692. union { /* offset: 0x1C */
  12693. __I uint32_t FRQCNT; /**< RNG Frequency Count Register, offset: 0x1C */
  12694. __IO uint32_t FRQMAX; /**< RNG Frequency Count Maximum Limit Register, offset: 0x1C */
  12695. };
  12696. union { /* offset: 0x20 */
  12697. __I uint32_t SCMC; /**< RNG Statistical Check Monobit Count Register, offset: 0x20 */
  12698. __IO uint32_t SCML; /**< RNG Statistical Check Monobit Limit Register, offset: 0x20 */
  12699. };
  12700. union { /* offset: 0x24 */
  12701. __I uint32_t SCR1C; /**< RNG Statistical Check Run Length 1 Count Register, offset: 0x24 */
  12702. __IO uint32_t SCR1L; /**< RNG Statistical Check Run Length 1 Limit Register, offset: 0x24 */
  12703. };
  12704. union { /* offset: 0x28 */
  12705. __I uint32_t SCR2C; /**< RNG Statistical Check Run Length 2 Count Register, offset: 0x28 */
  12706. __IO uint32_t SCR2L; /**< RNG Statistical Check Run Length 2 Limit Register, offset: 0x28 */
  12707. };
  12708. union { /* offset: 0x2C */
  12709. __I uint32_t SCR3C; /**< RNG Statistical Check Run Length 3 Count Register, offset: 0x2C */
  12710. __IO uint32_t SCR3L; /**< RNG Statistical Check Run Length 3 Limit Register, offset: 0x2C */
  12711. };
  12712. union { /* offset: 0x30 */
  12713. __I uint32_t SCR4C; /**< RNG Statistical Check Run Length 4 Count Register, offset: 0x30 */
  12714. __IO uint32_t SCR4L; /**< RNG Statistical Check Run Length 4 Limit Register, offset: 0x30 */
  12715. };
  12716. union { /* offset: 0x34 */
  12717. __I uint32_t SCR5C; /**< RNG Statistical Check Run Length 5 Count Register, offset: 0x34 */
  12718. __IO uint32_t SCR5L; /**< RNG Statistical Check Run Length 5 Limit Register, offset: 0x34 */
  12719. };
  12720. union { /* offset: 0x38 */
  12721. __I uint32_t SCR6PC; /**< RNG Statistical Check Run Length 6+ Count Register, offset: 0x38 */
  12722. __IO uint32_t SCR6PL; /**< RNG Statistical Check Run Length 6+ Limit Register, offset: 0x38 */
  12723. };
  12724. __I uint32_t STATUS; /**< RNG Status Register, offset: 0x3C */
  12725. __I uint32_t ENT[16]; /**< RNG TRNG Entropy Read Register, array offset: 0x40, array step: 0x4 */
  12726. __I uint32_t PKRCNT10; /**< RNG Statistical Check Poker Count 1 and 0 Register, offset: 0x80 */
  12727. __I uint32_t PKRCNT32; /**< RNG Statistical Check Poker Count 3 and 2 Register, offset: 0x84 */
  12728. __I uint32_t PKRCNT54; /**< RNG Statistical Check Poker Count 5 and 4 Register, offset: 0x88 */
  12729. __I uint32_t PKRCNT76; /**< RNG Statistical Check Poker Count 7 and 6 Register, offset: 0x8C */
  12730. __I uint32_t PKRCNT98; /**< RNG Statistical Check Poker Count 9 and 8 Register, offset: 0x90 */
  12731. __I uint32_t PKRCNTBA; /**< RNG Statistical Check Poker Count B and A Register, offset: 0x94 */
  12732. __I uint32_t PKRCNTDC; /**< RNG Statistical Check Poker Count D and C Register, offset: 0x98 */
  12733. __I uint32_t PKRCNTFE; /**< RNG Statistical Check Poker Count F and E Register, offset: 0x9C */
  12734. uint8_t RESERVED_0[16];
  12735. __IO uint32_t SEC_CFG; /**< RNG Security Configuration Register, offset: 0xB0 */
  12736. __IO uint32_t INT_CTRL; /**< RNG Interrupt Control Register, offset: 0xB4 */
  12737. __IO uint32_t INT_MASK; /**< RNG Mask Register, offset: 0xB8 */
  12738. __IO uint32_t INT_STATUS; /**< RNG Interrupt Status Register, offset: 0xBC */
  12739. uint8_t RESERVED_1[48];
  12740. __I uint32_t VID1; /**< RNG Version ID Register (MS), offset: 0xF0 */
  12741. __I uint32_t VID2; /**< RNG Version ID Register (LS), offset: 0xF4 */
  12742. } TRNG_Type;
  12743. /* ----------------------------------------------------------------------------
  12744. -- TRNG Register Masks
  12745. ---------------------------------------------------------------------------- */
  12746. /*!
  12747. * @addtogroup TRNG_Register_Masks TRNG Register Masks
  12748. * @{
  12749. */
  12750. /*! @name MCTL - RNG Miscellaneous Control Register */
  12751. #define TRNG_MCTL_SAMP_MODE_MASK (0x3U)
  12752. #define TRNG_MCTL_SAMP_MODE_SHIFT (0U)
  12753. #define TRNG_MCTL_SAMP_MODE(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_SAMP_MODE_SHIFT)) & TRNG_MCTL_SAMP_MODE_MASK)
  12754. #define TRNG_MCTL_OSC_DIV_MASK (0xCU)
  12755. #define TRNG_MCTL_OSC_DIV_SHIFT (2U)
  12756. #define TRNG_MCTL_OSC_DIV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_OSC_DIV_SHIFT)) & TRNG_MCTL_OSC_DIV_MASK)
  12757. #define TRNG_MCTL_UNUSED_MASK (0x10U)
  12758. #define TRNG_MCTL_UNUSED_SHIFT (4U)
  12759. #define TRNG_MCTL_UNUSED(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_UNUSED_SHIFT)) & TRNG_MCTL_UNUSED_MASK)
  12760. #define TRNG_MCTL_TRNG_ACC_MASK (0x20U)
  12761. #define TRNG_MCTL_TRNG_ACC_SHIFT (5U)
  12762. #define TRNG_MCTL_TRNG_ACC(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TRNG_ACC_SHIFT)) & TRNG_MCTL_TRNG_ACC_MASK)
  12763. #define TRNG_MCTL_RST_DEF_MASK (0x40U)
  12764. #define TRNG_MCTL_RST_DEF_SHIFT (6U)
  12765. #define TRNG_MCTL_RST_DEF(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_RST_DEF_SHIFT)) & TRNG_MCTL_RST_DEF_MASK)
  12766. #define TRNG_MCTL_FOR_SCLK_MASK (0x80U)
  12767. #define TRNG_MCTL_FOR_SCLK_SHIFT (7U)
  12768. #define TRNG_MCTL_FOR_SCLK(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FOR_SCLK_SHIFT)) & TRNG_MCTL_FOR_SCLK_MASK)
  12769. #define TRNG_MCTL_FCT_FAIL_MASK (0x100U)
  12770. #define TRNG_MCTL_FCT_FAIL_SHIFT (8U)
  12771. #define TRNG_MCTL_FCT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FCT_FAIL_SHIFT)) & TRNG_MCTL_FCT_FAIL_MASK)
  12772. #define TRNG_MCTL_FCT_VAL_MASK (0x200U)
  12773. #define TRNG_MCTL_FCT_VAL_SHIFT (9U)
  12774. #define TRNG_MCTL_FCT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_FCT_VAL_SHIFT)) & TRNG_MCTL_FCT_VAL_MASK)
  12775. #define TRNG_MCTL_ENT_VAL_MASK (0x400U)
  12776. #define TRNG_MCTL_ENT_VAL_SHIFT (10U)
  12777. #define TRNG_MCTL_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_ENT_VAL_SHIFT)) & TRNG_MCTL_ENT_VAL_MASK)
  12778. #define TRNG_MCTL_TST_OUT_MASK (0x800U)
  12779. #define TRNG_MCTL_TST_OUT_SHIFT (11U)
  12780. #define TRNG_MCTL_TST_OUT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TST_OUT_SHIFT)) & TRNG_MCTL_TST_OUT_MASK)
  12781. #define TRNG_MCTL_ERR_MASK (0x1000U)
  12782. #define TRNG_MCTL_ERR_SHIFT (12U)
  12783. #define TRNG_MCTL_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_ERR_SHIFT)) & TRNG_MCTL_ERR_MASK)
  12784. #define TRNG_MCTL_TSTOP_OK_MASK (0x2000U)
  12785. #define TRNG_MCTL_TSTOP_OK_SHIFT (13U)
  12786. #define TRNG_MCTL_TSTOP_OK(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_TSTOP_OK_SHIFT)) & TRNG_MCTL_TSTOP_OK_MASK)
  12787. #define TRNG_MCTL_PRGM_MASK (0x10000U)
  12788. #define TRNG_MCTL_PRGM_SHIFT (16U)
  12789. #define TRNG_MCTL_PRGM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_MCTL_PRGM_SHIFT)) & TRNG_MCTL_PRGM_MASK)
  12790. /*! @name SCMISC - RNG Statistical Check Miscellaneous Register */
  12791. #define TRNG_SCMISC_LRUN_MAX_MASK (0xFFU)
  12792. #define TRNG_SCMISC_LRUN_MAX_SHIFT (0U)
  12793. #define TRNG_SCMISC_LRUN_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCMISC_LRUN_MAX_SHIFT)) & TRNG_SCMISC_LRUN_MAX_MASK)
  12794. #define TRNG_SCMISC_RTY_CT_MASK (0xF0000U)
  12795. #define TRNG_SCMISC_RTY_CT_SHIFT (16U)
  12796. #define TRNG_SCMISC_RTY_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCMISC_RTY_CT_SHIFT)) & TRNG_SCMISC_RTY_CT_MASK)
  12797. /*! @name PKRRNG - RNG Poker Range Register */
  12798. #define TRNG_PKRRNG_PKR_RNG_MASK (0xFFFFU)
  12799. #define TRNG_PKRRNG_PKR_RNG_SHIFT (0U)
  12800. #define TRNG_PKRRNG_PKR_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRRNG_PKR_RNG_SHIFT)) & TRNG_PKRRNG_PKR_RNG_MASK)
  12801. /*! @name PKRMAX - RNG Poker Maximum Limit Register */
  12802. #define TRNG_PKRMAX_PKR_MAX_MASK (0xFFFFFFU)
  12803. #define TRNG_PKRMAX_PKR_MAX_SHIFT (0U)
  12804. #define TRNG_PKRMAX_PKR_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRMAX_PKR_MAX_SHIFT)) & TRNG_PKRMAX_PKR_MAX_MASK)
  12805. /*! @name PKRSQ - RNG Poker Square Calculation Result Register */
  12806. #define TRNG_PKRSQ_PKR_SQ_MASK (0xFFFFFFU)
  12807. #define TRNG_PKRSQ_PKR_SQ_SHIFT (0U)
  12808. #define TRNG_PKRSQ_PKR_SQ(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRSQ_PKR_SQ_SHIFT)) & TRNG_PKRSQ_PKR_SQ_MASK)
  12809. /*! @name SDCTL - RNG Seed Control Register */
  12810. #define TRNG_SDCTL_SAMP_SIZE_MASK (0xFFFFU)
  12811. #define TRNG_SDCTL_SAMP_SIZE_SHIFT (0U)
  12812. #define TRNG_SDCTL_SAMP_SIZE(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SDCTL_SAMP_SIZE_SHIFT)) & TRNG_SDCTL_SAMP_SIZE_MASK)
  12813. #define TRNG_SDCTL_ENT_DLY_MASK (0xFFFF0000U)
  12814. #define TRNG_SDCTL_ENT_DLY_SHIFT (16U)
  12815. #define TRNG_SDCTL_ENT_DLY(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SDCTL_ENT_DLY_SHIFT)) & TRNG_SDCTL_ENT_DLY_MASK)
  12816. /*! @name SBLIM - RNG Sparse Bit Limit Register */
  12817. #define TRNG_SBLIM_SB_LIM_MASK (0x3FFU)
  12818. #define TRNG_SBLIM_SB_LIM_SHIFT (0U)
  12819. #define TRNG_SBLIM_SB_LIM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SBLIM_SB_LIM_SHIFT)) & TRNG_SBLIM_SB_LIM_MASK)
  12820. /*! @name TOTSAM - RNG Total Samples Register */
  12821. #define TRNG_TOTSAM_TOT_SAM_MASK (0xFFFFFU)
  12822. #define TRNG_TOTSAM_TOT_SAM_SHIFT (0U)
  12823. #define TRNG_TOTSAM_TOT_SAM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_TOTSAM_TOT_SAM_SHIFT)) & TRNG_TOTSAM_TOT_SAM_MASK)
  12824. /*! @name FRQMIN - RNG Frequency Count Minimum Limit Register */
  12825. #define TRNG_FRQMIN_FRQ_MIN_MASK (0x3FFFFFU)
  12826. #define TRNG_FRQMIN_FRQ_MIN_SHIFT (0U)
  12827. #define TRNG_FRQMIN_FRQ_MIN(x) (((uint32_t)(((uint32_t)(x)) << TRNG_FRQMIN_FRQ_MIN_SHIFT)) & TRNG_FRQMIN_FRQ_MIN_MASK)
  12828. /*! @name FRQCNT - RNG Frequency Count Register */
  12829. #define TRNG_FRQCNT_FRQ_CT_MASK (0x3FFFFFU)
  12830. #define TRNG_FRQCNT_FRQ_CT_SHIFT (0U)
  12831. #define TRNG_FRQCNT_FRQ_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_FRQCNT_FRQ_CT_SHIFT)) & TRNG_FRQCNT_FRQ_CT_MASK)
  12832. /*! @name FRQMAX - RNG Frequency Count Maximum Limit Register */
  12833. #define TRNG_FRQMAX_FRQ_MAX_MASK (0x3FFFFFU)
  12834. #define TRNG_FRQMAX_FRQ_MAX_SHIFT (0U)
  12835. #define TRNG_FRQMAX_FRQ_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_FRQMAX_FRQ_MAX_SHIFT)) & TRNG_FRQMAX_FRQ_MAX_MASK)
  12836. /*! @name SCMC - RNG Statistical Check Monobit Count Register */
  12837. #define TRNG_SCMC_MONO_CT_MASK (0xFFFFU)
  12838. #define TRNG_SCMC_MONO_CT_SHIFT (0U)
  12839. #define TRNG_SCMC_MONO_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCMC_MONO_CT_SHIFT)) & TRNG_SCMC_MONO_CT_MASK)
  12840. /*! @name SCML - RNG Statistical Check Monobit Limit Register */
  12841. #define TRNG_SCML_MONO_MAX_MASK (0xFFFFU)
  12842. #define TRNG_SCML_MONO_MAX_SHIFT (0U)
  12843. #define TRNG_SCML_MONO_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCML_MONO_MAX_SHIFT)) & TRNG_SCML_MONO_MAX_MASK)
  12844. #define TRNG_SCML_MONO_RNG_MASK (0xFFFF0000U)
  12845. #define TRNG_SCML_MONO_RNG_SHIFT (16U)
  12846. #define TRNG_SCML_MONO_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCML_MONO_RNG_SHIFT)) & TRNG_SCML_MONO_RNG_MASK)
  12847. /*! @name SCR1C - RNG Statistical Check Run Length 1 Count Register */
  12848. #define TRNG_SCR1C_R1_0_CT_MASK (0x7FFFU)
  12849. #define TRNG_SCR1C_R1_0_CT_SHIFT (0U)
  12850. #define TRNG_SCR1C_R1_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1C_R1_0_CT_SHIFT)) & TRNG_SCR1C_R1_0_CT_MASK)
  12851. #define TRNG_SCR1C_R1_1_CT_MASK (0x7FFF0000U)
  12852. #define TRNG_SCR1C_R1_1_CT_SHIFT (16U)
  12853. #define TRNG_SCR1C_R1_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1C_R1_1_CT_SHIFT)) & TRNG_SCR1C_R1_1_CT_MASK)
  12854. /*! @name SCR1L - RNG Statistical Check Run Length 1 Limit Register */
  12855. #define TRNG_SCR1L_RUN1_MAX_MASK (0x7FFFU)
  12856. #define TRNG_SCR1L_RUN1_MAX_SHIFT (0U)
  12857. #define TRNG_SCR1L_RUN1_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1L_RUN1_MAX_SHIFT)) & TRNG_SCR1L_RUN1_MAX_MASK)
  12858. #define TRNG_SCR1L_RUN1_RNG_MASK (0x7FFF0000U)
  12859. #define TRNG_SCR1L_RUN1_RNG_SHIFT (16U)
  12860. #define TRNG_SCR1L_RUN1_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR1L_RUN1_RNG_SHIFT)) & TRNG_SCR1L_RUN1_RNG_MASK)
  12861. /*! @name SCR2C - RNG Statistical Check Run Length 2 Count Register */
  12862. #define TRNG_SCR2C_R2_0_CT_MASK (0x3FFFU)
  12863. #define TRNG_SCR2C_R2_0_CT_SHIFT (0U)
  12864. #define TRNG_SCR2C_R2_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2C_R2_0_CT_SHIFT)) & TRNG_SCR2C_R2_0_CT_MASK)
  12865. #define TRNG_SCR2C_R2_1_CT_MASK (0x3FFF0000U)
  12866. #define TRNG_SCR2C_R2_1_CT_SHIFT (16U)
  12867. #define TRNG_SCR2C_R2_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2C_R2_1_CT_SHIFT)) & TRNG_SCR2C_R2_1_CT_MASK)
  12868. /*! @name SCR2L - RNG Statistical Check Run Length 2 Limit Register */
  12869. #define TRNG_SCR2L_RUN2_MAX_MASK (0x3FFFU)
  12870. #define TRNG_SCR2L_RUN2_MAX_SHIFT (0U)
  12871. #define TRNG_SCR2L_RUN2_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2L_RUN2_MAX_SHIFT)) & TRNG_SCR2L_RUN2_MAX_MASK)
  12872. #define TRNG_SCR2L_RUN2_RNG_MASK (0x3FFF0000U)
  12873. #define TRNG_SCR2L_RUN2_RNG_SHIFT (16U)
  12874. #define TRNG_SCR2L_RUN2_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR2L_RUN2_RNG_SHIFT)) & TRNG_SCR2L_RUN2_RNG_MASK)
  12875. /*! @name SCR3C - RNG Statistical Check Run Length 3 Count Register */
  12876. #define TRNG_SCR3C_R3_0_CT_MASK (0x1FFFU)
  12877. #define TRNG_SCR3C_R3_0_CT_SHIFT (0U)
  12878. #define TRNG_SCR3C_R3_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3C_R3_0_CT_SHIFT)) & TRNG_SCR3C_R3_0_CT_MASK)
  12879. #define TRNG_SCR3C_R3_1_CT_MASK (0x1FFF0000U)
  12880. #define TRNG_SCR3C_R3_1_CT_SHIFT (16U)
  12881. #define TRNG_SCR3C_R3_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3C_R3_1_CT_SHIFT)) & TRNG_SCR3C_R3_1_CT_MASK)
  12882. /*! @name SCR3L - RNG Statistical Check Run Length 3 Limit Register */
  12883. #define TRNG_SCR3L_RUN3_MAX_MASK (0x1FFFU)
  12884. #define TRNG_SCR3L_RUN3_MAX_SHIFT (0U)
  12885. #define TRNG_SCR3L_RUN3_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3L_RUN3_MAX_SHIFT)) & TRNG_SCR3L_RUN3_MAX_MASK)
  12886. #define TRNG_SCR3L_RUN3_RNG_MASK (0x1FFF0000U)
  12887. #define TRNG_SCR3L_RUN3_RNG_SHIFT (16U)
  12888. #define TRNG_SCR3L_RUN3_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR3L_RUN3_RNG_SHIFT)) & TRNG_SCR3L_RUN3_RNG_MASK)
  12889. /*! @name SCR4C - RNG Statistical Check Run Length 4 Count Register */
  12890. #define TRNG_SCR4C_R4_0_CT_MASK (0xFFFU)
  12891. #define TRNG_SCR4C_R4_0_CT_SHIFT (0U)
  12892. #define TRNG_SCR4C_R4_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4C_R4_0_CT_SHIFT)) & TRNG_SCR4C_R4_0_CT_MASK)
  12893. #define TRNG_SCR4C_R4_1_CT_MASK (0xFFF0000U)
  12894. #define TRNG_SCR4C_R4_1_CT_SHIFT (16U)
  12895. #define TRNG_SCR4C_R4_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4C_R4_1_CT_SHIFT)) & TRNG_SCR4C_R4_1_CT_MASK)
  12896. /*! @name SCR4L - RNG Statistical Check Run Length 4 Limit Register */
  12897. #define TRNG_SCR4L_RUN4_MAX_MASK (0xFFFU)
  12898. #define TRNG_SCR4L_RUN4_MAX_SHIFT (0U)
  12899. #define TRNG_SCR4L_RUN4_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4L_RUN4_MAX_SHIFT)) & TRNG_SCR4L_RUN4_MAX_MASK)
  12900. #define TRNG_SCR4L_RUN4_RNG_MASK (0xFFF0000U)
  12901. #define TRNG_SCR4L_RUN4_RNG_SHIFT (16U)
  12902. #define TRNG_SCR4L_RUN4_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR4L_RUN4_RNG_SHIFT)) & TRNG_SCR4L_RUN4_RNG_MASK)
  12903. /*! @name SCR5C - RNG Statistical Check Run Length 5 Count Register */
  12904. #define TRNG_SCR5C_R5_0_CT_MASK (0x7FFU)
  12905. #define TRNG_SCR5C_R5_0_CT_SHIFT (0U)
  12906. #define TRNG_SCR5C_R5_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5C_R5_0_CT_SHIFT)) & TRNG_SCR5C_R5_0_CT_MASK)
  12907. #define TRNG_SCR5C_R5_1_CT_MASK (0x7FF0000U)
  12908. #define TRNG_SCR5C_R5_1_CT_SHIFT (16U)
  12909. #define TRNG_SCR5C_R5_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5C_R5_1_CT_SHIFT)) & TRNG_SCR5C_R5_1_CT_MASK)
  12910. /*! @name SCR5L - RNG Statistical Check Run Length 5 Limit Register */
  12911. #define TRNG_SCR5L_RUN5_MAX_MASK (0x7FFU)
  12912. #define TRNG_SCR5L_RUN5_MAX_SHIFT (0U)
  12913. #define TRNG_SCR5L_RUN5_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5L_RUN5_MAX_SHIFT)) & TRNG_SCR5L_RUN5_MAX_MASK)
  12914. #define TRNG_SCR5L_RUN5_RNG_MASK (0x7FF0000U)
  12915. #define TRNG_SCR5L_RUN5_RNG_SHIFT (16U)
  12916. #define TRNG_SCR5L_RUN5_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR5L_RUN5_RNG_SHIFT)) & TRNG_SCR5L_RUN5_RNG_MASK)
  12917. /*! @name SCR6PC - RNG Statistical Check Run Length 6+ Count Register */
  12918. #define TRNG_SCR6PC_R6P_0_CT_MASK (0x7FFU)
  12919. #define TRNG_SCR6PC_R6P_0_CT_SHIFT (0U)
  12920. #define TRNG_SCR6PC_R6P_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PC_R6P_0_CT_SHIFT)) & TRNG_SCR6PC_R6P_0_CT_MASK)
  12921. #define TRNG_SCR6PC_R6P_1_CT_MASK (0x7FF0000U)
  12922. #define TRNG_SCR6PC_R6P_1_CT_SHIFT (16U)
  12923. #define TRNG_SCR6PC_R6P_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PC_R6P_1_CT_SHIFT)) & TRNG_SCR6PC_R6P_1_CT_MASK)
  12924. /*! @name SCR6PL - RNG Statistical Check Run Length 6+ Limit Register */
  12925. #define TRNG_SCR6PL_RUN6P_MAX_MASK (0x7FFU)
  12926. #define TRNG_SCR6PL_RUN6P_MAX_SHIFT (0U)
  12927. #define TRNG_SCR6PL_RUN6P_MAX(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PL_RUN6P_MAX_SHIFT)) & TRNG_SCR6PL_RUN6P_MAX_MASK)
  12928. #define TRNG_SCR6PL_RUN6P_RNG_MASK (0x7FF0000U)
  12929. #define TRNG_SCR6PL_RUN6P_RNG_SHIFT (16U)
  12930. #define TRNG_SCR6PL_RUN6P_RNG(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SCR6PL_RUN6P_RNG_SHIFT)) & TRNG_SCR6PL_RUN6P_RNG_MASK)
  12931. /*! @name STATUS - RNG Status Register */
  12932. #define TRNG_STATUS_TF1BR0_MASK (0x1U)
  12933. #define TRNG_STATUS_TF1BR0_SHIFT (0U)
  12934. #define TRNG_STATUS_TF1BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF1BR0_SHIFT)) & TRNG_STATUS_TF1BR0_MASK)
  12935. #define TRNG_STATUS_TF1BR1_MASK (0x2U)
  12936. #define TRNG_STATUS_TF1BR1_SHIFT (1U)
  12937. #define TRNG_STATUS_TF1BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF1BR1_SHIFT)) & TRNG_STATUS_TF1BR1_MASK)
  12938. #define TRNG_STATUS_TF2BR0_MASK (0x4U)
  12939. #define TRNG_STATUS_TF2BR0_SHIFT (2U)
  12940. #define TRNG_STATUS_TF2BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF2BR0_SHIFT)) & TRNG_STATUS_TF2BR0_MASK)
  12941. #define TRNG_STATUS_TF2BR1_MASK (0x8U)
  12942. #define TRNG_STATUS_TF2BR1_SHIFT (3U)
  12943. #define TRNG_STATUS_TF2BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF2BR1_SHIFT)) & TRNG_STATUS_TF2BR1_MASK)
  12944. #define TRNG_STATUS_TF3BR0_MASK (0x10U)
  12945. #define TRNG_STATUS_TF3BR0_SHIFT (4U)
  12946. #define TRNG_STATUS_TF3BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF3BR0_SHIFT)) & TRNG_STATUS_TF3BR0_MASK)
  12947. #define TRNG_STATUS_TF3BR1_MASK (0x20U)
  12948. #define TRNG_STATUS_TF3BR1_SHIFT (5U)
  12949. #define TRNG_STATUS_TF3BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF3BR1_SHIFT)) & TRNG_STATUS_TF3BR1_MASK)
  12950. #define TRNG_STATUS_TF4BR0_MASK (0x40U)
  12951. #define TRNG_STATUS_TF4BR0_SHIFT (6U)
  12952. #define TRNG_STATUS_TF4BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF4BR0_SHIFT)) & TRNG_STATUS_TF4BR0_MASK)
  12953. #define TRNG_STATUS_TF4BR1_MASK (0x80U)
  12954. #define TRNG_STATUS_TF4BR1_SHIFT (7U)
  12955. #define TRNG_STATUS_TF4BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF4BR1_SHIFT)) & TRNG_STATUS_TF4BR1_MASK)
  12956. #define TRNG_STATUS_TF5BR0_MASK (0x100U)
  12957. #define TRNG_STATUS_TF5BR0_SHIFT (8U)
  12958. #define TRNG_STATUS_TF5BR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF5BR0_SHIFT)) & TRNG_STATUS_TF5BR0_MASK)
  12959. #define TRNG_STATUS_TF5BR1_MASK (0x200U)
  12960. #define TRNG_STATUS_TF5BR1_SHIFT (9U)
  12961. #define TRNG_STATUS_TF5BR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF5BR1_SHIFT)) & TRNG_STATUS_TF5BR1_MASK)
  12962. #define TRNG_STATUS_TF6PBR0_MASK (0x400U)
  12963. #define TRNG_STATUS_TF6PBR0_SHIFT (10U)
  12964. #define TRNG_STATUS_TF6PBR0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF6PBR0_SHIFT)) & TRNG_STATUS_TF6PBR0_MASK)
  12965. #define TRNG_STATUS_TF6PBR1_MASK (0x800U)
  12966. #define TRNG_STATUS_TF6PBR1_SHIFT (11U)
  12967. #define TRNG_STATUS_TF6PBR1(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TF6PBR1_SHIFT)) & TRNG_STATUS_TF6PBR1_MASK)
  12968. #define TRNG_STATUS_TFSB_MASK (0x1000U)
  12969. #define TRNG_STATUS_TFSB_SHIFT (12U)
  12970. #define TRNG_STATUS_TFSB(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFSB_SHIFT)) & TRNG_STATUS_TFSB_MASK)
  12971. #define TRNG_STATUS_TFLR_MASK (0x2000U)
  12972. #define TRNG_STATUS_TFLR_SHIFT (13U)
  12973. #define TRNG_STATUS_TFLR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFLR_SHIFT)) & TRNG_STATUS_TFLR_MASK)
  12974. #define TRNG_STATUS_TFP_MASK (0x4000U)
  12975. #define TRNG_STATUS_TFP_SHIFT (14U)
  12976. #define TRNG_STATUS_TFP(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFP_SHIFT)) & TRNG_STATUS_TFP_MASK)
  12977. #define TRNG_STATUS_TFMB_MASK (0x8000U)
  12978. #define TRNG_STATUS_TFMB_SHIFT (15U)
  12979. #define TRNG_STATUS_TFMB(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_TFMB_SHIFT)) & TRNG_STATUS_TFMB_MASK)
  12980. #define TRNG_STATUS_RETRY_CT_MASK (0xF0000U)
  12981. #define TRNG_STATUS_RETRY_CT_SHIFT (16U)
  12982. #define TRNG_STATUS_RETRY_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_STATUS_RETRY_CT_SHIFT)) & TRNG_STATUS_RETRY_CT_MASK)
  12983. /*! @name ENT - RNG TRNG Entropy Read Register */
  12984. #define TRNG_ENT_ENT_MASK (0xFFFFFFFFU)
  12985. #define TRNG_ENT_ENT_SHIFT (0U)
  12986. #define TRNG_ENT_ENT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_ENT_ENT_SHIFT)) & TRNG_ENT_ENT_MASK)
  12987. /* The count of TRNG_ENT */
  12988. #define TRNG_ENT_COUNT (16U)
  12989. /*! @name PKRCNT10 - RNG Statistical Check Poker Count 1 and 0 Register */
  12990. #define TRNG_PKRCNT10_PKR_0_CT_MASK (0xFFFFU)
  12991. #define TRNG_PKRCNT10_PKR_0_CT_SHIFT (0U)
  12992. #define TRNG_PKRCNT10_PKR_0_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT10_PKR_0_CT_SHIFT)) & TRNG_PKRCNT10_PKR_0_CT_MASK)
  12993. #define TRNG_PKRCNT10_PKR_1_CT_MASK (0xFFFF0000U)
  12994. #define TRNG_PKRCNT10_PKR_1_CT_SHIFT (16U)
  12995. #define TRNG_PKRCNT10_PKR_1_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT10_PKR_1_CT_SHIFT)) & TRNG_PKRCNT10_PKR_1_CT_MASK)
  12996. /*! @name PKRCNT32 - RNG Statistical Check Poker Count 3 and 2 Register */
  12997. #define TRNG_PKRCNT32_PKR_2_CT_MASK (0xFFFFU)
  12998. #define TRNG_PKRCNT32_PKR_2_CT_SHIFT (0U)
  12999. #define TRNG_PKRCNT32_PKR_2_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT32_PKR_2_CT_SHIFT)) & TRNG_PKRCNT32_PKR_2_CT_MASK)
  13000. #define TRNG_PKRCNT32_PKR_3_CT_MASK (0xFFFF0000U)
  13001. #define TRNG_PKRCNT32_PKR_3_CT_SHIFT (16U)
  13002. #define TRNG_PKRCNT32_PKR_3_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT32_PKR_3_CT_SHIFT)) & TRNG_PKRCNT32_PKR_3_CT_MASK)
  13003. /*! @name PKRCNT54 - RNG Statistical Check Poker Count 5 and 4 Register */
  13004. #define TRNG_PKRCNT54_PKR_4_CT_MASK (0xFFFFU)
  13005. #define TRNG_PKRCNT54_PKR_4_CT_SHIFT (0U)
  13006. #define TRNG_PKRCNT54_PKR_4_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT54_PKR_4_CT_SHIFT)) & TRNG_PKRCNT54_PKR_4_CT_MASK)
  13007. #define TRNG_PKRCNT54_PKR_5_CT_MASK (0xFFFF0000U)
  13008. #define TRNG_PKRCNT54_PKR_5_CT_SHIFT (16U)
  13009. #define TRNG_PKRCNT54_PKR_5_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT54_PKR_5_CT_SHIFT)) & TRNG_PKRCNT54_PKR_5_CT_MASK)
  13010. /*! @name PKRCNT76 - RNG Statistical Check Poker Count 7 and 6 Register */
  13011. #define TRNG_PKRCNT76_PKR_6_CT_MASK (0xFFFFU)
  13012. #define TRNG_PKRCNT76_PKR_6_CT_SHIFT (0U)
  13013. #define TRNG_PKRCNT76_PKR_6_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT76_PKR_6_CT_SHIFT)) & TRNG_PKRCNT76_PKR_6_CT_MASK)
  13014. #define TRNG_PKRCNT76_PKR_7_CT_MASK (0xFFFF0000U)
  13015. #define TRNG_PKRCNT76_PKR_7_CT_SHIFT (16U)
  13016. #define TRNG_PKRCNT76_PKR_7_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT76_PKR_7_CT_SHIFT)) & TRNG_PKRCNT76_PKR_7_CT_MASK)
  13017. /*! @name PKRCNT98 - RNG Statistical Check Poker Count 9 and 8 Register */
  13018. #define TRNG_PKRCNT98_PKR_8_CT_MASK (0xFFFFU)
  13019. #define TRNG_PKRCNT98_PKR_8_CT_SHIFT (0U)
  13020. #define TRNG_PKRCNT98_PKR_8_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT98_PKR_8_CT_SHIFT)) & TRNG_PKRCNT98_PKR_8_CT_MASK)
  13021. #define TRNG_PKRCNT98_PKR_9_CT_MASK (0xFFFF0000U)
  13022. #define TRNG_PKRCNT98_PKR_9_CT_SHIFT (16U)
  13023. #define TRNG_PKRCNT98_PKR_9_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNT98_PKR_9_CT_SHIFT)) & TRNG_PKRCNT98_PKR_9_CT_MASK)
  13024. /*! @name PKRCNTBA - RNG Statistical Check Poker Count B and A Register */
  13025. #define TRNG_PKRCNTBA_PKR_A_CT_MASK (0xFFFFU)
  13026. #define TRNG_PKRCNTBA_PKR_A_CT_SHIFT (0U)
  13027. #define TRNG_PKRCNTBA_PKR_A_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTBA_PKR_A_CT_SHIFT)) & TRNG_PKRCNTBA_PKR_A_CT_MASK)
  13028. #define TRNG_PKRCNTBA_PKR_B_CT_MASK (0xFFFF0000U)
  13029. #define TRNG_PKRCNTBA_PKR_B_CT_SHIFT (16U)
  13030. #define TRNG_PKRCNTBA_PKR_B_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTBA_PKR_B_CT_SHIFT)) & TRNG_PKRCNTBA_PKR_B_CT_MASK)
  13031. /*! @name PKRCNTDC - RNG Statistical Check Poker Count D and C Register */
  13032. #define TRNG_PKRCNTDC_PKR_C_CT_MASK (0xFFFFU)
  13033. #define TRNG_PKRCNTDC_PKR_C_CT_SHIFT (0U)
  13034. #define TRNG_PKRCNTDC_PKR_C_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTDC_PKR_C_CT_SHIFT)) & TRNG_PKRCNTDC_PKR_C_CT_MASK)
  13035. #define TRNG_PKRCNTDC_PKR_D_CT_MASK (0xFFFF0000U)
  13036. #define TRNG_PKRCNTDC_PKR_D_CT_SHIFT (16U)
  13037. #define TRNG_PKRCNTDC_PKR_D_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTDC_PKR_D_CT_SHIFT)) & TRNG_PKRCNTDC_PKR_D_CT_MASK)
  13038. /*! @name PKRCNTFE - RNG Statistical Check Poker Count F and E Register */
  13039. #define TRNG_PKRCNTFE_PKR_E_CT_MASK (0xFFFFU)
  13040. #define TRNG_PKRCNTFE_PKR_E_CT_SHIFT (0U)
  13041. #define TRNG_PKRCNTFE_PKR_E_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTFE_PKR_E_CT_SHIFT)) & TRNG_PKRCNTFE_PKR_E_CT_MASK)
  13042. #define TRNG_PKRCNTFE_PKR_F_CT_MASK (0xFFFF0000U)
  13043. #define TRNG_PKRCNTFE_PKR_F_CT_SHIFT (16U)
  13044. #define TRNG_PKRCNTFE_PKR_F_CT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_PKRCNTFE_PKR_F_CT_SHIFT)) & TRNG_PKRCNTFE_PKR_F_CT_MASK)
  13045. /*! @name SEC_CFG - RNG Security Configuration Register */
  13046. #define TRNG_SEC_CFG_SH0_MASK (0x1U)
  13047. #define TRNG_SEC_CFG_SH0_SHIFT (0U)
  13048. #define TRNG_SEC_CFG_SH0(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_SH0_SHIFT)) & TRNG_SEC_CFG_SH0_MASK)
  13049. #define TRNG_SEC_CFG_NO_PRGM_MASK (0x2U)
  13050. #define TRNG_SEC_CFG_NO_PRGM_SHIFT (1U)
  13051. #define TRNG_SEC_CFG_NO_PRGM(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_NO_PRGM_SHIFT)) & TRNG_SEC_CFG_NO_PRGM_MASK)
  13052. #define TRNG_SEC_CFG_SK_VAL_MASK (0x4U)
  13053. #define TRNG_SEC_CFG_SK_VAL_SHIFT (2U)
  13054. #define TRNG_SEC_CFG_SK_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_SEC_CFG_SK_VAL_SHIFT)) & TRNG_SEC_CFG_SK_VAL_MASK)
  13055. /*! @name INT_CTRL - RNG Interrupt Control Register */
  13056. #define TRNG_INT_CTRL_HW_ERR_MASK (0x1U)
  13057. #define TRNG_INT_CTRL_HW_ERR_SHIFT (0U)
  13058. #define TRNG_INT_CTRL_HW_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_HW_ERR_SHIFT)) & TRNG_INT_CTRL_HW_ERR_MASK)
  13059. #define TRNG_INT_CTRL_ENT_VAL_MASK (0x2U)
  13060. #define TRNG_INT_CTRL_ENT_VAL_SHIFT (1U)
  13061. #define TRNG_INT_CTRL_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_ENT_VAL_SHIFT)) & TRNG_INT_CTRL_ENT_VAL_MASK)
  13062. #define TRNG_INT_CTRL_FRQ_CT_FAIL_MASK (0x4U)
  13063. #define TRNG_INT_CTRL_FRQ_CT_FAIL_SHIFT (2U)
  13064. #define TRNG_INT_CTRL_FRQ_CT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_CTRL_FRQ_CT_FAIL_MASK)
  13065. #define TRNG_INT_CTRL_UNUSED_MASK (0xFFFFFFF8U)
  13066. #define TRNG_INT_CTRL_UNUSED_SHIFT (3U)
  13067. #define TRNG_INT_CTRL_UNUSED(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_CTRL_UNUSED_SHIFT)) & TRNG_INT_CTRL_UNUSED_MASK)
  13068. /*! @name INT_MASK - RNG Mask Register */
  13069. #define TRNG_INT_MASK_HW_ERR_MASK (0x1U)
  13070. #define TRNG_INT_MASK_HW_ERR_SHIFT (0U)
  13071. #define TRNG_INT_MASK_HW_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_HW_ERR_SHIFT)) & TRNG_INT_MASK_HW_ERR_MASK)
  13072. #define TRNG_INT_MASK_ENT_VAL_MASK (0x2U)
  13073. #define TRNG_INT_MASK_ENT_VAL_SHIFT (1U)
  13074. #define TRNG_INT_MASK_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_ENT_VAL_SHIFT)) & TRNG_INT_MASK_ENT_VAL_MASK)
  13075. #define TRNG_INT_MASK_FRQ_CT_FAIL_MASK (0x4U)
  13076. #define TRNG_INT_MASK_FRQ_CT_FAIL_SHIFT (2U)
  13077. #define TRNG_INT_MASK_FRQ_CT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_MASK_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_MASK_FRQ_CT_FAIL_MASK)
  13078. /*! @name INT_STATUS - RNG Interrupt Status Register */
  13079. #define TRNG_INT_STATUS_HW_ERR_MASK (0x1U)
  13080. #define TRNG_INT_STATUS_HW_ERR_SHIFT (0U)
  13081. #define TRNG_INT_STATUS_HW_ERR(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_HW_ERR_SHIFT)) & TRNG_INT_STATUS_HW_ERR_MASK)
  13082. #define TRNG_INT_STATUS_ENT_VAL_MASK (0x2U)
  13083. #define TRNG_INT_STATUS_ENT_VAL_SHIFT (1U)
  13084. #define TRNG_INT_STATUS_ENT_VAL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_ENT_VAL_SHIFT)) & TRNG_INT_STATUS_ENT_VAL_MASK)
  13085. #define TRNG_INT_STATUS_FRQ_CT_FAIL_MASK (0x4U)
  13086. #define TRNG_INT_STATUS_FRQ_CT_FAIL_SHIFT (2U)
  13087. #define TRNG_INT_STATUS_FRQ_CT_FAIL(x) (((uint32_t)(((uint32_t)(x)) << TRNG_INT_STATUS_FRQ_CT_FAIL_SHIFT)) & TRNG_INT_STATUS_FRQ_CT_FAIL_MASK)
  13088. /*! @name VID1 - RNG Version ID Register (MS) */
  13089. #define TRNG_VID1_RNG_MIN_REV_MASK (0xFFU)
  13090. #define TRNG_VID1_RNG_MIN_REV_SHIFT (0U)
  13091. #define TRNG_VID1_RNG_MIN_REV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_RNG_MIN_REV_SHIFT)) & TRNG_VID1_RNG_MIN_REV_MASK)
  13092. #define TRNG_VID1_RNG_MAJ_REV_MASK (0xFF00U)
  13093. #define TRNG_VID1_RNG_MAJ_REV_SHIFT (8U)
  13094. #define TRNG_VID1_RNG_MAJ_REV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_RNG_MAJ_REV_SHIFT)) & TRNG_VID1_RNG_MAJ_REV_MASK)
  13095. #define TRNG_VID1_RNG_IP_ID_MASK (0xFFFF0000U)
  13096. #define TRNG_VID1_RNG_IP_ID_SHIFT (16U)
  13097. #define TRNG_VID1_RNG_IP_ID(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID1_RNG_IP_ID_SHIFT)) & TRNG_VID1_RNG_IP_ID_MASK)
  13098. /*! @name VID2 - RNG Version ID Register (LS) */
  13099. #define TRNG_VID2_RNG_CONFIG_OPT_MASK (0xFFU)
  13100. #define TRNG_VID2_RNG_CONFIG_OPT_SHIFT (0U)
  13101. #define TRNG_VID2_RNG_CONFIG_OPT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_RNG_CONFIG_OPT_SHIFT)) & TRNG_VID2_RNG_CONFIG_OPT_MASK)
  13102. #define TRNG_VID2_RNG_ECO_REV_MASK (0xFF00U)
  13103. #define TRNG_VID2_RNG_ECO_REV_SHIFT (8U)
  13104. #define TRNG_VID2_RNG_ECO_REV(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_RNG_ECO_REV_SHIFT)) & TRNG_VID2_RNG_ECO_REV_MASK)
  13105. #define TRNG_VID2_RNG_INTG_OPT_MASK (0xFF0000U)
  13106. #define TRNG_VID2_RNG_INTG_OPT_SHIFT (16U)
  13107. #define TRNG_VID2_RNG_INTG_OPT(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_RNG_INTG_OPT_SHIFT)) & TRNG_VID2_RNG_INTG_OPT_MASK)
  13108. #define TRNG_VID2_RNG_ERA_MASK (0xFF000000U)
  13109. #define TRNG_VID2_RNG_ERA_SHIFT (24U)
  13110. #define TRNG_VID2_RNG_ERA(x) (((uint32_t)(((uint32_t)(x)) << TRNG_VID2_RNG_ERA_SHIFT)) & TRNG_VID2_RNG_ERA_MASK)
  13111. /*!
  13112. * @}
  13113. */ /* end of group TRNG_Register_Masks */
  13114. /* TRNG - Peripheral instance base addresses */
  13115. /** Peripheral TRNG0 base address */
  13116. #define TRNG0_BASE (0x400A0000u)
  13117. /** Peripheral TRNG0 base pointer */
  13118. #define TRNG0 ((TRNG_Type *)TRNG0_BASE)
  13119. /** Array initializer of TRNG peripheral base addresses */
  13120. #define TRNG_BASE_ADDRS { TRNG0_BASE }
  13121. /** Array initializer of TRNG peripheral base pointers */
  13122. #define TRNG_BASE_PTRS { TRNG0 }
  13123. /** Interrupt vectors for the TRNG peripheral type */
  13124. #define TRNG_IRQS { TRNG0_IRQn }
  13125. /*!
  13126. * @}
  13127. */ /* end of group TRNG_Peripheral_Access_Layer */
  13128. /* ----------------------------------------------------------------------------
  13129. -- TSI Peripheral Access Layer
  13130. ---------------------------------------------------------------------------- */
  13131. /*!
  13132. * @addtogroup TSI_Peripheral_Access_Layer TSI Peripheral Access Layer
  13133. * @{
  13134. */
  13135. /** TSI - Register Layout Typedef */
  13136. typedef struct {
  13137. __IO uint32_t GENCS; /**< TSI General Control and Status Register, offset: 0x0 */
  13138. __IO uint32_t DATA; /**< TSI DATA Register, offset: 0x4 */
  13139. __IO uint32_t TSHD; /**< TSI Threshold Register, offset: 0x8 */
  13140. } TSI_Type;
  13141. /* ----------------------------------------------------------------------------
  13142. -- TSI Register Masks
  13143. ---------------------------------------------------------------------------- */
  13144. /*!
  13145. * @addtogroup TSI_Register_Masks TSI Register Masks
  13146. * @{
  13147. */
  13148. /*! @name GENCS - TSI General Control and Status Register */
  13149. #define TSI_GENCS_EOSDMEO_MASK (0x1U)
  13150. #define TSI_GENCS_EOSDMEO_SHIFT (0U)
  13151. #define TSI_GENCS_EOSDMEO(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_EOSDMEO_SHIFT)) & TSI_GENCS_EOSDMEO_MASK)
  13152. #define TSI_GENCS_CURSW_MASK (0x2U)
  13153. #define TSI_GENCS_CURSW_SHIFT (1U)
  13154. #define TSI_GENCS_CURSW(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_CURSW_SHIFT)) & TSI_GENCS_CURSW_MASK)
  13155. #define TSI_GENCS_EOSF_MASK (0x4U)
  13156. #define TSI_GENCS_EOSF_SHIFT (2U)
  13157. #define TSI_GENCS_EOSF(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_EOSF_SHIFT)) & TSI_GENCS_EOSF_MASK)
  13158. #define TSI_GENCS_SCNIP_MASK (0x8U)
  13159. #define TSI_GENCS_SCNIP_SHIFT (3U)
  13160. #define TSI_GENCS_SCNIP(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_SCNIP_SHIFT)) & TSI_GENCS_SCNIP_MASK)
  13161. #define TSI_GENCS_STM_MASK (0x10U)
  13162. #define TSI_GENCS_STM_SHIFT (4U)
  13163. #define TSI_GENCS_STM(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_STM_SHIFT)) & TSI_GENCS_STM_MASK)
  13164. #define TSI_GENCS_STPE_MASK (0x20U)
  13165. #define TSI_GENCS_STPE_SHIFT (5U)
  13166. #define TSI_GENCS_STPE(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_STPE_SHIFT)) & TSI_GENCS_STPE_MASK)
  13167. #define TSI_GENCS_TSIIEN_MASK (0x40U)
  13168. #define TSI_GENCS_TSIIEN_SHIFT (6U)
  13169. #define TSI_GENCS_TSIIEN(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_TSIIEN_SHIFT)) & TSI_GENCS_TSIIEN_MASK)
  13170. #define TSI_GENCS_TSIEN_MASK (0x80U)
  13171. #define TSI_GENCS_TSIEN_SHIFT (7U)
  13172. #define TSI_GENCS_TSIEN(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_TSIEN_SHIFT)) & TSI_GENCS_TSIEN_MASK)
  13173. #define TSI_GENCS_NSCN_MASK (0x1F00U)
  13174. #define TSI_GENCS_NSCN_SHIFT (8U)
  13175. #define TSI_GENCS_NSCN(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_NSCN_SHIFT)) & TSI_GENCS_NSCN_MASK)
  13176. #define TSI_GENCS_PS_MASK (0xE000U)
  13177. #define TSI_GENCS_PS_SHIFT (13U)
  13178. #define TSI_GENCS_PS(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_PS_SHIFT)) & TSI_GENCS_PS_MASK)
  13179. #define TSI_GENCS_EXTCHRG_MASK (0x70000U)
  13180. #define TSI_GENCS_EXTCHRG_SHIFT (16U)
  13181. #define TSI_GENCS_EXTCHRG(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_EXTCHRG_SHIFT)) & TSI_GENCS_EXTCHRG_MASK)
  13182. #define TSI_GENCS_DVOLT_MASK (0x180000U)
  13183. #define TSI_GENCS_DVOLT_SHIFT (19U)
  13184. #define TSI_GENCS_DVOLT(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_DVOLT_SHIFT)) & TSI_GENCS_DVOLT_MASK)
  13185. #define TSI_GENCS_REFCHRG_MASK (0xE00000U)
  13186. #define TSI_GENCS_REFCHRG_SHIFT (21U)
  13187. #define TSI_GENCS_REFCHRG(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_REFCHRG_SHIFT)) & TSI_GENCS_REFCHRG_MASK)
  13188. #define TSI_GENCS_MODE_MASK (0xF000000U)
  13189. #define TSI_GENCS_MODE_SHIFT (24U)
  13190. #define TSI_GENCS_MODE(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_MODE_SHIFT)) & TSI_GENCS_MODE_MASK)
  13191. #define TSI_GENCS_ESOR_MASK (0x10000000U)
  13192. #define TSI_GENCS_ESOR_SHIFT (28U)
  13193. #define TSI_GENCS_ESOR(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_ESOR_SHIFT)) & TSI_GENCS_ESOR_MASK)
  13194. #define TSI_GENCS_OUTRGF_MASK (0x80000000U)
  13195. #define TSI_GENCS_OUTRGF_SHIFT (31U)
  13196. #define TSI_GENCS_OUTRGF(x) (((uint32_t)(((uint32_t)(x)) << TSI_GENCS_OUTRGF_SHIFT)) & TSI_GENCS_OUTRGF_MASK)
  13197. /*! @name DATA - TSI DATA Register */
  13198. #define TSI_DATA_TSICNT_MASK (0xFFFFU)
  13199. #define TSI_DATA_TSICNT_SHIFT (0U)
  13200. #define TSI_DATA_TSICNT(x) (((uint32_t)(((uint32_t)(x)) << TSI_DATA_TSICNT_SHIFT)) & TSI_DATA_TSICNT_MASK)
  13201. #define TSI_DATA_SWTS_MASK (0x400000U)
  13202. #define TSI_DATA_SWTS_SHIFT (22U)
  13203. #define TSI_DATA_SWTS(x) (((uint32_t)(((uint32_t)(x)) << TSI_DATA_SWTS_SHIFT)) & TSI_DATA_SWTS_MASK)
  13204. #define TSI_DATA_DMAEN_MASK (0x800000U)
  13205. #define TSI_DATA_DMAEN_SHIFT (23U)
  13206. #define TSI_DATA_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << TSI_DATA_DMAEN_SHIFT)) & TSI_DATA_DMAEN_MASK)
  13207. #define TSI_DATA_TSICH_MASK (0xF0000000U)
  13208. #define TSI_DATA_TSICH_SHIFT (28U)
  13209. #define TSI_DATA_TSICH(x) (((uint32_t)(((uint32_t)(x)) << TSI_DATA_TSICH_SHIFT)) & TSI_DATA_TSICH_MASK)
  13210. /*! @name TSHD - TSI Threshold Register */
  13211. #define TSI_TSHD_THRESL_MASK (0xFFFFU)
  13212. #define TSI_TSHD_THRESL_SHIFT (0U)
  13213. #define TSI_TSHD_THRESL(x) (((uint32_t)(((uint32_t)(x)) << TSI_TSHD_THRESL_SHIFT)) & TSI_TSHD_THRESL_MASK)
  13214. #define TSI_TSHD_THRESH_MASK (0xFFFF0000U)
  13215. #define TSI_TSHD_THRESH_SHIFT (16U)
  13216. #define TSI_TSHD_THRESH(x) (((uint32_t)(((uint32_t)(x)) << TSI_TSHD_THRESH_SHIFT)) & TSI_TSHD_THRESH_MASK)
  13217. /*!
  13218. * @}
  13219. */ /* end of group TSI_Register_Masks */
  13220. /* TSI - Peripheral instance base addresses */
  13221. /** Peripheral TSI0 base address */
  13222. #define TSI0_BASE (0x40045000u)
  13223. /** Peripheral TSI0 base pointer */
  13224. #define TSI0 ((TSI_Type *)TSI0_BASE)
  13225. /** Array initializer of TSI peripheral base addresses */
  13226. #define TSI_BASE_ADDRS { TSI0_BASE }
  13227. /** Array initializer of TSI peripheral base pointers */
  13228. #define TSI_BASE_PTRS { TSI0 }
  13229. /** Interrupt vectors for the TSI peripheral type */
  13230. #define TSI_IRQS { TSI0_IRQn }
  13231. /*!
  13232. * @}
  13233. */ /* end of group TSI_Peripheral_Access_Layer */
  13234. /* ----------------------------------------------------------------------------
  13235. -- USB Peripheral Access Layer
  13236. ---------------------------------------------------------------------------- */
  13237. /*!
  13238. * @addtogroup USB_Peripheral_Access_Layer USB Peripheral Access Layer
  13239. * @{
  13240. */
  13241. /** USB - Register Layout Typedef */
  13242. typedef struct {
  13243. __I uint8_t PERID; /**< Peripheral ID register, offset: 0x0 */
  13244. uint8_t RESERVED_0[3];
  13245. __I uint8_t IDCOMP; /**< Peripheral ID Complement register, offset: 0x4 */
  13246. uint8_t RESERVED_1[3];
  13247. __I uint8_t REV; /**< Peripheral Revision register, offset: 0x8 */
  13248. uint8_t RESERVED_2[3];
  13249. __I uint8_t ADDINFO; /**< Peripheral Additional Info register, offset: 0xC */
  13250. uint8_t RESERVED_3[3];
  13251. __IO uint8_t OTGISTAT; /**< OTG Interrupt Status register, offset: 0x10 */
  13252. uint8_t RESERVED_4[3];
  13253. __IO uint8_t OTGICR; /**< OTG Interrupt Control register, offset: 0x14 */
  13254. uint8_t RESERVED_5[3];
  13255. __IO uint8_t OTGSTAT; /**< OTG Status register, offset: 0x18 */
  13256. uint8_t RESERVED_6[3];
  13257. __IO uint8_t OTGCTL; /**< OTG Control register, offset: 0x1C */
  13258. uint8_t RESERVED_7[99];
  13259. __IO uint8_t ISTAT; /**< Interrupt Status register, offset: 0x80 */
  13260. uint8_t RESERVED_8[3];
  13261. __IO uint8_t INTEN; /**< Interrupt Enable register, offset: 0x84 */
  13262. uint8_t RESERVED_9[3];
  13263. __IO uint8_t ERRSTAT; /**< Error Interrupt Status register, offset: 0x88 */
  13264. uint8_t RESERVED_10[3];
  13265. __IO uint8_t ERREN; /**< Error Interrupt Enable register, offset: 0x8C */
  13266. uint8_t RESERVED_11[3];
  13267. __I uint8_t STAT; /**< Status register, offset: 0x90 */
  13268. uint8_t RESERVED_12[3];
  13269. __IO uint8_t CTL; /**< Control register, offset: 0x94 */
  13270. uint8_t RESERVED_13[3];
  13271. __IO uint8_t ADDR; /**< Address register, offset: 0x98 */
  13272. uint8_t RESERVED_14[3];
  13273. __IO uint8_t BDTPAGE1; /**< BDT Page register 1, offset: 0x9C */
  13274. uint8_t RESERVED_15[3];
  13275. __IO uint8_t FRMNUML; /**< Frame Number register Low, offset: 0xA0 */
  13276. uint8_t RESERVED_16[3];
  13277. __IO uint8_t FRMNUMH; /**< Frame Number register High, offset: 0xA4 */
  13278. uint8_t RESERVED_17[3];
  13279. __IO uint8_t TOKEN; /**< Token register, offset: 0xA8 */
  13280. uint8_t RESERVED_18[3];
  13281. __IO uint8_t SOFTHLD; /**< SOF Threshold register, offset: 0xAC */
  13282. uint8_t RESERVED_19[3];
  13283. __IO uint8_t BDTPAGE2; /**< BDT Page Register 2, offset: 0xB0 */
  13284. uint8_t RESERVED_20[3];
  13285. __IO uint8_t BDTPAGE3; /**< BDT Page Register 3, offset: 0xB4 */
  13286. uint8_t RESERVED_21[11];
  13287. struct { /* offset: 0xC0, array step: 0x4 */
  13288. __IO uint8_t ENDPT; /**< Endpoint Control register, array offset: 0xC0, array step: 0x4 */
  13289. uint8_t RESERVED_0[3];
  13290. } ENDPOINT[16];
  13291. __IO uint8_t USBCTRL; /**< USB Control register, offset: 0x100 */
  13292. uint8_t RESERVED_22[3];
  13293. __I uint8_t OBSERVE; /**< USB OTG Observe register, offset: 0x104 */
  13294. uint8_t RESERVED_23[3];
  13295. __IO uint8_t CONTROL; /**< USB OTG Control register, offset: 0x108 */
  13296. uint8_t RESERVED_24[3];
  13297. __IO uint8_t USBTRC0; /**< USB Transceiver Control register 0, offset: 0x10C */
  13298. uint8_t RESERVED_25[7];
  13299. __IO uint8_t USBFRMADJUST; /**< Frame Adjust Register, offset: 0x114 */
  13300. uint8_t RESERVED_26[23];
  13301. __IO uint8_t MISCCTRL; /**< Miscellaneous Control register, offset: 0x12C */
  13302. uint8_t RESERVED_27[19];
  13303. __IO uint8_t CLK_RECOVER_CTRL; /**< USB Clock recovery control, offset: 0x140 */
  13304. uint8_t RESERVED_28[3];
  13305. __IO uint8_t CLK_RECOVER_IRC_EN; /**< IRC48M oscillator enable register, offset: 0x144 */
  13306. uint8_t RESERVED_29[15];
  13307. __IO uint8_t CLK_RECOVER_INT_EN; /**< Clock recovery combined interrupt enable, offset: 0x154 */
  13308. uint8_t RESERVED_30[7];
  13309. __IO uint8_t CLK_RECOVER_INT_STATUS; /**< Clock recovery separated interrupt status, offset: 0x15C */
  13310. } USB_Type;
  13311. /* ----------------------------------------------------------------------------
  13312. -- USB Register Masks
  13313. ---------------------------------------------------------------------------- */
  13314. /*!
  13315. * @addtogroup USB_Register_Masks USB Register Masks
  13316. * @{
  13317. */
  13318. /*! @name PERID - Peripheral ID register */
  13319. #define USB_PERID_ID_MASK (0x3FU)
  13320. #define USB_PERID_ID_SHIFT (0U)
  13321. #define USB_PERID_ID(x) (((uint8_t)(((uint8_t)(x)) << USB_PERID_ID_SHIFT)) & USB_PERID_ID_MASK)
  13322. /*! @name IDCOMP - Peripheral ID Complement register */
  13323. #define USB_IDCOMP_NID_MASK (0x3FU)
  13324. #define USB_IDCOMP_NID_SHIFT (0U)
  13325. #define USB_IDCOMP_NID(x) (((uint8_t)(((uint8_t)(x)) << USB_IDCOMP_NID_SHIFT)) & USB_IDCOMP_NID_MASK)
  13326. /*! @name REV - Peripheral Revision register */
  13327. #define USB_REV_REV_MASK (0xFFU)
  13328. #define USB_REV_REV_SHIFT (0U)
  13329. #define USB_REV_REV(x) (((uint8_t)(((uint8_t)(x)) << USB_REV_REV_SHIFT)) & USB_REV_REV_MASK)
  13330. /*! @name ADDINFO - Peripheral Additional Info register */
  13331. #define USB_ADDINFO_IEHOST_MASK (0x1U)
  13332. #define USB_ADDINFO_IEHOST_SHIFT (0U)
  13333. #define USB_ADDINFO_IEHOST(x) (((uint8_t)(((uint8_t)(x)) << USB_ADDINFO_IEHOST_SHIFT)) & USB_ADDINFO_IEHOST_MASK)
  13334. /*! @name OTGISTAT - OTG Interrupt Status register */
  13335. #define USB_OTGISTAT_AVBUSCHG_MASK (0x1U)
  13336. #define USB_OTGISTAT_AVBUSCHG_SHIFT (0U)
  13337. #define USB_OTGISTAT_AVBUSCHG(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_AVBUSCHG_SHIFT)) & USB_OTGISTAT_AVBUSCHG_MASK)
  13338. #define USB_OTGISTAT_B_SESS_CHG_MASK (0x4U)
  13339. #define USB_OTGISTAT_B_SESS_CHG_SHIFT (2U)
  13340. #define USB_OTGISTAT_B_SESS_CHG(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_B_SESS_CHG_SHIFT)) & USB_OTGISTAT_B_SESS_CHG_MASK)
  13341. #define USB_OTGISTAT_SESSVLDCHG_MASK (0x8U)
  13342. #define USB_OTGISTAT_SESSVLDCHG_SHIFT (3U)
  13343. #define USB_OTGISTAT_SESSVLDCHG(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_SESSVLDCHG_SHIFT)) & USB_OTGISTAT_SESSVLDCHG_MASK)
  13344. #define USB_OTGISTAT_LINE_STATE_CHG_MASK (0x20U)
  13345. #define USB_OTGISTAT_LINE_STATE_CHG_SHIFT (5U)
  13346. #define USB_OTGISTAT_LINE_STATE_CHG(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_LINE_STATE_CHG_SHIFT)) & USB_OTGISTAT_LINE_STATE_CHG_MASK)
  13347. #define USB_OTGISTAT_ONEMSEC_MASK (0x40U)
  13348. #define USB_OTGISTAT_ONEMSEC_SHIFT (6U)
  13349. #define USB_OTGISTAT_ONEMSEC(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_ONEMSEC_SHIFT)) & USB_OTGISTAT_ONEMSEC_MASK)
  13350. #define USB_OTGISTAT_IDCHG_MASK (0x80U)
  13351. #define USB_OTGISTAT_IDCHG_SHIFT (7U)
  13352. #define USB_OTGISTAT_IDCHG(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_IDCHG_SHIFT)) & USB_OTGISTAT_IDCHG_MASK)
  13353. /*! @name OTGICR - OTG Interrupt Control register */
  13354. #define USB_OTGICR_AVBUSEN_MASK (0x1U)
  13355. #define USB_OTGICR_AVBUSEN_SHIFT (0U)
  13356. #define USB_OTGICR_AVBUSEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_AVBUSEN_SHIFT)) & USB_OTGICR_AVBUSEN_MASK)
  13357. #define USB_OTGICR_BSESSEN_MASK (0x4U)
  13358. #define USB_OTGICR_BSESSEN_SHIFT (2U)
  13359. #define USB_OTGICR_BSESSEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_BSESSEN_SHIFT)) & USB_OTGICR_BSESSEN_MASK)
  13360. #define USB_OTGICR_SESSVLDEN_MASK (0x8U)
  13361. #define USB_OTGICR_SESSVLDEN_SHIFT (3U)
  13362. #define USB_OTGICR_SESSVLDEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_SESSVLDEN_SHIFT)) & USB_OTGICR_SESSVLDEN_MASK)
  13363. #define USB_OTGICR_LINESTATEEN_MASK (0x20U)
  13364. #define USB_OTGICR_LINESTATEEN_SHIFT (5U)
  13365. #define USB_OTGICR_LINESTATEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_LINESTATEEN_SHIFT)) & USB_OTGICR_LINESTATEEN_MASK)
  13366. #define USB_OTGICR_ONEMSECEN_MASK (0x40U)
  13367. #define USB_OTGICR_ONEMSECEN_SHIFT (6U)
  13368. #define USB_OTGICR_ONEMSECEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_ONEMSECEN_SHIFT)) & USB_OTGICR_ONEMSECEN_MASK)
  13369. #define USB_OTGICR_IDEN_MASK (0x80U)
  13370. #define USB_OTGICR_IDEN_SHIFT (7U)
  13371. #define USB_OTGICR_IDEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_IDEN_SHIFT)) & USB_OTGICR_IDEN_MASK)
  13372. /*! @name OTGSTAT - OTG Status register */
  13373. #define USB_OTGSTAT_AVBUSVLD_MASK (0x1U)
  13374. #define USB_OTGSTAT_AVBUSVLD_SHIFT (0U)
  13375. #define USB_OTGSTAT_AVBUSVLD(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_AVBUSVLD_SHIFT)) & USB_OTGSTAT_AVBUSVLD_MASK)
  13376. #define USB_OTGSTAT_BSESSEND_MASK (0x4U)
  13377. #define USB_OTGSTAT_BSESSEND_SHIFT (2U)
  13378. #define USB_OTGSTAT_BSESSEND(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_BSESSEND_SHIFT)) & USB_OTGSTAT_BSESSEND_MASK)
  13379. #define USB_OTGSTAT_SESS_VLD_MASK (0x8U)
  13380. #define USB_OTGSTAT_SESS_VLD_SHIFT (3U)
  13381. #define USB_OTGSTAT_SESS_VLD(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_SESS_VLD_SHIFT)) & USB_OTGSTAT_SESS_VLD_MASK)
  13382. #define USB_OTGSTAT_LINESTATESTABLE_MASK (0x20U)
  13383. #define USB_OTGSTAT_LINESTATESTABLE_SHIFT (5U)
  13384. #define USB_OTGSTAT_LINESTATESTABLE(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_LINESTATESTABLE_SHIFT)) & USB_OTGSTAT_LINESTATESTABLE_MASK)
  13385. #define USB_OTGSTAT_ONEMSECEN_MASK (0x40U)
  13386. #define USB_OTGSTAT_ONEMSECEN_SHIFT (6U)
  13387. #define USB_OTGSTAT_ONEMSECEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_ONEMSECEN_SHIFT)) & USB_OTGSTAT_ONEMSECEN_MASK)
  13388. #define USB_OTGSTAT_ID_MASK (0x80U)
  13389. #define USB_OTGSTAT_ID_SHIFT (7U)
  13390. #define USB_OTGSTAT_ID(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_ID_SHIFT)) & USB_OTGSTAT_ID_MASK)
  13391. /*! @name OTGCTL - OTG Control register */
  13392. #define USB_OTGCTL_OTGEN_MASK (0x4U)
  13393. #define USB_OTGCTL_OTGEN_SHIFT (2U)
  13394. #define USB_OTGCTL_OTGEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGCTL_OTGEN_SHIFT)) & USB_OTGCTL_OTGEN_MASK)
  13395. #define USB_OTGCTL_DMLOW_MASK (0x10U)
  13396. #define USB_OTGCTL_DMLOW_SHIFT (4U)
  13397. #define USB_OTGCTL_DMLOW(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGCTL_DMLOW_SHIFT)) & USB_OTGCTL_DMLOW_MASK)
  13398. #define USB_OTGCTL_DPLOW_MASK (0x20U)
  13399. #define USB_OTGCTL_DPLOW_SHIFT (5U)
  13400. #define USB_OTGCTL_DPLOW(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGCTL_DPLOW_SHIFT)) & USB_OTGCTL_DPLOW_MASK)
  13401. #define USB_OTGCTL_DPHIGH_MASK (0x80U)
  13402. #define USB_OTGCTL_DPHIGH_SHIFT (7U)
  13403. #define USB_OTGCTL_DPHIGH(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGCTL_DPHIGH_SHIFT)) & USB_OTGCTL_DPHIGH_MASK)
  13404. /*! @name ISTAT - Interrupt Status register */
  13405. #define USB_ISTAT_USBRST_MASK (0x1U)
  13406. #define USB_ISTAT_USBRST_SHIFT (0U)
  13407. #define USB_ISTAT_USBRST(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_USBRST_SHIFT)) & USB_ISTAT_USBRST_MASK)
  13408. #define USB_ISTAT_ERROR_MASK (0x2U)
  13409. #define USB_ISTAT_ERROR_SHIFT (1U)
  13410. #define USB_ISTAT_ERROR(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_ERROR_SHIFT)) & USB_ISTAT_ERROR_MASK)
  13411. #define USB_ISTAT_SOFTOK_MASK (0x4U)
  13412. #define USB_ISTAT_SOFTOK_SHIFT (2U)
  13413. #define USB_ISTAT_SOFTOK(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_SOFTOK_SHIFT)) & USB_ISTAT_SOFTOK_MASK)
  13414. #define USB_ISTAT_TOKDNE_MASK (0x8U)
  13415. #define USB_ISTAT_TOKDNE_SHIFT (3U)
  13416. #define USB_ISTAT_TOKDNE(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_TOKDNE_SHIFT)) & USB_ISTAT_TOKDNE_MASK)
  13417. #define USB_ISTAT_SLEEP_MASK (0x10U)
  13418. #define USB_ISTAT_SLEEP_SHIFT (4U)
  13419. #define USB_ISTAT_SLEEP(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_SLEEP_SHIFT)) & USB_ISTAT_SLEEP_MASK)
  13420. #define USB_ISTAT_RESUME_MASK (0x20U)
  13421. #define USB_ISTAT_RESUME_SHIFT (5U)
  13422. #define USB_ISTAT_RESUME(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_RESUME_SHIFT)) & USB_ISTAT_RESUME_MASK)
  13423. #define USB_ISTAT_ATTACH_MASK (0x40U)
  13424. #define USB_ISTAT_ATTACH_SHIFT (6U)
  13425. #define USB_ISTAT_ATTACH(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_ATTACH_SHIFT)) & USB_ISTAT_ATTACH_MASK)
  13426. #define USB_ISTAT_STALL_MASK (0x80U)
  13427. #define USB_ISTAT_STALL_SHIFT (7U)
  13428. #define USB_ISTAT_STALL(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_STALL_SHIFT)) & USB_ISTAT_STALL_MASK)
  13429. /*! @name INTEN - Interrupt Enable register */
  13430. #define USB_INTEN_USBRSTEN_MASK (0x1U)
  13431. #define USB_INTEN_USBRSTEN_SHIFT (0U)
  13432. #define USB_INTEN_USBRSTEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_USBRSTEN_SHIFT)) & USB_INTEN_USBRSTEN_MASK)
  13433. #define USB_INTEN_ERROREN_MASK (0x2U)
  13434. #define USB_INTEN_ERROREN_SHIFT (1U)
  13435. #define USB_INTEN_ERROREN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_ERROREN_SHIFT)) & USB_INTEN_ERROREN_MASK)
  13436. #define USB_INTEN_SOFTOKEN_MASK (0x4U)
  13437. #define USB_INTEN_SOFTOKEN_SHIFT (2U)
  13438. #define USB_INTEN_SOFTOKEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_SOFTOKEN_SHIFT)) & USB_INTEN_SOFTOKEN_MASK)
  13439. #define USB_INTEN_TOKDNEEN_MASK (0x8U)
  13440. #define USB_INTEN_TOKDNEEN_SHIFT (3U)
  13441. #define USB_INTEN_TOKDNEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_TOKDNEEN_SHIFT)) & USB_INTEN_TOKDNEEN_MASK)
  13442. #define USB_INTEN_SLEEPEN_MASK (0x10U)
  13443. #define USB_INTEN_SLEEPEN_SHIFT (4U)
  13444. #define USB_INTEN_SLEEPEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_SLEEPEN_SHIFT)) & USB_INTEN_SLEEPEN_MASK)
  13445. #define USB_INTEN_RESUMEEN_MASK (0x20U)
  13446. #define USB_INTEN_RESUMEEN_SHIFT (5U)
  13447. #define USB_INTEN_RESUMEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_RESUMEEN_SHIFT)) & USB_INTEN_RESUMEEN_MASK)
  13448. #define USB_INTEN_ATTACHEN_MASK (0x40U)
  13449. #define USB_INTEN_ATTACHEN_SHIFT (6U)
  13450. #define USB_INTEN_ATTACHEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_ATTACHEN_SHIFT)) & USB_INTEN_ATTACHEN_MASK)
  13451. #define USB_INTEN_STALLEN_MASK (0x80U)
  13452. #define USB_INTEN_STALLEN_SHIFT (7U)
  13453. #define USB_INTEN_STALLEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_STALLEN_SHIFT)) & USB_INTEN_STALLEN_MASK)
  13454. /*! @name ERRSTAT - Error Interrupt Status register */
  13455. #define USB_ERRSTAT_PIDERR_MASK (0x1U)
  13456. #define USB_ERRSTAT_PIDERR_SHIFT (0U)
  13457. #define USB_ERRSTAT_PIDERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_PIDERR_SHIFT)) & USB_ERRSTAT_PIDERR_MASK)
  13458. #define USB_ERRSTAT_CRC5EOF_MASK (0x2U)
  13459. #define USB_ERRSTAT_CRC5EOF_SHIFT (1U)
  13460. #define USB_ERRSTAT_CRC5EOF(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_CRC5EOF_SHIFT)) & USB_ERRSTAT_CRC5EOF_MASK)
  13461. #define USB_ERRSTAT_CRC16_MASK (0x4U)
  13462. #define USB_ERRSTAT_CRC16_SHIFT (2U)
  13463. #define USB_ERRSTAT_CRC16(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_CRC16_SHIFT)) & USB_ERRSTAT_CRC16_MASK)
  13464. #define USB_ERRSTAT_DFN8_MASK (0x8U)
  13465. #define USB_ERRSTAT_DFN8_SHIFT (3U)
  13466. #define USB_ERRSTAT_DFN8(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_DFN8_SHIFT)) & USB_ERRSTAT_DFN8_MASK)
  13467. #define USB_ERRSTAT_BTOERR_MASK (0x10U)
  13468. #define USB_ERRSTAT_BTOERR_SHIFT (4U)
  13469. #define USB_ERRSTAT_BTOERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_BTOERR_SHIFT)) & USB_ERRSTAT_BTOERR_MASK)
  13470. #define USB_ERRSTAT_DMAERR_MASK (0x20U)
  13471. #define USB_ERRSTAT_DMAERR_SHIFT (5U)
  13472. #define USB_ERRSTAT_DMAERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_DMAERR_SHIFT)) & USB_ERRSTAT_DMAERR_MASK)
  13473. #define USB_ERRSTAT_OWNERR_MASK (0x40U)
  13474. #define USB_ERRSTAT_OWNERR_SHIFT (6U)
  13475. #define USB_ERRSTAT_OWNERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_OWNERR_SHIFT)) & USB_ERRSTAT_OWNERR_MASK)
  13476. #define USB_ERRSTAT_BTSERR_MASK (0x80U)
  13477. #define USB_ERRSTAT_BTSERR_SHIFT (7U)
  13478. #define USB_ERRSTAT_BTSERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_BTSERR_SHIFT)) & USB_ERRSTAT_BTSERR_MASK)
  13479. /*! @name ERREN - Error Interrupt Enable register */
  13480. #define USB_ERREN_PIDERREN_MASK (0x1U)
  13481. #define USB_ERREN_PIDERREN_SHIFT (0U)
  13482. #define USB_ERREN_PIDERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_PIDERREN_SHIFT)) & USB_ERREN_PIDERREN_MASK)
  13483. #define USB_ERREN_CRC5EOFEN_MASK (0x2U)
  13484. #define USB_ERREN_CRC5EOFEN_SHIFT (1U)
  13485. #define USB_ERREN_CRC5EOFEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_CRC5EOFEN_SHIFT)) & USB_ERREN_CRC5EOFEN_MASK)
  13486. #define USB_ERREN_CRC16EN_MASK (0x4U)
  13487. #define USB_ERREN_CRC16EN_SHIFT (2U)
  13488. #define USB_ERREN_CRC16EN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_CRC16EN_SHIFT)) & USB_ERREN_CRC16EN_MASK)
  13489. #define USB_ERREN_DFN8EN_MASK (0x8U)
  13490. #define USB_ERREN_DFN8EN_SHIFT (3U)
  13491. #define USB_ERREN_DFN8EN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_DFN8EN_SHIFT)) & USB_ERREN_DFN8EN_MASK)
  13492. #define USB_ERREN_BTOERREN_MASK (0x10U)
  13493. #define USB_ERREN_BTOERREN_SHIFT (4U)
  13494. #define USB_ERREN_BTOERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_BTOERREN_SHIFT)) & USB_ERREN_BTOERREN_MASK)
  13495. #define USB_ERREN_DMAERREN_MASK (0x20U)
  13496. #define USB_ERREN_DMAERREN_SHIFT (5U)
  13497. #define USB_ERREN_DMAERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_DMAERREN_SHIFT)) & USB_ERREN_DMAERREN_MASK)
  13498. #define USB_ERREN_OWNERREN_MASK (0x40U)
  13499. #define USB_ERREN_OWNERREN_SHIFT (6U)
  13500. #define USB_ERREN_OWNERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_OWNERREN_SHIFT)) & USB_ERREN_OWNERREN_MASK)
  13501. #define USB_ERREN_BTSERREN_MASK (0x80U)
  13502. #define USB_ERREN_BTSERREN_SHIFT (7U)
  13503. #define USB_ERREN_BTSERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_BTSERREN_SHIFT)) & USB_ERREN_BTSERREN_MASK)
  13504. /*! @name STAT - Status register */
  13505. #define USB_STAT_ODD_MASK (0x4U)
  13506. #define USB_STAT_ODD_SHIFT (2U)
  13507. #define USB_STAT_ODD(x) (((uint8_t)(((uint8_t)(x)) << USB_STAT_ODD_SHIFT)) & USB_STAT_ODD_MASK)
  13508. #define USB_STAT_TX_MASK (0x8U)
  13509. #define USB_STAT_TX_SHIFT (3U)
  13510. #define USB_STAT_TX(x) (((uint8_t)(((uint8_t)(x)) << USB_STAT_TX_SHIFT)) & USB_STAT_TX_MASK)
  13511. #define USB_STAT_ENDP_MASK (0xF0U)
  13512. #define USB_STAT_ENDP_SHIFT (4U)
  13513. #define USB_STAT_ENDP(x) (((uint8_t)(((uint8_t)(x)) << USB_STAT_ENDP_SHIFT)) & USB_STAT_ENDP_MASK)
  13514. /*! @name CTL - Control register */
  13515. #define USB_CTL_USBENSOFEN_MASK (0x1U)
  13516. #define USB_CTL_USBENSOFEN_SHIFT (0U)
  13517. #define USB_CTL_USBENSOFEN(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_USBENSOFEN_SHIFT)) & USB_CTL_USBENSOFEN_MASK)
  13518. #define USB_CTL_ODDRST_MASK (0x2U)
  13519. #define USB_CTL_ODDRST_SHIFT (1U)
  13520. #define USB_CTL_ODDRST(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_ODDRST_SHIFT)) & USB_CTL_ODDRST_MASK)
  13521. #define USB_CTL_RESUME_MASK (0x4U)
  13522. #define USB_CTL_RESUME_SHIFT (2U)
  13523. #define USB_CTL_RESUME(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_RESUME_SHIFT)) & USB_CTL_RESUME_MASK)
  13524. #define USB_CTL_HOSTMODEEN_MASK (0x8U)
  13525. #define USB_CTL_HOSTMODEEN_SHIFT (3U)
  13526. #define USB_CTL_HOSTMODEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_HOSTMODEEN_SHIFT)) & USB_CTL_HOSTMODEEN_MASK)
  13527. #define USB_CTL_RESET_MASK (0x10U)
  13528. #define USB_CTL_RESET_SHIFT (4U)
  13529. #define USB_CTL_RESET(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_RESET_SHIFT)) & USB_CTL_RESET_MASK)
  13530. #define USB_CTL_TXSUSPENDTOKENBUSY_MASK (0x20U)
  13531. #define USB_CTL_TXSUSPENDTOKENBUSY_SHIFT (5U)
  13532. #define USB_CTL_TXSUSPENDTOKENBUSY(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_TXSUSPENDTOKENBUSY_SHIFT)) & USB_CTL_TXSUSPENDTOKENBUSY_MASK)
  13533. #define USB_CTL_SE0_MASK (0x40U)
  13534. #define USB_CTL_SE0_SHIFT (6U)
  13535. #define USB_CTL_SE0(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_SE0_SHIFT)) & USB_CTL_SE0_MASK)
  13536. #define USB_CTL_JSTATE_MASK (0x80U)
  13537. #define USB_CTL_JSTATE_SHIFT (7U)
  13538. #define USB_CTL_JSTATE(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_JSTATE_SHIFT)) & USB_CTL_JSTATE_MASK)
  13539. /*! @name ADDR - Address register */
  13540. #define USB_ADDR_ADDR_MASK (0x7FU)
  13541. #define USB_ADDR_ADDR_SHIFT (0U)
  13542. #define USB_ADDR_ADDR(x) (((uint8_t)(((uint8_t)(x)) << USB_ADDR_ADDR_SHIFT)) & USB_ADDR_ADDR_MASK)
  13543. #define USB_ADDR_LSEN_MASK (0x80U)
  13544. #define USB_ADDR_LSEN_SHIFT (7U)
  13545. #define USB_ADDR_LSEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ADDR_LSEN_SHIFT)) & USB_ADDR_LSEN_MASK)
  13546. /*! @name BDTPAGE1 - BDT Page register 1 */
  13547. #define USB_BDTPAGE1_BDTBA_MASK (0xFEU)
  13548. #define USB_BDTPAGE1_BDTBA_SHIFT (1U)
  13549. #define USB_BDTPAGE1_BDTBA(x) (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE1_BDTBA_SHIFT)) & USB_BDTPAGE1_BDTBA_MASK)
  13550. /*! @name FRMNUML - Frame Number register Low */
  13551. #define USB_FRMNUML_FRM_MASK (0xFFU)
  13552. #define USB_FRMNUML_FRM_SHIFT (0U)
  13553. #define USB_FRMNUML_FRM(x) (((uint8_t)(((uint8_t)(x)) << USB_FRMNUML_FRM_SHIFT)) & USB_FRMNUML_FRM_MASK)
  13554. /*! @name FRMNUMH - Frame Number register High */
  13555. #define USB_FRMNUMH_FRM_MASK (0x7U)
  13556. #define USB_FRMNUMH_FRM_SHIFT (0U)
  13557. #define USB_FRMNUMH_FRM(x) (((uint8_t)(((uint8_t)(x)) << USB_FRMNUMH_FRM_SHIFT)) & USB_FRMNUMH_FRM_MASK)
  13558. /*! @name TOKEN - Token register */
  13559. #define USB_TOKEN_TOKENENDPT_MASK (0xFU)
  13560. #define USB_TOKEN_TOKENENDPT_SHIFT (0U)
  13561. #define USB_TOKEN_TOKENENDPT(x) (((uint8_t)(((uint8_t)(x)) << USB_TOKEN_TOKENENDPT_SHIFT)) & USB_TOKEN_TOKENENDPT_MASK)
  13562. #define USB_TOKEN_TOKENPID_MASK (0xF0U)
  13563. #define USB_TOKEN_TOKENPID_SHIFT (4U)
  13564. #define USB_TOKEN_TOKENPID(x) (((uint8_t)(((uint8_t)(x)) << USB_TOKEN_TOKENPID_SHIFT)) & USB_TOKEN_TOKENPID_MASK)
  13565. /*! @name SOFTHLD - SOF Threshold register */
  13566. #define USB_SOFTHLD_CNT_MASK (0xFFU)
  13567. #define USB_SOFTHLD_CNT_SHIFT (0U)
  13568. #define USB_SOFTHLD_CNT(x) (((uint8_t)(((uint8_t)(x)) << USB_SOFTHLD_CNT_SHIFT)) & USB_SOFTHLD_CNT_MASK)
  13569. /*! @name BDTPAGE2 - BDT Page Register 2 */
  13570. #define USB_BDTPAGE2_BDTBA_MASK (0xFFU)
  13571. #define USB_BDTPAGE2_BDTBA_SHIFT (0U)
  13572. #define USB_BDTPAGE2_BDTBA(x) (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE2_BDTBA_SHIFT)) & USB_BDTPAGE2_BDTBA_MASK)
  13573. /*! @name BDTPAGE3 - BDT Page Register 3 */
  13574. #define USB_BDTPAGE3_BDTBA_MASK (0xFFU)
  13575. #define USB_BDTPAGE3_BDTBA_SHIFT (0U)
  13576. #define USB_BDTPAGE3_BDTBA(x) (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE3_BDTBA_SHIFT)) & USB_BDTPAGE3_BDTBA_MASK)
  13577. /*! @name ENDPT - Endpoint Control register */
  13578. #define USB_ENDPT_EPHSHK_MASK (0x1U)
  13579. #define USB_ENDPT_EPHSHK_SHIFT (0U)
  13580. #define USB_ENDPT_EPHSHK(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPHSHK_SHIFT)) & USB_ENDPT_EPHSHK_MASK)
  13581. #define USB_ENDPT_EPSTALL_MASK (0x2U)
  13582. #define USB_ENDPT_EPSTALL_SHIFT (1U)
  13583. #define USB_ENDPT_EPSTALL(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPSTALL_SHIFT)) & USB_ENDPT_EPSTALL_MASK)
  13584. #define USB_ENDPT_EPTXEN_MASK (0x4U)
  13585. #define USB_ENDPT_EPTXEN_SHIFT (2U)
  13586. #define USB_ENDPT_EPTXEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPTXEN_SHIFT)) & USB_ENDPT_EPTXEN_MASK)
  13587. #define USB_ENDPT_EPRXEN_MASK (0x8U)
  13588. #define USB_ENDPT_EPRXEN_SHIFT (3U)
  13589. #define USB_ENDPT_EPRXEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPRXEN_SHIFT)) & USB_ENDPT_EPRXEN_MASK)
  13590. #define USB_ENDPT_EPCTLDIS_MASK (0x10U)
  13591. #define USB_ENDPT_EPCTLDIS_SHIFT (4U)
  13592. #define USB_ENDPT_EPCTLDIS(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPCTLDIS_SHIFT)) & USB_ENDPT_EPCTLDIS_MASK)
  13593. #define USB_ENDPT_RETRYDIS_MASK (0x40U)
  13594. #define USB_ENDPT_RETRYDIS_SHIFT (6U)
  13595. #define USB_ENDPT_RETRYDIS(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_RETRYDIS_SHIFT)) & USB_ENDPT_RETRYDIS_MASK)
  13596. #define USB_ENDPT_HOSTWOHUB_MASK (0x80U)
  13597. #define USB_ENDPT_HOSTWOHUB_SHIFT (7U)
  13598. #define USB_ENDPT_HOSTWOHUB(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_HOSTWOHUB_SHIFT)) & USB_ENDPT_HOSTWOHUB_MASK)
  13599. /* The count of USB_ENDPT */
  13600. #define USB_ENDPT_COUNT (16U)
  13601. /*! @name USBCTRL - USB Control register */
  13602. #define USB_USBCTRL_UARTSEL_MASK (0x10U)
  13603. #define USB_USBCTRL_UARTSEL_SHIFT (4U)
  13604. #define USB_USBCTRL_UARTSEL(x) (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_UARTSEL_SHIFT)) & USB_USBCTRL_UARTSEL_MASK)
  13605. #define USB_USBCTRL_UARTCHLS_MASK (0x20U)
  13606. #define USB_USBCTRL_UARTCHLS_SHIFT (5U)
  13607. #define USB_USBCTRL_UARTCHLS(x) (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_UARTCHLS_SHIFT)) & USB_USBCTRL_UARTCHLS_MASK)
  13608. #define USB_USBCTRL_PDE_MASK (0x40U)
  13609. #define USB_USBCTRL_PDE_SHIFT (6U)
  13610. #define USB_USBCTRL_PDE(x) (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_PDE_SHIFT)) & USB_USBCTRL_PDE_MASK)
  13611. #define USB_USBCTRL_SUSP_MASK (0x80U)
  13612. #define USB_USBCTRL_SUSP_SHIFT (7U)
  13613. #define USB_USBCTRL_SUSP(x) (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_SUSP_SHIFT)) & USB_USBCTRL_SUSP_MASK)
  13614. /*! @name OBSERVE - USB OTG Observe register */
  13615. #define USB_OBSERVE_DMPD_MASK (0x10U)
  13616. #define USB_OBSERVE_DMPD_SHIFT (4U)
  13617. #define USB_OBSERVE_DMPD(x) (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DMPD_SHIFT)) & USB_OBSERVE_DMPD_MASK)
  13618. #define USB_OBSERVE_DPPD_MASK (0x40U)
  13619. #define USB_OBSERVE_DPPD_SHIFT (6U)
  13620. #define USB_OBSERVE_DPPD(x) (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DPPD_SHIFT)) & USB_OBSERVE_DPPD_MASK)
  13621. #define USB_OBSERVE_DPPU_MASK (0x80U)
  13622. #define USB_OBSERVE_DPPU_SHIFT (7U)
  13623. #define USB_OBSERVE_DPPU(x) (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DPPU_SHIFT)) & USB_OBSERVE_DPPU_MASK)
  13624. /*! @name CONTROL - USB OTG Control register */
  13625. #define USB_CONTROL_DPPULLUPNONOTG_MASK (0x10U)
  13626. #define USB_CONTROL_DPPULLUPNONOTG_SHIFT (4U)
  13627. #define USB_CONTROL_DPPULLUPNONOTG(x) (((uint8_t)(((uint8_t)(x)) << USB_CONTROL_DPPULLUPNONOTG_SHIFT)) & USB_CONTROL_DPPULLUPNONOTG_MASK)
  13628. /*! @name USBTRC0 - USB Transceiver Control register 0 */
  13629. #define USB_USBTRC0_USB_RESUME_INT_MASK (0x1U)
  13630. #define USB_USBTRC0_USB_RESUME_INT_SHIFT (0U)
  13631. #define USB_USBTRC0_USB_RESUME_INT(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USB_RESUME_INT_SHIFT)) & USB_USBTRC0_USB_RESUME_INT_MASK)
  13632. #define USB_USBTRC0_SYNC_DET_MASK (0x2U)
  13633. #define USB_USBTRC0_SYNC_DET_SHIFT (1U)
  13634. #define USB_USBTRC0_SYNC_DET(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_SYNC_DET_SHIFT)) & USB_USBTRC0_SYNC_DET_MASK)
  13635. #define USB_USBTRC0_USB_CLK_RECOVERY_INT_MASK (0x4U)
  13636. #define USB_USBTRC0_USB_CLK_RECOVERY_INT_SHIFT (2U)
  13637. #define USB_USBTRC0_USB_CLK_RECOVERY_INT(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USB_CLK_RECOVERY_INT_SHIFT)) & USB_USBTRC0_USB_CLK_RECOVERY_INT_MASK)
  13638. #define USB_USBTRC0_VREDG_DET_MASK (0x8U)
  13639. #define USB_USBTRC0_VREDG_DET_SHIFT (3U)
  13640. #define USB_USBTRC0_VREDG_DET(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_VREDG_DET_SHIFT)) & USB_USBTRC0_VREDG_DET_MASK)
  13641. #define USB_USBTRC0_VFEDG_DET_MASK (0x10U)
  13642. #define USB_USBTRC0_VFEDG_DET_SHIFT (4U)
  13643. #define USB_USBTRC0_VFEDG_DET(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_VFEDG_DET_SHIFT)) & USB_USBTRC0_VFEDG_DET_MASK)
  13644. #define USB_USBTRC0_USBRESMEN_MASK (0x20U)
  13645. #define USB_USBTRC0_USBRESMEN_SHIFT (5U)
  13646. #define USB_USBTRC0_USBRESMEN(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USBRESMEN_SHIFT)) & USB_USBTRC0_USBRESMEN_MASK)
  13647. #define USB_USBTRC0_USBRESET_MASK (0x80U)
  13648. #define USB_USBTRC0_USBRESET_SHIFT (7U)
  13649. #define USB_USBTRC0_USBRESET(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USBRESET_SHIFT)) & USB_USBTRC0_USBRESET_MASK)
  13650. /*! @name USBFRMADJUST - Frame Adjust Register */
  13651. #define USB_USBFRMADJUST_ADJ_MASK (0xFFU)
  13652. #define USB_USBFRMADJUST_ADJ_SHIFT (0U)
  13653. #define USB_USBFRMADJUST_ADJ(x) (((uint8_t)(((uint8_t)(x)) << USB_USBFRMADJUST_ADJ_SHIFT)) & USB_USBFRMADJUST_ADJ_MASK)
  13654. /*! @name MISCCTRL - Miscellaneous Control register */
  13655. #define USB_MISCCTRL_SOFDYNTHLD_MASK (0x1U)
  13656. #define USB_MISCCTRL_SOFDYNTHLD_SHIFT (0U)
  13657. #define USB_MISCCTRL_SOFDYNTHLD(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_SOFDYNTHLD_SHIFT)) & USB_MISCCTRL_SOFDYNTHLD_MASK)
  13658. #define USB_MISCCTRL_SOFBUSSET_MASK (0x2U)
  13659. #define USB_MISCCTRL_SOFBUSSET_SHIFT (1U)
  13660. #define USB_MISCCTRL_SOFBUSSET(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_SOFBUSSET_SHIFT)) & USB_MISCCTRL_SOFBUSSET_MASK)
  13661. #define USB_MISCCTRL_OWNERRISODIS_MASK (0x4U)
  13662. #define USB_MISCCTRL_OWNERRISODIS_SHIFT (2U)
  13663. #define USB_MISCCTRL_OWNERRISODIS(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_OWNERRISODIS_SHIFT)) & USB_MISCCTRL_OWNERRISODIS_MASK)
  13664. #define USB_MISCCTRL_VREDG_EN_MASK (0x8U)
  13665. #define USB_MISCCTRL_VREDG_EN_SHIFT (3U)
  13666. #define USB_MISCCTRL_VREDG_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_VREDG_EN_SHIFT)) & USB_MISCCTRL_VREDG_EN_MASK)
  13667. #define USB_MISCCTRL_VFEDG_EN_MASK (0x10U)
  13668. #define USB_MISCCTRL_VFEDG_EN_SHIFT (4U)
  13669. #define USB_MISCCTRL_VFEDG_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_MISCCTRL_VFEDG_EN_SHIFT)) & USB_MISCCTRL_VFEDG_EN_MASK)
  13670. /*! @name CLK_RECOVER_CTRL - USB Clock recovery control */
  13671. #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_MASK (0x20U)
  13672. #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_SHIFT (5U)
  13673. #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_MASK)
  13674. #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_MASK (0x40U)
  13675. #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_SHIFT (6U)
  13676. #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_MASK)
  13677. #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK (0x80U)
  13678. #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_SHIFT (7U)
  13679. #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK)
  13680. /*! @name CLK_RECOVER_IRC_EN - IRC48M oscillator enable register */
  13681. #define USB_CLK_RECOVER_IRC_EN_REG_EN_MASK (0x1U)
  13682. #define USB_CLK_RECOVER_IRC_EN_REG_EN_SHIFT (0U)
  13683. #define USB_CLK_RECOVER_IRC_EN_REG_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_IRC_EN_REG_EN_SHIFT)) & USB_CLK_RECOVER_IRC_EN_REG_EN_MASK)
  13684. #define USB_CLK_RECOVER_IRC_EN_IRC_EN_MASK (0x2U)
  13685. #define USB_CLK_RECOVER_IRC_EN_IRC_EN_SHIFT (1U)
  13686. #define USB_CLK_RECOVER_IRC_EN_IRC_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_IRC_EN_IRC_EN_SHIFT)) & USB_CLK_RECOVER_IRC_EN_IRC_EN_MASK)
  13687. /*! @name CLK_RECOVER_INT_EN - Clock recovery combined interrupt enable */
  13688. #define USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_MASK (0x10U)
  13689. #define USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_SHIFT (4U)
  13690. #define USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_SHIFT)) & USB_CLK_RECOVER_INT_EN_OVF_ERROR_EN_MASK)
  13691. /*! @name CLK_RECOVER_INT_STATUS - Clock recovery separated interrupt status */
  13692. #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_MASK (0x10U)
  13693. #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_SHIFT (4U)
  13694. #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_SHIFT)) & USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_MASK)
  13695. /*!
  13696. * @}
  13697. */ /* end of group USB_Register_Masks */
  13698. /* USB - Peripheral instance base addresses */
  13699. /** Peripheral USB0 base address */
  13700. #define USB0_BASE (0x40072000u)
  13701. /** Peripheral USB0 base pointer */
  13702. #define USB0 ((USB_Type *)USB0_BASE)
  13703. /** Array initializer of USB peripheral base addresses */
  13704. #define USB_BASE_ADDRS { USB0_BASE }
  13705. /** Array initializer of USB peripheral base pointers */
  13706. #define USB_BASE_PTRS { USB0 }
  13707. /** Interrupt vectors for the USB peripheral type */
  13708. #define USB_IRQS { USB0_IRQn }
  13709. /*!
  13710. * @}
  13711. */ /* end of group USB_Peripheral_Access_Layer */
  13712. /* ----------------------------------------------------------------------------
  13713. -- USBDCD Peripheral Access Layer
  13714. ---------------------------------------------------------------------------- */
  13715. /*!
  13716. * @addtogroup USBDCD_Peripheral_Access_Layer USBDCD Peripheral Access Layer
  13717. * @{
  13718. */
  13719. /** USBDCD - Register Layout Typedef */
  13720. typedef struct {
  13721. __IO uint32_t CONTROL; /**< Control register, offset: 0x0 */
  13722. __IO uint32_t CLOCK; /**< Clock register, offset: 0x4 */
  13723. __I uint32_t STATUS; /**< Status register, offset: 0x8 */
  13724. __IO uint32_t SIGNAL_OVERRIDE; /**< Signal Override Register, offset: 0xC */
  13725. __IO uint32_t TIMER0; /**< TIMER0 register, offset: 0x10 */
  13726. __IO uint32_t TIMER1; /**< TIMER1 register, offset: 0x14 */
  13727. union { /* offset: 0x18 */
  13728. __IO uint32_t TIMER2_BC11; /**< TIMER2_BC11 register, offset: 0x18 */
  13729. __IO uint32_t TIMER2_BC12; /**< TIMER2_BC12 register, offset: 0x18 */
  13730. };
  13731. } USBDCD_Type;
  13732. /* ----------------------------------------------------------------------------
  13733. -- USBDCD Register Masks
  13734. ---------------------------------------------------------------------------- */
  13735. /*!
  13736. * @addtogroup USBDCD_Register_Masks USBDCD Register Masks
  13737. * @{
  13738. */
  13739. /*! @name CONTROL - Control register */
  13740. #define USBDCD_CONTROL_IACK_MASK (0x1U)
  13741. #define USBDCD_CONTROL_IACK_SHIFT (0U)
  13742. #define USBDCD_CONTROL_IACK(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_IACK_SHIFT)) & USBDCD_CONTROL_IACK_MASK)
  13743. #define USBDCD_CONTROL_IF_MASK (0x100U)
  13744. #define USBDCD_CONTROL_IF_SHIFT (8U)
  13745. #define USBDCD_CONTROL_IF(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_IF_SHIFT)) & USBDCD_CONTROL_IF_MASK)
  13746. #define USBDCD_CONTROL_IE_MASK (0x10000U)
  13747. #define USBDCD_CONTROL_IE_SHIFT (16U)
  13748. #define USBDCD_CONTROL_IE(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_IE_SHIFT)) & USBDCD_CONTROL_IE_MASK)
  13749. #define USBDCD_CONTROL_BC12_MASK (0x20000U)
  13750. #define USBDCD_CONTROL_BC12_SHIFT (17U)
  13751. #define USBDCD_CONTROL_BC12(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_BC12_SHIFT)) & USBDCD_CONTROL_BC12_MASK)
  13752. #define USBDCD_CONTROL_START_MASK (0x1000000U)
  13753. #define USBDCD_CONTROL_START_SHIFT (24U)
  13754. #define USBDCD_CONTROL_START(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_START_SHIFT)) & USBDCD_CONTROL_START_MASK)
  13755. #define USBDCD_CONTROL_SR_MASK (0x2000000U)
  13756. #define USBDCD_CONTROL_SR_SHIFT (25U)
  13757. #define USBDCD_CONTROL_SR(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_SR_SHIFT)) & USBDCD_CONTROL_SR_MASK)
  13758. /*! @name CLOCK - Clock register */
  13759. #define USBDCD_CLOCK_CLOCK_UNIT_MASK (0x1U)
  13760. #define USBDCD_CLOCK_CLOCK_UNIT_SHIFT (0U)
  13761. #define USBDCD_CLOCK_CLOCK_UNIT(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CLOCK_CLOCK_UNIT_SHIFT)) & USBDCD_CLOCK_CLOCK_UNIT_MASK)
  13762. #define USBDCD_CLOCK_CLOCK_SPEED_MASK (0xFFCU)
  13763. #define USBDCD_CLOCK_CLOCK_SPEED_SHIFT (2U)
  13764. #define USBDCD_CLOCK_CLOCK_SPEED(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CLOCK_CLOCK_SPEED_SHIFT)) & USBDCD_CLOCK_CLOCK_SPEED_MASK)
  13765. /*! @name STATUS - Status register */
  13766. #define USBDCD_STATUS_SEQ_RES_MASK (0x30000U)
  13767. #define USBDCD_STATUS_SEQ_RES_SHIFT (16U)
  13768. #define USBDCD_STATUS_SEQ_RES(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_STATUS_SEQ_RES_SHIFT)) & USBDCD_STATUS_SEQ_RES_MASK)
  13769. #define USBDCD_STATUS_SEQ_STAT_MASK (0xC0000U)
  13770. #define USBDCD_STATUS_SEQ_STAT_SHIFT (18U)
  13771. #define USBDCD_STATUS_SEQ_STAT(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_STATUS_SEQ_STAT_SHIFT)) & USBDCD_STATUS_SEQ_STAT_MASK)
  13772. #define USBDCD_STATUS_ERR_MASK (0x100000U)
  13773. #define USBDCD_STATUS_ERR_SHIFT (20U)
  13774. #define USBDCD_STATUS_ERR(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_STATUS_ERR_SHIFT)) & USBDCD_STATUS_ERR_MASK)
  13775. #define USBDCD_STATUS_TO_MASK (0x200000U)
  13776. #define USBDCD_STATUS_TO_SHIFT (21U)
  13777. #define USBDCD_STATUS_TO(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_STATUS_TO_SHIFT)) & USBDCD_STATUS_TO_MASK)
  13778. #define USBDCD_STATUS_ACTIVE_MASK (0x400000U)
  13779. #define USBDCD_STATUS_ACTIVE_SHIFT (22U)
  13780. #define USBDCD_STATUS_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_STATUS_ACTIVE_SHIFT)) & USBDCD_STATUS_ACTIVE_MASK)
  13781. /*! @name SIGNAL_OVERRIDE - Signal Override Register */
  13782. #define USBDCD_SIGNAL_OVERRIDE_PS_MASK (0x3U)
  13783. #define USBDCD_SIGNAL_OVERRIDE_PS_SHIFT (0U)
  13784. #define USBDCD_SIGNAL_OVERRIDE_PS(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_SIGNAL_OVERRIDE_PS_SHIFT)) & USBDCD_SIGNAL_OVERRIDE_PS_MASK)
  13785. /*! @name TIMER0 - TIMER0 register */
  13786. #define USBDCD_TIMER0_TUNITCON_MASK (0xFFFU)
  13787. #define USBDCD_TIMER0_TUNITCON_SHIFT (0U)
  13788. #define USBDCD_TIMER0_TUNITCON(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER0_TUNITCON_SHIFT)) & USBDCD_TIMER0_TUNITCON_MASK)
  13789. #define USBDCD_TIMER0_TSEQ_INIT_MASK (0x3FF0000U)
  13790. #define USBDCD_TIMER0_TSEQ_INIT_SHIFT (16U)
  13791. #define USBDCD_TIMER0_TSEQ_INIT(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER0_TSEQ_INIT_SHIFT)) & USBDCD_TIMER0_TSEQ_INIT_MASK)
  13792. /*! @name TIMER1 - TIMER1 register */
  13793. #define USBDCD_TIMER1_TVDPSRC_ON_MASK (0x3FFU)
  13794. #define USBDCD_TIMER1_TVDPSRC_ON_SHIFT (0U)
  13795. #define USBDCD_TIMER1_TVDPSRC_ON(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER1_TVDPSRC_ON_SHIFT)) & USBDCD_TIMER1_TVDPSRC_ON_MASK)
  13796. #define USBDCD_TIMER1_TDCD_DBNC_MASK (0x3FF0000U)
  13797. #define USBDCD_TIMER1_TDCD_DBNC_SHIFT (16U)
  13798. #define USBDCD_TIMER1_TDCD_DBNC(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER1_TDCD_DBNC_SHIFT)) & USBDCD_TIMER1_TDCD_DBNC_MASK)
  13799. /*! @name TIMER2_BC11 - TIMER2_BC11 register */
  13800. #define USBDCD_TIMER2_BC11_CHECK_DM_MASK (0xFU)
  13801. #define USBDCD_TIMER2_BC11_CHECK_DM_SHIFT (0U)
  13802. #define USBDCD_TIMER2_BC11_CHECK_DM(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER2_BC11_CHECK_DM_SHIFT)) & USBDCD_TIMER2_BC11_CHECK_DM_MASK)
  13803. #define USBDCD_TIMER2_BC11_TVDPSRC_CON_MASK (0x3FF0000U)
  13804. #define USBDCD_TIMER2_BC11_TVDPSRC_CON_SHIFT (16U)
  13805. #define USBDCD_TIMER2_BC11_TVDPSRC_CON(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER2_BC11_TVDPSRC_CON_SHIFT)) & USBDCD_TIMER2_BC11_TVDPSRC_CON_MASK)
  13806. /*! @name TIMER2_BC12 - TIMER2_BC12 register */
  13807. #define USBDCD_TIMER2_BC12_TVDMSRC_ON_MASK (0x3FFU)
  13808. #define USBDCD_TIMER2_BC12_TVDMSRC_ON_SHIFT (0U)
  13809. #define USBDCD_TIMER2_BC12_TVDMSRC_ON(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER2_BC12_TVDMSRC_ON_SHIFT)) & USBDCD_TIMER2_BC12_TVDMSRC_ON_MASK)
  13810. #define USBDCD_TIMER2_BC12_TWAIT_AFTER_PRD_MASK (0x3FF0000U)
  13811. #define USBDCD_TIMER2_BC12_TWAIT_AFTER_PRD_SHIFT (16U)
  13812. #define USBDCD_TIMER2_BC12_TWAIT_AFTER_PRD(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER2_BC12_TWAIT_AFTER_PRD_SHIFT)) & USBDCD_TIMER2_BC12_TWAIT_AFTER_PRD_MASK)
  13813. /*!
  13814. * @}
  13815. */ /* end of group USBDCD_Register_Masks */
  13816. /* USBDCD - Peripheral instance base addresses */
  13817. /** Peripheral USBDCD base address */
  13818. #define USBDCD_BASE (0x40035000u)
  13819. /** Peripheral USBDCD base pointer */
  13820. #define USBDCD ((USBDCD_Type *)USBDCD_BASE)
  13821. /** Array initializer of USBDCD peripheral base addresses */
  13822. #define USBDCD_BASE_ADDRS { USBDCD_BASE }
  13823. /** Array initializer of USBDCD peripheral base pointers */
  13824. #define USBDCD_BASE_PTRS { USBDCD }
  13825. /** Interrupt vectors for the USBDCD peripheral type */
  13826. #define USBDCD_IRQS { USBDCD_IRQn }
  13827. /*!
  13828. * @}
  13829. */ /* end of group USBDCD_Peripheral_Access_Layer */
  13830. /* ----------------------------------------------------------------------------
  13831. -- VREF Peripheral Access Layer
  13832. ---------------------------------------------------------------------------- */
  13833. /*!
  13834. * @addtogroup VREF_Peripheral_Access_Layer VREF Peripheral Access Layer
  13835. * @{
  13836. */
  13837. /** VREF - Register Layout Typedef */
  13838. typedef struct {
  13839. __IO uint8_t TRM; /**< VREF Trim Register, offset: 0x0 */
  13840. __IO uint8_t SC; /**< VREF Status and Control Register, offset: 0x1 */
  13841. } VREF_Type;
  13842. /* ----------------------------------------------------------------------------
  13843. -- VREF Register Masks
  13844. ---------------------------------------------------------------------------- */
  13845. /*!
  13846. * @addtogroup VREF_Register_Masks VREF Register Masks
  13847. * @{
  13848. */
  13849. /*! @name TRM - VREF Trim Register */
  13850. #define VREF_TRM_TRIM_MASK (0x3FU)
  13851. #define VREF_TRM_TRIM_SHIFT (0U)
  13852. #define VREF_TRM_TRIM(x) (((uint8_t)(((uint8_t)(x)) << VREF_TRM_TRIM_SHIFT)) & VREF_TRM_TRIM_MASK)
  13853. #define VREF_TRM_CHOPEN_MASK (0x40U)
  13854. #define VREF_TRM_CHOPEN_SHIFT (6U)
  13855. #define VREF_TRM_CHOPEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_TRM_CHOPEN_SHIFT)) & VREF_TRM_CHOPEN_MASK)
  13856. /*! @name SC - VREF Status and Control Register */
  13857. #define VREF_SC_MODE_LV_MASK (0x3U)
  13858. #define VREF_SC_MODE_LV_SHIFT (0U)
  13859. #define VREF_SC_MODE_LV(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_MODE_LV_SHIFT)) & VREF_SC_MODE_LV_MASK)
  13860. #define VREF_SC_VREFST_MASK (0x4U)
  13861. #define VREF_SC_VREFST_SHIFT (2U)
  13862. #define VREF_SC_VREFST(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_VREFST_SHIFT)) & VREF_SC_VREFST_MASK)
  13863. #define VREF_SC_ICOMPEN_MASK (0x20U)
  13864. #define VREF_SC_ICOMPEN_SHIFT (5U)
  13865. #define VREF_SC_ICOMPEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_ICOMPEN_SHIFT)) & VREF_SC_ICOMPEN_MASK)
  13866. #define VREF_SC_REGEN_MASK (0x40U)
  13867. #define VREF_SC_REGEN_SHIFT (6U)
  13868. #define VREF_SC_REGEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_REGEN_SHIFT)) & VREF_SC_REGEN_MASK)
  13869. #define VREF_SC_VREFEN_MASK (0x80U)
  13870. #define VREF_SC_VREFEN_SHIFT (7U)
  13871. #define VREF_SC_VREFEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_VREFEN_SHIFT)) & VREF_SC_VREFEN_MASK)
  13872. /*!
  13873. * @}
  13874. */ /* end of group VREF_Register_Masks */
  13875. /* VREF - Peripheral instance base addresses */
  13876. /** Peripheral VREF base address */
  13877. #define VREF_BASE (0x40074000u)
  13878. /** Peripheral VREF base pointer */
  13879. #define VREF ((VREF_Type *)VREF_BASE)
  13880. /** Array initializer of VREF peripheral base addresses */
  13881. #define VREF_BASE_ADDRS { VREF_BASE }
  13882. /** Array initializer of VREF peripheral base pointers */
  13883. #define VREF_BASE_PTRS { VREF }
  13884. /*!
  13885. * @}
  13886. */ /* end of group VREF_Peripheral_Access_Layer */
  13887. /* ----------------------------------------------------------------------------
  13888. -- WDOG Peripheral Access Layer
  13889. ---------------------------------------------------------------------------- */
  13890. /*!
  13891. * @addtogroup WDOG_Peripheral_Access_Layer WDOG Peripheral Access Layer
  13892. * @{
  13893. */
  13894. /** WDOG - Register Layout Typedef */
  13895. typedef struct {
  13896. __IO uint16_t STCTRLH; /**< Watchdog Status and Control Register High, offset: 0x0 */
  13897. __IO uint16_t STCTRLL; /**< Watchdog Status and Control Register Low, offset: 0x2 */
  13898. __IO uint16_t TOVALH; /**< Watchdog Time-out Value Register High, offset: 0x4 */
  13899. __IO uint16_t TOVALL; /**< Watchdog Time-out Value Register Low, offset: 0x6 */
  13900. __IO uint16_t WINH; /**< Watchdog Window Register High, offset: 0x8 */
  13901. __IO uint16_t WINL; /**< Watchdog Window Register Low, offset: 0xA */
  13902. __IO uint16_t REFRESH; /**< Watchdog Refresh register, offset: 0xC */
  13903. __IO uint16_t UNLOCK; /**< Watchdog Unlock register, offset: 0xE */
  13904. __IO uint16_t TMROUTH; /**< Watchdog Timer Output Register High, offset: 0x10 */
  13905. __IO uint16_t TMROUTL; /**< Watchdog Timer Output Register Low, offset: 0x12 */
  13906. __IO uint16_t RSTCNT; /**< Watchdog Reset Count register, offset: 0x14 */
  13907. __IO uint16_t PRESC; /**< Watchdog Prescaler register, offset: 0x16 */
  13908. } WDOG_Type;
  13909. /* ----------------------------------------------------------------------------
  13910. -- WDOG Register Masks
  13911. ---------------------------------------------------------------------------- */
  13912. /*!
  13913. * @addtogroup WDOG_Register_Masks WDOG Register Masks
  13914. * @{
  13915. */
  13916. /*! @name STCTRLH - Watchdog Status and Control Register High */
  13917. #define WDOG_STCTRLH_WDOGEN_MASK (0x1U)
  13918. #define WDOG_STCTRLH_WDOGEN_SHIFT (0U)
  13919. #define WDOG_STCTRLH_WDOGEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_WDOGEN_SHIFT)) & WDOG_STCTRLH_WDOGEN_MASK)
  13920. #define WDOG_STCTRLH_CLKSRC_MASK (0x2U)
  13921. #define WDOG_STCTRLH_CLKSRC_SHIFT (1U)
  13922. #define WDOG_STCTRLH_CLKSRC(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_CLKSRC_SHIFT)) & WDOG_STCTRLH_CLKSRC_MASK)
  13923. #define WDOG_STCTRLH_IRQRSTEN_MASK (0x4U)
  13924. #define WDOG_STCTRLH_IRQRSTEN_SHIFT (2U)
  13925. #define WDOG_STCTRLH_IRQRSTEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_IRQRSTEN_SHIFT)) & WDOG_STCTRLH_IRQRSTEN_MASK)
  13926. #define WDOG_STCTRLH_WINEN_MASK (0x8U)
  13927. #define WDOG_STCTRLH_WINEN_SHIFT (3U)
  13928. #define WDOG_STCTRLH_WINEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_WINEN_SHIFT)) & WDOG_STCTRLH_WINEN_MASK)
  13929. #define WDOG_STCTRLH_ALLOWUPDATE_MASK (0x10U)
  13930. #define WDOG_STCTRLH_ALLOWUPDATE_SHIFT (4U)
  13931. #define WDOG_STCTRLH_ALLOWUPDATE(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_ALLOWUPDATE_SHIFT)) & WDOG_STCTRLH_ALLOWUPDATE_MASK)
  13932. #define WDOG_STCTRLH_DBGEN_MASK (0x20U)
  13933. #define WDOG_STCTRLH_DBGEN_SHIFT (5U)
  13934. #define WDOG_STCTRLH_DBGEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_DBGEN_SHIFT)) & WDOG_STCTRLH_DBGEN_MASK)
  13935. #define WDOG_STCTRLH_STOPEN_MASK (0x40U)
  13936. #define WDOG_STCTRLH_STOPEN_SHIFT (6U)
  13937. #define WDOG_STCTRLH_STOPEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_STOPEN_SHIFT)) & WDOG_STCTRLH_STOPEN_MASK)
  13938. #define WDOG_STCTRLH_WAITEN_MASK (0x80U)
  13939. #define WDOG_STCTRLH_WAITEN_SHIFT (7U)
  13940. #define WDOG_STCTRLH_WAITEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_WAITEN_SHIFT)) & WDOG_STCTRLH_WAITEN_MASK)
  13941. #define WDOG_STCTRLH_TESTWDOG_MASK (0x400U)
  13942. #define WDOG_STCTRLH_TESTWDOG_SHIFT (10U)
  13943. #define WDOG_STCTRLH_TESTWDOG(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_TESTWDOG_SHIFT)) & WDOG_STCTRLH_TESTWDOG_MASK)
  13944. #define WDOG_STCTRLH_TESTSEL_MASK (0x800U)
  13945. #define WDOG_STCTRLH_TESTSEL_SHIFT (11U)
  13946. #define WDOG_STCTRLH_TESTSEL(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_TESTSEL_SHIFT)) & WDOG_STCTRLH_TESTSEL_MASK)
  13947. #define WDOG_STCTRLH_BYTESEL_MASK (0x3000U)
  13948. #define WDOG_STCTRLH_BYTESEL_SHIFT (12U)
  13949. #define WDOG_STCTRLH_BYTESEL(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_BYTESEL_SHIFT)) & WDOG_STCTRLH_BYTESEL_MASK)
  13950. #define WDOG_STCTRLH_DISTESTWDOG_MASK (0x4000U)
  13951. #define WDOG_STCTRLH_DISTESTWDOG_SHIFT (14U)
  13952. #define WDOG_STCTRLH_DISTESTWDOG(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_DISTESTWDOG_SHIFT)) & WDOG_STCTRLH_DISTESTWDOG_MASK)
  13953. /*! @name STCTRLL - Watchdog Status and Control Register Low */
  13954. #define WDOG_STCTRLL_INTFLG_MASK (0x8000U)
  13955. #define WDOG_STCTRLL_INTFLG_SHIFT (15U)
  13956. #define WDOG_STCTRLL_INTFLG(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLL_INTFLG_SHIFT)) & WDOG_STCTRLL_INTFLG_MASK)
  13957. /*! @name TOVALH - Watchdog Time-out Value Register High */
  13958. #define WDOG_TOVALH_TOVALHIGH_MASK (0xFFFFU)
  13959. #define WDOG_TOVALH_TOVALHIGH_SHIFT (0U)
  13960. #define WDOG_TOVALH_TOVALHIGH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TOVALH_TOVALHIGH_SHIFT)) & WDOG_TOVALH_TOVALHIGH_MASK)
  13961. /*! @name TOVALL - Watchdog Time-out Value Register Low */
  13962. #define WDOG_TOVALL_TOVALLOW_MASK (0xFFFFU)
  13963. #define WDOG_TOVALL_TOVALLOW_SHIFT (0U)
  13964. #define WDOG_TOVALL_TOVALLOW(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TOVALL_TOVALLOW_SHIFT)) & WDOG_TOVALL_TOVALLOW_MASK)
  13965. /*! @name WINH - Watchdog Window Register High */
  13966. #define WDOG_WINH_WINHIGH_MASK (0xFFFFU)
  13967. #define WDOG_WINH_WINHIGH_SHIFT (0U)
  13968. #define WDOG_WINH_WINHIGH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_WINH_WINHIGH_SHIFT)) & WDOG_WINH_WINHIGH_MASK)
  13969. /*! @name WINL - Watchdog Window Register Low */
  13970. #define WDOG_WINL_WINLOW_MASK (0xFFFFU)
  13971. #define WDOG_WINL_WINLOW_SHIFT (0U)
  13972. #define WDOG_WINL_WINLOW(x) (((uint16_t)(((uint16_t)(x)) << WDOG_WINL_WINLOW_SHIFT)) & WDOG_WINL_WINLOW_MASK)
  13973. /*! @name REFRESH - Watchdog Refresh register */
  13974. #define WDOG_REFRESH_WDOGREFRESH_MASK (0xFFFFU)
  13975. #define WDOG_REFRESH_WDOGREFRESH_SHIFT (0U)
  13976. #define WDOG_REFRESH_WDOGREFRESH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_REFRESH_WDOGREFRESH_SHIFT)) & WDOG_REFRESH_WDOGREFRESH_MASK)
  13977. /*! @name UNLOCK - Watchdog Unlock register */
  13978. #define WDOG_UNLOCK_WDOGUNLOCK_MASK (0xFFFFU)
  13979. #define WDOG_UNLOCK_WDOGUNLOCK_SHIFT (0U)
  13980. #define WDOG_UNLOCK_WDOGUNLOCK(x) (((uint16_t)(((uint16_t)(x)) << WDOG_UNLOCK_WDOGUNLOCK_SHIFT)) & WDOG_UNLOCK_WDOGUNLOCK_MASK)
  13981. /*! @name TMROUTH - Watchdog Timer Output Register High */
  13982. #define WDOG_TMROUTH_TIMEROUTHIGH_MASK (0xFFFFU)
  13983. #define WDOG_TMROUTH_TIMEROUTHIGH_SHIFT (0U)
  13984. #define WDOG_TMROUTH_TIMEROUTHIGH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TMROUTH_TIMEROUTHIGH_SHIFT)) & WDOG_TMROUTH_TIMEROUTHIGH_MASK)
  13985. /*! @name TMROUTL - Watchdog Timer Output Register Low */
  13986. #define WDOG_TMROUTL_TIMEROUTLOW_MASK (0xFFFFU)
  13987. #define WDOG_TMROUTL_TIMEROUTLOW_SHIFT (0U)
  13988. #define WDOG_TMROUTL_TIMEROUTLOW(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TMROUTL_TIMEROUTLOW_SHIFT)) & WDOG_TMROUTL_TIMEROUTLOW_MASK)
  13989. /*! @name RSTCNT - Watchdog Reset Count register */
  13990. #define WDOG_RSTCNT_RSTCNT_MASK (0xFFFFU)
  13991. #define WDOG_RSTCNT_RSTCNT_SHIFT (0U)
  13992. #define WDOG_RSTCNT_RSTCNT(x) (((uint16_t)(((uint16_t)(x)) << WDOG_RSTCNT_RSTCNT_SHIFT)) & WDOG_RSTCNT_RSTCNT_MASK)
  13993. /*! @name PRESC - Watchdog Prescaler register */
  13994. #define WDOG_PRESC_PRESCVAL_MASK (0x700U)
  13995. #define WDOG_PRESC_PRESCVAL_SHIFT (8U)
  13996. #define WDOG_PRESC_PRESCVAL(x) (((uint16_t)(((uint16_t)(x)) << WDOG_PRESC_PRESCVAL_SHIFT)) & WDOG_PRESC_PRESCVAL_MASK)
  13997. /*!
  13998. * @}
  13999. */ /* end of group WDOG_Register_Masks */
  14000. /* WDOG - Peripheral instance base addresses */
  14001. /** Peripheral WDOG base address */
  14002. #define WDOG_BASE (0x40052000u)
  14003. /** Peripheral WDOG base pointer */
  14004. #define WDOG ((WDOG_Type *)WDOG_BASE)
  14005. /** Array initializer of WDOG peripheral base addresses */
  14006. #define WDOG_BASE_ADDRS { WDOG_BASE }
  14007. /** Array initializer of WDOG peripheral base pointers */
  14008. #define WDOG_BASE_PTRS { WDOG }
  14009. /** Interrupt vectors for the WDOG peripheral type */
  14010. #define WDOG_IRQS { WDOG_EWM_IRQn }
  14011. /*!
  14012. * @}
  14013. */ /* end of group WDOG_Peripheral_Access_Layer */
  14014. /*
  14015. ** End of section using anonymous unions
  14016. */
  14017. #if defined(__ARMCC_VERSION)
  14018. #if (__ARMCC_VERSION >= 6010050)
  14019. #pragma clang diagnostic pop
  14020. #else
  14021. #pragma pop
  14022. #endif
  14023. #elif defined(__CWCC__)
  14024. #pragma pop
  14025. #elif defined(__GNUC__)
  14026. /* leave anonymous unions enabled */
  14027. #elif defined(__IAR_SYSTEMS_ICC__)
  14028. #pragma language=default
  14029. #else
  14030. #error Not supported compiler type
  14031. #endif
  14032. /*!
  14033. * @}
  14034. */ /* end of group Peripheral_access_layer */
  14035. /* ----------------------------------------------------------------------------
  14036. -- Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
  14037. ---------------------------------------------------------------------------- */
  14038. /*!
  14039. * @addtogroup Bit_Field_Generic_Macros Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
  14040. * @{
  14041. */
  14042. #if defined(__ARMCC_VERSION)
  14043. #if (__ARMCC_VERSION >= 6010050)
  14044. #pragma clang system_header
  14045. #endif
  14046. #elif defined(__IAR_SYSTEMS_ICC__)
  14047. #pragma system_include
  14048. #endif
  14049. /**
  14050. * @brief Mask and left-shift a bit field value for use in a register bit range.
  14051. * @param field Name of the register bit field.
  14052. * @param value Value of the bit field.
  14053. * @return Masked and shifted value.
  14054. */
  14055. #define NXP_VAL2FLD(field, value) (((value) << (field ## _SHIFT)) & (field ## _MASK))
  14056. /**
  14057. * @brief Mask and right-shift a register value to extract a bit field value.
  14058. * @param field Name of the register bit field.
  14059. * @param value Value of the register.
  14060. * @return Masked and shifted bit field value.
  14061. */
  14062. #define NXP_FLD2VAL(field, value) (((value) & (field ## _MASK)) >> (field ## _SHIFT))
  14063. /*!
  14064. * @}
  14065. */ /* end of group Bit_Field_Generic_Macros */
  14066. /* ----------------------------------------------------------------------------
  14067. -- SDK Compatibility
  14068. ---------------------------------------------------------------------------- */
  14069. /*!
  14070. * @addtogroup SDK_Compatibility_Symbols SDK Compatibility
  14071. * @{
  14072. */
  14073. #define PIT0_IRQn PIT0CH0_IRQn
  14074. #define PIT1_IRQn PIT0CH1_IRQn
  14075. #define PIT2_IRQn PIT0CH2_IRQn
  14076. #define PIT3_IRQn PIT0CH3_IRQn
  14077. #define PIT_BASE PIT0_BASE
  14078. #define PIT PIT0
  14079. #define PIT_MCR PIT0_MCR
  14080. #define PIT_LDVAL0 PIT0_LDVAL0
  14081. #define PIT_CVAL0 PIT0_CVAL0
  14082. #define PIT_TCTRL0 PIT0_TCTRL0
  14083. #define PIT_TFLG0 PIT0_TFLG0
  14084. #define PIT_LDVAL1 PIT0_LDVAL1
  14085. #define PIT_CVAL1 PIT0_CVAL1
  14086. #define PIT_TCTRL1 PIT0_TCTRL1
  14087. #define PIT_TFLG1 PIT0_TFLG1
  14088. #define PIT_LDVAL2 PIT0_LDVAL2
  14089. #define PIT_CVAL2 PIT0_CVAL2
  14090. #define PIT_TCTRL2 PIT0_TCTRL2
  14091. #define PIT_TFLG2 PIT0_TFLG2
  14092. #define PIT_LDVAL3 PIT0_LDVAL3
  14093. #define PIT_CVAL3 PIT0_CVAL3
  14094. #define PIT_TCTRL3 PIT0_TCTRL3
  14095. #define PIT_TFLG3 PIT0_TFLG3
  14096. #define PIT_LDVAL(index) PIT0_LDVAL(index)
  14097. #define PIT_CVAL(index) PIT0_CVAL(index)
  14098. #define PIT_TCTRL(index) PIT0_TCTRL(index)
  14099. #define PIT_TFLG(index) PIT0_TFLG(index)
  14100. #define PIT0_IRQHandler PIT0CH0_IRQHandler
  14101. #define PIT1_IRQHandler PIT0CH1_IRQHandler
  14102. #define PIT2_IRQHandler PIT0CH2_IRQHandler
  14103. #define PIT3_IRQHandler PIT0CH3_IRQHandler
  14104. #define DSPI0 SPI0
  14105. #define DSPI1 SPI1
  14106. #define DSPI2 SPI2
  14107. #define DMAMUX0 DMAMUX
  14108. /*!
  14109. * @}
  14110. */ /* end of group SDK_Compatibility_Symbols */
  14111. #endif /* _MK82F25615_H_ */