Teensy 4.1 core updated for C++20
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

5 年前
5 年前
5 年前
5 年前
5 年前
5 年前
5 年前
5 年前
6 年前
6 年前
6 年前
6 年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104
  1. #pragma once
  2. #include <stdint.h>
  3. // Definitions based these documents:
  4. // i.MX RT1050 Reference Manual, Rev. 1, 03/2018
  5. // ARM v7-M Architecture Reference Manual (DDI 0403E.b)
  6. enum IRQ_NUMBER_t {
  7. IRQ_DMA_CH0 = 0,
  8. IRQ_DMA_CH1 = 1,
  9. IRQ_DMA_CH2 = 2,
  10. IRQ_DMA_CH3 = 3,
  11. IRQ_DMA_CH4 = 4,
  12. IRQ_DMA_CH5 = 5,
  13. IRQ_DMA_CH6 = 6,
  14. IRQ_DMA_CH7 = 7,
  15. IRQ_DMA_CH8 = 8,
  16. IRQ_DMA_CH9 = 9,
  17. IRQ_DMA_CH10 = 10,
  18. IRQ_DMA_CH11 = 11,
  19. IRQ_DMA_CH12 = 12,
  20. IRQ_DMA_CH13 = 13,
  21. IRQ_DMA_CH14 = 14,
  22. IRQ_DMA_CH15 = 15,
  23. IRQ_DMA_ERROR = 16,
  24. IRQ_CTI0 = 17,
  25. IRQ_CTI1 = 18,
  26. IRQ_CORE_ERROR = 19, // TODO - name?
  27. IRQ_LPUART1 = 20,
  28. IRQ_LPUART2 = 21,
  29. IRQ_LPUART3 = 22,
  30. IRQ_LPUART4 = 23,
  31. IRQ_LPUART5 = 24,
  32. IRQ_LPUART6 = 25,
  33. IRQ_LPUART7 = 26,
  34. IRQ_LPUART8 = 27,
  35. IRQ_LPI2C1 = 28,
  36. IRQ_LPI2C2 = 29,
  37. IRQ_LPI2C3 = 30,
  38. IRQ_LPI2C4 = 31,
  39. IRQ_LPSPI1 = 32,
  40. IRQ_LPSPI2 = 33,
  41. IRQ_LPSPI3 = 34,
  42. IRQ_LPSPI4 = 35,
  43. IRQ_CAN1 = 36,
  44. IRQ_CAN2 = 37,
  45. IRQ_ADDR_ERR = 38, // TODO: name?
  46. IRQ_KPP = 39,
  47. IRQ_TSC_DIG = 40,
  48. IRQ_GPR_IRQ = 41,
  49. IRQ_LCDIF = 42,
  50. IRQ_CSI = 43,
  51. IRQ_PXP = 44,
  52. IRQ_WDOG2 = 45,
  53. IRQ_SNVS_IRQ = 46,
  54. IRQ_SNVS_SECURITY = 47,
  55. IRQ_SNVS_ONOFF = 48,
  56. IRQ_CSU = 49,
  57. IRQ_DCP0 = 50, // TODO: ???
  58. IRQ_DCP1 = 51, // TODO: ???
  59. IRQ_DCP2 = 52, // TODO: ???
  60. IRQ_TRNG = 53,
  61. IRQ_SJC_IRQ = 54,
  62. IRQ_BEE = 55,
  63. IRQ_SAI1 = 56,
  64. IRQ_SAI2 = 57,
  65. IRQ_SAI3_RX = 58,
  66. IRQ_SAI3_TX = 59,
  67. IRQ_SPDIF = 60,
  68. IRQ_BROWNOUT0 = 61,
  69. IRQ_Reserved1 = 62,
  70. IRQ_TEMPERATURE = 63,
  71. IRQ_TEMPERATURE_PANIC = 64,
  72. IRQ_USBPHY0 = 65,
  73. IRQ_USBPHY1 = 66,
  74. IRQ_ADC1 = 67,
  75. IRQ_ADC2 = 68,
  76. IRQ_DCDC = 69,
  77. IRQ_SOFTWARE = 70,
  78. IRQ_Reserved2 = 71,
  79. IRQ_GPIO1_INT0 = 72,
  80. IRQ_GPIO1_INT1 = 73,
  81. IRQ_GPIO1_INT2 = 74,
  82. IRQ_GPIO1_INT3 = 75,
  83. IRQ_GPIO1_INT4 = 76,
  84. IRQ_GPIO1_INT5 = 77,
  85. IRQ_GPIO1_INT6 = 78,
  86. IRQ_GPIO1_INT7 = 79,
  87. IRQ_GPIO1_0_15 = 80,
  88. IRQ_GPIO1_16_31 = 81,
  89. IRQ_GPIO2_0_15 = 82,
  90. IRQ_GPIO2_16_31 = 83,
  91. IRQ_GPIO3_0_15 = 84,
  92. IRQ_GPIO3_16_31 = 85,
  93. IRQ_GPIO4_0_15 = 86,
  94. IRQ_GPIO4_16_31 = 87,
  95. IRQ_GPIO5_0_15 = 88,
  96. IRQ_GPIO5_16_31 = 89,
  97. IRQ_FLEXIO1 = 90,
  98. IRQ_FLEXIO2 = 91,
  99. IRQ_WDOG1 = 92,
  100. IRQ_RTWDOG = 93,
  101. IRQ_EWM = 94,
  102. IRQ_CCM1 = 95,
  103. IRQ_CCM2 = 96,
  104. IRQ_GPC = 97,
  105. IRQ_SRC = 98,
  106. IRQ_Reserved3 = 99,
  107. IRQ_GPT1 = 100,
  108. IRQ_GPT2 = 101,
  109. IRQ_FLEXPWM1_0 = 102,
  110. IRQ_FLEXPWM1_1 = 103,
  111. IRQ_FLEXPWM1_2 = 104,
  112. IRQ_FLEXPWM1_3 = 105,
  113. IRQ_FLEXPWM1_FAULT = 106,
  114. IRQ_FLEXSPI2 = 107, // RT1060 only
  115. IRQ_FLEXSPI = 108,
  116. IRQ_SEMC = 109,
  117. IRQ_SDHC1 = 110,
  118. IRQ_SDHC2 = 111,
  119. IRQ_USB2 = 112,
  120. IRQ_USB1 = 113,
  121. IRQ_ENET = 114,
  122. IRQ_ENET_TIMER = 115,
  123. IRQ_XBAR1_01 = 116,
  124. IRQ_XBAR1_23 = 117,
  125. IRQ_ADC_ETC0 = 118,
  126. IRQ_ADC_ETC1 = 119,
  127. IRQ_ADC_ETC2 = 120,
  128. IRQ_ADC_ETC_ERR = 121,
  129. IRQ_PIT = 122,
  130. IRQ_ACMP0 = 123,
  131. IRQ_ACMP1 = 124,
  132. IRQ_ACMP2 = 125,
  133. IRQ_ACMP3 = 126,
  134. IRQ_Reserved4 = 127,
  135. IRQ_Reserved5 = 128,
  136. IRQ_ENC1 = 129,
  137. IRQ_ENC2 = 130,
  138. IRQ_ENC3 = 131,
  139. IRQ_ENC4 = 132,
  140. IRQ_QTIMER1 = 133,
  141. IRQ_QTIMER2 = 134,
  142. IRQ_QTIMER3 = 135,
  143. IRQ_QTIMER4 = 136,
  144. IRQ_FLEXPWM2_0 = 137,
  145. IRQ_FLEXPWM2_1 = 138,
  146. IRQ_FLEXPWM2_2 = 139,
  147. IRQ_FLEXPWM2_3 = 140,
  148. IRQ_FLEXPWM2_FAULT = 141,
  149. IRQ_FLEXPWM3_0 = 142,
  150. IRQ_FLEXPWM3_1 = 143,
  151. IRQ_FLEXPWM3_2 = 144,
  152. IRQ_FLEXPWM3_3 = 145,
  153. IRQ_FLEXPWM3_FAULT = 146,
  154. IRQ_FLEXPWM4_0 = 147,
  155. IRQ_FLEXPWM4_1 = 148,
  156. IRQ_FLEXPWM4_2 = 149,
  157. IRQ_FLEXPWM4_3 = 150,
  158. IRQ_FLEXPWM4_FAULT = 151,
  159. IRQ_ENET2 = 152, // RT1060 only
  160. IRQ_ENET2_TIMER = 153, // RT1060 only
  161. IRQ_CAN3 = 154, // RT1060 only
  162. IRQ_Reserved6 = 155,
  163. IRQ_FLEXIO3 = 156, // RT1060 only
  164. IRQ_GPIO6789 = 157, // RT1060 only
  165. IRQ_SJC_DEBUG = 158,
  166. IRQ_NMI_WAKEUP = 159
  167. };
  168. #define NVIC_NUM_INTERRUPTS 160
  169. #define DMA_NUM_CHANNELS 32
  170. #ifdef __cplusplus
  171. extern "C" void (* _VectorsRam[NVIC_NUM_INTERRUPTS+16])(void);
  172. static inline void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)) __attribute__((always_inline, unused));
  173. static inline void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)) { _VectorsRam[irq + 16] = function; asm volatile("": : :"memory"); }
  174. #else
  175. extern void (* _VectorsRam[NVIC_NUM_INTERRUPTS+16])(void);
  176. static inline void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) __attribute__((always_inline, unused));
  177. static inline void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) { _VectorsRam[irq + 16] = function; asm volatile("": : :"memory"); }
  178. #endif
  179. #define DMAMUX_SOURCE_FLEXIO1_REQUEST0 0
  180. #define DMAMUX_SOURCE_FLEXIO1_REQUEST1 0
  181. #define DMAMUX_SOURCE_FLEXIO2_REQUEST0 1
  182. #define DMAMUX_SOURCE_FLEXIO2_REQUEST1 1
  183. #define DMAMUX_SOURCE_LPUART1_TX 2
  184. #define DMAMUX_SOURCE_LPUART1_RX 3
  185. #define DMAMUX_SOURCE_LPUART3_TX 4
  186. #define DMAMUX_SOURCE_LPUART3_RX 5
  187. #define DMAMUX_SOURCE_LPUART5_TX 6
  188. #define DMAMUX_SOURCE_LPUART5_RX 7
  189. #define DMAMUX_SOURCE_LPUART7_TX 8
  190. #define DMAMUX_SOURCE_LPUART7_RX 9
  191. #define DMAMUX_SOURCE_FLEXCAN3 11
  192. #define DMAMUX_SOURCE_CSI 12
  193. #define DMAMUX_SOURCE_LPSPI1_RX 13
  194. #define DMAMUX_SOURCE_LPSPI1_TX 14
  195. #define DMAMUX_SOURCE_LPSPI3_RX 15
  196. #define DMAMUX_SOURCE_LPSPI3_TX 16
  197. #define DMAMUX_SOURCE_LPI2C1 17
  198. #define DMAMUX_SOURCE_LPI2C3 18
  199. #define DMAMUX_SOURCE_SAI1_RX 19
  200. #define DMAMUX_SOURCE_SAI1_TX 20
  201. #define DMAMUX_SOURCE_SAI2_RX 21
  202. #define DMAMUX_SOURCE_SAI2_TX 22
  203. #define DMAMUX_SOURCE_ADC_ETC 23
  204. #define DMAMUX_SOURCE_ADC1 24
  205. #define DMAMUX_SOURCE_ACMP1 25
  206. #define DMAMUX_SOURCE_ACMP3 26
  207. #define DMAMUX_SOURCE_FLEXSPI_RX 28
  208. #define DMAMUX_SOURCE_FLEXSPI_TX 29
  209. #define DMAMUX_SOURCE_XBAR1_0 30
  210. #define DMAMUX_SOURCE_XBAR1_1 31
  211. #define DMAMUX_SOURCE_FLEXPWM1_READ0 32
  212. #define DMAMUX_SOURCE_FLEXPWM1_READ1 33
  213. #define DMAMUX_SOURCE_FLEXPWM1_READ2 34
  214. #define DMAMUX_SOURCE_FLEXPWM1_READ3 35
  215. #define DMAMUX_SOURCE_FLEXPWM1_WRITE0 36
  216. #define DMAMUX_SOURCE_FLEXPWM1_WRITE1 37
  217. #define DMAMUX_SOURCE_FLEXPWM1_WRITE2 38
  218. #define DMAMUX_SOURCE_FLEXPWM1_WRITE3 39
  219. #define DMAMUX_SOURCE_FLEXPWM3_READ0 40
  220. #define DMAMUX_SOURCE_FLEXPWM3_READ1 41
  221. #define DMAMUX_SOURCE_FLEXPWM3_READ2 42
  222. #define DMAMUX_SOURCE_FLEXPWM3_READ3 43
  223. #define DMAMUX_SOURCE_FLEXPWM3_WRITE0 44
  224. #define DMAMUX_SOURCE_FLEXPWM3_WRITE1 45
  225. #define DMAMUX_SOURCE_FLEXPWM3_WRITE2 46
  226. #define DMAMUX_SOURCE_FLEXPWM3_WRITE3 47
  227. #define DMAMUX_SOURCE_QTIMER1_READ0 48
  228. #define DMAMUX_SOURCE_QTIMER1_READ1 49
  229. #define DMAMUX_SOURCE_QTIMER1_READ2 50
  230. #define DMAMUX_SOURCE_QTIMER1_READ3 51
  231. #define DMAMUX_SOURCE_QTIMER1_WRITE0_CMPLD1 52
  232. #define DMAMUX_SOURCE_QTIMER1_WRITE1_CMPLD1 53
  233. #define DMAMUX_SOURCE_QTIMER1_WRITE2_CMPLD1 54
  234. #define DMAMUX_SOURCE_QTIMER1_WRITE3_CMPLD1 55
  235. #define DMAMUX_SOURCE_QTIMER1_WRITE1_CMPLD2 52
  236. #define DMAMUX_SOURCE_QTIMER1_WRITE0_CMPLD2 53
  237. #define DMAMUX_SOURCE_QTIMER1_WRITE3_CMPLD2 54
  238. #define DMAMUX_SOURCE_QTIMER1_WRITE2_CMPLD2 55
  239. #define DMAMUX_SOURCE_QTIMER3_READ0 56
  240. #define DMAMUX_SOURCE_QTIMER3_READ1 57
  241. #define DMAMUX_SOURCE_QTIMER3_READ2 58
  242. #define DMAMUX_SOURCE_QTIMER3_READ3 59
  243. #define DMAMUX_SOURCE_QTIMER3_WRITE0_CMPLD1 56
  244. #define DMAMUX_SOURCE_QTIMER3_WRITE1_CMPLD1 57
  245. #define DMAMUX_SOURCE_QTIMER3_WRITE2_CMPLD1 58
  246. #define DMAMUX_SOURCE_QTIMER3_WRITE3_CMPLD1 59
  247. #define DMAMUX_SOURCE_QTIMER3_WRITE1_CMPLD2 56
  248. #define DMAMUX_SOURCE_QTIMER3_WRITE0_CMPLD2 57
  249. #define DMAMUX_SOURCE_QTIMER3_WRITE3_CMPLD2 58
  250. #define DMAMUX_SOURCE_QTIMER3_WRITE2_CMPLD2 59
  251. #define DMAMUX_SOURCE_FLEXSPI2_RX 60
  252. #define DMAMUX_SOURCE_FLEXSPI2_TX 61
  253. #define DMAMUX_SOURCE_FLEXIO1_REQUEST2 64
  254. #define DMAMUX_SOURCE_FLEXIO1_REQUEST3 64
  255. #define DMAMUX_SOURCE_FLEXIO2_REQUEST2 65
  256. #define DMAMUX_SOURCE_FLEXIO2_REQUEST3 65
  257. #define DMAMUX_SOURCE_LPUART2_TX 66
  258. #define DMAMUX_SOURCE_LPUART2_RX 67
  259. #define DMAMUX_SOURCE_LPUART4_TX 68
  260. #define DMAMUX_SOURCE_LPUART4_RX 69
  261. #define DMAMUX_SOURCE_LPUART6_TX 70
  262. #define DMAMUX_SOURCE_LPUART6_RX 71
  263. #define DMAMUX_SOURCE_LPUART8_TX 72
  264. #define DMAMUX_SOURCE_LPUART8_RX 73
  265. #define DMAMUX_SOURCE_PXP 75
  266. #define DMAMUX_SOURCE_LCDIF 76
  267. #define DMAMUX_SOURCE_LPSPI2_RX 77
  268. #define DMAMUX_SOURCE_LPSPI2_TX 78
  269. #define DMAMUX_SOURCE_LPSPI4_RX 79
  270. #define DMAMUX_SOURCE_LPSPI4_TX 80
  271. #define DMAMUX_SOURCE_LPI2C2 81
  272. #define DMAMUX_SOURCE_LPI2C4 82
  273. #define DMAMUX_SOURCE_SAI3_RX 83
  274. #define DMAMUX_SOURCE_SAI3_TX 84
  275. #define DMAMUX_SOURCE_SPDIF_RX 85
  276. #define DMAMUX_SOURCE_SPDIF_TX 86
  277. #define DMAMUX_SOURCE_ADC2 88
  278. #define DMAMUX_SOURCE_ACMP2 89
  279. #define DMAMUX_SOURCE_ACMP4 90
  280. #define DMAMUX_SOURCE_ENET1_TIMER0 92
  281. #define DMAMUX_SOURCE_ENET1_TIMER1 93
  282. #define DMAMUX_SOURCE_XBAR1_2 94
  283. #define DMAMUX_SOURCE_XBAR1_3 95
  284. #define DMAMUX_SOURCE_FLEXPWM2_READ0 96
  285. #define DMAMUX_SOURCE_FLEXPWM2_READ1 97
  286. #define DMAMUX_SOURCE_FLEXPWM2_READ2 98
  287. #define DMAMUX_SOURCE_FLEXPWM2_READ3 99
  288. #define DMAMUX_SOURCE_FLEXPWM2_WRITE0 100
  289. #define DMAMUX_SOURCE_FLEXPWM2_WRITE1 101
  290. #define DMAMUX_SOURCE_FLEXPWM2_WRITE2 102
  291. #define DMAMUX_SOURCE_FLEXPWM2_WRITE3 103
  292. #define DMAMUX_SOURCE_FLEXPWM4_READ0 104
  293. #define DMAMUX_SOURCE_FLEXPWM4_READ1 105
  294. #define DMAMUX_SOURCE_FLEXPWM4_READ2 106
  295. #define DMAMUX_SOURCE_FLEXPWM4_READ3 107
  296. #define DMAMUX_SOURCE_FLEXPWM4_WRITE0 108
  297. #define DMAMUX_SOURCE_FLEXPWM4_WRITE1 109
  298. #define DMAMUX_SOURCE_FLEXPWM4_WRITE2 110
  299. #define DMAMUX_SOURCE_FLEXPWM4_WRITE3 111
  300. #define DMAMUX_SOURCE_QTIMER2_READ0 112
  301. #define DMAMUX_SOURCE_QTIMER2_READ1 113
  302. #define DMAMUX_SOURCE_QTIMER2_READ2 114
  303. #define DMAMUX_SOURCE_QTIMER2_READ3 115
  304. #define DMAMUX_SOURCE_QTIMER2_WRITE0_CMPLD1 116
  305. #define DMAMUX_SOURCE_QTIMER2_WRITE1_CMPLD1 117
  306. #define DMAMUX_SOURCE_QTIMER2_WRITE2_CMPLD1 118
  307. #define DMAMUX_SOURCE_QTIMER2_WRITE3_CMPLD1 119
  308. #define DMAMUX_SOURCE_QTIMER2_WRITE1_CMPLD2 116
  309. #define DMAMUX_SOURCE_QTIMER2_WRITE0_CMPLD2 117
  310. #define DMAMUX_SOURCE_QTIMER2_WRITE3_CMPLD2 118
  311. #define DMAMUX_SOURCE_QTIMER2_WRITE2_CMPLD2 119
  312. #define DMAMUX_SOURCE_QTIMER4_READ0 120
  313. #define DMAMUX_SOURCE_QTIMER4_READ1 121
  314. #define DMAMUX_SOURCE_QTIMER4_READ2 122
  315. #define DMAMUX_SOURCE_QTIMER4_READ3 123
  316. #define DMAMUX_SOURCE_QTIMER4_WRITE0_CMPLD1 120
  317. #define DMAMUX_SOURCE_QTIMER4_WRITE1_CMPLD1 121
  318. #define DMAMUX_SOURCE_QTIMER4_WRITE2_CMPLD1 122
  319. #define DMAMUX_SOURCE_QTIMER4_WRITE3_CMPLD1 123
  320. #define DMAMUX_SOURCE_QTIMER4_WRITE1_CMPLD2 120
  321. #define DMAMUX_SOURCE_QTIMER4_WRITE0_CMPLD2 121
  322. #define DMAMUX_SOURCE_QTIMER4_WRITE3_CMPLD2 122
  323. #define DMAMUX_SOURCE_QTIMER4_WRITE2_CMPLD2 123
  324. #define DMAMUX_SOURCE_ENET2_TIMER0 124
  325. #define DMAMUX_SOURCE_ENET2_TIMER1 125
  326. typedef struct {
  327. volatile uint32_t offset000;
  328. volatile uint32_t offset004;
  329. volatile uint32_t offset008;
  330. volatile uint32_t offset00C;
  331. volatile uint32_t offset010;
  332. volatile uint32_t offset014;
  333. volatile uint32_t offset018;
  334. volatile uint32_t offset01C;
  335. volatile uint32_t offset020;
  336. volatile uint32_t offset024;
  337. volatile uint32_t offset028;
  338. volatile uint32_t offset02C;
  339. volatile uint32_t offset030;
  340. volatile uint32_t offset034;
  341. volatile uint32_t offset038;
  342. volatile uint32_t offset03C;
  343. volatile uint32_t offset040;
  344. volatile uint32_t offset044;
  345. volatile uint32_t offset048;
  346. volatile uint32_t offset04C;
  347. volatile uint32_t offset050;
  348. volatile uint32_t offset054;
  349. volatile uint32_t offset058;
  350. volatile uint32_t offset05C;
  351. volatile uint32_t offset060;
  352. volatile uint32_t offset064;
  353. volatile uint32_t offset068;
  354. volatile uint32_t offset06C;
  355. volatile uint32_t offset070;
  356. volatile uint32_t offset074;
  357. volatile uint32_t offset078;
  358. volatile uint32_t offset07C;
  359. volatile uint32_t offset080;
  360. volatile uint32_t offset084;
  361. volatile uint32_t offset088;
  362. volatile uint32_t offset08C;
  363. volatile uint32_t offset090;
  364. volatile uint32_t offset094;
  365. volatile uint32_t offset098;
  366. volatile uint32_t offset09C;
  367. volatile uint32_t offset0A0;
  368. volatile uint32_t offset0A4;
  369. volatile uint32_t offset0A8;
  370. volatile uint32_t offset0AC;
  371. volatile uint32_t offset0B0;
  372. volatile uint32_t offset0B4;
  373. volatile uint32_t offset0B8;
  374. volatile uint32_t offset0BC;
  375. volatile uint32_t offset0C0;
  376. volatile uint32_t offset0C4;
  377. volatile uint32_t offset0C8;
  378. volatile uint32_t offset0CC;
  379. volatile uint32_t offset0D0;
  380. volatile uint32_t offset0D4;
  381. volatile uint32_t offset0D8;
  382. volatile uint32_t offset0DC;
  383. volatile uint32_t offset0E0;
  384. volatile uint32_t offset0E4;
  385. volatile uint32_t offset0E8;
  386. volatile uint32_t offset0EC;
  387. volatile uint32_t offset0F0;
  388. volatile uint32_t offset0F4;
  389. volatile uint32_t offset0F8;
  390. volatile uint32_t offset0FC;
  391. volatile uint32_t offset100;
  392. volatile uint32_t offset104;
  393. volatile uint32_t offset108;
  394. volatile uint32_t offset10C;
  395. volatile uint32_t offset110;
  396. volatile uint32_t offset114;
  397. volatile uint32_t offset118;
  398. volatile uint32_t offset11C;
  399. volatile uint32_t offset120;
  400. volatile uint32_t offset124;
  401. volatile uint32_t offset128;
  402. volatile uint32_t offset12C;
  403. volatile uint32_t offset130;
  404. volatile uint32_t offset134;
  405. volatile uint32_t offset138;
  406. volatile uint32_t offset13C;
  407. volatile uint32_t offset140;
  408. volatile uint32_t offset144;
  409. volatile uint32_t offset148;
  410. volatile uint32_t offset14C;
  411. volatile uint32_t offset150;
  412. volatile uint32_t offset154;
  413. volatile uint32_t offset158;
  414. volatile uint32_t offset15C;
  415. volatile uint32_t offset160;
  416. volatile uint32_t offset164;
  417. volatile uint32_t offset168;
  418. volatile uint32_t offset16C;
  419. volatile uint32_t offset170;
  420. volatile uint32_t offset174;
  421. volatile uint32_t offset178;
  422. volatile uint32_t offset17C;
  423. volatile uint32_t offset180;
  424. volatile uint32_t offset184;
  425. volatile uint32_t offset188;
  426. volatile uint32_t offset18C;
  427. volatile uint32_t offset190;
  428. volatile uint32_t offset194;
  429. volatile uint32_t offset198;
  430. volatile uint32_t offset19C;
  431. volatile uint32_t offset1A0;
  432. volatile uint32_t offset1A4;
  433. volatile uint32_t offset1A8;
  434. volatile uint32_t offset1AC;
  435. volatile uint32_t offset1B0;
  436. volatile uint32_t offset1B4;
  437. volatile uint32_t offset1B8;
  438. volatile uint32_t offset1BC;
  439. volatile uint32_t offset1C0;
  440. volatile uint32_t offset1C4;
  441. volatile uint32_t offset1C8;
  442. volatile uint32_t offset1CC;
  443. volatile uint32_t offset1D0;
  444. volatile uint32_t offset1D4;
  445. volatile uint32_t offset1D8;
  446. volatile uint32_t offset1DC;
  447. volatile uint32_t offset1E0;
  448. volatile uint32_t offset1E4;
  449. volatile uint32_t offset1E8;
  450. volatile uint32_t offset1EC;
  451. volatile uint32_t offset1F0;
  452. volatile uint32_t offset1F4;
  453. volatile uint32_t offset1F8;
  454. volatile uint32_t offset1FC;
  455. volatile uint32_t offset200;
  456. volatile uint32_t offset204;
  457. volatile uint32_t offset208;
  458. volatile uint32_t offset20C;
  459. volatile uint32_t offset210;
  460. volatile uint32_t offset214;
  461. volatile uint32_t offset218;
  462. volatile uint32_t offset21C;
  463. volatile uint32_t offset220;
  464. volatile uint32_t offset224;
  465. volatile uint32_t offset228;
  466. volatile uint32_t offset22C;
  467. volatile uint32_t offset230;
  468. volatile uint32_t offset234;
  469. volatile uint32_t offset238;
  470. volatile uint32_t offset23C;
  471. volatile uint32_t offset240;
  472. volatile uint32_t offset244;
  473. volatile uint32_t offset248;
  474. volatile uint32_t offset24C;
  475. volatile uint32_t offset250;
  476. volatile uint32_t offset254;
  477. volatile uint32_t offset258;
  478. volatile uint32_t offset25C;
  479. volatile uint32_t offset260;
  480. volatile uint32_t offset264;
  481. volatile uint32_t offset268;
  482. volatile uint32_t offset26C;
  483. volatile uint32_t offset270;
  484. volatile uint32_t offset274;
  485. volatile uint32_t offset278;
  486. volatile uint32_t offset27C;
  487. volatile uint32_t offset280;
  488. volatile uint32_t offset284;
  489. volatile uint32_t offset288;
  490. volatile uint32_t offset28C;
  491. volatile uint32_t offset290;
  492. volatile uint32_t offset294;
  493. volatile uint32_t offset298;
  494. volatile uint32_t offset29C;
  495. volatile uint32_t offset2A0;
  496. volatile uint32_t offset2A4;
  497. volatile uint32_t offset2A8;
  498. volatile uint32_t offset2AC;
  499. volatile uint32_t offset2B0;
  500. volatile uint32_t offset2B4;
  501. volatile uint32_t offset2B8;
  502. volatile uint32_t offset2BC;
  503. volatile uint32_t offset2C0;
  504. volatile uint32_t offset2C4;
  505. volatile uint32_t offset2C8;
  506. volatile uint32_t offset2CC;
  507. volatile uint32_t offset2D0;
  508. volatile uint32_t offset2D4;
  509. volatile uint32_t offset2D8;
  510. volatile uint32_t offset2DC;
  511. volatile uint32_t offset2E0;
  512. volatile uint32_t offset2E4;
  513. volatile uint32_t offset2E8;
  514. volatile uint32_t offset2EC;
  515. volatile uint32_t offset2F0;
  516. volatile uint32_t offset2F4;
  517. volatile uint32_t offset2F8;
  518. volatile uint32_t offset2FC;
  519. volatile uint32_t offset300;
  520. volatile uint32_t offset304;
  521. volatile uint32_t offset308;
  522. volatile uint32_t offset30C;
  523. volatile uint32_t offset310;
  524. volatile uint32_t offset314;
  525. volatile uint32_t offset318;
  526. volatile uint32_t offset31C;
  527. volatile uint32_t offset320;
  528. volatile uint32_t offset324;
  529. volatile uint32_t offset328;
  530. volatile uint32_t offset32C;
  531. volatile uint32_t offset330;
  532. volatile uint32_t offset334;
  533. volatile uint32_t offset338;
  534. volatile uint32_t offset33C;
  535. volatile uint32_t offset340;
  536. volatile uint32_t offset344;
  537. volatile uint32_t offset348;
  538. volatile uint32_t offset34C;
  539. volatile uint32_t offset350;
  540. volatile uint32_t offset354;
  541. volatile uint32_t offset358;
  542. volatile uint32_t offset35C;
  543. volatile uint32_t offset360;
  544. volatile uint32_t offset364;
  545. volatile uint32_t offset368;
  546. volatile uint32_t offset36C;
  547. volatile uint32_t offset370;
  548. volatile uint32_t offset374;
  549. volatile uint32_t offset378;
  550. volatile uint32_t offset37C;
  551. volatile uint32_t offset380;
  552. volatile uint32_t offset384;
  553. volatile uint32_t offset388;
  554. volatile uint32_t offset38C;
  555. volatile uint32_t offset390;
  556. volatile uint32_t offset394;
  557. volatile uint32_t offset398;
  558. volatile uint32_t offset39C;
  559. volatile uint32_t offset3A0;
  560. volatile uint32_t offset3A4;
  561. volatile uint32_t offset3A8;
  562. volatile uint32_t offset3AC;
  563. volatile uint32_t offset3B0;
  564. volatile uint32_t offset3B4;
  565. volatile uint32_t offset3B8;
  566. volatile uint32_t offset3BC;
  567. volatile uint32_t offset3C0;
  568. volatile uint32_t offset3C4;
  569. volatile uint32_t offset3C8;
  570. volatile uint32_t offset3CC;
  571. volatile uint32_t offset3D0;
  572. volatile uint32_t offset3D4;
  573. volatile uint32_t offset3D8;
  574. volatile uint32_t offset3DC;
  575. volatile uint32_t offset3E0;
  576. volatile uint32_t offset3E4;
  577. volatile uint32_t offset3E8;
  578. volatile uint32_t offset3EC;
  579. volatile uint32_t offset3F0;
  580. volatile uint32_t offset3F4;
  581. volatile uint32_t offset3F8;
  582. volatile uint32_t offset3FC;
  583. } IMXRT_REGISTER32_t;
  584. typedef struct {
  585. volatile uint16_t offset000;
  586. volatile uint16_t offset002;
  587. volatile uint16_t offset004;
  588. volatile uint16_t offset006;
  589. volatile uint16_t offset008;
  590. volatile uint16_t offset00A;
  591. volatile uint16_t offset00C;
  592. volatile uint16_t offset00E;
  593. volatile uint16_t offset010;
  594. volatile uint16_t offset012;
  595. volatile uint16_t offset014;
  596. volatile uint16_t offset016;
  597. volatile uint16_t offset018;
  598. volatile uint16_t offset01A;
  599. volatile uint16_t offset01C;
  600. volatile uint16_t offset01E;
  601. volatile uint16_t offset020;
  602. volatile uint16_t offset022;
  603. volatile uint16_t offset024;
  604. volatile uint16_t offset026;
  605. volatile uint16_t offset028;
  606. volatile uint16_t offset02A;
  607. volatile uint16_t offset02C;
  608. volatile uint16_t offset02E;
  609. volatile uint16_t offset030;
  610. volatile uint16_t offset032;
  611. volatile uint16_t offset034;
  612. volatile uint16_t offset036;
  613. volatile uint16_t offset038;
  614. volatile uint16_t offset03A;
  615. volatile uint16_t offset03C;
  616. volatile uint16_t offset03E;
  617. volatile uint16_t offset040;
  618. volatile uint16_t offset042;
  619. volatile uint16_t offset044;
  620. volatile uint16_t offset046;
  621. volatile uint16_t offset048;
  622. volatile uint16_t offset04A;
  623. volatile uint16_t offset04C;
  624. volatile uint16_t offset04E;
  625. volatile uint16_t offset050;
  626. volatile uint16_t offset052;
  627. volatile uint16_t offset054;
  628. volatile uint16_t offset056;
  629. volatile uint16_t offset058;
  630. volatile uint16_t offset05A;
  631. volatile uint16_t offset05C;
  632. volatile uint16_t offset05E;
  633. volatile uint16_t offset060;
  634. volatile uint16_t offset062;
  635. volatile uint16_t offset064;
  636. volatile uint16_t offset066;
  637. volatile uint16_t offset068;
  638. volatile uint16_t offset06A;
  639. volatile uint16_t offset06C;
  640. volatile uint16_t offset06E;
  641. volatile uint16_t offset070;
  642. volatile uint16_t offset072;
  643. volatile uint16_t offset074;
  644. volatile uint16_t offset076;
  645. volatile uint16_t offset078;
  646. volatile uint16_t offset07A;
  647. volatile uint16_t offset07C;
  648. volatile uint16_t offset07E;
  649. volatile uint16_t offset080;
  650. volatile uint16_t offset082;
  651. volatile uint16_t offset084;
  652. volatile uint16_t offset086;
  653. volatile uint16_t offset088;
  654. volatile uint16_t offset08A;
  655. volatile uint16_t offset08C;
  656. volatile uint16_t offset08E;
  657. volatile uint16_t offset090;
  658. volatile uint16_t offset092;
  659. volatile uint16_t offset094;
  660. volatile uint16_t offset096;
  661. volatile uint16_t offset098;
  662. volatile uint16_t offset09A;
  663. volatile uint16_t offset09C;
  664. volatile uint16_t offset09E;
  665. volatile uint16_t offset0A0;
  666. volatile uint16_t offset0A2;
  667. volatile uint16_t offset0A4;
  668. volatile uint16_t offset0A6;
  669. volatile uint16_t offset0A8;
  670. volatile uint16_t offset0AA;
  671. volatile uint16_t offset0AC;
  672. volatile uint16_t offset0AE;
  673. volatile uint16_t offset0B0;
  674. volatile uint16_t offset0B2;
  675. volatile uint16_t offset0B4;
  676. volatile uint16_t offset0B6;
  677. volatile uint16_t offset0B8;
  678. volatile uint16_t offset0BA;
  679. volatile uint16_t offset0BC;
  680. volatile uint16_t offset0BE;
  681. volatile uint16_t offset0C0;
  682. volatile uint16_t offset0C2;
  683. volatile uint16_t offset0C4;
  684. volatile uint16_t offset0C6;
  685. volatile uint16_t offset0C8;
  686. volatile uint16_t offset0CA;
  687. volatile uint16_t offset0CC;
  688. volatile uint16_t offset0CE;
  689. volatile uint16_t offset0D0;
  690. volatile uint16_t offset0D2;
  691. volatile uint16_t offset0D4;
  692. volatile uint16_t offset0D6;
  693. volatile uint16_t offset0D8;
  694. volatile uint16_t offset0DA;
  695. volatile uint16_t offset0DC;
  696. volatile uint16_t offset0DE;
  697. volatile uint16_t offset0E0;
  698. volatile uint16_t offset0E2;
  699. volatile uint16_t offset0E4;
  700. volatile uint16_t offset0E6;
  701. volatile uint16_t offset0E8;
  702. volatile uint16_t offset0EA;
  703. volatile uint16_t offset0EC;
  704. volatile uint16_t offset0EE;
  705. volatile uint16_t offset0F0;
  706. volatile uint16_t offset0F2;
  707. volatile uint16_t offset0F4;
  708. volatile uint16_t offset0F6;
  709. volatile uint16_t offset0F8;
  710. volatile uint16_t offset0FA;
  711. volatile uint16_t offset0FC;
  712. volatile uint16_t offset0FE;
  713. volatile uint16_t offset100;
  714. volatile uint16_t offset102;
  715. volatile uint16_t offset104;
  716. volatile uint16_t offset106;
  717. volatile uint16_t offset108;
  718. volatile uint16_t offset10A;
  719. volatile uint16_t offset10C;
  720. volatile uint16_t offset10E;
  721. volatile uint16_t offset110;
  722. volatile uint16_t offset112;
  723. volatile uint16_t offset114;
  724. volatile uint16_t offset116;
  725. volatile uint16_t offset118;
  726. volatile uint16_t offset11A;
  727. volatile uint16_t offset11C;
  728. volatile uint16_t offset11E;
  729. volatile uint16_t offset120;
  730. volatile uint16_t offset122;
  731. volatile uint16_t offset124;
  732. volatile uint16_t offset126;
  733. volatile uint16_t offset128;
  734. volatile uint16_t offset12A;
  735. volatile uint16_t offset12C;
  736. volatile uint16_t offset12E;
  737. volatile uint16_t offset130;
  738. volatile uint16_t offset132;
  739. volatile uint16_t offset134;
  740. volatile uint16_t offset136;
  741. volatile uint16_t offset138;
  742. volatile uint16_t offset13A;
  743. volatile uint16_t offset13C;
  744. volatile uint16_t offset13E;
  745. volatile uint16_t offset140;
  746. volatile uint16_t offset142;
  747. volatile uint16_t offset144;
  748. volatile uint16_t offset146;
  749. volatile uint16_t offset148;
  750. volatile uint16_t offset14A;
  751. volatile uint16_t offset14C;
  752. volatile uint16_t offset14E;
  753. volatile uint16_t offset150;
  754. volatile uint16_t offset152;
  755. volatile uint16_t offset154;
  756. volatile uint16_t offset156;
  757. volatile uint16_t offset158;
  758. volatile uint16_t offset15A;
  759. volatile uint16_t offset15C;
  760. volatile uint16_t offset15E;
  761. volatile uint16_t offset160;
  762. volatile uint16_t offset162;
  763. volatile uint16_t offset164;
  764. volatile uint16_t offset166;
  765. volatile uint16_t offset168;
  766. volatile uint16_t offset16A;
  767. volatile uint16_t offset16C;
  768. volatile uint16_t offset16E;
  769. volatile uint16_t offset170;
  770. volatile uint16_t offset172;
  771. volatile uint16_t offset174;
  772. volatile uint16_t offset176;
  773. volatile uint16_t offset178;
  774. volatile uint16_t offset17A;
  775. volatile uint16_t offset17C;
  776. volatile uint16_t offset17E;
  777. volatile uint16_t offset180;
  778. volatile uint16_t offset182;
  779. volatile uint16_t offset184;
  780. volatile uint16_t offset186;
  781. volatile uint16_t offset188;
  782. volatile uint16_t offset18A;
  783. volatile uint16_t offset18C;
  784. volatile uint16_t offset18E;
  785. volatile uint16_t offset190;
  786. volatile uint16_t offset192;
  787. volatile uint16_t offset194;
  788. volatile uint16_t offset196;
  789. volatile uint16_t offset198;
  790. volatile uint16_t offset19A;
  791. volatile uint16_t offset19C;
  792. volatile uint16_t offset19E;
  793. volatile uint16_t offset1A0;
  794. volatile uint16_t offset1A2;
  795. volatile uint16_t offset1A4;
  796. volatile uint16_t offset1A6;
  797. volatile uint16_t offset1A8;
  798. volatile uint16_t offset1AA;
  799. volatile uint16_t offset1AC;
  800. volatile uint16_t offset1AE;
  801. volatile uint16_t offset1B0;
  802. volatile uint16_t offset1B2;
  803. volatile uint16_t offset1B4;
  804. volatile uint16_t offset1B6;
  805. volatile uint16_t offset1B8;
  806. volatile uint16_t offset1BA;
  807. volatile uint16_t offset1BC;
  808. volatile uint16_t offset1BE;
  809. volatile uint16_t offset1C0;
  810. volatile uint16_t offset1C2;
  811. volatile uint16_t offset1C4;
  812. volatile uint16_t offset1C6;
  813. volatile uint16_t offset1C8;
  814. volatile uint16_t offset1CA;
  815. volatile uint16_t offset1CC;
  816. volatile uint16_t offset1CE;
  817. volatile uint16_t offset1D0;
  818. volatile uint16_t offset1D2;
  819. volatile uint16_t offset1D4;
  820. volatile uint16_t offset1D6;
  821. volatile uint16_t offset1D8;
  822. volatile uint16_t offset1DA;
  823. volatile uint16_t offset1DC;
  824. volatile uint16_t offset1DE;
  825. volatile uint16_t offset1E0;
  826. volatile uint16_t offset1E2;
  827. volatile uint16_t offset1E4;
  828. volatile uint16_t offset1E6;
  829. volatile uint16_t offset1E8;
  830. volatile uint16_t offset1EA;
  831. volatile uint16_t offset1EC;
  832. volatile uint16_t offset1EE;
  833. volatile uint16_t offset1F0;
  834. volatile uint16_t offset1F2;
  835. volatile uint16_t offset1F4;
  836. volatile uint16_t offset1F6;
  837. volatile uint16_t offset1F8;
  838. volatile uint16_t offset1FA;
  839. volatile uint16_t offset1FC;
  840. volatile uint16_t offset1FE;
  841. } IMXRT_REGISTER16_t;
  842. typedef struct {
  843. volatile uint8_t offset00;
  844. volatile uint8_t offset01;
  845. volatile uint8_t offset02;
  846. volatile uint8_t offset03;
  847. volatile uint8_t offset04;
  848. volatile uint8_t offset05;
  849. volatile uint8_t offset06;
  850. volatile uint8_t offset07;
  851. volatile uint8_t offset08;
  852. volatile uint8_t offset09;
  853. volatile uint8_t offset0A;
  854. volatile uint8_t offset0B;
  855. volatile uint8_t offset0C;
  856. volatile uint8_t offset0D;
  857. volatile uint8_t offset0E;
  858. volatile uint8_t offset0F;
  859. } IMXRT_REGISTER8_t;
  860. // 13.3: page 456
  861. #define IMXRT_CMP1 (*(IMXRT_REGISTER8_t *)0x40094000)
  862. #define CMP1_CR0 (IMXRT_CMP1.offset00)
  863. #define CMP1_CR1 (IMXRT_CMP1.offset01)
  864. #define CMP1_FPR (IMXRT_CMP1.offset02)
  865. #define CMP1_SCR (IMXRT_CMP1.offset03)
  866. #define CMP1_DACCR (IMXRT_CMP1.offset04)
  867. #define CMP1_MUXCR (IMXRT_CMP1.offset05)
  868. #define IMXRT_CMP2 (*(IMXRT_REGISTER8_t *)0x40094008)
  869. #define CMP2_CR0 (IMXRT_CMP2.offset00)
  870. #define CMP2_CR1 (IMXRT_CMP2.offset01)
  871. #define CMP2_FPR (IMXRT_CMP2.offset02)
  872. #define CMP2_SCR (IMXRT_CMP2.offset03)
  873. #define CMP2_DACCR (IMXRT_CMP2.offset04)
  874. #define CMP2_MUXCR (IMXRT_CMP2.offset05)
  875. #define IMXRT_CMP3 (*(IMXRT_REGISTER8_t *)0x40094010)
  876. #define CMP3_CR0 (IMXRT_CMP3.offset00)
  877. #define CMP3_CR1 (IMXRT_CMP3.offset01)
  878. #define CMP3_FPR (IMXRT_CMP3.offset02)
  879. #define CMP3_SCR (IMXRT_CMP3.offset03)
  880. #define CMP3_DACCR (IMXRT_CMP3.offset04)
  881. #define CMP3_MUXCR (IMXRT_CMP3.offset05)
  882. #define IMXRT_CMP4 (*(IMXRT_REGISTER8_t *)0x40094018)
  883. #define CMP4_CR0 (IMXRT_CMP4.offset00)
  884. #define CMP4_CR1 (IMXRT_CMP4.offset01)
  885. #define CMP4_FPR (IMXRT_CMP4.offset02)
  886. #define CMP4_SCR (IMXRT_CMP4.offset03)
  887. #define CMP4_DACCR (IMXRT_CMP4.offset04)
  888. #define CMP4_MUXCR (IMXRT_CMP4.offset05)
  889. // 65.8 page 3480 (new 1062RM)
  890. typedef struct {
  891. volatile uint32_t HC0;
  892. volatile uint32_t HC1;
  893. volatile uint32_t HC2;
  894. volatile uint32_t HC3;
  895. volatile uint32_t HC4;
  896. volatile uint32_t HC5;
  897. volatile uint32_t HC6;
  898. volatile uint32_t HC7;
  899. volatile uint32_t HS;
  900. volatile uint32_t R0;
  901. volatile uint32_t R1;
  902. volatile uint32_t R2;
  903. volatile uint32_t R3;
  904. volatile uint32_t R4;
  905. volatile uint32_t R5;
  906. volatile uint32_t R6;
  907. volatile uint32_t R7;
  908. volatile uint32_t CFG;
  909. volatile uint32_t GC;
  910. volatile uint32_t GS;
  911. volatile uint32_t CV;
  912. volatile uint32_t OFS;
  913. volatile uint32_t CAL;
  914. } IMXRT_ADCS_t;
  915. #define IMXRT_ADC1 (*(IMXRT_ADCS_t *)0x400C4000)
  916. #define IMXRT_ADC1S (*(IMXRT_ADCS_t *)0x400C4000)
  917. #define ADC1_HC0 (IMXRT_ADC1.HC0)
  918. #define ADC1_HC1 (IMXRT_ADC1.HC1)
  919. #define ADC1_HC2 (IMXRT_ADC1.HC2)
  920. #define ADC1_HC3 (IMXRT_ADC1.HC3)
  921. #define ADC1_HC4 (IMXRT_ADC1.HC4)
  922. #define ADC1_HC5 (IMXRT_ADC1.HC5)
  923. #define ADC1_HC6 (IMXRT_ADC1.HC6)
  924. #define ADC1_HC7 (IMXRT_ADC1.HC7)
  925. #define ADC1_HS (IMXRT_ADC1.HS)
  926. #define ADC1_R0 (IMXRT_ADC1.R0)
  927. #define ADC1_R1 (IMXRT_ADC1.R1)
  928. #define ADC1_R2 (IMXRT_ADC1.R2)
  929. #define ADC1_R3 (IMXRT_ADC1.R3)
  930. #define ADC1_R4 (IMXRT_ADC1.R4)
  931. #define ADC1_R5 (IMXRT_ADC1.R5)
  932. #define ADC1_R6 (IMXRT_ADC1.R6)
  933. #define ADC1_R7 (IMXRT_ADC1.R7)
  934. #define ADC1_CFG (IMXRT_ADC1.CFG)
  935. #define ADC1_GC (IMXRT_ADC1.GC)
  936. #define ADC1_GS (IMXRT_ADC1.GS)
  937. #define ADC1_CV (IMXRT_ADC1.CV)
  938. #define ADC1_OFS (IMXRT_ADC1.OFS)
  939. #define ADC1_CAL (IMXRT_ADC1.CAL)
  940. #define IMXRT_ADC2 (*(IMXRT_ADCS_t *)0x400C8000)
  941. #define IMXRT_ADC2S (*(IMXRT_ADCS_t *)0x400C8000)
  942. #define ADC2_HC0 (IMXRT_ADC2.HC0)
  943. #define ADC2_HC1 (IMXRT_ADC2.HC1)
  944. #define ADC2_HC2 (IMXRT_ADC2.HC2)
  945. #define ADC2_HC3 (IMXRT_ADC2.HC3)
  946. #define ADC2_HC4 (IMXRT_ADC2.HC4)
  947. #define ADC2_HC5 (IMXRT_ADC2.HC5)
  948. #define ADC2_HC6 (IMXRT_ADC2.HC6)
  949. #define ADC2_HC7 (IMXRT_ADC2.HC7)
  950. #define ADC2_HS (IMXRT_ADC2.HS)
  951. #define ADC2_R0 (IMXRT_ADC2.R0)
  952. #define ADC2_R1 (IMXRT_ADC2.R1)
  953. #define ADC2_R2 (IMXRT_ADC2.R2)
  954. #define ADC2_R3 (IMXRT_ADC2.R3)
  955. #define ADC2_R4 (IMXRT_ADC2.R4)
  956. #define ADC2_R5 (IMXRT_ADC2.R5)
  957. #define ADC2_R6 (IMXRT_ADC2.R6)
  958. #define ADC2_R7 (IMXRT_ADC2.R7)
  959. #define ADC2_CFG (IMXRT_ADC2.CFG)
  960. #define ADC2_GC (IMXRT_ADC2.GC)
  961. #define ADC2_GS (IMXRT_ADC2.GS)
  962. #define ADC2_CV (IMXRT_ADC2.CV)
  963. #define ADC2_OFS (IMXRT_ADC2.OFS)
  964. #define ADC2_CAL (IMXRT_ADC2.CAL)
  965. #define ADC_HC_AIEN ((uint32_t)(1<<7))
  966. #define ADC_HC_ADCH(n) ((uint32_t)(((n) & 0x1F) << 0))
  967. #define ADC_HS_COCO0 ((uint32_t)(1<<0))
  968. #define ADC_CFG_OVWREN ((uint32_t)(1<<16))
  969. #define ADC_CFG_AVGS(n) ((uint32_t)(((n) & 0x03) << 14))
  970. #define ADC_CFG_ADTRG ((uint32_t)(1<<13))
  971. #define ADC_CFG_REFSEL(n) ((uint32_t)(((n) & 0x03) << 11))
  972. #define ADC_CFG_ADHSC ((uint32_t)(1<<10))
  973. #define ADC_CFG_ADSTS(n) ((uint32_t)(((n) & 0x03) << 8))
  974. #define ADC_CFG_ADLPC ((uint32_t)(1<<7))
  975. #define ADC_CFG_ADIV(n) ((uint32_t)(((n) & 0x03) << 5))
  976. #define ADC_CFG_ADLSMP ((uint32_t)(1<<4))
  977. #define ADC_CFG_MODE(n) ((uint32_t)(((n) & 0x03) << 2))
  978. #define ADC_CFG_ADICLK(n) ((uint32_t)(((n) & 0x03) << 0))
  979. #define ADC_GC_CAL ((uint32_t)(1<<7))
  980. #define ADC_GC_ADCO ((uint32_t)(1<<6))
  981. #define ADC_GC_AVGE ((uint32_t)(1<<5))
  982. #define ADC_GC_ACFE ((uint32_t)(1<<4))
  983. #define ADC_GC_ACFGT ((uint32_t)(1<<3))
  984. #define ADC_GC_ACREN ((uint32_t)(1<<2))
  985. #define ADC_GC_DMAEN ((uint32_t)(1<<1))
  986. #define ADC_GC_ADACKEN ((uint32_t)(1<<0))
  987. #define ADC_GS_AWKST ((uint32_t)(1<<2))
  988. #define ADC_GS_CALF ((uint32_t)(1<<1))
  989. #define ADC_GS_ADACT ((uint32_t)(1<<0))
  990. #define ADC_CV_CV2(n) ((uint32_t)(((n) & 0xFFF) << 16))
  991. #define ADC_CV_CV1(n) ((uint32_t)(((n) & 0xFFF) << 0))
  992. #define ADC_OFS_SIGN ((uint32_t)(1<<12))
  993. #define ADC_OFS_OFS(n) ((uint32_t)(((n) & 0xFFF) << 0))
  994. #define ADC_CAL_CAL_CODE(n) ((uint32_t)(((n) & 0x0F) << 0))
  995. // 66.5.1 Page 3504
  996. typedef struct {
  997. volatile uint32_t CTRL; // offset 0
  998. volatile uint32_t DONE0_1_IRQ; // offset004
  999. volatile uint32_t DONE2_ERR_IRQ; // offset008
  1000. volatile uint32_t DMA_CTRL; // offset00C
  1001. struct {
  1002. volatile uint32_t CTRL; //offset010
  1003. volatile uint32_t COUNTER; //offset014
  1004. volatile uint32_t CHAIN_1_0;
  1005. volatile uint32_t CHAIN_3_2;
  1006. volatile uint32_t CHAIN_5_4;
  1007. volatile uint32_t CHAIN_7_6;
  1008. volatile uint32_t RESULT_1_0;
  1009. volatile uint32_t RESULT_3_2;
  1010. volatile uint32_t RESULT_5_4;
  1011. volatile uint32_t RESULT_7_6;
  1012. } TRIG[7];
  1013. } IMXRT_ADC_ETC_t;
  1014. #define IMXRT_ADC_ETC (*(IMXRT_ADC_ETC_t *)0x403B0000)
  1015. #define ADC_ETC_CTRL (IMXRT_ADC_ETC.CTRL)
  1016. #define ADC_ETC_DONE0_1_IRQ (IMXRT_ADC_ETC.DONE0_1_IRQ)
  1017. #define ADC_ETC_DONE2_ERR_IRQ (IMXRT_ADC_ETC.DONE2_ERR_IRQ)
  1018. #define ADC_ETC_DMA_CTRL (IMXRT_ADC_ETC.DMA_CTRL)
  1019. #define ADC_ETC_TRIG0_CTRL (IMXRT_ADC_ETC.TRIG[0].CTRL)
  1020. #define ADC_ETC_TRIG0_COUNTER (IMXRT_ADC_ETC.TRIG[0].COUNTER)
  1021. #define ADC_ETC_TRIG0_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[0].CHAIN_1_0)
  1022. #define ADC_ETC_TRIG0_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[0].CHAIN_3_2)
  1023. #define ADC_ETC_TRIG0_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[0].CHAIN_5_4)
  1024. #define ADC_ETC_TRIG0_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[0].CHAIN_7_6)
  1025. #define ADC_ETC_TRIG0_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[0].RESULT_1_0)
  1026. #define ADC_ETC_TRIG0_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[0].RESULT_3_2)
  1027. #define ADC_ETC_TRIG0_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[0].RESULT_5_4)
  1028. #define ADC_ETC_TRIG0_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[0].RESULT_7_6)
  1029. #define ADC_ETC_TRIG1_CTRL (IMXRT_ADC_ETC.TRIG[1].CTRL)
  1030. #define ADC_ETC_TRIG1_COUNTER (IMXRT_ADC_ETC.TRIG[1].COUNTER)
  1031. #define ADC_ETC_TRIG1_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[1].CHAIN_1_0)
  1032. #define ADC_ETC_TRIG1_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[1].CHAIN_3_2)
  1033. #define ADC_ETC_TRIG1_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[1].CHAIN_5_4)
  1034. #define ADC_ETC_TRIG1_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[1].CHAIN_7_6)
  1035. #define ADC_ETC_TRIG1_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[1].RESULT_1_0)
  1036. #define ADC_ETC_TRIG1_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[1].RESULT_3_2)
  1037. #define ADC_ETC_TRIG1_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[1].RESULT_5_4)
  1038. #define ADC_ETC_TRIG1_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[1].RESULT_7_6)
  1039. #define ADC_ETC_TRIG2_CTRL (IMXRT_ADC_ETC.TRIG[2].CTRL)
  1040. #define ADC_ETC_TRIG2_COUNTER (IMXRT_ADC_ETC.TRIG[2].COUNTER)
  1041. #define ADC_ETC_TRIG2_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[2].CHAIN_1_0)
  1042. #define ADC_ETC_TRIG2_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[2].CHAIN_3_2)
  1043. #define ADC_ETC_TRIG2_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[2].CHAIN_5_4)
  1044. #define ADC_ETC_TRIG2_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[2].CHAIN_7_6)
  1045. #define ADC_ETC_TRIG2_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[2].RESULT_1_0)
  1046. #define ADC_ETC_TRIG2_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[2].RESULT_3_2)
  1047. #define ADC_ETC_TRIG2_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[2].RESULT_5_4)
  1048. #define ADC_ETC_TRIG2_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[2].RESULT_7_6)
  1049. #define ADC_ETC_TRIG3_CTRL (IMXRT_ADC_ETC.TRIG[3].CTRL)
  1050. #define ADC_ETC_TRIG3_COUNTER (IMXRT_ADC_ETC.TRIG[3].COUNTER)
  1051. #define ADC_ETC_TRIG3_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[3].CHAIN_1_0)
  1052. #define ADC_ETC_TRIG3_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[3].CHAIN_3_2)
  1053. #define ADC_ETC_TRIG3_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[3].CHAIN_5_4)
  1054. #define ADC_ETC_TRIG3_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[3].CHAIN_7_6)
  1055. #define ADC_ETC_TRIG3_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[3].RESULT_1_0)
  1056. #define ADC_ETC_TRIG3_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[3].RESULT_3_2)
  1057. #define ADC_ETC_TRIG3_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[3].RESULT_5_4)
  1058. #define ADC_ETC_TRIG3_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[3].RESULT_7_6)
  1059. #define ADC_ETC_TRIG4_CTRL (IMXRT_ADC_ETC.TRIG[4].CTRL)
  1060. #define ADC_ETC_TRIG4_COUNTER (IMXRT_ADC_ETC.TRIG[4].COUNTER)
  1061. #define ADC_ETC_TRIG4_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[4].CHAIN_1_0)
  1062. #define ADC_ETC_TRIG4_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[4].CHAIN_3_2)
  1063. #define ADC_ETC_TRIG4_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[4].CHAIN_5_4)
  1064. #define ADC_ETC_TRIG4_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[4].CHAIN_7_6)
  1065. #define ADC_ETC_TRIG4_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[4].RESULT_1_0)
  1066. #define ADC_ETC_TRIG4_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[4].RESULT_3_2)
  1067. #define ADC_ETC_TRIG4_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[4].RESULT_5_4)
  1068. #define ADC_ETC_TRIG4_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[4].RESULT_7_6)
  1069. #define ADC_ETC_TRIG5_CTRL (IMXRT_ADC_ETC.TRIG[5].CTRL)
  1070. #define ADC_ETC_TRIG5_COUNTER (IMXRT_ADC_ETC.TRIG[5].COUNTER)
  1071. #define ADC_ETC_TRIG5_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[5].CHAIN_1_0)
  1072. #define ADC_ETC_TRIG5_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[5].CHAIN_3_2)
  1073. #define ADC_ETC_TRIG5_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[5].CHAIN_5_4)
  1074. #define ADC_ETC_TRIG5_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[5].CHAIN_7_6)
  1075. #define ADC_ETC_TRIG5_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[5].RESULT_1_0)
  1076. #define ADC_ETC_TRIG5_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[5].RESULT_3_2)
  1077. #define ADC_ETC_TRIG5_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[5].RESULT_5_4)
  1078. #define ADC_ETC_TRIG5_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[5].RESULT_7_6)
  1079. #define ADC_ETC_TRIG6_CTRL (IMXRT_ADC_ETC.TRIG[6].CTRL)
  1080. #define ADC_ETC_TRIG6_COUNTER (IMXRT_ADC_ETC.TRIG[6].COUNTER)
  1081. #define ADC_ETC_TRIG6_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[6].CHAIN_1_0)
  1082. #define ADC_ETC_TRIG6_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[6].CHAIN_3_2)
  1083. #define ADC_ETC_TRIG6_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[6].CHAIN_5_4)
  1084. #define ADC_ETC_TRIG6_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[6].CHAIN_7_6)
  1085. #define ADC_ETC_TRIG6_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[6].RESULT_1_0)
  1086. #define ADC_ETC_TRIG6_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[6].RESULT_3_2)
  1087. #define ADC_ETC_TRIG6_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[6].RESULT_5_4)
  1088. #define ADC_ETC_TRIG6_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[6].RESULT_7_6)
  1089. #define ADC_ETC_TRIG7_CTRL (IMXRT_ADC_ETC.TRIG[7].CTRL)
  1090. #define ADC_ETC_TRIG7_COUNTER (IMXRT_ADC_ETC.TRIG[7].COUNTER)
  1091. #define ADC_ETC_TRIG7_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[7].CHAIN_1_0)
  1092. #define ADC_ETC_TRIG7_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[7].CHAIN_3_2)
  1093. #define ADC_ETC_TRIG7_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[7].CHAIN_5_4)
  1094. #define ADC_ETC_TRIG7_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[7].CHAIN_7_6)
  1095. #define ADC_ETC_TRIG7_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[7].RESULT_1_0)
  1096. #define ADC_ETC_TRIG7_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[7].RESULT_3_2)
  1097. #define ADC_ETC_TRIG7_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[7].RESULT_5_4)
  1098. #define ADC_ETC_TRIG7_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[7].RESULT_7_6)
  1099. #define ADC_ETC_CTRL_SOFTRST ((uint32_t)(1<<31))
  1100. #define ADC_ETC_CTRL_TSC_BYPASS ((uint32_t)(1<<30))
  1101. #define ADC_ETC_CTRL_DMA_MODE_SEL ((uint32_t)(1<<29))
  1102. #define ADC_ETC_CTRL_PRE_DIVIDER(n) ((uint32_t)(((n) & 0xff) << 16))
  1103. #define ADC_ETC_CTRL_EXT1_TRIG_PRIORITY(n) ((uint32_t)(((n) & 0x07) << 13))
  1104. #define ADC_ETC_CTRL_EXT1_TRIG_ENABLE ((uint32_t)(1<<12))
  1105. #define ADC_ETC_CTRL_EXT0_TRIG_PRIORITY(n) ((uint32_t)(((n) & 0x07) << 9))
  1106. #define ADC_ETC_CTRL_EXT0_TRIG_ENABLE ((uint32_t)(1<<8))
  1107. #define ADC_ETC_CTRL_TRIG_ENABLE(n) ((uint32_t)(((n) & 0xff) << 0))
  1108. #define ADC_ETC_DONE0_1_IRQ_TRIG_DONE1(n) ((uint32_t)(1<<(16 + ((n) &0x7)))
  1109. #define ADC_ETC_DONE0_1_IRQ_TRIG_DONE0(n) ((uint32_t)(1<<((n) &0x7)))
  1110. #define ADC_ETC_DONE2_ERR_IRQ_TRIG_ERR(n) ((uint32_t)(1<<(16 + ((n) &0x7)))
  1111. #define ADC_ETC_DONE2_ERR_IRQ_TRIG_DONE2(n) ((uint32_t)(1<<((n) &0x7)))
  1112. #define ADC_ETC_DMA_CTRL_TRIQ_REQ(n) ((uint32_t)(1<<(16 + ((n) &0x7)))
  1113. #define ADC_ETC_DMA_CTRL_TRIQ_ENABLE(n) ((uint32_t)(1<<((n) &0x7)))
  1114. // For each TRIG elements in array
  1115. #define ADC_ETC_TRIG_CTRL_SYNC_MODE ((uint32_t)(1<<16))
  1116. #define ADC_ETC_TRIG_CTRL_TRIG_PRIORITY(n) ((uint32_t)(((n) & 0x07) << 12))
  1117. #define ADC_ETC_TRIG_CTRL_TRIG_CHAIN(n) ((uint32_t)(((n) & 0x07) << 8))
  1118. #define ADC_ETC_TRIG_CTRL_TRIG_MODE ((uint32_t)(1<<4))
  1119. #define ADC_ETC_TRIG_CTRL_SW_TRIG ((uint32_t)(1<<0))
  1120. #define ADC_ETC_TRIG_COUNTER_SAMPLE_INTERVAL(n) ((uint32_t)(((n) & 0xff) << 16))
  1121. #define ADC_ETC_TRIG_COUNTER_INIT_DELAY(n) ((uint32_t)(((n) & 0xff) << 0))
  1122. #define ADC_ETC_TRIG_CHAIN_IE1(n) ((uint32_t)(((n) & 0x03) << 29))
  1123. #define ADC_ETC_TRIG_CHAIN_B2B1 ((uint32_t)(1<<28))
  1124. #define ADC_ETC_TRIG_CHAIN_HWTS1(n) ((uint32_t)(((n) & 0xff) << 20))
  1125. #define ADC_ETC_TRIG_CHAIN_CSEL1(n) ((uint32_t)(((n) & 0x0f) << 16))
  1126. #define ADC_ETC_TRIG_CHAIN_IE0(n) ((uint32_t)(((n) & 0x03) << 13))
  1127. #define ADC_ETC_TRIG_CHAIN_B2B0 ((uint32_t)(1<<12))
  1128. #define ADC_ETC_TRIG_CHAIN_HWTS0(n) ((uint32_t)(((n) & 0xff) << 4))
  1129. #define ADC_ETC_TRIG_CHAIN_CSEL0(n) ((uint32_t)(((n) & 0x0f) << 0))
  1130. #define ADC_ETC_TRIG_RESULT_DATA1(n) ((uint32_t)(((n) & 0xff) << 16))
  1131. #define ADC_ETC_TRIG_RESULT_DATA0(n) ((uint32_t)(((n) & 0xff) << 0))
  1132. // 16.7: page 640
  1133. #define IMXRT_AIPSTZ1 (*(IMXRT_REGISTER32_t *)0x4007C000)
  1134. #define AIPSTZ1_MPR (IMXRT_AIPSTZ1.offset000)
  1135. #define AIPSTZ1_OPACR (IMXRT_AIPSTZ1.offset040)
  1136. #define AIPSTZ1_OPACR1 (IMXRT_AIPSTZ1.offset044)
  1137. #define AIPSTZ1_OPACR2 (IMXRT_AIPSTZ1.offset048)
  1138. #define AIPSTZ1_OPACR3 (IMXRT_AIPSTZ1.offset04C)
  1139. #define AIPSTZ1_OPACR4 (IMXRT_AIPSTZ1.offset050)
  1140. #define IMXRT_AIPSTZ2 (*(IMXRT_REGISTER32_t *)0x4017C000)
  1141. #define AIPSTZ2_MPR (IMXRT_AIPSTZ2.offset000)
  1142. #define AIPSTZ2_OPACR (IMXRT_AIPSTZ2.offset040)
  1143. #define AIPSTZ2_OPACR1 (IMXRT_AIPSTZ2.offset044)
  1144. #define AIPSTZ2_OPACR2 (IMXRT_AIPSTZ2.offset048)
  1145. #define AIPSTZ2_OPACR3 (IMXRT_AIPSTZ2.offset04C)
  1146. #define AIPSTZ2_OPACR4 (IMXRT_AIPSTZ2.offset050)
  1147. #define IMXRT_AIPSTZ3 (*(IMXRT_REGISTER32_t *)0x4027C000)
  1148. #define AIPSTZ3_MPR (IMXRT_AIPSTZ3.offset000)
  1149. #define AIPSTZ3_OPACR (IMXRT_AIPSTZ3.offset040)
  1150. #define AIPSTZ3_OPACR1 (IMXRT_AIPSTZ3.offset044)
  1151. #define AIPSTZ3_OPACR2 (IMXRT_AIPSTZ3.offset048)
  1152. #define AIPSTZ3_OPACR3 (IMXRT_AIPSTZ3.offset04C)
  1153. #define AIPSTZ3_OPACR4 (IMXRT_AIPSTZ3.offset050)
  1154. #define IMXRT_AIPSTZ4 (*(IMXRT_REGISTER32_t *)0x4037C000)
  1155. #define AIPSTZ4_MPR (IMXRT_AIPSTZ4.offset000)
  1156. #define AIPSTZ4_OPACR (IMXRT_AIPSTZ4.offset040)
  1157. #define AIPSTZ4_OPACR1 (IMXRT_AIPSTZ4.offset044)
  1158. #define AIPSTZ4_OPACR2 (IMXRT_AIPSTZ4.offset048)
  1159. #define AIPSTZ4_OPACR3 (IMXRT_AIPSTZ4.offset04C)
  1160. #define AIPSTZ4_OPACR4 (IMXRT_AIPSTZ4.offset050)
  1161. // 17.3: page 662
  1162. #define IMXRT_AOI1 (*(IMXRT_REGISTER16_t *)0x403B4000)
  1163. #define AOI1_BFCRT010 (IMXRT_AOI1.offset000)
  1164. #define AOI1_BFCRT230 (IMXRT_AOI1.offset002)
  1165. #define AOI1_BFCRT011 (IMXRT_AOI1.offset004)
  1166. #define AOI1_BFCRT231 (IMXRT_AOI1.offset006)
  1167. #define AOI1_BFCRT012 (IMXRT_AOI1.offset008)
  1168. #define AOI1_BFCRT232 (IMXRT_AOI1.offset00A)
  1169. #define AOI1_BFCRT013 (IMXRT_AOI1.offset00C)
  1170. #define AOI1_BFCRT233 (IMXRT_AOI1.offset00E)
  1171. #define IMXRT_AOI2 (*(IMXRT_REGISTER16_t *)0x403B8000)
  1172. #define AOI2_BFCRT010 (IMXRT_AOI2.offset000)
  1173. #define AOI2_BFCRT230 (IMXRT_AOI2.offset002)
  1174. #define AOI2_BFCRT011 (IMXRT_AOI2.offset004)
  1175. #define AOI2_BFCRT231 (IMXRT_AOI2.offset006)
  1176. #define AOI2_BFCRT012 (IMXRT_AOI2.offset008)
  1177. #define AOI2_BFCRT232 (IMXRT_AOI2.offset00A)
  1178. #define AOI2_BFCRT013 (IMXRT_AOI2.offset00C)
  1179. #define AOI2_BFCRT233 (IMXRT_AOI2.offset00E)
  1180. // 18.7: page 703
  1181. #define IMXRT_CCM (*(IMXRT_REGISTER32_t *)0x400FC000)
  1182. #define CCM_CCR (IMXRT_CCM.offset000)
  1183. #define CCM_CSR (IMXRT_CCM.offset008)
  1184. #define CCM_CCSR (IMXRT_CCM.offset00C)
  1185. #define CCM_CACRR (IMXRT_CCM.offset010)
  1186. #define CCM_CBCDR (IMXRT_CCM.offset014)
  1187. #define CCM_CBCMR (IMXRT_CCM.offset018)
  1188. #define CCM_CSCMR1 (IMXRT_CCM.offset01C)
  1189. #define CCM_CSCMR2 (IMXRT_CCM.offset020)
  1190. #define CCM_CSCDR1 (IMXRT_CCM.offset024)
  1191. #define CCM_CS1CDR (IMXRT_CCM.offset028)
  1192. #define CCM_CS2CDR (IMXRT_CCM.offset02C)
  1193. #define CCM_CDCDR (IMXRT_CCM.offset030)
  1194. #define CCM_CSCDR2 (IMXRT_CCM.offset038)
  1195. #define CCM_CSCDR3 (IMXRT_CCM.offset03C)
  1196. #define CCM_CDHIPR (IMXRT_CCM.offset048)
  1197. #define CCM_CLPCR (IMXRT_CCM.offset054)
  1198. #define CCM_CISR (IMXRT_CCM.offset058)
  1199. #define CCM_CIMR (IMXRT_CCM.offset05C)
  1200. #define CCM_CCOSR (IMXRT_CCM.offset060)
  1201. #define CCM_CGPR (IMXRT_CCM.offset064)
  1202. #define CCM_CCGR0 (IMXRT_CCM.offset068)
  1203. #define CCM_CCGR1 (IMXRT_CCM.offset06C)
  1204. #define CCM_CCGR2 (IMXRT_CCM.offset070)
  1205. #define CCM_CCGR3 (IMXRT_CCM.offset074)
  1206. #define CCM_CCGR4 (IMXRT_CCM.offset078)
  1207. #define CCM_CCGR5 (IMXRT_CCM.offset07C)
  1208. #define CCM_CCGR6 (IMXRT_CCM.offset080)
  1209. #define CCM_CCGR7 (IMXRT_CCM.offset084)
  1210. #define CCM_CMEOR (IMXRT_CCM.offset088)
  1211. #define CCM_CCR_RBC_EN ((uint32_t)(1<<27))
  1212. #define CCM_CCR_REG_BYPASS_COUNT(n) ((uint32_t)(((n) & 0x3F) << 21))
  1213. #define CCM_CCR_COSC_EN ((uint32_t)(1<<12))
  1214. #define CCM_CCR_OSCNT(n) ((uint32_t)(((n) & 0xFF) << 0))
  1215. #define CCM_CSR_COSC_READY ((uint32_t)(1<<5))
  1216. #define CCM_CSR_CAMP2_READY ((uint32_t)(1<<3))
  1217. #define CCM_CSR_REF_EN_B ((uint32_t)(1<<0))
  1218. #define CCM_CCSR_PLL3_SW_CLK_SEL ((uint32_t)(1<<0))
  1219. #define CCM_CACRR_ARM_PODF(n) ((uint32_t)(((n) & 0x07) << 0))
  1220. #define CCM_CACRR_ARM_PODF_MASK ((uint32_t)(0x07 << 0))
  1221. #define CCM_CBCDR_PERIPH_CLK2_PODF(n) ((uint32_t)(((n) & 0x07) << 27))
  1222. #define CCM_CBCDR_PERIPH_CLK2_PODF_MASK ((uint32_t)(0x07 << 27))
  1223. #define CCM_CBCDR_PERIPH_CLK_SEL ((uint32_t)(1<<25))
  1224. #define CCM_CBCDR_SEMC_PODF(n) ((uint32_t)(((n) & 0x07) << 16))
  1225. #define CCM_CBCDR_AHB_PODF(n) ((uint32_t)(((n) & 0x07) << 10))
  1226. #define CCM_CBCDR_AHB_PODF_MASK ((uint32_t)(0x07 << 10))
  1227. #define CCM_CBCDR_IPG_PODF(n) ((uint32_t)(((n) & 0x03) << 8))
  1228. #define CCM_CBCDR_IPG_PODF_MASK ((uint32_t)(0x03 << 8))
  1229. #define CCM_CBCDR_SEMC_ALT_CLK_SEL ((uint32_t)(1<<7))
  1230. #define CCM_CBCDR_SEMC_CLK_SEL ((uint32_t)(1<<6))
  1231. #define CCM_CBCMR_FLEXSPI2_PODF(n) ((uint32_t)(((n) & 0x07) << 29))
  1232. #define CCM_CBCMR_LPSPI_PODF(n) ((uint32_t)(((n) & 0x07) << 26))
  1233. #define CCM_CBCMR_LCDIF_PODF(n) ((uint32_t)(((n) & 0x07) << 23))
  1234. #define CCM_CBCMR_PRE_PERIPH_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 18))
  1235. #define CCM_CBCMR_TRACE_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 14))
  1236. #define CCM_CBCMR_PERIPH_CLK2_SEL(n) ((uint32_t)(((n) & 0x03) << 12))
  1237. #define CCM_CBCMR_FLEXSPI2_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 8))
  1238. #define CCM_CBCMR_LPSPI_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 4))
  1239. #define CCM_CBCMR_FLEXSPI2_PODF_MASK ((uint32_t)(0x07 << 29))
  1240. #define CCM_CBCMR_LPSPI_PODF_MASK ((uint32_t)(0x07 << 26))
  1241. #define CCM_CBCMR_LCDIF_PODF_MASK ((uint32_t)(0x07 << 23))
  1242. #define CCM_CBCMR_PRE_PERIPH_CLK_SEL_MASK ((uint32_t)(0x03 << 18))
  1243. #define CCM_CBCMR_TRACE_CLK_SEL_MASK ((uint32_t)(0x03 << 14))
  1244. #define CCM_CBCMR_PERIPH_CLK2_SEL_MASK ((uint32_t)(0x03 << 12))
  1245. #define CCM_CBCMR_FLEXSPI2_CLK_SEL_MASK ((uint32_t)(0x03 << 8))
  1246. #define CCM_CBCMR_LPSPI_CLK_SEL_MASK ((uint32_t)(0x03 << 4))
  1247. #define CCM_CSCMR1_FLEXSPI_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 29))
  1248. #define CCM_CSCMR1_FLEXSPI_PODF(n) ((uint32_t)(((n) & 0x07) << 23))
  1249. #define CCM_CSCMR1_USDHC2_CLK_SEL ((uint32_t)(1<<17))
  1250. #define CCM_CSCMR1_USDHC1_CLK_SEL ((uint32_t)(1<<16))
  1251. #define CCM_CSCMR1_SAI3_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 14))
  1252. #define CCM_CSCMR1_SAI2_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 12))
  1253. #define CCM_CSCMR1_SAI1_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 10))
  1254. #define CCM_CSCMR1_PERCLK_CLK_SEL ((uint32_t)(1<<6))
  1255. #define CCM_CSCMR1_PERCLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1256. #define CCM_CSCMR2_FLEXIO2_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 19))
  1257. #define CCM_CSCMR2_CAN_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 8))
  1258. #define CCM_CSCMR2_CAN_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 2))
  1259. #define CCM_CSCDR1_TRACE_PODF(n) ((uint32_t)(((n) & 0x07) << 25))
  1260. #define CCM_CSCDR1_USDHC2_PODF(n) ((uint32_t)(((n) & 0x07) << 16))
  1261. #define CCM_CSCDR1_USDHC1_PODF(n) ((uint32_t)(((n) & 0x07) << 11))
  1262. #define CCM_CSCDR1_UART_CLK_SEL ((uint32_t)(1<<6))
  1263. #define CCM_CSCDR1_UART_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1264. #define CCM_CS1CDR_FLEXIO2_CLK_PODF(n) ((uint32_t)(((n) & 0x07) << 25))
  1265. #define CCM_CS1CDR_SAI3_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 22))
  1266. #define CCM_CS1CDR_SAI3_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 16))
  1267. #define CCM_CS1CDR_FLEXIO2_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 9))
  1268. #define CCM_CS1CDR_SAI1_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 6))
  1269. #define CCM_CS1CDR_SAI1_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1270. #define CCM_CS2CDR_SAI2_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 6))
  1271. #define CCM_CS2CDR_SAI2_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1272. #define CCM_CDCDR_SPDIF0_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 25))
  1273. #define CCM_CDCDR_SPDIF0_CLK_PODF(n) ((uint32_t)(((n) & 0x07) << 22))
  1274. #define CCM_CDCDR_SPDIF0_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 20))
  1275. #define CCM_CDCDR_FLEXIO1_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 12))
  1276. #define CCM_CDCDR_FLEXIO1_CLK_PODF(n) ((uint32_t)(((n) & 0x07) << 9))
  1277. #define CCM_CDCDR_FLEXIO1_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 7))
  1278. #define CCM_CSCDR2_LPI2C_CLK_PODF(n) ((uint32_t)(((n) & 0x1F) << 19))
  1279. #define CCM_CSCDR2_LPI2C_CLK_SEL ((uint32_t)(1<<18))
  1280. #define CCM_CSCDR2_LCDIF_PRE_CLK_SEL(n) ((uint32_t)(((n) & 0x07) << 15))
  1281. #define CCM_CSCDR2_LCDIF_PRED(n) ((uint32_t)(((n) & 0x07) << 12))
  1282. #define CCM_CSCDR2_LCDIF_CLK_SEL(n) ((uint32_t)(((n) & 0x07) << 9))
  1283. #define CCM_CSCDR3_CSI_PODF(n) ((uint32_t)(((n) & 0x07) << 11))
  1284. #define CCM_CSCDR3_CSI_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 9))
  1285. #define CCM_CDHIPR_ARM_PODF_BUSY ((uint32_t)(1<<16))
  1286. #define CCM_CDHIPR_PERIPH_CLK_SEL_BUSY ((uint32_t)(1<<5))
  1287. #define CCM_CDHIPR_PERIPH2_CLK_SEL_BUSY ((uint32_t)(1<<3))
  1288. #define CCM_CDHIPR_AHB_PODF_BUSY ((uint32_t)(1<<1))
  1289. #define CCM_CDHIPR_SEMC_PODF_BUSY ((uint32_t)(1<<0))
  1290. #define CCM_CLPCR_MASK_L2CC_IDLE ((uint32_t)(1<<27))
  1291. #define CCM_CLPCR_MASK_SCU_IDLE ((uint32_t)(1<<26))
  1292. #define CCM_CLPCR_MASK_CORE0_WFI ((uint32_t)(1<<22))
  1293. #define CCM_CLPCR_BYPASS_LPM_HS0 ((uint32_t)(1<<21))
  1294. #define CCM_CLPCR_BYPASS_LPM_HS1 ((uint32_t)(1<<19))
  1295. #define CCM_CLPCR_COSC_PWRDOWN ((uint32_t)(1<<11))
  1296. #define CCM_CLPCR_STBY_COUNT(n) ((uint32_t)(((n) & 0x03) << 9))
  1297. #define CCM_CLPCR_VSTBY ((uint32_t)(1<<8))
  1298. #define CCM_CLPCR_DIS_REF_OSC ((uint32_t)(1<<7))
  1299. #define CCM_CLPCR_SBYOS ((uint32_t)(1<<6))
  1300. #define CCM_CLPCR_ARM_CLK_DIS_ON_LPM ((uint32_t)(1<<5))
  1301. #define CCM_CLPCR_LPM(n) ((uint32_t)(((n) & 0x03) << 0))
  1302. #define CCM_CISR_ARM_PODF_LOADED ((uint32_t)(1<<26))
  1303. #define CCM_CISR_PERIPH_CLK_SEL_LOADED ((uint32_t)(1<<22))
  1304. #define CCM_CISR_AHB_PODF_LOADED ((uint32_t)(1<<20))
  1305. #define CCM_CISR_PERIPH2_CLK_SEL_LOADED ((uint32_t)(1<<19))
  1306. #define CCM_CISR_SEMC_PODF_LOADED ((uint32_t)(1<<17))
  1307. #define CCM_CISR_COSC_READY ((uint32_t)(1<<6))
  1308. #define CCM_CISR_LRF_PLL ((uint32_t)(1<<0))
  1309. #define CCM_CIMR_ARM_PODF_LOADED ((uint32_t)(1<<26))
  1310. #define CCM_CIMR_MASK_PERIPH_CLK_SEL_LOADED ((uint32_t)(1<<22))
  1311. #define CCM_CIMR_MASK_AHB_PODF_LOADED ((uint32_t)(1<<20))
  1312. #define CCM_CIMR_MASK_PERIPH2_CLK_SEL_LOADED ((uint32_t)(1<<19))
  1313. #define CCM_CIMR_MASK_SEMC_PODF_LOADED ((uint32_t)(1<<17))
  1314. #define CCM_CIMR_MASK_COSC_READY ((uint32_t)(1<<6))
  1315. #define CCM_CIMR_MASK_LRF_PLL ((uint32_t)(1<<0))
  1316. #define CCM_CCOSR_CLKO2_EN ((uint32_t)(1<<24))
  1317. #define CCM_CCOSR_CLKO2_DIV(n) ((uint32_t)(((n) & 0x07) << 21))
  1318. #define CCM_CCOSR_CLKO2_SEL(n) ((uint32_t)(((n) & 0x1F) << 16))
  1319. #define CCM_CCOSR_CLK_OUT_SEL ((uint32_t)(1<<8))
  1320. #define CCM_CCOSR_CLKO1_EN ((uint32_t)(1<<7))
  1321. #define CCM_CCOSR_CLKO1_DIV(n) ((uint32_t)(((n) & 0x07) << 4))
  1322. #define CCM_CCOSR_CLKO1_SEL(n) ((uint32_t)(((n) & 0x0F) << 0))
  1323. #define CCM_CGPR_INT_MEM_CLK_LPM ((uint32_t)(1<<17))
  1324. #define CCM_CGPR_FPL ((uint32_t)(1<<16))
  1325. #define CCM_CGPR_SYS_MEM_DS_CTRL(n) ((uint32_t)(((n) & 0x03) << 14))
  1326. #define CCM_CGPR_EFUSE_PROG_SUPPLY_GATE ((uint32_t)(1<<4))
  1327. #define CCM_CGPR_PMIC_DELAY_SCALER ((uint32_t)(1<<0))
  1328. #define CCM_CCGR_OFF 0
  1329. #define CCM_CCGR_ON_RUNONLY 1
  1330. #define CCM_CCGR_ON 3
  1331. #define CCM_CCGR0_GPIO2(n) ((uint32_t)(((n) & 0x03) << 30))
  1332. #define CCM_CCGR0_LPUART2(n) ((uint32_t)(((n) & 0x03) << 28))
  1333. #define CCM_CCGR0_GPT2_SERIAL(n) ((uint32_t)(((n) & 0x03) << 26))
  1334. #define CCM_CCGR0_GPT2_BUS(n) ((uint32_t)(((n) & 0x03) << 24))
  1335. #define CCM_CCGR0_TRACE(n) ((uint32_t)(((n) & 0x03) << 22))
  1336. #define CCM_CCGR0_CAN2_SERIAL(n) ((uint32_t)(((n) & 0x03) << 20))
  1337. #define CCM_CCGR0_CAN2(n) ((uint32_t)(((n) & 0x03) << 18))
  1338. #define CCM_CCGR0_CAN1_SERIAL(n) ((uint32_t)(((n) & 0x03) << 16))
  1339. #define CCM_CCGR0_CAN1(n) ((uint32_t)(((n) & 0x03) << 14))
  1340. #define CCM_CCGR0_LPUART3(n) ((uint32_t)(((n) & 0x03) << 12))
  1341. #define CCM_CCGR0_DCP(n) ((uint32_t)(((n) & 0x03) << 10))
  1342. #define CCM_CCGR0_MQS_HMCLK(n) ((uint32_t)(((n) & 0x03) << 4))
  1343. #define CCM_CCGR0_AIPS_TZ2(n) ((uint32_t)(((n) & 0x03) << 2))
  1344. #define CCM_CCGR0_AIPS_TZ1(n) ((uint32_t)(((n) & 0x03) << 0))
  1345. #define CCM_CCGR1_CSU(n) ((uint32_t)(((n) & 0x03) << 28))
  1346. #define CCM_CCGR1_GPIO1(n) ((uint32_t)(((n) & 0x03) << 26))
  1347. #define CCM_CCGR1_LPUART4(n) ((uint32_t)(((n) & 0x03) << 24))
  1348. #define CCM_CCGR1_GPT1_SERIAL(n) ((uint32_t)(((n) & 0x03) << 22))
  1349. #define CCM_CCGR1_GPT1_BUS(n) ((uint32_t)(((n) & 0x03) << 20))
  1350. #define CCM_CCGR1_GPT(n) ((uint32_t)(((n) & 0x03) << 20))
  1351. #define CCM_CCGR1_ADC1(n) ((uint32_t)(((n) & 0x03) << 16))
  1352. #define CCM_CCGR1_AOI2(n) ((uint32_t)(((n) & 0x03) << 14))
  1353. #define CCM_CCGR1_PIT(n) ((uint32_t)(((n) & 0x03) << 12))
  1354. #define CCM_CCGR1_ENET(n) ((uint32_t)(((n) & 0x03) << 10))
  1355. #define CCM_CCGR1_ADC2(n) ((uint32_t)(((n) & 0x03) << 8))
  1356. #define CCM_CCGR1_LPSPI4(n) ((uint32_t)(((n) & 0x03) << 6))
  1357. #define CCM_CCGR1_LPSPI3(n) ((uint32_t)(((n) & 0x03) << 4))
  1358. #define CCM_CCGR1_LPSPI2(n) ((uint32_t)(((n) & 0x03) << 2))
  1359. #define CCM_CCGR1_LPSPI1(n) ((uint32_t)(((n) & 0x03) << 0))
  1360. #define CCM_CCGR2_PXP(n) ((uint32_t)(((n) & 0x03) << 30))
  1361. #define CCM_CCGR2_LCD(n) ((uint32_t)(((n) & 0x03) << 28))
  1362. #define CCM_CCGR2_GPIO3(n) ((uint32_t)(((n) & 0x03) << 26))
  1363. #define CCM_CCGR2_XBAR2(n) ((uint32_t)(((n) & 0x03) << 24))
  1364. #define CCM_CCGR2_XBAR1(n) ((uint32_t)(((n) & 0x03) << 22))
  1365. #define CCM_CCGR2_IPMUX3(n) ((uint32_t)(((n) & 0x03) << 20))
  1366. #define CCM_CCGR2_IPMUX2(n) ((uint32_t)(((n) & 0x03) << 18))
  1367. #define CCM_CCGR2_IPMUX1(n) ((uint32_t)(((n) & 0x03) << 16))
  1368. #define CCM_CCGR2_XBAR3(n) ((uint32_t)(((n) & 0x03) << 14))
  1369. #define CCM_CCGR2_IIM(n) ((uint32_t)(((n) & 0x03) << 12))
  1370. #define CCM_CCGR2_LPI2C3(n) ((uint32_t)(((n) & 0x03) << 10))
  1371. #define CCM_CCGR2_LPI2C2(n) ((uint32_t)(((n) & 0x03) << 8))
  1372. #define CCM_CCGR2_LPI2C1(n) ((uint32_t)(((n) & 0x03) << 6))
  1373. #define CCM_CCGR2_IOMUXC_SNVS(n) ((uint32_t)(((n) & 0x03) << 4))
  1374. #define CCM_CCGR2_CSI(n) ((uint32_t)(((n) & 0x03) << 2))
  1375. #define CCM_CCGR3_IOMUXC_SNVS_GPR(n) ((uint32_t)(((n) & 0x03) << 30))
  1376. #define CCM_CCGR3_OCRAM(n) ((uint32_t)(((n) & 0x03) << 28))
  1377. #define CCM_CCGR3_ACMP4(n) ((uint32_t)(((n) & 0x03) << 26))
  1378. #define CCM_CCGR3_ACMP3(n) ((uint32_t)(((n) & 0x03) << 24))
  1379. #define CCM_CCGR3_ACMP2(n) ((uint32_t)(((n) & 0x03) << 22))
  1380. #define CCM_CCGR3_ACMP1(n) ((uint32_t)(((n) & 0x03) << 20))
  1381. #define CCM_CCGR3_FLEXRAM(n) ((uint32_t)(((n) & 0x03) << 18))
  1382. #define CCM_CCGR3_WDOG1(n) ((uint32_t)(((n) & 0x03) << 16))
  1383. #define CCM_CCGR3_EWM(n) ((uint32_t)(((n) & 0x03) << 14))
  1384. #define CCM_CCGR3_GPIO4(n) ((uint32_t)(((n) & 0x03) << 12))
  1385. #define CCM_CCGR3_LCDIF_PIX(n) ((uint32_t)(((n) & 0x03) << 10))
  1386. #define CCM_CCGR3_AOI1(n) ((uint32_t)(((n) & 0x03) << 8))
  1387. #define CCM_CCGR3_LPUART6(n) ((uint32_t)(((n) & 0x03) << 6))
  1388. #define CCM_CCGR3_SEMC(n) ((uint32_t)(((n) & 0x03) << 4))
  1389. #define CCM_CCGR3_LPUART5(n) ((uint32_t)(((n) & 0x03) << 2))
  1390. #define CCM_CCGR3_FLEXIO2(n) ((uint32_t)(((n) & 0x03) << 0))
  1391. #define CCM_CCGR4_ENC4(n) ((uint32_t)(((n) & 0x03) << 30))
  1392. #define CCM_CCGR4_ENC3(n) ((uint32_t)(((n) & 0x03) << 28))
  1393. #define CCM_CCGR4_ENC2(n) ((uint32_t)(((n) & 0x03) << 26))
  1394. #define CCM_CCGR4_ENC1(n) ((uint32_t)(((n) & 0x03) << 24))
  1395. #define CCM_CCGR4_PWM4(n) ((uint32_t)(((n) & 0x03) << 22))
  1396. #define CCM_CCGR4_PWM3(n) ((uint32_t)(((n) & 0x03) << 20))
  1397. #define CCM_CCGR4_PWM2(n) ((uint32_t)(((n) & 0x03) << 18))
  1398. #define CCM_CCGR4_PWM1(n) ((uint32_t)(((n) & 0x03) << 16))
  1399. #define CCM_CCGR4_SIM_EMS(n) ((uint32_t)(((n) & 0x03) << 14))
  1400. #define CCM_CCGR4_SIM_M(n) ((uint32_t)(((n) & 0x03) << 12))
  1401. #define CCM_CCGR4_TSC(n) ((uint32_t)(((n) & 0x03) << 10))
  1402. #define CCM_CCGR4_SIM_M7(n) ((uint32_t)(((n) & 0x03) << 8))
  1403. #define CCM_CCGR4_BEE(n) ((uint32_t)(((n) & 0x03) << 6))
  1404. #define CCM_CCGR4_IOMUXC_GPR(n) ((uint32_t)(((n) & 0x03) << 4))
  1405. #define CCM_CCGR4_IOMUXC(n) ((uint32_t)(((n) & 0x03) << 2))
  1406. #define CCM_CCGR5_SNVS_LP(n) ((uint32_t)(((n) & 0x03) << 30))
  1407. #define CCM_CCGR5_SNVS_HP(n) ((uint32_t)(((n) & 0x03) << 28))
  1408. #define CCM_CCGR5_LPUART7(n) ((uint32_t)(((n) & 0x03) << 26))
  1409. #define CCM_CCGR5_LPUART1(n) ((uint32_t)(((n) & 0x03) << 24))
  1410. #define CCM_CCGR5_SAI3(n) ((uint32_t)(((n) & 0x03) << 22))
  1411. #define CCM_CCGR5_SAI2(n) ((uint32_t)(((n) & 0x03) << 20))
  1412. #define CCM_CCGR5_SAI1(n) ((uint32_t)(((n) & 0x03) << 18))
  1413. #define CCM_CCGR5_SIM_MAIN(n) ((uint32_t)(((n) & 0x03) << 16))
  1414. #define CCM_CCGR5_SPDIF(n) ((uint32_t)(((n) & 0x03) << 14))
  1415. #define CCM_CCGR5_AIPS_TZ4(n) ((uint32_t)(((n) & 0x03) << 12))
  1416. #define CCM_CCGR5_WDOG2(n) ((uint32_t)(((n) & 0x03) << 10))
  1417. #define CCM_CCGR5_KPP(n) ((uint32_t)(((n) & 0x03) << 8))
  1418. #define CCM_CCGR5_DMA(n) ((uint32_t)(((n) & 0x03) << 6))
  1419. #define CCM_CCGR5_WDOG3(n) ((uint32_t)(((n) & 0x03) << 4))
  1420. #define CCM_CCGR5_FLEXIO1(n) ((uint32_t)(((n) & 0x03) << 2))
  1421. #define CCM_CCGR5_ROM(n) ((uint32_t)(((n) & 0x03) << 0))
  1422. #define CCM_CCGR6_QTIMER3(n) ((uint32_t)(((n) & 0x03) << 30))
  1423. #define CCM_CCGR6_QTIMER2(n) ((uint32_t)(((n) & 0x03) << 28))
  1424. #define CCM_CCGR6_QTIMER1(n) ((uint32_t)(((n) & 0x03) << 26))
  1425. #define CCM_CCGR6_LPI2C4_SERIAL(n) ((uint32_t)(((n) & 0x03) << 24))
  1426. #define CCM_CCGR6_ANADIG(n) ((uint32_t)(((n) & 0x03) << 22))
  1427. #define CCM_CCGR6_SIM_PER(n) ((uint32_t)(((n) & 0x03) << 20)) /* IMXRT1052 */
  1428. #define CCM_CCGR6_AXBS_P(n) ((uint32_t)(((n) & 0x03) << 20)) /* IMXRT1062 */
  1429. #define CCM_CCGR6_AIPS_TZ3(n) ((uint32_t)(((n) & 0x03) << 18))
  1430. #define CCM_CCGR6_QTIMER4(n) ((uint32_t)(((n) & 0x03) << 16))
  1431. #define CCM_CCGR6_LPUART8(n) ((uint32_t)(((n) & 0x03) << 14))
  1432. #define CCM_CCGR6_TRNG(n) ((uint32_t)(((n) & 0x03) << 12))
  1433. #define CCM_CCGR6_FLEXSPI(n) ((uint32_t)(((n) & 0x03) << 10))
  1434. #define CCM_CCGR6_IPMUX4(n) ((uint32_t)(((n) & 0x03) << 8))
  1435. #define CCM_CCGR6_DCDC(n) ((uint32_t)(((n) & 0x03) << 6))
  1436. #define CCM_CCGR6_USDHC2(n) ((uint32_t)(((n) & 0x03) << 4))
  1437. #define CCM_CCGR6_USDHC1(n) ((uint32_t)(((n) & 0x03) << 2))
  1438. #define CCM_CCGR6_USBOH3(n) ((uint32_t)(((n) & 0x03) << 0))
  1439. #define CCM_CCGR7_FLEXIO3(n) ((uint32_t)(((n) & 0x03) << 12))
  1440. #define CCM_CCGR7_APIS_LITE(n) ((uint32_t)(((n) & 0x03) << 10))
  1441. #define CCM_CCGR7_CAN3_SERIAL(n) ((uint32_t)(((n) & 0x03) << 8))
  1442. #define CCM_CCGR7_CAN3(n) ((uint32_t)(((n) & 0x03) << 6))
  1443. #define CCM_CCGR7_AXBS_L(n) ((uint32_t)(((n) & 0x03) << 4))
  1444. #define CCM_CCGR7_FLEXSPI2(n) ((uint32_t)(((n) & 0x03) << 2))
  1445. #define CCM_CCGR7_ENET2(n) ((uint32_t)(((n) & 0x03) << 0))
  1446. #define CCM_CMEOR_MOD_EN_OV_CAN1_CPI ((uint32_t)(1<<30))
  1447. #define CCM_CMEOR_MOD_EN_OV_CAN2_CPI ((uint32_t)(1<<28))
  1448. #define CCM_CMEOR_MOD_EN_OV_TRNG ((uint32_t)(1<<9))
  1449. #define CCM_CMEOR_MOD_EN_USDHC ((uint32_t)(1<<7))
  1450. #define CCM_CMEOR_MOD_EN_OV_PIT ((uint32_t)(1<<6))
  1451. #define CCM_CMEOR_MOD_EN_OV_GPT ((uint32_t)(1<<5))
  1452. #define CCM_CSCMR1_SAI1_CLK_SEL_MASK (CCM_CSCMR1_SAI1_CLK_SEL(0x03))
  1453. #define CCM_CS1CDR_SAI1_CLK_PRED_MASK (CCM_CS1CDR_SAI1_CLK_PRED(0x07))
  1454. #define CCM_CS1CDR_SAI1_CLK_PODF_MASK (CCM_CS1CDR_SAI1_CLK_PODF(0x3f))
  1455. #define CCM_CSCMR1_SAI2_CLK_SEL_MASK (CCM_CSCMR1_SAI2_CLK_SEL(0x03))
  1456. #define CCM_CS2CDR_SAI2_CLK_PRED_MASK (CCM_CS2CDR_SAI2_CLK_PRED(0x07))
  1457. #define CCM_CS2CDR_SAI2_CLK_PODF_MASK (CCM_CS2CDR_SAI2_CLK_PODF(0x3f))
  1458. #define CCM_CSCMR1_SAI3_CLK_SEL_MASK (CCM_CSCMR1_SAI3_CLK_SEL(0x03))
  1459. #define CCM_CS1CDR_SAI3_CLK_PRED_MASK (CCM_CS1CDR_SAI3_CLK_PRED(0x07))
  1460. #define CCM_CS1CDR_SAI3_CLK_PODF_MASK (CCM_CS1CDR_SAI3_CLK_PODF(0x3f))
  1461. #define CCM_CDCDR_SPDIF0_CLK_SEL_MASK (CCM_CDCDR_SPDIF0_CLK_SEL(0x03))
  1462. #define CCM_CDCDR_SPDIF0_CLK_PRED_MASK (CCM_CDCDR_SPDIF0_CLK_PRED(0x07))
  1463. #define CCM_CDCDR_SPDIF0_CLK_PODF_MASK (CCM_CDCDR_SPDIF0_CLK_PODF(0x07))
  1464. // 18.8: page 752
  1465. #define IMXRT_CCM_ANALOG (*(IMXRT_REGISTER32_t *)0x400D8000)
  1466. #define CCM_ANALOG_PLL_ARM (IMXRT_CCM_ANALOG.offset000)
  1467. #define CCM_ANALOG_PLL_ARM_SET (IMXRT_CCM_ANALOG.offset004)
  1468. #define CCM_ANALOG_PLL_ARM_CLR (IMXRT_CCM_ANALOG.offset008)
  1469. #define CCM_ANALOG_PLL_ARM_TOG (IMXRT_CCM_ANALOG.offset00C)
  1470. #define CCM_ANALOG_PLL_USB1 (IMXRT_CCM_ANALOG.offset010)
  1471. #define CCM_ANALOG_PLL_USB1_SET (IMXRT_CCM_ANALOG.offset014)
  1472. #define CCM_ANALOG_PLL_USB1_CLR (IMXRT_CCM_ANALOG.offset018)
  1473. #define CCM_ANALOG_PLL_USB1_TOG (IMXRT_CCM_ANALOG.offset01C)
  1474. #define CCM_ANALOG_PLL_USB2 (IMXRT_CCM_ANALOG.offset020)
  1475. #define CCM_ANALOG_PLL_USB2_SET (IMXRT_CCM_ANALOG.offset024)
  1476. #define CCM_ANALOG_PLL_USB2_CLR (IMXRT_CCM_ANALOG.offset028)
  1477. #define CCM_ANALOG_PLL_USB2_TOG (IMXRT_CCM_ANALOG.offset02C)
  1478. #define CCM_ANALOG_PLL_SYS (IMXRT_CCM_ANALOG.offset030)
  1479. #define CCM_ANALOG_PLL_SYS_SET (IMXRT_CCM_ANALOG.offset034)
  1480. #define CCM_ANALOG_PLL_SYS_CLR (IMXRT_CCM_ANALOG.offset038)
  1481. #define CCM_ANALOG_PLL_SYS_TOG (IMXRT_CCM_ANALOG.offset03C)
  1482. #define CCM_ANALOG_PLL_SYS_SS (IMXRT_CCM_ANALOG.offset040)
  1483. #define CCM_ANALOG_PLL_SYS_NUM (IMXRT_CCM_ANALOG.offset050)
  1484. #define CCM_ANALOG_PLL_SYS_DENOM (IMXRT_CCM_ANALOG.offset060)
  1485. #define CCM_ANALOG_PLL_AUDIO (IMXRT_CCM_ANALOG.offset070)
  1486. #define CCM_ANALOG_PLL_AUDIO_SET (IMXRT_CCM_ANALOG.offset074)
  1487. #define CCM_ANALOG_PLL_AUDIO_CLR (IMXRT_CCM_ANALOG.offset078)
  1488. #define CCM_ANALOG_PLL_AUDIO_TOG (IMXRT_CCM_ANALOG.offset07C)
  1489. #define CCM_ANALOG_PLL_AUDIO_NUM (IMXRT_CCM_ANALOG.offset080)
  1490. #define CCM_ANALOG_PLL_AUDIO_DENOM (IMXRT_CCM_ANALOG.offset090)
  1491. #define CCM_ANALOG_PLL_VIDEO (IMXRT_CCM_ANALOG.offset0A0)
  1492. #define CCM_ANALOG_PLL_VIDEO_SET (IMXRT_CCM_ANALOG.offset0A4)
  1493. #define CCM_ANALOG_PLL_VIDEO_CLR (IMXRT_CCM_ANALOG.offset0A8)
  1494. #define CCM_ANALOG_PLL_VIDEO_TOG (IMXRT_CCM_ANALOG.offset0AC)
  1495. #define CCM_ANALOG_PLL_VIDEO_NUM (IMXRT_CCM_ANALOG.offset0B0)
  1496. #define CCM_ANALOG_PLL_VIDEO_DENOM (IMXRT_CCM_ANALOG.offset0C0)
  1497. #define CCM_ANALOG_PLL_ENET (IMXRT_CCM_ANALOG.offset0EC)
  1498. #define CCM_ANALOG_PLL_ENET_SET (IMXRT_CCM_ANALOG.offset0E4)
  1499. #define CCM_ANALOG_PLL_ENET_CLR (IMXRT_CCM_ANALOG.offset0E8)
  1500. #define CCM_ANALOG_PLL_ENET_TOG (IMXRT_CCM_ANALOG.offset0EC)
  1501. #define CCM_ANALOG_PFD_480 (IMXRT_CCM_ANALOG.offset0F0)
  1502. #define CCM_ANALOG_PFD_480_SET (IMXRT_CCM_ANALOG.offset0F4)
  1503. #define CCM_ANALOG_PFD_480_CLR (IMXRT_CCM_ANALOG.offset0F8)
  1504. #define CCM_ANALOG_PFD_480_TOG (IMXRT_CCM_ANALOG.offset0FC)
  1505. #define CCM_ANALOG_PFD_528 (IMXRT_CCM_ANALOG.offset100)
  1506. #define CCM_ANALOG_PFD_528_SET (IMXRT_CCM_ANALOG.offset104)
  1507. #define CCM_ANALOG_PFD_528_CLR (IMXRT_CCM_ANALOG.offset108)
  1508. #define CCM_ANALOG_PFD_528_TOG (IMXRT_CCM_ANALOG.offset10C)
  1509. #define CCM_ANALOG_MISC0 (IMXRT_CCM_ANALOG.offset150)
  1510. #define CCM_ANALOG_MISC0_SET (IMXRT_CCM_ANALOG.offset154)
  1511. #define CCM_ANALOG_MISC0_CLR (IMXRT_CCM_ANALOG.offset158)
  1512. #define CCM_ANALOG_MISC0_TOG (IMXRT_CCM_ANALOG.offset15C)
  1513. #define CCM_ANALOG_MISC1 (IMXRT_CCM_ANALOG.offset160)
  1514. #define CCM_ANALOG_MISC1_SET (IMXRT_CCM_ANALOG.offset164)
  1515. #define CCM_ANALOG_MISC1_CLR (IMXRT_CCM_ANALOG.offset168)
  1516. #define CCM_ANALOG_MISC1_TOG (IMXRT_CCM_ANALOG.offset16C)
  1517. #define CCM_ANALOG_MISC2 (IMXRT_CCM_ANALOG.offset170)
  1518. #define CCM_ANALOG_MISC2_SET (IMXRT_CCM_ANALOG.offset174)
  1519. #define CCM_ANALOG_MISC2_CLR (IMXRT_CCM_ANALOG.offset178)
  1520. #define CCM_ANALOG_MISC2_TOG (IMXRT_CCM_ANALOG.offset17C)
  1521. #define CCM_ANALOG_PLL_ARM_LOCK ((uint32_t)(1<<31))
  1522. #define CCM_ANALOG_PLL_ARM_BYPASS ((uint32_t)(1<<16))
  1523. #define CCM_ANALOG_PLL_ARM_ENABLE ((uint32_t)(1<<13))
  1524. #define CCM_ANALOG_PLL_ARM_POWERDOWN ((uint32_t)(1<<12))
  1525. #define CCM_ANALOG_PLL_ARM_DIV_SELECT(n) ((uint32_t)(((n) & 0x7F) << 0))
  1526. #define CCM_ANALOG_PLL_ARM_DIV_SELECT_MASK ((uint32_t)(0x7F << 0))
  1527. #define CCM_ANALOG_PLL_USB1_LOCK ((uint32_t)(1<<31))
  1528. #define CCM_ANALOG_PLL_USB1_BYPASS ((uint32_t)(1<<16))
  1529. #define CCM_ANALOG_PLL_USB1_ENABLE ((uint32_t)(1<<13))
  1530. #define CCM_ANALOG_PLL_USB1_POWER ((uint32_t)(1<<12))
  1531. #define CCM_ANALOG_PLL_USB1_EN_USB_CLKS ((uint32_t)(1<<6))
  1532. #define CCM_ANALOG_PLL_USB1_DIV_SELECT ((uint32_t)(1<<1))
  1533. #define CCM_ANALOG_PLL_USB2_LOCK ((uint32_t)(1<<31))
  1534. #define CCM_ANALOG_PLL_USB2_BYPASS ((uint32_t)(1<<16))
  1535. #define CCM_ANALOG_PLL_USB2_ENABLE ((uint32_t)(1<<13))
  1536. #define CCM_ANALOG_PLL_USB2_POWER ((uint32_t)(1<<12))
  1537. #define CCM_ANALOG_PLL_USB2_EN_USB_CLKS ((uint32_t)(1<<6))
  1538. #define CCM_ANALOG_PLL_USB2_DIV_SELECT ((uint32_t)(1<<1))
  1539. #define CCM_ANALOG_PLL_SYS_LOCK ((uint32_t)(1<<31))
  1540. #define CCM_ANALOG_PLL_SYS_BYPASS ((uint32_t)(1<<16))
  1541. #define CCM_ANALOG_PLL_SYS_ENABLE ((uint32_t)(1<<13))
  1542. #define CCM_ANALOG_PLL_SYS_POWERDOWN ((uint32_t)(1<<12))
  1543. #define CCM_ANALOG_PLL_SYS_DIV_SELECT ((uint32_t)(1<<1))
  1544. #define CCM_ANALOG_PLL_AUDIO_POST_DIV_SELECT(n) ((uint32_t)(((n) & 0x03) <<19))
  1545. #define CCM_ANALOG_PLL_AUDIO_BYPASS ((uint32_t)(1<<16))
  1546. #define CCM_ANALOG_PLL_AUDIO_BYPASS_CLK_SRC(n) ((uint32_t)(((n) & 0x03) <<14))
  1547. #define CCM_ANALOG_PLL_AUDIO_ENABLE ((uint32_t)(1<<13))
  1548. #define CCM_ANALOG_PLL_AUDIO_POWERDOWN ((uint32_t)(1<<12))
  1549. #define CCM_ANALOG_PLL_AUDIO_DIV_SELECT(n) ((uint32_t)((n) & ((1<<6)-1)))
  1550. #define CCM_ANALOG_PLL_VIDEO_LOCK ((uint32_t)(1<<31))
  1551. #define CCM_ANALOG_PLL_VIDEO_POST_DIV_SELECT(n) ((uint32_t)(((n) & 0x03) << 19))
  1552. #define CCM_ANALOG_PLL_VIDEO_BYPASS ((uint32_t)(1<<16))
  1553. #define CCM_ANALOG_PLL_VIDEO_BYPASS_CLK_SRC(n) ((uint32_t)(((n) & 0x03) << 14))
  1554. #define CCM_ANALOG_PLL_VIDEO_ENABLE ((uint32_t)(1<<13))
  1555. #define CCM_ANALOG_PLL_VIDEO_POWERDOWN ((uint32_t)(1<<12))
  1556. #define CCM_ANALOG_PLL_VIDEO_DIV_SELECT(n) ((uint32_t)(((n) & 0x7F) << 0))
  1557. #define CCM_ANALOG_PLL_ENET_LOCK ((uint32_t)(1<<31))
  1558. #define CCM_ANALOG_PLL_ENET_ENET_25M_REF_EN ((uint32_t)(1<<21))
  1559. #define CCM_ANALOG_PLL_ENET_ENET2_REF_EN ((uint32_t)(1<<20))
  1560. #define CCM_ANALOG_PLL_ENET_BYPASS ((uint32_t)(1<<16))
  1561. #define CCM_ANALOG_PLL_ENET_BYPASS_CLK_SRC(n) ((uint32_t)(((n) & 0x03) << 14))
  1562. #define CCM_ANALOG_PLL_ENET_ENABLE ((uint32_t)(1<<13))
  1563. #define CCM_ANALOG_PLL_ENET_POWERDOWN ((uint32_t)(1<<12))
  1564. #define CCM_ANALOG_PLL_ENET_ENET2_DIV_SELECT(n) ((uint32_t)(((n) & 0x03) << 2))
  1565. #define CCM_ANALOG_PLL_ENET_DIV_SELECT(n) ((uint32_t)(((n) & 0x03) << 0))
  1566. #define CCM_ANALOG_MISC0_XTAL_24M_PWD ((uint32_t)(1<<30))
  1567. #define CCM_ANALOG_MISC0_RTC_XTAL_SOURCE ((uint32_t)(1<<29))
  1568. #define CCM_ANALOG_MISC0_CLKGATE_DELAY(n) ((uint32_t)(((n) & 0x07) << 26))
  1569. #define CCM_ANALOG_MISC0_CLKGATE_CTRL ((uint32_t)(1<<25))
  1570. #define CCM_ANALOG_MISC0_OSC_XTALOK_EN ((uint32_t)(1<<16))
  1571. #define CCM_ANALOG_MISC0_OSC_XTALOK ((uint32_t)(1<<15))
  1572. #define CCM_ANALOG_MISC0_OSC_I(n) ((uint32_t)(((n) & 0x03) << 13))
  1573. #define CCM_ANALOG_MISC0_DISCON_HIGH_SNVS ((uint32_t)(1<<12))
  1574. #define CCM_ANALOG_MISC0_STOP_MODE_CONFIG(n) ((uint32_t)(((n) & 0x03) << 10))
  1575. #define CCM_ANALOG_MISC0_REFTOP_VBGUP ((uint32_t)(1<<7))
  1576. #define CCM_ANALOG_MISC0_REFTOP_VBGADJ(n) ((uint32_t)(((n) & 0x07) << 4))
  1577. #define CCM_ANALOG_MISC0_REFTOP_SELFBIASOFF ((uint32_t)(1<<3))
  1578. #define CCM_ANALOG_MISC0_REFTOP_PWD ((uint32_t)(1<<0))
  1579. #define CCM_ANALOG_MISC1_IRQ_DIG_BO ((uint32_t)(1<<31))
  1580. #define CCM_ANALOG_MISC1_IRQ_ANA_BO ((uint32_t)(1<<30))
  1581. #define CCM_ANALOG_MISC1_IRQ_TEMPHIGH ((uint32_t)(1<<29))
  1582. #define CCM_ANALOG_MISC1_IRQ_TEMPLOW ((uint32_t)(1<<28))
  1583. #define CCM_ANALOG_MISC1_IRQ_TEMPPANIC ((uint32_t)(1<<27))
  1584. #define CCM_ANALOG_MISC1_PFD_528_AUTOGATE_EN ((uint32_t)(1<<17))
  1585. #define CCM_ANALOG_MISC1_PFD_480_AUTOGATE_EN ((uint32_t)(1<<16))
  1586. #define CCM_ANALOG_MISC1_LVDSCLK1_IBEN ((uint32_t)(1<<12))
  1587. #define CCM_ANALOG_MISC1_LVDSCLK1_OBEN ((uint32_t)(1<<10))
  1588. #define CCM_ANALOG_MISC1_LVDS1_CLK_SEL(n) ((uint32_t)(((n) & 0x1F) << 0))
  1589. #define CCM_ANALOG_MISC2_VIDEO_DIV(n) ((uint32_t)(((n) & 0x03) << 30))
  1590. #define CCM_ANALOG_MISC2_REG2_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 28))
  1591. #define CCM_ANALOG_MISC2_REG1_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 26))
  1592. #define CCM_ANALOG_MISC2_REG0_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 24))
  1593. #define CCM_ANALOG_MISC2_DIV_MSB ((uint32_t)(1<<23))
  1594. #define CCM_ANALOG_MISC2_AUDIO_DIV_MSB ((uint32_t)(1<<23))
  1595. #define CCM_ANALOG_MISC2_REG2_OK ((uint32_t)(1<<22))
  1596. #define CCM_ANALOG_MISC2_REG2_ENABLE_BO ((uint32_t)(1<<21))
  1597. #define CCM_ANALOG_MISC2_REG2_BO_STATUS ((uint32_t)(1<<19))
  1598. #define CCM_ANALOG_MISC2_REG2_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 16))
  1599. #define CCM_ANALOG_MISC2_DIV_LSB ((uint32_t)(1<<15))
  1600. #define CCM_ANALOG_MISC2_AUDIO_DIV_LSB ((uint32_t)(1<<15))
  1601. #define CCM_ANALOG_MISC2_REG1_OK ((uint32_t)(1<<14))
  1602. #define CCM_ANALOG_MISC2_REG1_ENABLE_BO ((uint32_t)(1<<13))
  1603. #define CCM_ANALOG_MISC2_REG1_BO_STATUS ((uint32_t)(1<<11))
  1604. #define CCM_ANALOG_MISC2_REG1_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 8))
  1605. #define CCM_ANALOG_MISC2_PLL3_DISABLE ((uint32_t)(1<<7))
  1606. #define CCM_ANALOG_MISC2_REG0_OK ((uint32_t)(1<<6))
  1607. #define CCM_ANALOG_MISC2_REG0_ENABLE_BO ((uint32_t)(1<<5))
  1608. #define CCM_ANALOG_MISC2_REG0_BO_STATUS ((uint32_t)(1<<3))
  1609. #define CCM_ANALOG_MISC2_REG0_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 0))
  1610. #define CCM_ANALOG_PLL_AUDIO_NUM_MASK (((1<<29)-1))
  1611. #define CCM_ANALOG_PLL_AUDIO_DENOM_MASK (((1<<29)-1))
  1612. #define CCM_ANALOG_PLL_AUDIO_LOCK ((uint32_t)(1<<31))
  1613. // 19.7: page 810
  1614. #define IMXRT_CSI (*(IMXRT_REGISTER32_t *)0x402BC000)
  1615. #define CSI_CSICR1 (IMXRT_CSI.offset000)
  1616. #define CSI_CSICR2 (IMXRT_CSI.offset004)
  1617. #define CSI_CSICR3 (IMXRT_CSI.offset008)
  1618. #define CSI_CSISTATFIFO (IMXRT_CSI.offset00C)
  1619. #define CSI_CSIRFIFO (IMXRT_CSI.offset010)
  1620. #define CSI_CSIRXCNT (IMXRT_CSI.offset014)
  1621. #define CSI_CSISR (IMXRT_CSI.offset018)
  1622. #define CSI_CSIDMASA_STATFIFO (IMXRT_CSI.offset020)
  1623. #define CSI_CSIDMATS_STATFIFO (IMXRT_CSI.offset024)
  1624. #define CSI_CSIDMASA_FB1 (IMXRT_CSI.offset028)
  1625. #define CSI_CSIDMASA_FB2 (IMXRT_CSI.offset02C)
  1626. #define CSI_CSIFBUF_PARA (IMXRT_CSI.offset030)
  1627. #define CSI_CSIIMAG_PARA (IMXRT_CSI.offset034)
  1628. #define CSI_CSICR18 (IMXRT_CSI.offset048)
  1629. #define CSI_CSICR19 (IMXRT_CSI.offset04C)
  1630. // 20.6.1.1: page 837
  1631. #define IMXRT_DCDC (*(IMXRT_REGISTER32_t *)0x40080000)
  1632. #define DCDC_REG0 (IMXRT_DCDC.offset000)
  1633. #define DCDC_REG1 (IMXRT_DCDC.offset004)
  1634. #define DCDC_REG2 (IMXRT_DCDC.offset008)
  1635. #define DCDC_REG3 (IMXRT_DCDC.offset00C)
  1636. #define DCDC_REG0_STS_DC_OK ((uint32_t)(1<<31))
  1637. #define DCDC_REG0_XTAL_24M_OK ((uint32_t)(1<<29))
  1638. #define DCDC_REG0_CURRENT_ALERT_RESET ((uint32_t)(1<<28))
  1639. #define DCDC_REG0_XTALOK_DISABLE ((uint32_t)(1<<27))
  1640. #define DCDC_REG0_PWD_CMP_OFFSET ((uint32_t)(1<<26))
  1641. #define DCDC_REG0_LP_HIGH_HYS ((uint32_t)(1<<21))
  1642. #define DCDC_REG0_LP_OVERLOAD_FREQ_SEL ((uint32_t)(1<<20))
  1643. #define DCDC_REG0_LP_OVERLOAD_THRSH(n) ((uint32_t)(((n) & 0x03) << 18))
  1644. #define DCDC_REG0_PWD_HIGH_VOLT_DET ((uint32_t)(1<<17))
  1645. #define DCDC_REG0_EN_LP_OVERLOAD_SNS ((uint32_t)(1<<16))
  1646. #define DCDC_REG0_ADJ_POSLIMIT_BUCK(n) ((uint32_t)(((n) & 0x0F) << 12))
  1647. #define DCDC_REG0_PWD_CMP_BATT_DET ((uint32_t)(1<<11))
  1648. #define DCDC_REG0_OVERCUR_TRIG_ADJ(n) ((uint32_t)(((n) & 0x03) << 9))
  1649. #define DCDC_REG0_PWD_OVERCUR_DET ((uint32_t)(1<<8))
  1650. #define DCDC_REG0_CUR_SNS_THRSH(n) ((uint32_t)(((n) & 0x07) << 5))
  1651. #define DCDC_REG0_PWD_CUR_SNS_CMP ((uint32_t)(1<<4))
  1652. #define DCDC_REG0_PWD_OSC_INT ((uint32_t)(1<<3))
  1653. #define DCDC_REG0_SEL_CLK ((uint32_t)(1<<2))
  1654. #define DCDC_REG0_DISABLE_AUTO_CLK_SWITCH ((uint32_t)(1<<1))
  1655. #define DCDC_REG0_PWD_ZCD ((uint32_t)(1<<0))
  1656. #define DCDC_REG1_VBG_TRIM(n) ((uint32_t)(((n) & 0x1F) << 24))
  1657. #define DCDC_REG1_LOOPCTRL_EN_HYST ((uint32_t)(1<<23))
  1658. #define DCDC_REG1_LOOPCTRL_HST_THRESH ((uint32_t)(1<<21))
  1659. #define DCDC_REG1_LP_CMP_ISRC_SEL(n) ((uint32_t)(((n) & 0x03) << 12))
  1660. #define DCDC_REG1_REG_RLOAD_SW ((uint32_t)(1<<9))
  1661. #define DCDC_REG1_REG_FBK_SEL(n) ((uint32_t)(((n) & 0x03) << 7))
  1662. #define DCDC_REG2_DCM_SET_CTRL ((uint32_t)(1<<28))
  1663. #define DCDC_REG2_DISABLE_PULSE_SKIP ((uint32_t)(1<<27))
  1664. #define DCDC_REG2_LOOPCTRL_HYST_SIGN ((uint32_t)(1<<13))
  1665. #define DCDC_REG2_LOOPCTRL_RCSCALE_THRSH ((uint32_t)(1<<12))
  1666. #define DCDC_REG2_LOOPCTRL_EN_RCSCALE ((uint32_t)(((n) & 0x07) << 9))
  1667. #define DCDC_REG2_LOOPCTRL_DC_FF ((uint32_t)(((n) & 0x07) << 6))
  1668. #define DCDC_REG2_LOOPCTRL_DC_R ((uint32_t)(((n) & 0x0F) << 2))
  1669. #define DCDC_REG2_LOOPCTRL_DC_C ((uint32_t)(((n) & 0x03) << 0))
  1670. #define DCDC_REG3_DISABLE_STEP ((uint32_t)(1<<30))
  1671. #define DCDC_REG3_MISC_DISABLEFET_LOGIC ((uint32_t)(1<<28))
  1672. #define DCDC_REG3_MISC_DELAY_TIMING ((uint32_t)(1<<27))
  1673. #define DCDC_REG3_MINPWR_DC_HALFCLK ((uint32_t)(1<<24))
  1674. #define DCDC_REG3_TARGET_LP(n) ((uint32_t)(((n) & 0x07) << 8))
  1675. #define DCDC_REG3_TRG(n) ((uint32_t)(((n) & 0x1F) << 0))
  1676. #define DCDC_REG3_TRG_MASK ((uint32_t)(0x1F << 0))
  1677. // 21.4.1.1: page 849
  1678. #define IMXRT_DMAMUX (*(IMXRT_REGISTER32_t *)0x400EC000)
  1679. #define DMAMUX_CHCFG0 (IMXRT_DMAMUX.offset000)
  1680. #define DMAMUX_CHCFG1 (IMXRT_DMAMUX.offset004)
  1681. #define DMAMUX_CHCFG2 (IMXRT_DMAMUX.offset008)
  1682. #define DMAMUX_CHCFG3 (IMXRT_DMAMUX.offset00C)
  1683. #define DMAMUX_CHCFG4 (IMXRT_DMAMUX.offset010)
  1684. #define DMAMUX_CHCFG5 (IMXRT_DMAMUX.offset014)
  1685. #define DMAMUX_CHCFG6 (IMXRT_DMAMUX.offset018)
  1686. #define DMAMUX_CHCFG7 (IMXRT_DMAMUX.offset01C)
  1687. #define DMAMUX_CHCFG8 (IMXRT_DMAMUX.offset020)
  1688. #define DMAMUX_CHCFG9 (IMXRT_DMAMUX.offset024)
  1689. #define DMAMUX_CHCFG10 (IMXRT_DMAMUX.offset028)
  1690. #define DMAMUX_CHCFG11 (IMXRT_DMAMUX.offset02C)
  1691. #define DMAMUX_CHCFG12 (IMXRT_DMAMUX.offset030)
  1692. #define DMAMUX_CHCFG13 (IMXRT_DMAMUX.offset034)
  1693. #define DMAMUX_CHCFG14 (IMXRT_DMAMUX.offset038)
  1694. #define DMAMUX_CHCFG15 (IMXRT_DMAMUX.offset03C)
  1695. #define DMAMUX_CHCFG16 (IMXRT_DMAMUX.offset040)
  1696. #define DMAMUX_CHCFG17 (IMXRT_DMAMUX.offset044)
  1697. #define DMAMUX_CHCFG18 (IMXRT_DMAMUX.offset048)
  1698. #define DMAMUX_CHCFG19 (IMXRT_DMAMUX.offset04C)
  1699. #define DMAMUX_CHCFG20 (IMXRT_DMAMUX.offset050)
  1700. #define DMAMUX_CHCFG21 (IMXRT_DMAMUX.offset054)
  1701. #define DMAMUX_CHCFG22 (IMXRT_DMAMUX.offset058)
  1702. #define DMAMUX_CHCFG23 (IMXRT_DMAMUX.offset05C)
  1703. #define DMAMUX_CHCFG24 (IMXRT_DMAMUX.offset060)
  1704. #define DMAMUX_CHCFG25 (IMXRT_DMAMUX.offset064)
  1705. #define DMAMUX_CHCFG26 (IMXRT_DMAMUX.offset068)
  1706. #define DMAMUX_CHCFG27 (IMXRT_DMAMUX.offset06C)
  1707. #define DMAMUX_CHCFG28 (IMXRT_DMAMUX.offset070)
  1708. #define DMAMUX_CHCFG29 (IMXRT_DMAMUX.offset074)
  1709. #define DMAMUX_CHCFG30 (IMXRT_DMAMUX.offset078)
  1710. #define DMAMUX_CHCFG31 (IMXRT_DMAMUX.offset07C)
  1711. #define DMAMUX_CHCFG_ENBL ((uint32_t)(1<<31))
  1712. #define DMAMUX_CHCFG_TRIG ((uint32_t)(1<<30))
  1713. #define DMAMUX_CHCFG_A_ON ((uint32_t)(1<<29))
  1714. // 22.3.5.1: page 864
  1715. typedef struct {
  1716. volatile uint32_t CR; // 0
  1717. volatile uint32_t ES; // 4
  1718. uint32_t unused1; // 8
  1719. volatile uint32_t ERQ; // C
  1720. uint32_t unused2; // 10
  1721. volatile uint32_t EEI; // 14
  1722. volatile uint8_t CEEI; // 18
  1723. volatile uint8_t SEEI; // 19
  1724. volatile uint8_t CERQ; // 1A
  1725. volatile uint8_t SERQ; // 1B
  1726. volatile uint8_t CDNE; // 1C
  1727. volatile uint8_t SSRT; // 1D
  1728. volatile uint8_t CERR; // 1E
  1729. volatile uint8_t CINT; // 1F
  1730. uint32_t unused3; // 20
  1731. volatile uint32_t INT; // 24
  1732. uint32_t unused4; // 28
  1733. volatile uint32_t ERR; // 2C
  1734. uint32_t unused5; // 30
  1735. volatile uint32_t HRS; // 34
  1736. uint32_t unused6; // 38
  1737. uint32_t unused7; // 3C
  1738. uint32_t unused8; // 40
  1739. volatile uint32_t EARS; // 44
  1740. uint32_t unused[46];
  1741. volatile uint8_t DCHPRI3;
  1742. volatile uint8_t DCHPRI2;
  1743. volatile uint8_t DCHPRI1;
  1744. volatile uint8_t DCHPRI0;
  1745. volatile uint8_t DCHPRI7;
  1746. volatile uint8_t DCHPRI6;
  1747. volatile uint8_t DCHPRI5;
  1748. volatile uint8_t DCHPRI4;
  1749. volatile uint8_t DCHPRI11;
  1750. volatile uint8_t DCHPRI10;
  1751. volatile uint8_t DCHPRI9;
  1752. volatile uint8_t DCHPRI8;
  1753. volatile uint8_t DCHPRI15;
  1754. volatile uint8_t DCHPRI14;
  1755. volatile uint8_t DCHPRI13;
  1756. volatile uint8_t DCHPRI12;
  1757. volatile uint8_t DCHPRI19;
  1758. volatile uint8_t DCHPRI18;
  1759. volatile uint8_t DCHPRI17;
  1760. volatile uint8_t DCHPRI16;
  1761. volatile uint8_t DCHPRI23;
  1762. volatile uint8_t DCHPRI22;
  1763. volatile uint8_t DCHPRI21;
  1764. volatile uint8_t DCHPRI20;
  1765. volatile uint8_t DCHPRI27;
  1766. volatile uint8_t DCHPRI26;
  1767. volatile uint8_t DCHPRI25;
  1768. volatile uint8_t DCHPRI24;
  1769. volatile uint8_t DCHPRI31;
  1770. volatile uint8_t DCHPRI30;
  1771. volatile uint8_t DCHPRI29;
  1772. volatile uint8_t DCHPRI28;
  1773. } IMXRT_DMA_t;
  1774. typedef struct {
  1775. volatile const void * volatile SADDR;
  1776. int16_t SOFF;
  1777. union {
  1778. uint16_t ATTR;
  1779. struct {
  1780. uint8_t ATTR_DST;
  1781. uint8_t ATTR_SRC;
  1782. };
  1783. };
  1784. union {
  1785. uint32_t NBYTES;
  1786. uint32_t NBYTES_MLNO;
  1787. uint32_t NBYTES_MLOFFNO;
  1788. uint32_t NBYTES_MLOFFYES;
  1789. };
  1790. int32_t SLAST;
  1791. volatile void * volatile DADDR;
  1792. int16_t DOFF;
  1793. union {
  1794. volatile uint16_t CITER;
  1795. volatile uint16_t CITER_ELINKYES;
  1796. volatile uint16_t CITER_ELINKNO;
  1797. };
  1798. int32_t DLASTSGA;
  1799. volatile uint16_t CSR;
  1800. union {
  1801. volatile uint16_t BITER;
  1802. volatile uint16_t BITER_ELINKYES;
  1803. volatile uint16_t BITER_ELINKNO;
  1804. };
  1805. } IMXRT_DMA_TCD_t;
  1806. #define IMXRT_DMA (*(IMXRT_DMA_t *)0x400E8000)
  1807. #define DMA_CR (IMXRT_DMA.CR)
  1808. #define DMA_ES (IMXRT_DMA.ES)
  1809. #define DMA_ERQ (IMXRT_DMA.ERQ)
  1810. #define DMA_EEI (IMXRT_DMA.EEI)
  1811. #define DMA_CEEI (IMXRT_DMA.CEEI)
  1812. #define DMA_SEEI (IMXRT_DMA.SEEI)
  1813. #define DMA_CERQ (IMXRT_DMA.CERQ)
  1814. #define DMA_SERQ (IMXRT_DMA.SERQ)
  1815. #define DMA_CDNE (IMXRT_DMA.CDNE)
  1816. #define DMA_SSRT (IMXRT_DMA.SSRT)
  1817. #define DMA_CERR (IMXRT_DMA.CERR)
  1818. #define DMA_CINT (IMXRT_DMA.CINT)
  1819. #define DMA_INT (IMXRT_DMA.INT)
  1820. #define DMA_ERR (IMXRT_DMA.ERR)
  1821. #define DMA_HRS (IMXRT_DMA.HRS)
  1822. #define DMA_EARS (IMXRT_DMA.EARS)
  1823. #define DMA_DCHPRI3 (IMXRT_DMA.DCHPRI3)
  1824. #define DMA_DCHPRI2 (IMXRT_DMA.DCHPRI2)
  1825. #define DMA_DCHPRI1 (IMXRT_DMA.DCHPRI1)
  1826. #define DMA_DCHPRI0 (IMXRT_DMA.DCHPRI0)
  1827. #define DMA_DCHPRI7 (IMXRT_DMA.DCHPRI7)
  1828. #define DMA_DCHPRI6 (IMXRT_DMA.DCHPRI6)
  1829. #define DMA_DCHPRI5 (IMXRT_DMA.DCHPRI5)
  1830. #define DMA_DCHPRI4 (IMXRT_DMA.DCHPRI4)
  1831. #define DMA_DCHPRI11 (IMXRT_DMA.DCHPRI11)
  1832. #define DMA_DCHPRI10 (IMXRT_DMA.DCHPRI10)
  1833. #define DMA_DCHPRI9 (IMXRT_DMA.DCHPRI9)
  1834. #define DMA_DCHPRI8 (IMXRT_DMA.DCHPRI8)
  1835. #define DMA_DCHPRI15 (IMXRT_DMA.DCHPRI15)
  1836. #define DMA_DCHPRI14 (IMXRT_DMA.DCHPRI14)
  1837. #define DMA_DCHPRI13 (IMXRT_DMA.DCHPRI13)
  1838. #define DMA_DCHPRI12 (IMXRT_DMA.DCHPRI12)
  1839. #define DMA_DCHPRI19 (IMXRT_DMA.DCHPRI19)
  1840. #define DMA_DCHPRI18 (IMXRT_DMA.DCHPRI18)
  1841. #define DMA_DCHPRI17 (IMXRT_DMA.DCHPRI17)
  1842. #define DMA_DCHPRI16 (IMXRT_DMA.DCHPRI16)
  1843. #define DMA_DCHPRI23 (IMXRT_DMA.DCHPRI23)
  1844. #define DMA_DCHPRI22 (IMXRT_DMA.DCHPRI22)
  1845. #define DMA_DCHPRI21 (IMXRT_DMA.DCHPRI21)
  1846. #define DMA_DCHPRI20 (IMXRT_DMA.DCHPRI20)
  1847. #define DMA_DCHPRI27 (IMXRT_DMA.DCHPRI27)
  1848. #define DMA_DCHPRI26 (IMXRT_DMA.DCHPRI26)
  1849. #define DMA_DCHPRI25 (IMXRT_DMA.DCHPRI25)
  1850. #define DMA_DCHPRI24 (IMXRT_DMA.DCHPRI24)
  1851. #define DMA_DCHPRI31 (IMXRT_DMA.DCHPRI31)
  1852. #define DMA_DCHPRI30 (IMXRT_DMA.DCHPRI30)
  1853. #define DMA_DCHPRI29 (IMXRT_DMA.DCHPRI29)
  1854. #define DMA_DCHPRI28 (IMXRT_DMA.DCHPRI28)
  1855. #define DMA_CR_ACTIVE ((uint32_t)(1<<31)) // 1=DMA is executing
  1856. #define DMA_CR_CX ((uint32_t)(1<<17)) // Cancel Transfer
  1857. #define DMA_CR_ECX ((uint32_t)(1<<16)) // Error Cancel Transfer
  1858. #define DMA_CR_GRP1PRI ((uint32_t)(1<<10))
  1859. #define DMA_CR_GRP0PRI ((uint32_t)(1<<8))
  1860. #define DMA_CR_EMLM ((uint32_t)(1<<7)) // Enable Minor Loop Mapping
  1861. #define DMA_CR_CLM ((uint32_t)(1<<6)) // Continuous Link Mode
  1862. #define DMA_CR_HALT ((uint32_t)(1<<5)) // Halt DMA Operations
  1863. #define DMA_CR_HOE ((uint32_t)(1<<4)) // Halt On Error
  1864. #define DMA_CR_ERGA ((uint32_t)(1<<3)) // Enable Round Robin Group Arb
  1865. #define DMA_CR_ERCA ((uint32_t)(1<<2)) // Enable Round Robin Channel Arb
  1866. #define DMA_CR_EDBG ((uint32_t)(1<<1)) // Enable Debug
  1867. #define DMA_CEEI_CEEI(n) ((uint8_t)(n & 0x1F)) // Clear Enable Error Interrupt
  1868. #define DMA_CEEI_CAEE ((uint8_t)1<<6) // Clear All Enable Error Interrupts
  1869. #define DMA_CEEI_NOP ((uint8_t)1<<7) // NOP
  1870. #define DMA_SEEI_SEEI(n) ((uint8_t)(n & 0x1F)) // Set Enable Error Interrupt
  1871. #define DMA_SEEI_SAEE ((uint8_t)1<<6) // Set All Enable Error Interrupts
  1872. #define DMA_SEEI_NOP ((uint8_t)1<<7) // NOP
  1873. #define DMA_CERQ_CERQ(n) ((uint8_t)(n & 0x1F)) // Clear Enable Request
  1874. #define DMA_CERQ_CAER ((uint8_t)1<<6) // Clear All Enable Requests
  1875. #define DMA_CERQ_NOP ((uint8_t)1<<7) // NOP
  1876. #define DMA_SERQ_SERQ(n) ((uint8_t)(n & 0x1F)) // Set Enable Request
  1877. #define DMA_SERQ_SAER ((uint8_t)1<<6) // Set All Enable Requests
  1878. #define DMA_SERQ_NOP ((uint8_t)1<<7) // NOP
  1879. #define DMA_CDNE_CDNE(n) ((uint8_t)(n & 0x1F)) // Clear Done Bit
  1880. #define DMA_CDNE_CADN ((uint8_t)1<<6) // Clear All Done Bits
  1881. #define DMA_CDNE_NOP ((uint8_t)1<<7) // NOP
  1882. #define DMA_SSRT_SSRT(n) ((uint8_t)(n & 0x1F)) // Set Start Bit
  1883. #define DMA_SSRT_SAST ((uint8_t)1<<6) // Set All Start Bits
  1884. #define DMA_SSRT_NOP ((uint8_t)1<<7) // NOP
  1885. #define DMA_CERR_CERR(n) ((uint8_t)(n & 0x1F)) // Clear Error Indicator
  1886. #define DMA_CERR_CAEI ((uint8_t)1<<6) // Clear All Error Indicators
  1887. #define DMA_CERR_NOP ((uint8_t)1<<7) // NOP
  1888. #define DMA_CINT_CINT(n) ((uint8_t)(n & 0x1F)) // Clear Interrupt Request
  1889. #define DMA_CINT_CAIR ((uint8_t)1<<6) // Clear All Interrupt Requests
  1890. #define DMA_CINT_NOP ((uint8_t)1<<7) // NOP
  1891. #define IMXRT_DMA_TCD ((IMXRT_DMA_TCD_t *)0x400E9000)
  1892. #define DMA_TCD0_SADDR (IMXRT_DMA_TCD[0].SADDR)
  1893. #define DMA_TCD0_SOFF (IMXRT_DMA_TCD[0].SOFF)
  1894. #define DMA_TCD0_ATTR (IMXRT_DMA_TCD[0].ATTR)
  1895. #define DMA_TCD0_NBYTES (IMXRT_DMA_TCD[0].NBYTES)
  1896. #define DMA_TCD0_NBYTES_MLNO (IMXRT_DMA_TCD[0].NBYTES_MLNO)
  1897. #define DMA_TCD0_NBYTES_MLOFFNO (IMXRT_DMA_TCD[0].NBYTES_MLOFFNO)
  1898. #define DMA_TCD0_NBYTES_MLOFFYES (IMXRT_DMA_TCD[0].NBYTES_MLOFFYES)
  1899. #define DMA_TCD0_SLAST (IMXRT_DMA_TCD[0].SLAST)
  1900. #define DMA_TCD0_DADDR (IMXRT_DMA_TCD[0].DADDR)
  1901. #define DMA_TCD0_DOFF (IMXRT_DMA_TCD[0].DOFF)
  1902. #define DMA_TCD0_CITER (IMXRT_DMA_TCD[0].CITER)
  1903. #define DMA_TCD0_CITER_ELINKYES (IMXRT_DMA_TCD[0].CITER_ELINKYES)
  1904. #define DMA_TCD0_CITER_ELINKNO (IMXRT_DMA_TCD[0].CITER_ELINKNO)
  1905. #define DMA_TCD0_DLASTSGA (IMXRT_DMA_TCD[0].DLASTSGA)
  1906. #define DMA_TCD0_CSR (IMXRT_DMA_TCD[0].CSR)
  1907. #define DMA_TCD0_BITER (IMXRT_DMA_TCD[0].BITER)
  1908. #define DMA_TCD0_BITER_ELINKYES (IMXRT_DMA_TCD[0].BITER_ELINKYES)
  1909. #define DMA_TCD0_BITER_ELINKNO (IMXRT_DMA_TCD[0].BITER_ELINKNO)
  1910. #define DMA_TCD1_SADDR (IMXRT_DMA_TCD[1].SADDR)
  1911. #define DMA_TCD1_SOFF (IMXRT_DMA_TCD[1].SOFF)
  1912. #define DMA_TCD1_ATTR (IMXRT_DMA_TCD[1].ATTR)
  1913. #define DMA_TCD1_NBYTES (IMXRT_DMA_TCD[1].NBYTES)
  1914. #define DMA_TCD1_NBYTES_MLNO (IMXRT_DMA_TCD[1].NBYTES_MLNO)
  1915. #define DMA_TCD1_NBYTES_MLOFFNO (IMXRT_DMA_TCD[1].NBYTES_MLOFFNO)
  1916. #define DMA_TCD1_NBYTES_MLOFFYES (IMXRT_DMA_TCD[1].NBYTES_MLOFFYES)
  1917. #define DMA_TCD1_SLAST (IMXRT_DMA_TCD[1].SLAST)
  1918. #define DMA_TCD1_DADDR (IMXRT_DMA_TCD[1].DADDR)
  1919. #define DMA_TCD1_DOFF (IMXRT_DMA_TCD[1].DOFF)
  1920. #define DMA_TCD1_CITER (IMXRT_DMA_TCD[1].CITER)
  1921. #define DMA_TCD1_CITER_ELINKYES (IMXRT_DMA_TCD[1].CITER_ELINKYES)
  1922. #define DMA_TCD1_CITER_ELINKNO (IMXRT_DMA_TCD[1].CITER_ELINKNO)
  1923. #define DMA_TCD1_DLASTSGA (IMXRT_DMA_TCD[1].DLASTSGA)
  1924. #define DMA_TCD1_CSR (IMXRT_DMA_TCD[1].CSR)
  1925. #define DMA_TCD1_BITER (IMXRT_DMA_TCD[1].BITER)
  1926. #define DMA_TCD1_BITER_ELINKYES (IMXRT_DMA_TCD[1].BITER_ELINKYES)
  1927. #define DMA_TCD1_BITER_ELINKNO (IMXRT_DMA_TCD[1].BITER_ELINKNO)
  1928. #define DMA_TCD2_SADDR (IMXRT_DMA_TCD[2].SADDR)
  1929. #define DMA_TCD2_SOFF (IMXRT_DMA_TCD[2].SOFF)
  1930. #define DMA_TCD2_ATTR (IMXRT_DMA_TCD[2].ATTR)
  1931. #define DMA_TCD2_NBYTES (IMXRT_DMA_TCD[2].NBYTES)
  1932. #define DMA_TCD2_NBYTES_MLNO (IMXRT_DMA_TCD[2].NBYTES_MLNO)
  1933. #define DMA_TCD2_NBYTES_MLOFFNO (IMXRT_DMA_TCD[2].NBYTES_MLOFFNO)
  1934. #define DMA_TCD2_NBYTES_MLOFFYES (IMXRT_DMA_TCD[2].NBYTES_MLOFFYES)
  1935. #define DMA_TCD2_SLAST (IMXRT_DMA_TCD[2].SLAST)
  1936. #define DMA_TCD2_DADDR (IMXRT_DMA_TCD[2].DADDR)
  1937. #define DMA_TCD2_DOFF (IMXRT_DMA_TCD[2].DOFF)
  1938. #define DMA_TCD2_CITER (IMXRT_DMA_TCD[2].CITER)
  1939. #define DMA_TCD2_CITER_ELINKYES (IMXRT_DMA_TCD[2].CITER_ELINKYES)
  1940. #define DMA_TCD2_CITER_ELINKNO (IMXRT_DMA_TCD[2].CITER_ELINKNO)
  1941. #define DMA_TCD2_DLASTSGA (IMXRT_DMA_TCD[2].DLASTSGA)
  1942. #define DMA_TCD2_CSR (IMXRT_DMA_TCD[2].CSR)
  1943. #define DMA_TCD2_BITER (IMXRT_DMA_TCD[2].BITER)
  1944. #define DMA_TCD2_BITER_ELINKYES (IMXRT_DMA_TCD[2].BITER_ELINKYES)
  1945. #define DMA_TCD2_BITER_ELINKNO (IMXRT_DMA_TCD[2].BITER_ELINKNO)
  1946. #define DMA_TCD3_SADDR (IMXRT_DMA_TCD[3].SADDR)
  1947. #define DMA_TCD3_SOFF (IMXRT_DMA_TCD[3].SOFF)
  1948. #define DMA_TCD3_ATTR (IMXRT_DMA_TCD[3].ATTR)
  1949. #define DMA_TCD3_NBYTES (IMXRT_DMA_TCD[3].NBYTES)
  1950. #define DMA_TCD3_NBYTES_MLNO (IMXRT_DMA_TCD[3].NBYTES_MLNO)
  1951. #define DMA_TCD3_NBYTES_MLOFFNO (IMXRT_DMA_TCD[3].NBYTES_MLOFFNO)
  1952. #define DMA_TCD3_NBYTES_MLOFFYES (IMXRT_DMA_TCD[3].NBYTES_MLOFFYES)
  1953. #define DMA_TCD3_SLAST (IMXRT_DMA_TCD[3].SLAST)
  1954. #define DMA_TCD3_DADDR (IMXRT_DMA_TCD[3].DADDR)
  1955. #define DMA_TCD3_DOFF (IMXRT_DMA_TCD[3].DOFF)
  1956. #define DMA_TCD3_CITER (IMXRT_DMA_TCD[3].CITER)
  1957. #define DMA_TCD3_CITER_ELINKYES (IMXRT_DMA_TCD[3].CITER_ELINKYES)
  1958. #define DMA_TCD3_CITER_ELINKNO (IMXRT_DMA_TCD[3].CITER_ELINKNO)
  1959. #define DMA_TCD3_DLASTSGA (IMXRT_DMA_TCD[3].DLASTSGA)
  1960. #define DMA_TCD3_CSR (IMXRT_DMA_TCD[3].CSR)
  1961. #define DMA_TCD3_BITER (IMXRT_DMA_TCD[3].BITER)
  1962. #define DMA_TCD3_BITER_ELINKYES (IMXRT_DMA_TCD[3].BITER_ELINKYES)
  1963. #define DMA_TCD3_BITER_ELINKNO (IMXRT_DMA_TCD[3].BITER_ELINKNO)
  1964. #define DMA_TCD4_SADDR (IMXRT_DMA_TCD[4].SADDR)
  1965. #define DMA_TCD4_SOFF (IMXRT_DMA_TCD[4].SOFF)
  1966. #define DMA_TCD4_ATTR (IMXRT_DMA_TCD[4].ATTR)
  1967. #define DMA_TCD4_NBYTES (IMXRT_DMA_TCD[4].NBYTES)
  1968. #define DMA_TCD4_NBYTES_MLNO (IMXRT_DMA_TCD[4].NBYTES_MLNO)
  1969. #define DMA_TCD4_NBYTES_MLOFFNO (IMXRT_DMA_TCD[4].NBYTES_MLOFFNO)
  1970. #define DMA_TCD4_NBYTES_MLOFFYES (IMXRT_DMA_TCD[4].NBYTES_MLOFFYES)
  1971. #define DMA_TCD4_SLAST (IMXRT_DMA_TCD[4].SLAST)
  1972. #define DMA_TCD4_DADDR (IMXRT_DMA_TCD[4].DADDR)
  1973. #define DMA_TCD4_DOFF (IMXRT_DMA_TCD[4].DOFF)
  1974. #define DMA_TCD4_CITER (IMXRT_DMA_TCD[4].CITER)
  1975. #define DMA_TCD4_CITER_ELINKYES (IMXRT_DMA_TCD[4].CITER_ELINKYES)
  1976. #define DMA_TCD4_CITER_ELINKNO (IMXRT_DMA_TCD[4].CITER_ELINKNO)
  1977. #define DMA_TCD4_DLASTSGA (IMXRT_DMA_TCD[4].DLASTSGA)
  1978. #define DMA_TCD4_CSR (IMXRT_DMA_TCD[4].CSR)
  1979. #define DMA_TCD4_BITER (IMXRT_DMA_TCD[4].BITER)
  1980. #define DMA_TCD4_BITER_ELINKYES (IMXRT_DMA_TCD[4].BITER_ELINKYES)
  1981. #define DMA_TCD4_BITER_ELINKNO (IMXRT_DMA_TCD[4].BITER_ELINKNO)
  1982. #define DMA_TCD5_SADDR (IMXRT_DMA_TCD[5].SADDR)
  1983. #define DMA_TCD5_SOFF (IMXRT_DMA_TCD[5].SOFF)
  1984. #define DMA_TCD5_ATTR (IMXRT_DMA_TCD[5].ATTR)
  1985. #define DMA_TCD5_NBYTES (IMXRT_DMA_TCD[5].NBYTES)
  1986. #define DMA_TCD5_NBYTES_MLNO (IMXRT_DMA_TCD[5].NBYTES_MLNO)
  1987. #define DMA_TCD5_NBYTES_MLOFFNO (IMXRT_DMA_TCD[5].NBYTES_MLOFFNO)
  1988. #define DMA_TCD5_NBYTES_MLOFFYES (IMXRT_DMA_TCD[5].NBYTES_MLOFFYES)
  1989. #define DMA_TCD5_SLAST (IMXRT_DMA_TCD[5].SLAST)
  1990. #define DMA_TCD5_DADDR (IMXRT_DMA_TCD[5].DADDR)
  1991. #define DMA_TCD5_DOFF (IMXRT_DMA_TCD[5].DOFF)
  1992. #define DMA_TCD5_CITER (IMXRT_DMA_TCD[5].CITER)
  1993. #define DMA_TCD5_CITER_ELINKYES (IMXRT_DMA_TCD[5].CITER_ELINKYES)
  1994. #define DMA_TCD5_CITER_ELINKNO (IMXRT_DMA_TCD[5].CITER_ELINKNO)
  1995. #define DMA_TCD5_DLASTSGA (IMXRT_DMA_TCD[5].DLASTSGA)
  1996. #define DMA_TCD5_CSR (IMXRT_DMA_TCD[5].CSR)
  1997. #define DMA_TCD5_BITER (IMXRT_DMA_TCD[5].BITER)
  1998. #define DMA_TCD5_BITER_ELINKYES (IMXRT_DMA_TCD[5].BITER_ELINKYES)
  1999. #define DMA_TCD5_BITER_ELINKNO (IMXRT_DMA_TCD[5].BITER_ELINKNO)
  2000. #define DMA_TCD6_SADDR (IMXRT_DMA_TCD[6].SADDR)
  2001. #define DMA_TCD6_SOFF (IMXRT_DMA_TCD[6].SOFF)
  2002. #define DMA_TCD6_ATTR (IMXRT_DMA_TCD[6].ATTR)
  2003. #define DMA_TCD6_NBYTES (IMXRT_DMA_TCD[6].NBYTES)
  2004. #define DMA_TCD6_NBYTES_MLNO (IMXRT_DMA_TCD[6].NBYTES_MLNO)
  2005. #define DMA_TCD6_NBYTES_MLOFFNO (IMXRT_DMA_TCD[6].NBYTES_MLOFFNO)
  2006. #define DMA_TCD6_NBYTES_MLOFFYES (IMXRT_DMA_TCD[6].NBYTES_MLOFFYES)
  2007. #define DMA_TCD6_SLAST (IMXRT_DMA_TCD[6].SLAST)
  2008. #define DMA_TCD6_DADDR (IMXRT_DMA_TCD[6].DADDR)
  2009. #define DMA_TCD6_DOFF (IMXRT_DMA_TCD[6].DOFF)
  2010. #define DMA_TCD6_CITER (IMXRT_DMA_TCD[6].CITER)
  2011. #define DMA_TCD6_CITER_ELINKYES (IMXRT_DMA_TCD[6].CITER_ELINKYES)
  2012. #define DMA_TCD6_CITER_ELINKNO (IMXRT_DMA_TCD[6].CITER_ELINKNO)
  2013. #define DMA_TCD6_DLASTSGA (IMXRT_DMA_TCD[6].DLASTSGA)
  2014. #define DMA_TCD6_CSR (IMXRT_DMA_TCD[6].CSR)
  2015. #define DMA_TCD6_BITER (IMXRT_DMA_TCD[6].BITER)
  2016. #define DMA_TCD6_BITER_ELINKYES (IMXRT_DMA_TCD[6].BITER_ELINKYES)
  2017. #define DMA_TCD6_BITER_ELINKNO (IMXRT_DMA_TCD[6].BITER_ELINKNO)
  2018. #define DMA_TCD7_SADDR (IMXRT_DMA_TCD[7].SADDR)
  2019. #define DMA_TCD7_SOFF (IMXRT_DMA_TCD[7].SOFF)
  2020. #define DMA_TCD7_ATTR (IMXRT_DMA_TCD[7].ATTR)
  2021. #define DMA_TCD7_NBYTES (IMXRT_DMA_TCD[7].NBYTES)
  2022. #define DMA_TCD7_NBYTES_MLNO (IMXRT_DMA_TCD[7].NBYTES_MLNO)
  2023. #define DMA_TCD7_NBYTES_MLOFFNO (IMXRT_DMA_TCD[7].NBYTES_MLOFFNO)
  2024. #define DMA_TCD7_NBYTES_MLOFFYES (IMXRT_DMA_TCD[7].NBYTES_MLOFFYES)
  2025. #define DMA_TCD7_SLAST (IMXRT_DMA_TCD[7].SLAST)
  2026. #define DMA_TCD7_DADDR (IMXRT_DMA_TCD[7].DADDR)
  2027. #define DMA_TCD7_DOFF (IMXRT_DMA_TCD[7].DOFF)
  2028. #define DMA_TCD7_CITER (IMXRT_DMA_TCD[7].CITER)
  2029. #define DMA_TCD7_CITER_ELINKYES (IMXRT_DMA_TCD[7].CITER_ELINKYES)
  2030. #define DMA_TCD7_CITER_ELINKNO (IMXRT_DMA_TCD[7].CITER_ELINKNO)
  2031. #define DMA_TCD7_DLASTSGA (IMXRT_DMA_TCD[7].DLASTSGA)
  2032. #define DMA_TCD7_CSR (IMXRT_DMA_TCD[7].CSR)
  2033. #define DMA_TCD7_BITER (IMXRT_DMA_TCD[7].BITER)
  2034. #define DMA_TCD7_BITER_ELINKYES (IMXRT_DMA_TCD[7].BITER_ELINKYES)
  2035. #define DMA_TCD7_BITER_ELINKNO (IMXRT_DMA_TCD[7].BITER_ELINKNO)
  2036. #define DMA_TCD8_SADDR (IMXRT_DMA_TCD[8].SADDR)
  2037. #define DMA_TCD8_SOFF (IMXRT_DMA_TCD[8].SOFF)
  2038. #define DMA_TCD8_ATTR (IMXRT_DMA_TCD[8].ATTR)
  2039. #define DMA_TCD8_NBYTES (IMXRT_DMA_TCD[8].NBYTES)
  2040. #define DMA_TCD8_NBYTES_MLNO (IMXRT_DMA_TCD[8].NBYTES_MLNO)
  2041. #define DMA_TCD8_NBYTES_MLOFFNO (IMXRT_DMA_TCD[8].NBYTES_MLOFFNO)
  2042. #define DMA_TCD8_NBYTES_MLOFFYES (IMXRT_DMA_TCD[8].NBYTES_MLOFFYES)
  2043. #define DMA_TCD8_SLAST (IMXRT_DMA_TCD[8].SLAST)
  2044. #define DMA_TCD8_DADDR (IMXRT_DMA_TCD[8].DADDR)
  2045. #define DMA_TCD8_DOFF (IMXRT_DMA_TCD[8].DOFF)
  2046. #define DMA_TCD8_CITER (IMXRT_DMA_TCD[8].CITER)
  2047. #define DMA_TCD8_CITER_ELINKYES (IMXRT_DMA_TCD[8].CITER_ELINKYES)
  2048. #define DMA_TCD8_CITER_ELINKNO (IMXRT_DMA_TCD[8].CITER_ELINKNO)
  2049. #define DMA_TCD8_DLASTSGA (IMXRT_DMA_TCD[8].DLASTSGA)
  2050. #define DMA_TCD8_CSR (IMXRT_DMA_TCD[8].CSR)
  2051. #define DMA_TCD8_BITER (IMXRT_DMA_TCD[8].BITER)
  2052. #define DMA_TCD8_BITER_ELINKYES (IMXRT_DMA_TCD[8].BITER_ELINKYES)
  2053. #define DMA_TCD8_BITER_ELINKNO (IMXRT_DMA_TCD[8].BITER_ELINKNO)
  2054. #define DMA_TCD9_SADDR (IMXRT_DMA_TCD[9].SADDR)
  2055. #define DMA_TCD9_SOFF (IMXRT_DMA_TCD[9].SOFF)
  2056. #define DMA_TCD9_ATTR (IMXRT_DMA_TCD[9].ATTR)
  2057. #define DMA_TCD9_NBYTES (IMXRT_DMA_TCD[9].NBYTES)
  2058. #define DMA_TCD9_NBYTES_MLNO (IMXRT_DMA_TCD[9].NBYTES_MLNO)
  2059. #define DMA_TCD9_NBYTES_MLOFFNO (IMXRT_DMA_TCD[9].NBYTES_MLOFFNO)
  2060. #define DMA_TCD9_NBYTES_MLOFFYES (IMXRT_DMA_TCD[9].NBYTES_MLOFFYES)
  2061. #define DMA_TCD9_SLAST (IMXRT_DMA_TCD[9].SLAST)
  2062. #define DMA_TCD9_DADDR (IMXRT_DMA_TCD[9].DADDR)
  2063. #define DMA_TCD9_DOFF (IMXRT_DMA_TCD[9].DOFF)
  2064. #define DMA_TCD9_CITER (IMXRT_DMA_TCD[9].CITER)
  2065. #define DMA_TCD9_CITER_ELINKYES (IMXRT_DMA_TCD[9].CITER_ELINKYES)
  2066. #define DMA_TCD9_CITER_ELINKNO (IMXRT_DMA_TCD[9].CITER_ELINKNO)
  2067. #define DMA_TCD9_DLASTSGA (IMXRT_DMA_TCD[9].DLASTSGA)
  2068. #define DMA_TCD9_CSR (IMXRT_DMA_TCD[9].CSR)
  2069. #define DMA_TCD9_BITER (IMXRT_DMA_TCD[9].BITER)
  2070. #define DMA_TCD9_BITER_ELINKYES (IMXRT_DMA_TCD[9].BITER_ELINKYES)
  2071. #define DMA_TCD9_BITER_ELINKNO (IMXRT_DMA_TCD[9].BITER_ELINKNO)
  2072. #define DMA_TCD10_SADDR (IMXRT_DMA_TCD[10].SADDR)
  2073. #define DMA_TCD10_SOFF (IMXRT_DMA_TCD[10].SOFF)
  2074. #define DMA_TCD10_ATTR (IMXRT_DMA_TCD[10].ATTR)
  2075. #define DMA_TCD10_NBYTES (IMXRT_DMA_TCD[10].NBYTES)
  2076. #define DMA_TCD10_NBYTES_MLNO (IMXRT_DMA_TCD[10].NBYTES_MLNO)
  2077. #define DMA_TCD10_NBYTES_MLOFFNO (IMXRT_DMA_TCD[10].NBYTES_MLOFFNO)
  2078. #define DMA_TCD10_NBYTES_MLOFFYES (IMXRT_DMA_TCD[10].NBYTES_MLOFFYES)
  2079. #define DMA_TCD10_SLAST (IMXRT_DMA_TCD[10].SLAST)
  2080. #define DMA_TCD10_DADDR (IMXRT_DMA_TCD[10].DADDR)
  2081. #define DMA_TCD10_DOFF (IMXRT_DMA_TCD[10].DOFF)
  2082. #define DMA_TCD10_CITER (IMXRT_DMA_TCD[10].CITER)
  2083. #define DMA_TCD10_CITER_ELINKYES (IMXRT_DMA_TCD[10].CITER_ELINKYES)
  2084. #define DMA_TCD10_CITER_ELINKNO (IMXRT_DMA_TCD[10].CITER_ELINKNO)
  2085. #define DMA_TCD10_DLASTSGA (IMXRT_DMA_TCD[10].DLASTSGA)
  2086. #define DMA_TCD10_CSR (IMXRT_DMA_TCD[10].CSR)
  2087. #define DMA_TCD10_BITER (IMXRT_DMA_TCD[10].BITER)
  2088. #define DMA_TCD10_BITER_ELINKYES (IMXRT_DMA_TCD[10].BITER_ELINKYES)
  2089. #define DMA_TCD10_BITER_ELINKNO (IMXRT_DMA_TCD[10].BITER_ELINKNO)
  2090. #define DMA_TCD11_SADDR (IMXRT_DMA_TCD[11].SADDR)
  2091. #define DMA_TCD11_SOFF (IMXRT_DMA_TCD[11].SOFF)
  2092. #define DMA_TCD11_ATTR (IMXRT_DMA_TCD[11].ATTR)
  2093. #define DMA_TCD11_NBYTES (IMXRT_DMA_TCD[11].NBYTES)
  2094. #define DMA_TCD11_NBYTES_MLNO (IMXRT_DMA_TCD[11].NBYTES_MLNO)
  2095. #define DMA_TCD11_NBYTES_MLOFFNO (IMXRT_DMA_TCD[11].NBYTES_MLOFFNO)
  2096. #define DMA_TCD11_NBYTES_MLOFFYES (IMXRT_DMA_TCD[11].NBYTES_MLOFFYES)
  2097. #define DMA_TCD11_SLAST (IMXRT_DMA_TCD[11].SLAST)
  2098. #define DMA_TCD11_DADDR (IMXRT_DMA_TCD[11].DADDR)
  2099. #define DMA_TCD11_DOFF (IMXRT_DMA_TCD[11].DOFF)
  2100. #define DMA_TCD11_CITER (IMXRT_DMA_TCD[11].CITER)
  2101. #define DMA_TCD11_CITER_ELINKYES (IMXRT_DMA_TCD[11].CITER_ELINKYES)
  2102. #define DMA_TCD11_CITER_ELINKNO (IMXRT_DMA_TCD[11].CITER_ELINKNO)
  2103. #define DMA_TCD11_DLASTSGA (IMXRT_DMA_TCD[11].DLASTSGA)
  2104. #define DMA_TCD11_CSR (IMXRT_DMA_TCD[11].CSR)
  2105. #define DMA_TCD11_BITER (IMXRT_DMA_TCD[11].BITER)
  2106. #define DMA_TCD11_BITER_ELINKYES (IMXRT_DMA_TCD[11].BITER_ELINKYES)
  2107. #define DMA_TCD11_BITER_ELINKNO (IMXRT_DMA_TCD[11].BITER_ELINKNO)
  2108. #define DMA_TCD12_SADDR (IMXRT_DMA_TCD[12].SADDR)
  2109. #define DMA_TCD12_SOFF (IMXRT_DMA_TCD[12].SOFF)
  2110. #define DMA_TCD12_ATTR (IMXRT_DMA_TCD[12].ATTR)
  2111. #define DMA_TCD12_NBYTES (IMXRT_DMA_TCD[12].NBYTES)
  2112. #define DMA_TCD12_NBYTES_MLNO (IMXRT_DMA_TCD[12].NBYTES_MLNO)
  2113. #define DMA_TCD12_NBYTES_MLOFFNO (IMXRT_DMA_TCD[12].NBYTES_MLOFFNO)
  2114. #define DMA_TCD12_NBYTES_MLOFFYES (IMXRT_DMA_TCD[12].NBYTES_MLOFFYES)
  2115. #define DMA_TCD12_SLAST (IMXRT_DMA_TCD[12].SLAST)
  2116. #define DMA_TCD12_DADDR (IMXRT_DMA_TCD[12].DADDR)
  2117. #define DMA_TCD12_DOFF (IMXRT_DMA_TCD[12].DOFF)
  2118. #define DMA_TCD12_CITER (IMXRT_DMA_TCD[12].CITER)
  2119. #define DMA_TCD12_CITER_ELINKYES (IMXRT_DMA_TCD[12].CITER_ELINKYES)
  2120. #define DMA_TCD12_CITER_ELINKNO (IMXRT_DMA_TCD[12].CITER_ELINKNO)
  2121. #define DMA_TCD12_DLASTSGA (IMXRT_DMA_TCD[12].DLASTSGA)
  2122. #define DMA_TCD12_CSR (IMXRT_DMA_TCD[12].CSR)
  2123. #define DMA_TCD12_BITER (IMXRT_DMA_TCD[12].BITER)
  2124. #define DMA_TCD12_BITER_ELINKYES (IMXRT_DMA_TCD[12].BITER_ELINKYES)
  2125. #define DMA_TCD12_BITER_ELINKNO (IMXRT_DMA_TCD[12].BITER_ELINKNO)
  2126. #define DMA_TCD13_SADDR (IMXRT_DMA_TCD[13].SADDR)
  2127. #define DMA_TCD13_SOFF (IMXRT_DMA_TCD[13].SOFF)
  2128. #define DMA_TCD13_ATTR (IMXRT_DMA_TCD[13].ATTR)
  2129. #define DMA_TCD13_NBYTES (IMXRT_DMA_TCD[13].NBYTES)
  2130. #define DMA_TCD13_NBYTES_MLNO (IMXRT_DMA_TCD[13].NBYTES_MLNO)
  2131. #define DMA_TCD13_NBYTES_MLOFFNO (IMXRT_DMA_TCD[13].NBYTES_MLOFFNO)
  2132. #define DMA_TCD13_NBYTES_MLOFFYES (IMXRT_DMA_TCD[13].NBYTES_MLOFFYES)
  2133. #define DMA_TCD13_SLAST (IMXRT_DMA_TCD[13].SLAST)
  2134. #define DMA_TCD13_DADDR (IMXRT_DMA_TCD[13].DADDR)
  2135. #define DMA_TCD13_DOFF (IMXRT_DMA_TCD[13].DOFF)
  2136. #define DMA_TCD13_CITER (IMXRT_DMA_TCD[13].CITER)
  2137. #define DMA_TCD13_CITER_ELINKYES (IMXRT_DMA_TCD[13].CITER_ELINKYES)
  2138. #define DMA_TCD13_CITER_ELINKNO (IMXRT_DMA_TCD[13].CITER_ELINKNO)
  2139. #define DMA_TCD13_DLASTSGA (IMXRT_DMA_TCD[13].DLASTSGA)
  2140. #define DMA_TCD13_CSR (IMXRT_DMA_TCD[13].CSR)
  2141. #define DMA_TCD13_BITER (IMXRT_DMA_TCD[13].BITER)
  2142. #define DMA_TCD13_BITER_ELINKYES (IMXRT_DMA_TCD[13].BITER_ELINKYES)
  2143. #define DMA_TCD13_BITER_ELINKNO (IMXRT_DMA_TCD[13].BITER_ELINKNO)
  2144. #define DMA_TCD14_SADDR (IMXRT_DMA_TCD[14].SADDR)
  2145. #define DMA_TCD14_SOFF (IMXRT_DMA_TCD[14].SOFF)
  2146. #define DMA_TCD14_ATTR (IMXRT_DMA_TCD[14].ATTR)
  2147. #define DMA_TCD14_NBYTES (IMXRT_DMA_TCD[14].NBYTES)
  2148. #define DMA_TCD14_NBYTES_MLNO (IMXRT_DMA_TCD[14].NBYTES_MLNO)
  2149. #define DMA_TCD14_NBYTES_MLOFFNO (IMXRT_DMA_TCD[14].NBYTES_MLOFFNO)
  2150. #define DMA_TCD14_NBYTES_MLOFFYES (IMXRT_DMA_TCD[14].NBYTES_MLOFFYES)
  2151. #define DMA_TCD14_SLAST (IMXRT_DMA_TCD[14].SLAST)
  2152. #define DMA_TCD14_DADDR (IMXRT_DMA_TCD[14].DADDR)
  2153. #define DMA_TCD14_DOFF (IMXRT_DMA_TCD[14].DOFF)
  2154. #define DMA_TCD14_CITER (IMXRT_DMA_TCD[14].CITER)
  2155. #define DMA_TCD14_CITER_ELINKYES (IMXRT_DMA_TCD[14].CITER_ELINKYES)
  2156. #define DMA_TCD14_CITER_ELINKNO (IMXRT_DMA_TCD[14].CITER_ELINKNO)
  2157. #define DMA_TCD14_DLASTSGA (IMXRT_DMA_TCD[14].DLASTSGA)
  2158. #define DMA_TCD14_CSR (IMXRT_DMA_TCD[14].CSR)
  2159. #define DMA_TCD14_BITER (IMXRT_DMA_TCD[14].BITER)
  2160. #define DMA_TCD14_BITER_ELINKYES (IMXRT_DMA_TCD[14].BITER_ELINKYES)
  2161. #define DMA_TCD14_BITER_ELINKNO (IMXRT_DMA_TCD[14].BITER_ELINKNO)
  2162. #define DMA_TCD15_SADDR (IMXRT_DMA_TCD[15].SADDR)
  2163. #define DMA_TCD15_SOFF (IMXRT_DMA_TCD[15].SOFF)
  2164. #define DMA_TCD15_ATTR (IMXRT_DMA_TCD[15].ATTR)
  2165. #define DMA_TCD15_NBYTES (IMXRT_DMA_TCD[15].NBYTES)
  2166. #define DMA_TCD15_NBYTES_MLNO (IMXRT_DMA_TCD[15].NBYTES_MLNO)
  2167. #define DMA_TCD15_NBYTES_MLOFFNO (IMXRT_DMA_TCD[15].NBYTES_MLOFFNO)
  2168. #define DMA_TCD15_NBYTES_MLOFFYES (IMXRT_DMA_TCD[15].NBYTES_MLOFFYES)
  2169. #define DMA_TCD15_SLAST (IMXRT_DMA_TCD[15].SLAST)
  2170. #define DMA_TCD15_DADDR (IMXRT_DMA_TCD[15].DADDR)
  2171. #define DMA_TCD15_DOFF (IMXRT_DMA_TCD[15].DOFF)
  2172. #define DMA_TCD15_CITER (IMXRT_DMA_TCD[15].CITER)
  2173. #define DMA_TCD15_CITER_ELINKYES (IMXRT_DMA_TCD[15].CITER_ELINKYES)
  2174. #define DMA_TCD15_CITER_ELINKNO (IMXRT_DMA_TCD[15].CITER_ELINKNO)
  2175. #define DMA_TCD15_DLASTSGA (IMXRT_DMA_TCD[15].DLASTSGA)
  2176. #define DMA_TCD15_CSR (IMXRT_DMA_TCD[15].CSR)
  2177. #define DMA_TCD15_BITER (IMXRT_DMA_TCD[15].BITER)
  2178. #define DMA_TCD15_BITER_ELINKYES (IMXRT_DMA_TCD[15].BITER_ELINKYES)
  2179. #define DMA_TCD15_BITER_ELINKNO (IMXRT_DMA_TCD[15].BITER_ELINKNO)
  2180. #define DMA_TCD16_SADDR (IMXRT_DMA_TCD[16].SADDR)
  2181. #define DMA_TCD16_SOFF (IMXRT_DMA_TCD[16].SOFF)
  2182. #define DMA_TCD16_ATTR (IMXRT_DMA_TCD[16].ATTR)
  2183. #define DMA_TCD16_NBYTES (IMXRT_DMA_TCD[16].NBYTES)
  2184. #define DMA_TCD16_NBYTES_MLNO (IMXRT_DMA_TCD[16].NBYTES_MLNO)
  2185. #define DMA_TCD16_NBYTES_MLOFFNO (IMXRT_DMA_TCD[16].NBYTES_MLOFFNO)
  2186. #define DMA_TCD16_NBYTES_MLOFFYES (IMXRT_DMA_TCD[16].NBYTES_MLOFFYES)
  2187. #define DMA_TCD16_SLAST (IMXRT_DMA_TCD[16].SLAST)
  2188. #define DMA_TCD16_DADDR (IMXRT_DMA_TCD[16].DADDR)
  2189. #define DMA_TCD16_DOFF (IMXRT_DMA_TCD[16].DOFF)
  2190. #define DMA_TCD16_CITER (IMXRT_DMA_TCD[16].CITER)
  2191. #define DMA_TCD16_CITER_ELINKYES (IMXRT_DMA_TCD[16].CITER_ELINKYES)
  2192. #define DMA_TCD16_CITER_ELINKNO (IMXRT_DMA_TCD[16].CITER_ELINKNO)
  2193. #define DMA_TCD16_DLASTSGA (IMXRT_DMA_TCD[16].DLASTSGA)
  2194. #define DMA_TCD16_CSR (IMXRT_DMA_TCD[16].CSR)
  2195. #define DMA_TCD16_BITER (IMXRT_DMA_TCD[16].BITER)
  2196. #define DMA_TCD16_BITER_ELINKYES (IMXRT_DMA_TCD[16].BITER_ELINKYES)
  2197. #define DMA_TCD16_BITER_ELINKNO (IMXRT_DMA_TCD[16].BITER_ELINKNO)
  2198. #define DMA_TCD17_SADDR (IMXRT_DMA_TCD[17].SADDR)
  2199. #define DMA_TCD17_SOFF (IMXRT_DMA_TCD[17].SOFF)
  2200. #define DMA_TCD17_ATTR (IMXRT_DMA_TCD[17].ATTR)
  2201. #define DMA_TCD17_NBYTES (IMXRT_DMA_TCD[17].NBYTES)
  2202. #define DMA_TCD17_NBYTES_MLNO (IMXRT_DMA_TCD[17].NBYTES_MLNO)
  2203. #define DMA_TCD17_NBYTES_MLOFFNO (IMXRT_DMA_TCD[17].NBYTES_MLOFFNO)
  2204. #define DMA_TCD17_NBYTES_MLOFFYES (IMXRT_DMA_TCD[17].NBYTES_MLOFFYES)
  2205. #define DMA_TCD17_SLAST (IMXRT_DMA_TCD[17].SLAST)
  2206. #define DMA_TCD17_DADDR (IMXRT_DMA_TCD[17].DADDR)
  2207. #define DMA_TCD17_DOFF (IMXRT_DMA_TCD[17].DOFF)
  2208. #define DMA_TCD17_CITER (IMXRT_DMA_TCD[17].CITER)
  2209. #define DMA_TCD17_CITER_ELINKYES (IMXRT_DMA_TCD[17].CITER_ELINKYES)
  2210. #define DMA_TCD17_CITER_ELINKNO (IMXRT_DMA_TCD[17].CITER_ELINKNO)
  2211. #define DMA_TCD17_DLASTSGA (IMXRT_DMA_TCD[17].DLASTSGA)
  2212. #define DMA_TCD17_CSR (IMXRT_DMA_TCD[17].CSR)
  2213. #define DMA_TCD17_BITER (IMXRT_DMA_TCD[17].BITER)
  2214. #define DMA_TCD17_BITER_ELINKYES (IMXRT_DMA_TCD[17].BITER_ELINKYES)
  2215. #define DMA_TCD17_BITER_ELINKNO (IMXRT_DMA_TCD[17].BITER_ELINKNO)
  2216. #define DMA_TCD18_SADDR (IMXRT_DMA_TCD[18].SADDR)
  2217. #define DMA_TCD18_SOFF (IMXRT_DMA_TCD[18].SOFF)
  2218. #define DMA_TCD18_ATTR (IMXRT_DMA_TCD[18].ATTR)
  2219. #define DMA_TCD18_NBYTES (IMXRT_DMA_TCD[18].NBYTES)
  2220. #define DMA_TCD18_NBYTES_MLNO (IMXRT_DMA_TCD[18].NBYTES_MLNO)
  2221. #define DMA_TCD18_NBYTES_MLOFFNO (IMXRT_DMA_TCD[18].NBYTES_MLOFFNO)
  2222. #define DMA_TCD18_NBYTES_MLOFFYES (IMXRT_DMA_TCD[18].NBYTES_MLOFFYES)
  2223. #define DMA_TCD18_SLAST (IMXRT_DMA_TCD[18].SLAST)
  2224. #define DMA_TCD18_DADDR (IMXRT_DMA_TCD[18].DADDR)
  2225. #define DMA_TCD18_DOFF (IMXRT_DMA_TCD[18].DOFF)
  2226. #define DMA_TCD18_CITER (IMXRT_DMA_TCD[18].CITER)
  2227. #define DMA_TCD18_CITER_ELINKYES (IMXRT_DMA_TCD[18].CITER_ELINKYES)
  2228. #define DMA_TCD18_CITER_ELINKNO (IMXRT_DMA_TCD[18].CITER_ELINKNO)
  2229. #define DMA_TCD18_DLASTSGA (IMXRT_DMA_TCD[18].DLASTSGA)
  2230. #define DMA_TCD18_CSR (IMXRT_DMA_TCD[18].CSR)
  2231. #define DMA_TCD18_BITER (IMXRT_DMA_TCD[18].BITER)
  2232. #define DMA_TCD18_BITER_ELINKYES (IMXRT_DMA_TCD[18].BITER_ELINKYES)
  2233. #define DMA_TCD18_BITER_ELINKNO (IMXRT_DMA_TCD[18].BITER_ELINKNO)
  2234. #define DMA_TCD19_SADDR (IMXRT_DMA_TCD[19].SADDR)
  2235. #define DMA_TCD19_SOFF (IMXRT_DMA_TCD[19].SOFF)
  2236. #define DMA_TCD19_ATTR (IMXRT_DMA_TCD[19].ATTR)
  2237. #define DMA_TCD19_NBYTES (IMXRT_DMA_TCD[19].NBYTES)
  2238. #define DMA_TCD19_NBYTES_MLNO (IMXRT_DMA_TCD[19].NBYTES_MLNO)
  2239. #define DMA_TCD19_NBYTES_MLOFFNO (IMXRT_DMA_TCD[19].NBYTES_MLOFFNO)
  2240. #define DMA_TCD19_NBYTES_MLOFFYES (IMXRT_DMA_TCD[19].NBYTES_MLOFFYES)
  2241. #define DMA_TCD19_SLAST (IMXRT_DMA_TCD[19].SLAST)
  2242. #define DMA_TCD19_DADDR (IMXRT_DMA_TCD[19].DADDR)
  2243. #define DMA_TCD19_DOFF (IMXRT_DMA_TCD[19].DOFF)
  2244. #define DMA_TCD19_CITER (IMXRT_DMA_TCD[19].CITER)
  2245. #define DMA_TCD19_CITER_ELINKYES (IMXRT_DMA_TCD[19].CITER_ELINKYES)
  2246. #define DMA_TCD19_CITER_ELINKNO (IMXRT_DMA_TCD[19].CITER_ELINKNO)
  2247. #define DMA_TCD19_DLASTSGA (IMXRT_DMA_TCD[19].DLASTSGA)
  2248. #define DMA_TCD19_CSR (IMXRT_DMA_TCD[19].CSR)
  2249. #define DMA_TCD19_BITER (IMXRT_DMA_TCD[19].BITER)
  2250. #define DMA_TCD19_BITER_ELINKYES (IMXRT_DMA_TCD[19].BITER_ELINKYES)
  2251. #define DMA_TCD19_BITER_ELINKNO (IMXRT_DMA_TCD[19].BITER_ELINKNO)
  2252. #define DMA_TCD20_SADDR (IMXRT_DMA_TCD[20].SADDR)
  2253. #define DMA_TCD20_SOFF (IMXRT_DMA_TCD[20].SOFF)
  2254. #define DMA_TCD20_ATTR (IMXRT_DMA_TCD[20].ATTR)
  2255. #define DMA_TCD20_NBYTES (IMXRT_DMA_TCD[20].NBYTES)
  2256. #define DMA_TCD20_NBYTES_MLNO (IMXRT_DMA_TCD[20].NBYTES_MLNO)
  2257. #define DMA_TCD20_NBYTES_MLOFFNO (IMXRT_DMA_TCD[20].NBYTES_MLOFFNO)
  2258. #define DMA_TCD20_NBYTES_MLOFFYES (IMXRT_DMA_TCD[20].NBYTES_MLOFFYES)
  2259. #define DMA_TCD20_SLAST (IMXRT_DMA_TCD[20].SLAST)
  2260. #define DMA_TCD20_DADDR (IMXRT_DMA_TCD[20].DADDR)
  2261. #define DMA_TCD20_DOFF (IMXRT_DMA_TCD[20].DOFF)
  2262. #define DMA_TCD20_CITER (IMXRT_DMA_TCD[20].CITER)
  2263. #define DMA_TCD20_CITER_ELINKYES (IMXRT_DMA_TCD[20].CITER_ELINKYES)
  2264. #define DMA_TCD20_CITER_ELINKNO (IMXRT_DMA_TCD[20].CITER_ELINKNO)
  2265. #define DMA_TCD20_DLASTSGA (IMXRT_DMA_TCD[20].DLASTSGA)
  2266. #define DMA_TCD20_CSR (IMXRT_DMA_TCD[20].CSR)
  2267. #define DMA_TCD20_BITER (IMXRT_DMA_TCD[20].BITER)
  2268. #define DMA_TCD20_BITER_ELINKYES (IMXRT_DMA_TCD[20].BITER_ELINKYES)
  2269. #define DMA_TCD20_BITER_ELINKNO (IMXRT_DMA_TCD[20].BITER_ELINKNO)
  2270. #define DMA_TCD21_SADDR (IMXRT_DMA_TCD[21].SADDR)
  2271. #define DMA_TCD21_SOFF (IMXRT_DMA_TCD[21].SOFF)
  2272. #define DMA_TCD21_ATTR (IMXRT_DMA_TCD[21].ATTR)
  2273. #define DMA_TCD21_NBYTES (IMXRT_DMA_TCD[21].NBYTES)
  2274. #define DMA_TCD21_NBYTES_MLNO (IMXRT_DMA_TCD[21].NBYTES_MLNO)
  2275. #define DMA_TCD21_NBYTES_MLOFFNO (IMXRT_DMA_TCD[21].NBYTES_MLOFFNO)
  2276. #define DMA_TCD21_NBYTES_MLOFFYES (IMXRT_DMA_TCD[21].NBYTES_MLOFFYES)
  2277. #define DMA_TCD21_SLAST (IMXRT_DMA_TCD[21].SLAST)
  2278. #define DMA_TCD21_DADDR (IMXRT_DMA_TCD[21].DADDR)
  2279. #define DMA_TCD21_DOFF (IMXRT_DMA_TCD[21].DOFF)
  2280. #define DMA_TCD21_CITER (IMXRT_DMA_TCD[21].CITER)
  2281. #define DMA_TCD21_CITER_ELINKYES (IMXRT_DMA_TCD[21].CITER_ELINKYES)
  2282. #define DMA_TCD21_CITER_ELINKNO (IMXRT_DMA_TCD[21].CITER_ELINKNO)
  2283. #define DMA_TCD21_DLASTSGA (IMXRT_DMA_TCD[21].DLASTSGA)
  2284. #define DMA_TCD21_CSR (IMXRT_DMA_TCD[21].CSR)
  2285. #define DMA_TCD21_BITER (IMXRT_DMA_TCD[21].BITER)
  2286. #define DMA_TCD21_BITER_ELINKYES (IMXRT_DMA_TCD[21].BITER_ELINKYES)
  2287. #define DMA_TCD21_BITER_ELINKNO (IMXRT_DMA_TCD[21].BITER_ELINKNO)
  2288. #define DMA_TCD22_SADDR (IMXRT_DMA_TCD[22].SADDR)
  2289. #define DMA_TCD22_SOFF (IMXRT_DMA_TCD[22].SOFF)
  2290. #define DMA_TCD22_ATTR (IMXRT_DMA_TCD[22].ATTR)
  2291. #define DMA_TCD22_NBYTES (IMXRT_DMA_TCD[22].NBYTES)
  2292. #define DMA_TCD22_NBYTES_MLNO (IMXRT_DMA_TCD[22].NBYTES_MLNO)
  2293. #define DMA_TCD22_NBYTES_MLOFFNO (IMXRT_DMA_TCD[22].NBYTES_MLOFFNO)
  2294. #define DMA_TCD22_NBYTES_MLOFFYES (IMXRT_DMA_TCD[22].NBYTES_MLOFFYES)
  2295. #define DMA_TCD22_SLAST (IMXRT_DMA_TCD[22].SLAST)
  2296. #define DMA_TCD22_DADDR (IMXRT_DMA_TCD[22].DADDR)
  2297. #define DMA_TCD22_DOFF (IMXRT_DMA_TCD[22].DOFF)
  2298. #define DMA_TCD22_CITER (IMXRT_DMA_TCD[22].CITER)
  2299. #define DMA_TCD22_CITER_ELINKYES (IMXRT_DMA_TCD[22].CITER_ELINKYES)
  2300. #define DMA_TCD22_CITER_ELINKNO (IMXRT_DMA_TCD[22].CITER_ELINKNO)
  2301. #define DMA_TCD22_DLASTSGA (IMXRT_DMA_TCD[22].DLASTSGA)
  2302. #define DMA_TCD22_CSR (IMXRT_DMA_TCD[22].CSR)
  2303. #define DMA_TCD22_BITER (IMXRT_DMA_TCD[22].BITER)
  2304. #define DMA_TCD22_BITER_ELINKYES (IMXRT_DMA_TCD[22].BITER_ELINKYES)
  2305. #define DMA_TCD22_BITER_ELINKNO (IMXRT_DMA_TCD[22].BITER_ELINKNO)
  2306. #define DMA_TCD23_SADDR (IMXRT_DMA_TCD[23].SADDR)
  2307. #define DMA_TCD23_SOFF (IMXRT_DMA_TCD[23].SOFF)
  2308. #define DMA_TCD23_ATTR (IMXRT_DMA_TCD[23].ATTR)
  2309. #define DMA_TCD23_NBYTES (IMXRT_DMA_TCD[23].NBYTES)
  2310. #define DMA_TCD23_NBYTES_MLNO (IMXRT_DMA_TCD[23].NBYTES_MLNO)
  2311. #define DMA_TCD23_NBYTES_MLOFFNO (IMXRT_DMA_TCD[23].NBYTES_MLOFFNO)
  2312. #define DMA_TCD23_NBYTES_MLOFFYES (IMXRT_DMA_TCD[23].NBYTES_MLOFFYES)
  2313. #define DMA_TCD23_SLAST (IMXRT_DMA_TCD[23].SLAST)
  2314. #define DMA_TCD23_DADDR (IMXRT_DMA_TCD[23].DADDR)
  2315. #define DMA_TCD23_DOFF (IMXRT_DMA_TCD[23].DOFF)
  2316. #define DMA_TCD23_CITER (IMXRT_DMA_TCD[23].CITER)
  2317. #define DMA_TCD23_CITER_ELINKYES (IMXRT_DMA_TCD[23].CITER_ELINKYES)
  2318. #define DMA_TCD23_CITER_ELINKNO (IMXRT_DMA_TCD[23].CITER_ELINKNO)
  2319. #define DMA_TCD23_DLASTSGA (IMXRT_DMA_TCD[23].DLASTSGA)
  2320. #define DMA_TCD23_CSR (IMXRT_DMA_TCD[23].CSR)
  2321. #define DMA_TCD23_BITER (IMXRT_DMA_TCD[23].BITER)
  2322. #define DMA_TCD23_BITER_ELINKYES (IMXRT_DMA_TCD[23].BITER_ELINKYES)
  2323. #define DMA_TCD23_BITER_ELINKNO (IMXRT_DMA_TCD[23].BITER_ELINKNO)
  2324. #define DMA_TCD24_SADDR (IMXRT_DMA_TCD[24].SADDR)
  2325. #define DMA_TCD24_SOFF (IMXRT_DMA_TCD[24].SOFF)
  2326. #define DMA_TCD24_ATTR (IMXRT_DMA_TCD[24].ATTR)
  2327. #define DMA_TCD24_NBYTES (IMXRT_DMA_TCD[24].NBYTES)
  2328. #define DMA_TCD24_NBYTES_MLNO (IMXRT_DMA_TCD[24].NBYTES_MLNO)
  2329. #define DMA_TCD24_NBYTES_MLOFFNO (IMXRT_DMA_TCD[24].NBYTES_MLOFFNO)
  2330. #define DMA_TCD24_NBYTES_MLOFFYES (IMXRT_DMA_TCD[24].NBYTES_MLOFFYES)
  2331. #define DMA_TCD24_SLAST (IMXRT_DMA_TCD[24].SLAST)
  2332. #define DMA_TCD24_DADDR (IMXRT_DMA_TCD[24].DADDR)
  2333. #define DMA_TCD24_DOFF (IMXRT_DMA_TCD[24].DOFF)
  2334. #define DMA_TCD24_CITER (IMXRT_DMA_TCD[24].CITER)
  2335. #define DMA_TCD24_CITER_ELINKYES (IMXRT_DMA_TCD[24].CITER_ELINKYES)
  2336. #define DMA_TCD24_CITER_ELINKNO (IMXRT_DMA_TCD[24].CITER_ELINKNO)
  2337. #define DMA_TCD24_DLASTSGA (IMXRT_DMA_TCD[24].DLASTSGA)
  2338. #define DMA_TCD24_CSR (IMXRT_DMA_TCD[24].CSR)
  2339. #define DMA_TCD24_BITER (IMXRT_DMA_TCD[24].BITER)
  2340. #define DMA_TCD24_BITER_ELINKYES (IMXRT_DMA_TCD[24].BITER_ELINKYES)
  2341. #define DMA_TCD24_BITER_ELINKNO (IMXRT_DMA_TCD[24].BITER_ELINKNO)
  2342. #define DMA_TCD25_SADDR (IMXRT_DMA_TCD[25].SADDR)
  2343. #define DMA_TCD25_SOFF (IMXRT_DMA_TCD[25].SOFF)
  2344. #define DMA_TCD25_ATTR (IMXRT_DMA_TCD[25].ATTR)
  2345. #define DMA_TCD25_NBYTES (IMXRT_DMA_TCD[25].NBYTES)
  2346. #define DMA_TCD25_NBYTES_MLNO (IMXRT_DMA_TCD[25].NBYTES_MLNO)
  2347. #define DMA_TCD25_NBYTES_MLOFFNO (IMXRT_DMA_TCD[25].NBYTES_MLOFFNO)
  2348. #define DMA_TCD25_NBYTES_MLOFFYES (IMXRT_DMA_TCD[25].NBYTES_MLOFFYES)
  2349. #define DMA_TCD25_SLAST (IMXRT_DMA_TCD[25].SLAST)
  2350. #define DMA_TCD25_DADDR (IMXRT_DMA_TCD[25].DADDR)
  2351. #define DMA_TCD25_DOFF (IMXRT_DMA_TCD[25].DOFF)
  2352. #define DMA_TCD25_CITER (IMXRT_DMA_TCD[25].CITER)
  2353. #define DMA_TCD25_CITER_ELINKYES (IMXRT_DMA_TCD[25].CITER_ELINKYES)
  2354. #define DMA_TCD25_CITER_ELINKNO (IMXRT_DMA_TCD[25].CITER_ELINKNO)
  2355. #define DMA_TCD25_DLASTSGA (IMXRT_DMA_TCD[25].DLASTSGA)
  2356. #define DMA_TCD25_CSR (IMXRT_DMA_TCD[25].CSR)
  2357. #define DMA_TCD25_BITER (IMXRT_DMA_TCD[25].BITER)
  2358. #define DMA_TCD25_BITER_ELINKYES (IMXRT_DMA_TCD[25].BITER_ELINKYES)
  2359. #define DMA_TCD25_BITER_ELINKNO (IMXRT_DMA_TCD[25].BITER_ELINKNO)
  2360. #define DMA_TCD26_SADDR (IMXRT_DMA_TCD[26].SADDR)
  2361. #define DMA_TCD26_SOFF (IMXRT_DMA_TCD[26].SOFF)
  2362. #define DMA_TCD26_ATTR (IMXRT_DMA_TCD[26].ATTR)
  2363. #define DMA_TCD26_NBYTES (IMXRT_DMA_TCD[26].NBYTES)
  2364. #define DMA_TCD26_NBYTES_MLNO (IMXRT_DMA_TCD[26].NBYTES_MLNO)
  2365. #define DMA_TCD26_NBYTES_MLOFFNO (IMXRT_DMA_TCD[26].NBYTES_MLOFFNO)
  2366. #define DMA_TCD26_NBYTES_MLOFFYES (IMXRT_DMA_TCD[26].NBYTES_MLOFFYES)
  2367. #define DMA_TCD26_SLAST (IMXRT_DMA_TCD[26].SLAST)
  2368. #define DMA_TCD26_DADDR (IMXRT_DMA_TCD[26].DADDR)
  2369. #define DMA_TCD26_DOFF (IMXRT_DMA_TCD[26].DOFF)
  2370. #define DMA_TCD26_CITER (IMXRT_DMA_TCD[26].CITER)
  2371. #define DMA_TCD26_CITER_ELINKYES (IMXRT_DMA_TCD[26].CITER_ELINKYES)
  2372. #define DMA_TCD26_CITER_ELINKNO (IMXRT_DMA_TCD[26].CITER_ELINKNO)
  2373. #define DMA_TCD26_DLASTSGA (IMXRT_DMA_TCD[26].DLASTSGA)
  2374. #define DMA_TCD26_CSR (IMXRT_DMA_TCD[26].CSR)
  2375. #define DMA_TCD26_BITER (IMXRT_DMA_TCD[26].BITER)
  2376. #define DMA_TCD26_BITER_ELINKYES (IMXRT_DMA_TCD[26].BITER_ELINKYES)
  2377. #define DMA_TCD26_BITER_ELINKNO (IMXRT_DMA_TCD[26].BITER_ELINKNO)
  2378. #define DMA_TCD27_SADDR (IMXRT_DMA_TCD[27].SADDR)
  2379. #define DMA_TCD27_SOFF (IMXRT_DMA_TCD[27].SOFF)
  2380. #define DMA_TCD27_ATTR (IMXRT_DMA_TCD[27].ATTR)
  2381. #define DMA_TCD27_NBYTES (IMXRT_DMA_TCD[27].NBYTES)
  2382. #define DMA_TCD27_NBYTES_MLNO (IMXRT_DMA_TCD[27].NBYTES_MLNO)
  2383. #define DMA_TCD27_NBYTES_MLOFFNO (IMXRT_DMA_TCD[27].NBYTES_MLOFFNO)
  2384. #define DMA_TCD27_NBYTES_MLOFFYES (IMXRT_DMA_TCD[27].NBYTES_MLOFFYES)
  2385. #define DMA_TCD27_SLAST (IMXRT_DMA_TCD[27].SLAST)
  2386. #define DMA_TCD27_DADDR (IMXRT_DMA_TCD[27].DADDR)
  2387. #define DMA_TCD27_DOFF (IMXRT_DMA_TCD[27].DOFF)
  2388. #define DMA_TCD27_CITER (IMXRT_DMA_TCD[27].CITER)
  2389. #define DMA_TCD27_CITER_ELINKYES (IMXRT_DMA_TCD[27].CITER_ELINKYES)
  2390. #define DMA_TCD27_CITER_ELINKNO (IMXRT_DMA_TCD[27].CITER_ELINKNO)
  2391. #define DMA_TCD27_DLASTSGA (IMXRT_DMA_TCD[27].DLASTSGA)
  2392. #define DMA_TCD27_CSR (IMXRT_DMA_TCD[27].CSR)
  2393. #define DMA_TCD27_BITER (IMXRT_DMA_TCD[27].BITER)
  2394. #define DMA_TCD27_BITER_ELINKYES (IMXRT_DMA_TCD[27].BITER_ELINKYES)
  2395. #define DMA_TCD27_BITER_ELINKNO (IMXRT_DMA_TCD[27].BITER_ELINKNO)
  2396. #define DMA_TCD28_SADDR (IMXRT_DMA_TCD[28].SADDR)
  2397. #define DMA_TCD28_SOFF (IMXRT_DMA_TCD[28].SOFF)
  2398. #define DMA_TCD28_ATTR (IMXRT_DMA_TCD[28].ATTR)
  2399. #define DMA_TCD28_NBYTES (IMXRT_DMA_TCD[28].NBYTES)
  2400. #define DMA_TCD28_NBYTES_MLNO (IMXRT_DMA_TCD[28].NBYTES_MLNO)
  2401. #define DMA_TCD28_NBYTES_MLOFFNO (IMXRT_DMA_TCD[28].NBYTES_MLOFFNO)
  2402. #define DMA_TCD28_NBYTES_MLOFFYES (IMXRT_DMA_TCD[28].NBYTES_MLOFFYES)
  2403. #define DMA_TCD28_SLAST (IMXRT_DMA_TCD[28].SLAST)
  2404. #define DMA_TCD28_DADDR (IMXRT_DMA_TCD[28].DADDR)
  2405. #define DMA_TCD28_DOFF (IMXRT_DMA_TCD[28].DOFF)
  2406. #define DMA_TCD28_CITER (IMXRT_DMA_TCD[28].CITER)
  2407. #define DMA_TCD28_CITER_ELINKYES (IMXRT_DMA_TCD[28].CITER_ELINKYES)
  2408. #define DMA_TCD28_CITER_ELINKNO (IMXRT_DMA_TCD[28].CITER_ELINKNO)
  2409. #define DMA_TCD28_DLASTSGA (IMXRT_DMA_TCD[28].DLASTSGA)
  2410. #define DMA_TCD28_CSR (IMXRT_DMA_TCD[28].CSR)
  2411. #define DMA_TCD28_BITER (IMXRT_DMA_TCD[28].BITER)
  2412. #define DMA_TCD28_BITER_ELINKYES (IMXRT_DMA_TCD[28].BITER_ELINKYES)
  2413. #define DMA_TCD28_BITER_ELINKNO (IMXRT_DMA_TCD[28].BITER_ELINKNO)
  2414. #define DMA_TCD29_SADDR (IMXRT_DMA_TCD[29].SADDR)
  2415. #define DMA_TCD29_SOFF (IMXRT_DMA_TCD[29].SOFF)
  2416. #define DMA_TCD29_ATTR (IMXRT_DMA_TCD[29].ATTR)
  2417. #define DMA_TCD29_NBYTES (IMXRT_DMA_TCD[29].NBYTES)
  2418. #define DMA_TCD29_NBYTES_MLNO (IMXRT_DMA_TCD[29].NBYTES_MLNO)
  2419. #define DMA_TCD29_NBYTES_MLOFFNO (IMXRT_DMA_TCD[29].NBYTES_MLOFFNO)
  2420. #define DMA_TCD29_NBYTES_MLOFFYES (IMXRT_DMA_TCD[29].NBYTES_MLOFFYES)
  2421. #define DMA_TCD29_SLAST (IMXRT_DMA_TCD[29].SLAST)
  2422. #define DMA_TCD29_DADDR (IMXRT_DMA_TCD[29].DADDR)
  2423. #define DMA_TCD29_DOFF (IMXRT_DMA_TCD[29].DOFF)
  2424. #define DMA_TCD29_CITER (IMXRT_DMA_TCD[29].CITER)
  2425. #define DMA_TCD29_CITER_ELINKYES (IMXRT_DMA_TCD[29].CITER_ELINKYES)
  2426. #define DMA_TCD29_CITER_ELINKNO (IMXRT_DMA_TCD[29].CITER_ELINKNO)
  2427. #define DMA_TCD29_DLASTSGA (IMXRT_DMA_TCD[29].DLASTSGA)
  2428. #define DMA_TCD29_CSR (IMXRT_DMA_TCD[29].CSR)
  2429. #define DMA_TCD29_BITER (IMXRT_DMA_TCD[29].BITER)
  2430. #define DMA_TCD29_BITER_ELINKYES (IMXRT_DMA_TCD[29].BITER_ELINKYES)
  2431. #define DMA_TCD29_BITER_ELINKNO (IMXRT_DMA_TCD[29].BITER_ELINKNO)
  2432. #define DMA_TCD30_SADDR (IMXRT_DMA_TCD[30].SADDR)
  2433. #define DMA_TCD30_SOFF (IMXRT_DMA_TCD[30].SOFF)
  2434. #define DMA_TCD30_ATTR (IMXRT_DMA_TCD[30].ATTR)
  2435. #define DMA_TCD30_NBYTES (IMXRT_DMA_TCD[30].NBYTES)
  2436. #define DMA_TCD30_NBYTES_MLNO (IMXRT_DMA_TCD[30].NBYTES_MLNO)
  2437. #define DMA_TCD30_NBYTES_MLOFFNO (IMXRT_DMA_TCD[30].NBYTES_MLOFFNO)
  2438. #define DMA_TCD30_NBYTES_MLOFFYES (IMXRT_DMA_TCD[30].NBYTES_MLOFFYES)
  2439. #define DMA_TCD30_SLAST (IMXRT_DMA_TCD[30].SLAST)
  2440. #define DMA_TCD30_DADDR (IMXRT_DMA_TCD[30].DADDR)
  2441. #define DMA_TCD30_DOFF (IMXRT_DMA_TCD[30].DOFF)
  2442. #define DMA_TCD30_CITER (IMXRT_DMA_TCD[30].CITER)
  2443. #define DMA_TCD30_CITER_ELINKYES (IMXRT_DMA_TCD[30].CITER_ELINKYES)
  2444. #define DMA_TCD30_CITER_ELINKNO (IMXRT_DMA_TCD[30].CITER_ELINKNO)
  2445. #define DMA_TCD30_DLASTSGA (IMXRT_DMA_TCD[30].DLASTSGA)
  2446. #define DMA_TCD30_CSR (IMXRT_DMA_TCD[30].CSR)
  2447. #define DMA_TCD30_BITER (IMXRT_DMA_TCD[30].BITER)
  2448. #define DMA_TCD30_BITER_ELINKYES (IMXRT_DMA_TCD[30].BITER_ELINKYES)
  2449. #define DMA_TCD30_BITER_ELINKNO (IMXRT_DMA_TCD[30].BITER_ELINKNO)
  2450. #define DMA_TCD31_SADDR (IMXRT_DMA_TCD[31].SADDR)
  2451. #define DMA_TCD31_SOFF (IMXRT_DMA_TCD[31].SOFF)
  2452. #define DMA_TCD31_ATTR (IMXRT_DMA_TCD[31].ATTR)
  2453. #define DMA_TCD31_NBYTES (IMXRT_DMA_TCD[31].NBYTES)
  2454. #define DMA_TCD31_NBYTES_MLNO (IMXRT_DMA_TCD[31].NBYTES_MLNO)
  2455. #define DMA_TCD31_NBYTES_MLOFFNO (IMXRT_DMA_TCD[31].NBYTES_MLOFFNO)
  2456. #define DMA_TCD31_NBYTES_MLOFFYES (IMXRT_DMA_TCD[31].NBYTES_MLOFFYES)
  2457. #define DMA_TCD31_SLAST (IMXRT_DMA_TCD[31].SLAST)
  2458. #define DMA_TCD31_DADDR (IMXRT_DMA_TCD[31].DADDR)
  2459. #define DMA_TCD31_DOFF (IMXRT_DMA_TCD[31].DOFF)
  2460. #define DMA_TCD31_CITER (IMXRT_DMA_TCD[31].CITER)
  2461. #define DMA_TCD31_CITER_ELINKYES (IMXRT_DMA_TCD[31].CITER_ELINKYES)
  2462. #define DMA_TCD31_CITER_ELINKNO (IMXRT_DMA_TCD[31].CITER_ELINKNO)
  2463. #define DMA_TCD31_DLASTSGA (IMXRT_DMA_TCD[31].DLASTSGA)
  2464. #define DMA_TCD31_CSR (IMXRT_DMA_TCD[31].CSR)
  2465. #define DMA_TCD31_BITER (IMXRT_DMA_TCD[31].BITER)
  2466. #define DMA_TCD31_BITER_ELINKYES (IMXRT_DMA_TCD[31].BITER_ELINKYES)
  2467. #define DMA_TCD31_BITER_ELINKNO (IMXRT_DMA_TCD[31].BITER_ELINKNO)
  2468. // TODO: double check these defines from Teensy 3.x are still correct for IMXRT
  2469. #define DMA_TCD_ATTR_SMOD(n) (((n) & 0x1F) << 11)
  2470. #define DMA_TCD_ATTR_SSIZE(n) (((n) & 0x7) << 8)
  2471. #define DMA_TCD_ATTR_DMOD(n) (((n) & 0x1F) << 3)
  2472. #define DMA_TCD_ATTR_DSIZE(n) (((n) & 0x7) << 0)
  2473. #define DMA_TCD_ATTR_SIZE_8BIT 0
  2474. #define DMA_TCD_ATTR_SIZE_16BIT 1
  2475. #define DMA_TCD_ATTR_SIZE_32BIT 2
  2476. #define DMA_TCD_ATTR_SIZE_16BYTE 4
  2477. #define DMA_TCD_ATTR_SIZE_32BYTE 5 // caution: this might not be supported in newer chips?
  2478. #define DMA_TCD_CSR_BWC(n) (((n) & 0x3) << 14)
  2479. #define DMA_TCD_CSR_BWC_MASK 0xC000
  2480. #define DMA_TCD_CSR_MAJORLINKCH(n) (((n) & 0xF) << 8)
  2481. #define DMA_TCD_CSR_MAJORLINKCH_MASK 0x0F00
  2482. #define DMA_TCD_CSR_DONE 0x0080
  2483. #define DMA_TCD_CSR_ACTIVE 0x0040
  2484. #define DMA_TCD_CSR_MAJORELINK 0x0020
  2485. #define DMA_TCD_CSR_ESG 0x0010
  2486. #define DMA_TCD_CSR_DREQ 0x0008
  2487. #define DMA_TCD_CSR_INTHALF 0x0004
  2488. #define DMA_TCD_CSR_INTMAJOR 0x0002
  2489. #define DMA_TCD_CSR_START 0x0001
  2490. #define DMA_TCD_CITER_MASK ((uint16_t)0x7FFF) // Loop count mask
  2491. #define DMA_TCD_CITER_ELINK ((uint16_t)1<<15) // Enable channel linking on minor-loop complete
  2492. #define DMA_TCD_BITER_MASK ((uint16_t)0x7FFF) // Loop count mask
  2493. #define DMA_TCD_BITER_ELINK ((uint16_t)1<<15) // Enable channel linking on minor-loop complete
  2494. #define DMA_TCD_BITER_ELINKYES_ELINK 0x8000
  2495. #define DMA_TCD_BITER_ELINKYES_LINKCH(n) (((n) & 0xF) << 9)
  2496. #define DMA_TCD_BITER_ELINKYES_LINKCH_MASK 0x1E00
  2497. #define DMA_TCD_BITER_ELINKYES_BITER(n) (((n) & 0x1FF) << 0)
  2498. #define DMA_TCD_BITER_ELINKYES_BITER_MASK 0x01FF
  2499. #define DMA_TCD_CITER_ELINKYES_ELINK 0x8000
  2500. #define DMA_TCD_CITER_ELINKYES_LINKCH(n) (((n) & 0xF) << 9)
  2501. #define DMA_TCD_CITER_ELINKYES_LINKCH_MASK 0x1E00
  2502. #define DMA_TCD_CITER_ELINKYES_CITER(n) (((n) & 0x1FF) << 0)
  2503. #define DMA_TCD_CITER_ELINKYES_CITER_MASK 0x01FF
  2504. #define DMA_TCD_NBYTES_SMLOE ((uint32_t)1<<31) // Source Minor Loop Offset Enable
  2505. #define DMA_TCD_NBYTES_DMLOE ((uint32_t)1<<30) // Destination Minor Loop Offset Enable
  2506. #define DMA_TCD_NBYTES_MLOFFNO_NBYTES(n) ((uint32_t)((n) & 0x3FFFFFFF)) // NBytes transfer count when minor loop disabled
  2507. #define DMA_TCD_NBYTES_MLOFFYES_NBYTES(n) ((uint32_t)((n) & 0x3FF)) // NBytes transfer count when minor loop enabled
  2508. #define DMA_TCD_NBYTES_MLOFFYES_MLOFF(n) ((uint32_t)((n) & 0xFFFFF)<<10) // Minor loop offset
  2509. // 23.7.1: page 1023
  2510. typedef struct {
  2511. volatile uint16_t CTRL; /**< Control Register, offset: 0x0 */
  2512. volatile uint16_t FILT; /**< Input Filter Register, offset: 0x2 */
  2513. volatile uint16_t WTR; /**< Watchdog Timeout Register, offset: 0x4 */
  2514. volatile uint16_t POSD; /**< Position Difference Counter Register, offset: 0x6 */
  2515. volatile uint16_t POSDH; /**< Position Difference Hold Register, offset: 0x8 */
  2516. volatile uint16_t REV; /**< Revolution Counter Register, offset: 0xA */
  2517. volatile uint16_t REVH; /**< Revolution Hold Register, offset: 0xC */
  2518. volatile uint16_t UPOS; /**< Upper Position Counter Register, offset: 0xE */
  2519. volatile uint16_t LPOS; /**< Lower Position Counter Register, offset: 0x10 */
  2520. volatile uint16_t UPOSH; /**< Upper Position Hold Register, offset: 0x12 */
  2521. volatile uint16_t LPOSH; /**< Lower Position Hold Register, offset: 0x14 */
  2522. volatile uint16_t UINIT; /**< Upper Initialization Register, offset: 0x16 */
  2523. volatile uint16_t LINIT; /**< Lower Initialization Register, offset: 0x18 */
  2524. volatile uint16_t IMR; /**< Input Monitor Register, offset: 0x1A */
  2525. volatile uint16_t TST; /**< Test Register, offset: 0x1C */
  2526. volatile uint16_t CTRL2; /**< Control 2 Register, offset: 0x1E */
  2527. volatile uint16_t UMOD; /**< Upper Modulus Register, offset: 0x20 */
  2528. volatile uint16_t LMOD; /**< Lower Modulus Register, offset: 0x22 */
  2529. volatile uint16_t UCOMP; /**< Upper Position Compare Register, offset: 0x24 */
  2530. volatile uint16_t LCOMP; /**< Lower Position Compare Register, offset: 0x26 */
  2531. } IMXRT_ENC_t;
  2532. #define IMXRT_ENC1 (*(IMXRT_ENC_t *)0x403C8000)
  2533. #define ENC1_CTRL (IMXRT_ENC1.CTRL)
  2534. #define ENC1_FILT (IMXRT_ENC1.FILT)
  2535. #define ENC1_WTR (IMXRT_ENC1.WTR)
  2536. #define ENC1_POSD (IMXRT_ENC1.POSD)
  2537. #define ENC1_POSDH (IMXRT_ENC1.POSDH)
  2538. #define ENC1_REV (IMXRT_ENC1.REV)
  2539. #define ENC1_REVH (IMXRT_ENC1.REVH)
  2540. #define ENC1_UPOS (IMXRT_ENC1.UPOS)
  2541. #define ENC1_LPOS (IMXRT_ENC1.LPOS)
  2542. #define ENC1_UPOSH (IMXRT_ENC1.UPOSH)
  2543. #define ENC1_LPOSH (IMXRT_ENC1.LPOSH)
  2544. #define ENC1_UINIT (IMXRT_ENC1.UINIT)
  2545. #define ENC1_LINIT (IMXRT_ENC1.LINIT)
  2546. #define ENC1_IMR (IMXRT_ENC1.IMR)
  2547. #define ENC1_TST (IMXRT_ENC1.TST)
  2548. #define ENC1_CTRL2 (IMXRT_ENC1.CTRL2)
  2549. #define ENC1_UMOD (IMXRT_ENC1.UMOD)
  2550. #define ENC1_LMOD (IMXRT_ENC1.LMOD)
  2551. #define ENC1_UCOMP (IMXRT_ENC1.UCOMP)
  2552. #define ENC1_LCOMP (IMXRT_ENC1.LCOMP)
  2553. #define IMXRT_ENC2 (*(IMXRT_ENC_t *)0x403CC000)
  2554. #define ENC2_CTRL (IMXRT_ENC2.CTRL)
  2555. #define ENC2_FILT (IMXRT_ENC2.FILT)
  2556. #define ENC2_WTR (IMXRT_ENC2.WTR)
  2557. #define ENC2_POSD (IMXRT_ENC2.POSD)
  2558. #define ENC2_POSDH (IMXRT_ENC2.POSDH)
  2559. #define ENC2_REV (IMXRT_ENC2.REV)
  2560. #define ENC2_REVH (IMXRT_ENC2.REVH)
  2561. #define ENC2_UPOS (IMXRT_ENC2.UPOS)
  2562. #define ENC2_LPOS (IMXRT_ENC2.LPOS)
  2563. #define ENC2_UPOSH (IMXRT_ENC2.UPOSH)
  2564. #define ENC2_LPOSH (IMXRT_ENC2.LPOSH)
  2565. #define ENC2_UINIT (IMXRT_ENC2.UINIT)
  2566. #define ENC2_LINIT (IMXRT_ENC2.LINIT)
  2567. #define ENC2_IMR (IMXRT_ENC2.IMR)
  2568. #define ENC2_TST (IMXRT_ENC2.TST)
  2569. #define ENC2_CTRL2 (IMXRT_ENC2.CTRL2)
  2570. #define ENC2_UMOD (IMXRT_ENC2.UMOD)
  2571. #define ENC2_LMOD (IMXRT_ENC2.LMOD)
  2572. #define ENC2_UCOMP (IMXRT_ENC2.UCOMP)
  2573. #define ENC2_LCOMP (IMXRT_ENC2.LCOMP)
  2574. #define IMXRT_ENC3 (*(IMXRT_ENC_t *)0x403D0000)
  2575. #define ENC3_CTRL (IMXRT_ENC3.CTRL)
  2576. #define ENC3_FILT (IMXRT_ENC3.FILT)
  2577. #define ENC3_WTR (IMXRT_ENC3.WTR)
  2578. #define ENC3_POSD (IMXRT_ENC3.POSD)
  2579. #define ENC3_POSDH (IMXRT_ENC3.POSDH)
  2580. #define ENC3_REV (IMXRT_ENC3.REV)
  2581. #define ENC3_REVH (IMXRT_ENC3.REVH)
  2582. #define ENC3_UPOS (IMXRT_ENC3.UPOS)
  2583. #define ENC3_LPOS (IMXRT_ENC3.LPOS)
  2584. #define ENC3_UPOSH (IMXRT_ENC3.UPOSH)
  2585. #define ENC3_LPOSH (IMXRT_ENC3.LPOSH)
  2586. #define ENC3_UINIT (IMXRT_ENC3.UINIT)
  2587. #define ENC3_LINIT (IMXRT_ENC3.LINIT)
  2588. #define ENC3_IMR (IMXRT_ENC3.IMR)
  2589. #define ENC3_TST (IMXRT_ENC3.TST)
  2590. #define ENC3_CTRL2 (IMXRT_ENC3.CTRL2)
  2591. #define ENC3_UMOD (IMXRT_ENC3.UMOD)
  2592. #define ENC3_LMOD (IMXRT_ENC3.LMOD)
  2593. #define ENC3_UCOMP (IMXRT_ENC3.UCOMP)
  2594. #define ENC3_LCOMP (IMXRT_ENC3.LCOMP)
  2595. #define IMXRT_ENC4 (*(IMXRT_ENC_t *)0x403D4000)
  2596. #define ENC4_CTRL (IMXRT_ENC4.CTRL)
  2597. #define ENC4_FILT (IMXRT_ENC4.FILT)
  2598. #define ENC4_WTR (IMXRT_ENC4.WTR)
  2599. #define ENC4_POSD (IMXRT_ENC4.POSD)
  2600. #define ENC4_POSDH (IMXRT_ENC4.POSDH)
  2601. #define ENC4_REV (IMXRT_ENC4.REV)
  2602. #define ENC4_REVH (IMXRT_ENC4.REVH)
  2603. #define ENC4_UPOS (IMXRT_ENC4.UPOS)
  2604. #define ENC4_LPOS (IMXRT_ENC4.LPOS)
  2605. #define ENC4_UPOSH (IMXRT_ENC4.UPOSH)
  2606. #define ENC4_LPOSH (IMXRT_ENC4.LPOSH)
  2607. #define ENC4_UINIT (IMXRT_ENC4.UINIT)
  2608. #define ENC4_LINIT (IMXRT_ENC4.LINIT)
  2609. #define ENC4_IMR (IMXRT_ENC4.IMR)
  2610. #define ENC4_TST (IMXRT_ENC4.TST)
  2611. #define ENC4_CTRL2 (IMXRT_ENC4.CTRL2)
  2612. #define ENC4_UMOD (IMXRT_ENC4.UMOD)
  2613. #define ENC4_LMOD (IMXRT_ENC4.LMOD)
  2614. #define ENC4_UCOMP (IMXRT_ENC4.UCOMP)
  2615. #define ENC4_LCOMP (IMXRT_ENC4.LCOMP)
  2616. // 24.5: page 1060
  2617. #define IMXRT_ENET (*(IMXRT_REGISTER32_t *)0x402D8000)
  2618. #define IMXRT_ENET_TIMER (*(IMXRT_REGISTER32_t *)0x402D8400)
  2619. #define ENET_EIR (IMXRT_ENET.offset004)
  2620. #define ENET_EIMR (IMXRT_ENET.offset008)
  2621. #define ENET_RDAR (IMXRT_ENET.offset010)
  2622. #define ENET_TDAR (IMXRT_ENET.offset014)
  2623. #define ENET_ECR (IMXRT_ENET.offset024)
  2624. #define ENET_MMFR (IMXRT_ENET.offset040)
  2625. #define ENET_MSCR (IMXRT_ENET.offset044)
  2626. #define ENET_MIBC (IMXRT_ENET.offset064)
  2627. #define ENET_RCR (IMXRT_ENET.offset084)
  2628. #define ENET_TCR (IMXRT_ENET.offset0C4)
  2629. #define ENET_PALR (IMXRT_ENET.offset0E4)
  2630. #define ENET_PAUR (IMXRT_ENET.offset0E8)
  2631. #define ENET_OPD (IMXRT_ENET.offset0EC)
  2632. #define ENET_TXIC (IMXRT_ENET.offset0F0)
  2633. #define ENET_RXIC (IMXRT_ENET.offset100)
  2634. #define ENET_IAUR (IMXRT_ENET.offset118)
  2635. #define ENET_IALR (IMXRT_ENET.offset11C)
  2636. #define ENET_GAUR (IMXRT_ENET.offset120)
  2637. #define ENET_GALR (IMXRT_ENET.offset124)
  2638. #define ENET_TFWR (IMXRT_ENET.offset144)
  2639. #define ENET_RDSR (IMXRT_ENET.offset180)
  2640. #define ENET_TDSR (IMXRT_ENET.offset184)
  2641. #define ENET_MRBR (IMXRT_ENET.offset188)
  2642. #define ENET_RSFL (IMXRT_ENET.offset190)
  2643. #define ENET_RSEM (IMXRT_ENET.offset194)
  2644. #define ENET_RAEM (IMXRT_ENET.offset198)
  2645. #define ENET_RAFL (IMXRT_ENET.offset19C)
  2646. #define ENET_TSEM (IMXRT_ENET.offset1A0)
  2647. #define ENET_TAEM (IMXRT_ENET.offset1A4)
  2648. #define ENET_TAFL (IMXRT_ENET.offset1A8)
  2649. #define ENET_TIPG (IMXRT_ENET.offset1AC)
  2650. #define ENET_FTRL (IMXRT_ENET.offset1B0)
  2651. #define ENET_TACC (IMXRT_ENET.offset1C0)
  2652. #define ENET_RACC (IMXRT_ENET.offset1C4)
  2653. #define ENET_RMON_T_DROP (IMXRT_ENET.offset200)
  2654. #define ENET_RMON_T_PACKETS (IMXRT_ENET.offset204)
  2655. #define ENET_RMON_T_BC_PKT (IMXRT_ENET.offset208)
  2656. #define ENET_RMON_T_MC_PKT (IMXRT_ENET.offset20C)
  2657. #define ENET_RMON_T_CRC_ALIGN (IMXRT_ENET.offset210)
  2658. #define ENET_RMON_T_UNDERSIZE (IMXRT_ENET.offset214)
  2659. #define ENET_RMON_T_OVERSIZE (IMXRT_ENET.offset218)
  2660. #define ENET_RMON_T_FRAG (IMXRT_ENET.offset21C)
  2661. #define ENET_RMON_T_JAB (IMXRT_ENET.offset220)
  2662. #define ENET_RMON_T_COL (IMXRT_ENET.offset224)
  2663. #define ENET_RMON_T_P64 (IMXRT_ENET.offset228)
  2664. #define ENET_RMON_T_P65TO127 (IMXRT_ENET.offset22C)
  2665. #define ENET_RMON_T_P128TO255 (IMXRT_ENET.offset230)
  2666. #define ENET_RMON_T_P256TO511 (IMXRT_ENET.offset234)
  2667. #define ENET_RMON_T_P512TO1023 (IMXRT_ENET.offset238)
  2668. #define ENET_RMON_T_P1024TO2047 (IMXRT_ENET.offset23C)
  2669. #define ENET_RMON_T_P_GTE2048 (IMXRT_ENET.offset240)
  2670. #define ENET_RMON_T_OCTETS (IMXRT_ENET.offset244)
  2671. #define ENET_IEEE_T_DROP (IMXRT_ENET.offset248)
  2672. #define ENET_IEEE_T_FRAME_OK (IMXRT_ENET.offset24C)
  2673. #define ENET_IEEE_T_1COL (IMXRT_ENET.offset250)
  2674. #define ENET_IEEE_T_MCOL (IMXRT_ENET.offset254)
  2675. #define ENET_IEEE_T_DEF (IMXRT_ENET.offset258)
  2676. #define ENET_IEEE_T_LCOL (IMXRT_ENET.offset25C)
  2677. #define ENET_IEEE_T_EXCOL (IMXRT_ENET.offset260)
  2678. #define ENET_IEEE_T_MACERR (IMXRT_ENET.offset264)
  2679. #define ENET_IEEE_T_CSERR (IMXRT_ENET.offset268)
  2680. #define ENET_IEEE_T_SQE (IMXRT_ENET.offset26C)
  2681. #define ENET_IEEE_T_FDXFC (IMXRT_ENET.offset270)
  2682. #define ENET_IEEE_T_OCTETS_OK (IMXRT_ENET.offset274)
  2683. #define ENET_RMON_R_PACKETS (IMXRT_ENET.offset284)
  2684. #define ENET_RMON_R_BC_PKT (IMXRT_ENET.offset288)
  2685. #define ENET_RMON_R_MC_PKT (IMXRT_ENET.offset28C)
  2686. #define ENET_RMON_R_CRC_ALIGN (IMXRT_ENET.offset290)
  2687. #define ENET_RMON_R_UNDERSIZE (IMXRT_ENET.offset294)
  2688. #define ENET_RMON_R_OVERSIZE (IMXRT_ENET.offset298)
  2689. #define ENET_RMON_R_FRAG (IMXRT_ENET.offset29C)
  2690. #define ENET_RMON_R_JAB (IMXRT_ENET.offset2A0)
  2691. #define ENET_RMON_R_RESVD_0 (IMXRT_ENET.offset2A4)
  2692. #define ENET_RMON_R_P64 (IMXRT_ENET.offset2A8)
  2693. #define ENET_RMON_R_P65TO127 (IMXRT_ENET.offset2AC)
  2694. #define ENET_RMON_R_P128TO255 (IMXRT_ENET.offset2B0)
  2695. #define ENET_RMON_R_P256TO511 (IMXRT_ENET.offset2B4)
  2696. #define ENET_RMON_R_P512TO1023 (IMXRT_ENET.offset2B8)
  2697. #define ENET_RMON_R_P1024TO2047 (IMXRT_ENET.offset2BC)
  2698. #define ENET_RMON_R_P_GTE2048 (IMXRT_ENET.offset2C0)
  2699. #define ENET_RMON_R_OCTETS (IMXRT_ENET.offset2C4)
  2700. #define ENET_IEEE_R_DROP (IMXRT_ENET.offset2C8)
  2701. #define ENET_IEEE_R_FRAME_OK (IMXRT_ENET.offset2CC)
  2702. #define ENET_IEEE_R_CRC (IMXRT_ENET.offset2D0)
  2703. #define ENET_IEEE_R_ALIGN (IMXRT_ENET.offset2D4)
  2704. #define ENET_IEEE_R_MACERR (IMXRT_ENET.offset2D8)
  2705. #define ENET_IEEE_R_FDXFC (IMXRT_ENET.offset2DC)
  2706. #define ENET_IEEE_R_OCTETS_OK (IMXRT_ENET.offset2E0)
  2707. #define ENET_ATCR (IMXRT_ENET_TIMER.offset000)
  2708. #define ENET_ATVR (IMXRT_ENET_TIMER.offset004)
  2709. #define ENET_ATOFF (IMXRT_ENET_TIMER.offset008)
  2710. #define ENET_ATPER (IMXRT_ENET_TIMER.offset00C)
  2711. #define ENET_ATCOR (IMXRT_ENET_TIMER.offset010)
  2712. #define ENET_ATINC (IMXRT_ENET_TIMER.offset014)
  2713. #define ENET_ATSTMP (IMXRT_ENET_TIMER.offset018)
  2714. #define ENET_TGSR (IMXRT_ENET_TIMER.offset204)
  2715. #define ENET_TCSR0 (IMXRT_ENET_TIMER.offset208)
  2716. #define ENET_TCCR0 (IMXRT_ENET_TIMER.offset20C)
  2717. #define ENET_TCSR1 (IMXRT_ENET_TIMER.offset210)
  2718. #define ENET_TCCR1 (IMXRT_ENET_TIMER.offset214)
  2719. #define ENET_TCSR2 (IMXRT_ENET_TIMER.offset218)
  2720. #define ENET_TCCR2 (IMXRT_ENET_TIMER.offset21C)
  2721. #define ENET_TCSR3 (IMXRT_ENET_TIMER.offset220)
  2722. #define ENET_TCCR3 (IMXRT_ENET_TIMER.offset224)
  2723. #define ENET_EIR_BABR ((uint32_t)(1<<30))
  2724. #define ENET_EIR_BABT ((uint32_t)(1<<29))
  2725. #define ENET_EIR_GRA ((uint32_t)(1<<28))
  2726. #define ENET_EIR_TXF ((uint32_t)(1<<27))
  2727. #define ENET_EIR_TXB ((uint32_t)(1<<26))
  2728. #define ENET_EIR_RXF ((uint32_t)(1<<25))
  2729. #define ENET_EIR_RXB ((uint32_t)(1<<24))
  2730. #define ENET_EIR_MII ((uint32_t)(1<<23))
  2731. #define ENET_EIR_EBERR ((uint32_t)(1<<22))
  2732. #define ENET_EIR_LC ((uint32_t)(1<<21))
  2733. #define ENET_EIR_RL ((uint32_t)(1<<20))
  2734. #define ENET_EIR_UN ((uint32_t)(1<<19))
  2735. #define ENET_EIR_PLR ((uint32_t)(1<<18))
  2736. #define ENET_EIR_WAKEUP ((uint32_t)(1<<17))
  2737. #define ENET_EIR_TS_AVAIL ((uint32_t)(1<<16))
  2738. #define ENET_EIR_TS_TIMER ((uint32_t)(1<<15))
  2739. #define ENET_EIMR_BABR ((uint32_t)(1<<30))
  2740. #define ENET_EIMR_BABT ((uint32_t)(1<<29))
  2741. #define ENET_EIMR_GRA ((uint32_t)(1<<28))
  2742. #define ENET_EIMR_TXF ((uint32_t)(1<<27))
  2743. #define ENET_EIMR_TXB ((uint32_t)(1<<26))
  2744. #define ENET_EIMR_RXF ((uint32_t)(1<<25))
  2745. #define ENET_EIMR_RXB ((uint32_t)(1<<24))
  2746. #define ENET_EIMR_MII ((uint32_t)(1<<23))
  2747. #define ENET_EIMR_EBERR ((uint32_t)(1<<22))
  2748. #define ENET_EIMR_LC ((uint32_t)(1<<21))
  2749. #define ENET_EIMR_RL ((uint32_t)(1<<20))
  2750. #define ENET_EIMR_UN ((uint32_t)(1<<19))
  2751. #define ENET_EIMR_PLR ((uint32_t)(1<<18))
  2752. #define ENET_EIMR_WAKEUP ((uint32_t)(1<<17))
  2753. #define ENET_EIMR_TS_AVAIL ((uint32_t)(1<<16))
  2754. #define ENET_EIMR_TS_TIMER ((uint32_t)(1<<15))
  2755. #define ENET_RDAR_RDAR ((uint32_t)(1<<24))
  2756. #define ENET_TDAR_TDAR ((uint32_t)(1<<24))
  2757. #define ENET_ECR_DBSWP ((uint32_t)(1<<8))
  2758. #define ENET_ECR_DBGEN ((uint32_t)(1<<6))
  2759. #define ENET_ECR_EN1588 ((uint32_t)(1<<4))
  2760. #define ENET_ECR_SLEEP ((uint32_t)(1<<3))
  2761. #define ENET_ECR_MAGICEN ((uint32_t)(1<<2))
  2762. #define ENET_ECR_ETHEREN ((uint32_t)(1<<1))
  2763. #define ENET_ECR_RESET ((uint32_t)(1<<0))
  2764. #define ENET_MMFR_ST(n) ((uint32_t)(((n) & 0x03) << 30))
  2765. #define ENET_MMFR_OP(n) ((uint32_t)(((n) & 0x03) << 28))
  2766. #define ENET_MMFR_PA(n) ((uint32_t)(((n) & 0x1F) << 23))
  2767. #define ENET_MMFR_RA(n) ((uint32_t)(((n) & 0x1F) << 18))
  2768. #define ENET_MMFR_TA(n) ((uint32_t)(((n) & 0x03) << 16))
  2769. #define ENET_MMFR_DATA(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  2770. #define ENET_MSCR_HOLDTIME(n) ((uint32_t)(((n) & 0x07) << 8))
  2771. #define ENET_MSCR_DIS_PRE ((uint32_t)(1<<7))
  2772. #define ENET_MSCR_MII_SPEED(n) ((uint32_t)(((n) & 0x3F) << 1))
  2773. #define ENET_MIBC_MIB_DIS ((uint32_t)(1<<31))
  2774. #define ENET_MIBC_MIB_IDLE ((uint32_t)(1<<30))
  2775. #define ENET_MIBC_MIB_CLEAR ((uint32_t)(1<<29))
  2776. #define ENET_RCR_GRS ((uint32_t)(1<<31))
  2777. #define ENET_RCR_NLC ((uint32_t)(1<<30))
  2778. #define ENET_RCR_MAX_FL(n) ((uint32_t)(((n) & 0x3FFF) << 16))
  2779. #define ENET_RCR_CFEN ((uint32_t)(1<<15))
  2780. #define ENET_RCR_CRCFWD ((uint32_t)(1<<14))
  2781. #define ENET_RCR_PAUFWD ((uint32_t)(1<<13))
  2782. #define ENET_RCR_PADEN ((uint32_t)(1<<12))
  2783. #define ENET_RCR_RMII_10T ((uint32_t)(1<<9))
  2784. #define ENET_RCR_RMII_MODE ((uint32_t)(1<<8))
  2785. #define ENET_RCR_FCE ((uint32_t)(1<<5))
  2786. #define ENET_RCR_BC_REJ ((uint32_t)(1<<4))
  2787. #define ENET_RCR_PROM ((uint32_t)(1<<3))
  2788. #define ENET_RCR_MII_MODE ((uint32_t)(1<<2))
  2789. #define ENET_RCR_DRT ((uint32_t)(1<<1))
  2790. #define ENET_RCR_LOOP ((uint32_t)(1<<0))
  2791. #define ENET_TCR_CRCFWD ((uint32_t)(1<<9))
  2792. #define ENET_TCR_ADDINS ((uint32_t)(1<<8))
  2793. #define ENET_TCR_ADDSEL(n) ((uint32_t)(((n) & 0x07) << 5))
  2794. #define ENET_TCR_RFC_PAUSE ((uint32_t)(1<<4))
  2795. #define ENET_TCR_TFC_PAUSE ((uint32_t)(1<<3))
  2796. #define ENET_TCR_FDEN ((uint32_t)(1<<2))
  2797. #define ENET_TCR_GTS ((uint32_t)(1<<0))
  2798. #define ENET_PAUR_PADDR2(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  2799. #define ENET_PAUR_TYPE(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  2800. #define ENET_OPD_OPCODE(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  2801. #define ENET_OPD_PAUSE_DUR(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  2802. #define ENET_TXIC_ICEN ((uint32_t)(1<<31))
  2803. #define ENET_TXIC_ICCS ((uint32_t)(1<<30))
  2804. #define ENET_TXIC_ICFT(n) ((uint32_t)(((n) & 0xFF) << 20))
  2805. #define ENET_TXIC_ICTT(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  2806. #define ENET_RXIC_ICEN ((uint32_t)(1<<31))
  2807. #define ENET_RXIC_ICCS ((uint32_t)(1<<30))
  2808. #define ENET_RXIC_ICFT(n) ((uint32_t)(((n) & 0xFF) << 20))
  2809. #define ENET_RXIC_ICTT(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  2810. #define ENET_TFWR_STRFWD ((uint32_t)(1<<8))
  2811. #define ENET_TFWR_TFWR(n) ((uint32_t)(((n) & 0x3F) << 0))
  2812. #define ENET_TACC_PROCHK ((uint32_t)(1<<4))
  2813. #define ENET_TACC_IPCHK ((uint32_t)(1<<3))
  2814. #define ENET_TACC_SHIFT16 ((uint32_t)(1<<0))
  2815. #define ENET_RACC_SHIFT16 ((uint32_t)(1<<7))
  2816. #define ENET_RACC_LINEDIS ((uint32_t)(1<<6))
  2817. #define ENET_RACC_PRODIS ((uint32_t)(1<<2))
  2818. #define ENET_RACC_IPDIS ((uint32_t)(1<<1))
  2819. #define ENET_RACC_PADREM ((uint32_t)(1<<0))
  2820. #define IMXRT_ENET2 (*(IMXRT_REGISTER32_t *)0x402D4000)
  2821. #define IMXRT_ENET2_TIMER (*(IMXRT_REGISTER32_t *)0x402D4400)
  2822. #define ENET2_EIR (IMXRT_ENET2.offset004)
  2823. #define ENET2_EIMR (IMXRT_ENET2.offset008)
  2824. #define ENET2_RDAR (IMXRT_ENET2.offset010)
  2825. #define ENET2_TDAR (IMXRT_ENET2.offset014)
  2826. #define ENET2_ECR (IMXRT_ENET2.offset024)
  2827. #define ENET2_MMFR (IMXRT_ENET2.offset040)
  2828. #define ENET2_MSCR (IMXRT_ENET2.offset044)
  2829. #define ENET2_MIBC (IMXRT_ENET2.offset064)
  2830. #define ENET2_RCR (IMXRT_ENET2.offset084)
  2831. #define ENET2_TCR (IMXRT_ENET2.offset0C4)
  2832. #define ENET2_PALR (IMXRT_ENET2.offset0E4)
  2833. #define ENET2_PAUR (IMXRT_ENET2.offset0E8)
  2834. #define ENET2_OPD (IMXRT_ENET2.offset0EC)
  2835. #define ENET2_TXIC (IMXRT_ENET2.offset0F0)
  2836. #define ENET2_RXIC (IMXRT_ENET2.offset100)
  2837. #define ENET2_IAUR (IMXRT_ENET2.offset118)
  2838. #define ENET2_IALR (IMXRT_ENET2.offset11C)
  2839. #define ENET2_GAUR (IMXRT_ENET2.offset120)
  2840. #define ENET2_GALR (IMXRT_ENET2.offset124)
  2841. #define ENET2_TFWR (IMXRT_ENET2.offset144)
  2842. #define ENET2_RDSR (IMXRT_ENET2.offset180)
  2843. #define ENET2_TDSR (IMXRT_ENET2.offset184)
  2844. #define ENET2_MRBR (IMXRT_ENET2.offset188)
  2845. #define ENET2_RSFL (IMXRT_ENET2.offset190)
  2846. #define ENET2_RSEM (IMXRT_ENET2.offset194)
  2847. #define ENET2_RAEM (IMXRT_ENET2.offset198)
  2848. #define ENET2_RAFL (IMXRT_ENET2.offset19C)
  2849. #define ENET2_TSEM (IMXRT_ENET2.offset1A0)
  2850. #define ENET2_TAEM (IMXRT_ENET2.offset1A4)
  2851. #define ENET2_TAFL (IMXRT_ENET2.offset1A8)
  2852. #define ENET2_TIPG (IMXRT_ENET2.offset1AC)
  2853. #define ENET2_FTRL (IMXRT_ENET2.offset1B0)
  2854. #define ENET2_TACC (IMXRT_ENET2.offset1C0)
  2855. #define ENET2_RACC (IMXRT_ENET2.offset1C4)
  2856. #define ENET2_RMON_T_DROP (IMXRT_ENET2.offset200)
  2857. #define ENET2_RMON_T_PACKETS (IMXRT_ENET2.offset204)
  2858. #define ENET2_RMON_T_BC_PKT (IMXRT_ENET2.offset208)
  2859. #define ENET2_RMON_T_MC_PKT (IMXRT_ENET2.offset20C)
  2860. #define ENET2_RMON_T_CRC_ALIGN (IMXRT_ENET2.offset210)
  2861. #define ENET2_RMON_T_UNDERSIZE (IMXRT_ENET2.offset214)
  2862. #define ENET2_RMON_T_OVERSIZE (IMXRT_ENET2.offset218)
  2863. #define ENET2_RMON_T_FRAG (IMXRT_ENET2.offset21C)
  2864. #define ENET2_RMON_T_JAB (IMXRT_ENET2.offset220)
  2865. #define ENET2_RMON_T_COL (IMXRT_ENET2.offset224)
  2866. #define ENET2_RMON_T_P64 (IMXRT_ENET2.offset228)
  2867. #define ENET2_RMON_T_P65TO127 (IMXRT_ENET2.offset22C)
  2868. #define ENET2_RMON_T_P128TO255 (IMXRT_ENET2.offset230)
  2869. #define ENET2_RMON_T_P256TO511 (IMXRT_ENET2.offset234)
  2870. #define ENET2_RMON_T_P512TO1023 (IMXRT_ENET2.offset238)
  2871. #define ENET2_RMON_T_P1024TO2047 (IMXRT_ENET2.offset23C)
  2872. #define ENET2_RMON_T_P_GTE2048 (IMXRT_ENET2.offset240)
  2873. #define ENET2_RMON_T_OCTETS (IMXRT_ENET2.offset244)
  2874. #define ENET2_IEEE_T_DROP (IMXRT_ENET2.offset248)
  2875. #define ENET2_IEEE_T_FRAME_OK (IMXRT_ENET2.offset24C)
  2876. #define ENET2_IEEE_T_1COL (IMXRT_ENET2.offset250)
  2877. #define ENET2_IEEE_T_MCOL (IMXRT_ENET2.offset254)
  2878. #define ENET2_IEEE_T_DEF (IMXRT_ENET2.offset258)
  2879. #define ENET2_IEEE_T_LCOL (IMXRT_ENET2.offset25C)
  2880. #define ENET2_IEEE_T_EXCOL (IMXRT_ENET2.offset260)
  2881. #define ENET2_IEEE_T_MACERR (IMXRT_ENET2.offset264)
  2882. #define ENET2_IEEE_T_CSERR (IMXRT_ENET2.offset268)
  2883. #define ENET2_IEEE_T_SQE (IMXRT_ENET2.offset26C)
  2884. #define ENET2_IEEE_T_FDXFC (IMXRT_ENET2.offset270)
  2885. #define ENET2_IEEE_T_OCTETS_OK (IMXRT_ENET2.offset274)
  2886. #define ENET2_RMON_R_PACKETS (IMXRT_ENET2.offset284)
  2887. #define ENET2_RMON_R_BC_PKT (IMXRT_ENET2.offset288)
  2888. #define ENET2_RMON_R_MC_PKT (IMXRT_ENET2.offset28C)
  2889. #define ENET2_RMON_R_CRC_ALIGN (IMXRT_ENET2.offset290)
  2890. #define ENET2_RMON_R_UNDERSIZE (IMXRT_ENET2.offset294)
  2891. #define ENET2_RMON_R_OVERSIZE (IMXRT_ENET2.offset298)
  2892. #define ENET2_RMON_R_FRAG (IMXRT_ENET2.offset29C)
  2893. #define ENET2_RMON_R_JAB (IMXRT_ENET2.offset2A0)
  2894. #define ENET2_RMON_R_RESVD_0 (IMXRT_ENET2.offset2A4)
  2895. #define ENET2_RMON_R_P64 (IMXRT_ENET2.offset2A8)
  2896. #define ENET2_RMON_R_P65TO127 (IMXRT_ENET2.offset2AC)
  2897. #define ENET2_RMON_R_P128TO255 (IMXRT_ENET2.offset2B0)
  2898. #define ENET2_RMON_R_P256TO511 (IMXRT_ENET2.offset2B4)
  2899. #define ENET2_RMON_R_P512TO1023 (IMXRT_ENET2.offset2B8)
  2900. #define ENET2_RMON_R_P1024TO2047 (IMXRT_ENET2.offset2BC)
  2901. #define ENET2_RMON_R_P_GTE2048 (IMXRT_ENET2.offset2C0)
  2902. #define ENET2_RMON_R_OCTETS (IMXRT_ENET2.offset2C4)
  2903. #define ENET2_IEEE_R_DROP (IMXRT_ENET2.offset2C8)
  2904. #define ENET2_IEEE_R_FRAME_OK (IMXRT_ENET2.offset2CC)
  2905. #define ENET2_IEEE_R_CRC (IMXRT_ENET2.offset2D0)
  2906. #define ENET2_IEEE_R_ALIGN (IMXRT_ENET2.offset2D4)
  2907. #define ENET2_IEEE_R_MACERR (IMXRT_ENET2.offset2D8)
  2908. #define ENET2_IEEE_R_FDXFC (IMXRT_ENET2.offset2DC)
  2909. #define ENET2_IEEE_R_OCTETS_OK (IMXRT_ENET2.offset2E0)
  2910. #define ENET2_ATCR (IMXRT_ENET2_TIMER.offset000)
  2911. #define ENET2_ATVR (IMXRT_ENET2_TIMER.offset004)
  2912. #define ENET2_ATOFF (IMXRT_ENET2_TIMER.offset008)
  2913. #define ENET2_ATPER (IMXRT_ENET2_TIMER.offset00C)
  2914. #define ENET2_ATCOR (IMXRT_ENET2_TIMER.offset010)
  2915. #define ENET2_ATINC (IMXRT_ENET2_TIMER.offset014)
  2916. #define ENET2_ATSTMP (IMXRT_ENET2_TIMER.offset018)
  2917. #define ENET2_TGSR (IMXRT_ENET2_TIMER.offset204)
  2918. #define ENET2_TCSR0 (IMXRT_ENET2_TIMER.offset208)
  2919. #define ENET2_TCCR0 (IMXRT_ENET2_TIMER.offset20C)
  2920. #define ENET2_TCSR1 (IMXRT_ENET2_TIMER.offset210)
  2921. #define ENET2_TCCR1 (IMXRT_ENET2_TIMER.offset214)
  2922. #define ENET2_TCSR2 (IMXRT_ENET2_TIMER.offset218)
  2923. #define ENET2_TCCR2 (IMXRT_ENET2_TIMER.offset21C)
  2924. #define ENET2_TCSR3 (IMXRT_ENET2_TIMER.offset220)
  2925. #define ENET2_TCCR3 (IMXRT_ENET2_TIMER.offset224)
  2926. // 25.3.1.1: page 1199
  2927. #define IMXRT_EWM (*(IMXRT_REGISTER8_t *)0x402D8000)
  2928. #define EWM_CTRL (IMXRT_EWM.offset00)
  2929. #define EWM_SERV (IMXRT_EWM.offset01)
  2930. #define EWM_CMPL (IMXRT_EWM.offset02)
  2931. #define EWM_CMPH (IMXRT_EWM.offset03)
  2932. #define EWM_CLKCTRL (IMXRT_EWM.offset04)
  2933. #define EWM_CLKPRESCALER (IMXRT_EWM.offset05)
  2934. // 26.8: page 1249
  2935. #define IMXRT_FLEXCAN1 (*(IMXRT_REGISTER32_t *)0x401D0000)
  2936. #define IMXRT_FLEXCAN1_MASK (*(IMXRT_REGISTER32_t *)0x401D0800)
  2937. #define FLEXCAN1_MCR (IMXRT_FLEXCAN1.offset000)
  2938. #define FLEXCAN1_CTRL1 (IMXRT_FLEXCAN1.offset004)
  2939. #define FLEXCAN1_TIMER (IMXRT_FLEXCAN1.offset008)
  2940. #define FLEXCAN1_RXMGMASK (IMXRT_FLEXCAN1.offset010)
  2941. #define FLEXCAN1_RX14MASK (IMXRT_FLEXCAN1.offset014)
  2942. #define FLEXCAN1_RX15MASK (IMXRT_FLEXCAN1.offset018)
  2943. #define FLEXCAN1_ECR (IMXRT_FLEXCAN1.offset01C)
  2944. #define FLEXCAN1_ESR1 (IMXRT_FLEXCAN1.offset020)
  2945. #define FLEXCAN1_IMASK2 (IMXRT_FLEXCAN1.offset024)
  2946. #define FLEXCAN1_IMASK1 (IMXRT_FLEXCAN1.offset028)
  2947. #define FLEXCAN1_IFLAG2 (IMXRT_FLEXCAN1.offset02C)
  2948. #define FLEXCAN1_IFLAG1 (IMXRT_FLEXCAN1.offset030)
  2949. #define FLEXCAN1_CTRL2 (IMXRT_FLEXCAN1.offset034)
  2950. #define FLEXCAN1_ESR2 (IMXRT_FLEXCAN1.offset038)
  2951. #define FLEXCAN1_CRCR (IMXRT_FLEXCAN1.offset044)
  2952. #define FLEXCAN1_RXFGMASK (IMXRT_FLEXCAN1.offset048)
  2953. #define FLEXCAN1_RXFIR (IMXRT_FLEXCAN1.offset04C)
  2954. #define FLEXCAN1_RXIMR0 (IMXRT_FLEXCAN1_MASK.offset080)
  2955. #define FLEXCAN1_RXIMR1 (IMXRT_FLEXCAN1_MASK.offset084)
  2956. #define FLEXCAN1_RXIMR2 (IMXRT_FLEXCAN1_MASK.offset088)
  2957. #define FLEXCAN1_RXIMR3 (IMXRT_FLEXCAN1_MASK.offset08C)
  2958. #define FLEXCAN1_RXIMR4 (IMXRT_FLEXCAN1_MASK.offset090)
  2959. #define FLEXCAN1_RXIMR5 (IMXRT_FLEXCAN1_MASK.offset094)
  2960. #define FLEXCAN1_RXIMR6 (IMXRT_FLEXCAN1_MASK.offset098)
  2961. #define FLEXCAN1_RXIMR7 (IMXRT_FLEXCAN1_MASK.offset09C)
  2962. #define FLEXCAN1_RXIMR8 (IMXRT_FLEXCAN1_MASK.offset0A0)
  2963. #define FLEXCAN1_RXIMR9 (IMXRT_FLEXCAN1_MASK.offset0A4)
  2964. #define FLEXCAN1_RXIMR10 (IMXRT_FLEXCAN1_MASK.offset0A8)
  2965. #define FLEXCAN1_RXIMR11 (IMXRT_FLEXCAN1_MASK.offset0AC)
  2966. #define FLEXCAN1_RXIMR12 (IMXRT_FLEXCAN1_MASK.offset0B0)
  2967. #define FLEXCAN1_RXIMR13 (IMXRT_FLEXCAN1_MASK.offset0B4)
  2968. #define FLEXCAN1_RXIMR14 (IMXRT_FLEXCAN1_MASK.offset0B8)
  2969. #define FLEXCAN1_RXIMR15 (IMXRT_FLEXCAN1_MASK.offset0BC)
  2970. #define FLEXCAN1_RXIMR16 (IMXRT_FLEXCAN1_MASK.offset0C0)
  2971. #define FLEXCAN1_RXIMR17 (IMXRT_FLEXCAN1_MASK.offset0C4)
  2972. #define FLEXCAN1_RXIMR18 (IMXRT_FLEXCAN1_MASK.offset0C8)
  2973. #define FLEXCAN1_RXIMR19 (IMXRT_FLEXCAN1_MASK.offset0CC)
  2974. #define FLEXCAN1_RXIMR20 (IMXRT_FLEXCAN1_MASK.offset0D0)
  2975. #define FLEXCAN1_RXIMR21 (IMXRT_FLEXCAN1_MASK.offset0D4)
  2976. #define FLEXCAN1_RXIMR22 (IMXRT_FLEXCAN1_MASK.offset0D8)
  2977. #define FLEXCAN1_RXIMR23 (IMXRT_FLEXCAN1_MASK.offset0DC)
  2978. #define FLEXCAN1_RXIMR24 (IMXRT_FLEXCAN1_MASK.offset0E0)
  2979. #define FLEXCAN1_RXIMR25 (IMXRT_FLEXCAN1_MASK.offset0E4)
  2980. #define FLEXCAN1_RXIMR26 (IMXRT_FLEXCAN1_MASK.offset0E8)
  2981. #define FLEXCAN1_RXIMR27 (IMXRT_FLEXCAN1_MASK.offset0EC)
  2982. #define FLEXCAN1_RXIMR28 (IMXRT_FLEXCAN1_MASK.offset0F0)
  2983. #define FLEXCAN1_RXIMR29 (IMXRT_FLEXCAN1_MASK.offset0F4)
  2984. #define FLEXCAN1_RXIMR30 (IMXRT_FLEXCAN1_MASK.offset0F8)
  2985. #define FLEXCAN1_RXIMR31 (IMXRT_FLEXCAN1_MASK.offset0FC)
  2986. #define FLEXCAN1_RXIMR32 (IMXRT_FLEXCAN1_MASK.offset100)
  2987. #define FLEXCAN1_RXIMR33 (IMXRT_FLEXCAN1_MASK.offset104)
  2988. #define FLEXCAN1_RXIMR34 (IMXRT_FLEXCAN1_MASK.offset108)
  2989. #define FLEXCAN1_RXIMR35 (IMXRT_FLEXCAN1_MASK.offset10C)
  2990. #define FLEXCAN1_RXIMR36 (IMXRT_FLEXCAN1_MASK.offset110)
  2991. #define FLEXCAN1_RXIMR37 (IMXRT_FLEXCAN1_MASK.offset114)
  2992. #define FLEXCAN1_RXIMR38 (IMXRT_FLEXCAN1_MASK.offset118)
  2993. #define FLEXCAN1_RXIMR39 (IMXRT_FLEXCAN1_MASK.offset11C)
  2994. #define FLEXCAN1_RXIMR40 (IMXRT_FLEXCAN1_MASK.offset120)
  2995. #define FLEXCAN1_RXIMR41 (IMXRT_FLEXCAN1_MASK.offset124)
  2996. #define FLEXCAN1_RXIMR42 (IMXRT_FLEXCAN1_MASK.offset128)
  2997. #define FLEXCAN1_RXIMR43 (IMXRT_FLEXCAN1_MASK.offset12C)
  2998. #define FLEXCAN1_RXIMR44 (IMXRT_FLEXCAN1_MASK.offset130)
  2999. #define FLEXCAN1_RXIMR45 (IMXRT_FLEXCAN1_MASK.offset134)
  3000. #define FLEXCAN1_RXIMR46 (IMXRT_FLEXCAN1_MASK.offset138)
  3001. #define FLEXCAN1_RXIMR47 (IMXRT_FLEXCAN1_MASK.offset13C)
  3002. #define FLEXCAN1_RXIMR48 (IMXRT_FLEXCAN1_MASK.offset140)
  3003. #define FLEXCAN1_RXIMR49 (IMXRT_FLEXCAN1_MASK.offset144)
  3004. #define FLEXCAN1_RXIMR50 (IMXRT_FLEXCAN1_MASK.offset148)
  3005. #define FLEXCAN1_RXIMR51 (IMXRT_FLEXCAN1_MASK.offset14C)
  3006. #define FLEXCAN1_RXIMR52 (IMXRT_FLEXCAN1_MASK.offset150)
  3007. #define FLEXCAN1_RXIMR53 (IMXRT_FLEXCAN1_MASK.offset154)
  3008. #define FLEXCAN1_RXIMR54 (IMXRT_FLEXCAN1_MASK.offset158)
  3009. #define FLEXCAN1_RXIMR55 (IMXRT_FLEXCAN1_MASK.offset15C)
  3010. #define FLEXCAN1_RXIMR56 (IMXRT_FLEXCAN1_MASK.offset160)
  3011. #define FLEXCAN1_RXIMR57 (IMXRT_FLEXCAN1_MASK.offset164)
  3012. #define FLEXCAN1_RXIMR58 (IMXRT_FLEXCAN1_MASK.offset168)
  3013. #define FLEXCAN1_RXIMR59 (IMXRT_FLEXCAN1_MASK.offset16C)
  3014. #define FLEXCAN1_RXIMR60 (IMXRT_FLEXCAN1_MASK.offset170)
  3015. #define FLEXCAN1_RXIMR61 (IMXRT_FLEXCAN1_MASK.offset174)
  3016. #define FLEXCAN1_RXIMR62 (IMXRT_FLEXCAN1_MASK.offset178)
  3017. #define FLEXCAN1_RXIMR63 (IMXRT_FLEXCAN1_MASK.offset17C)
  3018. #define FLEXCAN1_GFWR (IMXRT_FLEXCAN1_MASK.offset1E0)
  3019. #define IMXRT_FLEXCAN2 (*(IMXRT_REGISTER32_t *)0x401D4000)
  3020. #define IMXRT_FLEXCAN2_MASK (*(IMXRT_REGISTER32_t *)0x401D4800)
  3021. #define FLEXCAN2_MCR (IMXRT_FLEXCAN2.offset000)
  3022. #define FLEXCAN2_CTRL1 (IMXRT_FLEXCAN2.offset004)
  3023. #define FLEXCAN2_TIMER (IMXRT_FLEXCAN2.offset008)
  3024. #define FLEXCAN2_RXMGMASK (IMXRT_FLEXCAN2.offset010)
  3025. #define FLEXCAN2_RX14MASK (IMXRT_FLEXCAN2.offset014)
  3026. #define FLEXCAN2_RX15MASK (IMXRT_FLEXCAN2.offset018)
  3027. #define FLEXCAN2_ECR (IMXRT_FLEXCAN2.offset01C)
  3028. #define FLEXCAN2_ESR1 (IMXRT_FLEXCAN2.offset020)
  3029. #define FLEXCAN2_IMASK2 (IMXRT_FLEXCAN2.offset024)
  3030. #define FLEXCAN2_IMASK1 (IMXRT_FLEXCAN2.offset028)
  3031. #define FLEXCAN2_IFLAG2 (IMXRT_FLEXCAN2.offset02C)
  3032. #define FLEXCAN2_IFLAG1 (IMXRT_FLEXCAN2.offset030)
  3033. #define FLEXCAN2_CTRL2 (IMXRT_FLEXCAN2.offset034)
  3034. #define FLEXCAN2_ESR2 (IMXRT_FLEXCAN2.offset038)
  3035. #define FLEXCAN2_CRCR (IMXRT_FLEXCAN2.offset044)
  3036. #define FLEXCAN2_RXFGMASK (IMXRT_FLEXCAN2.offset048)
  3037. #define FLEXCAN2_RXFIR (IMXRT_FLEXCAN2.offset04C)
  3038. #define FLEXCAN2_RXIMR0 (IMXRT_FLEXCAN2_MASK.offset080)
  3039. #define FLEXCAN2_RXIMR1 (IMXRT_FLEXCAN2_MASK.offset084)
  3040. #define FLEXCAN2_RXIMR2 (IMXRT_FLEXCAN2_MASK.offset088)
  3041. #define FLEXCAN2_RXIMR3 (IMXRT_FLEXCAN2_MASK.offset08C)
  3042. #define FLEXCAN2_RXIMR4 (IMXRT_FLEXCAN2_MASK.offset090)
  3043. #define FLEXCAN2_RXIMR5 (IMXRT_FLEXCAN2_MASK.offset094)
  3044. #define FLEXCAN2_RXIMR6 (IMXRT_FLEXCAN2_MASK.offset098)
  3045. #define FLEXCAN2_RXIMR7 (IMXRT_FLEXCAN2_MASK.offset09C)
  3046. #define FLEXCAN2_RXIMR8 (IMXRT_FLEXCAN2_MASK.offset0A0)
  3047. #define FLEXCAN2_RXIMR9 (IMXRT_FLEXCAN2_MASK.offset0A4)
  3048. #define FLEXCAN2_RXIMR10 (IMXRT_FLEXCAN2_MASK.offset0A8)
  3049. #define FLEXCAN2_RXIMR11 (IMXRT_FLEXCAN2_MASK.offset0AC)
  3050. #define FLEXCAN2_RXIMR12 (IMXRT_FLEXCAN2_MASK.offset0B0)
  3051. #define FLEXCAN2_RXIMR13 (IMXRT_FLEXCAN2_MASK.offset0B4)
  3052. #define FLEXCAN2_RXIMR14 (IMXRT_FLEXCAN2_MASK.offset0B8)
  3053. #define FLEXCAN2_RXIMR15 (IMXRT_FLEXCAN2_MASK.offset0BC)
  3054. #define FLEXCAN2_RXIMR16 (IMXRT_FLEXCAN2_MASK.offset0C0)
  3055. #define FLEXCAN2_RXIMR17 (IMXRT_FLEXCAN2_MASK.offset0C4)
  3056. #define FLEXCAN2_RXIMR18 (IMXRT_FLEXCAN2_MASK.offset0C8)
  3057. #define FLEXCAN2_RXIMR19 (IMXRT_FLEXCAN2_MASK.offset0CC)
  3058. #define FLEXCAN2_RXIMR20 (IMXRT_FLEXCAN2_MASK.offset0D0)
  3059. #define FLEXCAN2_RXIMR21 (IMXRT_FLEXCAN2_MASK.offset0D4)
  3060. #define FLEXCAN2_RXIMR22 (IMXRT_FLEXCAN2_MASK.offset0D8)
  3061. #define FLEXCAN2_RXIMR23 (IMXRT_FLEXCAN2_MASK.offset0DC)
  3062. #define FLEXCAN2_RXIMR24 (IMXRT_FLEXCAN2_MASK.offset0E0)
  3063. #define FLEXCAN2_RXIMR25 (IMXRT_FLEXCAN2_MASK.offset0E4)
  3064. #define FLEXCAN2_RXIMR26 (IMXRT_FLEXCAN2_MASK.offset0E8)
  3065. #define FLEXCAN2_RXIMR27 (IMXRT_FLEXCAN2_MASK.offset0EC)
  3066. #define FLEXCAN2_RXIMR28 (IMXRT_FLEXCAN2_MASK.offset0F0)
  3067. #define FLEXCAN2_RXIMR29 (IMXRT_FLEXCAN2_MASK.offset0F4)
  3068. #define FLEXCAN2_RXIMR30 (IMXRT_FLEXCAN2_MASK.offset0F8)
  3069. #define FLEXCAN2_RXIMR31 (IMXRT_FLEXCAN2_MASK.offset0FC)
  3070. #define FLEXCAN2_RXIMR32 (IMXRT_FLEXCAN2_MASK.offset100)
  3071. #define FLEXCAN2_RXIMR33 (IMXRT_FLEXCAN2_MASK.offset104)
  3072. #define FLEXCAN2_RXIMR34 (IMXRT_FLEXCAN2_MASK.offset108)
  3073. #define FLEXCAN2_RXIMR35 (IMXRT_FLEXCAN2_MASK.offset10C)
  3074. #define FLEXCAN2_RXIMR36 (IMXRT_FLEXCAN2_MASK.offset110)
  3075. #define FLEXCAN2_RXIMR37 (IMXRT_FLEXCAN2_MASK.offset114)
  3076. #define FLEXCAN2_RXIMR38 (IMXRT_FLEXCAN2_MASK.offset118)
  3077. #define FLEXCAN2_RXIMR39 (IMXRT_FLEXCAN2_MASK.offset11C)
  3078. #define FLEXCAN2_RXIMR40 (IMXRT_FLEXCAN2_MASK.offset120)
  3079. #define FLEXCAN2_RXIMR41 (IMXRT_FLEXCAN2_MASK.offset124)
  3080. #define FLEXCAN2_RXIMR42 (IMXRT_FLEXCAN2_MASK.offset128)
  3081. #define FLEXCAN2_RXIMR43 (IMXRT_FLEXCAN2_MASK.offset12C)
  3082. #define FLEXCAN2_RXIMR44 (IMXRT_FLEXCAN2_MASK.offset130)
  3083. #define FLEXCAN2_RXIMR45 (IMXRT_FLEXCAN2_MASK.offset134)
  3084. #define FLEXCAN2_RXIMR46 (IMXRT_FLEXCAN2_MASK.offset138)
  3085. #define FLEXCAN2_RXIMR47 (IMXRT_FLEXCAN2_MASK.offset13C)
  3086. #define FLEXCAN2_RXIMR48 (IMXRT_FLEXCAN2_MASK.offset140)
  3087. #define FLEXCAN2_RXIMR49 (IMXRT_FLEXCAN2_MASK.offset144)
  3088. #define FLEXCAN2_RXIMR50 (IMXRT_FLEXCAN2_MASK.offset148)
  3089. #define FLEXCAN2_RXIMR51 (IMXRT_FLEXCAN2_MASK.offset14C)
  3090. #define FLEXCAN2_RXIMR52 (IMXRT_FLEXCAN2_MASK.offset150)
  3091. #define FLEXCAN2_RXIMR53 (IMXRT_FLEXCAN2_MASK.offset154)
  3092. #define FLEXCAN2_RXIMR54 (IMXRT_FLEXCAN2_MASK.offset158)
  3093. #define FLEXCAN2_RXIMR55 (IMXRT_FLEXCAN2_MASK.offset15C)
  3094. #define FLEXCAN2_RXIMR56 (IMXRT_FLEXCAN2_MASK.offset160)
  3095. #define FLEXCAN2_RXIMR57 (IMXRT_FLEXCAN2_MASK.offset164)
  3096. #define FLEXCAN2_RXIMR58 (IMXRT_FLEXCAN2_MASK.offset168)
  3097. #define FLEXCAN2_RXIMR59 (IMXRT_FLEXCAN2_MASK.offset16C)
  3098. #define FLEXCAN2_RXIMR60 (IMXRT_FLEXCAN2_MASK.offset170)
  3099. #define FLEXCAN2_RXIMR61 (IMXRT_FLEXCAN2_MASK.offset174)
  3100. #define FLEXCAN2_RXIMR62 (IMXRT_FLEXCAN2_MASK.offset178)
  3101. #define FLEXCAN2_RXIMR63 (IMXRT_FLEXCAN2_MASK.offset17C)
  3102. #define FLEXCAN2_GFWR (IMXRT_FLEXCAN2_MASK.offset1E0)
  3103. #define IMXRT_FLEXCAN3 (*(IMXRT_REGISTER32_t *)0x401D8000)
  3104. #define IMXRT_FLEXCAN3_MASK (*(IMXRT_REGISTER32_t *)0x401D8800)
  3105. #define IMXRT_FLEXCAN3_EXT (*(IMXRT_REGISTER32_t *)0x401D8B00)
  3106. #define IMXRT_FLEXCAN3_ERXFIFO (*(IMXRT_REGISTER32_t *)0x401DB000)
  3107. #define FLEXCAN3_MCR (IMXRT_FLEXCAN3.offset000)
  3108. #define FLEXCAN3_CTRL1 (IMXRT_FLEXCAN3.offset004)
  3109. #define FLEXCAN3_TIMER (IMXRT_FLEXCAN3.offset008)
  3110. #define FLEXCAN3_RXMGMASK (IMXRT_FLEXCAN3.offset010)
  3111. #define FLEXCAN3_RX14MASK (IMXRT_FLEXCAN3.offset014)
  3112. #define FLEXCAN3_RX15MASK (IMXRT_FLEXCAN3.offset018)
  3113. #define FLEXCAN3_ECR (IMXRT_FLEXCAN3.offset01C)
  3114. #define FLEXCAN3_ESR1 (IMXRT_FLEXCAN3.offset020)
  3115. #define FLEXCAN3_IMASK2 (IMXRT_FLEXCAN3.offset024)
  3116. #define FLEXCAN3_IMASK1 (IMXRT_FLEXCAN3.offset028)
  3117. #define FLEXCAN3_IFLAG2 (IMXRT_FLEXCAN3.offset02C)
  3118. #define FLEXCAN3_IFLAG1 (IMXRT_FLEXCAN3.offset030)
  3119. #define FLEXCAN3_CTRL2 (IMXRT_FLEXCAN3.offset034)
  3120. #define FLEXCAN3_ESR2 (IMXRT_FLEXCAN3.offset038)
  3121. #define FLEXCAN3_CRCR (IMXRT_FLEXCAN3.offset044)
  3122. #define FLEXCAN3_RXFGMASK (IMXRT_FLEXCAN3.offset048)
  3123. #define FLEXCAN3_RXFIR (IMXRT_FLEXCAN3.offset04C)
  3124. #define FLEXCAN3_CBT (IMXRT_FLEXCAN3.offset050)
  3125. #define FLEXCAN3_RXIMR0 (IMXRT_FLEXCAN3_MASK.offset080)
  3126. #define FLEXCAN3_RXIMR1 (IMXRT_FLEXCAN3_MASK.offset084)
  3127. #define FLEXCAN3_RXIMR2 (IMXRT_FLEXCAN3_MASK.offset088)
  3128. #define FLEXCAN3_RXIMR3 (IMXRT_FLEXCAN3_MASK.offset08C)
  3129. #define FLEXCAN3_RXIMR4 (IMXRT_FLEXCAN3_MASK.offset090)
  3130. #define FLEXCAN3_RXIMR5 (IMXRT_FLEXCAN3_MASK.offset094)
  3131. #define FLEXCAN3_RXIMR6 (IMXRT_FLEXCAN3_MASK.offset098)
  3132. #define FLEXCAN3_RXIMR7 (IMXRT_FLEXCAN3_MASK.offset09C)
  3133. #define FLEXCAN3_RXIMR8 (IMXRT_FLEXCAN3_MASK.offset0A0)
  3134. #define FLEXCAN3_RXIMR9 (IMXRT_FLEXCAN3_MASK.offset0A4)
  3135. #define FLEXCAN3_RXIMR10 (IMXRT_FLEXCAN3_MASK.offset0A8)
  3136. #define FLEXCAN3_RXIMR11 (IMXRT_FLEXCAN3_MASK.offset0AC)
  3137. #define FLEXCAN3_RXIMR12 (IMXRT_FLEXCAN3_MASK.offset0B0)
  3138. #define FLEXCAN3_RXIMR13 (IMXRT_FLEXCAN3_MASK.offset0B4)
  3139. #define FLEXCAN3_RXIMR14 (IMXRT_FLEXCAN3_MASK.offset0B8)
  3140. #define FLEXCAN3_RXIMR15 (IMXRT_FLEXCAN3_MASK.offset0BC)
  3141. #define FLEXCAN3_RXIMR16 (IMXRT_FLEXCAN3_MASK.offset0C0)
  3142. #define FLEXCAN3_RXIMR17 (IMXRT_FLEXCAN3_MASK.offset0C4)
  3143. #define FLEXCAN3_RXIMR18 (IMXRT_FLEXCAN3_MASK.offset0C8)
  3144. #define FLEXCAN3_RXIMR19 (IMXRT_FLEXCAN3_MASK.offset0CC)
  3145. #define FLEXCAN3_RXIMR20 (IMXRT_FLEXCAN3_MASK.offset0D0)
  3146. #define FLEXCAN3_RXIMR21 (IMXRT_FLEXCAN3_MASK.offset0D4)
  3147. #define FLEXCAN3_RXIMR22 (IMXRT_FLEXCAN3_MASK.offset0D8)
  3148. #define FLEXCAN3_RXIMR23 (IMXRT_FLEXCAN3_MASK.offset0DC)
  3149. #define FLEXCAN3_RXIMR24 (IMXRT_FLEXCAN3_MASK.offset0E0)
  3150. #define FLEXCAN3_RXIMR25 (IMXRT_FLEXCAN3_MASK.offset0E4)
  3151. #define FLEXCAN3_RXIMR26 (IMXRT_FLEXCAN3_MASK.offset0E8)
  3152. #define FLEXCAN3_RXIMR27 (IMXRT_FLEXCAN3_MASK.offset0EC)
  3153. #define FLEXCAN3_RXIMR28 (IMXRT_FLEXCAN3_MASK.offset0F0)
  3154. #define FLEXCAN3_RXIMR29 (IMXRT_FLEXCAN3_MASK.offset0F4)
  3155. #define FLEXCAN3_RXIMR30 (IMXRT_FLEXCAN3_MASK.offset0F8)
  3156. #define FLEXCAN3_RXIMR31 (IMXRT_FLEXCAN3_MASK.offset0FC)
  3157. #define FLEXCAN3_RXIMR32 (IMXRT_FLEXCAN3_MASK.offset100)
  3158. #define FLEXCAN3_RXIMR33 (IMXRT_FLEXCAN3_MASK.offset104)
  3159. #define FLEXCAN3_RXIMR34 (IMXRT_FLEXCAN3_MASK.offset108)
  3160. #define FLEXCAN3_RXIMR35 (IMXRT_FLEXCAN3_MASK.offset10C)
  3161. #define FLEXCAN3_RXIMR36 (IMXRT_FLEXCAN3_MASK.offset110)
  3162. #define FLEXCAN3_RXIMR37 (IMXRT_FLEXCAN3_MASK.offset114)
  3163. #define FLEXCAN3_RXIMR38 (IMXRT_FLEXCAN3_MASK.offset118)
  3164. #define FLEXCAN3_RXIMR39 (IMXRT_FLEXCAN3_MASK.offset11C)
  3165. #define FLEXCAN3_RXIMR40 (IMXRT_FLEXCAN3_MASK.offset120)
  3166. #define FLEXCAN3_RXIMR41 (IMXRT_FLEXCAN3_MASK.offset124)
  3167. #define FLEXCAN3_RXIMR42 (IMXRT_FLEXCAN3_MASK.offset128)
  3168. #define FLEXCAN3_RXIMR43 (IMXRT_FLEXCAN3_MASK.offset12C)
  3169. #define FLEXCAN3_RXIMR44 (IMXRT_FLEXCAN3_MASK.offset130)
  3170. #define FLEXCAN3_RXIMR45 (IMXRT_FLEXCAN3_MASK.offset134)
  3171. #define FLEXCAN3_RXIMR46 (IMXRT_FLEXCAN3_MASK.offset138)
  3172. #define FLEXCAN3_RXIMR47 (IMXRT_FLEXCAN3_MASK.offset13C)
  3173. #define FLEXCAN3_RXIMR48 (IMXRT_FLEXCAN3_MASK.offset140)
  3174. #define FLEXCAN3_RXIMR49 (IMXRT_FLEXCAN3_MASK.offset144)
  3175. #define FLEXCAN3_RXIMR50 (IMXRT_FLEXCAN3_MASK.offset148)
  3176. #define FLEXCAN3_RXIMR51 (IMXRT_FLEXCAN3_MASK.offset14C)
  3177. #define FLEXCAN3_RXIMR52 (IMXRT_FLEXCAN3_MASK.offset150)
  3178. #define FLEXCAN3_RXIMR53 (IMXRT_FLEXCAN3_MASK.offset154)
  3179. #define FLEXCAN3_RXIMR54 (IMXRT_FLEXCAN3_MASK.offset158)
  3180. #define FLEXCAN3_RXIMR55 (IMXRT_FLEXCAN3_MASK.offset15C)
  3181. #define FLEXCAN3_RXIMR56 (IMXRT_FLEXCAN3_MASK.offset160)
  3182. #define FLEXCAN3_RXIMR57 (IMXRT_FLEXCAN3_MASK.offset164)
  3183. #define FLEXCAN3_RXIMR58 (IMXRT_FLEXCAN3_MASK.offset168)
  3184. #define FLEXCAN3_RXIMR59 (IMXRT_FLEXCAN3_MASK.offset16C)
  3185. #define FLEXCAN3_RXIMR60 (IMXRT_FLEXCAN3_MASK.offset170)
  3186. #define FLEXCAN3_RXIMR61 (IMXRT_FLEXCAN3_MASK.offset174)
  3187. #define FLEXCAN3_RXIMR62 (IMXRT_FLEXCAN3_MASK.offset178)
  3188. #define FLEXCAN3_RXIMR63 (IMXRT_FLEXCAN3_MASK.offset17C)
  3189. #define FLEXCAN3_EPRS (IMXRT_FLEXCAN3_EXT.offset0F0)
  3190. #define FLEXCAN3_ENCBT (IMXRT_FLEXCAN3_EXT.offset0F4)
  3191. #define FLEXCAN3_EDCBT (IMXRT_FLEXCAN3_EXT.offset0F8)
  3192. #define FLEXCAN3_ETDC (IMXRT_FLEXCAN3_EXT.offset0FC)
  3193. #define FLEXCAN3_FDCTRL (IMXRT_FLEXCAN3_EXT.offset100)
  3194. #define FLEXCAN3_FDCBT (IMXRT_FLEXCAN3_EXT.offset104)
  3195. #define FLEXCAN3_FDCRC (IMXRT_FLEXCAN3_EXT.offset108)
  3196. #define FLEXCAN3_ERFCR (IMXRT_FLEXCAN3_EXT.offset10C)
  3197. #define FLEXCAN3_ERFIER (IMXRT_FLEXCAN3_EXT.offset110)
  3198. #define FLEXCAN3_ERFSR (IMXRT_FLEXCAN3_EXT.offset114)
  3199. #define FLEXCAN3_HR_TIME_STAMP0 (IMXRT_FLEXCAN3_EXT.offset130)
  3200. #define FLEXCAN3_HR_TIME_STAMP1 (IMXRT_FLEXCAN3_EXT.offset134)
  3201. #define FLEXCAN3_HR_TIME_STAMP2 (IMXRT_FLEXCAN3_EXT.offset138)
  3202. #define FLEXCAN3_HR_TIME_STAMP3 (IMXRT_FLEXCAN3_EXT.offset13C)
  3203. #define FLEXCAN3_HR_TIME_STAMP4 (IMXRT_FLEXCAN3_EXT.offset140)
  3204. #define FLEXCAN3_HR_TIME_STAMP5 (IMXRT_FLEXCAN3_EXT.offset144)
  3205. #define FLEXCAN3_HR_TIME_STAMP6 (IMXRT_FLEXCAN3_EXT.offset148)
  3206. #define FLEXCAN3_HR_TIME_STAMP7 (IMXRT_FLEXCAN3_EXT.offset14C)
  3207. #define FLEXCAN3_HR_TIME_STAMP8 (IMXRT_FLEXCAN3_EXT.offset150)
  3208. #define FLEXCAN3_HR_TIME_STAMP9 (IMXRT_FLEXCAN3_EXT.offset154)
  3209. #define FLEXCAN3_HR_TIME_STAMP10 (IMXRT_FLEXCAN3_EXT.offset158)
  3210. #define FLEXCAN3_HR_TIME_STAMP11 (IMXRT_FLEXCAN3_EXT.offset15C)
  3211. #define FLEXCAN3_HR_TIME_STAMP12 (IMXRT_FLEXCAN3_EXT.offset160)
  3212. #define FLEXCAN3_HR_TIME_STAMP13 (IMXRT_FLEXCAN3_EXT.offset164)
  3213. #define FLEXCAN3_HR_TIME_STAMP14 (IMXRT_FLEXCAN3_EXT.offset168)
  3214. #define FLEXCAN3_HR_TIME_STAMP15 (IMXRT_FLEXCAN3_EXT.offset16C)
  3215. #define FLEXCAN3_HR_TIME_STAMP16 (IMXRT_FLEXCAN3_EXT.offset170)
  3216. #define FLEXCAN3_HR_TIME_STAMP17 (IMXRT_FLEXCAN3_EXT.offset174)
  3217. #define FLEXCAN3_HR_TIME_STAMP18 (IMXRT_FLEXCAN3_EXT.offset178)
  3218. #define FLEXCAN3_HR_TIME_STAMP19 (IMXRT_FLEXCAN3_EXT.offset17C)
  3219. #define FLEXCAN3_HR_TIME_STAMP20 (IMXRT_FLEXCAN3_EXT.offset180)
  3220. #define FLEXCAN3_HR_TIME_STAMP21 (IMXRT_FLEXCAN3_EXT.offset184)
  3221. #define FLEXCAN3_HR_TIME_STAMP22 (IMXRT_FLEXCAN3_EXT.offset188)
  3222. #define FLEXCAN3_HR_TIME_STAMP23 (IMXRT_FLEXCAN3_EXT.offset18C)
  3223. #define FLEXCAN3_HR_TIME_STAMP24 (IMXRT_FLEXCAN3_EXT.offset190)
  3224. #define FLEXCAN3_HR_TIME_STAMP25 (IMXRT_FLEXCAN3_EXT.offset194)
  3225. #define FLEXCAN3_HR_TIME_STAMP26 (IMXRT_FLEXCAN3_EXT.offset198)
  3226. #define FLEXCAN3_HR_TIME_STAMP27 (IMXRT_FLEXCAN3_EXT.offset19C)
  3227. #define FLEXCAN3_HR_TIME_STAMP28 (IMXRT_FLEXCAN3_EXT.offset1A0)
  3228. #define FLEXCAN3_HR_TIME_STAMP29 (IMXRT_FLEXCAN3_EXT.offset1A4)
  3229. #define FLEXCAN3_HR_TIME_STAMP30 (IMXRT_FLEXCAN3_EXT.offset1A8)
  3230. #define FLEXCAN3_HR_TIME_STAMP31 (IMXRT_FLEXCAN3_EXT.offset1AC)
  3231. #define FLEXCAN3_HR_TIME_STAMP32 (IMXRT_FLEXCAN3_EXT.offset1B0)
  3232. #define FLEXCAN3_HR_TIME_STAMP33 (IMXRT_FLEXCAN3_EXT.offset1B4)
  3233. #define FLEXCAN3_HR_TIME_STAMP34 (IMXRT_FLEXCAN3_EXT.offset1B8)
  3234. #define FLEXCAN3_HR_TIME_STAMP35 (IMXRT_FLEXCAN3_EXT.offset1BC)
  3235. #define FLEXCAN3_HR_TIME_STAMP36 (IMXRT_FLEXCAN3_EXT.offset1C0)
  3236. #define FLEXCAN3_HR_TIME_STAMP37 (IMXRT_FLEXCAN3_EXT.offset1C4)
  3237. #define FLEXCAN3_HR_TIME_STAMP38 (IMXRT_FLEXCAN3_EXT.offset1C8)
  3238. #define FLEXCAN3_HR_TIME_STAMP39 (IMXRT_FLEXCAN3_EXT.offset1CC)
  3239. #define FLEXCAN3_HR_TIME_STAMP40 (IMXRT_FLEXCAN3_EXT.offset1D0)
  3240. #define FLEXCAN3_HR_TIME_STAMP41 (IMXRT_FLEXCAN3_EXT.offset1D4)
  3241. #define FLEXCAN3_HR_TIME_STAMP42 (IMXRT_FLEXCAN3_EXT.offset1D8)
  3242. #define FLEXCAN3_HR_TIME_STAMP43 (IMXRT_FLEXCAN3_EXT.offset1DC)
  3243. #define FLEXCAN3_HR_TIME_STAMP44 (IMXRT_FLEXCAN3_EXT.offset1E0)
  3244. #define FLEXCAN3_HR_TIME_STAMP45 (IMXRT_FLEXCAN3_EXT.offset1E4)
  3245. #define FLEXCAN3_HR_TIME_STAMP46 (IMXRT_FLEXCAN3_EXT.offset1E8)
  3246. #define FLEXCAN3_HR_TIME_STAMP47 (IMXRT_FLEXCAN3_EXT.offset1EC)
  3247. #define FLEXCAN3_HR_TIME_STAMP48 (IMXRT_FLEXCAN3_EXT.offset1F0)
  3248. #define FLEXCAN3_HR_TIME_STAMP49 (IMXRT_FLEXCAN3_EXT.offset1F4)
  3249. #define FLEXCAN3_HR_TIME_STAMP50 (IMXRT_FLEXCAN3_EXT.offset1F8)
  3250. #define FLEXCAN3_HR_TIME_STAMP51 (IMXRT_FLEXCAN3_EXT.offset1FC)
  3251. #define FLEXCAN3_HR_TIME_STAMP52 (IMXRT_FLEXCAN3_EXT.offset200)
  3252. #define FLEXCAN3_HR_TIME_STAMP53 (IMXRT_FLEXCAN3_EXT.offset204)
  3253. #define FLEXCAN3_HR_TIME_STAMP54 (IMXRT_FLEXCAN3_EXT.offset208)
  3254. #define FLEXCAN3_HR_TIME_STAMP55 (IMXRT_FLEXCAN3_EXT.offset20C)
  3255. #define FLEXCAN3_HR_TIME_STAMP56 (IMXRT_FLEXCAN3_EXT.offset210)
  3256. #define FLEXCAN3_HR_TIME_STAMP57 (IMXRT_FLEXCAN3_EXT.offset234)
  3257. #define FLEXCAN3_HR_TIME_STAMP58 (IMXRT_FLEXCAN3_EXT.offset218)
  3258. #define FLEXCAN3_HR_TIME_STAMP59 (IMXRT_FLEXCAN3_EXT.offset21C)
  3259. #define FLEXCAN3_HR_TIME_STAMP60 (IMXRT_FLEXCAN3_EXT.offset220)
  3260. #define FLEXCAN3_HR_TIME_STAMP61 (IMXRT_FLEXCAN3_EXT.offset224)
  3261. #define FLEXCAN3_HR_TIME_STAMP62 (IMXRT_FLEXCAN3_EXT.offset228)
  3262. #define FLEXCAN3_HR_TIME_STAMP63 (IMXRT_FLEXCAN3_EXT.offset22C)
  3263. #define FLEXCAN3_ERFFEL0 (IMXRT_FLEXCAN3_ERXFIFO.offset000)
  3264. #define FLEXCAN3_ERFFEL1 (IMXRT_FLEXCAN3_ERXFIFO.offset004)
  3265. #define FLEXCAN3_ERFFEL2 (IMXRT_FLEXCAN3_ERXFIFO.offset008)
  3266. #define FLEXCAN3_ERFFEL3 (IMXRT_FLEXCAN3_ERXFIFO.offset00C)
  3267. #define FLEXCAN3_ERFFEL4 (IMXRT_FLEXCAN3_ERXFIFO.offset010)
  3268. #define FLEXCAN3_ERFFEL5 (IMXRT_FLEXCAN3_ERXFIFO.offset014)
  3269. #define FLEXCAN3_ERFFEL6 (IMXRT_FLEXCAN3_ERXFIFO.offset018)
  3270. #define FLEXCAN3_ERFFEL7 (IMXRT_FLEXCAN3_ERXFIFO.offset01C)
  3271. #define FLEXCAN3_ERFFEL8 (IMXRT_FLEXCAN3_ERXFIFO.offset020)
  3272. #define FLEXCAN3_ERFFEL9 (IMXRT_FLEXCAN3_ERXFIFO.offset024)
  3273. #define FLEXCAN3_ERFFEL10 (IMXRT_FLEXCAN3_ERXFIFO.offset028)
  3274. #define FLEXCAN3_ERFFEL11 (IMXRT_FLEXCAN3_ERXFIFO.offset02C)
  3275. #define FLEXCAN3_ERFFEL12 (IMXRT_FLEXCAN3_ERXFIFO.offset030)
  3276. #define FLEXCAN3_ERFFEL13 (IMXRT_FLEXCAN3_ERXFIFO.offset034)
  3277. #define FLEXCAN3_ERFFEL14 (IMXRT_FLEXCAN3_ERXFIFO.offset038)
  3278. #define FLEXCAN3_ERFFEL15 (IMXRT_FLEXCAN3_ERXFIFO.offset03C)
  3279. #define FLEXCAN3_ERFFEL16 (IMXRT_FLEXCAN3_ERXFIFO.offset040)
  3280. #define FLEXCAN3_ERFFEL17 (IMXRT_FLEXCAN3_ERXFIFO.offset044)
  3281. #define FLEXCAN3_ERFFEL18 (IMXRT_FLEXCAN3_ERXFIFO.offset048)
  3282. #define FLEXCAN3_ERFFEL19 (IMXRT_FLEXCAN3_ERXFIFO.offset04C)
  3283. #define FLEXCAN3_ERFFEL20 (IMXRT_FLEXCAN3_ERXFIFO.offset050)
  3284. #define FLEXCAN3_ERFFEL21 (IMXRT_FLEXCAN3_ERXFIFO.offset054)
  3285. #define FLEXCAN3_ERFFEL22 (IMXRT_FLEXCAN3_ERXFIFO.offset058)
  3286. #define FLEXCAN3_ERFFEL23 (IMXRT_FLEXCAN3_ERXFIFO.offset05C)
  3287. #define FLEXCAN3_ERFFEL24 (IMXRT_FLEXCAN3_ERXFIFO.offset060)
  3288. #define FLEXCAN3_ERFFEL25 (IMXRT_FLEXCAN3_ERXFIFO.offset064)
  3289. #define FLEXCAN3_ERFFEL26 (IMXRT_FLEXCAN3_ERXFIFO.offset068)
  3290. #define FLEXCAN3_ERFFEL27 (IMXRT_FLEXCAN3_ERXFIFO.offset06C)
  3291. #define FLEXCAN3_ERFFEL28 (IMXRT_FLEXCAN3_ERXFIFO.offset070)
  3292. #define FLEXCAN3_ERFFEL29 (IMXRT_FLEXCAN3_ERXFIFO.offset074)
  3293. #define FLEXCAN3_ERFFEL30 (IMXRT_FLEXCAN3_ERXFIFO.offset078)
  3294. #define FLEXCAN3_ERFFEL31 (IMXRT_FLEXCAN3_ERXFIFO.offset07C)
  3295. #define FLEXCAN3_ERFFEL32 (IMXRT_FLEXCAN3_ERXFIFO.offset080)
  3296. #define FLEXCAN3_ERFFEL33 (IMXRT_FLEXCAN3_ERXFIFO.offset084)
  3297. #define FLEXCAN3_ERFFEL34 (IMXRT_FLEXCAN3_ERXFIFO.offset088)
  3298. #define FLEXCAN3_ERFFEL35 (IMXRT_FLEXCAN3_ERXFIFO.offset08C)
  3299. #define FLEXCAN3_ERFFEL36 (IMXRT_FLEXCAN3_ERXFIFO.offset090)
  3300. #define FLEXCAN3_ERFFEL37 (IMXRT_FLEXCAN3_ERXFIFO.offset094)
  3301. #define FLEXCAN3_ERFFEL38 (IMXRT_FLEXCAN3_ERXFIFO.offset098)
  3302. #define FLEXCAN3_ERFFEL39 (IMXRT_FLEXCAN3_ERXFIFO.offset09C)
  3303. #define FLEXCAN3_ERFFEL40 (IMXRT_FLEXCAN3_ERXFIFO.offset0A0)
  3304. #define FLEXCAN3_ERFFEL41 (IMXRT_FLEXCAN3_ERXFIFO.offset0A4)
  3305. #define FLEXCAN3_ERFFEL42 (IMXRT_FLEXCAN3_ERXFIFO.offset0A8)
  3306. #define FLEXCAN3_ERFFEL43 (IMXRT_FLEXCAN3_ERXFIFO.offset0AC)
  3307. #define FLEXCAN3_ERFFEL44 (IMXRT_FLEXCAN3_ERXFIFO.offset0B0)
  3308. #define FLEXCAN3_ERFFEL45 (IMXRT_FLEXCAN3_ERXFIFO.offset0B4)
  3309. #define FLEXCAN3_ERFFEL46 (IMXRT_FLEXCAN3_ERXFIFO.offset0B8)
  3310. #define FLEXCAN3_ERFFEL47 (IMXRT_FLEXCAN3_ERXFIFO.offset0BC)
  3311. #define FLEXCAN3_ERFFEL48 (IMXRT_FLEXCAN3_ERXFIFO.offset0C0)
  3312. #define FLEXCAN3_ERFFEL49 (IMXRT_FLEXCAN3_ERXFIFO.offset0C4)
  3313. #define FLEXCAN3_ERFFEL50 (IMXRT_FLEXCAN3_ERXFIFO.offset0C8)
  3314. #define FLEXCAN3_ERFFEL51 (IMXRT_FLEXCAN3_ERXFIFO.offset0CC)
  3315. #define FLEXCAN3_ERFFEL52 (IMXRT_FLEXCAN3_ERXFIFO.offset0D0)
  3316. #define FLEXCAN3_ERFFEL53 (IMXRT_FLEXCAN3_ERXFIFO.offset0D4)
  3317. #define FLEXCAN3_ERFFEL54 (IMXRT_FLEXCAN3_ERXFIFO.offset0D8)
  3318. #define FLEXCAN3_ERFFEL55 (IMXRT_FLEXCAN3_ERXFIFO.offset0DC)
  3319. #define FLEXCAN3_ERFFEL56 (IMXRT_FLEXCAN3_ERXFIFO.offset0E0)
  3320. #define FLEXCAN3_ERFFEL57 (IMXRT_FLEXCAN3_ERXFIFO.offset0E4)
  3321. #define FLEXCAN3_ERFFEL58 (IMXRT_FLEXCAN3_ERXFIFO.offset0E8)
  3322. #define FLEXCAN3_ERFFEL59 (IMXRT_FLEXCAN3_ERXFIFO.offset0EC)
  3323. #define FLEXCAN3_ERFFEL60 (IMXRT_FLEXCAN3_ERXFIFO.offset0F0)
  3324. #define FLEXCAN3_ERFFEL61 (IMXRT_FLEXCAN3_ERXFIFO.offset0F4)
  3325. #define FLEXCAN3_ERFFEL62 (IMXRT_FLEXCAN3_ERXFIFO.offset0F8)
  3326. #define FLEXCAN3_ERFFEL63 (IMXRT_FLEXCAN3_ERXFIFO.offset0FC)
  3327. #define FLEXCAN3_ERFFEL64 (IMXRT_FLEXCAN3_ERXFIFO.offset100)
  3328. #define FLEXCAN3_ERFFEL65 (IMXRT_FLEXCAN3_ERXFIFO.offset104)
  3329. #define FLEXCAN3_ERFFEL66 (IMXRT_FLEXCAN3_ERXFIFO.offset108)
  3330. #define FLEXCAN3_ERFFEL67 (IMXRT_FLEXCAN3_ERXFIFO.offset10C)
  3331. #define FLEXCAN3_ERFFEL68 (IMXRT_FLEXCAN3_ERXFIFO.offset110)
  3332. #define FLEXCAN3_ERFFEL69 (IMXRT_FLEXCAN3_ERXFIFO.offset114)
  3333. #define FLEXCAN3_ERFFEL70 (IMXRT_FLEXCAN3_ERXFIFO.offset118)
  3334. #define FLEXCAN3_ERFFEL71 (IMXRT_FLEXCAN3_ERXFIFO.offset11C)
  3335. #define FLEXCAN3_ERFFEL72 (IMXRT_FLEXCAN3_ERXFIFO.offset120)
  3336. #define FLEXCAN3_ERFFEL73 (IMXRT_FLEXCAN3_ERXFIFO.offset124)
  3337. #define FLEXCAN3_ERFFEL74 (IMXRT_FLEXCAN3_ERXFIFO.offset128)
  3338. #define FLEXCAN3_ERFFEL75 (IMXRT_FLEXCAN3_ERXFIFO.offset12C)
  3339. #define FLEXCAN3_ERFFEL76 (IMXRT_FLEXCAN3_ERXFIFO.offset130)
  3340. #define FLEXCAN3_ERFFEL77 (IMXRT_FLEXCAN3_ERXFIFO.offset134)
  3341. #define FLEXCAN3_ERFFEL78 (IMXRT_FLEXCAN3_ERXFIFO.offset138)
  3342. #define FLEXCAN3_ERFFEL79 (IMXRT_FLEXCAN3_ERXFIFO.offset13C)
  3343. #define FLEXCAN3_ERFFEL80 (IMXRT_FLEXCAN3_ERXFIFO.offset140)
  3344. #define FLEXCAN3_ERFFEL81 (IMXRT_FLEXCAN3_ERXFIFO.offset144)
  3345. #define FLEXCAN3_ERFFEL82 (IMXRT_FLEXCAN3_ERXFIFO.offset148)
  3346. #define FLEXCAN3_ERFFEL83 (IMXRT_FLEXCAN3_ERXFIFO.offset14C)
  3347. #define FLEXCAN3_ERFFEL84 (IMXRT_FLEXCAN3_ERXFIFO.offset150)
  3348. #define FLEXCAN3_ERFFEL85 (IMXRT_FLEXCAN3_ERXFIFO.offset154)
  3349. #define FLEXCAN3_ERFFEL86 (IMXRT_FLEXCAN3_ERXFIFO.offset158)
  3350. #define FLEXCAN3_ERFFEL87 (IMXRT_FLEXCAN3_ERXFIFO.offset15C)
  3351. #define FLEXCAN3_ERFFEL88 (IMXRT_FLEXCAN3_ERXFIFO.offset160)
  3352. #define FLEXCAN3_ERFFEL89 (IMXRT_FLEXCAN3_ERXFIFO.offset164)
  3353. #define FLEXCAN3_ERFFEL90 (IMXRT_FLEXCAN3_ERXFIFO.offset168)
  3354. #define FLEXCAN3_ERFFEL91 (IMXRT_FLEXCAN3_ERXFIFO.offset16C)
  3355. #define FLEXCAN3_ERFFEL92 (IMXRT_FLEXCAN3_ERXFIFO.offset170)
  3356. #define FLEXCAN3_ERFFEL93 (IMXRT_FLEXCAN3_ERXFIFO.offset174)
  3357. #define FLEXCAN3_ERFFEL94 (IMXRT_FLEXCAN3_ERXFIFO.offset178)
  3358. #define FLEXCAN3_ERFFEL95 (IMXRT_FLEXCAN3_ERXFIFO.offset17C)
  3359. #define FLEXCAN3_ERFFEL96 (IMXRT_FLEXCAN3_ERXFIFO.offset180)
  3360. #define FLEXCAN3_ERFFEL97 (IMXRT_FLEXCAN3_ERXFIFO.offset184)
  3361. #define FLEXCAN3_ERFFEL98 (IMXRT_FLEXCAN3_ERXFIFO.offset188)
  3362. #define FLEXCAN3_ERFFEL99 (IMXRT_FLEXCAN3_ERXFIFO.offset18C)
  3363. #define FLEXCAN3_ERFFEL100 (IMXRT_FLEXCAN3_ERXFIFO.offset190)
  3364. #define FLEXCAN3_ERFFEL101 (IMXRT_FLEXCAN3_ERXFIFO.offset194)
  3365. #define FLEXCAN3_ERFFEL102 (IMXRT_FLEXCAN3_ERXFIFO.offset198)
  3366. #define FLEXCAN3_ERFFEL103 (IMXRT_FLEXCAN3_ERXFIFO.offset19C)
  3367. #define FLEXCAN3_ERFFEL104 (IMXRT_FLEXCAN3_ERXFIFO.offset1A0)
  3368. #define FLEXCAN3_ERFFEL105 (IMXRT_FLEXCAN3_ERXFIFO.offset1A4)
  3369. #define FLEXCAN3_ERFFEL106 (IMXRT_FLEXCAN3_ERXFIFO.offset1A8)
  3370. #define FLEXCAN3_ERFFEL107 (IMXRT_FLEXCAN3_ERXFIFO.offset1AC)
  3371. #define FLEXCAN3_ERFFEL108 (IMXRT_FLEXCAN3_ERXFIFO.offset1B0)
  3372. #define FLEXCAN3_ERFFEL109 (IMXRT_FLEXCAN3_ERXFIFO.offset1B4)
  3373. #define FLEXCAN3_ERFFEL110 (IMXRT_FLEXCAN3_ERXFIFO.offset1B8)
  3374. #define FLEXCAN3_ERFFEL111 (IMXRT_FLEXCAN3_ERXFIFO.offset1BC)
  3375. #define FLEXCAN3_ERFFEL112 (IMXRT_FLEXCAN3_ERXFIFO.offset1C0)
  3376. #define FLEXCAN3_ERFFEL113 (IMXRT_FLEXCAN3_ERXFIFO.offset1C4)
  3377. #define FLEXCAN3_ERFFEL114 (IMXRT_FLEXCAN3_ERXFIFO.offset1C8)
  3378. #define FLEXCAN3_ERFFEL115 (IMXRT_FLEXCAN3_ERXFIFO.offset1CC)
  3379. #define FLEXCAN3_ERFFEL116 (IMXRT_FLEXCAN3_ERXFIFO.offset1D0)
  3380. #define FLEXCAN3_ERFFEL117 (IMXRT_FLEXCAN3_ERXFIFO.offset1D4)
  3381. #define FLEXCAN3_ERFFEL118 (IMXRT_FLEXCAN3_ERXFIFO.offset1D8)
  3382. #define FLEXCAN3_ERFFEL119 (IMXRT_FLEXCAN3_ERXFIFO.offset1DC)
  3383. #define FLEXCAN3_ERFFEL120 (IMXRT_FLEXCAN3_ERXFIFO.offset1E0)
  3384. #define FLEXCAN3_ERFFEL121 (IMXRT_FLEXCAN3_ERXFIFO.offset1E4)
  3385. #define FLEXCAN3_ERFFEL122 (IMXRT_FLEXCAN3_ERXFIFO.offset1E8)
  3386. #define FLEXCAN3_ERFFEL123 (IMXRT_FLEXCAN3_ERXFIFO.offset1EC)
  3387. #define FLEXCAN3_ERFFEL124 (IMXRT_FLEXCAN3_ERXFIFO.offset1F0)
  3388. #define FLEXCAN3_ERFFEL125 (IMXRT_FLEXCAN3_ERXFIFO.offset1F4)
  3389. #define FLEXCAN3_ERFFEL126 (IMXRT_FLEXCAN3_ERXFIFO.offset1F8)
  3390. #define FLEXCAN3_ERFFEL127 (IMXRT_FLEXCAN3_ERXFIFO.offset1FC)
  3391. // 27.3.1.1: page 1292
  3392. typedef struct {
  3393. const uint32_t VERID; // 0x00 (IMXRT_FLEXIO1.offset000)
  3394. volatile uint32_t PARAM; // 0x04 // (IMXRT_FLEXIO1.offset004)
  3395. volatile uint32_t CTRL; // 0x08(IMXRT_FLEXIO1.offset008)
  3396. volatile uint32_t PIN; // 0x0c (IMXRT_FLEXIO1.offset00C)
  3397. volatile uint32_t SHIFTSTAT; // 0x10 (IMXRT_FLEXIO1.offset010)
  3398. volatile uint32_t SHIFTERR; // 0x14(IMXRT_FLEXIO1.offset014)
  3399. volatile uint32_t TIMSTAT; // 0x18 (IMXRT_FLEXIO1.offset018)
  3400. const uint32_t UNUSED0; // 0x1c
  3401. volatile uint32_t SHIFTSIEN; // 0x20 (IMXRT_FLEXIO1.offset020)
  3402. volatile uint32_t SHIFTEIEN; // 0x24 (IMXRT_FLEXIO1.offset024)
  3403. volatile uint32_t TIMIEN; // 0x28 (IMXRT_FLEXIO1.offset028)
  3404. const uint32_t UNUSED1; // 0x2c
  3405. volatile uint32_t SHIFTSDEN; // 0x30 (IMXRT_FLEXIO1.offset030)
  3406. const uint32_t UNUSED2[3]; // 0x34 38 3C
  3407. volatile uint32_t SHIFTSTATE; // 0x40 (IMXRT_FLEXIO1.offset040)
  3408. const uint32_t UNUSED3[15]; // 0x44.. 50... 60... 70...
  3409. volatile uint32_t SHIFTCTL[4]; // 0x80 84 88 8C
  3410. const uint32_t UNUSED4[28]; // 0x90 - 0xfc
  3411. volatile uint32_t SHIFTCFG[4]; // 0x100 104 108 10C (IMXRT_FLEXIO1.offset100)
  3412. const uint32_t UNUSED5[60]; // 0x110 - 0x1FC
  3413. volatile uint32_t SHIFTBUF[4]; // 0x200 204 208 20c (IMXRT_FLEXIO1.offset200)
  3414. const uint32_t UNUSED6[28]; //
  3415. volatile uint32_t SHIFTBUFBIS[4]; // 0x280 // (IMXRT_FLEXIO1.offset280)
  3416. const uint32_t UNUSED7[28]; //
  3417. volatile uint32_t SHIFTBUFBYS[4]; // 0x300 (IMXRT_FLEXIO1.offset300)
  3418. const uint32_t UNUSED8[28]; //
  3419. volatile uint32_t SHIFTBUFBBS[4]; // 0x380 (IMXRT_FLEXIO1.offset380)
  3420. const uint32_t UNUSED9[28]; //
  3421. volatile uint32_t TIMCTL[4]; // 0x400
  3422. const uint32_t UNUSED10[28]; //
  3423. volatile uint32_t TIMCFG[4]; // 0x480
  3424. const uint32_t UNUSED11[28]; //
  3425. volatile uint32_t TIMCMP[4]; // 0x500
  3426. const uint32_t UNUSED12[28+64]; //
  3427. volatile uint32_t SHIFTBUFNBS[4]; // 0x680
  3428. const uint32_t UNUSED13[28]; //
  3429. volatile uint32_t SHIFTBUFHWS[4]; // 0x700
  3430. const uint32_t UNUSED14[28]; //
  3431. volatile uint32_t SHIFTBUFNIS[4]; // 0x780
  3432. } IMXRT_FLEXIO_t;
  3433. #define IMXRT_FLEXIO1_S (*(IMXRT_FLEXIO_t *)0x401AC000)
  3434. #define IMXRT_FLEXIO2_S (*(IMXRT_FLEXIO_t *)0x401B0000)
  3435. #define IMXRT_FLEXIO3_S (*(IMXRT_FLEXIO_t *)0x42020000)
  3436. #define IMXRT_FLEXIO1 (*(IMXRT_REGISTER32_t *)0x401AC000)
  3437. #define IMXRT_FLEXIO1_b (*(IMXRT_REGISTER32_t *)0x401AC400)
  3438. #define FLEXIO1_VERID (IMXRT_FLEXIO1.offset000)
  3439. #define FLEXIO1_PARAM (IMXRT_FLEXIO1.offset004)
  3440. #define FLEXIO1_CTRL (IMXRT_FLEXIO1.offset008)
  3441. #define FLEXIO1_PIN (IMXRT_FLEXIO1.offset00C)
  3442. #define FLEXIO1_SHIFTSTAT (IMXRT_FLEXIO1.offset010)
  3443. #define FLEXIO1_SHIFTERR (IMXRT_FLEXIO1.offset014)
  3444. #define FLEXIO1_TIMSTAT (IMXRT_FLEXIO1.offset018)
  3445. #define FLEXIO1_SHIFTSIEN (IMXRT_FLEXIO1.offset020)
  3446. #define FLEXIO1_SHIFTEIEN (IMXRT_FLEXIO1.offset024)
  3447. #define FLEXIO1_TIMIEN (IMXRT_FLEXIO1.offset028)
  3448. #define FLEXIO1_SHIFTSDEN (IMXRT_FLEXIO1.offset030)
  3449. #define FLEXIO1_SHIFTSTATE (IMXRT_FLEXIO1.offset040)
  3450. #define FLEXIO1_SHIFTCTL0 (IMXRT_FLEXIO1.offset080)
  3451. #define FLEXIO1_SHIFTCTL1 (IMXRT_FLEXIO1.offset084)
  3452. #define FLEXIO1_SHIFTCTL2 (IMXRT_FLEXIO1.offset088)
  3453. #define FLEXIO1_SHIFTCTL3 (IMXRT_FLEXIO1.offset08C)
  3454. #define FLEXIO1_SHIFTCFG0 (IMXRT_FLEXIO1.offset100)
  3455. #define FLEXIO1_SHIFTCFG1 (IMXRT_FLEXIO1.offset104)
  3456. #define FLEXIO1_SHIFTCFG2 (IMXRT_FLEXIO1.offset108)
  3457. #define FLEXIO1_SHIFTCFG3 (IMXRT_FLEXIO1.offset10C)
  3458. #define FLEXIO1_SHIFTBUF0 (IMXRT_FLEXIO1.offset200)
  3459. #define FLEXIO1_SHIFTBUF1 (IMXRT_FLEXIO1.offset204)
  3460. #define FLEXIO1_SHIFTBUF2 (IMXRT_FLEXIO1.offset208)
  3461. #define FLEXIO1_SHIFTBUF3 (IMXRT_FLEXIO1.offset20C)
  3462. #define FLEXIO1_SHIFTBUFBIS0 (IMXRT_FLEXIO1.offset280)
  3463. #define FLEXIO1_SHIFTBUFBIS1 (IMXRT_FLEXIO1.offset284)
  3464. #define FLEXIO1_SHIFTBUFBIS2 (IMXRT_FLEXIO1.offset288)
  3465. #define FLEXIO1_SHIFTBUFBIS3 (IMXRT_FLEXIO1.offset28C)
  3466. #define FLEXIO1_SHIFTBUFBYS0 (IMXRT_FLEXIO1.offset300)
  3467. #define FLEXIO1_SHIFTBUFBYS1 (IMXRT_FLEXIO1.offset304)
  3468. #define FLEXIO1_SHIFTBUFBYS2 (IMXRT_FLEXIO1.offset308)
  3469. #define FLEXIO1_SHIFTBUFBYS3 (IMXRT_FLEXIO1.offset30C)
  3470. #define FLEXIO1_SHIFTBUFBBS0 (IMXRT_FLEXIO1.offset380)
  3471. #define FLEXIO1_SHIFTBUFBBS1 (IMXRT_FLEXIO1.offset384)
  3472. #define FLEXIO1_SHIFTBUFBBS2 (IMXRT_FLEXIO1.offset388)
  3473. #define FLEXIO1_SHIFTBUFBBS3 (IMXRT_FLEXIO1.offset38C)
  3474. #define FLEXIO1_TIMCTL0 (IMXRT_FLEXIO1_b.offset000)
  3475. #define FLEXIO1_TIMCTL1 (IMXRT_FLEXIO1_b.offset004)
  3476. #define FLEXIO1_TIMCTL2 (IMXRT_FLEXIO1_b.offset008)
  3477. #define FLEXIO1_TIMCTL3 (IMXRT_FLEXIO1_b.offset00C)
  3478. #define FLEXIO1_TIMCFG0 (IMXRT_FLEXIO1_b.offset080)
  3479. #define FLEXIO1_TIMCFG1 (IMXRT_FLEXIO1_b.offset084)
  3480. #define FLEXIO1_TIMCFG2 (IMXRT_FLEXIO1_b.offset088)
  3481. #define FLEXIO1_TIMCFG3 (IMXRT_FLEXIO1_b.offset08C)
  3482. #define FLEXIO1_TIMCMP0 (IMXRT_FLEXIO1_b.offset100)
  3483. #define FLEXIO1_TIMCMP1 (IMXRT_FLEXIO1_b.offset104)
  3484. #define FLEXIO1_TIMCMP2 (IMXRT_FLEXIO1_b.offset108)
  3485. #define FLEXIO1_TIMCMP3 (IMXRT_FLEXIO1_b.offset10C)
  3486. #define FLEXIO1_SHIFTBUFNBS0 (IMXRT_FLEXIO1_b.offset280)
  3487. #define FLEXIO1_SHIFTBUFNBS1 (IMXRT_FLEXIO1_b.offset284)
  3488. #define FLEXIO1_SHIFTBUFNBS2 (IMXRT_FLEXIO1_b.offset288)
  3489. #define FLEXIO1_SHIFTBUFNBS3 (IMXRT_FLEXIO1_b.offset28C)
  3490. #define FLEXIO1_SHIFTBUFHWS0 (IMXRT_FLEXIO1_b.offset300)
  3491. #define FLEXIO1_SHIFTBUFHWS1 (IMXRT_FLEXIO1_b.offset304)
  3492. #define FLEXIO1_SHIFTBUFHWS2 (IMXRT_FLEXIO1_b.offset308)
  3493. #define FLEXIO1_SHIFTBUFHWS3 (IMXRT_FLEXIO1_b.offset30C)
  3494. #define FLEXIO1_SHIFTBUFNIS0 (IMXRT_FLEXIO1_b.offset380)
  3495. #define FLEXIO1_SHIFTBUFNIS1 (IMXRT_FLEXIO1_b.offset384)
  3496. #define FLEXIO1_SHIFTBUFNIS2 (IMXRT_FLEXIO1_b.offset388)
  3497. #define FLEXIO1_SHIFTBUFNIS3 (IMXRT_FLEXIO1_b.offset38C)
  3498. #define IMXRT_FLEXIO2 (*(IMXRT_REGISTER32_t *)0x401B0000)
  3499. #define IMXRT_FLEXIO2_b (*(IMXRT_REGISTER32_t *)0x401B0400)
  3500. #define FLEXIO2_VERID (IMXRT_FLEXIO2.offset000)
  3501. #define FLEXIO2_PARAM (IMXRT_FLEXIO2.offset004)
  3502. #define FLEXIO2_CTRL (IMXRT_FLEXIO2.offset008)
  3503. #define FLEXIO2_PIN (IMXRT_FLEXIO2.offset00C)
  3504. #define FLEXIO2_SHIFTSTAT (IMXRT_FLEXIO2.offset010)
  3505. #define FLEXIO2_SHIFTERR (IMXRT_FLEXIO2.offset014)
  3506. #define FLEXIO2_TIMSTAT (IMXRT_FLEXIO2.offset018)
  3507. #define FLEXIO2_SHIFTSIEN (IMXRT_FLEXIO2.offset020)
  3508. #define FLEXIO2_SHIFTEIEN (IMXRT_FLEXIO2.offset024)
  3509. #define FLEXIO2_TIMIEN (IMXRT_FLEXIO2.offset028)
  3510. #define FLEXIO2_SHIFTSDEN (IMXRT_FLEXIO2.offset030)
  3511. #define FLEXIO2_SHIFTSTATE (IMXRT_FLEXIO2.offset040)
  3512. #define FLEXIO2_SHIFTCTL0 (IMXRT_FLEXIO2.offset080)
  3513. #define FLEXIO2_SHIFTCTL1 (IMXRT_FLEXIO2.offset084)
  3514. #define FLEXIO2_SHIFTCTL2 (IMXRT_FLEXIO2.offset088)
  3515. #define FLEXIO2_SHIFTCTL3 (IMXRT_FLEXIO2.offset08C)
  3516. #define FLEXIO2_SHIFTCFG0 (IMXRT_FLEXIO2.offset100)
  3517. #define FLEXIO2_SHIFTCFG1 (IMXRT_FLEXIO2.offset104)
  3518. #define FLEXIO2_SHIFTCFG2 (IMXRT_FLEXIO2.offset108)
  3519. #define FLEXIO2_SHIFTCFG3 (IMXRT_FLEXIO2.offset10C)
  3520. #define FLEXIO2_SHIFTBUF0 (IMXRT_FLEXIO2.offset200)
  3521. #define FLEXIO2_SHIFTBUF1 (IMXRT_FLEXIO2.offset204)
  3522. #define FLEXIO2_SHIFTBUF2 (IMXRT_FLEXIO2.offset208)
  3523. #define FLEXIO2_SHIFTBUF3 (IMXRT_FLEXIO2.offset20C)
  3524. #define FLEXIO2_SHIFTBUFBIS0 (IMXRT_FLEXIO2.offset280)
  3525. #define FLEXIO2_SHIFTBUFBIS1 (IMXRT_FLEXIO2.offset284)
  3526. #define FLEXIO2_SHIFTBUFBIS2 (IMXRT_FLEXIO2.offset288)
  3527. #define FLEXIO2_SHIFTBUFBIS3 (IMXRT_FLEXIO2.offset28C)
  3528. #define FLEXIO2_SHIFTBUFBYS0 (IMXRT_FLEXIO2.offset300)
  3529. #define FLEXIO2_SHIFTBUFBYS1 (IMXRT_FLEXIO2.offset304)
  3530. #define FLEXIO2_SHIFTBUFBYS2 (IMXRT_FLEXIO2.offset308)
  3531. #define FLEXIO2_SHIFTBUFBYS3 (IMXRT_FLEXIO2.offset30C)
  3532. #define FLEXIO2_SHIFTBUFBBS0 (IMXRT_FLEXIO2.offset380)
  3533. #define FLEXIO2_SHIFTBUFBBS1 (IMXRT_FLEXIO2.offset384)
  3534. #define FLEXIO2_SHIFTBUFBBS2 (IMXRT_FLEXIO2.offset388)
  3535. #define FLEXIO2_SHIFTBUFBBS3 (IMXRT_FLEXIO2.offset38C)
  3536. #define FLEXIO2_TIMCTL0 (IMXRT_FLEXIO2_b.offset000)
  3537. #define FLEXIO2_TIMCTL1 (IMXRT_FLEXIO2_b.offset004)
  3538. #define FLEXIO2_TIMCTL2 (IMXRT_FLEXIO2_b.offset008)
  3539. #define FLEXIO2_TIMCTL3 (IMXRT_FLEXIO2_b.offset00C)
  3540. #define FLEXIO2_TIMCFG0 (IMXRT_FLEXIO2_b.offset080)
  3541. #define FLEXIO2_TIMCFG1 (IMXRT_FLEXIO2_b.offset084)
  3542. #define FLEXIO2_TIMCFG2 (IMXRT_FLEXIO2_b.offset088)
  3543. #define FLEXIO2_TIMCFG3 (IMXRT_FLEXIO2_b.offset08C)
  3544. #define FLEXIO2_TIMCMP0 (IMXRT_FLEXIO2_b.offset100)
  3545. #define FLEXIO2_TIMCMP1 (IMXRT_FLEXIO2_b.offset104)
  3546. #define FLEXIO2_TIMCMP2 (IMXRT_FLEXIO2_b.offset108)
  3547. #define FLEXIO2_TIMCMP3 (IMXRT_FLEXIO2_b.offset10C)
  3548. #define FLEXIO2_SHIFTBUFNBS0 (IMXRT_FLEXIO2_b.offset280)
  3549. #define FLEXIO2_SHIFTBUFNBS1 (IMXRT_FLEXIO2_b.offset284)
  3550. #define FLEXIO2_SHIFTBUFNBS2 (IMXRT_FLEXIO2_b.offset288)
  3551. #define FLEXIO2_SHIFTBUFNBS3 (IMXRT_FLEXIO2_b.offset28C)
  3552. #define FLEXIO2_SHIFTBUFHWS0 (IMXRT_FLEXIO2_b.offset300)
  3553. #define FLEXIO2_SHIFTBUFHWS1 (IMXRT_FLEXIO2_b.offset304)
  3554. #define FLEXIO2_SHIFTBUFHWS2 (IMXRT_FLEXIO2_b.offset308)
  3555. #define FLEXIO2_SHIFTBUFHWS3 (IMXRT_FLEXIO2_b.offset30C)
  3556. #define FLEXIO2_SHIFTBUFNIS0 (IMXRT_FLEXIO2_b.offset380)
  3557. #define FLEXIO2_SHIFTBUFNIS1 (IMXRT_FLEXIO2_b.offset384)
  3558. #define FLEXIO2_SHIFTBUFNIS2 (IMXRT_FLEXIO2_b.offset388)
  3559. #define FLEXIO2_SHIFTBUFNIS3 (IMXRT_FLEXIO2_b.offset38C)
  3560. // FLEXIO3 only present in RT1062
  3561. #define IMXRT_FLEXIO3 (*(IMXRT_REGISTER32_t *)0x42020000)
  3562. #define IMXRT_FLEXIO3_b (*(IMXRT_REGISTER32_t *)0x42020400)
  3563. #define FLEXIO3_VERID (IMXRT_FLEXIO3.offset000)
  3564. #define FLEXIO3_PARAM (IMXRT_FLEXIO3.offset004)
  3565. #define FLEXIO3_CTRL (IMXRT_FLEXIO3.offset008)
  3566. #define FLEXIO3_PIN (IMXRT_FLEXIO3.offset00C)
  3567. #define FLEXIO3_SHIFTSTAT (IMXRT_FLEXIO3.offset010)
  3568. #define FLEXIO3_SHIFTERR (IMXRT_FLEXIO3.offset014)
  3569. #define FLEXIO3_TIMSTAT (IMXRT_FLEXIO3.offset018)
  3570. #define FLEXIO3_SHIFTSIEN (IMXRT_FLEXIO3.offset020)
  3571. #define FLEXIO3_SHIFTEIEN (IMXRT_FLEXIO3.offset024)
  3572. #define FLEXIO3_TIMIEN (IMXRT_FLEXIO3.offset028)
  3573. #define FLEXIO3_SHIFTSDEN (IMXRT_FLEXIO3.offset030)
  3574. #define FLEXIO3_SHIFTSTATE (IMXRT_FLEXIO3.offset040)
  3575. #define FLEXIO3_SHIFTCTL0 (IMXRT_FLEXIO3.offset080)
  3576. #define FLEXIO3_SHIFTCTL1 (IMXRT_FLEXIO3.offset084)
  3577. #define FLEXIO3_SHIFTCTL2 (IMXRT_FLEXIO3.offset088)
  3578. #define FLEXIO3_SHIFTCTL3 (IMXRT_FLEXIO3.offset08C)
  3579. #define FLEXIO3_SHIFTCFG0 (IMXRT_FLEXIO3.offset100)
  3580. #define FLEXIO3_SHIFTCFG1 (IMXRT_FLEXIO3.offset104)
  3581. #define FLEXIO3_SHIFTCFG2 (IMXRT_FLEXIO3.offset108)
  3582. #define FLEXIO3_SHIFTCFG3 (IMXRT_FLEXIO3.offset10C)
  3583. #define FLEXIO3_SHIFTBUF0 (IMXRT_FLEXIO3.offset200)
  3584. #define FLEXIO3_SHIFTBUF1 (IMXRT_FLEXIO3.offset204)
  3585. #define FLEXIO3_SHIFTBUF2 (IMXRT_FLEXIO3.offset208)
  3586. #define FLEXIO3_SHIFTBUF3 (IMXRT_FLEXIO3.offset20C)
  3587. #define FLEXIO3_SHIFTBUFBIS0 (IMXRT_FLEXIO3.offset280)
  3588. #define FLEXIO3_SHIFTBUFBIS1 (IMXRT_FLEXIO3.offset284)
  3589. #define FLEXIO3_SHIFTBUFBIS2 (IMXRT_FLEXIO3.offset288)
  3590. #define FLEXIO3_SHIFTBUFBIS3 (IMXRT_FLEXIO3.offset28C)
  3591. #define FLEXIO3_SHIFTBUFBYS0 (IMXRT_FLEXIO3.offset300)
  3592. #define FLEXIO3_SHIFTBUFBYS1 (IMXRT_FLEXIO3.offset304)
  3593. #define FLEXIO3_SHIFTBUFBYS2 (IMXRT_FLEXIO3.offset308)
  3594. #define FLEXIO3_SHIFTBUFBYS3 (IMXRT_FLEXIO3.offset30C)
  3595. #define FLEXIO3_SHIFTBUFBBS0 (IMXRT_FLEXIO3.offset380)
  3596. #define FLEXIO3_SHIFTBUFBBS1 (IMXRT_FLEXIO3.offset384)
  3597. #define FLEXIO3_SHIFTBUFBBS2 (IMXRT_FLEXIO3.offset388)
  3598. #define FLEXIO3_SHIFTBUFBBS3 (IMXRT_FLEXIO3.offset38C)
  3599. #define FLEXIO3_TIMCTL0 (IMXRT_FLEXIO3_b.offset000)
  3600. #define FLEXIO3_TIMCTL1 (IMXRT_FLEXIO3_b.offset004)
  3601. #define FLEXIO3_TIMCTL2 (IMXRT_FLEXIO3_b.offset008)
  3602. #define FLEXIO3_TIMCTL3 (IMXRT_FLEXIO3_b.offset00C)
  3603. #define FLEXIO3_TIMCFG0 (IMXRT_FLEXIO3_b.offset080)
  3604. #define FLEXIO3_TIMCFG1 (IMXRT_FLEXIO3_b.offset084)
  3605. #define FLEXIO3_TIMCFG2 (IMXRT_FLEXIO3_b.offset088)
  3606. #define FLEXIO3_TIMCFG3 (IMXRT_FLEXIO3_b.offset08C)
  3607. #define FLEXIO3_TIMCMP0 (IMXRT_FLEXIO3_b.offset100)
  3608. #define FLEXIO3_TIMCMP1 (IMXRT_FLEXIO3_b.offset104)
  3609. #define FLEXIO3_TIMCMP2 (IMXRT_FLEXIO3_b.offset108)
  3610. #define FLEXIO3_TIMCMP3 (IMXRT_FLEXIO3_b.offset10C)
  3611. #define FLEXIO3_SHIFTBUFNBS0 (IMXRT_FLEXIO3_b.offset280)
  3612. #define FLEXIO3_SHIFTBUFNBS1 (IMXRT_FLEXIO3_b.offset284)
  3613. #define FLEXIO3_SHIFTBUFNBS2 (IMXRT_FLEXIO3_b.offset288)
  3614. #define FLEXIO3_SHIFTBUFNBS3 (IMXRT_FLEXIO3_b.offset28C)
  3615. #define FLEXIO3_SHIFTBUFHWS0 (IMXRT_FLEXIO3_b.offset300)
  3616. #define FLEXIO3_SHIFTBUFHWS1 (IMXRT_FLEXIO3_b.offset304)
  3617. #define FLEXIO3_SHIFTBUFHWS2 (IMXRT_FLEXIO3_b.offset308)
  3618. #define FLEXIO3_SHIFTBUFHWS3 (IMXRT_FLEXIO3_b.offset30C)
  3619. #define FLEXIO3_SHIFTBUFNIS0 (IMXRT_FLEXIO3_b.offset380)
  3620. #define FLEXIO3_SHIFTBUFNIS1 (IMXRT_FLEXIO3_b.offset384)
  3621. #define FLEXIO3_SHIFTBUFNIS2 (IMXRT_FLEXIO3_b.offset388)
  3622. #define FLEXIO3_SHIFTBUFNIS3 (IMXRT_FLEXIO3_b.offset38C)
  3623. #define FLEXIO_CTRL_DOZEN ((uint32_t)(1<<31))
  3624. #define FLEXIO_CTRL_DBGE ((uint32_t)(1<<30))
  3625. #define FLEXIO_CTRL_FASTACC ((uint32_t)(1<<2))
  3626. #define FLEXIO_CTRL_SWRST ((uint32_t)(1<<1))
  3627. #define FLEXIO_CTRL_FLEXEN ((uint32_t)(1<<0))
  3628. #define FLEXIO_SHIFTCTL_TIMSEL(n) ((uint32_t)(((n) & 0x03) << 24))
  3629. #define FLEXIO_SHIFTCTL_TIMPOL ((uint32_t)(1<<23))
  3630. #define FLEXIO_SHIFTCTL_PINCFG(n) ((uint32_t)(((n) & 0x03) << 16))
  3631. #define FLEXIO_SHIFTCTL_PINSEL(n) ((uint32_t)(((n) & 0x1F) << 8))
  3632. #define FLEXIO_SHIFTCTL_PINPOL ((uint32_t)(1<<7))
  3633. #define FLEXIO_SHIFTCTL_SMOD(n) ((uint32_t)(((n) & 0x07) << 0))
  3634. #define FLEXIO_SHIFTCFG_PWIDTH(n) ((uint32_t)(((n) & 0x1F) << 16))
  3635. #define FLEXIO_SHIFTCFG_INSRC ((uint32_t)(1<<8))
  3636. #define FLEXIO_SHIFTCFG_SSTOP(n) ((uint32_t)(((n) & 0x03) << 4))
  3637. #define FLEXIO_SHIFTCFG_SSTART(n) ((uint32_t)(((n) & 0x03) << 0))
  3638. #define FLEXIO_TIMCTL_TRGSEL(n) ((uint32_t)(((n) & 0x3F) << 24))
  3639. #define FLEXIO_TIMCTL_TRGPOL ((uint32_t)(1<<23))
  3640. #define FLEXIO_TIMCTL_TRGSRC ((uint32_t)(1<<22))
  3641. #define FLEXIO_TIMCTL_PINCFG(n) ((uint32_t)(((n) & 0x03) << 16))
  3642. #define FLEXIO_TIMCTL_PINSEL(n) ((uint32_t)(((n) & 0x1F) << 8))
  3643. #define FLEXIO_TIMCTL_PINPOL ((uint32_t)(1<<7))
  3644. #define FLEXIO_TIMCTL_TIMOD(n) ((uint32_t)(((n) & 0x03) << 0))
  3645. #define FLEXIO_TIMCFG_TIMOUT(n) ((uint32_t)(((n) & 0x03) << 24))
  3646. #define FLEXIO_TIMCFG_TIMDEC(n) ((uint32_t)(((n) & 0x03) << 20))
  3647. #define FLEXIO_TIMCFG_TIMRST(n) ((uint32_t)(((n) & 0x07) << 16))
  3648. #define FLEXIO_TIMCFG_TIMDIS(n) ((uint32_t)(((n) & 0x07) << 12))
  3649. #define FLEXIO_TIMCFG_TIMENA(n) ((uint32_t)(((n) & 0x07) << 8))
  3650. #define FLEXIO_TIMCFG_TSTOP(n) ((uint32_t)(((n) & 0x03) << 4))
  3651. #define FLEXIO_TIMCFG_TSTART ((uint32_t)(1<<1))
  3652. // 28.4.1: page 1354
  3653. typedef struct {
  3654. struct {
  3655. volatile uint16_t CNT;
  3656. volatile uint16_t INIT;
  3657. volatile uint16_t CTRL2;
  3658. volatile uint16_t CTRL;
  3659. volatile uint16_t unused1;
  3660. volatile uint16_t VAL0;
  3661. volatile uint16_t FRACVAL1;
  3662. volatile uint16_t VAL1;
  3663. volatile uint16_t FRACVAL2;
  3664. volatile uint16_t VAL2;
  3665. volatile uint16_t FRACVAL3;
  3666. volatile uint16_t VAL3;
  3667. volatile uint16_t FRACVAL4;
  3668. volatile uint16_t VAL4;
  3669. volatile uint16_t FRACVAL5;
  3670. volatile uint16_t VAL5;
  3671. volatile uint16_t FRCTRL;
  3672. volatile uint16_t OCTRL;
  3673. volatile uint16_t STS;
  3674. volatile uint16_t INTEN;
  3675. volatile uint16_t DMAEN;
  3676. volatile uint16_t TCTRL;
  3677. volatile uint16_t DISMAP0;
  3678. volatile uint16_t DISMAP1;
  3679. volatile uint16_t DTCNT0;
  3680. volatile uint16_t DTCNT1;
  3681. volatile uint16_t CAPTCTRLA;
  3682. volatile uint16_t CAPTCOMPA;
  3683. volatile uint16_t CAPTCTRLB;
  3684. volatile uint16_t CAPTCOMPB;
  3685. volatile uint16_t CAPTCTRLX;
  3686. volatile uint16_t CAPTCOMPX;
  3687. volatile uint16_t CVAL0;
  3688. volatile uint16_t CVAL0CYC;
  3689. volatile uint16_t CVAL1;
  3690. volatile uint16_t CVAL1CYC;
  3691. volatile uint16_t CVAL2;
  3692. volatile uint16_t CVAL2CYC;
  3693. volatile uint16_t CVAL3;
  3694. volatile uint16_t CVAL3CYC;
  3695. volatile uint16_t CVAL4;
  3696. volatile uint16_t CVAL4CYC;
  3697. volatile uint16_t CVAL5;
  3698. volatile uint16_t CVAL5CYC;
  3699. volatile uint16_t unused2;
  3700. volatile uint16_t unused3;
  3701. volatile uint16_t unused4;
  3702. volatile uint16_t unused5;
  3703. } SM[4];
  3704. volatile uint16_t OUTEN;
  3705. volatile uint16_t MASK;
  3706. volatile uint16_t SWCOUT;
  3707. volatile uint16_t DTSRCSEL;
  3708. volatile uint16_t MCTRL;
  3709. volatile uint16_t MCTRL2;
  3710. volatile uint16_t FCTRL0;
  3711. volatile uint16_t FSTS0;
  3712. volatile uint16_t FFILT0;
  3713. volatile uint16_t FTST0;
  3714. volatile uint16_t FCTRL20;
  3715. } IMXRT_FLEXPWM_t;
  3716. #define IMXRT_FLEXPWM1 (*(IMXRT_FLEXPWM_t *)0x403DC000)
  3717. #define IMXRT_FLEXPWM2 (*(IMXRT_FLEXPWM_t *)0x403E0000)
  3718. #define IMXRT_FLEXPWM3 (*(IMXRT_FLEXPWM_t *)0x403E4000)
  3719. #define IMXRT_FLEXPWM4 (*(IMXRT_FLEXPWM_t *)0x403E8000)
  3720. #define FLEXPWM1_SM0CNT (IMXRT_FLEXPWM1.SM[0].CNT)
  3721. #define FLEXPWM1_SM0INIT (IMXRT_FLEXPWM1.SM[0].INIT)
  3722. #define FLEXPWM1_SM0CTRL2 (IMXRT_FLEXPWM1.SM[0].CTRL2)
  3723. #define FLEXPWM1_SM0CTRL (IMXRT_FLEXPWM1.SM[0].CTRL)
  3724. #define FLEXPWM1_SM0VAL0 (IMXRT_FLEXPWM1.SM[0].VAL0)
  3725. #define FLEXPWM1_SM0FRACVAL1 (IMXRT_FLEXPWM1.SM[0].FRACVAL1)
  3726. #define FLEXPWM1_SM0VAL1 (IMXRT_FLEXPWM1.SM[0].VAL1)
  3727. #define FLEXPWM1_SM0FRACVAL2 (IMXRT_FLEXPWM1.SM[0].FRACVAL2)
  3728. #define FLEXPWM1_SM0VAL2 (IMXRT_FLEXPWM1.SM[0].VAL2)
  3729. #define FLEXPWM1_SM0FRACVAL3 (IMXRT_FLEXPWM1.SM[0].FRACVAL3)
  3730. #define FLEXPWM1_SM0VAL3 (IMXRT_FLEXPWM1.SM[0].VAL3)
  3731. #define FLEXPWM1_SM0FRACVAL4 (IMXRT_FLEXPWM1.SM[0].FRACVAL4)
  3732. #define FLEXPWM1_SM0VAL4 (IMXRT_FLEXPWM1.SM[0].VAL4)
  3733. #define FLEXPWM1_SM0FRACVAL5 (IMXRT_FLEXPWM1.SM[0].FRACVAL5)
  3734. #define FLEXPWM1_SM0VAL5 (IMXRT_FLEXPWM1.SM[0].VAL5)
  3735. #define FLEXPWM1_SM0FRCTRL (IMXRT_FLEXPWM1.SM[0].FRCTRL)
  3736. #define FLEXPWM1_SM0OCTRL (IMXRT_FLEXPWM1.SM[0].OCTRL)
  3737. #define FLEXPWM1_SM0STS (IMXRT_FLEXPWM1.SM[0].STS)
  3738. #define FLEXPWM1_SM0INTEN (IMXRT_FLEXPWM1.SM[0].INTEN)
  3739. #define FLEXPWM1_SM0DMAEN (IMXRT_FLEXPWM1.SM[0].DMAEN)
  3740. #define FLEXPWM1_SM0TCTRL (IMXRT_FLEXPWM1.SM[0].TCTRL)
  3741. #define FLEXPWM1_SM0DISMAP0 (IMXRT_FLEXPWM1.SM[0].DISMAP0)
  3742. #define FLEXPWM1_SM0DISMAP1 (IMXRT_FLEXPWM1.SM[0].DISMAP1)
  3743. #define FLEXPWM1_SM0DTCNT0 (IMXRT_FLEXPWM1.SM[0].DTCNT0)
  3744. #define FLEXPWM1_SM0DTCNT1 (IMXRT_FLEXPWM1.SM[0].DTCNT1)
  3745. #define FLEXPWM1_SM0CAPTCTRLA (IMXRT_FLEXPWM1.SM[0].CAPTCTRLA)
  3746. #define FLEXPWM1_SM0CAPTCOMPA (IMXRT_FLEXPWM1.SM[0].CAPTCOMPA)
  3747. #define FLEXPWM1_SM0CAPTCTRLB (IMXRT_FLEXPWM1.SM[0].CAPTCTRLB)
  3748. #define FLEXPWM1_SM0CAPTCOMPB (IMXRT_FLEXPWM1.SM[0].CAPTCOMPB)
  3749. #define FLEXPWM1_SM0CAPTCTRLX (IMXRT_FLEXPWM1.SM[0].CAPTCTRLX)
  3750. #define FLEXPWM1_SM0CAPTCOMPX (IMXRT_FLEXPWM1.SM[0].CAPTCOMPX)
  3751. #define FLEXPWM1_SM0CVAL0 (IMXRT_FLEXPWM1.SM[0].CVAL0)
  3752. #define FLEXPWM1_SM0CVAL0CYC (IMXRT_FLEXPWM1.SM[0].CVAL0CYC)
  3753. #define FLEXPWM1_SM0CVAL1 (IMXRT_FLEXPWM1.SM[0].CVAL1)
  3754. #define FLEXPWM1_SM0CVAL1CYC (IMXRT_FLEXPWM1.SM[0].CVAL1CYC)
  3755. #define FLEXPWM1_SM0CVAL2 (IMXRT_FLEXPWM1.SM[0].CVAL2)
  3756. #define FLEXPWM1_SM0CVAL2CYC (IMXRT_FLEXPWM1.SM[0].CVAL2CYC)
  3757. #define FLEXPWM1_SM0CVAL3 (IMXRT_FLEXPWM1.SM[0].CVAL3)
  3758. #define FLEXPWM1_SM0CVAL3CYC (IMXRT_FLEXPWM1.SM[0].CVAL3CYC)
  3759. #define FLEXPWM1_SM0CVAL4 (IMXRT_FLEXPWM1.SM[0].CVAL4)
  3760. #define FLEXPWM1_SM0CVAL4CYC (IMXRT_FLEXPWM1.SM[0].CVAL4CYC)
  3761. #define FLEXPWM1_SM0CVAL5 (IMXRT_FLEXPWM1.SM[0].CVAL5)
  3762. #define FLEXPWM1_SM0CVAL5CYC (IMXRT_FLEXPWM1.SM[0].CVAL5CYC)
  3763. #define FLEXPWM1_SM1CNT (IMXRT_FLEXPWM1.SM[1].CNT)
  3764. #define FLEXPWM1_SM1INIT (IMXRT_FLEXPWM1.SM[1].INIT)
  3765. #define FLEXPWM1_SM1CTRL2 (IMXRT_FLEXPWM1.SM[1].CTRL2)
  3766. #define FLEXPWM1_SM1CTRL (IMXRT_FLEXPWM1.SM[1].CTRL)
  3767. #define FLEXPWM1_SM1VAL0 (IMXRT_FLEXPWM1.SM[1].VAL0)
  3768. #define FLEXPWM1_SM1FRACVAL1 (IMXRT_FLEXPWM1.SM[1].FRACVAL1)
  3769. #define FLEXPWM1_SM1VAL1 (IMXRT_FLEXPWM1.SM[1].VAL1)
  3770. #define FLEXPWM1_SM1FRACVAL2 (IMXRT_FLEXPWM1.SM[1].FRACVAL2)
  3771. #define FLEXPWM1_SM1VAL2 (IMXRT_FLEXPWM1.SM[1].VAL2)
  3772. #define FLEXPWM1_SM1FRACVAL3 (IMXRT_FLEXPWM1.SM[1].FRACVAL3)
  3773. #define FLEXPWM1_SM1VAL3 (IMXRT_FLEXPWM1.SM[1].VAL3)
  3774. #define FLEXPWM1_SM1FRACVAL4 (IMXRT_FLEXPWM1.SM[1].FRACVAL4)
  3775. #define FLEXPWM1_SM1VAL4 (IMXRT_FLEXPWM1.SM[1].VAL4)
  3776. #define FLEXPWM1_SM1FRACVAL5 (IMXRT_FLEXPWM1.SM[1].FRACVAL5)
  3777. #define FLEXPWM1_SM1VAL5 (IMXRT_FLEXPWM1.SM[1].VAL5)
  3778. #define FLEXPWM1_SM1FRCTRL (IMXRT_FLEXPWM1.SM[1].FRCTRL)
  3779. #define FLEXPWM1_SM1OCTRL (IMXRT_FLEXPWM1.SM[1].OCTRL)
  3780. #define FLEXPWM1_SM1STS (IMXRT_FLEXPWM1.SM[1].STS)
  3781. #define FLEXPWM1_SM1INTEN (IMXRT_FLEXPWM1.SM[1].INTEN)
  3782. #define FLEXPWM1_SM1DMAEN (IMXRT_FLEXPWM1.SM[1].DMAEN)
  3783. #define FLEXPWM1_SM1TCTRL (IMXRT_FLEXPWM1.SM[1].TCTRL)
  3784. #define FLEXPWM1_SM1DISMAP0 (IMXRT_FLEXPWM1.SM[1].DISMAP0)
  3785. #define FLEXPWM1_SM1DISMAP1 (IMXRT_FLEXPWM1.SM[1].DISMAP1)
  3786. #define FLEXPWM1_SM1DTCNT0 (IMXRT_FLEXPWM1.SM[1].DTCNT0)
  3787. #define FLEXPWM1_SM1DTCNT1 (IMXRT_FLEXPWM1.SM[1].DTCNT1)
  3788. #define FLEXPWM1_SM1CAPTCTRLA (IMXRT_FLEXPWM1.SM[1].CAPTCTRLA)
  3789. #define FLEXPWM1_SM1CAPTCOMPA (IMXRT_FLEXPWM1.SM[1].CAPTCOMPA)
  3790. #define FLEXPWM1_SM1CAPTCTRLB (IMXRT_FLEXPWM1.SM[1].CAPTCTRLB)
  3791. #define FLEXPWM1_SM1CAPTCOMPB (IMXRT_FLEXPWM1.SM[1].CAPTCOMPB)
  3792. #define FLEXPWM1_SM1CAPTCTRLX (IMXRT_FLEXPWM1.SM[1].CAPTCTRLX)
  3793. #define FLEXPWM1_SM1CAPTCOMPX (IMXRT_FLEXPWM1.SM[1].CAPTCOMPX)
  3794. #define FLEXPWM1_SM1CVAL0 (IMXRT_FLEXPWM1.SM[1].CVAL0)
  3795. #define FLEXPWM1_SM1CVAL0CYC (IMXRT_FLEXPWM1.SM[1].CVAL0CYC)
  3796. #define FLEXPWM1_SM1CVAL1 (IMXRT_FLEXPWM1.SM[1].CVAL1)
  3797. #define FLEXPWM1_SM1CVAL1CYC (IMXRT_FLEXPWM1.SM[1].CVAL1CYC)
  3798. #define FLEXPWM1_SM1CVAL2 (IMXRT_FLEXPWM1.SM[1].CVAL2)
  3799. #define FLEXPWM1_SM1CVAL2CYC (IMXRT_FLEXPWM1.SM[1].CVAL2CYC)
  3800. #define FLEXPWM1_SM1CVAL3 (IMXRT_FLEXPWM1.SM[1].CVAL3)
  3801. #define FLEXPWM1_SM1CVAL3CYC (IMXRT_FLEXPWM1.SM[1].CVAL3CYC)
  3802. #define FLEXPWM1_SM1CVAL4 (IMXRT_FLEXPWM1.SM[1].CVAL4)
  3803. #define FLEXPWM1_SM1CVAL4CYC (IMXRT_FLEXPWM1.SM[1].CVAL4CYC)
  3804. #define FLEXPWM1_SM1CVAL5 (IMXRT_FLEXPWM1.SM[1].CVAL5)
  3805. #define FLEXPWM1_SM1CVAL5CYC (IMXRT_FLEXPWM1.SM[1].CVAL5CYC)
  3806. #define FLEXPWM1_SM2CNT (IMXRT_FLEXPWM1.SM[2].CNT)
  3807. #define FLEXPWM1_SM2INIT (IMXRT_FLEXPWM1.SM[2].INIT)
  3808. #define FLEXPWM1_SM2CTRL2 (IMXRT_FLEXPWM1.SM[2].CTRL2)
  3809. #define FLEXPWM1_SM2CTRL (IMXRT_FLEXPWM1.SM[2].CTRL)
  3810. #define FLEXPWM1_SM2VAL0 (IMXRT_FLEXPWM1.SM[2].VAL0)
  3811. #define FLEXPWM1_SM2FRACVAL1 (IMXRT_FLEXPWM1.SM[2].FRACVAL1)
  3812. #define FLEXPWM1_SM2VAL1 (IMXRT_FLEXPWM1.SM[2].VAL1)
  3813. #define FLEXPWM1_SM2FRACVAL2 (IMXRT_FLEXPWM1.SM[2].FRACVAL2)
  3814. #define FLEXPWM1_SM2VAL2 (IMXRT_FLEXPWM1.SM[2].VAL2)
  3815. #define FLEXPWM1_SM2FRACVAL3 (IMXRT_FLEXPWM1.SM[2].FRACVAL3)
  3816. #define FLEXPWM1_SM2VAL3 (IMXRT_FLEXPWM1.SM[2].VAL3)
  3817. #define FLEXPWM1_SM2FRACVAL4 (IMXRT_FLEXPWM1.SM[2].FRACVAL4)
  3818. #define FLEXPWM1_SM2VAL4 (IMXRT_FLEXPWM1.SM[2].VAL4)
  3819. #define FLEXPWM1_SM2FRACVAL5 (IMXRT_FLEXPWM1.SM[2].FRACVAL5)
  3820. #define FLEXPWM1_SM2VAL5 (IMXRT_FLEXPWM1.SM[2].VAL5)
  3821. #define FLEXPWM1_SM2FRCTRL (IMXRT_FLEXPWM1.SM[2].FRCTRL)
  3822. #define FLEXPWM1_SM2OCTRL (IMXRT_FLEXPWM1.SM[2].OCTRL)
  3823. #define FLEXPWM1_SM2STS (IMXRT_FLEXPWM1.SM[2].STS)
  3824. #define FLEXPWM1_SM2INTEN (IMXRT_FLEXPWM1.SM[2].INTEN)
  3825. #define FLEXPWM1_SM2DMAEN (IMXRT_FLEXPWM1.SM[2].DMAEN)
  3826. #define FLEXPWM1_SM2TCTRL (IMXRT_FLEXPWM1.SM[2].TCTRL)
  3827. #define FLEXPWM1_SM2DISMAP0 (IMXRT_FLEXPWM1.SM[2].DISMAP0)
  3828. #define FLEXPWM1_SM2DISMAP1 (IMXRT_FLEXPWM1.SM[2].DISMAP1)
  3829. #define FLEXPWM1_SM2DTCNT0 (IMXRT_FLEXPWM1.SM[2].DTCNT0)
  3830. #define FLEXPWM1_SM2DTCNT1 (IMXRT_FLEXPWM1.SM[2].DTCNT1)
  3831. #define FLEXPWM1_SM2CAPTCTRLA (IMXRT_FLEXPWM1.SM[2].CAPTCTRLA)
  3832. #define FLEXPWM1_SM2CAPTCOMPA (IMXRT_FLEXPWM1.SM[2].CAPTCOMPA)
  3833. #define FLEXPWM1_SM2CAPTCTRLB (IMXRT_FLEXPWM1.SM[2].CAPTCTRLB)
  3834. #define FLEXPWM1_SM2CAPTCOMPB (IMXRT_FLEXPWM1.SM[2].CAPTCOMPB)
  3835. #define FLEXPWM1_SM2CAPTCTRLX (IMXRT_FLEXPWM1.SM[2].CAPTCTRLX)
  3836. #define FLEXPWM1_SM2CAPTCOMPX (IMXRT_FLEXPWM1.SM[2].CAPTCOMPX)
  3837. #define FLEXPWM1_SM2CVAL0 (IMXRT_FLEXPWM1.SM[2].CVAL0)
  3838. #define FLEXPWM1_SM2CVAL0CYC (IMXRT_FLEXPWM1.SM[2].CVAL0CYC)
  3839. #define FLEXPWM1_SM2CVAL1 (IMXRT_FLEXPWM1.SM[2].CVAL1)
  3840. #define FLEXPWM1_SM2CVAL1CYC (IMXRT_FLEXPWM1.SM[2].CVAL1CYC)
  3841. #define FLEXPWM1_SM2CVAL2 (IMXRT_FLEXPWM1.SM[2].CVAL2)
  3842. #define FLEXPWM1_SM2CVAL2CYC (IMXRT_FLEXPWM1.SM[2].CVAL2CYC)
  3843. #define FLEXPWM1_SM2CVAL3 (IMXRT_FLEXPWM1.SM[2].CVAL3)
  3844. #define FLEXPWM1_SM2CVAL3CYC (IMXRT_FLEXPWM1.SM[2].CVAL3CYC)
  3845. #define FLEXPWM1_SM2CVAL4 (IMXRT_FLEXPWM1.SM[2].CVAL4)
  3846. #define FLEXPWM1_SM2CVAL4CYC (IMXRT_FLEXPWM1.SM[2].CVAL4CYC)
  3847. #define FLEXPWM1_SM2CVAL5 (IMXRT_FLEXPWM1.SM[2].CVAL5)
  3848. #define FLEXPWM1_SM2CVAL5CYC (IMXRT_FLEXPWM1.SM[2].CVAL5CYC)
  3849. #define FLEXPWM1_SM3CNT (IMXRT_FLEXPWM1.SM[3].CNT)
  3850. #define FLEXPWM1_SM3INIT (IMXRT_FLEXPWM1.SM[3].INIT)
  3851. #define FLEXPWM1_SM3CTRL2 (IMXRT_FLEXPWM1.SM[3].CTRL2)
  3852. #define FLEXPWM1_SM3CTRL (IMXRT_FLEXPWM1.SM[3].CTRL)
  3853. #define FLEXPWM1_SM3VAL0 (IMXRT_FLEXPWM1.SM[3].VAL0)
  3854. #define FLEXPWM1_SM3FRACVAL1 (IMXRT_FLEXPWM1.SM[3].FRACVAL1)
  3855. #define FLEXPWM1_SM3VAL1 (IMXRT_FLEXPWM1.SM[3].VAL1)
  3856. #define FLEXPWM1_SM3FRACVAL2 (IMXRT_FLEXPWM1.SM[3].FRACVAL2)
  3857. #define FLEXPWM1_SM3VAL2 (IMXRT_FLEXPWM1.SM[3].VAL2)
  3858. #define FLEXPWM1_SM3FRACVAL3 (IMXRT_FLEXPWM1.SM[3].FRACVAL3)
  3859. #define FLEXPWM1_SM3VAL3 (IMXRT_FLEXPWM1.SM[3].VAL3)
  3860. #define FLEXPWM1_SM3FRACVAL4 (IMXRT_FLEXPWM1.SM[3].FRACVAL4)
  3861. #define FLEXPWM1_SM3VAL4 (IMXRT_FLEXPWM1.SM[3].VAL4)
  3862. #define FLEXPWM1_SM3FRACVAL5 (IMXRT_FLEXPWM1.SM[3].FRACVAL5)
  3863. #define FLEXPWM1_SM3VAL5 (IMXRT_FLEXPWM1.SM[3].VAL5)
  3864. #define FLEXPWM1_SM3FRCTRL (IMXRT_FLEXPWM1.SM[3].FRCTRL)
  3865. #define FLEXPWM1_SM3OCTRL (IMXRT_FLEXPWM1.SM[3].OCTRL)
  3866. #define FLEXPWM1_SM3STS (IMXRT_FLEXPWM1.SM[3].STS)
  3867. #define FLEXPWM1_SM3INTEN (IMXRT_FLEXPWM1.SM[3].INTEN)
  3868. #define FLEXPWM1_SM3DMAEN (IMXRT_FLEXPWM1.SM[3].DMAEN)
  3869. #define FLEXPWM1_SM3TCTRL (IMXRT_FLEXPWM1.SM[3].TCTRL)
  3870. #define FLEXPWM1_SM3DISMAP0 (IMXRT_FLEXPWM1.SM[3].DISMAP0)
  3871. #define FLEXPWM1_SM3DISMAP1 (IMXRT_FLEXPWM1.SM[3].DISMAP1)
  3872. #define FLEXPWM1_SM3DTCNT0 (IMXRT_FLEXPWM1.SM[3].DTCNT0)
  3873. #define FLEXPWM1_SM3DTCNT1 (IMXRT_FLEXPWM1.SM[3].DTCNT1)
  3874. #define FLEXPWM1_SM3CAPTCTRLA (IMXRT_FLEXPWM1.SM[3].CAPTCTRLA)
  3875. #define FLEXPWM1_SM3CAPTCOMPA (IMXRT_FLEXPWM1.SM[3].CAPTCOMPA)
  3876. #define FLEXPWM1_SM3CAPTCTRLB (IMXRT_FLEXPWM1.SM[3].CAPTCTRLB)
  3877. #define FLEXPWM1_SM3CAPTCOMPB (IMXRT_FLEXPWM1.SM[3].CAPTCOMPB)
  3878. #define FLEXPWM1_SM3CAPTCTRLX (IMXRT_FLEXPWM1.SM[3].CAPTCTRLX)
  3879. #define FLEXPWM1_SM3CAPTCOMPX (IMXRT_FLEXPWM1.SM[3].CAPTCOMPX)
  3880. #define FLEXPWM1_SM3CVAL0 (IMXRT_FLEXPWM1.SM[3].CVAL0)
  3881. #define FLEXPWM1_SM3CVAL0CYC (IMXRT_FLEXPWM1.SM[3].CVAL0CYC)
  3882. #define FLEXPWM1_SM3CVAL1 (IMXRT_FLEXPWM1.SM[3].CVAL1)
  3883. #define FLEXPWM1_SM3CVAL1CYC (IMXRT_FLEXPWM1.SM[3].CVAL1CYC)
  3884. #define FLEXPWM1_SM3CVAL2 (IMXRT_FLEXPWM1.SM[3].CVAL2)
  3885. #define FLEXPWM1_SM3CVAL2CYC (IMXRT_FLEXPWM1.SM[3].CVAL2CYC)
  3886. #define FLEXPWM1_SM3CVAL3 (IMXRT_FLEXPWM1.SM[3].CVAL3)
  3887. #define FLEXPWM1_SM3CVAL3CYC (IMXRT_FLEXPWM1.SM[3].CVAL3CYC)
  3888. #define FLEXPWM1_SM3CVAL4 (IMXRT_FLEXPWM1.SM[3].CVAL4)
  3889. #define FLEXPWM1_SM3CVAL4CYC (IMXRT_FLEXPWM1.SM[3].CVAL4CYC)
  3890. #define FLEXPWM1_SM3CVAL5 (IMXRT_FLEXPWM1.SM[3].CVAL5)
  3891. #define FLEXPWM1_SM3CVAL5CYC (IMXRT_FLEXPWM1.SM[3].CVAL5CYC)
  3892. #define FLEXPWM1_OUTEN (IMXRT_FLEXPWM1.OUTEN)
  3893. #define FLEXPWM1_MASK (IMXRT_FLEXPWM1.MASK)
  3894. #define FLEXPWM1_SWCOUT (IMXRT_FLEXPWM1.SWCOUT)
  3895. #define FLEXPWM1_DTSRCSEL (IMXRT_FLEXPWM1.DTSRCSEL)
  3896. #define FLEXPWM1_MCTRL (IMXRT_FLEXPWM1.MCTRL)
  3897. #define FLEXPWM1_MCTRL2 (IMXRT_FLEXPWM1.MCTRL2)
  3898. #define FLEXPWM1_FCTRL0 (IMXRT_FLEXPWM1.FCTRL0)
  3899. #define FLEXPWM1_FSTS0 (IMXRT_FLEXPWM1.FSTS0)
  3900. #define FLEXPWM1_FFILT0 (IMXRT_FLEXPWM1.FFILT0)
  3901. #define FLEXPWM1_FTST0 (IMXRT_FLEXPWM1.FTST0)
  3902. #define FLEXPWM1_FCTRL20 (IMXRT_FLEXPWM1.FCTRL20)
  3903. #define FLEXPWM2_SM0CNT (IMXRT_FLEXPWM2.SM[0].CNT)
  3904. #define FLEXPWM2_SM0INIT (IMXRT_FLEXPWM2.SM[0].INIT)
  3905. #define FLEXPWM2_SM0CTRL2 (IMXRT_FLEXPWM2.SM[0].CTRL2)
  3906. #define FLEXPWM2_SM0CTRL (IMXRT_FLEXPWM2.SM[0].CTRL)
  3907. #define FLEXPWM2_SM0VAL0 (IMXRT_FLEXPWM2.SM[0].VAL0)
  3908. #define FLEXPWM2_SM0FRACVAL1 (IMXRT_FLEXPWM2.SM[0].FRACVAL1)
  3909. #define FLEXPWM2_SM0VAL1 (IMXRT_FLEXPWM2.SM[0].VAL1)
  3910. #define FLEXPWM2_SM0FRACVAL2 (IMXRT_FLEXPWM2.SM[0].FRACVAL2)
  3911. #define FLEXPWM2_SM0VAL2 (IMXRT_FLEXPWM2.SM[0].VAL2)
  3912. #define FLEXPWM2_SM0FRACVAL3 (IMXRT_FLEXPWM2.SM[0].FRACVAL3)
  3913. #define FLEXPWM2_SM0VAL3 (IMXRT_FLEXPWM2.SM[0].VAL3)
  3914. #define FLEXPWM2_SM0FRACVAL4 (IMXRT_FLEXPWM2.SM[0].FRACVAL4)
  3915. #define FLEXPWM2_SM0VAL4 (IMXRT_FLEXPWM2.SM[0].VAL4)
  3916. #define FLEXPWM2_SM0FRACVAL5 (IMXRT_FLEXPWM2.SM[0].FRACVAL5)
  3917. #define FLEXPWM2_SM0VAL5 (IMXRT_FLEXPWM2.SM[0].VAL5)
  3918. #define FLEXPWM2_SM0FRCTRL (IMXRT_FLEXPWM2.SM[0].FRCTRL)
  3919. #define FLEXPWM2_SM0OCTRL (IMXRT_FLEXPWM2.SM[0].OCTRL)
  3920. #define FLEXPWM2_SM0STS (IMXRT_FLEXPWM2.SM[0].STS)
  3921. #define FLEXPWM2_SM0INTEN (IMXRT_FLEXPWM2.SM[0].INTEN)
  3922. #define FLEXPWM2_SM0DMAEN (IMXRT_FLEXPWM2.SM[0].DMAEN)
  3923. #define FLEXPWM2_SM0TCTRL (IMXRT_FLEXPWM2.SM[0].TCTRL)
  3924. #define FLEXPWM2_SM0DISMAP0 (IMXRT_FLEXPWM2.SM[0].DISMAP0)
  3925. #define FLEXPWM2_SM0DISMAP1 (IMXRT_FLEXPWM2.SM[0].DISMAP1)
  3926. #define FLEXPWM2_SM0DTCNT0 (IMXRT_FLEXPWM2.SM[0].DTCNT0)
  3927. #define FLEXPWM2_SM0DTCNT1 (IMXRT_FLEXPWM2.SM[0].DTCNT1)
  3928. #define FLEXPWM2_SM0CAPTCTRLA (IMXRT_FLEXPWM2.SM[0].CAPTCTRLA)
  3929. #define FLEXPWM2_SM0CAPTCOMPA (IMXRT_FLEXPWM2.SM[0].CAPTCOMPA)
  3930. #define FLEXPWM2_SM0CAPTCTRLB (IMXRT_FLEXPWM2.SM[0].CAPTCTRLB)
  3931. #define FLEXPWM2_SM0CAPTCOMPB (IMXRT_FLEXPWM2.SM[0].CAPTCOMPB)
  3932. #define FLEXPWM2_SM0CAPTCTRLX (IMXRT_FLEXPWM2.SM[0].CAPTCTRLX)
  3933. #define FLEXPWM2_SM0CAPTCOMPX (IMXRT_FLEXPWM2.SM[0].CAPTCOMPX)
  3934. #define FLEXPWM2_SM0CVAL0 (IMXRT_FLEXPWM2.SM[0].CVAL0)
  3935. #define FLEXPWM2_SM0CVAL0CYC (IMXRT_FLEXPWM2.SM[0].CVAL0CYC)
  3936. #define FLEXPWM2_SM0CVAL1 (IMXRT_FLEXPWM2.SM[0].CVAL1)
  3937. #define FLEXPWM2_SM0CVAL1CYC (IMXRT_FLEXPWM2.SM[0].CVAL1CYC)
  3938. #define FLEXPWM2_SM0CVAL2 (IMXRT_FLEXPWM2.SM[0].CVAL2)
  3939. #define FLEXPWM2_SM0CVAL2CYC (IMXRT_FLEXPWM2.SM[0].CVAL2CYC)
  3940. #define FLEXPWM2_SM0CVAL3 (IMXRT_FLEXPWM2.SM[0].CVAL3)
  3941. #define FLEXPWM2_SM0CVAL3CYC (IMXRT_FLEXPWM2.SM[0].CVAL3CYC)
  3942. #define FLEXPWM2_SM0CVAL4 (IMXRT_FLEXPWM2.SM[0].CVAL4)
  3943. #define FLEXPWM2_SM0CVAL4CYC (IMXRT_FLEXPWM2.SM[0].CVAL4CYC)
  3944. #define FLEXPWM2_SM0CVAL5 (IMXRT_FLEXPWM2.SM[0].CVAL5)
  3945. #define FLEXPWM2_SM0CVAL5CYC (IMXRT_FLEXPWM2.SM[0].CVAL5CYC)
  3946. #define FLEXPWM2_SM1CNT (IMXRT_FLEXPWM2.SM[1].CNT)
  3947. #define FLEXPWM2_SM1INIT (IMXRT_FLEXPWM2.SM[1].INIT)
  3948. #define FLEXPWM2_SM1CTRL2 (IMXRT_FLEXPWM2.SM[1].CTRL2)
  3949. #define FLEXPWM2_SM1CTRL (IMXRT_FLEXPWM2.SM[1].CTRL)
  3950. #define FLEXPWM2_SM1VAL0 (IMXRT_FLEXPWM2.SM[1].VAL0)
  3951. #define FLEXPWM2_SM1FRACVAL1 (IMXRT_FLEXPWM2.SM[1].FRACVAL1)
  3952. #define FLEXPWM2_SM1VAL1 (IMXRT_FLEXPWM2.SM[1].VAL1)
  3953. #define FLEXPWM2_SM1FRACVAL2 (IMXRT_FLEXPWM2.SM[1].FRACVAL2)
  3954. #define FLEXPWM2_SM1VAL2 (IMXRT_FLEXPWM2.SM[1].VAL2)
  3955. #define FLEXPWM2_SM1FRACVAL3 (IMXRT_FLEXPWM2.SM[1].FRACVAL3)
  3956. #define FLEXPWM2_SM1VAL3 (IMXRT_FLEXPWM2.SM[1].VAL3)
  3957. #define FLEXPWM2_SM1FRACVAL4 (IMXRT_FLEXPWM2.SM[1].FRACVAL4)
  3958. #define FLEXPWM2_SM1VAL4 (IMXRT_FLEXPWM2.SM[1].VAL4)
  3959. #define FLEXPWM2_SM1FRACVAL5 (IMXRT_FLEXPWM2.SM[1].FRACVAL5)
  3960. #define FLEXPWM2_SM1VAL5 (IMXRT_FLEXPWM2.SM[1].VAL5)
  3961. #define FLEXPWM2_SM1FRCTRL (IMXRT_FLEXPWM2.SM[1].FRCTRL)
  3962. #define FLEXPWM2_SM1OCTRL (IMXRT_FLEXPWM2.SM[1].OCTRL)
  3963. #define FLEXPWM2_SM1STS (IMXRT_FLEXPWM2.SM[1].STS)
  3964. #define FLEXPWM2_SM1INTEN (IMXRT_FLEXPWM2.SM[1].INTEN)
  3965. #define FLEXPWM2_SM1DMAEN (IMXRT_FLEXPWM2.SM[1].DMAEN)
  3966. #define FLEXPWM2_SM1TCTRL (IMXRT_FLEXPWM2.SM[1].TCTRL)
  3967. #define FLEXPWM2_SM1DISMAP0 (IMXRT_FLEXPWM2.SM[1].DISMAP0)
  3968. #define FLEXPWM2_SM1DISMAP1 (IMXRT_FLEXPWM2.SM[1].DISMAP1)
  3969. #define FLEXPWM2_SM1DTCNT0 (IMXRT_FLEXPWM2.SM[1].DTCNT0)
  3970. #define FLEXPWM2_SM1DTCNT1 (IMXRT_FLEXPWM2.SM[1].DTCNT1)
  3971. #define FLEXPWM2_SM1CAPTCTRLA (IMXRT_FLEXPWM2.SM[1].CAPTCTRLA)
  3972. #define FLEXPWM2_SM1CAPTCOMPA (IMXRT_FLEXPWM2.SM[1].CAPTCOMPA)
  3973. #define FLEXPWM2_SM1CAPTCTRLB (IMXRT_FLEXPWM2.SM[1].CAPTCTRLB)
  3974. #define FLEXPWM2_SM1CAPTCOMPB (IMXRT_FLEXPWM2.SM[1].CAPTCOMPB)
  3975. #define FLEXPWM2_SM1CAPTCTRLX (IMXRT_FLEXPWM2.SM[1].CAPTCTRLX)
  3976. #define FLEXPWM2_SM1CAPTCOMPX (IMXRT_FLEXPWM2.SM[1].CAPTCOMPX)
  3977. #define FLEXPWM2_SM1CVAL0 (IMXRT_FLEXPWM2.SM[1].CVAL0)
  3978. #define FLEXPWM2_SM1CVAL0CYC (IMXRT_FLEXPWM2.SM[1].CVAL0CYC)
  3979. #define FLEXPWM2_SM1CVAL1 (IMXRT_FLEXPWM2.SM[1].CVAL1)
  3980. #define FLEXPWM2_SM1CVAL1CYC (IMXRT_FLEXPWM2.SM[1].CVAL1CYC)
  3981. #define FLEXPWM2_SM1CVAL2 (IMXRT_FLEXPWM2.SM[1].CVAL2)
  3982. #define FLEXPWM2_SM1CVAL2CYC (IMXRT_FLEXPWM2.SM[1].CVAL2CYC)
  3983. #define FLEXPWM2_SM1CVAL3 (IMXRT_FLEXPWM2.SM[1].CVAL3)
  3984. #define FLEXPWM2_SM1CVAL3CYC (IMXRT_FLEXPWM2.SM[1].CVAL3CYC)
  3985. #define FLEXPWM2_SM1CVAL4 (IMXRT_FLEXPWM2.SM[1].CVAL4)
  3986. #define FLEXPWM2_SM1CVAL4CYC (IMXRT_FLEXPWM2.SM[1].CVAL4CYC)
  3987. #define FLEXPWM2_SM1CVAL5 (IMXRT_FLEXPWM2.SM[1].CVAL5)
  3988. #define FLEXPWM2_SM1CVAL5CYC (IMXRT_FLEXPWM2.SM[1].CVAL5CYC)
  3989. #define FLEXPWM2_SM2CNT (IMXRT_FLEXPWM2.SM[2].CNT)
  3990. #define FLEXPWM2_SM2INIT (IMXRT_FLEXPWM2.SM[2].INIT)
  3991. #define FLEXPWM2_SM2CTRL2 (IMXRT_FLEXPWM2.SM[2].CTRL2)
  3992. #define FLEXPWM2_SM2CTRL (IMXRT_FLEXPWM2.SM[2].CTRL)
  3993. #define FLEXPWM2_SM2VAL0 (IMXRT_FLEXPWM2.SM[2].VAL0)
  3994. #define FLEXPWM2_SM2FRACVAL1 (IMXRT_FLEXPWM2.SM[2].FRACVAL1)
  3995. #define FLEXPWM2_SM2VAL1 (IMXRT_FLEXPWM2.SM[2].VAL1)
  3996. #define FLEXPWM2_SM2FRACVAL2 (IMXRT_FLEXPWM2.SM[2].FRACVAL2)
  3997. #define FLEXPWM2_SM2VAL2 (IMXRT_FLEXPWM2.SM[2].VAL2)
  3998. #define FLEXPWM2_SM2FRACVAL3 (IMXRT_FLEXPWM2.SM[2].FRACVAL3)
  3999. #define FLEXPWM2_SM2VAL3 (IMXRT_FLEXPWM2.SM[2].VAL3)
  4000. #define FLEXPWM2_SM2FRACVAL4 (IMXRT_FLEXPWM2.SM[2].FRACVAL4)
  4001. #define FLEXPWM2_SM2VAL4 (IMXRT_FLEXPWM2.SM[2].VAL4)
  4002. #define FLEXPWM2_SM2FRACVAL5 (IMXRT_FLEXPWM2.SM[2].FRACVAL5)
  4003. #define FLEXPWM2_SM2VAL5 (IMXRT_FLEXPWM2.SM[2].VAL5)
  4004. #define FLEXPWM2_SM2FRCTRL (IMXRT_FLEXPWM2.SM[2].FRCTRL)
  4005. #define FLEXPWM2_SM2OCTRL (IMXRT_FLEXPWM2.SM[2].OCTRL)
  4006. #define FLEXPWM2_SM2STS (IMXRT_FLEXPWM2.SM[2].STS)
  4007. #define FLEXPWM2_SM2INTEN (IMXRT_FLEXPWM2.SM[2].INTEN)
  4008. #define FLEXPWM2_SM2DMAEN (IMXRT_FLEXPWM2.SM[2].DMAEN)
  4009. #define FLEXPWM2_SM2TCTRL (IMXRT_FLEXPWM2.SM[2].TCTRL)
  4010. #define FLEXPWM2_SM2DISMAP0 (IMXRT_FLEXPWM2.SM[2].DISMAP0)
  4011. #define FLEXPWM2_SM2DISMAP1 (IMXRT_FLEXPWM2.SM[2].DISMAP1)
  4012. #define FLEXPWM2_SM2DTCNT0 (IMXRT_FLEXPWM2.SM[2].DTCNT0)
  4013. #define FLEXPWM2_SM2DTCNT1 (IMXRT_FLEXPWM2.SM[2].DTCNT1)
  4014. #define FLEXPWM2_SM2CAPTCTRLA (IMXRT_FLEXPWM2.SM[2].CAPTCTRLA)
  4015. #define FLEXPWM2_SM2CAPTCOMPA (IMXRT_FLEXPWM2.SM[2].CAPTCOMPA)
  4016. #define FLEXPWM2_SM2CAPTCTRLB (IMXRT_FLEXPWM2.SM[2].CAPTCTRLB)
  4017. #define FLEXPWM2_SM2CAPTCOMPB (IMXRT_FLEXPWM2.SM[2].CAPTCOMPB)
  4018. #define FLEXPWM2_SM2CAPTCTRLX (IMXRT_FLEXPWM2.SM[2].CAPTCTRLX)
  4019. #define FLEXPWM2_SM2CAPTCOMPX (IMXRT_FLEXPWM2.SM[2].CAPTCOMPX)
  4020. #define FLEXPWM2_SM2CVAL0 (IMXRT_FLEXPWM2.SM[2].CVAL0)
  4021. #define FLEXPWM2_SM2CVAL0CYC (IMXRT_FLEXPWM2.SM[2].CVAL0CYC)
  4022. #define FLEXPWM2_SM2CVAL1 (IMXRT_FLEXPWM2.SM[2].CVAL1)
  4023. #define FLEXPWM2_SM2CVAL1CYC (IMXRT_FLEXPWM2.SM[2].CVAL1CYC)
  4024. #define FLEXPWM2_SM2CVAL2 (IMXRT_FLEXPWM2.SM[2].CVAL2)
  4025. #define FLEXPWM2_SM2CVAL2CYC (IMXRT_FLEXPWM2.SM[2].CVAL2CYC)
  4026. #define FLEXPWM2_SM2CVAL3 (IMXRT_FLEXPWM2.SM[2].CVAL3)
  4027. #define FLEXPWM2_SM2CVAL3CYC (IMXRT_FLEXPWM2.SM[2].CVAL3CYC)
  4028. #define FLEXPWM2_SM2CVAL4 (IMXRT_FLEXPWM2.SM[2].CVAL4)
  4029. #define FLEXPWM2_SM2CVAL4CYC (IMXRT_FLEXPWM2.SM[2].CVAL4CYC)
  4030. #define FLEXPWM2_SM2CVAL5 (IMXRT_FLEXPWM2.SM[2].CVAL5)
  4031. #define FLEXPWM2_SM2CVAL5CYC (IMXRT_FLEXPWM2.SM[2].CVAL5CYC)
  4032. #define FLEXPWM2_SM3CNT (IMXRT_FLEXPWM2.SM[3].CNT)
  4033. #define FLEXPWM2_SM3INIT (IMXRT_FLEXPWM2.SM[3].INIT)
  4034. #define FLEXPWM2_SM3CTRL2 (IMXRT_FLEXPWM2.SM[3].CTRL2)
  4035. #define FLEXPWM2_SM3CTRL (IMXRT_FLEXPWM2.SM[3].CTRL)
  4036. #define FLEXPWM2_SM3VAL0 (IMXRT_FLEXPWM2.SM[3].VAL0)
  4037. #define FLEXPWM2_SM3FRACVAL1 (IMXRT_FLEXPWM2.SM[3].FRACVAL1)
  4038. #define FLEXPWM2_SM3VAL1 (IMXRT_FLEXPWM2.SM[3].VAL1)
  4039. #define FLEXPWM2_SM3FRACVAL2 (IMXRT_FLEXPWM2.SM[3].FRACVAL2)
  4040. #define FLEXPWM2_SM3VAL2 (IMXRT_FLEXPWM2.SM[3].VAL2)
  4041. #define FLEXPWM2_SM3FRACVAL3 (IMXRT_FLEXPWM2.SM[3].FRACVAL3)
  4042. #define FLEXPWM2_SM3VAL3 (IMXRT_FLEXPWM2.SM[3].VAL3)
  4043. #define FLEXPWM2_SM3FRACVAL4 (IMXRT_FLEXPWM2.SM[3].FRACVAL4)
  4044. #define FLEXPWM2_SM3VAL4 (IMXRT_FLEXPWM2.SM[3].VAL4)
  4045. #define FLEXPWM2_SM3FRACVAL5 (IMXRT_FLEXPWM2.SM[3].FRACVAL5)
  4046. #define FLEXPWM2_SM3VAL5 (IMXRT_FLEXPWM2.SM[3].VAL5)
  4047. #define FLEXPWM2_SM3FRCTRL (IMXRT_FLEXPWM2.SM[3].FRCTRL)
  4048. #define FLEXPWM2_SM3OCTRL (IMXRT_FLEXPWM2.SM[3].OCTRL)
  4049. #define FLEXPWM2_SM3STS (IMXRT_FLEXPWM2.SM[3].STS)
  4050. #define FLEXPWM2_SM3INTEN (IMXRT_FLEXPWM2.SM[3].INTEN)
  4051. #define FLEXPWM2_SM3DMAEN (IMXRT_FLEXPWM2.SM[3].DMAEN)
  4052. #define FLEXPWM2_SM3TCTRL (IMXRT_FLEXPWM2.SM[3].TCTRL)
  4053. #define FLEXPWM2_SM3DISMAP0 (IMXRT_FLEXPWM2.SM[3].DISMAP0)
  4054. #define FLEXPWM2_SM3DISMAP1 (IMXRT_FLEXPWM2.SM[3].DISMAP1)
  4055. #define FLEXPWM2_SM3DTCNT0 (IMXRT_FLEXPWM2.SM[3].DTCNT0)
  4056. #define FLEXPWM2_SM3DTCNT1 (IMXRT_FLEXPWM2.SM[3].DTCNT1)
  4057. #define FLEXPWM2_SM3CAPTCTRLA (IMXRT_FLEXPWM2.SM[3].CAPTCTRLA)
  4058. #define FLEXPWM2_SM3CAPTCOMPA (IMXRT_FLEXPWM2.SM[3].CAPTCOMPA)
  4059. #define FLEXPWM2_SM3CAPTCTRLB (IMXRT_FLEXPWM2.SM[3].CAPTCTRLB)
  4060. #define FLEXPWM2_SM3CAPTCOMPB (IMXRT_FLEXPWM2.SM[3].CAPTCOMPB)
  4061. #define FLEXPWM2_SM3CAPTCTRLX (IMXRT_FLEXPWM2.SM[3].CAPTCTRLX)
  4062. #define FLEXPWM2_SM3CAPTCOMPX (IMXRT_FLEXPWM2.SM[3].CAPTCOMPX)
  4063. #define FLEXPWM2_SM3CVAL0 (IMXRT_FLEXPWM2.SM[3].CVAL0)
  4064. #define FLEXPWM2_SM3CVAL0CYC (IMXRT_FLEXPWM2.SM[3].CVAL0CYC)
  4065. #define FLEXPWM2_SM3CVAL1 (IMXRT_FLEXPWM2.SM[3].CVAL1)
  4066. #define FLEXPWM2_SM3CVAL1CYC (IMXRT_FLEXPWM2.SM[3].CVAL1CYC)
  4067. #define FLEXPWM2_SM3CVAL2 (IMXRT_FLEXPWM2.SM[3].CVAL2)
  4068. #define FLEXPWM2_SM3CVAL2CYC (IMXRT_FLEXPWM2.SM[3].CVAL2CYC)
  4069. #define FLEXPWM2_SM3CVAL3 (IMXRT_FLEXPWM2.SM[3].CVAL3)
  4070. #define FLEXPWM2_SM3CVAL3CYC (IMXRT_FLEXPWM2.SM[3].CVAL3CYC)
  4071. #define FLEXPWM2_SM3CVAL4 (IMXRT_FLEXPWM2.SM[3].CVAL4)
  4072. #define FLEXPWM2_SM3CVAL4CYC (IMXRT_FLEXPWM2.SM[3].CVAL4CYC)
  4073. #define FLEXPWM2_SM3CVAL5 (IMXRT_FLEXPWM2.SM[3].CVAL5)
  4074. #define FLEXPWM2_SM3CVAL5CYC (IMXRT_FLEXPWM2.SM[3].CVAL5CYC)
  4075. #define FLEXPWM2_OUTEN (IMXRT_FLEXPWM2.OUTEN)
  4076. #define FLEXPWM2_MASK (IMXRT_FLEXPWM2.MASK)
  4077. #define FLEXPWM2_SWCOUT (IMXRT_FLEXPWM2.SWCOUT)
  4078. #define FLEXPWM2_DTSRCSEL (IMXRT_FLEXPWM2.DTSRCSEL)
  4079. #define FLEXPWM2_MCTRL (IMXRT_FLEXPWM2.MCTRL)
  4080. #define FLEXPWM2_MCTRL2 (IMXRT_FLEXPWM2.MCTRL2)
  4081. #define FLEXPWM2_FCTRL0 (IMXRT_FLEXPWM2.FCTRL0)
  4082. #define FLEXPWM2_FSTS0 (IMXRT_FLEXPWM2.FSTS0)
  4083. #define FLEXPWM2_FFILT0 (IMXRT_FLEXPWM2.FFILT0)
  4084. #define FLEXPWM2_FTST0 (IMXRT_FLEXPWM2.FTST0)
  4085. #define FLEXPWM2_FCTRL20 (IMXRT_FLEXPWM2.FCTRL20)
  4086. #define FLEXPWM3_SM0CNT (IMXRT_FLEXPWM3.SM[0].CNT)
  4087. #define FLEXPWM3_SM0INIT (IMXRT_FLEXPWM3.SM[0].INIT)
  4088. #define FLEXPWM3_SM0CTRL2 (IMXRT_FLEXPWM3.SM[0].CTRL2)
  4089. #define FLEXPWM3_SM0CTRL (IMXRT_FLEXPWM3.SM[0].CTRL)
  4090. #define FLEXPWM3_SM0VAL0 (IMXRT_FLEXPWM3.SM[0].VAL0)
  4091. #define FLEXPWM3_SM0FRACVAL1 (IMXRT_FLEXPWM3.SM[0].FRACVAL1)
  4092. #define FLEXPWM3_SM0VAL1 (IMXRT_FLEXPWM3.SM[0].VAL1)
  4093. #define FLEXPWM3_SM0FRACVAL2 (IMXRT_FLEXPWM3.SM[0].FRACVAL2)
  4094. #define FLEXPWM3_SM0VAL2 (IMXRT_FLEXPWM3.SM[0].VAL2)
  4095. #define FLEXPWM3_SM0FRACVAL3 (IMXRT_FLEXPWM3.SM[0].FRACVAL3)
  4096. #define FLEXPWM3_SM0VAL3 (IMXRT_FLEXPWM3.SM[0].VAL3)
  4097. #define FLEXPWM3_SM0FRACVAL4 (IMXRT_FLEXPWM3.SM[0].FRACVAL4)
  4098. #define FLEXPWM3_SM0VAL4 (IMXRT_FLEXPWM3.SM[0].VAL4)
  4099. #define FLEXPWM3_SM0FRACVAL5 (IMXRT_FLEXPWM3.SM[0].FRACVAL5)
  4100. #define FLEXPWM3_SM0VAL5 (IMXRT_FLEXPWM3.SM[0].VAL5)
  4101. #define FLEXPWM3_SM0FRCTRL (IMXRT_FLEXPWM3.SM[0].FRCTRL)
  4102. #define FLEXPWM3_SM0OCTRL (IMXRT_FLEXPWM3.SM[0].OCTRL)
  4103. #define FLEXPWM3_SM0STS (IMXRT_FLEXPWM3.SM[0].STS)
  4104. #define FLEXPWM3_SM0INTEN (IMXRT_FLEXPWM3.SM[0].INTEN)
  4105. #define FLEXPWM3_SM0DMAEN (IMXRT_FLEXPWM3.SM[0].DMAEN)
  4106. #define FLEXPWM3_SM0TCTRL (IMXRT_FLEXPWM3.SM[0].TCTRL)
  4107. #define FLEXPWM3_SM0DISMAP0 (IMXRT_FLEXPWM3.SM[0].DISMAP0)
  4108. #define FLEXPWM3_SM0DISMAP1 (IMXRT_FLEXPWM3.SM[0].DISMAP1)
  4109. #define FLEXPWM3_SM0DTCNT0 (IMXRT_FLEXPWM3.SM[0].DTCNT0)
  4110. #define FLEXPWM3_SM0DTCNT1 (IMXRT_FLEXPWM3.SM[0].DTCNT1)
  4111. #define FLEXPWM3_SM0CAPTCTRLA (IMXRT_FLEXPWM3.SM[0].CAPTCTRLA)
  4112. #define FLEXPWM3_SM0CAPTCOMPA (IMXRT_FLEXPWM3.SM[0].CAPTCOMPA)
  4113. #define FLEXPWM3_SM0CAPTCTRLB (IMXRT_FLEXPWM3.SM[0].CAPTCTRLB)
  4114. #define FLEXPWM3_SM0CAPTCOMPB (IMXRT_FLEXPWM3.SM[0].CAPTCOMPB)
  4115. #define FLEXPWM3_SM0CAPTCTRLX (IMXRT_FLEXPWM3.SM[0].CAPTCTRLX)
  4116. #define FLEXPWM3_SM0CAPTCOMPX (IMXRT_FLEXPWM3.SM[0].CAPTCOMPX)
  4117. #define FLEXPWM3_SM0CVAL0 (IMXRT_FLEXPWM3.SM[0].CVAL0)
  4118. #define FLEXPWM3_SM0CVAL0CYC (IMXRT_FLEXPWM3.SM[0].CVAL0CYC)
  4119. #define FLEXPWM3_SM0CVAL1 (IMXRT_FLEXPWM3.SM[0].CVAL1)
  4120. #define FLEXPWM3_SM0CVAL1CYC (IMXRT_FLEXPWM3.SM[0].CVAL1CYC)
  4121. #define FLEXPWM3_SM0CVAL2 (IMXRT_FLEXPWM3.SM[0].CVAL2)
  4122. #define FLEXPWM3_SM0CVAL2CYC (IMXRT_FLEXPWM3.SM[0].CVAL2CYC)
  4123. #define FLEXPWM3_SM0CVAL3 (IMXRT_FLEXPWM3.SM[0].CVAL3)
  4124. #define FLEXPWM3_SM0CVAL3CYC (IMXRT_FLEXPWM3.SM[0].CVAL3CYC)
  4125. #define FLEXPWM3_SM0CVAL4 (IMXRT_FLEXPWM3.SM[0].CVAL4)
  4126. #define FLEXPWM3_SM0CVAL4CYC (IMXRT_FLEXPWM3.SM[0].CVAL4CYC)
  4127. #define FLEXPWM3_SM0CVAL5 (IMXRT_FLEXPWM3.SM[0].CVAL5)
  4128. #define FLEXPWM3_SM0CVAL5CYC (IMXRT_FLEXPWM3.SM[0].CVAL5CYC)
  4129. #define FLEXPWM3_SM1CNT (IMXRT_FLEXPWM3.SM[1].CNT)
  4130. #define FLEXPWM3_SM1INIT (IMXRT_FLEXPWM3.SM[1].INIT)
  4131. #define FLEXPWM3_SM1CTRL2 (IMXRT_FLEXPWM3.SM[1].CTRL2)
  4132. #define FLEXPWM3_SM1CTRL (IMXRT_FLEXPWM3.SM[1].CTRL)
  4133. #define FLEXPWM3_SM1VAL0 (IMXRT_FLEXPWM3.SM[1].VAL0)
  4134. #define FLEXPWM3_SM1FRACVAL1 (IMXRT_FLEXPWM3.SM[1].FRACVAL1)
  4135. #define FLEXPWM3_SM1VAL1 (IMXRT_FLEXPWM3.SM[1].VAL1)
  4136. #define FLEXPWM3_SM1FRACVAL2 (IMXRT_FLEXPWM3.SM[1].FRACVAL2)
  4137. #define FLEXPWM3_SM1VAL2 (IMXRT_FLEXPWM3.SM[1].VAL2)
  4138. #define FLEXPWM3_SM1FRACVAL3 (IMXRT_FLEXPWM3.SM[1].FRACVAL3)
  4139. #define FLEXPWM3_SM1VAL3 (IMXRT_FLEXPWM3.SM[1].VAL3)
  4140. #define FLEXPWM3_SM1FRACVAL4 (IMXRT_FLEXPWM3.SM[1].FRACVAL4)
  4141. #define FLEXPWM3_SM1VAL4 (IMXRT_FLEXPWM3.SM[1].VAL4)
  4142. #define FLEXPWM3_SM1FRACVAL5 (IMXRT_FLEXPWM3.SM[1].FRACVAL5)
  4143. #define FLEXPWM3_SM1VAL5 (IMXRT_FLEXPWM3.SM[1].VAL5)
  4144. #define FLEXPWM3_SM1FRCTRL (IMXRT_FLEXPWM3.SM[1].FRCTRL)
  4145. #define FLEXPWM3_SM1OCTRL (IMXRT_FLEXPWM3.SM[1].OCTRL)
  4146. #define FLEXPWM3_SM1STS (IMXRT_FLEXPWM3.SM[1].STS)
  4147. #define FLEXPWM3_SM1INTEN (IMXRT_FLEXPWM3.SM[1].INTEN)
  4148. #define FLEXPWM3_SM1DMAEN (IMXRT_FLEXPWM3.SM[1].DMAEN)
  4149. #define FLEXPWM3_SM1TCTRL (IMXRT_FLEXPWM3.SM[1].TCTRL)
  4150. #define FLEXPWM3_SM1DISMAP0 (IMXRT_FLEXPWM3.SM[1].DISMAP0)
  4151. #define FLEXPWM3_SM1DISMAP1 (IMXRT_FLEXPWM3.SM[1].DISMAP1)
  4152. #define FLEXPWM3_SM1DTCNT0 (IMXRT_FLEXPWM3.SM[1].DTCNT0)
  4153. #define FLEXPWM3_SM1DTCNT1 (IMXRT_FLEXPWM3.SM[1].DTCNT1)
  4154. #define FLEXPWM3_SM1CAPTCTRLA (IMXRT_FLEXPWM3.SM[1].CAPTCTRLA)
  4155. #define FLEXPWM3_SM1CAPTCOMPA (IMXRT_FLEXPWM3.SM[1].CAPTCOMPA)
  4156. #define FLEXPWM3_SM1CAPTCTRLB (IMXRT_FLEXPWM3.SM[1].CAPTCTRLB)
  4157. #define FLEXPWM3_SM1CAPTCOMPB (IMXRT_FLEXPWM3.SM[1].CAPTCOMPB)
  4158. #define FLEXPWM3_SM1CAPTCTRLX (IMXRT_FLEXPWM3.SM[1].CAPTCTRLX)
  4159. #define FLEXPWM3_SM1CAPTCOMPX (IMXRT_FLEXPWM3.SM[1].CAPTCOMPX)
  4160. #define FLEXPWM3_SM1CVAL0 (IMXRT_FLEXPWM3.SM[1].CVAL0)
  4161. #define FLEXPWM3_SM1CVAL0CYC (IMXRT_FLEXPWM3.SM[1].CVAL0CYC)
  4162. #define FLEXPWM3_SM1CVAL1 (IMXRT_FLEXPWM3.SM[1].CVAL1)
  4163. #define FLEXPWM3_SM1CVAL1CYC (IMXRT_FLEXPWM3.SM[1].CVAL1CYC)
  4164. #define FLEXPWM3_SM1CVAL2 (IMXRT_FLEXPWM3.SM[1].CVAL2)
  4165. #define FLEXPWM3_SM1CVAL2CYC (IMXRT_FLEXPWM3.SM[1].CVAL2CYC)
  4166. #define FLEXPWM3_SM1CVAL3 (IMXRT_FLEXPWM3.SM[1].CVAL3)
  4167. #define FLEXPWM3_SM1CVAL3CYC (IMXRT_FLEXPWM3.SM[1].CVAL3CYC)
  4168. #define FLEXPWM3_SM1CVAL4 (IMXRT_FLEXPWM3.SM[1].CVAL4)
  4169. #define FLEXPWM3_SM1CVAL4CYC (IMXRT_FLEXPWM3.SM[1].CVAL4CYC)
  4170. #define FLEXPWM3_SM1CVAL5 (IMXRT_FLEXPWM3.SM[1].CVAL5)
  4171. #define FLEXPWM3_SM1CVAL5CYC (IMXRT_FLEXPWM3.SM[1].CVAL5CYC)
  4172. #define FLEXPWM3_SM2CNT (IMXRT_FLEXPWM3.SM[2].CNT)
  4173. #define FLEXPWM3_SM2INIT (IMXRT_FLEXPWM3.SM[2].INIT)
  4174. #define FLEXPWM3_SM2CTRL2 (IMXRT_FLEXPWM3.SM[2].CTRL2)
  4175. #define FLEXPWM3_SM2CTRL (IMXRT_FLEXPWM3.SM[2].CTRL)
  4176. #define FLEXPWM3_SM2VAL0 (IMXRT_FLEXPWM3.SM[2].VAL0)
  4177. #define FLEXPWM3_SM2FRACVAL1 (IMXRT_FLEXPWM3.SM[2].FRACVAL1)
  4178. #define FLEXPWM3_SM2VAL1 (IMXRT_FLEXPWM3.SM[2].VAL1)
  4179. #define FLEXPWM3_SM2FRACVAL2 (IMXRT_FLEXPWM3.SM[2].FRACVAL2)
  4180. #define FLEXPWM3_SM2VAL2 (IMXRT_FLEXPWM3.SM[2].VAL2)
  4181. #define FLEXPWM3_SM2FRACVAL3 (IMXRT_FLEXPWM3.SM[2].FRACVAL3)
  4182. #define FLEXPWM3_SM2VAL3 (IMXRT_FLEXPWM3.SM[2].VAL3)
  4183. #define FLEXPWM3_SM2FRACVAL4 (IMXRT_FLEXPWM3.SM[2].FRACVAL4)
  4184. #define FLEXPWM3_SM2VAL4 (IMXRT_FLEXPWM3.SM[2].VAL4)
  4185. #define FLEXPWM3_SM2FRACVAL5 (IMXRT_FLEXPWM3.SM[2].FRACVAL5)
  4186. #define FLEXPWM3_SM2VAL5 (IMXRT_FLEXPWM3.SM[2].VAL5)
  4187. #define FLEXPWM3_SM2FRCTRL (IMXRT_FLEXPWM3.SM[2].FRCTRL)
  4188. #define FLEXPWM3_SM2OCTRL (IMXRT_FLEXPWM3.SM[2].OCTRL)
  4189. #define FLEXPWM3_SM2STS (IMXRT_FLEXPWM3.SM[2].STS)
  4190. #define FLEXPWM3_SM2INTEN (IMXRT_FLEXPWM3.SM[2].INTEN)
  4191. #define FLEXPWM3_SM2DMAEN (IMXRT_FLEXPWM3.SM[2].DMAEN)
  4192. #define FLEXPWM3_SM2TCTRL (IMXRT_FLEXPWM3.SM[2].TCTRL)
  4193. #define FLEXPWM3_SM2DISMAP0 (IMXRT_FLEXPWM3.SM[2].DISMAP0)
  4194. #define FLEXPWM3_SM2DISMAP1 (IMXRT_FLEXPWM3.SM[2].DISMAP1)
  4195. #define FLEXPWM3_SM2DTCNT0 (IMXRT_FLEXPWM3.SM[2].DTCNT0)
  4196. #define FLEXPWM3_SM2DTCNT1 (IMXRT_FLEXPWM3.SM[2].DTCNT1)
  4197. #define FLEXPWM3_SM2CAPTCTRLA (IMXRT_FLEXPWM3.SM[2].CAPTCTRLA)
  4198. #define FLEXPWM3_SM2CAPTCOMPA (IMXRT_FLEXPWM3.SM[2].CAPTCOMPA)
  4199. #define FLEXPWM3_SM2CAPTCTRLB (IMXRT_FLEXPWM3.SM[2].CAPTCTRLB)
  4200. #define FLEXPWM3_SM2CAPTCOMPB (IMXRT_FLEXPWM3.SM[2].CAPTCOMPB)
  4201. #define FLEXPWM3_SM2CAPTCTRLX (IMXRT_FLEXPWM3.SM[2].CAPTCTRLX)
  4202. #define FLEXPWM3_SM2CAPTCOMPX (IMXRT_FLEXPWM3.SM[2].CAPTCOMPX)
  4203. #define FLEXPWM3_SM2CVAL0 (IMXRT_FLEXPWM3.SM[2].CVAL0)
  4204. #define FLEXPWM3_SM2CVAL0CYC (IMXRT_FLEXPWM3.SM[2].CVAL0CYC)
  4205. #define FLEXPWM3_SM2CVAL1 (IMXRT_FLEXPWM3.SM[2].CVAL1)
  4206. #define FLEXPWM3_SM2CVAL1CYC (IMXRT_FLEXPWM3.SM[2].CVAL1CYC)
  4207. #define FLEXPWM3_SM2CVAL2 (IMXRT_FLEXPWM3.SM[2].CVAL2)
  4208. #define FLEXPWM3_SM2CVAL2CYC (IMXRT_FLEXPWM3.SM[2].CVAL2CYC)
  4209. #define FLEXPWM3_SM2CVAL3 (IMXRT_FLEXPWM3.SM[2].CVAL3)
  4210. #define FLEXPWM3_SM2CVAL3CYC (IMXRT_FLEXPWM3.SM[2].CVAL3CYC)
  4211. #define FLEXPWM3_SM2CVAL4 (IMXRT_FLEXPWM3.SM[2].CVAL4)
  4212. #define FLEXPWM3_SM2CVAL4CYC (IMXRT_FLEXPWM3.SM[2].CVAL4CYC)
  4213. #define FLEXPWM3_SM2CVAL5 (IMXRT_FLEXPWM3.SM[2].CVAL5)
  4214. #define FLEXPWM3_SM2CVAL5CYC (IMXRT_FLEXPWM3.SM[2].CVAL5CYC)
  4215. #define FLEXPWM3_SM3CNT (IMXRT_FLEXPWM3.SM[3].CNT)
  4216. #define FLEXPWM3_SM3INIT (IMXRT_FLEXPWM3.SM[3].INIT)
  4217. #define FLEXPWM3_SM3CTRL2 (IMXRT_FLEXPWM3.SM[3].CTRL2)
  4218. #define FLEXPWM3_SM3CTRL (IMXRT_FLEXPWM3.SM[3].CTRL)
  4219. #define FLEXPWM3_SM3VAL0 (IMXRT_FLEXPWM3.SM[3].VAL0)
  4220. #define FLEXPWM3_SM3FRACVAL1 (IMXRT_FLEXPWM3.SM[3].FRACVAL1)
  4221. #define FLEXPWM3_SM3VAL1 (IMXRT_FLEXPWM3.SM[3].VAL1)
  4222. #define FLEXPWM3_SM3FRACVAL2 (IMXRT_FLEXPWM3.SM[3].FRACVAL2)
  4223. #define FLEXPWM3_SM3VAL2 (IMXRT_FLEXPWM3.SM[3].VAL2)
  4224. #define FLEXPWM3_SM3FRACVAL3 (IMXRT_FLEXPWM3.SM[3].FRACVAL3)
  4225. #define FLEXPWM3_SM3VAL3 (IMXRT_FLEXPWM3.SM[3].VAL3)
  4226. #define FLEXPWM3_SM3FRACVAL4 (IMXRT_FLEXPWM3.SM[3].FRACVAL4)
  4227. #define FLEXPWM3_SM3VAL4 (IMXRT_FLEXPWM3.SM[3].VAL4)
  4228. #define FLEXPWM3_SM3FRACVAL5 (IMXRT_FLEXPWM3.SM[3].FRACVAL5)
  4229. #define FLEXPWM3_SM3VAL5 (IMXRT_FLEXPWM3.SM[3].VAL5)
  4230. #define FLEXPWM3_SM3FRCTRL (IMXRT_FLEXPWM3.SM[3].FRCTRL)
  4231. #define FLEXPWM3_SM3OCTRL (IMXRT_FLEXPWM3.SM[3].OCTRL)
  4232. #define FLEXPWM3_SM3STS (IMXRT_FLEXPWM3.SM[3].STS)
  4233. #define FLEXPWM3_SM3INTEN (IMXRT_FLEXPWM3.SM[3].INTEN)
  4234. #define FLEXPWM3_SM3DMAEN (IMXRT_FLEXPWM3.SM[3].DMAEN)
  4235. #define FLEXPWM3_SM3TCTRL (IMXRT_FLEXPWM3.SM[3].TCTRL)
  4236. #define FLEXPWM3_SM3DISMAP0 (IMXRT_FLEXPWM3.SM[3].DISMAP0)
  4237. #define FLEXPWM3_SM3DISMAP1 (IMXRT_FLEXPWM3.SM[3].DISMAP1)
  4238. #define FLEXPWM3_SM3DTCNT0 (IMXRT_FLEXPWM3.SM[3].DTCNT0)
  4239. #define FLEXPWM3_SM3DTCNT1 (IMXRT_FLEXPWM3.SM[3].DTCNT1)
  4240. #define FLEXPWM3_SM3CAPTCTRLA (IMXRT_FLEXPWM3.SM[3].CAPTCTRLA)
  4241. #define FLEXPWM3_SM3CAPTCOMPA (IMXRT_FLEXPWM3.SM[3].CAPTCOMPA)
  4242. #define FLEXPWM3_SM3CAPTCTRLB (IMXRT_FLEXPWM3.SM[3].CAPTCTRLB)
  4243. #define FLEXPWM3_SM3CAPTCOMPB (IMXRT_FLEXPWM3.SM[3].CAPTCOMPB)
  4244. #define FLEXPWM3_SM3CAPTCTRLX (IMXRT_FLEXPWM3.SM[3].CAPTCTRLX)
  4245. #define FLEXPWM3_SM3CAPTCOMPX (IMXRT_FLEXPWM3.SM[3].CAPTCOMPX)
  4246. #define FLEXPWM3_SM3CVAL0 (IMXRT_FLEXPWM3.SM[3].CVAL0)
  4247. #define FLEXPWM3_SM3CVAL0CYC (IMXRT_FLEXPWM3.SM[3].CVAL0CYC)
  4248. #define FLEXPWM3_SM3CVAL1 (IMXRT_FLEXPWM3.SM[3].CVAL1)
  4249. #define FLEXPWM3_SM3CVAL1CYC (IMXRT_FLEXPWM3.SM[3].CVAL1CYC)
  4250. #define FLEXPWM3_SM3CVAL2 (IMXRT_FLEXPWM3.SM[3].CVAL2)
  4251. #define FLEXPWM3_SM3CVAL2CYC (IMXRT_FLEXPWM3.SM[3].CVAL2CYC)
  4252. #define FLEXPWM3_SM3CVAL3 (IMXRT_FLEXPWM3.SM[3].CVAL3)
  4253. #define FLEXPWM3_SM3CVAL3CYC (IMXRT_FLEXPWM3.SM[3].CVAL3CYC)
  4254. #define FLEXPWM3_SM3CVAL4 (IMXRT_FLEXPWM3.SM[3].CVAL4)
  4255. #define FLEXPWM3_SM3CVAL4CYC (IMXRT_FLEXPWM3.SM[3].CVAL4CYC)
  4256. #define FLEXPWM3_SM3CVAL5 (IMXRT_FLEXPWM3.SM[3].CVAL5)
  4257. #define FLEXPWM3_SM3CVAL5CYC (IMXRT_FLEXPWM3.SM[3].CVAL5CYC)
  4258. #define FLEXPWM3_OUTEN (IMXRT_FLEXPWM3.OUTEN)
  4259. #define FLEXPWM3_MASK (IMXRT_FLEXPWM3.MASK)
  4260. #define FLEXPWM3_SWCOUT (IMXRT_FLEXPWM3.SWCOUT)
  4261. #define FLEXPWM3_DTSRCSEL (IMXRT_FLEXPWM3.DTSRCSEL)
  4262. #define FLEXPWM3_MCTRL (IMXRT_FLEXPWM3.MCTRL)
  4263. #define FLEXPWM3_MCTRL2 (IMXRT_FLEXPWM3.MCTRL2)
  4264. #define FLEXPWM3_FCTRL0 (IMXRT_FLEXPWM3.FCTRL0)
  4265. #define FLEXPWM3_FSTS0 (IMXRT_FLEXPWM3.FSTS0)
  4266. #define FLEXPWM3_FFILT0 (IMXRT_FLEXPWM3.FFILT0)
  4267. #define FLEXPWM3_FTST0 (IMXRT_FLEXPWM3.FTST0)
  4268. #define FLEXPWM3_FCTRL20 (IMXRT_FLEXPWM3.FCTRL20)
  4269. #define FLEXPWM4_SM0CNT (IMXRT_FLEXPWM4.SM[0].CNT)
  4270. #define FLEXPWM4_SM0INIT (IMXRT_FLEXPWM4.SM[0].INIT)
  4271. #define FLEXPWM4_SM0CTRL2 (IMXRT_FLEXPWM4.SM[0].CTRL2)
  4272. #define FLEXPWM4_SM0CTRL (IMXRT_FLEXPWM4.SM[0].CTRL)
  4273. #define FLEXPWM4_SM0VAL0 (IMXRT_FLEXPWM4.SM[0].VAL0)
  4274. #define FLEXPWM4_SM0FRACVAL1 (IMXRT_FLEXPWM4.SM[0].FRACVAL1)
  4275. #define FLEXPWM4_SM0VAL1 (IMXRT_FLEXPWM4.SM[0].VAL1)
  4276. #define FLEXPWM4_SM0FRACVAL2 (IMXRT_FLEXPWM4.SM[0].FRACVAL2)
  4277. #define FLEXPWM4_SM0VAL2 (IMXRT_FLEXPWM4.SM[0].VAL2)
  4278. #define FLEXPWM4_SM0FRACVAL3 (IMXRT_FLEXPWM4.SM[0].FRACVAL3)
  4279. #define FLEXPWM4_SM0VAL3 (IMXRT_FLEXPWM4.SM[0].VAL3)
  4280. #define FLEXPWM4_SM0FRACVAL4 (IMXRT_FLEXPWM4.SM[0].FRACVAL4)
  4281. #define FLEXPWM4_SM0VAL4 (IMXRT_FLEXPWM4.SM[0].VAL4)
  4282. #define FLEXPWM4_SM0FRACVAL5 (IMXRT_FLEXPWM4.SM[0].FRACVAL5)
  4283. #define FLEXPWM4_SM0VAL5 (IMXRT_FLEXPWM4.SM[0].VAL5)
  4284. #define FLEXPWM4_SM0FRCTRL (IMXRT_FLEXPWM4.SM[0].FRCTRL)
  4285. #define FLEXPWM4_SM0OCTRL (IMXRT_FLEXPWM4.SM[0].OCTRL)
  4286. #define FLEXPWM4_SM0STS (IMXRT_FLEXPWM4.SM[0].STS)
  4287. #define FLEXPWM4_SM0INTEN (IMXRT_FLEXPWM4.SM[0].INTEN)
  4288. #define FLEXPWM4_SM0DMAEN (IMXRT_FLEXPWM4.SM[0].DMAEN)
  4289. #define FLEXPWM4_SM0TCTRL (IMXRT_FLEXPWM4.SM[0].TCTRL)
  4290. #define FLEXPWM4_SM0DISMAP0 (IMXRT_FLEXPWM4.SM[0].DISMAP0)
  4291. #define FLEXPWM4_SM0DISMAP1 (IMXRT_FLEXPWM4.SM[0].DISMAP1)
  4292. #define FLEXPWM4_SM0DTCNT0 (IMXRT_FLEXPWM4.SM[0].DTCNT0)
  4293. #define FLEXPWM4_SM0DTCNT1 (IMXRT_FLEXPWM4.SM[0].DTCNT1)
  4294. #define FLEXPWM4_SM0CAPTCTRLA (IMXRT_FLEXPWM4.SM[0].CAPTCTRLA)
  4295. #define FLEXPWM4_SM0CAPTCOMPA (IMXRT_FLEXPWM4.SM[0].CAPTCOMPA)
  4296. #define FLEXPWM4_SM0CAPTCTRLB (IMXRT_FLEXPWM4.SM[0].CAPTCTRLB)
  4297. #define FLEXPWM4_SM0CAPTCOMPB (IMXRT_FLEXPWM4.SM[0].CAPTCOMPB)
  4298. #define FLEXPWM4_SM0CAPTCTRLX (IMXRT_FLEXPWM4.SM[0].CAPTCTRLX)
  4299. #define FLEXPWM4_SM0CAPTCOMPX (IMXRT_FLEXPWM4.SM[0].CAPTCOMPX)
  4300. #define FLEXPWM4_SM0CVAL0 (IMXRT_FLEXPWM4.SM[0].CVAL0)
  4301. #define FLEXPWM4_SM0CVAL0CYC (IMXRT_FLEXPWM4.SM[0].CVAL0CYC)
  4302. #define FLEXPWM4_SM0CVAL1 (IMXRT_FLEXPWM4.SM[0].CVAL1)
  4303. #define FLEXPWM4_SM0CVAL1CYC (IMXRT_FLEXPWM4.SM[0].CVAL1CYC)
  4304. #define FLEXPWM4_SM0CVAL2 (IMXRT_FLEXPWM4.SM[0].CVAL2)
  4305. #define FLEXPWM4_SM0CVAL2CYC (IMXRT_FLEXPWM4.SM[0].CVAL2CYC)
  4306. #define FLEXPWM4_SM0CVAL3 (IMXRT_FLEXPWM4.SM[0].CVAL3)
  4307. #define FLEXPWM4_SM0CVAL3CYC (IMXRT_FLEXPWM4.SM[0].CVAL3CYC)
  4308. #define FLEXPWM4_SM0CVAL4 (IMXRT_FLEXPWM4.SM[0].CVAL4)
  4309. #define FLEXPWM4_SM0CVAL4CYC (IMXRT_FLEXPWM4.SM[0].CVAL4CYC)
  4310. #define FLEXPWM4_SM0CVAL5 (IMXRT_FLEXPWM4.SM[0].CVAL5)
  4311. #define FLEXPWM4_SM0CVAL5CYC (IMXRT_FLEXPWM4.SM[0].CVAL5CYC)
  4312. #define FLEXPWM4_SM1CNT (IMXRT_FLEXPWM4.SM[1].CNT)
  4313. #define FLEXPWM4_SM1INIT (IMXRT_FLEXPWM4.SM[1].INIT)
  4314. #define FLEXPWM4_SM1CTRL2 (IMXRT_FLEXPWM4.SM[1].CTRL2)
  4315. #define FLEXPWM4_SM1CTRL (IMXRT_FLEXPWM4.SM[1].CTRL)
  4316. #define FLEXPWM4_SM1VAL0 (IMXRT_FLEXPWM4.SM[1].VAL0)
  4317. #define FLEXPWM4_SM1FRACVAL1 (IMXRT_FLEXPWM4.SM[1].FRACVAL1)
  4318. #define FLEXPWM4_SM1VAL1 (IMXRT_FLEXPWM4.SM[1].VAL1)
  4319. #define FLEXPWM4_SM1FRACVAL2 (IMXRT_FLEXPWM4.SM[1].FRACVAL2)
  4320. #define FLEXPWM4_SM1VAL2 (IMXRT_FLEXPWM4.SM[1].VAL2)
  4321. #define FLEXPWM4_SM1FRACVAL3 (IMXRT_FLEXPWM4.SM[1].FRACVAL3)
  4322. #define FLEXPWM4_SM1VAL3 (IMXRT_FLEXPWM4.SM[1].VAL3)
  4323. #define FLEXPWM4_SM1FRACVAL4 (IMXRT_FLEXPWM4.SM[1].FRACVAL4)
  4324. #define FLEXPWM4_SM1VAL4 (IMXRT_FLEXPWM4.SM[1].VAL4)
  4325. #define FLEXPWM4_SM1FRACVAL5 (IMXRT_FLEXPWM4.SM[1].FRACVAL5)
  4326. #define FLEXPWM4_SM1VAL5 (IMXRT_FLEXPWM4.SM[1].VAL5)
  4327. #define FLEXPWM4_SM1FRCTRL (IMXRT_FLEXPWM4.SM[1].FRCTRL)
  4328. #define FLEXPWM4_SM1OCTRL (IMXRT_FLEXPWM4.SM[1].OCTRL)
  4329. #define FLEXPWM4_SM1STS (IMXRT_FLEXPWM4.SM[1].STS)
  4330. #define FLEXPWM4_SM1INTEN (IMXRT_FLEXPWM4.SM[1].INTEN)
  4331. #define FLEXPWM4_SM1DMAEN (IMXRT_FLEXPWM4.SM[1].DMAEN)
  4332. #define FLEXPWM4_SM1TCTRL (IMXRT_FLEXPWM4.SM[1].TCTRL)
  4333. #define FLEXPWM4_SM1DISMAP0 (IMXRT_FLEXPWM4.SM[1].DISMAP0)
  4334. #define FLEXPWM4_SM1DISMAP1 (IMXRT_FLEXPWM4.SM[1].DISMAP1)
  4335. #define FLEXPWM4_SM1DTCNT0 (IMXRT_FLEXPWM4.SM[1].DTCNT0)
  4336. #define FLEXPWM4_SM1DTCNT1 (IMXRT_FLEXPWM4.SM[1].DTCNT1)
  4337. #define FLEXPWM4_SM1CAPTCTRLA (IMXRT_FLEXPWM4.SM[1].CAPTCTRLA)
  4338. #define FLEXPWM4_SM1CAPTCOMPA (IMXRT_FLEXPWM4.SM[1].CAPTCOMPA)
  4339. #define FLEXPWM4_SM1CAPTCTRLB (IMXRT_FLEXPWM4.SM[1].CAPTCTRLB)
  4340. #define FLEXPWM4_SM1CAPTCOMPB (IMXRT_FLEXPWM4.SM[1].CAPTCOMPB)
  4341. #define FLEXPWM4_SM1CAPTCTRLX (IMXRT_FLEXPWM4.SM[1].CAPTCTRLX)
  4342. #define FLEXPWM4_SM1CAPTCOMPX (IMXRT_FLEXPWM4.SM[1].CAPTCOMPX)
  4343. #define FLEXPWM4_SM1CVAL0 (IMXRT_FLEXPWM4.SM[1].CVAL0)
  4344. #define FLEXPWM4_SM1CVAL0CYC (IMXRT_FLEXPWM4.SM[1].CVAL0CYC)
  4345. #define FLEXPWM4_SM1CVAL1 (IMXRT_FLEXPWM4.SM[1].CVAL1)
  4346. #define FLEXPWM4_SM1CVAL1CYC (IMXRT_FLEXPWM4.SM[1].CVAL1CYC)
  4347. #define FLEXPWM4_SM1CVAL2 (IMXRT_FLEXPWM4.SM[1].CVAL2)
  4348. #define FLEXPWM4_SM1CVAL2CYC (IMXRT_FLEXPWM4.SM[1].CVAL2CYC)
  4349. #define FLEXPWM4_SM1CVAL3 (IMXRT_FLEXPWM4.SM[1].CVAL3)
  4350. #define FLEXPWM4_SM1CVAL3CYC (IMXRT_FLEXPWM4.SM[1].CVAL3CYC)
  4351. #define FLEXPWM4_SM1CVAL4 (IMXRT_FLEXPWM4.SM[1].CVAL4)
  4352. #define FLEXPWM4_SM1CVAL4CYC (IMXRT_FLEXPWM4.SM[1].CVAL4CYC)
  4353. #define FLEXPWM4_SM1CVAL5 (IMXRT_FLEXPWM4.SM[1].CVAL5)
  4354. #define FLEXPWM4_SM1CVAL5CYC (IMXRT_FLEXPWM4.SM[1].CVAL5CYC)
  4355. #define FLEXPWM4_SM2CNT (IMXRT_FLEXPWM4.SM[2].CNT)
  4356. #define FLEXPWM4_SM2INIT (IMXRT_FLEXPWM4.SM[2].INIT)
  4357. #define FLEXPWM4_SM2CTRL2 (IMXRT_FLEXPWM4.SM[2].CTRL2)
  4358. #define FLEXPWM4_SM2CTRL (IMXRT_FLEXPWM4.SM[2].CTRL)
  4359. #define FLEXPWM4_SM2VAL0 (IMXRT_FLEXPWM4.SM[2].VAL0)
  4360. #define FLEXPWM4_SM2FRACVAL1 (IMXRT_FLEXPWM4.SM[2].FRACVAL1)
  4361. #define FLEXPWM4_SM2VAL1 (IMXRT_FLEXPWM4.SM[2].VAL1)
  4362. #define FLEXPWM4_SM2FRACVAL2 (IMXRT_FLEXPWM4.SM[2].FRACVAL2)
  4363. #define FLEXPWM4_SM2VAL2 (IMXRT_FLEXPWM4.SM[2].VAL2)
  4364. #define FLEXPWM4_SM2FRACVAL3 (IMXRT_FLEXPWM4.SM[2].FRACVAL3)
  4365. #define FLEXPWM4_SM2VAL3 (IMXRT_FLEXPWM4.SM[2].VAL3)
  4366. #define FLEXPWM4_SM2FRACVAL4 (IMXRT_FLEXPWM4.SM[2].FRACVAL4)
  4367. #define FLEXPWM4_SM2VAL4 (IMXRT_FLEXPWM4.SM[2].VAL4)
  4368. #define FLEXPWM4_SM2FRACVAL5 (IMXRT_FLEXPWM4.SM[2].FRACVAL5)
  4369. #define FLEXPWM4_SM2VAL5 (IMXRT_FLEXPWM4.SM[2].VAL5)
  4370. #define FLEXPWM4_SM2FRCTRL (IMXRT_FLEXPWM4.SM[2].FRCTRL)
  4371. #define FLEXPWM4_SM2OCTRL (IMXRT_FLEXPWM4.SM[2].OCTRL)
  4372. #define FLEXPWM4_SM2STS (IMXRT_FLEXPWM4.SM[2].STS)
  4373. #define FLEXPWM4_SM2INTEN (IMXRT_FLEXPWM4.SM[2].INTEN)
  4374. #define FLEXPWM4_SM2DMAEN (IMXRT_FLEXPWM4.SM[2].DMAEN)
  4375. #define FLEXPWM4_SM2TCTRL (IMXRT_FLEXPWM4.SM[2].TCTRL)
  4376. #define FLEXPWM4_SM2DISMAP0 (IMXRT_FLEXPWM4.SM[2].DISMAP0)
  4377. #define FLEXPWM4_SM2DISMAP1 (IMXRT_FLEXPWM4.SM[2].DISMAP1)
  4378. #define FLEXPWM4_SM2DTCNT0 (IMXRT_FLEXPWM4.SM[2].DTCNT0)
  4379. #define FLEXPWM4_SM2DTCNT1 (IMXRT_FLEXPWM4.SM[2].DTCNT1)
  4380. #define FLEXPWM4_SM2CAPTCTRLA (IMXRT_FLEXPWM4.SM[2].CAPTCTRLA)
  4381. #define FLEXPWM4_SM2CAPTCOMPA (IMXRT_FLEXPWM4.SM[2].CAPTCOMPA)
  4382. #define FLEXPWM4_SM2CAPTCTRLB (IMXRT_FLEXPWM4.SM[2].CAPTCTRLB)
  4383. #define FLEXPWM4_SM2CAPTCOMPB (IMXRT_FLEXPWM4.SM[2].CAPTCOMPB)
  4384. #define FLEXPWM4_SM2CAPTCTRLX (IMXRT_FLEXPWM4.SM[2].CAPTCTRLX)
  4385. #define FLEXPWM4_SM2CAPTCOMPX (IMXRT_FLEXPWM4.SM[2].CAPTCOMPX)
  4386. #define FLEXPWM4_SM2CVAL0 (IMXRT_FLEXPWM4.SM[2].CVAL0)
  4387. #define FLEXPWM4_SM2CVAL0CYC (IMXRT_FLEXPWM4.SM[2].CVAL0CYC)
  4388. #define FLEXPWM4_SM2CVAL1 (IMXRT_FLEXPWM4.SM[2].CVAL1)
  4389. #define FLEXPWM4_SM2CVAL1CYC (IMXRT_FLEXPWM4.SM[2].CVAL1CYC)
  4390. #define FLEXPWM4_SM2CVAL2 (IMXRT_FLEXPWM4.SM[2].CVAL2)
  4391. #define FLEXPWM4_SM2CVAL2CYC (IMXRT_FLEXPWM4.SM[2].CVAL2CYC)
  4392. #define FLEXPWM4_SM2CVAL3 (IMXRT_FLEXPWM4.SM[2].CVAL3)
  4393. #define FLEXPWM4_SM2CVAL3CYC (IMXRT_FLEXPWM4.SM[2].CVAL3CYC)
  4394. #define FLEXPWM4_SM2CVAL4 (IMXRT_FLEXPWM4.SM[2].CVAL4)
  4395. #define FLEXPWM4_SM2CVAL4CYC (IMXRT_FLEXPWM4.SM[2].CVAL4CYC)
  4396. #define FLEXPWM4_SM2CVAL5 (IMXRT_FLEXPWM4.SM[2].CVAL5)
  4397. #define FLEXPWM4_SM2CVAL5CYC (IMXRT_FLEXPWM4.SM[2].CVAL5CYC)
  4398. #define FLEXPWM4_SM3CNT (IMXRT_FLEXPWM4.SM[3].CNT)
  4399. #define FLEXPWM4_SM3INIT (IMXRT_FLEXPWM4.SM[3].INIT)
  4400. #define FLEXPWM4_SM3CTRL2 (IMXRT_FLEXPWM4.SM[3].CTRL2)
  4401. #define FLEXPWM4_SM3CTRL (IMXRT_FLEXPWM4.SM[3].CTRL)
  4402. #define FLEXPWM4_SM3VAL0 (IMXRT_FLEXPWM4.SM[3].VAL0)
  4403. #define FLEXPWM4_SM3FRACVAL1 (IMXRT_FLEXPWM4.SM[3].FRACVAL1)
  4404. #define FLEXPWM4_SM3VAL1 (IMXRT_FLEXPWM4.SM[3].VAL1)
  4405. #define FLEXPWM4_SM3FRACVAL2 (IMXRT_FLEXPWM4.SM[3].FRACVAL2)
  4406. #define FLEXPWM4_SM3VAL2 (IMXRT_FLEXPWM4.SM[3].VAL2)
  4407. #define FLEXPWM4_SM3FRACVAL3 (IMXRT_FLEXPWM4.SM[3].FRACVAL3)
  4408. #define FLEXPWM4_SM3VAL3 (IMXRT_FLEXPWM4.SM[3].VAL3)
  4409. #define FLEXPWM4_SM3FRACVAL4 (IMXRT_FLEXPWM4.SM[3].FRACVAL4)
  4410. #define FLEXPWM4_SM3VAL4 (IMXRT_FLEXPWM4.SM[3].VAL4)
  4411. #define FLEXPWM4_SM3FRACVAL5 (IMXRT_FLEXPWM4.SM[3].FRACVAL5)
  4412. #define FLEXPWM4_SM3VAL5 (IMXRT_FLEXPWM4.SM[3].VAL5)
  4413. #define FLEXPWM4_SM3FRCTRL (IMXRT_FLEXPWM4.SM[3].FRCTRL)
  4414. #define FLEXPWM4_SM3OCTRL (IMXRT_FLEXPWM4.SM[3].OCTRL)
  4415. #define FLEXPWM4_SM3STS (IMXRT_FLEXPWM4.SM[3].STS)
  4416. #define FLEXPWM4_SM3INTEN (IMXRT_FLEXPWM4.SM[3].INTEN)
  4417. #define FLEXPWM4_SM3DMAEN (IMXRT_FLEXPWM4.SM[3].DMAEN)
  4418. #define FLEXPWM4_SM3TCTRL (IMXRT_FLEXPWM4.SM[3].TCTRL)
  4419. #define FLEXPWM4_SM3DISMAP0 (IMXRT_FLEXPWM4.SM[3].DISMAP0)
  4420. #define FLEXPWM4_SM3DISMAP1 (IMXRT_FLEXPWM4.SM[3].DISMAP1)
  4421. #define FLEXPWM4_SM3DTCNT0 (IMXRT_FLEXPWM4.SM[3].DTCNT0)
  4422. #define FLEXPWM4_SM3DTCNT1 (IMXRT_FLEXPWM4.SM[3].DTCNT1)
  4423. #define FLEXPWM4_SM3CAPTCTRLA (IMXRT_FLEXPWM4.SM[3].CAPTCTRLA)
  4424. #define FLEXPWM4_SM3CAPTCOMPA (IMXRT_FLEXPWM4.SM[3].CAPTCOMPA)
  4425. #define FLEXPWM4_SM3CAPTCTRLB (IMXRT_FLEXPWM4.SM[3].CAPTCTRLB)
  4426. #define FLEXPWM4_SM3CAPTCOMPB (IMXRT_FLEXPWM4.SM[3].CAPTCOMPB)
  4427. #define FLEXPWM4_SM3CAPTCTRLX (IMXRT_FLEXPWM4.SM[3].CAPTCTRLX)
  4428. #define FLEXPWM4_SM3CAPTCOMPX (IMXRT_FLEXPWM4.SM[3].CAPTCOMPX)
  4429. #define FLEXPWM4_SM3CVAL0 (IMXRT_FLEXPWM4.SM[3].CVAL0)
  4430. #define FLEXPWM4_SM3CVAL0CYC (IMXRT_FLEXPWM4.SM[3].CVAL0CYC)
  4431. #define FLEXPWM4_SM3CVAL1 (IMXRT_FLEXPWM4.SM[3].CVAL1)
  4432. #define FLEXPWM4_SM3CVAL1CYC (IMXRT_FLEXPWM4.SM[3].CVAL1CYC)
  4433. #define FLEXPWM4_SM3CVAL2 (IMXRT_FLEXPWM4.SM[3].CVAL2)
  4434. #define FLEXPWM4_SM3CVAL2CYC (IMXRT_FLEXPWM4.SM[3].CVAL2CYC)
  4435. #define FLEXPWM4_SM3CVAL3 (IMXRT_FLEXPWM4.SM[3].CVAL3)
  4436. #define FLEXPWM4_SM3CVAL3CYC (IMXRT_FLEXPWM4.SM[3].CVAL3CYC)
  4437. #define FLEXPWM4_SM3CVAL4 (IMXRT_FLEXPWM4.SM[3].CVAL4)
  4438. #define FLEXPWM4_SM3CVAL4CYC (IMXRT_FLEXPWM4.SM[3].CVAL4CYC)
  4439. #define FLEXPWM4_SM3CVAL5 (IMXRT_FLEXPWM4.SM[3].CVAL5)
  4440. #define FLEXPWM4_SM3CVAL5CYC (IMXRT_FLEXPWM4.SM[3].CVAL5CYC)
  4441. #define FLEXPWM4_OUTEN (IMXRT_FLEXPWM4.OUTEN)
  4442. #define FLEXPWM4_MASK (IMXRT_FLEXPWM4.MASK)
  4443. #define FLEXPWM4_SWCOUT (IMXRT_FLEXPWM4.SWCOUT)
  4444. #define FLEXPWM4_DTSRCSEL (IMXRT_FLEXPWM4.DTSRCSEL)
  4445. #define FLEXPWM4_MCTRL (IMXRT_FLEXPWM4.MCTRL)
  4446. #define FLEXPWM4_MCTRL2 (IMXRT_FLEXPWM4.MCTRL2)
  4447. #define FLEXPWM4_FCTRL0 (IMXRT_FLEXPWM4.FCTRL0)
  4448. #define FLEXPWM4_FSTS0 (IMXRT_FLEXPWM4.FSTS0)
  4449. #define FLEXPWM4_FFILT0 (IMXRT_FLEXPWM4.FFILT0)
  4450. #define FLEXPWM4_FTST0 (IMXRT_FLEXPWM4.FTST0)
  4451. #define FLEXPWM4_FCTRL20 (IMXRT_FLEXPWM4.FCTRL20)
  4452. // page 1361
  4453. #define FLEXPWM_SMCTRL2_DBGEN ((uint16_t)(1<<15))
  4454. #define FLEXPWM_SMCTRL2_WAITEN ((uint16_t)(1<<14))
  4455. #define FLEXPWM_SMCTRL2_INDEP ((uint16_t)(1<<13))
  4456. #define FLEXPWM_SMCTRL2_PWM23_INIT ((uint16_t)(1<<12))
  4457. #define FLEXPWM_SMCTRL2_PWM45_INIT ((uint16_t)(1<<11))
  4458. #define FLEXPWM_SMCTRL2_PWMX_INIT ((uint16_t)(1<<10))
  4459. #define FLEXPWM_SMCTRL2_INIT_SEL(n) ((uint16_t)(((n) & 0x03) << 8))
  4460. #define FLEXPWM_SMCTRL2_FRCEN ((uint16_t)(1<<7))
  4461. #define FLEXPWM_SMCTRL2_FORCE ((uint16_t)(1<<6))
  4462. #define FLEXPWM_SMCTRL2_FORCE_SEL(n) ((uint16_t)(((n) & 0x07) << 3))
  4463. #define FLEXPWM_SMCTRL2_RELOAD_SEL ((uint16_t)(1<<2))
  4464. #define FLEXPWM_SMCTRL2_CLK_SEL(n) ((uint16_t)(((n) & 0x03) << 0))
  4465. #define FLEXPWM_SMCTRL_LDFQ(n) ((uint16_t)(((n) & 0x0F) << 12))
  4466. #define FLEXPWM_SMCTRL_HALF ((uint16_t)(1<<11))
  4467. #define FLEXPWM_SMCTRL_FULL ((uint16_t)(1<<10))
  4468. #define FLEXPWM_SMCTRL_DT(n) ((uint16_t)(((n) & 0x03) << 8))
  4469. #define FLEXPWM_SMCTRL_COMPMODE ((uint16_t)(1<<7))
  4470. #define FLEXPWM_SMCTRL_PRSC(n) ((uint16_t)(((n) & 0x0F) << 4))
  4471. #define FLEXPWM_SMCTRL_SPLIT ((uint16_t)(1<<3))
  4472. #define FLEXPWM_SMCTRL_LDMOD ((uint16_t)(1<<2))
  4473. #define FLEXPWM_SMCTRL_DBLX ((uint16_t)(1<<1))
  4474. #define FLEXPWM_SMCTRL_DBLEN ((uint16_t)(1<<0))
  4475. #define FLEXPWM_SMFRCTRL_TEST ((uint16_t)(1<<15))
  4476. #define FLEXPWM_SMFRCTRL_FRAC_PU ((uint16_t)(1<<8))
  4477. #define FLEXPWM_SMFRCTRL_FRAC45_EN ((uint16_t)(1<<4))
  4478. #define FLEXPWM_SMFRCTRL_FRAC23_EN ((uint16_t)(1<<2))
  4479. #define FLEXPWM_SMFRCTRL_FRAC1_EN ((uint16_t)(1<<1))
  4480. #define FLEXPWM_SMOCTRL_PWMA_IN ((uint16_t)(1<<15))
  4481. #define FLEXPWM_SMOCTRL_PWMB_IN ((uint16_t)(1<<14))
  4482. #define FLEXPWM_SMOCTRL_PWMX_IN ((uint16_t)(1<<13))
  4483. #define FLEXPWM_SMOCTRL_POLA ((uint16_t)(1<<10))
  4484. #define FLEXPWM_SMOCTRL_POLB ((uint16_t)(1<<9))
  4485. #define FLEXPWM_SMOCTRL_POLX ((uint16_t)(1<<8))
  4486. #define FLEXPWM_SMOCTRL_PWMAFS(n) ((uint16_t)(((n) & 0x03) << 4))
  4487. #define FLEXPWM_SMOCTRL_PWMBFS(n) ((uint16_t)(((n) & 0x03) << 2))
  4488. #define FLEXPWM_SMOCTRL_PWMXFS(n) ((uint16_t)(((n) & 0x03) << 0))
  4489. #define FLEXPWM_SMSTS_RUF ((uint16_t)(1<<14))
  4490. #define FLEXPWM_SMSTS_REF ((uint16_t)(1<<13))
  4491. #define FLEXPWM_SMSTS_RF ((uint16_t)(1<<12))
  4492. #define FLEXPWM_SMSTS_CFA1 ((uint16_t)(1<<11))
  4493. #define FLEXPWM_SMSTS_CFA0 ((uint16_t)(1<<10))
  4494. #define FLEXPWM_SMSTS_CFB1 ((uint16_t)(1<<9))
  4495. #define FLEXPWM_SMSTS_CFB0 ((uint16_t)(1<<8))
  4496. #define FLEXPWM_SMSTS_CFX1 ((uint16_t)(1<<7))
  4497. #define FLEXPWM_SMSTS_CFX0 ((uint16_t)(1<<6))
  4498. #define FLEXPWM_SMSTS_CMPF(n) ((uint16_t)(((n) & 0x3F) << 0))
  4499. #define FLEXPWM_SMINTEN_REIE ((uint16_t)(1<<13))
  4500. #define FLEXPWM_SMINTEN_RIE ((uint16_t)(1<<12))
  4501. #define FLEXPWM_SMINTEN_CA1IE ((uint16_t)(1<<11))
  4502. #define FLEXPWM_SMINTEN_CA0IE ((uint16_t)(1<<10))
  4503. #define FLEXPWM_SMINTEN_CB1IE ((uint16_t)(1<<9))
  4504. #define FLEXPWM_SMINTEN_CB0IE ((uint16_t)(1<<8))
  4505. #define FLEXPWM_SMINTEN_CX1IE ((uint16_t)(1<<7))
  4506. #define FLEXPWM_SMINTEN_CX0IE ((uint16_t)(1<<6))
  4507. #define FLEXPWM_SMINTEN_CMPIE(n) ((uint16_t)(((n) & 0x3F) << 0))
  4508. #define FLEXPWM_SMDMAEN_VALDE ((uint16_t)(1<<9))
  4509. #define FLEXPWM_SMDMAEN_FAND ((uint16_t)(1<<8))
  4510. #define FLEXPWM_SMDMAEN_CAPTDE(n) ((uint16_t)(((n) & 0x03) << 6))
  4511. #define FLEXPWM_SMDMAEN_CA1DE ((uint16_t)(1<<5))
  4512. #define FLEXPWM_SMDMAEN_CA0DE ((uint16_t)(1<<4))
  4513. #define FLEXPWM_SMDMAEN_CB1DE ((uint16_t)(1<<3))
  4514. #define FLEXPWM_SMDMAEN_CB0DE ((uint16_t)(1<<2))
  4515. #define FLEXPWM_SMDMAEN_CX1DE ((uint16_t)(1<<1))
  4516. #define FLEXPWM_SMDMAEN_CX0DE ((uint16_t)(1<<0))
  4517. #define FLEXPWM_SMTCTRL_PWAOT0 ((uint16_t)(1<<15))
  4518. #define FLEXPWM_SMTCTRL_PWBOT1 ((uint16_t)(1<<14))
  4519. #define FLEXPWM_SMTCTRL_TRGFRQ ((uint16_t)(1<<12))
  4520. #define FLEXPWM_SMTCTRL_OUT_TRIG_EN(n) ((uint16_t)(((n) & 0x1F) << 0))
  4521. #define FLEXPWM_SMDISMAP0_DIS0X(n) ((uint16_t)(((n) & 0x0F) << 8))
  4522. #define FLEXPWM_SMDISMAP0_DIS0B(n) ((uint16_t)(((n) & 0x0F) << 4))
  4523. #define FLEXPWM_SMDISMAP0_DIS0A(n) ((uint16_t)(((n) & 0x0F) << 0))
  4524. #define FLEXPWM_SMDISMAP1_DIS1X(n) ((uint16_t)(((n) & 0x0F) << 8))
  4525. #define FLEXPWM_SMDISMAP1_DIS1B(n) ((uint16_t)(((n) & 0x0F) << 4))
  4526. #define FLEXPWM_SMDISMAP1_DIS1A(n) ((uint16_t)(((n) & 0x0F) << 0))
  4527. #define FLEXPWM_SMCAPTCTRLA_CA1CNT(n) ((uint16_t)(((n) & 0x07) << 13))
  4528. #define FLEXPWM_SMCAPTCTRLA_CA0CNT(n) ((uint16_t)(((n) & 0x07) << 10))
  4529. #define FLEXPWM_SMCAPTCTRLA_CFAWM(n) ((uint16_t)(((n) & 0x03) << 8))
  4530. #define FLEXPWM_SMCAPTCTRLA_EDGCNTA_EN ((uint16_t)(1<<7))
  4531. #define FLEXPWM_SMCAPTCTRLA_INP_SELA ((uint16_t)(1<<6))
  4532. #define FLEXPWM_SMCAPTCTRLA_EDGA1(n) ((uint16_t)(((n) & 0x03) << 4))
  4533. #define FLEXPWM_SMCAPTCTRLA_EDGA0(n) ((uint16_t)(((n) & 0x03) << 2))
  4534. #define FLEXPWM_SMCAPTCTRLA_ONESHOTA ((uint16_t)(1<<1))
  4535. #define FLEXPWM_SMCAPTCTRLA_ARMA ((uint16_t)(1<<0))
  4536. #define FLEXPWM_SMCAPTCOMPA_EDGCNTA(n) ((uint16_t)(((n) & 0xFF) << 8))
  4537. #define FLEXPWM_SMCAPTCOMPA_EDGCMPA(n) ((uint16_t)(((n) & 0xFF) << 0))
  4538. #define FLEXPWM_SMCAPTCTRLB_CB1CNT(n) ((uint16_t)(((n) & 0x07) << 13))
  4539. #define FLEXPWM_SMCAPTCTRLB_CB0CNT(n) ((uint16_t)(((n) & 0x07) << 10))
  4540. #define FLEXPWM_SMCAPTCTRLB_CFBWM(n) ((uint16_t)(((n) & 0x03) << 8))
  4541. #define FLEXPWM_SMCAPTCTRLB_EDGCNTB_EN ((uint16_t)(1<<7))
  4542. #define FLEXPWM_SMCAPTCTRLB_INP_SELB ((uint16_t)(1<<6))
  4543. #define FLEXPWM_SMCAPTCTRLB_EDGB1(n) ((uint16_t)(((n) & 0x03) << 4))
  4544. #define FLEXPWM_SMCAPTCTRLB_EDGB0(n) ((uint16_t)(((n) & 0x03) << 2))
  4545. #define FLEXPWM_SMCAPTCTRLB_ONESHOTB ((uint16_t)(1<<1))
  4546. #define FLEXPWM_SMCAPTCTRLB_ARMB ((uint16_t)(1<<0))
  4547. #define FLEXPWM_SMCAPTCOMPB_EDGCNTB(n) ((uint16_t)(((n) & 0xFF) << 8))
  4548. #define FLEXPWM_SMCAPTCOMPB_EDGCMPB(n) ((uint16_t)(((n) & 0xFF) << 0))
  4549. #define FLEXPWM_SMCAPTCTRLX_CX1CNT(n) ((uint16_t)(((n) & 0x07) << 13))
  4550. #define FLEXPWM_SMCAPTCTRLX_CX0CNT(n) ((uint16_t)(((n) & 0x07) << 10))
  4551. #define FLEXPWM_SMCAPTCTRLX_CFXWM(n) ((uint16_t)(((n) & 0x03) << 8))
  4552. #define FLEXPWM_SMCAPTCTRLX_EDGCNTX_EN ((uint16_t)(1<<7))
  4553. #define FLEXPWM_SMCAPTCTRLX_INP_SELX ((uint16_t)(1<<6))
  4554. #define FLEXPWM_SMCAPTCTRLX_EDGX1(n) ((uint16_t)(((n) & 0x03) << 4))
  4555. #define FLEXPWM_SMCAPTCTRLX_EDGX0(n) ((uint16_t)(((n) & 0x03) << 2))
  4556. #define FLEXPWM_SMCAPTCTRLX_ONESHOTX ((uint16_t)(1<<1))
  4557. #define FLEXPWM_SMCAPTCTRLX_ARMX ((uint16_t)(1<<0))
  4558. #define FLEXPWM_SMCAPTCOMPX_EDGCNTX(n) ((uint16_t)(((n) & 0xFF) << 8))
  4559. #define FLEXPWM_SMCAPTCOMPX_EDGCMPX(n) ((uint16_t)(((n) & 0xFF) << 0))
  4560. #define FLEXPWM_OUTEN_PWMA_EN(n) ((uint16_t)(((n) & 0x0F) << 8))
  4561. #define FLEXPWM_OUTEN_PWMB_EN(n) ((uint16_t)(((n) & 0x0F) << 4))
  4562. #define FLEXPWM_OUTEN_PWMX_EN(n) ((uint16_t)(((n) & 0x0F) << 0))
  4563. #define FLEXPWM_MASK_UPDATE_MASK(n) ((uint16_t)(((n) & 0x0F) << 12))
  4564. #define FLEXPWM_MASK_MASKA(n) ((uint16_t)(((n) & 0x0F) << 8))
  4565. #define FLEXPWM_MASK_MASKB(n) ((uint16_t)(((n) & 0x0F) << 4))
  4566. #define FLEXPWM_MASK_MASKX(n) ((uint16_t)(((n) & 0x0F) << 0))
  4567. #define FLEXPWM_SWCOUT_SM3OUT23 ((uint16_t)(1<<7))
  4568. #define FLEXPWM_SWCOUT_SM3OUT45 ((uint16_t)(1<<6))
  4569. #define FLEXPWM_SWCOUT_SM2OUT23 ((uint16_t)(1<<5))
  4570. #define FLEXPWM_SWCOUT_SM2OUT45 ((uint16_t)(1<<4))
  4571. #define FLEXPWM_SWCOUT_SM1OUT23 ((uint16_t)(1<<3))
  4572. #define FLEXPWM_SWCOUT_SM1OUT45 ((uint16_t)(1<<2))
  4573. #define FLEXPWM_SWCOUT_SM0OUT23 ((uint16_t)(1<<1))
  4574. #define FLEXPWM_SWCOUT_SM0OUT45 ((uint16_t)(1<<0))
  4575. #define FLEXPWM_DTSRCSEL_SM3SEL23(n) ((uint16_t)(((n) & 0x03) << 14))
  4576. #define FLEXPWM_DTSRCSEL_SM3SEL45(n) ((uint16_t)(((n) & 0x03) << 12))
  4577. #define FLEXPWM_DTSRCSEL_SM2SEL23(n) ((uint16_t)(((n) & 0x03) << 10))
  4578. #define FLEXPWM_DTSRCSEL_SM2SEL45(n) ((uint16_t)(((n) & 0x03) << 8))
  4579. #define FLEXPWM_DTSRCSEL_SM1SEL23(n) ((uint16_t)(((n) & 0x03) << 6))
  4580. #define FLEXPWM_DTSRCSEL_SM1SEL45(n) ((uint16_t)(((n) & 0x03) << 4))
  4581. #define FLEXPWM_DTSRCSEL_SM0SEL23(n) ((uint16_t)(((n) & 0x03) << 2))
  4582. #define FLEXPWM_DTSRCSEL_SM0SEL45(n) ((uint16_t)(((n) & 0x03) << 0))
  4583. #define FLEXPWM_MCTRL_IPOL(n) ((uint16_t)(((n) & 0x0F) << 12))
  4584. #define FLEXPWM_MCTRL_RUN(n) ((uint16_t)(((n) & 0x0F) << 8))
  4585. #define FLEXPWM_MCTRL_CLDOK(n) ((uint16_t)(((n) & 0x0F) << 4))
  4586. #define FLEXPWM_MCTRL_LDOK(n) ((uint16_t)(((n) & 0x0F) << 0))
  4587. #define FLEXPWM_MCTRL2_MONPLL(n) ((uint16_t)(((n) & 0x03) << 0))
  4588. #define FLEXPWM_FCTRL0_FLVL(n) ((uint16_t)(((n) & 0x0F) << 12))
  4589. #define FLEXPWM_FCTRL0_FAUTO(n) ((uint16_t)(((n) & 0x0F) << 8))
  4590. #define FLEXPWM_FCTRL0_FSAFE(n) ((uint16_t)(((n) & 0x0F) << 4))
  4591. #define FLEXPWM_FCTRL0_FIE(n) ((uint16_t)(((n) & 0x0F) << 0))
  4592. #define FLEXPWM_FSTS0_FHALF(n) ((uint16_t)(((n) & 0x0F) << 12))
  4593. #define FLEXPWM_FSTS0_FFPIN(n) ((uint16_t)(((n) & 0x0F) << 8))
  4594. #define FLEXPWM_FSTS0_FFULL(n) ((uint16_t)(((n) & 0x0F) << 4))
  4595. #define FLEXPWM_FSTS0_FFLAG(n) ((uint16_t)(((n) & 0x0F) << 0))
  4596. #define FLEXPWM_FFILT0_GSTR ((uint16_t)(1<<15))
  4597. #define FLEXPWM_FFILT0_FILT_CNT(n) ((uint16_t)(((n) & 0x07) << 8))
  4598. #define FLEXPWM_FFILT0_FILT_PER(n) ((uint16_t)(((n) & 0xFF) << 0))
  4599. #define FLEXPWM_FTST0_FTEST ((uint16_t)(1<<0))
  4600. #define FLEXPWM_FCTRL20_NOCOMB(n) ((uint16_t)(((n) & 0x0F) << 0))
  4601. // 29.3.1.1: page 1468
  4602. #define IMXRT_FLEXRAM (*(IMXRT_REGISTER32_t *)0x400B0000)
  4603. #define FLEXRAM_TCM_CTRL (IMXRT_FLEXRAM.offset000)
  4604. #define FLEXRAM_INT_STATUS (IMXRT_FLEXRAM.offset010)
  4605. #define FLEXRAM_INT_STAT_EN (IMXRT_FLEXRAM.offset014)
  4606. #define FLEXRAM_INT_SIG_EN (IMXRT_FLEXRAM.offset018)
  4607. #define FLEXRAM_TCM_CTRL_FORCE_CLK_ON ((uint32_t)(1<<2))
  4608. #define FLEXRAM_TCM_CTRL_TCM_RWAIT_EN ((uint32_t)(1<<1))
  4609. #define FLEXRAM_TCM_CTRL_TCM_WWAIT_EN ((uint32_t)(1<<0))
  4610. #define FLEXRAM_INT_STATUS_OCRAM_ERR_STATUS ((uint32_t)(1<<5))
  4611. #define FLEXRAM_INT_STATUS_DTCM_ERR_STATUS ((uint32_t)(1<<4))
  4612. #define FLEXRAM_INT_STATUS_ITCM_ERR_STATUS ((uint32_t)(1<<3))
  4613. #define FLEXRAM_INT_STAT_EN_OCRAM_ERR_STAT_EN ((uint32_t)(1<<5))
  4614. #define FLEXRAM_INT_STAT_EN_DTCM_ERR_STAT_EN ((uint32_t)(1<<4))
  4615. #define FLEXRAM_INT_STAT_EN_ITCM_ERR_STAT_EN ((uint32_t)(1<<3))
  4616. #define FLEXRAM_INT_SIG_EN_OCRAM_ERR_SIG_EN ((uint32_t)(1<<5))
  4617. #define FLEXRAM_INT_SIG_EN_DTCM_ERR_SIG_EN ((uint32_t)(1<<4))
  4618. #define FLEXRAM_INT_SIG_EN_ITCM_ERR_SIG_EN ((uint32_t)(1<<3))
  4619. // 30.5.2.1: page 1481
  4620. #define IMXRT_FLEXSPI (*(IMXRT_REGISTER32_t *)0x402A8000)
  4621. #define FLEXSPI_MCR0 (IMXRT_FLEXSPI.offset000)
  4622. #define FLEXSPI_MCR0_AHBGRANTWAIT(n) ((uint32_t)(((n) & 0xFF) << 24))
  4623. #define FLEXSPI_MCR0_AHBGRANTWAIT_MASK ((uint32_t)(0xFF << 24))
  4624. #define FLEXSPI_MCR0_IPGRANTWAIT(n) ((uint32_t)(((n) & 0xFF) << 16))
  4625. #define FLEXSPI_MCR0_IPGRANTWAIT_MASK ((uint32_t)(0xFF << 16))
  4626. #define FLEXSPI_MCR0_SCKFREERUNEN ((uint32_t)(1<<14))
  4627. #define FLEXSPI_MCR0_COMBINATIONEN ((uint32_t)(1<<13))
  4628. #define FLEXSPI_MCR0_DOZEEN ((uint32_t)(1<<12))
  4629. #define FLEXSPI_MCR0_HSEN ((uint32_t)(1<<11))
  4630. #define FLEXSPI_MCR0_ATDFEN ((uint32_t)(1<<7))
  4631. #define FLEXSPI_MCR0_ARDFEN ((uint32_t)(1<<6))
  4632. #define FLEXSPI_MCR0_RXCLKSRC(n) ((uint32_t)(((n) & 0x03) << 4))
  4633. #define FLEXSPI_MCR0_RXCLKSRC_MASK ((uint32_t)(0x03 << 4))
  4634. #define FLEXSPI_MCR0_MDIS ((uint32_t)(1<<1))
  4635. #define FLEXSPI_MCR0_SWRESET ((uint32_t)(1<<0))
  4636. #define FLEXSPI_MCR1 (IMXRT_FLEXSPI.offset004)
  4637. #define FLEXSPI_MCR1_SEQWAIT(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  4638. #define FLEXSPI_MCR1_AHBBUSWAIT(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  4639. #define FLEXSPI_MCR2 (IMXRT_FLEXSPI.offset008)
  4640. #define FLEXSPI_MCR2_RESUMEWAIT(n) ((uint32_t)(((n) & 0xFF) << 24))
  4641. #define FLEXSPI_MCR2_RESUMEWAIT_MASK ((uint32_t)(0xFF << 24))
  4642. #define FLEXSPI_MCR2_SCKBDIFFOPT ((uint32_t)(1<<19))
  4643. #define FLEXSPI_MCR2_SAMEDEVICEEN ((uint32_t)(1<<15))
  4644. #define FLEXSPI_MCR2_CLRLEARNPHASE ((uint32_t)(1<<14))
  4645. #define FLEXSPI_MCR2_CLRAHBBUFOPT ((uint32_t)(1<<11))
  4646. #define FLEXSPI_AHBCR (IMXRT_FLEXSPI.offset00C)
  4647. #define FLEXSPI_AHBCR_READADDROPT ((uint32_t)(1<<6))
  4648. #define FLEXSPI_AHBCR_PREFETCHEN ((uint32_t)(1<<5))
  4649. #define FLEXSPI_AHBCR_BUFFERABLEEN ((uint32_t)(1<<4))
  4650. #define FLEXSPI_AHBCR_CACHABLEEN ((uint32_t)(1<<3))
  4651. #define FLEXSPI_AHBCR_APAREN ((uint32_t)(1<<0))
  4652. #define FLEXSPI_INTEN (IMXRT_FLEXSPI.offset010)
  4653. #define FLEXSPI_INTEN_SEQTIMEOUTEN ((uint32_t)(1<<11))
  4654. #define FLEXSPI_INTEN_AHBBUSTIMEOUTEN ((uint32_t)(1<<10))
  4655. #define FLEXSPI_INTEN_SCKSTOPBYWREN ((uint32_t)(1<<9))
  4656. #define FLEXSPI_INTEN_SCKSTOPBYRDEN ((uint32_t)(1<<8))
  4657. #define FLEXSPI_INTEN_IPTXWEEN ((uint32_t)(1<<6))
  4658. #define FLEXSPI_INTEN_IPRXWAEN ((uint32_t)(1<<5))
  4659. #define FLEXSPI_INTEN_AHBCMDERREN ((uint32_t)(1<<4))
  4660. #define FLEXSPI_INTEN_IPCMDERREN ((uint32_t)(1<<3))
  4661. #define FLEXSPI_INTEN_AHBCMDGEEN ((uint32_t)(1<<2))
  4662. #define FLEXSPI_INTEN_IPCMDGEEN ((uint32_t)(1<<1))
  4663. #define FLEXSPI_INTEN_IPCMDDONEEN ((uint32_t)(1<<0))
  4664. #define FLEXSPI_INTR (IMXRT_FLEXSPI.offset014)
  4665. #define FLEXSPI_INTR_SEQTIMEOUT ((uint32_t)(1<<11))
  4666. #define FLEXSPI_INTR_AHBBUSTIMEOUT ((uint32_t)(1<<10))
  4667. #define FLEXSPI_INTR_SCKSTOPBYWR ((uint32_t)(1<<9))
  4668. #define FLEXSPI_INTR_SCKSTOPBYRD ((uint32_t)(1<<8))
  4669. #define FLEXSPI_INTR_IPTXWE ((uint32_t)(1<<6))
  4670. #define FLEXSPI_INTR_IPRXWA ((uint32_t)(1<<5))
  4671. #define FLEXSPI_INTR_AHBCMDERR ((uint32_t)(1<<4))
  4672. #define FLEXSPI_INTR_IPCMDERR ((uint32_t)(1<<3))
  4673. #define FLEXSPI_INTR_AHBCMDGE ((uint32_t)(1<<2))
  4674. #define FLEXSPI_INTR_IPCMDGE ((uint32_t)(1<<1))
  4675. #define FLEXSPI_INTR_IPCMDDONE ((uint32_t)(1<<0))
  4676. #define FLEXSPI_LUTKEY (IMXRT_FLEXSPI.offset018)
  4677. #define FLEXSPI_LUTKEY_VALUE ((uint32_t)0x5AF05AF0)
  4678. #define FLEXSPI_LUTCR (IMXRT_FLEXSPI.offset01C)
  4679. #define FLEXSPI_LUTCR_UNLOCK ((uint32_t)(1<<1))
  4680. #define FLEXSPI_LUTCR_LOCK ((uint32_t)(1<<0))
  4681. #define FLEXSPI_AHBRXBUF0CR0 (IMXRT_FLEXSPI.offset020)
  4682. #define FLEXSPI_AHBRXBUF1CR0 (IMXRT_FLEXSPI.offset024)
  4683. #define FLEXSPI_AHBRXBUF2CR0 (IMXRT_FLEXSPI.offset028)
  4684. #define FLEXSPI_AHBRXBUF3CR0 (IMXRT_FLEXSPI.offset02C)
  4685. #define FLEXSPI_AHBRXBUFCR0_PREFETCHEN ((uint32_t)(1<<31))
  4686. #define FLEXSPI_AHBRXBUFCR0_PRIORITY(n) ((uint32_t)(((n) & 0x03) << 24))
  4687. #define FLEXSPI_AHBRXBUFCR0_PRIORITY_MASK ((uint32_t)((0x03) << 24))
  4688. #define FLEXSPI_AHBRXBUFCR0_MSTRID(n) ((uint32_t)(((n) & 0x0F) << 16))
  4689. #define FLEXSPI_AHBRXBUFCR0_MSTRID_MASK ((uint32_t)((0x0F) << 16))
  4690. #define FLEXSPI_AHBRXBUFCR0_BUFSZ(n) ((uint32_t)(((n) & 0xFF) << 0))
  4691. #define FLEXSPI_AHBRXBUFCR0_BUFSZ_MASK ((uint32_t)((0xFF) << 0))
  4692. #define FLEXSPI_FLSHA1CR0 (IMXRT_FLEXSPI.offset060)
  4693. #define FLEXSPI_FLSHA2CR0 (IMXRT_FLEXSPI.offset064)
  4694. #define FLEXSPI_FLSHB1CR0 (IMXRT_FLEXSPI.offset068)
  4695. #define FLEXSPI_FLSHB2CR0 (IMXRT_FLEXSPI.offset06C)
  4696. #define FLEXSPI_FLSHCR0_FLSHSZ(n) ((uint32_t)(((n) & 0x7FFFFF) << 0))
  4697. #define FLEXSPI_FLSHCR0_FLSHSZ_MASK ((uint32_t)((0x7FFFFF) << 0))
  4698. #define FLEXSPI_FLSHA1CR1 (IMXRT_FLEXSPI.offset070)
  4699. #define FLEXSPI_FLSHA2CR1 (IMXRT_FLEXSPI.offset074)
  4700. #define FLEXSPI_FLSHB1CR1 (IMXRT_FLEXSPI.offset078)
  4701. #define FLEXSPI_FLSHB2CR1 (IMXRT_FLEXSPI.offset07C)
  4702. #define FLEXSPI_FLSHCR1_CSINTERVAL(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  4703. #define FLEXSPI_FLSHCR1_CSINTERVAL_MASK ((uint32_t)((0xFFFF) << 16))
  4704. #define FLEXSPI_FLSHCR1_CSINTERVALUNIT ((uint32_t)(1<<15))
  4705. #define FLEXSPI_FLSHCR1_CAS(n) ((uint32_t)(((n) & 0x0F) << 11))
  4706. #define FLEXSPI_FLSHCR1_WA ((uint32_t)(1<<10))
  4707. #define FLEXSPI_FLSHCR1_TCSH(n) ((uint32_t)(((n) & 0x1F) << 5))
  4708. #define FLEXSPI_FLSHCR1_TCSH_MASK ((uint32_t)((0x1F) << 5))
  4709. #define FLEXSPI_FLSHCR1_TCSS(n) ((uint32_t)(((n) & 0x1F) << 0))
  4710. #define FLEXSPI_FLSHCR1_TCSS_MASK ((uint32_t)((0x1F) << 0))
  4711. #define FLEXSPI_FLSHA1CR2 (IMXRT_FLEXSPI.offset080)
  4712. #define FLEXSPI_FLSHA2CR2 (IMXRT_FLEXSPI.offset084)
  4713. #define FLEXSPI_FLSHB1CR2 (IMXRT_FLEXSPI.offset088)
  4714. #define FLEXSPI_FLSHB2CR2 (IMXRT_FLEXSPI.offset08C)
  4715. #define FLEXSPI_FLSHCR2_CLRINSTRPTR ((uint32_t)(1<<31))
  4716. #define FLEXSPI_FLSHCR2_AWRWAITUNIT(n) ((uint32_t)(((n) & 0x07) << 28))
  4717. #define FLEXSPI_FLSHCR2_AWRWAIT(n) ((uint32_t)(((n) & 0xFFF) << 16))
  4718. #define FLEXSPI_FLSHCR2_AWRSEQNUM(n) ((uint32_t)(((n) & 0x07) << 13))
  4719. #define FLEXSPI_FLSHCR2_AWRSEQID(n) ((uint32_t)(((n) & 0x0F) << 8))
  4720. #define FLEXSPI_FLSHCR2_ARDSEQNUM(n) ((uint32_t)(((n) & 0x07) << 5))
  4721. #define FLEXSPI_FLSHCR2_ARDSEQID(n) ((uint32_t)(((n) & 0x0F) << 0))
  4722. #define FLEXSPI_FLSHCR4 (IMXRT_FLEXSPI.offset094)
  4723. #define FLEXSPI_FLSHCR4_WMENB ((uint32_t)(1<<3))
  4724. #define FLEXSPI_FLSHCR4_WMENA ((uint32_t)(1<<2))
  4725. #define FLEXSPI_FLSHCR4_WMOPT1 ((uint32_t)(1<<0))
  4726. #define FLEXSPI_IPCR0 (IMXRT_FLEXSPI.offset0A0)
  4727. #define FLEXSPI_IPCR0_SFAR(n) ((uint32_t)(n))
  4728. #define FLEXSPI_IPCR1 (IMXRT_FLEXSPI.offset0A4)
  4729. #define FLEXSPI_IPCR1_IPAREN ((uint32_t)(1<<31))
  4730. #define FLEXSPI_IPCR1_ISEQNUM(n) ((uint32_t)(((n) & 0x07) << 24))
  4731. #define FLEXSPI_IPCR1_ISEQID(n) ((uint32_t)(((n) & 0x0F) << 16))
  4732. #define FLEXSPI_IPCR1_IDATSZ(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  4733. #define FLEXSPI_IPCMD (IMXRT_FLEXSPI.offset0B0)
  4734. #define FLEXSPI_IPCMD_TRG ((uint32_t)(1<<0))
  4735. #define FLEXSPI_IPRXFCR (IMXRT_FLEXSPI.offset0B8)
  4736. #define FLEXSPI_IPRXFCR_RXWMRK(n) ((uint32_t)(((n) & 0x0F) << 2))
  4737. #define FLEXSPI_IPRXFCR_RXDMAEN ((uint32_t)(1<<1))
  4738. #define FLEXSPI_IPRXFCR_CLRIPRXF ((uint32_t)(1<<0))
  4739. #define FLEXSPI_IPTXFCR (IMXRT_FLEXSPI.offset0BC)
  4740. #define FLEXSPI_IPTXFCR_TXWMRK(n) ((uint32_t)(((n) & 0x0F) << 2))
  4741. #define FLEXSPI_IPTXFCR_TXDMAEN ((uint32_t)(1<<1))
  4742. #define FLEXSPI_IPTXFCR_CLRIPTXF ((uint32_t)(1<<0))
  4743. #define FLEXSPI_DLLACR (IMXRT_FLEXSPI.offset0C0)
  4744. #define FLEXSPI_DLLBCR (IMXRT_FLEXSPI.offset0C4)
  4745. #define FLEXSPI_DLLCR_OVRDVAL(n) ((uint32_t)(((n) & 0x3F) << 9))
  4746. #define FLEXSPI_DLLCR_OVRDEN ((uint32_t)(1<<8))
  4747. #define FLEXSPI_DLLCR_SLVDLYTARGET(n) ((uint32_t)(((n) & 0x0F) << 3))
  4748. #define FLEXSPI_DLLCR_DLLRESET ((uint32_t)(1<<1))
  4749. #define FLEXSPI_DLLCR_DLLEN ((uint32_t)(1<<0))
  4750. #define FLEXSPI_STS0 (IMXRT_FLEXSPI.offset0E0)
  4751. #define FLEXSPI_STS0_ARBCMDSRC(n) ((uint32_t)(((n) & 0x03) << 2))
  4752. #define FLEXSPI_STS0_ARBIDLE ((uint32_t)(1<<1))
  4753. #define FLEXSPI_STS0_SEQIDLE ((uint32_t)(1<<0))
  4754. #define FLEXSPI_STS1 (IMXRT_FLEXSPI.offset0E4)
  4755. #define FLEXSPI_STS1_IPCMDERRCODE(n) ((uint32_t)(((n) & 0x0F) << 24))
  4756. #define FLEXSPI_STS1_IPCMDERRID(n) ((uint32_t)(((n) & 0x0F) << 16))
  4757. #define FLEXSPI_STS1_AHBCMDERRCODE(n) ((uint32_t)(((n) & 0x0F) << 8))
  4758. #define FLEXSPI_STS1_AHBCMDERRID(n) ((uint32_t)(((n) & 0x0F) << 0))
  4759. #define FLEXSPI_STS2 (IMXRT_FLEXSPI.offset0E8)
  4760. #define FLEXSPI_STS2_BREFSEL(n) ((uint32_t)(((n) & 0x3F) << 24))
  4761. #define FLEXSPI_STS2_BSLVSEL(n) ((uint32_t)(((n) & 0x3F) << 18))
  4762. #define FLEXSPI_STS2_BREFLOCK ((uint32_t)(1<<17))
  4763. #define FLEXSPI_STS2_BSLVLOCK ((uint32_t)(1<<16))
  4764. #define FLEXSPI_STS2_AREFSEL(n) ((uint32_t)(((n) & 0x3F) << 8))
  4765. #define FLEXSPI_STS2_ASLVSEL(n) ((uint32_t)(((n) & 0x3F) << 2))
  4766. #define FLEXSPI_STS2_AREFLOCK ((uint32_t)(1<<1))
  4767. #define FLEXSPI_STS2_ASLVLOCK ((uint32_t)(1<<0))
  4768. #define FLEXSPI_AHBSPNDSTS (IMXRT_FLEXSPI.offset0EC)
  4769. #define FLEXSPI_AHBSPNDSTS_DATLFT(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  4770. #define FLEXSPI_AHBSPNDSTS_BUFID(n) ((uint32_t)(((n) & 0x7) << 1))
  4771. #define FLEXSPI_AHBSPNDSTS_ACTIVE ((uint32_t)(1<<0))
  4772. #define FLEXSPI_IPRXFSTS (IMXRT_FLEXSPI.offset0F0)
  4773. #define FLEXSPI_IPRXFSTS_RDCNTR(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  4774. #define FLEXSPI_IPRXFSTS_FILL(n) ((uint32_t)(((n) & 0xFF) << 0))
  4775. #define FLEXSPI_IPTXFSTS (IMXRT_FLEXSPI.offset0F4)
  4776. #define FLEXSPI_IPTXFSTS_WRCNTR(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  4777. #define FLEXSPI_IPTXFSTS_FILL(n) ((uint32_t)(((n) & 0xFF) << 0))
  4778. #define FLEXSPI_RFDR0 (IMXRT_FLEXSPI.offset100)
  4779. #define FLEXSPI_RFDR1 (IMXRT_FLEXSPI.offset104)
  4780. #define FLEXSPI_RFDR2 (IMXRT_FLEXSPI.offset108)
  4781. #define FLEXSPI_RFDR3 (IMXRT_FLEXSPI.offset10C)
  4782. #define FLEXSPI_RFDR4 (IMXRT_FLEXSPI.offset110)
  4783. #define FLEXSPI_RFDR5 (IMXRT_FLEXSPI.offset114)
  4784. #define FLEXSPI_RFDR6 (IMXRT_FLEXSPI.offset118)
  4785. #define FLEXSPI_RFDR7 (IMXRT_FLEXSPI.offset11C)
  4786. #define FLEXSPI_RFDR8 (IMXRT_FLEXSPI.offset120)
  4787. #define FLEXSPI_RFDR9 (IMXRT_FLEXSPI.offset124)
  4788. #define FLEXSPI_RFDR10 (IMXRT_FLEXSPI.offset128)
  4789. #define FLEXSPI_RFDR11 (IMXRT_FLEXSPI.offset12C)
  4790. #define FLEXSPI_RFDR12 (IMXRT_FLEXSPI.offset130)
  4791. #define FLEXSPI_RFDR13 (IMXRT_FLEXSPI.offset134)
  4792. #define FLEXSPI_RFDR14 (IMXRT_FLEXSPI.offset138)
  4793. #define FLEXSPI_RFDR15 (IMXRT_FLEXSPI.offset13C)
  4794. #define FLEXSPI_RFDR16 (IMXRT_FLEXSPI.offset140)
  4795. #define FLEXSPI_RFDR17 (IMXRT_FLEXSPI.offset144)
  4796. #define FLEXSPI_RFDR18 (IMXRT_FLEXSPI.offset148)
  4797. #define FLEXSPI_RFDR19 (IMXRT_FLEXSPI.offset14C)
  4798. #define FLEXSPI_RFDR20 (IMXRT_FLEXSPI.offset150)
  4799. #define FLEXSPI_RFDR21 (IMXRT_FLEXSPI.offset154)
  4800. #define FLEXSPI_RFDR22 (IMXRT_FLEXSPI.offset158)
  4801. #define FLEXSPI_RFDR23 (IMXRT_FLEXSPI.offset15C)
  4802. #define FLEXSPI_RFDR24 (IMXRT_FLEXSPI.offset160)
  4803. #define FLEXSPI_RFDR25 (IMXRT_FLEXSPI.offset164)
  4804. #define FLEXSPI_RFDR26 (IMXRT_FLEXSPI.offset168)
  4805. #define FLEXSPI_RFDR27 (IMXRT_FLEXSPI.offset16C)
  4806. #define FLEXSPI_RFDR28 (IMXRT_FLEXSPI.offset170)
  4807. #define FLEXSPI_RFDR29 (IMXRT_FLEXSPI.offset174)
  4808. #define FLEXSPI_RFDR30 (IMXRT_FLEXSPI.offset178)
  4809. #define FLEXSPI_RFDR31 (IMXRT_FLEXSPI.offset17C)
  4810. #define FLEXSPI_TFDR0 (IMXRT_FLEXSPI.offset180)
  4811. #define FLEXSPI_TFDR1 (IMXRT_FLEXSPI.offset184)
  4812. #define FLEXSPI_TFDR2 (IMXRT_FLEXSPI.offset188)
  4813. #define FLEXSPI_TFDR3 (IMXRT_FLEXSPI.offset18C)
  4814. #define FLEXSPI_TFDR4 (IMXRT_FLEXSPI.offset190)
  4815. #define FLEXSPI_TFDR5 (IMXRT_FLEXSPI.offset194)
  4816. #define FLEXSPI_TFDR6 (IMXRT_FLEXSPI.offset198)
  4817. #define FLEXSPI_TFDR7 (IMXRT_FLEXSPI.offset19C)
  4818. #define FLEXSPI_TFDR8 (IMXRT_FLEXSPI.offset1A0)
  4819. #define FLEXSPI_TFDR9 (IMXRT_FLEXSPI.offset1A4)
  4820. #define FLEXSPI_TFDR10 (IMXRT_FLEXSPI.offset1A8)
  4821. #define FLEXSPI_TFDR11 (IMXRT_FLEXSPI.offset1AC)
  4822. #define FLEXSPI_TFDR12 (IMXRT_FLEXSPI.offset1B0)
  4823. #define FLEXSPI_TFDR13 (IMXRT_FLEXSPI.offset1B4)
  4824. #define FLEXSPI_TFDR14 (IMXRT_FLEXSPI.offset1B8)
  4825. #define FLEXSPI_TFDR15 (IMXRT_FLEXSPI.offset1BC)
  4826. #define FLEXSPI_TFDR16 (IMXRT_FLEXSPI.offset1C0)
  4827. #define FLEXSPI_TFDR17 (IMXRT_FLEXSPI.offset1C4)
  4828. #define FLEXSPI_TFDR18 (IMXRT_FLEXSPI.offset1C8)
  4829. #define FLEXSPI_TFDR19 (IMXRT_FLEXSPI.offset1CC)
  4830. #define FLEXSPI_TFDR20 (IMXRT_FLEXSPI.offset1D0)
  4831. #define FLEXSPI_TFDR21 (IMXRT_FLEXSPI.offset1D4)
  4832. #define FLEXSPI_TFDR22 (IMXRT_FLEXSPI.offset1D8)
  4833. #define FLEXSPI_TFDR23 (IMXRT_FLEXSPI.offset1DC)
  4834. #define FLEXSPI_TFDR24 (IMXRT_FLEXSPI.offset1E0)
  4835. #define FLEXSPI_TFDR25 (IMXRT_FLEXSPI.offset1E4)
  4836. #define FLEXSPI_TFDR26 (IMXRT_FLEXSPI.offset1E8)
  4837. #define FLEXSPI_TFDR27 (IMXRT_FLEXSPI.offset1EC)
  4838. #define FLEXSPI_TFDR28 (IMXRT_FLEXSPI.offset1F0)
  4839. #define FLEXSPI_TFDR29 (IMXRT_FLEXSPI.offset1F4)
  4840. #define FLEXSPI_TFDR30 (IMXRT_FLEXSPI.offset1F8)
  4841. #define FLEXSPI_TFDR31 (IMXRT_FLEXSPI.offset1FC)
  4842. #define FLEXSPI_LUT0 (IMXRT_FLEXSPI.offset200)
  4843. #define FLEXSPI_LUT1 (IMXRT_FLEXSPI.offset204)
  4844. #define FLEXSPI_LUT2 (IMXRT_FLEXSPI.offset208)
  4845. #define FLEXSPI_LUT3 (IMXRT_FLEXSPI.offset20C)
  4846. #define FLEXSPI_LUT4 (IMXRT_FLEXSPI.offset210)
  4847. #define FLEXSPI_LUT5 (IMXRT_FLEXSPI.offset214)
  4848. #define FLEXSPI_LUT6 (IMXRT_FLEXSPI.offset218)
  4849. #define FLEXSPI_LUT7 (IMXRT_FLEXSPI.offset21C)
  4850. #define FLEXSPI_LUT8 (IMXRT_FLEXSPI.offset220)
  4851. #define FLEXSPI_LUT9 (IMXRT_FLEXSPI.offset224)
  4852. #define FLEXSPI_LUT10 (IMXRT_FLEXSPI.offset228)
  4853. #define FLEXSPI_LUT11 (IMXRT_FLEXSPI.offset22C)
  4854. #define FLEXSPI_LUT12 (IMXRT_FLEXSPI.offset230)
  4855. #define FLEXSPI_LUT13 (IMXRT_FLEXSPI.offset234)
  4856. #define FLEXSPI_LUT14 (IMXRT_FLEXSPI.offset238)
  4857. #define FLEXSPI_LUT15 (IMXRT_FLEXSPI.offset23C)
  4858. #define FLEXSPI_LUT16 (IMXRT_FLEXSPI.offset240)
  4859. #define FLEXSPI_LUT17 (IMXRT_FLEXSPI.offset244)
  4860. #define FLEXSPI_LUT18 (IMXRT_FLEXSPI.offset248)
  4861. #define FLEXSPI_LUT19 (IMXRT_FLEXSPI.offset24C)
  4862. #define FLEXSPI_LUT20 (IMXRT_FLEXSPI.offset250)
  4863. #define FLEXSPI_LUT21 (IMXRT_FLEXSPI.offset254)
  4864. #define FLEXSPI_LUT22 (IMXRT_FLEXSPI.offset258)
  4865. #define FLEXSPI_LUT23 (IMXRT_FLEXSPI.offset25C)
  4866. #define FLEXSPI_LUT24 (IMXRT_FLEXSPI.offset260)
  4867. #define FLEXSPI_LUT25 (IMXRT_FLEXSPI.offset264)
  4868. #define FLEXSPI_LUT26 (IMXRT_FLEXSPI.offset268)
  4869. #define FLEXSPI_LUT27 (IMXRT_FLEXSPI.offset26C)
  4870. #define FLEXSPI_LUT28 (IMXRT_FLEXSPI.offset270)
  4871. #define FLEXSPI_LUT29 (IMXRT_FLEXSPI.offset274)
  4872. #define FLEXSPI_LUT30 (IMXRT_FLEXSPI.offset278)
  4873. #define FLEXSPI_LUT31 (IMXRT_FLEXSPI.offset27C)
  4874. #define FLEXSPI_LUT32 (IMXRT_FLEXSPI.offset280)
  4875. #define FLEXSPI_LUT33 (IMXRT_FLEXSPI.offset284)
  4876. #define FLEXSPI_LUT34 (IMXRT_FLEXSPI.offset288)
  4877. #define FLEXSPI_LUT35 (IMXRT_FLEXSPI.offset28C)
  4878. #define FLEXSPI_LUT36 (IMXRT_FLEXSPI.offset290)
  4879. #define FLEXSPI_LUT37 (IMXRT_FLEXSPI.offset294)
  4880. #define FLEXSPI_LUT38 (IMXRT_FLEXSPI.offset298)
  4881. #define FLEXSPI_LUT39 (IMXRT_FLEXSPI.offset29C)
  4882. #define FLEXSPI_LUT40 (IMXRT_FLEXSPI.offset2A0)
  4883. #define FLEXSPI_LUT41 (IMXRT_FLEXSPI.offset2A4)
  4884. #define FLEXSPI_LUT42 (IMXRT_FLEXSPI.offset2A8)
  4885. #define FLEXSPI_LUT43 (IMXRT_FLEXSPI.offset2AC)
  4886. #define FLEXSPI_LUT44 (IMXRT_FLEXSPI.offset2B0)
  4887. #define FLEXSPI_LUT45 (IMXRT_FLEXSPI.offset2B4)
  4888. #define FLEXSPI_LUT46 (IMXRT_FLEXSPI.offset2B8)
  4889. #define FLEXSPI_LUT47 (IMXRT_FLEXSPI.offset2BC)
  4890. #define FLEXSPI_LUT48 (IMXRT_FLEXSPI.offset2C0)
  4891. #define FLEXSPI_LUT49 (IMXRT_FLEXSPI.offset2C4)
  4892. #define FLEXSPI_LUT50 (IMXRT_FLEXSPI.offset2C8)
  4893. #define FLEXSPI_LUT51 (IMXRT_FLEXSPI.offset2CC)
  4894. #define FLEXSPI_LUT52 (IMXRT_FLEXSPI.offset2D0)
  4895. #define FLEXSPI_LUT53 (IMXRT_FLEXSPI.offset2D4)
  4896. #define FLEXSPI_LUT54 (IMXRT_FLEXSPI.offset2D8)
  4897. #define FLEXSPI_LUT55 (IMXRT_FLEXSPI.offset2DC)
  4898. #define FLEXSPI_LUT56 (IMXRT_FLEXSPI.offset2E0)
  4899. #define FLEXSPI_LUT57 (IMXRT_FLEXSPI.offset2E4)
  4900. #define FLEXSPI_LUT58 (IMXRT_FLEXSPI.offset2E8)
  4901. #define FLEXSPI_LUT59 (IMXRT_FLEXSPI.offset2EC)
  4902. #define FLEXSPI_LUT60 (IMXRT_FLEXSPI.offset2F0)
  4903. #define FLEXSPI_LUT61 (IMXRT_FLEXSPI.offset2F4)
  4904. #define FLEXSPI_LUT62 (IMXRT_FLEXSPI.offset2F8)
  4905. #define FLEXSPI_LUT63 (IMXRT_FLEXSPI.offset2FC)
  4906. #define FLEXSPI_LUT_OPCODE1(n) ((uint32_t)(((n) & 0x3F) << 26))
  4907. #define FLEXSPI_LUT_NUM_PADS1(n) ((uint32_t)(((n) & 0x03) << 24))
  4908. #define FLEXSPI_LUT_OPERAND1(n) ((uint32_t)(((n) & 0xFF) << 16))
  4909. #define FLEXSPI_LUT_OPCODE0(n) ((uint32_t)(((n) & 0x3F) << 10))
  4910. #define FLEXSPI_LUT_NUM_PADS0(n) ((uint32_t)(((n) & 0x03) << 8))
  4911. #define FLEXSPI_LUT_OPERAND0(n) ((uint32_t)(((n) & 0xFF) << 0))
  4912. #define FLEXSPI_LUT_INSTRUCTION(opcode, pads, operand) ((uint32_t)(\
  4913. (((opcode) & 0x3F) << 10) | (((pads) & 0x03) << 8) | ((operand) & 0xFF)))
  4914. // 30.7.8: page 1532
  4915. #define FLEXSPI_LUT_OPCODE_CMD_SDR 0x01
  4916. #define FLEXSPI_LUT_OPCODE_CMD_DDR 0x21
  4917. #define FLEXSPI_LUT_OPCODE_RADDR_SDR 0x02
  4918. #define FLEXSPI_LUT_OPCODE_RADDR_DDR 0x22
  4919. #define FLEXSPI_LUT_OPCODE_CADDR_SDR 0x03
  4920. #define FLEXSPI_LUT_OPCODE_CADDR_DDR 0x23
  4921. #define FLEXSPI_LUT_OPCODE_MODE1_SDR 0x04
  4922. #define FLEXSPI_LUT_OPCODE_MODE1_DDR 0x24
  4923. #define FLEXSPI_LUT_OPCODE_MODE2_SDR 0x05
  4924. #define FLEXSPI_LUT_OPCODE_MODE2_DDR 0x25
  4925. #define FLEXSPI_LUT_OPCODE_MODE4_SDR 0x06
  4926. #define FLEXSPI_LUT_OPCODE_MODE4_DDR 0x26
  4927. #define FLEXSPI_LUT_OPCODE_MODE8_SDR 0x07
  4928. #define FLEXSPI_LUT_OPCODE_MODE8_DDR 0x27
  4929. #define FLEXSPI_LUT_OPCODE_WRITE_SDR 0x08
  4930. #define FLEXSPI_LUT_OPCODE_WRITE_DDR 0x28
  4931. #define FLEXSPI_LUT_OPCODE_READ_SDR 0x09
  4932. #define FLEXSPI_LUT_OPCODE_READ_DDR 0x29
  4933. #define FLEXSPI_LUT_OPCODE_LEARN_SDR 0x0A
  4934. #define FLEXSPI_LUT_OPCODE_LEARN_DDR 0x2A
  4935. #define FLEXSPI_LUT_OPCODE_DATSZ_SDR 0x0B
  4936. #define FLEXSPI_LUT_OPCODE_DATSZ_DDR 0x2B
  4937. #define FLEXSPI_LUT_OPCODE_DUMMY_SDR 0x0C
  4938. #define FLEXSPI_LUT_OPCODE_DUMMY_DDR 0x2C
  4939. #define FLEXSPI_LUT_OPCODE_DUMMY_RWDS_SDR 0x0D
  4940. #define FLEXSPI_LUT_OPCODE_DUMMY_RWDS_DDR 0x2D
  4941. #define FLEXSPI_LUT_OPCODE_JMP_ON_CS 0x1F
  4942. #define FLEXSPI_LUT_OPCODE_STOP 0x00
  4943. #define FLEXSPI_LUT_NUM_PADS_1 0x00
  4944. #define FLEXSPI_LUT_NUM_PADS_2 0x01
  4945. #define FLEXSPI_LUT_NUM_PADS_4 0x02
  4946. #define FLEXSPI_LUT_NUM_PADS_8 0x03
  4947. #define IMXRT_FLEXSPI2 (*(IMXRT_REGISTER32_t *)0x402A4000)
  4948. #define FLEXSPI2_MCR0 (IMXRT_FLEXSPI2.offset000)
  4949. #define FLEXSPI2_MCR1 (IMXRT_FLEXSPI2.offset004)
  4950. #define FLEXSPI2_MCR2 (IMXRT_FLEXSPI2.offset008)
  4951. #define FLEXSPI2_AHBCR (IMXRT_FLEXSPI2.offset00C)
  4952. #define FLEXSPI2_INTEN (IMXRT_FLEXSPI2.offset010)
  4953. #define FLEXSPI2_INTR (IMXRT_FLEXSPI2.offset014)
  4954. #define FLEXSPI2_LUTKEY (IMXRT_FLEXSPI2.offset018)
  4955. #define FLEXSPI2_LUTCR (IMXRT_FLEXSPI2.offset01C)
  4956. #define FLEXSPI2_AHBRXBUF0CR0 (IMXRT_FLEXSPI2.offset020)
  4957. #define FLEXSPI2_AHBRXBUF1CR0 (IMXRT_FLEXSPI2.offset024)
  4958. #define FLEXSPI2_AHBRXBUF2CR0 (IMXRT_FLEXSPI2.offset028)
  4959. #define FLEXSPI2_AHBRXBUF3CR0 (IMXRT_FLEXSPI2.offset02C)
  4960. #define FLEXSPI2_FLSHA1CR0 (IMXRT_FLEXSPI2.offset060)
  4961. #define FLEXSPI2_FLSHA2CR0 (IMXRT_FLEXSPI2.offset064)
  4962. #define FLEXSPI2_FLSHB1CR0 (IMXRT_FLEXSPI2.offset068)
  4963. #define FLEXSPI2_FLSHB2CR0 (IMXRT_FLEXSPI2.offset06C)
  4964. #define FLEXSPI2_FLSHA1CR1 (IMXRT_FLEXSPI2.offset070)
  4965. #define FLEXSPI2_FLSHA2CR1 (IMXRT_FLEXSPI2.offset074)
  4966. #define FLEXSPI2_FLSHB1CR1 (IMXRT_FLEXSPI2.offset078)
  4967. #define FLEXSPI2_FLSHB2CR1 (IMXRT_FLEXSPI2.offset07C)
  4968. #define FLEXSPI2_FLSHA1CR2 (IMXRT_FLEXSPI2.offset080)
  4969. #define FLEXSPI2_FLSHA2CR2 (IMXRT_FLEXSPI2.offset084)
  4970. #define FLEXSPI2_FLSHB1CR2 (IMXRT_FLEXSPI2.offset088)
  4971. #define FLEXSPI2_FLSHB2CR2 (IMXRT_FLEXSPI2.offset08C)
  4972. #define FLEXSPI2_FLSHCR4 (IMXRT_FLEXSPI2.offset094)
  4973. #define FLEXSPI2_IPCR0 (IMXRT_FLEXSPI2.offset0A0)
  4974. #define FLEXSPI2_IPCR1 (IMXRT_FLEXSPI2.offset0A4)
  4975. #define FLEXSPI2_IPCMD (IMXRT_FLEXSPI2.offset0B0)
  4976. #define FLEXSPI2_IPRXFCR (IMXRT_FLEXSPI2.offset0B8)
  4977. #define FLEXSPI2_IPTXFCR (IMXRT_FLEXSPI2.offset0BC)
  4978. #define FLEXSPI2_DLLACR (IMXRT_FLEXSPI2.offset0C0)
  4979. #define FLEXSPI2_DLLBCR (IMXRT_FLEXSPI2.offset0C4)
  4980. #define FLEXSPI2_STS0 (IMXRT_FLEXSPI2.offset0E0)
  4981. #define FLEXSPI2_STS1 (IMXRT_FLEXSPI2.offset0E4)
  4982. #define FLEXSPI2_STS2 (IMXRT_FLEXSPI2.offset0E8)
  4983. #define FLEXSPI2_AHBSPNDSTS (IMXRT_FLEXSPI2.offset0EC)
  4984. #define FLEXSPI2_IPRXFSTS (IMXRT_FLEXSPI2.offset0F0)
  4985. #define FLEXSPI2_IPTXFSTS (IMXRT_FLEXSPI2.offset0F4)
  4986. #define FLEXSPI2_RFDR0 (IMXRT_FLEXSPI2.offset100)
  4987. #define FLEXSPI2_RFDR1 (IMXRT_FLEXSPI2.offset104)
  4988. #define FLEXSPI2_RFDR2 (IMXRT_FLEXSPI2.offset108)
  4989. #define FLEXSPI2_RFDR3 (IMXRT_FLEXSPI2.offset10C)
  4990. #define FLEXSPI2_RFDR4 (IMXRT_FLEXSPI2.offset110)
  4991. #define FLEXSPI2_RFDR5 (IMXRT_FLEXSPI2.offset114)
  4992. #define FLEXSPI2_RFDR6 (IMXRT_FLEXSPI2.offset118)
  4993. #define FLEXSPI2_RFDR7 (IMXRT_FLEXSPI2.offset11C)
  4994. #define FLEXSPI2_RFDR8 (IMXRT_FLEXSPI2.offset120)
  4995. #define FLEXSPI2_RFDR9 (IMXRT_FLEXSPI2.offset124)
  4996. #define FLEXSPI2_RFDR10 (IMXRT_FLEXSPI2.offset128)
  4997. #define FLEXSPI2_RFDR11 (IMXRT_FLEXSPI2.offset12C)
  4998. #define FLEXSPI2_RFDR12 (IMXRT_FLEXSPI2.offset130)
  4999. #define FLEXSPI2_RFDR13 (IMXRT_FLEXSPI2.offset134)
  5000. #define FLEXSPI2_RFDR14 (IMXRT_FLEXSPI2.offset138)
  5001. #define FLEXSPI2_RFDR15 (IMXRT_FLEXSPI2.offset13C)
  5002. #define FLEXSPI2_RFDR16 (IMXRT_FLEXSPI2.offset140)
  5003. #define FLEXSPI2_RFDR17 (IMXRT_FLEXSPI2.offset144)
  5004. #define FLEXSPI2_RFDR18 (IMXRT_FLEXSPI2.offset148)
  5005. #define FLEXSPI2_RFDR19 (IMXRT_FLEXSPI2.offset14C)
  5006. #define FLEXSPI2_RFDR20 (IMXRT_FLEXSPI2.offset150)
  5007. #define FLEXSPI2_RFDR21 (IMXRT_FLEXSPI2.offset154)
  5008. #define FLEXSPI2_RFDR22 (IMXRT_FLEXSPI2.offset158)
  5009. #define FLEXSPI2_RFDR23 (IMXRT_FLEXSPI2.offset15C)
  5010. #define FLEXSPI2_RFDR24 (IMXRT_FLEXSPI2.offset160)
  5011. #define FLEXSPI2_RFDR25 (IMXRT_FLEXSPI2.offset164)
  5012. #define FLEXSPI2_RFDR26 (IMXRT_FLEXSPI2.offset168)
  5013. #define FLEXSPI2_RFDR27 (IMXRT_FLEXSPI2.offset16C)
  5014. #define FLEXSPI2_RFDR28 (IMXRT_FLEXSPI2.offset170)
  5015. #define FLEXSPI2_RFDR29 (IMXRT_FLEXSPI2.offset174)
  5016. #define FLEXSPI2_RFDR30 (IMXRT_FLEXSPI2.offset178)
  5017. #define FLEXSPI2_RFDR31 (IMXRT_FLEXSPI2.offset17C)
  5018. #define FLEXSPI2_TFDR0 (IMXRT_FLEXSPI2.offset180)
  5019. #define FLEXSPI2_TFDR1 (IMXRT_FLEXSPI2.offset184)
  5020. #define FLEXSPI2_TFDR2 (IMXRT_FLEXSPI2.offset188)
  5021. #define FLEXSPI2_TFDR3 (IMXRT_FLEXSPI2.offset18C)
  5022. #define FLEXSPI2_TFDR4 (IMXRT_FLEXSPI2.offset190)
  5023. #define FLEXSPI2_TFDR5 (IMXRT_FLEXSPI2.offset194)
  5024. #define FLEXSPI2_TFDR6 (IMXRT_FLEXSPI2.offset198)
  5025. #define FLEXSPI2_TFDR7 (IMXRT_FLEXSPI2.offset19C)
  5026. #define FLEXSPI2_TFDR8 (IMXRT_FLEXSPI2.offset1A0)
  5027. #define FLEXSPI2_TFDR9 (IMXRT_FLEXSPI2.offset1A4)
  5028. #define FLEXSPI2_TFDR10 (IMXRT_FLEXSPI2.offset1A8)
  5029. #define FLEXSPI2_TFDR11 (IMXRT_FLEXSPI2.offset1AC)
  5030. #define FLEXSPI2_TFDR12 (IMXRT_FLEXSPI2.offset1B0)
  5031. #define FLEXSPI2_TFDR13 (IMXRT_FLEXSPI2.offset1B4)
  5032. #define FLEXSPI2_TFDR14 (IMXRT_FLEXSPI2.offset1B8)
  5033. #define FLEXSPI2_TFDR15 (IMXRT_FLEXSPI2.offset1BC)
  5034. #define FLEXSPI2_TFDR16 (IMXRT_FLEXSPI2.offset1C0)
  5035. #define FLEXSPI2_TFDR17 (IMXRT_FLEXSPI2.offset1C4)
  5036. #define FLEXSPI2_TFDR18 (IMXRT_FLEXSPI2.offset1C8)
  5037. #define FLEXSPI2_TFDR19 (IMXRT_FLEXSPI2.offset1CC)
  5038. #define FLEXSPI2_TFDR20 (IMXRT_FLEXSPI2.offset1D0)
  5039. #define FLEXSPI2_TFDR21 (IMXRT_FLEXSPI2.offset1D4)
  5040. #define FLEXSPI2_TFDR22 (IMXRT_FLEXSPI2.offset1D8)
  5041. #define FLEXSPI2_TFDR23 (IMXRT_FLEXSPI2.offset1DC)
  5042. #define FLEXSPI2_TFDR24 (IMXRT_FLEXSPI2.offset1E0)
  5043. #define FLEXSPI2_TFDR25 (IMXRT_FLEXSPI2.offset1E4)
  5044. #define FLEXSPI2_TFDR26 (IMXRT_FLEXSPI2.offset1E8)
  5045. #define FLEXSPI2_TFDR27 (IMXRT_FLEXSPI2.offset1EC)
  5046. #define FLEXSPI2_TFDR28 (IMXRT_FLEXSPI2.offset1F0)
  5047. #define FLEXSPI2_TFDR29 (IMXRT_FLEXSPI2.offset1F4)
  5048. #define FLEXSPI2_TFDR30 (IMXRT_FLEXSPI2.offset1F8)
  5049. #define FLEXSPI2_TFDR31 (IMXRT_FLEXSPI2.offset1FC)
  5050. #define FLEXSPI2_LUT0 (IMXRT_FLEXSPI2.offset200)
  5051. #define FLEXSPI2_LUT1 (IMXRT_FLEXSPI2.offset204)
  5052. #define FLEXSPI2_LUT2 (IMXRT_FLEXSPI2.offset208)
  5053. #define FLEXSPI2_LUT3 (IMXRT_FLEXSPI2.offset20C)
  5054. #define FLEXSPI2_LUT4 (IMXRT_FLEXSPI2.offset210)
  5055. #define FLEXSPI2_LUT5 (IMXRT_FLEXSPI2.offset214)
  5056. #define FLEXSPI2_LUT6 (IMXRT_FLEXSPI2.offset218)
  5057. #define FLEXSPI2_LUT7 (IMXRT_FLEXSPI2.offset21C)
  5058. #define FLEXSPI2_LUT8 (IMXRT_FLEXSPI2.offset220)
  5059. #define FLEXSPI2_LUT9 (IMXRT_FLEXSPI2.offset224)
  5060. #define FLEXSPI2_LUT10 (IMXRT_FLEXSPI2.offset228)
  5061. #define FLEXSPI2_LUT11 (IMXRT_FLEXSPI2.offset22C)
  5062. #define FLEXSPI2_LUT12 (IMXRT_FLEXSPI2.offset230)
  5063. #define FLEXSPI2_LUT13 (IMXRT_FLEXSPI2.offset234)
  5064. #define FLEXSPI2_LUT14 (IMXRT_FLEXSPI2.offset238)
  5065. #define FLEXSPI2_LUT15 (IMXRT_FLEXSPI2.offset23C)
  5066. #define FLEXSPI2_LUT16 (IMXRT_FLEXSPI2.offset240)
  5067. #define FLEXSPI2_LUT17 (IMXRT_FLEXSPI2.offset244)
  5068. #define FLEXSPI2_LUT18 (IMXRT_FLEXSPI2.offset248)
  5069. #define FLEXSPI2_LUT19 (IMXRT_FLEXSPI2.offset24C)
  5070. #define FLEXSPI2_LUT20 (IMXRT_FLEXSPI2.offset250)
  5071. #define FLEXSPI2_LUT21 (IMXRT_FLEXSPI2.offset254)
  5072. #define FLEXSPI2_LUT22 (IMXRT_FLEXSPI2.offset258)
  5073. #define FLEXSPI2_LUT23 (IMXRT_FLEXSPI2.offset25C)
  5074. #define FLEXSPI2_LUT24 (IMXRT_FLEXSPI2.offset260)
  5075. #define FLEXSPI2_LUT25 (IMXRT_FLEXSPI2.offset264)
  5076. #define FLEXSPI2_LUT26 (IMXRT_FLEXSPI2.offset268)
  5077. #define FLEXSPI2_LUT27 (IMXRT_FLEXSPI2.offset26C)
  5078. #define FLEXSPI2_LUT28 (IMXRT_FLEXSPI2.offset270)
  5079. #define FLEXSPI2_LUT29 (IMXRT_FLEXSPI2.offset274)
  5080. #define FLEXSPI2_LUT30 (IMXRT_FLEXSPI2.offset278)
  5081. #define FLEXSPI2_LUT31 (IMXRT_FLEXSPI2.offset27C)
  5082. #define FLEXSPI2_LUT32 (IMXRT_FLEXSPI2.offset280)
  5083. #define FLEXSPI2_LUT33 (IMXRT_FLEXSPI2.offset284)
  5084. #define FLEXSPI2_LUT34 (IMXRT_FLEXSPI2.offset288)
  5085. #define FLEXSPI2_LUT35 (IMXRT_FLEXSPI2.offset28C)
  5086. #define FLEXSPI2_LUT36 (IMXRT_FLEXSPI2.offset290)
  5087. #define FLEXSPI2_LUT37 (IMXRT_FLEXSPI2.offset294)
  5088. #define FLEXSPI2_LUT38 (IMXRT_FLEXSPI2.offset298)
  5089. #define FLEXSPI2_LUT39 (IMXRT_FLEXSPI2.offset29C)
  5090. #define FLEXSPI2_LUT40 (IMXRT_FLEXSPI2.offset2A0)
  5091. #define FLEXSPI2_LUT41 (IMXRT_FLEXSPI2.offset2A4)
  5092. #define FLEXSPI2_LUT42 (IMXRT_FLEXSPI2.offset2A8)
  5093. #define FLEXSPI2_LUT43 (IMXRT_FLEXSPI2.offset2AC)
  5094. #define FLEXSPI2_LUT44 (IMXRT_FLEXSPI2.offset2B0)
  5095. #define FLEXSPI2_LUT45 (IMXRT_FLEXSPI2.offset2B4)
  5096. #define FLEXSPI2_LUT46 (IMXRT_FLEXSPI2.offset2B8)
  5097. #define FLEXSPI2_LUT47 (IMXRT_FLEXSPI2.offset2BC)
  5098. #define FLEXSPI2_LUT48 (IMXRT_FLEXSPI2.offset2C0)
  5099. #define FLEXSPI2_LUT49 (IMXRT_FLEXSPI2.offset2C4)
  5100. #define FLEXSPI2_LUT50 (IMXRT_FLEXSPI2.offset2C8)
  5101. #define FLEXSPI2_LUT51 (IMXRT_FLEXSPI2.offset2CC)
  5102. #define FLEXSPI2_LUT52 (IMXRT_FLEXSPI2.offset2D0)
  5103. #define FLEXSPI2_LUT53 (IMXRT_FLEXSPI2.offset2D4)
  5104. #define FLEXSPI2_LUT54 (IMXRT_FLEXSPI2.offset2D8)
  5105. #define FLEXSPI2_LUT55 (IMXRT_FLEXSPI2.offset2DC)
  5106. #define FLEXSPI2_LUT56 (IMXRT_FLEXSPI2.offset2E0)
  5107. #define FLEXSPI2_LUT57 (IMXRT_FLEXSPI2.offset2E4)
  5108. #define FLEXSPI2_LUT58 (IMXRT_FLEXSPI2.offset2E8)
  5109. #define FLEXSPI2_LUT59 (IMXRT_FLEXSPI2.offset2EC)
  5110. #define FLEXSPI2_LUT60 (IMXRT_FLEXSPI2.offset2F0)
  5111. #define FLEXSPI2_LUT61 (IMXRT_FLEXSPI2.offset2F4)
  5112. #define FLEXSPI2_LUT62 (IMXRT_FLEXSPI2.offset2F8)
  5113. #define FLEXSPI2_LUT63 (IMXRT_FLEXSPI2.offset2FC)
  5114. // 31.5: page 1595
  5115. #define IMXRT_GPC (*(IMXRT_REGISTER32_t *)0x400F4000)
  5116. #define GPC_CNTR (IMXRT_GPC.offset000)
  5117. #define GPC_IMR1 (IMXRT_GPC.offset008)
  5118. #define GPC_IMR2 (IMXRT_GPC.offset00C)
  5119. #define GPC_IMR3 (IMXRT_GPC.offset010)
  5120. #define GPC_IMR4 (IMXRT_GPC.offset014)
  5121. #define GPC_ISR1 (IMXRT_GPC.offset018)
  5122. #define GPC_ISR2 (IMXRT_GPC.offset01C)
  5123. #define GPC_ISR3 (IMXRT_GPC.offset020)
  5124. #define GPC_ISR4 (IMXRT_GPC.offset024)
  5125. #define GPC_IMR5 (IMXRT_GPC.offset034)
  5126. #define GPC_ISR5 (IMXRT_GPC.offset038)
  5127. #define GPC_CNTR_PDRAM0_PGE ((uint32_t)(1<<22))
  5128. #define GPC_CNTR_MEGA_PUP_REQ ((uint32_t)(1<<3))
  5129. #define GPC_CNTR_MEGA_PDN_REQ ((uint32_t)(1<<2))
  5130. // page 1602
  5131. #define PGC_MEGA_CTRL (IMXRT_GPC.offset220)
  5132. #define PGC_MEGA_PUPSCR (IMXRT_GPC.offset224)
  5133. #define PGC_MEGA_PDNSCR (IMXRT_GPC.offset228)
  5134. #define PGC_MEGA_SR (IMXRT_GPC.offset22C)
  5135. #define PGC_CPU_CTRL (IMXRT_GPC.offset2A0)
  5136. #define PGC_CPU_PUPSCR (IMXRT_GPC.offset2A4)
  5137. #define PGC_CPU_PDNSCR (IMXRT_GPC.offset2A8)
  5138. #define PGC_CPU_SR (IMXRT_GPC.offset2AC)
  5139. #define PGC_MEGA_CTRL_PCR ((uint32_t)(1<<0))
  5140. #define PGC_MEGA_PUPSCR_SW2ISO(n) ((uint32_t)(((n) & 0x3F) << 8))
  5141. #define PGC_MEGA_PUPSCR_SW(n) ((uint32_t)(((n) & 0x3F) << 0))
  5142. #define PGC_MEGA_PDNSCR_ISO2SW(n) ((uint32_t)(((n) & 0x3F) << 8))
  5143. #define PGC_MEGA_PDNSCR_ISO(n) ((uint32_t)(((n) & 0x3F) << 0))
  5144. #define PGC_MEGA_SR_PSR ((uint32_t)(1<<0))
  5145. #define PGC_CPU_CTRL_PCR ((uint32_t)(1<<0))
  5146. #define PGC_CPU_PUPSCR_SW2ISO(n) ((uint32_t)(((n) & 0x3F) << 8))
  5147. #define PGC_CPU_PUPSCR_SW(n) ((uint32_t)(((n) & 0x3F) << 0))
  5148. #define PGC_CPU_PDNSCR_ISO2SW(n) ((uint32_t)(((n) & 0x3F) << 8))
  5149. #define PGC_CPU_PDNSCR_ISO(n) ((uint32_t)(((n) & 0x3F) << 0))
  5150. #define PGC_CPU_SR_PSR ((uint32_t)(1<<0))
  5151. // 32.4.1: page 1620
  5152. #define IMXRT_GPIO1 (*(IMXRT_REGISTER32_t *)0x401B8000)
  5153. #define GPIO1_DR (IMXRT_GPIO1.offset000)
  5154. #define GPIO1_GDIR (IMXRT_GPIO1.offset004)
  5155. #define GPIO1_PSR (IMXRT_GPIO1.offset008)
  5156. #define GPIO1_ICR1 (IMXRT_GPIO1.offset00C)
  5157. #define GPIO1_ICR2 (IMXRT_GPIO1.offset010)
  5158. #define GPIO1_IMR (IMXRT_GPIO1.offset014)
  5159. #define GPIO1_ISR (IMXRT_GPIO1.offset018)
  5160. #define GPIO1_EDGE_SEL (IMXRT_GPIO1.offset01C)
  5161. #define GPIO1_DR_SET (IMXRT_GPIO1.offset084)
  5162. #define GPIO1_DR_CLEAR (IMXRT_GPIO1.offset088)
  5163. #define GPIO1_DR_TOGGLE (IMXRT_GPIO1.offset08C)
  5164. #define IMXRT_GPIO2 (*(IMXRT_REGISTER32_t *)0x401BC000)
  5165. #define GPIO2_DR (IMXRT_GPIO2.offset000)
  5166. #define GPIO2_GDIR (IMXRT_GPIO2.offset004)
  5167. #define GPIO2_PSR (IMXRT_GPIO2.offset008)
  5168. #define GPIO2_ICR1 (IMXRT_GPIO2.offset00C)
  5169. #define GPIO2_ICR2 (IMXRT_GPIO2.offset010)
  5170. #define GPIO2_IMR (IMXRT_GPIO2.offset014)
  5171. #define GPIO2_ISR (IMXRT_GPIO2.offset018)
  5172. #define GPIO2_EDGE_SEL (IMXRT_GPIO2.offset01C)
  5173. #define GPIO2_DR_SET (IMXRT_GPIO2.offset084)
  5174. #define GPIO2_DR_CLEAR (IMXRT_GPIO2.offset088)
  5175. #define GPIO2_DR_TOGGLE (IMXRT_GPIO2.offset08C)
  5176. #define IMXRT_GPIO3 (*(IMXRT_REGISTER32_t *)0x401C0000)
  5177. #define GPIO3_DR (IMXRT_GPIO3.offset000)
  5178. #define GPIO3_GDIR (IMXRT_GPIO3.offset004)
  5179. #define GPIO3_PSR (IMXRT_GPIO3.offset008)
  5180. #define GPIO3_ICR1 (IMXRT_GPIO3.offset00C)
  5181. #define GPIO3_ICR2 (IMXRT_GPIO3.offset010)
  5182. #define GPIO3_IMR (IMXRT_GPIO3.offset014)
  5183. #define GPIO3_ISR (IMXRT_GPIO3.offset018)
  5184. #define GPIO3_EDGE_SEL (IMXRT_GPIO3.offset01C)
  5185. #define GPIO3_DR_SET (IMXRT_GPIO3.offset084)
  5186. #define GPIO3_DR_CLEAR (IMXRT_GPIO3.offset088)
  5187. #define GPIO3_DR_TOGGLE (IMXRT_GPIO3.offset08C)
  5188. #define IMXRT_GPIO4 (*(IMXRT_REGISTER32_t *)0x401C4000)
  5189. #define GPIO4_DR (IMXRT_GPIO4.offset000)
  5190. #define GPIO4_GDIR (IMXRT_GPIO4.offset004)
  5191. #define GPIO4_PSR (IMXRT_GPIO4.offset008)
  5192. #define GPIO4_ICR1 (IMXRT_GPIO4.offset00C)
  5193. #define GPIO4_ICR2 (IMXRT_GPIO4.offset010)
  5194. #define GPIO4_IMR (IMXRT_GPIO4.offset014)
  5195. #define GPIO4_ISR (IMXRT_GPIO4.offset018)
  5196. #define GPIO4_EDGE_SEL (IMXRT_GPIO4.offset01C)
  5197. #define GPIO4_DR_SET (IMXRT_GPIO4.offset084)
  5198. #define GPIO4_DR_CLEAR (IMXRT_GPIO4.offset088)
  5199. #define GPIO4_DR_TOGGLE (IMXRT_GPIO4.offset08C)
  5200. #define IMXRT_GPIO5 (*(IMXRT_REGISTER32_t *)0x400C0000)
  5201. #define GPIO5_DR (IMXRT_GPIO5.offset000)
  5202. #define GPIO5_GDIR (IMXRT_GPIO5.offset004)
  5203. #define GPIO5_PSR (IMXRT_GPIO5.offset008)
  5204. #define GPIO5_ICR1 (IMXRT_GPIO5.offset00C)
  5205. #define GPIO5_ICR2 (IMXRT_GPIO5.offset010)
  5206. #define GPIO5_IMR (IMXRT_GPIO5.offset014)
  5207. #define GPIO5_ISR (IMXRT_GPIO5.offset018)
  5208. #define GPIO5_EDGE_SEL (IMXRT_GPIO5.offset01C)
  5209. #define GPIO5_DR_SET (IMXRT_GPIO5.offset084)
  5210. #define GPIO5_DR_CLEAR (IMXRT_GPIO5.offset088)
  5211. #define GPIO5_DR_TOGGLE (IMXRT_GPIO5.offset08C)
  5212. #define IMXRT_GPIO6 (*(IMXRT_REGISTER32_t *)0x42000000)
  5213. #define GPIO6_DR (IMXRT_GPIO6.offset000)
  5214. #define GPIO6_GDIR (IMXRT_GPIO6.offset004)
  5215. #define GPIO6_PSR (IMXRT_GPIO6.offset008)
  5216. #define GPIO6_ICR1 (IMXRT_GPIO6.offset00C)
  5217. #define GPIO6_ICR2 (IMXRT_GPIO6.offset010)
  5218. #define GPIO6_IMR (IMXRT_GPIO6.offset014)
  5219. #define GPIO6_ISR (IMXRT_GPIO6.offset018)
  5220. #define GPIO6_EDGE_SEL (IMXRT_GPIO6.offset01C)
  5221. #define GPIO6_DR_SET (IMXRT_GPIO6.offset084)
  5222. #define GPIO6_DR_CLEAR (IMXRT_GPIO6.offset088)
  5223. #define GPIO6_DR_TOGGLE (IMXRT_GPIO6.offset08C)
  5224. #define IMXRT_GPIO7 (*(IMXRT_REGISTER32_t *)0x42004000)
  5225. #define GPIO7_DR (IMXRT_GPIO7.offset000)
  5226. #define GPIO7_GDIR (IMXRT_GPIO7.offset004)
  5227. #define GPIO7_PSR (IMXRT_GPIO7.offset008)
  5228. #define GPIO7_ICR1 (IMXRT_GPIO7.offset00C)
  5229. #define GPIO7_ICR2 (IMXRT_GPIO7.offset010)
  5230. #define GPIO7_IMR (IMXRT_GPIO7.offset014)
  5231. #define GPIO7_ISR (IMXRT_GPIO7.offset018)
  5232. #define GPIO7_EDGE_SEL (IMXRT_GPIO7.offset01C)
  5233. #define GPIO7_DR_SET (IMXRT_GPIO7.offset084)
  5234. #define GPIO7_DR_CLEAR (IMXRT_GPIO7.offset088)
  5235. #define GPIO7_DR_TOGGLE (IMXRT_GPIO7.offset08C)
  5236. #define IMXRT_GPIO8 (*(IMXRT_REGISTER32_t *)0x42008000)
  5237. #define GPIO8_DR (IMXRT_GPIO8.offset000)
  5238. #define GPIO8_GDIR (IMXRT_GPIO8.offset004)
  5239. #define GPIO8_PSR (IMXRT_GPIO8.offset008)
  5240. #define GPIO8_ICR1 (IMXRT_GPIO8.offset00C)
  5241. #define GPIO8_ICR2 (IMXRT_GPIO8.offset010)
  5242. #define GPIO8_IMR (IMXRT_GPIO8.offset014)
  5243. #define GPIO8_ISR (IMXRT_GPIO8.offset018)
  5244. #define GPIO8_EDGE_SEL (IMXRT_GPIO8.offset01C)
  5245. #define GPIO8_DR_SET (IMXRT_GPIO8.offset084)
  5246. #define GPIO8_DR_CLEAR (IMXRT_GPIO8.offset088)
  5247. #define GPIO8_DR_TOGGLE (IMXRT_GPIO8.offset08C)
  5248. #define IMXRT_GPIO9 (*(IMXRT_REGISTER32_t *)0x4200C000)
  5249. #define GPIO9_DR (IMXRT_GPIO9.offset000)
  5250. #define GPIO9_GDIR (IMXRT_GPIO9.offset004)
  5251. #define GPIO9_PSR (IMXRT_GPIO9.offset008)
  5252. #define GPIO9_ICR1 (IMXRT_GPIO9.offset00C)
  5253. #define GPIO9_ICR2 (IMXRT_GPIO9.offset010)
  5254. #define GPIO9_IMR (IMXRT_GPIO9.offset014)
  5255. #define GPIO9_ISR (IMXRT_GPIO9.offset018)
  5256. #define GPIO9_EDGE_SEL (IMXRT_GPIO9.offset01C)
  5257. #define GPIO9_DR_SET (IMXRT_GPIO9.offset084)
  5258. #define GPIO9_DR_CLEAR (IMXRT_GPIO9.offset088)
  5259. #define GPIO9_DR_TOGGLE (IMXRT_GPIO9.offset08C)
  5260. // 33.6: page 1651
  5261. #define IMXRT_GPT1 (*(IMXRT_REGISTER32_t *)0x401EC000)
  5262. #define GPT1_CR (IMXRT_GPT1.offset000)
  5263. #define GPT1_PR (IMXRT_GPT1.offset004)
  5264. #define GPT1_SR (IMXRT_GPT1.offset008)
  5265. #define GPT1_IR (IMXRT_GPT1.offset00C)
  5266. #define GPT1_OCR1 (IMXRT_GPT1.offset010)
  5267. #define GPT1_OCR2 (IMXRT_GPT1.offset014)
  5268. #define GPT1_OCR3 (IMXRT_GPT1.offset018)
  5269. #define GPT1_ICR1 (IMXRT_GPT1.offset01C)
  5270. #define GPT1_ICR2 (IMXRT_GPT1.offset020)
  5271. #define GPT1_CNT (IMXRT_GPT1.offset024)
  5272. #define IMXRT_GPT2 (*(IMXRT_REGISTER32_t *)0x401F0000)
  5273. #define GPT2_CR (IMXRT_GPT2.offset000)
  5274. #define GPT2_PR (IMXRT_GPT2.offset004)
  5275. #define GPT2_SR (IMXRT_GPT2.offset008)
  5276. #define GPT2_IR (IMXRT_GPT2.offset00C)
  5277. #define GPT2_OCR1 (IMXRT_GPT2.offset010)
  5278. #define GPT2_OCR2 (IMXRT_GPT2.offset014)
  5279. #define GPT2_OCR3 (IMXRT_GPT2.offset018)
  5280. #define GPT2_ICR1 (IMXRT_GPT2.offset01C)
  5281. #define GPT2_ICR2 (IMXRT_GPT2.offset020)
  5282. #define GPT2_CNT (IMXRT_GPT2.offset024)
  5283. #define GPT_CR_FO3 ((uint32_t)(1<<31))
  5284. #define GPT_CR_FO2 ((uint32_t)(1<<30))
  5285. #define GPT_CR_FO1 ((uint32_t)(1<<29))
  5286. #define GPT_CR_OM3(n) ((uint32_t)(((n) & 0x07) << 26))
  5287. #define GPT_CR_OM2(n) ((uint32_t)(((n) & 0x07) << 23))
  5288. #define GPT_CR_OM1(n) ((uint32_t)(((n) & 0x07) << 20))
  5289. #define GPT_CR_IM2(n) ((uint32_t)(((n) & 0x03) << 18))
  5290. #define GPT_CR_IM1(n) ((uint32_t)(((n) & 0x03) << 16))
  5291. #define GPT_CR_SWR ((uint32_t)(1<<15))
  5292. #define GPT_CR_EN_24M ((uint32_t)(1<<10))
  5293. #define GPT_CR_FRR ((uint32_t)(1<<9))
  5294. #define GPT_CR_CLKSRC(n) ((uint32_t)(((n) & 0x07) << 6))
  5295. #define GPT_CR_STOPEN ((uint32_t)(1<<5))
  5296. #define GPT_CR_DOZEEN ((uint32_t)(1<<4))
  5297. #define GPT_CR_WAITEN ((uint32_t)(1<<3))
  5298. #define GPT_CR_DBGEN ((uint32_t)(1<<2))
  5299. #define GPT_CR_ENMOD ((uint32_t)(1<<1))
  5300. #define GPT_CR_EN ((uint32_t)(1<<0))
  5301. #define GPT_PR_PRESCALER24M(n) ((uint32_t)(((n) & 0x0F) << 12))
  5302. #define GPT_PR_PRESCALER(n) ((uint32_t)(((n) & 0xFFF) << 0))
  5303. #define GPT_SR_ROV ((uint32_t)(1<<5))
  5304. #define GPT_SR_IF2 ((uint32_t)(1<<4))
  5305. #define GPT_SR_IF1 ((uint32_t)(1<<3))
  5306. #define GPT_SR_OF3 ((uint32_t)(1<<2))
  5307. #define GPT_SR_OF2 ((uint32_t)(1<<1))
  5308. #define GPT_SR_OF1 ((uint32_t)(1<<0))
  5309. #define GPT_IR_ROVIE ((uint32_t)(1<<5))
  5310. #define GPT_IR_IF2IE ((uint32_t)(1<<4))
  5311. #define GPT_IR_IF1IE ((uint32_t)(1<<3))
  5312. #define GPT_IR_OF3IE ((uint32_t)(1<<2))
  5313. #define GPT_IR_OF2IE ((uint32_t)(1<<1))
  5314. #define GPT_IR_OF1IE ((uint32_t)(1<<0))
  5315. // 34.4: page 1671
  5316. #define IMXRT_IOMUXC_GPR (*(IMXRT_REGISTER32_t *)0x400AC000)
  5317. #define IOMUXC_GPR_GPR0 (IMXRT_IOMUXC_GPR.offset000)
  5318. #define IOMUXC_GPR_GPR1 (IMXRT_IOMUXC_GPR.offset004)
  5319. #define IOMUXC_GPR_GPR2 (IMXRT_IOMUXC_GPR.offset008)
  5320. #define IOMUXC_GPR_GPR3 (IMXRT_IOMUXC_GPR.offset00C)
  5321. #define IOMUXC_GPR_GPR4 (IMXRT_IOMUXC_GPR.offset010)
  5322. #define IOMUXC_GPR_GPR5 (IMXRT_IOMUXC_GPR.offset014)
  5323. #define IOMUXC_GPR_GPR6 (IMXRT_IOMUXC_GPR.offset018)
  5324. #define IOMUXC_GPR_GPR7 (IMXRT_IOMUXC_GPR.offset01C)
  5325. #define IOMUXC_GPR_GPR8 (IMXRT_IOMUXC_GPR.offset020)
  5326. #define IOMUXC_GPR_GPR9 (IMXRT_IOMUXC_GPR.offset024)
  5327. #define IOMUXC_GPR_GPR10 (IMXRT_IOMUXC_GPR.offset028)
  5328. #define IOMUXC_GPR_GPR11 (IMXRT_IOMUXC_GPR.offset02C)
  5329. #define IOMUXC_GPR_GPR12 (IMXRT_IOMUXC_GPR.offset030)
  5330. #define IOMUXC_GPR_GPR13 (IMXRT_IOMUXC_GPR.offset034)
  5331. #define IOMUXC_GPR_GPR14 (IMXRT_IOMUXC_GPR.offset038)
  5332. #define IOMUXC_GPR_GPR15 (IMXRT_IOMUXC_GPR.offset03C)
  5333. #define IOMUXC_GPR_GPR16 (IMXRT_IOMUXC_GPR.offset040)
  5334. #define IOMUXC_GPR_GPR17 (IMXRT_IOMUXC_GPR.offset044)
  5335. #define IOMUXC_GPR_GPR18 (IMXRT_IOMUXC_GPR.offset048)
  5336. #define IOMUXC_GPR_GPR19 (IMXRT_IOMUXC_GPR.offset04C)
  5337. #define IOMUXC_GPR_GPR20 (IMXRT_IOMUXC_GPR.offset050)
  5338. #define IOMUXC_GPR_GPR21 (IMXRT_IOMUXC_GPR.offset054)
  5339. #define IOMUXC_GPR_GPR22 (IMXRT_IOMUXC_GPR.offset058)
  5340. #define IOMUXC_GPR_GPR23 (IMXRT_IOMUXC_GPR.offset05C)
  5341. #define IOMUXC_GPR_GPR24 (IMXRT_IOMUXC_GPR.offset060)
  5342. #define IOMUXC_GPR_GPR25 (IMXRT_IOMUXC_GPR.offset064)
  5343. #define IOMUXC_GPR_GPR26 (IMXRT_IOMUXC_GPR.offset068)
  5344. #define IOMUXC_GPR_GPR27 (IMXRT_IOMUXC_GPR.offset06C)
  5345. #define IOMUXC_GPR_GPR28 (IMXRT_IOMUXC_GPR.offset070)
  5346. #define IOMUXC_GPR_GPR29 (IMXRT_IOMUXC_GPR.offset074)
  5347. #define IOMUXC_GPR_GPR30 (IMXRT_IOMUXC_GPR.offset078)
  5348. #define IOMUXC_GPR_GPR31 (IMXRT_IOMUXC_GPR.offset07C)
  5349. #define IOMUXC_GPR_GPR32 (IMXRT_IOMUXC_GPR.offset080)
  5350. #define IOMUXC_GPR_GPR33 (IMXRT_IOMUXC_GPR.offset084)
  5351. #define IOMUXC_GPR_GPR34 (IMXRT_IOMUXC_GPR.offset088)
  5352. #define IOMUXC_GPR_GPR1_CM7_FORCE_HCLK_EN ((uint32_t)(1<<31))
  5353. #define IOMUXC_GPR_GPR1_ENET_IPG_CLK_S_EN ((uint32_t)(1<<23))
  5354. #define IOMUXC_GPR_GPR1_EXC_MON ((uint32_t)(1<<22))
  5355. #define IOMUXC_GPR_GPR1_SAI3_MCLK_DIR ((uint32_t)(1<<21))
  5356. #define IOMUXC_GPR_GPR1_SAI2_MCLK_DIR ((uint32_t)(1<<20))
  5357. #define IOMUXC_GPR_GPR1_SAI1_MCLK_DIR ((uint32_t)(1<<19))
  5358. #define IOMUXC_GPR_GPR1_ENET2_TX_CLK_DIR ((uint32_t)(1<<18))
  5359. #define IOMUXC_GPR_GPR1_ENET1_TX_CLK_DIR ((uint32_t)(1<<17))
  5360. #define IOMUXC_GPR_GPR1_USB_EXP_MODE ((uint32_t)(1<<15))
  5361. #define IOMUXC_GPR_GPR1_ENET2_CLK_SEL ((uint32_t)(1<<14))
  5362. #define IOMUXC_GPR_GPR1_ENET1_CLK_SEL ((uint32_t)(1<<13))
  5363. #define IOMUXC_GPR_GPR1_GINT ((uint32_t)(1<<12))
  5364. #define IOMUXC_GPR_GPR1_SAI3_MCLK3_SEL(n) ((uint32_t)(((n) & 0x03) << 10))
  5365. #define IOMUXC_GPR_GPR1_SAI2_MCLK3_SEL(n) ((uint32_t)(((n) & 0x03) << 8))
  5366. #define IOMUXC_GPR_GPR1_SAI1_MCLK3_SEL(n) ((uint32_t)(((n) & 0x03) << 6))
  5367. #define IOMUXC_GPR_GPR1_SAI1_MCLK2_SEL(n) ((uint32_t)(((n) & 0x07) << 3))
  5368. #define IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL(n) ((uint32_t)(((n) & 0x07) << 0))
  5369. #define IOMUXC_GPR_GPR1_SAI3_MCLK3_SEL_MASK IOMUXC_GPR_GPR1_SAI3_MCLK3_SEL(3)
  5370. #define IOMUXC_GPR_GPR1_SAI2_MCLK3_SEL_MASK IOMUXC_GPR_GPR1_SAI2_MCLK3_SEL(3)
  5371. #define IOMUXC_GPR_GPR1_SAI1_MCLK3_SEL_MASK IOMUXC_GPR_GPR1_SAI1_MCLK3_SEL(3)
  5372. #define IOMUXC_GPR_GPR1_SAI1_MCLK2_SEL_MASK IOMUXC_GPR_GPR1_SAI1_MCLK2_SEL(7)
  5373. #define IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL_MASK IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL(7)
  5374. #define IOMUXC_GPR_GPR2_QTIMER4_TMR_CNTS_FREEZE ((uint32_t)(1<<31))
  5375. #define IOMUXC_GPR_GPR2_QTIMER3_TMR_CNTS_FREEZE ((uint32_t)(1<<30))
  5376. #define IOMUXC_GPR_GPR2_QTIMER2_TMR_CNTS_FREEZE ((uint32_t)(1<<29))
  5377. #define IOMUXC_GPR_GPR2_QTIMER1_TMR_CNTS_FREEZE ((uint32_t)(1<<28))
  5378. #define IOMUXC_GPR_GPR2_MQS_OVERSAMPLE ((uint32_t)(1<<26))
  5379. #define IOMUXC_GPR_GPR2_MQS_EN ((uint32_t)(1<<25))
  5380. #define IOMUXC_GPR_GPR2_MQS_SW_RST ((uint32_t)(1<<24))
  5381. #define IOMUXC_GPR_GPR2_MQS_CLK_DIV(n) ((uint32_t)(((n) & 0xFF) << 16))
  5382. #define IOMUXC_GPR_GPR2_L2_MEM_DEEPSLEEP ((uint32_t)(1<<14))
  5383. #define IOMUXC_GPR_GPR2_RAM_AUTO_CLK_GATING_EN ((uint32_t)(1<<13))
  5384. #define IOMUXC_GPR_GPR2_L2_MEM_EN_POWERSAVING ((uint32_t)(1<<12))
  5385. #define IOMUXC_GPR_GPR2_CANFD_FILTER_BYPASS ((uint32_t)(1<<6))
  5386. #define IOMUXC_GPR_GPR2_AXBS_P_FORCE_ROUND_ROBIN ((uint32_t)(1<<5))
  5387. #define IOMUXC_GPR_GPR2_AXBS_P_M1_HIGH_PRIORITY ((uint32_t)(1<<4))
  5388. #define IOMUXC_GPR_GPR2_AXBS_P_M0_HIGH_PRIORITY ((uint32_t)(1<<3))
  5389. #define IOMUXC_GPR_GPR2_AXBS_L_FORCE_ROUND_ROBIN ((uint32_t)(1<<2))
  5390. #define IOMUXC_GPR_GPR2_AXBS_L_DMA_HIGH_PRIORITY ((uint32_t)(1<<1))
  5391. #define IOMUXC_GPR_GPR2_AXBS_L_AHBXL_HIGH_PRIORITY ((uint32_t)(1<<0))
  5392. #define IOMUXC_GPR_GPR2_MQS_CLK_DIV_MASK IOMUXC_GPR_GPR2_MQS_CLK_DIV(255)
  5393. #define IOMUXC_GPR_GPR3_AXBS_L_HALTED ((uint32_t)(1<<31))
  5394. #define IOMUXC_GPR_GPR3_OCRAM2_STATUS(n) ((uint32_t)(((n) & 0x0F) << 24))
  5395. #define IOMUXC_GPR_GPR3_OCRAM_STATUS(n) ((uint32_t)(((n) & 0x0F) << 16))
  5396. #define IOMUXC_GPR_GPR3_AXBS_L_HALT_REQ ((uint32_t)(1<<15))
  5397. #define IOMUXC_GPR_GPR3_OCRAM2_CTL(n) ((uint32_t)(((n) & 0x0F) << 8))
  5398. #define IOMUXC_GPR_GPR3_DCP_KEY_SEL ((uint32_t)(1<<4))
  5399. #define IOMUXC_GPR_GPR3_OCRAM_CTL(n) ((uint32_t)(((n) & 0x0F) << 0))
  5400. #define IOMUXC_GPR_GPR4_FLEXSPI2_STOP_ACK ((uint32_t)(1<<31))
  5401. #define IOMUXC_GPR_GPR4_FLEXIO3_STOP_ACK ((uint32_t)(1<<30))
  5402. #define IOMUXC_GPR_GPR4_FLEXIO2_STOP_ACK ((uint32_t)(1<<29))
  5403. #define IOMUXC_GPR_GPR4_FLEXIO1_STOP_ACK ((uint32_t)(1<<28))
  5404. #define IOMUXC_GPR_GPR4_FLEXSPI_STOP_ACK ((uint32_t)(1<<27))
  5405. #define IOMUXC_GPR_GPR4_PIT_STOP_ACK ((uint32_t)(1<<26))
  5406. #define IOMUXC_GPR_GPR4_SEMC_STOP_ACK ((uint32_t)(1<<25))
  5407. #define IOMUXC_GPR_GPR4_SAI3_STOP_ACK ((uint32_t)(1<<23))
  5408. #define IOMUXC_GPR_GPR4_SAI2_STOP_ACK ((uint32_t)(1<<22))
  5409. #define IOMUXC_GPR_GPR4_SAI1_STOP_ACK ((uint32_t)(1<<21))
  5410. #define IOMUXC_GPR_GPR4_ENET_STOP_ACK ((uint32_t)(1<<20))
  5411. #define IOMUXC_GPR_GPR4_TRNG_STOP_ACK ((uint32_t)(1<<19))
  5412. #define IOMUXC_GPR_GPR4_CAN2_STOP_ACK ((uint32_t)(1<<18))
  5413. #define IOMUXC_GPR_GPR4_CAN1_STOP_ACK ((uint32_t)(1<<17))
  5414. #define IOMUXC_GPR_GPR4_EDMA_STOP_ACK ((uint32_t)(1<<16))
  5415. #define IOMUXC_GPR_GPR4_FLEXSPI2_STOP_REQ ((uint32_t)(1<<15))
  5416. #define IOMUXC_GPR_GPR4_FLEXIO3_STOP_REQ ((uint32_t)(1<<14))
  5417. #define IOMUXC_GPR_GPR4_FLEXIO2_STOP_REQ ((uint32_t)(1<<13))
  5418. #define IOMUXC_GPR_GPR4_FLEXIO1_STOP_REQ ((uint32_t)(1<<12))
  5419. #define IOMUXC_GPR_GPR4_FLEXSPI_STOP_REQ ((uint32_t)(1<<11))
  5420. #define IOMUXC_GPR_GPR4_PIT_STOP_REQ ((uint32_t)(1<<10))
  5421. #define IOMUXC_GPR_GPR4_SEMC_STOP_REQ ((uint32_t)(1<<9))
  5422. #define IOMUXC_GPR_GPR4_SAI3_STOP_REQ ((uint32_t)(1<<7))
  5423. #define IOMUXC_GPR_GPR4_SAI2_STOP_REQ ((uint32_t)(1<<6))
  5424. #define IOMUXC_GPR_GPR4_SAI1_STOP_REQ ((uint32_t)(1<<5))
  5425. #define IOMUXC_GPR_GPR4_ENET_STOP_REQ ((uint32_t)(1<<4))
  5426. #define IOMUXC_GPR_GPR4_TRNG_STOP_REQ ((uint32_t)(1<<3))
  5427. #define IOMUXC_GPR_GPR4_CAN2_STOP_REQ ((uint32_t)(1<<2))
  5428. #define IOMUXC_GPR_GPR4_CAN1_STOP_REQ ((uint32_t)(1<<1))
  5429. #define IOMUXC_GPR_GPR4_EDMA_STOP_REQ ((uint32_t)(1<<0))
  5430. #define IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT2 ((uint32_t)(1<<29))
  5431. #define IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT1 ((uint32_t)(1<<28))
  5432. #define IOMUXC_GPR_GPR5_ENET2_EVENT3IN_SEL ((uint32_t)(1<<26))
  5433. #define IOMUXC_GPR_GPR5_ENET_EVENT3IN_SEL ((uint32_t)(1<<25))
  5434. #define IOMUXC_GPR_GPR5_GPT2_CAPIN2_SEL ((uint32_t)(1<<24))
  5435. #define IOMUXC_GPR_GPR5_GPT2_CAPIN1_SEL ((uint32_t)(1<<23))
  5436. #define IOMUXC_GPR_GPR5_WDOG2_MASK ((uint32_t)(1<<7))
  5437. #define IOMUXC_GPR_GPR5_WDOG1_MASK ((uint32_t)(1<<6))
  5438. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_19 ((uint32_t)(1<<31))
  5439. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_18 ((uint32_t)(1<<30))
  5440. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_17 ((uint32_t)(1<<29))
  5441. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_16 ((uint32_t)(1<<28))
  5442. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_15 ((uint32_t)(1<<27))
  5443. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_14 ((uint32_t)(1<<26))
  5444. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_13 ((uint32_t)(1<<25))
  5445. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_12 ((uint32_t)(1<<24))
  5446. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_11 ((uint32_t)(1<<23))
  5447. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_10 ((uint32_t)(1<<22))
  5448. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_9 ((uint32_t)(1<<21))
  5449. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_8 ((uint32_t)(1<<20))
  5450. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_7 ((uint32_t)(1<<19))
  5451. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_6 ((uint32_t)(1<<18))
  5452. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_5 ((uint32_t)(1<<17))
  5453. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_4 ((uint32_t)(1<<16))
  5454. #define IOMUXC_GPR_GPR6_QTIMER4_TRM3_INPUT_SEL ((uint32_t)(1<<15))
  5455. #define IOMUXC_GPR_GPR6_QTIMER4_TRM2_INPUT_SEL ((uint32_t)(1<<14))
  5456. #define IOMUXC_GPR_GPR6_QTIMER4_TRM1_INPUT_SEL ((uint32_t)(1<<13))
  5457. #define IOMUXC_GPR_GPR6_QTIMER4_TRM0_INPUT_SEL ((uint32_t)(1<<12))
  5458. #define IOMUXC_GPR_GPR6_QTIMER3_TRM3_INPUT_SEL ((uint32_t)(1<<11))
  5459. #define IOMUXC_GPR_GPR6_QTIMER3_TRM2_INPUT_SEL ((uint32_t)(1<<10))
  5460. #define IOMUXC_GPR_GPR6_QTIMER3_TRM1_INPUT_SEL ((uint32_t)(1<<9))
  5461. #define IOMUXC_GPR_GPR6_QTIMER3_TRM0_INPUT_SEL ((uint32_t)(1<<8))
  5462. #define IOMUXC_GPR_GPR6_QTIMER2_TRM3_INPUT_SEL ((uint32_t)(1<<7))
  5463. #define IOMUXC_GPR_GPR6_QTIMER2_TRM2_INPUT_SEL ((uint32_t)(1<<6))
  5464. #define IOMUXC_GPR_GPR6_QTIMER2_TRM1_INPUT_SEL ((uint32_t)(1<<5))
  5465. #define IOMUXC_GPR_GPR6_QTIMER2_TRM0_INPUT_SEL ((uint32_t)(1<<4))
  5466. #define IOMUXC_GPR_GPR6_QTIMER1_TRM3_INPUT_SEL ((uint32_t)(1<<3))
  5467. #define IOMUXC_GPR_GPR6_QTIMER1_TRM2_INPUT_SEL ((uint32_t)(1<<2))
  5468. #define IOMUXC_GPR_GPR6_QTIMER1_TRM1_INPUT_SEL ((uint32_t)(1<<1))
  5469. #define IOMUXC_GPR_GPR6_QTIMER1_TRM0_INPUT_SEL ((uint32_t)(1<<0))
  5470. #define IOMUXC_GPR_GPR7_LPUART8_STOP_ACK ((uint32_t)(1<<31))
  5471. #define IOMUXC_GPR_GPR7_LPUART7_STOP_ACK ((uint32_t)(1<<30))
  5472. #define IOMUXC_GPR_GPR7_LPUART6_STOP_ACK ((uint32_t)(1<<29))
  5473. #define IOMUXC_GPR_GPR7_LPUART5_STOP_ACK ((uint32_t)(1<<28))
  5474. #define IOMUXC_GPR_GPR7_LPUART4_STOP_ACK ((uint32_t)(1<<27))
  5475. #define IOMUXC_GPR_GPR7_LPUART3_STOP_ACK ((uint32_t)(1<<26))
  5476. #define IOMUXC_GPR_GPR7_LPUART2_STOP_ACK ((uint32_t)(1<<25))
  5477. #define IOMUXC_GPR_GPR7_LPUART1_STOP_ACK ((uint32_t)(1<<24))
  5478. #define IOMUXC_GPR_GPR7_LPSPI4_STOP_ACK ((uint32_t)(1<<23))
  5479. #define IOMUXC_GPR_GPR7_LPSPI3_STOP_ACK ((uint32_t)(1<<22))
  5480. #define IOMUXC_GPR_GPR7_LPSPI2_STOP_ACK ((uint32_t)(1<<21))
  5481. #define IOMUXC_GPR_GPR7_LPSPI1_STOP_ACK ((uint32_t)(1<<20))
  5482. #define IOMUXC_GPR_GPR7_LPI2C4_STOP_ACK ((uint32_t)(1<<19))
  5483. #define IOMUXC_GPR_GPR7_LPI2C3_STOP_ACK ((uint32_t)(1<<18))
  5484. #define IOMUXC_GPR_GPR7_LPI2C2_STOP_ACK ((uint32_t)(1<<17))
  5485. #define IOMUXC_GPR_GPR7_LPI2C1_STOP_ACK ((uint32_t)(1<<16))
  5486. #define IOMUXC_GPR_GPR7_LPUART8_STOP_REQ ((uint32_t)(1<<15))
  5487. #define IOMUXC_GPR_GPR7_LPUART7_STOP_REQ ((uint32_t)(1<<14))
  5488. #define IOMUXC_GPR_GPR7_LPUART6_STOP_REQ ((uint32_t)(1<<13))
  5489. #define IOMUXC_GPR_GPR7_LPUART5_STOP_REQ ((uint32_t)(1<<12))
  5490. #define IOMUXC_GPR_GPR7_LPUART4_STOP_REQ ((uint32_t)(1<<11))
  5491. #define IOMUXC_GPR_GPR7_LPUART3_STOP_REQ ((uint32_t)(1<<10))
  5492. #define IOMUXC_GPR_GPR7_LPUART2_STOP_REQ ((uint32_t)(1<<9))
  5493. #define IOMUXC_GPR_GPR7_LPUART1_STOP_REQ ((uint32_t)(1<<8))
  5494. #define IOMUXC_GPR_GPR7_LPSPI4_STOP_REQ ((uint32_t)(1<<7))
  5495. #define IOMUXC_GPR_GPR7_LPSPI3_STOP_REQ ((uint32_t)(1<<6))
  5496. #define IOMUXC_GPR_GPR7_LPSPI2_STOP_REQ ((uint32_t)(1<<5))
  5497. #define IOMUXC_GPR_GPR7_LPSPI1_STOP_REQ ((uint32_t)(1<<4))
  5498. #define IOMUXC_GPR_GPR7_LPI2C4_STOP_REQ ((uint32_t)(1<<3))
  5499. #define IOMUXC_GPR_GPR7_LPI2C3_STOP_REQ ((uint32_t)(1<<2))
  5500. #define IOMUXC_GPR_GPR7_LPI2C2_STOP_REQ ((uint32_t)(1<<1))
  5501. #define IOMUXC_GPR_GPR7_LPI2C1_STOP_REQ ((uint32_t)(1<<0))
  5502. #define IOMUXC_GPR_GPR8_LPUART8_IPG_DOZE ((uint32_t)(1<<31))
  5503. #define IOMUXC_GPR_GPR8_LPUART8_IPG_STOP_MODE ((uint32_t)(1<<30))
  5504. #define IOMUXC_GPR_GPR8_LPUART7_IPG_DOZE ((uint32_t)(1<<29))
  5505. #define IOMUXC_GPR_GPR8_LPUART7_IPG_STOP_MODE ((uint32_t)(1<<28))
  5506. #define IOMUXC_GPR_GPR8_LPUART6_IPG_DOZE ((uint32_t)(1<<27))
  5507. #define IOMUXC_GPR_GPR8_LPUART6_IPG_STOP_MODE ((uint32_t)(1<<26))
  5508. #define IOMUXC_GPR_GPR8_LPUART5_IPG_DOZE ((uint32_t)(1<<25))
  5509. #define IOMUXC_GPR_GPR8_LPUART5_IPG_STOP_MODE ((uint32_t)(1<<24))
  5510. #define IOMUXC_GPR_GPR8_LPUART4_IPG_DOZE ((uint32_t)(1<<23))
  5511. #define IOMUXC_GPR_GPR8_LPUART4_IPG_STOP_MODE ((uint32_t)(1<<22))
  5512. #define IOMUXC_GPR_GPR8_LPUART3_IPG_DOZE ((uint32_t)(1<<21))
  5513. #define IOMUXC_GPR_GPR8_LPUART3_IPG_STOP_MODE ((uint32_t)(1<<20))
  5514. #define IOMUXC_GPR_GPR8_LPUART2_IPG_DOZE ((uint32_t)(1<<19))
  5515. #define IOMUXC_GPR_GPR8_LPUART2_IPG_STOP_MODE ((uint32_t)(1<<18))
  5516. #define IOMUXC_GPR_GPR8_LPUART1_IPG_DOZE ((uint32_t)(1<<17))
  5517. #define IOMUXC_GPR_GPR8_LPUART1_IPG_STOP_MODE ((uint32_t)(1<<16))
  5518. #define IOMUXC_GPR_GPR8_LPSPI4_IPG_DOZE ((uint32_t)(1<<15))
  5519. #define IOMUXC_GPR_GPR8_LPSPI4_IPG_STOP_MODE ((uint32_t)(1<<14))
  5520. #define IOMUXC_GPR_GPR8_LPSPI3_IPG_DOZE ((uint32_t)(1<<13))
  5521. #define IOMUXC_GPR_GPR8_LPSPI3_IPG_STOP_MODE ((uint32_t)(1<<12))
  5522. #define IOMUXC_GPR_GPR8_LPSPI2_IPG_DOZE ((uint32_t)(1<<11))
  5523. #define IOMUXC_GPR_GPR8_LPSPI2_IPG_STOP_MODE ((uint32_t)(1<<10))
  5524. #define IOMUXC_GPR_GPR8_LPSPI1_IPG_DOZE ((uint32_t)(1<<9))
  5525. #define IOMUXC_GPR_GPR8_LPSPI1_IPG_STOP_MODE ((uint32_t)(1<<8))
  5526. #define IOMUXC_GPR_GPR8_LPI2C4_IPG_DOZE ((uint32_t)(1<<7))
  5527. #define IOMUXC_GPR_GPR8_LPI2C4_IPG_STOP_MODE ((uint32_t)(1<<6))
  5528. #define IOMUXC_GPR_GPR8_LPI2C3_IPG_DOZE ((uint32_t)(1<<5))
  5529. #define IOMUXC_GPR_GPR8_LPI2C3_IPG_STOP_MODE ((uint32_t)(1<<4))
  5530. #define IOMUXC_GPR_GPR8_LPI2C2_IPG_DOZE ((uint32_t)(1<<3))
  5531. #define IOMUXC_GPR_GPR8_LPI2C2_IPG_STOP_MODE ((uint32_t)(1<<2))
  5532. #define IOMUXC_GPR_GPR8_LPI2C1_IPG_DOZE ((uint32_t)(1<<1))
  5533. #define IOMUXC_GPR_GPR8_LPI2C1_IPG_STOP_MODE ((uint32_t)(1<<0))
  5534. #define IOMUXC_GPR_GPR10_LOCK_OCRAM_TZ_ADDR(n) ((uint32_t)(((n) & 0x7F) << 25))
  5535. #define IOMUXC_GPR_GPR10_LOCK_OCRAM_TZ_EN ((uint32_t)(1<<24))
  5536. #define IOMUXC_GPR_GPR10_LOCK_DCPKEY_OCOTP_OR_KEYMUX ((uint32_t)(1<<20))
  5537. #define IOMUXC_GPR_GPR10_LOCK_SEC_ERR_RESP ((uint32_t)(1<<18))
  5538. #define IOMUXC_GPR_GPR10_LOCK_DBG_EN ((uint32_t)(1<<17))
  5539. #define IOMUXC_GPR_GPR10_LOCK_NIDEN ((uint32_t)(1<<16))
  5540. #define IOMUXC_GPR_GPR10_OCRAM_TZ_ADDR(n) ((uint32_t)(((n) & 0x7F) << 9))
  5541. #define IOMUXC_GPR_GPR10_OCRAM_TZ_EN ((uint32_t)(1<<8))
  5542. #define IOMUXC_GPR_GPR10_DCPKEY_OCOTP_OR_KEYMUX ((uint32_t)(1<<4))
  5543. #define IOMUXC_GPR_GPR10_SEC_ERR_RESP ((uint32_t)(1<<2))
  5544. #define IOMUXC_GPR_GPR10_DBG_EN ((uint32_t)(1<<1))
  5545. #define IOMUXC_GPR_GPR10_NIDEN ((uint32_t)(1<<0))
  5546. #define IOMUXC_GPR_GPR11_LOCK_BEE_DE_RX_EN(n) ((uint32_t)(((n) & 0x0F) << 24))
  5547. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R3_CTRL(n) ((uint32_t)(((n) & 0x03) << 22))
  5548. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R2_CTRL(n) ((uint32_t)(((n) & 0x03) << 20))
  5549. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R1_CTRL(n) ((uint32_t)(((n) & 0x03) << 18))
  5550. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R0_CTRL(n) ((uint32_t)(((n) & 0x03) << 16))
  5551. #define IOMUXC_GPR_GPR11_BEE_DE_RX_EN(n) ((uint32_t)(((n) & 0x0F) << 8))
  5552. #define IOMUXC_GPR_GPR11_M7_APC_AC_R3_CTRL(n) ((uint32_t)(((n) & 0x03) << 6))
  5553. #define IOMUXC_GPR_GPR11_M7_APC_AC_R2_CTRL(n) ((uint32_t)(((n) & 0x03) << 4))
  5554. #define IOMUXC_GPR_GPR11_M7_APC_AC_R1_CTRL(n) ((uint32_t)(((n) & 0x03) << 2))
  5555. #define IOMUXC_GPR_GPR11_M7_APC_AC_R0_CTRL(n) ((uint32_t)(((n) & 0x03) << 0))
  5556. #define IOMUXC_GPR_GPR12_FLEXIO3_IPG_DOZE ((uint32_t)(1<<6))
  5557. #define IOMUXC_GPR_GPR12_FLEXIO3_IPG_STOP_MODE ((uint32_t)(1<<5))
  5558. #define IOMUXC_GPR_GPR12_ACMP_IPG_STOP_MODE ((uint32_t)(1<<4))
  5559. #define IOMUXC_GPR_GPR12_FLEXIO2_IPG_DOZE ((uint32_t)(1<<3))
  5560. #define IOMUXC_GPR_GPR12_FLEXIO2_IPG_STOP_MODE ((uint32_t)(1<<2))
  5561. #define IOMUXC_GPR_GPR12_FLEXIO1_IPG_DOZE ((uint32_t)(1<<1))
  5562. #define IOMUXC_GPR_GPR12_FLEXIO1_IPG_STOP_MODE ((uint32_t)(1<<0))
  5563. #define IOMUXC_GPR_GPR13_CANFD_STOP_ACK ((uint32_t)(1<<20))
  5564. #define IOMUXC_GPR_GPR13_CACHE_USB ((uint32_t)(1<<13))
  5565. #define IOMUXC_GPR_GPR13_CACHE_ENET ((uint32_t)(1<<7))
  5566. #define IOMUXC_GPR_GPR13_CANFD_STOP_REQ ((uint32_t)(1<<4))
  5567. #define IOMUXC_GPR_GPR13_AWCACHE_USDHC ((uint32_t)(1<<1))
  5568. #define IOMUXC_GPR_GPR13_ARCACHE_USDHC ((uint32_t)(1<<0))
  5569. #define IOMUXC_GPR_GPR14_CM7_MX6RT_CFGDTCMSZ(n) ((uint32_t)(((n) & 0x0F) << 20))
  5570. #define IOMUXC_GPR_GPR14_CM7_MX6RT_CFGITCMSZ(n) ((uint32_t)(((n) & 0x0F) << 16))
  5571. #define IOMUXC_GPR_GPR14_ACMP4_SAMPLE_SYNC_EN ((uint32_t)(1<<11))
  5572. #define IOMUXC_GPR_GPR14_ACMP3_SAMPLE_SYNC_EN ((uint32_t)(1<<10))
  5573. #define IOMUXC_GPR_GPR14_ACMP2_SAMPLE_SYNC_EN ((uint32_t)(1<<9))
  5574. #define IOMUXC_GPR_GPR14_ACMP1_SAMPLE_SYNC_EN ((uint32_t)(1<<8))
  5575. #define IOMUXC_GPR_GPR14_ACMP4_CMP_IGEN_TRIM_UP ((uint32_t)(1<<7))
  5576. #define IOMUXC_GPR_GPR14_ACMP3_CMP_IGEN_TRIM_UP ((uint32_t)(1<<6))
  5577. #define IOMUXC_GPR_GPR14_ACMP2_CMP_IGEN_TRIM_UP ((uint32_t)(1<<5))
  5578. #define IOMUXC_GPR_GPR14_ACMP1_CMP_IGEN_TRIM_UP ((uint32_t)(1<<4))
  5579. #define IOMUXC_GPR_GPR14_ACMP4_CMP_IGEN_TRIM_DN ((uint32_t)(1<<3))
  5580. #define IOMUXC_GPR_GPR14_ACMP3_CMP_IGEN_TRIM_DN ((uint32_t)(1<<2))
  5581. #define IOMUXC_GPR_GPR14_ACMP2_CMP_IGEN_TRIM_DN ((uint32_t)(1<<1))
  5582. #define IOMUXC_GPR_GPR14_ACMP1_CMP_IGEN_TRIM_DN ((uint32_t)(1<<0))
  5583. #define IOMUXC_GPR_GPR16_CM7_INIT_VTOR(n) ((uint32_t)(((n) & 0x1FFFFFF) << 7))
  5584. #define IOMUXC_GPR_GPR16_FLEXRAM_BANK_CFG_SEL ((uint32_t)(1<<2))
  5585. #define IOMUXC_GPR_GPR16_INIT_DTCM_EN ((uint32_t)(1<<1))
  5586. #define IOMUXC_GPR_GPR16_INIT_ITCM_EN ((uint32_t)(1<<0))
  5587. #define IOMUXC_GPR_GPR18_M7_APC_AC_R0_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5588. #define IOMUXC_GPR_GPR18_LOCK_M7_APC_AC_R0_BOT ((uint32_t)(1<<0))
  5589. #define IOMUXC_GPR_GPR19_M7_APC_AC_R0_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5590. #define IOMUXC_GPR_GPR19_LOCK_M7_APC_AC_R0_TOP ((uint32_t)(1<<0))
  5591. #define IOMUXC_GPR_GPR20_M7_APC_AC_R1_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5592. #define IOMUXC_GPR_GPR20_LOCK_M7_APC_AC_R1_BOT ((uint32_t)(1<<0))
  5593. #define IOMUXC_GPR_GPR21_M7_APC_AC_R1_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5594. #define IOMUXC_GPR_GPR21_LOCK_M7_APC_AC_R1_TOP ((uint32_t)(1<<0))
  5595. #define IOMUXC_GPR_GPR22_M7_APC_AC_R2_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5596. #define IOMUXC_GPR_GPR22_LOCK_M7_APC_AC_R2_BOT ((uint32_t)(1<<0))
  5597. #define IOMUXC_GPR_GPR23_M7_APC_AC_R2_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5598. #define IOMUXC_GPR_GPR23_LOCK_M7_APC_AC_R2_TOP ((uint32_t)(1<<0))
  5599. #define IOMUXC_GPR_GPR24_M7_APC_AC_R3_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5600. #define IOMUXC_GPR_GPR24_LOCK_M7_APC_AC_R3_BOT ((uint32_t)(1<<0))
  5601. #define IOMUXC_GPR_GPR25_M7_APC_AC_R3_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5602. #define IOMUXC_GPR_GPR25_LOCK_M7_APC_AC_R3_TOP ((uint32_t)(1<<0))
  5603. #define IOMUXC_GPR_GPR33_LOCK_OCRAM2_TZ_ADDR(n) ((uint32_t)(((n) & 0x7F) << 17))
  5604. #define IOMUXC_GPR_GPR33_LOCK_OCRAM2_TZ_EN ((uint32_t)(1<<16))
  5605. #define IOMUXC_GPR_GPR33_OCRAM2_TZ_ADDR(n) ((uint32_t)(((n) & 0x7F) << 1))
  5606. #define IOMUXC_GPR_GPR33_OCRAM2_TZ_EN ((uint32_t)(1<<0))
  5607. #define IOMUXC_GPR_GPR34_SIP_TEST_MUX_QSPI_SIP_EN ((uint32_t)(1<<8))
  5608. #define IOMUXC_GPR_GPR34_SIP_TEST_MUX_BOOT_PIN_SEL(n) ((uint32_t)(((n) & 0xFF) << 0))
  5609. // 34.5: page 1717
  5610. #define IMXRT_IOMUXC_SNVS (*(IMXRT_REGISTER32_t *)0x400A8000)
  5611. #define IOMUXC_SNVS_SW_MUX_CTL_PAD_WAKEUP (IMXRT_IOMUXC_SNVS.offset000)
  5612. #define IOMUXC_SNVS_SW_MUX_CTL_PAD_PMIC_ON_REQ (IMXRT_IOMUXC_SNVS.offset004)
  5613. #define IOMUXC_SNVS_SW_MUX_CTL_PAD_PMIC_STBY_REQ (IMXRT_IOMUXC_SNVS.offset008)
  5614. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_TEST_MODE (IMXRT_IOMUXC_SNVS.offset00C)
  5615. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_POR_B (IMXRT_IOMUXC_SNVS.offset010)
  5616. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_ONOFF (IMXRT_IOMUXC_SNVS.offset014)
  5617. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_WAKEUP (IMXRT_IOMUXC_SNVS.offset018)
  5618. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_PMIC_ON_REQ (IMXRT_IOMUXC_SNVS.offset01C)
  5619. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_PMIC_STBY_REQ (IMXRT_IOMUXC_SNVS.offset020)
  5620. // 34.6: page 1732
  5621. #define IMXRT_IOMUXC_SNVS_GPR (*(IMXRT_REGISTER32_t *)0x400A4000)
  5622. #define IOMUXC_SNVS_GPR_GPR0 (IMXRT_IOMUXC_SNVS_GPR.offset000)
  5623. #define IOMUXC_SNVS_GPR_GPR1 (IMXRT_IOMUXC_SNVS_GPR.offset004)
  5624. #define IOMUXC_SNVS_GPR_GPR2 (IMXRT_IOMUXC_SNVS_GPR.offset008)
  5625. #define IOMUXC_SNVS_GPR_GPR3 (IMXRT_IOMUXC_SNVS_GPR.offset00C)
  5626. // 34.7: page 1736
  5627. #define IMXRT_IOMUXC (*(IMXRT_REGISTER32_t *)0x401F8000)
  5628. #define IMXRT_IOMUXC_b (*(IMXRT_REGISTER32_t *)0x401F8400)
  5629. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_00 (IMXRT_IOMUXC.offset014)
  5630. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_01 (IMXRT_IOMUXC.offset018)
  5631. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_02 (IMXRT_IOMUXC.offset01C)
  5632. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_03 (IMXRT_IOMUXC.offset020)
  5633. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_04 (IMXRT_IOMUXC.offset024)
  5634. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_05 (IMXRT_IOMUXC.offset028)
  5635. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_06 (IMXRT_IOMUXC.offset02C)
  5636. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_07 (IMXRT_IOMUXC.offset030)
  5637. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_08 (IMXRT_IOMUXC.offset034)
  5638. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_09 (IMXRT_IOMUXC.offset038)
  5639. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_10 (IMXRT_IOMUXC.offset03C)
  5640. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_11 (IMXRT_IOMUXC.offset040)
  5641. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_12 (IMXRT_IOMUXC.offset044)
  5642. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_13 (IMXRT_IOMUXC.offset048)
  5643. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_14 (IMXRT_IOMUXC.offset04C)
  5644. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_15 (IMXRT_IOMUXC.offset050)
  5645. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_16 (IMXRT_IOMUXC.offset054)
  5646. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_17 (IMXRT_IOMUXC.offset058)
  5647. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_18 (IMXRT_IOMUXC.offset05C)
  5648. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_19 (IMXRT_IOMUXC.offset060)
  5649. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_20 (IMXRT_IOMUXC.offset064)
  5650. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_21 (IMXRT_IOMUXC.offset068)
  5651. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_22 (IMXRT_IOMUXC.offset06C)
  5652. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_23 (IMXRT_IOMUXC.offset070)
  5653. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_24 (IMXRT_IOMUXC.offset074)
  5654. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_25 (IMXRT_IOMUXC.offset078)
  5655. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_26 (IMXRT_IOMUXC.offset07C)
  5656. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_27 (IMXRT_IOMUXC.offset080)
  5657. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_28 (IMXRT_IOMUXC.offset084)
  5658. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_29 (IMXRT_IOMUXC.offset088)
  5659. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_30 (IMXRT_IOMUXC.offset08C)
  5660. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_31 (IMXRT_IOMUXC.offset090)
  5661. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_32 (IMXRT_IOMUXC.offset094)
  5662. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_33 (IMXRT_IOMUXC.offset098)
  5663. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_34 (IMXRT_IOMUXC.offset09C)
  5664. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_35 (IMXRT_IOMUXC.offset0A0)
  5665. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_36 (IMXRT_IOMUXC.offset0A4)
  5666. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_37 (IMXRT_IOMUXC.offset0A8)
  5667. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_38 (IMXRT_IOMUXC.offset0AC)
  5668. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_39 (IMXRT_IOMUXC.offset0B0)
  5669. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_40 (IMXRT_IOMUXC.offset0B4)
  5670. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_41 (IMXRT_IOMUXC.offset0B8)
  5671. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_00 (IMXRT_IOMUXC.offset0BC)
  5672. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_01 (IMXRT_IOMUXC.offset0C0)
  5673. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_02 (IMXRT_IOMUXC.offset0C4)
  5674. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_03 (IMXRT_IOMUXC.offset0C8)
  5675. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_04 (IMXRT_IOMUXC.offset0CC)
  5676. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_05 (IMXRT_IOMUXC.offset0D0)
  5677. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_06 (IMXRT_IOMUXC.offset0D4)
  5678. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_07 (IMXRT_IOMUXC.offset0D8)
  5679. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_08 (IMXRT_IOMUXC.offset0DC)
  5680. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_09 (IMXRT_IOMUXC.offset0E0)
  5681. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_10 (IMXRT_IOMUXC.offset0E4)
  5682. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_11 (IMXRT_IOMUXC.offset0E8)
  5683. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_12 (IMXRT_IOMUXC.offset0EC)
  5684. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_13 (IMXRT_IOMUXC.offset0F0)
  5685. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_14 (IMXRT_IOMUXC.offset0F4)
  5686. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_15 (IMXRT_IOMUXC.offset0F8)
  5687. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_00 (IMXRT_IOMUXC.offset0FC)
  5688. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_01 (IMXRT_IOMUXC.offset100)
  5689. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_02 (IMXRT_IOMUXC.offset104)
  5690. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_03 (IMXRT_IOMUXC.offset108)
  5691. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_04 (IMXRT_IOMUXC.offset10C)
  5692. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_05 (IMXRT_IOMUXC.offset110)
  5693. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_06 (IMXRT_IOMUXC.offset114)
  5694. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_07 (IMXRT_IOMUXC.offset118)
  5695. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_08 (IMXRT_IOMUXC.offset11C)
  5696. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_09 (IMXRT_IOMUXC.offset120)
  5697. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_10 (IMXRT_IOMUXC.offset124)
  5698. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_11 (IMXRT_IOMUXC.offset128)
  5699. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_12 (IMXRT_IOMUXC.offset12C)
  5700. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_13 (IMXRT_IOMUXC.offset130)
  5701. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_14 (IMXRT_IOMUXC.offset134)
  5702. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_15 (IMXRT_IOMUXC.offset138)
  5703. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_00 (IMXRT_IOMUXC.offset13C)
  5704. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_01 (IMXRT_IOMUXC.offset140)
  5705. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_02 (IMXRT_IOMUXC.offset144)
  5706. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_03 (IMXRT_IOMUXC.offset148)
  5707. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_04 (IMXRT_IOMUXC.offset14C)
  5708. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_05 (IMXRT_IOMUXC.offset150)
  5709. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_06 (IMXRT_IOMUXC.offset154)
  5710. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_07 (IMXRT_IOMUXC.offset158)
  5711. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_08 (IMXRT_IOMUXC.offset15C)
  5712. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_09 (IMXRT_IOMUXC.offset160)
  5713. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_10 (IMXRT_IOMUXC.offset164)
  5714. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_11 (IMXRT_IOMUXC.offset168)
  5715. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_12 (IMXRT_IOMUXC.offset16C)
  5716. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_13 (IMXRT_IOMUXC.offset170)
  5717. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_14 (IMXRT_IOMUXC.offset174)
  5718. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_15 (IMXRT_IOMUXC.offset178)
  5719. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_00 (IMXRT_IOMUXC.offset17C)
  5720. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_01 (IMXRT_IOMUXC.offset180)
  5721. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_02 (IMXRT_IOMUXC.offset184)
  5722. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_03 (IMXRT_IOMUXC.offset188)
  5723. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_04 (IMXRT_IOMUXC.offset18C)
  5724. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_05 (IMXRT_IOMUXC.offset190)
  5725. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_06 (IMXRT_IOMUXC.offset194)
  5726. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_07 (IMXRT_IOMUXC.offset198)
  5727. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_08 (IMXRT_IOMUXC.offset19C)
  5728. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_09 (IMXRT_IOMUXC.offset1A0)
  5729. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_10 (IMXRT_IOMUXC.offset1A4)
  5730. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_11 (IMXRT_IOMUXC.offset1A8)
  5731. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_12 (IMXRT_IOMUXC.offset1AC)
  5732. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_13 (IMXRT_IOMUXC.offset1B0)
  5733. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_14 (IMXRT_IOMUXC.offset1B4)
  5734. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_15 (IMXRT_IOMUXC.offset1B8)
  5735. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_00 (IMXRT_IOMUXC.offset1BC)
  5736. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_01 (IMXRT_IOMUXC.offset1C0)
  5737. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_02 (IMXRT_IOMUXC.offset1C4)
  5738. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_03 (IMXRT_IOMUXC.offset1C8)
  5739. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_04 (IMXRT_IOMUXC.offset1CC)
  5740. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_05 (IMXRT_IOMUXC.offset1D0)
  5741. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_00 (IMXRT_IOMUXC.offset1D4)
  5742. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_01 (IMXRT_IOMUXC.offset1D8)
  5743. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_02 (IMXRT_IOMUXC.offset1DC)
  5744. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_03 (IMXRT_IOMUXC.offset1E0)
  5745. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_04 (IMXRT_IOMUXC.offset1E4)
  5746. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_05 (IMXRT_IOMUXC.offset1E8)
  5747. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_06 (IMXRT_IOMUXC.offset1EC)
  5748. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_07 (IMXRT_IOMUXC.offset1F0)
  5749. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_08 (IMXRT_IOMUXC.offset1F4)
  5750. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_09 (IMXRT_IOMUXC.offset1F8)
  5751. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_10 (IMXRT_IOMUXC.offset1FC)
  5752. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_11 (IMXRT_IOMUXC.offset200)
  5753. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_00 (IMXRT_IOMUXC.offset204)
  5754. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_01 (IMXRT_IOMUXC.offset208)
  5755. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_02 (IMXRT_IOMUXC.offset20C)
  5756. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_03 (IMXRT_IOMUXC.offset210)
  5757. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_04 (IMXRT_IOMUXC.offset214)
  5758. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_05 (IMXRT_IOMUXC.offset218)
  5759. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_06 (IMXRT_IOMUXC.offset21C)
  5760. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_07 (IMXRT_IOMUXC.offset220)
  5761. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08 (IMXRT_IOMUXC.offset224)
  5762. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_09 (IMXRT_IOMUXC.offset228)
  5763. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_10 (IMXRT_IOMUXC.offset22C)
  5764. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_11 (IMXRT_IOMUXC.offset230)
  5765. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_12 (IMXRT_IOMUXC.offset234)
  5766. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_13 (IMXRT_IOMUXC.offset238)
  5767. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_14 (IMXRT_IOMUXC.offset23C)
  5768. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_15 (IMXRT_IOMUXC.offset240)
  5769. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_16 (IMXRT_IOMUXC.offset244)
  5770. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_17 (IMXRT_IOMUXC.offset248)
  5771. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_18 (IMXRT_IOMUXC.offset24C)
  5772. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_19 (IMXRT_IOMUXC.offset250)
  5773. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_20 (IMXRT_IOMUXC.offset254)
  5774. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_21 (IMXRT_IOMUXC.offset258)
  5775. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_22 (IMXRT_IOMUXC.offset25C)
  5776. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_23 (IMXRT_IOMUXC.offset260)
  5777. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_24 (IMXRT_IOMUXC.offset264)
  5778. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_25 (IMXRT_IOMUXC.offset268)
  5779. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_26 (IMXRT_IOMUXC.offset26C)
  5780. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_27 (IMXRT_IOMUXC.offset270)
  5781. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_28 (IMXRT_IOMUXC.offset274)
  5782. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_29 (IMXRT_IOMUXC.offset278)
  5783. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_30 (IMXRT_IOMUXC.offset27C)
  5784. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_31 (IMXRT_IOMUXC.offset280)
  5785. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_32 (IMXRT_IOMUXC.offset284)
  5786. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_33 (IMXRT_IOMUXC.offset288)
  5787. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_34 (IMXRT_IOMUXC.offset28C)
  5788. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_35 (IMXRT_IOMUXC.offset290)
  5789. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_36 (IMXRT_IOMUXC.offset294)
  5790. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_37 (IMXRT_IOMUXC.offset298)
  5791. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_38 (IMXRT_IOMUXC.offset29C)
  5792. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_39 (IMXRT_IOMUXC.offset2A0)
  5793. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_40 (IMXRT_IOMUXC.offset2A4)
  5794. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_41 (IMXRT_IOMUXC.offset2A8)
  5795. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_00 (IMXRT_IOMUXC.offset2AC)
  5796. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_01 (IMXRT_IOMUXC.offset2B0)
  5797. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_02 (IMXRT_IOMUXC.offset2B4)
  5798. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_03 (IMXRT_IOMUXC.offset2B8)
  5799. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_04 (IMXRT_IOMUXC.offset2BC)
  5800. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_05 (IMXRT_IOMUXC.offset2C0)
  5801. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_06 (IMXRT_IOMUXC.offset2C4)
  5802. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_07 (IMXRT_IOMUXC.offset2C8)
  5803. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_08 (IMXRT_IOMUXC.offset2CC)
  5804. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_09 (IMXRT_IOMUXC.offset2D0)
  5805. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_10 (IMXRT_IOMUXC.offset2D4)
  5806. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_11 (IMXRT_IOMUXC.offset2D8)
  5807. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_12 (IMXRT_IOMUXC.offset2DC)
  5808. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_13 (IMXRT_IOMUXC.offset2E0)
  5809. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_14 (IMXRT_IOMUXC.offset2E4)
  5810. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_15 (IMXRT_IOMUXC.offset2E8)
  5811. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_00 (IMXRT_IOMUXC.offset2EC)
  5812. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_01 (IMXRT_IOMUXC.offset2F0)
  5813. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_02 (IMXRT_IOMUXC.offset2F4)
  5814. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_03 (IMXRT_IOMUXC.offset2F8)
  5815. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_04 (IMXRT_IOMUXC.offset2FC)
  5816. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_05 (IMXRT_IOMUXC.offset300)
  5817. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_06 (IMXRT_IOMUXC.offset304)
  5818. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_07 (IMXRT_IOMUXC.offset308)
  5819. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_08 (IMXRT_IOMUXC.offset30C)
  5820. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_09 (IMXRT_IOMUXC.offset310)
  5821. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_10 (IMXRT_IOMUXC.offset314)
  5822. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_11 (IMXRT_IOMUXC.offset318)
  5823. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_12 (IMXRT_IOMUXC.offset31C)
  5824. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_13 (IMXRT_IOMUXC.offset320)
  5825. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_14 (IMXRT_IOMUXC.offset324)
  5826. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_15 (IMXRT_IOMUXC.offset328)
  5827. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_00 (IMXRT_IOMUXC.offset32C)
  5828. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_01 (IMXRT_IOMUXC.offset330)
  5829. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_02 (IMXRT_IOMUXC.offset334)
  5830. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_03 (IMXRT_IOMUXC.offset338)
  5831. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_04 (IMXRT_IOMUXC.offset33C)
  5832. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_05 (IMXRT_IOMUXC.offset340)
  5833. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_06 (IMXRT_IOMUXC.offset344)
  5834. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_07 (IMXRT_IOMUXC.offset348)
  5835. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_08 (IMXRT_IOMUXC.offset34C)
  5836. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_09 (IMXRT_IOMUXC.offset350)
  5837. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_10 (IMXRT_IOMUXC.offset354)
  5838. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_11 (IMXRT_IOMUXC.offset358)
  5839. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_12 (IMXRT_IOMUXC.offset35C)
  5840. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_13 (IMXRT_IOMUXC.offset360)
  5841. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_14 (IMXRT_IOMUXC.offset364)
  5842. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_15 (IMXRT_IOMUXC.offset368)
  5843. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_00 (IMXRT_IOMUXC.offset36C)
  5844. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_01 (IMXRT_IOMUXC.offset370)
  5845. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_02 (IMXRT_IOMUXC.offset374)
  5846. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_03 (IMXRT_IOMUXC.offset378)
  5847. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_04 (IMXRT_IOMUXC.offset37C)
  5848. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_05 (IMXRT_IOMUXC.offset380)
  5849. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_06 (IMXRT_IOMUXC.offset384)
  5850. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_07 (IMXRT_IOMUXC.offset388)
  5851. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_08 (IMXRT_IOMUXC.offset38C)
  5852. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_09 (IMXRT_IOMUXC.offset390)
  5853. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_10 (IMXRT_IOMUXC.offset394)
  5854. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_11 (IMXRT_IOMUXC.offset398)
  5855. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_12 (IMXRT_IOMUXC.offset39C)
  5856. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_13 (IMXRT_IOMUXC.offset3A0)
  5857. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_14 (IMXRT_IOMUXC.offset3A4)
  5858. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_15 (IMXRT_IOMUXC.offset3A8)
  5859. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_00 (IMXRT_IOMUXC.offset3AC)
  5860. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_01 (IMXRT_IOMUXC.offset3B0)
  5861. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_02 (IMXRT_IOMUXC.offset3B4)
  5862. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_03 (IMXRT_IOMUXC.offset3B8)
  5863. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_04 (IMXRT_IOMUXC.offset3BC)
  5864. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_05 (IMXRT_IOMUXC.offset3C0)
  5865. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_00 (IMXRT_IOMUXC.offset3C4)
  5866. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_01 (IMXRT_IOMUXC.offset3C8)
  5867. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_02 (IMXRT_IOMUXC.offset3CC)
  5868. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_03 (IMXRT_IOMUXC.offset3D0)
  5869. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_04 (IMXRT_IOMUXC.offset3D4)
  5870. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_05 (IMXRT_IOMUXC.offset3D8)
  5871. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_06 (IMXRT_IOMUXC.offset3DC)
  5872. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_07 (IMXRT_IOMUXC.offset3E0)
  5873. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_08 (IMXRT_IOMUXC.offset3E4)
  5874. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_09 (IMXRT_IOMUXC.offset3E8)
  5875. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_10 (IMXRT_IOMUXC.offset3EC)
  5876. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_11 (IMXRT_IOMUXC.offset3F0)
  5877. #define IOMUXC_ANATOP_USB_OTG_ID_SELECT_INPUT (IMXRT_IOMUXC.offset3F4)
  5878. #define IOMUXC_ANATOP_USB_UH1_ID_SELECT_INPUT (IMXRT_IOMUXC.offset3F8)
  5879. #define IOMUXC_CCM_PMIC_READY_SELECT_INPUT (IMXRT_IOMUXC.offset3FC)
  5880. #define IOMUXC_CSI_DATA02_SELECT_INPUT (IMXRT_IOMUXC_b.offset000)
  5881. #define IOMUXC_CSI_DATA03_SELECT_INPUT (IMXRT_IOMUXC_b.offset004)
  5882. #define IOMUXC_CSI_DATA04_SELECT_INPUT (IMXRT_IOMUXC_b.offset008)
  5883. #define IOMUXC_CSI_DATA05_SELECT_INPUT (IMXRT_IOMUXC_b.offset00C)
  5884. #define IOMUXC_CSI_DATA06_SELECT_INPUT (IMXRT_IOMUXC_b.offset010)
  5885. #define IOMUXC_CSI_DATA07_SELECT_INPUT (IMXRT_IOMUXC_b.offset014)
  5886. #define IOMUXC_CSI_DATA08_SELECT_INPUT (IMXRT_IOMUXC_b.offset018)
  5887. #define IOMUXC_CSI_DATA09_SELECT_INPUT (IMXRT_IOMUXC_b.offset01C)
  5888. #define IOMUXC_CSI_HSYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset020)
  5889. #define IOMUXC_CSI_PIXCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset024)
  5890. #define IOMUXC_CSI_VSYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset028)
  5891. #define IOMUXC_ENET_IPG_CLK_RMII_SELECT_INPUT (IMXRT_IOMUXC_b.offset02C)
  5892. #define IOMUXC_ENET_MDIO_SELECT_INPUT (IMXRT_IOMUXC_b.offset030)
  5893. #define IOMUXC_ENET0_RXDATA_SELECT_INPUT (IMXRT_IOMUXC_b.offset034)
  5894. #define IOMUXC_ENET1_RXDATA_SELECT_INPUT (IMXRT_IOMUXC_b.offset038)
  5895. #define IOMUXC_ENET_RXEN_SELECT_INPUT (IMXRT_IOMUXC_b.offset03C)
  5896. #define IOMUXC_ENET_RXERR_SELECT_INPUT (IMXRT_IOMUXC_b.offset040)
  5897. #define IOMUXC_ENET0_TIMER_SELECT_INPUT (IMXRT_IOMUXC_b.offset044)
  5898. #define IOMUXC_ENET_TXCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset048)
  5899. #define IOMUXC_FLEXCAN1_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset04C)
  5900. #define IOMUXC_FLEXCAN2_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset050)
  5901. #define IOMUXC_FLEXPWM1_PWMA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset054)
  5902. #define IOMUXC_FLEXPWM1_PWMA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset058)
  5903. #define IOMUXC_FLEXPWM1_PWMA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset05C)
  5904. #define IOMUXC_FLEXPWM1_PWMA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset060)
  5905. #define IOMUXC_FLEXPWM1_PWMB3_SELECT_INPUT (IMXRT_IOMUXC_b.offset064)
  5906. #define IOMUXC_FLEXPWM1_PWMB0_SELECT_INPUT (IMXRT_IOMUXC_b.offset068)
  5907. #define IOMUXC_FLEXPWM1_PWMB1_SELECT_INPUT (IMXRT_IOMUXC_b.offset06C)
  5908. #define IOMUXC_FLEXPWM1_PWMB2_SELECT_INPUT (IMXRT_IOMUXC_b.offset070)
  5909. #define IOMUXC_FLEXPWM2_PWMA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset074)
  5910. #define IOMUXC_FLEXPWM2_PWMA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset078)
  5911. #define IOMUXC_FLEXPWM2_PWMA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset07C)
  5912. #define IOMUXC_FLEXPWM2_PWMA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset080)
  5913. #define IOMUXC_FLEXPWM2_PWMB3_SELECT_INPUT (IMXRT_IOMUXC_b.offset084)
  5914. #define IOMUXC_FLEXPWM2_PWMB0_SELECT_INPUT (IMXRT_IOMUXC_b.offset088)
  5915. #define IOMUXC_FLEXPWM2_PWMB1_SELECT_INPUT (IMXRT_IOMUXC_b.offset09C)
  5916. #define IOMUXC_FLEXPWM2_PWMB2_SELECT_INPUT (IMXRT_IOMUXC_b.offset090)
  5917. #define IOMUXC_FLEXPWM4_PWMA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset094)
  5918. #define IOMUXC_FLEXPWM4_PWMA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset098)
  5919. #define IOMUXC_FLEXPWM4_PWMA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset09C)
  5920. #define IOMUXC_FLEXPWM4_PWMA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset0A0)
  5921. #define IOMUXC_FLEXSPIA_DQS_SELECT_INPUT (IMXRT_IOMUXC_b.offset0A4)
  5922. #define IOMUXC_FLEXSPIA_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0A8)
  5923. #define IOMUXC_FLEXSPIA_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset0AC)
  5924. #define IOMUXC_FLEXSPIA_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset0B0)
  5925. #define IOMUXC_FLEXSPIA_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset0B4)
  5926. #define IOMUXC_FLEXSPIB_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0B8)
  5927. #define IOMUXC_FLEXSPIB_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset0BC)
  5928. #define IOMUXC_FLEXSPIB_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset0C0)
  5929. #define IOMUXC_FLEXSPIB_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset0C4)
  5930. #define IOMUXC_FLEXSPIA_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset0C8)
  5931. #define IOMUXC_LPI2C1_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0CC)
  5932. #define IOMUXC_LPI2C1_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0D0)
  5933. #define IOMUXC_LPI2C2_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0D4)
  5934. #define IOMUXC_LPI2C2_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0D8)
  5935. #define IOMUXC_LPI2C3_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0DC)
  5936. #define IOMUXC_LPI2C3_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0E0)
  5937. #define IOMUXC_LPI2C4_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0E4)
  5938. #define IOMUXC_LPI2C4_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0E8)
  5939. #define IOMUXC_LPSPI1_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0EC)
  5940. #define IOMUXC_LPSPI1_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset0F0)
  5941. #define IOMUXC_LPSPI1_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset0F4)
  5942. #define IOMUXC_LPSPI1_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset0F8)
  5943. #define IOMUXC_LPSPI2_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0FC)
  5944. #define IOMUXC_LPSPI2_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset100)
  5945. #define IOMUXC_LPSPI2_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset104)
  5946. #define IOMUXC_LPSPI2_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset108)
  5947. #define IOMUXC_LPSPI3_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset10C)
  5948. #define IOMUXC_LPSPI3_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset110)
  5949. #define IOMUXC_LPSPI3_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset114)
  5950. #define IOMUXC_LPSPI3_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset118)
  5951. #define IOMUXC_LPSPI4_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset11C)
  5952. #define IOMUXC_LPSPI4_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset120)
  5953. #define IOMUXC_LPSPI4_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset124)
  5954. #define IOMUXC_LPSPI4_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset128)
  5955. #define IOMUXC_LPUART2_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset12C)
  5956. #define IOMUXC_LPUART2_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset130)
  5957. #define IOMUXC_LPUART3_CTS_B_SELECT_INPUT (IMXRT_IOMUXC_b.offset134)
  5958. #define IOMUXC_LPUART3_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset138)
  5959. #define IOMUXC_LPUART3_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset13C)
  5960. #define IOMUXC_LPUART4_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset140)
  5961. #define IOMUXC_LPUART4_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset144)
  5962. #define IOMUXC_LPUART5_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset148)
  5963. #define IOMUXC_LPUART5_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset14C)
  5964. #define IOMUXC_LPUART6_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset150)
  5965. #define IOMUXC_LPUART6_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset154)
  5966. #define IOMUXC_LPUART7_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset158)
  5967. #define IOMUXC_LPUART7_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset15C)
  5968. #define IOMUXC_LPUART8_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset160)
  5969. #define IOMUXC_LPUART8_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset164)
  5970. #define IOMUXC_NMI_GLUE_NMI_SELECT_INPUT (IMXRT_IOMUXC_b.offset168)
  5971. #define IOMUXC_QTIMER2_TIMER0_SELECT_INPUT (IMXRT_IOMUXC_b.offset16C)
  5972. #define IOMUXC_QTIMER2_TIMER1_SELECT_INPUT (IMXRT_IOMUXC_b.offset170)
  5973. #define IOMUXC_QTIMER2_TIMER2_SELECT_INPUT (IMXRT_IOMUXC_b.offset174)
  5974. #define IOMUXC_QTIMER2_TIMER3_SELECT_INPUT (IMXRT_IOMUXC_b.offset178)
  5975. #define IOMUXC_QTIMER3_TIMER0_SELECT_INPUT (IMXRT_IOMUXC_b.offset17C)
  5976. #define IOMUXC_QTIMER3_TIMER1_SELECT_INPUT (IMXRT_IOMUXC_b.offset180)
  5977. #define IOMUXC_QTIMER3_TIMER2_SELECT_INPUT (IMXRT_IOMUXC_b.offset184)
  5978. #define IOMUXC_QTIMER3_TIMER3_SELECT_INPUT (IMXRT_IOMUXC_b.offset188)
  5979. #define IOMUXC_SAI1_MCLK2_SELECT_INPUT (IMXRT_IOMUXC_b.offset18C)
  5980. #define IOMUXC_SAI1_RX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset190)
  5981. #define IOMUXC_SAI1_RX_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset194)
  5982. #define IOMUXC_SAI1_RX_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset198)
  5983. #define IOMUXC_SAI1_RX_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset19C)
  5984. #define IOMUXC_SAI1_RX_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset1A0)
  5985. #define IOMUXC_SAI1_RX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1A4)
  5986. #define IOMUXC_SAI1_TX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1A8)
  5987. #define IOMUXC_SAI1_TX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1AC)
  5988. #define IOMUXC_SAI2_MCLK2_SELECT_INPUT (IMXRT_IOMUXC_b.offset1B0)
  5989. #define IOMUXC_SAI2_RX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1B4)
  5990. #define IOMUXC_SAI2_RX_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset1B8)
  5991. #define IOMUXC_SAI2_RX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1BC)
  5992. #define IOMUXC_SAI2_TX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1C0)
  5993. #define IOMUXC_SAI2_TX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1C4)
  5994. #define IOMUXC_SPDIF_IN_SELECT_INPUT (IMXRT_IOMUXC_b.offset1C8)
  5995. #define IOMUXC_USB_OTG2_OC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1CC)
  5996. #define IOMUXC_USB_OTG1_OC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1D0)
  5997. #define IOMUXC_USDHC1_CD_B_SELECT_INPUT (IMXRT_IOMUXC_b.offset1D4)
  5998. #define IOMUXC_USDHC1_WP_SELECT_INPUT (IMXRT_IOMUXC_b.offset1D8)
  5999. #define IOMUXC_USDHC2_CLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1DC)
  6000. #define IOMUXC_USDHC2_CD_B_SELECT_INPUT (IMXRT_IOMUXC_b.offset1E0)
  6001. #define IOMUXC_USDHC2_CMD_SELECT_INPUT (IMXRT_IOMUXC_b.offset1E4)
  6002. #define IOMUXC_USDHC2_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset1E8)
  6003. #define IOMUXC_USDHC2_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset1EC)
  6004. #define IOMUXC_USDHC2_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset1F0)
  6005. #define IOMUXC_USDHC2_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset1F4)
  6006. #define IOMUXC_USDHC2_DATA4_SELECT_INPUT (IMXRT_IOMUXC_b.offset1F8)
  6007. #define IOMUXC_USDHC2_DATA5_SELECT_INPUT (IMXRT_IOMUXC_b.offset1FC)
  6008. #define IOMUXC_USDHC2_DATA6_SELECT_INPUT (IMXRT_IOMUXC_b.offset200)
  6009. #define IOMUXC_USDHC2_DATA7_SELECT_INPUT (IMXRT_IOMUXC_b.offset204)
  6010. #define IOMUXC_USDHC2_WP_SELECT_INPUT (IMXRT_IOMUXC_b.offset208)
  6011. #define IOMUXC_XBAR1_IN02_SELECT_INPUT (IMXRT_IOMUXC_b.offset20C)
  6012. #define IOMUXC_XBAR1_IN03_SELECT_INPUT (IMXRT_IOMUXC_b.offset210)
  6013. #define IOMUXC_XBAR1_IN04_SELECT_INPUT (IMXRT_IOMUXC_b.offset214)
  6014. #define IOMUXC_XBAR1_IN05_SELECT_INPUT (IMXRT_IOMUXC_b.offset218)
  6015. #define IOMUXC_XBAR1_IN06_SELECT_INPUT (IMXRT_IOMUXC_b.offset21C)
  6016. #define IOMUXC_XBAR1_IN07_SELECT_INPUT (IMXRT_IOMUXC_b.offset220)
  6017. #define IOMUXC_XBAR1_IN08_SELECT_INPUT (IMXRT_IOMUXC_b.offset224)
  6018. #define IOMUXC_XBAR1_IN09_SELECT_INPUT (IMXRT_IOMUXC_b.offset228)
  6019. #define IOMUXC_XBAR1_IN17_SELECT_INPUT (IMXRT_IOMUXC_b.offset22C)
  6020. #define IOMUXC_XBAR1_IN18_SELECT_INPUT (IMXRT_IOMUXC_b.offset230)
  6021. #define IOMUXC_XBAR1_IN20_SELECT_INPUT (IMXRT_IOMUXC_b.offset234)
  6022. #define IOMUXC_XBAR1_IN22_SELECT_INPUT (IMXRT_IOMUXC_b.offset238)
  6023. #define IOMUXC_XBAR1_IN23_SELECT_INPUT (IMXRT_IOMUXC_b.offset23C)
  6024. #define IOMUXC_XBAR1_IN24_SELECT_INPUT (IMXRT_IOMUXC_b.offset240)
  6025. #define IOMUXC_XBAR1_IN14_SELECT_INPUT (IMXRT_IOMUXC_b.offset244)
  6026. #define IOMUXC_XBAR1_IN15_SELECT_INPUT (IMXRT_IOMUXC_b.offset248)
  6027. #define IOMUXC_XBAR1_IN16_SELECT_INPUT (IMXRT_IOMUXC_b.offset24C)
  6028. #define IOMUXC_XBAR1_IN25_SELECT_INPUT (IMXRT_IOMUXC_b.offset250)
  6029. #define IOMUXC_XBAR1_IN19_SELECT_INPUT (IMXRT_IOMUXC_b.offset254)
  6030. #define IOMUXC_XBAR1_IN21_SELECT_INPUT (IMXRT_IOMUXC_b.offset258)
  6031. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_00 (IMXRT_IOMUXC_b.offset25C)
  6032. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_01 (IMXRT_IOMUXC_b.offset260)
  6033. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_02 (IMXRT_IOMUXC_b.offset264)
  6034. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_03 (IMXRT_IOMUXC_b.offset268)
  6035. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_04 (IMXRT_IOMUXC_b.offset26C)
  6036. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_05 (IMXRT_IOMUXC_b.offset270)
  6037. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_06 (IMXRT_IOMUXC_b.offset274)
  6038. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_07 (IMXRT_IOMUXC_b.offset278)
  6039. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_08 (IMXRT_IOMUXC_b.offset27C)
  6040. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_09 (IMXRT_IOMUXC_b.offset280)
  6041. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_10 (IMXRT_IOMUXC_b.offset284)
  6042. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_11 (IMXRT_IOMUXC_b.offset288)
  6043. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_12 (IMXRT_IOMUXC_b.offset28C)
  6044. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_13 (IMXRT_IOMUXC_b.offset290)
  6045. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_00 (IMXRT_IOMUXC_b.offset294)
  6046. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_01 (IMXRT_IOMUXC_b.offset298)
  6047. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_02 (IMXRT_IOMUXC_b.offset29C)
  6048. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_03 (IMXRT_IOMUXC_b.offset2A0)
  6049. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_04 (IMXRT_IOMUXC_b.offset2A4)
  6050. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_05 (IMXRT_IOMUXC_b.offset2A8)
  6051. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_06 (IMXRT_IOMUXC_b.offset2AC)
  6052. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_07 (IMXRT_IOMUXC_b.offset2B0)
  6053. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_00 (IMXRT_IOMUXC_b.offset2B4)
  6054. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_01 (IMXRT_IOMUXC_b.offset2B8)
  6055. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_02 (IMXRT_IOMUXC_b.offset2BC)
  6056. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_03 (IMXRT_IOMUXC_b.offset2C0)
  6057. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_04 (IMXRT_IOMUXC_b.offset2C4)
  6058. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_05 (IMXRT_IOMUXC_b.offset2C8)
  6059. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_06 (IMXRT_IOMUXC_b.offset2CC)
  6060. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_07 (IMXRT_IOMUXC_b.offset2D0)
  6061. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_08 (IMXRT_IOMUXC_b.offset2D4)
  6062. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_09 (IMXRT_IOMUXC_b.offset2D8)
  6063. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_10 (IMXRT_IOMUXC_b.offset2DC)
  6064. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_11 (IMXRT_IOMUXC_b.offset2E0)
  6065. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_12 (IMXRT_IOMUXC_b.offset2E4)
  6066. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_13 (IMXRT_IOMUXC_b.offset2E8)
  6067. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_00 (IMXRT_IOMUXC_b.offset2EC)
  6068. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_01 (IMXRT_IOMUXC_b.offset2F0)
  6069. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_02 (IMXRT_IOMUXC_b.offset2F4)
  6070. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_03 (IMXRT_IOMUXC_b.offset2F8)
  6071. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_04 (IMXRT_IOMUXC_b.offset2FC)
  6072. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_05 (IMXRT_IOMUXC_b.offset300)
  6073. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_06 (IMXRT_IOMUXC_b.offset304)
  6074. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_07 (IMXRT_IOMUXC_b.offset308)
  6075. #define IOMUXC_ENET2_IPG_CLK_RMII_SELECT_INPUT (IMXRT_IOMUXC_b.offset30C)
  6076. #define IOMUXC_ENET2_IPP_IND_MAC0_MDIO_SELECT_INPUT (IMXRT_IOMUXC_b.offset310)
  6077. #define IOMUXC_ENET2_IPP_IND_MAC0_RXDATA_SELECT_INPUT_0 (IMXRT_IOMUXC_b.offset314)
  6078. #define IOMUXC_ENET2_IPP_IND_MAC0_RXDATA_SELECT_INPUT_1 (IMXRT_IOMUXC_b.offset318)
  6079. #define IOMUXC_ENET2_IPP_IND_MAC0_RXEN_SELECT_INPUT (IMXRT_IOMUXC_b.offset31C)
  6080. #define IOMUXC_ENET2_IPP_IND_MAC0_RXERR_SELECT_INPUT (IMXRT_IOMUXC_b.offset320)
  6081. #define IOMUXC_ENET2_IPP_IND_MAC0_TIMER_SELECT_INPUT_0 (IMXRT_IOMUXC_b.offset324)
  6082. #define IOMUXC_ENET2_IPP_IND_MAC0_TXCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset328)
  6083. #define IOMUXC_FLEXSPI2_IPP_IND_DQS_FA_SELECT_INPUT (IMXRT_IOMUXC_b.offset32C)
  6084. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT0_SELECT_INPUT (IMXRT_IOMUXC_b.offset330)
  6085. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT1_SELECT_INPUT (IMXRT_IOMUXC_b.offset334)
  6086. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT2_SELECT_INPUT (IMXRT_IOMUXC_b.offset338)
  6087. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT3_SELECT_INPUT (IMXRT_IOMUXC_b.offset33C)
  6088. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FB_BIT0_SELECT_INPUT (IMXRT_IOMUXC_b.offset340)
  6089. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FB_BIT1_SELECT_INPUT (IMXRT_IOMUXC_b.offset344)
  6090. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FB_BIT2_SELECT_INPUT (IMXRT_IOMUXC_b.offset348)
  6091. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FB_BIT3_SELECT_INPUT (IMXRT_IOMUXC_b.offset34C)
  6092. #define IOMUXC_FLEXSPI2_IPP_IND_SCK_FA_SELECT_INPUT (IMXRT_IOMUXC_b.offset350)
  6093. #define IOMUXC_FLEXSPI2_IPP_IND_SCK_FB_SELECT_INPUT (IMXRT_IOMUXC_b.offset354)
  6094. #define IOMUXC_GPT1_IPP_IND_CAPIN1_SELECT_INPUT (IMXRT_IOMUXC_b.offset358)
  6095. #define IOMUXC_GPT1_IPP_IND_CAPIN2_SELECT_INPUT (IMXRT_IOMUXC_b.offset35C)
  6096. #define IOMUXC_GPT1_IPP_IND_CLKIN_SELECT_INPUT (IMXRT_IOMUXC_b.offset360)
  6097. #define IOMUXC_GPT2_IPP_IND_CAPIN1_SELECT_INPUT (IMXRT_IOMUXC_b.offset364)
  6098. #define IOMUXC_GPT2_IPP_IND_CAPIN2_SELECT_INPUT (IMXRT_IOMUXC_b.offset368)
  6099. #define IOMUXC_GPT2_IPP_IND_CLKIN_SELECT_INPUT (IMXRT_IOMUXC_b.offset36C)
  6100. #define IOMUXC_SAI3_IPG_CLK_SAI_MCLK_SELECT_INPUT_2 (IMXRT_IOMUXC_b.offset370)
  6101. #define IOMUXC_SAI3_IPP_IND_SAI_RXBCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset374)
  6102. #define IOMUXC_SAI3_IPP_IND_SAI_RXDATA_SELECT_INPUT_0 (IMXRT_IOMUXC_b.offset378)
  6103. #define IOMUXC_SAI3_IPP_IND_SAI_RXSYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset37C)
  6104. #define IOMUXC_SAI3_IPP_IND_SAI_TXBCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset380)
  6105. #define IOMUXC_SAI3_IPP_IND_SAI_TXSYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset384)
  6106. #define IOMUXC_SEMC_I_IPP_IND_DQS4_SELECT_INPUT (IMXRT_IOMUXC_b.offset388)
  6107. #define IOMUXC_CANFD_IPP_IND_CANRX_SELECT_INPUT (IMXRT_IOMUXC_b.offset38C)
  6108. #define IOMUXC_PAD_SRE ((uint32_t)(1<<0))
  6109. #define IOMUXC_PAD_DSE(n) ((uint32_t)(((n) & 0x07) << 3))
  6110. #define IOMUXC_PAD_SPEED(n) ((uint32_t)(((n) & 0x03) << 6))
  6111. #define IOMUXC_PAD_ODE ((uint32_t)(1<<11))
  6112. #define IOMUXC_PAD_PKE ((uint32_t)(1<<12))
  6113. #define IOMUXC_PAD_PUE ((uint32_t)(1<<13))
  6114. #define IOMUXC_PAD_PUS(n) ((uint32_t)(((n) & 0x03) << 14))
  6115. #define IOMUXC_PAD_HYS ((uint32_t)(1<<16))
  6116. // 35.6: page 2301
  6117. #define IMXRT_KPP (*(IMXRT_REGISTER16_t *)0x401FC000)
  6118. #define KPP_KPCR (IMXRT_KPP.offset000)
  6119. #define KPP_KPSR (IMXRT_KPP.offset002)
  6120. #define KPP_KDDR (IMXRT_KPP.offset004)
  6121. #define KPP_KPDR (IMXRT_KPP.offset006)
  6122. // 36.4: page 2325
  6123. #define IMXRT_LCDIF (*(IMXRT_REGISTER32_t *)0x402B8000)
  6124. #define LCDIF_CTRL (IMXRT_LCDIF.offset000)
  6125. #define LCDIF_CTRL_SET (IMXRT_LCDIF.offset004)
  6126. #define LCDIF_CTRL_CLR (IMXRT_LCDIF.offset008)
  6127. #define LCDIF_CTRL_TOG (IMXRT_LCDIF.offset00C)
  6128. #define LCDIF_CTRL1 (IMXRT_LCDIF.offset010)
  6129. #define LCDIF_CTRL1_SET (IMXRT_LCDIF.offset014)
  6130. #define LCDIF_CTRL1_CLR (IMXRT_LCDIF.offset018)
  6131. #define LCDIF_CTRL1_TOG (IMXRT_LCDIF.offset01C)
  6132. #define LCDIF_CTRL2 (IMXRT_LCDIF.offset020)
  6133. #define LCDIF_CTRL2_SET (IMXRT_LCDIF.offset024)
  6134. #define LCDIF_CTRL2_CLR (IMXRT_LCDIF.offset028)
  6135. #define LCDIF_CTRL2_TOG (IMXRT_LCDIF.offset02C)
  6136. #define LCDIF_TRANSFER_COUNT (IMXRT_LCDIF.offset030)
  6137. #define LCDIF_CUR_BUF (IMXRT_LCDIF.offset040)
  6138. #define LCDIF_NEXT_BUF (IMXRT_LCDIF.offset050)
  6139. #define LCDIF_VDCTRL0 (IMXRT_LCDIF.offset070)
  6140. #define LCDIF_VDCTRL0_SET (IMXRT_LCDIF.offset074)
  6141. #define LCDIF_VDCTRL0_CLR (IMXRT_LCDIF.offset078)
  6142. #define LCDIF_VDCTRL0_TOG (IMXRT_LCDIF.offset07C)
  6143. #define LCDIF_VDCTRL1 (IMXRT_LCDIF.offset080)
  6144. #define LCDIF_VDCTRL2 (IMXRT_LCDIF.offset090)
  6145. #define LCDIF_VDCTRL3 (IMXRT_LCDIF.offset0A0)
  6146. #define LCDIF_VDCTRL4 (IMXRT_LCDIF.offset0B0)
  6147. #define LCDIF_BM_ERROR_STAT (IMXRT_LCDIF.offset190)
  6148. #define LCDIF_CRC_STAT (IMXRT_LCDIF.offset1A0)
  6149. #define LCDIF_STAT (IMXRT_LCDIF.offset1B0)
  6150. #define LCDIF_THRES (IMXRT_LCDIF.offset200)
  6151. #define LCDIF_AS_CTRL (IMXRT_LCDIF.offset210)
  6152. #define LCDIF_AS_BUF (IMXRT_LCDIF.offset220)
  6153. #define LCDIF_AS_NEXT_BUF (IMXRT_LCDIF.offset230)
  6154. #define LCDIF_AS_CLRKEYLOW (IMXRT_LCDIF.offset240)
  6155. #define LCDIF_AS_CLRKEYHIGH (IMXRT_LCDIF.offset250)
  6156. #define LCDIF_PIGEONCTRL0 (IMXRT_LCDIF.offset380)
  6157. #define LCDIF_PIGEONCTRL0_SET (IMXRT_LCDIF.offset384)
  6158. #define LCDIF_PIGEONCTRL0_CLR (IMXRT_LCDIF.offset388)
  6159. #define LCDIF_PIGEONCTRL0_TOG (IMXRT_LCDIF.offset38C)
  6160. #define LCDIF_PIGEONCTRL1 (IMXRT_LCDIF.offset390)
  6161. #define LCDIF_PIGEONCTRL1_SET (IMXRT_LCDIF.offset394)
  6162. #define LCDIF_PIGEONCTRL1_CLR (IMXRT_LCDIF.offset398)
  6163. #define LCDIF_PIGEONCTRL1_TOG (IMXRT_LCDIF.offset39C)
  6164. #define LCDIF_PIGEONCTRL2 (IMXRT_LCDIF.offset3A0)
  6165. #define LCDIF_PIGEONCTRL2_SET (IMXRT_LCDIF.offset3A4)
  6166. #define LCDIF_PIGEONCTRL2_CLR (IMXRT_LCDIF.offset3A8)
  6167. #define LCDIF_PIGEONCTRL2_TOG (IMXRT_LCDIF.offset3AC)
  6168. #define IMXRT_LCDIF_b (*(IMXRT_REGISTER32_t *)0x402B8800)
  6169. #define LCDIF_PIGEON_0_0 (IMXRT_LCDIF_b.offset000)
  6170. #define LCDIF_PIGEON_0_1 (IMXRT_LCDIF_b.offset010)
  6171. #define LCDIF_PIGEON_0_2 (IMXRT_LCDIF_b.offset020)
  6172. #define LCDIF_PIGEON_1_0 (IMXRT_LCDIF_b.offset040)
  6173. #define LCDIF_PIGEON_1_1 (IMXRT_LCDIF_b.offset050)
  6174. #define LCDIF_PIGEON_1_2 (IMXRT_LCDIF_b.offset060)
  6175. #define LCDIF_PIGEON_2_0 (IMXRT_LCDIF_b.offset080)
  6176. #define LCDIF_PIGEON_2_1 (IMXRT_LCDIF_b.offset090)
  6177. #define LCDIF_PIGEON_2_2 (IMXRT_LCDIF_b.offset0A0)
  6178. #define LCDIF_PIGEON_3_0 (IMXRT_LCDIF_b.offset0C0)
  6179. #define LCDIF_PIGEON_3_1 (IMXRT_LCDIF_b.offset0D0)
  6180. #define LCDIF_PIGEON_3_2 (IMXRT_LCDIF_b.offset0E0)
  6181. #define LCDIF_PIGEON_4_0 (IMXRT_LCDIF_b.offset100)
  6182. #define LCDIF_PIGEON_4_1 (IMXRT_LCDIF_b.offset110)
  6183. #define LCDIF_PIGEON_4_2 (IMXRT_LCDIF_b.offset120)
  6184. #define LCDIF_PIGEON_5_0 (IMXRT_LCDIF_b.offset140)
  6185. #define LCDIF_PIGEON_5_1 (IMXRT_LCDIF_b.offset150)
  6186. #define LCDIF_PIGEON_5_2 (IMXRT_LCDIF_b.offset160)
  6187. #define LCDIF_PIGEON_6_0 (IMXRT_LCDIF_b.offset180)
  6188. #define LCDIF_PIGEON_6_1 (IMXRT_LCDIF_b.offset190)
  6189. #define LCDIF_PIGEON_6_2 (IMXRT_LCDIF_b.offset1A0)
  6190. #define LCDIF_PIGEON_7_0 (IMXRT_LCDIF_b.offset1C0)
  6191. #define LCDIF_PIGEON_7_1 (IMXRT_LCDIF_b.offset1D0)
  6192. #define LCDIF_PIGEON_7_2 (IMXRT_LCDIF_b.offset1E0)
  6193. #define LCDIF_PIGEON_8_0 (IMXRT_LCDIF_b.offset200)
  6194. #define LCDIF_PIGEON_8_1 (IMXRT_LCDIF_b.offset210)
  6195. #define LCDIF_PIGEON_8_2 (IMXRT_LCDIF_b.offset220)
  6196. #define LCDIF_PIGEON_9_0 (IMXRT_LCDIF_b.offset240)
  6197. #define LCDIF_PIGEON_9_1 (IMXRT_LCDIF_b.offset250)
  6198. #define LCDIF_PIGEON_9_2 (IMXRT_LCDIF_b.offset260)
  6199. #define LCDIF_PIGEON_10_0 (IMXRT_LCDIF_b.offset280)
  6200. #define LCDIF_PIGEON_10_1 (IMXRT_LCDIF_b.offset290)
  6201. #define LCDIF_PIGEON_10_2 (IMXRT_LCDIF_b.offset2A0)
  6202. #define LCDIF_PIGEON_11_0 (IMXRT_LCDIF_b.offset2C0)
  6203. #define LCDIF_PIGEON_11_1 (IMXRT_LCDIF_b.offset2D0)
  6204. #define LCDIF_PIGEON_11_2 (IMXRT_LCDIF_b.offset2E0)
  6205. // 37.4: page 2371
  6206. typedef struct {
  6207. const uint32_t VERID;
  6208. const uint32_t PARAM;
  6209. const uint32_t unused1;
  6210. const uint32_t unused2;
  6211. volatile uint32_t MCR; // 010
  6212. volatile uint32_t MSR; // 014
  6213. volatile uint32_t MIER; // 018
  6214. volatile uint32_t MDER; // 01C
  6215. volatile uint32_t MCFGR0; // 020
  6216. volatile uint32_t MCFGR1; // 024
  6217. volatile uint32_t MCFGR2; // 028
  6218. volatile uint32_t MCFGR3; // 02C
  6219. volatile uint32_t unused3[4];
  6220. volatile uint32_t MDMR; // 040
  6221. volatile uint32_t unused4;
  6222. volatile uint32_t MCCR0; // 048
  6223. volatile uint32_t unused5;
  6224. volatile uint32_t MCCR1; // 050
  6225. volatile uint32_t unused6;
  6226. volatile uint32_t MFCR; // 058
  6227. volatile uint32_t MFSR; // 05C
  6228. volatile uint32_t MTDR; // 060
  6229. volatile uint32_t unused7[3];
  6230. volatile uint32_t MRDR; // 070
  6231. volatile uint32_t unused8[39];
  6232. volatile uint32_t SCR; // 110
  6233. volatile uint32_t SSR; // 114
  6234. volatile uint32_t SIER; // 118
  6235. volatile uint32_t SDER; // 11C
  6236. volatile uint32_t unused9;
  6237. volatile uint32_t SCFGR1; // 124
  6238. volatile uint32_t SCFGR2; // 128
  6239. volatile uint32_t unused10[5];
  6240. volatile uint32_t SAMR; // 140
  6241. volatile uint32_t unused11[3];
  6242. volatile uint32_t SASR; // 150
  6243. volatile uint32_t unused12[3];
  6244. volatile uint32_t STAR; // 154
  6245. volatile uint32_t unused13[3];
  6246. volatile uint32_t STDR; // 160
  6247. volatile uint32_t unused14[3];
  6248. volatile uint32_t SRDR; // 170
  6249. } IMXRT_LPI2C_t;
  6250. #define IMXRT_LPI2C1 (*(IMXRT_LPI2C_t *)0x403F0000)
  6251. #define LPI2C1_VERID (IMXRT_LPI2C1.VERID)
  6252. #define LPI2C1_PARAM (IMXRT_LPI2C1.PARAM)
  6253. #define LPI2C1_MCR (IMXRT_LPI2C1.MCR)
  6254. #define LPI2C1_MSR (IMXRT_LPI2C1.MSR)
  6255. #define LPI2C1_MIER (IMXRT_LPI2C1.MIER)
  6256. #define LPI2C1_MDER (IMXRT_LPI2C1.MDER)
  6257. #define LPI2C1_MCFGR0 (IMXRT_LPI2C1.MCFGR0)
  6258. #define LPI2C1_MCFGR1 (IMXRT_LPI2C1.MCFGR1)
  6259. #define LPI2C1_MCFGR2 (IMXRT_LPI2C1.MCFGR2)
  6260. #define LPI2C1_MCFGR3 (IMXRT_LPI2C1.MCFGR3)
  6261. #define LPI2C1_MDMR (IMXRT_LPI2C1.MDMR)
  6262. #define LPI2C1_MCCR0 (IMXRT_LPI2C1.MCCR0)
  6263. #define LPI2C1_MCCR1 (IMXRT_LPI2C1.MCCR1)
  6264. #define LPI2C1_MFCR (IMXRT_LPI2C1.MFCR)
  6265. #define LPI2C1_MFSR (IMXRT_LPI2C1.MFSR)
  6266. #define LPI2C1_MTDR (IMXRT_LPI2C1.MTDR)
  6267. #define LPI2C1_MRDR (IMXRT_LPI2C1.MRDR)
  6268. #define LPI2C1_SCR (IMXRT_LPI2C1.SCR)
  6269. #define LPI2C1_SSR (IMXRT_LPI2C1.SSR)
  6270. #define LPI2C1_SIER (IMXRT_LPI2C1.SIER)
  6271. #define LPI2C1_SDER (IMXRT_LPI2C1.SDER)
  6272. #define LPI2C1_SCFGR1 (IMXRT_LPI2C1.SCFGR1)
  6273. #define LPI2C1_SCFGR2 (IMXRT_LPI2C1.SCFGR2)
  6274. #define LPI2C1_SAMR (IMXRT_LPI2C1.SAMR)
  6275. #define LPI2C1_SASR (IMXRT_LPI2C1.SASR)
  6276. #define LPI2C1_STAR (IMXRT_LPI2C1.STAR)
  6277. #define LPI2C1_STDR (IMXRT_LPI2C1.STDR)
  6278. #define LPI2C1_SRDR (IMXRT_LPI2C1.SRDR)
  6279. #define IMXRT_LPI2C2 (*(IMXRT_LPI2C_t *)0x403F4000)
  6280. #define LPI2C2_VERID (IMXRT_LPI2C2.VERID)
  6281. #define LPI2C2_PARAM (IMXRT_LPI2C2.PARAM)
  6282. #define LPI2C2_MCR (IMXRT_LPI2C2.MCR)
  6283. #define LPI2C2_MSR (IMXRT_LPI2C2.MSR)
  6284. #define LPI2C2_MIER (IMXRT_LPI2C2.MIER)
  6285. #define LPI2C2_MDER (IMXRT_LPI2C2.MDER)
  6286. #define LPI2C2_MCFGR0 (IMXRT_LPI2C2.MCFGR0)
  6287. #define LPI2C2_MCFGR1 (IMXRT_LPI2C2.MCFGR1)
  6288. #define LPI2C2_MCFGR2 (IMXRT_LPI2C2.MCFGR2)
  6289. #define LPI2C2_MCFGR3 (IMXRT_LPI2C2.MCFGR3)
  6290. #define LPI2C2_MDMR (IMXRT_LPI2C2.MDMR)
  6291. #define LPI2C2_MCCR0 (IMXRT_LPI2C2.MCCR0)
  6292. #define LPI2C2_MCCR1 (IMXRT_LPI2C2.MCCR1)
  6293. #define LPI2C2_MFCR (IMXRT_LPI2C2.MFCR)
  6294. #define LPI2C2_MFSR (IMXRT_LPI2C2.MFSR)
  6295. #define LPI2C2_MTDR (IMXRT_LPI2C2.MTDR)
  6296. #define LPI2C2_MRDR (IMXRT_LPI2C2.MRDR)
  6297. #define LPI2C2_SCR (IMXRT_LPI2C2.SCR)
  6298. #define LPI2C2_SSR (IMXRT_LPI2C2.SSR)
  6299. #define LPI2C2_SIER (IMXRT_LPI2C2.SIER)
  6300. #define LPI2C2_SDER (IMXRT_LPI2C2.SDER)
  6301. #define LPI2C2_SCFGR1 (IMXRT_LPI2C2.SCFGR1)
  6302. #define LPI2C2_SCFGR2 (IMXRT_LPI2C2.SCFGR2)
  6303. #define LPI2C2_SAMR (IMXRT_LPI2C2.SAMR)
  6304. #define LPI2C2_SASR (IMXRT_LPI2C2.SASR)
  6305. #define LPI2C2_STAR (IMXRT_LPI2C2.STAR)
  6306. #define LPI2C2_STDR (IMXRT_LPI2C2.STDR)
  6307. #define LPI2C2_SRDR (IMXRT_LPI2C2.SRDR)
  6308. #define IMXRT_LPI2C3 (*(IMXRT_LPI2C_t *)0x403F8000)
  6309. #define LPI2C3_VERID (IMXRT_LPI2C3.VERID)
  6310. #define LPI2C3_PARAM (IMXRT_LPI2C3.PARAM)
  6311. #define LPI2C3_MCR (IMXRT_LPI2C3.MCR)
  6312. #define LPI2C3_MSR (IMXRT_LPI2C3.MSR)
  6313. #define LPI2C3_MIER (IMXRT_LPI2C3.MIER)
  6314. #define LPI2C3_MDER (IMXRT_LPI2C3.MDER)
  6315. #define LPI2C3_MCFGR0 (IMXRT_LPI2C3.MCFGR0)
  6316. #define LPI2C3_MCFGR1 (IMXRT_LPI2C3.MCFGR1)
  6317. #define LPI2C3_MCFGR2 (IMXRT_LPI2C3.MCFGR2)
  6318. #define LPI2C3_MCFGR3 (IMXRT_LPI2C3.MCFGR3)
  6319. #define LPI2C3_MDMR (IMXRT_LPI2C3.MDMR)
  6320. #define LPI2C3_MCCR0 (IMXRT_LPI2C3.MCCR0)
  6321. #define LPI2C3_MCCR1 (IMXRT_LPI2C3.MCCR1)
  6322. #define LPI2C3_MFCR (IMXRT_LPI2C3.MFCR)
  6323. #define LPI2C3_MFSR (IMXRT_LPI2C3.MFSR)
  6324. #define LPI2C3_MTDR (IMXRT_LPI2C3.MTDR)
  6325. #define LPI2C3_MRDR (IMXRT_LPI2C3.MRDR)
  6326. #define LPI2C3_SCR (IMXRT_LPI2C3.SCR)
  6327. #define LPI2C3_SSR (IMXRT_LPI2C3.SSR)
  6328. #define LPI2C3_SIER (IMXRT_LPI2C3.SIER)
  6329. #define LPI2C3_SDER (IMXRT_LPI2C3.SDER)
  6330. #define LPI2C3_SCFGR1 (IMXRT_LPI2C3.SCFGR1)
  6331. #define LPI2C3_SCFGR2 (IMXRT_LPI2C3.SCFGR2)
  6332. #define LPI2C3_SAMR (IMXRT_LPI2C3.SAMR)
  6333. #define LPI2C3_SASR (IMXRT_LPI2C3.SASR)
  6334. #define LPI2C3_STAR (IMXRT_LPI2C3.STAR)
  6335. #define LPI2C3_STDR (IMXRT_LPI2C3.STDR)
  6336. #define LPI2C3_SRDR (IMXRT_LPI2C3.SRDR)
  6337. #define IMXRT_LPI2C4 (*(IMXRT_LPI2C_t *)0x403FC000)
  6338. #define LPI2C4_VERID (IMXRT_LPI2C4.VERID)
  6339. #define LPI2C4_PARAM (IMXRT_LPI2C4.PARAM)
  6340. #define LPI2C4_MCR (IMXRT_LPI2C4.MCR)
  6341. #define LPI2C4_MSR (IMXRT_LPI2C4.MSR)
  6342. #define LPI2C4_MIER (IMXRT_LPI2C4.MIER)
  6343. #define LPI2C4_MDER (IMXRT_LPI2C4.MDER)
  6344. #define LPI2C4_MCFGR0 (IMXRT_LPI2C4.MCFGR0)
  6345. #define LPI2C4_MCFGR1 (IMXRT_LPI2C4.MCFGR1)
  6346. #define LPI2C4_MCFGR2 (IMXRT_LPI2C4.MCFGR2)
  6347. #define LPI2C4_MCFGR3 (IMXRT_LPI2C4.MCFGR3)
  6348. #define LPI2C4_MDMR (IMXRT_LPI2C4.MDMR)
  6349. #define LPI2C4_MCCR0 (IMXRT_LPI2C4.MCCR0)
  6350. #define LPI2C4_MCCR1 (IMXRT_LPI2C4.MCCR1)
  6351. #define LPI2C4_MFCR (IMXRT_LPI2C4.MFCR)
  6352. #define LPI2C4_MFSR (IMXRT_LPI2C4.MFSR)
  6353. #define LPI2C4_MTDR (IMXRT_LPI2C4.MTDR)
  6354. #define LPI2C4_MRDR (IMXRT_LPI2C4.MRDR)
  6355. #define LPI2C4_SCR (IMXRT_LPI2C4.SCR)
  6356. #define LPI2C4_SSR (IMXRT_LPI2C4.SSR)
  6357. #define LPI2C4_SIER (IMXRT_LPI2C4.SIER)
  6358. #define LPI2C4_SDER (IMXRT_LPI2C4.SDER)
  6359. #define LPI2C4_SCFGR1 (IMXRT_LPI2C4.SCFGR1)
  6360. #define LPI2C4_SCFGR2 (IMXRT_LPI2C4.SCFGR2)
  6361. #define LPI2C4_SAMR (IMXRT_LPI2C4.SAMR)
  6362. #define LPI2C4_SASR (IMXRT_LPI2C4.SASR)
  6363. #define LPI2C4_STAR (IMXRT_LPI2C4.STAR)
  6364. #define LPI2C4_STDR (IMXRT_LPI2C4.STDR)
  6365. #define LPI2C4_SRDR (IMXRT_LPI2C4.SRDR)
  6366. #define LPI2C_MCR_RRF ((uint32_t)(1<<9))
  6367. #define LPI2C_MCR_RTF ((uint32_t)(1<<8))
  6368. #define LPI2C_MCR_DBGEN ((uint32_t)(1<<3))
  6369. #define LPI2C_MCR_DOZEN ((uint32_t)(1<<2))
  6370. #define LPI2C_MCR_RST ((uint32_t)(1<<1))
  6371. #define LPI2C_MCR_MEN ((uint32_t)(1<<0))
  6372. #define LPI2C_MSR_BBF ((uint32_t)(1<<25))
  6373. #define LPI2C_MSR_MBF ((uint32_t)(1<<24))
  6374. #define LPI2C_MSR_DMF ((uint32_t)(1<<14))
  6375. #define LPI2C_MSR_PLTF ((uint32_t)(1<<13))
  6376. #define LPI2C_MSR_FEF ((uint32_t)(1<<12))
  6377. #define LPI2C_MSR_ALF ((uint32_t)(1<<11))
  6378. #define LPI2C_MSR_NDF ((uint32_t)(1<<10))
  6379. #define LPI2C_MSR_SDF ((uint32_t)(1<<9))
  6380. #define LPI2C_MSR_EPF ((uint32_t)(1<<8))
  6381. #define LPI2C_MSR_RDF ((uint32_t)(1<<1))
  6382. #define LPI2C_MSR_TDF ((uint32_t)(1<<0))
  6383. #define LPI2C_MIER_DMIE ((uint32_t)(1<<14))
  6384. #define LPI2C_MIER_PLTIE ((uint32_t)(1<<13))
  6385. #define LPI2C_MIER_FEIE ((uint32_t)(1<<12))
  6386. #define LPI2C_MIER_ALIE ((uint32_t)(1<<11))
  6387. #define LPI2C_MIER_NDIE ((uint32_t)(1<<10))
  6388. #define LPI2C_MIER_SDIE ((uint32_t)(1<<9))
  6389. #define LPI2C_MIER_EPIE ((uint32_t)(1<<8))
  6390. #define LPI2C_MIER_RDIE ((uint32_t)(1<<1))
  6391. #define LPI2C_MIER_TDIE ((uint32_t)(1<<0))
  6392. #define LPI2C_MDER_RDDE ((uint32_t)(1<<1))
  6393. #define LPI2C_MDER_TDDE ((uint32_t)(1<<0))
  6394. #define LPI2C_MCFGR0_RDMO ((uint32_t)(1<<9))
  6395. #define LPI2C_MCFGR0_CIRFIFO ((uint32_t)(1<<8))
  6396. #define LPI2C_MCFGR0_HRSEL ((uint32_t)(1<<2))
  6397. #define LPI2C_MCFGR0_HRPOL ((uint32_t)(1<<1))
  6398. #define LPI2C_MCFGR0_HREN ((uint32_t)(1<<0))
  6399. #define LPI2C_MCFGR1_PINCFG(n) ((uint32_t)(((n) & 0x07) << 24))
  6400. #define LPI2C_MCFGR1_MATCFG(n) ((uint32_t)(((n) & 0x07) << 16))
  6401. #define LPI2C_MCFGR1_TIMECFG ((uint32_t)(1<<10))
  6402. #define LPI2C_MCFGR1_IGNACK ((uint32_t)(1<<9))
  6403. #define LPI2C_MCFGR1_AUTOSTOP ((uint32_t)(1<<8))
  6404. #define LPI2C_MCFGR1_PRESCALE(n) ((uint32_t)(((n) & 0x07) << 0))
  6405. #define LPI2C_MCFGR2_FILTSDA(n) ((uint32_t)(((n) & 0x0F) << 24))
  6406. #define LPI2C_MCFGR2_FILTSCL(n) ((uint32_t)(((n) & 0x0F) << 16))
  6407. #define LPI2C_MCFGR2_BUSIDLE(n) ((uint32_t)(((n) & 0xFFF) << 0))
  6408. #define LPI2C_MCFGR3_PINLOW(n) ((uint32_t)(((n) & 0xFFF) << 8))
  6409. #define LPI2C_MDMR_MATCH1(n) ((uint32_t)(((n) & 0xFF) << 16))
  6410. #define LPI2C_MDMR_MATCH0(n) ((uint32_t)(((n) & 0xFF) << 0))
  6411. #define LPI2C_MCCR0_DATAVD(n) ((uint32_t)(((n) & 0x3F) << 24))
  6412. #define LPI2C_MCCR0_SETHOLD(n) ((uint32_t)(((n) & 0x3F) << 16))
  6413. #define LPI2C_MCCR0_CLKHI(n) ((uint32_t)(((n) & 0x3F) << 8))
  6414. #define LPI2C_MCCR0_CLKLO(n) ((uint32_t)(((n) & 0x3F) << 0))
  6415. #define LPI2C_MCCR1_DATAVD(n) ((uint32_t)(((n) & 0x3F) << 24))
  6416. #define LPI2C_MCCR1_SETHOLD(n) ((uint32_t)(((n) & 0x3F) << 16))
  6417. #define LPI2C_MCCR1_CLKHI(n) ((uint32_t)(((n) & 0x3F) << 8))
  6418. #define LPI2C_MCCR1_CLKLO(n) ((uint32_t)(((n) & 0x3F) << 0))
  6419. #define LPI2C_MFCR_RXWATER(n) ((uint32_t)(((n) & 0x03) << 16))
  6420. #define LPI2C_MFCR_TXWATER(n) ((uint32_t)(((n) & 0x03) << 0))
  6421. #define LPI2C_MFSR_RXCOUNT(n) ((uint32_t)(((n) & 0x07) << 16))
  6422. #define LPI2C_MFSR_TXCOUNT(n) ((uint32_t)(((n) & 0x07) << 16))
  6423. #define LPI2C_MTDR_CMD(n) ((uint32_t)(((n) & 0x07) << 8))
  6424. #define LPI2C_MTDR_CMD_TRANSMIT ((uint32_t)(0 << 8))
  6425. #define LPI2C_MTDR_CMD_RECEIVE ((uint32_t)(1 << 8))
  6426. #define LPI2C_MTDR_CMD_STOP ((uint32_t)(2 << 8))
  6427. #define LPI2C_MTDR_CMD_DISCARD ((uint32_t)(3 << 8))
  6428. #define LPI2C_MTDR_CMD_START ((uint32_t)(4 << 8))
  6429. #define LPI2C_MTDR_CMD_START_NACK ((uint32_t)(5 << 8))
  6430. #define LPI2C_MTDR_CMD_HS_START ((uint32_t)(6 << 8))
  6431. #define LPI2C_MTDR_CMD_HS_START_NAcK ((uint32_t)(7 << 8))
  6432. #define LPI2C_MTDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  6433. #define LPI2C_MRDR_RXEMPTY ((uint32_t)(1<<14))
  6434. #define LPI2C_MRDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  6435. #define LPI2C_SCR_RRF ((uint32_t)(1<<9))
  6436. #define LPI2C_SCR_RTF ((uint32_t)(1<<8))
  6437. #define LPI2C_SCR_FILTDZ ((uint32_t)(1<<5))
  6438. #define LPI2C_SCR_FILTEN ((uint32_t)(1<<4))
  6439. #define LPI2C_SCR_RST ((uint32_t)(1<<1))
  6440. #define LPI2C_SCR_SEN ((uint32_t)(1<<0))
  6441. #define LPI2C_SSR_BBF ((uint32_t)(1<<25))
  6442. #define LPI2C_SSR_SBF ((uint32_t)(1<<24))
  6443. #define LPI2C_SSR_SARF ((uint32_t)(1<<15))
  6444. #define LPI2C_SSR_GCF ((uint32_t)(1<<14))
  6445. #define LPI2C_SSR_AM1F ((uint32_t)(1<<13))
  6446. #define LPI2C_SSR_AM0F ((uint32_t)(1<<12))
  6447. #define LPI2C_SSR_FEF ((uint32_t)(1<<11))
  6448. #define LPI2C_SSR_BEF ((uint32_t)(1<<10))
  6449. #define LPI2C_SSR_SDF ((uint32_t)(1<<9))
  6450. #define LPI2C_SSR_RSF ((uint32_t)(1<<8))
  6451. #define LPI2C_SSR_TAF ((uint32_t)(1<<3))
  6452. #define LPI2C_SSR_AVF ((uint32_t)(1<<2))
  6453. #define LPI2C_SSR_RDF ((uint32_t)(1<<1))
  6454. #define LPI2C_SSR_TDF ((uint32_t)(1<<0))
  6455. #define LPI2C_SIER_SARIE ((uint32_t)(1<<25))
  6456. #define LPI2C_SIER_GCIE ((uint32_t)(1<<24))
  6457. #define LPI2C_SIER_AM1F ((uint32_t)(1<<13))
  6458. #define LPI2C_SIER_AM0IE ((uint32_t)(1<<12))
  6459. #define LPI2C_SIER_FEIE ((uint32_t)(1<<11))
  6460. #define LPI2C_SIER_BEIE ((uint32_t)(1<<10))
  6461. #define LPI2C_SIER_SDIE ((uint32_t)(1<<9))
  6462. #define LPI2C_SIER_RSIE ((uint32_t)(1<<8))
  6463. #define LPI2C_SIER_TAIE ((uint32_t)(1<<3))
  6464. #define LPI2C_SIER_AVIE ((uint32_t)(1<<2))
  6465. #define LPI2C_SIER_RDIE ((uint32_t)(1<<1))
  6466. #define LPI2C_SIER_TDIE ((uint32_t)(1<<0))
  6467. #define LPI2C_SDER_AVDE ((uint32_t)(1<<2))
  6468. #define LPI2C_SDER_RDDE ((uint32_t)(1<<1))
  6469. #define LPI2C_SDER_TDDE ((uint32_t)(1<<0))
  6470. #define LPI2C_SCFGR1_ADDRCFG(n) ((uint32_t)(((n) & 0x07) << 16))
  6471. #define LPI2C_SCFGR1_HSMEN ((uint32_t)(1<<13))
  6472. #define LPI2C_SCFGR1_IGNACK ((uint32_t)(1<<12))
  6473. #define LPI2C_SCFGR1_RXCFG ((uint32_t)(1<<11))
  6474. #define LPI2C_SCFGR1_TXCFG ((uint32_t)(1<<10))
  6475. #define LPI2C_SCFGR1_SAEN ((uint32_t)(1<<9))
  6476. #define LPI2C_SCFGR1_GCEN ((uint32_t)(1<<8))
  6477. #define LPI2C_SCFGR1_ACKSTALL ((uint32_t)(1<<3))
  6478. #define LPI2C_SCFGR1_TXDSTALL ((uint32_t)(1<<2))
  6479. #define LPI2C_SCFGR1_RXSTALL ((uint32_t)(1<<1))
  6480. #define LPI2C_SCFGR1_ADRSTALL ((uint32_t)(1<<0))
  6481. #define LPI2C_SCFGR2_FILTSDA(n) ((uint32_t)(((n) & 0x0F) << 24))
  6482. #define LPI2C_SCFGR2_FILTSCL(n) ((uint32_t)(((n) & 0x0F) << 16))
  6483. #define LPI2C_SCFGR2_DATAVD(n) ((uint32_t)(((n) & 0x3F) << 8))
  6484. #define LPI2C_SCFGR2_CLKHOLD(n) ((uint32_t)(((n) & 0x0F) << 0))
  6485. #define LPI2C_SAMR_ADDR1(n) ((uint32_t)(((n) & 0x7F) << 17))
  6486. #define LPI2C_SAMR_ADDR0(n) ((uint32_t)(((n) & 0x7F) << 1))
  6487. #define LPI2C_SASR_ANV ((uint32_t)(1<<14))
  6488. #define LPI2C_SASR_RADDR(n) ((uint32_t)(((n) & 0x7FF) << 0))
  6489. #define LPI2C_STAR_TXNACK ((uint32_t)(1<<0))
  6490. #define LPI2C_STDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  6491. #define LPI2C_SRDR_SOF ((uint32_t)(1<<15))
  6492. #define LPI2C_SRDR_RXEMPTY ((uint32_t)(1<<14))
  6493. #define LPI2C_SRDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  6494. // 38.3.5.2: page 2422
  6495. typedef struct {
  6496. const uint32_t VERID; // 0
  6497. const uint32_t PARAM; // 0x04
  6498. const uint32_t UNUSED0; // 0x08
  6499. const uint32_t UNUSED1; // 0x0c
  6500. volatile uint32_t CR; // 0x10
  6501. volatile uint32_t SR; // 0x14
  6502. volatile uint32_t IER; // 0x18
  6503. volatile uint32_t DER; // 0x1c
  6504. volatile uint32_t CFGR0; // 0x20
  6505. volatile uint32_t CFGR1; // 0x24
  6506. const uint32_t UNUSED3; // 0x28
  6507. const uint32_t UNUSED4; // 0x2c
  6508. volatile uint32_t DMR0; // 0x30
  6509. volatile uint32_t DMR1; // 0x34
  6510. const uint32_t UNUSED5; // 0x38
  6511. const uint32_t UNUSED6; // 0x3c
  6512. volatile uint32_t CCR; // 0x40
  6513. const uint32_t UNUSED7; // 0x44
  6514. const uint32_t UNUSED8; // 0x48
  6515. const uint32_t UNUSED9; // 0x4c
  6516. const uint32_t UNUSED10; // 0x50
  6517. const uint32_t UNUSED11; // 0x54
  6518. volatile uint32_t FCR; // 0x58
  6519. volatile uint32_t FSR; // 0x5C
  6520. volatile uint32_t TCR; // 0x60
  6521. volatile uint32_t TDR; // 0x64
  6522. const uint32_t UNUSED12; // 0x68
  6523. const uint32_t UNUSED13; // 0x6c
  6524. volatile uint32_t RSR; // 0x70
  6525. volatile uint32_t RDR; // 0x74
  6526. } IMXRT_LPSPI_t;
  6527. #define IMXRT_LPSPI1 (*(IMXRT_REGISTER32_t *)0x40394000)
  6528. #define IMXRT_LPSPI1_S (*(IMXRT_LPSPI_t *)0x40394000)
  6529. #define LPSPI1_VERID (IMXRT_LPSPI1.offset000)
  6530. #define LPSPI1_PARAM (IMXRT_LPSPI1.offset004)
  6531. #define LPSPI1_CR (IMXRT_LPSPI1.offset010)
  6532. #define LPSPI1_SR (IMXRT_LPSPI1.offset014)
  6533. #define LPSPI1_IER (IMXRT_LPSPI1.offset018)
  6534. #define LPSPI1_DER (IMXRT_LPSPI1.offset01C)
  6535. #define LPSPI1_CFGR0 (IMXRT_LPSPI1.offset020)
  6536. #define LPSPI1_CFGR1 (IMXRT_LPSPI1.offset024)
  6537. #define LPSPI1_DMR0 (IMXRT_LPSPI1.offset030)
  6538. #define LPSPI1_DMR1 (IMXRT_LPSPI1.offset034)
  6539. #define LPSPI1_CCR (IMXRT_LPSPI1.offset040)
  6540. #define LPSPI1_FCR (IMXRT_LPSPI1.offset058)
  6541. #define LPSPI1_FSR (IMXRT_LPSPI1.offset05C)
  6542. #define LPSPI1_TCR (IMXRT_LPSPI1.offset060)
  6543. #define LPSPI1_TDR (IMXRT_LPSPI1.offset064)
  6544. #define LPSPI1_RSR (IMXRT_LPSPI1.offset070)
  6545. #define LPSPI1_RDR (IMXRT_LPSPI1.offset074)
  6546. #define IMXRT_LPSPI2 (*(IMXRT_REGISTER32_t *)0x40398000)
  6547. #define IMXRT_LPSPI2_S (*(IMXRT_LPSPI_t *)0x40398000)
  6548. #define LPSPI2_VERID (IMXRT_LPSPI2.offset000)
  6549. #define LPSPI2_PARAM (IMXRT_LPSPI2.offset004)
  6550. #define LPSPI2_CR (IMXRT_LPSPI2.offset010)
  6551. #define LPSPI2_SR (IMXRT_LPSPI2.offset014)
  6552. #define LPSPI2_IER (IMXRT_LPSPI2.offset018)
  6553. #define LPSPI2_DER (IMXRT_LPSPI2.offset01C)
  6554. #define LPSPI2_CFGR0 (IMXRT_LPSPI2.offset020)
  6555. #define LPSPI2_CFGR1 (IMXRT_LPSPI2.offset024)
  6556. #define LPSPI2_DMR0 (IMXRT_LPSPI2.offset030)
  6557. #define LPSPI2_DMR1 (IMXRT_LPSPI2.offset034)
  6558. #define LPSPI2_CCR (IMXRT_LPSPI2.offset040)
  6559. #define LPSPI2_FCR (IMXRT_LPSPI2.offset058)
  6560. #define LPSPI2_FSR (IMXRT_LPSPI2.offset05C)
  6561. #define LPSPI2_TCR (IMXRT_LPSPI2.offset060)
  6562. #define LPSPI2_TDR (IMXRT_LPSPI2.offset064)
  6563. #define LPSPI2_RSR (IMXRT_LPSPI2.offset070)
  6564. #define LPSPI2_RDR (IMXRT_LPSPI2.offset074)
  6565. #define IMXRT_LPSPI3 (*(IMXRT_REGISTER32_t *)0x4039C000)
  6566. #define IMXRT_LPSPI3_S (*(IMXRT_LPSPI_t *)0x4039C000)
  6567. #define LPSPI3_VERID (IMXRT_LPSPI3.offset000)
  6568. #define LPSPI3_PARAM (IMXRT_LPSPI3.offset004)
  6569. #define LPSPI3_CR (IMXRT_LPSPI3.offset010)
  6570. #define LPSPI3_SR (IMXRT_LPSPI3.offset014)
  6571. #define LPSPI3_IER (IMXRT_LPSPI3.offset018)
  6572. #define LPSPI3_DER (IMXRT_LPSPI3.offset01C)
  6573. #define LPSPI3_CFGR0 (IMXRT_LPSPI3.offset020)
  6574. #define LPSPI3_CFGR1 (IMXRT_LPSPI3.offset024)
  6575. #define LPSPI3_DMR0 (IMXRT_LPSPI3.offset030)
  6576. #define LPSPI3_DMR1 (IMXRT_LPSPI3.offset034)
  6577. #define LPSPI3_CCR (IMXRT_LPSPI3.offset040)
  6578. #define LPSPI3_FCR (IMXRT_LPSPI3.offset058)
  6579. #define LPSPI3_FSR (IMXRT_LPSPI3.offset05C)
  6580. #define LPSPI3_TCR (IMXRT_LPSPI3.offset060)
  6581. #define LPSPI3_TDR (IMXRT_LPSPI3.offset064)
  6582. #define LPSPI3_RSR (IMXRT_LPSPI3.offset070)
  6583. #define LPSPI3_RDR (IMXRT_LPSPI3.offset074)
  6584. #define IMXRT_LPSPI4 (*(IMXRT_REGISTER32_t *)0x403A0000)
  6585. #define IMXRT_LPSPI4_S (*(IMXRT_LPSPI_t *)0x403A0000)
  6586. #define LPSPI4_VERID (IMXRT_LPSPI4.offset000)
  6587. #define LPSPI4_PARAM (IMXRT_LPSPI4.offset004)
  6588. #define LPSPI4_CR (IMXRT_LPSPI4.offset010)
  6589. #define LPSPI4_SR (IMXRT_LPSPI4.offset014)
  6590. #define LPSPI4_IER (IMXRT_LPSPI4.offset018)
  6591. #define LPSPI4_DER (IMXRT_LPSPI4.offset01C)
  6592. #define LPSPI4_CFGR0 (IMXRT_LPSPI4.offset020)
  6593. #define LPSPI4_CFGR1 (IMXRT_LPSPI4.offset024)
  6594. #define LPSPI4_DMR0 (IMXRT_LPSPI4.offset030)
  6595. #define LPSPI4_DMR1 (IMXRT_LPSPI4.offset034)
  6596. #define LPSPI4_CCR (IMXRT_LPSPI4.offset040)
  6597. #define LPSPI4_FCR (IMXRT_LPSPI4.offset058)
  6598. #define LPSPI4_FSR (IMXRT_LPSPI4.offset05C)
  6599. #define LPSPI4_TCR (IMXRT_LPSPI4.offset060)
  6600. #define LPSPI4_TDR (IMXRT_LPSPI4.offset064)
  6601. #define LPSPI4_RSR (IMXRT_LPSPI4.offset070)
  6602. #define LPSPI4_RDR (IMXRT_LPSPI4.offset074)
  6603. #define LPSPI_CR_RRF ((uint32_t)(1<<9))
  6604. #define LPSPI_CR_RTF ((uint32_t)(1<<8))
  6605. #define LPSPI_CR_DBGEN ((uint32_t)(1<<3))
  6606. #define LPSPI_CR_DOZEN ((uint32_t)(1<<2))
  6607. #define LPSPI_CR_RST ((uint32_t)(1<<1))
  6608. #define LPSPI_CR_MEN ((uint32_t)(1<<0))
  6609. #define LPSPI_SR_MBF ((uint32_t)(1<<24))
  6610. #define LPSPI_SR_DMF ((uint32_t)(1<<13))
  6611. #define LPSPI_SR_REF ((uint32_t)(1<<12))
  6612. #define LPSPI_SR_TEF ((uint32_t)(1<<11))
  6613. #define LPSPI_SR_TCF ((uint32_t)(1<<10))
  6614. #define LPSPI_SR_FCF ((uint32_t)(1<<9))
  6615. #define LPSPI_SR_WCF ((uint32_t)(1<<8))
  6616. #define LPSPI_SR_RDF ((uint32_t)(1<<1))
  6617. #define LPSPI_SR_TDF ((uint32_t)(1<<0))
  6618. #define LPSPI_IER_DMIE ((uint32_t)(1<<13))
  6619. #define LPSPI_IER_REIE ((uint32_t)(1<<12))
  6620. #define LPSPI_IER_TEIE ((uint32_t)(1<<11))
  6621. #define LPSPI_IER_TCIE ((uint32_t)(1<<10))
  6622. #define LPSPI_IER_FCIE ((uint32_t)(1<<9))
  6623. #define LPSPI_IER_WCIE ((uint32_t)(1<<8))
  6624. #define LPSPI_IER_RDIE ((uint32_t)(1<<1))
  6625. #define LPSPI_IER_TDIE ((uint32_t)(1<<0))
  6626. #define LPSPI_DER_RDDE ((uint32_t)(1<<1))
  6627. #define LPSPI_DER_TDDE ((uint32_t)(1<<0))
  6628. #define LPSPI_CFGR0_RDMO ((uint32_t)(1<<9))
  6629. #define LPSPI_CFGR0_CIRFIFO ((uint32_t)(1<<8))
  6630. #define LPSPI_CFGR0_HRSEL ((uint32_t)(1<<2))
  6631. #define LPSPI_CFGR0_HRPOL ((uint32_t)(1<<1))
  6632. #define LPSPI_CFGR0_HREN ((uint32_t)(1<<0))
  6633. #define LPSPI_CFGR1_PCSCFG ((uint32_t)(1<<27))
  6634. #define LPSPI_CFGR1_OUTCFG ((uint32_t)(1<<26))
  6635. #define LPSPI_CFGR1_PINCFG(n) ((uint32_t)(((n) & 0x03) << 24))
  6636. #define LPSPI_CFGR1_MATCFG(n) ((uint32_t)(((n) & 0x07) << 16))
  6637. #define LPSPI_CFGR1_PCSPOL(n) ((uint32_t)(((n) & 0x0F) << 8))
  6638. #define LPSPI_CFGR1_NOSTALL ((uint32_t)(1<<3))
  6639. #define LPSPI_CFGR1_AUTOPCS ((uint32_t)(1<<2))
  6640. #define LPSPI_CFGR1_SAMPLE ((uint32_t)(1<<1))
  6641. #define LPSPI_CFGR1_MASTER ((uint32_t)(1<<0))
  6642. #define LPSPI_CCR_SCKPCS(n) ((uint32_t)(((n) & 0xFF) << 24))
  6643. #define LPSPI_CCR_PCSSCK(n) ((uint32_t)(((n) & 0xFF) << 16))
  6644. #define LPSPI_CCR_DBT(n) ((uint32_t)(((n) & 0xFF) << 8))
  6645. #define LPSPI_CCR_SCKDIV(n) ((uint32_t)(((n) & 0xFF) << 0))
  6646. #define LPSPI_FCR_RXWATER(n) ((uint32_t)(((n) & 0x0F) << 16))
  6647. #define LPSPI_FCR_TXWATER(n) ((uint32_t)(((n) & 0x0F) << 0))
  6648. #define LPSPI_FSR_RXCOUNT(n) ((uint32_t)(((n) & 0x1F) << 16))
  6649. #define LPSPI_FSR_TXCOUNT(n) ((uint32_t)(((n) & 0x1F) << 0))
  6650. #define LPSPI_TCR_CPOL ((uint32_t)(1<<31))
  6651. #define LPSPI_TCR_CPHA ((uint32_t)(1<<30))
  6652. #define LPSPI_TCR_PRESCALE(n) ((uint32_t)(((n) & 0x07) << 27))
  6653. #define LPSPI_TCR_PCS(n) ((uint32_t)(((n) & 0x03) << 24))
  6654. #define LPSPI_TCR_LSBF ((uint32_t)(1<<23))
  6655. #define LPSPI_TCR_BYSW ((uint32_t)(1<<22))
  6656. #define LPSPI_TCR_CONT ((uint32_t)(1<<21))
  6657. #define LPSPI_TCR_CONTC ((uint32_t)(1<<20))
  6658. #define LPSPI_TCR_RXMSK ((uint32_t)(1<<19))
  6659. #define LPSPI_TCR_TXMSK ((uint32_t)(1<<18))
  6660. #define LPSPI_TCR_WIDTH(n) ((uint32_t)(((n) & 0x03) << 16))
  6661. #define LPSPI_TCR_FRAMESZ(n) ((uint32_t)(((n) & 0xFFF) << 0))
  6662. #define LPSPI_RSR_RXEMPTY ((uint32_t)(1<<1))
  6663. #define LPSPI_RSR_SOF ((uint32_t)(1<<0))
  6664. // 39.3.1.1: page 2466
  6665. typedef struct {
  6666. const uint32_t VERID;
  6667. const uint32_t PARAM;
  6668. volatile uint32_t GLOBAL;
  6669. volatile uint32_t PINCFG;
  6670. volatile uint32_t BAUD;
  6671. volatile uint32_t STAT;
  6672. volatile uint32_t CTRL;
  6673. volatile uint32_t DATA;
  6674. volatile uint32_t MATCH;
  6675. volatile uint32_t MODIR;
  6676. volatile uint32_t FIFO;
  6677. volatile uint32_t WATER;
  6678. } IMXRT_LPUART_t;
  6679. #define IMXRT_LPUART1 (*(IMXRT_LPUART_t *)0x40184000)
  6680. #define LPUART1_VERID (IMXRT_LPUART1.VERID)
  6681. #define LPUART1_PARAM (IMXRT_LPUART1.PARAM)
  6682. #define LPUART1_GLOBAL (IMXRT_LPUART1.GLOBAL)
  6683. #define LPUART1_PINCFG (IMXRT_LPUART1.PINCFG)
  6684. #define LPUART1_BAUD (IMXRT_LPUART1.BAUD)
  6685. #define LPUART1_STAT (IMXRT_LPUART1.STAT)
  6686. #define LPUART1_CTRL (IMXRT_LPUART1.CTRL)
  6687. #define LPUART1_DATA (IMXRT_LPUART1.DATA)
  6688. #define LPUART1_MATCH (IMXRT_LPUART1.MATCH)
  6689. #define LPUART1_MODIR (IMXRT_LPUART1.MODIR)
  6690. #define LPUART1_FIFO (IMXRT_LPUART1.FIFO)
  6691. #define LPUART1_WATER (IMXRT_LPUART1.WATER)
  6692. #define IMXRT_LPUART2 (*(IMXRT_LPUART_t *)0x40188000)
  6693. #define LPUART2_VERID (IMXRT_LPUART2.VERID)
  6694. #define LPUART2_PARAM (IMXRT_LPUART2.PARAM)
  6695. #define LPUART2_GLOBAL (IMXRT_LPUART2.GLOBAL)
  6696. #define LPUART2_PINCFG (IMXRT_LPUART2.PINCFG)
  6697. #define LPUART2_BAUD (IMXRT_LPUART2.BAUD)
  6698. #define LPUART2_STAT (IMXRT_LPUART2.STAT)
  6699. #define LPUART2_CTRL (IMXRT_LPUART2.CTRL)
  6700. #define LPUART2_DATA (IMXRT_LPUART2.DATA)
  6701. #define LPUART2_MATCH (IMXRT_LPUART2.MATCH)
  6702. #define LPUART2_MODIR (IMXRT_LPUART2.MODIR)
  6703. #define LPUART2_FIFO (IMXRT_LPUART2.FIFO)
  6704. #define LPUART2_WATER (IMXRT_LPUART2.WATER)
  6705. #define IMXRT_LPUART3 (*(IMXRT_LPUART_t *)0x4018C000)
  6706. #define LPUART3_VERID (IMXRT_LPUART3.VERID)
  6707. #define LPUART3_PARAM (IMXRT_LPUART3.PARAM)
  6708. #define LPUART3_GLOBAL (IMXRT_LPUART3.GLOBAL)
  6709. #define LPUART3_PINCFG (IMXRT_LPUART3.PINCFG)
  6710. #define LPUART3_BAUD (IMXRT_LPUART3.BAUD)
  6711. #define LPUART3_STAT (IMXRT_LPUART3.STAT)
  6712. #define LPUART3_CTRL (IMXRT_LPUART3.CTRL)
  6713. #define LPUART3_DATA (IMXRT_LPUART3.DATA)
  6714. #define LPUART3_MATCH (IMXRT_LPUART3.MATCH)
  6715. #define LPUART3_MODIR (IMXRT_LPUART3.MODIR)
  6716. #define LPUART3_FIFO (IMXRT_LPUART3.FIFO)
  6717. #define LPUART3_WATER (IMXRT_LPUART3.WATER)
  6718. #define IMXRT_LPUART4 (*(IMXRT_LPUART_t *)0x40190000)
  6719. #define LPUART4_VERID (IMXRT_LPUART4.VERID)
  6720. #define LPUART4_PARAM (IMXRT_LPUART4.PARAM)
  6721. #define LPUART4_GLOBAL (IMXRT_LPUART4.GLOBAL)
  6722. #define LPUART4_PINCFG (IMXRT_LPUART4.PINCFG)
  6723. #define LPUART4_BAUD (IMXRT_LPUART4.BAUD)
  6724. #define LPUART4_STAT (IMXRT_LPUART4.STAT)
  6725. #define LPUART4_CTRL (IMXRT_LPUART4.CTRL)
  6726. #define LPUART4_DATA (IMXRT_LPUART4.DATA)
  6727. #define LPUART4_MATCH (IMXRT_LPUART4.MATCH)
  6728. #define LPUART4_MODIR (IMXRT_LPUART4.MODIR)
  6729. #define LPUART4_FIFO (IMXRT_LPUART4.FIFO)
  6730. #define LPUART4_WATER (IMXRT_LPUART4.WATER)
  6731. #define IMXRT_LPUART5 (*(IMXRT_LPUART_t *)0x40194000)
  6732. #define LPUART5_VERID (IMXRT_LPUART5.VERID)
  6733. #define LPUART5_PARAM (IMXRT_LPUART5.PARAM)
  6734. #define LPUART5_GLOBAL (IMXRT_LPUART5.GLOBAL)
  6735. #define LPUART5_PINCFG (IMXRT_LPUART5.PINCFG)
  6736. #define LPUART5_BAUD (IMXRT_LPUART5.BAUD)
  6737. #define LPUART5_STAT (IMXRT_LPUART5.STAT)
  6738. #define LPUART5_CTRL (IMXRT_LPUART5.CTRL)
  6739. #define LPUART5_DATA (IMXRT_LPUART5.DATA)
  6740. #define LPUART5_MATCH (IMXRT_LPUART5.MATCH)
  6741. #define LPUART5_MODIR (IMXRT_LPUART5.MODIR)
  6742. #define LPUART5_FIFO (IMXRT_LPUART5.FIFO)
  6743. #define LPUART5_WATER (IMXRT_LPUART5.WATER)
  6744. #define IMXRT_LPUART6 (*(IMXRT_LPUART_t *)0x40198000)
  6745. #define LPUART6_VERID (IMXRT_LPUART6.VERID)
  6746. #define LPUART6_PARAM (IMXRT_LPUART6.PARAM)
  6747. #define LPUART6_GLOBAL (IMXRT_LPUART6.GLOBAL)
  6748. #define LPUART6_PINCFG (IMXRT_LPUART6.PINCFG)
  6749. #define LPUART6_BAUD (IMXRT_LPUART6.BAUD)
  6750. #define LPUART6_STAT (IMXRT_LPUART6.STAT)
  6751. #define LPUART6_CTRL (IMXRT_LPUART6.CTRL)
  6752. #define LPUART6_DATA (IMXRT_LPUART6.DATA)
  6753. #define LPUART6_MATCH (IMXRT_LPUART6.MATCH)
  6754. #define LPUART6_MODIR (IMXRT_LPUART6.MODIR)
  6755. #define LPUART6_FIFO (IMXRT_LPUART6.FIFO)
  6756. #define LPUART6_WATER (IMXRT_LPUART6.WATER)
  6757. #define IMXRT_LPUART7 (*(IMXRT_LPUART_t *)0x4019C000)
  6758. #define LPUART7_VERID (IMXRT_LPUART7.VERID)
  6759. #define LPUART7_PARAM (IMXRT_LPUART7.PARAM)
  6760. #define LPUART7_GLOBAL (IMXRT_LPUART7.GLOBAL)
  6761. #define LPUART7_PINCFG (IMXRT_LPUART7.PINCFG)
  6762. #define LPUART7_BAUD (IMXRT_LPUART7.BAUD)
  6763. #define LPUART7_STAT (IMXRT_LPUART7.STAT)
  6764. #define LPUART7_CTRL (IMXRT_LPUART7.CTRL)
  6765. #define LPUART7_DATA (IMXRT_LPUART7.DATA)
  6766. #define LPUART7_MATCH (IMXRT_LPUART7.MATCH)
  6767. #define LPUART7_MODIR (IMXRT_LPUART7.MODIR)
  6768. #define LPUART7_FIFO (IMXRT_LPUART7.FIFO)
  6769. #define LPUART7_WATER (IMXRT_LPUART7.WATER)
  6770. #define IMXRT_LPUART8 (*(IMXRT_LPUART_t *)0x401A0000)
  6771. #define LPUART8_VERID (IMXRT_LPUART8.VERID)
  6772. #define LPUART8_PARAM (IMXRT_LPUART8.PARAM)
  6773. #define LPUART8_GLOBAL (IMXRT_LPUART8.GLOBAL)
  6774. #define LPUART8_PINCFG (IMXRT_LPUART8.PINCFG)
  6775. #define LPUART8_BAUD (IMXRT_LPUART8.BAUD)
  6776. #define LPUART8_STAT (IMXRT_LPUART8.STAT)
  6777. #define LPUART8_CTRL (IMXRT_LPUART8.CTRL)
  6778. #define LPUART8_DATA (IMXRT_LPUART8.DATA)
  6779. #define LPUART8_MATCH (IMXRT_LPUART8.MATCH)
  6780. #define LPUART8_MODIR (IMXRT_LPUART8.MODIR)
  6781. #define LPUART8_FIFO (IMXRT_LPUART8.FIFO)
  6782. #define LPUART8_WATER (IMXRT_LPUART8.WATER)
  6783. #define LPUART_VERID_MAJOR(n) ((uint32_t)(((n) & 0xFF) << 24))
  6784. #define LPUART_VERID_MINOR(n) ((uint32_t)(((n) & 0xFF) << 16))
  6785. #define LPUART_VERID_FEATURE(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  6786. #define LPUART_PARAM_RXFIFO(n) ((uint32_t)(((n) & 0xFF) << 8))
  6787. #define LPUART_PARAM_TXFIFO(n) ((uint32_t)(((n) & 0xFF) << 0))
  6788. #define LPUART_GLOBAL_RST ((uint32_t)(1<<1))
  6789. #define LPUART_PINCFG_TRGSEL(n) ((uint32_t)(((n) & 0x03) << 0))
  6790. #define LPUART_BAUD_MAEN1 ((uint32_t)(1<<31))
  6791. #define LPUART_BAUD_MAEN2 ((uint32_t)(1<<30))
  6792. #define LPUART_BAUD_M10 ((uint32_t)(1<<29))
  6793. #define LPUART_BAUD_OSR(n) ((uint32_t)(((n) & 0x1F) << 24))
  6794. #define LPUART_BAUD_TDMAE ((uint32_t)(1<<23))
  6795. #define LPUART_BAUD_RDMAE ((uint32_t)(1<<21))
  6796. #define LPUART_BAUD_MATCFG(n) ((uint32_t)(((n) & 0x03) << 18))
  6797. #define LPUART_BAUD_BOTHEDGE ((uint32_t)(1<<17))
  6798. #define LPUART_BAUD_RESYNCDIS ((uint32_t)(1<<16))
  6799. #define LPUART_BAUD_LBKDIE ((uint32_t)(1<<15))
  6800. #define LPUART_BAUD_RXEDGIE ((uint32_t)(1<<14))
  6801. #define LPUART_BAUD_SBNS ((uint32_t)(1<<13))
  6802. #define LPUART_BAUD_SBR(n) ((uint32_t)(((n) & 0x01FFF) << 0))
  6803. #define LPUART_STAT_LBKDIF ((uint32_t)(1<<31))
  6804. #define LPUART_STAT_RXEDGIF ((uint32_t)(1<<30))
  6805. #define LPUART_STAT_MSBF ((uint32_t)(1<<29))
  6806. #define LPUART_STAT_RXINV ((uint32_t)(1<<28))
  6807. #define LPUART_STAT_RWUID ((uint32_t)(1<<27))
  6808. #define LPUART_STAT_BRK13 ((uint32_t)(1<<26))
  6809. #define LPUART_STAT_LBKDE ((uint32_t)(1<<25))
  6810. #define LPUART_STAT_RAF ((uint32_t)(1<<24))
  6811. #define LPUART_STAT_TDRE ((uint32_t)(1<<23))
  6812. #define LPUART_STAT_TC ((uint32_t)(1<<22))
  6813. #define LPUART_STAT_RDRF ((uint32_t)(1<<21))
  6814. #define LPUART_STAT_IDLE ((uint32_t)(1<<20))
  6815. #define LPUART_STAT_OR ((uint32_t)(1<<19))
  6816. #define LPUART_STAT_NF ((uint32_t)(1<<18))
  6817. #define LPUART_STAT_FE ((uint32_t)(1<<17))
  6818. #define LPUART_STAT_PF ((uint32_t)(1<<16))
  6819. #define LPUART_STAT_MA1F ((uint32_t)(1<<15))
  6820. #define LPUART_STAT_MA2F ((uint32_t)(1<<14))
  6821. #define LPUART_CTRL_R8T9 ((uint32_t)(1<<31))
  6822. #define LPUART_CTRL_R9T8 ((uint32_t)(1<<30))
  6823. #define LPUART_CTRL_TXDIR ((uint32_t)(1<<29))
  6824. #define LPUART_CTRL_TXINV ((uint32_t)(1<<28))
  6825. #define LPUART_CTRL_ORIE ((uint32_t)(1<<27))
  6826. #define LPUART_CTRL_NEIE ((uint32_t)(1<<26))
  6827. #define LPUART_CTRL_FEIE ((uint32_t)(1<<25))
  6828. #define LPUART_CTRL_PEIE ((uint32_t)(1<<24))
  6829. #define LPUART_CTRL_TIE ((uint32_t)(1<<23))
  6830. #define LPUART_CTRL_TCIE ((uint32_t)(1<<22))
  6831. #define LPUART_CTRL_RIE ((uint32_t)(1<<21))
  6832. #define LPUART_CTRL_ILIE ((uint32_t)(1<<20))
  6833. #define LPUART_CTRL_TE ((uint32_t)(1<<19))
  6834. #define LPUART_CTRL_RE ((uint32_t)(1<<18))
  6835. #define LPUART_CTRL_RWU ((uint32_t)(1<<17))
  6836. #define LPUART_CTRL_SBK ((uint32_t)(1<<16))
  6837. #define LPUART_CTRL_MA1IE ((uint32_t)(1<<15))
  6838. #define LPUART_CTRL_MA2IE ((uint32_t)(1<<14))
  6839. #define LPUART_CTRL_M7 ((uint32_t)(1<<11))
  6840. #define LPUART_CTRL_IDLECFG(n) ((uint32_t)(((n) & 0x07) << 8))
  6841. #define LPUART_CTRL_LOOPS ((uint32_t)(1<<7))
  6842. #define LPUART_CTRL_DOZEEN ((uint32_t)(1<<6))
  6843. #define LPUART_CTRL_RSRC ((uint32_t)(1<<5))
  6844. #define LPUART_CTRL_M ((uint32_t)(1<<4))
  6845. #define LPUART_CTRL_WAKE ((uint32_t)(1<<3))
  6846. #define LPUART_CTRL_ILT ((uint32_t)(1<<2))
  6847. #define LPUART_CTRL_PE ((uint32_t)(1<<1))
  6848. #define LPUART_CTRL_PT ((uint32_t)(1<<0))
  6849. #define LPUART_DATA_NOISY ((uint32_t)(1<<15))
  6850. #define LPUART_DATA_PARITYE ((uint32_t)(1<<14))
  6851. #define LPUART_DATA_FRETSC ((uint32_t)(1<<13))
  6852. #define LPUART_DATA_RXEMPT ((uint32_t)(1<<12))
  6853. #define LPUART_DATA_IDLINE ((uint32_t)(1<<11))
  6854. #define LPUART_MATCH_MA2(n) ((uint32_t)(((n) & 0x3FF) << 16))
  6855. #define LPUART_MATCH_MA1(n) ((uint32_t)(((n) & 0x3FF) << 0))
  6856. #define LPUART_MODIR_IREN ((uint32_t)(1<<18))
  6857. #define LPUART_MODIR_TNP(n) ((uint32_t)(((n) & 0x03) << 16))
  6858. #define LPUART_MODIR_RTSWATER(n) ((uint32_t)(((n) & 0x03) << 8))
  6859. #define LPUART_MODIR_TXCTSSRC ((uint32_t)(1<<5))
  6860. #define LPUART_MODIR_TXCTSC ((uint32_t)(1<<4))
  6861. #define LPUART_MODIR_RXRTSE ((uint32_t)(1<<3))
  6862. #define LPUART_MODIR_TXRTSPOL ((uint32_t)(1<<2))
  6863. #define LPUART_MODIR_TXRTSE ((uint32_t)(1<<1))
  6864. #define LPUART_MODIR_TXCTSE ((uint32_t)(1<<0))
  6865. #define LPUART_FIFO_TXEMPT ((uint32_t)(1<<23))
  6866. #define LPUART_FIFO_RXEMPT ((uint32_t)(1<<22))
  6867. #define LPUART_FIFO_TXOF ((uint32_t)(1<<17))
  6868. #define LPUART_FIFO_RXUF ((uint32_t)(1<<16))
  6869. #define LPUART_FIFO_TXFLUSH ((uint32_t)(1<<15))
  6870. #define LPUART_FIFO_RXFLUSH ((uint32_t)(1<<14))
  6871. #define LPUART_FIFO_RXIDEN(n) ((uint32_t)(((n) & 0x07) << 10))
  6872. #define LPUART_FIFO_TXOFE ((uint32_t)(1<<9))
  6873. #define LPUART_FIFO_RXUFE ((uint32_t)(1<<8))
  6874. #define LPUART_FIFO_TXFE ((uint32_t)(1<<7))
  6875. #define LPUART_FIFO_TXFIFOSIZE(n) ((uint32_t)(((n) & 0x07) << 4))
  6876. #define LPUART_FIFO_RXFE ((uint32_t)(1<<3))
  6877. #define LPUART_FIFO_RXFIFOSIZE(n) ((uint32_t)(((n) & 0x07) << 0))
  6878. #define LPUART_WATER_RXCOUNT(n) ((uint32_t)(((n) & 0x07) << 24))
  6879. #define LPUART_WATER_RXWATER(n) ((uint32_t)(((n) & 0x03) << 16))
  6880. #define LPUART_WATER_TXCOUNT(n) ((uint32_t)(((n) & 0x07) << 8))
  6881. #define LPUART_WATER_TXWATER(n) ((uint32_t)(((n) & 0x03) << 0))
  6882. // 40.4: page 2495
  6883. // 41.3: page 2498 TODO...
  6884. // 42.5.1.1: page 2509
  6885. #define IMXRT_OCOTP (*(IMXRT_REGISTER32_t *)0x401F4000)
  6886. #define HW_OCOTP_CTRL (IMXRT_OCOTP.offset000)
  6887. #define HW_OCOTP_CTRL_SET (IMXRT_OCOTP.offset004)
  6888. #define HW_OCOTP_CTRL_CLR (IMXRT_OCOTP.offset008)
  6889. #define HW_OCOTP_CTRL_TOG (IMXRT_OCOTP.offset00C)
  6890. #define HW_OCOTP_TIMING (IMXRT_OCOTP.offset010)
  6891. #define HW_OCOTP_DATA (IMXRT_OCOTP.offset020)
  6892. #define HW_OCOTP_READ_CTRL (IMXRT_OCOTP.offset030)
  6893. #define HW_OCOTP_READ_FUSE_DATA (IMXRT_OCOTP.offset040)
  6894. #define HW_OCOTP_SW_STICKY (IMXRT_OCOTP.offset050)
  6895. #define HW_OCOTP_SCS (IMXRT_OCOTP.offset060)
  6896. #define HW_OCOTP_SCS_SET (IMXRT_OCOTP.offset064)
  6897. #define HW_OCOTP_SCS_CLR (IMXRT_OCOTP.offset068)
  6898. #define HW_OCOTP_SCS_TOG (IMXRT_OCOTP.offset06C)
  6899. #define HW_OCOTP_VERSION (IMXRT_OCOTP.offset090)
  6900. #define HW_OCOTP_TIMING2 (IMXRT_OCOTP.offset100)
  6901. #define HW_OCOTP_CTRL_WR_UNLOCK(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  6902. #define HW_OCOTP_CTRL_RELOAD_SHADOWS ((uint32_t)(1<<10))
  6903. #define HW_OCOTP_CTRL_ERROR ((uint32_t)(1<<9))
  6904. #define HW_OCOTP_CTRL_BUSY ((uint32_t)(1<<8))
  6905. #define HW_OCOTP_CTRL_ADDR(n) ((uint32_t)(((n) & 0x3F) << 0))
  6906. #define HW_OCOTP_TIMING_WAIT(n) ((uint32_t)(((n) & 0x3F) << 22))
  6907. #define HW_OCOTP_TIMING_STROBE_READ(n) ((uint32_t)(((n) & 0x3F) << 16))
  6908. #define HW_OCOTP_TIMING_RELAX(n) ((uint32_t)(((n) & 0x0F) << 12))
  6909. #define HW_OCOTP_TIMING_STROBE_PROG(n) ((uint32_t)(((n) & 0xFFF) << 0))
  6910. #define HW_OCOTP_READ_CTRL_READ_FUSE ((uint32_t)(1<<0))
  6911. #define HW_OCOTP_SW_STICKY_JTAG_BLOCK_RELEASE ((uint32_t)(1<<4))
  6912. #define HW_OCOTP_SW_STICKY_BLOCK_ROM_PART ((uint32_t)(1<<3))
  6913. #define HW_OCOTP_SW_STICKY_FIELD_RETURN_LOCK ((uint32_t)(1<<2))
  6914. #define HW_OCOTP_SW_STICKY_SRK_REVOKE_LOCK ((uint32_t)(1<<1))
  6915. #define HW_OCOTP_SW_STICKY_BLOCK_DTCP_KEY ((uint32_t)(1<<0))
  6916. #define HW_OCOTP_SCS_LOCK ((uint32_t)(1<<31))
  6917. #define HW_OCOTP_SCS_HAB_JDE ((uint32_t)(1<<0))
  6918. #define HW_OCOTP_TIMING2_RELAX1(n) ((uint32_t)(((n) & 0x7F) << 24))
  6919. #define HW_OCOTP_TIMING2_RELAX_READ(n) ((uint32_t)(((n) & 0x3F) << 16))
  6920. #define HW_OCOTP_TIMING2_RELAX_PROG(n) ((uint32_t)(((n) & 0xFFF) << 0))
  6921. #define IMXRT_OCOTP_VALUE (*(IMXRT_REGISTER32_t *)0x401F4400)
  6922. #define HW_OCOTP_LOCK (IMXRT_OCOTP_VALUE.offset000)
  6923. #define HW_OCOTP_CFG0 (IMXRT_OCOTP_VALUE.offset010)
  6924. #define HW_OCOTP_CFG1 (IMXRT_OCOTP_VALUE.offset020)
  6925. #define HW_OCOTP_CFG2 (IMXRT_OCOTP_VALUE.offset030)
  6926. #define HW_OCOTP_CFG3 (IMXRT_OCOTP_VALUE.offset040)
  6927. #define HW_OCOTP_CFG4 (IMXRT_OCOTP_VALUE.offset050)
  6928. #define HW_OCOTP_CFG5 (IMXRT_OCOTP_VALUE.offset060)
  6929. #define HW_OCOTP_CFG6 (IMXRT_OCOTP_VALUE.offset070)
  6930. #define HW_OCOTP_MEM0 (IMXRT_OCOTP_VALUE.offset080)
  6931. #define HW_OCOTP MEM1 (IMXRT_OCOTP_VALUE.offset090)
  6932. #define HW_OCOTP_MEM2 (IMXRT_OCOTP_VALUE.offset0A0)
  6933. #define HW_OCOTP_MEM3 (IMXRT_OCOTP_VALUE.offset0B0)
  6934. #define HW_OCOTP_MEM4 (IMXRT_OCOTP_VALUE.offset0C0)
  6935. #define HW_OCOTP_ANA0 (IMXRT_OCOTP_VALUE.offset0D0)
  6936. #define HW_OCOTP_ANA1 (IMXRT_OCOTP_VALUE.offset0E0)
  6937. #define HW_OCOTP_ANA2 (IMXRT_OCOTP_VALUE.offset0F0)
  6938. #define HW_OCOTP_OTPMK0 (IMXRT_OCOTP_VALUE.offset100)
  6939. #define HW_OCOTP_OTPMK1 (IMXRT_OCOTP_VALUE.offset110)
  6940. #define HW_OCOTP_OTPMK2 (IMXRT_OCOTP_VALUE.offset120)
  6941. #define HW_OCOTP_OTPMK3 (IMXRT_OCOTP_VALUE.offset130)
  6942. #define HW_OCOTP_OTPMK4 (IMXRT_OCOTP_VALUE.offset140)
  6943. #define HW_OCOTP_OTPMK5 (IMXRT_OCOTP_VALUE.offset150)
  6944. #define HW_OCOTP_OTPMK6 (IMXRT_OCOTP_VALUE.offset160)
  6945. #define HW_OCOTP_OTPMK7 (IMXRT_OCOTP_VALUE.offset170)
  6946. #define HW_OCOTP_SRK0 (IMXRT_OCOTP_VALUE.offset180)
  6947. #define HW_OCOTP_SRK1 (IMXRT_OCOTP_VALUE.offset190)
  6948. #define HW_OCOTP_SRK2 (IMXRT_OCOTP_VALUE.offset1A0)
  6949. #define HW_OCOTP_SRK3 (IMXRT_OCOTP_VALUE.offset1B0)
  6950. #define HW_OCOTP_SRK4 (IMXRT_OCOTP_VALUE.offset1C0)
  6951. #define HW_OCOTP_SRK5 (IMXRT_OCOTP_VALUE.offset1D0)
  6952. #define HW_OCOTP_SRK6 (IMXRT_OCOTP_VALUE.offset1E0)
  6953. #define HW_OCOTP_SRK7 (IMXRT_OCOTP_VALUE.offset1F0)
  6954. #define HW_OCOTP_SJC_RESP0 (IMXRT_OCOTP_VALUE.offset200)
  6955. #define HW_OCOTP_SJC_RESP1 (IMXRT_OCOTP_VALUE.offset210)
  6956. #define HW_OCOTP_MAC0 (IMXRT_OCOTP_VALUE.offset220)
  6957. #define HW_OCOTP_MAC1 (IMXRT_OCOTP_VALUE.offset230)
  6958. #define HW_OCOTP_MAC2 (IMXRT_OCOTP_VALUE.offset240)
  6959. #define HW_OCOTP_GP3 (IMXRT_OCOTP_VALUE.offset250) /* IMXRT1052 */
  6960. #define HW_OCOTP_OTPMK_CRC32 (IMXRT_OCOTP_VALUE.offset250) /* IMXRT1062 */
  6961. #define HW_OCOTP_GP1 (IMXRT_OCOTP_VALUE.offset260)
  6962. #define HW_OCOTP_GP2 (IMXRT_OCOTP_VALUE.offset270)
  6963. #define HW_OCOTP_SW_GP1 (IMXRT_OCOTP_VALUE.offset280)
  6964. #define HW_OCOTP_SW_GP20 (IMXRT_OCOTP_VALUE.offset290)
  6965. #define HW_OCOTP_SW_GP21 (IMXRT_OCOTP_VALUE.offset2A0)
  6966. #define HW_OCOTP_SW_GP22 (IMXRT_OCOTP_VALUE.offset2B0)
  6967. #define HW_OCOTP_SW_GP23 (IMXRT_OCOTP_VALUE.offset2C0)
  6968. #define HW_OCOTP_MISC_CONF0 (IMXRT_OCOTP_VALUE.offset2D0)
  6969. #define HW_OCOTP_MISC_CONF1 (IMXRT_OCOTP_VALUE.offset2E0)
  6970. #define HW_OCOTP_SRK_REVOKE (IMXRT_OCOTP_VALUE.offset2F0)
  6971. #if defined(__IMXRT1062__)
  6972. #define IMXRT_OCOTP_VALUE2 (*(IMXRT_REGISTER32_t *)0x401F4800)
  6973. #define HW_OCOTP_ROM_PATCH0 (IMXRT_OCOTP_VALUE2.offset000)
  6974. #define HW_OCOTP_ROM_PATCH1 (IMXRT_OCOTP_VALUE2.offset010)
  6975. #define HW_OCOTP_ROM_PATCH2 (IMXRT_OCOTP_VALUE2.offset020)
  6976. #define HW_OCOTP_ROM_PATCH3 (IMXRT_OCOTP_VALUE2.offset030)
  6977. #define HW_OCOTP_ROM_PATCH4 (IMXRT_OCOTP_VALUE2.offset040)
  6978. #define HW_OCOTP_ROM_PATCH5 (IMXRT_OCOTP_VALUE2.offset050)
  6979. #define HW_OCOTP_ROM_PATCH6 (IMXRT_OCOTP_VALUE2.offset060)
  6980. #define HW_OCOTP_ROM_PATCH7 (IMXRT_OCOTP_VALUE2.offset070)
  6981. #define HW_OCOTP_GP30 (IMXRT_OCOTP_VALUE2.offset080)
  6982. #define HW_OCOTP_GP31 (IMXRT_OCOTP_VALUE2.offset090)
  6983. #define HW_OCOTP_GP32 (IMXRT_OCOTP_VALUE2.offset0A0)
  6984. #define HW_OCOTP_GP33 (IMXRT_OCOTP_VALUE2.offset0B0)
  6985. #define HW_OCOTP_GP40 (IMXRT_OCOTP_VALUE2.offset0C0)
  6986. #define HW_OCOTP_GP41 (IMXRT_OCOTP_VALUE2.offset0D0)
  6987. #define HW_OCOTP_GP42 (IMXRT_OCOTP_VALUE2.offset0E0)
  6988. #define HW_OCOTP_GP43 (IMXRT_OCOTP_VALUE2.offset0F0)
  6989. #endif
  6990. // 44.8.1: page 2583
  6991. #define IMXRT_PIT (*(IMXRT_REGISTER32_t *)0x40084000)
  6992. #define PIT_MCR (IMXRT_PIT.offset000)
  6993. #define PIT_LTMR64H (IMXRT_PIT.offset0E0)
  6994. #define PIT_LTMR64L (IMXRT_PIT.offset0E4)
  6995. typedef struct {
  6996. volatile uint32_t LDVAL;
  6997. volatile uint32_t CVAL;
  6998. volatile uint32_t TCTRL;
  6999. volatile uint32_t TFLG;
  7000. } IMXRT_PIT_CHANNEL_t;
  7001. #define IMXRT_PIT_CHANNELS ((IMXRT_PIT_CHANNEL_t *)(&(IMXRT_PIT.offset100)))
  7002. #define PIT_LDVAL0 (IMXRT_PIT.offset100)
  7003. #define PIT_CVAL0 (IMXRT_PIT.offset104)
  7004. #define PIT_TCTRL0 (IMXRT_PIT.offset108)
  7005. #define PIT_TFLG0 (IMXRT_PIT.offset10C)
  7006. #define PIT_LDVAL1 (IMXRT_PIT.offset110)
  7007. #define PIT_CVAL1 (IMXRT_PIT.offset114)
  7008. #define PIT_TCTRL1 (IMXRT_PIT.offset118)
  7009. #define PIT_TFLG1 (IMXRT_PIT.offset11C)
  7010. #define PIT_LDVAL2 (IMXRT_PIT.offset120)
  7011. #define PIT_CVAL2 (IMXRT_PIT.offset124)
  7012. #define PIT_TCTRL2 (IMXRT_PIT.offset128)
  7013. #define PIT_TFLG2 (IMXRT_PIT.offset12C)
  7014. #define PIT_LDVAL3 (IMXRT_PIT.offset130)
  7015. #define PIT_CVAL3 (IMXRT_PIT.offset134)
  7016. #define PIT_TCTRL3 (IMXRT_PIT.offset138)
  7017. #define PIT_TFLG3 (IMXRT_PIT.offset13C)
  7018. #define PIT_MCR_MDIS ((uint32_t)(1<<1))
  7019. #define PIT_MCR_FRZ ((uint32_t)(1<<0))
  7020. #define PIT_TCTRL_CHN ((uint32_t)(1<<2))
  7021. #define PIT_TCTRL_TIE ((uint32_t)(1<<1))
  7022. #define PIT_TCTRL_TEN ((uint32_t)(1<<0))
  7023. #define PIT_TFLG_TIF ((uint32_t)(1<<0))
  7024. // 45.7: page 2598
  7025. #define IMXRT_PMU (*(IMXRT_REGISTER32_t *)0x400D8000)
  7026. #define PMU_REG_1P1 (IMXRT_PMU.offset110)
  7027. #define PMU_REG_1P1_SET (IMXRT_PMU.offset114)
  7028. #define PMU_REG_1P1_CLR (IMXRT_PMU.offset118)
  7029. #define PMU_REG_1P1_TOG (IMXRT_PMU.offset11C)
  7030. #define PMU_REG_3P0 (IMXRT_PMU.offset120)
  7031. #define PMU_REG_3P0_SET (IMXRT_PMU.offset124)
  7032. #define PMU_REG_3P0_CLR (IMXRT_PMU.offset128)
  7033. #define PMU_REG_3P0_TOG (IMXRT_PMU.offset12C)
  7034. #define PMU_REG_2P5 (IMXRT_PMU.offset130)
  7035. #define PMU_REG_2P5_SET (IMXRT_PMU.offset134)
  7036. #define PMU_REG_2P5_CLR (IMXRT_PMU.offset138)
  7037. #define PMU_REG_2P5_TOG (IMXRT_PMU.offset13C)
  7038. #define PMU_REG_CORE (IMXRT_PMU.offset140)
  7039. #define PMU_REG_CORE_SET (IMXRT_PMU.offset144)
  7040. #define PMU_REG_CORE_CLR (IMXRT_PMU.offset148)
  7041. #define PMU_REG_CORE_TOG (IMXRT_PMU.offset14C)
  7042. #define PMU_MISC0 (IMXRT_PMU.offset150)
  7043. #define PMU_MISC0_SET (IMXRT_PMU.offset154)
  7044. #define PMU_MISC0_CLR (IMXRT_PMU.offset158)
  7045. #define PMU_MISC0_TOG (IMXRT_PMU.offset15C)
  7046. #define PMU_MISC1 (IMXRT_PMU.offset160)
  7047. #define PMU_MISC1_SET (IMXRT_PMU.offset164)
  7048. #define PMU_MISC1_CLR (IMXRT_PMU.offset168)
  7049. #define PMU_MISC1_TOG (IMXRT_PMU.offset16C)
  7050. #define PMU_MISC2 (IMXRT_PMU.offset170)
  7051. #define PMU_MISC2_SET (IMXRT_PMU.offset174)
  7052. #define PMU_MISC2_CLR (IMXRT_PMU.offset178)
  7053. #define PMU_MISC2_TOG (IMXRT_PMU.offset17C)
  7054. #define PMU_REG_1P1_SELREF_WEAK_LINREG ((uint32_t)(1<<19))
  7055. #define PMU_REG_1P1_ENABLE_WEAK_LINREG ((uint32_t)(1<<18))
  7056. #define PMU_REG_1P1_OK_VDD1P1 ((uint32_t)(1<<17))
  7057. #define PMU_REG_1P1_BO_VDD1P1 ((uint32_t)(1<<16))
  7058. #define PMU_REG_1P1_OUTPUT_TRG(n) ((uint32_t)(((n) & 0x0F) << 8))
  7059. #define PMU_REG_1P1_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 4))
  7060. #define PMU_REG_1P1_ENABLE_PULLDOWN ((uint32_t)(1<<3))
  7061. #define PMU_REG_1P1_ENABLE_ILIMIT ((uint32_t)(1<<2))
  7062. #define PMU_REG_1P1_ENABLE_BO ((uint32_t)(1<<1))
  7063. #define PMU_REG_1P1_ENABLE_LINREG ((uint32_t)(1<<0))
  7064. #define PMU_REG_3P0_OK_VDD3P0 ((uint32_t)(1<<17))
  7065. #define PMU_REG_3P0_BO_VDD3P0 ((uint32_t)(1<<16))
  7066. #define PMU_REG_3P0_OUTPUT_TRG(n) ((uint32_t)(((n) & 0x1F) << 8))
  7067. #define PMU_REG_3P0_VBUS_SEL ((uint32_t)(1<<7))
  7068. #define PMU_REG_3P0_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 4))
  7069. #define PMU_REG_3P0_ENABLE_ILIMIT ((uint32_t)(1<<2))
  7070. #define PMU_REG_3P0_ENABLE_BO ((uint32_t)(1<<1))
  7071. #define PMU_REG_3P0_ENABLE_LINREG ((uint32_t)(1<<0))
  7072. #define PMU_REG_2P5_ENABLE_WEAK_LINREG ((uint32_t)(1<<18))
  7073. #define PMU_REG_2P5_OK_VDD2P5 ((uint32_t)(1<<17))
  7074. #define PMU_REG_2P5_BO_VDD2P5 ((uint32_t)(1<<16))
  7075. #define PMU_REG_2P5_OUTPUT_TRG(n) ((uint32_t)(((n) & 0x0F) << 8))
  7076. #define PMU_REG_2P5_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 4))
  7077. #define PMU_REG_2P5_ENABLE_PULLDOWN ((uint32_t)(1<<3))
  7078. #define PMU_REG_2P5_ENABLE_ILIMIT ((uint32_t)(1<<2))
  7079. #define PMU_REG_2P5_ENABLE_BO ((uint32_t)(1<<1))
  7080. #define PMU_REG_2P5_ENABLE_LINREG ((uint32_t)(1<<0))
  7081. #define PMU_REG_CORE_FET_ODRIVE ((uint32_t)(1<<29))
  7082. #define PMU_REG_CORE_RAMP_RATE(n) ((uint32_t)(((n) & 0x03) << 27))
  7083. #define PMU_REG_CORE_REG2_ADJ(n) ((uint32_t)(((n) & 0x0F) << 23))
  7084. #define PMU_REG_CORE_REG2_TARG(n) ((uint32_t)(((n) & 0x1F) << 18))
  7085. #define PMU_REG_CORE_REG1_ADJ(n) ((uint32_t)(((n) & 0x0F) << 14))
  7086. #define PMU_REG_CORE_REG1_TARG(n) ((uint32_t)(((n) & 0x1F) << 9))
  7087. #define PMU_REG_CORE_REG0_ADJ(n) ((uint32_t)(((n) & 0x0F) << 5))
  7088. #define PMU_REG_CORE_REG0_TARG(n) ((uint32_t)(((n) & 0x1F) << 0))
  7089. #define PMU_MISC0_VID_PLL_PREDIV ((uint32_t)(1<<31))
  7090. #define PMU_MISC0_XTAL_24M_PWD ((uint32_t)(1<<30))
  7091. #define PMU_MISC0_RTC_XTAL_SOURCE ((uint32_t)(1<<29))
  7092. #define PMU_MISC0_CLKGATE_DELAY(n) ((uint32_t)(((n) & 0x07) << 26))
  7093. #define PMU_MISC0_CLKGATE_CTRL ((uint32_t)(1<<25))
  7094. #define PMU_MISC0_OSC_XTALOK_EN ((uint32_t)(1<<16))
  7095. #define PMU_MISC0_OSC_XTALOK ((uint32_t)(1<<15))
  7096. #define PMU_MISC0_OSC_I(n) ((uint32_t)(((n) & 0x03) << 13))
  7097. #define PMU_MISC0_DISCON_HIGH_SNVS ((uint32_t)(1<<12))
  7098. #define PMU_MISC0_STOP_MODE_CONFIG(n) ((uint32_t)(((n) & 0x03) << 10))
  7099. #define PMU_MISC0_REFTOP_VBGUP ((uint32_t)(1<<7))
  7100. #define PMU_MISC0_REFTOP_VBGADJ(n) ((uint32_t)(((n) & 0x07) << 4))
  7101. #define PMU_MISC0_REFTOP_SELFBIASOFF ((uint32_t)(1<<3))
  7102. #define PMU_MISC0_REFTOP_PWD ((uint32_t)(1<<0))
  7103. #define PMU_MISC1_IRQ_DIG_BO ((uint32_t)(1<<31))
  7104. #define PMU_MISC1_IRQ_ANA_BO ((uint32_t)(1<<30))
  7105. #define PMU_MISC1_IRQ_TEMPHIGH ((uint32_t)(1<<29))
  7106. #define PMU_MISC1_IRQ_TEMPLOW ((uint32_t)(1<<28))
  7107. #define PMU_MISC1_IRQ_TEMPPANIC ((uint32_t)(1<<27))
  7108. #define PMU_MISC1_PFD_528_AUTOGATE_EN ((uint32_t)(1<<17))
  7109. #define PMU_MISC1_PFD_480_AUTOGATE_EN ((uint32_t)(1<<16))
  7110. #define PMU_MISC1_LVDSCLK2_IBEN ((uint32_t)(1<<13))
  7111. #define PMU_MISC1_LVDSCLK1_IBEN ((uint32_t)(1<<12))
  7112. #define PMU_MISC1_LVDSCLK2_OBEN ((uint32_t)(1<<11))
  7113. #define PMU_MISC1_LVDSCLK1_OBEN ((uint32_t)(1<<10))
  7114. #define PMU_MISC1_LVDS2_CLK_SEL(n) ((uint32_t)(((n) & 0x1F) << 5))
  7115. #define PMU_MISC1_LVDS1_CLK_SEL(n) ((uint32_t)(((n) & 0x1F) << 0))
  7116. #define PMU_MISC2_VIDEO_DIV(n) ((uint32_t)(((n) & 0x03) << 30))
  7117. #define PMU_MISC2_REG2_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 28))
  7118. #define PMU_MISC2_REG1_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 26))
  7119. #define PMU_MISC2_REG0_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 24))
  7120. #define PMU_MISC2_AUDIO_DIV_MSB ((uint32_t)(1<<23))
  7121. #define PMU_MISC2_REG2_OK ((uint32_t)(1<<22))
  7122. #define PMU_MISC2_REG2_ENABLE_BO ((uint32_t)(1<<21))
  7123. #define PMU_MISC2_REG2_BO_STATUS ((uint32_t)(1<<19))
  7124. #define PMU_MISC2_REG2_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 16))
  7125. #define PMU_MISC2_AUDIO_DIV_LSB ((uint32_t)(1<<15))
  7126. #define PMU_MISC2_REG1_ENABLE_BO ((uint32_t)(1<<13))
  7127. #define PMU_MISC2_REG1_BO_STATUS ((uint32_t)(1<<11))
  7128. #define PMU_MISC2_REG1_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 8))
  7129. #define PMU_MISC2_PLL3_DISABLE ((uint32_t)(1<<7))
  7130. #define PMU_MISC2_REG0_ENABLE_BO ((uint32_t)(1<<5))
  7131. #define PMU_MISC2_REG0_BO_STATUS ((uint32_t)(1<<3))
  7132. #define PMU_MISC2_REG0_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 0))
  7133. // 46.7: page 2656
  7134. #define IMXRT_PXP (*(IMXRT_REGISTER32_t *)0x402B4000)
  7135. #define IMXRT_PXP_b (*(IMXRT_REGISTER32_t *)0x402B4400)
  7136. #define PXP_CTRL (IMXRT_PXP.offset000)
  7137. #define PXP_CTRL_SET (IMXRT_PXP.offset004)
  7138. #define PXP_CTRL_CLR (IMXRT_PXP.offset008)
  7139. #define PXP_CTRL_TOG (IMXRT_PXP.offset00C)
  7140. #define PXP_STAT (IMXRT_PXP.offset010)
  7141. #define PXP_STAT_SET (IMXRT_PXP.offset014)
  7142. #define PXP_STAT_CLR (IMXRT_PXP.offset018)
  7143. #define PXP_STAT_TOG (IMXRT_PXP.offset01C)
  7144. #define PXP_OUT_CTRL (IMXRT_PXP.offset020)
  7145. #define PXP_OUT_CTRL_SET (IMXRT_PXP.offset024)
  7146. #define PXP_OUT_CTRL_CLR (IMXRT_PXP.offset028)
  7147. #define PXP_OUT_CTRL_TOG (IMXRT_PXP.offset02C)
  7148. #define PXP_OUT_BUF (IMXRT_PXP.offset030)
  7149. #define PXP_OUT_BUF2 (IMXRT_PXP.offset040)
  7150. #define PXP_OUT_PITCH (IMXRT_PXP.offset050)
  7151. #define PXP_OUT_LRC (IMXRT_PXP.offset060)
  7152. #define PXP_OUT_PS_ULC (IMXRT_PXP.offset070)
  7153. #define PXP_OUT_PS_LRC (IMXRT_PXP.offset080)
  7154. #define PXP_OUT_AS_ULC (IMXRT_PXP.offset090)
  7155. #define PXP_OUT_AS_LRC (IMXRT_PXP.offset0A0)
  7156. #define PXP_PS_CTRL (IMXRT_PXP.offset0B0)
  7157. #define PXP_PS_CTRL_SET (IMXRT_PXP.offset0B4)
  7158. #define PXP_PS_CTRL_CLR (IMXRT_PXP.offset0B8)
  7159. #define PXP_PS_CTRL_TOG (IMXRT_PXP.offset0BC)
  7160. #define PXP_PS_BUF (IMXRT_PXP.offset0C0)
  7161. #define PXP_PS_UBUF (IMXRT_PXP.offset0D0)
  7162. #define PXP_PS_VBUF (IMXRT_PXP.offset0E0)
  7163. #define PXP_PS_PITCH (IMXRT_PXP.offset0F0)
  7164. #define PXP_PS_BACKGROUND_0 (IMXRT_PXP.offset100)
  7165. #define PXP_PS_SCALE (IMXRT_PXP.offset110)
  7166. #define PXP_PS_OFFSET (IMXRT_PXP.offset120)
  7167. #define PXP_PS_CLRKEYLOW_0 (IMXRT_PXP.offset130)
  7168. #define PXP_PS_CLRKEYHIGH_0 (IMXRT_PXP.offset140)
  7169. #define PXP_AS_CTRL (IMXRT_PXP.offset150)
  7170. #define PXP_AS_BUF (IMXRT_PXP.offset160)
  7171. #define PXP_AS_PITCH (IMXRT_PXP.offset170)
  7172. #define PXP_AS_CLRKEYLOW_0 (IMXRT_PXP.offset180)
  7173. #define PXP_AS_CLRKEYHIGH_0 (IMXRT_PXP.offset190)
  7174. #define PXP_CSC1_COEF0 (IMXRT_PXP.offset1A0)
  7175. #define PXP_CSC1_COEF1 (IMXRT_PXP.offset1B0)
  7176. #define PXP_CSC1_COEF2 (IMXRT_PXP.offset1C0)
  7177. #define PXP_POWER (IMXRT_PXP_b.offset000)
  7178. #define PXP_PORTER_DUFF_CTRL (IMXRT_PXP_b.offset040)
  7179. // // 47.5: page 2695
  7180. typedef struct
  7181. {
  7182. volatile uint16_t COMP1;
  7183. volatile uint16_t COMP2;
  7184. volatile uint16_t CAPT;
  7185. volatile uint16_t LOAD;
  7186. volatile uint16_t HOLD;
  7187. volatile uint16_t CNTR;
  7188. volatile uint16_t CTRL;
  7189. volatile uint16_t SCTRL;
  7190. volatile uint16_t CMPLD1;
  7191. volatile uint16_t CMPLD2;
  7192. volatile uint16_t CSCTRL;
  7193. volatile uint16_t FILT;
  7194. volatile uint16_t DMA;
  7195. volatile uint16_t unused1[3];
  7196. } IMXRT_TMR_CH_t;
  7197. typedef struct
  7198. {
  7199. union {
  7200. IMXRT_TMR_CH_t CH[4];
  7201. struct
  7202. {
  7203. volatile uint16_t unused2[15];
  7204. volatile uint16_t ENBL;
  7205. };
  7206. };
  7207. } IMXRT_TMR_t;
  7208. #define IMXRT_TMR1 (*(IMXRT_TMR_t *)0x401DC000)
  7209. #define TMR1_COMP10 (IMXRT_TMR1.CH[0].COMP1)
  7210. #define TMR1_COMP20 (IMXRT_TMR1.CH[0].COMP2)
  7211. #define TMR1_CAPT0 (IMXRT_TMR1.CH[0].CAPT)
  7212. #define TMR1_LOAD0 (IMXRT_TMR1.CH[0].LOAD)
  7213. #define TMR1_HOLD0 (IMXRT_TMR1.CH[0].HOLD)
  7214. #define TMR1_CNTR0 (IMXRT_TMR1.CH[0].CNTR)
  7215. #define TMR1_CTRL0 (IMXRT_TMR1.CH[0].CTRL)
  7216. #define TMR1_SCTRL0 (IMXRT_TMR1.CH[0].SCTRL)
  7217. #define TMR1_CMPLD10 (IMXRT_TMR1.CH[0].CMPLD1)
  7218. #define TMR1_CMPLD20 (IMXRT_TMR1.CH[0].CMPLD2)
  7219. #define TMR1_CSCTRL0 (IMXRT_TMR1.CH[0].CSCTRL)
  7220. #define TMR1_FILT0 (IMXRT_TMR1.CH[0].FILT)
  7221. #define TMR1_DMA0 (IMXRT_TMR1.CH[0].DMA)
  7222. #define TMR1_ENBL (IMXRT_TMR1.ENBL)
  7223. #define TMR1_COMP11 (IMXRT_TMR1.CH[1].COMP1)
  7224. #define TMR1_COMP21 (IMXRT_TMR1.CH[1].COMP2)
  7225. #define TMR1_CAPT1 (IMXRT_TMR1.CH[1].CAPT)
  7226. #define TMR1_LOAD1 (IMXRT_TMR1.CH[1].LOAD)
  7227. #define TMR1_HOLD1 (IMXRT_TMR1.CH[1].HOLD)
  7228. #define TMR1_CNTR1 (IMXRT_TMR1.CH[1].CNTR)
  7229. #define TMR1_CTRL1 (IMXRT_TMR1.CH[1].CTRL)
  7230. #define TMR1_SCTRL1 (IMXRT_TMR1.CH[1].SCTRL)
  7231. #define TMR1_CMPLD11 (IMXRT_TMR1.CH[1].CMPLD1)
  7232. #define TMR1_CMPLD21 (IMXRT_TMR1.CH[1].CMPLD2)
  7233. #define TMR1_CSCTRL1 (IMXRT_TMR1.CH[1].CSCTRL)
  7234. #define TMR1_FILT1 (IMXRT_TMR1.CH[1].FILT)
  7235. #define TMR1_DMA1 (IMXRT_TMR1.CH[1].DMA)
  7236. #define TMR1_COMP12 (IMXRT_TMR1.CH[2].COMP1)
  7237. #define TMR1_COMP22 (IMXRT_TMR1.CH[2].COMP2)
  7238. #define TMR1_CAPT2 (IMXRT_TMR1.CH[2].CAPT)
  7239. #define TMR1_LOAD2 (IMXRT_TMR1.CH[2].LOAD)
  7240. #define TMR1_HOLD2 (IMXRT_TMR1.CH[2].HOLD)
  7241. #define TMR1_CNTR2 (IMXRT_TMR1.CH[2].CNTR)
  7242. #define TMR1_CTRL2 (IMXRT_TMR1.CH[2].CTRL)
  7243. #define TMR1_SCTRL2 (IMXRT_TMR1.CH[2].SCTRL)
  7244. #define TMR1_CMPLD12 (IMXRT_TMR1.CH[2].CMPLD1)
  7245. #define TMR1_CMPLD22 (IMXRT_TMR1.CH[2].CMPLD2)
  7246. #define TMR1_CSCTRL2 (IMXRT_TMR1.CH[2].CSCTRL)
  7247. #define TMR1_FILT2 (IMXRT_TMR1.CH[2].FILT)
  7248. #define TMR1_DMA2 (IMXRT_TMR1.CH[2].DMA)
  7249. #define TMR1_COMP13 (IMXRT_TMR1.CH[3].COMP1)
  7250. #define TMR1_COMP23 (IMXRT_TMR1.CH[3].COMP2)
  7251. #define TMR1_CAPT3 (IMXRT_TMR1.CH[3].CAPT)
  7252. #define TMR1_LOAD3 (IMXRT_TMR1.CH[3].LOAD)
  7253. #define TMR1_HOLD3 (IMXRT_TMR1.CH[3].HOLD)
  7254. #define TMR1_CNTR3 (IMXRT_TMR1.CH[3].CNTR)
  7255. #define TMR1_CTRL3 (IMXRT_TMR1.CH[3].CTRL)
  7256. #define TMR1_SCTRL3 (IMXRT_TMR1.CH[3].SCTRL)
  7257. #define TMR1_CMPLD13 (IMXRT_TMR1.CH[3].CMPLD1)
  7258. #define TMR1_CMPLD23 (IMXRT_TMR1.CH[3].CMPLD2)
  7259. #define TMR1_CSCTRL3 (IMXRT_TMR1.CH[3].CSCTRL)
  7260. #define TMR1_FILT3 (IMXRT_TMR1.CH[3].FILT)
  7261. #define TMR1_DMA3 (IMXRT_TMR1.CH[3].DMA)
  7262. #define IMXRT_TMR2 (*(IMXRT_TMR_t *)0x401E0000)
  7263. #define TMR2_COMP10 (IMXRT_TMR2.CH[0].COMP1)
  7264. #define TMR2_COMP20 (IMXRT_TMR2.CH[0].COMP2)
  7265. #define TMR2_CAPT0 (IMXRT_TMR2.CH[0].CAPT)
  7266. #define TMR2_LOAD0 (IMXRT_TMR2.CH[0].LOAD)
  7267. #define TMR2_HOLD0 (IMXRT_TMR2.CH[0].HOLD)
  7268. #define TMR2_CNTR0 (IMXRT_TMR2.CH[0].CNTR)
  7269. #define TMR2_CTRL0 (IMXRT_TMR2.CH[0].CTRL)
  7270. #define TMR2_SCTRL0 (IMXRT_TMR2.CH[0].SCTRL)
  7271. #define TMR2_CMPLD10 (IMXRT_TMR2.CH[0].CMPLD1)
  7272. #define TMR2_CMPLD20 (IMXRT_TMR2.CH[0].CMPLD2)
  7273. #define TMR2_CSCTRL0 (IMXRT_TMR2.CH[0].CSCTRL)
  7274. #define TMR2_FILT0 (IMXRT_TMR2.CH[0].FILT)
  7275. #define TMR2_DMA0 (IMXRT_TMR2.CH[0].DMA)
  7276. #define TMR2_ENBL (IMXRT_TMR2.ENBL)
  7277. #define TMR2_COMP11 (IMXRT_TMR2.CH[1].COMP1)
  7278. #define TMR2_COMP21 (IMXRT_TMR2.CH[1].COMP2)
  7279. #define TMR2_CAPT1 (IMXRT_TMR2.CH[1].CAPT)
  7280. #define TMR2_LOAD1 (IMXRT_TMR2.CH[1].LOAD)
  7281. #define TMR2_HOLD1 (IMXRT_TMR2.CH[1].HOLD)
  7282. #define TMR2_CNTR1 (IMXRT_TMR2.CH[1].CNTR)
  7283. #define TMR2_CTRL1 (IMXRT_TMR2.CH[1].CTRL)
  7284. #define TMR2_SCTRL1 (IMXRT_TMR2.CH[1].SCTRL)
  7285. #define TMR2_CMPLD11 (IMXRT_TMR2.CH[1].CMPLD1)
  7286. #define TMR2_CMPLD21 (IMXRT_TMR2.CH[1].CMPLD2)
  7287. #define TMR2_CSCTRL1 (IMXRT_TMR2.CH[1].CSCTRL)
  7288. #define TMR2_FILT1 (IMXRT_TMR2.CH[1].FILT)
  7289. #define TMR2_DMA1 (IMXRT_TMR2.CH[1].DMA)
  7290. #define TMR2_COMP12 (IMXRT_TMR2.CH[2].COMP1)
  7291. #define TMR2_COMP22 (IMXRT_TMR2.CH[2].COMP2)
  7292. #define TMR2_CAPT2 (IMXRT_TMR2.CH[2].CAPT)
  7293. #define TMR2_LOAD2 (IMXRT_TMR2.CH[2].LOAD)
  7294. #define TMR2_HOLD2 (IMXRT_TMR2.CH[2].HOLD)
  7295. #define TMR2_CNTR2 (IMXRT_TMR2.CH[2].CNTR)
  7296. #define TMR2_CTRL2 (IMXRT_TMR2.CH[2].CTRL)
  7297. #define TMR2_SCTRL2 (IMXRT_TMR2.CH[2].SCTRL)
  7298. #define TMR2_CMPLD12 (IMXRT_TMR2.CH[2].CMPLD1)
  7299. #define TMR2_CMPLD22 (IMXRT_TMR2.CH[2].CMPLD2)
  7300. #define TMR2_CSCTRL2 (IMXRT_TMR2.CH[2].CSCTRL)
  7301. #define TMR2_FILT2 (IMXRT_TMR2.CH[2].FILT)
  7302. #define TMR2_DMA2 (IMXRT_TMR2.CH[2].DMA)
  7303. #define TMR2_COMP13 (IMXRT_TMR2.CH[3].COMP1)
  7304. #define TMR2_COMP23 (IMXRT_TMR2.CH[3].COMP2)
  7305. #define TMR2_CAPT3 (IMXRT_TMR2.CH[3].CAPT)
  7306. #define TMR2_LOAD3 (IMXRT_TMR2.CH[3].LOAD)
  7307. #define TMR2_HOLD3 (IMXRT_TMR2.CH[3].HOLD)
  7308. #define TMR2_CNTR3 (IMXRT_TMR2.CH[3].CNTR)
  7309. #define TMR2_CTRL3 (IMXRT_TMR2.CH[3].CTRL)
  7310. #define TMR2_SCTRL3 (IMXRT_TMR2.CH[3].SCTRL)
  7311. #define TMR2_CMPLD13 (IMXRT_TMR2.CH[3].CMPLD1)
  7312. #define TMR2_CMPLD23 (IMXRT_TMR2.CH[3].CMPLD2)
  7313. #define TMR2_CSCTRL3 (IMXRT_TMR2.CH[3].CSCTRL)
  7314. #define TMR2_FILT3 (IMXRT_TMR2.CH[3].FILT)
  7315. #define TMR2_DMA3 (IMXRT_TMR2.CH[3].DMA)
  7316. #define IMXRT_TMR3 (*(IMXRT_TMR_t *)0x401E4000)
  7317. #define TMR3_COMP10 (IMXRT_TMR3.CH[0].COMP1)
  7318. #define TMR3_COMP20 (IMXRT_TMR3.CH[0].COMP2)
  7319. #define TMR3_CAPT0 (IMXRT_TMR3.CH[0].CAPT)
  7320. #define TMR3_LOAD0 (IMXRT_TMR3.CH[0].LOAD)
  7321. #define TMR3_HOLD0 (IMXRT_TMR3.CH[0].HOLD)
  7322. #define TMR3_CNTR0 (IMXRT_TMR3.CH[0].CNTR)
  7323. #define TMR3_CTRL0 (IMXRT_TMR3.CH[0].CTRL)
  7324. #define TMR3_SCTRL0 (IMXRT_TMR3.CH[0].SCTRL)
  7325. #define TMR3_CMPLD10 (IMXRT_TMR3.CH[0].CMPLD1)
  7326. #define TMR3_CMPLD20 (IMXRT_TMR3.CH[0].CMPLD2)
  7327. #define TMR3_CSCTRL0 (IMXRT_TMR3.CH[0].CSCTRL)
  7328. #define TMR3_FILT0 (IMXRT_TMR3.CH[0].FILT)
  7329. #define TMR3_DMA0 (IMXRT_TMR3.CH[0].DMA)
  7330. #define TMR3_ENBL (IMXRT_TMR3.ENBL)
  7331. #define TMR3_COMP11 (IMXRT_TMR3.CH[1].COMP1)
  7332. #define TMR3_COMP21 (IMXRT_TMR3.CH[1].COMP2)
  7333. #define TMR3_CAPT1 (IMXRT_TMR3.CH[1].CAPT)
  7334. #define TMR3_LOAD1 (IMXRT_TMR3.CH[1].LOAD)
  7335. #define TMR3_HOLD1 (IMXRT_TMR3.CH[1].HOLD)
  7336. #define TMR3_CNTR1 (IMXRT_TMR3.CH[1].CNTR)
  7337. #define TMR3_CTRL1 (IMXRT_TMR3.CH[1].CTRL)
  7338. #define TMR3_SCTRL1 (IMXRT_TMR3.CH[1].SCTRL)
  7339. #define TMR3_CMPLD11 (IMXRT_TMR3.CH[1].CMPLD1)
  7340. #define TMR3_CMPLD21 (IMXRT_TMR3.CH[1].CMPLD2)
  7341. #define TMR3_CSCTRL1 (IMXRT_TMR3.CH[1].CSCTRL)
  7342. #define TMR3_FILT1 (IMXRT_TMR3.CH[1].FILT)
  7343. #define TMR3_DMA1 (IMXRT_TMR3.CH[1].DMA)
  7344. #define TMR3_COMP12 (IMXRT_TMR3.CH[2].COMP1)
  7345. #define TMR3_COMP22 (IMXRT_TMR3.CH[2].COMP2)
  7346. #define TMR3_CAPT2 (IMXRT_TMR3.CH[2].CAPT)
  7347. #define TMR3_LOAD2 (IMXRT_TMR3.CH[2].LOAD)
  7348. #define TMR3_HOLD2 (IMXRT_TMR3.CH[2].HOLD)
  7349. #define TMR3_CNTR2 (IMXRT_TMR3.CH[2].CNTR)
  7350. #define TMR3_CTRL2 (IMXRT_TMR3.CH[2].CTRL)
  7351. #define TMR3_SCTRL2 (IMXRT_TMR3.CH[2].SCTRL)
  7352. #define TMR3_CMPLD12 (IMXRT_TMR3.CH[2].CMPLD1)
  7353. #define TMR3_CMPLD22 (IMXRT_TMR3.CH[2].CMPLD2)
  7354. #define TMR3_CSCTRL2 (IMXRT_TMR3.CH[2].CSCTRL)
  7355. #define TMR3_FILT2 (IMXRT_TMR3.CH[2].FILT)
  7356. #define TMR3_DMA2 (IMXRT_TMR3.CH[2].DMA)
  7357. #define TMR3_COMP13 (IMXRT_TMR3.CH[3].COMP1)
  7358. #define TMR3_COMP23 (IMXRT_TMR3.CH[3].COMP2)
  7359. #define TMR3_CAPT3 (IMXRT_TMR3.CH[3].CAPT)
  7360. #define TMR3_LOAD3 (IMXRT_TMR3.CH[3].LOAD)
  7361. #define TMR3_HOLD3 (IMXRT_TMR3.CH[3].HOLD)
  7362. #define TMR3_CNTR3 (IMXRT_TMR3.CH[3].CNTR)
  7363. #define TMR3_CTRL3 (IMXRT_TMR3.CH[3].CTRL)
  7364. #define TMR3_SCTRL3 (IMXRT_TMR3.CH[3].SCTRL)
  7365. #define TMR3_CMPLD13 (IMXRT_TMR3.CH[3].CMPLD1)
  7366. #define TMR3_CMPLD23 (IMXRT_TMR3.CH[3].CMPLD2)
  7367. #define TMR3_CSCTRL3 (IMXRT_TMR3.CH[3].CSCTRL)
  7368. #define TMR3_FILT3 (IMXRT_TMR3.CH[3].FILT)
  7369. #define TMR3_DMA3 (IMXRT_TMR3.CH[3].DMA)
  7370. #define IMXRT_TMR4 (*(IMXRT_TMR_t *)0x401E8000)
  7371. #define TMR4_COMP10 (IMXRT_TMR4.CH[0].COMP1)
  7372. #define TMR4_COMP20 (IMXRT_TMR4.CH[0].COMP2)
  7373. #define TMR4_CAPT0 (IMXRT_TMR4.CH[0].CAPT)
  7374. #define TMR4_LOAD0 (IMXRT_TMR4.CH[0].LOAD)
  7375. #define TMR4_HOLD0 (IMXRT_TMR4.CH[0].HOLD)
  7376. #define TMR4_CNTR0 (IMXRT_TMR4.CH[0].CNTR)
  7377. #define TMR4_CTRL0 (IMXRT_TMR4.CH[0].CTRL)
  7378. #define TMR4_SCTRL0 (IMXRT_TMR4.CH[0].SCTRL)
  7379. #define TMR4_CMPLD10 (IMXRT_TMR4.CH[0].CMPLD1)
  7380. #define TMR4_CMPLD20 (IMXRT_TMR4.CH[0].CMPLD2)
  7381. #define TMR4_CSCTRL0 (IMXRT_TMR4.CH[0].CSCTRL)
  7382. #define TMR4_FILT0 (IMXRT_TMR4.CH[0].FILT)
  7383. #define TMR4_DMA0 (IMXRT_TMR4.CH[0].DMA)
  7384. #define TMR4_ENBL (IMXRT_TMR4.ENBL)
  7385. #define TMR4_COMP11 (IMXRT_TMR4.CH[1].COMP1)
  7386. #define TMR4_COMP21 (IMXRT_TMR4.CH[1].COMP2)
  7387. #define TMR4_CAPT1 (IMXRT_TMR4.CH[1].CAPT)
  7388. #define TMR4_LOAD1 (IMXRT_TMR4.CH[1].LOAD)
  7389. #define TMR4_HOLD1 (IMXRT_TMR4.CH[1].HOLD)
  7390. #define TMR4_CNTR1 (IMXRT_TMR4.CH[1].CNTR)
  7391. #define TMR4_CTRL1 (IMXRT_TMR4.CH[1].CTRL)
  7392. #define TMR4_SCTRL1 (IMXRT_TMR4.CH[1].SCTRL)
  7393. #define TMR4_CMPLD11 (IMXRT_TMR4.CH[1].CMPLD1)
  7394. #define TMR4_CMPLD21 (IMXRT_TMR4.CH[1].CMPLD2)
  7395. #define TMR4_CSCTRL1 (IMXRT_TMR4.CH[1].CSCTRL)
  7396. #define TMR4_FILT1 (IMXRT_TMR4.CH[1].FILT)
  7397. #define TMR4_DMA1 (IMXRT_TMR4.CH[1].DMA)
  7398. #define TMR4_COMP12 (IMXRT_TMR4.CH[2].COMP1)
  7399. #define TMR4_COMP22 (IMXRT_TMR4.CH[2].COMP2)
  7400. #define TMR4_CAPT2 (IMXRT_TMR4.CH[2].CAPT)
  7401. #define TMR4_LOAD2 (IMXRT_TMR4.CH[2].LOAD)
  7402. #define TMR4_HOLD2 (IMXRT_TMR4.CH[2].HOLD)
  7403. #define TMR4_CNTR2 (IMXRT_TMR4.CH[2].CNTR)
  7404. #define TMR4_CTRL2 (IMXRT_TMR4.CH[2].CTRL)
  7405. #define TMR4_SCTRL2 (IMXRT_TMR4.CH[2].SCTRL)
  7406. #define TMR4_CMPLD12 (IMXRT_TMR4.CH[2].CMPLD1)
  7407. #define TMR4_CMPLD22 (IMXRT_TMR4.CH[2].CMPLD2)
  7408. #define TMR4_CSCTRL2 (IMXRT_TMR4.CH[2].CSCTRL)
  7409. #define TMR4_FILT2 (IMXRT_TMR4.CH[2].FILT)
  7410. #define TMR4_DMA2 (IMXRT_TMR4.CH[2].DMA)
  7411. #define TMR4_COMP13 (IMXRT_TMR4.CH[3].COMP1)
  7412. #define TMR4_COMP23 (IMXRT_TMR4.CH[3].COMP2)
  7413. #define TMR4_CAPT3 (IMXRT_TMR4.CH[3].CAPT)
  7414. #define TMR4_LOAD3 (IMXRT_TMR4.CH[3].LOAD)
  7415. #define TMR4_HOLD3 (IMXRT_TMR4.CH[3].HOLD)
  7416. #define TMR4_CNTR3 (IMXRT_TMR4.CH[3].CNTR)
  7417. #define TMR4_CTRL3 (IMXRT_TMR4.CH[3].CTRL)
  7418. #define TMR4_SCTRL3 (IMXRT_TMR4.CH[3].SCTRL)
  7419. #define TMR4_CMPLD13 (IMXRT_TMR4.CH[3].CMPLD1)
  7420. #define TMR4_CMPLD23 (IMXRT_TMR4.CH[3].CMPLD2)
  7421. #define TMR4_CSCTRL3 (IMXRT_TMR4.CH[3].CSCTRL)
  7422. #define TMR4_FILT3 (IMXRT_TMR4.CH[3].FILT)
  7423. #define TMR4_DMA3 (IMXRT_TMR4.CH[3].DMA)
  7424. #define TMR_CTRL_CM(n) ((uint16_t)(((n) & 0x07) << 13))
  7425. #define TMR_CTRL_PCS(n) ((uint16_t)(((n) & 0x0F) << 9))
  7426. #define TMR_CTRL_SCS(n) ((uint16_t)(((n) & 0x03) << 7))
  7427. #define TMR_CTRL_ONCE ((uint16_t)(1<<6))
  7428. #define TMR_CTRL_LENGTH ((uint16_t)(1<<5))
  7429. #define TMR_CTRL_DIR ((uint16_t)(1<<4))
  7430. #define TMR_CTRL_COINIT ((uint16_t)(1<<3))
  7431. #define TMR_CTRL_OUTMODE(n) ((uint16_t)(((n) & 0x07) << 0))
  7432. #define TMR_SCTRL_TCF ((uint16_t)(1<<15))
  7433. #define TMR_SCTRL_TCFIE ((uint16_t)(1<<14))
  7434. #define TMR_SCTRL_TOF ((uint16_t)(1<<13))
  7435. #define TMR_SCTRL_TOFIE ((uint16_t)(1<<12))
  7436. #define TMR_SCTRL_IEF ((uint16_t)(1<<11))
  7437. #define TMR_SCTRL_IEFIE ((uint16_t)(1<<10))
  7438. #define TMR_SCTRL_IPS ((uint16_t)(1<<9))
  7439. #define TMR_SCTRL_INPUT ((uint16_t)(1<<8))
  7440. #define TMR_SCTRL_CAPTURE_MODE(n) ((uint16_t)(((n) & 0x03) << 6))
  7441. #define TMR_SCTRL_MSTR ((uint16_t)(1<<5))
  7442. #define TMR_SCTRL_EEOF ((uint16_t)(1<<4))
  7443. #define TMR_SCTRL_VAL ((uint16_t)(1<<3))
  7444. #define TMR_SCTRL_FORCE ((uint16_t)(1<<2))
  7445. #define TMR_SCTRL_OPS ((uint16_t)(1<<1))
  7446. #define TMR_SCTRL_OEN ((uint16_t)(1<<0))
  7447. #define TMR_CSCTRL_DBG_EN(n) ((uint16_t)(((n) & 0x03) << 14))
  7448. #define TMR_CSCTRL_FAULT ((uint16_t)(1<<13))
  7449. #define TMR_CSCTRL_ALT_LOAD ((uint16_t)(1<<12))
  7450. #define TMR_CSCTRL_ROC ((uint16_t)(1<<11))
  7451. #define TMR_CSCTRL_TCI ((uint16_t)(1<<10))
  7452. #define TMR_CSCTRL_UP ((uint16_t)(1<<9))
  7453. #define TMR_CSCTRL_TCF2EN ((uint16_t)(1<<7))
  7454. #define TMR_CSCTRL_TCF1EN ((uint16_t)(1<<6))
  7455. #define TMR_CSCTRL_TCF2 ((uint16_t)(1<<5))
  7456. #define TMR_CSCTRL_TCF1 ((uint16_t)(1<<4))
  7457. #define TMR_CSCTRL_CL2(n) ((uint16_t)(((n) & 0x03) << 2))
  7458. #define TMR_CSCTRL_CL1(n) ((uint16_t)(((n) & 0x03) << 0))
  7459. #define TMR_FILT_FILT_CNT(n) ((uint16_t)(((n) & 0x07) << 8))
  7460. #define TMR_FILT_FILT_PER(n) ((uint16_t)(((n) & 0xFF) << 0))
  7461. #define TMR_DMA_CMPLD2DE ((uint16_t)(1<<2))
  7462. #define TMR_DMA_CMPLD1DE ((uint16_t)(1<<1))
  7463. #define TMR_DMA_IEFDE ((uint16_t)(1<<0))
  7464. // 48.4.1.1: page 2748
  7465. #define IMXRT_I2S1 (*(IMXRT_REGISTER32_t *)0x40384000)
  7466. #define I2S1_VERID (IMXRT_I2S1.offset000)
  7467. #define I2S1_PARAM (IMXRT_I2S1.offset004)
  7468. #define I2S1_TCSR (IMXRT_I2S1.offset008)
  7469. #define I2S1_TCR1 (IMXRT_I2S1.offset00C)
  7470. #define I2S1_TCR2 (IMXRT_I2S1.offset010)
  7471. #define I2S1_TCR3 (IMXRT_I2S1.offset014)
  7472. #define I2S1_TCR4 (IMXRT_I2S1.offset018)
  7473. #define I2S1_TCR5 (IMXRT_I2S1.offset01C)
  7474. #define I2S1_TDR0 (IMXRT_I2S1.offset020)
  7475. #define I2S1_TDR1 (IMXRT_I2S1.offset024)
  7476. #define I2S1_TDR2 (IMXRT_I2S1.offset028)
  7477. #define I2S1_TDR3 (IMXRT_I2S1.offset02C)
  7478. #define I2S1_TFR0 (IMXRT_I2S1.offset040)
  7479. #define I2S1_TFR1 (IMXRT_I2S1.offset044)
  7480. #define I2S1_TFR2 (IMXRT_I2S1.offset048)
  7481. #define I2S1_TFR3 (IMXRT_I2S1.offset04C)
  7482. #define I2S1_TMR (IMXRT_I2S1.offset060)
  7483. #define I2S1_RCSR (IMXRT_I2S1.offset088)
  7484. #define I2S1_RCR1 (IMXRT_I2S1.offset08C)
  7485. #define I2S1_RCR2 (IMXRT_I2S1.offset090)
  7486. #define I2S1_RCR3 (IMXRT_I2S1.offset094)
  7487. #define I2S1_RCR4 (IMXRT_I2S1.offset098)
  7488. #define I2S1_RCR5 (IMXRT_I2S1.offset09C)
  7489. #define I2S1_RDR0 (IMXRT_I2S1.offset0A0)
  7490. #define I2S1_RDR1 (IMXRT_I2S1.offset0A4)
  7491. #define I2S1_RDR2 (IMXRT_I2S1.offset0A8)
  7492. #define I2S1_RDR3 (IMXRT_I2S1.offset0AC)
  7493. #define I2S1_RFR0 (IMXRT_I2S1.offset0C0)
  7494. #define I2S1_RFR1 (IMXRT_I2S1.offset0C4)
  7495. #define I2S1_RFR2 (IMXRT_I2S1.offset0C8)
  7496. #define I2S1_RFR3 (IMXRT_I2S1.offset0CC)
  7497. #define I2S1_RMR (IMXRT_I2S1.offset0E0)
  7498. #define IMXRT_I2S2 (*(IMXRT_REGISTER32_t *)0x40388000)
  7499. #define I2S2_VERID (IMXRT_I2S2.offset000)
  7500. #define I2S2_PARAM (IMXRT_I2S2.offset004)
  7501. #define I2S2_TCSR (IMXRT_I2S2.offset008)
  7502. #define I2S2_TCR1 (IMXRT_I2S2.offset00C)
  7503. #define I2S2_TCR2 (IMXRT_I2S2.offset010)
  7504. #define I2S2_TCR3 (IMXRT_I2S2.offset014)
  7505. #define I2S2_TCR4 (IMXRT_I2S2.offset018)
  7506. #define I2S2_TCR5 (IMXRT_I2S2.offset01C)
  7507. #define I2S2_TDR0 (IMXRT_I2S2.offset020)
  7508. #define I2S2_TDR1 (IMXRT_I2S2.offset024)
  7509. #define I2S2_TDR2 (IMXRT_I2S2.offset028)
  7510. #define I2S2_TDR3 (IMXRT_I2S2.offset02C)
  7511. #define I2S2_TFR0 (IMXRT_I2S2.offset040)
  7512. #define I2S2_TFR1 (IMXRT_I2S2.offset044)
  7513. #define I2S2_TFR2 (IMXRT_I2S2.offset048)
  7514. #define I2S2_TFR3 (IMXRT_I2S2.offset04C)
  7515. #define I2S2_TMR (IMXRT_I2S2.offset060)
  7516. #define I2S2_RCSR (IMXRT_I2S2.offset088)
  7517. #define I2S2_RCR1 (IMXRT_I2S2.offset08C)
  7518. #define I2S2_RCR2 (IMXRT_I2S2.offset090)
  7519. #define I2S2_RCR3 (IMXRT_I2S2.offset094)
  7520. #define I2S2_RCR4 (IMXRT_I2S2.offset098)
  7521. #define I2S2_RCR5 (IMXRT_I2S2.offset09C)
  7522. #define I2S2_RDR0 (IMXRT_I2S2.offset0A0)
  7523. #define I2S2_RDR1 (IMXRT_I2S2.offset0A4)
  7524. #define I2S2_RDR2 (IMXRT_I2S2.offset0A8)
  7525. #define I2S2_RDR3 (IMXRT_I2S2.offset0AC)
  7526. #define I2S2_RFR0 (IMXRT_I2S2.offset0C0)
  7527. #define I2S2_RFR1 (IMXRT_I2S2.offset0C4)
  7528. #define I2S2_RFR2 (IMXRT_I2S2.offset0C8)
  7529. #define I2S2_RFR3 (IMXRT_I2S2.offset0CC)
  7530. #define I2S2_RMR (IMXRT_I2S2.offset0E0)
  7531. #define IMXRT_I2S3 (*(IMXRT_REGISTER32_t *)0x4038C000)
  7532. #define I2S3_VERID (IMXRT_I2S3.offset000)
  7533. #define I2S3_PARAM (IMXRT_I2S3.offset004)
  7534. #define I2S3_TCSR (IMXRT_I2S3.offset008)
  7535. #define I2S3_TCR1 (IMXRT_I2S3.offset00C)
  7536. #define I2S3_TCR2 (IMXRT_I2S3.offset010)
  7537. #define I2S3_TCR3 (IMXRT_I2S3.offset014)
  7538. #define I2S3_TCR4 (IMXRT_I2S3.offset018)
  7539. #define I2S3_TCR5 (IMXRT_I2S3.offset01C)
  7540. #define I2S3_TDR0 (IMXRT_I2S3.offset020)
  7541. #define I2S3_TDR1 (IMXRT_I2S3.offset024)
  7542. #define I2S3_TDR2 (IMXRT_I2S3.offset028)
  7543. #define I2S3_TDR3 (IMXRT_I2S3.offset02C)
  7544. #define I2S3_TFR0 (IMXRT_I2S3.offset040)
  7545. #define I2S3_TFR1 (IMXRT_I2S3.offset044)
  7546. #define I2S3_TFR2 (IMXRT_I2S3.offset048)
  7547. #define I2S3_TFR3 (IMXRT_I2S3.offset04C)
  7548. #define I2S3_TMR (IMXRT_I2S3.offset060)
  7549. #define I2S3_RCSR (IMXRT_I2S3.offset088)
  7550. #define I2S3_RCR1 (IMXRT_I2S3.offset08C)
  7551. #define I2S3_RCR2 (IMXRT_I2S3.offset090)
  7552. #define I2S3_RCR3 (IMXRT_I2S3.offset094)
  7553. #define I2S3_RCR4 (IMXRT_I2S3.offset098)
  7554. #define I2S3_RCR5 (IMXRT_I2S3.offset09C)
  7555. #define I2S3_RDR0 (IMXRT_I2S3.offset0A0)
  7556. #define I2S3_RDR1 (IMXRT_I2S3.offset0A4)
  7557. #define I2S3_RDR2 (IMXRT_I2S3.offset0A8)
  7558. #define I2S3_RDR3 (IMXRT_I2S3.offset0AC)
  7559. #define I2S3_RFR0 (IMXRT_I2S3.offset0C0)
  7560. #define I2S3_RFR1 (IMXRT_I2S3.offset0C4)
  7561. #define I2S3_RFR2 (IMXRT_I2S3.offset0C8)
  7562. #define I2S3_RFR3 (IMXRT_I2S3.offset0CC)
  7563. #define I2S3_RMR (IMXRT_I2S3.offset0E0)
  7564. #define I2S_RCR1_RFW(n) ((uint32_t)n & 0x1f) // Receive FIFO watermark
  7565. #define I2S_RCR2_DIV(n) ((uint32_t)n & 0xff) // Bit clock divide by (DIV+1)*2
  7566. #define I2S_RCR2_BCD ((uint32_t)1<<24) // Bit clock direction
  7567. #define I2S_RCR2_MSEL(n) ((uint32_t)(n & 3)<<26) // MCLK select, 0=bus clock, 1=I2S0_MCLK
  7568. #define I2S_RCR2_SYNC(n) ((uint32_t)(n & 3)<<30) // 0=async 1=sync with trasmitter
  7569. #define I2S_RCR3_RCE ((uint32_t)0x10000) // receive channel enable
  7570. #define I2S_RCR4_FSD ((uint32_t)1) // Frame Sync Direction
  7571. #define I2S_RCR4_FSP ((uint32_t)1<<1)
  7572. #define I2S_RCR4_FSE ((uint32_t)8) // Frame Sync Early
  7573. #define I2S_RCR4_MF ((uint32_t)0x10) // MSB First
  7574. #define I2S_RCR4_SYWD(n) ((uint32_t)(n & 0x1f)<<8) // Sync Width
  7575. #define I2S_RCR4_FRSZ(n) ((uint32_t)(n & 0x0f)<<16) // Frame Size
  7576. #define I2S_RCR4_FCONT ((uint32_t)1<<28) // FIFO Continue on Error
  7577. #define I2S_RCR5_FBT(n) ((uint32_t)(n & 0x1f)<<8) // First Bit Shifted
  7578. #define I2S_RCR5_W0W(n) ((uint32_t)(n & 0x1f)<<16) // Word 0 Width
  7579. #define I2S_RCR5_WNW(n) ((uint32_t)(n & 0x1f)<<24) // Word N Width
  7580. #define I2S_RCR2_BCP ((uint32_t)1<<25)
  7581. #define I2S_RCSR_RE ((uint32_t)0x80000000) // Receiver Enable
  7582. #define I2S_RCSR_FR ((uint32_t)0x02000000) // FIFO Reset
  7583. #define I2S_RCSR_FRDE ((uint32_t)0x00000001) // FIFO Request DMA Enable
  7584. #define I2S_RCSR_BCE ((uint32_t)0x10000000) // Bit Clock Enable
  7585. #define I2S_TCR1_RFW(n) ((uint32_t)n & 0x1f) // Receive FIFO watermark
  7586. #define I2S_TCR2_DIV(n) ((uint32_t)n & 0xff) // Bit clock divide by (DIV+1)*2
  7587. #define I2S_TCR2_BCD ((uint32_t)1<<24) // Bit clock direction
  7588. #define I2S_TCR2_MSEL(n) ((uint32_t)(n & 3)<<26) // MCLK select, 0=bus clock, 1=I2S0_MCLK
  7589. #define I2S_TCR2_SYNC(n) ((uint32_t)(n & 3)<<30) // 0=async 1=sync with receiver
  7590. #define I2S_TCR3_TCE ((uint32_t)0x10000) // receive channel enable
  7591. #define I2S_TCR4_FSD ((uint32_t)1) // Frame Sync Direction
  7592. #define I2S_TCR4_FSP ((uint32_t)1<<1)
  7593. #define I2S_TCR4_FSE ((uint32_t)8) // Frame Sync Early
  7594. #define I2S_TCR4_MF ((uint32_t)0x10) // MSB First
  7595. #define I2S_TCR4_SYWD(n) ((uint32_t)(n & 0x1f)<<8) // Sync Width
  7596. #define I2S_TCR4_FRSZ(n) ((uint32_t)(n & 0x0f)<<16) // Frame Size
  7597. #define I2S_TCR4_FCONT ((uint32_t)1<<28) // FIFO Continue on Error
  7598. #define I2S_TCR5_FBT(n) ((uint32_t)(n & 0x1f)<<8) // First Bit Shifted
  7599. #define I2S_TCR5_W0W(n) ((uint32_t)(n & 0x1f)<<16) // Word 0 Width
  7600. #define I2S_TCR5_WNW(n) ((uint32_t)(n & 0x1f)<<24) // Word N Width
  7601. #define I2S_TCR2_BCP ((uint32_t)1<<25)
  7602. #define I2S_TCSR_TE ((uint32_t)0x80000000) // Receiver Enable
  7603. #define I2S_TCSR_BCE ((uint32_t)0x10000000) // Bit Clock Enable
  7604. #define I2S_TCSR_FR ((uint32_t)0x02000000) // FIFO Reset
  7605. #define I2S_TCSR_FRDE ((uint32_t)0x00000001) // FIFO Request DMA Enable
  7606. // 49.3.1.1: page 2784
  7607. #define IMXRT_SEMC (*(IMXRT_REGISTER32_t *)0x402F0000)
  7608. #define SEMC_MCR (IMXRT_SEMC.offset000)
  7609. #define SEMC_IOCR (IMXRT_SEMC.offset004)
  7610. #define SEMC_BMCR0 (IMXRT_SEMC.offset008)
  7611. #define SEMC_BMCR1 (IMXRT_SEMC.offset00C)
  7612. #define SEMC_BR0 (IMXRT_SEMC.offset010)
  7613. #define SEMC_BR1 (IMXRT_SEMC.offset014)
  7614. #define SEMC_BR2 (IMXRT_SEMC.offset018)
  7615. #define SEMC_BR3 (IMXRT_SEMC.offset01C)
  7616. #define SEMC_BR4 (IMXRT_SEMC.offset020)
  7617. #define SEMC_BR5 (IMXRT_SEMC.offset024)
  7618. #define SEMC_BR6 (IMXRT_SEMC.offset028)
  7619. #define SEMC_BR7 (IMXRT_SEMC.offset02C)
  7620. #define SEMC_BR8 (IMXRT_SEMC.offset030)
  7621. #define SEMC_INTEN (IMXRT_SEMC.offset038)
  7622. #define SEMC_INTR (IMXRT_SEMC.offset03C)
  7623. #define SEMC_SDRAMCR0 (IMXRT_SEMC.offset040)
  7624. #define SEMC_SDRAMCR1 (IMXRT_SEMC.offset044)
  7625. #define SEMC_SDRAMCR2 (IMXRT_SEMC.offset048)
  7626. #define SEMC_SDRAMCR3 (IMXRT_SEMC.offset04C)
  7627. #define SEMC_NANDCR0 (IMXRT_SEMC.offset050)
  7628. #define SEMC_NANDCR1 (IMXRT_SEMC.offset054)
  7629. #define SEMC_NANDCR2 (IMXRT_SEMC.offset058)
  7630. #define SEMC_NANDCR3 (IMXRT_SEMC.offset05C)
  7631. #define SEMC_ORCR0 (IMXRT_SEMC.offset060)
  7632. #define SEMC_ORCR1 (IMXRT_SEMC.offset064)
  7633. #define SEMC_ORCR2 (IMXRT_SEMC.offset068)
  7634. #define SEMC_ORCR3 (IMXRT_SEMC.offset06C)
  7635. #define SEMC_SRAMCR0 (IMXRT_SEMC.offset070)
  7636. #define SEMC_SRAMCR1 (IMXRT_SEMC.offset074)
  7637. #define SEMC_SRAMCR2 (IMXRT_SEMC.offset078)
  7638. #define SEMC_SRAMCR3 (IMXRT_SEMC.offset07C)
  7639. #define SEMC_DBICR0 (IMXRT_SEMC.offset080)
  7640. #define SEMC_DBICR1 (IMXRT_SEMC.offset084)
  7641. #define SEMC_IPCR0 (IMXRT_SEMC.offset090)
  7642. #define SEMC_IPCR1 (IMXRT_SEMC.offset094)
  7643. #define SEMC_IPCR2 (IMXRT_SEMC.offset098)
  7644. #define SEMC_IPCMD (IMXRT_SEMC.offset09C)
  7645. #define SEMC_IPTXDAT (IMXRT_SEMC.offset0A0)
  7646. #define SEMC_IPRXDAT (IMXRT_SEMC.offset0B0)
  7647. #define SEMC_STS0 (IMXRT_SEMC.offset0C0)
  7648. #define SEMC_STS1 (IMXRT_SEMC.offset0C4)
  7649. #define SEMC_STS2 (IMXRT_SEMC.offset0C8)
  7650. #define SEMC_STS3 (IMXRT_SEMC.offset0CC)
  7651. #define SEMC_STS4 (IMXRT_SEMC.offset0D0)
  7652. #define SEMC_STS5 (IMXRT_SEMC.offset0D4)
  7653. #define SEMC_STS6 (IMXRT_SEMC.offset0D8)
  7654. #define SEMC_STS7 (IMXRT_SEMC.offset0DC)
  7655. #define SEMC_STS8 (IMXRT_SEMC.offset0E0)
  7656. #define SEMC_STS9 (IMXRT_SEMC.offset0E4)
  7657. #define SEMC_STS10 (IMXRT_SEMC.offset0E8)
  7658. #define SEMC_STS11 (IMXRT_SEMC.offset0EC)
  7659. #define SEMC_STS12 (IMXRT_SEMC.offset0F0)
  7660. #define SEMC_STS13 (IMXRT_SEMC.offset0F4)
  7661. #define SEMC_STS14 (IMXRT_SEMC.offset0F8)
  7662. #define SEMC_STS15 (IMXRT_SEMC.offset0FC)
  7663. // 50.6.1: page 2895
  7664. #define IMXRT_SNVS (*(IMXRT_REGISTER32_t *)0x400D4000)
  7665. #define SNVS_HPLR (IMXRT_SNVS.offset000)
  7666. #define SNVS_HPCOMR (IMXRT_SNVS.offset004)
  7667. #define SNVS_HPCR (IMXRT_SNVS.offset008)
  7668. #define SNVS_HPSICR (IMXRT_SNVS.offset00C)
  7669. #define SNVS_HPSVCR (IMXRT_SNVS.offset010)
  7670. #define SNVS_HPSR (IMXRT_SNVS.offset014)
  7671. #define SNVS_HPSVSR (IMXRT_SNVS.offset018)
  7672. #define SNVS_HPHACIVR (IMXRT_SNVS.offset01C)
  7673. #define SNVS_HPHACR (IMXRT_SNVS.offset020)
  7674. #define SNVS_HPRTCMR (IMXRT_SNVS.offset024)
  7675. #define SNVS_HPRTCLR (IMXRT_SNVS.offset028)
  7676. #define SNVS_HPTAMR (IMXRT_SNVS.offset02C)
  7677. #define SNVS_HPTALR (IMXRT_SNVS.offset030)
  7678. #define SNVS_LPLR (IMXRT_SNVS.offset034)
  7679. #define SNVS_LPCR (IMXRT_SNVS.offset038)
  7680. #define SNVS_LPMKCR (IMXRT_SNVS.offset03C)
  7681. #define SNVS_LPSVCR (IMXRT_SNVS.offset040)
  7682. #define SNVS_LPTDCR (IMXRT_SNVS.offset048)
  7683. #define SNVS_LPSR (IMXRT_SNVS.offset04C)
  7684. #define SNVS_LPSRTCMR (IMXRT_SNVS.offset050)
  7685. #define SNVS_LPSRTCLR (IMXRT_SNVS.offset054)
  7686. #define SNVS_LPTAR (IMXRT_SNVS.offset058)
  7687. #define SNVS_LPSMCMR (IMXRT_SNVS.offset05C)
  7688. #define SNVS_LPSMCLR (IMXRT_SNVS.offset060)
  7689. #define SNVS_LPPGDR (IMXRT_SNVS.offset064)
  7690. #define SNVS_LPGPR (IMXRT_SNVS.offset068)
  7691. #define IMXRT_SNVS_b (*(IMXRT_REGISTER32_t *)0x400D4800)
  7692. #define SNVS_HPVIDR1 (IMXRT_SNVS_b.offset3F8)
  7693. #define SNVS_HPVIDR2 (IMXRT_SNVS_b.offset3FC)
  7694. #define SNVS_HPCR_BTN_MASK ((uint32_t)(1 << 27))
  7695. #define SNVS_HPCR_BTN_CONFIG(n) ((uint32_t)(((n) & 0x07) << 24))
  7696. #define SNVS_HPCR_HP_TS ((uint32_t)(1 << 16))
  7697. #define SNVS_HPCR_HPCALB_VAL(n) ((uint32_t)(((n) & 0x1F) << 10))
  7698. #define SNVS_HPCR_HPCALB_EN ((uint32_t)(1 << 8))
  7699. #define SNVS_HPCR_PI_FREQ(n) ((uint32_t)(((n) & 0x0F) << 4))
  7700. #define SNVS_HPCR_PI_EN ((uint32_t)(1 << 3))
  7701. #define SNVS_HPCR_DIS_PI ((uint32_t)(1 << 2))
  7702. #define SNVS_HPCR_HPTA_EN ((uint32_t)(1 << 1))
  7703. #define SNVS_HPCR_RTC_EN ((uint32_t)(1 << 0))
  7704. #define SNVS_DEFAULT_PGD_VALUE (0x41736166U)
  7705. #define SNVS_LPCR_SRTC_ENV ((uint32_t)(1 << 0))
  7706. #define SNVS_LPCR_MC_ENV ((uint32_t)(1 << 2))
  7707. #define SNVS_LPCR_LPWUI_EN ((uint32_t)(1 << 3))
  7708. #define SNVS_LPCR_DP_EN ((uint32_t)(1 << 5))
  7709. #define SNVS_LPCR_TOP ((uint32_t)(1 << 6))
  7710. #define SNVS_LPCR_PWR_GLITCH_EN ((uint32_t)(1 << 7))
  7711. #define SNVS_LPCR_BTN_PRESS_TIME(n) ((uint32_t)(((n) & 0x03) << 16))
  7712. #define SNVS_LPCR_DEBOUNCE(n) ((uint32_t)(((n) & 0x03) << 18))
  7713. #define SNVS_LPCR_ON_TIME(n) ((uint32_t)(((n) & 0x03) << 20))
  7714. #define SNVS_LPCR_PK_EN ((uint32_t)(1 << 22))
  7715. #define SNVS_LPCR_PK_OVERRIDE ((uint32_t)(1 << 23))
  7716. // 51.5: page 2938
  7717. #define IMXRT_SPDIF (*(IMXRT_REGISTER32_t *)0x40380000)
  7718. #define SPDIF_SCR (IMXRT_SPDIF.offset000)
  7719. #define SPDIF_SRCD (IMXRT_SPDIF.offset004)
  7720. #define SPDIF_SRPC (IMXRT_SPDIF.offset008)
  7721. #define SPDIF_SIE (IMXRT_SPDIF.offset00C)
  7722. #define SPDIF_SIS (IMXRT_SPDIF.offset010)
  7723. #define SPDIF_SIC (IMXRT_SPDIF.offset010)
  7724. #define SPDIF_SRL (IMXRT_SPDIF.offset014)
  7725. #define SPDIF_SRR (IMXRT_SPDIF.offset018)
  7726. #define SPDIF_SRCSH (IMXRT_SPDIF.offset01C)
  7727. #define SPDIF_SRCSL (IMXRT_SPDIF.offset020)
  7728. #define SPDIF_SRU (IMXRT_SPDIF.offset024)
  7729. #define SPDIF_SRQ (IMXRT_SPDIF.offset028)
  7730. #define SPDIF_STL (IMXRT_SPDIF.offset02C)
  7731. #define SPDIF_STR (IMXRT_SPDIF.offset030)
  7732. #define SPDIF_STCSCH (IMXRT_SPDIF.offset034)
  7733. #define SPDIF_STCSCL (IMXRT_SPDIF.offset038)
  7734. #define SPDIF_SRFM (IMXRT_SPDIF.offset044)
  7735. #define SPDIF_STC (IMXRT_SPDIF.offset050)
  7736. #define SPDIF_SCR_RXFIFO_CTR ((uint32_t)(1 << 23))
  7737. #define SPDIF_SCR_RXFIFO_OFF_ON ((uint32_t)(1 << 22))
  7738. #define SPDIF_SCR_RXFIFO_RST ((uint32_t)(1 << 21))
  7739. #define SPDIF_SCR_RXFIFOFULL_SEL(n) ((uint32_t)(((n) & 0x03) << 19))
  7740. #define SPDIF_SCR_RXAUTOSYNC ((uint32_t)(1 << 18))
  7741. #define SPDIF_SCR_TXAUTOSYNC ((uint32_t)(1 << 17))
  7742. #define SPDIF_SCR_TXFIFOEMPTY_SEL(n) ((uint32_t)(((n) & 0x03) << 15))
  7743. #define SPDIF_SCR_LOW_POWER ((uint32_t)(1 << 13))
  7744. #define SPDIF_SCR_SOFT_RESET ((uint32_t)(1 << 12))
  7745. #define SPDIF_SCR_TXFIFO_CTRL(n) ((uint32_t)(((n) & 0x03) << 10))
  7746. #define SPDIF_SCR_DMA_RX_EN ((uint32_t)(1 << 9))
  7747. #define SPDIF_SCR_DMA_TX_EN ((uint32_t)(1 << 8))
  7748. #define SPDIF_SCR_VALCTRL ((uint32_t)(1 << 5))
  7749. #define SPDIF_SCR_TXSEL(n) ((uint32_t)(((n) & 0x07) << 2))
  7750. #define SPDIF_SCR_USRC_SEL(n) ((uint32_t)(((n) & 0x03) << 0))
  7751. #define SPDIF_SRCD_USYNCMODE ((uint32_t)(1 << 1))
  7752. #define SPDIF_SRPC_CLKSRC_SEL(n) ((uint32_t)(((n) & 0x0f) << 7))
  7753. #define SPDIF_SRPC_LOCK ((uint32_t)(1 << 6))
  7754. #define SPDIF_SRPC_GAINSEL(n) ((uint32_t)(((n) & 0x07) << 3))
  7755. #define SPDIF_SIE_LOCK ((uint32_t)(1 << 20))
  7756. #define SPDIF_SIE_TXUNOV ((uint32_t)(1 << 19))
  7757. #define SPDIF_SIE_TXRESYN ((uint32_t)(1 << 18))
  7758. #define SPDIF_SIE_CNEW ((uint32_t)(1 << 17))
  7759. #define SPDIF_SIE_VALNOGOOD ((uint32_t)(1 << 16))
  7760. #define SPDIF_SIE_SYMERR ((uint32_t)(1 << 15))
  7761. #define SPDIF_SIE_BITERR ((uint32_t)(1 << 14))
  7762. #define SPDIF_SIE_URXFUL ((uint32_t)(1 << 10))
  7763. #define SPDIF_SIE_URXOV ((uint32_t)(1 << 9))
  7764. #define SPDIF_SIE_QRXFUL ((uint32_t)(1 << 8))
  7765. #define SPDIF_SIE_QRXOV ((uint32_t)(1 << 7))
  7766. #define SPDIF_SIE_UQSYNC ((uint32_t)(1 << 6))
  7767. #define SPDIF_SIE_UQERR ((uint32_t)(1 << 5))
  7768. #define SPDIF_SIE_RXFIFOUNOV ((uint32_t)(1 << 4))
  7769. #define SPDIF_SIE_RXFIFORESYN ((uint32_t)(1 << 3))
  7770. #define SPDIF_SIE_LOCKLOSS ((uint32_t)(1 << 2))
  7771. #define SPDIF_SIE_TXEM ((uint32_t)(1 << 1))
  7772. #define SPDIF_SIE_RXFIFOFUL ((uint32_t)(1 << 0))
  7773. #define SPDIF_SIS_LOCK ((uint32_t)(1 << 20))
  7774. #define SPDIF_SIS_TXUNOV ((uint32_t)(1 << 19))
  7775. #define SPDIF_SIS_TXRESYN ((uint32_t)(1 << 18))
  7776. #define SPDIF_SIS_CNEW ((uint32_t)(1 << 17))
  7777. #define SPDIF_SIS_VALNOGOOD ((uint32_t)(1 << 16))
  7778. #define SPDIF_SIS_SYMERR ((uint32_t)(1 << 15))
  7779. #define SPDIF_SIS_BITERR ((uint32_t)(1 << 14))
  7780. #define SPDIF_SIS_URXFUL ((uint32_t)(1 << 10))
  7781. #define SPDIF_SIS_URXOV ((uint32_t)(1 << 9))
  7782. #define SPDIF_SIS_QRXFUL ((uint32_t)(1 << 8))
  7783. #define SPDIF_SIS_QRXOV ((uint32_t)(1 << 7))
  7784. #define SPDIF_SIS_UQSYNC ((uint32_t)(1 << 6))
  7785. #define SPDIF_SIS_UQERR ((uint32_t)(1 << 5))
  7786. #define SPDIF_SIS_RXFIFOUNOV ((uint32_t)(1 << 4))
  7787. #define SPDIF_SIS_RXFIFORESYN ((uint32_t)(1 << 3))
  7788. #define SPDIF_SIS_LOCKLOSS ((uint32_t)(1 << 2))
  7789. #define SPDIF_SIS_TXEM ((uint32_t)(1 << 1))
  7790. #define SPDIF_SIS_RXFIFOFUL ((uint32_t)(1 << 0))
  7791. #define SPDIF_SIC_LOCK ((uint32_t)(1 << 20))
  7792. #define SPDIF_SIC_TXUNOV ((uint32_t)(1 << 19))
  7793. #define SPDIF_SIC_TXRESYN ((uint32_t)(1 << 18))
  7794. #define SPDIF_SIC_CNEW ((uint32_t)(1 << 17))
  7795. #define SPDIF_SIC_VALNOGOOD ((uint32_t)(1 << 16))
  7796. #define SPDIF_SIC_SYMERR ((uint32_t)(1 << 15))
  7797. #define SPDIF_SIC_BITERR ((uint32_t)(1 << 14))
  7798. #define SPDIF_SIC_URXFUL ((uint32_t)(1 << 10))
  7799. #define SPDIF_SIC_URXOV ((uint32_t)(1 << 9))
  7800. #define SPDIF_SIC_QRXOV ((uint32_t)(1 << 7))
  7801. #define SPDIF_SIC_UQSYNC ((uint32_t)(1 << 6))
  7802. #define SPDIF_SIC_UQERR ((uint32_t)(1 << 5))
  7803. #define SPDIF_SIC_RXFIFOUNOV ((uint32_t)(1 << 4))
  7804. #define SPDIF_SIC_RXFIFORESYN ((uint32_t)(1 << 3))
  7805. #define SPDIF_SIC_LOCKLOSS ((uint32_t)(1 << 2))
  7806. #define SPDIF_STC_SYSCLK_DF(n) ((uint32_t)(((n) & 0x1ff) << 11))
  7807. #define SPDIF_STC_TXCLK_SOURCE(n) ((uint32_t)(((n) & 0x07) << 8))
  7808. #define SPDIF_STC_TX_ALL_CLK_EN ((uint32_t)(1 << 7))
  7809. #define SPDIF_STC_TXCLK_DF(n) ((uint32_t)(((n) & 0x7f) << 0))
  7810. // 52.7: page 2969
  7811. #define IMXRT_SRC (*(IMXRT_REGISTER32_t *)0x400F8000)
  7812. #define SRC_SCR (IMXRT_SRC.offset000)
  7813. #define SRC_SBMR1 (IMXRT_SRC.offset004)
  7814. #define SRC_SRSR (IMXRT_SRC.offset008)
  7815. #define SRC_SBMR2 (IMXRT_SRC.offset01C)
  7816. /*
  7817. These register are used by the ROM code and should not be used by application software
  7818. #define SRC_GPR1 (IMXRT_SRC.offset020)
  7819. #define SRC_GPR2 (IMXRT_SRC.offset024)
  7820. #define SRC_GPR3 (IMXRT_SRC.offset028)
  7821. #define SRC_GPR4 (IMXRT_SRC.offset02C)
  7822. #define SRC_GPR5 (IMXRT_SRC.offset030)
  7823. #define SRC_GPR6 (IMXRT_SRC.offset034)
  7824. #define SRC_GPR7 (IMXRT_SRC.offset038)
  7825. #define SRC_GPR8 (IMXRT_SRC.offset03C)
  7826. #define SRC_GPR9 (IMXRT_SRC.offset040)
  7827. #define SRC_GPR10 (IMXRT_SRC.offset044)
  7828. */
  7829. #define SRC_SCR_MASK_WDOG3_RST(n) ((uint32_t)(((n) & 0x0f) << 28))
  7830. #define SRC_SCR_DBG_RST_MSK_PG ((uint32_t)(1 << 25))
  7831. #define SRC_SCR_CORE0_DBG_RST ((uint32_t)(1 << 17))
  7832. #define SRC_SCR_CORE0_RST ((uint32_t)(1 << 13))
  7833. #define SRC_SCR_MASK_WDOG_RST(n) ((uint32_t)(((n) & 0x0f) << 7))
  7834. #define SRC_SBMR1_BOOT_CFG4(n) ((uint32_t)(((n) & 0xff) << 24))
  7835. #define SRC_SBMR1_BOOT_CFG3(n) ((uint32_t)(((n) & 0xff) << 16))
  7836. #define SRC_SBMR1_BOOT_CFG2(n) ((uint32_t)(((n) & 0xff) << 8))
  7837. #define SRC_SBMR1_BOOT_CFG1(n) ((uint32_t)(((n) & 0xff) << 0))
  7838. #define SRC_SRSR_TEMPSENSE_RST_B ((uint32_t)(1 << 8))
  7839. #define SRC_SRSR_WDOG3_RST_B ((uint32_t)(1 << 7))
  7840. #define SRC_SRSR_JTAG_SW_RST ((uint32_t)(1 << 6))
  7841. #define SRC_SRSR_JTAG_RST_B ((uint32_t)(1 << 5))
  7842. #define SRC_SRSR_WDOG_RST_B ((uint32_t)(1 << 4))
  7843. #define SRC_SRSR_IPP_USER_RESET_B ((uint32_t)(1 << 3))
  7844. #define SRC_SRSR_CSU_RESET_B ((uint32_t)(1 << 2))
  7845. #define SRC_SRSR_LOCKUP_SYSRESETREQ ((uint32_t)(1 << 1))
  7846. #define SRC_SRSR_IPP_RESET_B ((uint32_t)(1 << 0))
  7847. #define SRC_SBMR2_BMOD(n) ((uint32_t)(((n) & 0x03) << 24))
  7848. #define SRC_SBMR2_BT_FUSE_SEL ((uint32_t)(1 << 4))
  7849. #define SRC_SBMR2_DIR_BT_DIS ((uint32_t)(1 << 3))
  7850. #define SRC_SBMR2_SEC_CONFIG(n) ((uint32_t)(((n) & 0x03) << 0))
  7851. // 53.3: page 2986
  7852. #define IMXRT_TEMPMON (*(IMXRT_REGISTER32_t *)0x400D8180)
  7853. #define TEMPMON_TEMPSENSE0 (IMXRT_TEMPMON.offset000)
  7854. #define TEMPMON_TEMPSENSE0_SET (IMXRT_TEMPMON.offset004)
  7855. #define TEMPMON_TEMPSENSE0_CLR (IMXRT_TEMPMON.offset008)
  7856. #define TEMPMON_TEMPSENSE0_TOG (IMXRT_TEMPMON.offset08c)
  7857. #define TEMPMON_TEMPSENSE1 (IMXRT_TEMPMON.offset090)
  7858. #define TEMPMON_TEMPSENSE1_SET (IMXRT_TEMPMON.offset094)
  7859. #define TEMPMON_TEMPSENSE1_CLR (IMXRT_TEMPMON.offset098)
  7860. #define TEMPMON_TEMPSENSE1_TOG (IMXRT_TEMPMON.offset09C)
  7861. #define TEMPMON_TEMPSENSE2 (IMXRT_TEMPMON.offset110)
  7862. #define TEMPMON_TEMPSENSE2_SET (IMXRT_TEMPMON.offset114)
  7863. #define TEMPMON_TEMPSENSE2_CLR (IMXRT_TEMPMON.offset118)
  7864. #define TEMPMON_TEMPSENSE2_TOG (IMXRT_TEMPMON.offset11C)
  7865. #define TEMPMON_CTRL0_ALARM_VALUE(n) ((uint32_t)(((n) & 0x0fff) << 20))
  7866. #define TEMPMON_CTRL0_TEMP_CNT(n) ((uint32_t)(((n) & 0x0fff) << 8))
  7867. #define TEMPMON_CTRL0_FINISHED ((uint32_t)(1 << 2))
  7868. #define TEMPMON_CTRL0_MEASURE_TEMP ((uint32_t)(1 << 1))
  7869. #define TEMPMON_CTRL0_POWER_DOWN ((uint32_t)(1 << 0))
  7870. #define TEMPMON_CTRL1_MEASURE_FREQ(n) ((uint32_t)(((n) & 0xffff) << 0))
  7871. #define TEMPMON_CTRL2_PANIC_ALARM_VALUE(n) ((uint32_t)(((n) & 0x0fff) << 16))
  7872. #define TEMPMON_CTRL2_LOW_ALARM_VALUE(n) ((uint32_t)(((n) & 0x0fff) << 0))
  7873. // 54.3: page 2998
  7874. #define IMXRT_TSC (*(IMXRT_REGISTER32_t *)0x400E0000)
  7875. #define TSC_BASIC_SETTING (IMXRT_TSC.offset000)
  7876. #define TSC_PS_INPUT_BUFFER_ADDR (IMXRT_TSC.offset010)
  7877. #define TSC_FLOW_CONTROL (IMXRT_TSC.offset020)
  7878. #define TSC_MEASEURE_VALUE (IMXRT_TSC.offset030)
  7879. #define TSC_INT_EN (IMXRT_TSC.offset040)
  7880. #define TSC_INT_SIG_EN (IMXRT_TSC.offset050)
  7881. #define TSC_INT_STATUS (IMXRT_TSC.offset060)
  7882. #define TSC_DEBUG_MODE (IMXRT_TSC.offset070)
  7883. #define TSC_DEBUG_MODE2 (IMXRT_TSC.offset080)
  7884. // 55.4.1.1: page 3022
  7885. #define IMXRT_USB1 (*(IMXRT_REGISTER32_t *)0x402E0000)
  7886. #define USB1_ID (IMXRT_USB1.offset000)
  7887. #define USB1_HWGENERAL (IMXRT_USB1.offset004)
  7888. #define USB1_HWHOST (IMXRT_USB1.offset008)
  7889. #define USB1_HWDEVICE (IMXRT_USB1.offset00C)
  7890. #define USB1_HWTXBUF (IMXRT_USB1.offset010)
  7891. #define USB1_HWRXBUF (IMXRT_USB1.offset014)
  7892. #define USB1_GPTIMER0LD (IMXRT_USB1.offset080)
  7893. #define USB1_GPTIMER0CTRL (IMXRT_USB1.offset084)
  7894. #define USB1_GPTIMER1LD (IMXRT_USB1.offset088)
  7895. #define USB1_GPTIMER1CTRL (IMXRT_USB1.offset08C)
  7896. #define USB1_SBUSCFG (IMXRT_USB1.offset090)
  7897. #define USB1_HCIVERSION (IMXRT_USB1.offset100)
  7898. #define USB1_HCSPARAMS (IMXRT_USB1.offset104)
  7899. #define USB1_HCCPARAMS (IMXRT_USB1.offset108)
  7900. #define USB1_DCIVERSION (IMXRT_USB1.offset120)
  7901. #define USB1_DCCPARAMS (IMXRT_USB1.offset124)
  7902. #define USB1_USBCMD (IMXRT_USB1.offset140)
  7903. #define USB1_USBSTS (IMXRT_USB1.offset144)
  7904. #define USB1_USBINTR (IMXRT_USB1.offset148)
  7905. #define USB1_FRINDEX (IMXRT_USB1.offset14C)
  7906. #define USB1_PERIODICLISTBASE (IMXRT_USB1.offset154)
  7907. #define USB1_DEVICEADDR (IMXRT_USB1.offset154)
  7908. #define USB1_ASYNCLISTADDR (IMXRT_USB1.offset158)
  7909. #define USB1_ENDPOINTLISTADDR (IMXRT_USB1.offset158)
  7910. #define USB1_BURSTSIZE (IMXRT_USB1.offset160)
  7911. #define USB1_TXFILLTUNING (IMXRT_USB1.offset164)
  7912. #define USB1_ENDPTNAK (IMXRT_USB1.offset178)
  7913. #define USB1_ENDPTNAKEN (IMXRT_USB1.offset17C)
  7914. #define USB1_CONFIGFLAG (IMXRT_USB1.offset180)
  7915. #define USB1_PORTSC1 (IMXRT_USB1.offset184)
  7916. #define USB1_OTGSC (IMXRT_USB1.offset1A4)
  7917. #define USB1_USBMODE (IMXRT_USB1.offset1A8)
  7918. #define USB1_ENDPTSETUPSTAT (IMXRT_USB1.offset1AC)
  7919. #define USB1_ENDPTPRIME (IMXRT_USB1.offset1B0)
  7920. #define USB1_ENDPTFLUSH (IMXRT_USB1.offset1B4)
  7921. #define USB1_ENDPTSTATUS (IMXRT_USB1.offset1B8)
  7922. #define USB1_ENDPTCOMPLETE (IMXRT_USB1.offset1BC)
  7923. #define USB1_ENDPTCTRL0 (IMXRT_USB1.offset1C0)
  7924. #define USB1_ENDPTCTRL1 (IMXRT_USB1.offset1C4)
  7925. #define USB1_ENDPTCTRL2 (IMXRT_USB1.offset1C8)
  7926. #define USB1_ENDPTCTRL3 (IMXRT_USB1.offset1CC)
  7927. #define USB1_ENDPTCTRL4 (IMXRT_USB1.offset1D0)
  7928. #define USB1_ENDPTCTRL5 (IMXRT_USB1.offset1D4)
  7929. #define USB1_ENDPTCTRL6 (IMXRT_USB1.offset1D8)
  7930. #define USB1_ENDPTCTRL7 (IMXRT_USB1.offset1DC)
  7931. #define IMXRT_USB2 (*(IMXRT_REGISTER32_t *)0x402E0200)
  7932. #define USB2_ID (IMXRT_USB2.offset000)
  7933. #define USB2_HWGENERAL (IMXRT_USB2.offset004)
  7934. #define USB2_HWHOST (IMXRT_USB2.offset008)
  7935. #define USB2_HWDEVICE (IMXRT_USB2.offset00C)
  7936. #define USB2_HWTXBUF (IMXRT_USB2.offset010)
  7937. #define USB2_HWRXBUF (IMXRT_USB2.offset014)
  7938. #define USB2_GPTIMER0LD (IMXRT_USB2.offset080)
  7939. #define USB2_GPTIMER0CTRL (IMXRT_USB2.offset084)
  7940. #define USB2_GPTIMER1LD (IMXRT_USB2.offset088)
  7941. #define USB2_GPTIMER1CTRL (IMXRT_USB2.offset08C)
  7942. #define USB2_SBUSCFG (IMXRT_USB2.offset090)
  7943. #define USB2_HCIVERSION (IMXRT_USB2.offset100)
  7944. #define USB2_HCSPARAMS (IMXRT_USB2.offset104)
  7945. #define USB2_HCCPARAMS (IMXRT_USB2.offset108)
  7946. #define USB2_DCIVERSION (IMXRT_USB2.offset120)
  7947. #define USB2_DCCPARAMS (IMXRT_USB2.offset124)
  7948. #define USB2_USBCMD (IMXRT_USB2.offset140)
  7949. #define USB2_USBSTS (IMXRT_USB2.offset144)
  7950. #define USB2_USBINTR (IMXRT_USB2.offset148)
  7951. #define USB2_FRINDEX (IMXRT_USB2.offset14C)
  7952. #define USB2_PERIODICLISTBASE (IMXRT_USB2.offset154)
  7953. #define USB2_DEVICEADDR (IMXRT_USB2.offset154)
  7954. #define USB2_ASYNCLISTADDR (IMXRT_USB2.offset158)
  7955. #define USB2_ENDPOINTLISTADDR (IMXRT_USB2.offset158)
  7956. #define USB2_BURSTSIZE (IMXRT_USB2.offset160)
  7957. #define USB2_TXFILLTUNING (IMXRT_USB2.offset164)
  7958. #define USB2_ENDPTNAK (IMXRT_USB2.offset178)
  7959. #define USB2_ENDPTNAKEN (IMXRT_USB2.offset17C)
  7960. #define USB2_CONFIGFLAG (IMXRT_USB2.offset180)
  7961. #define USB2_PORTSC1 (IMXRT_USB2.offset184)
  7962. #define USB2_OTGSC (IMXRT_USB2.offset1A4)
  7963. #define USB2_USBMODE (IMXRT_USB2.offset1A8)
  7964. #define USB2_ENDPTSETUPSTAT (IMXRT_USB2.offset1AC)
  7965. #define USB2_ENDPTPRIME (IMXRT_USB2.offset1B0)
  7966. #define USB2_ENDPTFLUSH (IMXRT_USB2.offset1B4)
  7967. #define USB2_ENDPTSTATUS (IMXRT_USB2.offset1B8)
  7968. #define USB2_ENDPTCOMPLETE (IMXRT_USB2.offset1BC)
  7969. #define USB2_ENDPTCTRL0 (IMXRT_USB2.offset1C0)
  7970. #define USB2_ENDPTCTRL1 (IMXRT_USB2.offset1C4)
  7971. #define USB2_ENDPTCTRL2 (IMXRT_USB2.offset1C8)
  7972. #define USB2_ENDPTCTRL3 (IMXRT_USB2.offset1CC)
  7973. #define USB2_ENDPTCTRL4 (IMXRT_USB2.offset1D0)
  7974. #define USB2_ENDPTCTRL5 (IMXRT_USB2.offset1D4)
  7975. #define USB2_ENDPTCTRL6 (IMXRT_USB2.offset1D8)
  7976. #define USB2_ENDPTCTRL7 (IMXRT_USB2.offset1DC)
  7977. #define USB_USBCMD_ITC(n) ((uint32_t)(((n) & 0xFF) << 16))
  7978. #define USB_USBCMD_FS_2 ((uint32_t)(1<<15))
  7979. #define USB_USBCMD_ATDTW ((uint32_t)(1<<14))
  7980. #define USB_USBCMD_SUTW ((uint32_t)(1<<13))
  7981. #define USB_USBCMD_ASPE ((uint32_t)(1<<11))
  7982. #define USB_USBCMD_ASP(n) ((uint32_t)(((n) & 0x03) << 8))
  7983. #define USB_USBCMD_IAA ((uint32_t)(1<<6))
  7984. #define USB_USBCMD_ASE ((uint32_t)(1<<5))
  7985. #define USB_USBCMD_PSE ((uint32_t)(1<<4))
  7986. #define USB_USBCMD_FS_1(n) ((uint32_t)(((n) & 0x03) << 2))
  7987. #define USB_USBCMD_RST ((uint32_t)(1<<1))
  7988. #define USB_USBCMD_RS ((uint32_t)(1<<0))
  7989. #define USB_USBSTS_TI1 ((uint32_t)(1<<25))
  7990. #define USB_USBSTS_TI0 ((uint32_t)(1<<24))
  7991. #define USB_USBSTS_NAKI ((uint32_t)(1<<16))
  7992. #define USB_USBSTS_AS ((uint32_t)(1<<15))
  7993. #define USB_USBSTS_PS ((uint32_t)(1<<14))
  7994. #define USB_USBSTS_RCL ((uint32_t)(1<<13))
  7995. #define USB_USBSTS_HCH ((uint32_t)(1<<12))
  7996. #define USB_USBSTS_ULPII ((uint32_t)(1<<10))
  7997. #define USB_USBSTS_SLI ((uint32_t)(1<<8))
  7998. #define USB_USBSTS_SRI ((uint32_t)(1<<7))
  7999. #define USB_USBSTS_URI ((uint32_t)(1<<6))
  8000. #define USB_USBSTS_AAI ((uint32_t)(1<<5))
  8001. #define USB_USBSTS_SEI ((uint32_t)(1<<4))
  8002. #define USB_USBSTS_FRI ((uint32_t)(1<<3))
  8003. #define USB_USBSTS_PCI ((uint32_t)(1<<2))
  8004. #define USB_USBSTS_UEI ((uint32_t)(1<<1))
  8005. #define USB_USBSTS_UI ((uint32_t)(1<<0))
  8006. #define USB_USBINTR_TIE1 ((uint32_t)(1<<25))
  8007. #define USB_USBINTR_TIE0 ((uint32_t)(1<<24))
  8008. #define USB_USBINTR_UPIE ((uint32_t)(1<<19))
  8009. #define USB_USBINTR_UAIE ((uint32_t)(1<<18))
  8010. #define USB_USBINTR_NAKE ((uint32_t)(1<<16))
  8011. #define USB_USBINTR_ULPIE ((uint32_t)(1<<10))
  8012. #define USB_USBINTR_SLE ((uint32_t)(1<<8))
  8013. #define USB_USBINTR_SRE ((uint32_t)(1<<7))
  8014. #define USB_USBINTR_URE ((uint32_t)(1<<6))
  8015. #define USB_USBINTR_AAE ((uint32_t)(1<<5))
  8016. #define USB_USBINTR_SEE ((uint32_t)(1<<4))
  8017. #define USB_USBINTR_FRE ((uint32_t)(1<<3))
  8018. #define USB_USBINTR_PCE ((uint32_t)(1<<2))
  8019. #define USB_USBINTR_UEE ((uint32_t)(1<<1))
  8020. #define USB_USBINTR_UE ((uint32_t)(1<<0))
  8021. #define USB_DEVICEADDR_USBADR(n) ((uint32_t)(((n) & 0x7F) << 25))
  8022. #define USB_DEVICEADDR_USBADRA ((uint32_t)(1<<24))
  8023. #define USB_PORTSC1_PTS_1(n) ((uint32_t)(((n) & 0x03) << 30))
  8024. #define USB_PORTSC1_STS ((uint32_t)(1<<29))
  8025. #define USB_PORTSC1_PTW ((uint32_t)(1<<28))
  8026. #define USB_PORTSC1_PSPD(n) ((uint32_t)(((n) & 0x03) << 26))
  8027. #define USB_PORTSC1_PTS_2 ((uint32_t)(1<<25))
  8028. #define USB_PORTSC1_PFSC ((uint32_t)(1<<24))
  8029. #define USB_PORTSC1_PHCD ((uint32_t)(1<<23))
  8030. #define USB_PORTSC1_WKOC ((uint32_t)(1<<22))
  8031. #define USB_PORTSC1_WKDC ((uint32_t)(1<<21))
  8032. #define USB_PORTSC1_WKCN ((uint32_t)(1<<20))
  8033. #define USB_PORTSC1_PTC(n) ((uint32_t)(((n) & 0x0F) << 16))
  8034. #define USB_PORTSC1_PIC(n) ((uint32_t)(((n) & 0x03) << 14))
  8035. #define USB_PORTSC1_PO ((uint32_t)(1<<13))
  8036. #define USB_PORTSC1_PP ((uint32_t)(1<<12))
  8037. #define USB_PORTSC1_LS(n) ((uint32_t)(((n) & 0x03) << 10))
  8038. #define USB_PORTSC1_HSP ((uint32_t)(1<<9))
  8039. #define USB_PORTSC1_PR ((uint32_t)(1<<8))
  8040. #define USB_PORTSC1_SUSP ((uint32_t)(1<<7))
  8041. #define USB_PORTSC1_FPR ((uint32_t)(1<<6))
  8042. #define USB_PORTSC1_OCC ((uint32_t)(1<<5))
  8043. #define USB_PORTSC1_OCA ((uint32_t)(1<<4))
  8044. #define USB_PORTSC1_PEC ((uint32_t)(1<<3))
  8045. #define USB_PORTSC1_PE ((uint32_t)(1<<2))
  8046. #define USB_PORTSC1_CSC ((uint32_t)(1<<1))
  8047. #define USB_PORTSC1_CCS ((uint32_t)(1<<0))
  8048. #define USB_USBMODE_SDIS ((uint32_t)(1<<4))
  8049. #define USB_USBMODE_SLOM ((uint32_t)(1<<3))
  8050. #define USB_USBMODE_ES ((uint32_t)(1<<2))
  8051. #define USB_USBMODE_CM(n) ((uint32_t)(((n) & 0x03) << 0))
  8052. #define USB_USBMODE_CM_MASK USB_USBMODE_CM(3)
  8053. #define USB_ENDPTCTRL_TXE ((uint32_t)(1<<23))
  8054. #define USB_ENDPTCTRL_TXR ((uint32_t)(1<<22))
  8055. #define USB_ENDPTCTRL_TXI ((uint32_t)(1<<21))
  8056. #define USB_ENDPTCTRL_TXT(n) ((uint32_t)(((n) & 0x03) << 18))
  8057. #define USB_ENDPTCTRL_TXD ((uint32_t)(1<<17))
  8058. #define USB_ENDPTCTRL_TXS ((uint32_t)(1<<16))
  8059. #define USB_ENDPTCTRL_RXE ((uint32_t)(1<<7))
  8060. #define USB_ENDPTCTRL_RXR ((uint32_t)(1<<6))
  8061. #define USB_ENDPTCTRL_RXI ((uint32_t)(1<<5))
  8062. #define USB_ENDPTCTRL_RXT(n) ((uint32_t)(((n) & 0x03) << 2))
  8063. #define USB_ENDPTCTRL_RXD ((uint32_t)(1<<1))
  8064. #define USB_ENDPTCTRL_RXS ((uint32_t)(1<<0))
  8065. #define USB_GPTIMERCTRL_GPTRUN ((uint32_t)(1<<31))
  8066. #define USB_GPTIMERCTRL_GPTRST ((uint32_t)(1<<30))
  8067. #define USB_GPTIMERCTRL_GPTMODE ((uint32_t)(1<<24))
  8068. #define USB_GPTIMERCTRL_GPTCNT(n) ((uint32_t)(((n) & 0xFFFFFF) << 0))
  8069. // 56.3: page 3283
  8070. #define IMXRT_USBPHY1 (*(IMXRT_REGISTER32_t *)0x400D9000)
  8071. #define USBPHY1_PWD (IMXRT_USBPHY1.offset000)
  8072. #define USBPHY1_PWD_SET (IMXRT_USBPHY1.offset004)
  8073. #define USBPHY1_PWD_CLR (IMXRT_USBPHY1.offset008)
  8074. #define USBPHY1_PWD_TOG (IMXRT_USBPHY1.offset00C)
  8075. #define USBPHY1_TX (IMXRT_USBPHY1.offset010)
  8076. #define USBPHY1_TX_SET (IMXRT_USBPHY1.offset014)
  8077. #define USBPHY1_TX_CLR (IMXRT_USBPHY1.offset018)
  8078. #define USBPHY1_TX_TOG (IMXRT_USBPHY1.offset01C)
  8079. #define USBPHY1_RX (IMXRT_USBPHY1.offset020)
  8080. #define USBPHY1_RX_SET (IMXRT_USBPHY1.offset024)
  8081. #define USBPHY1_RX_CLR (IMXRT_USBPHY1.offset028)
  8082. #define USBPHY1_RX_TOG (IMXRT_USBPHY1.offset02C)
  8083. #define USBPHY1_CTRL (IMXRT_USBPHY1.offset030)
  8084. #define USBPHY1_CTRL_SET (IMXRT_USBPHY1.offset034)
  8085. #define USBPHY1_CTRL_CLR (IMXRT_USBPHY1.offset038)
  8086. #define USBPHY1_CTRL_TOG (IMXRT_USBPHY1.offset03C)
  8087. #define USBPHY1_STATUS (IMXRT_USBPHY1.offset040)
  8088. #define USBPHY1_DEBUG (IMXRT_USBPHY1.offset050)
  8089. #define USBPHY1_DEBUG_SET (IMXRT_USBPHY1.offset054)
  8090. #define USBPHY1_DEBUG_CLR (IMXRT_USBPHY1.offset058)
  8091. #define USBPHY1_DEBUG_TOG (IMXRT_USBPHY1.offset05C)
  8092. #define USBPHY1_DEBUG0_STATUS (IMXRT_USBPHY1.offset060)
  8093. #define USBPHY1_DEBUG1 (IMXRT_USBPHY1.offset070)
  8094. #define USBPHY1_DEBUG1_SET (IMXRT_USBPHY1.offset074)
  8095. #define USBPHY1_DEBUG1_CLR (IMXRT_USBPHY1.offset078)
  8096. #define USBPHY1_DEBUG1_TOG (IMXRT_USBPHY1.offset07C)
  8097. #define USBPHY1_VERSION (IMXRT_USBPHY1.offset080)
  8098. #define IMXRT_USBPHY2 (*(IMXRT_REGISTER32_t *)0x400DA000)
  8099. #define USBPHY2_PWD (IMXRT_USBPHY2.offset000)
  8100. #define USBPHY2_PWD_SET (IMXRT_USBPHY2.offset004)
  8101. #define USBPHY2_PWD_CLR (IMXRT_USBPHY2.offset008)
  8102. #define USBPHY2_PWD_TOG (IMXRT_USBPHY2.offset00C)
  8103. #define USBPHY2_TX (IMXRT_USBPHY2.offset010)
  8104. #define USBPHY2_TX_SET (IMXRT_USBPHY2.offset014)
  8105. #define USBPHY2_TX_CLR (IMXRT_USBPHY2.offset018)
  8106. #define USBPHY2_TX_TOG (IMXRT_USBPHY2.offset01C)
  8107. #define USBPHY2_RX (IMXRT_USBPHY2.offset020)
  8108. #define USBPHY2_RX_SET (IMXRT_USBPHY2.offset024)
  8109. #define USBPHY2_RX_CLR (IMXRT_USBPHY2.offset028)
  8110. #define USBPHY2_RX_TOG (IMXRT_USBPHY2.offset02C)
  8111. #define USBPHY2_CTRL (IMXRT_USBPHY2.offset030)
  8112. #define USBPHY2_CTRL_SET (IMXRT_USBPHY2.offset034)
  8113. #define USBPHY2_CTRL_CLR (IMXRT_USBPHY2.offset038)
  8114. #define USBPHY2_CTRL_TOG (IMXRT_USBPHY2.offset03C)
  8115. #define USBPHY2_STATUS (IMXRT_USBPHY2.offset040)
  8116. #define USBPHY2_DEBUG (IMXRT_USBPHY2.offset050)
  8117. #define USBPHY2_DEBUG_SET (IMXRT_USBPHY2.offset054)
  8118. #define USBPHY2_DEBUG_CLR (IMXRT_USBPHY2.offset058)
  8119. #define USBPHY2_DEBUG_TOG (IMXRT_USBPHY2.offset05C)
  8120. #define USBPHY2_DEBUG0_STATUS (IMXRT_USBPHY2.offset060)
  8121. #define USBPHY2_DEBUG1 (IMXRT_USBPHY2.offset070)
  8122. #define USBPHY2_DEBUG1_SET (IMXRT_USBPHY2.offset074)
  8123. #define USBPHY2_DEBUG1_CLR (IMXRT_USBPHY2.offset078)
  8124. #define USBPHY2_DEBUG1_TOG (IMXRT_USBPHY2.offset07C)
  8125. #define USBPHY2_VERSION (IMXRT_USBPHY2.offset080)
  8126. #define USBPHY_PWD_RXPWDRX ((uint32_t)(1<<20))
  8127. #define USBPHY_PWD_RXPWDDIFF ((uint32_t)(1<<19))
  8128. #define USBPHY_PWD_RXPWD1PT1 ((uint32_t)(1<<18))
  8129. #define USBPHY_PWD_RXPWDENV ((uint32_t)(1<<17))
  8130. #define USBPHY_PWD_TXPWDV2I ((uint32_t)(1<<12))
  8131. #define USBPHY_PWD_TXPWDIBIAS ((uint32_t)(1<<11))
  8132. #define USBPHY_PWD_TXPWDFS ((uint32_t)(1<<10))
  8133. #define USBPHY_TX_USBPHY_TX_EDGECTRL(n) ((uint32_t)(((n) & 0x07) << 26))
  8134. #define USBPHY_TX_TXCAL45DP(n) ((uint32_t)(((n) & 0x0F) << 16))
  8135. #define USBPHY_TX_TXCAL45DN(n) ((uint32_t)(((n) & 0x0F) << 8))
  8136. #define USBPHY_TX_D_CAL(n) ((uint32_t)(((n) & 0x0F) << 0))
  8137. #define USBPHY_RX_RXDBYPASS ((uint32_t)(1<<22))
  8138. #define USBPHY_RX_DISCONADJ(n) ((uint32_t)(((n) & 0x07) << 4))
  8139. #define USBPHY_RX_ENVADJ(n) ((uint32_t)(((n) & 0x07) << 0))
  8140. #define USBPHY_CTRL_SFTRST ((uint32_t)(1<<31))
  8141. #define USBPHY_CTRL_CLKGATE ((uint32_t)(1<<30))
  8142. #define USBPHY_CTRL_UTMI_SUSPENDM ((uint32_t)(1<<29))
  8143. #define USBPHY_CTRL_HOST_FORCE_LS_SE0 ((uint32_t)(1<<28))
  8144. #define USBPHY_CTRL_OTG_ID_VALUE ((uint32_t)(1<<27))
  8145. #define USBPHY_CTRL_FSDLL_RST_EN ((uint32_t)(1<<24))
  8146. #define USBPHY_CTRL_ENVBUSCHG_WKUP ((uint32_t)(1<<23))
  8147. #define USBPHY_CTRL_ENIDCHG_WKUP ((uint32_t)(1<<22))
  8148. #define USBPHY_CTRL_ENDPDMCHG_WKUP ((uint32_t)(1<<21))
  8149. #define USBPHY_CTRL_ENAUTOCLR_PHY_PWD ((uint32_t)(1<<20))
  8150. #define USBPHY_CTRL_ENAUTOCLR_CLKGATE ((uint32_t)(1<<19))
  8151. #define USBPHY_CTRL_ENAUTO_PWRON_PLL ((uint32_t)(1<<18))
  8152. #define USBPHY_CTRL_WAKEUP_IRQ ((uint32_t)(1<<17))
  8153. #define USBPHY_CTRL_ENIRQWAKEUP ((uint32_t)(1<<16))
  8154. #define USBPHY_CTRL_ENUTMILEVEL3 ((uint32_t)(1<<15))
  8155. #define USBPHY_CTRL_ENUTMILEVEL2 ((uint32_t)(1<<14))
  8156. #define USBPHY_CTRL_DATA_ON_LRADC ((uint32_t)(1<<13))
  8157. #define USBPHY_CTRL_DEVPLUGIN_IRQ ((uint32_t)(1<<12))
  8158. #define USBPHY_CTRL_ENIRQDEVPLUGIN ((uint32_t)(1<<11))
  8159. #define USBPHY_CTRL_RESUME_IRQ ((uint32_t)(1<<10))
  8160. #define USBPHY_CTRL_ENIRQRESUMEDETECT ((uint32_t)(1<<9))
  8161. #define USBPHY_CTRL_RESUMEIRQSTICKY ((uint32_t)(1<<8))
  8162. #define USBPHY_CTRL_ENOTGIDDETECT ((uint32_t)(1<<7))
  8163. #define USBPHY_CTRL_OTG_ID_CHG_IRQ ((uint32_t)(1<<6))
  8164. #define USBPHY_CTRL_DEVPLUGIN_POLARITY ((uint32_t)(1<<5))
  8165. #define USBPHY_CTRL_ENDEVPLUGINDETECT ((uint32_t)(1<<4))
  8166. #define USBPHY_CTRL_HOSTDISCONDETECT_IRQ ((uint32_t)(1<<3))
  8167. #define USBPHY_CTRL_ENIRQHOSTDISCON ((uint32_t)(1<<2))
  8168. #define USBPHY_CTRL_ENHOSTDISCONDETECT ((uint32_t)(1<<1))
  8169. #define USBPHY_CTRL_ENOTG_ID_CHG_IRQ ((uint32_t)(1<<0))
  8170. // 57.9.1.1: page 3381
  8171. #define IMXRT_USDHC1 (*(IMXRT_REGISTER32_t *)0x402C0000)
  8172. #define USDHC1_DS_ADDR (IMXRT_USDHC1.offset000)
  8173. #define USDHC1_BLK_ATT (IMXRT_USDHC1.offset004)
  8174. #define USDHC1_CMD_ARG (IMXRT_USDHC1.offset008)
  8175. #define USDHC1_CMD_XFR_TYP (IMXRT_USDHC1.offset00C)
  8176. #define USDHC1_CMD_RSP0 (IMXRT_USDHC1.offset010)
  8177. #define USDHC1_CMD_RSP1 (IMXRT_USDHC1.offset014)
  8178. #define USDHC1_CMD_RSP2 (IMXRT_USDHC1.offset018)
  8179. #define USDHC1_CMD_RSP3 (IMXRT_USDHC1.offset01C)
  8180. #define USDHC1_DATA_BUFF_ACC_PORT (IMXRT_USDHC1.offset020)
  8181. #define USDHC1_PRES_STATE (IMXRT_USDHC1.offset024)
  8182. #define USDHC1_PROT_CTRL (IMXRT_USDHC1.offset028)
  8183. #define USDHC1_SYS_CTRL (IMXRT_USDHC1.offset02C)
  8184. #define USDHC1_INT_STATUS (IMXRT_USDHC1.offset030)
  8185. #define USDHC1_INT_STATUS_EN (IMXRT_USDHC1.offset034)
  8186. #define USDHC1_INT_SIGNAL_EN (IMXRT_USDHC1.offset038)
  8187. #define USDHC1_AUTOCMD12_ERR_STATUS (IMXRT_USDHC1.offset03C)
  8188. #define USDHC1_HOST_CTRL_CAP (IMXRT_USDHC1.offset040)
  8189. #define USDHC1_WTMK_LVL (IMXRT_USDHC1.offset044)
  8190. #define USDHC1_MIX_CTRL (IMXRT_USDHC1.offset048)
  8191. #define USDHC1_FORCE_EVENT (IMXRT_USDHC1.offset050)
  8192. #define USDHC1_ADMA_ERR_STATUS (IMXRT_USDHC1.offset054)
  8193. #define USDHC1_ADMA_SYS_ADDR (IMXRT_USDHC1.offset058)
  8194. #define USDHC1_DLL_CTRL (IMXRT_USDHC1.offset060)
  8195. #define USDHC1_DLL_STATUS (IMXRT_USDHC1.offset064)
  8196. #define USDHC1_CLK_TUNE_CTRL_STATUS (IMXRT_USDHC1.offset068)
  8197. #define USDHC1_VEND_SPEC (IMXRT_USDHC1.offset0C0)
  8198. #define USDHC1_MMC_BOOT (IMXRT_USDHC1.offset0C4)
  8199. #define USDHC1_VEND_SPEC2 (IMXRT_USDHC1.offset0C8)
  8200. #define USDHC1_TUNING_CTRL (IMXRT_USDHC1.offset0CC)
  8201. #define IMXRT_USDHC2 (*(IMXRT_REGISTER32_t *)0x402C4000)
  8202. #define USDHC2_DS_ADDR (IMXRT_USDHC2.offset000)
  8203. #define USDHC2_BLK_ATT (IMXRT_USDHC2.offset004)
  8204. #define USDHC2_CMD_ARG (IMXRT_USDHC2.offset008)
  8205. #define USDHC2_CMD_XFR_TYP (IMXRT_USDHC2.offset00C)
  8206. #define USDHC2_CMD_RSP0 (IMXRT_USDHC2.offset010)
  8207. #define USDHC2_CMD_RSP1 (IMXRT_USDHC2.offset014)
  8208. #define USDHC2_CMD_RSP2 (IMXRT_USDHC2.offset018)
  8209. #define USDHC2_CMD_RSP3 (IMXRT_USDHC2.offset01C)
  8210. #define USDHC2_DATA_BUFF_ACC_PORT (IMXRT_USDHC2.offset020)
  8211. #define USDHC2_PRES_STATE (IMXRT_USDHC2.offset024)
  8212. #define USDHC2_PROT_CTRL (IMXRT_USDHC2.offset028)
  8213. #define USDHC2_SYS_CTRL (IMXRT_USDHC2.offset02C)
  8214. #define USDHC2_INT_STATUS (IMXRT_USDHC2.offset030)
  8215. #define USDHC2_INT_STATUS_EN (IMXRT_USDHC2.offset034)
  8216. #define USDHC2_INT_SIGNAL_EN (IMXRT_USDHC2.offset038)
  8217. #define USDHC2_AUTOCMD12_ERR_STATUS (IMXRT_USDHC2.offset03C)
  8218. #define USDHC2_HOST_CTRL_CAP (IMXRT_USDHC2.offset040)
  8219. #define USDHC2_WTMK_LVL (IMXRT_USDHC2.offset044)
  8220. #define USDHC2_MIX_CTRL (IMXRT_USDHC2.offset048)
  8221. #define USDHC2_FORCE_EVENT (IMXRT_USDHC2.offset050)
  8222. #define USDHC2_ADMA_ERR_STATUS (IMXRT_USDHC2.offset054)
  8223. #define USDHC2_ADMA_SYS_ADDR (IMXRT_USDHC2.offset058)
  8224. #define USDHC2_DLL_CTRL (IMXRT_USDHC2.offset060)
  8225. #define USDHC2_DLL_STATUS (IMXRT_USDHC2.offset064)
  8226. #define USDHC2_CLK_TUNE_CTRL_STATUS (IMXRT_USDHC2.offset068)
  8227. #define USDHC2_VEND_SPEC (IMXRT_USDHC2.offset0C0)
  8228. #define USDHC2_MMC_BOOT (IMXRT_USDHC2.offset0C4)
  8229. #define USDHC2_VEND_SPEC2 (IMXRT_USDHC2.offset0C8)
  8230. #define USDHC2_TUNING_CTRL (IMXRT_USDHC2.offset0CC)
  8231. // 58.7.1.1: page 3461
  8232. #define IMXRT_WDOG1 (*(IMXRT_REGISTER16_t *)0x400B8000)
  8233. #define WDOG1_WCR (IMXRT_WDOG1.offset000)
  8234. #define WDOG1_WSR (IMXRT_WDOG1.offset002)
  8235. #define WDOG1_WRSR (IMXRT_WDOG1.offset004)
  8236. #define WDOG1_WICR (IMXRT_WDOG1.offset006)
  8237. #define WDOG1_WMCR (IMXRT_WDOG1.offset008)
  8238. #define IMXRT_WDOG2 (*(IMXRT_REGISTER16_t *)0x400D0000)
  8239. #define WDOG2_WCR (IMXRT_WDOG2.offset000)
  8240. #define WDOG2_WSR (IMXRT_WDOG2.offset002)
  8241. #define WDOG2_WRSR (IMXRT_WDOG2.offset004)
  8242. #define WDOG2_WICR (IMXRT_WDOG2.offset006)
  8243. #define WDOG2_WMCR (IMXRT_WDOG2.offset008)
  8244. #define WDOG_WCR_WDZST ((uint16_t)(1<<0))
  8245. #define WDOG_WCR_WDBG ((uint16_t)(1<<1))
  8246. #define WDOG_WCR_WDE ((uint16_t)(1<<2))
  8247. #define WDOG_WCR_WDT ((uint16_t)(1<<3))
  8248. #define WDOG_WCR_SRS ((uint16_t)(1<<4))
  8249. #define WDOG_WCR_WDA ((uint16_t)(1<<5))
  8250. #define WDOG_WCR_SRE ((uint16_t)(1<<6))
  8251. #define WDOG_WCR_WDW ((uint16_t)(1<<7))
  8252. #define WDOG_WCR_WT(n) ((uint16_t)(((n) & 0xFF) << 8))
  8253. #define WDOG_WRSR_SFTW ((uint16_t)(1<<0))
  8254. #define WDOG_WRSR_TOUT ((uint16_t)(1<<1))
  8255. #define WDOG_WRSR_POR ((uint16_t)(1<<4))
  8256. // 59.3.1.1: page 3471
  8257. #define IMXRT_WDOG3 (*(IMXRT_REGISTER32_t *)0x400BC000)
  8258. #define WDOG3_CS (IMXRT_WDOG3.offset000)
  8259. #define WDOG3_CNT (IMXRT_WDOG3.offset004)
  8260. #define WDOG3_TOVAL (IMXRT_WDOG3.offset008)
  8261. #define WDOG3_WIN (IMXRT_WDOG3.offset00C)
  8262. #define WDOG_CS_STOP ((uint16_t)(1<<0))
  8263. #define WDOG_CS_WAIT ((uint16_t)(1<<1))
  8264. #define WDOG_CS_DBG ((uint16_t)(1<<2))
  8265. #define WDOG_CS_TST(n) ((uint16_t)(((n) & 0x03) << 3))
  8266. #define WDOG_CS_UPDATE ((uint16_t)(1<<5))
  8267. #define WDOG_CS_INT ((uint16_t)(1<<6))
  8268. #define WDOG_CS_EN ((uint16_t)(1<<7))
  8269. #define WDOG_CS_CLK(n) ((uint16_t)(((n) & 0x03) << 8))
  8270. #define WDOG_CS_RCS ((uint16_t)(1<<10))
  8271. #define WDOG_CS_ULK ((uint16_t)(1<<11))
  8272. #define WDOG_CS_PRES ((uint16_t)(1<<12))
  8273. #define WDOG_CS_CMD32EN ((uint16_t)(1<<13))
  8274. #define WDOG_CS_FLG ((uint16_t)(1<<14))
  8275. #define WDOG_CS_WIN ((uint16_t)(1<<15))
  8276. // 60.4: page 3491
  8277. #define IMXRT_XBARA1 (*(IMXRT_REGISTER16_t *)0x403BC000)
  8278. #define XBARA1_SEL0 (IMXRT_XBARA1.offset000)
  8279. #define XBARA1_SEL1 (IMXRT_XBARA1.offset002)
  8280. #define XBARA1_SEL2 (IMXRT_XBARA1.offset004)
  8281. #define XBARA1_SEL3 (IMXRT_XBARA1.offset006)
  8282. #define XBARA1_SEL4 (IMXRT_XBARA1.offset008)
  8283. #define XBARA1_SEL5 (IMXRT_XBARA1.offset00A)
  8284. #define XBARA1_SEL6 (IMXRT_XBARA1.offset00C)
  8285. #define XBARA1_SEL7 (IMXRT_XBARA1.offset00E)
  8286. #define XBARA1_SEL8 (IMXRT_XBARA1.offset010)
  8287. #define XBARA1_SEL9 (IMXRT_XBARA1.offset012)
  8288. #define XBARA1_SEL10 (IMXRT_XBARA1.offset014)
  8289. #define XBARA1_SEL11 (IMXRT_XBARA1.offset016)
  8290. #define XBARA1_SEL12 (IMXRT_XBARA1.offset018)
  8291. #define XBARA1_SEL13 (IMXRT_XBARA1.offset01A)
  8292. #define XBARA1_SEL14 (IMXRT_XBARA1.offset01C)
  8293. #define XBARA1_SEL15 (IMXRT_XBARA1.offset01E)
  8294. #define XBARA1_SEL16 (IMXRT_XBARA1.offset020)
  8295. #define XBARA1_SEL17 (IMXRT_XBARA1.offset022)
  8296. #define XBARA1_SEL18 (IMXRT_XBARA1.offset024)
  8297. #define XBARA1_SEL19 (IMXRT_XBARA1.offset026)
  8298. #define XBARA1_SEL20 (IMXRT_XBARA1.offset028)
  8299. #define XBARA1_SEL21 (IMXRT_XBARA1.offset02A)
  8300. #define XBARA1_SEL22 (IMXRT_XBARA1.offset02C)
  8301. #define XBARA1_SEL23 (IMXRT_XBARA1.offset02E)
  8302. #define XBARA1_SEL24 (IMXRT_XBARA1.offset030)
  8303. #define XBARA1_SEL25 (IMXRT_XBARA1.offset032)
  8304. #define XBARA1_SEL26 (IMXRT_XBARA1.offset034)
  8305. #define XBARA1_SEL27 (IMXRT_XBARA1.offset036)
  8306. #define XBARA1_SEL28 (IMXRT_XBARA1.offset038)
  8307. #define XBARA1_SEL29 (IMXRT_XBARA1.offset03A)
  8308. #define XBARA1_CTRL0 (IMXRT_XBARA1.offset03C)
  8309. #define XBARA1_CTRL1 (IMXRT_XBARA1.offset03E)
  8310. // 61.3: page 3537
  8311. #define IMXRT_XBARB2 (*(IMXRT_REGISTER16_t *)0x403C0000)
  8312. #define XBARB2_SEL0 (IMXRT_XBARB2.offset000)
  8313. #define XBARB2_SEL1 (IMXRT_XBARB2.offset002)
  8314. #define XBARB2_SEL2 (IMXRT_XBARB2.offset004)
  8315. #define XBARB2_SEL3 (IMXRT_XBARB2.offset006)
  8316. #define XBARB2_SEL4 (IMXRT_XBARB2.offset008)
  8317. #define XBARB2_SEL5 (IMXRT_XBARB2.offset00A)
  8318. #define XBARB2_SEL6 (IMXRT_XBARB2.offset00C)
  8319. #define XBARB2_SEL7 (IMXRT_XBARB2.offset00E)
  8320. #define IMXRT_XBARB3 (*(IMXRT_REGISTER16_t *)0x403C4000)
  8321. #define XBARB3_SEL0 (IMXRT_XBARB3.offset000)
  8322. #define XBARB3_SEL1 (IMXRT_XBARB3.offset002)
  8323. #define XBARB3_SEL2 (IMXRT_XBARB3.offset004)
  8324. #define XBARB3_SEL3 (IMXRT_XBARB3.offset006)
  8325. #define XBARB3_SEL4 (IMXRT_XBARB3.offset008)
  8326. #define XBARB3_SEL5 (IMXRT_XBARB3.offset00A)
  8327. #define XBARB3_SEL6 (IMXRT_XBARB3.offset00C)
  8328. #define XBARB3_SEL7 (IMXRT_XBARB3.offset00E)
  8329. // XBAR1 Inputs and Outputs Table 3-4 Starting Page 62
  8330. #define XBARA1_IN_LOGIC_LOW 0
  8331. #define XBARA1_IN_LOGIC_HIGH 1
  8332. #define XBARA1_IN_IOMUX_XBAR_IN02 2
  8333. #define XBARA1_IN_IOMUX_XBAR_IN03 3
  8334. #define XBARA1_IN_IOMUX_XBAR_INOUT04 4
  8335. #define XBARA1_IN_IOMUX_XBAR_INOUT05 5
  8336. #define XBARA1_IN_IOMUX_XBAR_INOUT06 6
  8337. #define XBARA1_IN_IOMUX_XBAR_INOUT07 7
  8338. #define XBARA1_IN_IOMUX_XBAR_INOUT08 8
  8339. #define XBARA1_IN_IOMUX_XBAR_INOUT09 9
  8340. #define XBARA1_IN_IOMUX_XBAR_INOUT10 10
  8341. #define XBARA1_IN_IOMUX_XBAR_INOUT11 11
  8342. #define XBARA1_IN_IOMUX_XBAR_INOUT12 12
  8343. #define XBARA1_IN_IOMUX_XBAR_INOUT13 13
  8344. #define XBARA1_IN_IOMUX_XBAR_INOUT14 14
  8345. #define XBARA1_IN_IOMUX_XBAR_INOUT15 15
  8346. #define XBARA1_IN_IOMUX_XBAR_INOUT16 16
  8347. #define XBARA1_IN_IOMUX_XBAR_INOUT17 17
  8348. #define XBARA1_IN_IOMUX_XBAR_INOUT18 18
  8349. #define XBARA1_IN_IOMUX_XBAR_INOUT19 19
  8350. #define XBARA1_IN_IOMUX_XBAR_IN20 20
  8351. #define XBARA1_IN_IOMUX_XBAR_IN21 21
  8352. #define XBARA1_IN_IOMUX_XBAR_IN22 22
  8353. #define XBARA1_IN_IOMUX_XBAR_IN23 23
  8354. #define XBARA1_IN_IOMUX_XBAR_IN24 24
  8355. #define XBARA1_IN_IOMUX_XBAR_IN25 25
  8356. #define XBARA1_IN_ACMP1_OUT 26
  8357. #define XBARA1_IN_ACMP2_OUT 27
  8358. #define XBARA1_IN_ACMP3_OUT 28
  8359. #define XBARA1_IN_ACMP4_OUT 29
  8360. //#define XBARA1_IN_Reserved 30
  8361. //#define XBARA1_IN_Reserved 31
  8362. #define XBARA1_IN_QTIMER3_TIMER0 32
  8363. #define XBARA1_IN_QTIMER3_TIMER1 33
  8364. #define XBARA1_IN_QTIMER3_TIMER2 34
  8365. #define XBARA1_IN_QTIMER3_TIMER3 35
  8366. #define XBARA1_IN_QTIMER4_TIMER0 36
  8367. #define XBARA1_IN_QTIMER4_TIMER1 37
  8368. #define XBARA1_IN_QTIMER4_TIMER2 38
  8369. #define XBARA1_IN_QTIMER4_TIMER3 39
  8370. #define XBARA1_IN_FLEXPWM1_PWM1_OUT_TRIG0 40
  8371. #define XBARA1_IN_FLEXPWM1_PWM1_OUT_TRIG1 40
  8372. #define XBARA1_IN_FLEXPWM1_PWM2_OUT_TRIG0 41
  8373. #define XBARA1_IN_FLEXPWM1_PWM2_OUT_TRIG1 41
  8374. #define XBARA1_IN_FLEXPWM1_PWM3_OUT_TRIG0 42
  8375. #define XBARA1_IN_FLEXPWM1_PWM3_OUT_TRIG1 42
  8376. #define XBARA1_IN_FLEXPWM1_PWM4_OUT_TRIG0 43
  8377. #define XBARA1_IN_FLEXPWM1_PWM4_OUT_TRIG1 43
  8378. #define XBARA1_IN_FLEXPWM2_PWM1_OUT_TRIG0 44
  8379. #define XBARA1_IN_FLEXPWM2_PWM1_OUT_TRIG1 44
  8380. #define XBARA1_IN_FLEXPWM2_PWM2_OUT_TRIG0 45
  8381. #define XBARA1_IN_FLEXPWM2_PWM2_OUT_TRIG1 45
  8382. #define XBARA1_IN_FLEXPWM2_PWM3_OUT_TRIG0 46
  8383. #define XBARA1_IN_FLEXPWM2_PWM3_OUT_TRIG1 46
  8384. #define XBARA1_IN_FLEXPWM2_PWM4_OUT_TRIG0 47
  8385. #define XBARA1_IN_FLEXPWM2_PWM4_OUT_TRIG1 47
  8386. #define XBARA1_IN_FLEXPWM3_PWM1_OUT_TRIG0 48
  8387. #define XBARA1_IN_FLEXPWM3_PWM1_OUT_TRIG1 48
  8388. #define XBARA1_IN_FLEXPWM3_PWM2_OUT_TRIG0 49
  8389. #define XBARA1_IN_FLEXPWM3_PWM2_OUT_TRIG1 49
  8390. #define XBARA1_IN_FLEXPWM3_PWM3_OUT_TRIG0 50
  8391. #define XBARA1_IN_FLEXPWM3_PWM3_OUT_TRIG1 50
  8392. #define XBARA1_IN_FLEXPWM3_PWM4_OUT_TRIG0 51
  8393. #define XBARA1_IN_FLEXPWM3_PWM4_OUT_TRIG1 51
  8394. #define XBARA1_IN_FLEXPWM4_PWM1_OUT_TRIG0 52
  8395. #define XBARA1_IN_FLEXPWM4_PWM1_OUT_TRIG1 52
  8396. #define XBARA1_IN_FLEXPWM4_PWM2_OUT_TRIG0 53
  8397. #define XBARA1_IN_FLEXPWM4_PWM2_OUT_TRIG1 53
  8398. #define XBARA1_IN_FLEXPWM4_PWM3_OUT_TRIG0 54
  8399. #define XBARA1_IN_FLEXPWM4_PWM3_OUT_TRIG1 54
  8400. #define XBARA1_IN_FLEXPWM4_PWM4_OUT_TRIG0 55
  8401. #define XBARA1_IN_FLEXPWM4_PWM4_OUT_TRIG1 55
  8402. #define XBARA1_IN_PIT_TRIGGER0 56
  8403. #define XBARA1_IN_PIT_TRIGGER1 57
  8404. #define XBARA1_IN_PIT_TRIGGER2 58
  8405. #define XBARA1_IN_PIT_TRIGGER3 59
  8406. #define XBARA1_IN_ENC1_POS_MATCH 60
  8407. #define XBARA1_IN_ENC2_POS_MATCH 61
  8408. #define XBARA1_IN_ENC3_POS_MATCH 62
  8409. #define XBARA1_IN_ENC4_POS_MATCH 63
  8410. #define XBARA1_IN_DMA_DONE0 64
  8411. #define XBARA1_IN_DMA_DONE1 65
  8412. #define XBARA1_IN_DMA_DONE2 66
  8413. #define XBARA1_IN_DMA_DONE3 67
  8414. #define XBARA1_IN_DMA_DONE4 68
  8415. #define XBARA1_IN_DMA_DONE5 69
  8416. #define XBARA1_IN_DMA_DONE6 70
  8417. #define XBARA1_IN_DMA_DONE7 71
  8418. #define XBARA1_IN_AOI1_OUT0 72
  8419. #define XBARA1_IN_AOI1_OUT1 73
  8420. #define XBARA1_IN_AOI1_OUT2 74
  8421. #define XBARA1_IN_AOI1_OUT3 75
  8422. #define XBARA1_IN_AOI2_OUT0 76
  8423. #define XBARA1_IN_AOI2_OUT1 77
  8424. #define XBARA1_IN_AOI2_OUT2 78
  8425. #define XBARA1_IN_AOI2_OUT3 79
  8426. #define XBARA1_IN_ADC_ETC0_COCO0 80
  8427. #define XBARA1_IN_ADC_ETC0_COCO1 81
  8428. #define XBARA1_IN_ADC_ETC0_COCO2 82
  8429. #define XBARA1_IN_ADC_ETC0_COCO3 83
  8430. #define XBARA1_IN_ADC_ETC1_COCO0 84
  8431. #define XBARA1_IN_ADC_ETC1_COCO1 85
  8432. #define XBARA1_IN_ADC_ETC1_COCO2 86
  8433. #define XBARA1_IN_ADC_ETC1_COCO3 87
  8434. #define XBARA1_OUT_DMA_CH_MUX_REQ30 0
  8435. #define XBARA1_OUT_DMA_CH_MUX_REQ31 1
  8436. #define XBARA1_OUT_DMA_CH_MUX_REQ94 2
  8437. #define XBARA1_OUT_DMA_CH_MUX_REQ95 3
  8438. #define XBARA1_OUT_IOMUX_XBAR_INOUT04 4
  8439. #define XBARA1_OUT_IOMUX_XBAR_INOUT05 5
  8440. #define XBARA1_OUT_IOMUX_XBAR_INOUT06 6
  8441. #define XBARA1_OUT_IOMUX_XBAR_INOUT07 7
  8442. #define XBARA1_OUT_IOMUX_XBAR_INOUT08 8
  8443. #define XBARA1_OUT_IOMUX_XBAR_INOUT09 9
  8444. #define XBARA1_OUT_IOMUX_XBAR_INOUT10 10
  8445. #define XBARA1_OUT_IOMUX_XBAR_INOUT11 11
  8446. #define XBARA1_OUT_IOMUX_XBAR_INOUT12 12
  8447. #define XBARA1_OUT_IOMUX_XBAR_INOUT13 13
  8448. #define XBARA1_OUT_IOMUX_XBAR_INOUT14 14
  8449. #define XBARA1_OUT_IOMUX_XBAR_INOUT15 15
  8450. #define XBARA1_OUT_IOMUX_XBAR_INOUT16 16
  8451. #define XBARA1_OUT_IOMUX_XBAR_INOUT17 17
  8452. #define XBARA1_OUT_IOMUX_XBAR_INOUT18 18
  8453. #define XBARA1_OUT_IOMUX_XBAR_INOUT19 19
  8454. #define XBARA1_OUT_ACMP1_SAMPLE 20
  8455. #define XBARA1_OUT_ACMP2_SAMPLE 21
  8456. #define XBARA1_OUT_ACMP3_SAMPLE 22
  8457. #define XBARA1_OUT_ACMP4_SAMPLE 23
  8458. //#define XBARA1_OUT_Reserved 24
  8459. //#define XBARA1_OUT_Reserved 25
  8460. #define XBARA1_OUT_FLEXPWM1_PWM0_EXTA 26
  8461. #define XBARA1_OUT_FLEXPWM1_PWM1_EXTA 27
  8462. #define XBARA1_OUT_FLEXPWM1_PWM2_EXTA 28
  8463. #define XBARA1_OUT_FLEXPWM1_PWM3_EXTA 29
  8464. #define XBARA1_OUT_FLEXPWM1_PWM0_EXT_SYNC 30
  8465. #define XBARA1_OUT_FLEXPWM1_PWM1_EXT_SYNC 31
  8466. #define XBARA1_OUT_FLEXPWM1_PWM2_EXT_SYNC 32
  8467. #define XBARA1_OUT_FLEXPWM1_PWM3_EXT_SYNC 33
  8468. #define XBARA1_OUT_FLEXPWM1_EXT_CLK 34
  8469. #define XBARA1_OUT_FLEXPWM1_FAULT0 35
  8470. #define XBARA1_OUT_FLEXPWM1_FAULT1 36
  8471. #define XBARA1_OUT_FLEXPWM1_FAULT2 37
  8472. #define XBARA1_OUT_FLEXPWM2_FAULT2 37
  8473. #define XBARA1_OUT_FLEXPWM3_FAULT2 37
  8474. #define XBARA1_OUT_FLEXPWM4_FAULT2 37
  8475. #define XBARA1_OUT_FLEXPWM1_FAULT3 38
  8476. #define XBARA1_OUT_FLEXPWM2_FAULT3 38
  8477. #define XBARA1_OUT_FLEXPWM3_FAULT3 38
  8478. #define XBARA1_OUT_FLEXPWM4_FAULT3 38
  8479. #define XBARA1_OUT_FLEXPWM1_EXT_FORCE 39
  8480. #define XBARA1_OUT_FLEXPWM2_PWM0_EXTA 40
  8481. #define XBARA1_OUT_FLEXPWM3_PWM0_EXTA 40
  8482. #define XBARA1_OUT_FLEXPWM4_PWM0_EXTA 40
  8483. #define XBARA1_OUT_FLEXPWM2_PWM1_EXTA 41
  8484. #define XBARA1_OUT_FLEXPWM3_PWM1_EXTA 41
  8485. #define XBARA1_OUT_FLEXPWM4_PWM1_EXTA 41
  8486. #define XBARA1_OUT_FLEXPWM2_PWM2_EXTA 42
  8487. #define XBARA1_OUT_FLEXPWM3_PWM2_EXTA 42
  8488. #define XBARA1_OUT_FLEXPWM4_PWM2_EXTA 42
  8489. #define XBARA1_OUT_FLEXPWM2_PWM3_EXTA 43
  8490. #define XBARA1_OUT_FLEXPWM3_PWM3_EXTA 43
  8491. #define XBARA1_OUT_FLEXPWM4_PWM3_EXTA 43
  8492. #define XBARA1_OUT_FLEXPWM2_PWM0_EXT_SYNC 44
  8493. #define XBARA1_OUT_FLEXPWM2_PWM1_EXT_SYNC 45
  8494. #define XBARA1_OUT_FLEXPWM2_PWM2_EXT_SYNC 46
  8495. #define XBARA1_OUT_FLEXPWM2_PWM3_EXT_SYNC 47
  8496. #define XBARA1_OUT_FLEXPWM2_EXT_CLK 48
  8497. #define XBARA1_OUT_FLEXPWM3_EXT_CLK 48
  8498. #define XBARA1_OUT_FLEXPWM4_EXT_CLK 48
  8499. #define XBARA1_OUT_FLEXPWM2_FAULT0 49
  8500. #define XBARA1_OUT_FLEXPWM2_FAULT1 50
  8501. #define XBARA1_OUT_FLEXPWM2_EXT_FORCE 51
  8502. #define XBARA1_OUT_FLEXPWM3_EXT_SYNC0 52
  8503. #define XBARA1_OUT_FLEXPWM3_EXT_SYNC1 53
  8504. #define XBARA1_OUT_FLEXPWM3_EXT_SYNC2 54
  8505. #define XBARA1_OUT_FLEXPWM3_EXT_SYNC3 55
  8506. #define XBARA1_OUT_FLEXPWM3_FAULT0 56
  8507. #define XBARA1_OUT_FLEXPWM3_FAULT1 57
  8508. #define XBARA1_OUT_FLEXPWM3_EXT_FORCE 58
  8509. #define XBARA1_OUT_FLEXPWM4_EXT_SYNC0 59
  8510. #define XBARA1_OUT_FLEXPWM4_EXT_SYNC1 60
  8511. #define XBARA1_OUT_FLEXPWM4_EXT_SYNC2 61
  8512. #define XBARA1_OUT_FLEXPWM4_EXT_SYNC3 62
  8513. #define XBARA1_OUT_FLEXPWM4_FAULT0 63
  8514. #define XBARA1_OUT_FLEXPWM4_FAULT1 64
  8515. #define XBARA1_OUT_FLEXPWM4_EXT_FORCE 65
  8516. #define XBARA1_OUT_ENC1_PHASEA_INPUT 66
  8517. #define XBARA1_OUT_ENC1_PHASEB_INPUT 67
  8518. #define XBARA1_OUT_ENC1_INDEX 68
  8519. #define XBARA1_OUT_ENC1_HOME 69
  8520. #define XBARA1_OUT_ENC1_TRIGGER 70
  8521. #define XBARA1_OUT_ENC2_PHASEA_INPUT 71
  8522. #define XBARA1_OUT_ENC2_PHASEB_INPUT 72
  8523. #define XBARA1_OUT_ENC2_INDEX 73
  8524. #define XBARA1_OUT_ENC2_HOME 74
  8525. #define XBARA1_OUT_ENC2_TRIGGER 75
  8526. #define XBARA1_OUT_ENC3_PHASEA_INPUT 76
  8527. #define XBARA1_OUT_ENC3_PHASEB_INPUT 77
  8528. #define XBARA1_OUT_ENC3_INDEX 78
  8529. #define XBARA1_OUT_ENC3_HOME 79
  8530. #define XBARA1_OUT_ENC3_TRIGGER 80
  8531. #define XBARA1_OUT_ENC4_PHASEA_INPUT 81
  8532. #define XBARA1_OUT_ENC4_PHASEB_INPUT 82
  8533. #define XBARA1_OUT_ENC4_INDEX 83
  8534. #define XBARA1_OUT_ENC4_HOME 84
  8535. #define XBARA1_OUT_ENC4_TRIGGER 85
  8536. #define XBARA1_OUT_QTIMER1_TIMER0 86
  8537. #define XBARA1_OUT_QTIMER1_TIMER1 87
  8538. #define XBARA1_OUT_QTIMER1_TIMER2 88
  8539. #define XBARA1_OUT_QTIMER1_TIMER3 89
  8540. #define XBARA1_OUT_QTIMER2_TIMER0 90
  8541. #define XBARA1_OUT_QTIMER2_TIMER1 91
  8542. #define XBARA1_OUT_QTIMER2_TIMER2 92
  8543. #define XBARA1_OUT_QTIMER2_TIMER3 93
  8544. #define XBARA1_OUT_QTIMER3_TIMER0 94
  8545. #define XBARA1_OUT_QTIMER3_TIMER1 95
  8546. #define XBARA1_OUT_QTIMER3_TIMER2 96
  8547. #define XBARA1_OUT_QTIMER3_TIMER3 97
  8548. #define XBARA1_OUT_QTIMER4_TIMER0 98
  8549. #define XBARA1_OUT_QTIMER4_TIMER1 99
  8550. #define XBARA1_OUT_QTIMER4_TIMER2 100
  8551. #define XBARA1_OUT_QTIMER4_TIMER3 101
  8552. #define XBARA1_OUT_EWM_EWM_IN 102
  8553. #define XBARA1_OUT_ADC_ETC_TRIG00 103
  8554. #define XBARA1_OUT_ADC_ETC_TRIG01 104
  8555. #define XBARA1_OUT_ADC_ETC_TRIG02 105
  8556. #define XBARA1_OUT_ADC_ETC_TRIG03 106
  8557. #define XBARA1_OUT_ADC_ETC_TRIG10 107
  8558. #define XBARA1_OUT_ADC_ETC_TRIG11 108
  8559. #define XBARA1_OUT_ADC_ETC_TRIG12 109
  8560. #define XBARA1_OUT_ADC_ETC_TRIG13 110
  8561. #define XBARA1_OUT_LPI2C1_TRG_INPUT 111
  8562. #define XBARA1_OUT_LPI2C2_TRG_INPUT 112
  8563. #define XBARA1_OUT_LPI2C3_TRG_INPUT 113
  8564. #define XBARA1_OUT_LPI2C4_TRG_INPUT 114
  8565. #define XBARA1_OUT_LPSPI1_TRG_INPUT 115
  8566. #define XBARA1_OUT_LPSPI2_TRG_INPUT 116
  8567. #define XBARA1_OUT_LPSPI3_TRG_INPUT 117
  8568. #define XBARA1_OUT_LPSPI4_TRG_INPUT 118
  8569. #define XBARA1_OUT_LPUART1_TRG_INPUT 119
  8570. #define XBARA1_OUT_LPUART2_TRG_INPUT 120
  8571. #define XBARA1_OUT_LPUART3_TRG_INPUT 121
  8572. #define XBARA1_OUT_LPUART4_TRG_INPUT 122
  8573. #define XBARA1_OUT_LPUART5_TRG_INPUT 123
  8574. #define XBARA1_OUT_LPUART6_TRG_INPUT 124
  8575. #define XBARA1_OUT_LPUART7_TRG_INPUT 125
  8576. #define XBARA1_OUT_LPUART8_TRG_INPUT 126
  8577. #define XBARA1_OUT_FLEXIO1_TRIGGER_IN0 127
  8578. #define XBARA1_OUT_FLEXIO1_TRIGGER_IN1 128
  8579. #define XBARA1_OUT_FLEXIO2_TRIGGER_IN0 129
  8580. #define XBARA1_OUT_FLEXIO2_TRIGGER_IN1 130
  8581. //#define XBARA1_OUT_Reserved 131
  8582. // XBAR2 Inputs and Outputs Table 3-5 P63
  8583. #define XBARB2_IN_LOGIC_LOW 0
  8584. #define XBARB2_IN_LOGIC_HIGH 1
  8585. //#define XBARB2_IN_Reserved 2
  8586. //#define XBARB2_IN_Reserved 3
  8587. //#define XBARB2_IN_Reserved 4
  8588. //#define XBARB2_IN_Reserved 5
  8589. #define XBARB2_IN_ACMP1_OUT 6
  8590. #define XBARB2_IN_ACMP2_OUT 7
  8591. #define XBARB2_IN_ACMP3_OUT 8
  8592. #define XBARB2_IN_ACMP4_OUT 9
  8593. //#define XBARB2_IN_Reserved 10
  8594. //#define XBARB2_IN_Reserved 11
  8595. #define XBARB2_IN_QTIMER3_TIMER0 12
  8596. #define XBARB2_IN_QTIMER3_TIMER1 13
  8597. #define XBARB2_IN_QTIMER3_TIMER2 14
  8598. #define XBARB2_IN_QTIMER3_TIMER3 15
  8599. #define XBARB2_IN_QTIMER4_TIMER0 16
  8600. #define XBARB2_IN_QTIMER4_TIMER1 17
  8601. #define XBARB2_IN_QTIMER4_TIMER2 18
  8602. #define XBARB2_IN_QTIMER4_TIMER3 19
  8603. #define XBARB2_IN_FLEXPWM1_PWM1_OUT_TRIG0 20
  8604. #define XBARB2_IN_FLEXPWM1_PWM1_OUT_TRIG1 20
  8605. #define XBARB2_IN_FLEXPWM1_PWM2_OUT_TRIG0 21
  8606. #define XBARB2_IN_FLEXPWM1_PWM2_OUT_TRIG1 21
  8607. #define XBARB2_IN_FLEXPWM1_PWM3_OUT_TRIG0 22
  8608. #define XBARB2_IN_FLEXPWM1_PWM3_OUT_TRIG1 22
  8609. #define XBARB2_IN_FLEXPWM1_PWM4_OUT_TRIG0 23
  8610. #define XBARB2_IN_FLEXPWM1_PWM4_OUT_TRIG1 23
  8611. #define XBARB2_IN_FLEXPWM2_PWM1_OUT_TRIG0 24
  8612. #define XBARB2_IN_FLEXPWM2_PWM1_OUT_TRIG1 24
  8613. #define XBARB2_IN_FLEXPWM2_PWM2_OUT_TRIG0 25
  8614. #define XBARB2_IN_FLEXPWM2_PWM2_OUT_TRIG1 25
  8615. #define XBARB2_IN_FLEXPWM2_PWM3_OUT_TRIG0 26
  8616. #define XBARB2_IN_FLEXPWM2_PWM3_OUT_TRIG1 26
  8617. #define XBARB2_IN_FLEXPWM2_PWM4_OUT_TRIG0 27
  8618. #define XBARB2_IN_FLEXPWM2_PWM4_OUT_TRIG1 27
  8619. #define XBARB2_IN_FLEXPWM3_PWM1_OUT_TRIG0 28
  8620. #define XBARB2_IN_FLEXPWM3_PWM1_OUT_TRIG1 28
  8621. #define XBARB2_IN_FLEXPWM3_PWM2_OUT_TRIG0 29
  8622. #define XBARB2_IN_FLEXPWM3_PWM2_OUT_TRIG1 29
  8623. #define XBARB2_IN_FLEXPWM3_PWM3_OUT_TRIG0 30
  8624. #define XBARB2_IN_FLEXPWM3_PWM3_OUT_TRIG1 30
  8625. #define XBARB2_IN_FLEXPWM3_PWM4_OUT_TRIG0 31
  8626. #define XBARB2_IN_FLEXPWM3_PWM4_OUT_TRIG1 31
  8627. #define XBARB2_IN_FLEXPWM4_PWM1_OUT_TRIG0 32
  8628. #define XBARB2_IN_FLEXPWM4_PWM1_OUT_TRIG1 32
  8629. #define XBARB2_IN_FLEXPWM4_PWM2_OUT_TRIG0 33
  8630. #define XBARB2_IN_FLEXPWM4_PWM2_OUT_TRIG1 33
  8631. #define XBARB2_IN_FLEXPWM4_PWM3_OUT_TRIG0 34
  8632. #define XBARB2_IN_FLEXPWM4_PWM3_OUT_TRIG1 34
  8633. #define XBARB2_IN_FLEXPWM4_PWM4_OUT_TRIG0 35
  8634. #define XBARB2_IN_FLEXPWM4_PWM4_OUT_TRIG1 35
  8635. #define XBARB2_IN_PIT_TRIGGER0 36
  8636. #define XBARB2_IN_PIT_TRIGGER1 37
  8637. #define XBARB2_IN_ADC_ETC0_COCO0 38
  8638. #define XBARB2_IN_ADC_ETC0_COCO1 39
  8639. #define XBARB2_IN_ADC_ETC0_COCO2 40
  8640. #define XBARB2_IN_ADC_ETC0_COCO3 41
  8641. #define XBARB2_IN_ADC_ETC1_COCO0 42
  8642. #define XBARB2_IN_ADC_ETC1_COCO1 43
  8643. #define XBARB2_IN_ADC_ETC1_COCO2 44
  8644. #define XBARB2_IN_ADC_ETC1_COCO3 45
  8645. #define XBARB2_IN_ENC1_POS_MATCH 46
  8646. #define XBARB2_IN_ENC2_POS_MATCH 47
  8647. #define XBARB2_IN_ENC3_POS_MATCH 48
  8648. #define XBARB2_IN_ENC4_POS_MATCH 49
  8649. #define XBARB2_IN_DMA_DONE0 50
  8650. #define XBARB2_IN_DMA_DONE1 51
  8651. #define XBARB2_IN_DMA_DONE2 52
  8652. #define XBARB2_IN_DMA_DONE3 53
  8653. #define XBARB2_IN_DMA_DONE4 54
  8654. #define XBARB2_IN_DMA_DONE5 55
  8655. #define XBARB2_IN_DMA_DONE6 56
  8656. #define XBARB2_IN_DMA_DONE7 57
  8657. #define XBARB2_OUT_AOI1_IN00 0
  8658. #define XBARB2_OUT_AOI1_IN01 1
  8659. #define XBARB2_OUT_AOI1_IN02 2
  8660. #define XBARB2_OUT_AOI1_IN03 3
  8661. #define XBARB2_OUT_AOI1_IN04 4
  8662. #define XBARB2_OUT_AOI1_IN05 5
  8663. #define XBARB2_OUT_AOI1_IN06 6
  8664. #define XBARB2_OUT_AOI1_IN07 7
  8665. #define XBARB2_OUT_AOI1_IN08 8
  8666. #define XBARB2_OUT_AOI1_IN09 9
  8667. #define XBARB2_OUT_AOI1_IN10 10
  8668. #define XBARB2_OUT_AOI1_IN11 11
  8669. #define XBARB2_OUT_AOI1_IN12 12
  8670. #define XBARB2_OUT_AOI1_IN13 13
  8671. #define XBARB2_OUT_AOI1_IN14 14
  8672. // XBAR3 Inputs and Outputs Table 3-6 Page 63
  8673. #define XBARB3_IN_LOGIC_LOW 0
  8674. #define XBARB3_IN_LOGIC_HIGH 1
  8675. //#define XBARB3_IN_Reserved 2
  8676. //#define XBARB3_IN_Reserved 3
  8677. //#define XBARB3_IN_Reserved 4
  8678. //#define XBARB3_IN_Reserved 5
  8679. #define XBARB3_IN_ACMP1_OUT 6
  8680. #define XBARB3_IN_ACMP2_OUT 7
  8681. #define XBARB3_IN_ACMP3_OUT 8
  8682. #define XBARB3_IN_ACMP4_OUT 9
  8683. //#define XBARB3_IN_Reserved 10
  8684. //#define XBARB3_IN_Reserved 11
  8685. #define XBARB3_IN_QTIMER3_TIMER0 12
  8686. #define XBARB3_IN_QTIMER3_TIMER1 13
  8687. #define XBARB3_IN_QTIMER3_TIMER2 14
  8688. #define XBARB3_IN_QTIMER3_TIMER3 15
  8689. #define XBARB3_IN_QTIMER4_TIMER0 16
  8690. #define XBARB3_IN_QTIMER4_TIMER1 17
  8691. #define XBARB3_IN_QTIMER4_TIMER2 18
  8692. #define XBARB3_IN_QTIMER4_TIMER3 19
  8693. #define XBARB3_IN_FLEXPWM1_PWM1_OUT_TRIG0 20
  8694. #define XBARB3_IN_FLEXPWM1_PWM2_OUT_TRIG0 21
  8695. #define XBARB3_IN_FLEXPWM1_PWM3_OUT_TRIG0 22
  8696. #define XBARB3_IN_FLEXPWM1_PWM4_OUT_TRIG0 23
  8697. #define XBARB3_IN_FLEXPWM2_PWM1_OUT_TRIG0 24
  8698. #define XBARB3_IN_FLEXPWM2_PWM2_OUT_TRIG0 25
  8699. #define XBARB3_IN_FLEXPWM2_PWM3_OUT_TRIG0 26
  8700. #define XBARB3_IN_FLEXPWM2_PWM4_OUT_TRIG0 27
  8701. #define XBARB3_IN_FLEXPWM3_PWM1_OUT_TRIG0 28
  8702. #define XBARB3_IN_FLEXPWM3_PWM2_OUT_TRIG0 29
  8703. #define XBARB3_IN_FLEXPWM3_PWM3_OUT_TRIG0 30
  8704. #define XBARB3_IN_FLEXPWM3_PWM4_OUT_TRIG0 31
  8705. #define XBARB3_IN_FLEXPWM4_PWM1_OUT_TRIG0 32
  8706. #define XBARB3_IN_FLEXPWM4_PWM2_OUT_TRIG0 33
  8707. #define XBARB3_IN_FLEXPWM4_PWM3_OUT_TRIG0 34
  8708. #define XBARB3_IN_FLEXPWM4_PWM4_OUT_TRIG0 35
  8709. #define XBARB3_IN_PIT_TRIGGER0 36
  8710. #define XBARB3_IN_PIT_TRIGGER1 37
  8711. #define XBARB3_IN_ADC_ETC0_COCO0 38
  8712. #define XBARB3_IN_ADC_ETC0_COCO1 39
  8713. #define XBARB3_IN_ADC_ETC0_COCO2 40
  8714. #define XBARB3_IN_ADC_ETC0_COCO3 41
  8715. #define XBARB3_IN_ADC_ETC1_COCO0 42
  8716. #define XBARB3_IN_ADC_ETC1_COCO1 43
  8717. #define XBARB3_IN_ADC_ETC1_COCO2 44
  8718. #define XBARB3_IN_ADC_ETC1_COCO3 45
  8719. #define XBARB3_IN_ENC1_POS_MATCH 46
  8720. #define XBARB3_IN_ENC2_POS_MATCH 47
  8721. #define XBARB3_IN_ENC3_POS_MATCH 48
  8722. #define XBARB3_IN_ENC4_POS_MATCH 49
  8723. #define XBARB3_IN_DMA_DONE0 50
  8724. #define XBARB3_IN_DMA_DONE1 51
  8725. #define XBARB3_IN_DMA_DONE2 52
  8726. #define XBARB3_IN_DMA_DONE3 53
  8727. #define XBARB3_IN_DMA_DONE4 54
  8728. #define XBARB3_IN_DMA_DONE5 55
  8729. #define XBARB3_IN_DMA_DONE6 56
  8730. #define XBARB3_IN_DMA_DONE7 57
  8731. #define XBARB3_OUT_AOI2_IN00 0
  8732. #define XBARB3_OUT_AOI2_IN01 1
  8733. #define XBARB3_OUT_AOI2_IN02 2
  8734. #define XBARB3_OUT_AOI2_IN03 3
  8735. #define XBARB3_OUT_AOI2_IN04 4
  8736. #define XBARB3_OUT_AOI2_IN05 5
  8737. #define XBARB3_OUT_AOI2_IN06 6
  8738. #define XBARB3_OUT_AOI2_IN07 7
  8739. #define XBARB3_OUT_AOI2_IN08 8
  8740. #define XBARB3_OUT_AOI2_IN09 9
  8741. #define XBARB3_OUT_AOI2_IN10 10
  8742. #define XBARB3_OUT_AOI2_IN11 11
  8743. #define XBARB3_OUT_AOI2_IN12 12
  8744. #define XBARB3_OUT_AOI2_IN13 13
  8745. #define XBARB3_OUT_AOI2_IN14 14
  8746. #define XBARB3_OUT_AOI2_IN15 15
  8747. // 62.5: page 3548
  8748. #define IMXRT_XTALOSC24M (*(IMXRT_REGISTER32_t *)0x400D8000)
  8749. #define XTALOSC24M_MISC0 (IMXRT_XTALOSC24M.offset150)
  8750. #define XTALOSC24M_LOWPWR_CTRL (IMXRT_XTALOSC24M.offset270)
  8751. #define XTALOSC24M_LOWPWR_CTRL_SET (IMXRT_XTALOSC24M.offset274)
  8752. #define XTALOSC24M_LOWPWR_CTRL_CLR (IMXRT_XTALOSC24M.offset278)
  8753. #define XTALOSC24M_LOWPWR_CTRL_TOG (IMXRT_XTALOSC24M.offset27C)
  8754. #define XTALOSC24M_OSC_CONFIG0 (IMXRT_XTALOSC24M.offset2A0)
  8755. #define XTALOSC24M_OSC_CONFIG0_SET (IMXRT_XTALOSC24M.offset2A4)
  8756. #define XTALOSC24M_OSC_CONFIG0_CLR (IMXRT_XTALOSC24M.offset2A8)
  8757. #define XTALOSC24M_OSC_CONFIG0_TOG (IMXRT_XTALOSC24M.offset2AC)
  8758. #define XTALOSC24M_OSC_CONFIG1 (IMXRT_XTALOSC24M.offset2B0)
  8759. #define XTALOSC24M_OSC_CONFIG1_SET (IMXRT_XTALOSC24M.offset2B4)
  8760. #define XTALOSC24M_OSC_CONFIG1_CLR (IMXRT_XTALOSC24M.offset2B8)
  8761. #define XTALOSC24M_OSC_CONFIG1_TOG (IMXRT_XTALOSC24M.offset2BC)
  8762. #define XTALOSC24M_OSC_CONFIG2 (IMXRT_XTALOSC24M.offset2C0)
  8763. #define XTALOSC24M_OSC_CONFIG2_SET (IMXRT_XTALOSC24M.offset2C4)
  8764. #define XTALOSC24M_OSC_CONFIG2_CLR (IMXRT_XTALOSC24M.offset2C8)
  8765. #define XTALOSC24M_OSC_CONFIG2_TOG (IMXRT_XTALOSC24M.offset2CC)
  8766. // 0 = highest priority
  8767. // Cortex-M7: 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224,240
  8768. #define NVIC_SET_PRIORITY(irqnum, priority) (*((volatile uint8_t *)0xE000E400 + (irqnum)) = (uint8_t)(priority))
  8769. #define NVIC_GET_PRIORITY(irqnum) (*((uint8_t *)0xE000E400 + (irqnum)))
  8770. #define __disable_irq() __asm__ volatile("CPSID i":::"memory");
  8771. #define __enable_irq() __asm__ volatile("CPSIE i":::"memory");
  8772. // System Control Space (SCS), ARMv7 ref manual, B3.2, page 708
  8773. #define SCB_CPUID (*(const uint32_t *)0xE000ED00) // CPUID Base Register
  8774. #define SCB_ICSR (*(volatile uint32_t *)0xE000ED04) // Interrupt Control and State
  8775. #define SCB_ICSR_NMIPENDSET ((uint32_t)(1<<31))
  8776. #define SCB_ICSR_PENDSVSET ((uint32_t)(1<<28))
  8777. #define SCB_ICSR_PENDSVCLR ((uint32_t)(1<<27))
  8778. #define SCB_ICSR_PENDSTSET ((uint32_t)(1<<26))
  8779. #define SCB_ICSR_PENDSTCLR ((uint32_t)(1<<25))
  8780. #define SCB_ICSR_ISRPREEMPT ((uint32_t)(1<<23))
  8781. #define SCB_ICSR_ISRPENDING ((uint32_t)(1<<22))
  8782. #define SCB_ICSR_RETTOBASE ((uint32_t)(1<<11))
  8783. #define SCB_VTOR (*(volatile uint32_t *)0xE000ED08) // Vector Table Offset
  8784. #define SCB_AIRCR (*(volatile uint32_t *)0xE000ED0C) // Application Interrupt & Reset
  8785. #define SCB_SCR (*(volatile uint32_t *)0xE000ED10) // System Control Register
  8786. #define SCB_SCR_SEVONPEND ((uint8_t)0x10) // Send Event on Pending bit
  8787. #define SCB_SCR_SLEEPDEEP ((uint8_t)0x04) // Sleep or Deep Sleep
  8788. #define SCB_SCR_SLEEPONEXIT ((uint8_t)0x02) // Sleep-on-exit
  8789. #define SCB_CCR (*(volatile uint32_t *)0xE000ED14) // Configuration and Control
  8790. #define SCB_CCR_BP ((uint32_t)(1<<18)) // Branch prediction enable
  8791. #define SCB_CCR_IC ((uint32_t)(1<<17)) // Instruction caches enable
  8792. #define SCB_CCR_DC ((uint32_t)(1<<16))
  8793. #define SCB_CCR_STKALIGN ((uint32_t)(1<<9))
  8794. #define SCB_CCR_BFHFNMIGN ((uint32_t)(1<<8))
  8795. #define SCB_CCR_DIV_0_TRP ((uint32_t)(1<<4))
  8796. #define SCB_CCR_UNALIGN_TRP ((uint32_t)(1<<3))
  8797. #define SCB_CCR_USERSETMPEND ((uint32_t)(1<<1))
  8798. #define SCB_CCR_NONBASETHRDENA ((uint32_t)(1<<0))
  8799. #define SCB_SHPR1 (*(volatile uint32_t *)0xE000ED18) // System Handler Priority 1
  8800. #define SCB_SHPR2 (*(volatile uint32_t *)0xE000ED1C) // System Handler Priority 2
  8801. #define SCB_SHPR3 (*(volatile uint32_t *)0xE000ED20) // System Handler Priority 3
  8802. #define SCB_SHCSR (*(volatile uint32_t *)0xE000ED24) // System Handler Control & State
  8803. #define SCB_CFSR (*(volatile uint32_t *)0xE000ED28) // Configurable Fault Status
  8804. #define SCB_HFSR (*(volatile uint32_t *)0xE000ED2C) // HardFault Status
  8805. #define SCB_DFSR (*(volatile uint32_t *)0xE000ED30) // Debug Fault Status
  8806. #define SCB_MMFAR (*(volatile uint32_t *)0xE000ED34) // MemManage Fault Address
  8807. #define SCB_BFAR (*(volatile uint32_t *)0xE000ED38) // Bus Fault Address
  8808. #define SCB_AFAR (*(volatile uint32_t *)0xE000ED3C) // Aux Fault Address
  8809. #define SCB_ID_PFR0 (*(const uint32_t *)0xE000ED40) // Processor Feature 0
  8810. #define SCB_ID_PFR1 (*(const uint32_t *)0xE000ED44) // Processor Feature 1
  8811. #define SCB_ID_DFR0 (*(const uint32_t *)0xE000ED48) // Debug Feature 0
  8812. #define SCB_ID_AFR0 (*(const uint32_t *)0xE000ED4C) // Auxiliary Feature 0
  8813. #define SCB_ID_MMFR0 (*(const uint32_t *)0xE000ED50) // Memory Model Feature 0
  8814. #define SCB_ID_MMFR1 (*(const uint32_t *)0xE000ED54) // Memory Model Feature 1
  8815. #define SCB_ID_MMFR2 (*(const uint32_t *)0xE000ED58) // Memory Model Feature 2
  8816. #define SCB_ID_MMFR3 (*(const uint32_t *)0xE000ED5C) // Memory Model Feature 3
  8817. #define SCB_ID_ISAR0 (*(const uint32_t *)0xE000ED60) // Instruction Set Attribute 0
  8818. #define SCB_ID_ISAR1 (*(const uint32_t *)0xE000ED64) // Instruction Set Attribute 1
  8819. #define SCB_ID_ISAR2 (*(const uint32_t *)0xE000ED68) // Instruction Set Attribute 2
  8820. #define SCB_ID_ISAR3 (*(const uint32_t *)0xE000ED6C) // Instruction Set Attribute 3
  8821. #define SCB_ID_ISAR4 (*(const uint32_t *)0xE000ED70) // Instruction Set Attribute 4
  8822. #define SCB_ID_CLIDR (*(const uint32_t *)0xE000ED78) // Cache Level ID
  8823. #define SCB_ID_CTR (*(const uint32_t *)0xE000ED7C) // Cache Type
  8824. #define SCB_ID_CCSIDR (*(const uint32_t *)0xE000ED80) // Cache Size ID
  8825. #define SCB_ID_CSSELR (*(volatile uint32_t *)0xE000ED84) // Cache Size Selection
  8826. #define SCB_CPACR (*(volatile uint32_t *)0xE000ED88) // Coprocessor Access Control
  8827. #define SCB_FPCCR (*(volatile uint32_t *)0xE000EF34) // FP Context Control
  8828. #define SCB_FPCAR (*(volatile uint32_t *)0xE000EF38) // FP Context Address
  8829. #define SCB_FPDSCR (*(volatile uint32_t *)0xE000EF3C) // FP Default Status Control
  8830. #define SCB_MVFR0 (*(volatile uint32_t *)0xE000EF40) // Media & FP Feature 0
  8831. #define SCB_MVFR1 (*(volatile uint32_t *)0xE000EF44) // Media & FP Feature 1
  8832. #define SCB_MVFR2 (*(volatile uint32_t *)0xE000EF48) // Media & FP Feature 2
  8833. #define SYST_CSR (*(volatile uint32_t *)0xE000E010) // SysTick Control and Status
  8834. #define SYST_CSR_COUNTFLAG ((uint32_t)(1<<16))
  8835. #define SYST_CSR_CLKSOURCE ((uint32_t)(1<<2))
  8836. #define SYST_CSR_TICKINT ((uint32_t)(1<<1))
  8837. #define SYST_CSR_ENABLE ((uint32_t)(1<<0))
  8838. #define SYST_RVR (*(volatile uint32_t *)0xE000E014) // SysTick Reload Value Register
  8839. #define SYST_CVR (*(volatile uint32_t *)0xE000E018) // SysTick Current Value Register
  8840. #define SYST_CALIB (*(const uint32_t *)0xE000E01C) // SysTick Calibration Value
  8841. // Nested Vectored Interrupt Controller, Table 3-4 & ARMv7 ref, appendix B3.4 (page 750)
  8842. #define NVIC_ISER0 (*(volatile uint32_t *)0xE000E100)
  8843. #define NVIC_ISER1 (*(volatile uint32_t *)0xE000E104)
  8844. #define NVIC_ISER2 (*(volatile uint32_t *)0xE000E108)
  8845. #define NVIC_ISER3 (*(volatile uint32_t *)0xE000E10C)
  8846. #define NVIC_ISER4 (*(volatile uint32_t *)0xE000E110)
  8847. #define NVIC_ICER0 (*(volatile uint32_t *)0xE000E180)
  8848. #define NVIC_ICER1 (*(volatile uint32_t *)0xE000E184)
  8849. #define NVIC_ICER2 (*(volatile uint32_t *)0xE000E188)
  8850. #define NVIC_ICER3 (*(volatile uint32_t *)0xE000E18C)
  8851. #define NVIC_ICER4 (*(volatile uint32_t *)0xE000E190)
  8852. #define NVIC_STIR (*(volatile uint32_t *)0xE000EF00)
  8853. #define NVIC_ENABLE_IRQ(n) (*(&NVIC_ISER0 + ((n) >> 5)) = (1 << ((n) & 31)))
  8854. #define NVIC_DISABLE_IRQ(n) (*(&NVIC_ICER0 + ((n) >> 5)) = (1 << ((n) & 31)))
  8855. #define NVIC_SET_PENDING(n) (*((volatile uint32_t *)0xE000E200 + ((n) >> 5)) = (1 << ((n) & 31)))
  8856. #define NVIC_CLEAR_PENDING(n) (*((volatile uint32_t *)0xE000E280 + ((n) >> 5)) = (1 << ((n) & 31)))
  8857. #define NVIC_IS_ENABLED(n) (*(&NVIC_ISER0 + ((n) >> 5)) & (1 << ((n) & 31)))
  8858. #define NVIC_IS_PENDING(n) (*((volatile uint32_t *)0xE000E200 + ((n) >> 5)) & (1 << ((n) & 31)))
  8859. #define NVIC_IS_ACTIVE(n) (*((volatile uint32_t *)0xE000E300 + ((n) >> 5)) & (1 << ((n) & 31)))
  8860. #define NVIC_TRIGGER_IRQ(n) NVIC_STIR=(n)
  8861. #define ARM_DEMCR (*(volatile uint32_t *)0xE000EDFC) // Debug Exception and Monitor Control
  8862. #define ARM_DEMCR_TRCENA (1 << 24) // Enable debugging & monitoring blocks
  8863. #define ARM_DWT_CTRL (*(volatile uint32_t *)0xE0001000) // DWT control register
  8864. #define ARM_DWT_CTRL_CYCCNTENA (1 << 0) // Enable cycle count
  8865. #define ARM_DWT_CYCCNT (*(volatile uint32_t *)0xE0001004) // Cycle count register
  8866. #define SCB_MPU_TYPE (*(volatile uint32_t *)0xE000ED90) //
  8867. #define SCB_MPU_CTRL (*(volatile uint32_t *)0xE000ED94) //
  8868. #define SCB_MPU_CTRL_PRIVDEFENA ((uint32_t)(1<<2)) // Enables default memory map
  8869. #define SCB_MPU_CTRL_HFNMIENA ((uint32_t)(1<<1)) // Use MPU for HardFault & NMI
  8870. #define SCB_MPU_CTRL_ENABLE ((uint32_t)(1<<0)) // Enables MPU
  8871. #define SCB_MPU_RNR (*(volatile uint32_t *)0xE000ED98) //
  8872. #define SCB_MPU_RBAR (*(volatile uint32_t *)0xE000ED9C) //
  8873. #define SCB_MPU_RBAR_ADDR_MASK ((uint32_t)(0xFFFFFFE0))
  8874. #define SCB_MPU_RBAR_VALID ((uint32_t)(1<<4))
  8875. #define SCB_MPU_RBAR_REGION(n) ((uint32_t)((n) & 15))
  8876. #define SCB_MPU_RASR (*(volatile uint32_t *)0xE000EDA0) // ARM DDI0403E, pg 696
  8877. #define SCB_MPU_RASR_XN ((uint32_t)(1<<28))
  8878. #define SCB_MPU_RASR_AP(n) ((uint32_t)(((n) & 7) << 24))
  8879. #define SCB_MPU_RASR_TEX(n) ((uint32_t)(((n) & 7) << 19))
  8880. #define SCB_MPU_RASR_S ((uint32_t)(1<<18))
  8881. #define SCB_MPU_RASR_C ((uint32_t)(1<<17))
  8882. #define SCB_MPU_RASR_B ((uint32_t)(1<<16))
  8883. #define SCB_MPU_RASR_SRD(n) ((uint32_t)(((n) & 255) << 8))
  8884. #define SCB_MPU_RASR_SIZE(n) ((uint32_t)(((n) & 31) << 1))
  8885. #define SCB_MPU_RASR_ENABLE ((uint32_t)(1<<0))
  8886. #define SCB_MPU_RBAR_A1 (*(volatile uint32_t *)0xE000EDA4) //
  8887. #define SCB_MPU_RASR_A1 (*(volatile uint32_t *)0xE000EDA8) //
  8888. #define SCB_MPU_RBAR_A2 (*(volatile uint32_t *)0xE000EDAC) //
  8889. #define SCB_MPU_RASR_A2 (*(volatile uint32_t *)0xE000EDB0) //
  8890. #define SCB_MPU_RBAR_A3 (*(volatile uint32_t *)0xE000EDB4) //
  8891. #define SCB_MPU_RASR_A3 (*(volatile uint32_t *)0xE000EDB8) //
  8892. #define SCB_CACHE_ICIALLU (*(volatile uint32_t *)0xE000EF50)
  8893. #define SCB_CACHE_ICIMVAU (*(volatile uint32_t *)0xE000EF58)
  8894. #define SCB_CACHE_DCIMVAC (*(volatile uint32_t *)0xE000EF5C)
  8895. #define SCB_CACHE_DCISW (*(volatile uint32_t *)0xE000EF60)
  8896. #define SCB_CACHE_DCCMVAU (*(volatile uint32_t *)0xE000EF64)
  8897. #define SCB_CACHE_DCCMVAC (*(volatile uint32_t *)0xE000EF68)
  8898. #define SCB_CACHE_DCCSW (*(volatile uint32_t *)0xE000EF6C)
  8899. #define SCB_CACHE_DCCIMVAC (*(volatile uint32_t *)0xE000EF70)
  8900. #define SCB_CACHE_DCCISW (*(volatile uint32_t *)0xE000EF74)
  8901. #define SCB_CACHE_BPIALL (*(volatile uint32_t *)0xE000EF78)
  8902. // Flush data from cache to memory
  8903. //
  8904. // Normally arm_dcache_flush() is used when metadata written to memory
  8905. // will be used by a DMA or a bus-master peripheral. Any data in the
  8906. // cache is written to memory. A copy remains in the cache, so this is
  8907. // typically used with special fields you will want to quickly access
  8908. // in the future. For data transmission, use arm_dcache_flush_delete().
  8909. __attribute__((always_inline, unused))
  8910. static inline void arm_dcache_flush(void *addr, uint32_t size)
  8911. {
  8912. uint32_t location = (uint32_t)addr & 0xFFFFFFE0;
  8913. uint32_t end_addr = (uint32_t)addr + size;
  8914. asm("dsb");
  8915. do {
  8916. SCB_CACHE_DCCMVAC = location;
  8917. location += 32;
  8918. } while (location < end_addr);
  8919. asm("dsb");
  8920. asm("isb");
  8921. }
  8922. // Delete data from the cache, without touching memory
  8923. //
  8924. // Normally arm_dcache_delete() is used before receiving data via
  8925. // DMA or from bus-master peripherals which write to memory. You
  8926. // want to delete anything the cache may have stored, so your next
  8927. // read is certain to access the physical memory.
  8928. __attribute__((always_inline, unused))
  8929. static inline void arm_dcache_delete(void *addr, uint32_t size)
  8930. {
  8931. uint32_t location = (uint32_t)addr & 0xFFFFFFE0;
  8932. uint32_t end_addr = (uint32_t)addr + size;
  8933. asm("dsb");
  8934. do {
  8935. SCB_CACHE_DCIMVAC = location;
  8936. location += 32;
  8937. } while (location < end_addr);
  8938. asm("dsb");
  8939. asm("isb");
  8940. }
  8941. // Flush data from cache to memory, and delete it from the cache
  8942. //
  8943. // Normally arm_dcache_flush_delete() is used when transmitting data
  8944. // via DMA or bus-master peripherals which read from memory. You want
  8945. // any cached data written to memory, and then removed from the cache,
  8946. // because you no longer need to access the data after transmission.
  8947. __attribute__((always_inline, unused))
  8948. static inline void arm_dcache_flush_delete(void *addr, uint32_t size)
  8949. {
  8950. uint32_t location = (uint32_t)addr & 0xFFFFFFE0;
  8951. uint32_t end_addr = (uint32_t)addr + size;
  8952. asm("dsb");
  8953. do {
  8954. SCB_CACHE_DCCIMVAC = location;
  8955. location += 32;
  8956. } while (location < end_addr);
  8957. asm("dsb");
  8958. asm("isb");
  8959. }