選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

imxrt.h 480KB

5年前
5年前
5年前
5年前
5年前
5年前
5年前
5年前
6年前
6年前
6年前
6年前
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682
  1. #pragma once
  2. #include <stdint.h>
  3. // Definitions based these documents:
  4. // i.MX RT1060 Reference Manual, Rev. 2, 12/2019 - https://www.pjrc.com/teensy/datasheets.html
  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_ACMP1 = 123,
  131. IRQ_ACMP2 = 124,
  132. IRQ_ACMP3 = 125,
  133. IRQ_ACMP4 = 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. #define DMAMUX_SOURCE_FLEXIO1_REQUEST0 0
  171. #define DMAMUX_SOURCE_FLEXIO1_REQUEST1 0
  172. #define DMAMUX_SOURCE_FLEXIO2_REQUEST0 1
  173. #define DMAMUX_SOURCE_FLEXIO2_REQUEST1 1
  174. #define DMAMUX_SOURCE_LPUART1_TX 2
  175. #define DMAMUX_SOURCE_LPUART1_RX 3
  176. #define DMAMUX_SOURCE_LPUART3_TX 4
  177. #define DMAMUX_SOURCE_LPUART3_RX 5
  178. #define DMAMUX_SOURCE_LPUART5_TX 6
  179. #define DMAMUX_SOURCE_LPUART5_RX 7
  180. #define DMAMUX_SOURCE_LPUART7_TX 8
  181. #define DMAMUX_SOURCE_LPUART7_RX 9
  182. #define DMAMUX_SOURCE_FLEXCAN3 11
  183. #define DMAMUX_SOURCE_CSI 12
  184. #define DMAMUX_SOURCE_LPSPI1_RX 13
  185. #define DMAMUX_SOURCE_LPSPI1_TX 14
  186. #define DMAMUX_SOURCE_LPSPI3_RX 15
  187. #define DMAMUX_SOURCE_LPSPI3_TX 16
  188. #define DMAMUX_SOURCE_LPI2C1 17
  189. #define DMAMUX_SOURCE_LPI2C3 18
  190. #define DMAMUX_SOURCE_SAI1_RX 19
  191. #define DMAMUX_SOURCE_SAI1_TX 20
  192. #define DMAMUX_SOURCE_SAI2_RX 21
  193. #define DMAMUX_SOURCE_SAI2_TX 22
  194. #define DMAMUX_SOURCE_ADC_ETC 23
  195. #define DMAMUX_SOURCE_ADC1 24
  196. #define DMAMUX_SOURCE_ACMP1 25
  197. #define DMAMUX_SOURCE_ACMP3 26
  198. #define DMAMUX_SOURCE_FLEXSPI_RX 28
  199. #define DMAMUX_SOURCE_FLEXSPI_TX 29
  200. #define DMAMUX_SOURCE_XBAR1_0 30
  201. #define DMAMUX_SOURCE_XBAR1_1 31
  202. #define DMAMUX_SOURCE_FLEXPWM1_READ0 32
  203. #define DMAMUX_SOURCE_FLEXPWM1_READ1 33
  204. #define DMAMUX_SOURCE_FLEXPWM1_READ2 34
  205. #define DMAMUX_SOURCE_FLEXPWM1_READ3 35
  206. #define DMAMUX_SOURCE_FLEXPWM1_WRITE0 36
  207. #define DMAMUX_SOURCE_FLEXPWM1_WRITE1 37
  208. #define DMAMUX_SOURCE_FLEXPWM1_WRITE2 38
  209. #define DMAMUX_SOURCE_FLEXPWM1_WRITE3 39
  210. #define DMAMUX_SOURCE_FLEXPWM3_READ0 40
  211. #define DMAMUX_SOURCE_FLEXPWM3_READ1 41
  212. #define DMAMUX_SOURCE_FLEXPWM3_READ2 42
  213. #define DMAMUX_SOURCE_FLEXPWM3_READ3 43
  214. #define DMAMUX_SOURCE_FLEXPWM3_WRITE0 44
  215. #define DMAMUX_SOURCE_FLEXPWM3_WRITE1 45
  216. #define DMAMUX_SOURCE_FLEXPWM3_WRITE2 46
  217. #define DMAMUX_SOURCE_FLEXPWM3_WRITE3 47
  218. #define DMAMUX_SOURCE_QTIMER1_READ0 48
  219. #define DMAMUX_SOURCE_QTIMER1_READ1 49
  220. #define DMAMUX_SOURCE_QTIMER1_READ2 50
  221. #define DMAMUX_SOURCE_QTIMER1_READ3 51
  222. #define DMAMUX_SOURCE_QTIMER1_WRITE0_CMPLD1 52
  223. #define DMAMUX_SOURCE_QTIMER1_WRITE1_CMPLD1 53
  224. #define DMAMUX_SOURCE_QTIMER1_WRITE2_CMPLD1 54
  225. #define DMAMUX_SOURCE_QTIMER1_WRITE3_CMPLD1 55
  226. #define DMAMUX_SOURCE_QTIMER1_WRITE1_CMPLD2 52
  227. #define DMAMUX_SOURCE_QTIMER1_WRITE0_CMPLD2 53
  228. #define DMAMUX_SOURCE_QTIMER1_WRITE3_CMPLD2 54
  229. #define DMAMUX_SOURCE_QTIMER1_WRITE2_CMPLD2 55
  230. #define DMAMUX_SOURCE_QTIMER3_READ0 56
  231. #define DMAMUX_SOURCE_QTIMER3_READ1 57
  232. #define DMAMUX_SOURCE_QTIMER3_READ2 58
  233. #define DMAMUX_SOURCE_QTIMER3_READ3 59
  234. #define DMAMUX_SOURCE_QTIMER3_WRITE0_CMPLD1 56
  235. #define DMAMUX_SOURCE_QTIMER3_WRITE1_CMPLD1 57
  236. #define DMAMUX_SOURCE_QTIMER3_WRITE2_CMPLD1 58
  237. #define DMAMUX_SOURCE_QTIMER3_WRITE3_CMPLD1 59
  238. #define DMAMUX_SOURCE_QTIMER3_WRITE1_CMPLD2 56
  239. #define DMAMUX_SOURCE_QTIMER3_WRITE0_CMPLD2 57
  240. #define DMAMUX_SOURCE_QTIMER3_WRITE3_CMPLD2 58
  241. #define DMAMUX_SOURCE_QTIMER3_WRITE2_CMPLD2 59
  242. #define DMAMUX_SOURCE_FLEXSPI2_RX 60
  243. #define DMAMUX_SOURCE_FLEXSPI2_TX 61
  244. #define DMAMUX_SOURCE_FLEXIO1_REQUEST2 64
  245. #define DMAMUX_SOURCE_FLEXIO1_REQUEST3 64
  246. #define DMAMUX_SOURCE_FLEXIO2_REQUEST2 65
  247. #define DMAMUX_SOURCE_FLEXIO2_REQUEST3 65
  248. #define DMAMUX_SOURCE_LPUART2_TX 66
  249. #define DMAMUX_SOURCE_LPUART2_RX 67
  250. #define DMAMUX_SOURCE_LPUART4_TX 68
  251. #define DMAMUX_SOURCE_LPUART4_RX 69
  252. #define DMAMUX_SOURCE_LPUART6_TX 70
  253. #define DMAMUX_SOURCE_LPUART6_RX 71
  254. #define DMAMUX_SOURCE_LPUART8_TX 72
  255. #define DMAMUX_SOURCE_LPUART8_RX 73
  256. #define DMAMUX_SOURCE_PXP 75
  257. #define DMAMUX_SOURCE_LCDIF 76
  258. #define DMAMUX_SOURCE_LPSPI2_RX 77
  259. #define DMAMUX_SOURCE_LPSPI2_TX 78
  260. #define DMAMUX_SOURCE_LPSPI4_RX 79
  261. #define DMAMUX_SOURCE_LPSPI4_TX 80
  262. #define DMAMUX_SOURCE_LPI2C2 81
  263. #define DMAMUX_SOURCE_LPI2C4 82
  264. #define DMAMUX_SOURCE_SAI3_RX 83
  265. #define DMAMUX_SOURCE_SAI3_TX 84
  266. #define DMAMUX_SOURCE_SPDIF_RX 85
  267. #define DMAMUX_SOURCE_SPDIF_TX 86
  268. #define DMAMUX_SOURCE_ADC2 88
  269. #define DMAMUX_SOURCE_ACMP2 89
  270. #define DMAMUX_SOURCE_ACMP4 90
  271. #define DMAMUX_SOURCE_ENET1_TIMER0 92
  272. #define DMAMUX_SOURCE_ENET1_TIMER1 93
  273. #define DMAMUX_SOURCE_XBAR1_2 94
  274. #define DMAMUX_SOURCE_XBAR1_3 95
  275. #define DMAMUX_SOURCE_FLEXPWM2_READ0 96
  276. #define DMAMUX_SOURCE_FLEXPWM2_READ1 97
  277. #define DMAMUX_SOURCE_FLEXPWM2_READ2 98
  278. #define DMAMUX_SOURCE_FLEXPWM2_READ3 99
  279. #define DMAMUX_SOURCE_FLEXPWM2_WRITE0 100
  280. #define DMAMUX_SOURCE_FLEXPWM2_WRITE1 101
  281. #define DMAMUX_SOURCE_FLEXPWM2_WRITE2 102
  282. #define DMAMUX_SOURCE_FLEXPWM2_WRITE3 103
  283. #define DMAMUX_SOURCE_FLEXPWM4_READ0 104
  284. #define DMAMUX_SOURCE_FLEXPWM4_READ1 105
  285. #define DMAMUX_SOURCE_FLEXPWM4_READ2 106
  286. #define DMAMUX_SOURCE_FLEXPWM4_READ3 107
  287. #define DMAMUX_SOURCE_FLEXPWM4_WRITE0 108
  288. #define DMAMUX_SOURCE_FLEXPWM4_WRITE1 109
  289. #define DMAMUX_SOURCE_FLEXPWM4_WRITE2 110
  290. #define DMAMUX_SOURCE_FLEXPWM4_WRITE3 111
  291. #define DMAMUX_SOURCE_QTIMER2_READ0 112
  292. #define DMAMUX_SOURCE_QTIMER2_READ1 113
  293. #define DMAMUX_SOURCE_QTIMER2_READ2 114
  294. #define DMAMUX_SOURCE_QTIMER2_READ3 115
  295. #define DMAMUX_SOURCE_QTIMER2_WRITE0_CMPLD1 116
  296. #define DMAMUX_SOURCE_QTIMER2_WRITE1_CMPLD1 117
  297. #define DMAMUX_SOURCE_QTIMER2_WRITE2_CMPLD1 118
  298. #define DMAMUX_SOURCE_QTIMER2_WRITE3_CMPLD1 119
  299. #define DMAMUX_SOURCE_QTIMER2_WRITE1_CMPLD2 116
  300. #define DMAMUX_SOURCE_QTIMER2_WRITE0_CMPLD2 117
  301. #define DMAMUX_SOURCE_QTIMER2_WRITE3_CMPLD2 118
  302. #define DMAMUX_SOURCE_QTIMER2_WRITE2_CMPLD2 119
  303. #define DMAMUX_SOURCE_QTIMER4_READ0 120
  304. #define DMAMUX_SOURCE_QTIMER4_READ1 121
  305. #define DMAMUX_SOURCE_QTIMER4_READ2 122
  306. #define DMAMUX_SOURCE_QTIMER4_READ3 123
  307. #define DMAMUX_SOURCE_QTIMER4_WRITE0_CMPLD1 120
  308. #define DMAMUX_SOURCE_QTIMER4_WRITE1_CMPLD1 121
  309. #define DMAMUX_SOURCE_QTIMER4_WRITE2_CMPLD1 122
  310. #define DMAMUX_SOURCE_QTIMER4_WRITE3_CMPLD1 123
  311. #define DMAMUX_SOURCE_QTIMER4_WRITE1_CMPLD2 120
  312. #define DMAMUX_SOURCE_QTIMER4_WRITE0_CMPLD2 121
  313. #define DMAMUX_SOURCE_QTIMER4_WRITE3_CMPLD2 122
  314. #define DMAMUX_SOURCE_QTIMER4_WRITE2_CMPLD2 123
  315. #define DMAMUX_SOURCE_ENET2_TIMER0 124
  316. #define DMAMUX_SOURCE_ENET2_TIMER1 125
  317. #define IMXRT_CMP1_ADDRESS 0x40094000
  318. #define IMXRT_CMP2_ADDRESS 0x40094008
  319. #define IMXRT_CMP3_ADDRESS 0x40094010
  320. #define IMXRT_CMP4_ADDRESS 0x40094018
  321. #define IMXRT_ADC1_ADDRESS 0x400C4000
  322. #define IMXRT_ADC2_ADDRESS 0x400C8000
  323. #define IMXRT_ADC_ETC_ADDRESS 0x403B0000
  324. #define IMXRT_AIPSTZ1_ADDRESS 0x4007C000
  325. #define IMXRT_AIPSTZ2_ADDRESS 0x4017C000
  326. #define IMXRT_AIPSTZ3_ADDRESS 0x4027C000
  327. #define IMXRT_AIPSTZ4_ADDRESS 0x4037C000
  328. #define IMXRT_AOI1_ADDRESS 0x403B4000
  329. #define IMXRT_AOI2_ADDRESS 0x403B8000
  330. #define IMXRT_CCM_ADDRESS 0x400FC000
  331. #define IMXRT_CCM_ANALOG_ADDRESS 0x400D8000
  332. #define IMXRT_CSI_ADDRESS 0x402BC000
  333. #define IMXRT_DCDC_ADDRESS 0x40080000
  334. #define IMXRT_DMAMUX_ADDRESS 0x400EC000
  335. #define IMXRT_DMA_ADDRESS 0x400E8000
  336. #define IMXRT_ENC1_ADDRESS 0x403C8000
  337. #define IMXRT_ENC2_ADDRESS 0x403CC000
  338. #define IMXRT_ENC3_ADDRESS 0x403D0000
  339. #define IMXRT_ENC4_ADDRESS 0x403D4000
  340. #define IMXRT_ENET_ADDRESS 0x402D8000
  341. #define IMXRT_ENET2_ADDRESS 0x402D4000
  342. #define IMXRT_EWM_ADDRESS 0x400B4000
  343. #define IMXRT_FLEXCAN1_ADDRESS 0x401D0000
  344. #define IMXRT_FLEXCAN2_ADDRESS 0x401D4000
  345. #define IMXRT_FLEXCAN3_ADDRESS 0x401D8000
  346. #define IMXRT_FLEXIO1_ADDRESS 0x401AC000
  347. #define IMXRT_FLEXIO2_ADDRESS 0x401B0000
  348. #define IMXRT_FLEXIO3_ADDRESS 0x42020000
  349. #define IMXRT_FLEXPWM1_ADDRESS 0x403DC000
  350. #define IMXRT_FLEXPWM2_ADDRESS 0x403E0000
  351. #define IMXRT_FLEXPWM3_ADDRESS 0x403E4000
  352. #define IMXRT_FLEXPWM4_ADDRESS 0x403E8000
  353. #define IMXRT_FLEXRAM_ADDRESS 0x400B0000
  354. #define IMXRT_FLEXSPI_ADDRESS 0x402A8000
  355. #define IMXRT_FLEXSPI2_ADDRESS 0x402A4000
  356. #define IMXRT_GPC_ADDRESS 0x400F4000
  357. #define IMXRT_GPIO1_ADDRESS 0x401B8000
  358. #define IMXRT_GPIO2_ADDRESS 0x401BC000
  359. #define IMXRT_GPIO3_ADDRESS 0x401C0000
  360. #define IMXRT_GPIO4_ADDRESS 0x401C4000
  361. #define IMXRT_GPIO5_ADDRESS 0x400C0000
  362. #define IMXRT_GPIO6_ADDRESS 0x42000000
  363. #define IMXRT_GPIO7_ADDRESS 0x42004000
  364. #define IMXRT_GPIO8_ADDRESS 0x42008000
  365. #define IMXRT_GPIO9_ADDRESS 0x4200C000
  366. #define IMXRT_GPT1_ADDRESS 0x401EC000
  367. #define IMXRT_GPT2_ADDRESS 0x401F0000
  368. #define IMXRT_IOMUXC_GPR_ADDRESS 0x400AC000
  369. #define IMXRT_IOMUXC_SNVS_ADDRESS 0x400A8000
  370. #define IMXRT_IOMUXC_SNVS_GPR_ADDRESS 0x400A4000
  371. #define IMXRT_IOMUXC_ADDRESS 0x401F8000
  372. #define IMXRT_KPP_ADDRESS 0x401FC000
  373. #define IMXRT_LCDIF_ADDRESS 0x402B8000
  374. #define IMXRT_LPI2C1_ADDRESS 0x403F0000
  375. #define IMXRT_LPI2C2_ADDRESS 0x403F4000
  376. #define IMXRT_LPI2C3_ADDRESS 0x403F8000
  377. #define IMXRT_LPI2C4_ADDRESS 0x403FC000
  378. #define IMXRT_LPSPI1_ADDRESS 0x40394000
  379. #define IMXRT_LPSPI2_ADDRESS 0x40398000
  380. #define IMXRT_LPSPI3_ADDRESS 0x4039C000
  381. #define IMXRT_LPSPI4_ADDRESS 0x403A0000
  382. #define IMXRT_LPUART1_ADDRESS 0x40184000
  383. #define IMXRT_LPUART2_ADDRESS 0x40188000
  384. #define IMXRT_LPUART3_ADDRESS 0x4018C000
  385. #define IMXRT_LPUART4_ADDRESS 0x40190000
  386. #define IMXRT_LPUART5_ADDRESS 0x40194000
  387. #define IMXRT_LPUART6_ADDRESS 0x40198000
  388. #define IMXRT_LPUART7_ADDRESS 0x4019C000
  389. #define IMXRT_LPUART8_ADDRESS 0x401A0000
  390. #define IMXRT_OCOTP_ADDRESS 0x401F4000
  391. #define IMXRT_PIT_ADDRESS 0x40084000
  392. #define IMXRT_PMU_ADDRESS 0x400D8000
  393. #define IMXRT_PXP_ADDRESS 0x402B4000
  394. #define IMXRT_TMR1_ADDRESS 0x401DC000
  395. #define IMXRT_TMR2_ADDRESS 0x401E0000
  396. #define IMXRT_TMR3_ADDRESS 0x401E4000
  397. #define IMXRT_TMR4_ADDRESS 0x401E8000
  398. #define IMXRT_I2S1_ADDRESS 0x40384000
  399. #define IMXRT_I2S2_ADDRESS 0x40388000
  400. #define IMXRT_I2S3_ADDRESS 0x4038C000
  401. #define IMXRT_SEMC_ADDRESS 0x402F0000
  402. #define IMXRT_SNVS_ADDRESS 0x400D4000
  403. #define IMXRT_SPDIF_ADDRESS 0x40380000
  404. #define IMXRT_SRC_ADDRESS 0x400F8000
  405. #define IMXRT_TEMPMON_ADDRESS 0x400D8180
  406. #define IMXRT_TRNG_ADDRESS 0x400CC000
  407. #define IMXRT_TSC_ADDRESS 0x400E0000
  408. #define IMXRT_USB1_ADDRESS 0x402E0000
  409. #define IMXRT_USB2_ADDRESS 0x402E0200
  410. #define IMXRT_USBPHY1_ADDRESS 0x400D9000
  411. #define IMXRT_USBPHY2_ADDRESS 0x400DA000
  412. #define IMXRT_USDHC1_ADDRESS 0x402C0000
  413. #define IMXRT_USDHC2_ADDRESS 0x402C4000
  414. #define IMXRT_WDOG1_ADDRESS 0x400B8000
  415. #define IMXRT_WDOG2_ADDRESS 0x400D0000
  416. #define IMXRT_WDOG3_ADDRESS 0x400BC000
  417. #define IMXRT_XBARA1_ADDRESS 0x403BC000
  418. #define IMXRT_XBARB2_ADDRESS 0x403C0000
  419. #define IMXRT_XBARB3_ADDRESS 0x403C4000
  420. #define IMXRT_XTALOSC24M_ADDRESS 0x400D8000
  421. #ifdef __cplusplus
  422. extern "C" void (* _VectorsRam[NVIC_NUM_INTERRUPTS+16])(void);
  423. static inline void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)) __attribute__((always_inline, unused));
  424. static inline void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)) { _VectorsRam[irq + 16] = function; asm volatile("": : :"memory"); }
  425. #else
  426. extern void (* _VectorsRam[NVIC_NUM_INTERRUPTS+16])(void);
  427. static inline void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) __attribute__((always_inline, unused));
  428. static inline void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) { _VectorsRam[irq + 16] = function; asm volatile("": : :"memory"); }
  429. #endif
  430. typedef struct {
  431. volatile uint32_t offset000;
  432. volatile uint32_t offset004;
  433. volatile uint32_t offset008;
  434. volatile uint32_t offset00C;
  435. volatile uint32_t offset010;
  436. volatile uint32_t offset014;
  437. volatile uint32_t offset018;
  438. volatile uint32_t offset01C;
  439. volatile uint32_t offset020;
  440. volatile uint32_t offset024;
  441. volatile uint32_t offset028;
  442. volatile uint32_t offset02C;
  443. volatile uint32_t offset030;
  444. volatile uint32_t offset034;
  445. volatile uint32_t offset038;
  446. volatile uint32_t offset03C;
  447. volatile uint32_t offset040;
  448. volatile uint32_t offset044;
  449. volatile uint32_t offset048;
  450. volatile uint32_t offset04C;
  451. volatile uint32_t offset050;
  452. volatile uint32_t offset054;
  453. volatile uint32_t offset058;
  454. volatile uint32_t offset05C;
  455. volatile uint32_t offset060;
  456. volatile uint32_t offset064;
  457. volatile uint32_t offset068;
  458. volatile uint32_t offset06C;
  459. volatile uint32_t offset070;
  460. volatile uint32_t offset074;
  461. volatile uint32_t offset078;
  462. volatile uint32_t offset07C;
  463. volatile uint32_t offset080;
  464. volatile uint32_t offset084;
  465. volatile uint32_t offset088;
  466. volatile uint32_t offset08C;
  467. volatile uint32_t offset090;
  468. volatile uint32_t offset094;
  469. volatile uint32_t offset098;
  470. volatile uint32_t offset09C;
  471. volatile uint32_t offset0A0;
  472. volatile uint32_t offset0A4;
  473. volatile uint32_t offset0A8;
  474. volatile uint32_t offset0AC;
  475. volatile uint32_t offset0B0;
  476. volatile uint32_t offset0B4;
  477. volatile uint32_t offset0B8;
  478. volatile uint32_t offset0BC;
  479. volatile uint32_t offset0C0;
  480. volatile uint32_t offset0C4;
  481. volatile uint32_t offset0C8;
  482. volatile uint32_t offset0CC;
  483. volatile uint32_t offset0D0;
  484. volatile uint32_t offset0D4;
  485. volatile uint32_t offset0D8;
  486. volatile uint32_t offset0DC;
  487. volatile uint32_t offset0E0;
  488. volatile uint32_t offset0E4;
  489. volatile uint32_t offset0E8;
  490. volatile uint32_t offset0EC;
  491. volatile uint32_t offset0F0;
  492. volatile uint32_t offset0F4;
  493. volatile uint32_t offset0F8;
  494. volatile uint32_t offset0FC;
  495. volatile uint32_t offset100;
  496. volatile uint32_t offset104;
  497. volatile uint32_t offset108;
  498. volatile uint32_t offset10C;
  499. volatile uint32_t offset110;
  500. volatile uint32_t offset114;
  501. volatile uint32_t offset118;
  502. volatile uint32_t offset11C;
  503. volatile uint32_t offset120;
  504. volatile uint32_t offset124;
  505. volatile uint32_t offset128;
  506. volatile uint32_t offset12C;
  507. volatile uint32_t offset130;
  508. volatile uint32_t offset134;
  509. volatile uint32_t offset138;
  510. volatile uint32_t offset13C;
  511. volatile uint32_t offset140;
  512. volatile uint32_t offset144;
  513. volatile uint32_t offset148;
  514. volatile uint32_t offset14C;
  515. volatile uint32_t offset150;
  516. volatile uint32_t offset154;
  517. volatile uint32_t offset158;
  518. volatile uint32_t offset15C;
  519. volatile uint32_t offset160;
  520. volatile uint32_t offset164;
  521. volatile uint32_t offset168;
  522. volatile uint32_t offset16C;
  523. volatile uint32_t offset170;
  524. volatile uint32_t offset174;
  525. volatile uint32_t offset178;
  526. volatile uint32_t offset17C;
  527. volatile uint32_t offset180;
  528. volatile uint32_t offset184;
  529. volatile uint32_t offset188;
  530. volatile uint32_t offset18C;
  531. volatile uint32_t offset190;
  532. volatile uint32_t offset194;
  533. volatile uint32_t offset198;
  534. volatile uint32_t offset19C;
  535. volatile uint32_t offset1A0;
  536. volatile uint32_t offset1A4;
  537. volatile uint32_t offset1A8;
  538. volatile uint32_t offset1AC;
  539. volatile uint32_t offset1B0;
  540. volatile uint32_t offset1B4;
  541. volatile uint32_t offset1B8;
  542. volatile uint32_t offset1BC;
  543. volatile uint32_t offset1C0;
  544. volatile uint32_t offset1C4;
  545. volatile uint32_t offset1C8;
  546. volatile uint32_t offset1CC;
  547. volatile uint32_t offset1D0;
  548. volatile uint32_t offset1D4;
  549. volatile uint32_t offset1D8;
  550. volatile uint32_t offset1DC;
  551. volatile uint32_t offset1E0;
  552. volatile uint32_t offset1E4;
  553. volatile uint32_t offset1E8;
  554. volatile uint32_t offset1EC;
  555. volatile uint32_t offset1F0;
  556. volatile uint32_t offset1F4;
  557. volatile uint32_t offset1F8;
  558. volatile uint32_t offset1FC;
  559. volatile uint32_t offset200;
  560. volatile uint32_t offset204;
  561. volatile uint32_t offset208;
  562. volatile uint32_t offset20C;
  563. volatile uint32_t offset210;
  564. volatile uint32_t offset214;
  565. volatile uint32_t offset218;
  566. volatile uint32_t offset21C;
  567. volatile uint32_t offset220;
  568. volatile uint32_t offset224;
  569. volatile uint32_t offset228;
  570. volatile uint32_t offset22C;
  571. volatile uint32_t offset230;
  572. volatile uint32_t offset234;
  573. volatile uint32_t offset238;
  574. volatile uint32_t offset23C;
  575. volatile uint32_t offset240;
  576. volatile uint32_t offset244;
  577. volatile uint32_t offset248;
  578. volatile uint32_t offset24C;
  579. volatile uint32_t offset250;
  580. volatile uint32_t offset254;
  581. volatile uint32_t offset258;
  582. volatile uint32_t offset25C;
  583. volatile uint32_t offset260;
  584. volatile uint32_t offset264;
  585. volatile uint32_t offset268;
  586. volatile uint32_t offset26C;
  587. volatile uint32_t offset270;
  588. volatile uint32_t offset274;
  589. volatile uint32_t offset278;
  590. volatile uint32_t offset27C;
  591. volatile uint32_t offset280;
  592. volatile uint32_t offset284;
  593. volatile uint32_t offset288;
  594. volatile uint32_t offset28C;
  595. volatile uint32_t offset290;
  596. volatile uint32_t offset294;
  597. volatile uint32_t offset298;
  598. volatile uint32_t offset29C;
  599. volatile uint32_t offset2A0;
  600. volatile uint32_t offset2A4;
  601. volatile uint32_t offset2A8;
  602. volatile uint32_t offset2AC;
  603. volatile uint32_t offset2B0;
  604. volatile uint32_t offset2B4;
  605. volatile uint32_t offset2B8;
  606. volatile uint32_t offset2BC;
  607. volatile uint32_t offset2C0;
  608. volatile uint32_t offset2C4;
  609. volatile uint32_t offset2C8;
  610. volatile uint32_t offset2CC;
  611. volatile uint32_t offset2D0;
  612. volatile uint32_t offset2D4;
  613. volatile uint32_t offset2D8;
  614. volatile uint32_t offset2DC;
  615. volatile uint32_t offset2E0;
  616. volatile uint32_t offset2E4;
  617. volatile uint32_t offset2E8;
  618. volatile uint32_t offset2EC;
  619. volatile uint32_t offset2F0;
  620. volatile uint32_t offset2F4;
  621. volatile uint32_t offset2F8;
  622. volatile uint32_t offset2FC;
  623. volatile uint32_t offset300;
  624. volatile uint32_t offset304;
  625. volatile uint32_t offset308;
  626. volatile uint32_t offset30C;
  627. volatile uint32_t offset310;
  628. volatile uint32_t offset314;
  629. volatile uint32_t offset318;
  630. volatile uint32_t offset31C;
  631. volatile uint32_t offset320;
  632. volatile uint32_t offset324;
  633. volatile uint32_t offset328;
  634. volatile uint32_t offset32C;
  635. volatile uint32_t offset330;
  636. volatile uint32_t offset334;
  637. volatile uint32_t offset338;
  638. volatile uint32_t offset33C;
  639. volatile uint32_t offset340;
  640. volatile uint32_t offset344;
  641. volatile uint32_t offset348;
  642. volatile uint32_t offset34C;
  643. volatile uint32_t offset350;
  644. volatile uint32_t offset354;
  645. volatile uint32_t offset358;
  646. volatile uint32_t offset35C;
  647. volatile uint32_t offset360;
  648. volatile uint32_t offset364;
  649. volatile uint32_t offset368;
  650. volatile uint32_t offset36C;
  651. volatile uint32_t offset370;
  652. volatile uint32_t offset374;
  653. volatile uint32_t offset378;
  654. volatile uint32_t offset37C;
  655. volatile uint32_t offset380;
  656. volatile uint32_t offset384;
  657. volatile uint32_t offset388;
  658. volatile uint32_t offset38C;
  659. volatile uint32_t offset390;
  660. volatile uint32_t offset394;
  661. volatile uint32_t offset398;
  662. volatile uint32_t offset39C;
  663. volatile uint32_t offset3A0;
  664. volatile uint32_t offset3A4;
  665. volatile uint32_t offset3A8;
  666. volatile uint32_t offset3AC;
  667. volatile uint32_t offset3B0;
  668. volatile uint32_t offset3B4;
  669. volatile uint32_t offset3B8;
  670. volatile uint32_t offset3BC;
  671. volatile uint32_t offset3C0;
  672. volatile uint32_t offset3C4;
  673. volatile uint32_t offset3C8;
  674. volatile uint32_t offset3CC;
  675. volatile uint32_t offset3D0;
  676. volatile uint32_t offset3D4;
  677. volatile uint32_t offset3D8;
  678. volatile uint32_t offset3DC;
  679. volatile uint32_t offset3E0;
  680. volatile uint32_t offset3E4;
  681. volatile uint32_t offset3E8;
  682. volatile uint32_t offset3EC;
  683. volatile uint32_t offset3F0;
  684. volatile uint32_t offset3F4;
  685. volatile uint32_t offset3F8;
  686. volatile uint32_t offset3FC;
  687. } IMXRT_REGISTER32_t;
  688. typedef struct {
  689. volatile uint16_t offset000;
  690. volatile uint16_t offset002;
  691. volatile uint16_t offset004;
  692. volatile uint16_t offset006;
  693. volatile uint16_t offset008;
  694. volatile uint16_t offset00A;
  695. volatile uint16_t offset00C;
  696. volatile uint16_t offset00E;
  697. volatile uint16_t offset010;
  698. volatile uint16_t offset012;
  699. volatile uint16_t offset014;
  700. volatile uint16_t offset016;
  701. volatile uint16_t offset018;
  702. volatile uint16_t offset01A;
  703. volatile uint16_t offset01C;
  704. volatile uint16_t offset01E;
  705. volatile uint16_t offset020;
  706. volatile uint16_t offset022;
  707. volatile uint16_t offset024;
  708. volatile uint16_t offset026;
  709. volatile uint16_t offset028;
  710. volatile uint16_t offset02A;
  711. volatile uint16_t offset02C;
  712. volatile uint16_t offset02E;
  713. volatile uint16_t offset030;
  714. volatile uint16_t offset032;
  715. volatile uint16_t offset034;
  716. volatile uint16_t offset036;
  717. volatile uint16_t offset038;
  718. volatile uint16_t offset03A;
  719. volatile uint16_t offset03C;
  720. volatile uint16_t offset03E;
  721. volatile uint16_t offset040;
  722. volatile uint16_t offset042;
  723. volatile uint16_t offset044;
  724. volatile uint16_t offset046;
  725. volatile uint16_t offset048;
  726. volatile uint16_t offset04A;
  727. volatile uint16_t offset04C;
  728. volatile uint16_t offset04E;
  729. volatile uint16_t offset050;
  730. volatile uint16_t offset052;
  731. volatile uint16_t offset054;
  732. volatile uint16_t offset056;
  733. volatile uint16_t offset058;
  734. volatile uint16_t offset05A;
  735. volatile uint16_t offset05C;
  736. volatile uint16_t offset05E;
  737. volatile uint16_t offset060;
  738. volatile uint16_t offset062;
  739. volatile uint16_t offset064;
  740. volatile uint16_t offset066;
  741. volatile uint16_t offset068;
  742. volatile uint16_t offset06A;
  743. volatile uint16_t offset06C;
  744. volatile uint16_t offset06E;
  745. volatile uint16_t offset070;
  746. volatile uint16_t offset072;
  747. volatile uint16_t offset074;
  748. volatile uint16_t offset076;
  749. volatile uint16_t offset078;
  750. volatile uint16_t offset07A;
  751. volatile uint16_t offset07C;
  752. volatile uint16_t offset07E;
  753. volatile uint16_t offset080;
  754. volatile uint16_t offset082;
  755. volatile uint16_t offset084;
  756. volatile uint16_t offset086;
  757. volatile uint16_t offset088;
  758. volatile uint16_t offset08A;
  759. volatile uint16_t offset08C;
  760. volatile uint16_t offset08E;
  761. volatile uint16_t offset090;
  762. volatile uint16_t offset092;
  763. volatile uint16_t offset094;
  764. volatile uint16_t offset096;
  765. volatile uint16_t offset098;
  766. volatile uint16_t offset09A;
  767. volatile uint16_t offset09C;
  768. volatile uint16_t offset09E;
  769. volatile uint16_t offset0A0;
  770. volatile uint16_t offset0A2;
  771. volatile uint16_t offset0A4;
  772. volatile uint16_t offset0A6;
  773. volatile uint16_t offset0A8;
  774. volatile uint16_t offset0AA;
  775. volatile uint16_t offset0AC;
  776. volatile uint16_t offset0AE;
  777. volatile uint16_t offset0B0;
  778. volatile uint16_t offset0B2;
  779. volatile uint16_t offset0B4;
  780. volatile uint16_t offset0B6;
  781. volatile uint16_t offset0B8;
  782. volatile uint16_t offset0BA;
  783. volatile uint16_t offset0BC;
  784. volatile uint16_t offset0BE;
  785. volatile uint16_t offset0C0;
  786. volatile uint16_t offset0C2;
  787. volatile uint16_t offset0C4;
  788. volatile uint16_t offset0C6;
  789. volatile uint16_t offset0C8;
  790. volatile uint16_t offset0CA;
  791. volatile uint16_t offset0CC;
  792. volatile uint16_t offset0CE;
  793. volatile uint16_t offset0D0;
  794. volatile uint16_t offset0D2;
  795. volatile uint16_t offset0D4;
  796. volatile uint16_t offset0D6;
  797. volatile uint16_t offset0D8;
  798. volatile uint16_t offset0DA;
  799. volatile uint16_t offset0DC;
  800. volatile uint16_t offset0DE;
  801. volatile uint16_t offset0E0;
  802. volatile uint16_t offset0E2;
  803. volatile uint16_t offset0E4;
  804. volatile uint16_t offset0E6;
  805. volatile uint16_t offset0E8;
  806. volatile uint16_t offset0EA;
  807. volatile uint16_t offset0EC;
  808. volatile uint16_t offset0EE;
  809. volatile uint16_t offset0F0;
  810. volatile uint16_t offset0F2;
  811. volatile uint16_t offset0F4;
  812. volatile uint16_t offset0F6;
  813. volatile uint16_t offset0F8;
  814. volatile uint16_t offset0FA;
  815. volatile uint16_t offset0FC;
  816. volatile uint16_t offset0FE;
  817. volatile uint16_t offset100;
  818. volatile uint16_t offset102;
  819. volatile uint16_t offset104;
  820. volatile uint16_t offset106;
  821. volatile uint16_t offset108;
  822. volatile uint16_t offset10A;
  823. volatile uint16_t offset10C;
  824. volatile uint16_t offset10E;
  825. volatile uint16_t offset110;
  826. volatile uint16_t offset112;
  827. volatile uint16_t offset114;
  828. volatile uint16_t offset116;
  829. volatile uint16_t offset118;
  830. volatile uint16_t offset11A;
  831. volatile uint16_t offset11C;
  832. volatile uint16_t offset11E;
  833. volatile uint16_t offset120;
  834. volatile uint16_t offset122;
  835. volatile uint16_t offset124;
  836. volatile uint16_t offset126;
  837. volatile uint16_t offset128;
  838. volatile uint16_t offset12A;
  839. volatile uint16_t offset12C;
  840. volatile uint16_t offset12E;
  841. volatile uint16_t offset130;
  842. volatile uint16_t offset132;
  843. volatile uint16_t offset134;
  844. volatile uint16_t offset136;
  845. volatile uint16_t offset138;
  846. volatile uint16_t offset13A;
  847. volatile uint16_t offset13C;
  848. volatile uint16_t offset13E;
  849. volatile uint16_t offset140;
  850. volatile uint16_t offset142;
  851. volatile uint16_t offset144;
  852. volatile uint16_t offset146;
  853. volatile uint16_t offset148;
  854. volatile uint16_t offset14A;
  855. volatile uint16_t offset14C;
  856. volatile uint16_t offset14E;
  857. volatile uint16_t offset150;
  858. volatile uint16_t offset152;
  859. volatile uint16_t offset154;
  860. volatile uint16_t offset156;
  861. volatile uint16_t offset158;
  862. volatile uint16_t offset15A;
  863. volatile uint16_t offset15C;
  864. volatile uint16_t offset15E;
  865. volatile uint16_t offset160;
  866. volatile uint16_t offset162;
  867. volatile uint16_t offset164;
  868. volatile uint16_t offset166;
  869. volatile uint16_t offset168;
  870. volatile uint16_t offset16A;
  871. volatile uint16_t offset16C;
  872. volatile uint16_t offset16E;
  873. volatile uint16_t offset170;
  874. volatile uint16_t offset172;
  875. volatile uint16_t offset174;
  876. volatile uint16_t offset176;
  877. volatile uint16_t offset178;
  878. volatile uint16_t offset17A;
  879. volatile uint16_t offset17C;
  880. volatile uint16_t offset17E;
  881. volatile uint16_t offset180;
  882. volatile uint16_t offset182;
  883. volatile uint16_t offset184;
  884. volatile uint16_t offset186;
  885. volatile uint16_t offset188;
  886. volatile uint16_t offset18A;
  887. volatile uint16_t offset18C;
  888. volatile uint16_t offset18E;
  889. volatile uint16_t offset190;
  890. volatile uint16_t offset192;
  891. volatile uint16_t offset194;
  892. volatile uint16_t offset196;
  893. volatile uint16_t offset198;
  894. volatile uint16_t offset19A;
  895. volatile uint16_t offset19C;
  896. volatile uint16_t offset19E;
  897. volatile uint16_t offset1A0;
  898. volatile uint16_t offset1A2;
  899. volatile uint16_t offset1A4;
  900. volatile uint16_t offset1A6;
  901. volatile uint16_t offset1A8;
  902. volatile uint16_t offset1AA;
  903. volatile uint16_t offset1AC;
  904. volatile uint16_t offset1AE;
  905. volatile uint16_t offset1B0;
  906. volatile uint16_t offset1B2;
  907. volatile uint16_t offset1B4;
  908. volatile uint16_t offset1B6;
  909. volatile uint16_t offset1B8;
  910. volatile uint16_t offset1BA;
  911. volatile uint16_t offset1BC;
  912. volatile uint16_t offset1BE;
  913. volatile uint16_t offset1C0;
  914. volatile uint16_t offset1C2;
  915. volatile uint16_t offset1C4;
  916. volatile uint16_t offset1C6;
  917. volatile uint16_t offset1C8;
  918. volatile uint16_t offset1CA;
  919. volatile uint16_t offset1CC;
  920. volatile uint16_t offset1CE;
  921. volatile uint16_t offset1D0;
  922. volatile uint16_t offset1D2;
  923. volatile uint16_t offset1D4;
  924. volatile uint16_t offset1D6;
  925. volatile uint16_t offset1D8;
  926. volatile uint16_t offset1DA;
  927. volatile uint16_t offset1DC;
  928. volatile uint16_t offset1DE;
  929. volatile uint16_t offset1E0;
  930. volatile uint16_t offset1E2;
  931. volatile uint16_t offset1E4;
  932. volatile uint16_t offset1E6;
  933. volatile uint16_t offset1E8;
  934. volatile uint16_t offset1EA;
  935. volatile uint16_t offset1EC;
  936. volatile uint16_t offset1EE;
  937. volatile uint16_t offset1F0;
  938. volatile uint16_t offset1F2;
  939. volatile uint16_t offset1F4;
  940. volatile uint16_t offset1F6;
  941. volatile uint16_t offset1F8;
  942. volatile uint16_t offset1FA;
  943. volatile uint16_t offset1FC;
  944. volatile uint16_t offset1FE;
  945. } IMXRT_REGISTER16_t;
  946. typedef struct {
  947. volatile uint8_t offset00;
  948. volatile uint8_t offset01;
  949. volatile uint8_t offset02;
  950. volatile uint8_t offset03;
  951. volatile uint8_t offset04;
  952. volatile uint8_t offset05;
  953. volatile uint8_t offset06;
  954. volatile uint8_t offset07;
  955. volatile uint8_t offset08;
  956. volatile uint8_t offset09;
  957. volatile uint8_t offset0A;
  958. volatile uint8_t offset0B;
  959. volatile uint8_t offset0C;
  960. volatile uint8_t offset0D;
  961. volatile uint8_t offset0E;
  962. volatile uint8_t offset0F;
  963. } IMXRT_REGISTER8_t;
  964. // 65.3: page 3302
  965. #define IMXRT_CMP1 (*(IMXRT_REGISTER8_t *)IMXRT_CMP1_ADDRESS)
  966. #define CMP1_CR0 (IMXRT_CMP1.offset00)
  967. #define CMP1_CR1 (IMXRT_CMP1.offset01)
  968. #define CMP1_FPR (IMXRT_CMP1.offset02)
  969. #define CMP1_SCR (IMXRT_CMP1.offset03)
  970. #define CMP1_DACCR (IMXRT_CMP1.offset04)
  971. #define CMP1_MUXCR (IMXRT_CMP1.offset05)
  972. #define IMXRT_CMP2 (*(IMXRT_REGISTER8_t *)IMXRT_CMP2_ADDRESS)
  973. #define CMP2_CR0 (IMXRT_CMP2.offset00)
  974. #define CMP2_CR1 (IMXRT_CMP2.offset01)
  975. #define CMP2_FPR (IMXRT_CMP2.offset02)
  976. #define CMP2_SCR (IMXRT_CMP2.offset03)
  977. #define CMP2_DACCR (IMXRT_CMP2.offset04)
  978. #define CMP2_MUXCR (IMXRT_CMP2.offset05)
  979. #define IMXRT_CMP3 (*(IMXRT_REGISTER8_t *)IMXRT_CMP3_ADDRESS)
  980. #define CMP3_CR0 (IMXRT_CMP3.offset00)
  981. #define CMP3_CR1 (IMXRT_CMP3.offset01)
  982. #define CMP3_FPR (IMXRT_CMP3.offset02)
  983. #define CMP3_SCR (IMXRT_CMP3.offset03)
  984. #define CMP3_DACCR (IMXRT_CMP3.offset04)
  985. #define CMP3_MUXCR (IMXRT_CMP3.offset05)
  986. #define IMXRT_CMP4 (*(IMXRT_REGISTER8_t *)IMXRT_CMP4_ADDRESS)
  987. #define CMP4_CR0 (IMXRT_CMP4.offset00)
  988. #define CMP4_CR1 (IMXRT_CMP4.offset01)
  989. #define CMP4_FPR (IMXRT_CMP4.offset02)
  990. #define CMP4_SCR (IMXRT_CMP4.offset03)
  991. #define CMP4_DACCR (IMXRT_CMP4.offset04)
  992. #define CMP4_MUXCR (IMXRT_CMP4.offset05)
  993. // 65.3 page 3302
  994. typedef struct {
  995. volatile uint32_t HC0;
  996. volatile uint32_t HC1;
  997. volatile uint32_t HC2;
  998. volatile uint32_t HC3;
  999. volatile uint32_t HC4;
  1000. volatile uint32_t HC5;
  1001. volatile uint32_t HC6;
  1002. volatile uint32_t HC7;
  1003. volatile uint32_t HS;
  1004. volatile uint32_t R0;
  1005. volatile uint32_t R1;
  1006. volatile uint32_t R2;
  1007. volatile uint32_t R3;
  1008. volatile uint32_t R4;
  1009. volatile uint32_t R5;
  1010. volatile uint32_t R6;
  1011. volatile uint32_t R7;
  1012. volatile uint32_t CFG;
  1013. volatile uint32_t GC;
  1014. volatile uint32_t GS;
  1015. volatile uint32_t CV;
  1016. volatile uint32_t OFS;
  1017. volatile uint32_t CAL;
  1018. } IMXRT_ADCS_t;
  1019. #define IMXRT_ADC1 (*(IMXRT_ADCS_t *)IMXRT_ADC1_ADDRESS)
  1020. #define IMXRT_ADC1S (*(IMXRT_ADCS_t *)IMXRT_ADC1_ADDRESS)
  1021. #define ADC1_HC0 (IMXRT_ADC1.HC0)
  1022. #define ADC1_HC1 (IMXRT_ADC1.HC1)
  1023. #define ADC1_HC2 (IMXRT_ADC1.HC2)
  1024. #define ADC1_HC3 (IMXRT_ADC1.HC3)
  1025. #define ADC1_HC4 (IMXRT_ADC1.HC4)
  1026. #define ADC1_HC5 (IMXRT_ADC1.HC5)
  1027. #define ADC1_HC6 (IMXRT_ADC1.HC6)
  1028. #define ADC1_HC7 (IMXRT_ADC1.HC7)
  1029. #define ADC1_HS (IMXRT_ADC1.HS)
  1030. #define ADC1_R0 (IMXRT_ADC1.R0)
  1031. #define ADC1_R1 (IMXRT_ADC1.R1)
  1032. #define ADC1_R2 (IMXRT_ADC1.R2)
  1033. #define ADC1_R3 (IMXRT_ADC1.R3)
  1034. #define ADC1_R4 (IMXRT_ADC1.R4)
  1035. #define ADC1_R5 (IMXRT_ADC1.R5)
  1036. #define ADC1_R6 (IMXRT_ADC1.R6)
  1037. #define ADC1_R7 (IMXRT_ADC1.R7)
  1038. #define ADC1_CFG (IMXRT_ADC1.CFG)
  1039. #define ADC1_GC (IMXRT_ADC1.GC)
  1040. #define ADC1_GS (IMXRT_ADC1.GS)
  1041. #define ADC1_CV (IMXRT_ADC1.CV)
  1042. #define ADC1_OFS (IMXRT_ADC1.OFS)
  1043. #define ADC1_CAL (IMXRT_ADC1.CAL)
  1044. #define IMXRT_ADC2 (*(IMXRT_ADCS_t *)IMXRT_ADC2_ADDRESS)
  1045. #define IMXRT_ADC2S (*(IMXRT_ADCS_t *)IMXRT_ADC2_ADDRESS)
  1046. #define ADC2_HC0 (IMXRT_ADC2.HC0)
  1047. #define ADC2_HC1 (IMXRT_ADC2.HC1)
  1048. #define ADC2_HC2 (IMXRT_ADC2.HC2)
  1049. #define ADC2_HC3 (IMXRT_ADC2.HC3)
  1050. #define ADC2_HC4 (IMXRT_ADC2.HC4)
  1051. #define ADC2_HC5 (IMXRT_ADC2.HC5)
  1052. #define ADC2_HC6 (IMXRT_ADC2.HC6)
  1053. #define ADC2_HC7 (IMXRT_ADC2.HC7)
  1054. #define ADC2_HS (IMXRT_ADC2.HS)
  1055. #define ADC2_R0 (IMXRT_ADC2.R0)
  1056. #define ADC2_R1 (IMXRT_ADC2.R1)
  1057. #define ADC2_R2 (IMXRT_ADC2.R2)
  1058. #define ADC2_R3 (IMXRT_ADC2.R3)
  1059. #define ADC2_R4 (IMXRT_ADC2.R4)
  1060. #define ADC2_R5 (IMXRT_ADC2.R5)
  1061. #define ADC2_R6 (IMXRT_ADC2.R6)
  1062. #define ADC2_R7 (IMXRT_ADC2.R7)
  1063. #define ADC2_CFG (IMXRT_ADC2.CFG)
  1064. #define ADC2_GC (IMXRT_ADC2.GC)
  1065. #define ADC2_GS (IMXRT_ADC2.GS)
  1066. #define ADC2_CV (IMXRT_ADC2.CV)
  1067. #define ADC2_OFS (IMXRT_ADC2.OFS)
  1068. #define ADC2_CAL (IMXRT_ADC2.CAL)
  1069. #define ADC_HC_AIEN ((uint32_t)(1<<7))
  1070. #define ADC_HC_ADCH(n) ((uint32_t)(((n) & 0x1F) << 0))
  1071. #define ADC_HS_COCO0 ((uint32_t)(1<<0))
  1072. #define ADC_CFG_OVWREN ((uint32_t)(1<<16))
  1073. #define ADC_CFG_AVGS(n) ((uint32_t)(((n) & 0x03) << 14))
  1074. #define ADC_CFG_ADTRG ((uint32_t)(1<<13))
  1075. #define ADC_CFG_REFSEL(n) ((uint32_t)(((n) & 0x03) << 11))
  1076. #define ADC_CFG_ADHSC ((uint32_t)(1<<10))
  1077. #define ADC_CFG_ADSTS(n) ((uint32_t)(((n) & 0x03) << 8))
  1078. #define ADC_CFG_ADLPC ((uint32_t)(1<<7))
  1079. #define ADC_CFG_ADIV(n) ((uint32_t)(((n) & 0x03) << 5))
  1080. #define ADC_CFG_ADLSMP ((uint32_t)(1<<4))
  1081. #define ADC_CFG_MODE(n) ((uint32_t)(((n) & 0x03) << 2))
  1082. #define ADC_CFG_ADICLK(n) ((uint32_t)(((n) & 0x03) << 0))
  1083. #define ADC_GC_CAL ((uint32_t)(1<<7))
  1084. #define ADC_GC_ADCO ((uint32_t)(1<<6))
  1085. #define ADC_GC_AVGE ((uint32_t)(1<<5))
  1086. #define ADC_GC_ACFE ((uint32_t)(1<<4))
  1087. #define ADC_GC_ACFGT ((uint32_t)(1<<3))
  1088. #define ADC_GC_ACREN ((uint32_t)(1<<2))
  1089. #define ADC_GC_DMAEN ((uint32_t)(1<<1))
  1090. #define ADC_GC_ADACKEN ((uint32_t)(1<<0))
  1091. #define ADC_GS_AWKST ((uint32_t)(1<<2))
  1092. #define ADC_GS_CALF ((uint32_t)(1<<1))
  1093. #define ADC_GS_ADACT ((uint32_t)(1<<0))
  1094. #define ADC_CV_CV2(n) ((uint32_t)(((n) & 0xFFF) << 16))
  1095. #define ADC_CV_CV1(n) ((uint32_t)(((n) & 0xFFF) << 0))
  1096. #define ADC_OFS_SIGN ((uint32_t)(1<<12))
  1097. #define ADC_OFS_OFS(n) ((uint32_t)(((n) & 0xFFF) << 0))
  1098. #define ADC_CAL_CAL_CODE(n) ((uint32_t)(((n) & 0x0F) << 0))
  1099. // 66.5.1 Page 3504
  1100. typedef struct {
  1101. volatile uint32_t CTRL; // offset 0
  1102. volatile uint32_t DONE0_1_IRQ; // offset004
  1103. volatile uint32_t DONE2_ERR_IRQ; // offset008
  1104. volatile uint32_t DMA_CTRL; // offset00C
  1105. struct {
  1106. volatile uint32_t CTRL; //offset010
  1107. volatile uint32_t COUNTER; //offset014
  1108. volatile uint32_t CHAIN_1_0;
  1109. volatile uint32_t CHAIN_3_2;
  1110. volatile uint32_t CHAIN_5_4;
  1111. volatile uint32_t CHAIN_7_6;
  1112. volatile uint32_t RESULT_1_0;
  1113. volatile uint32_t RESULT_3_2;
  1114. volatile uint32_t RESULT_5_4;
  1115. volatile uint32_t RESULT_7_6;
  1116. } TRIG[7];
  1117. } IMXRT_ADC_ETC_t;
  1118. #define IMXRT_ADC_ETC (*(IMXRT_ADC_ETC_t *)IMXRT_ADC_ETC_ADDRESS)
  1119. #define ADC_ETC_CTRL (IMXRT_ADC_ETC.CTRL)
  1120. #define ADC_ETC_DONE0_1_IRQ (IMXRT_ADC_ETC.DONE0_1_IRQ)
  1121. #define ADC_ETC_DONE2_ERR_IRQ (IMXRT_ADC_ETC.DONE2_ERR_IRQ)
  1122. #define ADC_ETC_DMA_CTRL (IMXRT_ADC_ETC.DMA_CTRL)
  1123. #define ADC_ETC_TRIG0_CTRL (IMXRT_ADC_ETC.TRIG[0].CTRL)
  1124. #define ADC_ETC_TRIG0_COUNTER (IMXRT_ADC_ETC.TRIG[0].COUNTER)
  1125. #define ADC_ETC_TRIG0_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[0].CHAIN_1_0)
  1126. #define ADC_ETC_TRIG0_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[0].CHAIN_3_2)
  1127. #define ADC_ETC_TRIG0_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[0].CHAIN_5_4)
  1128. #define ADC_ETC_TRIG0_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[0].CHAIN_7_6)
  1129. #define ADC_ETC_TRIG0_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[0].RESULT_1_0)
  1130. #define ADC_ETC_TRIG0_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[0].RESULT_3_2)
  1131. #define ADC_ETC_TRIG0_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[0].RESULT_5_4)
  1132. #define ADC_ETC_TRIG0_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[0].RESULT_7_6)
  1133. #define ADC_ETC_TRIG1_CTRL (IMXRT_ADC_ETC.TRIG[1].CTRL)
  1134. #define ADC_ETC_TRIG1_COUNTER (IMXRT_ADC_ETC.TRIG[1].COUNTER)
  1135. #define ADC_ETC_TRIG1_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[1].CHAIN_1_0)
  1136. #define ADC_ETC_TRIG1_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[1].CHAIN_3_2)
  1137. #define ADC_ETC_TRIG1_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[1].CHAIN_5_4)
  1138. #define ADC_ETC_TRIG1_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[1].CHAIN_7_6)
  1139. #define ADC_ETC_TRIG1_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[1].RESULT_1_0)
  1140. #define ADC_ETC_TRIG1_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[1].RESULT_3_2)
  1141. #define ADC_ETC_TRIG1_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[1].RESULT_5_4)
  1142. #define ADC_ETC_TRIG1_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[1].RESULT_7_6)
  1143. #define ADC_ETC_TRIG2_CTRL (IMXRT_ADC_ETC.TRIG[2].CTRL)
  1144. #define ADC_ETC_TRIG2_COUNTER (IMXRT_ADC_ETC.TRIG[2].COUNTER)
  1145. #define ADC_ETC_TRIG2_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[2].CHAIN_1_0)
  1146. #define ADC_ETC_TRIG2_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[2].CHAIN_3_2)
  1147. #define ADC_ETC_TRIG2_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[2].CHAIN_5_4)
  1148. #define ADC_ETC_TRIG2_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[2].CHAIN_7_6)
  1149. #define ADC_ETC_TRIG2_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[2].RESULT_1_0)
  1150. #define ADC_ETC_TRIG2_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[2].RESULT_3_2)
  1151. #define ADC_ETC_TRIG2_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[2].RESULT_5_4)
  1152. #define ADC_ETC_TRIG2_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[2].RESULT_7_6)
  1153. #define ADC_ETC_TRIG3_CTRL (IMXRT_ADC_ETC.TRIG[3].CTRL)
  1154. #define ADC_ETC_TRIG3_COUNTER (IMXRT_ADC_ETC.TRIG[3].COUNTER)
  1155. #define ADC_ETC_TRIG3_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[3].CHAIN_1_0)
  1156. #define ADC_ETC_TRIG3_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[3].CHAIN_3_2)
  1157. #define ADC_ETC_TRIG3_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[3].CHAIN_5_4)
  1158. #define ADC_ETC_TRIG3_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[3].CHAIN_7_6)
  1159. #define ADC_ETC_TRIG3_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[3].RESULT_1_0)
  1160. #define ADC_ETC_TRIG3_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[3].RESULT_3_2)
  1161. #define ADC_ETC_TRIG3_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[3].RESULT_5_4)
  1162. #define ADC_ETC_TRIG3_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[3].RESULT_7_6)
  1163. #define ADC_ETC_TRIG4_CTRL (IMXRT_ADC_ETC.TRIG[4].CTRL)
  1164. #define ADC_ETC_TRIG4_COUNTER (IMXRT_ADC_ETC.TRIG[4].COUNTER)
  1165. #define ADC_ETC_TRIG4_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[4].CHAIN_1_0)
  1166. #define ADC_ETC_TRIG4_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[4].CHAIN_3_2)
  1167. #define ADC_ETC_TRIG4_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[4].CHAIN_5_4)
  1168. #define ADC_ETC_TRIG4_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[4].CHAIN_7_6)
  1169. #define ADC_ETC_TRIG4_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[4].RESULT_1_0)
  1170. #define ADC_ETC_TRIG4_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[4].RESULT_3_2)
  1171. #define ADC_ETC_TRIG4_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[4].RESULT_5_4)
  1172. #define ADC_ETC_TRIG4_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[4].RESULT_7_6)
  1173. #define ADC_ETC_TRIG5_CTRL (IMXRT_ADC_ETC.TRIG[5].CTRL)
  1174. #define ADC_ETC_TRIG5_COUNTER (IMXRT_ADC_ETC.TRIG[5].COUNTER)
  1175. #define ADC_ETC_TRIG5_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[5].CHAIN_1_0)
  1176. #define ADC_ETC_TRIG5_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[5].CHAIN_3_2)
  1177. #define ADC_ETC_TRIG5_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[5].CHAIN_5_4)
  1178. #define ADC_ETC_TRIG5_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[5].CHAIN_7_6)
  1179. #define ADC_ETC_TRIG5_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[5].RESULT_1_0)
  1180. #define ADC_ETC_TRIG5_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[5].RESULT_3_2)
  1181. #define ADC_ETC_TRIG5_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[5].RESULT_5_4)
  1182. #define ADC_ETC_TRIG5_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[5].RESULT_7_6)
  1183. #define ADC_ETC_TRIG6_CTRL (IMXRT_ADC_ETC.TRIG[6].CTRL)
  1184. #define ADC_ETC_TRIG6_COUNTER (IMXRT_ADC_ETC.TRIG[6].COUNTER)
  1185. #define ADC_ETC_TRIG6_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[6].CHAIN_1_0)
  1186. #define ADC_ETC_TRIG6_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[6].CHAIN_3_2)
  1187. #define ADC_ETC_TRIG6_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[6].CHAIN_5_4)
  1188. #define ADC_ETC_TRIG6_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[6].CHAIN_7_6)
  1189. #define ADC_ETC_TRIG6_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[6].RESULT_1_0)
  1190. #define ADC_ETC_TRIG6_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[6].RESULT_3_2)
  1191. #define ADC_ETC_TRIG6_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[6].RESULT_5_4)
  1192. #define ADC_ETC_TRIG6_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[6].RESULT_7_6)
  1193. #define ADC_ETC_TRIG7_CTRL (IMXRT_ADC_ETC.TRIG[7].CTRL)
  1194. #define ADC_ETC_TRIG7_COUNTER (IMXRT_ADC_ETC.TRIG[7].COUNTER)
  1195. #define ADC_ETC_TRIG7_CHAIN_1_0 (IMXRT_ADC_ETC.TRIG[7].CHAIN_1_0)
  1196. #define ADC_ETC_TRIG7_CHAIN_3_2 (IMXRT_ADC_ETC.TRIG[7].CHAIN_3_2)
  1197. #define ADC_ETC_TRIG7_CHAIN_5_4 (IMXRT_ADC_ETC.TRIG[7].CHAIN_5_4)
  1198. #define ADC_ETC_TRIG7_CHAIN_7_6 (IMXRT_ADC_ETC.TRIG[7].CHAIN_7_6)
  1199. #define ADC_ETC_TRIG7_RESULT_1_0 (IMXRT_ADC_ETC.TRIG[7].RESULT_1_0)
  1200. #define ADC_ETC_TRIG7_RESULT_3_2 (IMXRT_ADC_ETC.TRIG[7].RESULT_3_2)
  1201. #define ADC_ETC_TRIG7_RESULT_5_4 (IMXRT_ADC_ETC.TRIG[7].RESULT_5_4)
  1202. #define ADC_ETC_TRIG7_RESULT_7_6 (IMXRT_ADC_ETC.TRIG[7].RESULT_7_6)
  1203. #define ADC_ETC_CTRL_SOFTRST ((uint32_t)(1<<31))
  1204. #define ADC_ETC_CTRL_TSC_BYPASS ((uint32_t)(1<<30))
  1205. #define ADC_ETC_CTRL_DMA_MODE_SEL ((uint32_t)(1<<29))
  1206. #define ADC_ETC_CTRL_PRE_DIVIDER(n) ((uint32_t)(((n) & 0xff) << 16))
  1207. #define ADC_ETC_CTRL_EXT1_TRIG_PRIORITY(n) ((uint32_t)(((n) & 0x07) << 13))
  1208. #define ADC_ETC_CTRL_EXT1_TRIG_ENABLE ((uint32_t)(1<<12))
  1209. #define ADC_ETC_CTRL_EXT0_TRIG_PRIORITY(n) ((uint32_t)(((n) & 0x07) << 9))
  1210. #define ADC_ETC_CTRL_EXT0_TRIG_ENABLE ((uint32_t)(1<<8))
  1211. #define ADC_ETC_CTRL_TRIG_ENABLE(n) ((uint32_t)(((n) & 0xff) << 0))
  1212. #define ADC_ETC_DONE0_1_IRQ_TRIG_DONE1(n) ((uint32_t)(1<<(16 + ((n) &0x7))))
  1213. #define ADC_ETC_DONE0_1_IRQ_TRIG_DONE0(n) ((uint32_t)(1<<((n) &0x7)))
  1214. #define ADC_ETC_DONE2_ERR_IRQ_TRIG_ERR(n) ((uint32_t)(1<<(16 + ((n) &0x7))))
  1215. #define ADC_ETC_DONE2_ERR_IRQ_TRIG_DONE2(n) ((uint32_t)(1<<((n) &0x7)))
  1216. #define ADC_ETC_DMA_CTRL_TRIQ_REQ(n) ((uint32_t)(1<<(16 + ((n) &0x7))))
  1217. #define ADC_ETC_DMA_CTRL_TRIQ_ENABLE(n) ((uint32_t)(1<<((n) &0x7)))
  1218. // For each TRIG elements in array
  1219. #define ADC_ETC_TRIG_CTRL_SYNC_MODE ((uint32_t)(1<<16))
  1220. #define ADC_ETC_TRIG_CTRL_TRIG_PRIORITY(n) ((uint32_t)(((n) & 0x07) << 12))
  1221. #define ADC_ETC_TRIG_CTRL_TRIG_CHAIN(n) ((uint32_t)(((n) & 0x07) << 8))
  1222. #define ADC_ETC_TRIG_CTRL_TRIG_MODE ((uint32_t)(1<<4))
  1223. #define ADC_ETC_TRIG_CTRL_SW_TRIG ((uint32_t)(1<<0))
  1224. #define ADC_ETC_TRIG_COUNTER_SAMPLE_INTERVAL(n) ((uint32_t)(((n) & 0xff) << 16))
  1225. #define ADC_ETC_TRIG_COUNTER_INIT_DELAY(n) ((uint32_t)(((n) & 0xff) << 0))
  1226. #define ADC_ETC_TRIG_CHAIN_IE1(n) ((uint32_t)(((n) & 0x03) << 29))
  1227. #define ADC_ETC_TRIG_CHAIN_B2B1 ((uint32_t)(1<<28))
  1228. #define ADC_ETC_TRIG_CHAIN_HWTS1(n) ((uint32_t)(((n) & 0xff) << 20))
  1229. #define ADC_ETC_TRIG_CHAIN_CSEL1(n) ((uint32_t)(((n) & 0x0f) << 16))
  1230. #define ADC_ETC_TRIG_CHAIN_IE0(n) ((uint32_t)(((n) & 0x03) << 13))
  1231. #define ADC_ETC_TRIG_CHAIN_B2B0 ((uint32_t)(1<<12))
  1232. #define ADC_ETC_TRIG_CHAIN_HWTS0(n) ((uint32_t)(((n) & 0xff) << 4))
  1233. #define ADC_ETC_TRIG_CHAIN_CSEL0(n) ((uint32_t)(((n) & 0x0f) << 0))
  1234. #define ADC_ETC_TRIG_RESULT_DATA1(n) ((uint32_t)(((n) & 0xfff) << 16))
  1235. #define ADC_ETC_TRIG_RESULT_DATA0(n) ((uint32_t)(((n) & 0xfff) << 0))
  1236. // 32.8: page 1778
  1237. #define IMXRT_AIPSTZ1 (*(IMXRT_REGISTER32_t *)IMXRT_AIPSTZ1_ADDRESS)
  1238. #define AIPSTZ1_MPR (IMXRT_AIPSTZ1.offset000)
  1239. #define AIPSTZ1_OPACR (IMXRT_AIPSTZ1.offset040)
  1240. #define AIPSTZ1_OPACR1 (IMXRT_AIPSTZ1.offset044)
  1241. #define AIPSTZ1_OPACR2 (IMXRT_AIPSTZ1.offset048)
  1242. #define AIPSTZ1_OPACR3 (IMXRT_AIPSTZ1.offset04C)
  1243. #define AIPSTZ1_OPACR4 (IMXRT_AIPSTZ1.offset050)
  1244. #define IMXRT_AIPSTZ2 (*(IMXRT_REGISTER32_t *)IMXRT_AIPSTZ2_ADDRESS)
  1245. #define AIPSTZ2_MPR (IMXRT_AIPSTZ2.offset000)
  1246. #define AIPSTZ2_OPACR (IMXRT_AIPSTZ2.offset040)
  1247. #define AIPSTZ2_OPACR1 (IMXRT_AIPSTZ2.offset044)
  1248. #define AIPSTZ2_OPACR2 (IMXRT_AIPSTZ2.offset048)
  1249. #define AIPSTZ2_OPACR3 (IMXRT_AIPSTZ2.offset04C)
  1250. #define AIPSTZ2_OPACR4 (IMXRT_AIPSTZ2.offset050)
  1251. #define IMXRT_AIPSTZ3 (*(IMXRT_REGISTER32_t *)IMXRT_AIPSTZ3_ADDRESS)
  1252. #define AIPSTZ3_MPR (IMXRT_AIPSTZ3.offset000)
  1253. #define AIPSTZ3_OPACR (IMXRT_AIPSTZ3.offset040)
  1254. #define AIPSTZ3_OPACR1 (IMXRT_AIPSTZ3.offset044)
  1255. #define AIPSTZ3_OPACR2 (IMXRT_AIPSTZ3.offset048)
  1256. #define AIPSTZ3_OPACR3 (IMXRT_AIPSTZ3.offset04C)
  1257. #define AIPSTZ3_OPACR4 (IMXRT_AIPSTZ3.offset050)
  1258. #define IMXRT_AIPSTZ4 (*(IMXRT_REGISTER32_t *)IMXRT_AIPSTZ4_ADDRESS)
  1259. #define AIPSTZ4_MPR (IMXRT_AIPSTZ4.offset000)
  1260. #define AIPSTZ4_OPACR (IMXRT_AIPSTZ4.offset040)
  1261. #define AIPSTZ4_OPACR1 (IMXRT_AIPSTZ4.offset044)
  1262. #define AIPSTZ4_OPACR2 (IMXRT_AIPSTZ4.offset048)
  1263. #define AIPSTZ4_OPACR3 (IMXRT_AIPSTZ4.offset04C)
  1264. #define AIPSTZ4_OPACR4 (IMXRT_AIPSTZ4.offset050)
  1265. // 63.4: page 3287
  1266. #define IMXRT_AOI1 (*(IMXRT_REGISTER16_t *)IMXRT_AOI1_ADDRESS)
  1267. #define AOI1_BFCRT010 (IMXRT_AOI1.offset000)
  1268. #define AOI1_BFCRT230 (IMXRT_AOI1.offset002)
  1269. #define AOI1_BFCRT011 (IMXRT_AOI1.offset004)
  1270. #define AOI1_BFCRT231 (IMXRT_AOI1.offset006)
  1271. #define AOI1_BFCRT012 (IMXRT_AOI1.offset008)
  1272. #define AOI1_BFCRT232 (IMXRT_AOI1.offset00A)
  1273. #define AOI1_BFCRT013 (IMXRT_AOI1.offset00C)
  1274. #define AOI1_BFCRT233 (IMXRT_AOI1.offset00E)
  1275. #define IMXRT_AOI2 (*(IMXRT_REGISTER16_t *)IMXRT_AOI2_ADDRESS)
  1276. #define AOI2_BFCRT010 (IMXRT_AOI2.offset000)
  1277. #define AOI2_BFCRT230 (IMXRT_AOI2.offset002)
  1278. #define AOI2_BFCRT011 (IMXRT_AOI2.offset004)
  1279. #define AOI2_BFCRT231 (IMXRT_AOI2.offset006)
  1280. #define AOI2_BFCRT012 (IMXRT_AOI2.offset008)
  1281. #define AOI2_BFCRT232 (IMXRT_AOI2.offset00A)
  1282. #define AOI2_BFCRT013 (IMXRT_AOI2.offset00C)
  1283. #define AOI2_BFCRT233 (IMXRT_AOI2.offset00E)
  1284. // 14.7: page 1045
  1285. #define IMXRT_CCM (*(IMXRT_REGISTER32_t *)IMXRT_CCM_ADDRESS)
  1286. #define CCM_CCR (IMXRT_CCM.offset000)
  1287. #define CCM_CSR (IMXRT_CCM.offset008)
  1288. #define CCM_CCSR (IMXRT_CCM.offset00C)
  1289. #define CCM_CACRR (IMXRT_CCM.offset010)
  1290. #define CCM_CBCDR (IMXRT_CCM.offset014)
  1291. #define CCM_CBCMR (IMXRT_CCM.offset018)
  1292. #define CCM_CSCMR1 (IMXRT_CCM.offset01C)
  1293. #define CCM_CSCMR2 (IMXRT_CCM.offset020)
  1294. #define CCM_CSCDR1 (IMXRT_CCM.offset024)
  1295. #define CCM_CS1CDR (IMXRT_CCM.offset028)
  1296. #define CCM_CS2CDR (IMXRT_CCM.offset02C)
  1297. #define CCM_CDCDR (IMXRT_CCM.offset030)
  1298. #define CCM_CSCDR2 (IMXRT_CCM.offset038)
  1299. #define CCM_CSCDR3 (IMXRT_CCM.offset03C)
  1300. #define CCM_CDHIPR (IMXRT_CCM.offset048)
  1301. #define CCM_CLPCR (IMXRT_CCM.offset054)
  1302. #define CCM_CISR (IMXRT_CCM.offset058)
  1303. #define CCM_CIMR (IMXRT_CCM.offset05C)
  1304. #define CCM_CCOSR (IMXRT_CCM.offset060)
  1305. #define CCM_CGPR (IMXRT_CCM.offset064)
  1306. #define CCM_CCGR0 (IMXRT_CCM.offset068)
  1307. #define CCM_CCGR1 (IMXRT_CCM.offset06C)
  1308. #define CCM_CCGR2 (IMXRT_CCM.offset070)
  1309. #define CCM_CCGR3 (IMXRT_CCM.offset074)
  1310. #define CCM_CCGR4 (IMXRT_CCM.offset078)
  1311. #define CCM_CCGR5 (IMXRT_CCM.offset07C)
  1312. #define CCM_CCGR6 (IMXRT_CCM.offset080)
  1313. #define CCM_CCGR7 (IMXRT_CCM.offset084)
  1314. #define CCM_CMEOR (IMXRT_CCM.offset088)
  1315. #define CCM_CCR_RBC_EN ((uint32_t)(1<<27))
  1316. #define CCM_CCR_REG_BYPASS_COUNT(n) ((uint32_t)(((n) & 0x3F) << 21))
  1317. #define CCM_CCR_COSC_EN ((uint32_t)(1<<12))
  1318. #define CCM_CCR_OSCNT(n) ((uint32_t)(((n) & 0xFF) << 0))
  1319. #define CCM_CSR_COSC_READY ((uint32_t)(1<<5))
  1320. #define CCM_CSR_CAMP2_READY ((uint32_t)(1<<3))
  1321. #define CCM_CSR_REF_EN_B ((uint32_t)(1<<0))
  1322. #define CCM_CCSR_PLL3_SW_CLK_SEL ((uint32_t)(1<<0))
  1323. #define CCM_CACRR_ARM_PODF(n) ((uint32_t)(((n) & 0x07) << 0))
  1324. #define CCM_CACRR_ARM_PODF_MASK ((uint32_t)(0x07 << 0))
  1325. #define CCM_CBCDR_PERIPH_CLK2_PODF(n) ((uint32_t)(((n) & 0x07) << 27))
  1326. #define CCM_CBCDR_PERIPH_CLK2_PODF_MASK ((uint32_t)(0x07 << 27))
  1327. #define CCM_CBCDR_PERIPH_CLK_SEL ((uint32_t)(1<<25))
  1328. #define CCM_CBCDR_SEMC_PODF(n) ((uint32_t)(((n) & 0x07) << 16))
  1329. #define CCM_CBCDR_AHB_PODF(n) ((uint32_t)(((n) & 0x07) << 10))
  1330. #define CCM_CBCDR_AHB_PODF_MASK ((uint32_t)(0x07 << 10))
  1331. #define CCM_CBCDR_IPG_PODF(n) ((uint32_t)(((n) & 0x03) << 8))
  1332. #define CCM_CBCDR_IPG_PODF_MASK ((uint32_t)(0x03 << 8))
  1333. #define CCM_CBCDR_SEMC_ALT_CLK_SEL ((uint32_t)(1<<7))
  1334. #define CCM_CBCDR_SEMC_CLK_SEL ((uint32_t)(1<<6))
  1335. #define CCM_CBCMR_FLEXSPI2_PODF(n) ((uint32_t)(((n) & 0x07) << 29))
  1336. #define CCM_CBCMR_LPSPI_PODF(n) ((uint32_t)(((n) & 0x07) << 26))
  1337. #define CCM_CBCMR_LCDIF_PODF(n) ((uint32_t)(((n) & 0x07) << 23))
  1338. #define CCM_CBCMR_PRE_PERIPH_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 18))
  1339. #define CCM_CBCMR_TRACE_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 14))
  1340. #define CCM_CBCMR_PERIPH_CLK2_SEL(n) ((uint32_t)(((n) & 0x03) << 12))
  1341. #define CCM_CBCMR_FLEXSPI2_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 8))
  1342. #define CCM_CBCMR_LPSPI_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 4))
  1343. #define CCM_CBCMR_FLEXSPI2_PODF_MASK ((uint32_t)(0x07 << 29))
  1344. #define CCM_CBCMR_LPSPI_PODF_MASK ((uint32_t)(0x07 << 26))
  1345. #define CCM_CBCMR_LCDIF_PODF_MASK ((uint32_t)(0x07 << 23))
  1346. #define CCM_CBCMR_PRE_PERIPH_CLK_SEL_MASK ((uint32_t)(0x03 << 18))
  1347. #define CCM_CBCMR_TRACE_CLK_SEL_MASK ((uint32_t)(0x03 << 14))
  1348. #define CCM_CBCMR_PERIPH_CLK2_SEL_MASK ((uint32_t)(0x03 << 12))
  1349. #define CCM_CBCMR_FLEXSPI2_CLK_SEL_MASK ((uint32_t)(0x03 << 8))
  1350. #define CCM_CBCMR_LPSPI_CLK_SEL_MASK ((uint32_t)(0x03 << 4))
  1351. #define CCM_CSCMR1_FLEXSPI_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 29))
  1352. #define CCM_CSCMR1_FLEXSPI_PODF(n) ((uint32_t)(((n) & 0x07) << 23))
  1353. #define CCM_CSCMR1_USDHC2_CLK_SEL ((uint32_t)(1<<17))
  1354. #define CCM_CSCMR1_USDHC1_CLK_SEL ((uint32_t)(1<<16))
  1355. #define CCM_CSCMR1_SAI3_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 14))
  1356. #define CCM_CSCMR1_SAI2_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 12))
  1357. #define CCM_CSCMR1_SAI1_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 10))
  1358. #define CCM_CSCMR1_PERCLK_CLK_SEL ((uint32_t)(1<<6))
  1359. #define CCM_CSCMR1_PERCLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1360. #define CCM_CSCMR2_FLEXIO2_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 19))
  1361. #define CCM_CSCMR2_CAN_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 8))
  1362. #define CCM_CSCMR2_CAN_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 2))
  1363. #define CCM_CSCDR1_TRACE_PODF(n) ((uint32_t)(((n) & 0x07) << 25))
  1364. #define CCM_CSCDR1_USDHC2_PODF(n) ((uint32_t)(((n) & 0x07) << 16))
  1365. #define CCM_CSCDR1_USDHC1_PODF(n) ((uint32_t)(((n) & 0x07) << 11))
  1366. #define CCM_CSCDR1_UART_CLK_SEL ((uint32_t)(1<<6))
  1367. #define CCM_CSCDR1_UART_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1368. #define CCM_CS1CDR_FLEXIO2_CLK_PODF(n) ((uint32_t)(((n) & 0x07) << 25))
  1369. #define CCM_CS1CDR_SAI3_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 22))
  1370. #define CCM_CS1CDR_SAI3_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 16))
  1371. #define CCM_CS1CDR_FLEXIO2_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 9))
  1372. #define CCM_CS1CDR_SAI1_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 6))
  1373. #define CCM_CS1CDR_SAI1_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1374. #define CCM_CS2CDR_SAI2_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 6))
  1375. #define CCM_CS2CDR_SAI2_CLK_PODF(n) ((uint32_t)(((n) & 0x3F) << 0))
  1376. #define CCM_CDCDR_SPDIF0_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 25))
  1377. #define CCM_CDCDR_SPDIF0_CLK_PODF(n) ((uint32_t)(((n) & 0x07) << 22))
  1378. #define CCM_CDCDR_SPDIF0_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 20))
  1379. #define CCM_CDCDR_FLEXIO1_CLK_PRED(n) ((uint32_t)(((n) & 0x07) << 12))
  1380. #define CCM_CDCDR_FLEXIO1_CLK_PODF(n) ((uint32_t)(((n) & 0x07) << 9))
  1381. #define CCM_CDCDR_FLEXIO1_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 7))
  1382. #define CCM_CSCDR2_LPI2C_CLK_PODF(n) ((uint32_t)(((n) & 0x1F) << 19))
  1383. #define CCM_CSCDR2_LPI2C_CLK_SEL ((uint32_t)(1<<18))
  1384. #define CCM_CSCDR2_LCDIF_PRE_CLK_SEL(n) ((uint32_t)(((n) & 0x07) << 15))
  1385. #define CCM_CSCDR2_LCDIF_PRED(n) ((uint32_t)(((n) & 0x07) << 12))
  1386. #define CCM_CSCDR2_LCDIF_CLK_SEL(n) ((uint32_t)(((n) & 0x07) << 9))
  1387. #define CCM_CSCDR3_CSI_PODF(n) ((uint32_t)(((n) & 0x07) << 11))
  1388. #define CCM_CSCDR3_CSI_CLK_SEL(n) ((uint32_t)(((n) & 0x03) << 9))
  1389. #define CCM_CDHIPR_ARM_PODF_BUSY ((uint32_t)(1<<16))
  1390. #define CCM_CDHIPR_PERIPH_CLK_SEL_BUSY ((uint32_t)(1<<5))
  1391. #define CCM_CDHIPR_PERIPH2_CLK_SEL_BUSY ((uint32_t)(1<<3))
  1392. #define CCM_CDHIPR_AHB_PODF_BUSY ((uint32_t)(1<<1))
  1393. #define CCM_CDHIPR_SEMC_PODF_BUSY ((uint32_t)(1<<0))
  1394. #define CCM_CLPCR_MASK_L2CC_IDLE ((uint32_t)(1<<27))
  1395. #define CCM_CLPCR_MASK_SCU_IDLE ((uint32_t)(1<<26))
  1396. #define CCM_CLPCR_MASK_CORE0_WFI ((uint32_t)(1<<22))
  1397. #define CCM_CLPCR_BYPASS_LPM_HS0 ((uint32_t)(1<<21))
  1398. #define CCM_CLPCR_BYPASS_LPM_HS1 ((uint32_t)(1<<19))
  1399. #define CCM_CLPCR_COSC_PWRDOWN ((uint32_t)(1<<11))
  1400. #define CCM_CLPCR_STBY_COUNT(n) ((uint32_t)(((n) & 0x03) << 9))
  1401. #define CCM_CLPCR_VSTBY ((uint32_t)(1<<8))
  1402. #define CCM_CLPCR_DIS_REF_OSC ((uint32_t)(1<<7))
  1403. #define CCM_CLPCR_SBYOS ((uint32_t)(1<<6))
  1404. #define CCM_CLPCR_ARM_CLK_DIS_ON_LPM ((uint32_t)(1<<5))
  1405. #define CCM_CLPCR_LPM(n) ((uint32_t)(((n) & 0x03) << 0))
  1406. #define CCM_CISR_ARM_PODF_LOADED ((uint32_t)(1<<26))
  1407. #define CCM_CISR_PERIPH_CLK_SEL_LOADED ((uint32_t)(1<<22))
  1408. #define CCM_CISR_AHB_PODF_LOADED ((uint32_t)(1<<20))
  1409. #define CCM_CISR_PERIPH2_CLK_SEL_LOADED ((uint32_t)(1<<19))
  1410. #define CCM_CISR_SEMC_PODF_LOADED ((uint32_t)(1<<17))
  1411. #define CCM_CISR_COSC_READY ((uint32_t)(1<<6))
  1412. #define CCM_CISR_LRF_PLL ((uint32_t)(1<<0))
  1413. #define CCM_CIMR_ARM_PODF_LOADED ((uint32_t)(1<<26))
  1414. #define CCM_CIMR_MASK_PERIPH_CLK_SEL_LOADED ((uint32_t)(1<<22))
  1415. #define CCM_CIMR_MASK_AHB_PODF_LOADED ((uint32_t)(1<<20))
  1416. #define CCM_CIMR_MASK_PERIPH2_CLK_SEL_LOADED ((uint32_t)(1<<19))
  1417. #define CCM_CIMR_MASK_SEMC_PODF_LOADED ((uint32_t)(1<<17))
  1418. #define CCM_CIMR_MASK_COSC_READY ((uint32_t)(1<<6))
  1419. #define CCM_CIMR_MASK_LRF_PLL ((uint32_t)(1<<0))
  1420. #define CCM_CCOSR_CLKO2_EN ((uint32_t)(1<<24))
  1421. #define CCM_CCOSR_CLKO2_DIV(n) ((uint32_t)(((n) & 0x07) << 21))
  1422. #define CCM_CCOSR_CLKO2_SEL(n) ((uint32_t)(((n) & 0x1F) << 16))
  1423. #define CCM_CCOSR_CLK_OUT_SEL ((uint32_t)(1<<8))
  1424. #define CCM_CCOSR_CLKO1_EN ((uint32_t)(1<<7))
  1425. #define CCM_CCOSR_CLKO1_DIV(n) ((uint32_t)(((n) & 0x07) << 4))
  1426. #define CCM_CCOSR_CLKO1_SEL(n) ((uint32_t)(((n) & 0x0F) << 0))
  1427. #define CCM_CGPR_INT_MEM_CLK_LPM ((uint32_t)(1<<17))
  1428. #define CCM_CGPR_FPL ((uint32_t)(1<<16))
  1429. #define CCM_CGPR_SYS_MEM_DS_CTRL(n) ((uint32_t)(((n) & 0x03) << 14))
  1430. #define CCM_CGPR_EFUSE_PROG_SUPPLY_GATE ((uint32_t)(1<<4))
  1431. #define CCM_CGPR_PMIC_DELAY_SCALER ((uint32_t)(1<<0))
  1432. #define CCM_CCGR_OFF 0
  1433. #define CCM_CCGR_ON_RUNONLY 1
  1434. #define CCM_CCGR_ON 3
  1435. #define CCM_CCGR0_GPIO2(n) ((uint32_t)(((n) & 0x03) << 30))
  1436. #define CCM_CCGR0_LPUART2(n) ((uint32_t)(((n) & 0x03) << 28))
  1437. #define CCM_CCGR0_GPT2_SERIAL(n) ((uint32_t)(((n) & 0x03) << 26))
  1438. #define CCM_CCGR0_GPT2_BUS(n) ((uint32_t)(((n) & 0x03) << 24))
  1439. #define CCM_CCGR0_TRACE(n) ((uint32_t)(((n) & 0x03) << 22))
  1440. #define CCM_CCGR0_CAN2_SERIAL(n) ((uint32_t)(((n) & 0x03) << 20))
  1441. #define CCM_CCGR0_CAN2(n) ((uint32_t)(((n) & 0x03) << 18))
  1442. #define CCM_CCGR0_CAN1_SERIAL(n) ((uint32_t)(((n) & 0x03) << 16))
  1443. #define CCM_CCGR0_CAN1(n) ((uint32_t)(((n) & 0x03) << 14))
  1444. #define CCM_CCGR0_LPUART3(n) ((uint32_t)(((n) & 0x03) << 12))
  1445. #define CCM_CCGR0_DCP(n) ((uint32_t)(((n) & 0x03) << 10))
  1446. #define CCM_CCGR0_MQS_HMCLK(n) ((uint32_t)(((n) & 0x03) << 4))
  1447. #define CCM_CCGR0_AIPS_TZ2(n) ((uint32_t)(((n) & 0x03) << 2))
  1448. #define CCM_CCGR0_AIPS_TZ1(n) ((uint32_t)(((n) & 0x03) << 0))
  1449. #define CCM_CCGR1_CSU(n) ((uint32_t)(((n) & 0x03) << 28))
  1450. #define CCM_CCGR1_GPIO1(n) ((uint32_t)(((n) & 0x03) << 26))
  1451. #define CCM_CCGR1_LPUART4(n) ((uint32_t)(((n) & 0x03) << 24))
  1452. #define CCM_CCGR1_GPT1_SERIAL(n) ((uint32_t)(((n) & 0x03) << 22))
  1453. #define CCM_CCGR1_GPT1_BUS(n) ((uint32_t)(((n) & 0x03) << 20))
  1454. #define CCM_CCGR1_GPT(n) ((uint32_t)(((n) & 0x03) << 20))
  1455. #define CCM_CCGR1_ADC1(n) ((uint32_t)(((n) & 0x03) << 16))
  1456. #define CCM_CCGR1_AOI2(n) ((uint32_t)(((n) & 0x03) << 14))
  1457. #define CCM_CCGR1_PIT(n) ((uint32_t)(((n) & 0x03) << 12))
  1458. #define CCM_CCGR1_ENET(n) ((uint32_t)(((n) & 0x03) << 10))
  1459. #define CCM_CCGR1_ADC2(n) ((uint32_t)(((n) & 0x03) << 8))
  1460. #define CCM_CCGR1_LPSPI4(n) ((uint32_t)(((n) & 0x03) << 6))
  1461. #define CCM_CCGR1_LPSPI3(n) ((uint32_t)(((n) & 0x03) << 4))
  1462. #define CCM_CCGR1_LPSPI2(n) ((uint32_t)(((n) & 0x03) << 2))
  1463. #define CCM_CCGR1_LPSPI1(n) ((uint32_t)(((n) & 0x03) << 0))
  1464. #define CCM_CCGR2_PXP(n) ((uint32_t)(((n) & 0x03) << 30))
  1465. #define CCM_CCGR2_LCD(n) ((uint32_t)(((n) & 0x03) << 28))
  1466. #define CCM_CCGR2_GPIO3(n) ((uint32_t)(((n) & 0x03) << 26))
  1467. #define CCM_CCGR2_XBAR2(n) ((uint32_t)(((n) & 0x03) << 24))
  1468. #define CCM_CCGR2_XBAR1(n) ((uint32_t)(((n) & 0x03) << 22))
  1469. #define CCM_CCGR2_IPMUX3(n) ((uint32_t)(((n) & 0x03) << 20))
  1470. #define CCM_CCGR2_IPMUX2(n) ((uint32_t)(((n) & 0x03) << 18))
  1471. #define CCM_CCGR2_IPMUX1(n) ((uint32_t)(((n) & 0x03) << 16))
  1472. #define CCM_CCGR2_XBAR3(n) ((uint32_t)(((n) & 0x03) << 14))
  1473. #define CCM_CCGR2_IIM(n) ((uint32_t)(((n) & 0x03) << 12))
  1474. #define CCM_CCGR2_LPI2C3(n) ((uint32_t)(((n) & 0x03) << 10))
  1475. #define CCM_CCGR2_LPI2C2(n) ((uint32_t)(((n) & 0x03) << 8))
  1476. #define CCM_CCGR2_LPI2C1(n) ((uint32_t)(((n) & 0x03) << 6))
  1477. #define CCM_CCGR2_IOMUXC_SNVS(n) ((uint32_t)(((n) & 0x03) << 4))
  1478. #define CCM_CCGR2_CSI(n) ((uint32_t)(((n) & 0x03) << 2))
  1479. #define CCM_CCGR3_IOMUXC_SNVS_GPR(n) ((uint32_t)(((n) & 0x03) << 30))
  1480. #define CCM_CCGR3_OCRAM(n) ((uint32_t)(((n) & 0x03) << 28))
  1481. #define CCM_CCGR3_ACMP4(n) ((uint32_t)(((n) & 0x03) << 26))
  1482. #define CCM_CCGR3_ACMP3(n) ((uint32_t)(((n) & 0x03) << 24))
  1483. #define CCM_CCGR3_ACMP2(n) ((uint32_t)(((n) & 0x03) << 22))
  1484. #define CCM_CCGR3_ACMP1(n) ((uint32_t)(((n) & 0x03) << 20))
  1485. #define CCM_CCGR3_FLEXRAM(n) ((uint32_t)(((n) & 0x03) << 18))
  1486. #define CCM_CCGR3_WDOG1(n) ((uint32_t)(((n) & 0x03) << 16))
  1487. #define CCM_CCGR3_EWM(n) ((uint32_t)(((n) & 0x03) << 14))
  1488. #define CCM_CCGR3_GPIO4(n) ((uint32_t)(((n) & 0x03) << 12))
  1489. #define CCM_CCGR3_LCDIF_PIX(n) ((uint32_t)(((n) & 0x03) << 10))
  1490. #define CCM_CCGR3_AOI1(n) ((uint32_t)(((n) & 0x03) << 8))
  1491. #define CCM_CCGR3_LPUART6(n) ((uint32_t)(((n) & 0x03) << 6))
  1492. #define CCM_CCGR3_SEMC(n) ((uint32_t)(((n) & 0x03) << 4))
  1493. #define CCM_CCGR3_LPUART5(n) ((uint32_t)(((n) & 0x03) << 2))
  1494. #define CCM_CCGR3_FLEXIO2(n) ((uint32_t)(((n) & 0x03) << 0))
  1495. #define CCM_CCGR4_ENC4(n) ((uint32_t)(((n) & 0x03) << 30))
  1496. #define CCM_CCGR4_ENC3(n) ((uint32_t)(((n) & 0x03) << 28))
  1497. #define CCM_CCGR4_ENC2(n) ((uint32_t)(((n) & 0x03) << 26))
  1498. #define CCM_CCGR4_ENC1(n) ((uint32_t)(((n) & 0x03) << 24))
  1499. #define CCM_CCGR4_PWM4(n) ((uint32_t)(((n) & 0x03) << 22))
  1500. #define CCM_CCGR4_PWM3(n) ((uint32_t)(((n) & 0x03) << 20))
  1501. #define CCM_CCGR4_PWM2(n) ((uint32_t)(((n) & 0x03) << 18))
  1502. #define CCM_CCGR4_PWM1(n) ((uint32_t)(((n) & 0x03) << 16))
  1503. #define CCM_CCGR4_SIM_EMS(n) ((uint32_t)(((n) & 0x03) << 14))
  1504. #define CCM_CCGR4_SIM_M(n) ((uint32_t)(((n) & 0x03) << 12))
  1505. #define CCM_CCGR4_TSC(n) ((uint32_t)(((n) & 0x03) << 10))
  1506. #define CCM_CCGR4_SIM_M7(n) ((uint32_t)(((n) & 0x03) << 8))
  1507. #define CCM_CCGR4_BEE(n) ((uint32_t)(((n) & 0x03) << 6))
  1508. #define CCM_CCGR4_IOMUXC_GPR(n) ((uint32_t)(((n) & 0x03) << 4))
  1509. #define CCM_CCGR4_IOMUXC(n) ((uint32_t)(((n) & 0x03) << 2))
  1510. #define CCM_CCGR5_SNVS_LP(n) ((uint32_t)(((n) & 0x03) << 30))
  1511. #define CCM_CCGR5_SNVS_HP(n) ((uint32_t)(((n) & 0x03) << 28))
  1512. #define CCM_CCGR5_LPUART7(n) ((uint32_t)(((n) & 0x03) << 26))
  1513. #define CCM_CCGR5_LPUART1(n) ((uint32_t)(((n) & 0x03) << 24))
  1514. #define CCM_CCGR5_SAI3(n) ((uint32_t)(((n) & 0x03) << 22))
  1515. #define CCM_CCGR5_SAI2(n) ((uint32_t)(((n) & 0x03) << 20))
  1516. #define CCM_CCGR5_SAI1(n) ((uint32_t)(((n) & 0x03) << 18))
  1517. #define CCM_CCGR5_SIM_MAIN(n) ((uint32_t)(((n) & 0x03) << 16))
  1518. #define CCM_CCGR5_SPDIF(n) ((uint32_t)(((n) & 0x03) << 14))
  1519. #define CCM_CCGR5_AIPS_TZ4(n) ((uint32_t)(((n) & 0x03) << 12))
  1520. #define CCM_CCGR5_WDOG2(n) ((uint32_t)(((n) & 0x03) << 10))
  1521. #define CCM_CCGR5_KPP(n) ((uint32_t)(((n) & 0x03) << 8))
  1522. #define CCM_CCGR5_DMA(n) ((uint32_t)(((n) & 0x03) << 6))
  1523. #define CCM_CCGR5_WDOG3(n) ((uint32_t)(((n) & 0x03) << 4))
  1524. #define CCM_CCGR5_FLEXIO1(n) ((uint32_t)(((n) & 0x03) << 2))
  1525. #define CCM_CCGR5_ROM(n) ((uint32_t)(((n) & 0x03) << 0))
  1526. #define CCM_CCGR6_QTIMER3(n) ((uint32_t)(((n) & 0x03) << 30))
  1527. #define CCM_CCGR6_QTIMER2(n) ((uint32_t)(((n) & 0x03) << 28))
  1528. #define CCM_CCGR6_QTIMER1(n) ((uint32_t)(((n) & 0x03) << 26))
  1529. #define CCM_CCGR6_LPI2C4_SERIAL(n) ((uint32_t)(((n) & 0x03) << 24))
  1530. #define CCM_CCGR6_ANADIG(n) ((uint32_t)(((n) & 0x03) << 22))
  1531. #define CCM_CCGR6_SIM_PER(n) ((uint32_t)(((n) & 0x03) << 20)) /* IMXRT1052 */
  1532. #define CCM_CCGR6_AXBS_P(n) ((uint32_t)(((n) & 0x03) << 20)) /* IMXRT1062 */
  1533. #define CCM_CCGR6_AIPS_TZ3(n) ((uint32_t)(((n) & 0x03) << 18))
  1534. #define CCM_CCGR6_QTIMER4(n) ((uint32_t)(((n) & 0x03) << 16))
  1535. #define CCM_CCGR6_LPUART8(n) ((uint32_t)(((n) & 0x03) << 14))
  1536. #define CCM_CCGR6_TRNG(n) ((uint32_t)(((n) & 0x03) << 12))
  1537. #define CCM_CCGR6_FLEXSPI(n) ((uint32_t)(((n) & 0x03) << 10))
  1538. #define CCM_CCGR6_IPMUX4(n) ((uint32_t)(((n) & 0x03) << 8))
  1539. #define CCM_CCGR6_DCDC(n) ((uint32_t)(((n) & 0x03) << 6))
  1540. #define CCM_CCGR6_USDHC2(n) ((uint32_t)(((n) & 0x03) << 4))
  1541. #define CCM_CCGR6_USDHC1(n) ((uint32_t)(((n) & 0x03) << 2))
  1542. #define CCM_CCGR6_USBOH3(n) ((uint32_t)(((n) & 0x03) << 0))
  1543. #define CCM_CCGR7_FLEXIO3(n) ((uint32_t)(((n) & 0x03) << 12))
  1544. #define CCM_CCGR7_APIS_LITE(n) ((uint32_t)(((n) & 0x03) << 10))
  1545. #define CCM_CCGR7_CAN3_SERIAL(n) ((uint32_t)(((n) & 0x03) << 8))
  1546. #define CCM_CCGR7_CAN3(n) ((uint32_t)(((n) & 0x03) << 6))
  1547. #define CCM_CCGR7_AXBS_L(n) ((uint32_t)(((n) & 0x03) << 4))
  1548. #define CCM_CCGR7_FLEXSPI2(n) ((uint32_t)(((n) & 0x03) << 2))
  1549. #define CCM_CCGR7_ENET2(n) ((uint32_t)(((n) & 0x03) << 0))
  1550. #define CCM_CMEOR_MOD_EN_OV_CAN1_CPI ((uint32_t)(1<<30))
  1551. #define CCM_CMEOR_MOD_EN_OV_CAN2_CPI ((uint32_t)(1<<28))
  1552. #define CCM_CMEOR_MOD_EN_OV_TRNG ((uint32_t)(1<<9))
  1553. #define CCM_CMEOR_MOD_EN_USDHC ((uint32_t)(1<<7))
  1554. #define CCM_CMEOR_MOD_EN_OV_PIT ((uint32_t)(1<<6))
  1555. #define CCM_CMEOR_MOD_EN_OV_GPT ((uint32_t)(1<<5))
  1556. #define CCM_CSCMR1_SAI1_CLK_SEL_MASK (CCM_CSCMR1_SAI1_CLK_SEL(0x03))
  1557. #define CCM_CS1CDR_SAI1_CLK_PRED_MASK (CCM_CS1CDR_SAI1_CLK_PRED(0x07))
  1558. #define CCM_CS1CDR_SAI1_CLK_PODF_MASK (CCM_CS1CDR_SAI1_CLK_PODF(0x3f))
  1559. #define CCM_CSCMR1_SAI2_CLK_SEL_MASK (CCM_CSCMR1_SAI2_CLK_SEL(0x03))
  1560. #define CCM_CS2CDR_SAI2_CLK_PRED_MASK (CCM_CS2CDR_SAI2_CLK_PRED(0x07))
  1561. #define CCM_CS2CDR_SAI2_CLK_PODF_MASK (CCM_CS2CDR_SAI2_CLK_PODF(0x3f))
  1562. #define CCM_CSCMR1_SAI3_CLK_SEL_MASK (CCM_CSCMR1_SAI3_CLK_SEL(0x03))
  1563. #define CCM_CS1CDR_SAI3_CLK_PRED_MASK (CCM_CS1CDR_SAI3_CLK_PRED(0x07))
  1564. #define CCM_CS1CDR_SAI3_CLK_PODF_MASK (CCM_CS1CDR_SAI3_CLK_PODF(0x3f))
  1565. #define CCM_CDCDR_SPDIF0_CLK_SEL_MASK (CCM_CDCDR_SPDIF0_CLK_SEL(0x03))
  1566. #define CCM_CDCDR_SPDIF0_CLK_PRED_MASK (CCM_CDCDR_SPDIF0_CLK_PRED(0x07))
  1567. #define CCM_CDCDR_SPDIF0_CLK_PODF_MASK (CCM_CDCDR_SPDIF0_CLK_PODF(0x07))
  1568. // 14.8: page 1096
  1569. #define IMXRT_CCM_ANALOG (*(IMXRT_REGISTER32_t *)IMXRT_CCM_ANALOG_ADDRESS)
  1570. #define CCM_ANALOG_PLL_ARM (IMXRT_CCM_ANALOG.offset000)
  1571. #define CCM_ANALOG_PLL_ARM_SET (IMXRT_CCM_ANALOG.offset004)
  1572. #define CCM_ANALOG_PLL_ARM_CLR (IMXRT_CCM_ANALOG.offset008)
  1573. #define CCM_ANALOG_PLL_ARM_TOG (IMXRT_CCM_ANALOG.offset00C)
  1574. #define CCM_ANALOG_PLL_USB1 (IMXRT_CCM_ANALOG.offset010)
  1575. #define CCM_ANALOG_PLL_USB1_SET (IMXRT_CCM_ANALOG.offset014)
  1576. #define CCM_ANALOG_PLL_USB1_CLR (IMXRT_CCM_ANALOG.offset018)
  1577. #define CCM_ANALOG_PLL_USB1_TOG (IMXRT_CCM_ANALOG.offset01C)
  1578. #define CCM_ANALOG_PLL_USB2 (IMXRT_CCM_ANALOG.offset020)
  1579. #define CCM_ANALOG_PLL_USB2_SET (IMXRT_CCM_ANALOG.offset024)
  1580. #define CCM_ANALOG_PLL_USB2_CLR (IMXRT_CCM_ANALOG.offset028)
  1581. #define CCM_ANALOG_PLL_USB2_TOG (IMXRT_CCM_ANALOG.offset02C)
  1582. #define CCM_ANALOG_PLL_SYS (IMXRT_CCM_ANALOG.offset030)
  1583. #define CCM_ANALOG_PLL_SYS_SET (IMXRT_CCM_ANALOG.offset034)
  1584. #define CCM_ANALOG_PLL_SYS_CLR (IMXRT_CCM_ANALOG.offset038)
  1585. #define CCM_ANALOG_PLL_SYS_TOG (IMXRT_CCM_ANALOG.offset03C)
  1586. #define CCM_ANALOG_PLL_SYS_SS (IMXRT_CCM_ANALOG.offset040)
  1587. #define CCM_ANALOG_PLL_SYS_NUM (IMXRT_CCM_ANALOG.offset050)
  1588. #define CCM_ANALOG_PLL_SYS_DENOM (IMXRT_CCM_ANALOG.offset060)
  1589. #define CCM_ANALOG_PLL_AUDIO (IMXRT_CCM_ANALOG.offset070)
  1590. #define CCM_ANALOG_PLL_AUDIO_SET (IMXRT_CCM_ANALOG.offset074)
  1591. #define CCM_ANALOG_PLL_AUDIO_CLR (IMXRT_CCM_ANALOG.offset078)
  1592. #define CCM_ANALOG_PLL_AUDIO_TOG (IMXRT_CCM_ANALOG.offset07C)
  1593. #define CCM_ANALOG_PLL_AUDIO_NUM (IMXRT_CCM_ANALOG.offset080)
  1594. #define CCM_ANALOG_PLL_AUDIO_DENOM (IMXRT_CCM_ANALOG.offset090)
  1595. #define CCM_ANALOG_PLL_VIDEO (IMXRT_CCM_ANALOG.offset0A0)
  1596. #define CCM_ANALOG_PLL_VIDEO_SET (IMXRT_CCM_ANALOG.offset0A4)
  1597. #define CCM_ANALOG_PLL_VIDEO_CLR (IMXRT_CCM_ANALOG.offset0A8)
  1598. #define CCM_ANALOG_PLL_VIDEO_TOG (IMXRT_CCM_ANALOG.offset0AC)
  1599. #define CCM_ANALOG_PLL_VIDEO_NUM (IMXRT_CCM_ANALOG.offset0B0)
  1600. #define CCM_ANALOG_PLL_VIDEO_DENOM (IMXRT_CCM_ANALOG.offset0C0)
  1601. #define CCM_ANALOG_PLL_ENET (IMXRT_CCM_ANALOG.offset0EC)
  1602. #define CCM_ANALOG_PLL_ENET_SET (IMXRT_CCM_ANALOG.offset0E4)
  1603. #define CCM_ANALOG_PLL_ENET_CLR (IMXRT_CCM_ANALOG.offset0E8)
  1604. #define CCM_ANALOG_PLL_ENET_TOG (IMXRT_CCM_ANALOG.offset0EC)
  1605. #define CCM_ANALOG_PFD_480 (IMXRT_CCM_ANALOG.offset0F0)
  1606. #define CCM_ANALOG_PFD_480_SET (IMXRT_CCM_ANALOG.offset0F4)
  1607. #define CCM_ANALOG_PFD_480_CLR (IMXRT_CCM_ANALOG.offset0F8)
  1608. #define CCM_ANALOG_PFD_480_TOG (IMXRT_CCM_ANALOG.offset0FC)
  1609. #define CCM_ANALOG_PFD_528 (IMXRT_CCM_ANALOG.offset100)
  1610. #define CCM_ANALOG_PFD_528_SET (IMXRT_CCM_ANALOG.offset104)
  1611. #define CCM_ANALOG_PFD_528_CLR (IMXRT_CCM_ANALOG.offset108)
  1612. #define CCM_ANALOG_PFD_528_TOG (IMXRT_CCM_ANALOG.offset10C)
  1613. #define CCM_ANALOG_MISC0 (IMXRT_CCM_ANALOG.offset150)
  1614. #define CCM_ANALOG_MISC0_SET (IMXRT_CCM_ANALOG.offset154)
  1615. #define CCM_ANALOG_MISC0_CLR (IMXRT_CCM_ANALOG.offset158)
  1616. #define CCM_ANALOG_MISC0_TOG (IMXRT_CCM_ANALOG.offset15C)
  1617. #define CCM_ANALOG_MISC1 (IMXRT_CCM_ANALOG.offset160)
  1618. #define CCM_ANALOG_MISC1_SET (IMXRT_CCM_ANALOG.offset164)
  1619. #define CCM_ANALOG_MISC1_CLR (IMXRT_CCM_ANALOG.offset168)
  1620. #define CCM_ANALOG_MISC1_TOG (IMXRT_CCM_ANALOG.offset16C)
  1621. #define CCM_ANALOG_MISC2 (IMXRT_CCM_ANALOG.offset170)
  1622. #define CCM_ANALOG_MISC2_SET (IMXRT_CCM_ANALOG.offset174)
  1623. #define CCM_ANALOG_MISC2_CLR (IMXRT_CCM_ANALOG.offset178)
  1624. #define CCM_ANALOG_MISC2_TOG (IMXRT_CCM_ANALOG.offset17C)
  1625. #define CCM_ANALOG_PLL_ARM_LOCK ((uint32_t)(1<<31))
  1626. #define CCM_ANALOG_PLL_ARM_BYPASS ((uint32_t)(1<<16))
  1627. #define CCM_ANALOG_PLL_ARM_ENABLE ((uint32_t)(1<<13))
  1628. #define CCM_ANALOG_PLL_ARM_POWERDOWN ((uint32_t)(1<<12))
  1629. #define CCM_ANALOG_PLL_ARM_DIV_SELECT(n) ((uint32_t)(((n) & 0x7F) << 0))
  1630. #define CCM_ANALOG_PLL_ARM_DIV_SELECT_MASK ((uint32_t)(0x7F << 0))
  1631. #define CCM_ANALOG_PLL_USB1_LOCK ((uint32_t)(1<<31))
  1632. #define CCM_ANALOG_PLL_USB1_BYPASS ((uint32_t)(1<<16))
  1633. #define CCM_ANALOG_PLL_USB1_ENABLE ((uint32_t)(1<<13))
  1634. #define CCM_ANALOG_PLL_USB1_POWER ((uint32_t)(1<<12))
  1635. #define CCM_ANALOG_PLL_USB1_EN_USB_CLKS ((uint32_t)(1<<6))
  1636. #define CCM_ANALOG_PLL_USB1_DIV_SELECT ((uint32_t)(1<<1))
  1637. #define CCM_ANALOG_PLL_USB2_LOCK ((uint32_t)(1<<31))
  1638. #define CCM_ANALOG_PLL_USB2_BYPASS ((uint32_t)(1<<16))
  1639. #define CCM_ANALOG_PLL_USB2_ENABLE ((uint32_t)(1<<13))
  1640. #define CCM_ANALOG_PLL_USB2_POWER ((uint32_t)(1<<12))
  1641. #define CCM_ANALOG_PLL_USB2_EN_USB_CLKS ((uint32_t)(1<<6))
  1642. #define CCM_ANALOG_PLL_USB2_DIV_SELECT ((uint32_t)(1<<1))
  1643. #define CCM_ANALOG_PLL_SYS_LOCK ((uint32_t)(1<<31))
  1644. #define CCM_ANALOG_PLL_SYS_BYPASS ((uint32_t)(1<<16))
  1645. #define CCM_ANALOG_PLL_SYS_ENABLE ((uint32_t)(1<<13))
  1646. #define CCM_ANALOG_PLL_SYS_POWERDOWN ((uint32_t)(1<<12))
  1647. #define CCM_ANALOG_PLL_SYS_DIV_SELECT ((uint32_t)(1<<1))
  1648. #define CCM_ANALOG_PLL_AUDIO_POST_DIV_SELECT(n) ((uint32_t)(((n) & 0x03) <<19))
  1649. #define CCM_ANALOG_PLL_AUDIO_BYPASS ((uint32_t)(1<<16))
  1650. #define CCM_ANALOG_PLL_AUDIO_BYPASS_CLK_SRC(n) ((uint32_t)(((n) & 0x03) <<14))
  1651. #define CCM_ANALOG_PLL_AUDIO_ENABLE ((uint32_t)(1<<13))
  1652. #define CCM_ANALOG_PLL_AUDIO_POWERDOWN ((uint32_t)(1<<12))
  1653. #define CCM_ANALOG_PLL_AUDIO_DIV_SELECT(n) ((uint32_t)((n) & ((1<<6)-1)))
  1654. #define CCM_ANALOG_PLL_VIDEO_LOCK ((uint32_t)(1<<31))
  1655. #define CCM_ANALOG_PLL_VIDEO_POST_DIV_SELECT(n) ((uint32_t)(((n) & 0x03) << 19))
  1656. #define CCM_ANALOG_PLL_VIDEO_BYPASS ((uint32_t)(1<<16))
  1657. #define CCM_ANALOG_PLL_VIDEO_BYPASS_CLK_SRC(n) ((uint32_t)(((n) & 0x03) << 14))
  1658. #define CCM_ANALOG_PLL_VIDEO_ENABLE ((uint32_t)(1<<13))
  1659. #define CCM_ANALOG_PLL_VIDEO_POWERDOWN ((uint32_t)(1<<12))
  1660. #define CCM_ANALOG_PLL_VIDEO_DIV_SELECT(n) ((uint32_t)(((n) & 0x7F) << 0))
  1661. #define CCM_ANALOG_PLL_ENET_LOCK ((uint32_t)(1<<31))
  1662. #define CCM_ANALOG_PLL_ENET_ENET_25M_REF_EN ((uint32_t)(1<<21))
  1663. #define CCM_ANALOG_PLL_ENET_ENET2_REF_EN ((uint32_t)(1<<20))
  1664. #define CCM_ANALOG_PLL_ENET_BYPASS ((uint32_t)(1<<16))
  1665. #define CCM_ANALOG_PLL_ENET_BYPASS_CLK_SRC(n) ((uint32_t)(((n) & 0x03) << 14))
  1666. #define CCM_ANALOG_PLL_ENET_ENABLE ((uint32_t)(1<<13))
  1667. #define CCM_ANALOG_PLL_ENET_POWERDOWN ((uint32_t)(1<<12))
  1668. #define CCM_ANALOG_PLL_ENET_ENET2_DIV_SELECT(n) ((uint32_t)(((n) & 0x03) << 2))
  1669. #define CCM_ANALOG_PLL_ENET_DIV_SELECT(n) ((uint32_t)(((n) & 0x03) << 0))
  1670. #define CCM_ANALOG_MISC0_XTAL_24M_PWD ((uint32_t)(1<<30))
  1671. #define CCM_ANALOG_MISC0_RTC_XTAL_SOURCE ((uint32_t)(1<<29))
  1672. #define CCM_ANALOG_MISC0_CLKGATE_DELAY(n) ((uint32_t)(((n) & 0x07) << 26))
  1673. #define CCM_ANALOG_MISC0_CLKGATE_CTRL ((uint32_t)(1<<25))
  1674. #define CCM_ANALOG_MISC0_OSC_XTALOK_EN ((uint32_t)(1<<16))
  1675. #define CCM_ANALOG_MISC0_OSC_XTALOK ((uint32_t)(1<<15))
  1676. #define CCM_ANALOG_MISC0_OSC_I(n) ((uint32_t)(((n) & 0x03) << 13))
  1677. #define CCM_ANALOG_MISC0_DISCON_HIGH_SNVS ((uint32_t)(1<<12))
  1678. #define CCM_ANALOG_MISC0_STOP_MODE_CONFIG(n) ((uint32_t)(((n) & 0x03) << 10))
  1679. #define CCM_ANALOG_MISC0_REFTOP_VBGUP ((uint32_t)(1<<7))
  1680. #define CCM_ANALOG_MISC0_REFTOP_VBGADJ(n) ((uint32_t)(((n) & 0x07) << 4))
  1681. #define CCM_ANALOG_MISC0_REFTOP_SELFBIASOFF ((uint32_t)(1<<3))
  1682. #define CCM_ANALOG_MISC0_REFTOP_PWD ((uint32_t)(1<<0))
  1683. #define CCM_ANALOG_MISC1_IRQ_DIG_BO ((uint32_t)(1<<31))
  1684. #define CCM_ANALOG_MISC1_IRQ_ANA_BO ((uint32_t)(1<<30))
  1685. #define CCM_ANALOG_MISC1_IRQ_TEMPHIGH ((uint32_t)(1<<29))
  1686. #define CCM_ANALOG_MISC1_IRQ_TEMPLOW ((uint32_t)(1<<28))
  1687. #define CCM_ANALOG_MISC1_IRQ_TEMPPANIC ((uint32_t)(1<<27))
  1688. #define CCM_ANALOG_MISC1_PFD_528_AUTOGATE_EN ((uint32_t)(1<<17))
  1689. #define CCM_ANALOG_MISC1_PFD_480_AUTOGATE_EN ((uint32_t)(1<<16))
  1690. #define CCM_ANALOG_MISC1_LVDSCLK1_IBEN ((uint32_t)(1<<12))
  1691. #define CCM_ANALOG_MISC1_LVDSCLK1_OBEN ((uint32_t)(1<<10))
  1692. #define CCM_ANALOG_MISC1_LVDS1_CLK_SEL(n) ((uint32_t)(((n) & 0x1F) << 0))
  1693. #define CCM_ANALOG_MISC2_VIDEO_DIV(n) ((uint32_t)(((n) & 0x03) << 30))
  1694. #define CCM_ANALOG_MISC2_REG2_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 28))
  1695. #define CCM_ANALOG_MISC2_REG1_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 26))
  1696. #define CCM_ANALOG_MISC2_REG0_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 24))
  1697. #define CCM_ANALOG_MISC2_DIV_MSB ((uint32_t)(1<<23))
  1698. #define CCM_ANALOG_MISC2_AUDIO_DIV_MSB ((uint32_t)(1<<23))
  1699. #define CCM_ANALOG_MISC2_REG2_OK ((uint32_t)(1<<22))
  1700. #define CCM_ANALOG_MISC2_REG2_ENABLE_BO ((uint32_t)(1<<21))
  1701. #define CCM_ANALOG_MISC2_REG2_BO_STATUS ((uint32_t)(1<<19))
  1702. #define CCM_ANALOG_MISC2_REG2_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 16))
  1703. #define CCM_ANALOG_MISC2_DIV_LSB ((uint32_t)(1<<15))
  1704. #define CCM_ANALOG_MISC2_AUDIO_DIV_LSB ((uint32_t)(1<<15))
  1705. #define CCM_ANALOG_MISC2_REG1_OK ((uint32_t)(1<<14))
  1706. #define CCM_ANALOG_MISC2_REG1_ENABLE_BO ((uint32_t)(1<<13))
  1707. #define CCM_ANALOG_MISC2_REG1_BO_STATUS ((uint32_t)(1<<11))
  1708. #define CCM_ANALOG_MISC2_REG1_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 8))
  1709. #define CCM_ANALOG_MISC2_PLL3_DISABLE ((uint32_t)(1<<7))
  1710. #define CCM_ANALOG_MISC2_REG0_OK ((uint32_t)(1<<6))
  1711. #define CCM_ANALOG_MISC2_REG0_ENABLE_BO ((uint32_t)(1<<5))
  1712. #define CCM_ANALOG_MISC2_REG0_BO_STATUS ((uint32_t)(1<<3))
  1713. #define CCM_ANALOG_MISC2_REG0_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 0))
  1714. #define CCM_ANALOG_PLL_AUDIO_NUM_MASK (((1<<29)-1))
  1715. #define CCM_ANALOG_PLL_AUDIO_DENOM_MASK (((1<<29)-1))
  1716. #define CCM_ANALOG_PLL_AUDIO_LOCK ((uint32_t)(1<<31))
  1717. // 34.8: page 1818
  1718. #define IMXRT_CSI (*(IMXRT_REGISTER32_t *)IMXRT_CSI_ADDRESS)
  1719. #define CSI_CSICR1 (IMXRT_CSI.offset000)
  1720. #define CSI_CSICR2 (IMXRT_CSI.offset004)
  1721. #define CSI_CSICR3 (IMXRT_CSI.offset008)
  1722. #define CSI_CSISTATFIFO (IMXRT_CSI.offset00C)
  1723. #define CSI_CSIRFIFO (IMXRT_CSI.offset010)
  1724. #define CSI_CSIRXCNT (IMXRT_CSI.offset014)
  1725. #define CSI_CSISR (IMXRT_CSI.offset018)
  1726. #define CSI_CSIDMASA_STATFIFO (IMXRT_CSI.offset020)
  1727. #define CSI_CSIDMATS_STATFIFO (IMXRT_CSI.offset024)
  1728. #define CSI_CSIDMASA_FB1 (IMXRT_CSI.offset028)
  1729. #define CSI_CSIDMASA_FB2 (IMXRT_CSI.offset02C)
  1730. #define CSI_CSIFBUF_PARA (IMXRT_CSI.offset030)
  1731. #define CSI_CSIIMAG_PARA (IMXRT_CSI.offset034)
  1732. #define CSI_CSICR18 (IMXRT_CSI.offset048)
  1733. #define CSI_CSICR19 (IMXRT_CSI.offset04C)
  1734. #define CSI_CSICR1_SWAP16_EN ((uint32_t)(1<<31))
  1735. #define CSI_CSICR1_EXT_VSYNC ((uint32_t)(1<<30))
  1736. #define CSI_CSICR1_EOF_INT_EN ((uint32_t)(1<<29))
  1737. #define CSI_CSICR1_PrP_IF_EN ((uint32_t)(1<<28))
  1738. #define CSI_CSICR1_CCIR_MODE ((uint32_t)(1<<27))
  1739. #define CSI_CSICR1_COF_INT_EN ((uint32_t)(1<<26))
  1740. #define CSI_CSICR1_SF_OR_INTEN ((uint32_t)(1<<25))
  1741. #define CSI_CSICR1_RF_OR_INTEN ((uint32_t)(1<<24))
  1742. #define CSI_CSICR1_SFF_DMA_DONE_INTEN ((uint32_t)(1<<22))
  1743. #define CSI_CSICR1_STATFF_INTEN ((uint32_t)(1<<21))
  1744. #define CSI_CSICR1_FB2_DMA_DONE_INTEN ((uint32_t)(1<<20))
  1745. #define CSI_CSICR1_FB1_DMA_DONE_INTEN ((uint32_t)(1<<19))
  1746. #define CSI_CSICR1_RXFF_INTEN ((uint32_t)(1<<18))
  1747. #define CSI_CSICR1_SOF_POL ((uint32_t)(1<<17))
  1748. #define CSI_CSICR1_SOF_INTEN ((uint32_t)(1<<16))
  1749. #define CSI_CSICR1_HSYNC_POL ((uint32_t)(1<<11))
  1750. #define CSI_CSICR1_CCIR_EN ((uint32_t)(1<<10))
  1751. #define CSI_CSICR1_FCC ((uint32_t)(1<<8))
  1752. #define CSI_CSICR1_PACK_DIR ((uint32_t)(1<<7))
  1753. #define CSI_CSICR1_CLR_STATFIFO ((uint32_t)(1<<6))
  1754. #define CSI_CSICR1_CLR_RXFIFO ((uint32_t)(1<<5))
  1755. #define CSI_CSICR1_GCLK_MODE ((uint32_t)(1<<4))
  1756. #define CSI_CSICR1_INV_DATA ((uint32_t)(1<<3))
  1757. #define CSI_CSICR1_INV_PCLK ((uint32_t)(1<<2))
  1758. #define CSI_CSICR1_REDGE ((uint32_t)(1<<1))
  1759. #define CSI_CSICR1_PIXEL_BIT ((uint32_t)(1<<0))
  1760. #define CSI_CSICR2_DMA_BURST_TYPE_RFF(n) ((uint32_t)(((n) & 0x3)<<30))
  1761. #define CSI_CSICR2_DMA_BURST_TYPE_SFF(n) ((uint32_t)(((n) & 0x3)<<28))
  1762. #define CSI_CSICR2_DRM ((uint32_t)(1<<26))
  1763. #define CSI_CSICR2_AFS(n) ((uint32_t)(((n) & 0x3)<<24))
  1764. #define CSI_CSICR2_SCE ((uint32_t)(1<<23))
  1765. #define CSI_CSICR2_BTS(n) ((uint32_t)(((n) & 0x3)<<19))
  1766. #define CSI_CSICR2_LVRM(n) ((uint32_t)(((n) & 0x7)<<16))
  1767. #define CSI_CSICR2_VSC(n) ((uint32_t)(((n) & 0xff)<<8))
  1768. #define CSI_CSICR2_HSC(n) ((uint32_t)(((n) & 0xff)<<0))
  1769. #define CSI_CSICR3_FRMCNT(n) ((uint32_t)(((n) & 0xffff)<<16))
  1770. #define CSI_CSICR3_FRMCNT_RST ((uint32_t)(1<<15))
  1771. #define CSI_CSICR3_DMA_REFLASH_RFF ((uint32_t)(1<<14))
  1772. #define CSI_CSICR3_DMA_REFLASH_SFF ((uint32_t)(1<<13))
  1773. #define CSI_CSICR3_DMA_REQ_EN_RFF ((uint32_t)(1<<12))
  1774. #define CSI_CSICR3_DMA_REQ_EN_SFF ((uint32_t)(1<<11))
  1775. #define CSI_CSICR3_STATFF_LEVEL(n) ((uint32_t)(((n) & 0x7)<<8))
  1776. #define CSI_CSICR3_HRESP_ERR_EN ((uint32_t)(1<<7))
  1777. #define CSI_CSICR3_RxFF_LEVEL(n) ((uint32_t)(((n) & 0x7)<<4))
  1778. #define CSI_CSICR3_TWO_8BIT_SENSOR ((uint32_t)(1<<3))
  1779. #define CSI_CSICR3_ZERO_PACK_EN ((uint32_t)(1<<2))
  1780. #define CSI_CSICR3_ECC_INT_EN ((uint32_t)(1<<1))
  1781. #define CSI_CSICR3_ECC_AUTO_EN ((uint32_t)(1<<0))
  1782. #define CSI_CSISR_BASEADDR_CHHANGE_ERROR ((uint32_t)(1<<28))
  1783. #define CSI_CSISR_DMA_FIELD0_DONE ((uint32_t)(1<<27))
  1784. #define CSI_CSISR_DMA_FIELD1_DONE ((uint32_t)(1<<26))
  1785. #define CSI_CSISR_SF_OR_INT ((uint32_t)(1<<25))
  1786. #define CSI_CSISR_RF_OR_INT ((uint32_t)(1<<24))
  1787. #define CSI_CSISR_DMA_TSF_DONE_SFF ((uint32_t)(1<<22))
  1788. #define CSI_CSISR_STATFF_INT ((uint32_t)(1<<21))
  1789. #define CSI_CSISR_DMA_TSF_DONE_FB2 ((uint32_t)(1<<20))
  1790. #define CSI_CSISR_DMA_TSF_DONE_FB1 ((uint32_t)(1<<19))
  1791. #define CSI_CSISR_RxFF_INT ((uint32_t)(1<<18))
  1792. #define CSI_CSISR_EOF_INT ((uint32_t)(1<<17))
  1793. #define CSI_CSISR_SOF_INT ((uint32_t)(1<<16))
  1794. #define CSI_CSISR_F2_INT ((uint32_t)(1<<15))
  1795. #define CSI_CSISR_F1_INT ((uint32_t)(1<<14))
  1796. #define CSI_CSISR_COF_INT ((uint32_t)(1<<13))
  1797. #define CSI_CSISR_HRESP_ERR_INT ((uint32_t)(1<<7))
  1798. #define CSI_CSISR_ECC_INT ((uint32_t)(1<<1))
  1799. #define CSI_CSISR_DRDY ((uint32_t)(1<<0))
  1800. #define CSI_CSIFBUF_PARA_DEINTERLACE_STRIDE(n) ((uint32_t)(((n) & 0xffff)<<16))
  1801. #define CSI_CSIFBUF_PARA_FBUF_STRIDE(n) ((uint32_t)(((n) & 0xffff)<<0))
  1802. #define CSI_CSIIMAG_PARA_IMAGE_WIDTH(n) ((uint32_t)(((n) & 0xffff)<<16))
  1803. #define CSI_CSIIMAG_PARA_IMAGE_HEIGHT(n) ((uint32_t)(((n) & 0xffff)<<0))
  1804. #define CSI_CSICR18_CSI_ENABLE ((uint32_t)(1<<31))
  1805. #define CSI_CSICR18_MASK_OPTION(n) ((uint32_t)(((n) & 0x3)<<18))
  1806. #define CSI_CSICR18_AHB_HPROT(n) ((uint32_t)(((n) & 0xf)<<12))
  1807. #define CSI_CSICR18_RGB888A_FORMAT_SEL ((uint32_t)(1<<10))
  1808. #define CSI_CSICR18_BASEADDR_CHANGE_ERROR_IE ((uint32_t)(1<<9))
  1809. #define CSI_CSICR18_LAST_DMA_REQ_SEL ((uint32_t)(1<<8))
  1810. #define CSI_CSICR18_DMA_FIELD1_DONE_IE ((uint32_t)(1<<7))
  1811. #define CSI_CSICR18_FIELD0_DONE_IE ((uint32_t)(1<<6))
  1812. #define CSI_CSICR18_BASEADDR_SWITCH_SEL ((uint32_t)(1<<5))
  1813. #define CSI_CSICR18_BASEADDR_SWITCH_EN ((uint32_t)(1<<4))
  1814. #define CSI_CSICR18_PARALLEL24_EN ((uint32_t)(1<<3))
  1815. #define CSI_CSICR18_DEINTERLACE_EN ((uint32_t)(1<<2))
  1816. #define CSI_CSICR19_DMA_RFIFO_HIGHEST_FIFO_LEVEL(n) ((uint32_t)(((n) & 0xf)<<12))
  1817. // 18.7.1.1: page 1209
  1818. #define IMXRT_DCDC (*(IMXRT_REGISTER32_t *)IMXRT_DCDC_ADDRESS)
  1819. #define DCDC_REG0 (IMXRT_DCDC.offset000)
  1820. #define DCDC_REG1 (IMXRT_DCDC.offset004)
  1821. #define DCDC_REG2 (IMXRT_DCDC.offset008)
  1822. #define DCDC_REG3 (IMXRT_DCDC.offset00C)
  1823. #define DCDC_REG0_STS_DC_OK ((uint32_t)(1<<31))
  1824. #define DCDC_REG0_XTAL_24M_OK ((uint32_t)(1<<29))
  1825. #define DCDC_REG0_CURRENT_ALERT_RESET ((uint32_t)(1<<28))
  1826. #define DCDC_REG0_XTALOK_DISABLE ((uint32_t)(1<<27))
  1827. #define DCDC_REG0_PWD_CMP_OFFSET ((uint32_t)(1<<26))
  1828. #define DCDC_REG0_LP_HIGH_HYS ((uint32_t)(1<<21))
  1829. #define DCDC_REG0_LP_OVERLOAD_FREQ_SEL ((uint32_t)(1<<20))
  1830. #define DCDC_REG0_LP_OVERLOAD_THRSH(n) ((uint32_t)(((n) & 0x03) << 18))
  1831. #define DCDC_REG0_PWD_HIGH_VOLT_DET ((uint32_t)(1<<17))
  1832. #define DCDC_REG0_EN_LP_OVERLOAD_SNS ((uint32_t)(1<<16))
  1833. #define DCDC_REG0_ADJ_POSLIMIT_BUCK(n) ((uint32_t)(((n) & 0x0F) << 12))
  1834. #define DCDC_REG0_PWD_CMP_BATT_DET ((uint32_t)(1<<11))
  1835. #define DCDC_REG0_OVERCUR_TRIG_ADJ(n) ((uint32_t)(((n) & 0x03) << 9))
  1836. #define DCDC_REG0_PWD_OVERCUR_DET ((uint32_t)(1<<8))
  1837. #define DCDC_REG0_CUR_SNS_THRSH(n) ((uint32_t)(((n) & 0x07) << 5))
  1838. #define DCDC_REG0_PWD_CUR_SNS_CMP ((uint32_t)(1<<4))
  1839. #define DCDC_REG0_PWD_OSC_INT ((uint32_t)(1<<3))
  1840. #define DCDC_REG0_SEL_CLK ((uint32_t)(1<<2))
  1841. #define DCDC_REG0_DISABLE_AUTO_CLK_SWITCH ((uint32_t)(1<<1))
  1842. #define DCDC_REG0_PWD_ZCD ((uint32_t)(1<<0))
  1843. #define DCDC_REG1_VBG_TRIM(n) ((uint32_t)(((n) & 0x1F) << 24))
  1844. #define DCDC_REG1_LOOPCTRL_EN_HYST ((uint32_t)(1<<23))
  1845. #define DCDC_REG1_LOOPCTRL_HST_THRESH ((uint32_t)(1<<21))
  1846. #define DCDC_REG1_LP_CMP_ISRC_SEL(n) ((uint32_t)(((n) & 0x03) << 12))
  1847. #define DCDC_REG1_REG_RLOAD_SW ((uint32_t)(1<<9))
  1848. #define DCDC_REG1_REG_FBK_SEL(n) ((uint32_t)(((n) & 0x03) << 7))
  1849. #define DCDC_REG2_DCM_SET_CTRL ((uint32_t)(1<<28))
  1850. #define DCDC_REG2_DISABLE_PULSE_SKIP ((uint32_t)(1<<27))
  1851. #define DCDC_REG2_LOOPCTRL_HYST_SIGN ((uint32_t)(1<<13))
  1852. #define DCDC_REG2_LOOPCTRL_RCSCALE_THRSH ((uint32_t)(1<<12))
  1853. #define DCDC_REG2_LOOPCTRL_EN_RCSCALE ((uint32_t)(((n) & 0x07) << 9))
  1854. #define DCDC_REG2_LOOPCTRL_DC_FF ((uint32_t)(((n) & 0x07) << 6))
  1855. #define DCDC_REG2_LOOPCTRL_DC_R ((uint32_t)(((n) & 0x0F) << 2))
  1856. #define DCDC_REG2_LOOPCTRL_DC_C ((uint32_t)(((n) & 0x03) << 0))
  1857. #define DCDC_REG3_DISABLE_STEP ((uint32_t)(1<<30))
  1858. #define DCDC_REG3_MISC_DISABLEFET_LOGIC ((uint32_t)(1<<28))
  1859. #define DCDC_REG3_MISC_DELAY_TIMING ((uint32_t)(1<<27))
  1860. #define DCDC_REG3_MINPWR_DC_HALFCLK ((uint32_t)(1<<24))
  1861. #define DCDC_REG3_TARGET_LP(n) ((uint32_t)(((n) & 0x07) << 8))
  1862. #define DCDC_REG3_TRG(n) ((uint32_t)(((n) & 0x1F) << 0))
  1863. #define DCDC_REG3_TRG_MASK ((uint32_t)(0x1F << 0))
  1864. // 5.6.1.1: page 85
  1865. #define IMXRT_DMAMUX (*(IMXRT_REGISTER32_t *)IMXRT_DMAMUX_ADDRESS)
  1866. #define DMAMUX_CHCFG0 (IMXRT_DMAMUX.offset000)
  1867. #define DMAMUX_CHCFG1 (IMXRT_DMAMUX.offset004)
  1868. #define DMAMUX_CHCFG2 (IMXRT_DMAMUX.offset008)
  1869. #define DMAMUX_CHCFG3 (IMXRT_DMAMUX.offset00C)
  1870. #define DMAMUX_CHCFG4 (IMXRT_DMAMUX.offset010)
  1871. #define DMAMUX_CHCFG5 (IMXRT_DMAMUX.offset014)
  1872. #define DMAMUX_CHCFG6 (IMXRT_DMAMUX.offset018)
  1873. #define DMAMUX_CHCFG7 (IMXRT_DMAMUX.offset01C)
  1874. #define DMAMUX_CHCFG8 (IMXRT_DMAMUX.offset020)
  1875. #define DMAMUX_CHCFG9 (IMXRT_DMAMUX.offset024)
  1876. #define DMAMUX_CHCFG10 (IMXRT_DMAMUX.offset028)
  1877. #define DMAMUX_CHCFG11 (IMXRT_DMAMUX.offset02C)
  1878. #define DMAMUX_CHCFG12 (IMXRT_DMAMUX.offset030)
  1879. #define DMAMUX_CHCFG13 (IMXRT_DMAMUX.offset034)
  1880. #define DMAMUX_CHCFG14 (IMXRT_DMAMUX.offset038)
  1881. #define DMAMUX_CHCFG15 (IMXRT_DMAMUX.offset03C)
  1882. #define DMAMUX_CHCFG16 (IMXRT_DMAMUX.offset040)
  1883. #define DMAMUX_CHCFG17 (IMXRT_DMAMUX.offset044)
  1884. #define DMAMUX_CHCFG18 (IMXRT_DMAMUX.offset048)
  1885. #define DMAMUX_CHCFG19 (IMXRT_DMAMUX.offset04C)
  1886. #define DMAMUX_CHCFG20 (IMXRT_DMAMUX.offset050)
  1887. #define DMAMUX_CHCFG21 (IMXRT_DMAMUX.offset054)
  1888. #define DMAMUX_CHCFG22 (IMXRT_DMAMUX.offset058)
  1889. #define DMAMUX_CHCFG23 (IMXRT_DMAMUX.offset05C)
  1890. #define DMAMUX_CHCFG24 (IMXRT_DMAMUX.offset060)
  1891. #define DMAMUX_CHCFG25 (IMXRT_DMAMUX.offset064)
  1892. #define DMAMUX_CHCFG26 (IMXRT_DMAMUX.offset068)
  1893. #define DMAMUX_CHCFG27 (IMXRT_DMAMUX.offset06C)
  1894. #define DMAMUX_CHCFG28 (IMXRT_DMAMUX.offset070)
  1895. #define DMAMUX_CHCFG29 (IMXRT_DMAMUX.offset074)
  1896. #define DMAMUX_CHCFG30 (IMXRT_DMAMUX.offset078)
  1897. #define DMAMUX_CHCFG31 (IMXRT_DMAMUX.offset07C)
  1898. #define DMAMUX_CHCFG_ENBL ((uint32_t)(1<<31))
  1899. #define DMAMUX_CHCFG_TRIG ((uint32_t)(1<<30))
  1900. #define DMAMUX_CHCFG_A_ON ((uint32_t)(1<<29))
  1901. // 6.6.5.1: page 116
  1902. typedef struct {
  1903. volatile uint32_t CR; // 0
  1904. volatile uint32_t ES; // 4
  1905. uint32_t unused1; // 8
  1906. volatile uint32_t ERQ; // C
  1907. uint32_t unused2; // 10
  1908. volatile uint32_t EEI; // 14
  1909. volatile uint8_t CEEI; // 18
  1910. volatile uint8_t SEEI; // 19
  1911. volatile uint8_t CERQ; // 1A
  1912. volatile uint8_t SERQ; // 1B
  1913. volatile uint8_t CDNE; // 1C
  1914. volatile uint8_t SSRT; // 1D
  1915. volatile uint8_t CERR; // 1E
  1916. volatile uint8_t CINT; // 1F
  1917. uint32_t unused3; // 20
  1918. volatile uint32_t INT; // 24
  1919. uint32_t unused4; // 28
  1920. volatile uint32_t ERR; // 2C
  1921. uint32_t unused5; // 30
  1922. volatile uint32_t HRS; // 34
  1923. uint32_t unused6; // 38
  1924. uint32_t unused7; // 3C
  1925. uint32_t unused8; // 40
  1926. volatile uint32_t EARS; // 44
  1927. uint32_t unused[46];
  1928. volatile uint8_t DCHPRI3;
  1929. volatile uint8_t DCHPRI2;
  1930. volatile uint8_t DCHPRI1;
  1931. volatile uint8_t DCHPRI0;
  1932. volatile uint8_t DCHPRI7;
  1933. volatile uint8_t DCHPRI6;
  1934. volatile uint8_t DCHPRI5;
  1935. volatile uint8_t DCHPRI4;
  1936. volatile uint8_t DCHPRI11;
  1937. volatile uint8_t DCHPRI10;
  1938. volatile uint8_t DCHPRI9;
  1939. volatile uint8_t DCHPRI8;
  1940. volatile uint8_t DCHPRI15;
  1941. volatile uint8_t DCHPRI14;
  1942. volatile uint8_t DCHPRI13;
  1943. volatile uint8_t DCHPRI12;
  1944. volatile uint8_t DCHPRI19;
  1945. volatile uint8_t DCHPRI18;
  1946. volatile uint8_t DCHPRI17;
  1947. volatile uint8_t DCHPRI16;
  1948. volatile uint8_t DCHPRI23;
  1949. volatile uint8_t DCHPRI22;
  1950. volatile uint8_t DCHPRI21;
  1951. volatile uint8_t DCHPRI20;
  1952. volatile uint8_t DCHPRI27;
  1953. volatile uint8_t DCHPRI26;
  1954. volatile uint8_t DCHPRI25;
  1955. volatile uint8_t DCHPRI24;
  1956. volatile uint8_t DCHPRI31;
  1957. volatile uint8_t DCHPRI30;
  1958. volatile uint8_t DCHPRI29;
  1959. volatile uint8_t DCHPRI28;
  1960. } IMXRT_DMA_t;
  1961. typedef struct {
  1962. volatile const void * volatile SADDR;
  1963. int16_t SOFF;
  1964. union {
  1965. uint16_t ATTR;
  1966. struct {
  1967. uint8_t ATTR_DST;
  1968. uint8_t ATTR_SRC;
  1969. };
  1970. };
  1971. union {
  1972. uint32_t NBYTES;
  1973. uint32_t NBYTES_MLNO;
  1974. uint32_t NBYTES_MLOFFNO;
  1975. uint32_t NBYTES_MLOFFYES;
  1976. };
  1977. int32_t SLAST;
  1978. volatile void * volatile DADDR;
  1979. int16_t DOFF;
  1980. union {
  1981. volatile uint16_t CITER;
  1982. volatile uint16_t CITER_ELINKYES;
  1983. volatile uint16_t CITER_ELINKNO;
  1984. };
  1985. int32_t DLASTSGA;
  1986. volatile uint16_t CSR;
  1987. union {
  1988. volatile uint16_t BITER;
  1989. volatile uint16_t BITER_ELINKYES;
  1990. volatile uint16_t BITER_ELINKNO;
  1991. };
  1992. } IMXRT_DMA_TCD_t;
  1993. #define IMXRT_DMA (*(IMXRT_DMA_t *)IMXRT_DMA_ADDRESS)
  1994. #define DMA_CR (IMXRT_DMA.CR)
  1995. #define DMA_ES (IMXRT_DMA.ES)
  1996. #define DMA_ERQ (IMXRT_DMA.ERQ)
  1997. #define DMA_EEI (IMXRT_DMA.EEI)
  1998. #define DMA_CEEI (IMXRT_DMA.CEEI)
  1999. #define DMA_SEEI (IMXRT_DMA.SEEI)
  2000. #define DMA_CERQ (IMXRT_DMA.CERQ)
  2001. #define DMA_SERQ (IMXRT_DMA.SERQ)
  2002. #define DMA_CDNE (IMXRT_DMA.CDNE)
  2003. #define DMA_SSRT (IMXRT_DMA.SSRT)
  2004. #define DMA_CERR (IMXRT_DMA.CERR)
  2005. #define DMA_CINT (IMXRT_DMA.CINT)
  2006. #define DMA_INT (IMXRT_DMA.INT)
  2007. #define DMA_ERR (IMXRT_DMA.ERR)
  2008. #define DMA_HRS (IMXRT_DMA.HRS)
  2009. #define DMA_EARS (IMXRT_DMA.EARS)
  2010. #define DMA_DCHPRI3 (IMXRT_DMA.DCHPRI3)
  2011. #define DMA_DCHPRI2 (IMXRT_DMA.DCHPRI2)
  2012. #define DMA_DCHPRI1 (IMXRT_DMA.DCHPRI1)
  2013. #define DMA_DCHPRI0 (IMXRT_DMA.DCHPRI0)
  2014. #define DMA_DCHPRI7 (IMXRT_DMA.DCHPRI7)
  2015. #define DMA_DCHPRI6 (IMXRT_DMA.DCHPRI6)
  2016. #define DMA_DCHPRI5 (IMXRT_DMA.DCHPRI5)
  2017. #define DMA_DCHPRI4 (IMXRT_DMA.DCHPRI4)
  2018. #define DMA_DCHPRI11 (IMXRT_DMA.DCHPRI11)
  2019. #define DMA_DCHPRI10 (IMXRT_DMA.DCHPRI10)
  2020. #define DMA_DCHPRI9 (IMXRT_DMA.DCHPRI9)
  2021. #define DMA_DCHPRI8 (IMXRT_DMA.DCHPRI8)
  2022. #define DMA_DCHPRI15 (IMXRT_DMA.DCHPRI15)
  2023. #define DMA_DCHPRI14 (IMXRT_DMA.DCHPRI14)
  2024. #define DMA_DCHPRI13 (IMXRT_DMA.DCHPRI13)
  2025. #define DMA_DCHPRI12 (IMXRT_DMA.DCHPRI12)
  2026. #define DMA_DCHPRI19 (IMXRT_DMA.DCHPRI19)
  2027. #define DMA_DCHPRI18 (IMXRT_DMA.DCHPRI18)
  2028. #define DMA_DCHPRI17 (IMXRT_DMA.DCHPRI17)
  2029. #define DMA_DCHPRI16 (IMXRT_DMA.DCHPRI16)
  2030. #define DMA_DCHPRI23 (IMXRT_DMA.DCHPRI23)
  2031. #define DMA_DCHPRI22 (IMXRT_DMA.DCHPRI22)
  2032. #define DMA_DCHPRI21 (IMXRT_DMA.DCHPRI21)
  2033. #define DMA_DCHPRI20 (IMXRT_DMA.DCHPRI20)
  2034. #define DMA_DCHPRI27 (IMXRT_DMA.DCHPRI27)
  2035. #define DMA_DCHPRI26 (IMXRT_DMA.DCHPRI26)
  2036. #define DMA_DCHPRI25 (IMXRT_DMA.DCHPRI25)
  2037. #define DMA_DCHPRI24 (IMXRT_DMA.DCHPRI24)
  2038. #define DMA_DCHPRI31 (IMXRT_DMA.DCHPRI31)
  2039. #define DMA_DCHPRI30 (IMXRT_DMA.DCHPRI30)
  2040. #define DMA_DCHPRI29 (IMXRT_DMA.DCHPRI29)
  2041. #define DMA_DCHPRI28 (IMXRT_DMA.DCHPRI28)
  2042. #define DMA_CR_ACTIVE ((uint32_t)(1<<31)) // 1=DMA is executing
  2043. #define DMA_CR_CX ((uint32_t)(1<<17)) // Cancel Transfer
  2044. #define DMA_CR_ECX ((uint32_t)(1<<16)) // Error Cancel Transfer
  2045. #define DMA_CR_GRP1PRI ((uint32_t)(1<<10))
  2046. #define DMA_CR_GRP0PRI ((uint32_t)(1<<8))
  2047. #define DMA_CR_EMLM ((uint32_t)(1<<7)) // Enable Minor Loop Mapping
  2048. #define DMA_CR_CLM ((uint32_t)(1<<6)) // Continuous Link Mode
  2049. #define DMA_CR_HALT ((uint32_t)(1<<5)) // Halt DMA Operations
  2050. #define DMA_CR_HOE ((uint32_t)(1<<4)) // Halt On Error
  2051. #define DMA_CR_ERGA ((uint32_t)(1<<3)) // Enable Round Robin Group Arb
  2052. #define DMA_CR_ERCA ((uint32_t)(1<<2)) // Enable Round Robin Channel Arb
  2053. #define DMA_CR_EDBG ((uint32_t)(1<<1)) // Enable Debug
  2054. #define DMA_CEEI_CEEI(n) ((uint8_t)(n & 0x1F)) // Clear Enable Error Interrupt
  2055. #define DMA_CEEI_CAEE ((uint8_t)1<<6) // Clear All Enable Error Interrupts
  2056. #define DMA_CEEI_NOP ((uint8_t)1<<7) // NOP
  2057. #define DMA_SEEI_SEEI(n) ((uint8_t)(n & 0x1F)) // Set Enable Error Interrupt
  2058. #define DMA_SEEI_SAEE ((uint8_t)1<<6) // Set All Enable Error Interrupts
  2059. #define DMA_SEEI_NOP ((uint8_t)1<<7) // NOP
  2060. #define DMA_CERQ_CERQ(n) ((uint8_t)(n & 0x1F)) // Clear Enable Request
  2061. #define DMA_CERQ_CAER ((uint8_t)1<<6) // Clear All Enable Requests
  2062. #define DMA_CERQ_NOP ((uint8_t)1<<7) // NOP
  2063. #define DMA_SERQ_SERQ(n) ((uint8_t)(n & 0x1F)) // Set Enable Request
  2064. #define DMA_SERQ_SAER ((uint8_t)1<<6) // Set All Enable Requests
  2065. #define DMA_SERQ_NOP ((uint8_t)1<<7) // NOP
  2066. #define DMA_CDNE_CDNE(n) ((uint8_t)(n & 0x1F)) // Clear Done Bit
  2067. #define DMA_CDNE_CADN ((uint8_t)1<<6) // Clear All Done Bits
  2068. #define DMA_CDNE_NOP ((uint8_t)1<<7) // NOP
  2069. #define DMA_SSRT_SSRT(n) ((uint8_t)(n & 0x1F)) // Set Start Bit
  2070. #define DMA_SSRT_SAST ((uint8_t)1<<6) // Set All Start Bits
  2071. #define DMA_SSRT_NOP ((uint8_t)1<<7) // NOP
  2072. #define DMA_CERR_CERR(n) ((uint8_t)(n & 0x1F)) // Clear Error Indicator
  2073. #define DMA_CERR_CAEI ((uint8_t)1<<6) // Clear All Error Indicators
  2074. #define DMA_CERR_NOP ((uint8_t)1<<7) // NOP
  2075. #define DMA_CINT_CINT(n) ((uint8_t)(n & 0x1F)) // Clear Interrupt Request
  2076. #define DMA_CINT_CAIR ((uint8_t)1<<6) // Clear All Interrupt Requests
  2077. #define DMA_CINT_NOP ((uint8_t)1<<7) // NOP
  2078. #define IMXRT_DMA_TCD ((IMXRT_DMA_TCD_t *)(IMXRT_DMA_ADDRESS+0x1000)
  2079. #define DMA_TCD0_SADDR (IMXRT_DMA_TCD[0].SADDR)
  2080. #define DMA_TCD0_SOFF (IMXRT_DMA_TCD[0].SOFF)
  2081. #define DMA_TCD0_ATTR (IMXRT_DMA_TCD[0].ATTR)
  2082. #define DMA_TCD0_NBYTES (IMXRT_DMA_TCD[0].NBYTES)
  2083. #define DMA_TCD0_NBYTES_MLNO (IMXRT_DMA_TCD[0].NBYTES_MLNO)
  2084. #define DMA_TCD0_NBYTES_MLOFFNO (IMXRT_DMA_TCD[0].NBYTES_MLOFFNO)
  2085. #define DMA_TCD0_NBYTES_MLOFFYES (IMXRT_DMA_TCD[0].NBYTES_MLOFFYES)
  2086. #define DMA_TCD0_SLAST (IMXRT_DMA_TCD[0].SLAST)
  2087. #define DMA_TCD0_DADDR (IMXRT_DMA_TCD[0].DADDR)
  2088. #define DMA_TCD0_DOFF (IMXRT_DMA_TCD[0].DOFF)
  2089. #define DMA_TCD0_CITER (IMXRT_DMA_TCD[0].CITER)
  2090. #define DMA_TCD0_CITER_ELINKYES (IMXRT_DMA_TCD[0].CITER_ELINKYES)
  2091. #define DMA_TCD0_CITER_ELINKNO (IMXRT_DMA_TCD[0].CITER_ELINKNO)
  2092. #define DMA_TCD0_DLASTSGA (IMXRT_DMA_TCD[0].DLASTSGA)
  2093. #define DMA_TCD0_CSR (IMXRT_DMA_TCD[0].CSR)
  2094. #define DMA_TCD0_BITER (IMXRT_DMA_TCD[0].BITER)
  2095. #define DMA_TCD0_BITER_ELINKYES (IMXRT_DMA_TCD[0].BITER_ELINKYES)
  2096. #define DMA_TCD0_BITER_ELINKNO (IMXRT_DMA_TCD[0].BITER_ELINKNO)
  2097. #define DMA_TCD1_SADDR (IMXRT_DMA_TCD[1].SADDR)
  2098. #define DMA_TCD1_SOFF (IMXRT_DMA_TCD[1].SOFF)
  2099. #define DMA_TCD1_ATTR (IMXRT_DMA_TCD[1].ATTR)
  2100. #define DMA_TCD1_NBYTES (IMXRT_DMA_TCD[1].NBYTES)
  2101. #define DMA_TCD1_NBYTES_MLNO (IMXRT_DMA_TCD[1].NBYTES_MLNO)
  2102. #define DMA_TCD1_NBYTES_MLOFFNO (IMXRT_DMA_TCD[1].NBYTES_MLOFFNO)
  2103. #define DMA_TCD1_NBYTES_MLOFFYES (IMXRT_DMA_TCD[1].NBYTES_MLOFFYES)
  2104. #define DMA_TCD1_SLAST (IMXRT_DMA_TCD[1].SLAST)
  2105. #define DMA_TCD1_DADDR (IMXRT_DMA_TCD[1].DADDR)
  2106. #define DMA_TCD1_DOFF (IMXRT_DMA_TCD[1].DOFF)
  2107. #define DMA_TCD1_CITER (IMXRT_DMA_TCD[1].CITER)
  2108. #define DMA_TCD1_CITER_ELINKYES (IMXRT_DMA_TCD[1].CITER_ELINKYES)
  2109. #define DMA_TCD1_CITER_ELINKNO (IMXRT_DMA_TCD[1].CITER_ELINKNO)
  2110. #define DMA_TCD1_DLASTSGA (IMXRT_DMA_TCD[1].DLASTSGA)
  2111. #define DMA_TCD1_CSR (IMXRT_DMA_TCD[1].CSR)
  2112. #define DMA_TCD1_BITER (IMXRT_DMA_TCD[1].BITER)
  2113. #define DMA_TCD1_BITER_ELINKYES (IMXRT_DMA_TCD[1].BITER_ELINKYES)
  2114. #define DMA_TCD1_BITER_ELINKNO (IMXRT_DMA_TCD[1].BITER_ELINKNO)
  2115. #define DMA_TCD2_SADDR (IMXRT_DMA_TCD[2].SADDR)
  2116. #define DMA_TCD2_SOFF (IMXRT_DMA_TCD[2].SOFF)
  2117. #define DMA_TCD2_ATTR (IMXRT_DMA_TCD[2].ATTR)
  2118. #define DMA_TCD2_NBYTES (IMXRT_DMA_TCD[2].NBYTES)
  2119. #define DMA_TCD2_NBYTES_MLNO (IMXRT_DMA_TCD[2].NBYTES_MLNO)
  2120. #define DMA_TCD2_NBYTES_MLOFFNO (IMXRT_DMA_TCD[2].NBYTES_MLOFFNO)
  2121. #define DMA_TCD2_NBYTES_MLOFFYES (IMXRT_DMA_TCD[2].NBYTES_MLOFFYES)
  2122. #define DMA_TCD2_SLAST (IMXRT_DMA_TCD[2].SLAST)
  2123. #define DMA_TCD2_DADDR (IMXRT_DMA_TCD[2].DADDR)
  2124. #define DMA_TCD2_DOFF (IMXRT_DMA_TCD[2].DOFF)
  2125. #define DMA_TCD2_CITER (IMXRT_DMA_TCD[2].CITER)
  2126. #define DMA_TCD2_CITER_ELINKYES (IMXRT_DMA_TCD[2].CITER_ELINKYES)
  2127. #define DMA_TCD2_CITER_ELINKNO (IMXRT_DMA_TCD[2].CITER_ELINKNO)
  2128. #define DMA_TCD2_DLASTSGA (IMXRT_DMA_TCD[2].DLASTSGA)
  2129. #define DMA_TCD2_CSR (IMXRT_DMA_TCD[2].CSR)
  2130. #define DMA_TCD2_BITER (IMXRT_DMA_TCD[2].BITER)
  2131. #define DMA_TCD2_BITER_ELINKYES (IMXRT_DMA_TCD[2].BITER_ELINKYES)
  2132. #define DMA_TCD2_BITER_ELINKNO (IMXRT_DMA_TCD[2].BITER_ELINKNO)
  2133. #define DMA_TCD3_SADDR (IMXRT_DMA_TCD[3].SADDR)
  2134. #define DMA_TCD3_SOFF (IMXRT_DMA_TCD[3].SOFF)
  2135. #define DMA_TCD3_ATTR (IMXRT_DMA_TCD[3].ATTR)
  2136. #define DMA_TCD3_NBYTES (IMXRT_DMA_TCD[3].NBYTES)
  2137. #define DMA_TCD3_NBYTES_MLNO (IMXRT_DMA_TCD[3].NBYTES_MLNO)
  2138. #define DMA_TCD3_NBYTES_MLOFFNO (IMXRT_DMA_TCD[3].NBYTES_MLOFFNO)
  2139. #define DMA_TCD3_NBYTES_MLOFFYES (IMXRT_DMA_TCD[3].NBYTES_MLOFFYES)
  2140. #define DMA_TCD3_SLAST (IMXRT_DMA_TCD[3].SLAST)
  2141. #define DMA_TCD3_DADDR (IMXRT_DMA_TCD[3].DADDR)
  2142. #define DMA_TCD3_DOFF (IMXRT_DMA_TCD[3].DOFF)
  2143. #define DMA_TCD3_CITER (IMXRT_DMA_TCD[3].CITER)
  2144. #define DMA_TCD3_CITER_ELINKYES (IMXRT_DMA_TCD[3].CITER_ELINKYES)
  2145. #define DMA_TCD3_CITER_ELINKNO (IMXRT_DMA_TCD[3].CITER_ELINKNO)
  2146. #define DMA_TCD3_DLASTSGA (IMXRT_DMA_TCD[3].DLASTSGA)
  2147. #define DMA_TCD3_CSR (IMXRT_DMA_TCD[3].CSR)
  2148. #define DMA_TCD3_BITER (IMXRT_DMA_TCD[3].BITER)
  2149. #define DMA_TCD3_BITER_ELINKYES (IMXRT_DMA_TCD[3].BITER_ELINKYES)
  2150. #define DMA_TCD3_BITER_ELINKNO (IMXRT_DMA_TCD[3].BITER_ELINKNO)
  2151. #define DMA_TCD4_SADDR (IMXRT_DMA_TCD[4].SADDR)
  2152. #define DMA_TCD4_SOFF (IMXRT_DMA_TCD[4].SOFF)
  2153. #define DMA_TCD4_ATTR (IMXRT_DMA_TCD[4].ATTR)
  2154. #define DMA_TCD4_NBYTES (IMXRT_DMA_TCD[4].NBYTES)
  2155. #define DMA_TCD4_NBYTES_MLNO (IMXRT_DMA_TCD[4].NBYTES_MLNO)
  2156. #define DMA_TCD4_NBYTES_MLOFFNO (IMXRT_DMA_TCD[4].NBYTES_MLOFFNO)
  2157. #define DMA_TCD4_NBYTES_MLOFFYES (IMXRT_DMA_TCD[4].NBYTES_MLOFFYES)
  2158. #define DMA_TCD4_SLAST (IMXRT_DMA_TCD[4].SLAST)
  2159. #define DMA_TCD4_DADDR (IMXRT_DMA_TCD[4].DADDR)
  2160. #define DMA_TCD4_DOFF (IMXRT_DMA_TCD[4].DOFF)
  2161. #define DMA_TCD4_CITER (IMXRT_DMA_TCD[4].CITER)
  2162. #define DMA_TCD4_CITER_ELINKYES (IMXRT_DMA_TCD[4].CITER_ELINKYES)
  2163. #define DMA_TCD4_CITER_ELINKNO (IMXRT_DMA_TCD[4].CITER_ELINKNO)
  2164. #define DMA_TCD4_DLASTSGA (IMXRT_DMA_TCD[4].DLASTSGA)
  2165. #define DMA_TCD4_CSR (IMXRT_DMA_TCD[4].CSR)
  2166. #define DMA_TCD4_BITER (IMXRT_DMA_TCD[4].BITER)
  2167. #define DMA_TCD4_BITER_ELINKYES (IMXRT_DMA_TCD[4].BITER_ELINKYES)
  2168. #define DMA_TCD4_BITER_ELINKNO (IMXRT_DMA_TCD[4].BITER_ELINKNO)
  2169. #define DMA_TCD5_SADDR (IMXRT_DMA_TCD[5].SADDR)
  2170. #define DMA_TCD5_SOFF (IMXRT_DMA_TCD[5].SOFF)
  2171. #define DMA_TCD5_ATTR (IMXRT_DMA_TCD[5].ATTR)
  2172. #define DMA_TCD5_NBYTES (IMXRT_DMA_TCD[5].NBYTES)
  2173. #define DMA_TCD5_NBYTES_MLNO (IMXRT_DMA_TCD[5].NBYTES_MLNO)
  2174. #define DMA_TCD5_NBYTES_MLOFFNO (IMXRT_DMA_TCD[5].NBYTES_MLOFFNO)
  2175. #define DMA_TCD5_NBYTES_MLOFFYES (IMXRT_DMA_TCD[5].NBYTES_MLOFFYES)
  2176. #define DMA_TCD5_SLAST (IMXRT_DMA_TCD[5].SLAST)
  2177. #define DMA_TCD5_DADDR (IMXRT_DMA_TCD[5].DADDR)
  2178. #define DMA_TCD5_DOFF (IMXRT_DMA_TCD[5].DOFF)
  2179. #define DMA_TCD5_CITER (IMXRT_DMA_TCD[5].CITER)
  2180. #define DMA_TCD5_CITER_ELINKYES (IMXRT_DMA_TCD[5].CITER_ELINKYES)
  2181. #define DMA_TCD5_CITER_ELINKNO (IMXRT_DMA_TCD[5].CITER_ELINKNO)
  2182. #define DMA_TCD5_DLASTSGA (IMXRT_DMA_TCD[5].DLASTSGA)
  2183. #define DMA_TCD5_CSR (IMXRT_DMA_TCD[5].CSR)
  2184. #define DMA_TCD5_BITER (IMXRT_DMA_TCD[5].BITER)
  2185. #define DMA_TCD5_BITER_ELINKYES (IMXRT_DMA_TCD[5].BITER_ELINKYES)
  2186. #define DMA_TCD5_BITER_ELINKNO (IMXRT_DMA_TCD[5].BITER_ELINKNO)
  2187. #define DMA_TCD6_SADDR (IMXRT_DMA_TCD[6].SADDR)
  2188. #define DMA_TCD6_SOFF (IMXRT_DMA_TCD[6].SOFF)
  2189. #define DMA_TCD6_ATTR (IMXRT_DMA_TCD[6].ATTR)
  2190. #define DMA_TCD6_NBYTES (IMXRT_DMA_TCD[6].NBYTES)
  2191. #define DMA_TCD6_NBYTES_MLNO (IMXRT_DMA_TCD[6].NBYTES_MLNO)
  2192. #define DMA_TCD6_NBYTES_MLOFFNO (IMXRT_DMA_TCD[6].NBYTES_MLOFFNO)
  2193. #define DMA_TCD6_NBYTES_MLOFFYES (IMXRT_DMA_TCD[6].NBYTES_MLOFFYES)
  2194. #define DMA_TCD6_SLAST (IMXRT_DMA_TCD[6].SLAST)
  2195. #define DMA_TCD6_DADDR (IMXRT_DMA_TCD[6].DADDR)
  2196. #define DMA_TCD6_DOFF (IMXRT_DMA_TCD[6].DOFF)
  2197. #define DMA_TCD6_CITER (IMXRT_DMA_TCD[6].CITER)
  2198. #define DMA_TCD6_CITER_ELINKYES (IMXRT_DMA_TCD[6].CITER_ELINKYES)
  2199. #define DMA_TCD6_CITER_ELINKNO (IMXRT_DMA_TCD[6].CITER_ELINKNO)
  2200. #define DMA_TCD6_DLASTSGA (IMXRT_DMA_TCD[6].DLASTSGA)
  2201. #define DMA_TCD6_CSR (IMXRT_DMA_TCD[6].CSR)
  2202. #define DMA_TCD6_BITER (IMXRT_DMA_TCD[6].BITER)
  2203. #define DMA_TCD6_BITER_ELINKYES (IMXRT_DMA_TCD[6].BITER_ELINKYES)
  2204. #define DMA_TCD6_BITER_ELINKNO (IMXRT_DMA_TCD[6].BITER_ELINKNO)
  2205. #define DMA_TCD7_SADDR (IMXRT_DMA_TCD[7].SADDR)
  2206. #define DMA_TCD7_SOFF (IMXRT_DMA_TCD[7].SOFF)
  2207. #define DMA_TCD7_ATTR (IMXRT_DMA_TCD[7].ATTR)
  2208. #define DMA_TCD7_NBYTES (IMXRT_DMA_TCD[7].NBYTES)
  2209. #define DMA_TCD7_NBYTES_MLNO (IMXRT_DMA_TCD[7].NBYTES_MLNO)
  2210. #define DMA_TCD7_NBYTES_MLOFFNO (IMXRT_DMA_TCD[7].NBYTES_MLOFFNO)
  2211. #define DMA_TCD7_NBYTES_MLOFFYES (IMXRT_DMA_TCD[7].NBYTES_MLOFFYES)
  2212. #define DMA_TCD7_SLAST (IMXRT_DMA_TCD[7].SLAST)
  2213. #define DMA_TCD7_DADDR (IMXRT_DMA_TCD[7].DADDR)
  2214. #define DMA_TCD7_DOFF (IMXRT_DMA_TCD[7].DOFF)
  2215. #define DMA_TCD7_CITER (IMXRT_DMA_TCD[7].CITER)
  2216. #define DMA_TCD7_CITER_ELINKYES (IMXRT_DMA_TCD[7].CITER_ELINKYES)
  2217. #define DMA_TCD7_CITER_ELINKNO (IMXRT_DMA_TCD[7].CITER_ELINKNO)
  2218. #define DMA_TCD7_DLASTSGA (IMXRT_DMA_TCD[7].DLASTSGA)
  2219. #define DMA_TCD7_CSR (IMXRT_DMA_TCD[7].CSR)
  2220. #define DMA_TCD7_BITER (IMXRT_DMA_TCD[7].BITER)
  2221. #define DMA_TCD7_BITER_ELINKYES (IMXRT_DMA_TCD[7].BITER_ELINKYES)
  2222. #define DMA_TCD7_BITER_ELINKNO (IMXRT_DMA_TCD[7].BITER_ELINKNO)
  2223. #define DMA_TCD8_SADDR (IMXRT_DMA_TCD[8].SADDR)
  2224. #define DMA_TCD8_SOFF (IMXRT_DMA_TCD[8].SOFF)
  2225. #define DMA_TCD8_ATTR (IMXRT_DMA_TCD[8].ATTR)
  2226. #define DMA_TCD8_NBYTES (IMXRT_DMA_TCD[8].NBYTES)
  2227. #define DMA_TCD8_NBYTES_MLNO (IMXRT_DMA_TCD[8].NBYTES_MLNO)
  2228. #define DMA_TCD8_NBYTES_MLOFFNO (IMXRT_DMA_TCD[8].NBYTES_MLOFFNO)
  2229. #define DMA_TCD8_NBYTES_MLOFFYES (IMXRT_DMA_TCD[8].NBYTES_MLOFFYES)
  2230. #define DMA_TCD8_SLAST (IMXRT_DMA_TCD[8].SLAST)
  2231. #define DMA_TCD8_DADDR (IMXRT_DMA_TCD[8].DADDR)
  2232. #define DMA_TCD8_DOFF (IMXRT_DMA_TCD[8].DOFF)
  2233. #define DMA_TCD8_CITER (IMXRT_DMA_TCD[8].CITER)
  2234. #define DMA_TCD8_CITER_ELINKYES (IMXRT_DMA_TCD[8].CITER_ELINKYES)
  2235. #define DMA_TCD8_CITER_ELINKNO (IMXRT_DMA_TCD[8].CITER_ELINKNO)
  2236. #define DMA_TCD8_DLASTSGA (IMXRT_DMA_TCD[8].DLASTSGA)
  2237. #define DMA_TCD8_CSR (IMXRT_DMA_TCD[8].CSR)
  2238. #define DMA_TCD8_BITER (IMXRT_DMA_TCD[8].BITER)
  2239. #define DMA_TCD8_BITER_ELINKYES (IMXRT_DMA_TCD[8].BITER_ELINKYES)
  2240. #define DMA_TCD8_BITER_ELINKNO (IMXRT_DMA_TCD[8].BITER_ELINKNO)
  2241. #define DMA_TCD9_SADDR (IMXRT_DMA_TCD[9].SADDR)
  2242. #define DMA_TCD9_SOFF (IMXRT_DMA_TCD[9].SOFF)
  2243. #define DMA_TCD9_ATTR (IMXRT_DMA_TCD[9].ATTR)
  2244. #define DMA_TCD9_NBYTES (IMXRT_DMA_TCD[9].NBYTES)
  2245. #define DMA_TCD9_NBYTES_MLNO (IMXRT_DMA_TCD[9].NBYTES_MLNO)
  2246. #define DMA_TCD9_NBYTES_MLOFFNO (IMXRT_DMA_TCD[9].NBYTES_MLOFFNO)
  2247. #define DMA_TCD9_NBYTES_MLOFFYES (IMXRT_DMA_TCD[9].NBYTES_MLOFFYES)
  2248. #define DMA_TCD9_SLAST (IMXRT_DMA_TCD[9].SLAST)
  2249. #define DMA_TCD9_DADDR (IMXRT_DMA_TCD[9].DADDR)
  2250. #define DMA_TCD9_DOFF (IMXRT_DMA_TCD[9].DOFF)
  2251. #define DMA_TCD9_CITER (IMXRT_DMA_TCD[9].CITER)
  2252. #define DMA_TCD9_CITER_ELINKYES (IMXRT_DMA_TCD[9].CITER_ELINKYES)
  2253. #define DMA_TCD9_CITER_ELINKNO (IMXRT_DMA_TCD[9].CITER_ELINKNO)
  2254. #define DMA_TCD9_DLASTSGA (IMXRT_DMA_TCD[9].DLASTSGA)
  2255. #define DMA_TCD9_CSR (IMXRT_DMA_TCD[9].CSR)
  2256. #define DMA_TCD9_BITER (IMXRT_DMA_TCD[9].BITER)
  2257. #define DMA_TCD9_BITER_ELINKYES (IMXRT_DMA_TCD[9].BITER_ELINKYES)
  2258. #define DMA_TCD9_BITER_ELINKNO (IMXRT_DMA_TCD[9].BITER_ELINKNO)
  2259. #define DMA_TCD10_SADDR (IMXRT_DMA_TCD[10].SADDR)
  2260. #define DMA_TCD10_SOFF (IMXRT_DMA_TCD[10].SOFF)
  2261. #define DMA_TCD10_ATTR (IMXRT_DMA_TCD[10].ATTR)
  2262. #define DMA_TCD10_NBYTES (IMXRT_DMA_TCD[10].NBYTES)
  2263. #define DMA_TCD10_NBYTES_MLNO (IMXRT_DMA_TCD[10].NBYTES_MLNO)
  2264. #define DMA_TCD10_NBYTES_MLOFFNO (IMXRT_DMA_TCD[10].NBYTES_MLOFFNO)
  2265. #define DMA_TCD10_NBYTES_MLOFFYES (IMXRT_DMA_TCD[10].NBYTES_MLOFFYES)
  2266. #define DMA_TCD10_SLAST (IMXRT_DMA_TCD[10].SLAST)
  2267. #define DMA_TCD10_DADDR (IMXRT_DMA_TCD[10].DADDR)
  2268. #define DMA_TCD10_DOFF (IMXRT_DMA_TCD[10].DOFF)
  2269. #define DMA_TCD10_CITER (IMXRT_DMA_TCD[10].CITER)
  2270. #define DMA_TCD10_CITER_ELINKYES (IMXRT_DMA_TCD[10].CITER_ELINKYES)
  2271. #define DMA_TCD10_CITER_ELINKNO (IMXRT_DMA_TCD[10].CITER_ELINKNO)
  2272. #define DMA_TCD10_DLASTSGA (IMXRT_DMA_TCD[10].DLASTSGA)
  2273. #define DMA_TCD10_CSR (IMXRT_DMA_TCD[10].CSR)
  2274. #define DMA_TCD10_BITER (IMXRT_DMA_TCD[10].BITER)
  2275. #define DMA_TCD10_BITER_ELINKYES (IMXRT_DMA_TCD[10].BITER_ELINKYES)
  2276. #define DMA_TCD10_BITER_ELINKNO (IMXRT_DMA_TCD[10].BITER_ELINKNO)
  2277. #define DMA_TCD11_SADDR (IMXRT_DMA_TCD[11].SADDR)
  2278. #define DMA_TCD11_SOFF (IMXRT_DMA_TCD[11].SOFF)
  2279. #define DMA_TCD11_ATTR (IMXRT_DMA_TCD[11].ATTR)
  2280. #define DMA_TCD11_NBYTES (IMXRT_DMA_TCD[11].NBYTES)
  2281. #define DMA_TCD11_NBYTES_MLNO (IMXRT_DMA_TCD[11].NBYTES_MLNO)
  2282. #define DMA_TCD11_NBYTES_MLOFFNO (IMXRT_DMA_TCD[11].NBYTES_MLOFFNO)
  2283. #define DMA_TCD11_NBYTES_MLOFFYES (IMXRT_DMA_TCD[11].NBYTES_MLOFFYES)
  2284. #define DMA_TCD11_SLAST (IMXRT_DMA_TCD[11].SLAST)
  2285. #define DMA_TCD11_DADDR (IMXRT_DMA_TCD[11].DADDR)
  2286. #define DMA_TCD11_DOFF (IMXRT_DMA_TCD[11].DOFF)
  2287. #define DMA_TCD11_CITER (IMXRT_DMA_TCD[11].CITER)
  2288. #define DMA_TCD11_CITER_ELINKYES (IMXRT_DMA_TCD[11].CITER_ELINKYES)
  2289. #define DMA_TCD11_CITER_ELINKNO (IMXRT_DMA_TCD[11].CITER_ELINKNO)
  2290. #define DMA_TCD11_DLASTSGA (IMXRT_DMA_TCD[11].DLASTSGA)
  2291. #define DMA_TCD11_CSR (IMXRT_DMA_TCD[11].CSR)
  2292. #define DMA_TCD11_BITER (IMXRT_DMA_TCD[11].BITER)
  2293. #define DMA_TCD11_BITER_ELINKYES (IMXRT_DMA_TCD[11].BITER_ELINKYES)
  2294. #define DMA_TCD11_BITER_ELINKNO (IMXRT_DMA_TCD[11].BITER_ELINKNO)
  2295. #define DMA_TCD12_SADDR (IMXRT_DMA_TCD[12].SADDR)
  2296. #define DMA_TCD12_SOFF (IMXRT_DMA_TCD[12].SOFF)
  2297. #define DMA_TCD12_ATTR (IMXRT_DMA_TCD[12].ATTR)
  2298. #define DMA_TCD12_NBYTES (IMXRT_DMA_TCD[12].NBYTES)
  2299. #define DMA_TCD12_NBYTES_MLNO (IMXRT_DMA_TCD[12].NBYTES_MLNO)
  2300. #define DMA_TCD12_NBYTES_MLOFFNO (IMXRT_DMA_TCD[12].NBYTES_MLOFFNO)
  2301. #define DMA_TCD12_NBYTES_MLOFFYES (IMXRT_DMA_TCD[12].NBYTES_MLOFFYES)
  2302. #define DMA_TCD12_SLAST (IMXRT_DMA_TCD[12].SLAST)
  2303. #define DMA_TCD12_DADDR (IMXRT_DMA_TCD[12].DADDR)
  2304. #define DMA_TCD12_DOFF (IMXRT_DMA_TCD[12].DOFF)
  2305. #define DMA_TCD12_CITER (IMXRT_DMA_TCD[12].CITER)
  2306. #define DMA_TCD12_CITER_ELINKYES (IMXRT_DMA_TCD[12].CITER_ELINKYES)
  2307. #define DMA_TCD12_CITER_ELINKNO (IMXRT_DMA_TCD[12].CITER_ELINKNO)
  2308. #define DMA_TCD12_DLASTSGA (IMXRT_DMA_TCD[12].DLASTSGA)
  2309. #define DMA_TCD12_CSR (IMXRT_DMA_TCD[12].CSR)
  2310. #define DMA_TCD12_BITER (IMXRT_DMA_TCD[12].BITER)
  2311. #define DMA_TCD12_BITER_ELINKYES (IMXRT_DMA_TCD[12].BITER_ELINKYES)
  2312. #define DMA_TCD12_BITER_ELINKNO (IMXRT_DMA_TCD[12].BITER_ELINKNO)
  2313. #define DMA_TCD13_SADDR (IMXRT_DMA_TCD[13].SADDR)
  2314. #define DMA_TCD13_SOFF (IMXRT_DMA_TCD[13].SOFF)
  2315. #define DMA_TCD13_ATTR (IMXRT_DMA_TCD[13].ATTR)
  2316. #define DMA_TCD13_NBYTES (IMXRT_DMA_TCD[13].NBYTES)
  2317. #define DMA_TCD13_NBYTES_MLNO (IMXRT_DMA_TCD[13].NBYTES_MLNO)
  2318. #define DMA_TCD13_NBYTES_MLOFFNO (IMXRT_DMA_TCD[13].NBYTES_MLOFFNO)
  2319. #define DMA_TCD13_NBYTES_MLOFFYES (IMXRT_DMA_TCD[13].NBYTES_MLOFFYES)
  2320. #define DMA_TCD13_SLAST (IMXRT_DMA_TCD[13].SLAST)
  2321. #define DMA_TCD13_DADDR (IMXRT_DMA_TCD[13].DADDR)
  2322. #define DMA_TCD13_DOFF (IMXRT_DMA_TCD[13].DOFF)
  2323. #define DMA_TCD13_CITER (IMXRT_DMA_TCD[13].CITER)
  2324. #define DMA_TCD13_CITER_ELINKYES (IMXRT_DMA_TCD[13].CITER_ELINKYES)
  2325. #define DMA_TCD13_CITER_ELINKNO (IMXRT_DMA_TCD[13].CITER_ELINKNO)
  2326. #define DMA_TCD13_DLASTSGA (IMXRT_DMA_TCD[13].DLASTSGA)
  2327. #define DMA_TCD13_CSR (IMXRT_DMA_TCD[13].CSR)
  2328. #define DMA_TCD13_BITER (IMXRT_DMA_TCD[13].BITER)
  2329. #define DMA_TCD13_BITER_ELINKYES (IMXRT_DMA_TCD[13].BITER_ELINKYES)
  2330. #define DMA_TCD13_BITER_ELINKNO (IMXRT_DMA_TCD[13].BITER_ELINKNO)
  2331. #define DMA_TCD14_SADDR (IMXRT_DMA_TCD[14].SADDR)
  2332. #define DMA_TCD14_SOFF (IMXRT_DMA_TCD[14].SOFF)
  2333. #define DMA_TCD14_ATTR (IMXRT_DMA_TCD[14].ATTR)
  2334. #define DMA_TCD14_NBYTES (IMXRT_DMA_TCD[14].NBYTES)
  2335. #define DMA_TCD14_NBYTES_MLNO (IMXRT_DMA_TCD[14].NBYTES_MLNO)
  2336. #define DMA_TCD14_NBYTES_MLOFFNO (IMXRT_DMA_TCD[14].NBYTES_MLOFFNO)
  2337. #define DMA_TCD14_NBYTES_MLOFFYES (IMXRT_DMA_TCD[14].NBYTES_MLOFFYES)
  2338. #define DMA_TCD14_SLAST (IMXRT_DMA_TCD[14].SLAST)
  2339. #define DMA_TCD14_DADDR (IMXRT_DMA_TCD[14].DADDR)
  2340. #define DMA_TCD14_DOFF (IMXRT_DMA_TCD[14].DOFF)
  2341. #define DMA_TCD14_CITER (IMXRT_DMA_TCD[14].CITER)
  2342. #define DMA_TCD14_CITER_ELINKYES (IMXRT_DMA_TCD[14].CITER_ELINKYES)
  2343. #define DMA_TCD14_CITER_ELINKNO (IMXRT_DMA_TCD[14].CITER_ELINKNO)
  2344. #define DMA_TCD14_DLASTSGA (IMXRT_DMA_TCD[14].DLASTSGA)
  2345. #define DMA_TCD14_CSR (IMXRT_DMA_TCD[14].CSR)
  2346. #define DMA_TCD14_BITER (IMXRT_DMA_TCD[14].BITER)
  2347. #define DMA_TCD14_BITER_ELINKYES (IMXRT_DMA_TCD[14].BITER_ELINKYES)
  2348. #define DMA_TCD14_BITER_ELINKNO (IMXRT_DMA_TCD[14].BITER_ELINKNO)
  2349. #define DMA_TCD15_SADDR (IMXRT_DMA_TCD[15].SADDR)
  2350. #define DMA_TCD15_SOFF (IMXRT_DMA_TCD[15].SOFF)
  2351. #define DMA_TCD15_ATTR (IMXRT_DMA_TCD[15].ATTR)
  2352. #define DMA_TCD15_NBYTES (IMXRT_DMA_TCD[15].NBYTES)
  2353. #define DMA_TCD15_NBYTES_MLNO (IMXRT_DMA_TCD[15].NBYTES_MLNO)
  2354. #define DMA_TCD15_NBYTES_MLOFFNO (IMXRT_DMA_TCD[15].NBYTES_MLOFFNO)
  2355. #define DMA_TCD15_NBYTES_MLOFFYES (IMXRT_DMA_TCD[15].NBYTES_MLOFFYES)
  2356. #define DMA_TCD15_SLAST (IMXRT_DMA_TCD[15].SLAST)
  2357. #define DMA_TCD15_DADDR (IMXRT_DMA_TCD[15].DADDR)
  2358. #define DMA_TCD15_DOFF (IMXRT_DMA_TCD[15].DOFF)
  2359. #define DMA_TCD15_CITER (IMXRT_DMA_TCD[15].CITER)
  2360. #define DMA_TCD15_CITER_ELINKYES (IMXRT_DMA_TCD[15].CITER_ELINKYES)
  2361. #define DMA_TCD15_CITER_ELINKNO (IMXRT_DMA_TCD[15].CITER_ELINKNO)
  2362. #define DMA_TCD15_DLASTSGA (IMXRT_DMA_TCD[15].DLASTSGA)
  2363. #define DMA_TCD15_CSR (IMXRT_DMA_TCD[15].CSR)
  2364. #define DMA_TCD15_BITER (IMXRT_DMA_TCD[15].BITER)
  2365. #define DMA_TCD15_BITER_ELINKYES (IMXRT_DMA_TCD[15].BITER_ELINKYES)
  2366. #define DMA_TCD15_BITER_ELINKNO (IMXRT_DMA_TCD[15].BITER_ELINKNO)
  2367. #define DMA_TCD16_SADDR (IMXRT_DMA_TCD[16].SADDR)
  2368. #define DMA_TCD16_SOFF (IMXRT_DMA_TCD[16].SOFF)
  2369. #define DMA_TCD16_ATTR (IMXRT_DMA_TCD[16].ATTR)
  2370. #define DMA_TCD16_NBYTES (IMXRT_DMA_TCD[16].NBYTES)
  2371. #define DMA_TCD16_NBYTES_MLNO (IMXRT_DMA_TCD[16].NBYTES_MLNO)
  2372. #define DMA_TCD16_NBYTES_MLOFFNO (IMXRT_DMA_TCD[16].NBYTES_MLOFFNO)
  2373. #define DMA_TCD16_NBYTES_MLOFFYES (IMXRT_DMA_TCD[16].NBYTES_MLOFFYES)
  2374. #define DMA_TCD16_SLAST (IMXRT_DMA_TCD[16].SLAST)
  2375. #define DMA_TCD16_DADDR (IMXRT_DMA_TCD[16].DADDR)
  2376. #define DMA_TCD16_DOFF (IMXRT_DMA_TCD[16].DOFF)
  2377. #define DMA_TCD16_CITER (IMXRT_DMA_TCD[16].CITER)
  2378. #define DMA_TCD16_CITER_ELINKYES (IMXRT_DMA_TCD[16].CITER_ELINKYES)
  2379. #define DMA_TCD16_CITER_ELINKNO (IMXRT_DMA_TCD[16].CITER_ELINKNO)
  2380. #define DMA_TCD16_DLASTSGA (IMXRT_DMA_TCD[16].DLASTSGA)
  2381. #define DMA_TCD16_CSR (IMXRT_DMA_TCD[16].CSR)
  2382. #define DMA_TCD16_BITER (IMXRT_DMA_TCD[16].BITER)
  2383. #define DMA_TCD16_BITER_ELINKYES (IMXRT_DMA_TCD[16].BITER_ELINKYES)
  2384. #define DMA_TCD16_BITER_ELINKNO (IMXRT_DMA_TCD[16].BITER_ELINKNO)
  2385. #define DMA_TCD17_SADDR (IMXRT_DMA_TCD[17].SADDR)
  2386. #define DMA_TCD17_SOFF (IMXRT_DMA_TCD[17].SOFF)
  2387. #define DMA_TCD17_ATTR (IMXRT_DMA_TCD[17].ATTR)
  2388. #define DMA_TCD17_NBYTES (IMXRT_DMA_TCD[17].NBYTES)
  2389. #define DMA_TCD17_NBYTES_MLNO (IMXRT_DMA_TCD[17].NBYTES_MLNO)
  2390. #define DMA_TCD17_NBYTES_MLOFFNO (IMXRT_DMA_TCD[17].NBYTES_MLOFFNO)
  2391. #define DMA_TCD17_NBYTES_MLOFFYES (IMXRT_DMA_TCD[17].NBYTES_MLOFFYES)
  2392. #define DMA_TCD17_SLAST (IMXRT_DMA_TCD[17].SLAST)
  2393. #define DMA_TCD17_DADDR (IMXRT_DMA_TCD[17].DADDR)
  2394. #define DMA_TCD17_DOFF (IMXRT_DMA_TCD[17].DOFF)
  2395. #define DMA_TCD17_CITER (IMXRT_DMA_TCD[17].CITER)
  2396. #define DMA_TCD17_CITER_ELINKYES (IMXRT_DMA_TCD[17].CITER_ELINKYES)
  2397. #define DMA_TCD17_CITER_ELINKNO (IMXRT_DMA_TCD[17].CITER_ELINKNO)
  2398. #define DMA_TCD17_DLASTSGA (IMXRT_DMA_TCD[17].DLASTSGA)
  2399. #define DMA_TCD17_CSR (IMXRT_DMA_TCD[17].CSR)
  2400. #define DMA_TCD17_BITER (IMXRT_DMA_TCD[17].BITER)
  2401. #define DMA_TCD17_BITER_ELINKYES (IMXRT_DMA_TCD[17].BITER_ELINKYES)
  2402. #define DMA_TCD17_BITER_ELINKNO (IMXRT_DMA_TCD[17].BITER_ELINKNO)
  2403. #define DMA_TCD18_SADDR (IMXRT_DMA_TCD[18].SADDR)
  2404. #define DMA_TCD18_SOFF (IMXRT_DMA_TCD[18].SOFF)
  2405. #define DMA_TCD18_ATTR (IMXRT_DMA_TCD[18].ATTR)
  2406. #define DMA_TCD18_NBYTES (IMXRT_DMA_TCD[18].NBYTES)
  2407. #define DMA_TCD18_NBYTES_MLNO (IMXRT_DMA_TCD[18].NBYTES_MLNO)
  2408. #define DMA_TCD18_NBYTES_MLOFFNO (IMXRT_DMA_TCD[18].NBYTES_MLOFFNO)
  2409. #define DMA_TCD18_NBYTES_MLOFFYES (IMXRT_DMA_TCD[18].NBYTES_MLOFFYES)
  2410. #define DMA_TCD18_SLAST (IMXRT_DMA_TCD[18].SLAST)
  2411. #define DMA_TCD18_DADDR (IMXRT_DMA_TCD[18].DADDR)
  2412. #define DMA_TCD18_DOFF (IMXRT_DMA_TCD[18].DOFF)
  2413. #define DMA_TCD18_CITER (IMXRT_DMA_TCD[18].CITER)
  2414. #define DMA_TCD18_CITER_ELINKYES (IMXRT_DMA_TCD[18].CITER_ELINKYES)
  2415. #define DMA_TCD18_CITER_ELINKNO (IMXRT_DMA_TCD[18].CITER_ELINKNO)
  2416. #define DMA_TCD18_DLASTSGA (IMXRT_DMA_TCD[18].DLASTSGA)
  2417. #define DMA_TCD18_CSR (IMXRT_DMA_TCD[18].CSR)
  2418. #define DMA_TCD18_BITER (IMXRT_DMA_TCD[18].BITER)
  2419. #define DMA_TCD18_BITER_ELINKYES (IMXRT_DMA_TCD[18].BITER_ELINKYES)
  2420. #define DMA_TCD18_BITER_ELINKNO (IMXRT_DMA_TCD[18].BITER_ELINKNO)
  2421. #define DMA_TCD19_SADDR (IMXRT_DMA_TCD[19].SADDR)
  2422. #define DMA_TCD19_SOFF (IMXRT_DMA_TCD[19].SOFF)
  2423. #define DMA_TCD19_ATTR (IMXRT_DMA_TCD[19].ATTR)
  2424. #define DMA_TCD19_NBYTES (IMXRT_DMA_TCD[19].NBYTES)
  2425. #define DMA_TCD19_NBYTES_MLNO (IMXRT_DMA_TCD[19].NBYTES_MLNO)
  2426. #define DMA_TCD19_NBYTES_MLOFFNO (IMXRT_DMA_TCD[19].NBYTES_MLOFFNO)
  2427. #define DMA_TCD19_NBYTES_MLOFFYES (IMXRT_DMA_TCD[19].NBYTES_MLOFFYES)
  2428. #define DMA_TCD19_SLAST (IMXRT_DMA_TCD[19].SLAST)
  2429. #define DMA_TCD19_DADDR (IMXRT_DMA_TCD[19].DADDR)
  2430. #define DMA_TCD19_DOFF (IMXRT_DMA_TCD[19].DOFF)
  2431. #define DMA_TCD19_CITER (IMXRT_DMA_TCD[19].CITER)
  2432. #define DMA_TCD19_CITER_ELINKYES (IMXRT_DMA_TCD[19].CITER_ELINKYES)
  2433. #define DMA_TCD19_CITER_ELINKNO (IMXRT_DMA_TCD[19].CITER_ELINKNO)
  2434. #define DMA_TCD19_DLASTSGA (IMXRT_DMA_TCD[19].DLASTSGA)
  2435. #define DMA_TCD19_CSR (IMXRT_DMA_TCD[19].CSR)
  2436. #define DMA_TCD19_BITER (IMXRT_DMA_TCD[19].BITER)
  2437. #define DMA_TCD19_BITER_ELINKYES (IMXRT_DMA_TCD[19].BITER_ELINKYES)
  2438. #define DMA_TCD19_BITER_ELINKNO (IMXRT_DMA_TCD[19].BITER_ELINKNO)
  2439. #define DMA_TCD20_SADDR (IMXRT_DMA_TCD[20].SADDR)
  2440. #define DMA_TCD20_SOFF (IMXRT_DMA_TCD[20].SOFF)
  2441. #define DMA_TCD20_ATTR (IMXRT_DMA_TCD[20].ATTR)
  2442. #define DMA_TCD20_NBYTES (IMXRT_DMA_TCD[20].NBYTES)
  2443. #define DMA_TCD20_NBYTES_MLNO (IMXRT_DMA_TCD[20].NBYTES_MLNO)
  2444. #define DMA_TCD20_NBYTES_MLOFFNO (IMXRT_DMA_TCD[20].NBYTES_MLOFFNO)
  2445. #define DMA_TCD20_NBYTES_MLOFFYES (IMXRT_DMA_TCD[20].NBYTES_MLOFFYES)
  2446. #define DMA_TCD20_SLAST (IMXRT_DMA_TCD[20].SLAST)
  2447. #define DMA_TCD20_DADDR (IMXRT_DMA_TCD[20].DADDR)
  2448. #define DMA_TCD20_DOFF (IMXRT_DMA_TCD[20].DOFF)
  2449. #define DMA_TCD20_CITER (IMXRT_DMA_TCD[20].CITER)
  2450. #define DMA_TCD20_CITER_ELINKYES (IMXRT_DMA_TCD[20].CITER_ELINKYES)
  2451. #define DMA_TCD20_CITER_ELINKNO (IMXRT_DMA_TCD[20].CITER_ELINKNO)
  2452. #define DMA_TCD20_DLASTSGA (IMXRT_DMA_TCD[20].DLASTSGA)
  2453. #define DMA_TCD20_CSR (IMXRT_DMA_TCD[20].CSR)
  2454. #define DMA_TCD20_BITER (IMXRT_DMA_TCD[20].BITER)
  2455. #define DMA_TCD20_BITER_ELINKYES (IMXRT_DMA_TCD[20].BITER_ELINKYES)
  2456. #define DMA_TCD20_BITER_ELINKNO (IMXRT_DMA_TCD[20].BITER_ELINKNO)
  2457. #define DMA_TCD21_SADDR (IMXRT_DMA_TCD[21].SADDR)
  2458. #define DMA_TCD21_SOFF (IMXRT_DMA_TCD[21].SOFF)
  2459. #define DMA_TCD21_ATTR (IMXRT_DMA_TCD[21].ATTR)
  2460. #define DMA_TCD21_NBYTES (IMXRT_DMA_TCD[21].NBYTES)
  2461. #define DMA_TCD21_NBYTES_MLNO (IMXRT_DMA_TCD[21].NBYTES_MLNO)
  2462. #define DMA_TCD21_NBYTES_MLOFFNO (IMXRT_DMA_TCD[21].NBYTES_MLOFFNO)
  2463. #define DMA_TCD21_NBYTES_MLOFFYES (IMXRT_DMA_TCD[21].NBYTES_MLOFFYES)
  2464. #define DMA_TCD21_SLAST (IMXRT_DMA_TCD[21].SLAST)
  2465. #define DMA_TCD21_DADDR (IMXRT_DMA_TCD[21].DADDR)
  2466. #define DMA_TCD21_DOFF (IMXRT_DMA_TCD[21].DOFF)
  2467. #define DMA_TCD21_CITER (IMXRT_DMA_TCD[21].CITER)
  2468. #define DMA_TCD21_CITER_ELINKYES (IMXRT_DMA_TCD[21].CITER_ELINKYES)
  2469. #define DMA_TCD21_CITER_ELINKNO (IMXRT_DMA_TCD[21].CITER_ELINKNO)
  2470. #define DMA_TCD21_DLASTSGA (IMXRT_DMA_TCD[21].DLASTSGA)
  2471. #define DMA_TCD21_CSR (IMXRT_DMA_TCD[21].CSR)
  2472. #define DMA_TCD21_BITER (IMXRT_DMA_TCD[21].BITER)
  2473. #define DMA_TCD21_BITER_ELINKYES (IMXRT_DMA_TCD[21].BITER_ELINKYES)
  2474. #define DMA_TCD21_BITER_ELINKNO (IMXRT_DMA_TCD[21].BITER_ELINKNO)
  2475. #define DMA_TCD22_SADDR (IMXRT_DMA_TCD[22].SADDR)
  2476. #define DMA_TCD22_SOFF (IMXRT_DMA_TCD[22].SOFF)
  2477. #define DMA_TCD22_ATTR (IMXRT_DMA_TCD[22].ATTR)
  2478. #define DMA_TCD22_NBYTES (IMXRT_DMA_TCD[22].NBYTES)
  2479. #define DMA_TCD22_NBYTES_MLNO (IMXRT_DMA_TCD[22].NBYTES_MLNO)
  2480. #define DMA_TCD22_NBYTES_MLOFFNO (IMXRT_DMA_TCD[22].NBYTES_MLOFFNO)
  2481. #define DMA_TCD22_NBYTES_MLOFFYES (IMXRT_DMA_TCD[22].NBYTES_MLOFFYES)
  2482. #define DMA_TCD22_SLAST (IMXRT_DMA_TCD[22].SLAST)
  2483. #define DMA_TCD22_DADDR (IMXRT_DMA_TCD[22].DADDR)
  2484. #define DMA_TCD22_DOFF (IMXRT_DMA_TCD[22].DOFF)
  2485. #define DMA_TCD22_CITER (IMXRT_DMA_TCD[22].CITER)
  2486. #define DMA_TCD22_CITER_ELINKYES (IMXRT_DMA_TCD[22].CITER_ELINKYES)
  2487. #define DMA_TCD22_CITER_ELINKNO (IMXRT_DMA_TCD[22].CITER_ELINKNO)
  2488. #define DMA_TCD22_DLASTSGA (IMXRT_DMA_TCD[22].DLASTSGA)
  2489. #define DMA_TCD22_CSR (IMXRT_DMA_TCD[22].CSR)
  2490. #define DMA_TCD22_BITER (IMXRT_DMA_TCD[22].BITER)
  2491. #define DMA_TCD22_BITER_ELINKYES (IMXRT_DMA_TCD[22].BITER_ELINKYES)
  2492. #define DMA_TCD22_BITER_ELINKNO (IMXRT_DMA_TCD[22].BITER_ELINKNO)
  2493. #define DMA_TCD23_SADDR (IMXRT_DMA_TCD[23].SADDR)
  2494. #define DMA_TCD23_SOFF (IMXRT_DMA_TCD[23].SOFF)
  2495. #define DMA_TCD23_ATTR (IMXRT_DMA_TCD[23].ATTR)
  2496. #define DMA_TCD23_NBYTES (IMXRT_DMA_TCD[23].NBYTES)
  2497. #define DMA_TCD23_NBYTES_MLNO (IMXRT_DMA_TCD[23].NBYTES_MLNO)
  2498. #define DMA_TCD23_NBYTES_MLOFFNO (IMXRT_DMA_TCD[23].NBYTES_MLOFFNO)
  2499. #define DMA_TCD23_NBYTES_MLOFFYES (IMXRT_DMA_TCD[23].NBYTES_MLOFFYES)
  2500. #define DMA_TCD23_SLAST (IMXRT_DMA_TCD[23].SLAST)
  2501. #define DMA_TCD23_DADDR (IMXRT_DMA_TCD[23].DADDR)
  2502. #define DMA_TCD23_DOFF (IMXRT_DMA_TCD[23].DOFF)
  2503. #define DMA_TCD23_CITER (IMXRT_DMA_TCD[23].CITER)
  2504. #define DMA_TCD23_CITER_ELINKYES (IMXRT_DMA_TCD[23].CITER_ELINKYES)
  2505. #define DMA_TCD23_CITER_ELINKNO (IMXRT_DMA_TCD[23].CITER_ELINKNO)
  2506. #define DMA_TCD23_DLASTSGA (IMXRT_DMA_TCD[23].DLASTSGA)
  2507. #define DMA_TCD23_CSR (IMXRT_DMA_TCD[23].CSR)
  2508. #define DMA_TCD23_BITER (IMXRT_DMA_TCD[23].BITER)
  2509. #define DMA_TCD23_BITER_ELINKYES (IMXRT_DMA_TCD[23].BITER_ELINKYES)
  2510. #define DMA_TCD23_BITER_ELINKNO (IMXRT_DMA_TCD[23].BITER_ELINKNO)
  2511. #define DMA_TCD24_SADDR (IMXRT_DMA_TCD[24].SADDR)
  2512. #define DMA_TCD24_SOFF (IMXRT_DMA_TCD[24].SOFF)
  2513. #define DMA_TCD24_ATTR (IMXRT_DMA_TCD[24].ATTR)
  2514. #define DMA_TCD24_NBYTES (IMXRT_DMA_TCD[24].NBYTES)
  2515. #define DMA_TCD24_NBYTES_MLNO (IMXRT_DMA_TCD[24].NBYTES_MLNO)
  2516. #define DMA_TCD24_NBYTES_MLOFFNO (IMXRT_DMA_TCD[24].NBYTES_MLOFFNO)
  2517. #define DMA_TCD24_NBYTES_MLOFFYES (IMXRT_DMA_TCD[24].NBYTES_MLOFFYES)
  2518. #define DMA_TCD24_SLAST (IMXRT_DMA_TCD[24].SLAST)
  2519. #define DMA_TCD24_DADDR (IMXRT_DMA_TCD[24].DADDR)
  2520. #define DMA_TCD24_DOFF (IMXRT_DMA_TCD[24].DOFF)
  2521. #define DMA_TCD24_CITER (IMXRT_DMA_TCD[24].CITER)
  2522. #define DMA_TCD24_CITER_ELINKYES (IMXRT_DMA_TCD[24].CITER_ELINKYES)
  2523. #define DMA_TCD24_CITER_ELINKNO (IMXRT_DMA_TCD[24].CITER_ELINKNO)
  2524. #define DMA_TCD24_DLASTSGA (IMXRT_DMA_TCD[24].DLASTSGA)
  2525. #define DMA_TCD24_CSR (IMXRT_DMA_TCD[24].CSR)
  2526. #define DMA_TCD24_BITER (IMXRT_DMA_TCD[24].BITER)
  2527. #define DMA_TCD24_BITER_ELINKYES (IMXRT_DMA_TCD[24].BITER_ELINKYES)
  2528. #define DMA_TCD24_BITER_ELINKNO (IMXRT_DMA_TCD[24].BITER_ELINKNO)
  2529. #define DMA_TCD25_SADDR (IMXRT_DMA_TCD[25].SADDR)
  2530. #define DMA_TCD25_SOFF (IMXRT_DMA_TCD[25].SOFF)
  2531. #define DMA_TCD25_ATTR (IMXRT_DMA_TCD[25].ATTR)
  2532. #define DMA_TCD25_NBYTES (IMXRT_DMA_TCD[25].NBYTES)
  2533. #define DMA_TCD25_NBYTES_MLNO (IMXRT_DMA_TCD[25].NBYTES_MLNO)
  2534. #define DMA_TCD25_NBYTES_MLOFFNO (IMXRT_DMA_TCD[25].NBYTES_MLOFFNO)
  2535. #define DMA_TCD25_NBYTES_MLOFFYES (IMXRT_DMA_TCD[25].NBYTES_MLOFFYES)
  2536. #define DMA_TCD25_SLAST (IMXRT_DMA_TCD[25].SLAST)
  2537. #define DMA_TCD25_DADDR (IMXRT_DMA_TCD[25].DADDR)
  2538. #define DMA_TCD25_DOFF (IMXRT_DMA_TCD[25].DOFF)
  2539. #define DMA_TCD25_CITER (IMXRT_DMA_TCD[25].CITER)
  2540. #define DMA_TCD25_CITER_ELINKYES (IMXRT_DMA_TCD[25].CITER_ELINKYES)
  2541. #define DMA_TCD25_CITER_ELINKNO (IMXRT_DMA_TCD[25].CITER_ELINKNO)
  2542. #define DMA_TCD25_DLASTSGA (IMXRT_DMA_TCD[25].DLASTSGA)
  2543. #define DMA_TCD25_CSR (IMXRT_DMA_TCD[25].CSR)
  2544. #define DMA_TCD25_BITER (IMXRT_DMA_TCD[25].BITER)
  2545. #define DMA_TCD25_BITER_ELINKYES (IMXRT_DMA_TCD[25].BITER_ELINKYES)
  2546. #define DMA_TCD25_BITER_ELINKNO (IMXRT_DMA_TCD[25].BITER_ELINKNO)
  2547. #define DMA_TCD26_SADDR (IMXRT_DMA_TCD[26].SADDR)
  2548. #define DMA_TCD26_SOFF (IMXRT_DMA_TCD[26].SOFF)
  2549. #define DMA_TCD26_ATTR (IMXRT_DMA_TCD[26].ATTR)
  2550. #define DMA_TCD26_NBYTES (IMXRT_DMA_TCD[26].NBYTES)
  2551. #define DMA_TCD26_NBYTES_MLNO (IMXRT_DMA_TCD[26].NBYTES_MLNO)
  2552. #define DMA_TCD26_NBYTES_MLOFFNO (IMXRT_DMA_TCD[26].NBYTES_MLOFFNO)
  2553. #define DMA_TCD26_NBYTES_MLOFFYES (IMXRT_DMA_TCD[26].NBYTES_MLOFFYES)
  2554. #define DMA_TCD26_SLAST (IMXRT_DMA_TCD[26].SLAST)
  2555. #define DMA_TCD26_DADDR (IMXRT_DMA_TCD[26].DADDR)
  2556. #define DMA_TCD26_DOFF (IMXRT_DMA_TCD[26].DOFF)
  2557. #define DMA_TCD26_CITER (IMXRT_DMA_TCD[26].CITER)
  2558. #define DMA_TCD26_CITER_ELINKYES (IMXRT_DMA_TCD[26].CITER_ELINKYES)
  2559. #define DMA_TCD26_CITER_ELINKNO (IMXRT_DMA_TCD[26].CITER_ELINKNO)
  2560. #define DMA_TCD26_DLASTSGA (IMXRT_DMA_TCD[26].DLASTSGA)
  2561. #define DMA_TCD26_CSR (IMXRT_DMA_TCD[26].CSR)
  2562. #define DMA_TCD26_BITER (IMXRT_DMA_TCD[26].BITER)
  2563. #define DMA_TCD26_BITER_ELINKYES (IMXRT_DMA_TCD[26].BITER_ELINKYES)
  2564. #define DMA_TCD26_BITER_ELINKNO (IMXRT_DMA_TCD[26].BITER_ELINKNO)
  2565. #define DMA_TCD27_SADDR (IMXRT_DMA_TCD[27].SADDR)
  2566. #define DMA_TCD27_SOFF (IMXRT_DMA_TCD[27].SOFF)
  2567. #define DMA_TCD27_ATTR (IMXRT_DMA_TCD[27].ATTR)
  2568. #define DMA_TCD27_NBYTES (IMXRT_DMA_TCD[27].NBYTES)
  2569. #define DMA_TCD27_NBYTES_MLNO (IMXRT_DMA_TCD[27].NBYTES_MLNO)
  2570. #define DMA_TCD27_NBYTES_MLOFFNO (IMXRT_DMA_TCD[27].NBYTES_MLOFFNO)
  2571. #define DMA_TCD27_NBYTES_MLOFFYES (IMXRT_DMA_TCD[27].NBYTES_MLOFFYES)
  2572. #define DMA_TCD27_SLAST (IMXRT_DMA_TCD[27].SLAST)
  2573. #define DMA_TCD27_DADDR (IMXRT_DMA_TCD[27].DADDR)
  2574. #define DMA_TCD27_DOFF (IMXRT_DMA_TCD[27].DOFF)
  2575. #define DMA_TCD27_CITER (IMXRT_DMA_TCD[27].CITER)
  2576. #define DMA_TCD27_CITER_ELINKYES (IMXRT_DMA_TCD[27].CITER_ELINKYES)
  2577. #define DMA_TCD27_CITER_ELINKNO (IMXRT_DMA_TCD[27].CITER_ELINKNO)
  2578. #define DMA_TCD27_DLASTSGA (IMXRT_DMA_TCD[27].DLASTSGA)
  2579. #define DMA_TCD27_CSR (IMXRT_DMA_TCD[27].CSR)
  2580. #define DMA_TCD27_BITER (IMXRT_DMA_TCD[27].BITER)
  2581. #define DMA_TCD27_BITER_ELINKYES (IMXRT_DMA_TCD[27].BITER_ELINKYES)
  2582. #define DMA_TCD27_BITER_ELINKNO (IMXRT_DMA_TCD[27].BITER_ELINKNO)
  2583. #define DMA_TCD28_SADDR (IMXRT_DMA_TCD[28].SADDR)
  2584. #define DMA_TCD28_SOFF (IMXRT_DMA_TCD[28].SOFF)
  2585. #define DMA_TCD28_ATTR (IMXRT_DMA_TCD[28].ATTR)
  2586. #define DMA_TCD28_NBYTES (IMXRT_DMA_TCD[28].NBYTES)
  2587. #define DMA_TCD28_NBYTES_MLNO (IMXRT_DMA_TCD[28].NBYTES_MLNO)
  2588. #define DMA_TCD28_NBYTES_MLOFFNO (IMXRT_DMA_TCD[28].NBYTES_MLOFFNO)
  2589. #define DMA_TCD28_NBYTES_MLOFFYES (IMXRT_DMA_TCD[28].NBYTES_MLOFFYES)
  2590. #define DMA_TCD28_SLAST (IMXRT_DMA_TCD[28].SLAST)
  2591. #define DMA_TCD28_DADDR (IMXRT_DMA_TCD[28].DADDR)
  2592. #define DMA_TCD28_DOFF (IMXRT_DMA_TCD[28].DOFF)
  2593. #define DMA_TCD28_CITER (IMXRT_DMA_TCD[28].CITER)
  2594. #define DMA_TCD28_CITER_ELINKYES (IMXRT_DMA_TCD[28].CITER_ELINKYES)
  2595. #define DMA_TCD28_CITER_ELINKNO (IMXRT_DMA_TCD[28].CITER_ELINKNO)
  2596. #define DMA_TCD28_DLASTSGA (IMXRT_DMA_TCD[28].DLASTSGA)
  2597. #define DMA_TCD28_CSR (IMXRT_DMA_TCD[28].CSR)
  2598. #define DMA_TCD28_BITER (IMXRT_DMA_TCD[28].BITER)
  2599. #define DMA_TCD28_BITER_ELINKYES (IMXRT_DMA_TCD[28].BITER_ELINKYES)
  2600. #define DMA_TCD28_BITER_ELINKNO (IMXRT_DMA_TCD[28].BITER_ELINKNO)
  2601. #define DMA_TCD29_SADDR (IMXRT_DMA_TCD[29].SADDR)
  2602. #define DMA_TCD29_SOFF (IMXRT_DMA_TCD[29].SOFF)
  2603. #define DMA_TCD29_ATTR (IMXRT_DMA_TCD[29].ATTR)
  2604. #define DMA_TCD29_NBYTES (IMXRT_DMA_TCD[29].NBYTES)
  2605. #define DMA_TCD29_NBYTES_MLNO (IMXRT_DMA_TCD[29].NBYTES_MLNO)
  2606. #define DMA_TCD29_NBYTES_MLOFFNO (IMXRT_DMA_TCD[29].NBYTES_MLOFFNO)
  2607. #define DMA_TCD29_NBYTES_MLOFFYES (IMXRT_DMA_TCD[29].NBYTES_MLOFFYES)
  2608. #define DMA_TCD29_SLAST (IMXRT_DMA_TCD[29].SLAST)
  2609. #define DMA_TCD29_DADDR (IMXRT_DMA_TCD[29].DADDR)
  2610. #define DMA_TCD29_DOFF (IMXRT_DMA_TCD[29].DOFF)
  2611. #define DMA_TCD29_CITER (IMXRT_DMA_TCD[29].CITER)
  2612. #define DMA_TCD29_CITER_ELINKYES (IMXRT_DMA_TCD[29].CITER_ELINKYES)
  2613. #define DMA_TCD29_CITER_ELINKNO (IMXRT_DMA_TCD[29].CITER_ELINKNO)
  2614. #define DMA_TCD29_DLASTSGA (IMXRT_DMA_TCD[29].DLASTSGA)
  2615. #define DMA_TCD29_CSR (IMXRT_DMA_TCD[29].CSR)
  2616. #define DMA_TCD29_BITER (IMXRT_DMA_TCD[29].BITER)
  2617. #define DMA_TCD29_BITER_ELINKYES (IMXRT_DMA_TCD[29].BITER_ELINKYES)
  2618. #define DMA_TCD29_BITER_ELINKNO (IMXRT_DMA_TCD[29].BITER_ELINKNO)
  2619. #define DMA_TCD30_SADDR (IMXRT_DMA_TCD[30].SADDR)
  2620. #define DMA_TCD30_SOFF (IMXRT_DMA_TCD[30].SOFF)
  2621. #define DMA_TCD30_ATTR (IMXRT_DMA_TCD[30].ATTR)
  2622. #define DMA_TCD30_NBYTES (IMXRT_DMA_TCD[30].NBYTES)
  2623. #define DMA_TCD30_NBYTES_MLNO (IMXRT_DMA_TCD[30].NBYTES_MLNO)
  2624. #define DMA_TCD30_NBYTES_MLOFFNO (IMXRT_DMA_TCD[30].NBYTES_MLOFFNO)
  2625. #define DMA_TCD30_NBYTES_MLOFFYES (IMXRT_DMA_TCD[30].NBYTES_MLOFFYES)
  2626. #define DMA_TCD30_SLAST (IMXRT_DMA_TCD[30].SLAST)
  2627. #define DMA_TCD30_DADDR (IMXRT_DMA_TCD[30].DADDR)
  2628. #define DMA_TCD30_DOFF (IMXRT_DMA_TCD[30].DOFF)
  2629. #define DMA_TCD30_CITER (IMXRT_DMA_TCD[30].CITER)
  2630. #define DMA_TCD30_CITER_ELINKYES (IMXRT_DMA_TCD[30].CITER_ELINKYES)
  2631. #define DMA_TCD30_CITER_ELINKNO (IMXRT_DMA_TCD[30].CITER_ELINKNO)
  2632. #define DMA_TCD30_DLASTSGA (IMXRT_DMA_TCD[30].DLASTSGA)
  2633. #define DMA_TCD30_CSR (IMXRT_DMA_TCD[30].CSR)
  2634. #define DMA_TCD30_BITER (IMXRT_DMA_TCD[30].BITER)
  2635. #define DMA_TCD30_BITER_ELINKYES (IMXRT_DMA_TCD[30].BITER_ELINKYES)
  2636. #define DMA_TCD30_BITER_ELINKNO (IMXRT_DMA_TCD[30].BITER_ELINKNO)
  2637. #define DMA_TCD31_SADDR (IMXRT_DMA_TCD[31].SADDR)
  2638. #define DMA_TCD31_SOFF (IMXRT_DMA_TCD[31].SOFF)
  2639. #define DMA_TCD31_ATTR (IMXRT_DMA_TCD[31].ATTR)
  2640. #define DMA_TCD31_NBYTES (IMXRT_DMA_TCD[31].NBYTES)
  2641. #define DMA_TCD31_NBYTES_MLNO (IMXRT_DMA_TCD[31].NBYTES_MLNO)
  2642. #define DMA_TCD31_NBYTES_MLOFFNO (IMXRT_DMA_TCD[31].NBYTES_MLOFFNO)
  2643. #define DMA_TCD31_NBYTES_MLOFFYES (IMXRT_DMA_TCD[31].NBYTES_MLOFFYES)
  2644. #define DMA_TCD31_SLAST (IMXRT_DMA_TCD[31].SLAST)
  2645. #define DMA_TCD31_DADDR (IMXRT_DMA_TCD[31].DADDR)
  2646. #define DMA_TCD31_DOFF (IMXRT_DMA_TCD[31].DOFF)
  2647. #define DMA_TCD31_CITER (IMXRT_DMA_TCD[31].CITER)
  2648. #define DMA_TCD31_CITER_ELINKYES (IMXRT_DMA_TCD[31].CITER_ELINKYES)
  2649. #define DMA_TCD31_CITER_ELINKNO (IMXRT_DMA_TCD[31].CITER_ELINKNO)
  2650. #define DMA_TCD31_DLASTSGA (IMXRT_DMA_TCD[31].DLASTSGA)
  2651. #define DMA_TCD31_CSR (IMXRT_DMA_TCD[31].CSR)
  2652. #define DMA_TCD31_BITER (IMXRT_DMA_TCD[31].BITER)
  2653. #define DMA_TCD31_BITER_ELINKYES (IMXRT_DMA_TCD[31].BITER_ELINKYES)
  2654. #define DMA_TCD31_BITER_ELINKNO (IMXRT_DMA_TCD[31].BITER_ELINKNO)
  2655. // TODO: double check these defines from Teensy 3.x are still correct for IMXRT
  2656. #define DMA_TCD_ATTR_SMOD(n) (((n) & 0x1F) << 11)
  2657. #define DMA_TCD_ATTR_SSIZE(n) (((n) & 0x7) << 8)
  2658. #define DMA_TCD_ATTR_DMOD(n) (((n) & 0x1F) << 3)
  2659. #define DMA_TCD_ATTR_DSIZE(n) (((n) & 0x7) << 0)
  2660. #define DMA_TCD_ATTR_SIZE_8BIT 0
  2661. #define DMA_TCD_ATTR_SIZE_16BIT 1
  2662. #define DMA_TCD_ATTR_SIZE_32BIT 2
  2663. #define DMA_TCD_ATTR_SIZE_64BIT 3
  2664. #define DMA_TCD_ATTR_SIZE_32BYTE 5
  2665. #define DMA_TCD_CSR_BWC(n) (((n) & 0x3) << 14)
  2666. #define DMA_TCD_CSR_BWC_MASK 0xC000
  2667. #define DMA_TCD_CSR_MAJORLINKCH(n) (((n) & 0x1F) << 8)
  2668. #define DMA_TCD_CSR_MAJORLINKCH_MASK 0x1F00
  2669. #define DMA_TCD_CSR_DONE 0x0080
  2670. #define DMA_TCD_CSR_ACTIVE 0x0040
  2671. #define DMA_TCD_CSR_MAJORELINK 0x0020
  2672. #define DMA_TCD_CSR_ESG 0x0010
  2673. #define DMA_TCD_CSR_DREQ 0x0008
  2674. #define DMA_TCD_CSR_INTHALF 0x0004
  2675. #define DMA_TCD_CSR_INTMAJOR 0x0002
  2676. #define DMA_TCD_CSR_START 0x0001
  2677. #define DMA_TCD_CITER_MASK ((uint16_t)0x7FFF) // Loop count mask
  2678. #define DMA_TCD_CITER_ELINK ((uint16_t)1<<15) // Enable channel linking on minor-loop complete
  2679. #define DMA_TCD_BITER_MASK ((uint16_t)0x7FFF) // Loop count mask
  2680. #define DMA_TCD_BITER_ELINK ((uint16_t)1<<15) // Enable channel linking on minor-loop complete
  2681. #define DMA_TCD_BITER_ELINKYES_ELINK 0x8000
  2682. #define DMA_TCD_BITER_ELINKYES_LINKCH(n) (((n) & 0x1F) << 9)
  2683. #define DMA_TCD_BITER_ELINKYES_LINKCH_MASK 0x3E00
  2684. #define DMA_TCD_BITER_ELINKYES_BITER(n) (((n) & 0x1FF) << 0)
  2685. #define DMA_TCD_BITER_ELINKYES_BITER_MASK 0x01FF
  2686. #define DMA_TCD_CITER_ELINKYES_ELINK 0x8000
  2687. #define DMA_TCD_CITER_ELINKYES_LINKCH(n) (((n) & 0x1F) << 9)
  2688. #define DMA_TCD_CITER_ELINKYES_LINKCH_MASK 0x3E00
  2689. #define DMA_TCD_CITER_ELINKYES_CITER(n) (((n) & 0x1FF) << 0)
  2690. #define DMA_TCD_CITER_ELINKYES_CITER_MASK 0x01FF
  2691. #define DMA_TCD_NBYTES_SMLOE ((uint32_t)1<<31) // Source Minor Loop Offset Enable
  2692. #define DMA_TCD_NBYTES_DMLOE ((uint32_t)1<<30) // Destination Minor Loop Offset Enable
  2693. #define DMA_TCD_NBYTES_MLOFFNO_NBYTES(n) ((uint32_t)((n) & 0x3FFFFFFF)) // NBytes transfer count when minor loop disabled
  2694. #define DMA_TCD_NBYTES_MLOFFYES_NBYTES(n) ((uint32_t)((n) & 0x3FF)) // NBytes transfer count when minor loop enabled
  2695. #define DMA_TCD_NBYTES_MLOFFYES_MLOFF(n) ((uint32_t)((n) & 0xFFFFF)<<10) // Minor loop offset
  2696. // 56.8.1: page 3151
  2697. typedef struct {
  2698. volatile uint16_t CTRL; /**< Control Register, offset: 0x0 */
  2699. volatile uint16_t FILT; /**< Input Filter Register, offset: 0x2 */
  2700. volatile uint16_t WTR; /**< Watchdog Timeout Register, offset: 0x4 */
  2701. volatile uint16_t POSD; /**< Position Difference Counter Register, offset: 0x6 */
  2702. volatile uint16_t POSDH; /**< Position Difference Hold Register, offset: 0x8 */
  2703. volatile uint16_t REV; /**< Revolution Counter Register, offset: 0xA */
  2704. volatile uint16_t REVH; /**< Revolution Hold Register, offset: 0xC */
  2705. volatile uint16_t UPOS; /**< Upper Position Counter Register, offset: 0xE */
  2706. volatile uint16_t LPOS; /**< Lower Position Counter Register, offset: 0x10 */
  2707. volatile uint16_t UPOSH; /**< Upper Position Hold Register, offset: 0x12 */
  2708. volatile uint16_t LPOSH; /**< Lower Position Hold Register, offset: 0x14 */
  2709. volatile uint16_t UINIT; /**< Upper Initialization Register, offset: 0x16 */
  2710. volatile uint16_t LINIT; /**< Lower Initialization Register, offset: 0x18 */
  2711. volatile uint16_t IMR; /**< Input Monitor Register, offset: 0x1A */
  2712. volatile uint16_t TST; /**< Test Register, offset: 0x1C */
  2713. volatile uint16_t CTRL2; /**< Control 2 Register, offset: 0x1E */
  2714. volatile uint16_t UMOD; /**< Upper Modulus Register, offset: 0x20 */
  2715. volatile uint16_t LMOD; /**< Lower Modulus Register, offset: 0x22 */
  2716. volatile uint16_t UCOMP; /**< Upper Position Compare Register, offset: 0x24 */
  2717. volatile uint16_t LCOMP; /**< Lower Position Compare Register, offset: 0x26 */
  2718. } IMXRT_ENC_t;
  2719. #define IMXRT_ENC1 (*(IMXRT_ENC_t *)IMXRT_ENC1_ADDRESS)
  2720. #define ENC1_CTRL (IMXRT_ENC1.CTRL)
  2721. #define ENC1_FILT (IMXRT_ENC1.FILT)
  2722. #define ENC1_WTR (IMXRT_ENC1.WTR)
  2723. #define ENC1_POSD (IMXRT_ENC1.POSD)
  2724. #define ENC1_POSDH (IMXRT_ENC1.POSDH)
  2725. #define ENC1_REV (IMXRT_ENC1.REV)
  2726. #define ENC1_REVH (IMXRT_ENC1.REVH)
  2727. #define ENC1_UPOS (IMXRT_ENC1.UPOS)
  2728. #define ENC1_LPOS (IMXRT_ENC1.LPOS)
  2729. #define ENC1_UPOSH (IMXRT_ENC1.UPOSH)
  2730. #define ENC1_LPOSH (IMXRT_ENC1.LPOSH)
  2731. #define ENC1_UINIT (IMXRT_ENC1.UINIT)
  2732. #define ENC1_LINIT (IMXRT_ENC1.LINIT)
  2733. #define ENC1_IMR (IMXRT_ENC1.IMR)
  2734. #define ENC1_TST (IMXRT_ENC1.TST)
  2735. #define ENC1_CTRL2 (IMXRT_ENC1.CTRL2)
  2736. #define ENC1_UMOD (IMXRT_ENC1.UMOD)
  2737. #define ENC1_LMOD (IMXRT_ENC1.LMOD)
  2738. #define ENC1_UCOMP (IMXRT_ENC1.UCOMP)
  2739. #define ENC1_LCOMP (IMXRT_ENC1.LCOMP)
  2740. #define IMXRT_ENC2 (*(IMXRT_ENC_t *)IMXRT_ENC2_ADDRESS)
  2741. #define ENC2_CTRL (IMXRT_ENC2.CTRL)
  2742. #define ENC2_FILT (IMXRT_ENC2.FILT)
  2743. #define ENC2_WTR (IMXRT_ENC2.WTR)
  2744. #define ENC2_POSD (IMXRT_ENC2.POSD)
  2745. #define ENC2_POSDH (IMXRT_ENC2.POSDH)
  2746. #define ENC2_REV (IMXRT_ENC2.REV)
  2747. #define ENC2_REVH (IMXRT_ENC2.REVH)
  2748. #define ENC2_UPOS (IMXRT_ENC2.UPOS)
  2749. #define ENC2_LPOS (IMXRT_ENC2.LPOS)
  2750. #define ENC2_UPOSH (IMXRT_ENC2.UPOSH)
  2751. #define ENC2_LPOSH (IMXRT_ENC2.LPOSH)
  2752. #define ENC2_UINIT (IMXRT_ENC2.UINIT)
  2753. #define ENC2_LINIT (IMXRT_ENC2.LINIT)
  2754. #define ENC2_IMR (IMXRT_ENC2.IMR)
  2755. #define ENC2_TST (IMXRT_ENC2.TST)
  2756. #define ENC2_CTRL2 (IMXRT_ENC2.CTRL2)
  2757. #define ENC2_UMOD (IMXRT_ENC2.UMOD)
  2758. #define ENC2_LMOD (IMXRT_ENC2.LMOD)
  2759. #define ENC2_UCOMP (IMXRT_ENC2.UCOMP)
  2760. #define ENC2_LCOMP (IMXRT_ENC2.LCOMP)
  2761. #define IMXRT_ENC3 (*(IMXRT_ENC_t *)IMXRT_ENC3_ADDRESS)
  2762. #define ENC3_CTRL (IMXRT_ENC3.CTRL)
  2763. #define ENC3_FILT (IMXRT_ENC3.FILT)
  2764. #define ENC3_WTR (IMXRT_ENC3.WTR)
  2765. #define ENC3_POSD (IMXRT_ENC3.POSD)
  2766. #define ENC3_POSDH (IMXRT_ENC3.POSDH)
  2767. #define ENC3_REV (IMXRT_ENC3.REV)
  2768. #define ENC3_REVH (IMXRT_ENC3.REVH)
  2769. #define ENC3_UPOS (IMXRT_ENC3.UPOS)
  2770. #define ENC3_LPOS (IMXRT_ENC3.LPOS)
  2771. #define ENC3_UPOSH (IMXRT_ENC3.UPOSH)
  2772. #define ENC3_LPOSH (IMXRT_ENC3.LPOSH)
  2773. #define ENC3_UINIT (IMXRT_ENC3.UINIT)
  2774. #define ENC3_LINIT (IMXRT_ENC3.LINIT)
  2775. #define ENC3_IMR (IMXRT_ENC3.IMR)
  2776. #define ENC3_TST (IMXRT_ENC3.TST)
  2777. #define ENC3_CTRL2 (IMXRT_ENC3.CTRL2)
  2778. #define ENC3_UMOD (IMXRT_ENC3.UMOD)
  2779. #define ENC3_LMOD (IMXRT_ENC3.LMOD)
  2780. #define ENC3_UCOMP (IMXRT_ENC3.UCOMP)
  2781. #define ENC3_LCOMP (IMXRT_ENC3.LCOMP)
  2782. #define IMXRT_ENC4 (*(IMXRT_ENC_t *)IMXRT_ENC4_ADDRESS)
  2783. #define ENC4_CTRL (IMXRT_ENC4.CTRL)
  2784. #define ENC4_FILT (IMXRT_ENC4.FILT)
  2785. #define ENC4_WTR (IMXRT_ENC4.WTR)
  2786. #define ENC4_POSD (IMXRT_ENC4.POSD)
  2787. #define ENC4_POSDH (IMXRT_ENC4.POSDH)
  2788. #define ENC4_REV (IMXRT_ENC4.REV)
  2789. #define ENC4_REVH (IMXRT_ENC4.REVH)
  2790. #define ENC4_UPOS (IMXRT_ENC4.UPOS)
  2791. #define ENC4_LPOS (IMXRT_ENC4.LPOS)
  2792. #define ENC4_UPOSH (IMXRT_ENC4.UPOSH)
  2793. #define ENC4_LPOSH (IMXRT_ENC4.LPOSH)
  2794. #define ENC4_UINIT (IMXRT_ENC4.UINIT)
  2795. #define ENC4_LINIT (IMXRT_ENC4.LINIT)
  2796. #define ENC4_IMR (IMXRT_ENC4.IMR)
  2797. #define ENC4_TST (IMXRT_ENC4.TST)
  2798. #define ENC4_CTRL2 (IMXRT_ENC4.CTRL2)
  2799. #define ENC4_UMOD (IMXRT_ENC4.UMOD)
  2800. #define ENC4_LMOD (IMXRT_ENC4.LMOD)
  2801. #define ENC4_UCOMP (IMXRT_ENC4.UCOMP)
  2802. #define ENC4_LCOMP (IMXRT_ENC4.LCOMP)
  2803. // 41.6: page 2068
  2804. #define IMXRT_ENET (*(IMXRT_REGISTER32_t *)IMXRT_ENET_ADDRESS)
  2805. #define IMXRT_ENET_TIMER (*(IMXRT_REGISTER32_t *)(IMXRT_ENET_ADDRESS+0x400))
  2806. #define ENET_EIR (IMXRT_ENET.offset004)
  2807. #define ENET_EIMR (IMXRT_ENET.offset008)
  2808. #define ENET_RDAR (IMXRT_ENET.offset010)
  2809. #define ENET_TDAR (IMXRT_ENET.offset014)
  2810. #define ENET_ECR (IMXRT_ENET.offset024)
  2811. #define ENET_MMFR (IMXRT_ENET.offset040)
  2812. #define ENET_MSCR (IMXRT_ENET.offset044)
  2813. #define ENET_MIBC (IMXRT_ENET.offset064)
  2814. #define ENET_RCR (IMXRT_ENET.offset084)
  2815. #define ENET_TCR (IMXRT_ENET.offset0C4)
  2816. #define ENET_PALR (IMXRT_ENET.offset0E4)
  2817. #define ENET_PAUR (IMXRT_ENET.offset0E8)
  2818. #define ENET_OPD (IMXRT_ENET.offset0EC)
  2819. #define ENET_TXIC (IMXRT_ENET.offset0F0)
  2820. #define ENET_RXIC (IMXRT_ENET.offset100)
  2821. #define ENET_IAUR (IMXRT_ENET.offset118)
  2822. #define ENET_IALR (IMXRT_ENET.offset11C)
  2823. #define ENET_GAUR (IMXRT_ENET.offset120)
  2824. #define ENET_GALR (IMXRT_ENET.offset124)
  2825. #define ENET_TFWR (IMXRT_ENET.offset144)
  2826. #define ENET_RDSR (IMXRT_ENET.offset180)
  2827. #define ENET_TDSR (IMXRT_ENET.offset184)
  2828. #define ENET_MRBR (IMXRT_ENET.offset188)
  2829. #define ENET_RSFL (IMXRT_ENET.offset190)
  2830. #define ENET_RSEM (IMXRT_ENET.offset194)
  2831. #define ENET_RAEM (IMXRT_ENET.offset198)
  2832. #define ENET_RAFL (IMXRT_ENET.offset19C)
  2833. #define ENET_TSEM (IMXRT_ENET.offset1A0)
  2834. #define ENET_TAEM (IMXRT_ENET.offset1A4)
  2835. #define ENET_TAFL (IMXRT_ENET.offset1A8)
  2836. #define ENET_TIPG (IMXRT_ENET.offset1AC)
  2837. #define ENET_FTRL (IMXRT_ENET.offset1B0)
  2838. #define ENET_TACC (IMXRT_ENET.offset1C0)
  2839. #define ENET_RACC (IMXRT_ENET.offset1C4)
  2840. #define ENET_RMON_T_DROP (IMXRT_ENET.offset200)
  2841. #define ENET_RMON_T_PACKETS (IMXRT_ENET.offset204)
  2842. #define ENET_RMON_T_BC_PKT (IMXRT_ENET.offset208)
  2843. #define ENET_RMON_T_MC_PKT (IMXRT_ENET.offset20C)
  2844. #define ENET_RMON_T_CRC_ALIGN (IMXRT_ENET.offset210)
  2845. #define ENET_RMON_T_UNDERSIZE (IMXRT_ENET.offset214)
  2846. #define ENET_RMON_T_OVERSIZE (IMXRT_ENET.offset218)
  2847. #define ENET_RMON_T_FRAG (IMXRT_ENET.offset21C)
  2848. #define ENET_RMON_T_JAB (IMXRT_ENET.offset220)
  2849. #define ENET_RMON_T_COL (IMXRT_ENET.offset224)
  2850. #define ENET_RMON_T_P64 (IMXRT_ENET.offset228)
  2851. #define ENET_RMON_T_P65TO127 (IMXRT_ENET.offset22C)
  2852. #define ENET_RMON_T_P128TO255 (IMXRT_ENET.offset230)
  2853. #define ENET_RMON_T_P256TO511 (IMXRT_ENET.offset234)
  2854. #define ENET_RMON_T_P512TO1023 (IMXRT_ENET.offset238)
  2855. #define ENET_RMON_T_P1024TO2047 (IMXRT_ENET.offset23C)
  2856. #define ENET_RMON_T_P_GTE2048 (IMXRT_ENET.offset240)
  2857. #define ENET_RMON_T_OCTETS (IMXRT_ENET.offset244)
  2858. #define ENET_IEEE_T_DROP (IMXRT_ENET.offset248)
  2859. #define ENET_IEEE_T_FRAME_OK (IMXRT_ENET.offset24C)
  2860. #define ENET_IEEE_T_1COL (IMXRT_ENET.offset250)
  2861. #define ENET_IEEE_T_MCOL (IMXRT_ENET.offset254)
  2862. #define ENET_IEEE_T_DEF (IMXRT_ENET.offset258)
  2863. #define ENET_IEEE_T_LCOL (IMXRT_ENET.offset25C)
  2864. #define ENET_IEEE_T_EXCOL (IMXRT_ENET.offset260)
  2865. #define ENET_IEEE_T_MACERR (IMXRT_ENET.offset264)
  2866. #define ENET_IEEE_T_CSERR (IMXRT_ENET.offset268)
  2867. #define ENET_IEEE_T_SQE (IMXRT_ENET.offset26C)
  2868. #define ENET_IEEE_T_FDXFC (IMXRT_ENET.offset270)
  2869. #define ENET_IEEE_T_OCTETS_OK (IMXRT_ENET.offset274)
  2870. #define ENET_RMON_R_PACKETS (IMXRT_ENET.offset284)
  2871. #define ENET_RMON_R_BC_PKT (IMXRT_ENET.offset288)
  2872. #define ENET_RMON_R_MC_PKT (IMXRT_ENET.offset28C)
  2873. #define ENET_RMON_R_CRC_ALIGN (IMXRT_ENET.offset290)
  2874. #define ENET_RMON_R_UNDERSIZE (IMXRT_ENET.offset294)
  2875. #define ENET_RMON_R_OVERSIZE (IMXRT_ENET.offset298)
  2876. #define ENET_RMON_R_FRAG (IMXRT_ENET.offset29C)
  2877. #define ENET_RMON_R_JAB (IMXRT_ENET.offset2A0)
  2878. #define ENET_RMON_R_RESVD_0 (IMXRT_ENET.offset2A4)
  2879. #define ENET_RMON_R_P64 (IMXRT_ENET.offset2A8)
  2880. #define ENET_RMON_R_P65TO127 (IMXRT_ENET.offset2AC)
  2881. #define ENET_RMON_R_P128TO255 (IMXRT_ENET.offset2B0)
  2882. #define ENET_RMON_R_P256TO511 (IMXRT_ENET.offset2B4)
  2883. #define ENET_RMON_R_P512TO1023 (IMXRT_ENET.offset2B8)
  2884. #define ENET_RMON_R_P1024TO2047 (IMXRT_ENET.offset2BC)
  2885. #define ENET_RMON_R_P_GTE2048 (IMXRT_ENET.offset2C0)
  2886. #define ENET_RMON_R_OCTETS (IMXRT_ENET.offset2C4)
  2887. #define ENET_IEEE_R_DROP (IMXRT_ENET.offset2C8)
  2888. #define ENET_IEEE_R_FRAME_OK (IMXRT_ENET.offset2CC)
  2889. #define ENET_IEEE_R_CRC (IMXRT_ENET.offset2D0)
  2890. #define ENET_IEEE_R_ALIGN (IMXRT_ENET.offset2D4)
  2891. #define ENET_IEEE_R_MACERR (IMXRT_ENET.offset2D8)
  2892. #define ENET_IEEE_R_FDXFC (IMXRT_ENET.offset2DC)
  2893. #define ENET_IEEE_R_OCTETS_OK (IMXRT_ENET.offset2E0)
  2894. #define ENET_ATCR (IMXRT_ENET_TIMER.offset000)
  2895. #define ENET_ATVR (IMXRT_ENET_TIMER.offset004)
  2896. #define ENET_ATOFF (IMXRT_ENET_TIMER.offset008)
  2897. #define ENET_ATPER (IMXRT_ENET_TIMER.offset00C)
  2898. #define ENET_ATCOR (IMXRT_ENET_TIMER.offset010)
  2899. #define ENET_ATINC (IMXRT_ENET_TIMER.offset014)
  2900. #define ENET_ATSTMP (IMXRT_ENET_TIMER.offset018)
  2901. #define ENET_TGSR (IMXRT_ENET_TIMER.offset204)
  2902. #define ENET_TCSR0 (IMXRT_ENET_TIMER.offset208)
  2903. #define ENET_TCCR0 (IMXRT_ENET_TIMER.offset20C)
  2904. #define ENET_TCSR1 (IMXRT_ENET_TIMER.offset210)
  2905. #define ENET_TCCR1 (IMXRT_ENET_TIMER.offset214)
  2906. #define ENET_TCSR2 (IMXRT_ENET_TIMER.offset218)
  2907. #define ENET_TCCR2 (IMXRT_ENET_TIMER.offset21C)
  2908. #define ENET_TCSR3 (IMXRT_ENET_TIMER.offset220)
  2909. #define ENET_TCCR3 (IMXRT_ENET_TIMER.offset224)
  2910. #define ENET_EIR_BABR ((uint32_t)(1<<30))
  2911. #define ENET_EIR_BABT ((uint32_t)(1<<29))
  2912. #define ENET_EIR_GRA ((uint32_t)(1<<28))
  2913. #define ENET_EIR_TXF ((uint32_t)(1<<27))
  2914. #define ENET_EIR_TXB ((uint32_t)(1<<26))
  2915. #define ENET_EIR_RXF ((uint32_t)(1<<25))
  2916. #define ENET_EIR_RXB ((uint32_t)(1<<24))
  2917. #define ENET_EIR_MII ((uint32_t)(1<<23))
  2918. #define ENET_EIR_EBERR ((uint32_t)(1<<22))
  2919. #define ENET_EIR_LC ((uint32_t)(1<<21))
  2920. #define ENET_EIR_RL ((uint32_t)(1<<20))
  2921. #define ENET_EIR_UN ((uint32_t)(1<<19))
  2922. #define ENET_EIR_PLR ((uint32_t)(1<<18))
  2923. #define ENET_EIR_WAKEUP ((uint32_t)(1<<17))
  2924. #define ENET_EIR_TS_AVAIL ((uint32_t)(1<<16))
  2925. #define ENET_EIR_TS_TIMER ((uint32_t)(1<<15))
  2926. #define ENET_EIMR_BABR ((uint32_t)(1<<30))
  2927. #define ENET_EIMR_BABT ((uint32_t)(1<<29))
  2928. #define ENET_EIMR_GRA ((uint32_t)(1<<28))
  2929. #define ENET_EIMR_TXF ((uint32_t)(1<<27))
  2930. #define ENET_EIMR_TXB ((uint32_t)(1<<26))
  2931. #define ENET_EIMR_RXF ((uint32_t)(1<<25))
  2932. #define ENET_EIMR_RXB ((uint32_t)(1<<24))
  2933. #define ENET_EIMR_MII ((uint32_t)(1<<23))
  2934. #define ENET_EIMR_EBERR ((uint32_t)(1<<22))
  2935. #define ENET_EIMR_LC ((uint32_t)(1<<21))
  2936. #define ENET_EIMR_RL ((uint32_t)(1<<20))
  2937. #define ENET_EIMR_UN ((uint32_t)(1<<19))
  2938. #define ENET_EIMR_PLR ((uint32_t)(1<<18))
  2939. #define ENET_EIMR_WAKEUP ((uint32_t)(1<<17))
  2940. #define ENET_EIMR_TS_AVAIL ((uint32_t)(1<<16))
  2941. #define ENET_EIMR_TS_TIMER ((uint32_t)(1<<15))
  2942. #define ENET_RDAR_RDAR ((uint32_t)(1<<24))
  2943. #define ENET_TDAR_TDAR ((uint32_t)(1<<24))
  2944. #define ENET_ECR_DBSWP ((uint32_t)(1<<8))
  2945. #define ENET_ECR_DBGEN ((uint32_t)(1<<6))
  2946. #define ENET_ECR_EN1588 ((uint32_t)(1<<4))
  2947. #define ENET_ECR_SLEEP ((uint32_t)(1<<3))
  2948. #define ENET_ECR_MAGICEN ((uint32_t)(1<<2))
  2949. #define ENET_ECR_ETHEREN ((uint32_t)(1<<1))
  2950. #define ENET_ECR_RESET ((uint32_t)(1<<0))
  2951. #define ENET_MMFR_ST(n) ((uint32_t)(((n) & 0x03) << 30))
  2952. #define ENET_MMFR_OP(n) ((uint32_t)(((n) & 0x03) << 28))
  2953. #define ENET_MMFR_PA(n) ((uint32_t)(((n) & 0x1F) << 23))
  2954. #define ENET_MMFR_RA(n) ((uint32_t)(((n) & 0x1F) << 18))
  2955. #define ENET_MMFR_TA(n) ((uint32_t)(((n) & 0x03) << 16))
  2956. #define ENET_MMFR_DATA(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  2957. #define ENET_MSCR_HOLDTIME(n) ((uint32_t)(((n) & 0x07) << 8))
  2958. #define ENET_MSCR_DIS_PRE ((uint32_t)(1<<7))
  2959. #define ENET_MSCR_MII_SPEED(n) ((uint32_t)(((n) & 0x3F) << 1))
  2960. #define ENET_MIBC_MIB_DIS ((uint32_t)(1<<31))
  2961. #define ENET_MIBC_MIB_IDLE ((uint32_t)(1<<30))
  2962. #define ENET_MIBC_MIB_CLEAR ((uint32_t)(1<<29))
  2963. #define ENET_RCR_GRS ((uint32_t)(1<<31))
  2964. #define ENET_RCR_NLC ((uint32_t)(1<<30))
  2965. #define ENET_RCR_MAX_FL(n) ((uint32_t)(((n) & 0x3FFF) << 16))
  2966. #define ENET_RCR_CFEN ((uint32_t)(1<<15))
  2967. #define ENET_RCR_CRCFWD ((uint32_t)(1<<14))
  2968. #define ENET_RCR_PAUFWD ((uint32_t)(1<<13))
  2969. #define ENET_RCR_PADEN ((uint32_t)(1<<12))
  2970. #define ENET_RCR_RMII_10T ((uint32_t)(1<<9))
  2971. #define ENET_RCR_RMII_MODE ((uint32_t)(1<<8))
  2972. #define ENET_RCR_FCE ((uint32_t)(1<<5))
  2973. #define ENET_RCR_BC_REJ ((uint32_t)(1<<4))
  2974. #define ENET_RCR_PROM ((uint32_t)(1<<3))
  2975. #define ENET_RCR_MII_MODE ((uint32_t)(1<<2))
  2976. #define ENET_RCR_DRT ((uint32_t)(1<<1))
  2977. #define ENET_RCR_LOOP ((uint32_t)(1<<0))
  2978. #define ENET_TCR_CRCFWD ((uint32_t)(1<<9))
  2979. #define ENET_TCR_ADDINS ((uint32_t)(1<<8))
  2980. #define ENET_TCR_ADDSEL(n) ((uint32_t)(((n) & 0x07) << 5))
  2981. #define ENET_TCR_RFC_PAUSE ((uint32_t)(1<<4))
  2982. #define ENET_TCR_TFC_PAUSE ((uint32_t)(1<<3))
  2983. #define ENET_TCR_FDEN ((uint32_t)(1<<2))
  2984. #define ENET_TCR_GTS ((uint32_t)(1<<0))
  2985. #define ENET_PAUR_PADDR2(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  2986. #define ENET_PAUR_TYPE(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  2987. #define ENET_OPD_OPCODE(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  2988. #define ENET_OPD_PAUSE_DUR(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  2989. #define ENET_TXIC_ICEN ((uint32_t)(1<<31))
  2990. #define ENET_TXIC_ICCS ((uint32_t)(1<<30))
  2991. #define ENET_TXIC_ICFT(n) ((uint32_t)(((n) & 0xFF) << 20))
  2992. #define ENET_TXIC_ICTT(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  2993. #define ENET_RXIC_ICEN ((uint32_t)(1<<31))
  2994. #define ENET_RXIC_ICCS ((uint32_t)(1<<30))
  2995. #define ENET_RXIC_ICFT(n) ((uint32_t)(((n) & 0xFF) << 20))
  2996. #define ENET_RXIC_ICTT(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  2997. #define ENET_TFWR_STRFWD ((uint32_t)(1<<8))
  2998. #define ENET_TFWR_TFWR(n) ((uint32_t)(((n) & 0x3F) << 0))
  2999. #define ENET_TACC_PROCHK ((uint32_t)(1<<4))
  3000. #define ENET_TACC_IPCHK ((uint32_t)(1<<3))
  3001. #define ENET_TACC_SHIFT16 ((uint32_t)(1<<0))
  3002. #define ENET_RACC_SHIFT16 ((uint32_t)(1<<7))
  3003. #define ENET_RACC_LINEDIS ((uint32_t)(1<<6))
  3004. #define ENET_RACC_PRODIS ((uint32_t)(1<<2))
  3005. #define ENET_RACC_IPDIS ((uint32_t)(1<<1))
  3006. #define ENET_RACC_PADREM ((uint32_t)(1<<0))
  3007. #define IMXRT_ENET2 (*(IMXRT_REGISTER32_t *)IMXRT_ENET2_ADDRESS)
  3008. #define IMXRT_ENET2_TIMER (*(IMXRT_REGISTER32_t *)(IMXRT_ENET2_ADDRESS+0x400))
  3009. #define ENET2_EIR (IMXRT_ENET2.offset004)
  3010. #define ENET2_EIMR (IMXRT_ENET2.offset008)
  3011. #define ENET2_RDAR (IMXRT_ENET2.offset010)
  3012. #define ENET2_TDAR (IMXRT_ENET2.offset014)
  3013. #define ENET2_ECR (IMXRT_ENET2.offset024)
  3014. #define ENET2_MMFR (IMXRT_ENET2.offset040)
  3015. #define ENET2_MSCR (IMXRT_ENET2.offset044)
  3016. #define ENET2_MIBC (IMXRT_ENET2.offset064)
  3017. #define ENET2_RCR (IMXRT_ENET2.offset084)
  3018. #define ENET2_TCR (IMXRT_ENET2.offset0C4)
  3019. #define ENET2_PALR (IMXRT_ENET2.offset0E4)
  3020. #define ENET2_PAUR (IMXRT_ENET2.offset0E8)
  3021. #define ENET2_OPD (IMXRT_ENET2.offset0EC)
  3022. #define ENET2_TXIC (IMXRT_ENET2.offset0F0)
  3023. #define ENET2_RXIC (IMXRT_ENET2.offset100)
  3024. #define ENET2_IAUR (IMXRT_ENET2.offset118)
  3025. #define ENET2_IALR (IMXRT_ENET2.offset11C)
  3026. #define ENET2_GAUR (IMXRT_ENET2.offset120)
  3027. #define ENET2_GALR (IMXRT_ENET2.offset124)
  3028. #define ENET2_TFWR (IMXRT_ENET2.offset144)
  3029. #define ENET2_RDSR (IMXRT_ENET2.offset180)
  3030. #define ENET2_TDSR (IMXRT_ENET2.offset184)
  3031. #define ENET2_MRBR (IMXRT_ENET2.offset188)
  3032. #define ENET2_RSFL (IMXRT_ENET2.offset190)
  3033. #define ENET2_RSEM (IMXRT_ENET2.offset194)
  3034. #define ENET2_RAEM (IMXRT_ENET2.offset198)
  3035. #define ENET2_RAFL (IMXRT_ENET2.offset19C)
  3036. #define ENET2_TSEM (IMXRT_ENET2.offset1A0)
  3037. #define ENET2_TAEM (IMXRT_ENET2.offset1A4)
  3038. #define ENET2_TAFL (IMXRT_ENET2.offset1A8)
  3039. #define ENET2_TIPG (IMXRT_ENET2.offset1AC)
  3040. #define ENET2_FTRL (IMXRT_ENET2.offset1B0)
  3041. #define ENET2_TACC (IMXRT_ENET2.offset1C0)
  3042. #define ENET2_RACC (IMXRT_ENET2.offset1C4)
  3043. #define ENET2_RMON_T_DROP (IMXRT_ENET2.offset200)
  3044. #define ENET2_RMON_T_PACKETS (IMXRT_ENET2.offset204)
  3045. #define ENET2_RMON_T_BC_PKT (IMXRT_ENET2.offset208)
  3046. #define ENET2_RMON_T_MC_PKT (IMXRT_ENET2.offset20C)
  3047. #define ENET2_RMON_T_CRC_ALIGN (IMXRT_ENET2.offset210)
  3048. #define ENET2_RMON_T_UNDERSIZE (IMXRT_ENET2.offset214)
  3049. #define ENET2_RMON_T_OVERSIZE (IMXRT_ENET2.offset218)
  3050. #define ENET2_RMON_T_FRAG (IMXRT_ENET2.offset21C)
  3051. #define ENET2_RMON_T_JAB (IMXRT_ENET2.offset220)
  3052. #define ENET2_RMON_T_COL (IMXRT_ENET2.offset224)
  3053. #define ENET2_RMON_T_P64 (IMXRT_ENET2.offset228)
  3054. #define ENET2_RMON_T_P65TO127 (IMXRT_ENET2.offset22C)
  3055. #define ENET2_RMON_T_P128TO255 (IMXRT_ENET2.offset230)
  3056. #define ENET2_RMON_T_P256TO511 (IMXRT_ENET2.offset234)
  3057. #define ENET2_RMON_T_P512TO1023 (IMXRT_ENET2.offset238)
  3058. #define ENET2_RMON_T_P1024TO2047 (IMXRT_ENET2.offset23C)
  3059. #define ENET2_RMON_T_P_GTE2048 (IMXRT_ENET2.offset240)
  3060. #define ENET2_RMON_T_OCTETS (IMXRT_ENET2.offset244)
  3061. #define ENET2_IEEE_T_DROP (IMXRT_ENET2.offset248)
  3062. #define ENET2_IEEE_T_FRAME_OK (IMXRT_ENET2.offset24C)
  3063. #define ENET2_IEEE_T_1COL (IMXRT_ENET2.offset250)
  3064. #define ENET2_IEEE_T_MCOL (IMXRT_ENET2.offset254)
  3065. #define ENET2_IEEE_T_DEF (IMXRT_ENET2.offset258)
  3066. #define ENET2_IEEE_T_LCOL (IMXRT_ENET2.offset25C)
  3067. #define ENET2_IEEE_T_EXCOL (IMXRT_ENET2.offset260)
  3068. #define ENET2_IEEE_T_MACERR (IMXRT_ENET2.offset264)
  3069. #define ENET2_IEEE_T_CSERR (IMXRT_ENET2.offset268)
  3070. #define ENET2_IEEE_T_SQE (IMXRT_ENET2.offset26C)
  3071. #define ENET2_IEEE_T_FDXFC (IMXRT_ENET2.offset270)
  3072. #define ENET2_IEEE_T_OCTETS_OK (IMXRT_ENET2.offset274)
  3073. #define ENET2_RMON_R_PACKETS (IMXRT_ENET2.offset284)
  3074. #define ENET2_RMON_R_BC_PKT (IMXRT_ENET2.offset288)
  3075. #define ENET2_RMON_R_MC_PKT (IMXRT_ENET2.offset28C)
  3076. #define ENET2_RMON_R_CRC_ALIGN (IMXRT_ENET2.offset290)
  3077. #define ENET2_RMON_R_UNDERSIZE (IMXRT_ENET2.offset294)
  3078. #define ENET2_RMON_R_OVERSIZE (IMXRT_ENET2.offset298)
  3079. #define ENET2_RMON_R_FRAG (IMXRT_ENET2.offset29C)
  3080. #define ENET2_RMON_R_JAB (IMXRT_ENET2.offset2A0)
  3081. #define ENET2_RMON_R_RESVD_0 (IMXRT_ENET2.offset2A4)
  3082. #define ENET2_RMON_R_P64 (IMXRT_ENET2.offset2A8)
  3083. #define ENET2_RMON_R_P65TO127 (IMXRT_ENET2.offset2AC)
  3084. #define ENET2_RMON_R_P128TO255 (IMXRT_ENET2.offset2B0)
  3085. #define ENET2_RMON_R_P256TO511 (IMXRT_ENET2.offset2B4)
  3086. #define ENET2_RMON_R_P512TO1023 (IMXRT_ENET2.offset2B8)
  3087. #define ENET2_RMON_R_P1024TO2047 (IMXRT_ENET2.offset2BC)
  3088. #define ENET2_RMON_R_P_GTE2048 (IMXRT_ENET2.offset2C0)
  3089. #define ENET2_RMON_R_OCTETS (IMXRT_ENET2.offset2C4)
  3090. #define ENET2_IEEE_R_DROP (IMXRT_ENET2.offset2C8)
  3091. #define ENET2_IEEE_R_FRAME_OK (IMXRT_ENET2.offset2CC)
  3092. #define ENET2_IEEE_R_CRC (IMXRT_ENET2.offset2D0)
  3093. #define ENET2_IEEE_R_ALIGN (IMXRT_ENET2.offset2D4)
  3094. #define ENET2_IEEE_R_MACERR (IMXRT_ENET2.offset2D8)
  3095. #define ENET2_IEEE_R_FDXFC (IMXRT_ENET2.offset2DC)
  3096. #define ENET2_IEEE_R_OCTETS_OK (IMXRT_ENET2.offset2E0)
  3097. #define ENET2_ATCR (IMXRT_ENET2_TIMER.offset000)
  3098. #define ENET2_ATVR (IMXRT_ENET2_TIMER.offset004)
  3099. #define ENET2_ATOFF (IMXRT_ENET2_TIMER.offset008)
  3100. #define ENET2_ATPER (IMXRT_ENET2_TIMER.offset00C)
  3101. #define ENET2_ATCOR (IMXRT_ENET2_TIMER.offset010)
  3102. #define ENET2_ATINC (IMXRT_ENET2_TIMER.offset014)
  3103. #define ENET2_ATSTMP (IMXRT_ENET2_TIMER.offset018)
  3104. #define ENET2_TGSR (IMXRT_ENET2_TIMER.offset204)
  3105. #define ENET2_TCSR0 (IMXRT_ENET2_TIMER.offset208)
  3106. #define ENET2_TCCR0 (IMXRT_ENET2_TIMER.offset20C)
  3107. #define ENET2_TCSR1 (IMXRT_ENET2_TIMER.offset210)
  3108. #define ENET2_TCCR1 (IMXRT_ENET2_TIMER.offset214)
  3109. #define ENET2_TCSR2 (IMXRT_ENET2_TIMER.offset218)
  3110. #define ENET2_TCCR2 (IMXRT_ENET2_TIMER.offset21C)
  3111. #define ENET2_TCSR3 (IMXRT_ENET2_TIMER.offset220)
  3112. #define ENET2_TCCR3 (IMXRT_ENET2_TIMER.offset224)
  3113. // 59.6.1.1: page 3221
  3114. #define IMXRT_EWM (*(IMXRT_REGISTER8_t *)IMXRT_EWM_ADDRESS)
  3115. #define EWM_CTRL (IMXRT_EWM.offset00)
  3116. #define EWM_SERV (IMXRT_EWM.offset01)
  3117. #define EWM_CMPL (IMXRT_EWM.offset02)
  3118. #define EWM_CMPH (IMXRT_EWM.offset03)
  3119. #define EWM_CLKCTRL (IMXRT_EWM.offset04)
  3120. #define EWM_CLKPRESCALER (IMXRT_EWM.offset05)
  3121. // 44.9: page 2555
  3122. #define IMXRT_FLEXCAN1 (*(IMXRT_REGISTER32_t *)IMXRT_FLEXCAN1_ADDRESS)
  3123. #define IMXRT_FLEXCAN1_MASK (*(IMXRT_REGISTER32_t *)(IMXRT_FLEXCAN1_ADDRESS+0x800))
  3124. #define FLEXCAN1_MCR (IMXRT_FLEXCAN1.offset000)
  3125. #define FLEXCAN1_CTRL1 (IMXRT_FLEXCAN1.offset004)
  3126. #define FLEXCAN1_TIMER (IMXRT_FLEXCAN1.offset008)
  3127. #define FLEXCAN1_RXMGMASK (IMXRT_FLEXCAN1.offset010)
  3128. #define FLEXCAN1_RX14MASK (IMXRT_FLEXCAN1.offset014)
  3129. #define FLEXCAN1_RX15MASK (IMXRT_FLEXCAN1.offset018)
  3130. #define FLEXCAN1_ECR (IMXRT_FLEXCAN1.offset01C)
  3131. #define FLEXCAN1_ESR1 (IMXRT_FLEXCAN1.offset020)
  3132. #define FLEXCAN1_IMASK2 (IMXRT_FLEXCAN1.offset024)
  3133. #define FLEXCAN1_IMASK1 (IMXRT_FLEXCAN1.offset028)
  3134. #define FLEXCAN1_IFLAG2 (IMXRT_FLEXCAN1.offset02C)
  3135. #define FLEXCAN1_IFLAG1 (IMXRT_FLEXCAN1.offset030)
  3136. #define FLEXCAN1_CTRL2 (IMXRT_FLEXCAN1.offset034)
  3137. #define FLEXCAN1_ESR2 (IMXRT_FLEXCAN1.offset038)
  3138. #define FLEXCAN1_CRCR (IMXRT_FLEXCAN1.offset044)
  3139. #define FLEXCAN1_RXFGMASK (IMXRT_FLEXCAN1.offset048)
  3140. #define FLEXCAN1_RXFIR (IMXRT_FLEXCAN1.offset04C)
  3141. #define FLEXCAN1_RXIMR0 (IMXRT_FLEXCAN1_MASK.offset080)
  3142. #define FLEXCAN1_RXIMR1 (IMXRT_FLEXCAN1_MASK.offset084)
  3143. #define FLEXCAN1_RXIMR2 (IMXRT_FLEXCAN1_MASK.offset088)
  3144. #define FLEXCAN1_RXIMR3 (IMXRT_FLEXCAN1_MASK.offset08C)
  3145. #define FLEXCAN1_RXIMR4 (IMXRT_FLEXCAN1_MASK.offset090)
  3146. #define FLEXCAN1_RXIMR5 (IMXRT_FLEXCAN1_MASK.offset094)
  3147. #define FLEXCAN1_RXIMR6 (IMXRT_FLEXCAN1_MASK.offset098)
  3148. #define FLEXCAN1_RXIMR7 (IMXRT_FLEXCAN1_MASK.offset09C)
  3149. #define FLEXCAN1_RXIMR8 (IMXRT_FLEXCAN1_MASK.offset0A0)
  3150. #define FLEXCAN1_RXIMR9 (IMXRT_FLEXCAN1_MASK.offset0A4)
  3151. #define FLEXCAN1_RXIMR10 (IMXRT_FLEXCAN1_MASK.offset0A8)
  3152. #define FLEXCAN1_RXIMR11 (IMXRT_FLEXCAN1_MASK.offset0AC)
  3153. #define FLEXCAN1_RXIMR12 (IMXRT_FLEXCAN1_MASK.offset0B0)
  3154. #define FLEXCAN1_RXIMR13 (IMXRT_FLEXCAN1_MASK.offset0B4)
  3155. #define FLEXCAN1_RXIMR14 (IMXRT_FLEXCAN1_MASK.offset0B8)
  3156. #define FLEXCAN1_RXIMR15 (IMXRT_FLEXCAN1_MASK.offset0BC)
  3157. #define FLEXCAN1_RXIMR16 (IMXRT_FLEXCAN1_MASK.offset0C0)
  3158. #define FLEXCAN1_RXIMR17 (IMXRT_FLEXCAN1_MASK.offset0C4)
  3159. #define FLEXCAN1_RXIMR18 (IMXRT_FLEXCAN1_MASK.offset0C8)
  3160. #define FLEXCAN1_RXIMR19 (IMXRT_FLEXCAN1_MASK.offset0CC)
  3161. #define FLEXCAN1_RXIMR20 (IMXRT_FLEXCAN1_MASK.offset0D0)
  3162. #define FLEXCAN1_RXIMR21 (IMXRT_FLEXCAN1_MASK.offset0D4)
  3163. #define FLEXCAN1_RXIMR22 (IMXRT_FLEXCAN1_MASK.offset0D8)
  3164. #define FLEXCAN1_RXIMR23 (IMXRT_FLEXCAN1_MASK.offset0DC)
  3165. #define FLEXCAN1_RXIMR24 (IMXRT_FLEXCAN1_MASK.offset0E0)
  3166. #define FLEXCAN1_RXIMR25 (IMXRT_FLEXCAN1_MASK.offset0E4)
  3167. #define FLEXCAN1_RXIMR26 (IMXRT_FLEXCAN1_MASK.offset0E8)
  3168. #define FLEXCAN1_RXIMR27 (IMXRT_FLEXCAN1_MASK.offset0EC)
  3169. #define FLEXCAN1_RXIMR28 (IMXRT_FLEXCAN1_MASK.offset0F0)
  3170. #define FLEXCAN1_RXIMR29 (IMXRT_FLEXCAN1_MASK.offset0F4)
  3171. #define FLEXCAN1_RXIMR30 (IMXRT_FLEXCAN1_MASK.offset0F8)
  3172. #define FLEXCAN1_RXIMR31 (IMXRT_FLEXCAN1_MASK.offset0FC)
  3173. #define FLEXCAN1_RXIMR32 (IMXRT_FLEXCAN1_MASK.offset100)
  3174. #define FLEXCAN1_RXIMR33 (IMXRT_FLEXCAN1_MASK.offset104)
  3175. #define FLEXCAN1_RXIMR34 (IMXRT_FLEXCAN1_MASK.offset108)
  3176. #define FLEXCAN1_RXIMR35 (IMXRT_FLEXCAN1_MASK.offset10C)
  3177. #define FLEXCAN1_RXIMR36 (IMXRT_FLEXCAN1_MASK.offset110)
  3178. #define FLEXCAN1_RXIMR37 (IMXRT_FLEXCAN1_MASK.offset114)
  3179. #define FLEXCAN1_RXIMR38 (IMXRT_FLEXCAN1_MASK.offset118)
  3180. #define FLEXCAN1_RXIMR39 (IMXRT_FLEXCAN1_MASK.offset11C)
  3181. #define FLEXCAN1_RXIMR40 (IMXRT_FLEXCAN1_MASK.offset120)
  3182. #define FLEXCAN1_RXIMR41 (IMXRT_FLEXCAN1_MASK.offset124)
  3183. #define FLEXCAN1_RXIMR42 (IMXRT_FLEXCAN1_MASK.offset128)
  3184. #define FLEXCAN1_RXIMR43 (IMXRT_FLEXCAN1_MASK.offset12C)
  3185. #define FLEXCAN1_RXIMR44 (IMXRT_FLEXCAN1_MASK.offset130)
  3186. #define FLEXCAN1_RXIMR45 (IMXRT_FLEXCAN1_MASK.offset134)
  3187. #define FLEXCAN1_RXIMR46 (IMXRT_FLEXCAN1_MASK.offset138)
  3188. #define FLEXCAN1_RXIMR47 (IMXRT_FLEXCAN1_MASK.offset13C)
  3189. #define FLEXCAN1_RXIMR48 (IMXRT_FLEXCAN1_MASK.offset140)
  3190. #define FLEXCAN1_RXIMR49 (IMXRT_FLEXCAN1_MASK.offset144)
  3191. #define FLEXCAN1_RXIMR50 (IMXRT_FLEXCAN1_MASK.offset148)
  3192. #define FLEXCAN1_RXIMR51 (IMXRT_FLEXCAN1_MASK.offset14C)
  3193. #define FLEXCAN1_RXIMR52 (IMXRT_FLEXCAN1_MASK.offset150)
  3194. #define FLEXCAN1_RXIMR53 (IMXRT_FLEXCAN1_MASK.offset154)
  3195. #define FLEXCAN1_RXIMR54 (IMXRT_FLEXCAN1_MASK.offset158)
  3196. #define FLEXCAN1_RXIMR55 (IMXRT_FLEXCAN1_MASK.offset15C)
  3197. #define FLEXCAN1_RXIMR56 (IMXRT_FLEXCAN1_MASK.offset160)
  3198. #define FLEXCAN1_RXIMR57 (IMXRT_FLEXCAN1_MASK.offset164)
  3199. #define FLEXCAN1_RXIMR58 (IMXRT_FLEXCAN1_MASK.offset168)
  3200. #define FLEXCAN1_RXIMR59 (IMXRT_FLEXCAN1_MASK.offset16C)
  3201. #define FLEXCAN1_RXIMR60 (IMXRT_FLEXCAN1_MASK.offset170)
  3202. #define FLEXCAN1_RXIMR61 (IMXRT_FLEXCAN1_MASK.offset174)
  3203. #define FLEXCAN1_RXIMR62 (IMXRT_FLEXCAN1_MASK.offset178)
  3204. #define FLEXCAN1_RXIMR63 (IMXRT_FLEXCAN1_MASK.offset17C)
  3205. #define FLEXCAN1_GFWR (IMXRT_FLEXCAN1_MASK.offset1E0)
  3206. #define IMXRT_FLEXCAN2 (*(IMXRT_REGISTER32_t *)IMXRT_FLEXCAN2_ADDRESS)
  3207. #define IMXRT_FLEXCAN2_MASK (*(IMXRT_REGISTER32_t *)(IMXRT_FLEXCAN2_ADDRESS+0x800))
  3208. #define FLEXCAN2_MCR (IMXRT_FLEXCAN2.offset000)
  3209. #define FLEXCAN2_CTRL1 (IMXRT_FLEXCAN2.offset004)
  3210. #define FLEXCAN2_TIMER (IMXRT_FLEXCAN2.offset008)
  3211. #define FLEXCAN2_RXMGMASK (IMXRT_FLEXCAN2.offset010)
  3212. #define FLEXCAN2_RX14MASK (IMXRT_FLEXCAN2.offset014)
  3213. #define FLEXCAN2_RX15MASK (IMXRT_FLEXCAN2.offset018)
  3214. #define FLEXCAN2_ECR (IMXRT_FLEXCAN2.offset01C)
  3215. #define FLEXCAN2_ESR1 (IMXRT_FLEXCAN2.offset020)
  3216. #define FLEXCAN2_IMASK2 (IMXRT_FLEXCAN2.offset024)
  3217. #define FLEXCAN2_IMASK1 (IMXRT_FLEXCAN2.offset028)
  3218. #define FLEXCAN2_IFLAG2 (IMXRT_FLEXCAN2.offset02C)
  3219. #define FLEXCAN2_IFLAG1 (IMXRT_FLEXCAN2.offset030)
  3220. #define FLEXCAN2_CTRL2 (IMXRT_FLEXCAN2.offset034)
  3221. #define FLEXCAN2_ESR2 (IMXRT_FLEXCAN2.offset038)
  3222. #define FLEXCAN2_CRCR (IMXRT_FLEXCAN2.offset044)
  3223. #define FLEXCAN2_RXFGMASK (IMXRT_FLEXCAN2.offset048)
  3224. #define FLEXCAN2_RXFIR (IMXRT_FLEXCAN2.offset04C)
  3225. #define FLEXCAN2_RXIMR0 (IMXRT_FLEXCAN2_MASK.offset080)
  3226. #define FLEXCAN2_RXIMR1 (IMXRT_FLEXCAN2_MASK.offset084)
  3227. #define FLEXCAN2_RXIMR2 (IMXRT_FLEXCAN2_MASK.offset088)
  3228. #define FLEXCAN2_RXIMR3 (IMXRT_FLEXCAN2_MASK.offset08C)
  3229. #define FLEXCAN2_RXIMR4 (IMXRT_FLEXCAN2_MASK.offset090)
  3230. #define FLEXCAN2_RXIMR5 (IMXRT_FLEXCAN2_MASK.offset094)
  3231. #define FLEXCAN2_RXIMR6 (IMXRT_FLEXCAN2_MASK.offset098)
  3232. #define FLEXCAN2_RXIMR7 (IMXRT_FLEXCAN2_MASK.offset09C)
  3233. #define FLEXCAN2_RXIMR8 (IMXRT_FLEXCAN2_MASK.offset0A0)
  3234. #define FLEXCAN2_RXIMR9 (IMXRT_FLEXCAN2_MASK.offset0A4)
  3235. #define FLEXCAN2_RXIMR10 (IMXRT_FLEXCAN2_MASK.offset0A8)
  3236. #define FLEXCAN2_RXIMR11 (IMXRT_FLEXCAN2_MASK.offset0AC)
  3237. #define FLEXCAN2_RXIMR12 (IMXRT_FLEXCAN2_MASK.offset0B0)
  3238. #define FLEXCAN2_RXIMR13 (IMXRT_FLEXCAN2_MASK.offset0B4)
  3239. #define FLEXCAN2_RXIMR14 (IMXRT_FLEXCAN2_MASK.offset0B8)
  3240. #define FLEXCAN2_RXIMR15 (IMXRT_FLEXCAN2_MASK.offset0BC)
  3241. #define FLEXCAN2_RXIMR16 (IMXRT_FLEXCAN2_MASK.offset0C0)
  3242. #define FLEXCAN2_RXIMR17 (IMXRT_FLEXCAN2_MASK.offset0C4)
  3243. #define FLEXCAN2_RXIMR18 (IMXRT_FLEXCAN2_MASK.offset0C8)
  3244. #define FLEXCAN2_RXIMR19 (IMXRT_FLEXCAN2_MASK.offset0CC)
  3245. #define FLEXCAN2_RXIMR20 (IMXRT_FLEXCAN2_MASK.offset0D0)
  3246. #define FLEXCAN2_RXIMR21 (IMXRT_FLEXCAN2_MASK.offset0D4)
  3247. #define FLEXCAN2_RXIMR22 (IMXRT_FLEXCAN2_MASK.offset0D8)
  3248. #define FLEXCAN2_RXIMR23 (IMXRT_FLEXCAN2_MASK.offset0DC)
  3249. #define FLEXCAN2_RXIMR24 (IMXRT_FLEXCAN2_MASK.offset0E0)
  3250. #define FLEXCAN2_RXIMR25 (IMXRT_FLEXCAN2_MASK.offset0E4)
  3251. #define FLEXCAN2_RXIMR26 (IMXRT_FLEXCAN2_MASK.offset0E8)
  3252. #define FLEXCAN2_RXIMR27 (IMXRT_FLEXCAN2_MASK.offset0EC)
  3253. #define FLEXCAN2_RXIMR28 (IMXRT_FLEXCAN2_MASK.offset0F0)
  3254. #define FLEXCAN2_RXIMR29 (IMXRT_FLEXCAN2_MASK.offset0F4)
  3255. #define FLEXCAN2_RXIMR30 (IMXRT_FLEXCAN2_MASK.offset0F8)
  3256. #define FLEXCAN2_RXIMR31 (IMXRT_FLEXCAN2_MASK.offset0FC)
  3257. #define FLEXCAN2_RXIMR32 (IMXRT_FLEXCAN2_MASK.offset100)
  3258. #define FLEXCAN2_RXIMR33 (IMXRT_FLEXCAN2_MASK.offset104)
  3259. #define FLEXCAN2_RXIMR34 (IMXRT_FLEXCAN2_MASK.offset108)
  3260. #define FLEXCAN2_RXIMR35 (IMXRT_FLEXCAN2_MASK.offset10C)
  3261. #define FLEXCAN2_RXIMR36 (IMXRT_FLEXCAN2_MASK.offset110)
  3262. #define FLEXCAN2_RXIMR37 (IMXRT_FLEXCAN2_MASK.offset114)
  3263. #define FLEXCAN2_RXIMR38 (IMXRT_FLEXCAN2_MASK.offset118)
  3264. #define FLEXCAN2_RXIMR39 (IMXRT_FLEXCAN2_MASK.offset11C)
  3265. #define FLEXCAN2_RXIMR40 (IMXRT_FLEXCAN2_MASK.offset120)
  3266. #define FLEXCAN2_RXIMR41 (IMXRT_FLEXCAN2_MASK.offset124)
  3267. #define FLEXCAN2_RXIMR42 (IMXRT_FLEXCAN2_MASK.offset128)
  3268. #define FLEXCAN2_RXIMR43 (IMXRT_FLEXCAN2_MASK.offset12C)
  3269. #define FLEXCAN2_RXIMR44 (IMXRT_FLEXCAN2_MASK.offset130)
  3270. #define FLEXCAN2_RXIMR45 (IMXRT_FLEXCAN2_MASK.offset134)
  3271. #define FLEXCAN2_RXIMR46 (IMXRT_FLEXCAN2_MASK.offset138)
  3272. #define FLEXCAN2_RXIMR47 (IMXRT_FLEXCAN2_MASK.offset13C)
  3273. #define FLEXCAN2_RXIMR48 (IMXRT_FLEXCAN2_MASK.offset140)
  3274. #define FLEXCAN2_RXIMR49 (IMXRT_FLEXCAN2_MASK.offset144)
  3275. #define FLEXCAN2_RXIMR50 (IMXRT_FLEXCAN2_MASK.offset148)
  3276. #define FLEXCAN2_RXIMR51 (IMXRT_FLEXCAN2_MASK.offset14C)
  3277. #define FLEXCAN2_RXIMR52 (IMXRT_FLEXCAN2_MASK.offset150)
  3278. #define FLEXCAN2_RXIMR53 (IMXRT_FLEXCAN2_MASK.offset154)
  3279. #define FLEXCAN2_RXIMR54 (IMXRT_FLEXCAN2_MASK.offset158)
  3280. #define FLEXCAN2_RXIMR55 (IMXRT_FLEXCAN2_MASK.offset15C)
  3281. #define FLEXCAN2_RXIMR56 (IMXRT_FLEXCAN2_MASK.offset160)
  3282. #define FLEXCAN2_RXIMR57 (IMXRT_FLEXCAN2_MASK.offset164)
  3283. #define FLEXCAN2_RXIMR58 (IMXRT_FLEXCAN2_MASK.offset168)
  3284. #define FLEXCAN2_RXIMR59 (IMXRT_FLEXCAN2_MASK.offset16C)
  3285. #define FLEXCAN2_RXIMR60 (IMXRT_FLEXCAN2_MASK.offset170)
  3286. #define FLEXCAN2_RXIMR61 (IMXRT_FLEXCAN2_MASK.offset174)
  3287. #define FLEXCAN2_RXIMR62 (IMXRT_FLEXCAN2_MASK.offset178)
  3288. #define FLEXCAN2_RXIMR63 (IMXRT_FLEXCAN2_MASK.offset17C)
  3289. #define FLEXCAN2_GFWR (IMXRT_FLEXCAN2_MASK.offset1E0)
  3290. #define IMXRT_FLEXCAN3 (*(IMXRT_REGISTER32_t *)IMXRT_FLEXCAN3_ADDRESS0)
  3291. #define IMXRT_FLEXCAN3_MASK (*(IMXRT_REGISTER32_t *)(IMXRT_FLEXCAN3_ADDRESS+0x800))
  3292. #define IMXRT_FLEXCAN3_EXT (*(IMXRT_REGISTER32_t *)(IMXRT_FLEXCAN3_ADDRESS+0xB00))
  3293. #define IMXRT_FLEXCAN3_ERXFIFO (*(IMXRT_REGISTER32_t *)(IMXRT_FLEXCAN3_ADDRESS+0x3000))
  3294. #define FLEXCAN3_MCR (IMXRT_FLEXCAN3.offset000)
  3295. #define FLEXCAN3_CTRL1 (IMXRT_FLEXCAN3.offset004)
  3296. #define FLEXCAN3_TIMER (IMXRT_FLEXCAN3.offset008)
  3297. #define FLEXCAN3_RXMGMASK (IMXRT_FLEXCAN3.offset010)
  3298. #define FLEXCAN3_RX14MASK (IMXRT_FLEXCAN3.offset014)
  3299. #define FLEXCAN3_RX15MASK (IMXRT_FLEXCAN3.offset018)
  3300. #define FLEXCAN3_ECR (IMXRT_FLEXCAN3.offset01C)
  3301. #define FLEXCAN3_ESR1 (IMXRT_FLEXCAN3.offset020)
  3302. #define FLEXCAN3_IMASK2 (IMXRT_FLEXCAN3.offset024)
  3303. #define FLEXCAN3_IMASK1 (IMXRT_FLEXCAN3.offset028)
  3304. #define FLEXCAN3_IFLAG2 (IMXRT_FLEXCAN3.offset02C)
  3305. #define FLEXCAN3_IFLAG1 (IMXRT_FLEXCAN3.offset030)
  3306. #define FLEXCAN3_CTRL2 (IMXRT_FLEXCAN3.offset034)
  3307. #define FLEXCAN3_ESR2 (IMXRT_FLEXCAN3.offset038)
  3308. #define FLEXCAN3_CRCR (IMXRT_FLEXCAN3.offset044)
  3309. #define FLEXCAN3_RXFGMASK (IMXRT_FLEXCAN3.offset048)
  3310. #define FLEXCAN3_RXFIR (IMXRT_FLEXCAN3.offset04C)
  3311. #define FLEXCAN3_CBT (IMXRT_FLEXCAN3.offset050)
  3312. #define FLEXCAN3_RXIMR0 (IMXRT_FLEXCAN3_MASK.offset080)
  3313. #define FLEXCAN3_RXIMR1 (IMXRT_FLEXCAN3_MASK.offset084)
  3314. #define FLEXCAN3_RXIMR2 (IMXRT_FLEXCAN3_MASK.offset088)
  3315. #define FLEXCAN3_RXIMR3 (IMXRT_FLEXCAN3_MASK.offset08C)
  3316. #define FLEXCAN3_RXIMR4 (IMXRT_FLEXCAN3_MASK.offset090)
  3317. #define FLEXCAN3_RXIMR5 (IMXRT_FLEXCAN3_MASK.offset094)
  3318. #define FLEXCAN3_RXIMR6 (IMXRT_FLEXCAN3_MASK.offset098)
  3319. #define FLEXCAN3_RXIMR7 (IMXRT_FLEXCAN3_MASK.offset09C)
  3320. #define FLEXCAN3_RXIMR8 (IMXRT_FLEXCAN3_MASK.offset0A0)
  3321. #define FLEXCAN3_RXIMR9 (IMXRT_FLEXCAN3_MASK.offset0A4)
  3322. #define FLEXCAN3_RXIMR10 (IMXRT_FLEXCAN3_MASK.offset0A8)
  3323. #define FLEXCAN3_RXIMR11 (IMXRT_FLEXCAN3_MASK.offset0AC)
  3324. #define FLEXCAN3_RXIMR12 (IMXRT_FLEXCAN3_MASK.offset0B0)
  3325. #define FLEXCAN3_RXIMR13 (IMXRT_FLEXCAN3_MASK.offset0B4)
  3326. #define FLEXCAN3_RXIMR14 (IMXRT_FLEXCAN3_MASK.offset0B8)
  3327. #define FLEXCAN3_RXIMR15 (IMXRT_FLEXCAN3_MASK.offset0BC)
  3328. #define FLEXCAN3_RXIMR16 (IMXRT_FLEXCAN3_MASK.offset0C0)
  3329. #define FLEXCAN3_RXIMR17 (IMXRT_FLEXCAN3_MASK.offset0C4)
  3330. #define FLEXCAN3_RXIMR18 (IMXRT_FLEXCAN3_MASK.offset0C8)
  3331. #define FLEXCAN3_RXIMR19 (IMXRT_FLEXCAN3_MASK.offset0CC)
  3332. #define FLEXCAN3_RXIMR20 (IMXRT_FLEXCAN3_MASK.offset0D0)
  3333. #define FLEXCAN3_RXIMR21 (IMXRT_FLEXCAN3_MASK.offset0D4)
  3334. #define FLEXCAN3_RXIMR22 (IMXRT_FLEXCAN3_MASK.offset0D8)
  3335. #define FLEXCAN3_RXIMR23 (IMXRT_FLEXCAN3_MASK.offset0DC)
  3336. #define FLEXCAN3_RXIMR24 (IMXRT_FLEXCAN3_MASK.offset0E0)
  3337. #define FLEXCAN3_RXIMR25 (IMXRT_FLEXCAN3_MASK.offset0E4)
  3338. #define FLEXCAN3_RXIMR26 (IMXRT_FLEXCAN3_MASK.offset0E8)
  3339. #define FLEXCAN3_RXIMR27 (IMXRT_FLEXCAN3_MASK.offset0EC)
  3340. #define FLEXCAN3_RXIMR28 (IMXRT_FLEXCAN3_MASK.offset0F0)
  3341. #define FLEXCAN3_RXIMR29 (IMXRT_FLEXCAN3_MASK.offset0F4)
  3342. #define FLEXCAN3_RXIMR30 (IMXRT_FLEXCAN3_MASK.offset0F8)
  3343. #define FLEXCAN3_RXIMR31 (IMXRT_FLEXCAN3_MASK.offset0FC)
  3344. #define FLEXCAN3_RXIMR32 (IMXRT_FLEXCAN3_MASK.offset100)
  3345. #define FLEXCAN3_RXIMR33 (IMXRT_FLEXCAN3_MASK.offset104)
  3346. #define FLEXCAN3_RXIMR34 (IMXRT_FLEXCAN3_MASK.offset108)
  3347. #define FLEXCAN3_RXIMR35 (IMXRT_FLEXCAN3_MASK.offset10C)
  3348. #define FLEXCAN3_RXIMR36 (IMXRT_FLEXCAN3_MASK.offset110)
  3349. #define FLEXCAN3_RXIMR37 (IMXRT_FLEXCAN3_MASK.offset114)
  3350. #define FLEXCAN3_RXIMR38 (IMXRT_FLEXCAN3_MASK.offset118)
  3351. #define FLEXCAN3_RXIMR39 (IMXRT_FLEXCAN3_MASK.offset11C)
  3352. #define FLEXCAN3_RXIMR40 (IMXRT_FLEXCAN3_MASK.offset120)
  3353. #define FLEXCAN3_RXIMR41 (IMXRT_FLEXCAN3_MASK.offset124)
  3354. #define FLEXCAN3_RXIMR42 (IMXRT_FLEXCAN3_MASK.offset128)
  3355. #define FLEXCAN3_RXIMR43 (IMXRT_FLEXCAN3_MASK.offset12C)
  3356. #define FLEXCAN3_RXIMR44 (IMXRT_FLEXCAN3_MASK.offset130)
  3357. #define FLEXCAN3_RXIMR45 (IMXRT_FLEXCAN3_MASK.offset134)
  3358. #define FLEXCAN3_RXIMR46 (IMXRT_FLEXCAN3_MASK.offset138)
  3359. #define FLEXCAN3_RXIMR47 (IMXRT_FLEXCAN3_MASK.offset13C)
  3360. #define FLEXCAN3_RXIMR48 (IMXRT_FLEXCAN3_MASK.offset140)
  3361. #define FLEXCAN3_RXIMR49 (IMXRT_FLEXCAN3_MASK.offset144)
  3362. #define FLEXCAN3_RXIMR50 (IMXRT_FLEXCAN3_MASK.offset148)
  3363. #define FLEXCAN3_RXIMR51 (IMXRT_FLEXCAN3_MASK.offset14C)
  3364. #define FLEXCAN3_RXIMR52 (IMXRT_FLEXCAN3_MASK.offset150)
  3365. #define FLEXCAN3_RXIMR53 (IMXRT_FLEXCAN3_MASK.offset154)
  3366. #define FLEXCAN3_RXIMR54 (IMXRT_FLEXCAN3_MASK.offset158)
  3367. #define FLEXCAN3_RXIMR55 (IMXRT_FLEXCAN3_MASK.offset15C)
  3368. #define FLEXCAN3_RXIMR56 (IMXRT_FLEXCAN3_MASK.offset160)
  3369. #define FLEXCAN3_RXIMR57 (IMXRT_FLEXCAN3_MASK.offset164)
  3370. #define FLEXCAN3_RXIMR58 (IMXRT_FLEXCAN3_MASK.offset168)
  3371. #define FLEXCAN3_RXIMR59 (IMXRT_FLEXCAN3_MASK.offset16C)
  3372. #define FLEXCAN3_RXIMR60 (IMXRT_FLEXCAN3_MASK.offset170)
  3373. #define FLEXCAN3_RXIMR61 (IMXRT_FLEXCAN3_MASK.offset174)
  3374. #define FLEXCAN3_RXIMR62 (IMXRT_FLEXCAN3_MASK.offset178)
  3375. #define FLEXCAN3_RXIMR63 (IMXRT_FLEXCAN3_MASK.offset17C)
  3376. #define FLEXCAN3_EPRS (IMXRT_FLEXCAN3_EXT.offset0F0)
  3377. #define FLEXCAN3_ENCBT (IMXRT_FLEXCAN3_EXT.offset0F4)
  3378. #define FLEXCAN3_EDCBT (IMXRT_FLEXCAN3_EXT.offset0F8)
  3379. #define FLEXCAN3_ETDC (IMXRT_FLEXCAN3_EXT.offset0FC)
  3380. #define FLEXCAN3_FDCTRL (IMXRT_FLEXCAN3_EXT.offset100)
  3381. #define FLEXCAN3_FDCBT (IMXRT_FLEXCAN3_EXT.offset104)
  3382. #define FLEXCAN3_FDCRC (IMXRT_FLEXCAN3_EXT.offset108)
  3383. #define FLEXCAN3_ERFCR (IMXRT_FLEXCAN3_EXT.offset10C)
  3384. #define FLEXCAN3_ERFIER (IMXRT_FLEXCAN3_EXT.offset110)
  3385. #define FLEXCAN3_ERFSR (IMXRT_FLEXCAN3_EXT.offset114)
  3386. #define FLEXCAN3_HR_TIME_STAMP0 (IMXRT_FLEXCAN3_EXT.offset130)
  3387. #define FLEXCAN3_HR_TIME_STAMP1 (IMXRT_FLEXCAN3_EXT.offset134)
  3388. #define FLEXCAN3_HR_TIME_STAMP2 (IMXRT_FLEXCAN3_EXT.offset138)
  3389. #define FLEXCAN3_HR_TIME_STAMP3 (IMXRT_FLEXCAN3_EXT.offset13C)
  3390. #define FLEXCAN3_HR_TIME_STAMP4 (IMXRT_FLEXCAN3_EXT.offset140)
  3391. #define FLEXCAN3_HR_TIME_STAMP5 (IMXRT_FLEXCAN3_EXT.offset144)
  3392. #define FLEXCAN3_HR_TIME_STAMP6 (IMXRT_FLEXCAN3_EXT.offset148)
  3393. #define FLEXCAN3_HR_TIME_STAMP7 (IMXRT_FLEXCAN3_EXT.offset14C)
  3394. #define FLEXCAN3_HR_TIME_STAMP8 (IMXRT_FLEXCAN3_EXT.offset150)
  3395. #define FLEXCAN3_HR_TIME_STAMP9 (IMXRT_FLEXCAN3_EXT.offset154)
  3396. #define FLEXCAN3_HR_TIME_STAMP10 (IMXRT_FLEXCAN3_EXT.offset158)
  3397. #define FLEXCAN3_HR_TIME_STAMP11 (IMXRT_FLEXCAN3_EXT.offset15C)
  3398. #define FLEXCAN3_HR_TIME_STAMP12 (IMXRT_FLEXCAN3_EXT.offset160)
  3399. #define FLEXCAN3_HR_TIME_STAMP13 (IMXRT_FLEXCAN3_EXT.offset164)
  3400. #define FLEXCAN3_HR_TIME_STAMP14 (IMXRT_FLEXCAN3_EXT.offset168)
  3401. #define FLEXCAN3_HR_TIME_STAMP15 (IMXRT_FLEXCAN3_EXT.offset16C)
  3402. #define FLEXCAN3_HR_TIME_STAMP16 (IMXRT_FLEXCAN3_EXT.offset170)
  3403. #define FLEXCAN3_HR_TIME_STAMP17 (IMXRT_FLEXCAN3_EXT.offset174)
  3404. #define FLEXCAN3_HR_TIME_STAMP18 (IMXRT_FLEXCAN3_EXT.offset178)
  3405. #define FLEXCAN3_HR_TIME_STAMP19 (IMXRT_FLEXCAN3_EXT.offset17C)
  3406. #define FLEXCAN3_HR_TIME_STAMP20 (IMXRT_FLEXCAN3_EXT.offset180)
  3407. #define FLEXCAN3_HR_TIME_STAMP21 (IMXRT_FLEXCAN3_EXT.offset184)
  3408. #define FLEXCAN3_HR_TIME_STAMP22 (IMXRT_FLEXCAN3_EXT.offset188)
  3409. #define FLEXCAN3_HR_TIME_STAMP23 (IMXRT_FLEXCAN3_EXT.offset18C)
  3410. #define FLEXCAN3_HR_TIME_STAMP24 (IMXRT_FLEXCAN3_EXT.offset190)
  3411. #define FLEXCAN3_HR_TIME_STAMP25 (IMXRT_FLEXCAN3_EXT.offset194)
  3412. #define FLEXCAN3_HR_TIME_STAMP26 (IMXRT_FLEXCAN3_EXT.offset198)
  3413. #define FLEXCAN3_HR_TIME_STAMP27 (IMXRT_FLEXCAN3_EXT.offset19C)
  3414. #define FLEXCAN3_HR_TIME_STAMP28 (IMXRT_FLEXCAN3_EXT.offset1A0)
  3415. #define FLEXCAN3_HR_TIME_STAMP29 (IMXRT_FLEXCAN3_EXT.offset1A4)
  3416. #define FLEXCAN3_HR_TIME_STAMP30 (IMXRT_FLEXCAN3_EXT.offset1A8)
  3417. #define FLEXCAN3_HR_TIME_STAMP31 (IMXRT_FLEXCAN3_EXT.offset1AC)
  3418. #define FLEXCAN3_HR_TIME_STAMP32 (IMXRT_FLEXCAN3_EXT.offset1B0)
  3419. #define FLEXCAN3_HR_TIME_STAMP33 (IMXRT_FLEXCAN3_EXT.offset1B4)
  3420. #define FLEXCAN3_HR_TIME_STAMP34 (IMXRT_FLEXCAN3_EXT.offset1B8)
  3421. #define FLEXCAN3_HR_TIME_STAMP35 (IMXRT_FLEXCAN3_EXT.offset1BC)
  3422. #define FLEXCAN3_HR_TIME_STAMP36 (IMXRT_FLEXCAN3_EXT.offset1C0)
  3423. #define FLEXCAN3_HR_TIME_STAMP37 (IMXRT_FLEXCAN3_EXT.offset1C4)
  3424. #define FLEXCAN3_HR_TIME_STAMP38 (IMXRT_FLEXCAN3_EXT.offset1C8)
  3425. #define FLEXCAN3_HR_TIME_STAMP39 (IMXRT_FLEXCAN3_EXT.offset1CC)
  3426. #define FLEXCAN3_HR_TIME_STAMP40 (IMXRT_FLEXCAN3_EXT.offset1D0)
  3427. #define FLEXCAN3_HR_TIME_STAMP41 (IMXRT_FLEXCAN3_EXT.offset1D4)
  3428. #define FLEXCAN3_HR_TIME_STAMP42 (IMXRT_FLEXCAN3_EXT.offset1D8)
  3429. #define FLEXCAN3_HR_TIME_STAMP43 (IMXRT_FLEXCAN3_EXT.offset1DC)
  3430. #define FLEXCAN3_HR_TIME_STAMP44 (IMXRT_FLEXCAN3_EXT.offset1E0)
  3431. #define FLEXCAN3_HR_TIME_STAMP45 (IMXRT_FLEXCAN3_EXT.offset1E4)
  3432. #define FLEXCAN3_HR_TIME_STAMP46 (IMXRT_FLEXCAN3_EXT.offset1E8)
  3433. #define FLEXCAN3_HR_TIME_STAMP47 (IMXRT_FLEXCAN3_EXT.offset1EC)
  3434. #define FLEXCAN3_HR_TIME_STAMP48 (IMXRT_FLEXCAN3_EXT.offset1F0)
  3435. #define FLEXCAN3_HR_TIME_STAMP49 (IMXRT_FLEXCAN3_EXT.offset1F4)
  3436. #define FLEXCAN3_HR_TIME_STAMP50 (IMXRT_FLEXCAN3_EXT.offset1F8)
  3437. #define FLEXCAN3_HR_TIME_STAMP51 (IMXRT_FLEXCAN3_EXT.offset1FC)
  3438. #define FLEXCAN3_HR_TIME_STAMP52 (IMXRT_FLEXCAN3_EXT.offset200)
  3439. #define FLEXCAN3_HR_TIME_STAMP53 (IMXRT_FLEXCAN3_EXT.offset204)
  3440. #define FLEXCAN3_HR_TIME_STAMP54 (IMXRT_FLEXCAN3_EXT.offset208)
  3441. #define FLEXCAN3_HR_TIME_STAMP55 (IMXRT_FLEXCAN3_EXT.offset20C)
  3442. #define FLEXCAN3_HR_TIME_STAMP56 (IMXRT_FLEXCAN3_EXT.offset210)
  3443. #define FLEXCAN3_HR_TIME_STAMP57 (IMXRT_FLEXCAN3_EXT.offset234)
  3444. #define FLEXCAN3_HR_TIME_STAMP58 (IMXRT_FLEXCAN3_EXT.offset218)
  3445. #define FLEXCAN3_HR_TIME_STAMP59 (IMXRT_FLEXCAN3_EXT.offset21C)
  3446. #define FLEXCAN3_HR_TIME_STAMP60 (IMXRT_FLEXCAN3_EXT.offset220)
  3447. #define FLEXCAN3_HR_TIME_STAMP61 (IMXRT_FLEXCAN3_EXT.offset224)
  3448. #define FLEXCAN3_HR_TIME_STAMP62 (IMXRT_FLEXCAN3_EXT.offset228)
  3449. #define FLEXCAN3_HR_TIME_STAMP63 (IMXRT_FLEXCAN3_EXT.offset22C)
  3450. #define FLEXCAN3_ERFFEL0 (IMXRT_FLEXCAN3_ERXFIFO.offset000)
  3451. #define FLEXCAN3_ERFFEL1 (IMXRT_FLEXCAN3_ERXFIFO.offset004)
  3452. #define FLEXCAN3_ERFFEL2 (IMXRT_FLEXCAN3_ERXFIFO.offset008)
  3453. #define FLEXCAN3_ERFFEL3 (IMXRT_FLEXCAN3_ERXFIFO.offset00C)
  3454. #define FLEXCAN3_ERFFEL4 (IMXRT_FLEXCAN3_ERXFIFO.offset010)
  3455. #define FLEXCAN3_ERFFEL5 (IMXRT_FLEXCAN3_ERXFIFO.offset014)
  3456. #define FLEXCAN3_ERFFEL6 (IMXRT_FLEXCAN3_ERXFIFO.offset018)
  3457. #define FLEXCAN3_ERFFEL7 (IMXRT_FLEXCAN3_ERXFIFO.offset01C)
  3458. #define FLEXCAN3_ERFFEL8 (IMXRT_FLEXCAN3_ERXFIFO.offset020)
  3459. #define FLEXCAN3_ERFFEL9 (IMXRT_FLEXCAN3_ERXFIFO.offset024)
  3460. #define FLEXCAN3_ERFFEL10 (IMXRT_FLEXCAN3_ERXFIFO.offset028)
  3461. #define FLEXCAN3_ERFFEL11 (IMXRT_FLEXCAN3_ERXFIFO.offset02C)
  3462. #define FLEXCAN3_ERFFEL12 (IMXRT_FLEXCAN3_ERXFIFO.offset030)
  3463. #define FLEXCAN3_ERFFEL13 (IMXRT_FLEXCAN3_ERXFIFO.offset034)
  3464. #define FLEXCAN3_ERFFEL14 (IMXRT_FLEXCAN3_ERXFIFO.offset038)
  3465. #define FLEXCAN3_ERFFEL15 (IMXRT_FLEXCAN3_ERXFIFO.offset03C)
  3466. #define FLEXCAN3_ERFFEL16 (IMXRT_FLEXCAN3_ERXFIFO.offset040)
  3467. #define FLEXCAN3_ERFFEL17 (IMXRT_FLEXCAN3_ERXFIFO.offset044)
  3468. #define FLEXCAN3_ERFFEL18 (IMXRT_FLEXCAN3_ERXFIFO.offset048)
  3469. #define FLEXCAN3_ERFFEL19 (IMXRT_FLEXCAN3_ERXFIFO.offset04C)
  3470. #define FLEXCAN3_ERFFEL20 (IMXRT_FLEXCAN3_ERXFIFO.offset050)
  3471. #define FLEXCAN3_ERFFEL21 (IMXRT_FLEXCAN3_ERXFIFO.offset054)
  3472. #define FLEXCAN3_ERFFEL22 (IMXRT_FLEXCAN3_ERXFIFO.offset058)
  3473. #define FLEXCAN3_ERFFEL23 (IMXRT_FLEXCAN3_ERXFIFO.offset05C)
  3474. #define FLEXCAN3_ERFFEL24 (IMXRT_FLEXCAN3_ERXFIFO.offset060)
  3475. #define FLEXCAN3_ERFFEL25 (IMXRT_FLEXCAN3_ERXFIFO.offset064)
  3476. #define FLEXCAN3_ERFFEL26 (IMXRT_FLEXCAN3_ERXFIFO.offset068)
  3477. #define FLEXCAN3_ERFFEL27 (IMXRT_FLEXCAN3_ERXFIFO.offset06C)
  3478. #define FLEXCAN3_ERFFEL28 (IMXRT_FLEXCAN3_ERXFIFO.offset070)
  3479. #define FLEXCAN3_ERFFEL29 (IMXRT_FLEXCAN3_ERXFIFO.offset074)
  3480. #define FLEXCAN3_ERFFEL30 (IMXRT_FLEXCAN3_ERXFIFO.offset078)
  3481. #define FLEXCAN3_ERFFEL31 (IMXRT_FLEXCAN3_ERXFIFO.offset07C)
  3482. #define FLEXCAN3_ERFFEL32 (IMXRT_FLEXCAN3_ERXFIFO.offset080)
  3483. #define FLEXCAN3_ERFFEL33 (IMXRT_FLEXCAN3_ERXFIFO.offset084)
  3484. #define FLEXCAN3_ERFFEL34 (IMXRT_FLEXCAN3_ERXFIFO.offset088)
  3485. #define FLEXCAN3_ERFFEL35 (IMXRT_FLEXCAN3_ERXFIFO.offset08C)
  3486. #define FLEXCAN3_ERFFEL36 (IMXRT_FLEXCAN3_ERXFIFO.offset090)
  3487. #define FLEXCAN3_ERFFEL37 (IMXRT_FLEXCAN3_ERXFIFO.offset094)
  3488. #define FLEXCAN3_ERFFEL38 (IMXRT_FLEXCAN3_ERXFIFO.offset098)
  3489. #define FLEXCAN3_ERFFEL39 (IMXRT_FLEXCAN3_ERXFIFO.offset09C)
  3490. #define FLEXCAN3_ERFFEL40 (IMXRT_FLEXCAN3_ERXFIFO.offset0A0)
  3491. #define FLEXCAN3_ERFFEL41 (IMXRT_FLEXCAN3_ERXFIFO.offset0A4)
  3492. #define FLEXCAN3_ERFFEL42 (IMXRT_FLEXCAN3_ERXFIFO.offset0A8)
  3493. #define FLEXCAN3_ERFFEL43 (IMXRT_FLEXCAN3_ERXFIFO.offset0AC)
  3494. #define FLEXCAN3_ERFFEL44 (IMXRT_FLEXCAN3_ERXFIFO.offset0B0)
  3495. #define FLEXCAN3_ERFFEL45 (IMXRT_FLEXCAN3_ERXFIFO.offset0B4)
  3496. #define FLEXCAN3_ERFFEL46 (IMXRT_FLEXCAN3_ERXFIFO.offset0B8)
  3497. #define FLEXCAN3_ERFFEL47 (IMXRT_FLEXCAN3_ERXFIFO.offset0BC)
  3498. #define FLEXCAN3_ERFFEL48 (IMXRT_FLEXCAN3_ERXFIFO.offset0C0)
  3499. #define FLEXCAN3_ERFFEL49 (IMXRT_FLEXCAN3_ERXFIFO.offset0C4)
  3500. #define FLEXCAN3_ERFFEL50 (IMXRT_FLEXCAN3_ERXFIFO.offset0C8)
  3501. #define FLEXCAN3_ERFFEL51 (IMXRT_FLEXCAN3_ERXFIFO.offset0CC)
  3502. #define FLEXCAN3_ERFFEL52 (IMXRT_FLEXCAN3_ERXFIFO.offset0D0)
  3503. #define FLEXCAN3_ERFFEL53 (IMXRT_FLEXCAN3_ERXFIFO.offset0D4)
  3504. #define FLEXCAN3_ERFFEL54 (IMXRT_FLEXCAN3_ERXFIFO.offset0D8)
  3505. #define FLEXCAN3_ERFFEL55 (IMXRT_FLEXCAN3_ERXFIFO.offset0DC)
  3506. #define FLEXCAN3_ERFFEL56 (IMXRT_FLEXCAN3_ERXFIFO.offset0E0)
  3507. #define FLEXCAN3_ERFFEL57 (IMXRT_FLEXCAN3_ERXFIFO.offset0E4)
  3508. #define FLEXCAN3_ERFFEL58 (IMXRT_FLEXCAN3_ERXFIFO.offset0E8)
  3509. #define FLEXCAN3_ERFFEL59 (IMXRT_FLEXCAN3_ERXFIFO.offset0EC)
  3510. #define FLEXCAN3_ERFFEL60 (IMXRT_FLEXCAN3_ERXFIFO.offset0F0)
  3511. #define FLEXCAN3_ERFFEL61 (IMXRT_FLEXCAN3_ERXFIFO.offset0F4)
  3512. #define FLEXCAN3_ERFFEL62 (IMXRT_FLEXCAN3_ERXFIFO.offset0F8)
  3513. #define FLEXCAN3_ERFFEL63 (IMXRT_FLEXCAN3_ERXFIFO.offset0FC)
  3514. #define FLEXCAN3_ERFFEL64 (IMXRT_FLEXCAN3_ERXFIFO.offset100)
  3515. #define FLEXCAN3_ERFFEL65 (IMXRT_FLEXCAN3_ERXFIFO.offset104)
  3516. #define FLEXCAN3_ERFFEL66 (IMXRT_FLEXCAN3_ERXFIFO.offset108)
  3517. #define FLEXCAN3_ERFFEL67 (IMXRT_FLEXCAN3_ERXFIFO.offset10C)
  3518. #define FLEXCAN3_ERFFEL68 (IMXRT_FLEXCAN3_ERXFIFO.offset110)
  3519. #define FLEXCAN3_ERFFEL69 (IMXRT_FLEXCAN3_ERXFIFO.offset114)
  3520. #define FLEXCAN3_ERFFEL70 (IMXRT_FLEXCAN3_ERXFIFO.offset118)
  3521. #define FLEXCAN3_ERFFEL71 (IMXRT_FLEXCAN3_ERXFIFO.offset11C)
  3522. #define FLEXCAN3_ERFFEL72 (IMXRT_FLEXCAN3_ERXFIFO.offset120)
  3523. #define FLEXCAN3_ERFFEL73 (IMXRT_FLEXCAN3_ERXFIFO.offset124)
  3524. #define FLEXCAN3_ERFFEL74 (IMXRT_FLEXCAN3_ERXFIFO.offset128)
  3525. #define FLEXCAN3_ERFFEL75 (IMXRT_FLEXCAN3_ERXFIFO.offset12C)
  3526. #define FLEXCAN3_ERFFEL76 (IMXRT_FLEXCAN3_ERXFIFO.offset130)
  3527. #define FLEXCAN3_ERFFEL77 (IMXRT_FLEXCAN3_ERXFIFO.offset134)
  3528. #define FLEXCAN3_ERFFEL78 (IMXRT_FLEXCAN3_ERXFIFO.offset138)
  3529. #define FLEXCAN3_ERFFEL79 (IMXRT_FLEXCAN3_ERXFIFO.offset13C)
  3530. #define FLEXCAN3_ERFFEL80 (IMXRT_FLEXCAN3_ERXFIFO.offset140)
  3531. #define FLEXCAN3_ERFFEL81 (IMXRT_FLEXCAN3_ERXFIFO.offset144)
  3532. #define FLEXCAN3_ERFFEL82 (IMXRT_FLEXCAN3_ERXFIFO.offset148)
  3533. #define FLEXCAN3_ERFFEL83 (IMXRT_FLEXCAN3_ERXFIFO.offset14C)
  3534. #define FLEXCAN3_ERFFEL84 (IMXRT_FLEXCAN3_ERXFIFO.offset150)
  3535. #define FLEXCAN3_ERFFEL85 (IMXRT_FLEXCAN3_ERXFIFO.offset154)
  3536. #define FLEXCAN3_ERFFEL86 (IMXRT_FLEXCAN3_ERXFIFO.offset158)
  3537. #define FLEXCAN3_ERFFEL87 (IMXRT_FLEXCAN3_ERXFIFO.offset15C)
  3538. #define FLEXCAN3_ERFFEL88 (IMXRT_FLEXCAN3_ERXFIFO.offset160)
  3539. #define FLEXCAN3_ERFFEL89 (IMXRT_FLEXCAN3_ERXFIFO.offset164)
  3540. #define FLEXCAN3_ERFFEL90 (IMXRT_FLEXCAN3_ERXFIFO.offset168)
  3541. #define FLEXCAN3_ERFFEL91 (IMXRT_FLEXCAN3_ERXFIFO.offset16C)
  3542. #define FLEXCAN3_ERFFEL92 (IMXRT_FLEXCAN3_ERXFIFO.offset170)
  3543. #define FLEXCAN3_ERFFEL93 (IMXRT_FLEXCAN3_ERXFIFO.offset174)
  3544. #define FLEXCAN3_ERFFEL94 (IMXRT_FLEXCAN3_ERXFIFO.offset178)
  3545. #define FLEXCAN3_ERFFEL95 (IMXRT_FLEXCAN3_ERXFIFO.offset17C)
  3546. #define FLEXCAN3_ERFFEL96 (IMXRT_FLEXCAN3_ERXFIFO.offset180)
  3547. #define FLEXCAN3_ERFFEL97 (IMXRT_FLEXCAN3_ERXFIFO.offset184)
  3548. #define FLEXCAN3_ERFFEL98 (IMXRT_FLEXCAN3_ERXFIFO.offset188)
  3549. #define FLEXCAN3_ERFFEL99 (IMXRT_FLEXCAN3_ERXFIFO.offset18C)
  3550. #define FLEXCAN3_ERFFEL100 (IMXRT_FLEXCAN3_ERXFIFO.offset190)
  3551. #define FLEXCAN3_ERFFEL101 (IMXRT_FLEXCAN3_ERXFIFO.offset194)
  3552. #define FLEXCAN3_ERFFEL102 (IMXRT_FLEXCAN3_ERXFIFO.offset198)
  3553. #define FLEXCAN3_ERFFEL103 (IMXRT_FLEXCAN3_ERXFIFO.offset19C)
  3554. #define FLEXCAN3_ERFFEL104 (IMXRT_FLEXCAN3_ERXFIFO.offset1A0)
  3555. #define FLEXCAN3_ERFFEL105 (IMXRT_FLEXCAN3_ERXFIFO.offset1A4)
  3556. #define FLEXCAN3_ERFFEL106 (IMXRT_FLEXCAN3_ERXFIFO.offset1A8)
  3557. #define FLEXCAN3_ERFFEL107 (IMXRT_FLEXCAN3_ERXFIFO.offset1AC)
  3558. #define FLEXCAN3_ERFFEL108 (IMXRT_FLEXCAN3_ERXFIFO.offset1B0)
  3559. #define FLEXCAN3_ERFFEL109 (IMXRT_FLEXCAN3_ERXFIFO.offset1B4)
  3560. #define FLEXCAN3_ERFFEL110 (IMXRT_FLEXCAN3_ERXFIFO.offset1B8)
  3561. #define FLEXCAN3_ERFFEL111 (IMXRT_FLEXCAN3_ERXFIFO.offset1BC)
  3562. #define FLEXCAN3_ERFFEL112 (IMXRT_FLEXCAN3_ERXFIFO.offset1C0)
  3563. #define FLEXCAN3_ERFFEL113 (IMXRT_FLEXCAN3_ERXFIFO.offset1C4)
  3564. #define FLEXCAN3_ERFFEL114 (IMXRT_FLEXCAN3_ERXFIFO.offset1C8)
  3565. #define FLEXCAN3_ERFFEL115 (IMXRT_FLEXCAN3_ERXFIFO.offset1CC)
  3566. #define FLEXCAN3_ERFFEL116 (IMXRT_FLEXCAN3_ERXFIFO.offset1D0)
  3567. #define FLEXCAN3_ERFFEL117 (IMXRT_FLEXCAN3_ERXFIFO.offset1D4)
  3568. #define FLEXCAN3_ERFFEL118 (IMXRT_FLEXCAN3_ERXFIFO.offset1D8)
  3569. #define FLEXCAN3_ERFFEL119 (IMXRT_FLEXCAN3_ERXFIFO.offset1DC)
  3570. #define FLEXCAN3_ERFFEL120 (IMXRT_FLEXCAN3_ERXFIFO.offset1E0)
  3571. #define FLEXCAN3_ERFFEL121 (IMXRT_FLEXCAN3_ERXFIFO.offset1E4)
  3572. #define FLEXCAN3_ERFFEL122 (IMXRT_FLEXCAN3_ERXFIFO.offset1E8)
  3573. #define FLEXCAN3_ERFFEL123 (IMXRT_FLEXCAN3_ERXFIFO.offset1EC)
  3574. #define FLEXCAN3_ERFFEL124 (IMXRT_FLEXCAN3_ERXFIFO.offset1F0)
  3575. #define FLEXCAN3_ERFFEL125 (IMXRT_FLEXCAN3_ERXFIFO.offset1F4)
  3576. #define FLEXCAN3_ERFFEL126 (IMXRT_FLEXCAN3_ERXFIFO.offset1F8)
  3577. #define FLEXCAN3_ERFFEL127 (IMXRT_FLEXCAN3_ERXFIFO.offset1FC)
  3578. // 50.5.1.1: page 2912
  3579. typedef struct {
  3580. const uint32_t VERID; // 0x00 (IMXRT_FLEXIO1.offset000)
  3581. volatile uint32_t PARAM; // 0x04 // (IMXRT_FLEXIO1.offset004)
  3582. volatile uint32_t CTRL; // 0x08(IMXRT_FLEXIO1.offset008)
  3583. volatile uint32_t PIN; // 0x0c (IMXRT_FLEXIO1.offset00C)
  3584. volatile uint32_t SHIFTSTAT; // 0x10 (IMXRT_FLEXIO1.offset010)
  3585. volatile uint32_t SHIFTERR; // 0x14(IMXRT_FLEXIO1.offset014)
  3586. volatile uint32_t TIMSTAT; // 0x18 (IMXRT_FLEXIO1.offset018)
  3587. const uint32_t UNUSED0; // 0x1c
  3588. volatile uint32_t SHIFTSIEN; // 0x20 (IMXRT_FLEXIO1.offset020)
  3589. volatile uint32_t SHIFTEIEN; // 0x24 (IMXRT_FLEXIO1.offset024)
  3590. volatile uint32_t TIMIEN; // 0x28 (IMXRT_FLEXIO1.offset028)
  3591. const uint32_t UNUSED1; // 0x2c
  3592. volatile uint32_t SHIFTSDEN; // 0x30 (IMXRT_FLEXIO1.offset030)
  3593. const uint32_t UNUSED2[3]; // 0x34 38 3C
  3594. volatile uint32_t SHIFTSTATE; // 0x40 (IMXRT_FLEXIO1.offset040)
  3595. const uint32_t UNUSED3[15]; // 0x44.. 50... 60... 70...
  3596. volatile uint32_t SHIFTCTL[4]; // 0x80 84 88 8C
  3597. const uint32_t UNUSED4[28]; // 0x90 - 0xfc
  3598. volatile uint32_t SHIFTCFG[4]; // 0x100 104 108 10C (IMXRT_FLEXIO1.offset100)
  3599. const uint32_t UNUSED5[60]; // 0x110 - 0x1FC
  3600. volatile uint32_t SHIFTBUF[4]; // 0x200 204 208 20c (IMXRT_FLEXIO1.offset200)
  3601. const uint32_t UNUSED6[28]; //
  3602. volatile uint32_t SHIFTBUFBIS[4]; // 0x280 // (IMXRT_FLEXIO1.offset280)
  3603. const uint32_t UNUSED7[28]; //
  3604. volatile uint32_t SHIFTBUFBYS[4]; // 0x300 (IMXRT_FLEXIO1.offset300)
  3605. const uint32_t UNUSED8[28]; //
  3606. volatile uint32_t SHIFTBUFBBS[4]; // 0x380 (IMXRT_FLEXIO1.offset380)
  3607. const uint32_t UNUSED9[28]; //
  3608. volatile uint32_t TIMCTL[4]; // 0x400
  3609. const uint32_t UNUSED10[28]; //
  3610. volatile uint32_t TIMCFG[4]; // 0x480
  3611. const uint32_t UNUSED11[28]; //
  3612. volatile uint32_t TIMCMP[4]; // 0x500
  3613. const uint32_t UNUSED12[28+64]; //
  3614. volatile uint32_t SHIFTBUFNBS[4]; // 0x680
  3615. const uint32_t UNUSED13[28]; //
  3616. volatile uint32_t SHIFTBUFHWS[4]; // 0x700
  3617. const uint32_t UNUSED14[28]; //
  3618. volatile uint32_t SHIFTBUFNIS[4]; // 0x780
  3619. } IMXRT_FLEXIO_t;
  3620. #define IMXRT_FLEXIO1_S (*(IMXRT_FLEXIO_t *)IMXRT_FLEXIO1_ADDRESS)
  3621. #define IMXRT_FLEXIO2_S (*(IMXRT_FLEXIO_t *)IMXRT_FLEXIO2_ADDRESS)
  3622. #define IMXRT_FLEXIO3_S (*(IMXRT_FLEXIO_t *)IMXRT_FLEXIO3_ADDRESS)
  3623. #define IMXRT_FLEXIO1 (*(IMXRT_REGISTER32_t *)IMXRT_FLEXIO1_ADDRESS)
  3624. #define IMXRT_FLEXIO1_b (*(IMXRT_REGISTER32_t *)(IMXRT_FLEXIO1_ADDRESS+0x400))
  3625. #define FLEXIO1_VERID (IMXRT_FLEXIO1.offset000)
  3626. #define FLEXIO1_PARAM (IMXRT_FLEXIO1.offset004)
  3627. #define FLEXIO1_CTRL (IMXRT_FLEXIO1.offset008)
  3628. #define FLEXIO1_PIN (IMXRT_FLEXIO1.offset00C)
  3629. #define FLEXIO1_SHIFTSTAT (IMXRT_FLEXIO1.offset010)
  3630. #define FLEXIO1_SHIFTERR (IMXRT_FLEXIO1.offset014)
  3631. #define FLEXIO1_TIMSTAT (IMXRT_FLEXIO1.offset018)
  3632. #define FLEXIO1_SHIFTSIEN (IMXRT_FLEXIO1.offset020)
  3633. #define FLEXIO1_SHIFTEIEN (IMXRT_FLEXIO1.offset024)
  3634. #define FLEXIO1_TIMIEN (IMXRT_FLEXIO1.offset028)
  3635. #define FLEXIO1_SHIFTSDEN (IMXRT_FLEXIO1.offset030)
  3636. #define FLEXIO1_SHIFTSTATE (IMXRT_FLEXIO1.offset040)
  3637. #define FLEXIO1_SHIFTCTL0 (IMXRT_FLEXIO1.offset080)
  3638. #define FLEXIO1_SHIFTCTL1 (IMXRT_FLEXIO1.offset084)
  3639. #define FLEXIO1_SHIFTCTL2 (IMXRT_FLEXIO1.offset088)
  3640. #define FLEXIO1_SHIFTCTL3 (IMXRT_FLEXIO1.offset08C)
  3641. #define FLEXIO1_SHIFTCFG0 (IMXRT_FLEXIO1.offset100)
  3642. #define FLEXIO1_SHIFTCFG1 (IMXRT_FLEXIO1.offset104)
  3643. #define FLEXIO1_SHIFTCFG2 (IMXRT_FLEXIO1.offset108)
  3644. #define FLEXIO1_SHIFTCFG3 (IMXRT_FLEXIO1.offset10C)
  3645. #define FLEXIO1_SHIFTBUF0 (IMXRT_FLEXIO1.offset200)
  3646. #define FLEXIO1_SHIFTBUF1 (IMXRT_FLEXIO1.offset204)
  3647. #define FLEXIO1_SHIFTBUF2 (IMXRT_FLEXIO1.offset208)
  3648. #define FLEXIO1_SHIFTBUF3 (IMXRT_FLEXIO1.offset20C)
  3649. #define FLEXIO1_SHIFTBUFBIS0 (IMXRT_FLEXIO1.offset280)
  3650. #define FLEXIO1_SHIFTBUFBIS1 (IMXRT_FLEXIO1.offset284)
  3651. #define FLEXIO1_SHIFTBUFBIS2 (IMXRT_FLEXIO1.offset288)
  3652. #define FLEXIO1_SHIFTBUFBIS3 (IMXRT_FLEXIO1.offset28C)
  3653. #define FLEXIO1_SHIFTBUFBYS0 (IMXRT_FLEXIO1.offset300)
  3654. #define FLEXIO1_SHIFTBUFBYS1 (IMXRT_FLEXIO1.offset304)
  3655. #define FLEXIO1_SHIFTBUFBYS2 (IMXRT_FLEXIO1.offset308)
  3656. #define FLEXIO1_SHIFTBUFBYS3 (IMXRT_FLEXIO1.offset30C)
  3657. #define FLEXIO1_SHIFTBUFBBS0 (IMXRT_FLEXIO1.offset380)
  3658. #define FLEXIO1_SHIFTBUFBBS1 (IMXRT_FLEXIO1.offset384)
  3659. #define FLEXIO1_SHIFTBUFBBS2 (IMXRT_FLEXIO1.offset388)
  3660. #define FLEXIO1_SHIFTBUFBBS3 (IMXRT_FLEXIO1.offset38C)
  3661. #define FLEXIO1_TIMCTL0 (IMXRT_FLEXIO1_b.offset000)
  3662. #define FLEXIO1_TIMCTL1 (IMXRT_FLEXIO1_b.offset004)
  3663. #define FLEXIO1_TIMCTL2 (IMXRT_FLEXIO1_b.offset008)
  3664. #define FLEXIO1_TIMCTL3 (IMXRT_FLEXIO1_b.offset00C)
  3665. #define FLEXIO1_TIMCFG0 (IMXRT_FLEXIO1_b.offset080)
  3666. #define FLEXIO1_TIMCFG1 (IMXRT_FLEXIO1_b.offset084)
  3667. #define FLEXIO1_TIMCFG2 (IMXRT_FLEXIO1_b.offset088)
  3668. #define FLEXIO1_TIMCFG3 (IMXRT_FLEXIO1_b.offset08C)
  3669. #define FLEXIO1_TIMCMP0 (IMXRT_FLEXIO1_b.offset100)
  3670. #define FLEXIO1_TIMCMP1 (IMXRT_FLEXIO1_b.offset104)
  3671. #define FLEXIO1_TIMCMP2 (IMXRT_FLEXIO1_b.offset108)
  3672. #define FLEXIO1_TIMCMP3 (IMXRT_FLEXIO1_b.offset10C)
  3673. #define FLEXIO1_SHIFTBUFNBS0 (IMXRT_FLEXIO1_b.offset280)
  3674. #define FLEXIO1_SHIFTBUFNBS1 (IMXRT_FLEXIO1_b.offset284)
  3675. #define FLEXIO1_SHIFTBUFNBS2 (IMXRT_FLEXIO1_b.offset288)
  3676. #define FLEXIO1_SHIFTBUFNBS3 (IMXRT_FLEXIO1_b.offset28C)
  3677. #define FLEXIO1_SHIFTBUFHWS0 (IMXRT_FLEXIO1_b.offset300)
  3678. #define FLEXIO1_SHIFTBUFHWS1 (IMXRT_FLEXIO1_b.offset304)
  3679. #define FLEXIO1_SHIFTBUFHWS2 (IMXRT_FLEXIO1_b.offset308)
  3680. #define FLEXIO1_SHIFTBUFHWS3 (IMXRT_FLEXIO1_b.offset30C)
  3681. #define FLEXIO1_SHIFTBUFNIS0 (IMXRT_FLEXIO1_b.offset380)
  3682. #define FLEXIO1_SHIFTBUFNIS1 (IMXRT_FLEXIO1_b.offset384)
  3683. #define FLEXIO1_SHIFTBUFNIS2 (IMXRT_FLEXIO1_b.offset388)
  3684. #define FLEXIO1_SHIFTBUFNIS3 (IMXRT_FLEXIO1_b.offset38C)
  3685. #define IMXRT_FLEXIO2 (*(IMXRT_REGISTER32_t *)IMXRT_FLEXIO2_ADDRESS)
  3686. #define IMXRT_FLEXIO2_b (*(IMXRT_REGISTER32_t *)(IMXRT_FLEXIO2_ADDRESS+0x400))
  3687. #define FLEXIO2_VERID (IMXRT_FLEXIO2.offset000)
  3688. #define FLEXIO2_PARAM (IMXRT_FLEXIO2.offset004)
  3689. #define FLEXIO2_CTRL (IMXRT_FLEXIO2.offset008)
  3690. #define FLEXIO2_PIN (IMXRT_FLEXIO2.offset00C)
  3691. #define FLEXIO2_SHIFTSTAT (IMXRT_FLEXIO2.offset010)
  3692. #define FLEXIO2_SHIFTERR (IMXRT_FLEXIO2.offset014)
  3693. #define FLEXIO2_TIMSTAT (IMXRT_FLEXIO2.offset018)
  3694. #define FLEXIO2_SHIFTSIEN (IMXRT_FLEXIO2.offset020)
  3695. #define FLEXIO2_SHIFTEIEN (IMXRT_FLEXIO2.offset024)
  3696. #define FLEXIO2_TIMIEN (IMXRT_FLEXIO2.offset028)
  3697. #define FLEXIO2_SHIFTSDEN (IMXRT_FLEXIO2.offset030)
  3698. #define FLEXIO2_SHIFTSTATE (IMXRT_FLEXIO2.offset040)
  3699. #define FLEXIO2_SHIFTCTL0 (IMXRT_FLEXIO2.offset080)
  3700. #define FLEXIO2_SHIFTCTL1 (IMXRT_FLEXIO2.offset084)
  3701. #define FLEXIO2_SHIFTCTL2 (IMXRT_FLEXIO2.offset088)
  3702. #define FLEXIO2_SHIFTCTL3 (IMXRT_FLEXIO2.offset08C)
  3703. #define FLEXIO2_SHIFTCFG0 (IMXRT_FLEXIO2.offset100)
  3704. #define FLEXIO2_SHIFTCFG1 (IMXRT_FLEXIO2.offset104)
  3705. #define FLEXIO2_SHIFTCFG2 (IMXRT_FLEXIO2.offset108)
  3706. #define FLEXIO2_SHIFTCFG3 (IMXRT_FLEXIO2.offset10C)
  3707. #define FLEXIO2_SHIFTBUF0 (IMXRT_FLEXIO2.offset200)
  3708. #define FLEXIO2_SHIFTBUF1 (IMXRT_FLEXIO2.offset204)
  3709. #define FLEXIO2_SHIFTBUF2 (IMXRT_FLEXIO2.offset208)
  3710. #define FLEXIO2_SHIFTBUF3 (IMXRT_FLEXIO2.offset20C)
  3711. #define FLEXIO2_SHIFTBUFBIS0 (IMXRT_FLEXIO2.offset280)
  3712. #define FLEXIO2_SHIFTBUFBIS1 (IMXRT_FLEXIO2.offset284)
  3713. #define FLEXIO2_SHIFTBUFBIS2 (IMXRT_FLEXIO2.offset288)
  3714. #define FLEXIO2_SHIFTBUFBIS3 (IMXRT_FLEXIO2.offset28C)
  3715. #define FLEXIO2_SHIFTBUFBYS0 (IMXRT_FLEXIO2.offset300)
  3716. #define FLEXIO2_SHIFTBUFBYS1 (IMXRT_FLEXIO2.offset304)
  3717. #define FLEXIO2_SHIFTBUFBYS2 (IMXRT_FLEXIO2.offset308)
  3718. #define FLEXIO2_SHIFTBUFBYS3 (IMXRT_FLEXIO2.offset30C)
  3719. #define FLEXIO2_SHIFTBUFBBS0 (IMXRT_FLEXIO2.offset380)
  3720. #define FLEXIO2_SHIFTBUFBBS1 (IMXRT_FLEXIO2.offset384)
  3721. #define FLEXIO2_SHIFTBUFBBS2 (IMXRT_FLEXIO2.offset388)
  3722. #define FLEXIO2_SHIFTBUFBBS3 (IMXRT_FLEXIO2.offset38C)
  3723. #define FLEXIO2_TIMCTL0 (IMXRT_FLEXIO2_b.offset000)
  3724. #define FLEXIO2_TIMCTL1 (IMXRT_FLEXIO2_b.offset004)
  3725. #define FLEXIO2_TIMCTL2 (IMXRT_FLEXIO2_b.offset008)
  3726. #define FLEXIO2_TIMCTL3 (IMXRT_FLEXIO2_b.offset00C)
  3727. #define FLEXIO2_TIMCFG0 (IMXRT_FLEXIO2_b.offset080)
  3728. #define FLEXIO2_TIMCFG1 (IMXRT_FLEXIO2_b.offset084)
  3729. #define FLEXIO2_TIMCFG2 (IMXRT_FLEXIO2_b.offset088)
  3730. #define FLEXIO2_TIMCFG3 (IMXRT_FLEXIO2_b.offset08C)
  3731. #define FLEXIO2_TIMCMP0 (IMXRT_FLEXIO2_b.offset100)
  3732. #define FLEXIO2_TIMCMP1 (IMXRT_FLEXIO2_b.offset104)
  3733. #define FLEXIO2_TIMCMP2 (IMXRT_FLEXIO2_b.offset108)
  3734. #define FLEXIO2_TIMCMP3 (IMXRT_FLEXIO2_b.offset10C)
  3735. #define FLEXIO2_SHIFTBUFNBS0 (IMXRT_FLEXIO2_b.offset280)
  3736. #define FLEXIO2_SHIFTBUFNBS1 (IMXRT_FLEXIO2_b.offset284)
  3737. #define FLEXIO2_SHIFTBUFNBS2 (IMXRT_FLEXIO2_b.offset288)
  3738. #define FLEXIO2_SHIFTBUFNBS3 (IMXRT_FLEXIO2_b.offset28C)
  3739. #define FLEXIO2_SHIFTBUFHWS0 (IMXRT_FLEXIO2_b.offset300)
  3740. #define FLEXIO2_SHIFTBUFHWS1 (IMXRT_FLEXIO2_b.offset304)
  3741. #define FLEXIO2_SHIFTBUFHWS2 (IMXRT_FLEXIO2_b.offset308)
  3742. #define FLEXIO2_SHIFTBUFHWS3 (IMXRT_FLEXIO2_b.offset30C)
  3743. #define FLEXIO2_SHIFTBUFNIS0 (IMXRT_FLEXIO2_b.offset380)
  3744. #define FLEXIO2_SHIFTBUFNIS1 (IMXRT_FLEXIO2_b.offset384)
  3745. #define FLEXIO2_SHIFTBUFNIS2 (IMXRT_FLEXIO2_b.offset388)
  3746. #define FLEXIO2_SHIFTBUFNIS3 (IMXRT_FLEXIO2_b.offset38C)
  3747. // FLEXIO3 only present in RT1062
  3748. #define IMXRT_FLEXIO3 (*(IMXRT_REGISTER32_t *)IMXRT_FLEXIO3_ADDRESS)
  3749. #define IMXRT_FLEXIO3_b (*(IMXRT_REGISTER32_t *)(IMXRT_FLEXIO3_ADDRESS+0x400))
  3750. #define FLEXIO3_VERID (IMXRT_FLEXIO3.offset000)
  3751. #define FLEXIO3_PARAM (IMXRT_FLEXIO3.offset004)
  3752. #define FLEXIO3_CTRL (IMXRT_FLEXIO3.offset008)
  3753. #define FLEXIO3_PIN (IMXRT_FLEXIO3.offset00C)
  3754. #define FLEXIO3_SHIFTSTAT (IMXRT_FLEXIO3.offset010)
  3755. #define FLEXIO3_SHIFTERR (IMXRT_FLEXIO3.offset014)
  3756. #define FLEXIO3_TIMSTAT (IMXRT_FLEXIO3.offset018)
  3757. #define FLEXIO3_SHIFTSIEN (IMXRT_FLEXIO3.offset020)
  3758. #define FLEXIO3_SHIFTEIEN (IMXRT_FLEXIO3.offset024)
  3759. #define FLEXIO3_TIMIEN (IMXRT_FLEXIO3.offset028)
  3760. #define FLEXIO3_SHIFTSDEN (IMXRT_FLEXIO3.offset030)
  3761. #define FLEXIO3_SHIFTSTATE (IMXRT_FLEXIO3.offset040)
  3762. #define FLEXIO3_SHIFTCTL0 (IMXRT_FLEXIO3.offset080)
  3763. #define FLEXIO3_SHIFTCTL1 (IMXRT_FLEXIO3.offset084)
  3764. #define FLEXIO3_SHIFTCTL2 (IMXRT_FLEXIO3.offset088)
  3765. #define FLEXIO3_SHIFTCTL3 (IMXRT_FLEXIO3.offset08C)
  3766. #define FLEXIO3_SHIFTCFG0 (IMXRT_FLEXIO3.offset100)
  3767. #define FLEXIO3_SHIFTCFG1 (IMXRT_FLEXIO3.offset104)
  3768. #define FLEXIO3_SHIFTCFG2 (IMXRT_FLEXIO3.offset108)
  3769. #define FLEXIO3_SHIFTCFG3 (IMXRT_FLEXIO3.offset10C)
  3770. #define FLEXIO3_SHIFTBUF0 (IMXRT_FLEXIO3.offset200)
  3771. #define FLEXIO3_SHIFTBUF1 (IMXRT_FLEXIO3.offset204)
  3772. #define FLEXIO3_SHIFTBUF2 (IMXRT_FLEXIO3.offset208)
  3773. #define FLEXIO3_SHIFTBUF3 (IMXRT_FLEXIO3.offset20C)
  3774. #define FLEXIO3_SHIFTBUFBIS0 (IMXRT_FLEXIO3.offset280)
  3775. #define FLEXIO3_SHIFTBUFBIS1 (IMXRT_FLEXIO3.offset284)
  3776. #define FLEXIO3_SHIFTBUFBIS2 (IMXRT_FLEXIO3.offset288)
  3777. #define FLEXIO3_SHIFTBUFBIS3 (IMXRT_FLEXIO3.offset28C)
  3778. #define FLEXIO3_SHIFTBUFBYS0 (IMXRT_FLEXIO3.offset300)
  3779. #define FLEXIO3_SHIFTBUFBYS1 (IMXRT_FLEXIO3.offset304)
  3780. #define FLEXIO3_SHIFTBUFBYS2 (IMXRT_FLEXIO3.offset308)
  3781. #define FLEXIO3_SHIFTBUFBYS3 (IMXRT_FLEXIO3.offset30C)
  3782. #define FLEXIO3_SHIFTBUFBBS0 (IMXRT_FLEXIO3.offset380)
  3783. #define FLEXIO3_SHIFTBUFBBS1 (IMXRT_FLEXIO3.offset384)
  3784. #define FLEXIO3_SHIFTBUFBBS2 (IMXRT_FLEXIO3.offset388)
  3785. #define FLEXIO3_SHIFTBUFBBS3 (IMXRT_FLEXIO3.offset38C)
  3786. #define FLEXIO3_TIMCTL0 (IMXRT_FLEXIO3_b.offset000)
  3787. #define FLEXIO3_TIMCTL1 (IMXRT_FLEXIO3_b.offset004)
  3788. #define FLEXIO3_TIMCTL2 (IMXRT_FLEXIO3_b.offset008)
  3789. #define FLEXIO3_TIMCTL3 (IMXRT_FLEXIO3_b.offset00C)
  3790. #define FLEXIO3_TIMCFG0 (IMXRT_FLEXIO3_b.offset080)
  3791. #define FLEXIO3_TIMCFG1 (IMXRT_FLEXIO3_b.offset084)
  3792. #define FLEXIO3_TIMCFG2 (IMXRT_FLEXIO3_b.offset088)
  3793. #define FLEXIO3_TIMCFG3 (IMXRT_FLEXIO3_b.offset08C)
  3794. #define FLEXIO3_TIMCMP0 (IMXRT_FLEXIO3_b.offset100)
  3795. #define FLEXIO3_TIMCMP1 (IMXRT_FLEXIO3_b.offset104)
  3796. #define FLEXIO3_TIMCMP2 (IMXRT_FLEXIO3_b.offset108)
  3797. #define FLEXIO3_TIMCMP3 (IMXRT_FLEXIO3_b.offset10C)
  3798. #define FLEXIO3_SHIFTBUFNBS0 (IMXRT_FLEXIO3_b.offset280)
  3799. #define FLEXIO3_SHIFTBUFNBS1 (IMXRT_FLEXIO3_b.offset284)
  3800. #define FLEXIO3_SHIFTBUFNBS2 (IMXRT_FLEXIO3_b.offset288)
  3801. #define FLEXIO3_SHIFTBUFNBS3 (IMXRT_FLEXIO3_b.offset28C)
  3802. #define FLEXIO3_SHIFTBUFHWS0 (IMXRT_FLEXIO3_b.offset300)
  3803. #define FLEXIO3_SHIFTBUFHWS1 (IMXRT_FLEXIO3_b.offset304)
  3804. #define FLEXIO3_SHIFTBUFHWS2 (IMXRT_FLEXIO3_b.offset308)
  3805. #define FLEXIO3_SHIFTBUFHWS3 (IMXRT_FLEXIO3_b.offset30C)
  3806. #define FLEXIO3_SHIFTBUFNIS0 (IMXRT_FLEXIO3_b.offset380)
  3807. #define FLEXIO3_SHIFTBUFNIS1 (IMXRT_FLEXIO3_b.offset384)
  3808. #define FLEXIO3_SHIFTBUFNIS2 (IMXRT_FLEXIO3_b.offset388)
  3809. #define FLEXIO3_SHIFTBUFNIS3 (IMXRT_FLEXIO3_b.offset38C)
  3810. #define FLEXIO_CTRL_DOZEN ((uint32_t)(1<<31))
  3811. #define FLEXIO_CTRL_DBGE ((uint32_t)(1<<30))
  3812. #define FLEXIO_CTRL_FASTACC ((uint32_t)(1<<2))
  3813. #define FLEXIO_CTRL_SWRST ((uint32_t)(1<<1))
  3814. #define FLEXIO_CTRL_FLEXEN ((uint32_t)(1<<0))
  3815. #define FLEXIO_SHIFTCTL_TIMSEL(n) ((uint32_t)(((n) & 0x03) << 24))
  3816. #define FLEXIO_SHIFTCTL_TIMPOL ((uint32_t)(1<<23))
  3817. #define FLEXIO_SHIFTCTL_PINCFG(n) ((uint32_t)(((n) & 0x03) << 16))
  3818. #define FLEXIO_SHIFTCTL_PINSEL(n) ((uint32_t)(((n) & 0x1F) << 8))
  3819. #define FLEXIO_SHIFTCTL_PINPOL ((uint32_t)(1<<7))
  3820. #define FLEXIO_SHIFTCTL_SMOD(n) ((uint32_t)(((n) & 0x07) << 0))
  3821. #define FLEXIO_SHIFTCFG_PWIDTH(n) ((uint32_t)(((n) & 0x1F) << 16))
  3822. #define FLEXIO_SHIFTCFG_INSRC ((uint32_t)(1<<8))
  3823. #define FLEXIO_SHIFTCFG_SSTOP(n) ((uint32_t)(((n) & 0x03) << 4))
  3824. #define FLEXIO_SHIFTCFG_SSTART(n) ((uint32_t)(((n) & 0x03) << 0))
  3825. #define FLEXIO_TIMCTL_TRGSEL(n) ((uint32_t)(((n) & 0x3F) << 24))
  3826. #define FLEXIO_TIMCTL_TRGPOL ((uint32_t)(1<<23))
  3827. #define FLEXIO_TIMCTL_TRGSRC ((uint32_t)(1<<22))
  3828. #define FLEXIO_TIMCTL_PINCFG(n) ((uint32_t)(((n) & 0x03) << 16))
  3829. #define FLEXIO_TIMCTL_PINSEL(n) ((uint32_t)(((n) & 0x1F) << 8))
  3830. #define FLEXIO_TIMCTL_PINPOL ((uint32_t)(1<<7))
  3831. #define FLEXIO_TIMCTL_TIMOD(n) ((uint32_t)(((n) & 0x03) << 0))
  3832. #define FLEXIO_TIMCFG_TIMOUT(n) ((uint32_t)(((n) & 0x03) << 24))
  3833. #define FLEXIO_TIMCFG_TIMDEC(n) ((uint32_t)(((n) & 0x03) << 20))
  3834. #define FLEXIO_TIMCFG_TIMRST(n) ((uint32_t)(((n) & 0x07) << 16))
  3835. #define FLEXIO_TIMCFG_TIMDIS(n) ((uint32_t)(((n) & 0x07) << 12))
  3836. #define FLEXIO_TIMCFG_TIMENA(n) ((uint32_t)(((n) & 0x07) << 8))
  3837. #define FLEXIO_TIMCFG_TSTOP(n) ((uint32_t)(((n) & 0x03) << 4))
  3838. #define FLEXIO_TIMCFG_TSTART ((uint32_t)(1<<1))
  3839. // 55.8.1: page 3074
  3840. typedef struct {
  3841. struct {
  3842. volatile uint16_t CNT;
  3843. volatile uint16_t INIT;
  3844. volatile uint16_t CTRL2;
  3845. volatile uint16_t CTRL;
  3846. volatile uint16_t unused1;
  3847. volatile uint16_t VAL0;
  3848. volatile uint16_t FRACVAL1;
  3849. volatile uint16_t VAL1;
  3850. volatile uint16_t FRACVAL2;
  3851. volatile uint16_t VAL2;
  3852. volatile uint16_t FRACVAL3;
  3853. volatile uint16_t VAL3;
  3854. volatile uint16_t FRACVAL4;
  3855. volatile uint16_t VAL4;
  3856. volatile uint16_t FRACVAL5;
  3857. volatile uint16_t VAL5;
  3858. volatile uint16_t FRCTRL;
  3859. volatile uint16_t OCTRL;
  3860. volatile uint16_t STS;
  3861. volatile uint16_t INTEN;
  3862. volatile uint16_t DMAEN;
  3863. volatile uint16_t TCTRL;
  3864. volatile uint16_t DISMAP0;
  3865. volatile uint16_t DISMAP1;
  3866. volatile uint16_t DTCNT0;
  3867. volatile uint16_t DTCNT1;
  3868. volatile uint16_t CAPTCTRLA;
  3869. volatile uint16_t CAPTCOMPA;
  3870. volatile uint16_t CAPTCTRLB;
  3871. volatile uint16_t CAPTCOMPB;
  3872. volatile uint16_t CAPTCTRLX;
  3873. volatile uint16_t CAPTCOMPX;
  3874. volatile uint16_t CVAL0;
  3875. volatile uint16_t CVAL0CYC;
  3876. volatile uint16_t CVAL1;
  3877. volatile uint16_t CVAL1CYC;
  3878. volatile uint16_t CVAL2;
  3879. volatile uint16_t CVAL2CYC;
  3880. volatile uint16_t CVAL3;
  3881. volatile uint16_t CVAL3CYC;
  3882. volatile uint16_t CVAL4;
  3883. volatile uint16_t CVAL4CYC;
  3884. volatile uint16_t CVAL5;
  3885. volatile uint16_t CVAL5CYC;
  3886. volatile uint16_t unused2;
  3887. volatile uint16_t unused3;
  3888. volatile uint16_t unused4;
  3889. volatile uint16_t unused5;
  3890. } SM[4];
  3891. volatile uint16_t OUTEN;
  3892. volatile uint16_t MASK;
  3893. volatile uint16_t SWCOUT;
  3894. volatile uint16_t DTSRCSEL;
  3895. volatile uint16_t MCTRL;
  3896. volatile uint16_t MCTRL2;
  3897. volatile uint16_t FCTRL0;
  3898. volatile uint16_t FSTS0;
  3899. volatile uint16_t FFILT0;
  3900. volatile uint16_t FTST0;
  3901. volatile uint16_t FCTRL20;
  3902. } IMXRT_FLEXPWM_t;
  3903. #define IMXRT_FLEXPWM1 (*(IMXRT_FLEXPWM_t *)IMXRT_FLEXPWM1_ADDRESS)
  3904. #define IMXRT_FLEXPWM2 (*(IMXRT_FLEXPWM_t *)IMXRT_FLEXPWM2_ADDRESS)
  3905. #define IMXRT_FLEXPWM3 (*(IMXRT_FLEXPWM_t *)IMXRT_FLEXPWM3_ADDRESS)
  3906. #define IMXRT_FLEXPWM4 (*(IMXRT_FLEXPWM_t *)IMXRT_FLEXPWM4_ADDRESS)
  3907. #define FLEXPWM1_SM0CNT (IMXRT_FLEXPWM1.SM[0].CNT)
  3908. #define FLEXPWM1_SM0INIT (IMXRT_FLEXPWM1.SM[0].INIT)
  3909. #define FLEXPWM1_SM0CTRL2 (IMXRT_FLEXPWM1.SM[0].CTRL2)
  3910. #define FLEXPWM1_SM0CTRL (IMXRT_FLEXPWM1.SM[0].CTRL)
  3911. #define FLEXPWM1_SM0VAL0 (IMXRT_FLEXPWM1.SM[0].VAL0)
  3912. #define FLEXPWM1_SM0FRACVAL1 (IMXRT_FLEXPWM1.SM[0].FRACVAL1)
  3913. #define FLEXPWM1_SM0VAL1 (IMXRT_FLEXPWM1.SM[0].VAL1)
  3914. #define FLEXPWM1_SM0FRACVAL2 (IMXRT_FLEXPWM1.SM[0].FRACVAL2)
  3915. #define FLEXPWM1_SM0VAL2 (IMXRT_FLEXPWM1.SM[0].VAL2)
  3916. #define FLEXPWM1_SM0FRACVAL3 (IMXRT_FLEXPWM1.SM[0].FRACVAL3)
  3917. #define FLEXPWM1_SM0VAL3 (IMXRT_FLEXPWM1.SM[0].VAL3)
  3918. #define FLEXPWM1_SM0FRACVAL4 (IMXRT_FLEXPWM1.SM[0].FRACVAL4)
  3919. #define FLEXPWM1_SM0VAL4 (IMXRT_FLEXPWM1.SM[0].VAL4)
  3920. #define FLEXPWM1_SM0FRACVAL5 (IMXRT_FLEXPWM1.SM[0].FRACVAL5)
  3921. #define FLEXPWM1_SM0VAL5 (IMXRT_FLEXPWM1.SM[0].VAL5)
  3922. #define FLEXPWM1_SM0FRCTRL (IMXRT_FLEXPWM1.SM[0].FRCTRL)
  3923. #define FLEXPWM1_SM0OCTRL (IMXRT_FLEXPWM1.SM[0].OCTRL)
  3924. #define FLEXPWM1_SM0STS (IMXRT_FLEXPWM1.SM[0].STS)
  3925. #define FLEXPWM1_SM0INTEN (IMXRT_FLEXPWM1.SM[0].INTEN)
  3926. #define FLEXPWM1_SM0DMAEN (IMXRT_FLEXPWM1.SM[0].DMAEN)
  3927. #define FLEXPWM1_SM0TCTRL (IMXRT_FLEXPWM1.SM[0].TCTRL)
  3928. #define FLEXPWM1_SM0DISMAP0 (IMXRT_FLEXPWM1.SM[0].DISMAP0)
  3929. #define FLEXPWM1_SM0DISMAP1 (IMXRT_FLEXPWM1.SM[0].DISMAP1)
  3930. #define FLEXPWM1_SM0DTCNT0 (IMXRT_FLEXPWM1.SM[0].DTCNT0)
  3931. #define FLEXPWM1_SM0DTCNT1 (IMXRT_FLEXPWM1.SM[0].DTCNT1)
  3932. #define FLEXPWM1_SM0CAPTCTRLA (IMXRT_FLEXPWM1.SM[0].CAPTCTRLA)
  3933. #define FLEXPWM1_SM0CAPTCOMPA (IMXRT_FLEXPWM1.SM[0].CAPTCOMPA)
  3934. #define FLEXPWM1_SM0CAPTCTRLB (IMXRT_FLEXPWM1.SM[0].CAPTCTRLB)
  3935. #define FLEXPWM1_SM0CAPTCOMPB (IMXRT_FLEXPWM1.SM[0].CAPTCOMPB)
  3936. #define FLEXPWM1_SM0CAPTCTRLX (IMXRT_FLEXPWM1.SM[0].CAPTCTRLX)
  3937. #define FLEXPWM1_SM0CAPTCOMPX (IMXRT_FLEXPWM1.SM[0].CAPTCOMPX)
  3938. #define FLEXPWM1_SM0CVAL0 (IMXRT_FLEXPWM1.SM[0].CVAL0)
  3939. #define FLEXPWM1_SM0CVAL0CYC (IMXRT_FLEXPWM1.SM[0].CVAL0CYC)
  3940. #define FLEXPWM1_SM0CVAL1 (IMXRT_FLEXPWM1.SM[0].CVAL1)
  3941. #define FLEXPWM1_SM0CVAL1CYC (IMXRT_FLEXPWM1.SM[0].CVAL1CYC)
  3942. #define FLEXPWM1_SM0CVAL2 (IMXRT_FLEXPWM1.SM[0].CVAL2)
  3943. #define FLEXPWM1_SM0CVAL2CYC (IMXRT_FLEXPWM1.SM[0].CVAL2CYC)
  3944. #define FLEXPWM1_SM0CVAL3 (IMXRT_FLEXPWM1.SM[0].CVAL3)
  3945. #define FLEXPWM1_SM0CVAL3CYC (IMXRT_FLEXPWM1.SM[0].CVAL3CYC)
  3946. #define FLEXPWM1_SM0CVAL4 (IMXRT_FLEXPWM1.SM[0].CVAL4)
  3947. #define FLEXPWM1_SM0CVAL4CYC (IMXRT_FLEXPWM1.SM[0].CVAL4CYC)
  3948. #define FLEXPWM1_SM0CVAL5 (IMXRT_FLEXPWM1.SM[0].CVAL5)
  3949. #define FLEXPWM1_SM0CVAL5CYC (IMXRT_FLEXPWM1.SM[0].CVAL5CYC)
  3950. #define FLEXPWM1_SM1CNT (IMXRT_FLEXPWM1.SM[1].CNT)
  3951. #define FLEXPWM1_SM1INIT (IMXRT_FLEXPWM1.SM[1].INIT)
  3952. #define FLEXPWM1_SM1CTRL2 (IMXRT_FLEXPWM1.SM[1].CTRL2)
  3953. #define FLEXPWM1_SM1CTRL (IMXRT_FLEXPWM1.SM[1].CTRL)
  3954. #define FLEXPWM1_SM1VAL0 (IMXRT_FLEXPWM1.SM[1].VAL0)
  3955. #define FLEXPWM1_SM1FRACVAL1 (IMXRT_FLEXPWM1.SM[1].FRACVAL1)
  3956. #define FLEXPWM1_SM1VAL1 (IMXRT_FLEXPWM1.SM[1].VAL1)
  3957. #define FLEXPWM1_SM1FRACVAL2 (IMXRT_FLEXPWM1.SM[1].FRACVAL2)
  3958. #define FLEXPWM1_SM1VAL2 (IMXRT_FLEXPWM1.SM[1].VAL2)
  3959. #define FLEXPWM1_SM1FRACVAL3 (IMXRT_FLEXPWM1.SM[1].FRACVAL3)
  3960. #define FLEXPWM1_SM1VAL3 (IMXRT_FLEXPWM1.SM[1].VAL3)
  3961. #define FLEXPWM1_SM1FRACVAL4 (IMXRT_FLEXPWM1.SM[1].FRACVAL4)
  3962. #define FLEXPWM1_SM1VAL4 (IMXRT_FLEXPWM1.SM[1].VAL4)
  3963. #define FLEXPWM1_SM1FRACVAL5 (IMXRT_FLEXPWM1.SM[1].FRACVAL5)
  3964. #define FLEXPWM1_SM1VAL5 (IMXRT_FLEXPWM1.SM[1].VAL5)
  3965. #define FLEXPWM1_SM1FRCTRL (IMXRT_FLEXPWM1.SM[1].FRCTRL)
  3966. #define FLEXPWM1_SM1OCTRL (IMXRT_FLEXPWM1.SM[1].OCTRL)
  3967. #define FLEXPWM1_SM1STS (IMXRT_FLEXPWM1.SM[1].STS)
  3968. #define FLEXPWM1_SM1INTEN (IMXRT_FLEXPWM1.SM[1].INTEN)
  3969. #define FLEXPWM1_SM1DMAEN (IMXRT_FLEXPWM1.SM[1].DMAEN)
  3970. #define FLEXPWM1_SM1TCTRL (IMXRT_FLEXPWM1.SM[1].TCTRL)
  3971. #define FLEXPWM1_SM1DISMAP0 (IMXRT_FLEXPWM1.SM[1].DISMAP0)
  3972. #define FLEXPWM1_SM1DISMAP1 (IMXRT_FLEXPWM1.SM[1].DISMAP1)
  3973. #define FLEXPWM1_SM1DTCNT0 (IMXRT_FLEXPWM1.SM[1].DTCNT0)
  3974. #define FLEXPWM1_SM1DTCNT1 (IMXRT_FLEXPWM1.SM[1].DTCNT1)
  3975. #define FLEXPWM1_SM1CAPTCTRLA (IMXRT_FLEXPWM1.SM[1].CAPTCTRLA)
  3976. #define FLEXPWM1_SM1CAPTCOMPA (IMXRT_FLEXPWM1.SM[1].CAPTCOMPA)
  3977. #define FLEXPWM1_SM1CAPTCTRLB (IMXRT_FLEXPWM1.SM[1].CAPTCTRLB)
  3978. #define FLEXPWM1_SM1CAPTCOMPB (IMXRT_FLEXPWM1.SM[1].CAPTCOMPB)
  3979. #define FLEXPWM1_SM1CAPTCTRLX (IMXRT_FLEXPWM1.SM[1].CAPTCTRLX)
  3980. #define FLEXPWM1_SM1CAPTCOMPX (IMXRT_FLEXPWM1.SM[1].CAPTCOMPX)
  3981. #define FLEXPWM1_SM1CVAL0 (IMXRT_FLEXPWM1.SM[1].CVAL0)
  3982. #define FLEXPWM1_SM1CVAL0CYC (IMXRT_FLEXPWM1.SM[1].CVAL0CYC)
  3983. #define FLEXPWM1_SM1CVAL1 (IMXRT_FLEXPWM1.SM[1].CVAL1)
  3984. #define FLEXPWM1_SM1CVAL1CYC (IMXRT_FLEXPWM1.SM[1].CVAL1CYC)
  3985. #define FLEXPWM1_SM1CVAL2 (IMXRT_FLEXPWM1.SM[1].CVAL2)
  3986. #define FLEXPWM1_SM1CVAL2CYC (IMXRT_FLEXPWM1.SM[1].CVAL2CYC)
  3987. #define FLEXPWM1_SM1CVAL3 (IMXRT_FLEXPWM1.SM[1].CVAL3)
  3988. #define FLEXPWM1_SM1CVAL3CYC (IMXRT_FLEXPWM1.SM[1].CVAL3CYC)
  3989. #define FLEXPWM1_SM1CVAL4 (IMXRT_FLEXPWM1.SM[1].CVAL4)
  3990. #define FLEXPWM1_SM1CVAL4CYC (IMXRT_FLEXPWM1.SM[1].CVAL4CYC)
  3991. #define FLEXPWM1_SM1CVAL5 (IMXRT_FLEXPWM1.SM[1].CVAL5)
  3992. #define FLEXPWM1_SM1CVAL5CYC (IMXRT_FLEXPWM1.SM[1].CVAL5CYC)
  3993. #define FLEXPWM1_SM2CNT (IMXRT_FLEXPWM1.SM[2].CNT)
  3994. #define FLEXPWM1_SM2INIT (IMXRT_FLEXPWM1.SM[2].INIT)
  3995. #define FLEXPWM1_SM2CTRL2 (IMXRT_FLEXPWM1.SM[2].CTRL2)
  3996. #define FLEXPWM1_SM2CTRL (IMXRT_FLEXPWM1.SM[2].CTRL)
  3997. #define FLEXPWM1_SM2VAL0 (IMXRT_FLEXPWM1.SM[2].VAL0)
  3998. #define FLEXPWM1_SM2FRACVAL1 (IMXRT_FLEXPWM1.SM[2].FRACVAL1)
  3999. #define FLEXPWM1_SM2VAL1 (IMXRT_FLEXPWM1.SM[2].VAL1)
  4000. #define FLEXPWM1_SM2FRACVAL2 (IMXRT_FLEXPWM1.SM[2].FRACVAL2)
  4001. #define FLEXPWM1_SM2VAL2 (IMXRT_FLEXPWM1.SM[2].VAL2)
  4002. #define FLEXPWM1_SM2FRACVAL3 (IMXRT_FLEXPWM1.SM[2].FRACVAL3)
  4003. #define FLEXPWM1_SM2VAL3 (IMXRT_FLEXPWM1.SM[2].VAL3)
  4004. #define FLEXPWM1_SM2FRACVAL4 (IMXRT_FLEXPWM1.SM[2].FRACVAL4)
  4005. #define FLEXPWM1_SM2VAL4 (IMXRT_FLEXPWM1.SM[2].VAL4)
  4006. #define FLEXPWM1_SM2FRACVAL5 (IMXRT_FLEXPWM1.SM[2].FRACVAL5)
  4007. #define FLEXPWM1_SM2VAL5 (IMXRT_FLEXPWM1.SM[2].VAL5)
  4008. #define FLEXPWM1_SM2FRCTRL (IMXRT_FLEXPWM1.SM[2].FRCTRL)
  4009. #define FLEXPWM1_SM2OCTRL (IMXRT_FLEXPWM1.SM[2].OCTRL)
  4010. #define FLEXPWM1_SM2STS (IMXRT_FLEXPWM1.SM[2].STS)
  4011. #define FLEXPWM1_SM2INTEN (IMXRT_FLEXPWM1.SM[2].INTEN)
  4012. #define FLEXPWM1_SM2DMAEN (IMXRT_FLEXPWM1.SM[2].DMAEN)
  4013. #define FLEXPWM1_SM2TCTRL (IMXRT_FLEXPWM1.SM[2].TCTRL)
  4014. #define FLEXPWM1_SM2DISMAP0 (IMXRT_FLEXPWM1.SM[2].DISMAP0)
  4015. #define FLEXPWM1_SM2DISMAP1 (IMXRT_FLEXPWM1.SM[2].DISMAP1)
  4016. #define FLEXPWM1_SM2DTCNT0 (IMXRT_FLEXPWM1.SM[2].DTCNT0)
  4017. #define FLEXPWM1_SM2DTCNT1 (IMXRT_FLEXPWM1.SM[2].DTCNT1)
  4018. #define FLEXPWM1_SM2CAPTCTRLA (IMXRT_FLEXPWM1.SM[2].CAPTCTRLA)
  4019. #define FLEXPWM1_SM2CAPTCOMPA (IMXRT_FLEXPWM1.SM[2].CAPTCOMPA)
  4020. #define FLEXPWM1_SM2CAPTCTRLB (IMXRT_FLEXPWM1.SM[2].CAPTCTRLB)
  4021. #define FLEXPWM1_SM2CAPTCOMPB (IMXRT_FLEXPWM1.SM[2].CAPTCOMPB)
  4022. #define FLEXPWM1_SM2CAPTCTRLX (IMXRT_FLEXPWM1.SM[2].CAPTCTRLX)
  4023. #define FLEXPWM1_SM2CAPTCOMPX (IMXRT_FLEXPWM1.SM[2].CAPTCOMPX)
  4024. #define FLEXPWM1_SM2CVAL0 (IMXRT_FLEXPWM1.SM[2].CVAL0)
  4025. #define FLEXPWM1_SM2CVAL0CYC (IMXRT_FLEXPWM1.SM[2].CVAL0CYC)
  4026. #define FLEXPWM1_SM2CVAL1 (IMXRT_FLEXPWM1.SM[2].CVAL1)
  4027. #define FLEXPWM1_SM2CVAL1CYC (IMXRT_FLEXPWM1.SM[2].CVAL1CYC)
  4028. #define FLEXPWM1_SM2CVAL2 (IMXRT_FLEXPWM1.SM[2].CVAL2)
  4029. #define FLEXPWM1_SM2CVAL2CYC (IMXRT_FLEXPWM1.SM[2].CVAL2CYC)
  4030. #define FLEXPWM1_SM2CVAL3 (IMXRT_FLEXPWM1.SM[2].CVAL3)
  4031. #define FLEXPWM1_SM2CVAL3CYC (IMXRT_FLEXPWM1.SM[2].CVAL3CYC)
  4032. #define FLEXPWM1_SM2CVAL4 (IMXRT_FLEXPWM1.SM[2].CVAL4)
  4033. #define FLEXPWM1_SM2CVAL4CYC (IMXRT_FLEXPWM1.SM[2].CVAL4CYC)
  4034. #define FLEXPWM1_SM2CVAL5 (IMXRT_FLEXPWM1.SM[2].CVAL5)
  4035. #define FLEXPWM1_SM2CVAL5CYC (IMXRT_FLEXPWM1.SM[2].CVAL5CYC)
  4036. #define FLEXPWM1_SM3CNT (IMXRT_FLEXPWM1.SM[3].CNT)
  4037. #define FLEXPWM1_SM3INIT (IMXRT_FLEXPWM1.SM[3].INIT)
  4038. #define FLEXPWM1_SM3CTRL2 (IMXRT_FLEXPWM1.SM[3].CTRL2)
  4039. #define FLEXPWM1_SM3CTRL (IMXRT_FLEXPWM1.SM[3].CTRL)
  4040. #define FLEXPWM1_SM3VAL0 (IMXRT_FLEXPWM1.SM[3].VAL0)
  4041. #define FLEXPWM1_SM3FRACVAL1 (IMXRT_FLEXPWM1.SM[3].FRACVAL1)
  4042. #define FLEXPWM1_SM3VAL1 (IMXRT_FLEXPWM1.SM[3].VAL1)
  4043. #define FLEXPWM1_SM3FRACVAL2 (IMXRT_FLEXPWM1.SM[3].FRACVAL2)
  4044. #define FLEXPWM1_SM3VAL2 (IMXRT_FLEXPWM1.SM[3].VAL2)
  4045. #define FLEXPWM1_SM3FRACVAL3 (IMXRT_FLEXPWM1.SM[3].FRACVAL3)
  4046. #define FLEXPWM1_SM3VAL3 (IMXRT_FLEXPWM1.SM[3].VAL3)
  4047. #define FLEXPWM1_SM3FRACVAL4 (IMXRT_FLEXPWM1.SM[3].FRACVAL4)
  4048. #define FLEXPWM1_SM3VAL4 (IMXRT_FLEXPWM1.SM[3].VAL4)
  4049. #define FLEXPWM1_SM3FRACVAL5 (IMXRT_FLEXPWM1.SM[3].FRACVAL5)
  4050. #define FLEXPWM1_SM3VAL5 (IMXRT_FLEXPWM1.SM[3].VAL5)
  4051. #define FLEXPWM1_SM3FRCTRL (IMXRT_FLEXPWM1.SM[3].FRCTRL)
  4052. #define FLEXPWM1_SM3OCTRL (IMXRT_FLEXPWM1.SM[3].OCTRL)
  4053. #define FLEXPWM1_SM3STS (IMXRT_FLEXPWM1.SM[3].STS)
  4054. #define FLEXPWM1_SM3INTEN (IMXRT_FLEXPWM1.SM[3].INTEN)
  4055. #define FLEXPWM1_SM3DMAEN (IMXRT_FLEXPWM1.SM[3].DMAEN)
  4056. #define FLEXPWM1_SM3TCTRL (IMXRT_FLEXPWM1.SM[3].TCTRL)
  4057. #define FLEXPWM1_SM3DISMAP0 (IMXRT_FLEXPWM1.SM[3].DISMAP0)
  4058. #define FLEXPWM1_SM3DISMAP1 (IMXRT_FLEXPWM1.SM[3].DISMAP1)
  4059. #define FLEXPWM1_SM3DTCNT0 (IMXRT_FLEXPWM1.SM[3].DTCNT0)
  4060. #define FLEXPWM1_SM3DTCNT1 (IMXRT_FLEXPWM1.SM[3].DTCNT1)
  4061. #define FLEXPWM1_SM3CAPTCTRLA (IMXRT_FLEXPWM1.SM[3].CAPTCTRLA)
  4062. #define FLEXPWM1_SM3CAPTCOMPA (IMXRT_FLEXPWM1.SM[3].CAPTCOMPA)
  4063. #define FLEXPWM1_SM3CAPTCTRLB (IMXRT_FLEXPWM1.SM[3].CAPTCTRLB)
  4064. #define FLEXPWM1_SM3CAPTCOMPB (IMXRT_FLEXPWM1.SM[3].CAPTCOMPB)
  4065. #define FLEXPWM1_SM3CAPTCTRLX (IMXRT_FLEXPWM1.SM[3].CAPTCTRLX)
  4066. #define FLEXPWM1_SM3CAPTCOMPX (IMXRT_FLEXPWM1.SM[3].CAPTCOMPX)
  4067. #define FLEXPWM1_SM3CVAL0 (IMXRT_FLEXPWM1.SM[3].CVAL0)
  4068. #define FLEXPWM1_SM3CVAL0CYC (IMXRT_FLEXPWM1.SM[3].CVAL0CYC)
  4069. #define FLEXPWM1_SM3CVAL1 (IMXRT_FLEXPWM1.SM[3].CVAL1)
  4070. #define FLEXPWM1_SM3CVAL1CYC (IMXRT_FLEXPWM1.SM[3].CVAL1CYC)
  4071. #define FLEXPWM1_SM3CVAL2 (IMXRT_FLEXPWM1.SM[3].CVAL2)
  4072. #define FLEXPWM1_SM3CVAL2CYC (IMXRT_FLEXPWM1.SM[3].CVAL2CYC)
  4073. #define FLEXPWM1_SM3CVAL3 (IMXRT_FLEXPWM1.SM[3].CVAL3)
  4074. #define FLEXPWM1_SM3CVAL3CYC (IMXRT_FLEXPWM1.SM[3].CVAL3CYC)
  4075. #define FLEXPWM1_SM3CVAL4 (IMXRT_FLEXPWM1.SM[3].CVAL4)
  4076. #define FLEXPWM1_SM3CVAL4CYC (IMXRT_FLEXPWM1.SM[3].CVAL4CYC)
  4077. #define FLEXPWM1_SM3CVAL5 (IMXRT_FLEXPWM1.SM[3].CVAL5)
  4078. #define FLEXPWM1_SM3CVAL5CYC (IMXRT_FLEXPWM1.SM[3].CVAL5CYC)
  4079. #define FLEXPWM1_OUTEN (IMXRT_FLEXPWM1.OUTEN)
  4080. #define FLEXPWM1_MASK (IMXRT_FLEXPWM1.MASK)
  4081. #define FLEXPWM1_SWCOUT (IMXRT_FLEXPWM1.SWCOUT)
  4082. #define FLEXPWM1_DTSRCSEL (IMXRT_FLEXPWM1.DTSRCSEL)
  4083. #define FLEXPWM1_MCTRL (IMXRT_FLEXPWM1.MCTRL)
  4084. #define FLEXPWM1_MCTRL2 (IMXRT_FLEXPWM1.MCTRL2)
  4085. #define FLEXPWM1_FCTRL0 (IMXRT_FLEXPWM1.FCTRL0)
  4086. #define FLEXPWM1_FSTS0 (IMXRT_FLEXPWM1.FSTS0)
  4087. #define FLEXPWM1_FFILT0 (IMXRT_FLEXPWM1.FFILT0)
  4088. #define FLEXPWM1_FTST0 (IMXRT_FLEXPWM1.FTST0)
  4089. #define FLEXPWM1_FCTRL20 (IMXRT_FLEXPWM1.FCTRL20)
  4090. #define FLEXPWM2_SM0CNT (IMXRT_FLEXPWM2.SM[0].CNT)
  4091. #define FLEXPWM2_SM0INIT (IMXRT_FLEXPWM2.SM[0].INIT)
  4092. #define FLEXPWM2_SM0CTRL2 (IMXRT_FLEXPWM2.SM[0].CTRL2)
  4093. #define FLEXPWM2_SM0CTRL (IMXRT_FLEXPWM2.SM[0].CTRL)
  4094. #define FLEXPWM2_SM0VAL0 (IMXRT_FLEXPWM2.SM[0].VAL0)
  4095. #define FLEXPWM2_SM0FRACVAL1 (IMXRT_FLEXPWM2.SM[0].FRACVAL1)
  4096. #define FLEXPWM2_SM0VAL1 (IMXRT_FLEXPWM2.SM[0].VAL1)
  4097. #define FLEXPWM2_SM0FRACVAL2 (IMXRT_FLEXPWM2.SM[0].FRACVAL2)
  4098. #define FLEXPWM2_SM0VAL2 (IMXRT_FLEXPWM2.SM[0].VAL2)
  4099. #define FLEXPWM2_SM0FRACVAL3 (IMXRT_FLEXPWM2.SM[0].FRACVAL3)
  4100. #define FLEXPWM2_SM0VAL3 (IMXRT_FLEXPWM2.SM[0].VAL3)
  4101. #define FLEXPWM2_SM0FRACVAL4 (IMXRT_FLEXPWM2.SM[0].FRACVAL4)
  4102. #define FLEXPWM2_SM0VAL4 (IMXRT_FLEXPWM2.SM[0].VAL4)
  4103. #define FLEXPWM2_SM0FRACVAL5 (IMXRT_FLEXPWM2.SM[0].FRACVAL5)
  4104. #define FLEXPWM2_SM0VAL5 (IMXRT_FLEXPWM2.SM[0].VAL5)
  4105. #define FLEXPWM2_SM0FRCTRL (IMXRT_FLEXPWM2.SM[0].FRCTRL)
  4106. #define FLEXPWM2_SM0OCTRL (IMXRT_FLEXPWM2.SM[0].OCTRL)
  4107. #define FLEXPWM2_SM0STS (IMXRT_FLEXPWM2.SM[0].STS)
  4108. #define FLEXPWM2_SM0INTEN (IMXRT_FLEXPWM2.SM[0].INTEN)
  4109. #define FLEXPWM2_SM0DMAEN (IMXRT_FLEXPWM2.SM[0].DMAEN)
  4110. #define FLEXPWM2_SM0TCTRL (IMXRT_FLEXPWM2.SM[0].TCTRL)
  4111. #define FLEXPWM2_SM0DISMAP0 (IMXRT_FLEXPWM2.SM[0].DISMAP0)
  4112. #define FLEXPWM2_SM0DISMAP1 (IMXRT_FLEXPWM2.SM[0].DISMAP1)
  4113. #define FLEXPWM2_SM0DTCNT0 (IMXRT_FLEXPWM2.SM[0].DTCNT0)
  4114. #define FLEXPWM2_SM0DTCNT1 (IMXRT_FLEXPWM2.SM[0].DTCNT1)
  4115. #define FLEXPWM2_SM0CAPTCTRLA (IMXRT_FLEXPWM2.SM[0].CAPTCTRLA)
  4116. #define FLEXPWM2_SM0CAPTCOMPA (IMXRT_FLEXPWM2.SM[0].CAPTCOMPA)
  4117. #define FLEXPWM2_SM0CAPTCTRLB (IMXRT_FLEXPWM2.SM[0].CAPTCTRLB)
  4118. #define FLEXPWM2_SM0CAPTCOMPB (IMXRT_FLEXPWM2.SM[0].CAPTCOMPB)
  4119. #define FLEXPWM2_SM0CAPTCTRLX (IMXRT_FLEXPWM2.SM[0].CAPTCTRLX)
  4120. #define FLEXPWM2_SM0CAPTCOMPX (IMXRT_FLEXPWM2.SM[0].CAPTCOMPX)
  4121. #define FLEXPWM2_SM0CVAL0 (IMXRT_FLEXPWM2.SM[0].CVAL0)
  4122. #define FLEXPWM2_SM0CVAL0CYC (IMXRT_FLEXPWM2.SM[0].CVAL0CYC)
  4123. #define FLEXPWM2_SM0CVAL1 (IMXRT_FLEXPWM2.SM[0].CVAL1)
  4124. #define FLEXPWM2_SM0CVAL1CYC (IMXRT_FLEXPWM2.SM[0].CVAL1CYC)
  4125. #define FLEXPWM2_SM0CVAL2 (IMXRT_FLEXPWM2.SM[0].CVAL2)
  4126. #define FLEXPWM2_SM0CVAL2CYC (IMXRT_FLEXPWM2.SM[0].CVAL2CYC)
  4127. #define FLEXPWM2_SM0CVAL3 (IMXRT_FLEXPWM2.SM[0].CVAL3)
  4128. #define FLEXPWM2_SM0CVAL3CYC (IMXRT_FLEXPWM2.SM[0].CVAL3CYC)
  4129. #define FLEXPWM2_SM0CVAL4 (IMXRT_FLEXPWM2.SM[0].CVAL4)
  4130. #define FLEXPWM2_SM0CVAL4CYC (IMXRT_FLEXPWM2.SM[0].CVAL4CYC)
  4131. #define FLEXPWM2_SM0CVAL5 (IMXRT_FLEXPWM2.SM[0].CVAL5)
  4132. #define FLEXPWM2_SM0CVAL5CYC (IMXRT_FLEXPWM2.SM[0].CVAL5CYC)
  4133. #define FLEXPWM2_SM1CNT (IMXRT_FLEXPWM2.SM[1].CNT)
  4134. #define FLEXPWM2_SM1INIT (IMXRT_FLEXPWM2.SM[1].INIT)
  4135. #define FLEXPWM2_SM1CTRL2 (IMXRT_FLEXPWM2.SM[1].CTRL2)
  4136. #define FLEXPWM2_SM1CTRL (IMXRT_FLEXPWM2.SM[1].CTRL)
  4137. #define FLEXPWM2_SM1VAL0 (IMXRT_FLEXPWM2.SM[1].VAL0)
  4138. #define FLEXPWM2_SM1FRACVAL1 (IMXRT_FLEXPWM2.SM[1].FRACVAL1)
  4139. #define FLEXPWM2_SM1VAL1 (IMXRT_FLEXPWM2.SM[1].VAL1)
  4140. #define FLEXPWM2_SM1FRACVAL2 (IMXRT_FLEXPWM2.SM[1].FRACVAL2)
  4141. #define FLEXPWM2_SM1VAL2 (IMXRT_FLEXPWM2.SM[1].VAL2)
  4142. #define FLEXPWM2_SM1FRACVAL3 (IMXRT_FLEXPWM2.SM[1].FRACVAL3)
  4143. #define FLEXPWM2_SM1VAL3 (IMXRT_FLEXPWM2.SM[1].VAL3)
  4144. #define FLEXPWM2_SM1FRACVAL4 (IMXRT_FLEXPWM2.SM[1].FRACVAL4)
  4145. #define FLEXPWM2_SM1VAL4 (IMXRT_FLEXPWM2.SM[1].VAL4)
  4146. #define FLEXPWM2_SM1FRACVAL5 (IMXRT_FLEXPWM2.SM[1].FRACVAL5)
  4147. #define FLEXPWM2_SM1VAL5 (IMXRT_FLEXPWM2.SM[1].VAL5)
  4148. #define FLEXPWM2_SM1FRCTRL (IMXRT_FLEXPWM2.SM[1].FRCTRL)
  4149. #define FLEXPWM2_SM1OCTRL (IMXRT_FLEXPWM2.SM[1].OCTRL)
  4150. #define FLEXPWM2_SM1STS (IMXRT_FLEXPWM2.SM[1].STS)
  4151. #define FLEXPWM2_SM1INTEN (IMXRT_FLEXPWM2.SM[1].INTEN)
  4152. #define FLEXPWM2_SM1DMAEN (IMXRT_FLEXPWM2.SM[1].DMAEN)
  4153. #define FLEXPWM2_SM1TCTRL (IMXRT_FLEXPWM2.SM[1].TCTRL)
  4154. #define FLEXPWM2_SM1DISMAP0 (IMXRT_FLEXPWM2.SM[1].DISMAP0)
  4155. #define FLEXPWM2_SM1DISMAP1 (IMXRT_FLEXPWM2.SM[1].DISMAP1)
  4156. #define FLEXPWM2_SM1DTCNT0 (IMXRT_FLEXPWM2.SM[1].DTCNT0)
  4157. #define FLEXPWM2_SM1DTCNT1 (IMXRT_FLEXPWM2.SM[1].DTCNT1)
  4158. #define FLEXPWM2_SM1CAPTCTRLA (IMXRT_FLEXPWM2.SM[1].CAPTCTRLA)
  4159. #define FLEXPWM2_SM1CAPTCOMPA (IMXRT_FLEXPWM2.SM[1].CAPTCOMPA)
  4160. #define FLEXPWM2_SM1CAPTCTRLB (IMXRT_FLEXPWM2.SM[1].CAPTCTRLB)
  4161. #define FLEXPWM2_SM1CAPTCOMPB (IMXRT_FLEXPWM2.SM[1].CAPTCOMPB)
  4162. #define FLEXPWM2_SM1CAPTCTRLX (IMXRT_FLEXPWM2.SM[1].CAPTCTRLX)
  4163. #define FLEXPWM2_SM1CAPTCOMPX (IMXRT_FLEXPWM2.SM[1].CAPTCOMPX)
  4164. #define FLEXPWM2_SM1CVAL0 (IMXRT_FLEXPWM2.SM[1].CVAL0)
  4165. #define FLEXPWM2_SM1CVAL0CYC (IMXRT_FLEXPWM2.SM[1].CVAL0CYC)
  4166. #define FLEXPWM2_SM1CVAL1 (IMXRT_FLEXPWM2.SM[1].CVAL1)
  4167. #define FLEXPWM2_SM1CVAL1CYC (IMXRT_FLEXPWM2.SM[1].CVAL1CYC)
  4168. #define FLEXPWM2_SM1CVAL2 (IMXRT_FLEXPWM2.SM[1].CVAL2)
  4169. #define FLEXPWM2_SM1CVAL2CYC (IMXRT_FLEXPWM2.SM[1].CVAL2CYC)
  4170. #define FLEXPWM2_SM1CVAL3 (IMXRT_FLEXPWM2.SM[1].CVAL3)
  4171. #define FLEXPWM2_SM1CVAL3CYC (IMXRT_FLEXPWM2.SM[1].CVAL3CYC)
  4172. #define FLEXPWM2_SM1CVAL4 (IMXRT_FLEXPWM2.SM[1].CVAL4)
  4173. #define FLEXPWM2_SM1CVAL4CYC (IMXRT_FLEXPWM2.SM[1].CVAL4CYC)
  4174. #define FLEXPWM2_SM1CVAL5 (IMXRT_FLEXPWM2.SM[1].CVAL5)
  4175. #define FLEXPWM2_SM1CVAL5CYC (IMXRT_FLEXPWM2.SM[1].CVAL5CYC)
  4176. #define FLEXPWM2_SM2CNT (IMXRT_FLEXPWM2.SM[2].CNT)
  4177. #define FLEXPWM2_SM2INIT (IMXRT_FLEXPWM2.SM[2].INIT)
  4178. #define FLEXPWM2_SM2CTRL2 (IMXRT_FLEXPWM2.SM[2].CTRL2)
  4179. #define FLEXPWM2_SM2CTRL (IMXRT_FLEXPWM2.SM[2].CTRL)
  4180. #define FLEXPWM2_SM2VAL0 (IMXRT_FLEXPWM2.SM[2].VAL0)
  4181. #define FLEXPWM2_SM2FRACVAL1 (IMXRT_FLEXPWM2.SM[2].FRACVAL1)
  4182. #define FLEXPWM2_SM2VAL1 (IMXRT_FLEXPWM2.SM[2].VAL1)
  4183. #define FLEXPWM2_SM2FRACVAL2 (IMXRT_FLEXPWM2.SM[2].FRACVAL2)
  4184. #define FLEXPWM2_SM2VAL2 (IMXRT_FLEXPWM2.SM[2].VAL2)
  4185. #define FLEXPWM2_SM2FRACVAL3 (IMXRT_FLEXPWM2.SM[2].FRACVAL3)
  4186. #define FLEXPWM2_SM2VAL3 (IMXRT_FLEXPWM2.SM[2].VAL3)
  4187. #define FLEXPWM2_SM2FRACVAL4 (IMXRT_FLEXPWM2.SM[2].FRACVAL4)
  4188. #define FLEXPWM2_SM2VAL4 (IMXRT_FLEXPWM2.SM[2].VAL4)
  4189. #define FLEXPWM2_SM2FRACVAL5 (IMXRT_FLEXPWM2.SM[2].FRACVAL5)
  4190. #define FLEXPWM2_SM2VAL5 (IMXRT_FLEXPWM2.SM[2].VAL5)
  4191. #define FLEXPWM2_SM2FRCTRL (IMXRT_FLEXPWM2.SM[2].FRCTRL)
  4192. #define FLEXPWM2_SM2OCTRL (IMXRT_FLEXPWM2.SM[2].OCTRL)
  4193. #define FLEXPWM2_SM2STS (IMXRT_FLEXPWM2.SM[2].STS)
  4194. #define FLEXPWM2_SM2INTEN (IMXRT_FLEXPWM2.SM[2].INTEN)
  4195. #define FLEXPWM2_SM2DMAEN (IMXRT_FLEXPWM2.SM[2].DMAEN)
  4196. #define FLEXPWM2_SM2TCTRL (IMXRT_FLEXPWM2.SM[2].TCTRL)
  4197. #define FLEXPWM2_SM2DISMAP0 (IMXRT_FLEXPWM2.SM[2].DISMAP0)
  4198. #define FLEXPWM2_SM2DISMAP1 (IMXRT_FLEXPWM2.SM[2].DISMAP1)
  4199. #define FLEXPWM2_SM2DTCNT0 (IMXRT_FLEXPWM2.SM[2].DTCNT0)
  4200. #define FLEXPWM2_SM2DTCNT1 (IMXRT_FLEXPWM2.SM[2].DTCNT1)
  4201. #define FLEXPWM2_SM2CAPTCTRLA (IMXRT_FLEXPWM2.SM[2].CAPTCTRLA)
  4202. #define FLEXPWM2_SM2CAPTCOMPA (IMXRT_FLEXPWM2.SM[2].CAPTCOMPA)
  4203. #define FLEXPWM2_SM2CAPTCTRLB (IMXRT_FLEXPWM2.SM[2].CAPTCTRLB)
  4204. #define FLEXPWM2_SM2CAPTCOMPB (IMXRT_FLEXPWM2.SM[2].CAPTCOMPB)
  4205. #define FLEXPWM2_SM2CAPTCTRLX (IMXRT_FLEXPWM2.SM[2].CAPTCTRLX)
  4206. #define FLEXPWM2_SM2CAPTCOMPX (IMXRT_FLEXPWM2.SM[2].CAPTCOMPX)
  4207. #define FLEXPWM2_SM2CVAL0 (IMXRT_FLEXPWM2.SM[2].CVAL0)
  4208. #define FLEXPWM2_SM2CVAL0CYC (IMXRT_FLEXPWM2.SM[2].CVAL0CYC)
  4209. #define FLEXPWM2_SM2CVAL1 (IMXRT_FLEXPWM2.SM[2].CVAL1)
  4210. #define FLEXPWM2_SM2CVAL1CYC (IMXRT_FLEXPWM2.SM[2].CVAL1CYC)
  4211. #define FLEXPWM2_SM2CVAL2 (IMXRT_FLEXPWM2.SM[2].CVAL2)
  4212. #define FLEXPWM2_SM2CVAL2CYC (IMXRT_FLEXPWM2.SM[2].CVAL2CYC)
  4213. #define FLEXPWM2_SM2CVAL3 (IMXRT_FLEXPWM2.SM[2].CVAL3)
  4214. #define FLEXPWM2_SM2CVAL3CYC (IMXRT_FLEXPWM2.SM[2].CVAL3CYC)
  4215. #define FLEXPWM2_SM2CVAL4 (IMXRT_FLEXPWM2.SM[2].CVAL4)
  4216. #define FLEXPWM2_SM2CVAL4CYC (IMXRT_FLEXPWM2.SM[2].CVAL4CYC)
  4217. #define FLEXPWM2_SM2CVAL5 (IMXRT_FLEXPWM2.SM[2].CVAL5)
  4218. #define FLEXPWM2_SM2CVAL5CYC (IMXRT_FLEXPWM2.SM[2].CVAL5CYC)
  4219. #define FLEXPWM2_SM3CNT (IMXRT_FLEXPWM2.SM[3].CNT)
  4220. #define FLEXPWM2_SM3INIT (IMXRT_FLEXPWM2.SM[3].INIT)
  4221. #define FLEXPWM2_SM3CTRL2 (IMXRT_FLEXPWM2.SM[3].CTRL2)
  4222. #define FLEXPWM2_SM3CTRL (IMXRT_FLEXPWM2.SM[3].CTRL)
  4223. #define FLEXPWM2_SM3VAL0 (IMXRT_FLEXPWM2.SM[3].VAL0)
  4224. #define FLEXPWM2_SM3FRACVAL1 (IMXRT_FLEXPWM2.SM[3].FRACVAL1)
  4225. #define FLEXPWM2_SM3VAL1 (IMXRT_FLEXPWM2.SM[3].VAL1)
  4226. #define FLEXPWM2_SM3FRACVAL2 (IMXRT_FLEXPWM2.SM[3].FRACVAL2)
  4227. #define FLEXPWM2_SM3VAL2 (IMXRT_FLEXPWM2.SM[3].VAL2)
  4228. #define FLEXPWM2_SM3FRACVAL3 (IMXRT_FLEXPWM2.SM[3].FRACVAL3)
  4229. #define FLEXPWM2_SM3VAL3 (IMXRT_FLEXPWM2.SM[3].VAL3)
  4230. #define FLEXPWM2_SM3FRACVAL4 (IMXRT_FLEXPWM2.SM[3].FRACVAL4)
  4231. #define FLEXPWM2_SM3VAL4 (IMXRT_FLEXPWM2.SM[3].VAL4)
  4232. #define FLEXPWM2_SM3FRACVAL5 (IMXRT_FLEXPWM2.SM[3].FRACVAL5)
  4233. #define FLEXPWM2_SM3VAL5 (IMXRT_FLEXPWM2.SM[3].VAL5)
  4234. #define FLEXPWM2_SM3FRCTRL (IMXRT_FLEXPWM2.SM[3].FRCTRL)
  4235. #define FLEXPWM2_SM3OCTRL (IMXRT_FLEXPWM2.SM[3].OCTRL)
  4236. #define FLEXPWM2_SM3STS (IMXRT_FLEXPWM2.SM[3].STS)
  4237. #define FLEXPWM2_SM3INTEN (IMXRT_FLEXPWM2.SM[3].INTEN)
  4238. #define FLEXPWM2_SM3DMAEN (IMXRT_FLEXPWM2.SM[3].DMAEN)
  4239. #define FLEXPWM2_SM3TCTRL (IMXRT_FLEXPWM2.SM[3].TCTRL)
  4240. #define FLEXPWM2_SM3DISMAP0 (IMXRT_FLEXPWM2.SM[3].DISMAP0)
  4241. #define FLEXPWM2_SM3DISMAP1 (IMXRT_FLEXPWM2.SM[3].DISMAP1)
  4242. #define FLEXPWM2_SM3DTCNT0 (IMXRT_FLEXPWM2.SM[3].DTCNT0)
  4243. #define FLEXPWM2_SM3DTCNT1 (IMXRT_FLEXPWM2.SM[3].DTCNT1)
  4244. #define FLEXPWM2_SM3CAPTCTRLA (IMXRT_FLEXPWM2.SM[3].CAPTCTRLA)
  4245. #define FLEXPWM2_SM3CAPTCOMPA (IMXRT_FLEXPWM2.SM[3].CAPTCOMPA)
  4246. #define FLEXPWM2_SM3CAPTCTRLB (IMXRT_FLEXPWM2.SM[3].CAPTCTRLB)
  4247. #define FLEXPWM2_SM3CAPTCOMPB (IMXRT_FLEXPWM2.SM[3].CAPTCOMPB)
  4248. #define FLEXPWM2_SM3CAPTCTRLX (IMXRT_FLEXPWM2.SM[3].CAPTCTRLX)
  4249. #define FLEXPWM2_SM3CAPTCOMPX (IMXRT_FLEXPWM2.SM[3].CAPTCOMPX)
  4250. #define FLEXPWM2_SM3CVAL0 (IMXRT_FLEXPWM2.SM[3].CVAL0)
  4251. #define FLEXPWM2_SM3CVAL0CYC (IMXRT_FLEXPWM2.SM[3].CVAL0CYC)
  4252. #define FLEXPWM2_SM3CVAL1 (IMXRT_FLEXPWM2.SM[3].CVAL1)
  4253. #define FLEXPWM2_SM3CVAL1CYC (IMXRT_FLEXPWM2.SM[3].CVAL1CYC)
  4254. #define FLEXPWM2_SM3CVAL2 (IMXRT_FLEXPWM2.SM[3].CVAL2)
  4255. #define FLEXPWM2_SM3CVAL2CYC (IMXRT_FLEXPWM2.SM[3].CVAL2CYC)
  4256. #define FLEXPWM2_SM3CVAL3 (IMXRT_FLEXPWM2.SM[3].CVAL3)
  4257. #define FLEXPWM2_SM3CVAL3CYC (IMXRT_FLEXPWM2.SM[3].CVAL3CYC)
  4258. #define FLEXPWM2_SM3CVAL4 (IMXRT_FLEXPWM2.SM[3].CVAL4)
  4259. #define FLEXPWM2_SM3CVAL4CYC (IMXRT_FLEXPWM2.SM[3].CVAL4CYC)
  4260. #define FLEXPWM2_SM3CVAL5 (IMXRT_FLEXPWM2.SM[3].CVAL5)
  4261. #define FLEXPWM2_SM3CVAL5CYC (IMXRT_FLEXPWM2.SM[3].CVAL5CYC)
  4262. #define FLEXPWM2_OUTEN (IMXRT_FLEXPWM2.OUTEN)
  4263. #define FLEXPWM2_MASK (IMXRT_FLEXPWM2.MASK)
  4264. #define FLEXPWM2_SWCOUT (IMXRT_FLEXPWM2.SWCOUT)
  4265. #define FLEXPWM2_DTSRCSEL (IMXRT_FLEXPWM2.DTSRCSEL)
  4266. #define FLEXPWM2_MCTRL (IMXRT_FLEXPWM2.MCTRL)
  4267. #define FLEXPWM2_MCTRL2 (IMXRT_FLEXPWM2.MCTRL2)
  4268. #define FLEXPWM2_FCTRL0 (IMXRT_FLEXPWM2.FCTRL0)
  4269. #define FLEXPWM2_FSTS0 (IMXRT_FLEXPWM2.FSTS0)
  4270. #define FLEXPWM2_FFILT0 (IMXRT_FLEXPWM2.FFILT0)
  4271. #define FLEXPWM2_FTST0 (IMXRT_FLEXPWM2.FTST0)
  4272. #define FLEXPWM2_FCTRL20 (IMXRT_FLEXPWM2.FCTRL20)
  4273. #define FLEXPWM3_SM0CNT (IMXRT_FLEXPWM3.SM[0].CNT)
  4274. #define FLEXPWM3_SM0INIT (IMXRT_FLEXPWM3.SM[0].INIT)
  4275. #define FLEXPWM3_SM0CTRL2 (IMXRT_FLEXPWM3.SM[0].CTRL2)
  4276. #define FLEXPWM3_SM0CTRL (IMXRT_FLEXPWM3.SM[0].CTRL)
  4277. #define FLEXPWM3_SM0VAL0 (IMXRT_FLEXPWM3.SM[0].VAL0)
  4278. #define FLEXPWM3_SM0FRACVAL1 (IMXRT_FLEXPWM3.SM[0].FRACVAL1)
  4279. #define FLEXPWM3_SM0VAL1 (IMXRT_FLEXPWM3.SM[0].VAL1)
  4280. #define FLEXPWM3_SM0FRACVAL2 (IMXRT_FLEXPWM3.SM[0].FRACVAL2)
  4281. #define FLEXPWM3_SM0VAL2 (IMXRT_FLEXPWM3.SM[0].VAL2)
  4282. #define FLEXPWM3_SM0FRACVAL3 (IMXRT_FLEXPWM3.SM[0].FRACVAL3)
  4283. #define FLEXPWM3_SM0VAL3 (IMXRT_FLEXPWM3.SM[0].VAL3)
  4284. #define FLEXPWM3_SM0FRACVAL4 (IMXRT_FLEXPWM3.SM[0].FRACVAL4)
  4285. #define FLEXPWM3_SM0VAL4 (IMXRT_FLEXPWM3.SM[0].VAL4)
  4286. #define FLEXPWM3_SM0FRACVAL5 (IMXRT_FLEXPWM3.SM[0].FRACVAL5)
  4287. #define FLEXPWM3_SM0VAL5 (IMXRT_FLEXPWM3.SM[0].VAL5)
  4288. #define FLEXPWM3_SM0FRCTRL (IMXRT_FLEXPWM3.SM[0].FRCTRL)
  4289. #define FLEXPWM3_SM0OCTRL (IMXRT_FLEXPWM3.SM[0].OCTRL)
  4290. #define FLEXPWM3_SM0STS (IMXRT_FLEXPWM3.SM[0].STS)
  4291. #define FLEXPWM3_SM0INTEN (IMXRT_FLEXPWM3.SM[0].INTEN)
  4292. #define FLEXPWM3_SM0DMAEN (IMXRT_FLEXPWM3.SM[0].DMAEN)
  4293. #define FLEXPWM3_SM0TCTRL (IMXRT_FLEXPWM3.SM[0].TCTRL)
  4294. #define FLEXPWM3_SM0DISMAP0 (IMXRT_FLEXPWM3.SM[0].DISMAP0)
  4295. #define FLEXPWM3_SM0DISMAP1 (IMXRT_FLEXPWM3.SM[0].DISMAP1)
  4296. #define FLEXPWM3_SM0DTCNT0 (IMXRT_FLEXPWM3.SM[0].DTCNT0)
  4297. #define FLEXPWM3_SM0DTCNT1 (IMXRT_FLEXPWM3.SM[0].DTCNT1)
  4298. #define FLEXPWM3_SM0CAPTCTRLA (IMXRT_FLEXPWM3.SM[0].CAPTCTRLA)
  4299. #define FLEXPWM3_SM0CAPTCOMPA (IMXRT_FLEXPWM3.SM[0].CAPTCOMPA)
  4300. #define FLEXPWM3_SM0CAPTCTRLB (IMXRT_FLEXPWM3.SM[0].CAPTCTRLB)
  4301. #define FLEXPWM3_SM0CAPTCOMPB (IMXRT_FLEXPWM3.SM[0].CAPTCOMPB)
  4302. #define FLEXPWM3_SM0CAPTCTRLX (IMXRT_FLEXPWM3.SM[0].CAPTCTRLX)
  4303. #define FLEXPWM3_SM0CAPTCOMPX (IMXRT_FLEXPWM3.SM[0].CAPTCOMPX)
  4304. #define FLEXPWM3_SM0CVAL0 (IMXRT_FLEXPWM3.SM[0].CVAL0)
  4305. #define FLEXPWM3_SM0CVAL0CYC (IMXRT_FLEXPWM3.SM[0].CVAL0CYC)
  4306. #define FLEXPWM3_SM0CVAL1 (IMXRT_FLEXPWM3.SM[0].CVAL1)
  4307. #define FLEXPWM3_SM0CVAL1CYC (IMXRT_FLEXPWM3.SM[0].CVAL1CYC)
  4308. #define FLEXPWM3_SM0CVAL2 (IMXRT_FLEXPWM3.SM[0].CVAL2)
  4309. #define FLEXPWM3_SM0CVAL2CYC (IMXRT_FLEXPWM3.SM[0].CVAL2CYC)
  4310. #define FLEXPWM3_SM0CVAL3 (IMXRT_FLEXPWM3.SM[0].CVAL3)
  4311. #define FLEXPWM3_SM0CVAL3CYC (IMXRT_FLEXPWM3.SM[0].CVAL3CYC)
  4312. #define FLEXPWM3_SM0CVAL4 (IMXRT_FLEXPWM3.SM[0].CVAL4)
  4313. #define FLEXPWM3_SM0CVAL4CYC (IMXRT_FLEXPWM3.SM[0].CVAL4CYC)
  4314. #define FLEXPWM3_SM0CVAL5 (IMXRT_FLEXPWM3.SM[0].CVAL5)
  4315. #define FLEXPWM3_SM0CVAL5CYC (IMXRT_FLEXPWM3.SM[0].CVAL5CYC)
  4316. #define FLEXPWM3_SM1CNT (IMXRT_FLEXPWM3.SM[1].CNT)
  4317. #define FLEXPWM3_SM1INIT (IMXRT_FLEXPWM3.SM[1].INIT)
  4318. #define FLEXPWM3_SM1CTRL2 (IMXRT_FLEXPWM3.SM[1].CTRL2)
  4319. #define FLEXPWM3_SM1CTRL (IMXRT_FLEXPWM3.SM[1].CTRL)
  4320. #define FLEXPWM3_SM1VAL0 (IMXRT_FLEXPWM3.SM[1].VAL0)
  4321. #define FLEXPWM3_SM1FRACVAL1 (IMXRT_FLEXPWM3.SM[1].FRACVAL1)
  4322. #define FLEXPWM3_SM1VAL1 (IMXRT_FLEXPWM3.SM[1].VAL1)
  4323. #define FLEXPWM3_SM1FRACVAL2 (IMXRT_FLEXPWM3.SM[1].FRACVAL2)
  4324. #define FLEXPWM3_SM1VAL2 (IMXRT_FLEXPWM3.SM[1].VAL2)
  4325. #define FLEXPWM3_SM1FRACVAL3 (IMXRT_FLEXPWM3.SM[1].FRACVAL3)
  4326. #define FLEXPWM3_SM1VAL3 (IMXRT_FLEXPWM3.SM[1].VAL3)
  4327. #define FLEXPWM3_SM1FRACVAL4 (IMXRT_FLEXPWM3.SM[1].FRACVAL4)
  4328. #define FLEXPWM3_SM1VAL4 (IMXRT_FLEXPWM3.SM[1].VAL4)
  4329. #define FLEXPWM3_SM1FRACVAL5 (IMXRT_FLEXPWM3.SM[1].FRACVAL5)
  4330. #define FLEXPWM3_SM1VAL5 (IMXRT_FLEXPWM3.SM[1].VAL5)
  4331. #define FLEXPWM3_SM1FRCTRL (IMXRT_FLEXPWM3.SM[1].FRCTRL)
  4332. #define FLEXPWM3_SM1OCTRL (IMXRT_FLEXPWM3.SM[1].OCTRL)
  4333. #define FLEXPWM3_SM1STS (IMXRT_FLEXPWM3.SM[1].STS)
  4334. #define FLEXPWM3_SM1INTEN (IMXRT_FLEXPWM3.SM[1].INTEN)
  4335. #define FLEXPWM3_SM1DMAEN (IMXRT_FLEXPWM3.SM[1].DMAEN)
  4336. #define FLEXPWM3_SM1TCTRL (IMXRT_FLEXPWM3.SM[1].TCTRL)
  4337. #define FLEXPWM3_SM1DISMAP0 (IMXRT_FLEXPWM3.SM[1].DISMAP0)
  4338. #define FLEXPWM3_SM1DISMAP1 (IMXRT_FLEXPWM3.SM[1].DISMAP1)
  4339. #define FLEXPWM3_SM1DTCNT0 (IMXRT_FLEXPWM3.SM[1].DTCNT0)
  4340. #define FLEXPWM3_SM1DTCNT1 (IMXRT_FLEXPWM3.SM[1].DTCNT1)
  4341. #define FLEXPWM3_SM1CAPTCTRLA (IMXRT_FLEXPWM3.SM[1].CAPTCTRLA)
  4342. #define FLEXPWM3_SM1CAPTCOMPA (IMXRT_FLEXPWM3.SM[1].CAPTCOMPA)
  4343. #define FLEXPWM3_SM1CAPTCTRLB (IMXRT_FLEXPWM3.SM[1].CAPTCTRLB)
  4344. #define FLEXPWM3_SM1CAPTCOMPB (IMXRT_FLEXPWM3.SM[1].CAPTCOMPB)
  4345. #define FLEXPWM3_SM1CAPTCTRLX (IMXRT_FLEXPWM3.SM[1].CAPTCTRLX)
  4346. #define FLEXPWM3_SM1CAPTCOMPX (IMXRT_FLEXPWM3.SM[1].CAPTCOMPX)
  4347. #define FLEXPWM3_SM1CVAL0 (IMXRT_FLEXPWM3.SM[1].CVAL0)
  4348. #define FLEXPWM3_SM1CVAL0CYC (IMXRT_FLEXPWM3.SM[1].CVAL0CYC)
  4349. #define FLEXPWM3_SM1CVAL1 (IMXRT_FLEXPWM3.SM[1].CVAL1)
  4350. #define FLEXPWM3_SM1CVAL1CYC (IMXRT_FLEXPWM3.SM[1].CVAL1CYC)
  4351. #define FLEXPWM3_SM1CVAL2 (IMXRT_FLEXPWM3.SM[1].CVAL2)
  4352. #define FLEXPWM3_SM1CVAL2CYC (IMXRT_FLEXPWM3.SM[1].CVAL2CYC)
  4353. #define FLEXPWM3_SM1CVAL3 (IMXRT_FLEXPWM3.SM[1].CVAL3)
  4354. #define FLEXPWM3_SM1CVAL3CYC (IMXRT_FLEXPWM3.SM[1].CVAL3CYC)
  4355. #define FLEXPWM3_SM1CVAL4 (IMXRT_FLEXPWM3.SM[1].CVAL4)
  4356. #define FLEXPWM3_SM1CVAL4CYC (IMXRT_FLEXPWM3.SM[1].CVAL4CYC)
  4357. #define FLEXPWM3_SM1CVAL5 (IMXRT_FLEXPWM3.SM[1].CVAL5)
  4358. #define FLEXPWM3_SM1CVAL5CYC (IMXRT_FLEXPWM3.SM[1].CVAL5CYC)
  4359. #define FLEXPWM3_SM2CNT (IMXRT_FLEXPWM3.SM[2].CNT)
  4360. #define FLEXPWM3_SM2INIT (IMXRT_FLEXPWM3.SM[2].INIT)
  4361. #define FLEXPWM3_SM2CTRL2 (IMXRT_FLEXPWM3.SM[2].CTRL2)
  4362. #define FLEXPWM3_SM2CTRL (IMXRT_FLEXPWM3.SM[2].CTRL)
  4363. #define FLEXPWM3_SM2VAL0 (IMXRT_FLEXPWM3.SM[2].VAL0)
  4364. #define FLEXPWM3_SM2FRACVAL1 (IMXRT_FLEXPWM3.SM[2].FRACVAL1)
  4365. #define FLEXPWM3_SM2VAL1 (IMXRT_FLEXPWM3.SM[2].VAL1)
  4366. #define FLEXPWM3_SM2FRACVAL2 (IMXRT_FLEXPWM3.SM[2].FRACVAL2)
  4367. #define FLEXPWM3_SM2VAL2 (IMXRT_FLEXPWM3.SM[2].VAL2)
  4368. #define FLEXPWM3_SM2FRACVAL3 (IMXRT_FLEXPWM3.SM[2].FRACVAL3)
  4369. #define FLEXPWM3_SM2VAL3 (IMXRT_FLEXPWM3.SM[2].VAL3)
  4370. #define FLEXPWM3_SM2FRACVAL4 (IMXRT_FLEXPWM3.SM[2].FRACVAL4)
  4371. #define FLEXPWM3_SM2VAL4 (IMXRT_FLEXPWM3.SM[2].VAL4)
  4372. #define FLEXPWM3_SM2FRACVAL5 (IMXRT_FLEXPWM3.SM[2].FRACVAL5)
  4373. #define FLEXPWM3_SM2VAL5 (IMXRT_FLEXPWM3.SM[2].VAL5)
  4374. #define FLEXPWM3_SM2FRCTRL (IMXRT_FLEXPWM3.SM[2].FRCTRL)
  4375. #define FLEXPWM3_SM2OCTRL (IMXRT_FLEXPWM3.SM[2].OCTRL)
  4376. #define FLEXPWM3_SM2STS (IMXRT_FLEXPWM3.SM[2].STS)
  4377. #define FLEXPWM3_SM2INTEN (IMXRT_FLEXPWM3.SM[2].INTEN)
  4378. #define FLEXPWM3_SM2DMAEN (IMXRT_FLEXPWM3.SM[2].DMAEN)
  4379. #define FLEXPWM3_SM2TCTRL (IMXRT_FLEXPWM3.SM[2].TCTRL)
  4380. #define FLEXPWM3_SM2DISMAP0 (IMXRT_FLEXPWM3.SM[2].DISMAP0)
  4381. #define FLEXPWM3_SM2DISMAP1 (IMXRT_FLEXPWM3.SM[2].DISMAP1)
  4382. #define FLEXPWM3_SM2DTCNT0 (IMXRT_FLEXPWM3.SM[2].DTCNT0)
  4383. #define FLEXPWM3_SM2DTCNT1 (IMXRT_FLEXPWM3.SM[2].DTCNT1)
  4384. #define FLEXPWM3_SM2CAPTCTRLA (IMXRT_FLEXPWM3.SM[2].CAPTCTRLA)
  4385. #define FLEXPWM3_SM2CAPTCOMPA (IMXRT_FLEXPWM3.SM[2].CAPTCOMPA)
  4386. #define FLEXPWM3_SM2CAPTCTRLB (IMXRT_FLEXPWM3.SM[2].CAPTCTRLB)
  4387. #define FLEXPWM3_SM2CAPTCOMPB (IMXRT_FLEXPWM3.SM[2].CAPTCOMPB)
  4388. #define FLEXPWM3_SM2CAPTCTRLX (IMXRT_FLEXPWM3.SM[2].CAPTCTRLX)
  4389. #define FLEXPWM3_SM2CAPTCOMPX (IMXRT_FLEXPWM3.SM[2].CAPTCOMPX)
  4390. #define FLEXPWM3_SM2CVAL0 (IMXRT_FLEXPWM3.SM[2].CVAL0)
  4391. #define FLEXPWM3_SM2CVAL0CYC (IMXRT_FLEXPWM3.SM[2].CVAL0CYC)
  4392. #define FLEXPWM3_SM2CVAL1 (IMXRT_FLEXPWM3.SM[2].CVAL1)
  4393. #define FLEXPWM3_SM2CVAL1CYC (IMXRT_FLEXPWM3.SM[2].CVAL1CYC)
  4394. #define FLEXPWM3_SM2CVAL2 (IMXRT_FLEXPWM3.SM[2].CVAL2)
  4395. #define FLEXPWM3_SM2CVAL2CYC (IMXRT_FLEXPWM3.SM[2].CVAL2CYC)
  4396. #define FLEXPWM3_SM2CVAL3 (IMXRT_FLEXPWM3.SM[2].CVAL3)
  4397. #define FLEXPWM3_SM2CVAL3CYC (IMXRT_FLEXPWM3.SM[2].CVAL3CYC)
  4398. #define FLEXPWM3_SM2CVAL4 (IMXRT_FLEXPWM3.SM[2].CVAL4)
  4399. #define FLEXPWM3_SM2CVAL4CYC (IMXRT_FLEXPWM3.SM[2].CVAL4CYC)
  4400. #define FLEXPWM3_SM2CVAL5 (IMXRT_FLEXPWM3.SM[2].CVAL5)
  4401. #define FLEXPWM3_SM2CVAL5CYC (IMXRT_FLEXPWM3.SM[2].CVAL5CYC)
  4402. #define FLEXPWM3_SM3CNT (IMXRT_FLEXPWM3.SM[3].CNT)
  4403. #define FLEXPWM3_SM3INIT (IMXRT_FLEXPWM3.SM[3].INIT)
  4404. #define FLEXPWM3_SM3CTRL2 (IMXRT_FLEXPWM3.SM[3].CTRL2)
  4405. #define FLEXPWM3_SM3CTRL (IMXRT_FLEXPWM3.SM[3].CTRL)
  4406. #define FLEXPWM3_SM3VAL0 (IMXRT_FLEXPWM3.SM[3].VAL0)
  4407. #define FLEXPWM3_SM3FRACVAL1 (IMXRT_FLEXPWM3.SM[3].FRACVAL1)
  4408. #define FLEXPWM3_SM3VAL1 (IMXRT_FLEXPWM3.SM[3].VAL1)
  4409. #define FLEXPWM3_SM3FRACVAL2 (IMXRT_FLEXPWM3.SM[3].FRACVAL2)
  4410. #define FLEXPWM3_SM3VAL2 (IMXRT_FLEXPWM3.SM[3].VAL2)
  4411. #define FLEXPWM3_SM3FRACVAL3 (IMXRT_FLEXPWM3.SM[3].FRACVAL3)
  4412. #define FLEXPWM3_SM3VAL3 (IMXRT_FLEXPWM3.SM[3].VAL3)
  4413. #define FLEXPWM3_SM3FRACVAL4 (IMXRT_FLEXPWM3.SM[3].FRACVAL4)
  4414. #define FLEXPWM3_SM3VAL4 (IMXRT_FLEXPWM3.SM[3].VAL4)
  4415. #define FLEXPWM3_SM3FRACVAL5 (IMXRT_FLEXPWM3.SM[3].FRACVAL5)
  4416. #define FLEXPWM3_SM3VAL5 (IMXRT_FLEXPWM3.SM[3].VAL5)
  4417. #define FLEXPWM3_SM3FRCTRL (IMXRT_FLEXPWM3.SM[3].FRCTRL)
  4418. #define FLEXPWM3_SM3OCTRL (IMXRT_FLEXPWM3.SM[3].OCTRL)
  4419. #define FLEXPWM3_SM3STS (IMXRT_FLEXPWM3.SM[3].STS)
  4420. #define FLEXPWM3_SM3INTEN (IMXRT_FLEXPWM3.SM[3].INTEN)
  4421. #define FLEXPWM3_SM3DMAEN (IMXRT_FLEXPWM3.SM[3].DMAEN)
  4422. #define FLEXPWM3_SM3TCTRL (IMXRT_FLEXPWM3.SM[3].TCTRL)
  4423. #define FLEXPWM3_SM3DISMAP0 (IMXRT_FLEXPWM3.SM[3].DISMAP0)
  4424. #define FLEXPWM3_SM3DISMAP1 (IMXRT_FLEXPWM3.SM[3].DISMAP1)
  4425. #define FLEXPWM3_SM3DTCNT0 (IMXRT_FLEXPWM3.SM[3].DTCNT0)
  4426. #define FLEXPWM3_SM3DTCNT1 (IMXRT_FLEXPWM3.SM[3].DTCNT1)
  4427. #define FLEXPWM3_SM3CAPTCTRLA (IMXRT_FLEXPWM3.SM[3].CAPTCTRLA)
  4428. #define FLEXPWM3_SM3CAPTCOMPA (IMXRT_FLEXPWM3.SM[3].CAPTCOMPA)
  4429. #define FLEXPWM3_SM3CAPTCTRLB (IMXRT_FLEXPWM3.SM[3].CAPTCTRLB)
  4430. #define FLEXPWM3_SM3CAPTCOMPB (IMXRT_FLEXPWM3.SM[3].CAPTCOMPB)
  4431. #define FLEXPWM3_SM3CAPTCTRLX (IMXRT_FLEXPWM3.SM[3].CAPTCTRLX)
  4432. #define FLEXPWM3_SM3CAPTCOMPX (IMXRT_FLEXPWM3.SM[3].CAPTCOMPX)
  4433. #define FLEXPWM3_SM3CVAL0 (IMXRT_FLEXPWM3.SM[3].CVAL0)
  4434. #define FLEXPWM3_SM3CVAL0CYC (IMXRT_FLEXPWM3.SM[3].CVAL0CYC)
  4435. #define FLEXPWM3_SM3CVAL1 (IMXRT_FLEXPWM3.SM[3].CVAL1)
  4436. #define FLEXPWM3_SM3CVAL1CYC (IMXRT_FLEXPWM3.SM[3].CVAL1CYC)
  4437. #define FLEXPWM3_SM3CVAL2 (IMXRT_FLEXPWM3.SM[3].CVAL2)
  4438. #define FLEXPWM3_SM3CVAL2CYC (IMXRT_FLEXPWM3.SM[3].CVAL2CYC)
  4439. #define FLEXPWM3_SM3CVAL3 (IMXRT_FLEXPWM3.SM[3].CVAL3)
  4440. #define FLEXPWM3_SM3CVAL3CYC (IMXRT_FLEXPWM3.SM[3].CVAL3CYC)
  4441. #define FLEXPWM3_SM3CVAL4 (IMXRT_FLEXPWM3.SM[3].CVAL4)
  4442. #define FLEXPWM3_SM3CVAL4CYC (IMXRT_FLEXPWM3.SM[3].CVAL4CYC)
  4443. #define FLEXPWM3_SM3CVAL5 (IMXRT_FLEXPWM3.SM[3].CVAL5)
  4444. #define FLEXPWM3_SM3CVAL5CYC (IMXRT_FLEXPWM3.SM[3].CVAL5CYC)
  4445. #define FLEXPWM3_OUTEN (IMXRT_FLEXPWM3.OUTEN)
  4446. #define FLEXPWM3_MASK (IMXRT_FLEXPWM3.MASK)
  4447. #define FLEXPWM3_SWCOUT (IMXRT_FLEXPWM3.SWCOUT)
  4448. #define FLEXPWM3_DTSRCSEL (IMXRT_FLEXPWM3.DTSRCSEL)
  4449. #define FLEXPWM3_MCTRL (IMXRT_FLEXPWM3.MCTRL)
  4450. #define FLEXPWM3_MCTRL2 (IMXRT_FLEXPWM3.MCTRL2)
  4451. #define FLEXPWM3_FCTRL0 (IMXRT_FLEXPWM3.FCTRL0)
  4452. #define FLEXPWM3_FSTS0 (IMXRT_FLEXPWM3.FSTS0)
  4453. #define FLEXPWM3_FFILT0 (IMXRT_FLEXPWM3.FFILT0)
  4454. #define FLEXPWM3_FTST0 (IMXRT_FLEXPWM3.FTST0)
  4455. #define FLEXPWM3_FCTRL20 (IMXRT_FLEXPWM3.FCTRL20)
  4456. #define FLEXPWM4_SM0CNT (IMXRT_FLEXPWM4.SM[0].CNT)
  4457. #define FLEXPWM4_SM0INIT (IMXRT_FLEXPWM4.SM[0].INIT)
  4458. #define FLEXPWM4_SM0CTRL2 (IMXRT_FLEXPWM4.SM[0].CTRL2)
  4459. #define FLEXPWM4_SM0CTRL (IMXRT_FLEXPWM4.SM[0].CTRL)
  4460. #define FLEXPWM4_SM0VAL0 (IMXRT_FLEXPWM4.SM[0].VAL0)
  4461. #define FLEXPWM4_SM0FRACVAL1 (IMXRT_FLEXPWM4.SM[0].FRACVAL1)
  4462. #define FLEXPWM4_SM0VAL1 (IMXRT_FLEXPWM4.SM[0].VAL1)
  4463. #define FLEXPWM4_SM0FRACVAL2 (IMXRT_FLEXPWM4.SM[0].FRACVAL2)
  4464. #define FLEXPWM4_SM0VAL2 (IMXRT_FLEXPWM4.SM[0].VAL2)
  4465. #define FLEXPWM4_SM0FRACVAL3 (IMXRT_FLEXPWM4.SM[0].FRACVAL3)
  4466. #define FLEXPWM4_SM0VAL3 (IMXRT_FLEXPWM4.SM[0].VAL3)
  4467. #define FLEXPWM4_SM0FRACVAL4 (IMXRT_FLEXPWM4.SM[0].FRACVAL4)
  4468. #define FLEXPWM4_SM0VAL4 (IMXRT_FLEXPWM4.SM[0].VAL4)
  4469. #define FLEXPWM4_SM0FRACVAL5 (IMXRT_FLEXPWM4.SM[0].FRACVAL5)
  4470. #define FLEXPWM4_SM0VAL5 (IMXRT_FLEXPWM4.SM[0].VAL5)
  4471. #define FLEXPWM4_SM0FRCTRL (IMXRT_FLEXPWM4.SM[0].FRCTRL)
  4472. #define FLEXPWM4_SM0OCTRL (IMXRT_FLEXPWM4.SM[0].OCTRL)
  4473. #define FLEXPWM4_SM0STS (IMXRT_FLEXPWM4.SM[0].STS)
  4474. #define FLEXPWM4_SM0INTEN (IMXRT_FLEXPWM4.SM[0].INTEN)
  4475. #define FLEXPWM4_SM0DMAEN (IMXRT_FLEXPWM4.SM[0].DMAEN)
  4476. #define FLEXPWM4_SM0TCTRL (IMXRT_FLEXPWM4.SM[0].TCTRL)
  4477. #define FLEXPWM4_SM0DISMAP0 (IMXRT_FLEXPWM4.SM[0].DISMAP0)
  4478. #define FLEXPWM4_SM0DISMAP1 (IMXRT_FLEXPWM4.SM[0].DISMAP1)
  4479. #define FLEXPWM4_SM0DTCNT0 (IMXRT_FLEXPWM4.SM[0].DTCNT0)
  4480. #define FLEXPWM4_SM0DTCNT1 (IMXRT_FLEXPWM4.SM[0].DTCNT1)
  4481. #define FLEXPWM4_SM0CAPTCTRLA (IMXRT_FLEXPWM4.SM[0].CAPTCTRLA)
  4482. #define FLEXPWM4_SM0CAPTCOMPA (IMXRT_FLEXPWM4.SM[0].CAPTCOMPA)
  4483. #define FLEXPWM4_SM0CAPTCTRLB (IMXRT_FLEXPWM4.SM[0].CAPTCTRLB)
  4484. #define FLEXPWM4_SM0CAPTCOMPB (IMXRT_FLEXPWM4.SM[0].CAPTCOMPB)
  4485. #define FLEXPWM4_SM0CAPTCTRLX (IMXRT_FLEXPWM4.SM[0].CAPTCTRLX)
  4486. #define FLEXPWM4_SM0CAPTCOMPX (IMXRT_FLEXPWM4.SM[0].CAPTCOMPX)
  4487. #define FLEXPWM4_SM0CVAL0 (IMXRT_FLEXPWM4.SM[0].CVAL0)
  4488. #define FLEXPWM4_SM0CVAL0CYC (IMXRT_FLEXPWM4.SM[0].CVAL0CYC)
  4489. #define FLEXPWM4_SM0CVAL1 (IMXRT_FLEXPWM4.SM[0].CVAL1)
  4490. #define FLEXPWM4_SM0CVAL1CYC (IMXRT_FLEXPWM4.SM[0].CVAL1CYC)
  4491. #define FLEXPWM4_SM0CVAL2 (IMXRT_FLEXPWM4.SM[0].CVAL2)
  4492. #define FLEXPWM4_SM0CVAL2CYC (IMXRT_FLEXPWM4.SM[0].CVAL2CYC)
  4493. #define FLEXPWM4_SM0CVAL3 (IMXRT_FLEXPWM4.SM[0].CVAL3)
  4494. #define FLEXPWM4_SM0CVAL3CYC (IMXRT_FLEXPWM4.SM[0].CVAL3CYC)
  4495. #define FLEXPWM4_SM0CVAL4 (IMXRT_FLEXPWM4.SM[0].CVAL4)
  4496. #define FLEXPWM4_SM0CVAL4CYC (IMXRT_FLEXPWM4.SM[0].CVAL4CYC)
  4497. #define FLEXPWM4_SM0CVAL5 (IMXRT_FLEXPWM4.SM[0].CVAL5)
  4498. #define FLEXPWM4_SM0CVAL5CYC (IMXRT_FLEXPWM4.SM[0].CVAL5CYC)
  4499. #define FLEXPWM4_SM1CNT (IMXRT_FLEXPWM4.SM[1].CNT)
  4500. #define FLEXPWM4_SM1INIT (IMXRT_FLEXPWM4.SM[1].INIT)
  4501. #define FLEXPWM4_SM1CTRL2 (IMXRT_FLEXPWM4.SM[1].CTRL2)
  4502. #define FLEXPWM4_SM1CTRL (IMXRT_FLEXPWM4.SM[1].CTRL)
  4503. #define FLEXPWM4_SM1VAL0 (IMXRT_FLEXPWM4.SM[1].VAL0)
  4504. #define FLEXPWM4_SM1FRACVAL1 (IMXRT_FLEXPWM4.SM[1].FRACVAL1)
  4505. #define FLEXPWM4_SM1VAL1 (IMXRT_FLEXPWM4.SM[1].VAL1)
  4506. #define FLEXPWM4_SM1FRACVAL2 (IMXRT_FLEXPWM4.SM[1].FRACVAL2)
  4507. #define FLEXPWM4_SM1VAL2 (IMXRT_FLEXPWM4.SM[1].VAL2)
  4508. #define FLEXPWM4_SM1FRACVAL3 (IMXRT_FLEXPWM4.SM[1].FRACVAL3)
  4509. #define FLEXPWM4_SM1VAL3 (IMXRT_FLEXPWM4.SM[1].VAL3)
  4510. #define FLEXPWM4_SM1FRACVAL4 (IMXRT_FLEXPWM4.SM[1].FRACVAL4)
  4511. #define FLEXPWM4_SM1VAL4 (IMXRT_FLEXPWM4.SM[1].VAL4)
  4512. #define FLEXPWM4_SM1FRACVAL5 (IMXRT_FLEXPWM4.SM[1].FRACVAL5)
  4513. #define FLEXPWM4_SM1VAL5 (IMXRT_FLEXPWM4.SM[1].VAL5)
  4514. #define FLEXPWM4_SM1FRCTRL (IMXRT_FLEXPWM4.SM[1].FRCTRL)
  4515. #define FLEXPWM4_SM1OCTRL (IMXRT_FLEXPWM4.SM[1].OCTRL)
  4516. #define FLEXPWM4_SM1STS (IMXRT_FLEXPWM4.SM[1].STS)
  4517. #define FLEXPWM4_SM1INTEN (IMXRT_FLEXPWM4.SM[1].INTEN)
  4518. #define FLEXPWM4_SM1DMAEN (IMXRT_FLEXPWM4.SM[1].DMAEN)
  4519. #define FLEXPWM4_SM1TCTRL (IMXRT_FLEXPWM4.SM[1].TCTRL)
  4520. #define FLEXPWM4_SM1DISMAP0 (IMXRT_FLEXPWM4.SM[1].DISMAP0)
  4521. #define FLEXPWM4_SM1DISMAP1 (IMXRT_FLEXPWM4.SM[1].DISMAP1)
  4522. #define FLEXPWM4_SM1DTCNT0 (IMXRT_FLEXPWM4.SM[1].DTCNT0)
  4523. #define FLEXPWM4_SM1DTCNT1 (IMXRT_FLEXPWM4.SM[1].DTCNT1)
  4524. #define FLEXPWM4_SM1CAPTCTRLA (IMXRT_FLEXPWM4.SM[1].CAPTCTRLA)
  4525. #define FLEXPWM4_SM1CAPTCOMPA (IMXRT_FLEXPWM4.SM[1].CAPTCOMPA)
  4526. #define FLEXPWM4_SM1CAPTCTRLB (IMXRT_FLEXPWM4.SM[1].CAPTCTRLB)
  4527. #define FLEXPWM4_SM1CAPTCOMPB (IMXRT_FLEXPWM4.SM[1].CAPTCOMPB)
  4528. #define FLEXPWM4_SM1CAPTCTRLX (IMXRT_FLEXPWM4.SM[1].CAPTCTRLX)
  4529. #define FLEXPWM4_SM1CAPTCOMPX (IMXRT_FLEXPWM4.SM[1].CAPTCOMPX)
  4530. #define FLEXPWM4_SM1CVAL0 (IMXRT_FLEXPWM4.SM[1].CVAL0)
  4531. #define FLEXPWM4_SM1CVAL0CYC (IMXRT_FLEXPWM4.SM[1].CVAL0CYC)
  4532. #define FLEXPWM4_SM1CVAL1 (IMXRT_FLEXPWM4.SM[1].CVAL1)
  4533. #define FLEXPWM4_SM1CVAL1CYC (IMXRT_FLEXPWM4.SM[1].CVAL1CYC)
  4534. #define FLEXPWM4_SM1CVAL2 (IMXRT_FLEXPWM4.SM[1].CVAL2)
  4535. #define FLEXPWM4_SM1CVAL2CYC (IMXRT_FLEXPWM4.SM[1].CVAL2CYC)
  4536. #define FLEXPWM4_SM1CVAL3 (IMXRT_FLEXPWM4.SM[1].CVAL3)
  4537. #define FLEXPWM4_SM1CVAL3CYC (IMXRT_FLEXPWM4.SM[1].CVAL3CYC)
  4538. #define FLEXPWM4_SM1CVAL4 (IMXRT_FLEXPWM4.SM[1].CVAL4)
  4539. #define FLEXPWM4_SM1CVAL4CYC (IMXRT_FLEXPWM4.SM[1].CVAL4CYC)
  4540. #define FLEXPWM4_SM1CVAL5 (IMXRT_FLEXPWM4.SM[1].CVAL5)
  4541. #define FLEXPWM4_SM1CVAL5CYC (IMXRT_FLEXPWM4.SM[1].CVAL5CYC)
  4542. #define FLEXPWM4_SM2CNT (IMXRT_FLEXPWM4.SM[2].CNT)
  4543. #define FLEXPWM4_SM2INIT (IMXRT_FLEXPWM4.SM[2].INIT)
  4544. #define FLEXPWM4_SM2CTRL2 (IMXRT_FLEXPWM4.SM[2].CTRL2)
  4545. #define FLEXPWM4_SM2CTRL (IMXRT_FLEXPWM4.SM[2].CTRL)
  4546. #define FLEXPWM4_SM2VAL0 (IMXRT_FLEXPWM4.SM[2].VAL0)
  4547. #define FLEXPWM4_SM2FRACVAL1 (IMXRT_FLEXPWM4.SM[2].FRACVAL1)
  4548. #define FLEXPWM4_SM2VAL1 (IMXRT_FLEXPWM4.SM[2].VAL1)
  4549. #define FLEXPWM4_SM2FRACVAL2 (IMXRT_FLEXPWM4.SM[2].FRACVAL2)
  4550. #define FLEXPWM4_SM2VAL2 (IMXRT_FLEXPWM4.SM[2].VAL2)
  4551. #define FLEXPWM4_SM2FRACVAL3 (IMXRT_FLEXPWM4.SM[2].FRACVAL3)
  4552. #define FLEXPWM4_SM2VAL3 (IMXRT_FLEXPWM4.SM[2].VAL3)
  4553. #define FLEXPWM4_SM2FRACVAL4 (IMXRT_FLEXPWM4.SM[2].FRACVAL4)
  4554. #define FLEXPWM4_SM2VAL4 (IMXRT_FLEXPWM4.SM[2].VAL4)
  4555. #define FLEXPWM4_SM2FRACVAL5 (IMXRT_FLEXPWM4.SM[2].FRACVAL5)
  4556. #define FLEXPWM4_SM2VAL5 (IMXRT_FLEXPWM4.SM[2].VAL5)
  4557. #define FLEXPWM4_SM2FRCTRL (IMXRT_FLEXPWM4.SM[2].FRCTRL)
  4558. #define FLEXPWM4_SM2OCTRL (IMXRT_FLEXPWM4.SM[2].OCTRL)
  4559. #define FLEXPWM4_SM2STS (IMXRT_FLEXPWM4.SM[2].STS)
  4560. #define FLEXPWM4_SM2INTEN (IMXRT_FLEXPWM4.SM[2].INTEN)
  4561. #define FLEXPWM4_SM2DMAEN (IMXRT_FLEXPWM4.SM[2].DMAEN)
  4562. #define FLEXPWM4_SM2TCTRL (IMXRT_FLEXPWM4.SM[2].TCTRL)
  4563. #define FLEXPWM4_SM2DISMAP0 (IMXRT_FLEXPWM4.SM[2].DISMAP0)
  4564. #define FLEXPWM4_SM2DISMAP1 (IMXRT_FLEXPWM4.SM[2].DISMAP1)
  4565. #define FLEXPWM4_SM2DTCNT0 (IMXRT_FLEXPWM4.SM[2].DTCNT0)
  4566. #define FLEXPWM4_SM2DTCNT1 (IMXRT_FLEXPWM4.SM[2].DTCNT1)
  4567. #define FLEXPWM4_SM2CAPTCTRLA (IMXRT_FLEXPWM4.SM[2].CAPTCTRLA)
  4568. #define FLEXPWM4_SM2CAPTCOMPA (IMXRT_FLEXPWM4.SM[2].CAPTCOMPA)
  4569. #define FLEXPWM4_SM2CAPTCTRLB (IMXRT_FLEXPWM4.SM[2].CAPTCTRLB)
  4570. #define FLEXPWM4_SM2CAPTCOMPB (IMXRT_FLEXPWM4.SM[2].CAPTCOMPB)
  4571. #define FLEXPWM4_SM2CAPTCTRLX (IMXRT_FLEXPWM4.SM[2].CAPTCTRLX)
  4572. #define FLEXPWM4_SM2CAPTCOMPX (IMXRT_FLEXPWM4.SM[2].CAPTCOMPX)
  4573. #define FLEXPWM4_SM2CVAL0 (IMXRT_FLEXPWM4.SM[2].CVAL0)
  4574. #define FLEXPWM4_SM2CVAL0CYC (IMXRT_FLEXPWM4.SM[2].CVAL0CYC)
  4575. #define FLEXPWM4_SM2CVAL1 (IMXRT_FLEXPWM4.SM[2].CVAL1)
  4576. #define FLEXPWM4_SM2CVAL1CYC (IMXRT_FLEXPWM4.SM[2].CVAL1CYC)
  4577. #define FLEXPWM4_SM2CVAL2 (IMXRT_FLEXPWM4.SM[2].CVAL2)
  4578. #define FLEXPWM4_SM2CVAL2CYC (IMXRT_FLEXPWM4.SM[2].CVAL2CYC)
  4579. #define FLEXPWM4_SM2CVAL3 (IMXRT_FLEXPWM4.SM[2].CVAL3)
  4580. #define FLEXPWM4_SM2CVAL3CYC (IMXRT_FLEXPWM4.SM[2].CVAL3CYC)
  4581. #define FLEXPWM4_SM2CVAL4 (IMXRT_FLEXPWM4.SM[2].CVAL4)
  4582. #define FLEXPWM4_SM2CVAL4CYC (IMXRT_FLEXPWM4.SM[2].CVAL4CYC)
  4583. #define FLEXPWM4_SM2CVAL5 (IMXRT_FLEXPWM4.SM[2].CVAL5)
  4584. #define FLEXPWM4_SM2CVAL5CYC (IMXRT_FLEXPWM4.SM[2].CVAL5CYC)
  4585. #define FLEXPWM4_SM3CNT (IMXRT_FLEXPWM4.SM[3].CNT)
  4586. #define FLEXPWM4_SM3INIT (IMXRT_FLEXPWM4.SM[3].INIT)
  4587. #define FLEXPWM4_SM3CTRL2 (IMXRT_FLEXPWM4.SM[3].CTRL2)
  4588. #define FLEXPWM4_SM3CTRL (IMXRT_FLEXPWM4.SM[3].CTRL)
  4589. #define FLEXPWM4_SM3VAL0 (IMXRT_FLEXPWM4.SM[3].VAL0)
  4590. #define FLEXPWM4_SM3FRACVAL1 (IMXRT_FLEXPWM4.SM[3].FRACVAL1)
  4591. #define FLEXPWM4_SM3VAL1 (IMXRT_FLEXPWM4.SM[3].VAL1)
  4592. #define FLEXPWM4_SM3FRACVAL2 (IMXRT_FLEXPWM4.SM[3].FRACVAL2)
  4593. #define FLEXPWM4_SM3VAL2 (IMXRT_FLEXPWM4.SM[3].VAL2)
  4594. #define FLEXPWM4_SM3FRACVAL3 (IMXRT_FLEXPWM4.SM[3].FRACVAL3)
  4595. #define FLEXPWM4_SM3VAL3 (IMXRT_FLEXPWM4.SM[3].VAL3)
  4596. #define FLEXPWM4_SM3FRACVAL4 (IMXRT_FLEXPWM4.SM[3].FRACVAL4)
  4597. #define FLEXPWM4_SM3VAL4 (IMXRT_FLEXPWM4.SM[3].VAL4)
  4598. #define FLEXPWM4_SM3FRACVAL5 (IMXRT_FLEXPWM4.SM[3].FRACVAL5)
  4599. #define FLEXPWM4_SM3VAL5 (IMXRT_FLEXPWM4.SM[3].VAL5)
  4600. #define FLEXPWM4_SM3FRCTRL (IMXRT_FLEXPWM4.SM[3].FRCTRL)
  4601. #define FLEXPWM4_SM3OCTRL (IMXRT_FLEXPWM4.SM[3].OCTRL)
  4602. #define FLEXPWM4_SM3STS (IMXRT_FLEXPWM4.SM[3].STS)
  4603. #define FLEXPWM4_SM3INTEN (IMXRT_FLEXPWM4.SM[3].INTEN)
  4604. #define FLEXPWM4_SM3DMAEN (IMXRT_FLEXPWM4.SM[3].DMAEN)
  4605. #define FLEXPWM4_SM3TCTRL (IMXRT_FLEXPWM4.SM[3].TCTRL)
  4606. #define FLEXPWM4_SM3DISMAP0 (IMXRT_FLEXPWM4.SM[3].DISMAP0)
  4607. #define FLEXPWM4_SM3DISMAP1 (IMXRT_FLEXPWM4.SM[3].DISMAP1)
  4608. #define FLEXPWM4_SM3DTCNT0 (IMXRT_FLEXPWM4.SM[3].DTCNT0)
  4609. #define FLEXPWM4_SM3DTCNT1 (IMXRT_FLEXPWM4.SM[3].DTCNT1)
  4610. #define FLEXPWM4_SM3CAPTCTRLA (IMXRT_FLEXPWM4.SM[3].CAPTCTRLA)
  4611. #define FLEXPWM4_SM3CAPTCOMPA (IMXRT_FLEXPWM4.SM[3].CAPTCOMPA)
  4612. #define FLEXPWM4_SM3CAPTCTRLB (IMXRT_FLEXPWM4.SM[3].CAPTCTRLB)
  4613. #define FLEXPWM4_SM3CAPTCOMPB (IMXRT_FLEXPWM4.SM[3].CAPTCOMPB)
  4614. #define FLEXPWM4_SM3CAPTCTRLX (IMXRT_FLEXPWM4.SM[3].CAPTCTRLX)
  4615. #define FLEXPWM4_SM3CAPTCOMPX (IMXRT_FLEXPWM4.SM[3].CAPTCOMPX)
  4616. #define FLEXPWM4_SM3CVAL0 (IMXRT_FLEXPWM4.SM[3].CVAL0)
  4617. #define FLEXPWM4_SM3CVAL0CYC (IMXRT_FLEXPWM4.SM[3].CVAL0CYC)
  4618. #define FLEXPWM4_SM3CVAL1 (IMXRT_FLEXPWM4.SM[3].CVAL1)
  4619. #define FLEXPWM4_SM3CVAL1CYC (IMXRT_FLEXPWM4.SM[3].CVAL1CYC)
  4620. #define FLEXPWM4_SM3CVAL2 (IMXRT_FLEXPWM4.SM[3].CVAL2)
  4621. #define FLEXPWM4_SM3CVAL2CYC (IMXRT_FLEXPWM4.SM[3].CVAL2CYC)
  4622. #define FLEXPWM4_SM3CVAL3 (IMXRT_FLEXPWM4.SM[3].CVAL3)
  4623. #define FLEXPWM4_SM3CVAL3CYC (IMXRT_FLEXPWM4.SM[3].CVAL3CYC)
  4624. #define FLEXPWM4_SM3CVAL4 (IMXRT_FLEXPWM4.SM[3].CVAL4)
  4625. #define FLEXPWM4_SM3CVAL4CYC (IMXRT_FLEXPWM4.SM[3].CVAL4CYC)
  4626. #define FLEXPWM4_SM3CVAL5 (IMXRT_FLEXPWM4.SM[3].CVAL5)
  4627. #define FLEXPWM4_SM3CVAL5CYC (IMXRT_FLEXPWM4.SM[3].CVAL5CYC)
  4628. #define FLEXPWM4_OUTEN (IMXRT_FLEXPWM4.OUTEN)
  4629. #define FLEXPWM4_MASK (IMXRT_FLEXPWM4.MASK)
  4630. #define FLEXPWM4_SWCOUT (IMXRT_FLEXPWM4.SWCOUT)
  4631. #define FLEXPWM4_DTSRCSEL (IMXRT_FLEXPWM4.DTSRCSEL)
  4632. #define FLEXPWM4_MCTRL (IMXRT_FLEXPWM4.MCTRL)
  4633. #define FLEXPWM4_MCTRL2 (IMXRT_FLEXPWM4.MCTRL2)
  4634. #define FLEXPWM4_FCTRL0 (IMXRT_FLEXPWM4.FCTRL0)
  4635. #define FLEXPWM4_FSTS0 (IMXRT_FLEXPWM4.FSTS0)
  4636. #define FLEXPWM4_FFILT0 (IMXRT_FLEXPWM4.FFILT0)
  4637. #define FLEXPWM4_FTST0 (IMXRT_FLEXPWM4.FTST0)
  4638. #define FLEXPWM4_FCTRL20 (IMXRT_FLEXPWM4.FCTRL20)
  4639. // page 3081
  4640. #define FLEXPWM_SMCTRL2_DBGEN ((uint16_t)(1<<15))
  4641. #define FLEXPWM_SMCTRL2_WAITEN ((uint16_t)(1<<14))
  4642. #define FLEXPWM_SMCTRL2_INDEP ((uint16_t)(1<<13))
  4643. #define FLEXPWM_SMCTRL2_PWM23_INIT ((uint16_t)(1<<12))
  4644. #define FLEXPWM_SMCTRL2_PWM45_INIT ((uint16_t)(1<<11))
  4645. #define FLEXPWM_SMCTRL2_PWMX_INIT ((uint16_t)(1<<10))
  4646. #define FLEXPWM_SMCTRL2_INIT_SEL(n) ((uint16_t)(((n) & 0x03) << 8))
  4647. #define FLEXPWM_SMCTRL2_FRCEN ((uint16_t)(1<<7))
  4648. #define FLEXPWM_SMCTRL2_FORCE ((uint16_t)(1<<6))
  4649. #define FLEXPWM_SMCTRL2_FORCE_SEL(n) ((uint16_t)(((n) & 0x07) << 3))
  4650. #define FLEXPWM_SMCTRL2_RELOAD_SEL ((uint16_t)(1<<2))
  4651. #define FLEXPWM_SMCTRL2_CLK_SEL(n) ((uint16_t)(((n) & 0x03) << 0))
  4652. #define FLEXPWM_SMCTRL_LDFQ(n) ((uint16_t)(((n) & 0x0F) << 12))
  4653. #define FLEXPWM_SMCTRL_HALF ((uint16_t)(1<<11))
  4654. #define FLEXPWM_SMCTRL_FULL ((uint16_t)(1<<10))
  4655. #define FLEXPWM_SMCTRL_DT(n) ((uint16_t)(((n) & 0x03) << 8))
  4656. #define FLEXPWM_SMCTRL_COMPMODE ((uint16_t)(1<<7))
  4657. #define FLEXPWM_SMCTRL_PRSC(n) ((uint16_t)(((n) & 0x0F) << 4))
  4658. #define FLEXPWM_SMCTRL_SPLIT ((uint16_t)(1<<3))
  4659. #define FLEXPWM_SMCTRL_LDMOD ((uint16_t)(1<<2))
  4660. #define FLEXPWM_SMCTRL_DBLX ((uint16_t)(1<<1))
  4661. #define FLEXPWM_SMCTRL_DBLEN ((uint16_t)(1<<0))
  4662. #define FLEXPWM_SMFRCTRL_TEST ((uint16_t)(1<<15))
  4663. #define FLEXPWM_SMFRCTRL_FRAC_PU ((uint16_t)(1<<8))
  4664. #define FLEXPWM_SMFRCTRL_FRAC45_EN ((uint16_t)(1<<4))
  4665. #define FLEXPWM_SMFRCTRL_FRAC23_EN ((uint16_t)(1<<2))
  4666. #define FLEXPWM_SMFRCTRL_FRAC1_EN ((uint16_t)(1<<1))
  4667. #define FLEXPWM_SMOCTRL_PWMA_IN ((uint16_t)(1<<15))
  4668. #define FLEXPWM_SMOCTRL_PWMB_IN ((uint16_t)(1<<14))
  4669. #define FLEXPWM_SMOCTRL_PWMX_IN ((uint16_t)(1<<13))
  4670. #define FLEXPWM_SMOCTRL_POLA ((uint16_t)(1<<10))
  4671. #define FLEXPWM_SMOCTRL_POLB ((uint16_t)(1<<9))
  4672. #define FLEXPWM_SMOCTRL_POLX ((uint16_t)(1<<8))
  4673. #define FLEXPWM_SMOCTRL_PWMAFS(n) ((uint16_t)(((n) & 0x03) << 4))
  4674. #define FLEXPWM_SMOCTRL_PWMBFS(n) ((uint16_t)(((n) & 0x03) << 2))
  4675. #define FLEXPWM_SMOCTRL_PWMXFS(n) ((uint16_t)(((n) & 0x03) << 0))
  4676. #define FLEXPWM_SMSTS_RUF ((uint16_t)(1<<14))
  4677. #define FLEXPWM_SMSTS_REF ((uint16_t)(1<<13))
  4678. #define FLEXPWM_SMSTS_RF ((uint16_t)(1<<12))
  4679. #define FLEXPWM_SMSTS_CFA1 ((uint16_t)(1<<11))
  4680. #define FLEXPWM_SMSTS_CFA0 ((uint16_t)(1<<10))
  4681. #define FLEXPWM_SMSTS_CFB1 ((uint16_t)(1<<9))
  4682. #define FLEXPWM_SMSTS_CFB0 ((uint16_t)(1<<8))
  4683. #define FLEXPWM_SMSTS_CFX1 ((uint16_t)(1<<7))
  4684. #define FLEXPWM_SMSTS_CFX0 ((uint16_t)(1<<6))
  4685. #define FLEXPWM_SMSTS_CMPF(n) ((uint16_t)(((n) & 0x3F) << 0))
  4686. #define FLEXPWM_SMINTEN_REIE ((uint16_t)(1<<13))
  4687. #define FLEXPWM_SMINTEN_RIE ((uint16_t)(1<<12))
  4688. #define FLEXPWM_SMINTEN_CA1IE ((uint16_t)(1<<11))
  4689. #define FLEXPWM_SMINTEN_CA0IE ((uint16_t)(1<<10))
  4690. #define FLEXPWM_SMINTEN_CB1IE ((uint16_t)(1<<9))
  4691. #define FLEXPWM_SMINTEN_CB0IE ((uint16_t)(1<<8))
  4692. #define FLEXPWM_SMINTEN_CX1IE ((uint16_t)(1<<7))
  4693. #define FLEXPWM_SMINTEN_CX0IE ((uint16_t)(1<<6))
  4694. #define FLEXPWM_SMINTEN_CMPIE(n) ((uint16_t)(((n) & 0x3F) << 0))
  4695. #define FLEXPWM_SMDMAEN_VALDE ((uint16_t)(1<<9))
  4696. #define FLEXPWM_SMDMAEN_FAND ((uint16_t)(1<<8))
  4697. #define FLEXPWM_SMDMAEN_CAPTDE(n) ((uint16_t)(((n) & 0x03) << 6))
  4698. #define FLEXPWM_SMDMAEN_CA1DE ((uint16_t)(1<<5))
  4699. #define FLEXPWM_SMDMAEN_CA0DE ((uint16_t)(1<<4))
  4700. #define FLEXPWM_SMDMAEN_CB1DE ((uint16_t)(1<<3))
  4701. #define FLEXPWM_SMDMAEN_CB0DE ((uint16_t)(1<<2))
  4702. #define FLEXPWM_SMDMAEN_CX1DE ((uint16_t)(1<<1))
  4703. #define FLEXPWM_SMDMAEN_CX0DE ((uint16_t)(1<<0))
  4704. #define FLEXPWM_SMTCTRL_PWAOT0 ((uint16_t)(1<<15))
  4705. #define FLEXPWM_SMTCTRL_PWBOT1 ((uint16_t)(1<<14))
  4706. #define FLEXPWM_SMTCTRL_TRGFRQ ((uint16_t)(1<<12))
  4707. #define FLEXPWM_SMTCTRL_OUT_TRIG_EN(n) ((uint16_t)(((n) & 0x3F) << 0))
  4708. #define FLEXPWM_SMDISMAP0_DIS0X(n) ((uint16_t)(((n) & 0x0F) << 8))
  4709. #define FLEXPWM_SMDISMAP0_DIS0B(n) ((uint16_t)(((n) & 0x0F) << 4))
  4710. #define FLEXPWM_SMDISMAP0_DIS0A(n) ((uint16_t)(((n) & 0x0F) << 0))
  4711. #define FLEXPWM_SMDISMAP1_DIS1X(n) ((uint16_t)(((n) & 0x0F) << 8))
  4712. #define FLEXPWM_SMDISMAP1_DIS1B(n) ((uint16_t)(((n) & 0x0F) << 4))
  4713. #define FLEXPWM_SMDISMAP1_DIS1A(n) ((uint16_t)(((n) & 0x0F) << 0))
  4714. #define FLEXPWM_SMCAPTCTRLA_CA1CNT(n) ((uint16_t)(((n) & 0x07) << 13))
  4715. #define FLEXPWM_SMCAPTCTRLA_CA0CNT(n) ((uint16_t)(((n) & 0x07) << 10))
  4716. #define FLEXPWM_SMCAPTCTRLA_CFAWM(n) ((uint16_t)(((n) & 0x03) << 8))
  4717. #define FLEXPWM_SMCAPTCTRLA_EDGCNTA_EN ((uint16_t)(1<<7))
  4718. #define FLEXPWM_SMCAPTCTRLA_INP_SELA ((uint16_t)(1<<6))
  4719. #define FLEXPWM_SMCAPTCTRLA_EDGA1(n) ((uint16_t)(((n) & 0x03) << 4))
  4720. #define FLEXPWM_SMCAPTCTRLA_EDGA0(n) ((uint16_t)(((n) & 0x03) << 2))
  4721. #define FLEXPWM_SMCAPTCTRLA_ONESHOTA ((uint16_t)(1<<1))
  4722. #define FLEXPWM_SMCAPTCTRLA_ARMA ((uint16_t)(1<<0))
  4723. #define FLEXPWM_SMCAPTCOMPA_EDGCNTA(n) ((uint16_t)(((n) & 0xFF) << 8))
  4724. #define FLEXPWM_SMCAPTCOMPA_EDGCMPA(n) ((uint16_t)(((n) & 0xFF) << 0))
  4725. #define FLEXPWM_SMCAPTCTRLB_CB1CNT(n) ((uint16_t)(((n) & 0x07) << 13))
  4726. #define FLEXPWM_SMCAPTCTRLB_CB0CNT(n) ((uint16_t)(((n) & 0x07) << 10))
  4727. #define FLEXPWM_SMCAPTCTRLB_CFBWM(n) ((uint16_t)(((n) & 0x03) << 8))
  4728. #define FLEXPWM_SMCAPTCTRLB_EDGCNTB_EN ((uint16_t)(1<<7))
  4729. #define FLEXPWM_SMCAPTCTRLB_INP_SELB ((uint16_t)(1<<6))
  4730. #define FLEXPWM_SMCAPTCTRLB_EDGB1(n) ((uint16_t)(((n) & 0x03) << 4))
  4731. #define FLEXPWM_SMCAPTCTRLB_EDGB0(n) ((uint16_t)(((n) & 0x03) << 2))
  4732. #define FLEXPWM_SMCAPTCTRLB_ONESHOTB ((uint16_t)(1<<1))
  4733. #define FLEXPWM_SMCAPTCTRLB_ARMB ((uint16_t)(1<<0))
  4734. #define FLEXPWM_SMCAPTCOMPB_EDGCNTB(n) ((uint16_t)(((n) & 0xFF) << 8))
  4735. #define FLEXPWM_SMCAPTCOMPB_EDGCMPB(n) ((uint16_t)(((n) & 0xFF) << 0))
  4736. #define FLEXPWM_SMCAPTCTRLX_CX1CNT(n) ((uint16_t)(((n) & 0x07) << 13))
  4737. #define FLEXPWM_SMCAPTCTRLX_CX0CNT(n) ((uint16_t)(((n) & 0x07) << 10))
  4738. #define FLEXPWM_SMCAPTCTRLX_CFXWM(n) ((uint16_t)(((n) & 0x03) << 8))
  4739. #define FLEXPWM_SMCAPTCTRLX_EDGCNTX_EN ((uint16_t)(1<<7))
  4740. #define FLEXPWM_SMCAPTCTRLX_INP_SELX ((uint16_t)(1<<6))
  4741. #define FLEXPWM_SMCAPTCTRLX_EDGX1(n) ((uint16_t)(((n) & 0x03) << 4))
  4742. #define FLEXPWM_SMCAPTCTRLX_EDGX0(n) ((uint16_t)(((n) & 0x03) << 2))
  4743. #define FLEXPWM_SMCAPTCTRLX_ONESHOTX ((uint16_t)(1<<1))
  4744. #define FLEXPWM_SMCAPTCTRLX_ARMX ((uint16_t)(1<<0))
  4745. #define FLEXPWM_SMCAPTCOMPX_EDGCNTX(n) ((uint16_t)(((n) & 0xFF) << 8))
  4746. #define FLEXPWM_SMCAPTCOMPX_EDGCMPX(n) ((uint16_t)(((n) & 0xFF) << 0))
  4747. #define FLEXPWM_OUTEN_PWMA_EN(n) ((uint16_t)(((n) & 0x0F) << 8))
  4748. #define FLEXPWM_OUTEN_PWMB_EN(n) ((uint16_t)(((n) & 0x0F) << 4))
  4749. #define FLEXPWM_OUTEN_PWMX_EN(n) ((uint16_t)(((n) & 0x0F) << 0))
  4750. #define FLEXPWM_MASK_UPDATE_MASK(n) ((uint16_t)(((n) & 0x0F) << 12))
  4751. #define FLEXPWM_MASK_MASKA(n) ((uint16_t)(((n) & 0x0F) << 8))
  4752. #define FLEXPWM_MASK_MASKB(n) ((uint16_t)(((n) & 0x0F) << 4))
  4753. #define FLEXPWM_MASK_MASKX(n) ((uint16_t)(((n) & 0x0F) << 0))
  4754. #define FLEXPWM_SWCOUT_SM3OUT23 ((uint16_t)(1<<7))
  4755. #define FLEXPWM_SWCOUT_SM3OUT45 ((uint16_t)(1<<6))
  4756. #define FLEXPWM_SWCOUT_SM2OUT23 ((uint16_t)(1<<5))
  4757. #define FLEXPWM_SWCOUT_SM2OUT45 ((uint16_t)(1<<4))
  4758. #define FLEXPWM_SWCOUT_SM1OUT23 ((uint16_t)(1<<3))
  4759. #define FLEXPWM_SWCOUT_SM1OUT45 ((uint16_t)(1<<2))
  4760. #define FLEXPWM_SWCOUT_SM0OUT23 ((uint16_t)(1<<1))
  4761. #define FLEXPWM_SWCOUT_SM0OUT45 ((uint16_t)(1<<0))
  4762. #define FLEXPWM_DTSRCSEL_SM3SEL23(n) ((uint16_t)(((n) & 0x03) << 14))
  4763. #define FLEXPWM_DTSRCSEL_SM3SEL45(n) ((uint16_t)(((n) & 0x03) << 12))
  4764. #define FLEXPWM_DTSRCSEL_SM2SEL23(n) ((uint16_t)(((n) & 0x03) << 10))
  4765. #define FLEXPWM_DTSRCSEL_SM2SEL45(n) ((uint16_t)(((n) & 0x03) << 8))
  4766. #define FLEXPWM_DTSRCSEL_SM1SEL23(n) ((uint16_t)(((n) & 0x03) << 6))
  4767. #define FLEXPWM_DTSRCSEL_SM1SEL45(n) ((uint16_t)(((n) & 0x03) << 4))
  4768. #define FLEXPWM_DTSRCSEL_SM0SEL23(n) ((uint16_t)(((n) & 0x03) << 2))
  4769. #define FLEXPWM_DTSRCSEL_SM0SEL45(n) ((uint16_t)(((n) & 0x03) << 0))
  4770. #define FLEXPWM_MCTRL_IPOL(n) ((uint16_t)(((n) & 0x0F) << 12))
  4771. #define FLEXPWM_MCTRL_RUN(n) ((uint16_t)(((n) & 0x0F) << 8))
  4772. #define FLEXPWM_MCTRL_CLDOK(n) ((uint16_t)(((n) & 0x0F) << 4))
  4773. #define FLEXPWM_MCTRL_LDOK(n) ((uint16_t)(((n) & 0x0F) << 0))
  4774. #define FLEXPWM_MCTRL2_MONPLL(n) ((uint16_t)(((n) & 0x03) << 0))
  4775. #define FLEXPWM_FCTRL0_FLVL(n) ((uint16_t)(((n) & 0x0F) << 12))
  4776. #define FLEXPWM_FCTRL0_FAUTO(n) ((uint16_t)(((n) & 0x0F) << 8))
  4777. #define FLEXPWM_FCTRL0_FSAFE(n) ((uint16_t)(((n) & 0x0F) << 4))
  4778. #define FLEXPWM_FCTRL0_FIE(n) ((uint16_t)(((n) & 0x0F) << 0))
  4779. #define FLEXPWM_FSTS0_FHALF(n) ((uint16_t)(((n) & 0x0F) << 12))
  4780. #define FLEXPWM_FSTS0_FFPIN(n) ((uint16_t)(((n) & 0x0F) << 8))
  4781. #define FLEXPWM_FSTS0_FFULL(n) ((uint16_t)(((n) & 0x0F) << 4))
  4782. #define FLEXPWM_FSTS0_FFLAG(n) ((uint16_t)(((n) & 0x0F) << 0))
  4783. #define FLEXPWM_FFILT0_GSTR ((uint16_t)(1<<15))
  4784. #define FLEXPWM_FFILT0_FILT_CNT(n) ((uint16_t)(((n) & 0x07) << 8))
  4785. #define FLEXPWM_FFILT0_FILT_PER(n) ((uint16_t)(((n) & 0xFF) << 0))
  4786. #define FLEXPWM_FTST0_FTEST ((uint16_t)(1<<0))
  4787. #define FLEXPWM_FCTRL20_NOCOMB(n) ((uint16_t)(((n) & 0x0F) << 0))
  4788. // 31.4.1.1: page 1766
  4789. #define IMXRT_FLEXRAM (*(IMXRT_REGISTER32_t *)IMXRT_FLEXRAM_ADDRESS)
  4790. #define FLEXRAM_TCM_CTRL (IMXRT_FLEXRAM.offset000)
  4791. #define FLEXRAM_INT_STATUS (IMXRT_FLEXRAM.offset010)
  4792. #define FLEXRAM_INT_STAT_EN (IMXRT_FLEXRAM.offset014)
  4793. #define FLEXRAM_INT_SIG_EN (IMXRT_FLEXRAM.offset018)
  4794. #define FLEXRAM_TCM_CTRL_FORCE_CLK_ON ((uint32_t)(1<<2))
  4795. #define FLEXRAM_TCM_CTRL_TCM_RWAIT_EN ((uint32_t)(1<<1))
  4796. #define FLEXRAM_TCM_CTRL_TCM_WWAIT_EN ((uint32_t)(1<<0))
  4797. #define FLEXRAM_INT_STATUS_OCRAM_ERR_STATUS ((uint32_t)(1<<5))
  4798. #define FLEXRAM_INT_STATUS_DTCM_ERR_STATUS ((uint32_t)(1<<4))
  4799. #define FLEXRAM_INT_STATUS_ITCM_ERR_STATUS ((uint32_t)(1<<3))
  4800. #define FLEXRAM_INT_STAT_EN_OCRAM_ERR_STAT_EN ((uint32_t)(1<<5))
  4801. #define FLEXRAM_INT_STAT_EN_DTCM_ERR_STAT_EN ((uint32_t)(1<<4))
  4802. #define FLEXRAM_INT_STAT_EN_ITCM_ERR_STAT_EN ((uint32_t)(1<<3))
  4803. #define FLEXRAM_INT_SIG_EN_OCRAM_ERR_SIG_EN ((uint32_t)(1<<5))
  4804. #define FLEXRAM_INT_SIG_EN_DTCM_ERR_SIG_EN ((uint32_t)(1<<4))
  4805. #define FLEXRAM_INT_SIG_EN_ITCM_ERR_SIG_EN ((uint32_t)(1<<3))
  4806. // 27.7.2.1: page 1695
  4807. #define IMXRT_FLEXSPI (*(IMXRT_REGISTER32_t *)IMXRT_FLEXSPI_ADDRESS)
  4808. #define FLEXSPI_MCR0 (IMXRT_FLEXSPI.offset000)
  4809. #define FLEXSPI_MCR0_AHBGRANTWAIT(n) ((uint32_t)(((n) & 0xFF) << 24))
  4810. #define FLEXSPI_MCR0_AHBGRANTWAIT_MASK ((uint32_t)(0xFF << 24))
  4811. #define FLEXSPI_MCR0_IPGRANTWAIT(n) ((uint32_t)(((n) & 0xFF) << 16))
  4812. #define FLEXSPI_MCR0_IPGRANTWAIT_MASK ((uint32_t)(0xFF << 16))
  4813. #define FLEXSPI_MCR0_SCKFREERUNEN ((uint32_t)(1<<14))
  4814. #define FLEXSPI_MCR0_COMBINATIONEN ((uint32_t)(1<<13))
  4815. #define FLEXSPI_MCR0_DOZEEN ((uint32_t)(1<<12))
  4816. #define FLEXSPI_MCR0_HSEN ((uint32_t)(1<<11))
  4817. #define FLEXSPI_MCR0_ATDFEN ((uint32_t)(1<<7))
  4818. #define FLEXSPI_MCR0_ARDFEN ((uint32_t)(1<<6))
  4819. #define FLEXSPI_MCR0_RXCLKSRC(n) ((uint32_t)(((n) & 0x03) << 4))
  4820. #define FLEXSPI_MCR0_RXCLKSRC_MASK ((uint32_t)(0x03 << 4))
  4821. #define FLEXSPI_MCR0_MDIS ((uint32_t)(1<<1))
  4822. #define FLEXSPI_MCR0_SWRESET ((uint32_t)(1<<0))
  4823. #define FLEXSPI_MCR1 (IMXRT_FLEXSPI.offset004)
  4824. #define FLEXSPI_MCR1_SEQWAIT(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  4825. #define FLEXSPI_MCR1_AHBBUSWAIT(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  4826. #define FLEXSPI_MCR2 (IMXRT_FLEXSPI.offset008)
  4827. #define FLEXSPI_MCR2_RESUMEWAIT(n) ((uint32_t)(((n) & 0xFF) << 24))
  4828. #define FLEXSPI_MCR2_RESUMEWAIT_MASK ((uint32_t)(0xFF << 24))
  4829. #define FLEXSPI_MCR2_SCKBDIFFOPT ((uint32_t)(1<<19))
  4830. #define FLEXSPI_MCR2_SAMEDEVICEEN ((uint32_t)(1<<15))
  4831. #define FLEXSPI_MCR2_CLRLEARNPHASE ((uint32_t)(1<<14))
  4832. #define FLEXSPI_MCR2_CLRAHBBUFOPT ((uint32_t)(1<<11))
  4833. #define FLEXSPI_AHBCR (IMXRT_FLEXSPI.offset00C)
  4834. #define FLEXSPI_AHBCR_READADDROPT ((uint32_t)(1<<6))
  4835. #define FLEXSPI_AHBCR_PREFETCHEN ((uint32_t)(1<<5))
  4836. #define FLEXSPI_AHBCR_BUFFERABLEEN ((uint32_t)(1<<4))
  4837. #define FLEXSPI_AHBCR_CACHABLEEN ((uint32_t)(1<<3))
  4838. #define FLEXSPI_AHBCR_APAREN ((uint32_t)(1<<0))
  4839. #define FLEXSPI_INTEN (IMXRT_FLEXSPI.offset010)
  4840. #define FLEXSPI_INTEN_SEQTIMEOUTEN ((uint32_t)(1<<11))
  4841. #define FLEXSPI_INTEN_AHBBUSTIMEOUTEN ((uint32_t)(1<<10))
  4842. #define FLEXSPI_INTEN_SCKSTOPBYWREN ((uint32_t)(1<<9))
  4843. #define FLEXSPI_INTEN_SCKSTOPBYRDEN ((uint32_t)(1<<8))
  4844. #define FLEXSPI_INTEN_IPTXWEEN ((uint32_t)(1<<6))
  4845. #define FLEXSPI_INTEN_IPRXWAEN ((uint32_t)(1<<5))
  4846. #define FLEXSPI_INTEN_AHBCMDERREN ((uint32_t)(1<<4))
  4847. #define FLEXSPI_INTEN_IPCMDERREN ((uint32_t)(1<<3))
  4848. #define FLEXSPI_INTEN_AHBCMDGEEN ((uint32_t)(1<<2))
  4849. #define FLEXSPI_INTEN_IPCMDGEEN ((uint32_t)(1<<1))
  4850. #define FLEXSPI_INTEN_IPCMDDONEEN ((uint32_t)(1<<0))
  4851. #define FLEXSPI_INTR (IMXRT_FLEXSPI.offset014)
  4852. #define FLEXSPI_INTR_SEQTIMEOUT ((uint32_t)(1<<11))
  4853. #define FLEXSPI_INTR_AHBBUSTIMEOUT ((uint32_t)(1<<10))
  4854. #define FLEXSPI_INTR_SCKSTOPBYWR ((uint32_t)(1<<9))
  4855. #define FLEXSPI_INTR_SCKSTOPBYRD ((uint32_t)(1<<8))
  4856. #define FLEXSPI_INTR_IPTXWE ((uint32_t)(1<<6))
  4857. #define FLEXSPI_INTR_IPRXWA ((uint32_t)(1<<5))
  4858. #define FLEXSPI_INTR_AHBCMDERR ((uint32_t)(1<<4))
  4859. #define FLEXSPI_INTR_IPCMDERR ((uint32_t)(1<<3))
  4860. #define FLEXSPI_INTR_AHBCMDGE ((uint32_t)(1<<2))
  4861. #define FLEXSPI_INTR_IPCMDGE ((uint32_t)(1<<1))
  4862. #define FLEXSPI_INTR_IPCMDDONE ((uint32_t)(1<<0))
  4863. #define FLEXSPI_LUTKEY (IMXRT_FLEXSPI.offset018)
  4864. #define FLEXSPI_LUTKEY_VALUE ((uint32_t)0x5AF05AF0)
  4865. #define FLEXSPI_LUTCR (IMXRT_FLEXSPI.offset01C)
  4866. #define FLEXSPI_LUTCR_UNLOCK ((uint32_t)(1<<1))
  4867. #define FLEXSPI_LUTCR_LOCK ((uint32_t)(1<<0))
  4868. #define FLEXSPI_AHBRXBUF0CR0 (IMXRT_FLEXSPI.offset020)
  4869. #define FLEXSPI_AHBRXBUF1CR0 (IMXRT_FLEXSPI.offset024)
  4870. #define FLEXSPI_AHBRXBUF2CR0 (IMXRT_FLEXSPI.offset028)
  4871. #define FLEXSPI_AHBRXBUF3CR0 (IMXRT_FLEXSPI.offset02C)
  4872. #define FLEXSPI_AHBRXBUFCR0_PREFETCHEN ((uint32_t)(1<<31))
  4873. #define FLEXSPI_AHBRXBUFCR0_PRIORITY(n) ((uint32_t)(((n) & 0x03) << 24))
  4874. #define FLEXSPI_AHBRXBUFCR0_PRIORITY_MASK ((uint32_t)((0x03) << 24))
  4875. #define FLEXSPI_AHBRXBUFCR0_MSTRID(n) ((uint32_t)(((n) & 0x0F) << 16))
  4876. #define FLEXSPI_AHBRXBUFCR0_MSTRID_MASK ((uint32_t)((0x0F) << 16))
  4877. #define FLEXSPI_AHBRXBUFCR0_BUFSZ(n) ((uint32_t)(((n) & 0xFF) << 0))
  4878. #define FLEXSPI_AHBRXBUFCR0_BUFSZ_MASK ((uint32_t)((0xFF) << 0))
  4879. #define FLEXSPI_FLSHA1CR0 (IMXRT_FLEXSPI.offset060)
  4880. #define FLEXSPI_FLSHA2CR0 (IMXRT_FLEXSPI.offset064)
  4881. #define FLEXSPI_FLSHB1CR0 (IMXRT_FLEXSPI.offset068)
  4882. #define FLEXSPI_FLSHB2CR0 (IMXRT_FLEXSPI.offset06C)
  4883. #define FLEXSPI_FLSHCR0_FLSHSZ(n) ((uint32_t)(((n) & 0x7FFFFF) << 0))
  4884. #define FLEXSPI_FLSHCR0_FLSHSZ_MASK ((uint32_t)((0x7FFFFF) << 0))
  4885. #define FLEXSPI_FLSHA1CR1 (IMXRT_FLEXSPI.offset070)
  4886. #define FLEXSPI_FLSHA2CR1 (IMXRT_FLEXSPI.offset074)
  4887. #define FLEXSPI_FLSHB1CR1 (IMXRT_FLEXSPI.offset078)
  4888. #define FLEXSPI_FLSHB2CR1 (IMXRT_FLEXSPI.offset07C)
  4889. #define FLEXSPI_FLSHCR1_CSINTERVAL(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  4890. #define FLEXSPI_FLSHCR1_CSINTERVAL_MASK ((uint32_t)((0xFFFF) << 16))
  4891. #define FLEXSPI_FLSHCR1_CSINTERVALUNIT ((uint32_t)(1<<15))
  4892. #define FLEXSPI_FLSHCR1_CAS(n) ((uint32_t)(((n) & 0x0F) << 11))
  4893. #define FLEXSPI_FLSHCR1_WA ((uint32_t)(1<<10))
  4894. #define FLEXSPI_FLSHCR1_TCSH(n) ((uint32_t)(((n) & 0x1F) << 5))
  4895. #define FLEXSPI_FLSHCR1_TCSH_MASK ((uint32_t)((0x1F) << 5))
  4896. #define FLEXSPI_FLSHCR1_TCSS(n) ((uint32_t)(((n) & 0x1F) << 0))
  4897. #define FLEXSPI_FLSHCR1_TCSS_MASK ((uint32_t)((0x1F) << 0))
  4898. #define FLEXSPI_FLSHA1CR2 (IMXRT_FLEXSPI.offset080)
  4899. #define FLEXSPI_FLSHA2CR2 (IMXRT_FLEXSPI.offset084)
  4900. #define FLEXSPI_FLSHB1CR2 (IMXRT_FLEXSPI.offset088)
  4901. #define FLEXSPI_FLSHB2CR2 (IMXRT_FLEXSPI.offset08C)
  4902. #define FLEXSPI_FLSHCR2_CLRINSTRPTR ((uint32_t)(1<<31))
  4903. #define FLEXSPI_FLSHCR2_AWRWAITUNIT(n) ((uint32_t)(((n) & 0x07) << 28))
  4904. #define FLEXSPI_FLSHCR2_AWRWAIT(n) ((uint32_t)(((n) & 0xFFF) << 16))
  4905. #define FLEXSPI_FLSHCR2_AWRSEQNUM(n) ((uint32_t)(((n) & 0x07) << 13))
  4906. #define FLEXSPI_FLSHCR2_AWRSEQID(n) ((uint32_t)(((n) & 0x0F) << 8))
  4907. #define FLEXSPI_FLSHCR2_ARDSEQNUM(n) ((uint32_t)(((n) & 0x07) << 5))
  4908. #define FLEXSPI_FLSHCR2_ARDSEQID(n) ((uint32_t)(((n) & 0x0F) << 0))
  4909. #define FLEXSPI_FLSHCR4 (IMXRT_FLEXSPI.offset094)
  4910. #define FLEXSPI_FLSHCR4_WMENB ((uint32_t)(1<<3))
  4911. #define FLEXSPI_FLSHCR4_WMENA ((uint32_t)(1<<2))
  4912. #define FLEXSPI_FLSHCR4_WMOPT1 ((uint32_t)(1<<0))
  4913. #define FLEXSPI_IPCR0 (IMXRT_FLEXSPI.offset0A0)
  4914. #define FLEXSPI_IPCR0_SFAR(n) ((uint32_t)(n))
  4915. #define FLEXSPI_IPCR1 (IMXRT_FLEXSPI.offset0A4)
  4916. #define FLEXSPI_IPCR1_IPAREN ((uint32_t)(1<<31))
  4917. #define FLEXSPI_IPCR1_ISEQNUM(n) ((uint32_t)(((n) & 0x07) << 24))
  4918. #define FLEXSPI_IPCR1_ISEQID(n) ((uint32_t)(((n) & 0x0F) << 16))
  4919. #define FLEXSPI_IPCR1_IDATSZ(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  4920. #define FLEXSPI_IPCMD (IMXRT_FLEXSPI.offset0B0)
  4921. #define FLEXSPI_IPCMD_TRG ((uint32_t)(1<<0))
  4922. #define FLEXSPI_IPRXFCR (IMXRT_FLEXSPI.offset0B8)
  4923. #define FLEXSPI_IPRXFCR_RXWMRK(n) ((uint32_t)(((n) & 0x0F) << 2))
  4924. #define FLEXSPI_IPRXFCR_RXDMAEN ((uint32_t)(1<<1))
  4925. #define FLEXSPI_IPRXFCR_CLRIPRXF ((uint32_t)(1<<0))
  4926. #define FLEXSPI_IPTXFCR (IMXRT_FLEXSPI.offset0BC)
  4927. #define FLEXSPI_IPTXFCR_TXWMRK(n) ((uint32_t)(((n) & 0x0F) << 2))
  4928. #define FLEXSPI_IPTXFCR_TXDMAEN ((uint32_t)(1<<1))
  4929. #define FLEXSPI_IPTXFCR_CLRIPTXF ((uint32_t)(1<<0))
  4930. #define FLEXSPI_DLLACR (IMXRT_FLEXSPI.offset0C0)
  4931. #define FLEXSPI_DLLBCR (IMXRT_FLEXSPI.offset0C4)
  4932. #define FLEXSPI_DLLCR_OVRDVAL(n) ((uint32_t)(((n) & 0x3F) << 9))
  4933. #define FLEXSPI_DLLCR_OVRDEN ((uint32_t)(1<<8))
  4934. #define FLEXSPI_DLLCR_SLVDLYTARGET(n) ((uint32_t)(((n) & 0x0F) << 3))
  4935. #define FLEXSPI_DLLCR_DLLRESET ((uint32_t)(1<<1))
  4936. #define FLEXSPI_DLLCR_DLLEN ((uint32_t)(1<<0))
  4937. #define FLEXSPI_STS0 (IMXRT_FLEXSPI.offset0E0)
  4938. #define FLEXSPI_STS0_ARBCMDSRC(n) ((uint32_t)(((n) & 0x03) << 2))
  4939. #define FLEXSPI_STS0_ARBIDLE ((uint32_t)(1<<1))
  4940. #define FLEXSPI_STS0_SEQIDLE ((uint32_t)(1<<0))
  4941. #define FLEXSPI_STS1 (IMXRT_FLEXSPI.offset0E4)
  4942. #define FLEXSPI_STS1_IPCMDERRCODE(n) ((uint32_t)(((n) & 0x0F) << 24))
  4943. #define FLEXSPI_STS1_IPCMDERRID(n) ((uint32_t)(((n) & 0x0F) << 16))
  4944. #define FLEXSPI_STS1_AHBCMDERRCODE(n) ((uint32_t)(((n) & 0x0F) << 8))
  4945. #define FLEXSPI_STS1_AHBCMDERRID(n) ((uint32_t)(((n) & 0x0F) << 0))
  4946. #define FLEXSPI_STS2 (IMXRT_FLEXSPI.offset0E8)
  4947. #define FLEXSPI_STS2_BREFSEL(n) ((uint32_t)(((n) & 0x3F) << 24))
  4948. #define FLEXSPI_STS2_BSLVSEL(n) ((uint32_t)(((n) & 0x3F) << 18))
  4949. #define FLEXSPI_STS2_BREFLOCK ((uint32_t)(1<<17))
  4950. #define FLEXSPI_STS2_BSLVLOCK ((uint32_t)(1<<16))
  4951. #define FLEXSPI_STS2_AREFSEL(n) ((uint32_t)(((n) & 0x3F) << 8))
  4952. #define FLEXSPI_STS2_ASLVSEL(n) ((uint32_t)(((n) & 0x3F) << 2))
  4953. #define FLEXSPI_STS2_AREFLOCK ((uint32_t)(1<<1))
  4954. #define FLEXSPI_STS2_ASLVLOCK ((uint32_t)(1<<0))
  4955. #define FLEXSPI_AHBSPNDSTS (IMXRT_FLEXSPI.offset0EC)
  4956. #define FLEXSPI_AHBSPNDSTS_DATLFT(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  4957. #define FLEXSPI_AHBSPNDSTS_BUFID(n) ((uint32_t)(((n) & 0x7) << 1))
  4958. #define FLEXSPI_AHBSPNDSTS_ACTIVE ((uint32_t)(1<<0))
  4959. #define FLEXSPI_IPRXFSTS (IMXRT_FLEXSPI.offset0F0)
  4960. #define FLEXSPI_IPRXFSTS_RDCNTR(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  4961. #define FLEXSPI_IPRXFSTS_FILL(n) ((uint32_t)(((n) & 0xFF) << 0))
  4962. #define FLEXSPI_IPTXFSTS (IMXRT_FLEXSPI.offset0F4)
  4963. #define FLEXSPI_IPTXFSTS_WRCNTR(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  4964. #define FLEXSPI_IPTXFSTS_FILL(n) ((uint32_t)(((n) & 0xFF) << 0))
  4965. #define FLEXSPI_RFDR0 (IMXRT_FLEXSPI.offset100)
  4966. #define FLEXSPI_RFDR1 (IMXRT_FLEXSPI.offset104)
  4967. #define FLEXSPI_RFDR2 (IMXRT_FLEXSPI.offset108)
  4968. #define FLEXSPI_RFDR3 (IMXRT_FLEXSPI.offset10C)
  4969. #define FLEXSPI_RFDR4 (IMXRT_FLEXSPI.offset110)
  4970. #define FLEXSPI_RFDR5 (IMXRT_FLEXSPI.offset114)
  4971. #define FLEXSPI_RFDR6 (IMXRT_FLEXSPI.offset118)
  4972. #define FLEXSPI_RFDR7 (IMXRT_FLEXSPI.offset11C)
  4973. #define FLEXSPI_RFDR8 (IMXRT_FLEXSPI.offset120)
  4974. #define FLEXSPI_RFDR9 (IMXRT_FLEXSPI.offset124)
  4975. #define FLEXSPI_RFDR10 (IMXRT_FLEXSPI.offset128)
  4976. #define FLEXSPI_RFDR11 (IMXRT_FLEXSPI.offset12C)
  4977. #define FLEXSPI_RFDR12 (IMXRT_FLEXSPI.offset130)
  4978. #define FLEXSPI_RFDR13 (IMXRT_FLEXSPI.offset134)
  4979. #define FLEXSPI_RFDR14 (IMXRT_FLEXSPI.offset138)
  4980. #define FLEXSPI_RFDR15 (IMXRT_FLEXSPI.offset13C)
  4981. #define FLEXSPI_RFDR16 (IMXRT_FLEXSPI.offset140)
  4982. #define FLEXSPI_RFDR17 (IMXRT_FLEXSPI.offset144)
  4983. #define FLEXSPI_RFDR18 (IMXRT_FLEXSPI.offset148)
  4984. #define FLEXSPI_RFDR19 (IMXRT_FLEXSPI.offset14C)
  4985. #define FLEXSPI_RFDR20 (IMXRT_FLEXSPI.offset150)
  4986. #define FLEXSPI_RFDR21 (IMXRT_FLEXSPI.offset154)
  4987. #define FLEXSPI_RFDR22 (IMXRT_FLEXSPI.offset158)
  4988. #define FLEXSPI_RFDR23 (IMXRT_FLEXSPI.offset15C)
  4989. #define FLEXSPI_RFDR24 (IMXRT_FLEXSPI.offset160)
  4990. #define FLEXSPI_RFDR25 (IMXRT_FLEXSPI.offset164)
  4991. #define FLEXSPI_RFDR26 (IMXRT_FLEXSPI.offset168)
  4992. #define FLEXSPI_RFDR27 (IMXRT_FLEXSPI.offset16C)
  4993. #define FLEXSPI_RFDR28 (IMXRT_FLEXSPI.offset170)
  4994. #define FLEXSPI_RFDR29 (IMXRT_FLEXSPI.offset174)
  4995. #define FLEXSPI_RFDR30 (IMXRT_FLEXSPI.offset178)
  4996. #define FLEXSPI_RFDR31 (IMXRT_FLEXSPI.offset17C)
  4997. #define FLEXSPI_TFDR0 (IMXRT_FLEXSPI.offset180)
  4998. #define FLEXSPI_TFDR1 (IMXRT_FLEXSPI.offset184)
  4999. #define FLEXSPI_TFDR2 (IMXRT_FLEXSPI.offset188)
  5000. #define FLEXSPI_TFDR3 (IMXRT_FLEXSPI.offset18C)
  5001. #define FLEXSPI_TFDR4 (IMXRT_FLEXSPI.offset190)
  5002. #define FLEXSPI_TFDR5 (IMXRT_FLEXSPI.offset194)
  5003. #define FLEXSPI_TFDR6 (IMXRT_FLEXSPI.offset198)
  5004. #define FLEXSPI_TFDR7 (IMXRT_FLEXSPI.offset19C)
  5005. #define FLEXSPI_TFDR8 (IMXRT_FLEXSPI.offset1A0)
  5006. #define FLEXSPI_TFDR9 (IMXRT_FLEXSPI.offset1A4)
  5007. #define FLEXSPI_TFDR10 (IMXRT_FLEXSPI.offset1A8)
  5008. #define FLEXSPI_TFDR11 (IMXRT_FLEXSPI.offset1AC)
  5009. #define FLEXSPI_TFDR12 (IMXRT_FLEXSPI.offset1B0)
  5010. #define FLEXSPI_TFDR13 (IMXRT_FLEXSPI.offset1B4)
  5011. #define FLEXSPI_TFDR14 (IMXRT_FLEXSPI.offset1B8)
  5012. #define FLEXSPI_TFDR15 (IMXRT_FLEXSPI.offset1BC)
  5013. #define FLEXSPI_TFDR16 (IMXRT_FLEXSPI.offset1C0)
  5014. #define FLEXSPI_TFDR17 (IMXRT_FLEXSPI.offset1C4)
  5015. #define FLEXSPI_TFDR18 (IMXRT_FLEXSPI.offset1C8)
  5016. #define FLEXSPI_TFDR19 (IMXRT_FLEXSPI.offset1CC)
  5017. #define FLEXSPI_TFDR20 (IMXRT_FLEXSPI.offset1D0)
  5018. #define FLEXSPI_TFDR21 (IMXRT_FLEXSPI.offset1D4)
  5019. #define FLEXSPI_TFDR22 (IMXRT_FLEXSPI.offset1D8)
  5020. #define FLEXSPI_TFDR23 (IMXRT_FLEXSPI.offset1DC)
  5021. #define FLEXSPI_TFDR24 (IMXRT_FLEXSPI.offset1E0)
  5022. #define FLEXSPI_TFDR25 (IMXRT_FLEXSPI.offset1E4)
  5023. #define FLEXSPI_TFDR26 (IMXRT_FLEXSPI.offset1E8)
  5024. #define FLEXSPI_TFDR27 (IMXRT_FLEXSPI.offset1EC)
  5025. #define FLEXSPI_TFDR28 (IMXRT_FLEXSPI.offset1F0)
  5026. #define FLEXSPI_TFDR29 (IMXRT_FLEXSPI.offset1F4)
  5027. #define FLEXSPI_TFDR30 (IMXRT_FLEXSPI.offset1F8)
  5028. #define FLEXSPI_TFDR31 (IMXRT_FLEXSPI.offset1FC)
  5029. #define FLEXSPI_LUT0 (IMXRT_FLEXSPI.offset200)
  5030. #define FLEXSPI_LUT1 (IMXRT_FLEXSPI.offset204)
  5031. #define FLEXSPI_LUT2 (IMXRT_FLEXSPI.offset208)
  5032. #define FLEXSPI_LUT3 (IMXRT_FLEXSPI.offset20C)
  5033. #define FLEXSPI_LUT4 (IMXRT_FLEXSPI.offset210)
  5034. #define FLEXSPI_LUT5 (IMXRT_FLEXSPI.offset214)
  5035. #define FLEXSPI_LUT6 (IMXRT_FLEXSPI.offset218)
  5036. #define FLEXSPI_LUT7 (IMXRT_FLEXSPI.offset21C)
  5037. #define FLEXSPI_LUT8 (IMXRT_FLEXSPI.offset220)
  5038. #define FLEXSPI_LUT9 (IMXRT_FLEXSPI.offset224)
  5039. #define FLEXSPI_LUT10 (IMXRT_FLEXSPI.offset228)
  5040. #define FLEXSPI_LUT11 (IMXRT_FLEXSPI.offset22C)
  5041. #define FLEXSPI_LUT12 (IMXRT_FLEXSPI.offset230)
  5042. #define FLEXSPI_LUT13 (IMXRT_FLEXSPI.offset234)
  5043. #define FLEXSPI_LUT14 (IMXRT_FLEXSPI.offset238)
  5044. #define FLEXSPI_LUT15 (IMXRT_FLEXSPI.offset23C)
  5045. #define FLEXSPI_LUT16 (IMXRT_FLEXSPI.offset240)
  5046. #define FLEXSPI_LUT17 (IMXRT_FLEXSPI.offset244)
  5047. #define FLEXSPI_LUT18 (IMXRT_FLEXSPI.offset248)
  5048. #define FLEXSPI_LUT19 (IMXRT_FLEXSPI.offset24C)
  5049. #define FLEXSPI_LUT20 (IMXRT_FLEXSPI.offset250)
  5050. #define FLEXSPI_LUT21 (IMXRT_FLEXSPI.offset254)
  5051. #define FLEXSPI_LUT22 (IMXRT_FLEXSPI.offset258)
  5052. #define FLEXSPI_LUT23 (IMXRT_FLEXSPI.offset25C)
  5053. #define FLEXSPI_LUT24 (IMXRT_FLEXSPI.offset260)
  5054. #define FLEXSPI_LUT25 (IMXRT_FLEXSPI.offset264)
  5055. #define FLEXSPI_LUT26 (IMXRT_FLEXSPI.offset268)
  5056. #define FLEXSPI_LUT27 (IMXRT_FLEXSPI.offset26C)
  5057. #define FLEXSPI_LUT28 (IMXRT_FLEXSPI.offset270)
  5058. #define FLEXSPI_LUT29 (IMXRT_FLEXSPI.offset274)
  5059. #define FLEXSPI_LUT30 (IMXRT_FLEXSPI.offset278)
  5060. #define FLEXSPI_LUT31 (IMXRT_FLEXSPI.offset27C)
  5061. #define FLEXSPI_LUT32 (IMXRT_FLEXSPI.offset280)
  5062. #define FLEXSPI_LUT33 (IMXRT_FLEXSPI.offset284)
  5063. #define FLEXSPI_LUT34 (IMXRT_FLEXSPI.offset288)
  5064. #define FLEXSPI_LUT35 (IMXRT_FLEXSPI.offset28C)
  5065. #define FLEXSPI_LUT36 (IMXRT_FLEXSPI.offset290)
  5066. #define FLEXSPI_LUT37 (IMXRT_FLEXSPI.offset294)
  5067. #define FLEXSPI_LUT38 (IMXRT_FLEXSPI.offset298)
  5068. #define FLEXSPI_LUT39 (IMXRT_FLEXSPI.offset29C)
  5069. #define FLEXSPI_LUT40 (IMXRT_FLEXSPI.offset2A0)
  5070. #define FLEXSPI_LUT41 (IMXRT_FLEXSPI.offset2A4)
  5071. #define FLEXSPI_LUT42 (IMXRT_FLEXSPI.offset2A8)
  5072. #define FLEXSPI_LUT43 (IMXRT_FLEXSPI.offset2AC)
  5073. #define FLEXSPI_LUT44 (IMXRT_FLEXSPI.offset2B0)
  5074. #define FLEXSPI_LUT45 (IMXRT_FLEXSPI.offset2B4)
  5075. #define FLEXSPI_LUT46 (IMXRT_FLEXSPI.offset2B8)
  5076. #define FLEXSPI_LUT47 (IMXRT_FLEXSPI.offset2BC)
  5077. #define FLEXSPI_LUT48 (IMXRT_FLEXSPI.offset2C0)
  5078. #define FLEXSPI_LUT49 (IMXRT_FLEXSPI.offset2C4)
  5079. #define FLEXSPI_LUT50 (IMXRT_FLEXSPI.offset2C8)
  5080. #define FLEXSPI_LUT51 (IMXRT_FLEXSPI.offset2CC)
  5081. #define FLEXSPI_LUT52 (IMXRT_FLEXSPI.offset2D0)
  5082. #define FLEXSPI_LUT53 (IMXRT_FLEXSPI.offset2D4)
  5083. #define FLEXSPI_LUT54 (IMXRT_FLEXSPI.offset2D8)
  5084. #define FLEXSPI_LUT55 (IMXRT_FLEXSPI.offset2DC)
  5085. #define FLEXSPI_LUT56 (IMXRT_FLEXSPI.offset2E0)
  5086. #define FLEXSPI_LUT57 (IMXRT_FLEXSPI.offset2E4)
  5087. #define FLEXSPI_LUT58 (IMXRT_FLEXSPI.offset2E8)
  5088. #define FLEXSPI_LUT59 (IMXRT_FLEXSPI.offset2EC)
  5089. #define FLEXSPI_LUT60 (IMXRT_FLEXSPI.offset2F0)
  5090. #define FLEXSPI_LUT61 (IMXRT_FLEXSPI.offset2F4)
  5091. #define FLEXSPI_LUT62 (IMXRT_FLEXSPI.offset2F8)
  5092. #define FLEXSPI_LUT63 (IMXRT_FLEXSPI.offset2FC)
  5093. #define FLEXSPI_LUT_OPCODE1(n) ((uint32_t)(((n) & 0x3F) << 26))
  5094. #define FLEXSPI_LUT_NUM_PADS1(n) ((uint32_t)(((n) & 0x03) << 24))
  5095. #define FLEXSPI_LUT_OPERAND1(n) ((uint32_t)(((n) & 0xFF) << 16))
  5096. #define FLEXSPI_LUT_OPCODE0(n) ((uint32_t)(((n) & 0x3F) << 10))
  5097. #define FLEXSPI_LUT_NUM_PADS0(n) ((uint32_t)(((n) & 0x03) << 8))
  5098. #define FLEXSPI_LUT_OPERAND0(n) ((uint32_t)(((n) & 0xFF) << 0))
  5099. #define FLEXSPI_LUT_INSTRUCTION(opcode, pads, operand) ((uint32_t)(\
  5100. (((opcode) & 0x3F) << 10) | (((pads) & 0x03) << 8) | ((operand) & 0xFF)))
  5101. // 30.7.8: page 1637
  5102. #define FLEXSPI_LUT_OPCODE_CMD_SDR 0x01
  5103. #define FLEXSPI_LUT_OPCODE_CMD_DDR 0x21
  5104. #define FLEXSPI_LUT_OPCODE_RADDR_SDR 0x02
  5105. #define FLEXSPI_LUT_OPCODE_RADDR_DDR 0x22
  5106. #define FLEXSPI_LUT_OPCODE_CADDR_SDR 0x03
  5107. #define FLEXSPI_LUT_OPCODE_CADDR_DDR 0x23
  5108. #define FLEXSPI_LUT_OPCODE_MODE1_SDR 0x04
  5109. #define FLEXSPI_LUT_OPCODE_MODE1_DDR 0x24
  5110. #define FLEXSPI_LUT_OPCODE_MODE2_SDR 0x05
  5111. #define FLEXSPI_LUT_OPCODE_MODE2_DDR 0x25
  5112. #define FLEXSPI_LUT_OPCODE_MODE4_SDR 0x06
  5113. #define FLEXSPI_LUT_OPCODE_MODE4_DDR 0x26
  5114. #define FLEXSPI_LUT_OPCODE_MODE8_SDR 0x07
  5115. #define FLEXSPI_LUT_OPCODE_MODE8_DDR 0x27
  5116. #define FLEXSPI_LUT_OPCODE_WRITE_SDR 0x08
  5117. #define FLEXSPI_LUT_OPCODE_WRITE_DDR 0x28
  5118. #define FLEXSPI_LUT_OPCODE_READ_SDR 0x09
  5119. #define FLEXSPI_LUT_OPCODE_READ_DDR 0x29
  5120. #define FLEXSPI_LUT_OPCODE_LEARN_SDR 0x0A
  5121. #define FLEXSPI_LUT_OPCODE_LEARN_DDR 0x2A
  5122. #define FLEXSPI_LUT_OPCODE_DATSZ_SDR 0x0B
  5123. #define FLEXSPI_LUT_OPCODE_DATSZ_DDR 0x2B
  5124. #define FLEXSPI_LUT_OPCODE_DUMMY_SDR 0x0C
  5125. #define FLEXSPI_LUT_OPCODE_DUMMY_DDR 0x2C
  5126. #define FLEXSPI_LUT_OPCODE_DUMMY_RWDS_SDR 0x0D
  5127. #define FLEXSPI_LUT_OPCODE_DUMMY_RWDS_DDR 0x2D
  5128. #define FLEXSPI_LUT_OPCODE_JMP_ON_CS 0x1F
  5129. #define FLEXSPI_LUT_OPCODE_STOP 0x00
  5130. #define FLEXSPI_LUT_NUM_PADS_1 0x00
  5131. #define FLEXSPI_LUT_NUM_PADS_2 0x01
  5132. #define FLEXSPI_LUT_NUM_PADS_4 0x02
  5133. #define FLEXSPI_LUT_NUM_PADS_8 0x03
  5134. #define IMXRT_FLEXSPI2 (*(IMXRT_REGISTER32_t *)IMXRT_FLEXSPI2_ADDRESS)
  5135. #define FLEXSPI2_MCR0 (IMXRT_FLEXSPI2.offset000)
  5136. #define FLEXSPI2_MCR1 (IMXRT_FLEXSPI2.offset004)
  5137. #define FLEXSPI2_MCR2 (IMXRT_FLEXSPI2.offset008)
  5138. #define FLEXSPI2_AHBCR (IMXRT_FLEXSPI2.offset00C)
  5139. #define FLEXSPI2_INTEN (IMXRT_FLEXSPI2.offset010)
  5140. #define FLEXSPI2_INTR (IMXRT_FLEXSPI2.offset014)
  5141. #define FLEXSPI2_LUTKEY (IMXRT_FLEXSPI2.offset018)
  5142. #define FLEXSPI2_LUTCR (IMXRT_FLEXSPI2.offset01C)
  5143. #define FLEXSPI2_AHBRXBUF0CR0 (IMXRT_FLEXSPI2.offset020)
  5144. #define FLEXSPI2_AHBRXBUF1CR0 (IMXRT_FLEXSPI2.offset024)
  5145. #define FLEXSPI2_AHBRXBUF2CR0 (IMXRT_FLEXSPI2.offset028)
  5146. #define FLEXSPI2_AHBRXBUF3CR0 (IMXRT_FLEXSPI2.offset02C)
  5147. #define FLEXSPI2_FLSHA1CR0 (IMXRT_FLEXSPI2.offset060)
  5148. #define FLEXSPI2_FLSHA2CR0 (IMXRT_FLEXSPI2.offset064)
  5149. #define FLEXSPI2_FLSHB1CR0 (IMXRT_FLEXSPI2.offset068)
  5150. #define FLEXSPI2_FLSHB2CR0 (IMXRT_FLEXSPI2.offset06C)
  5151. #define FLEXSPI2_FLSHA1CR1 (IMXRT_FLEXSPI2.offset070)
  5152. #define FLEXSPI2_FLSHA2CR1 (IMXRT_FLEXSPI2.offset074)
  5153. #define FLEXSPI2_FLSHB1CR1 (IMXRT_FLEXSPI2.offset078)
  5154. #define FLEXSPI2_FLSHB2CR1 (IMXRT_FLEXSPI2.offset07C)
  5155. #define FLEXSPI2_FLSHA1CR2 (IMXRT_FLEXSPI2.offset080)
  5156. #define FLEXSPI2_FLSHA2CR2 (IMXRT_FLEXSPI2.offset084)
  5157. #define FLEXSPI2_FLSHB1CR2 (IMXRT_FLEXSPI2.offset088)
  5158. #define FLEXSPI2_FLSHB2CR2 (IMXRT_FLEXSPI2.offset08C)
  5159. #define FLEXSPI2_FLSHCR4 (IMXRT_FLEXSPI2.offset094)
  5160. #define FLEXSPI2_IPCR0 (IMXRT_FLEXSPI2.offset0A0)
  5161. #define FLEXSPI2_IPCR1 (IMXRT_FLEXSPI2.offset0A4)
  5162. #define FLEXSPI2_IPCMD (IMXRT_FLEXSPI2.offset0B0)
  5163. #define FLEXSPI2_IPRXFCR (IMXRT_FLEXSPI2.offset0B8)
  5164. #define FLEXSPI2_IPTXFCR (IMXRT_FLEXSPI2.offset0BC)
  5165. #define FLEXSPI2_DLLACR (IMXRT_FLEXSPI2.offset0C0)
  5166. #define FLEXSPI2_DLLBCR (IMXRT_FLEXSPI2.offset0C4)
  5167. #define FLEXSPI2_STS0 (IMXRT_FLEXSPI2.offset0E0)
  5168. #define FLEXSPI2_STS1 (IMXRT_FLEXSPI2.offset0E4)
  5169. #define FLEXSPI2_STS2 (IMXRT_FLEXSPI2.offset0E8)
  5170. #define FLEXSPI2_AHBSPNDSTS (IMXRT_FLEXSPI2.offset0EC)
  5171. #define FLEXSPI2_IPRXFSTS (IMXRT_FLEXSPI2.offset0F0)
  5172. #define FLEXSPI2_IPTXFSTS (IMXRT_FLEXSPI2.offset0F4)
  5173. #define FLEXSPI2_RFDR0 (IMXRT_FLEXSPI2.offset100)
  5174. #define FLEXSPI2_RFDR1 (IMXRT_FLEXSPI2.offset104)
  5175. #define FLEXSPI2_RFDR2 (IMXRT_FLEXSPI2.offset108)
  5176. #define FLEXSPI2_RFDR3 (IMXRT_FLEXSPI2.offset10C)
  5177. #define FLEXSPI2_RFDR4 (IMXRT_FLEXSPI2.offset110)
  5178. #define FLEXSPI2_RFDR5 (IMXRT_FLEXSPI2.offset114)
  5179. #define FLEXSPI2_RFDR6 (IMXRT_FLEXSPI2.offset118)
  5180. #define FLEXSPI2_RFDR7 (IMXRT_FLEXSPI2.offset11C)
  5181. #define FLEXSPI2_RFDR8 (IMXRT_FLEXSPI2.offset120)
  5182. #define FLEXSPI2_RFDR9 (IMXRT_FLEXSPI2.offset124)
  5183. #define FLEXSPI2_RFDR10 (IMXRT_FLEXSPI2.offset128)
  5184. #define FLEXSPI2_RFDR11 (IMXRT_FLEXSPI2.offset12C)
  5185. #define FLEXSPI2_RFDR12 (IMXRT_FLEXSPI2.offset130)
  5186. #define FLEXSPI2_RFDR13 (IMXRT_FLEXSPI2.offset134)
  5187. #define FLEXSPI2_RFDR14 (IMXRT_FLEXSPI2.offset138)
  5188. #define FLEXSPI2_RFDR15 (IMXRT_FLEXSPI2.offset13C)
  5189. #define FLEXSPI2_RFDR16 (IMXRT_FLEXSPI2.offset140)
  5190. #define FLEXSPI2_RFDR17 (IMXRT_FLEXSPI2.offset144)
  5191. #define FLEXSPI2_RFDR18 (IMXRT_FLEXSPI2.offset148)
  5192. #define FLEXSPI2_RFDR19 (IMXRT_FLEXSPI2.offset14C)
  5193. #define FLEXSPI2_RFDR20 (IMXRT_FLEXSPI2.offset150)
  5194. #define FLEXSPI2_RFDR21 (IMXRT_FLEXSPI2.offset154)
  5195. #define FLEXSPI2_RFDR22 (IMXRT_FLEXSPI2.offset158)
  5196. #define FLEXSPI2_RFDR23 (IMXRT_FLEXSPI2.offset15C)
  5197. #define FLEXSPI2_RFDR24 (IMXRT_FLEXSPI2.offset160)
  5198. #define FLEXSPI2_RFDR25 (IMXRT_FLEXSPI2.offset164)
  5199. #define FLEXSPI2_RFDR26 (IMXRT_FLEXSPI2.offset168)
  5200. #define FLEXSPI2_RFDR27 (IMXRT_FLEXSPI2.offset16C)
  5201. #define FLEXSPI2_RFDR28 (IMXRT_FLEXSPI2.offset170)
  5202. #define FLEXSPI2_RFDR29 (IMXRT_FLEXSPI2.offset174)
  5203. #define FLEXSPI2_RFDR30 (IMXRT_FLEXSPI2.offset178)
  5204. #define FLEXSPI2_RFDR31 (IMXRT_FLEXSPI2.offset17C)
  5205. #define FLEXSPI2_TFDR0 (IMXRT_FLEXSPI2.offset180)
  5206. #define FLEXSPI2_TFDR1 (IMXRT_FLEXSPI2.offset184)
  5207. #define FLEXSPI2_TFDR2 (IMXRT_FLEXSPI2.offset188)
  5208. #define FLEXSPI2_TFDR3 (IMXRT_FLEXSPI2.offset18C)
  5209. #define FLEXSPI2_TFDR4 (IMXRT_FLEXSPI2.offset190)
  5210. #define FLEXSPI2_TFDR5 (IMXRT_FLEXSPI2.offset194)
  5211. #define FLEXSPI2_TFDR6 (IMXRT_FLEXSPI2.offset198)
  5212. #define FLEXSPI2_TFDR7 (IMXRT_FLEXSPI2.offset19C)
  5213. #define FLEXSPI2_TFDR8 (IMXRT_FLEXSPI2.offset1A0)
  5214. #define FLEXSPI2_TFDR9 (IMXRT_FLEXSPI2.offset1A4)
  5215. #define FLEXSPI2_TFDR10 (IMXRT_FLEXSPI2.offset1A8)
  5216. #define FLEXSPI2_TFDR11 (IMXRT_FLEXSPI2.offset1AC)
  5217. #define FLEXSPI2_TFDR12 (IMXRT_FLEXSPI2.offset1B0)
  5218. #define FLEXSPI2_TFDR13 (IMXRT_FLEXSPI2.offset1B4)
  5219. #define FLEXSPI2_TFDR14 (IMXRT_FLEXSPI2.offset1B8)
  5220. #define FLEXSPI2_TFDR15 (IMXRT_FLEXSPI2.offset1BC)
  5221. #define FLEXSPI2_TFDR16 (IMXRT_FLEXSPI2.offset1C0)
  5222. #define FLEXSPI2_TFDR17 (IMXRT_FLEXSPI2.offset1C4)
  5223. #define FLEXSPI2_TFDR18 (IMXRT_FLEXSPI2.offset1C8)
  5224. #define FLEXSPI2_TFDR19 (IMXRT_FLEXSPI2.offset1CC)
  5225. #define FLEXSPI2_TFDR20 (IMXRT_FLEXSPI2.offset1D0)
  5226. #define FLEXSPI2_TFDR21 (IMXRT_FLEXSPI2.offset1D4)
  5227. #define FLEXSPI2_TFDR22 (IMXRT_FLEXSPI2.offset1D8)
  5228. #define FLEXSPI2_TFDR23 (IMXRT_FLEXSPI2.offset1DC)
  5229. #define FLEXSPI2_TFDR24 (IMXRT_FLEXSPI2.offset1E0)
  5230. #define FLEXSPI2_TFDR25 (IMXRT_FLEXSPI2.offset1E4)
  5231. #define FLEXSPI2_TFDR26 (IMXRT_FLEXSPI2.offset1E8)
  5232. #define FLEXSPI2_TFDR27 (IMXRT_FLEXSPI2.offset1EC)
  5233. #define FLEXSPI2_TFDR28 (IMXRT_FLEXSPI2.offset1F0)
  5234. #define FLEXSPI2_TFDR29 (IMXRT_FLEXSPI2.offset1F4)
  5235. #define FLEXSPI2_TFDR30 (IMXRT_FLEXSPI2.offset1F8)
  5236. #define FLEXSPI2_TFDR31 (IMXRT_FLEXSPI2.offset1FC)
  5237. #define FLEXSPI2_LUT0 (IMXRT_FLEXSPI2.offset200)
  5238. #define FLEXSPI2_LUT1 (IMXRT_FLEXSPI2.offset204)
  5239. #define FLEXSPI2_LUT2 (IMXRT_FLEXSPI2.offset208)
  5240. #define FLEXSPI2_LUT3 (IMXRT_FLEXSPI2.offset20C)
  5241. #define FLEXSPI2_LUT4 (IMXRT_FLEXSPI2.offset210)
  5242. #define FLEXSPI2_LUT5 (IMXRT_FLEXSPI2.offset214)
  5243. #define FLEXSPI2_LUT6 (IMXRT_FLEXSPI2.offset218)
  5244. #define FLEXSPI2_LUT7 (IMXRT_FLEXSPI2.offset21C)
  5245. #define FLEXSPI2_LUT8 (IMXRT_FLEXSPI2.offset220)
  5246. #define FLEXSPI2_LUT9 (IMXRT_FLEXSPI2.offset224)
  5247. #define FLEXSPI2_LUT10 (IMXRT_FLEXSPI2.offset228)
  5248. #define FLEXSPI2_LUT11 (IMXRT_FLEXSPI2.offset22C)
  5249. #define FLEXSPI2_LUT12 (IMXRT_FLEXSPI2.offset230)
  5250. #define FLEXSPI2_LUT13 (IMXRT_FLEXSPI2.offset234)
  5251. #define FLEXSPI2_LUT14 (IMXRT_FLEXSPI2.offset238)
  5252. #define FLEXSPI2_LUT15 (IMXRT_FLEXSPI2.offset23C)
  5253. #define FLEXSPI2_LUT16 (IMXRT_FLEXSPI2.offset240)
  5254. #define FLEXSPI2_LUT17 (IMXRT_FLEXSPI2.offset244)
  5255. #define FLEXSPI2_LUT18 (IMXRT_FLEXSPI2.offset248)
  5256. #define FLEXSPI2_LUT19 (IMXRT_FLEXSPI2.offset24C)
  5257. #define FLEXSPI2_LUT20 (IMXRT_FLEXSPI2.offset250)
  5258. #define FLEXSPI2_LUT21 (IMXRT_FLEXSPI2.offset254)
  5259. #define FLEXSPI2_LUT22 (IMXRT_FLEXSPI2.offset258)
  5260. #define FLEXSPI2_LUT23 (IMXRT_FLEXSPI2.offset25C)
  5261. #define FLEXSPI2_LUT24 (IMXRT_FLEXSPI2.offset260)
  5262. #define FLEXSPI2_LUT25 (IMXRT_FLEXSPI2.offset264)
  5263. #define FLEXSPI2_LUT26 (IMXRT_FLEXSPI2.offset268)
  5264. #define FLEXSPI2_LUT27 (IMXRT_FLEXSPI2.offset26C)
  5265. #define FLEXSPI2_LUT28 (IMXRT_FLEXSPI2.offset270)
  5266. #define FLEXSPI2_LUT29 (IMXRT_FLEXSPI2.offset274)
  5267. #define FLEXSPI2_LUT30 (IMXRT_FLEXSPI2.offset278)
  5268. #define FLEXSPI2_LUT31 (IMXRT_FLEXSPI2.offset27C)
  5269. #define FLEXSPI2_LUT32 (IMXRT_FLEXSPI2.offset280)
  5270. #define FLEXSPI2_LUT33 (IMXRT_FLEXSPI2.offset284)
  5271. #define FLEXSPI2_LUT34 (IMXRT_FLEXSPI2.offset288)
  5272. #define FLEXSPI2_LUT35 (IMXRT_FLEXSPI2.offset28C)
  5273. #define FLEXSPI2_LUT36 (IMXRT_FLEXSPI2.offset290)
  5274. #define FLEXSPI2_LUT37 (IMXRT_FLEXSPI2.offset294)
  5275. #define FLEXSPI2_LUT38 (IMXRT_FLEXSPI2.offset298)
  5276. #define FLEXSPI2_LUT39 (IMXRT_FLEXSPI2.offset29C)
  5277. #define FLEXSPI2_LUT40 (IMXRT_FLEXSPI2.offset2A0)
  5278. #define FLEXSPI2_LUT41 (IMXRT_FLEXSPI2.offset2A4)
  5279. #define FLEXSPI2_LUT42 (IMXRT_FLEXSPI2.offset2A8)
  5280. #define FLEXSPI2_LUT43 (IMXRT_FLEXSPI2.offset2AC)
  5281. #define FLEXSPI2_LUT44 (IMXRT_FLEXSPI2.offset2B0)
  5282. #define FLEXSPI2_LUT45 (IMXRT_FLEXSPI2.offset2B4)
  5283. #define FLEXSPI2_LUT46 (IMXRT_FLEXSPI2.offset2B8)
  5284. #define FLEXSPI2_LUT47 (IMXRT_FLEXSPI2.offset2BC)
  5285. #define FLEXSPI2_LUT48 (IMXRT_FLEXSPI2.offset2C0)
  5286. #define FLEXSPI2_LUT49 (IMXRT_FLEXSPI2.offset2C4)
  5287. #define FLEXSPI2_LUT50 (IMXRT_FLEXSPI2.offset2C8)
  5288. #define FLEXSPI2_LUT51 (IMXRT_FLEXSPI2.offset2CC)
  5289. #define FLEXSPI2_LUT52 (IMXRT_FLEXSPI2.offset2D0)
  5290. #define FLEXSPI2_LUT53 (IMXRT_FLEXSPI2.offset2D4)
  5291. #define FLEXSPI2_LUT54 (IMXRT_FLEXSPI2.offset2D8)
  5292. #define FLEXSPI2_LUT55 (IMXRT_FLEXSPI2.offset2DC)
  5293. #define FLEXSPI2_LUT56 (IMXRT_FLEXSPI2.offset2E0)
  5294. #define FLEXSPI2_LUT57 (IMXRT_FLEXSPI2.offset2E4)
  5295. #define FLEXSPI2_LUT58 (IMXRT_FLEXSPI2.offset2E8)
  5296. #define FLEXSPI2_LUT59 (IMXRT_FLEXSPI2.offset2EC)
  5297. #define FLEXSPI2_LUT60 (IMXRT_FLEXSPI2.offset2F0)
  5298. #define FLEXSPI2_LUT61 (IMXRT_FLEXSPI2.offset2F4)
  5299. #define FLEXSPI2_LUT62 (IMXRT_FLEXSPI2.offset2F8)
  5300. #define FLEXSPI2_LUT63 (IMXRT_FLEXSPI2.offset2FC)
  5301. // 17.6: page 1190
  5302. #define IMXRT_GPC (*(IMXRT_REGISTER32_t *)IMXRT_GPC_ADDRESS)
  5303. #define GPC_CNTR (IMXRT_GPC.offset000)
  5304. #define GPC_IMR1 (IMXRT_GPC.offset008)
  5305. #define GPC_IMR2 (IMXRT_GPC.offset00C)
  5306. #define GPC_IMR3 (IMXRT_GPC.offset010)
  5307. #define GPC_IMR4 (IMXRT_GPC.offset014)
  5308. #define GPC_ISR1 (IMXRT_GPC.offset018)
  5309. #define GPC_ISR2 (IMXRT_GPC.offset01C)
  5310. #define GPC_ISR3 (IMXRT_GPC.offset020)
  5311. #define GPC_ISR4 (IMXRT_GPC.offset024)
  5312. #define GPC_IMR5 (IMXRT_GPC.offset034)
  5313. #define GPC_ISR5 (IMXRT_GPC.offset038)
  5314. #define GPC_CNTR_PDRAM0_PGE ((uint32_t)(1<<22))
  5315. #define GPC_CNTR_MEGA_PUP_REQ ((uint32_t)(1<<3))
  5316. #define GPC_CNTR_MEGA_PDN_REQ ((uint32_t)(1<<2))
  5317. // page 1602
  5318. #define PGC_MEGA_CTRL (IMXRT_GPC.offset220)
  5319. #define PGC_MEGA_PUPSCR (IMXRT_GPC.offset224)
  5320. #define PGC_MEGA_PDNSCR (IMXRT_GPC.offset228)
  5321. #define PGC_MEGA_SR (IMXRT_GPC.offset22C)
  5322. #define PGC_CPU_CTRL (IMXRT_GPC.offset2A0)
  5323. #define PGC_CPU_PUPSCR (IMXRT_GPC.offset2A4)
  5324. #define PGC_CPU_PDNSCR (IMXRT_GPC.offset2A8)
  5325. #define PGC_CPU_SR (IMXRT_GPC.offset2AC)
  5326. #define PGC_MEGA_CTRL_PCR ((uint32_t)(1<<0))
  5327. #define PGC_MEGA_PUPSCR_SW2ISO(n) ((uint32_t)(((n) & 0x3F) << 8))
  5328. #define PGC_MEGA_PUPSCR_SW(n) ((uint32_t)(((n) & 0x3F) << 0))
  5329. #define PGC_MEGA_PDNSCR_ISO2SW(n) ((uint32_t)(((n) & 0x3F) << 8))
  5330. #define PGC_MEGA_PDNSCR_ISO(n) ((uint32_t)(((n) & 0x3F) << 0))
  5331. #define PGC_MEGA_SR_PSR ((uint32_t)(1<<0))
  5332. #define PGC_CPU_CTRL_PCR ((uint32_t)(1<<0))
  5333. #define PGC_CPU_PUPSCR_SW2ISO(n) ((uint32_t)(((n) & 0x3F) << 8))
  5334. #define PGC_CPU_PUPSCR_SW(n) ((uint32_t)(((n) & 0x3F) << 0))
  5335. #define PGC_CPU_PDNSCR_ISO2SW(n) ((uint32_t)(((n) & 0x3F) << 8))
  5336. #define PGC_CPU_PDNSCR_ISO(n) ((uint32_t)(((n) & 0x3F) << 0))
  5337. #define PGC_CPU_SR_PSR ((uint32_t)(1<<0))
  5338. // 12.5.1: page 961
  5339. typedef struct {
  5340. volatile uint32_t DR; // 00
  5341. volatile uint32_t GDIR; // 04
  5342. volatile uint32_t PSR; // 08
  5343. volatile uint32_t ICR1; // 0C
  5344. volatile uint32_t ICR2; // 10
  5345. volatile uint32_t IMR; // 14
  5346. volatile uint32_t ICR; // 18
  5347. volatile uint32_t EDGE_SEL; // 1C
  5348. uint32_t UNUSED[25]; // 20 - 83
  5349. volatile uint32_t DR_SET; // 84
  5350. volatile uint32_t DR_CLEAR; // 88
  5351. volatile uint32_t DR_TOGGLE; // 8C
  5352. } IMXRT_GPIO_t;
  5353. #define IMXRT_GPIO1 (*(IMXRT_GPIO_t *)IMXRT_GPIO1_ADDRESS)
  5354. #define GPIO1_DR (IMXRT_GPIO1.DR)
  5355. #define GPIO1_GDIR (IMXRT_GPIO1.GDIR)
  5356. #define GPIO1_PSR (IMXRT_GPIO1.PSR)
  5357. #define GPIO1_ICR1 (IMXRT_GPIO1.ICR1)
  5358. #define GPIO1_ICR2 (IMXRT_GPIO1.ICR2)
  5359. #define GPIO1_IMR (IMXRT_GPIO1.IMR)
  5360. #define GPIO1_ISR (IMXRT_GPIO1.ISR)
  5361. #define GPIO1_EDGE_SEL (IMXRT_GPIO1.EDGE_SEL)
  5362. #define GPIO1_DR_SET (IMXRT_GPIO1.DR_SET)
  5363. #define GPIO1_DR_CLEAR (IMXRT_GPIO1.DR_CLEAR)
  5364. #define GPIO1_DR_TOGGLE (IMXRT_GPIO1.DR_TOGGLE)
  5365. #define IMXRT_GPIO2 (*(IMXRT_GPIO_t *)IMXRT_GPIO2_ADDRESS)
  5366. #define GPIO2_DR (IMXRT_GPIO2.DR)
  5367. #define GPIO2_GDIR (IMXRT_GPIO2.GDIR)
  5368. #define GPIO2_PSR (IMXRT_GPIO2.PSR)
  5369. #define GPIO2_ICR1 (IMXRT_GPIO2.ICR1)
  5370. #define GPIO2_ICR2 (IMXRT_GPIO2.ICR2)
  5371. #define GPIO2_IMR (IMXRT_GPIO2.IMR)
  5372. #define GPIO2_ISR (IMXRT_GPIO2.ISR)
  5373. #define GPIO2_EDGE_SEL (IMXRT_GPIO2.EDGE_SEL)
  5374. #define GPIO2_DR_SET (IMXRT_GPIO2.DR_SET)
  5375. #define GPIO2_DR_CLEAR (IMXRT_GPIO2.DR_CLEAR)
  5376. #define GPIO2_DR_TOGGLE (IMXRT_GPIO2.DR_TOGGLE)
  5377. #define IMXRT_GPIO3 (*(IMXRT_GPIO_t *)IMXRT_GPIO3_ADDRESS)
  5378. #define GPIO3_DR (IMXRT_GPIO3.DR)
  5379. #define GPIO3_GDIR (IMXRT_GPIO3.GDIR)
  5380. #define GPIO3_PSR (IMXRT_GPIO3.PSR)
  5381. #define GPIO3_ICR1 (IMXRT_GPIO3.ICR1)
  5382. #define GPIO3_ICR2 (IMXRT_GPIO3.ICR2)
  5383. #define GPIO3_IMR (IMXRT_GPIO3.IMR)
  5384. #define GPIO3_ISR (IMXRT_GPIO3.ISR)
  5385. #define GPIO3_EDGE_SEL (IMXRT_GPIO3.EDGE_SEL)
  5386. #define GPIO3_DR_SET (IMXRT_GPIO3.DR_SET)
  5387. #define GPIO3_DR_CLEAR (IMXRT_GPIO3.DR_CLEAR)
  5388. #define GPIO3_DR_TOGGLE (IMXRT_GPIO3.DR_TOGGLE)
  5389. #define IMXRT_GPIO4 (*(IMXRT_GPIO_t *)IMXRT_GPIO4_ADDRESS)
  5390. #define GPIO4_DR (IMXRT_GPIO4.DR)
  5391. #define GPIO4_GDIR (IMXRT_GPIO4.GDIR)
  5392. #define GPIO4_PSR (IMXRT_GPIO4.PSR)
  5393. #define GPIO4_ICR1 (IMXRT_GPIO4.ICR1)
  5394. #define GPIO4_ICR2 (IMXRT_GPIO4.ICR2)
  5395. #define GPIO4_IMR (IMXRT_GPIO4.IMR)
  5396. #define GPIO4_ISR (IMXRT_GPIO4.ISR)
  5397. #define GPIO4_EDGE_SEL (IMXRT_GPIO4.EDGE_SEL)
  5398. #define GPIO4_DR_SET (IMXRT_GPIO4.DR_SET)
  5399. #define GPIO4_DR_CLEAR (IMXRT_GPIO4.DR_CLEAR)
  5400. #define GPIO4_DR_TOGGLE (IMXRT_GPIO4.DR_TOGGLE)
  5401. #define IMXRT_GPIO5 (*(IMXRT_GPIO_t *)IMXRT_GPIO5_ADDRESS)
  5402. #define GPIO5_DR (IMXRT_GPIO5.DR)
  5403. #define GPIO5_GDIR (IMXRT_GPIO5.GDIR)
  5404. #define GPIO5_PSR (IMXRT_GPIO5.PSR)
  5405. #define GPIO5_ICR1 (IMXRT_GPIO5.ICR1)
  5406. #define GPIO5_ICR2 (IMXRT_GPIO5.ICR2)
  5407. #define GPIO5_IMR (IMXRT_GPIO5.IMR)
  5408. #define GPIO5_ISR (IMXRT_GPIO5.ISR)
  5409. #define GPIO5_EDGE_SEL (IMXRT_GPIO5.EDGE_SEL)
  5410. #define GPIO5_DR_SET (IMXRT_GPIO5.DR_SET)
  5411. #define GPIO5_DR_CLEAR (IMXRT_GPIO5.DR_CLEAR)
  5412. #define GPIO5_DR_TOGGLE (IMXRT_GPIO5.DR_TOGGLE)
  5413. #define IMXRT_GPIO6 (*(IMXRT_GPIO_t *)IMXRT_GPIO6_ADDRESS)
  5414. #define GPIO6_DR (IMXRT_GPIO6.DR)
  5415. #define GPIO6_GDIR (IMXRT_GPIO6.GDIR)
  5416. #define GPIO6_PSR (IMXRT_GPIO6.PSR)
  5417. #define GPIO6_ICR1 (IMXRT_GPIO6.ICR1)
  5418. #define GPIO6_ICR2 (IMXRT_GPIO6.ICR2)
  5419. #define GPIO6_IMR (IMXRT_GPIO6.IMR)
  5420. #define GPIO6_ISR (IMXRT_GPIO6.ISR)
  5421. #define GPIO6_EDGE_SEL (IMXRT_GPIO6.EDGE_SEL)
  5422. #define GPIO6_DR_SET (IMXRT_GPIO6.DR_SET)
  5423. #define GPIO6_DR_CLEAR (IMXRT_GPIO6.DR_CLEAR)
  5424. #define GPIO6_DR_TOGGLE (IMXRT_GPIO6.DR_TOGGLE)
  5425. #define IMXRT_GPIO7 (*(IMXRT_GPIO_t *)IMXRT_GPIO7_ADDRESS)
  5426. #define GPIO7_DR (IMXRT_GPIO7.DR)
  5427. #define GPIO7_GDIR (IMXRT_GPIO7.GDIR)
  5428. #define GPIO7_PSR (IMXRT_GPIO7.PSR)
  5429. #define GPIO7_ICR1 (IMXRT_GPIO7.ICR1)
  5430. #define GPIO7_ICR2 (IMXRT_GPIO7.ICR2)
  5431. #define GPIO7_IMR (IMXRT_GPIO7.IMR)
  5432. #define GPIO7_ISR (IMXRT_GPIO7.ISR)
  5433. #define GPIO7_EDGE_SEL (IMXRT_GPIO7.EDGE_SEL)
  5434. #define GPIO7_DR_SET (IMXRT_GPIO7.DR_SET)
  5435. #define GPIO7_DR_CLEAR (IMXRT_GPIO7.DR_CLEAR)
  5436. #define GPIO7_DR_TOGGLE (IMXRT_GPIO7.DR_TOGGLE)
  5437. #define IMXRT_GPIO8 (*(IMXRT_GPIO_t *)IMXRT_GPIO8_ADDRESS)
  5438. #define GPIO8_DR (IMXRT_GPIO8.DR)
  5439. #define GPIO8_GDIR (IMXRT_GPIO8.GDIR)
  5440. #define GPIO8_PSR (IMXRT_GPIO8.PSR)
  5441. #define GPIO8_ICR1 (IMXRT_GPIO8.ICR1)
  5442. #define GPIO8_ICR2 (IMXRT_GPIO8.ICR2)
  5443. #define GPIO8_IMR (IMXRT_GPIO8.IMR)
  5444. #define GPIO8_ISR (IMXRT_GPIO8.ISR)
  5445. #define GPIO8_EDGE_SEL (IMXRT_GPIO8.EDGE_SEL)
  5446. #define GPIO8_DR_SET (IMXRT_GPIO8.DR_SET)
  5447. #define GPIO8_DR_CLEAR (IMXRT_GPIO8.DR_CLEAR)
  5448. #define GPIO8_DR_TOGGLE (IMXRT_GPIO8.DR_TOGGLE)
  5449. #define IMXRT_GPIO9 (*(IMXRT_GPIO_t *)IMXRT_GPIO9_ADDRESS)
  5450. #define GPIO9_DR (IMXRT_GPIO9.DR)
  5451. #define GPIO9_GDIR (IMXRT_GPIO9.GDIR)
  5452. #define GPIO9_PSR (IMXRT_GPIO9.PSR)
  5453. #define GPIO9_ICR1 (IMXRT_GPIO9.ICR1)
  5454. #define GPIO9_ICR2 (IMXRT_GPIO9.ICR2)
  5455. #define GPIO9_IMR (IMXRT_GPIO9.IMR)
  5456. #define GPIO9_ISR (IMXRT_GPIO9.ISR)
  5457. #define GPIO9_EDGE_SEL (IMXRT_GPIO9.EDGE_SEL)
  5458. #define GPIO9_DR_SET (IMXRT_GPIO9.DR_SET)
  5459. #define GPIO9_DR_CLEAR (IMXRT_GPIO9.DR_CLEAR)
  5460. #define GPIO9_DR_TOGGLE (IMXRT_GPIO9.DR_TOGGLE)
  5461. // 52.7: page 2957
  5462. #define IMXRT_GPT1 (*(IMXRT_REGISTER32_t *)IMXRT_GPT1_ADDRESS)
  5463. #define GPT1_CR (IMXRT_GPT1.offset000)
  5464. #define GPT1_PR (IMXRT_GPT1.offset004)
  5465. #define GPT1_SR (IMXRT_GPT1.offset008)
  5466. #define GPT1_IR (IMXRT_GPT1.offset00C)
  5467. #define GPT1_OCR1 (IMXRT_GPT1.offset010)
  5468. #define GPT1_OCR2 (IMXRT_GPT1.offset014)
  5469. #define GPT1_OCR3 (IMXRT_GPT1.offset018)
  5470. #define GPT1_ICR1 (IMXRT_GPT1.offset01C)
  5471. #define GPT1_ICR2 (IMXRT_GPT1.offset020)
  5472. #define GPT1_CNT (IMXRT_GPT1.offset024)
  5473. #define IMXRT_GPT2 (*(IMXRT_REGISTER32_t *)IMXRT_GPT2_ADDRESS)
  5474. #define GPT2_CR (IMXRT_GPT2.offset000)
  5475. #define GPT2_PR (IMXRT_GPT2.offset004)
  5476. #define GPT2_SR (IMXRT_GPT2.offset008)
  5477. #define GPT2_IR (IMXRT_GPT2.offset00C)
  5478. #define GPT2_OCR1 (IMXRT_GPT2.offset010)
  5479. #define GPT2_OCR2 (IMXRT_GPT2.offset014)
  5480. #define GPT2_OCR3 (IMXRT_GPT2.offset018)
  5481. #define GPT2_ICR1 (IMXRT_GPT2.offset01C)
  5482. #define GPT2_ICR2 (IMXRT_GPT2.offset020)
  5483. #define GPT2_CNT (IMXRT_GPT2.offset024)
  5484. #define GPT_CR_FO3 ((uint32_t)(1<<31))
  5485. #define GPT_CR_FO2 ((uint32_t)(1<<30))
  5486. #define GPT_CR_FO1 ((uint32_t)(1<<29))
  5487. #define GPT_CR_OM3(n) ((uint32_t)(((n) & 0x07) << 26))
  5488. #define GPT_CR_OM2(n) ((uint32_t)(((n) & 0x07) << 23))
  5489. #define GPT_CR_OM1(n) ((uint32_t)(((n) & 0x07) << 20))
  5490. #define GPT_CR_IM2(n) ((uint32_t)(((n) & 0x03) << 18))
  5491. #define GPT_CR_IM1(n) ((uint32_t)(((n) & 0x03) << 16))
  5492. #define GPT_CR_SWR ((uint32_t)(1<<15))
  5493. #define GPT_CR_EN_24M ((uint32_t)(1<<10))
  5494. #define GPT_CR_FRR ((uint32_t)(1<<9))
  5495. #define GPT_CR_CLKSRC(n) ((uint32_t)(((n) & 0x07) << 6))
  5496. #define GPT_CR_STOPEN ((uint32_t)(1<<5))
  5497. #define GPT_CR_DOZEEN ((uint32_t)(1<<4))
  5498. #define GPT_CR_WAITEN ((uint32_t)(1<<3))
  5499. #define GPT_CR_DBGEN ((uint32_t)(1<<2))
  5500. #define GPT_CR_ENMOD ((uint32_t)(1<<1))
  5501. #define GPT_CR_EN ((uint32_t)(1<<0))
  5502. #define GPT_PR_PRESCALER24M(n) ((uint32_t)(((n) & 0x0F) << 12))
  5503. #define GPT_PR_PRESCALER(n) ((uint32_t)(((n) & 0xFFF) << 0))
  5504. #define GPT_SR_ROV ((uint32_t)(1<<5))
  5505. #define GPT_SR_IF2 ((uint32_t)(1<<4))
  5506. #define GPT_SR_IF1 ((uint32_t)(1<<3))
  5507. #define GPT_SR_OF3 ((uint32_t)(1<<2))
  5508. #define GPT_SR_OF2 ((uint32_t)(1<<1))
  5509. #define GPT_SR_OF1 ((uint32_t)(1<<0))
  5510. #define GPT_IR_ROVIE ((uint32_t)(1<<5))
  5511. #define GPT_IR_IF2IE ((uint32_t)(1<<4))
  5512. #define GPT_IR_IF1IE ((uint32_t)(1<<3))
  5513. #define GPT_IR_OF3IE ((uint32_t)(1<<2))
  5514. #define GPT_IR_OF2IE ((uint32_t)(1<<1))
  5515. #define GPT_IR_OF1IE ((uint32_t)(1<<0))
  5516. // 11.4: page 327
  5517. #define IMXRT_IOMUXC_GPR (*(IMXRT_REGISTER32_t *)IMXRT_IOMUXC_GPR_ADDRESS)
  5518. #define IOMUXC_GPR_GPR0 (IMXRT_IOMUXC_GPR.offset000)
  5519. #define IOMUXC_GPR_GPR1 (IMXRT_IOMUXC_GPR.offset004)
  5520. #define IOMUXC_GPR_GPR2 (IMXRT_IOMUXC_GPR.offset008)
  5521. #define IOMUXC_GPR_GPR3 (IMXRT_IOMUXC_GPR.offset00C)
  5522. #define IOMUXC_GPR_GPR4 (IMXRT_IOMUXC_GPR.offset010)
  5523. #define IOMUXC_GPR_GPR5 (IMXRT_IOMUXC_GPR.offset014)
  5524. #define IOMUXC_GPR_GPR6 (IMXRT_IOMUXC_GPR.offset018)
  5525. #define IOMUXC_GPR_GPR7 (IMXRT_IOMUXC_GPR.offset01C)
  5526. #define IOMUXC_GPR_GPR8 (IMXRT_IOMUXC_GPR.offset020)
  5527. #define IOMUXC_GPR_GPR9 (IMXRT_IOMUXC_GPR.offset024)
  5528. #define IOMUXC_GPR_GPR10 (IMXRT_IOMUXC_GPR.offset028)
  5529. #define IOMUXC_GPR_GPR11 (IMXRT_IOMUXC_GPR.offset02C)
  5530. #define IOMUXC_GPR_GPR12 (IMXRT_IOMUXC_GPR.offset030)
  5531. #define IOMUXC_GPR_GPR13 (IMXRT_IOMUXC_GPR.offset034)
  5532. #define IOMUXC_GPR_GPR14 (IMXRT_IOMUXC_GPR.offset038)
  5533. #define IOMUXC_GPR_GPR15 (IMXRT_IOMUXC_GPR.offset03C)
  5534. #define IOMUXC_GPR_GPR16 (IMXRT_IOMUXC_GPR.offset040)
  5535. #define IOMUXC_GPR_GPR17 (IMXRT_IOMUXC_GPR.offset044)
  5536. #define IOMUXC_GPR_GPR18 (IMXRT_IOMUXC_GPR.offset048)
  5537. #define IOMUXC_GPR_GPR19 (IMXRT_IOMUXC_GPR.offset04C)
  5538. #define IOMUXC_GPR_GPR20 (IMXRT_IOMUXC_GPR.offset050)
  5539. #define IOMUXC_GPR_GPR21 (IMXRT_IOMUXC_GPR.offset054)
  5540. #define IOMUXC_GPR_GPR22 (IMXRT_IOMUXC_GPR.offset058)
  5541. #define IOMUXC_GPR_GPR23 (IMXRT_IOMUXC_GPR.offset05C)
  5542. #define IOMUXC_GPR_GPR24 (IMXRT_IOMUXC_GPR.offset060)
  5543. #define IOMUXC_GPR_GPR25 (IMXRT_IOMUXC_GPR.offset064)
  5544. #define IOMUXC_GPR_GPR26 (IMXRT_IOMUXC_GPR.offset068)
  5545. #define IOMUXC_GPR_GPR27 (IMXRT_IOMUXC_GPR.offset06C)
  5546. #define IOMUXC_GPR_GPR28 (IMXRT_IOMUXC_GPR.offset070)
  5547. #define IOMUXC_GPR_GPR29 (IMXRT_IOMUXC_GPR.offset074)
  5548. #define IOMUXC_GPR_GPR30 (IMXRT_IOMUXC_GPR.offset078)
  5549. #define IOMUXC_GPR_GPR31 (IMXRT_IOMUXC_GPR.offset07C)
  5550. #define IOMUXC_GPR_GPR32 (IMXRT_IOMUXC_GPR.offset080)
  5551. #define IOMUXC_GPR_GPR33 (IMXRT_IOMUXC_GPR.offset084)
  5552. #define IOMUXC_GPR_GPR34 (IMXRT_IOMUXC_GPR.offset088)
  5553. #define IOMUXC_GPR_GPR1_CM7_FORCE_HCLK_EN ((uint32_t)(1<<31))
  5554. #define IOMUXC_GPR_GPR1_ENET_IPG_CLK_S_EN ((uint32_t)(1<<23))
  5555. #define IOMUXC_GPR_GPR1_EXC_MON ((uint32_t)(1<<22))
  5556. #define IOMUXC_GPR_GPR1_SAI3_MCLK_DIR ((uint32_t)(1<<21))
  5557. #define IOMUXC_GPR_GPR1_SAI2_MCLK_DIR ((uint32_t)(1<<20))
  5558. #define IOMUXC_GPR_GPR1_SAI1_MCLK_DIR ((uint32_t)(1<<19))
  5559. #define IOMUXC_GPR_GPR1_ENET2_TX_CLK_DIR ((uint32_t)(1<<18))
  5560. #define IOMUXC_GPR_GPR1_ENET1_TX_CLK_DIR ((uint32_t)(1<<17))
  5561. #define IOMUXC_GPR_GPR1_USB_EXP_MODE ((uint32_t)(1<<15))
  5562. #define IOMUXC_GPR_GPR1_ENET2_CLK_SEL ((uint32_t)(1<<14))
  5563. #define IOMUXC_GPR_GPR1_ENET1_CLK_SEL ((uint32_t)(1<<13))
  5564. #define IOMUXC_GPR_GPR1_GINT ((uint32_t)(1<<12))
  5565. #define IOMUXC_GPR_GPR1_SAI3_MCLK3_SEL(n) ((uint32_t)(((n) & 0x03) << 10))
  5566. #define IOMUXC_GPR_GPR1_SAI2_MCLK3_SEL(n) ((uint32_t)(((n) & 0x03) << 8))
  5567. #define IOMUXC_GPR_GPR1_SAI1_MCLK3_SEL(n) ((uint32_t)(((n) & 0x03) << 6))
  5568. #define IOMUXC_GPR_GPR1_SAI1_MCLK2_SEL(n) ((uint32_t)(((n) & 0x07) << 3))
  5569. #define IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL(n) ((uint32_t)(((n) & 0x07) << 0))
  5570. #define IOMUXC_GPR_GPR1_SAI3_MCLK3_SEL_MASK IOMUXC_GPR_GPR1_SAI3_MCLK3_SEL(3)
  5571. #define IOMUXC_GPR_GPR1_SAI2_MCLK3_SEL_MASK IOMUXC_GPR_GPR1_SAI2_MCLK3_SEL(3)
  5572. #define IOMUXC_GPR_GPR1_SAI1_MCLK3_SEL_MASK IOMUXC_GPR_GPR1_SAI1_MCLK3_SEL(3)
  5573. #define IOMUXC_GPR_GPR1_SAI1_MCLK2_SEL_MASK IOMUXC_GPR_GPR1_SAI1_MCLK2_SEL(7)
  5574. #define IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL_MASK IOMUXC_GPR_GPR1_SAI1_MCLK1_SEL(7)
  5575. #define IOMUXC_GPR_GPR2_QTIMER4_TMR_CNTS_FREEZE ((uint32_t)(1<<31))
  5576. #define IOMUXC_GPR_GPR2_QTIMER3_TMR_CNTS_FREEZE ((uint32_t)(1<<30))
  5577. #define IOMUXC_GPR_GPR2_QTIMER2_TMR_CNTS_FREEZE ((uint32_t)(1<<29))
  5578. #define IOMUXC_GPR_GPR2_QTIMER1_TMR_CNTS_FREEZE ((uint32_t)(1<<28))
  5579. #define IOMUXC_GPR_GPR2_MQS_OVERSAMPLE ((uint32_t)(1<<26))
  5580. #define IOMUXC_GPR_GPR2_MQS_EN ((uint32_t)(1<<25))
  5581. #define IOMUXC_GPR_GPR2_MQS_SW_RST ((uint32_t)(1<<24))
  5582. #define IOMUXC_GPR_GPR2_MQS_CLK_DIV(n) ((uint32_t)(((n) & 0xFF) << 16))
  5583. #define IOMUXC_GPR_GPR2_L2_MEM_DEEPSLEEP ((uint32_t)(1<<14))
  5584. #define IOMUXC_GPR_GPR2_RAM_AUTO_CLK_GATING_EN ((uint32_t)(1<<13))
  5585. #define IOMUXC_GPR_GPR2_L2_MEM_EN_POWERSAVING ((uint32_t)(1<<12))
  5586. #define IOMUXC_GPR_GPR2_CANFD_FILTER_BYPASS ((uint32_t)(1<<6))
  5587. #define IOMUXC_GPR_GPR2_AXBS_P_FORCE_ROUND_ROBIN ((uint32_t)(1<<5))
  5588. #define IOMUXC_GPR_GPR2_AXBS_P_M1_HIGH_PRIORITY ((uint32_t)(1<<4))
  5589. #define IOMUXC_GPR_GPR2_AXBS_P_M0_HIGH_PRIORITY ((uint32_t)(1<<3))
  5590. #define IOMUXC_GPR_GPR2_AXBS_L_FORCE_ROUND_ROBIN ((uint32_t)(1<<2))
  5591. #define IOMUXC_GPR_GPR2_AXBS_L_DMA_HIGH_PRIORITY ((uint32_t)(1<<1))
  5592. #define IOMUXC_GPR_GPR2_AXBS_L_AHBXL_HIGH_PRIORITY ((uint32_t)(1<<0))
  5593. #define IOMUXC_GPR_GPR2_MQS_CLK_DIV_MASK IOMUXC_GPR_GPR2_MQS_CLK_DIV(255)
  5594. #define IOMUXC_GPR_GPR3_AXBS_L_HALTED ((uint32_t)(1<<31))
  5595. #define IOMUXC_GPR_GPR3_OCRAM2_STATUS(n) ((uint32_t)(((n) & 0x0F) << 24))
  5596. #define IOMUXC_GPR_GPR3_OCRAM_STATUS(n) ((uint32_t)(((n) & 0x0F) << 16))
  5597. #define IOMUXC_GPR_GPR3_AXBS_L_HALT_REQ ((uint32_t)(1<<15))
  5598. #define IOMUXC_GPR_GPR3_OCRAM2_CTL(n) ((uint32_t)(((n) & 0x0F) << 8))
  5599. #define IOMUXC_GPR_GPR3_DCP_KEY_SEL ((uint32_t)(1<<4))
  5600. #define IOMUXC_GPR_GPR3_OCRAM_CTL(n) ((uint32_t)(((n) & 0x0F) << 0))
  5601. #define IOMUXC_GPR_GPR4_FLEXSPI2_STOP_ACK ((uint32_t)(1<<31))
  5602. #define IOMUXC_GPR_GPR4_FLEXIO3_STOP_ACK ((uint32_t)(1<<30))
  5603. #define IOMUXC_GPR_GPR4_FLEXIO2_STOP_ACK ((uint32_t)(1<<29))
  5604. #define IOMUXC_GPR_GPR4_FLEXIO1_STOP_ACK ((uint32_t)(1<<28))
  5605. #define IOMUXC_GPR_GPR4_FLEXSPI_STOP_ACK ((uint32_t)(1<<27))
  5606. #define IOMUXC_GPR_GPR4_PIT_STOP_ACK ((uint32_t)(1<<26))
  5607. #define IOMUXC_GPR_GPR4_SEMC_STOP_ACK ((uint32_t)(1<<25))
  5608. #define IOMUXC_GPR_GPR4_SAI3_STOP_ACK ((uint32_t)(1<<23))
  5609. #define IOMUXC_GPR_GPR4_SAI2_STOP_ACK ((uint32_t)(1<<22))
  5610. #define IOMUXC_GPR_GPR4_SAI1_STOP_ACK ((uint32_t)(1<<21))
  5611. #define IOMUXC_GPR_GPR4_ENET_STOP_ACK ((uint32_t)(1<<20))
  5612. #define IOMUXC_GPR_GPR4_TRNG_STOP_ACK ((uint32_t)(1<<19))
  5613. #define IOMUXC_GPR_GPR4_CAN2_STOP_ACK ((uint32_t)(1<<18))
  5614. #define IOMUXC_GPR_GPR4_CAN1_STOP_ACK ((uint32_t)(1<<17))
  5615. #define IOMUXC_GPR_GPR4_EDMA_STOP_ACK ((uint32_t)(1<<16))
  5616. #define IOMUXC_GPR_GPR4_FLEXSPI2_STOP_REQ ((uint32_t)(1<<15))
  5617. #define IOMUXC_GPR_GPR4_FLEXIO3_STOP_REQ ((uint32_t)(1<<14))
  5618. #define IOMUXC_GPR_GPR4_FLEXIO2_STOP_REQ ((uint32_t)(1<<13))
  5619. #define IOMUXC_GPR_GPR4_FLEXIO1_STOP_REQ ((uint32_t)(1<<12))
  5620. #define IOMUXC_GPR_GPR4_FLEXSPI_STOP_REQ ((uint32_t)(1<<11))
  5621. #define IOMUXC_GPR_GPR4_PIT_STOP_REQ ((uint32_t)(1<<10))
  5622. #define IOMUXC_GPR_GPR4_SEMC_STOP_REQ ((uint32_t)(1<<9))
  5623. #define IOMUXC_GPR_GPR4_SAI3_STOP_REQ ((uint32_t)(1<<7))
  5624. #define IOMUXC_GPR_GPR4_SAI2_STOP_REQ ((uint32_t)(1<<6))
  5625. #define IOMUXC_GPR_GPR4_SAI1_STOP_REQ ((uint32_t)(1<<5))
  5626. #define IOMUXC_GPR_GPR4_ENET_STOP_REQ ((uint32_t)(1<<4))
  5627. #define IOMUXC_GPR_GPR4_TRNG_STOP_REQ ((uint32_t)(1<<3))
  5628. #define IOMUXC_GPR_GPR4_CAN2_STOP_REQ ((uint32_t)(1<<2))
  5629. #define IOMUXC_GPR_GPR4_CAN1_STOP_REQ ((uint32_t)(1<<1))
  5630. #define IOMUXC_GPR_GPR4_EDMA_STOP_REQ ((uint32_t)(1<<0))
  5631. #define IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT2 ((uint32_t)(1<<29))
  5632. #define IOMUXC_GPR_GPR5_VREF_1M_CLK_GPT1 ((uint32_t)(1<<28))
  5633. #define IOMUXC_GPR_GPR5_ENET2_EVENT3IN_SEL ((uint32_t)(1<<26))
  5634. #define IOMUXC_GPR_GPR5_ENET_EVENT3IN_SEL ((uint32_t)(1<<25))
  5635. #define IOMUXC_GPR_GPR5_GPT2_CAPIN2_SEL ((uint32_t)(1<<24))
  5636. #define IOMUXC_GPR_GPR5_GPT2_CAPIN1_SEL ((uint32_t)(1<<23))
  5637. #define IOMUXC_GPR_GPR5_WDOG2_MASK ((uint32_t)(1<<7))
  5638. #define IOMUXC_GPR_GPR5_WDOG1_MASK ((uint32_t)(1<<6))
  5639. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_19 ((uint32_t)(1<<31))
  5640. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_18 ((uint32_t)(1<<30))
  5641. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_17 ((uint32_t)(1<<29))
  5642. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_16 ((uint32_t)(1<<28))
  5643. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_15 ((uint32_t)(1<<27))
  5644. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_14 ((uint32_t)(1<<26))
  5645. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_13 ((uint32_t)(1<<25))
  5646. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_12 ((uint32_t)(1<<24))
  5647. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_11 ((uint32_t)(1<<23))
  5648. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_10 ((uint32_t)(1<<22))
  5649. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_9 ((uint32_t)(1<<21))
  5650. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_8 ((uint32_t)(1<<20))
  5651. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_7 ((uint32_t)(1<<19))
  5652. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_6 ((uint32_t)(1<<18))
  5653. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_5 ((uint32_t)(1<<17))
  5654. #define IOMUXC_GPR_GPR6_IOMUXC_XBAR_DIR_SEL_4 ((uint32_t)(1<<16))
  5655. #define IOMUXC_GPR_GPR6_QTIMER4_TRM3_INPUT_SEL ((uint32_t)(1<<15))
  5656. #define IOMUXC_GPR_GPR6_QTIMER4_TRM2_INPUT_SEL ((uint32_t)(1<<14))
  5657. #define IOMUXC_GPR_GPR6_QTIMER4_TRM1_INPUT_SEL ((uint32_t)(1<<13))
  5658. #define IOMUXC_GPR_GPR6_QTIMER4_TRM0_INPUT_SEL ((uint32_t)(1<<12))
  5659. #define IOMUXC_GPR_GPR6_QTIMER3_TRM3_INPUT_SEL ((uint32_t)(1<<11))
  5660. #define IOMUXC_GPR_GPR6_QTIMER3_TRM2_INPUT_SEL ((uint32_t)(1<<10))
  5661. #define IOMUXC_GPR_GPR6_QTIMER3_TRM1_INPUT_SEL ((uint32_t)(1<<9))
  5662. #define IOMUXC_GPR_GPR6_QTIMER3_TRM0_INPUT_SEL ((uint32_t)(1<<8))
  5663. #define IOMUXC_GPR_GPR6_QTIMER2_TRM3_INPUT_SEL ((uint32_t)(1<<7))
  5664. #define IOMUXC_GPR_GPR6_QTIMER2_TRM2_INPUT_SEL ((uint32_t)(1<<6))
  5665. #define IOMUXC_GPR_GPR6_QTIMER2_TRM1_INPUT_SEL ((uint32_t)(1<<5))
  5666. #define IOMUXC_GPR_GPR6_QTIMER2_TRM0_INPUT_SEL ((uint32_t)(1<<4))
  5667. #define IOMUXC_GPR_GPR6_QTIMER1_TRM3_INPUT_SEL ((uint32_t)(1<<3))
  5668. #define IOMUXC_GPR_GPR6_QTIMER1_TRM2_INPUT_SEL ((uint32_t)(1<<2))
  5669. #define IOMUXC_GPR_GPR6_QTIMER1_TRM1_INPUT_SEL ((uint32_t)(1<<1))
  5670. #define IOMUXC_GPR_GPR6_QTIMER1_TRM0_INPUT_SEL ((uint32_t)(1<<0))
  5671. #define IOMUXC_GPR_GPR7_LPUART8_STOP_ACK ((uint32_t)(1<<31))
  5672. #define IOMUXC_GPR_GPR7_LPUART7_STOP_ACK ((uint32_t)(1<<30))
  5673. #define IOMUXC_GPR_GPR7_LPUART6_STOP_ACK ((uint32_t)(1<<29))
  5674. #define IOMUXC_GPR_GPR7_LPUART5_STOP_ACK ((uint32_t)(1<<28))
  5675. #define IOMUXC_GPR_GPR7_LPUART4_STOP_ACK ((uint32_t)(1<<27))
  5676. #define IOMUXC_GPR_GPR7_LPUART3_STOP_ACK ((uint32_t)(1<<26))
  5677. #define IOMUXC_GPR_GPR7_LPUART2_STOP_ACK ((uint32_t)(1<<25))
  5678. #define IOMUXC_GPR_GPR7_LPUART1_STOP_ACK ((uint32_t)(1<<24))
  5679. #define IOMUXC_GPR_GPR7_LPSPI4_STOP_ACK ((uint32_t)(1<<23))
  5680. #define IOMUXC_GPR_GPR7_LPSPI3_STOP_ACK ((uint32_t)(1<<22))
  5681. #define IOMUXC_GPR_GPR7_LPSPI2_STOP_ACK ((uint32_t)(1<<21))
  5682. #define IOMUXC_GPR_GPR7_LPSPI1_STOP_ACK ((uint32_t)(1<<20))
  5683. #define IOMUXC_GPR_GPR7_LPI2C4_STOP_ACK ((uint32_t)(1<<19))
  5684. #define IOMUXC_GPR_GPR7_LPI2C3_STOP_ACK ((uint32_t)(1<<18))
  5685. #define IOMUXC_GPR_GPR7_LPI2C2_STOP_ACK ((uint32_t)(1<<17))
  5686. #define IOMUXC_GPR_GPR7_LPI2C1_STOP_ACK ((uint32_t)(1<<16))
  5687. #define IOMUXC_GPR_GPR7_LPUART8_STOP_REQ ((uint32_t)(1<<15))
  5688. #define IOMUXC_GPR_GPR7_LPUART7_STOP_REQ ((uint32_t)(1<<14))
  5689. #define IOMUXC_GPR_GPR7_LPUART6_STOP_REQ ((uint32_t)(1<<13))
  5690. #define IOMUXC_GPR_GPR7_LPUART5_STOP_REQ ((uint32_t)(1<<12))
  5691. #define IOMUXC_GPR_GPR7_LPUART4_STOP_REQ ((uint32_t)(1<<11))
  5692. #define IOMUXC_GPR_GPR7_LPUART3_STOP_REQ ((uint32_t)(1<<10))
  5693. #define IOMUXC_GPR_GPR7_LPUART2_STOP_REQ ((uint32_t)(1<<9))
  5694. #define IOMUXC_GPR_GPR7_LPUART1_STOP_REQ ((uint32_t)(1<<8))
  5695. #define IOMUXC_GPR_GPR7_LPSPI4_STOP_REQ ((uint32_t)(1<<7))
  5696. #define IOMUXC_GPR_GPR7_LPSPI3_STOP_REQ ((uint32_t)(1<<6))
  5697. #define IOMUXC_GPR_GPR7_LPSPI2_STOP_REQ ((uint32_t)(1<<5))
  5698. #define IOMUXC_GPR_GPR7_LPSPI1_STOP_REQ ((uint32_t)(1<<4))
  5699. #define IOMUXC_GPR_GPR7_LPI2C4_STOP_REQ ((uint32_t)(1<<3))
  5700. #define IOMUXC_GPR_GPR7_LPI2C3_STOP_REQ ((uint32_t)(1<<2))
  5701. #define IOMUXC_GPR_GPR7_LPI2C2_STOP_REQ ((uint32_t)(1<<1))
  5702. #define IOMUXC_GPR_GPR7_LPI2C1_STOP_REQ ((uint32_t)(1<<0))
  5703. #define IOMUXC_GPR_GPR8_LPUART8_IPG_DOZE ((uint32_t)(1<<31))
  5704. #define IOMUXC_GPR_GPR8_LPUART8_IPG_STOP_MODE ((uint32_t)(1<<30))
  5705. #define IOMUXC_GPR_GPR8_LPUART7_IPG_DOZE ((uint32_t)(1<<29))
  5706. #define IOMUXC_GPR_GPR8_LPUART7_IPG_STOP_MODE ((uint32_t)(1<<28))
  5707. #define IOMUXC_GPR_GPR8_LPUART6_IPG_DOZE ((uint32_t)(1<<27))
  5708. #define IOMUXC_GPR_GPR8_LPUART6_IPG_STOP_MODE ((uint32_t)(1<<26))
  5709. #define IOMUXC_GPR_GPR8_LPUART5_IPG_DOZE ((uint32_t)(1<<25))
  5710. #define IOMUXC_GPR_GPR8_LPUART5_IPG_STOP_MODE ((uint32_t)(1<<24))
  5711. #define IOMUXC_GPR_GPR8_LPUART4_IPG_DOZE ((uint32_t)(1<<23))
  5712. #define IOMUXC_GPR_GPR8_LPUART4_IPG_STOP_MODE ((uint32_t)(1<<22))
  5713. #define IOMUXC_GPR_GPR8_LPUART3_IPG_DOZE ((uint32_t)(1<<21))
  5714. #define IOMUXC_GPR_GPR8_LPUART3_IPG_STOP_MODE ((uint32_t)(1<<20))
  5715. #define IOMUXC_GPR_GPR8_LPUART2_IPG_DOZE ((uint32_t)(1<<19))
  5716. #define IOMUXC_GPR_GPR8_LPUART2_IPG_STOP_MODE ((uint32_t)(1<<18))
  5717. #define IOMUXC_GPR_GPR8_LPUART1_IPG_DOZE ((uint32_t)(1<<17))
  5718. #define IOMUXC_GPR_GPR8_LPUART1_IPG_STOP_MODE ((uint32_t)(1<<16))
  5719. #define IOMUXC_GPR_GPR8_LPSPI4_IPG_DOZE ((uint32_t)(1<<15))
  5720. #define IOMUXC_GPR_GPR8_LPSPI4_IPG_STOP_MODE ((uint32_t)(1<<14))
  5721. #define IOMUXC_GPR_GPR8_LPSPI3_IPG_DOZE ((uint32_t)(1<<13))
  5722. #define IOMUXC_GPR_GPR8_LPSPI3_IPG_STOP_MODE ((uint32_t)(1<<12))
  5723. #define IOMUXC_GPR_GPR8_LPSPI2_IPG_DOZE ((uint32_t)(1<<11))
  5724. #define IOMUXC_GPR_GPR8_LPSPI2_IPG_STOP_MODE ((uint32_t)(1<<10))
  5725. #define IOMUXC_GPR_GPR8_LPSPI1_IPG_DOZE ((uint32_t)(1<<9))
  5726. #define IOMUXC_GPR_GPR8_LPSPI1_IPG_STOP_MODE ((uint32_t)(1<<8))
  5727. #define IOMUXC_GPR_GPR8_LPI2C4_IPG_DOZE ((uint32_t)(1<<7))
  5728. #define IOMUXC_GPR_GPR8_LPI2C4_IPG_STOP_MODE ((uint32_t)(1<<6))
  5729. #define IOMUXC_GPR_GPR8_LPI2C3_IPG_DOZE ((uint32_t)(1<<5))
  5730. #define IOMUXC_GPR_GPR8_LPI2C3_IPG_STOP_MODE ((uint32_t)(1<<4))
  5731. #define IOMUXC_GPR_GPR8_LPI2C2_IPG_DOZE ((uint32_t)(1<<3))
  5732. #define IOMUXC_GPR_GPR8_LPI2C2_IPG_STOP_MODE ((uint32_t)(1<<2))
  5733. #define IOMUXC_GPR_GPR8_LPI2C1_IPG_DOZE ((uint32_t)(1<<1))
  5734. #define IOMUXC_GPR_GPR8_LPI2C1_IPG_STOP_MODE ((uint32_t)(1<<0))
  5735. #define IOMUXC_GPR_GPR10_LOCK_OCRAM_TZ_ADDR(n) ((uint32_t)(((n) & 0x7F) << 25))
  5736. #define IOMUXC_GPR_GPR10_LOCK_OCRAM_TZ_EN ((uint32_t)(1<<24))
  5737. #define IOMUXC_GPR_GPR10_LOCK_DCPKEY_OCOTP_OR_KEYMUX ((uint32_t)(1<<20))
  5738. #define IOMUXC_GPR_GPR10_LOCK_SEC_ERR_RESP ((uint32_t)(1<<18))
  5739. #define IOMUXC_GPR_GPR10_LOCK_DBG_EN ((uint32_t)(1<<17))
  5740. #define IOMUXC_GPR_GPR10_LOCK_NIDEN ((uint32_t)(1<<16))
  5741. #define IOMUXC_GPR_GPR10_OCRAM_TZ_ADDR(n) ((uint32_t)(((n) & 0x7F) << 9))
  5742. #define IOMUXC_GPR_GPR10_OCRAM_TZ_EN ((uint32_t)(1<<8))
  5743. #define IOMUXC_GPR_GPR10_DCPKEY_OCOTP_OR_KEYMUX ((uint32_t)(1<<4))
  5744. #define IOMUXC_GPR_GPR10_SEC_ERR_RESP ((uint32_t)(1<<2))
  5745. #define IOMUXC_GPR_GPR10_DBG_EN ((uint32_t)(1<<1))
  5746. #define IOMUXC_GPR_GPR10_NIDEN ((uint32_t)(1<<0))
  5747. #define IOMUXC_GPR_GPR11_LOCK_BEE_DE_RX_EN(n) ((uint32_t)(((n) & 0x0F) << 24))
  5748. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R3_CTRL(n) ((uint32_t)(((n) & 0x03) << 22))
  5749. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R2_CTRL(n) ((uint32_t)(((n) & 0x03) << 20))
  5750. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R1_CTRL(n) ((uint32_t)(((n) & 0x03) << 18))
  5751. #define IOMUXC_GPR_GPR11_LOCK_M7_APC_AC_R0_CTRL(n) ((uint32_t)(((n) & 0x03) << 16))
  5752. #define IOMUXC_GPR_GPR11_BEE_DE_RX_EN(n) ((uint32_t)(((n) & 0x0F) << 8))
  5753. #define IOMUXC_GPR_GPR11_M7_APC_AC_R3_CTRL(n) ((uint32_t)(((n) & 0x03) << 6))
  5754. #define IOMUXC_GPR_GPR11_M7_APC_AC_R2_CTRL(n) ((uint32_t)(((n) & 0x03) << 4))
  5755. #define IOMUXC_GPR_GPR11_M7_APC_AC_R1_CTRL(n) ((uint32_t)(((n) & 0x03) << 2))
  5756. #define IOMUXC_GPR_GPR11_M7_APC_AC_R0_CTRL(n) ((uint32_t)(((n) & 0x03) << 0))
  5757. #define IOMUXC_GPR_GPR12_FLEXIO3_IPG_DOZE ((uint32_t)(1<<6))
  5758. #define IOMUXC_GPR_GPR12_FLEXIO3_IPG_STOP_MODE ((uint32_t)(1<<5))
  5759. #define IOMUXC_GPR_GPR12_ACMP_IPG_STOP_MODE ((uint32_t)(1<<4))
  5760. #define IOMUXC_GPR_GPR12_FLEXIO2_IPG_DOZE ((uint32_t)(1<<3))
  5761. #define IOMUXC_GPR_GPR12_FLEXIO2_IPG_STOP_MODE ((uint32_t)(1<<2))
  5762. #define IOMUXC_GPR_GPR12_FLEXIO1_IPG_DOZE ((uint32_t)(1<<1))
  5763. #define IOMUXC_GPR_GPR12_FLEXIO1_IPG_STOP_MODE ((uint32_t)(1<<0))
  5764. #define IOMUXC_GPR_GPR13_CANFD_STOP_ACK ((uint32_t)(1<<20))
  5765. #define IOMUXC_GPR_GPR13_CACHE_USB ((uint32_t)(1<<13))
  5766. #define IOMUXC_GPR_GPR13_CACHE_ENET ((uint32_t)(1<<7))
  5767. #define IOMUXC_GPR_GPR13_CANFD_STOP_REQ ((uint32_t)(1<<4))
  5768. #define IOMUXC_GPR_GPR13_AWCACHE_USDHC ((uint32_t)(1<<1))
  5769. #define IOMUXC_GPR_GPR13_ARCACHE_USDHC ((uint32_t)(1<<0))
  5770. #define IOMUXC_GPR_GPR14_CM7_MX6RT_CFGDTCMSZ(n) ((uint32_t)(((n) & 0x0F) << 20))
  5771. #define IOMUXC_GPR_GPR14_CM7_MX6RT_CFGITCMSZ(n) ((uint32_t)(((n) & 0x0F) << 16))
  5772. #define IOMUXC_GPR_GPR14_ACMP4_SAMPLE_SYNC_EN ((uint32_t)(1<<11))
  5773. #define IOMUXC_GPR_GPR14_ACMP3_SAMPLE_SYNC_EN ((uint32_t)(1<<10))
  5774. #define IOMUXC_GPR_GPR14_ACMP2_SAMPLE_SYNC_EN ((uint32_t)(1<<9))
  5775. #define IOMUXC_GPR_GPR14_ACMP1_SAMPLE_SYNC_EN ((uint32_t)(1<<8))
  5776. #define IOMUXC_GPR_GPR14_ACMP4_CMP_IGEN_TRIM_UP ((uint32_t)(1<<7))
  5777. #define IOMUXC_GPR_GPR14_ACMP3_CMP_IGEN_TRIM_UP ((uint32_t)(1<<6))
  5778. #define IOMUXC_GPR_GPR14_ACMP2_CMP_IGEN_TRIM_UP ((uint32_t)(1<<5))
  5779. #define IOMUXC_GPR_GPR14_ACMP1_CMP_IGEN_TRIM_UP ((uint32_t)(1<<4))
  5780. #define IOMUXC_GPR_GPR14_ACMP4_CMP_IGEN_TRIM_DN ((uint32_t)(1<<3))
  5781. #define IOMUXC_GPR_GPR14_ACMP3_CMP_IGEN_TRIM_DN ((uint32_t)(1<<2))
  5782. #define IOMUXC_GPR_GPR14_ACMP2_CMP_IGEN_TRIM_DN ((uint32_t)(1<<1))
  5783. #define IOMUXC_GPR_GPR14_ACMP1_CMP_IGEN_TRIM_DN ((uint32_t)(1<<0))
  5784. #define IOMUXC_GPR_GPR16_CM7_INIT_VTOR(n) ((uint32_t)(((n) & 0x1FFFFFF) << 7))
  5785. #define IOMUXC_GPR_GPR16_FLEXRAM_BANK_CFG_SEL ((uint32_t)(1<<2))
  5786. #define IOMUXC_GPR_GPR16_INIT_DTCM_EN ((uint32_t)(1<<1))
  5787. #define IOMUXC_GPR_GPR16_INIT_ITCM_EN ((uint32_t)(1<<0))
  5788. #define IOMUXC_GPR_GPR18_M7_APC_AC_R0_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5789. #define IOMUXC_GPR_GPR18_LOCK_M7_APC_AC_R0_BOT ((uint32_t)(1<<0))
  5790. #define IOMUXC_GPR_GPR19_M7_APC_AC_R0_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5791. #define IOMUXC_GPR_GPR19_LOCK_M7_APC_AC_R0_TOP ((uint32_t)(1<<0))
  5792. #define IOMUXC_GPR_GPR20_M7_APC_AC_R1_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5793. #define IOMUXC_GPR_GPR20_LOCK_M7_APC_AC_R1_BOT ((uint32_t)(1<<0))
  5794. #define IOMUXC_GPR_GPR21_M7_APC_AC_R1_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5795. #define IOMUXC_GPR_GPR21_LOCK_M7_APC_AC_R1_TOP ((uint32_t)(1<<0))
  5796. #define IOMUXC_GPR_GPR22_M7_APC_AC_R2_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5797. #define IOMUXC_GPR_GPR22_LOCK_M7_APC_AC_R2_BOT ((uint32_t)(1<<0))
  5798. #define IOMUXC_GPR_GPR23_M7_APC_AC_R2_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5799. #define IOMUXC_GPR_GPR23_LOCK_M7_APC_AC_R2_TOP ((uint32_t)(1<<0))
  5800. #define IOMUXC_GPR_GPR24_M7_APC_AC_R3_BOT(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5801. #define IOMUXC_GPR_GPR24_LOCK_M7_APC_AC_R3_BOT ((uint32_t)(1<<0))
  5802. #define IOMUXC_GPR_GPR25_M7_APC_AC_R3_TOP(n) ((uint32_t)(((n) & 0x1FFFFFFF) << 3))
  5803. #define IOMUXC_GPR_GPR25_LOCK_M7_APC_AC_R3_TOP ((uint32_t)(1<<0))
  5804. #define IOMUXC_GPR_GPR33_LOCK_OCRAM2_TZ_ADDR(n) ((uint32_t)(((n) & 0x7F) << 17))
  5805. #define IOMUXC_GPR_GPR33_LOCK_OCRAM2_TZ_EN ((uint32_t)(1<<16))
  5806. #define IOMUXC_GPR_GPR33_OCRAM2_TZ_ADDR(n) ((uint32_t)(((n) & 0x7F) << 1))
  5807. #define IOMUXC_GPR_GPR33_OCRAM2_TZ_EN ((uint32_t)(1<<0))
  5808. #define IOMUXC_GPR_GPR34_SIP_TEST_MUX_QSPI_SIP_EN ((uint32_t)(1<<8))
  5809. #define IOMUXC_GPR_GPR34_SIP_TEST_MUX_BOOT_PIN_SEL(n) ((uint32_t)(((n) & 0xFF) << 0))
  5810. // 11.5: page 380
  5811. #define IMXRT_IOMUXC_SNVS (*(IMXRT_REGISTER32_t *)IMXRT_IOMUXC_SNVS_ADDRESS)
  5812. #define IOMUXC_SNVS_SW_MUX_CTL_PAD_WAKEUP (IMXRT_IOMUXC_SNVS.offset000)
  5813. #define IOMUXC_SNVS_SW_MUX_CTL_PAD_PMIC_ON_REQ (IMXRT_IOMUXC_SNVS.offset004)
  5814. #define IOMUXC_SNVS_SW_MUX_CTL_PAD_PMIC_STBY_REQ (IMXRT_IOMUXC_SNVS.offset008)
  5815. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_TEST_MODE (IMXRT_IOMUXC_SNVS.offset00C)
  5816. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_POR_B (IMXRT_IOMUXC_SNVS.offset010)
  5817. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_ONOFF (IMXRT_IOMUXC_SNVS.offset014)
  5818. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_WAKEUP (IMXRT_IOMUXC_SNVS.offset018)
  5819. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_PMIC_ON_REQ (IMXRT_IOMUXC_SNVS.offset01C)
  5820. #define IOMUXC_SNVS_SW_PAD_CTL_PAD_PMIC_STBY_REQ (IMXRT_IOMUXC_SNVS.offset020)
  5821. // 11.6: page 399
  5822. #define IMXRT_IOMUXC_SNVS_GPR (*(IMXRT_REGISTER32_t *)IMXRT_IOMUXC_SNVS_GPR_ADDRESS)
  5823. #define IOMUXC_SNVS_GPR_GPR0 (IMXRT_IOMUXC_SNVS_GPR.offset000)
  5824. #define IOMUXC_SNVS_GPR_GPR1 (IMXRT_IOMUXC_SNVS_GPR.offset004)
  5825. #define IOMUXC_SNVS_GPR_GPR2 (IMXRT_IOMUXC_SNVS_GPR.offset008)
  5826. #define IOMUXC_SNVS_GPR_GPR3 (IMXRT_IOMUXC_SNVS_GPR.offset00C)
  5827. // 11.7: page 403
  5828. #define IMXRT_IOMUXC (*(IMXRT_REGISTER32_t *)IMXRT_IOMUXC_ADDRESS)
  5829. #define IMXRT_IOMUXC_b (*(IMXRT_REGISTER32_t *)(IMXRT_IOMUXC_ADDRESS+0x400))
  5830. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_00 (IMXRT_IOMUXC.offset014)
  5831. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_01 (IMXRT_IOMUXC.offset018)
  5832. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_02 (IMXRT_IOMUXC.offset01C)
  5833. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_03 (IMXRT_IOMUXC.offset020)
  5834. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_04 (IMXRT_IOMUXC.offset024)
  5835. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_05 (IMXRT_IOMUXC.offset028)
  5836. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_06 (IMXRT_IOMUXC.offset02C)
  5837. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_07 (IMXRT_IOMUXC.offset030)
  5838. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_08 (IMXRT_IOMUXC.offset034)
  5839. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_09 (IMXRT_IOMUXC.offset038)
  5840. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_10 (IMXRT_IOMUXC.offset03C)
  5841. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_11 (IMXRT_IOMUXC.offset040)
  5842. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_12 (IMXRT_IOMUXC.offset044)
  5843. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_13 (IMXRT_IOMUXC.offset048)
  5844. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_14 (IMXRT_IOMUXC.offset04C)
  5845. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_15 (IMXRT_IOMUXC.offset050)
  5846. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_16 (IMXRT_IOMUXC.offset054)
  5847. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_17 (IMXRT_IOMUXC.offset058)
  5848. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_18 (IMXRT_IOMUXC.offset05C)
  5849. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_19 (IMXRT_IOMUXC.offset060)
  5850. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_20 (IMXRT_IOMUXC.offset064)
  5851. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_21 (IMXRT_IOMUXC.offset068)
  5852. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_22 (IMXRT_IOMUXC.offset06C)
  5853. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_23 (IMXRT_IOMUXC.offset070)
  5854. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_24 (IMXRT_IOMUXC.offset074)
  5855. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_25 (IMXRT_IOMUXC.offset078)
  5856. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_26 (IMXRT_IOMUXC.offset07C)
  5857. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_27 (IMXRT_IOMUXC.offset080)
  5858. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_28 (IMXRT_IOMUXC.offset084)
  5859. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_29 (IMXRT_IOMUXC.offset088)
  5860. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_30 (IMXRT_IOMUXC.offset08C)
  5861. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_31 (IMXRT_IOMUXC.offset090)
  5862. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_32 (IMXRT_IOMUXC.offset094)
  5863. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_33 (IMXRT_IOMUXC.offset098)
  5864. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_34 (IMXRT_IOMUXC.offset09C)
  5865. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_35 (IMXRT_IOMUXC.offset0A0)
  5866. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_36 (IMXRT_IOMUXC.offset0A4)
  5867. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_37 (IMXRT_IOMUXC.offset0A8)
  5868. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_38 (IMXRT_IOMUXC.offset0AC)
  5869. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_39 (IMXRT_IOMUXC.offset0B0)
  5870. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_40 (IMXRT_IOMUXC.offset0B4)
  5871. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_EMC_41 (IMXRT_IOMUXC.offset0B8)
  5872. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_00 (IMXRT_IOMUXC.offset0BC)
  5873. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_01 (IMXRT_IOMUXC.offset0C0)
  5874. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_02 (IMXRT_IOMUXC.offset0C4)
  5875. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_03 (IMXRT_IOMUXC.offset0C8)
  5876. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_04 (IMXRT_IOMUXC.offset0CC)
  5877. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_05 (IMXRT_IOMUXC.offset0D0)
  5878. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_06 (IMXRT_IOMUXC.offset0D4)
  5879. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_07 (IMXRT_IOMUXC.offset0D8)
  5880. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_08 (IMXRT_IOMUXC.offset0DC)
  5881. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_09 (IMXRT_IOMUXC.offset0E0)
  5882. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_10 (IMXRT_IOMUXC.offset0E4)
  5883. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_11 (IMXRT_IOMUXC.offset0E8)
  5884. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_12 (IMXRT_IOMUXC.offset0EC)
  5885. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_13 (IMXRT_IOMUXC.offset0F0)
  5886. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_14 (IMXRT_IOMUXC.offset0F4)
  5887. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B0_15 (IMXRT_IOMUXC.offset0F8)
  5888. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_00 (IMXRT_IOMUXC.offset0FC)
  5889. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_01 (IMXRT_IOMUXC.offset100)
  5890. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_02 (IMXRT_IOMUXC.offset104)
  5891. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_03 (IMXRT_IOMUXC.offset108)
  5892. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_04 (IMXRT_IOMUXC.offset10C)
  5893. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_05 (IMXRT_IOMUXC.offset110)
  5894. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_06 (IMXRT_IOMUXC.offset114)
  5895. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_07 (IMXRT_IOMUXC.offset118)
  5896. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_08 (IMXRT_IOMUXC.offset11C)
  5897. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_09 (IMXRT_IOMUXC.offset120)
  5898. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_10 (IMXRT_IOMUXC.offset124)
  5899. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_11 (IMXRT_IOMUXC.offset128)
  5900. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_12 (IMXRT_IOMUXC.offset12C)
  5901. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_13 (IMXRT_IOMUXC.offset130)
  5902. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_14 (IMXRT_IOMUXC.offset134)
  5903. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_AD_B1_15 (IMXRT_IOMUXC.offset138)
  5904. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_00 (IMXRT_IOMUXC.offset13C)
  5905. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_01 (IMXRT_IOMUXC.offset140)
  5906. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_02 (IMXRT_IOMUXC.offset144)
  5907. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_03 (IMXRT_IOMUXC.offset148)
  5908. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_04 (IMXRT_IOMUXC.offset14C)
  5909. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_05 (IMXRT_IOMUXC.offset150)
  5910. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_06 (IMXRT_IOMUXC.offset154)
  5911. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_07 (IMXRT_IOMUXC.offset158)
  5912. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_08 (IMXRT_IOMUXC.offset15C)
  5913. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_09 (IMXRT_IOMUXC.offset160)
  5914. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_10 (IMXRT_IOMUXC.offset164)
  5915. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_11 (IMXRT_IOMUXC.offset168)
  5916. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_12 (IMXRT_IOMUXC.offset16C)
  5917. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_13 (IMXRT_IOMUXC.offset170)
  5918. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_14 (IMXRT_IOMUXC.offset174)
  5919. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B0_15 (IMXRT_IOMUXC.offset178)
  5920. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_00 (IMXRT_IOMUXC.offset17C)
  5921. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_01 (IMXRT_IOMUXC.offset180)
  5922. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_02 (IMXRT_IOMUXC.offset184)
  5923. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_03 (IMXRT_IOMUXC.offset188)
  5924. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_04 (IMXRT_IOMUXC.offset18C)
  5925. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_05 (IMXRT_IOMUXC.offset190)
  5926. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_06 (IMXRT_IOMUXC.offset194)
  5927. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_07 (IMXRT_IOMUXC.offset198)
  5928. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_08 (IMXRT_IOMUXC.offset19C)
  5929. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_09 (IMXRT_IOMUXC.offset1A0)
  5930. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_10 (IMXRT_IOMUXC.offset1A4)
  5931. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_11 (IMXRT_IOMUXC.offset1A8)
  5932. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_12 (IMXRT_IOMUXC.offset1AC)
  5933. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_13 (IMXRT_IOMUXC.offset1B0)
  5934. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_14 (IMXRT_IOMUXC.offset1B4)
  5935. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_B1_15 (IMXRT_IOMUXC.offset1B8)
  5936. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_00 (IMXRT_IOMUXC.offset1BC)
  5937. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_01 (IMXRT_IOMUXC.offset1C0)
  5938. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_02 (IMXRT_IOMUXC.offset1C4)
  5939. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_03 (IMXRT_IOMUXC.offset1C8)
  5940. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_04 (IMXRT_IOMUXC.offset1CC)
  5941. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B0_05 (IMXRT_IOMUXC.offset1D0)
  5942. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_00 (IMXRT_IOMUXC.offset1D4)
  5943. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_01 (IMXRT_IOMUXC.offset1D8)
  5944. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_02 (IMXRT_IOMUXC.offset1DC)
  5945. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_03 (IMXRT_IOMUXC.offset1E0)
  5946. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_04 (IMXRT_IOMUXC.offset1E4)
  5947. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_05 (IMXRT_IOMUXC.offset1E8)
  5948. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_06 (IMXRT_IOMUXC.offset1EC)
  5949. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_07 (IMXRT_IOMUXC.offset1F0)
  5950. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_08 (IMXRT_IOMUXC.offset1F4)
  5951. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_09 (IMXRT_IOMUXC.offset1F8)
  5952. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_10 (IMXRT_IOMUXC.offset1FC)
  5953. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SD_B1_11 (IMXRT_IOMUXC.offset200)
  5954. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_00 (IMXRT_IOMUXC.offset204)
  5955. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_01 (IMXRT_IOMUXC.offset208)
  5956. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_02 (IMXRT_IOMUXC.offset20C)
  5957. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_03 (IMXRT_IOMUXC.offset210)
  5958. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_04 (IMXRT_IOMUXC.offset214)
  5959. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_05 (IMXRT_IOMUXC.offset218)
  5960. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_06 (IMXRT_IOMUXC.offset21C)
  5961. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_07 (IMXRT_IOMUXC.offset220)
  5962. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_08 (IMXRT_IOMUXC.offset224)
  5963. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_09 (IMXRT_IOMUXC.offset228)
  5964. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_10 (IMXRT_IOMUXC.offset22C)
  5965. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_11 (IMXRT_IOMUXC.offset230)
  5966. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_12 (IMXRT_IOMUXC.offset234)
  5967. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_13 (IMXRT_IOMUXC.offset238)
  5968. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_14 (IMXRT_IOMUXC.offset23C)
  5969. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_15 (IMXRT_IOMUXC.offset240)
  5970. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_16 (IMXRT_IOMUXC.offset244)
  5971. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_17 (IMXRT_IOMUXC.offset248)
  5972. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_18 (IMXRT_IOMUXC.offset24C)
  5973. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_19 (IMXRT_IOMUXC.offset250)
  5974. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_20 (IMXRT_IOMUXC.offset254)
  5975. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_21 (IMXRT_IOMUXC.offset258)
  5976. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_22 (IMXRT_IOMUXC.offset25C)
  5977. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_23 (IMXRT_IOMUXC.offset260)
  5978. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_24 (IMXRT_IOMUXC.offset264)
  5979. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_25 (IMXRT_IOMUXC.offset268)
  5980. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_26 (IMXRT_IOMUXC.offset26C)
  5981. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_27 (IMXRT_IOMUXC.offset270)
  5982. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_28 (IMXRT_IOMUXC.offset274)
  5983. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_29 (IMXRT_IOMUXC.offset278)
  5984. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_30 (IMXRT_IOMUXC.offset27C)
  5985. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_31 (IMXRT_IOMUXC.offset280)
  5986. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_32 (IMXRT_IOMUXC.offset284)
  5987. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_33 (IMXRT_IOMUXC.offset288)
  5988. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_34 (IMXRT_IOMUXC.offset28C)
  5989. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_35 (IMXRT_IOMUXC.offset290)
  5990. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_36 (IMXRT_IOMUXC.offset294)
  5991. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_37 (IMXRT_IOMUXC.offset298)
  5992. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_38 (IMXRT_IOMUXC.offset29C)
  5993. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_39 (IMXRT_IOMUXC.offset2A0)
  5994. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_40 (IMXRT_IOMUXC.offset2A4)
  5995. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_EMC_41 (IMXRT_IOMUXC.offset2A8)
  5996. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_00 (IMXRT_IOMUXC.offset2AC)
  5997. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_01 (IMXRT_IOMUXC.offset2B0)
  5998. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_02 (IMXRT_IOMUXC.offset2B4)
  5999. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_03 (IMXRT_IOMUXC.offset2B8)
  6000. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_04 (IMXRT_IOMUXC.offset2BC)
  6001. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_05 (IMXRT_IOMUXC.offset2C0)
  6002. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_06 (IMXRT_IOMUXC.offset2C4)
  6003. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_07 (IMXRT_IOMUXC.offset2C8)
  6004. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_08 (IMXRT_IOMUXC.offset2CC)
  6005. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_09 (IMXRT_IOMUXC.offset2D0)
  6006. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_10 (IMXRT_IOMUXC.offset2D4)
  6007. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_11 (IMXRT_IOMUXC.offset2D8)
  6008. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_12 (IMXRT_IOMUXC.offset2DC)
  6009. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_13 (IMXRT_IOMUXC.offset2E0)
  6010. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_14 (IMXRT_IOMUXC.offset2E4)
  6011. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B0_15 (IMXRT_IOMUXC.offset2E8)
  6012. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_00 (IMXRT_IOMUXC.offset2EC)
  6013. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_01 (IMXRT_IOMUXC.offset2F0)
  6014. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_02 (IMXRT_IOMUXC.offset2F4)
  6015. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_03 (IMXRT_IOMUXC.offset2F8)
  6016. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_04 (IMXRT_IOMUXC.offset2FC)
  6017. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_05 (IMXRT_IOMUXC.offset300)
  6018. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_06 (IMXRT_IOMUXC.offset304)
  6019. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_07 (IMXRT_IOMUXC.offset308)
  6020. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_08 (IMXRT_IOMUXC.offset30C)
  6021. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_09 (IMXRT_IOMUXC.offset310)
  6022. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_10 (IMXRT_IOMUXC.offset314)
  6023. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_11 (IMXRT_IOMUXC.offset318)
  6024. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_12 (IMXRT_IOMUXC.offset31C)
  6025. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_13 (IMXRT_IOMUXC.offset320)
  6026. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_14 (IMXRT_IOMUXC.offset324)
  6027. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_AD_B1_15 (IMXRT_IOMUXC.offset328)
  6028. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_00 (IMXRT_IOMUXC.offset32C)
  6029. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_01 (IMXRT_IOMUXC.offset330)
  6030. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_02 (IMXRT_IOMUXC.offset334)
  6031. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_03 (IMXRT_IOMUXC.offset338)
  6032. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_04 (IMXRT_IOMUXC.offset33C)
  6033. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_05 (IMXRT_IOMUXC.offset340)
  6034. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_06 (IMXRT_IOMUXC.offset344)
  6035. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_07 (IMXRT_IOMUXC.offset348)
  6036. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_08 (IMXRT_IOMUXC.offset34C)
  6037. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_09 (IMXRT_IOMUXC.offset350)
  6038. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_10 (IMXRT_IOMUXC.offset354)
  6039. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_11 (IMXRT_IOMUXC.offset358)
  6040. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_12 (IMXRT_IOMUXC.offset35C)
  6041. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_13 (IMXRT_IOMUXC.offset360)
  6042. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_14 (IMXRT_IOMUXC.offset364)
  6043. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B0_15 (IMXRT_IOMUXC.offset368)
  6044. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_00 (IMXRT_IOMUXC.offset36C)
  6045. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_01 (IMXRT_IOMUXC.offset370)
  6046. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_02 (IMXRT_IOMUXC.offset374)
  6047. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_03 (IMXRT_IOMUXC.offset378)
  6048. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_04 (IMXRT_IOMUXC.offset37C)
  6049. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_05 (IMXRT_IOMUXC.offset380)
  6050. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_06 (IMXRT_IOMUXC.offset384)
  6051. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_07 (IMXRT_IOMUXC.offset388)
  6052. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_08 (IMXRT_IOMUXC.offset38C)
  6053. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_09 (IMXRT_IOMUXC.offset390)
  6054. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_10 (IMXRT_IOMUXC.offset394)
  6055. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_11 (IMXRT_IOMUXC.offset398)
  6056. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_12 (IMXRT_IOMUXC.offset39C)
  6057. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_13 (IMXRT_IOMUXC.offset3A0)
  6058. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_14 (IMXRT_IOMUXC.offset3A4)
  6059. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_B1_15 (IMXRT_IOMUXC.offset3A8)
  6060. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_00 (IMXRT_IOMUXC.offset3AC)
  6061. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_01 (IMXRT_IOMUXC.offset3B0)
  6062. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_02 (IMXRT_IOMUXC.offset3B4)
  6063. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_03 (IMXRT_IOMUXC.offset3B8)
  6064. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_04 (IMXRT_IOMUXC.offset3BC)
  6065. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B0_05 (IMXRT_IOMUXC.offset3C0)
  6066. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_00 (IMXRT_IOMUXC.offset3C4)
  6067. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_01 (IMXRT_IOMUXC.offset3C8)
  6068. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_02 (IMXRT_IOMUXC.offset3CC)
  6069. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_03 (IMXRT_IOMUXC.offset3D0)
  6070. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_04 (IMXRT_IOMUXC.offset3D4)
  6071. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_05 (IMXRT_IOMUXC.offset3D8)
  6072. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_06 (IMXRT_IOMUXC.offset3DC)
  6073. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_07 (IMXRT_IOMUXC.offset3E0)
  6074. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_08 (IMXRT_IOMUXC.offset3E4)
  6075. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_09 (IMXRT_IOMUXC.offset3E8)
  6076. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_10 (IMXRT_IOMUXC.offset3EC)
  6077. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SD_B1_11 (IMXRT_IOMUXC.offset3F0)
  6078. #define IOMUXC_ANATOP_USB_OTG_ID_SELECT_INPUT (IMXRT_IOMUXC.offset3F4)
  6079. #define IOMUXC_ANATOP_USB_UH1_ID_SELECT_INPUT (IMXRT_IOMUXC.offset3F8)
  6080. #define IOMUXC_CCM_PMIC_READY_SELECT_INPUT (IMXRT_IOMUXC.offset3FC)
  6081. #define IOMUXC_CSI_DATA02_SELECT_INPUT (IMXRT_IOMUXC_b.offset000)
  6082. #define IOMUXC_CSI_DATA03_SELECT_INPUT (IMXRT_IOMUXC_b.offset004)
  6083. #define IOMUXC_CSI_DATA04_SELECT_INPUT (IMXRT_IOMUXC_b.offset008)
  6084. #define IOMUXC_CSI_DATA05_SELECT_INPUT (IMXRT_IOMUXC_b.offset00C)
  6085. #define IOMUXC_CSI_DATA06_SELECT_INPUT (IMXRT_IOMUXC_b.offset010)
  6086. #define IOMUXC_CSI_DATA07_SELECT_INPUT (IMXRT_IOMUXC_b.offset014)
  6087. #define IOMUXC_CSI_DATA08_SELECT_INPUT (IMXRT_IOMUXC_b.offset018)
  6088. #define IOMUXC_CSI_DATA09_SELECT_INPUT (IMXRT_IOMUXC_b.offset01C)
  6089. #define IOMUXC_CSI_HSYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset020)
  6090. #define IOMUXC_CSI_PIXCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset024)
  6091. #define IOMUXC_CSI_VSYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset028)
  6092. #define IOMUXC_ENET_IPG_CLK_RMII_SELECT_INPUT (IMXRT_IOMUXC_b.offset02C)
  6093. #define IOMUXC_ENET_MDIO_SELECT_INPUT (IMXRT_IOMUXC_b.offset030)
  6094. #define IOMUXC_ENET0_RXDATA_SELECT_INPUT (IMXRT_IOMUXC_b.offset034)
  6095. #define IOMUXC_ENET1_RXDATA_SELECT_INPUT (IMXRT_IOMUXC_b.offset038)
  6096. #define IOMUXC_ENET_RXEN_SELECT_INPUT (IMXRT_IOMUXC_b.offset03C)
  6097. #define IOMUXC_ENET_RXERR_SELECT_INPUT (IMXRT_IOMUXC_b.offset040)
  6098. #define IOMUXC_ENET0_TIMER_SELECT_INPUT (IMXRT_IOMUXC_b.offset044)
  6099. #define IOMUXC_ENET_TXCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset048)
  6100. #define IOMUXC_FLEXCAN1_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset04C)
  6101. #define IOMUXC_FLEXCAN2_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset050)
  6102. #define IOMUXC_FLEXPWM1_PWMA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset054)
  6103. #define IOMUXC_FLEXPWM1_PWMA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset058)
  6104. #define IOMUXC_FLEXPWM1_PWMA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset05C)
  6105. #define IOMUXC_FLEXPWM1_PWMA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset060)
  6106. #define IOMUXC_FLEXPWM1_PWMB3_SELECT_INPUT (IMXRT_IOMUXC_b.offset064)
  6107. #define IOMUXC_FLEXPWM1_PWMB0_SELECT_INPUT (IMXRT_IOMUXC_b.offset068)
  6108. #define IOMUXC_FLEXPWM1_PWMB1_SELECT_INPUT (IMXRT_IOMUXC_b.offset06C)
  6109. #define IOMUXC_FLEXPWM1_PWMB2_SELECT_INPUT (IMXRT_IOMUXC_b.offset070)
  6110. #define IOMUXC_FLEXPWM2_PWMA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset074)
  6111. #define IOMUXC_FLEXPWM2_PWMA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset078)
  6112. #define IOMUXC_FLEXPWM2_PWMA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset07C)
  6113. #define IOMUXC_FLEXPWM2_PWMA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset080)
  6114. #define IOMUXC_FLEXPWM2_PWMB3_SELECT_INPUT (IMXRT_IOMUXC_b.offset084)
  6115. #define IOMUXC_FLEXPWM2_PWMB0_SELECT_INPUT (IMXRT_IOMUXC_b.offset088)
  6116. #define IOMUXC_FLEXPWM2_PWMB1_SELECT_INPUT (IMXRT_IOMUXC_b.offset09C)
  6117. #define IOMUXC_FLEXPWM2_PWMB2_SELECT_INPUT (IMXRT_IOMUXC_b.offset090)
  6118. #define IOMUXC_FLEXPWM4_PWMA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset094)
  6119. #define IOMUXC_FLEXPWM4_PWMA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset098)
  6120. #define IOMUXC_FLEXPWM4_PWMA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset09C)
  6121. #define IOMUXC_FLEXPWM4_PWMA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset0A0)
  6122. #define IOMUXC_FLEXSPIA_DQS_SELECT_INPUT (IMXRT_IOMUXC_b.offset0A4)
  6123. #define IOMUXC_FLEXSPIA_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0A8)
  6124. #define IOMUXC_FLEXSPIA_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset0AC)
  6125. #define IOMUXC_FLEXSPIA_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset0B0)
  6126. #define IOMUXC_FLEXSPIA_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset0B4)
  6127. #define IOMUXC_FLEXSPIB_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0B8)
  6128. #define IOMUXC_FLEXSPIB_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset0BC)
  6129. #define IOMUXC_FLEXSPIB_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset0C0)
  6130. #define IOMUXC_FLEXSPIB_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset0C4)
  6131. #define IOMUXC_FLEXSPIA_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset0C8)
  6132. #define IOMUXC_LPI2C1_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0CC)
  6133. #define IOMUXC_LPI2C1_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0D0)
  6134. #define IOMUXC_LPI2C2_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0D4)
  6135. #define IOMUXC_LPI2C2_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0D8)
  6136. #define IOMUXC_LPI2C3_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0DC)
  6137. #define IOMUXC_LPI2C3_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0E0)
  6138. #define IOMUXC_LPI2C4_SCL_SELECT_INPUT (IMXRT_IOMUXC_b.offset0E4)
  6139. #define IOMUXC_LPI2C4_SDA_SELECT_INPUT (IMXRT_IOMUXC_b.offset0E8)
  6140. #define IOMUXC_LPSPI1_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0EC)
  6141. #define IOMUXC_LPSPI1_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset0F0)
  6142. #define IOMUXC_LPSPI1_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset0F4)
  6143. #define IOMUXC_LPSPI1_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset0F8)
  6144. #define IOMUXC_LPSPI2_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset0FC)
  6145. #define IOMUXC_LPSPI2_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset100)
  6146. #define IOMUXC_LPSPI2_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset104)
  6147. #define IOMUXC_LPSPI2_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset108)
  6148. #define IOMUXC_LPSPI3_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset10C)
  6149. #define IOMUXC_LPSPI3_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset110)
  6150. #define IOMUXC_LPSPI3_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset114)
  6151. #define IOMUXC_LPSPI3_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset118)
  6152. #define IOMUXC_LPSPI4_PCS0_SELECT_INPUT (IMXRT_IOMUXC_b.offset11C)
  6153. #define IOMUXC_LPSPI4_SCK_SELECT_INPUT (IMXRT_IOMUXC_b.offset120)
  6154. #define IOMUXC_LPSPI4_SDI_SELECT_INPUT (IMXRT_IOMUXC_b.offset124)
  6155. #define IOMUXC_LPSPI4_SDO_SELECT_INPUT (IMXRT_IOMUXC_b.offset128)
  6156. #define IOMUXC_LPUART2_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset12C)
  6157. #define IOMUXC_LPUART2_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset130)
  6158. #define IOMUXC_LPUART3_CTS_B_SELECT_INPUT (IMXRT_IOMUXC_b.offset134)
  6159. #define IOMUXC_LPUART3_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset138)
  6160. #define IOMUXC_LPUART3_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset13C)
  6161. #define IOMUXC_LPUART4_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset140)
  6162. #define IOMUXC_LPUART4_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset144)
  6163. #define IOMUXC_LPUART5_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset148)
  6164. #define IOMUXC_LPUART5_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset14C)
  6165. #define IOMUXC_LPUART6_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset150)
  6166. #define IOMUXC_LPUART6_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset154)
  6167. #define IOMUXC_LPUART7_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset158)
  6168. #define IOMUXC_LPUART7_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset15C)
  6169. #define IOMUXC_LPUART8_RX_SELECT_INPUT (IMXRT_IOMUXC_b.offset160)
  6170. #define IOMUXC_LPUART8_TX_SELECT_INPUT (IMXRT_IOMUXC_b.offset164)
  6171. #define IOMUXC_NMI_GLUE_NMI_SELECT_INPUT (IMXRT_IOMUXC_b.offset168)
  6172. #define IOMUXC_QTIMER2_TIMER0_SELECT_INPUT (IMXRT_IOMUXC_b.offset16C)
  6173. #define IOMUXC_QTIMER2_TIMER1_SELECT_INPUT (IMXRT_IOMUXC_b.offset170)
  6174. #define IOMUXC_QTIMER2_TIMER2_SELECT_INPUT (IMXRT_IOMUXC_b.offset174)
  6175. #define IOMUXC_QTIMER2_TIMER3_SELECT_INPUT (IMXRT_IOMUXC_b.offset178)
  6176. #define IOMUXC_QTIMER3_TIMER0_SELECT_INPUT (IMXRT_IOMUXC_b.offset17C)
  6177. #define IOMUXC_QTIMER3_TIMER1_SELECT_INPUT (IMXRT_IOMUXC_b.offset180)
  6178. #define IOMUXC_QTIMER3_TIMER2_SELECT_INPUT (IMXRT_IOMUXC_b.offset184)
  6179. #define IOMUXC_QTIMER3_TIMER3_SELECT_INPUT (IMXRT_IOMUXC_b.offset188)
  6180. #define IOMUXC_SAI1_MCLK2_SELECT_INPUT (IMXRT_IOMUXC_b.offset18C)
  6181. #define IOMUXC_SAI1_RX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset190)
  6182. #define IOMUXC_SAI1_RX_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset194)
  6183. #define IOMUXC_SAI1_RX_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset198)
  6184. #define IOMUXC_SAI1_RX_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset19C)
  6185. #define IOMUXC_SAI1_RX_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset1A0)
  6186. #define IOMUXC_SAI1_RX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1A4)
  6187. #define IOMUXC_SAI1_TX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1A8)
  6188. #define IOMUXC_SAI1_TX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1AC)
  6189. #define IOMUXC_SAI2_MCLK2_SELECT_INPUT (IMXRT_IOMUXC_b.offset1B0)
  6190. #define IOMUXC_SAI2_RX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1B4)
  6191. #define IOMUXC_SAI2_RX_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset1B8)
  6192. #define IOMUXC_SAI2_RX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1BC)
  6193. #define IOMUXC_SAI2_TX_BCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1C0)
  6194. #define IOMUXC_SAI2_TX_SYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1C4)
  6195. #define IOMUXC_SPDIF_IN_SELECT_INPUT (IMXRT_IOMUXC_b.offset1C8)
  6196. #define IOMUXC_USB_OTG2_OC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1CC)
  6197. #define IOMUXC_USB_OTG1_OC_SELECT_INPUT (IMXRT_IOMUXC_b.offset1D0)
  6198. #define IOMUXC_USDHC1_CD_B_SELECT_INPUT (IMXRT_IOMUXC_b.offset1D4)
  6199. #define IOMUXC_USDHC1_WP_SELECT_INPUT (IMXRT_IOMUXC_b.offset1D8)
  6200. #define IOMUXC_USDHC2_CLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset1DC)
  6201. #define IOMUXC_USDHC2_CD_B_SELECT_INPUT (IMXRT_IOMUXC_b.offset1E0)
  6202. #define IOMUXC_USDHC2_CMD_SELECT_INPUT (IMXRT_IOMUXC_b.offset1E4)
  6203. #define IOMUXC_USDHC2_DATA0_SELECT_INPUT (IMXRT_IOMUXC_b.offset1E8)
  6204. #define IOMUXC_USDHC2_DATA1_SELECT_INPUT (IMXRT_IOMUXC_b.offset1EC)
  6205. #define IOMUXC_USDHC2_DATA2_SELECT_INPUT (IMXRT_IOMUXC_b.offset1F0)
  6206. #define IOMUXC_USDHC2_DATA3_SELECT_INPUT (IMXRT_IOMUXC_b.offset1F4)
  6207. #define IOMUXC_USDHC2_DATA4_SELECT_INPUT (IMXRT_IOMUXC_b.offset1F8)
  6208. #define IOMUXC_USDHC2_DATA5_SELECT_INPUT (IMXRT_IOMUXC_b.offset1FC)
  6209. #define IOMUXC_USDHC2_DATA6_SELECT_INPUT (IMXRT_IOMUXC_b.offset200)
  6210. #define IOMUXC_USDHC2_DATA7_SELECT_INPUT (IMXRT_IOMUXC_b.offset204)
  6211. #define IOMUXC_USDHC2_WP_SELECT_INPUT (IMXRT_IOMUXC_b.offset208)
  6212. #define IOMUXC_XBAR1_IN02_SELECT_INPUT (IMXRT_IOMUXC_b.offset20C)
  6213. #define IOMUXC_XBAR1_IN03_SELECT_INPUT (IMXRT_IOMUXC_b.offset210)
  6214. #define IOMUXC_XBAR1_IN04_SELECT_INPUT (IMXRT_IOMUXC_b.offset214)
  6215. #define IOMUXC_XBAR1_IN05_SELECT_INPUT (IMXRT_IOMUXC_b.offset218)
  6216. #define IOMUXC_XBAR1_IN06_SELECT_INPUT (IMXRT_IOMUXC_b.offset21C)
  6217. #define IOMUXC_XBAR1_IN07_SELECT_INPUT (IMXRT_IOMUXC_b.offset220)
  6218. #define IOMUXC_XBAR1_IN08_SELECT_INPUT (IMXRT_IOMUXC_b.offset224)
  6219. #define IOMUXC_XBAR1_IN09_SELECT_INPUT (IMXRT_IOMUXC_b.offset228)
  6220. #define IOMUXC_XBAR1_IN17_SELECT_INPUT (IMXRT_IOMUXC_b.offset22C)
  6221. #define IOMUXC_XBAR1_IN18_SELECT_INPUT (IMXRT_IOMUXC_b.offset230)
  6222. #define IOMUXC_XBAR1_IN20_SELECT_INPUT (IMXRT_IOMUXC_b.offset234)
  6223. #define IOMUXC_XBAR1_IN22_SELECT_INPUT (IMXRT_IOMUXC_b.offset238)
  6224. #define IOMUXC_XBAR1_IN23_SELECT_INPUT (IMXRT_IOMUXC_b.offset23C)
  6225. #define IOMUXC_XBAR1_IN24_SELECT_INPUT (IMXRT_IOMUXC_b.offset240)
  6226. #define IOMUXC_XBAR1_IN14_SELECT_INPUT (IMXRT_IOMUXC_b.offset244)
  6227. #define IOMUXC_XBAR1_IN15_SELECT_INPUT (IMXRT_IOMUXC_b.offset248)
  6228. #define IOMUXC_XBAR1_IN16_SELECT_INPUT (IMXRT_IOMUXC_b.offset24C)
  6229. #define IOMUXC_XBAR1_IN25_SELECT_INPUT (IMXRT_IOMUXC_b.offset250)
  6230. #define IOMUXC_XBAR1_IN19_SELECT_INPUT (IMXRT_IOMUXC_b.offset254)
  6231. #define IOMUXC_XBAR1_IN21_SELECT_INPUT (IMXRT_IOMUXC_b.offset258)
  6232. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_00 (IMXRT_IOMUXC_b.offset25C)
  6233. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_01 (IMXRT_IOMUXC_b.offset260)
  6234. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_02 (IMXRT_IOMUXC_b.offset264)
  6235. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_03 (IMXRT_IOMUXC_b.offset268)
  6236. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_04 (IMXRT_IOMUXC_b.offset26C)
  6237. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_05 (IMXRT_IOMUXC_b.offset270)
  6238. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_06 (IMXRT_IOMUXC_b.offset274)
  6239. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_07 (IMXRT_IOMUXC_b.offset278)
  6240. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_08 (IMXRT_IOMUXC_b.offset27C)
  6241. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_09 (IMXRT_IOMUXC_b.offset280)
  6242. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_10 (IMXRT_IOMUXC_b.offset284)
  6243. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_11 (IMXRT_IOMUXC_b.offset288)
  6244. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_12 (IMXRT_IOMUXC_b.offset28C)
  6245. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B0_13 (IMXRT_IOMUXC_b.offset290)
  6246. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_00 (IMXRT_IOMUXC_b.offset294)
  6247. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_01 (IMXRT_IOMUXC_b.offset298)
  6248. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_02 (IMXRT_IOMUXC_b.offset29C)
  6249. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_03 (IMXRT_IOMUXC_b.offset2A0)
  6250. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_04 (IMXRT_IOMUXC_b.offset2A4)
  6251. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_05 (IMXRT_IOMUXC_b.offset2A8)
  6252. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_06 (IMXRT_IOMUXC_b.offset2AC)
  6253. #define IOMUXC_SW_MUX_CTL_PAD_GPIO_SPI_B1_07 (IMXRT_IOMUXC_b.offset2B0)
  6254. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_00 (IMXRT_IOMUXC_b.offset2B4)
  6255. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_01 (IMXRT_IOMUXC_b.offset2B8)
  6256. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_02 (IMXRT_IOMUXC_b.offset2BC)
  6257. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_03 (IMXRT_IOMUXC_b.offset2C0)
  6258. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_04 (IMXRT_IOMUXC_b.offset2C4)
  6259. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_05 (IMXRT_IOMUXC_b.offset2C8)
  6260. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_06 (IMXRT_IOMUXC_b.offset2CC)
  6261. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_07 (IMXRT_IOMUXC_b.offset2D0)
  6262. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_08 (IMXRT_IOMUXC_b.offset2D4)
  6263. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_09 (IMXRT_IOMUXC_b.offset2D8)
  6264. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_10 (IMXRT_IOMUXC_b.offset2DC)
  6265. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_11 (IMXRT_IOMUXC_b.offset2E0)
  6266. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_12 (IMXRT_IOMUXC_b.offset2E4)
  6267. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B0_13 (IMXRT_IOMUXC_b.offset2E8)
  6268. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_00 (IMXRT_IOMUXC_b.offset2EC)
  6269. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_01 (IMXRT_IOMUXC_b.offset2F0)
  6270. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_02 (IMXRT_IOMUXC_b.offset2F4)
  6271. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_03 (IMXRT_IOMUXC_b.offset2F8)
  6272. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_04 (IMXRT_IOMUXC_b.offset2FC)
  6273. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_05 (IMXRT_IOMUXC_b.offset300)
  6274. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_06 (IMXRT_IOMUXC_b.offset304)
  6275. #define IOMUXC_SW_PAD_CTL_PAD_GPIO_SPI_B1_07 (IMXRT_IOMUXC_b.offset308)
  6276. #define IOMUXC_ENET2_IPG_CLK_RMII_SELECT_INPUT (IMXRT_IOMUXC_b.offset30C)
  6277. #define IOMUXC_ENET2_IPP_IND_MAC0_MDIO_SELECT_INPUT (IMXRT_IOMUXC_b.offset310)
  6278. #define IOMUXC_ENET2_IPP_IND_MAC0_RXDATA_SELECT_INPUT_0 (IMXRT_IOMUXC_b.offset314)
  6279. #define IOMUXC_ENET2_IPP_IND_MAC0_RXDATA_SELECT_INPUT_1 (IMXRT_IOMUXC_b.offset318)
  6280. #define IOMUXC_ENET2_IPP_IND_MAC0_RXEN_SELECT_INPUT (IMXRT_IOMUXC_b.offset31C)
  6281. #define IOMUXC_ENET2_IPP_IND_MAC0_RXERR_SELECT_INPUT (IMXRT_IOMUXC_b.offset320)
  6282. #define IOMUXC_ENET2_IPP_IND_MAC0_TIMER_SELECT_INPUT_0 (IMXRT_IOMUXC_b.offset324)
  6283. #define IOMUXC_ENET2_IPP_IND_MAC0_TXCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset328)
  6284. #define IOMUXC_FLEXSPI2_IPP_IND_DQS_FA_SELECT_INPUT (IMXRT_IOMUXC_b.offset32C)
  6285. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT0_SELECT_INPUT (IMXRT_IOMUXC_b.offset330)
  6286. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT1_SELECT_INPUT (IMXRT_IOMUXC_b.offset334)
  6287. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT2_SELECT_INPUT (IMXRT_IOMUXC_b.offset338)
  6288. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FA_BIT3_SELECT_INPUT (IMXRT_IOMUXC_b.offset33C)
  6289. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FB_BIT0_SELECT_INPUT (IMXRT_IOMUXC_b.offset340)
  6290. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FB_BIT1_SELECT_INPUT (IMXRT_IOMUXC_b.offset344)
  6291. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FB_BIT2_SELECT_INPUT (IMXRT_IOMUXC_b.offset348)
  6292. #define IOMUXC_FLEXSPI2_IPP_IND_IO_FB_BIT3_SELECT_INPUT (IMXRT_IOMUXC_b.offset34C)
  6293. #define IOMUXC_FLEXSPI2_IPP_IND_SCK_FA_SELECT_INPUT (IMXRT_IOMUXC_b.offset350)
  6294. #define IOMUXC_FLEXSPI2_IPP_IND_SCK_FB_SELECT_INPUT (IMXRT_IOMUXC_b.offset354)
  6295. #define IOMUXC_GPT1_IPP_IND_CAPIN1_SELECT_INPUT (IMXRT_IOMUXC_b.offset358)
  6296. #define IOMUXC_GPT1_IPP_IND_CAPIN2_SELECT_INPUT (IMXRT_IOMUXC_b.offset35C)
  6297. #define IOMUXC_GPT1_IPP_IND_CLKIN_SELECT_INPUT (IMXRT_IOMUXC_b.offset360)
  6298. #define IOMUXC_GPT2_IPP_IND_CAPIN1_SELECT_INPUT (IMXRT_IOMUXC_b.offset364)
  6299. #define IOMUXC_GPT2_IPP_IND_CAPIN2_SELECT_INPUT (IMXRT_IOMUXC_b.offset368)
  6300. #define IOMUXC_GPT2_IPP_IND_CLKIN_SELECT_INPUT (IMXRT_IOMUXC_b.offset36C)
  6301. #define IOMUXC_SAI3_IPG_CLK_SAI_MCLK_SELECT_INPUT_2 (IMXRT_IOMUXC_b.offset370)
  6302. #define IOMUXC_SAI3_IPP_IND_SAI_RXBCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset374)
  6303. #define IOMUXC_SAI3_IPP_IND_SAI_RXDATA_SELECT_INPUT_0 (IMXRT_IOMUXC_b.offset378)
  6304. #define IOMUXC_SAI3_IPP_IND_SAI_RXSYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset37C)
  6305. #define IOMUXC_SAI3_IPP_IND_SAI_TXBCLK_SELECT_INPUT (IMXRT_IOMUXC_b.offset380)
  6306. #define IOMUXC_SAI3_IPP_IND_SAI_TXSYNC_SELECT_INPUT (IMXRT_IOMUXC_b.offset384)
  6307. #define IOMUXC_SEMC_I_IPP_IND_DQS4_SELECT_INPUT (IMXRT_IOMUXC_b.offset388)
  6308. #define IOMUXC_CANFD_IPP_IND_CANRX_SELECT_INPUT (IMXRT_IOMUXC_b.offset38C)
  6309. #define IOMUXC_PAD_SRE ((uint32_t)(1<<0))
  6310. #define IOMUXC_PAD_DSE(n) ((uint32_t)(((n) & 0x07) << 3))
  6311. #define IOMUXC_PAD_SPEED(n) ((uint32_t)(((n) & 0x03) << 6))
  6312. #define IOMUXC_PAD_ODE ((uint32_t)(1<<11))
  6313. #define IOMUXC_PAD_PKE ((uint32_t)(1<<12))
  6314. #define IOMUXC_PAD_PUE ((uint32_t)(1<<13))
  6315. #define IOMUXC_PAD_PUS(n) ((uint32_t)(((n) & 0x03) << 14))
  6316. #define IOMUXC_PAD_HYS ((uint32_t)(1<<16))
  6317. // 46.7: page 2732
  6318. #define IMXRT_KPP (*(IMXRT_REGISTER16_t *)IMXRT_KPP_ADDRESS)
  6319. #define KPP_KPCR (IMXRT_KPP.offset000)
  6320. #define KPP_KPSR (IMXRT_KPP.offset002)
  6321. #define KPP_KDDR (IMXRT_KPP.offset004)
  6322. #define KPP_KPDR (IMXRT_KPP.offset006)
  6323. // 35.7: page 1860
  6324. #define IMXRT_LCDIF (*(IMXRT_REGISTER32_t *)IMXRT_LCDIF_ADDRESS)
  6325. #define LCDIF_CTRL (IMXRT_LCDIF.offset000)
  6326. #define LCDIF_CTRL_SET (IMXRT_LCDIF.offset004)
  6327. #define LCDIF_CTRL_CLR (IMXRT_LCDIF.offset008)
  6328. #define LCDIF_CTRL_TOG (IMXRT_LCDIF.offset00C)
  6329. #define LCDIF_CTRL1 (IMXRT_LCDIF.offset010)
  6330. #define LCDIF_CTRL1_SET (IMXRT_LCDIF.offset014)
  6331. #define LCDIF_CTRL1_CLR (IMXRT_LCDIF.offset018)
  6332. #define LCDIF_CTRL1_TOG (IMXRT_LCDIF.offset01C)
  6333. #define LCDIF_CTRL2 (IMXRT_LCDIF.offset020)
  6334. #define LCDIF_CTRL2_SET (IMXRT_LCDIF.offset024)
  6335. #define LCDIF_CTRL2_CLR (IMXRT_LCDIF.offset028)
  6336. #define LCDIF_CTRL2_TOG (IMXRT_LCDIF.offset02C)
  6337. #define LCDIF_TRANSFER_COUNT (IMXRT_LCDIF.offset030)
  6338. #define LCDIF_CUR_BUF (IMXRT_LCDIF.offset040)
  6339. #define LCDIF_NEXT_BUF (IMXRT_LCDIF.offset050)
  6340. #define LCDIF_VDCTRL0 (IMXRT_LCDIF.offset070)
  6341. #define LCDIF_VDCTRL0_SET (IMXRT_LCDIF.offset074)
  6342. #define LCDIF_VDCTRL0_CLR (IMXRT_LCDIF.offset078)
  6343. #define LCDIF_VDCTRL0_TOG (IMXRT_LCDIF.offset07C)
  6344. #define LCDIF_VDCTRL1 (IMXRT_LCDIF.offset080)
  6345. #define LCDIF_VDCTRL2 (IMXRT_LCDIF.offset090)
  6346. #define LCDIF_VDCTRL3 (IMXRT_LCDIF.offset0A0)
  6347. #define LCDIF_VDCTRL4 (IMXRT_LCDIF.offset0B0)
  6348. #define LCDIF_BM_ERROR_STAT (IMXRT_LCDIF.offset190)
  6349. #define LCDIF_CRC_STAT (IMXRT_LCDIF.offset1A0)
  6350. #define LCDIF_STAT (IMXRT_LCDIF.offset1B0)
  6351. #define LCDIF_THRES (IMXRT_LCDIF.offset200)
  6352. #define LCDIF_AS_CTRL (IMXRT_LCDIF.offset210)
  6353. #define LCDIF_AS_BUF (IMXRT_LCDIF.offset220)
  6354. #define LCDIF_AS_NEXT_BUF (IMXRT_LCDIF.offset230)
  6355. #define LCDIF_AS_CLRKEYLOW (IMXRT_LCDIF.offset240)
  6356. #define LCDIF_AS_CLRKEYHIGH (IMXRT_LCDIF.offset250)
  6357. #define LCDIF_PIGEONCTRL0 (IMXRT_LCDIF.offset380)
  6358. #define LCDIF_PIGEONCTRL0_SET (IMXRT_LCDIF.offset384)
  6359. #define LCDIF_PIGEONCTRL0_CLR (IMXRT_LCDIF.offset388)
  6360. #define LCDIF_PIGEONCTRL0_TOG (IMXRT_LCDIF.offset38C)
  6361. #define LCDIF_PIGEONCTRL1 (IMXRT_LCDIF.offset390)
  6362. #define LCDIF_PIGEONCTRL1_SET (IMXRT_LCDIF.offset394)
  6363. #define LCDIF_PIGEONCTRL1_CLR (IMXRT_LCDIF.offset398)
  6364. #define LCDIF_PIGEONCTRL1_TOG (IMXRT_LCDIF.offset39C)
  6365. #define LCDIF_PIGEONCTRL2 (IMXRT_LCDIF.offset3A0)
  6366. #define LCDIF_PIGEONCTRL2_SET (IMXRT_LCDIF.offset3A4)
  6367. #define LCDIF_PIGEONCTRL2_CLR (IMXRT_LCDIF.offset3A8)
  6368. #define LCDIF_PIGEONCTRL2_TOG (IMXRT_LCDIF.offset3AC)
  6369. #define IMXRT_LCDIF_b (*(IMXRT_REGISTER32_t *)(IMXRT_LCDIF_ADDRESS+0x800))
  6370. #define LCDIF_PIGEON_0_0 (IMXRT_LCDIF_b.offset000)
  6371. #define LCDIF_PIGEON_0_1 (IMXRT_LCDIF_b.offset010)
  6372. #define LCDIF_PIGEON_0_2 (IMXRT_LCDIF_b.offset020)
  6373. #define LCDIF_PIGEON_1_0 (IMXRT_LCDIF_b.offset040)
  6374. #define LCDIF_PIGEON_1_1 (IMXRT_LCDIF_b.offset050)
  6375. #define LCDIF_PIGEON_1_2 (IMXRT_LCDIF_b.offset060)
  6376. #define LCDIF_PIGEON_2_0 (IMXRT_LCDIF_b.offset080)
  6377. #define LCDIF_PIGEON_2_1 (IMXRT_LCDIF_b.offset090)
  6378. #define LCDIF_PIGEON_2_2 (IMXRT_LCDIF_b.offset0A0)
  6379. #define LCDIF_PIGEON_3_0 (IMXRT_LCDIF_b.offset0C0)
  6380. #define LCDIF_PIGEON_3_1 (IMXRT_LCDIF_b.offset0D0)
  6381. #define LCDIF_PIGEON_3_2 (IMXRT_LCDIF_b.offset0E0)
  6382. #define LCDIF_PIGEON_4_0 (IMXRT_LCDIF_b.offset100)
  6383. #define LCDIF_PIGEON_4_1 (IMXRT_LCDIF_b.offset110)
  6384. #define LCDIF_PIGEON_4_2 (IMXRT_LCDIF_b.offset120)
  6385. #define LCDIF_PIGEON_5_0 (IMXRT_LCDIF_b.offset140)
  6386. #define LCDIF_PIGEON_5_1 (IMXRT_LCDIF_b.offset150)
  6387. #define LCDIF_PIGEON_5_2 (IMXRT_LCDIF_b.offset160)
  6388. #define LCDIF_PIGEON_6_0 (IMXRT_LCDIF_b.offset180)
  6389. #define LCDIF_PIGEON_6_1 (IMXRT_LCDIF_b.offset190)
  6390. #define LCDIF_PIGEON_6_2 (IMXRT_LCDIF_b.offset1A0)
  6391. #define LCDIF_PIGEON_7_0 (IMXRT_LCDIF_b.offset1C0)
  6392. #define LCDIF_PIGEON_7_1 (IMXRT_LCDIF_b.offset1D0)
  6393. #define LCDIF_PIGEON_7_2 (IMXRT_LCDIF_b.offset1E0)
  6394. #define LCDIF_PIGEON_8_0 (IMXRT_LCDIF_b.offset200)
  6395. #define LCDIF_PIGEON_8_1 (IMXRT_LCDIF_b.offset210)
  6396. #define LCDIF_PIGEON_8_2 (IMXRT_LCDIF_b.offset220)
  6397. #define LCDIF_PIGEON_9_0 (IMXRT_LCDIF_b.offset240)
  6398. #define LCDIF_PIGEON_9_1 (IMXRT_LCDIF_b.offset250)
  6399. #define LCDIF_PIGEON_9_2 (IMXRT_LCDIF_b.offset260)
  6400. #define LCDIF_PIGEON_10_0 (IMXRT_LCDIF_b.offset280)
  6401. #define LCDIF_PIGEON_10_1 (IMXRT_LCDIF_b.offset290)
  6402. #define LCDIF_PIGEON_10_2 (IMXRT_LCDIF_b.offset2A0)
  6403. #define LCDIF_PIGEON_11_0 (IMXRT_LCDIF_b.offset2C0)
  6404. #define LCDIF_PIGEON_11_1 (IMXRT_LCDIF_b.offset2D0)
  6405. #define LCDIF_PIGEON_11_2 (IMXRT_LCDIF_b.offset2E0)
  6406. // 47.4.1.1: page 2758
  6407. typedef struct {
  6408. const uint32_t VERID;
  6409. const uint32_t PARAM;
  6410. const uint32_t unused1;
  6411. const uint32_t unused2;
  6412. volatile uint32_t MCR; // 010
  6413. volatile uint32_t MSR; // 014
  6414. volatile uint32_t MIER; // 018
  6415. volatile uint32_t MDER; // 01C
  6416. volatile uint32_t MCFGR0; // 020
  6417. volatile uint32_t MCFGR1; // 024
  6418. volatile uint32_t MCFGR2; // 028
  6419. volatile uint32_t MCFGR3; // 02C
  6420. volatile uint32_t unused3[4];
  6421. volatile uint32_t MDMR; // 040
  6422. volatile uint32_t unused4;
  6423. volatile uint32_t MCCR0; // 048
  6424. volatile uint32_t unused5;
  6425. volatile uint32_t MCCR1; // 050
  6426. volatile uint32_t unused6;
  6427. volatile uint32_t MFCR; // 058
  6428. volatile uint32_t MFSR; // 05C
  6429. volatile uint32_t MTDR; // 060
  6430. volatile uint32_t unused7[3];
  6431. volatile uint32_t MRDR; // 070
  6432. volatile uint32_t unused8[39];
  6433. volatile uint32_t SCR; // 110
  6434. volatile uint32_t SSR; // 114
  6435. volatile uint32_t SIER; // 118
  6436. volatile uint32_t SDER; // 11C
  6437. volatile uint32_t unused9;
  6438. volatile uint32_t SCFGR1; // 124
  6439. volatile uint32_t SCFGR2; // 128
  6440. volatile uint32_t unused10[5];
  6441. volatile uint32_t SAMR; // 140
  6442. volatile uint32_t unused11[3];
  6443. volatile uint32_t SASR; // 150
  6444. volatile uint32_t unused12[3];
  6445. volatile uint32_t STAR; // 154
  6446. volatile uint32_t unused13[3];
  6447. volatile uint32_t STDR; // 160
  6448. volatile uint32_t unused14[3];
  6449. volatile uint32_t SRDR; // 170
  6450. } IMXRT_LPI2C_t;
  6451. #define IMXRT_LPI2C1 (*(IMXRT_LPI2C_t *)IMXRT_LPI2C1_ADDRESS)
  6452. #define LPI2C1_VERID (IMXRT_LPI2C1.VERID)
  6453. #define LPI2C1_PARAM (IMXRT_LPI2C1.PARAM)
  6454. #define LPI2C1_MCR (IMXRT_LPI2C1.MCR)
  6455. #define LPI2C1_MSR (IMXRT_LPI2C1.MSR)
  6456. #define LPI2C1_MIER (IMXRT_LPI2C1.MIER)
  6457. #define LPI2C1_MDER (IMXRT_LPI2C1.MDER)
  6458. #define LPI2C1_MCFGR0 (IMXRT_LPI2C1.MCFGR0)
  6459. #define LPI2C1_MCFGR1 (IMXRT_LPI2C1.MCFGR1)
  6460. #define LPI2C1_MCFGR2 (IMXRT_LPI2C1.MCFGR2)
  6461. #define LPI2C1_MCFGR3 (IMXRT_LPI2C1.MCFGR3)
  6462. #define LPI2C1_MDMR (IMXRT_LPI2C1.MDMR)
  6463. #define LPI2C1_MCCR0 (IMXRT_LPI2C1.MCCR0)
  6464. #define LPI2C1_MCCR1 (IMXRT_LPI2C1.MCCR1)
  6465. #define LPI2C1_MFCR (IMXRT_LPI2C1.MFCR)
  6466. #define LPI2C1_MFSR (IMXRT_LPI2C1.MFSR)
  6467. #define LPI2C1_MTDR (IMXRT_LPI2C1.MTDR)
  6468. #define LPI2C1_MRDR (IMXRT_LPI2C1.MRDR)
  6469. #define LPI2C1_SCR (IMXRT_LPI2C1.SCR)
  6470. #define LPI2C1_SSR (IMXRT_LPI2C1.SSR)
  6471. #define LPI2C1_SIER (IMXRT_LPI2C1.SIER)
  6472. #define LPI2C1_SDER (IMXRT_LPI2C1.SDER)
  6473. #define LPI2C1_SCFGR1 (IMXRT_LPI2C1.SCFGR1)
  6474. #define LPI2C1_SCFGR2 (IMXRT_LPI2C1.SCFGR2)
  6475. #define LPI2C1_SAMR (IMXRT_LPI2C1.SAMR)
  6476. #define LPI2C1_SASR (IMXRT_LPI2C1.SASR)
  6477. #define LPI2C1_STAR (IMXRT_LPI2C1.STAR)
  6478. #define LPI2C1_STDR (IMXRT_LPI2C1.STDR)
  6479. #define LPI2C1_SRDR (IMXRT_LPI2C1.SRDR)
  6480. #define IMXRT_LPI2C2 (*(IMXRT_LPI2C_t *)IMXRT_LPI2C2_ADDRESS)
  6481. #define LPI2C2_VERID (IMXRT_LPI2C2.VERID)
  6482. #define LPI2C2_PARAM (IMXRT_LPI2C2.PARAM)
  6483. #define LPI2C2_MCR (IMXRT_LPI2C2.MCR)
  6484. #define LPI2C2_MSR (IMXRT_LPI2C2.MSR)
  6485. #define LPI2C2_MIER (IMXRT_LPI2C2.MIER)
  6486. #define LPI2C2_MDER (IMXRT_LPI2C2.MDER)
  6487. #define LPI2C2_MCFGR0 (IMXRT_LPI2C2.MCFGR0)
  6488. #define LPI2C2_MCFGR1 (IMXRT_LPI2C2.MCFGR1)
  6489. #define LPI2C2_MCFGR2 (IMXRT_LPI2C2.MCFGR2)
  6490. #define LPI2C2_MCFGR3 (IMXRT_LPI2C2.MCFGR3)
  6491. #define LPI2C2_MDMR (IMXRT_LPI2C2.MDMR)
  6492. #define LPI2C2_MCCR0 (IMXRT_LPI2C2.MCCR0)
  6493. #define LPI2C2_MCCR1 (IMXRT_LPI2C2.MCCR1)
  6494. #define LPI2C2_MFCR (IMXRT_LPI2C2.MFCR)
  6495. #define LPI2C2_MFSR (IMXRT_LPI2C2.MFSR)
  6496. #define LPI2C2_MTDR (IMXRT_LPI2C2.MTDR)
  6497. #define LPI2C2_MRDR (IMXRT_LPI2C2.MRDR)
  6498. #define LPI2C2_SCR (IMXRT_LPI2C2.SCR)
  6499. #define LPI2C2_SSR (IMXRT_LPI2C2.SSR)
  6500. #define LPI2C2_SIER (IMXRT_LPI2C2.SIER)
  6501. #define LPI2C2_SDER (IMXRT_LPI2C2.SDER)
  6502. #define LPI2C2_SCFGR1 (IMXRT_LPI2C2.SCFGR1)
  6503. #define LPI2C2_SCFGR2 (IMXRT_LPI2C2.SCFGR2)
  6504. #define LPI2C2_SAMR (IMXRT_LPI2C2.SAMR)
  6505. #define LPI2C2_SASR (IMXRT_LPI2C2.SASR)
  6506. #define LPI2C2_STAR (IMXRT_LPI2C2.STAR)
  6507. #define LPI2C2_STDR (IMXRT_LPI2C2.STDR)
  6508. #define LPI2C2_SRDR (IMXRT_LPI2C2.SRDR)
  6509. #define IMXRT_LPI2C3 (*(IMXRT_LPI2C_t *)IMXRT_LPI2C3_ADDRESS)
  6510. #define LPI2C3_VERID (IMXRT_LPI2C3.VERID)
  6511. #define LPI2C3_PARAM (IMXRT_LPI2C3.PARAM)
  6512. #define LPI2C3_MCR (IMXRT_LPI2C3.MCR)
  6513. #define LPI2C3_MSR (IMXRT_LPI2C3.MSR)
  6514. #define LPI2C3_MIER (IMXRT_LPI2C3.MIER)
  6515. #define LPI2C3_MDER (IMXRT_LPI2C3.MDER)
  6516. #define LPI2C3_MCFGR0 (IMXRT_LPI2C3.MCFGR0)
  6517. #define LPI2C3_MCFGR1 (IMXRT_LPI2C3.MCFGR1)
  6518. #define LPI2C3_MCFGR2 (IMXRT_LPI2C3.MCFGR2)
  6519. #define LPI2C3_MCFGR3 (IMXRT_LPI2C3.MCFGR3)
  6520. #define LPI2C3_MDMR (IMXRT_LPI2C3.MDMR)
  6521. #define LPI2C3_MCCR0 (IMXRT_LPI2C3.MCCR0)
  6522. #define LPI2C3_MCCR1 (IMXRT_LPI2C3.MCCR1)
  6523. #define LPI2C3_MFCR (IMXRT_LPI2C3.MFCR)
  6524. #define LPI2C3_MFSR (IMXRT_LPI2C3.MFSR)
  6525. #define LPI2C3_MTDR (IMXRT_LPI2C3.MTDR)
  6526. #define LPI2C3_MRDR (IMXRT_LPI2C3.MRDR)
  6527. #define LPI2C3_SCR (IMXRT_LPI2C3.SCR)
  6528. #define LPI2C3_SSR (IMXRT_LPI2C3.SSR)
  6529. #define LPI2C3_SIER (IMXRT_LPI2C3.SIER)
  6530. #define LPI2C3_SDER (IMXRT_LPI2C3.SDER)
  6531. #define LPI2C3_SCFGR1 (IMXRT_LPI2C3.SCFGR1)
  6532. #define LPI2C3_SCFGR2 (IMXRT_LPI2C3.SCFGR2)
  6533. #define LPI2C3_SAMR (IMXRT_LPI2C3.SAMR)
  6534. #define LPI2C3_SASR (IMXRT_LPI2C3.SASR)
  6535. #define LPI2C3_STAR (IMXRT_LPI2C3.STAR)
  6536. #define LPI2C3_STDR (IMXRT_LPI2C3.STDR)
  6537. #define LPI2C3_SRDR (IMXRT_LPI2C3.SRDR)
  6538. #define IMXRT_LPI2C4 (*(IMXRT_LPI2C_t *)IMXRT_LPI2C4_ADDRESS)
  6539. #define LPI2C4_VERID (IMXRT_LPI2C4.VERID)
  6540. #define LPI2C4_PARAM (IMXRT_LPI2C4.PARAM)
  6541. #define LPI2C4_MCR (IMXRT_LPI2C4.MCR)
  6542. #define LPI2C4_MSR (IMXRT_LPI2C4.MSR)
  6543. #define LPI2C4_MIER (IMXRT_LPI2C4.MIER)
  6544. #define LPI2C4_MDER (IMXRT_LPI2C4.MDER)
  6545. #define LPI2C4_MCFGR0 (IMXRT_LPI2C4.MCFGR0)
  6546. #define LPI2C4_MCFGR1 (IMXRT_LPI2C4.MCFGR1)
  6547. #define LPI2C4_MCFGR2 (IMXRT_LPI2C4.MCFGR2)
  6548. #define LPI2C4_MCFGR3 (IMXRT_LPI2C4.MCFGR3)
  6549. #define LPI2C4_MDMR (IMXRT_LPI2C4.MDMR)
  6550. #define LPI2C4_MCCR0 (IMXRT_LPI2C4.MCCR0)
  6551. #define LPI2C4_MCCR1 (IMXRT_LPI2C4.MCCR1)
  6552. #define LPI2C4_MFCR (IMXRT_LPI2C4.MFCR)
  6553. #define LPI2C4_MFSR (IMXRT_LPI2C4.MFSR)
  6554. #define LPI2C4_MTDR (IMXRT_LPI2C4.MTDR)
  6555. #define LPI2C4_MRDR (IMXRT_LPI2C4.MRDR)
  6556. #define LPI2C4_SCR (IMXRT_LPI2C4.SCR)
  6557. #define LPI2C4_SSR (IMXRT_LPI2C4.SSR)
  6558. #define LPI2C4_SIER (IMXRT_LPI2C4.SIER)
  6559. #define LPI2C4_SDER (IMXRT_LPI2C4.SDER)
  6560. #define LPI2C4_SCFGR1 (IMXRT_LPI2C4.SCFGR1)
  6561. #define LPI2C4_SCFGR2 (IMXRT_LPI2C4.SCFGR2)
  6562. #define LPI2C4_SAMR (IMXRT_LPI2C4.SAMR)
  6563. #define LPI2C4_SASR (IMXRT_LPI2C4.SASR)
  6564. #define LPI2C4_STAR (IMXRT_LPI2C4.STAR)
  6565. #define LPI2C4_STDR (IMXRT_LPI2C4.STDR)
  6566. #define LPI2C4_SRDR (IMXRT_LPI2C4.SRDR)
  6567. #define LPI2C_MCR_RRF ((uint32_t)(1<<9))
  6568. #define LPI2C_MCR_RTF ((uint32_t)(1<<8))
  6569. #define LPI2C_MCR_DBGEN ((uint32_t)(1<<3))
  6570. #define LPI2C_MCR_DOZEN ((uint32_t)(1<<2))
  6571. #define LPI2C_MCR_RST ((uint32_t)(1<<1))
  6572. #define LPI2C_MCR_MEN ((uint32_t)(1<<0))
  6573. #define LPI2C_MSR_BBF ((uint32_t)(1<<25))
  6574. #define LPI2C_MSR_MBF ((uint32_t)(1<<24))
  6575. #define LPI2C_MSR_DMF ((uint32_t)(1<<14))
  6576. #define LPI2C_MSR_PLTF ((uint32_t)(1<<13))
  6577. #define LPI2C_MSR_FEF ((uint32_t)(1<<12))
  6578. #define LPI2C_MSR_ALF ((uint32_t)(1<<11))
  6579. #define LPI2C_MSR_NDF ((uint32_t)(1<<10))
  6580. #define LPI2C_MSR_SDF ((uint32_t)(1<<9))
  6581. #define LPI2C_MSR_EPF ((uint32_t)(1<<8))
  6582. #define LPI2C_MSR_RDF ((uint32_t)(1<<1))
  6583. #define LPI2C_MSR_TDF ((uint32_t)(1<<0))
  6584. #define LPI2C_MIER_DMIE ((uint32_t)(1<<14))
  6585. #define LPI2C_MIER_PLTIE ((uint32_t)(1<<13))
  6586. #define LPI2C_MIER_FEIE ((uint32_t)(1<<12))
  6587. #define LPI2C_MIER_ALIE ((uint32_t)(1<<11))
  6588. #define LPI2C_MIER_NDIE ((uint32_t)(1<<10))
  6589. #define LPI2C_MIER_SDIE ((uint32_t)(1<<9))
  6590. #define LPI2C_MIER_EPIE ((uint32_t)(1<<8))
  6591. #define LPI2C_MIER_RDIE ((uint32_t)(1<<1))
  6592. #define LPI2C_MIER_TDIE ((uint32_t)(1<<0))
  6593. #define LPI2C_MDER_RDDE ((uint32_t)(1<<1))
  6594. #define LPI2C_MDER_TDDE ((uint32_t)(1<<0))
  6595. #define LPI2C_MCFGR0_RDMO ((uint32_t)(1<<9))
  6596. #define LPI2C_MCFGR0_CIRFIFO ((uint32_t)(1<<8))
  6597. #define LPI2C_MCFGR0_HRSEL ((uint32_t)(1<<2))
  6598. #define LPI2C_MCFGR0_HRPOL ((uint32_t)(1<<1))
  6599. #define LPI2C_MCFGR0_HREN ((uint32_t)(1<<0))
  6600. #define LPI2C_MCFGR1_PINCFG(n) ((uint32_t)(((n) & 0x07) << 24))
  6601. #define LPI2C_MCFGR1_MATCFG(n) ((uint32_t)(((n) & 0x07) << 16))
  6602. #define LPI2C_MCFGR1_TIMECFG ((uint32_t)(1<<10))
  6603. #define LPI2C_MCFGR1_IGNACK ((uint32_t)(1<<9))
  6604. #define LPI2C_MCFGR1_AUTOSTOP ((uint32_t)(1<<8))
  6605. #define LPI2C_MCFGR1_PRESCALE(n) ((uint32_t)(((n) & 0x07) << 0))
  6606. #define LPI2C_MCFGR2_FILTSDA(n) ((uint32_t)(((n) & 0x0F) << 24))
  6607. #define LPI2C_MCFGR2_FILTSCL(n) ((uint32_t)(((n) & 0x0F) << 16))
  6608. #define LPI2C_MCFGR2_BUSIDLE(n) ((uint32_t)(((n) & 0xFFF) << 0))
  6609. #define LPI2C_MCFGR3_PINLOW(n) ((uint32_t)(((n) & 0xFFF) << 8))
  6610. #define LPI2C_MDMR_MATCH1(n) ((uint32_t)(((n) & 0xFF) << 16))
  6611. #define LPI2C_MDMR_MATCH0(n) ((uint32_t)(((n) & 0xFF) << 0))
  6612. #define LPI2C_MCCR0_DATAVD(n) ((uint32_t)(((n) & 0x3F) << 24))
  6613. #define LPI2C_MCCR0_SETHOLD(n) ((uint32_t)(((n) & 0x3F) << 16))
  6614. #define LPI2C_MCCR0_CLKHI(n) ((uint32_t)(((n) & 0x3F) << 8))
  6615. #define LPI2C_MCCR0_CLKLO(n) ((uint32_t)(((n) & 0x3F) << 0))
  6616. #define LPI2C_MCCR1_DATAVD(n) ((uint32_t)(((n) & 0x3F) << 24))
  6617. #define LPI2C_MCCR1_SETHOLD(n) ((uint32_t)(((n) & 0x3F) << 16))
  6618. #define LPI2C_MCCR1_CLKHI(n) ((uint32_t)(((n) & 0x3F) << 8))
  6619. #define LPI2C_MCCR1_CLKLO(n) ((uint32_t)(((n) & 0x3F) << 0))
  6620. #define LPI2C_MFCR_RXWATER(n) ((uint32_t)(((n) & 0x03) << 16))
  6621. #define LPI2C_MFCR_TXWATER(n) ((uint32_t)(((n) & 0x03) << 0))
  6622. #define LPI2C_MFSR_RXCOUNT(n) ((uint32_t)(((n) & 0x07) << 16))
  6623. #define LPI2C_MFSR_TXCOUNT(n) ((uint32_t)(((n) & 0x07) << 16))
  6624. #define LPI2C_MTDR_CMD(n) ((uint32_t)(((n) & 0x07) << 8))
  6625. #define LPI2C_MTDR_CMD_TRANSMIT ((uint32_t)(0 << 8))
  6626. #define LPI2C_MTDR_CMD_RECEIVE ((uint32_t)(1 << 8))
  6627. #define LPI2C_MTDR_CMD_STOP ((uint32_t)(2 << 8))
  6628. #define LPI2C_MTDR_CMD_DISCARD ((uint32_t)(3 << 8))
  6629. #define LPI2C_MTDR_CMD_START ((uint32_t)(4 << 8))
  6630. #define LPI2C_MTDR_CMD_START_NACK ((uint32_t)(5 << 8))
  6631. #define LPI2C_MTDR_CMD_HS_START ((uint32_t)(6 << 8))
  6632. #define LPI2C_MTDR_CMD_HS_START_NAcK ((uint32_t)(7 << 8))
  6633. #define LPI2C_MTDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  6634. #define LPI2C_MRDR_RXEMPTY ((uint32_t)(1<<14))
  6635. #define LPI2C_MRDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  6636. #define LPI2C_SCR_RRF ((uint32_t)(1<<9))
  6637. #define LPI2C_SCR_RTF ((uint32_t)(1<<8))
  6638. #define LPI2C_SCR_FILTDZ ((uint32_t)(1<<5))
  6639. #define LPI2C_SCR_FILTEN ((uint32_t)(1<<4))
  6640. #define LPI2C_SCR_RST ((uint32_t)(1<<1))
  6641. #define LPI2C_SCR_SEN ((uint32_t)(1<<0))
  6642. #define LPI2C_SSR_BBF ((uint32_t)(1<<25))
  6643. #define LPI2C_SSR_SBF ((uint32_t)(1<<24))
  6644. #define LPI2C_SSR_SARF ((uint32_t)(1<<15))
  6645. #define LPI2C_SSR_GCF ((uint32_t)(1<<14))
  6646. #define LPI2C_SSR_AM1F ((uint32_t)(1<<13))
  6647. #define LPI2C_SSR_AM0F ((uint32_t)(1<<12))
  6648. #define LPI2C_SSR_FEF ((uint32_t)(1<<11))
  6649. #define LPI2C_SSR_BEF ((uint32_t)(1<<10))
  6650. #define LPI2C_SSR_SDF ((uint32_t)(1<<9))
  6651. #define LPI2C_SSR_RSF ((uint32_t)(1<<8))
  6652. #define LPI2C_SSR_TAF ((uint32_t)(1<<3))
  6653. #define LPI2C_SSR_AVF ((uint32_t)(1<<2))
  6654. #define LPI2C_SSR_RDF ((uint32_t)(1<<1))
  6655. #define LPI2C_SSR_TDF ((uint32_t)(1<<0))
  6656. #define LPI2C_SIER_SARIE ((uint32_t)(1<<25))
  6657. #define LPI2C_SIER_GCIE ((uint32_t)(1<<24))
  6658. #define LPI2C_SIER_AM1F ((uint32_t)(1<<13))
  6659. #define LPI2C_SIER_AM0IE ((uint32_t)(1<<12))
  6660. #define LPI2C_SIER_FEIE ((uint32_t)(1<<11))
  6661. #define LPI2C_SIER_BEIE ((uint32_t)(1<<10))
  6662. #define LPI2C_SIER_SDIE ((uint32_t)(1<<9))
  6663. #define LPI2C_SIER_RSIE ((uint32_t)(1<<8))
  6664. #define LPI2C_SIER_TAIE ((uint32_t)(1<<3))
  6665. #define LPI2C_SIER_AVIE ((uint32_t)(1<<2))
  6666. #define LPI2C_SIER_RDIE ((uint32_t)(1<<1))
  6667. #define LPI2C_SIER_TDIE ((uint32_t)(1<<0))
  6668. #define LPI2C_SDER_AVDE ((uint32_t)(1<<2))
  6669. #define LPI2C_SDER_RDDE ((uint32_t)(1<<1))
  6670. #define LPI2C_SDER_TDDE ((uint32_t)(1<<0))
  6671. #define LPI2C_SCFGR1_ADDRCFG(n) ((uint32_t)(((n) & 0x07) << 16))
  6672. #define LPI2C_SCFGR1_HSMEN ((uint32_t)(1<<13))
  6673. #define LPI2C_SCFGR1_IGNACK ((uint32_t)(1<<12))
  6674. #define LPI2C_SCFGR1_RXCFG ((uint32_t)(1<<11))
  6675. #define LPI2C_SCFGR1_TXCFG ((uint32_t)(1<<10))
  6676. #define LPI2C_SCFGR1_SAEN ((uint32_t)(1<<9))
  6677. #define LPI2C_SCFGR1_GCEN ((uint32_t)(1<<8))
  6678. #define LPI2C_SCFGR1_ACKSTALL ((uint32_t)(1<<3))
  6679. #define LPI2C_SCFGR1_TXDSTALL ((uint32_t)(1<<2))
  6680. #define LPI2C_SCFGR1_RXSTALL ((uint32_t)(1<<1))
  6681. #define LPI2C_SCFGR1_ADRSTALL ((uint32_t)(1<<0))
  6682. #define LPI2C_SCFGR2_FILTSDA(n) ((uint32_t)(((n) & 0x0F) << 24))
  6683. #define LPI2C_SCFGR2_FILTSCL(n) ((uint32_t)(((n) & 0x0F) << 16))
  6684. #define LPI2C_SCFGR2_DATAVD(n) ((uint32_t)(((n) & 0x3F) << 8))
  6685. #define LPI2C_SCFGR2_CLKHOLD(n) ((uint32_t)(((n) & 0x0F) << 0))
  6686. #define LPI2C_SAMR_ADDR1(n) ((uint32_t)(((n) & 0x7F) << 17))
  6687. #define LPI2C_SAMR_ADDR0(n) ((uint32_t)(((n) & 0x7F) << 1))
  6688. #define LPI2C_SASR_ANV ((uint32_t)(1<<14))
  6689. #define LPI2C_SASR_RADDR(n) ((uint32_t)(((n) & 0x7FF) << 0))
  6690. #define LPI2C_STAR_TXNACK ((uint32_t)(1<<0))
  6691. #define LPI2C_STDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  6692. #define LPI2C_SRDR_SOF ((uint32_t)(1<<15))
  6693. #define LPI2C_SRDR_RXEMPTY ((uint32_t)(1<<14))
  6694. #define LPI2C_SRDR_DATA(n) ((uint32_t)(((n) & 0xFF) << 0))
  6695. // 48.4.1.1: page 2810
  6696. typedef struct {
  6697. const uint32_t VERID; // 0
  6698. const uint32_t PARAM; // 0x04
  6699. const uint32_t UNUSED0; // 0x08
  6700. const uint32_t UNUSED1; // 0x0c
  6701. volatile uint32_t CR; // 0x10
  6702. volatile uint32_t SR; // 0x14
  6703. volatile uint32_t IER; // 0x18
  6704. volatile uint32_t DER; // 0x1c
  6705. volatile uint32_t CFGR0; // 0x20
  6706. volatile uint32_t CFGR1; // 0x24
  6707. const uint32_t UNUSED3; // 0x28
  6708. const uint32_t UNUSED4; // 0x2c
  6709. volatile uint32_t DMR0; // 0x30
  6710. volatile uint32_t DMR1; // 0x34
  6711. const uint32_t UNUSED5; // 0x38
  6712. const uint32_t UNUSED6; // 0x3c
  6713. volatile uint32_t CCR; // 0x40
  6714. const uint32_t UNUSED7; // 0x44
  6715. const uint32_t UNUSED8; // 0x48
  6716. const uint32_t UNUSED9; // 0x4c
  6717. const uint32_t UNUSED10; // 0x50
  6718. const uint32_t UNUSED11; // 0x54
  6719. volatile uint32_t FCR; // 0x58
  6720. volatile uint32_t FSR; // 0x5C
  6721. volatile uint32_t TCR; // 0x60
  6722. volatile uint32_t TDR; // 0x64
  6723. const uint32_t UNUSED12; // 0x68
  6724. const uint32_t UNUSED13; // 0x6c
  6725. volatile uint32_t RSR; // 0x70
  6726. volatile uint32_t RDR; // 0x74
  6727. } IMXRT_LPSPI_t;
  6728. #define IMXRT_LPSPI1 (*(IMXRT_REGISTER32_t *)IMXRT_LPSPI1_ADDRESS)
  6729. #define IMXRT_LPSPI1_S (*(IMXRT_LPSPI_t *)IMXRT_LPSPI1_ADDRESS)
  6730. #define LPSPI1_VERID (IMXRT_LPSPI1.offset000)
  6731. #define LPSPI1_PARAM (IMXRT_LPSPI1.offset004)
  6732. #define LPSPI1_CR (IMXRT_LPSPI1.offset010)
  6733. #define LPSPI1_SR (IMXRT_LPSPI1.offset014)
  6734. #define LPSPI1_IER (IMXRT_LPSPI1.offset018)
  6735. #define LPSPI1_DER (IMXRT_LPSPI1.offset01C)
  6736. #define LPSPI1_CFGR0 (IMXRT_LPSPI1.offset020)
  6737. #define LPSPI1_CFGR1 (IMXRT_LPSPI1.offset024)
  6738. #define LPSPI1_DMR0 (IMXRT_LPSPI1.offset030)
  6739. #define LPSPI1_DMR1 (IMXRT_LPSPI1.offset034)
  6740. #define LPSPI1_CCR (IMXRT_LPSPI1.offset040)
  6741. #define LPSPI1_FCR (IMXRT_LPSPI1.offset058)
  6742. #define LPSPI1_FSR (IMXRT_LPSPI1.offset05C)
  6743. #define LPSPI1_TCR (IMXRT_LPSPI1.offset060)
  6744. #define LPSPI1_TDR (IMXRT_LPSPI1.offset064)
  6745. #define LPSPI1_RSR (IMXRT_LPSPI1.offset070)
  6746. #define LPSPI1_RDR (IMXRT_LPSPI1.offset074)
  6747. #define IMXRT_LPSPI2 (*(IMXRT_REGISTER32_t *)IMXRT_LPSPI2_ADDRESS)
  6748. #define IMXRT_LPSPI2_S (*(IMXRT_LPSPI_t *)IMXRT_LPSPI2_ADDRESS)
  6749. #define LPSPI2_VERID (IMXRT_LPSPI2.offset000)
  6750. #define LPSPI2_PARAM (IMXRT_LPSPI2.offset004)
  6751. #define LPSPI2_CR (IMXRT_LPSPI2.offset010)
  6752. #define LPSPI2_SR (IMXRT_LPSPI2.offset014)
  6753. #define LPSPI2_IER (IMXRT_LPSPI2.offset018)
  6754. #define LPSPI2_DER (IMXRT_LPSPI2.offset01C)
  6755. #define LPSPI2_CFGR0 (IMXRT_LPSPI2.offset020)
  6756. #define LPSPI2_CFGR1 (IMXRT_LPSPI2.offset024)
  6757. #define LPSPI2_DMR0 (IMXRT_LPSPI2.offset030)
  6758. #define LPSPI2_DMR1 (IMXRT_LPSPI2.offset034)
  6759. #define LPSPI2_CCR (IMXRT_LPSPI2.offset040)
  6760. #define LPSPI2_FCR (IMXRT_LPSPI2.offset058)
  6761. #define LPSPI2_FSR (IMXRT_LPSPI2.offset05C)
  6762. #define LPSPI2_TCR (IMXRT_LPSPI2.offset060)
  6763. #define LPSPI2_TDR (IMXRT_LPSPI2.offset064)
  6764. #define LPSPI2_RSR (IMXRT_LPSPI2.offset070)
  6765. #define LPSPI2_RDR (IMXRT_LPSPI2.offset074)
  6766. #define IMXRT_LPSPI3 (*(IMXRT_REGISTER32_t *)IMXRT_LPSPI3_ADDRESS)
  6767. #define IMXRT_LPSPI3_S (*(IMXRT_LPSPI_t *)IMXRT_LPSPI3_ADDRESS)
  6768. #define LPSPI3_VERID (IMXRT_LPSPI3.offset000)
  6769. #define LPSPI3_PARAM (IMXRT_LPSPI3.offset004)
  6770. #define LPSPI3_CR (IMXRT_LPSPI3.offset010)
  6771. #define LPSPI3_SR (IMXRT_LPSPI3.offset014)
  6772. #define LPSPI3_IER (IMXRT_LPSPI3.offset018)
  6773. #define LPSPI3_DER (IMXRT_LPSPI3.offset01C)
  6774. #define LPSPI3_CFGR0 (IMXRT_LPSPI3.offset020)
  6775. #define LPSPI3_CFGR1 (IMXRT_LPSPI3.offset024)
  6776. #define LPSPI3_DMR0 (IMXRT_LPSPI3.offset030)
  6777. #define LPSPI3_DMR1 (IMXRT_LPSPI3.offset034)
  6778. #define LPSPI3_CCR (IMXRT_LPSPI3.offset040)
  6779. #define LPSPI3_FCR (IMXRT_LPSPI3.offset058)
  6780. #define LPSPI3_FSR (IMXRT_LPSPI3.offset05C)
  6781. #define LPSPI3_TCR (IMXRT_LPSPI3.offset060)
  6782. #define LPSPI3_TDR (IMXRT_LPSPI3.offset064)
  6783. #define LPSPI3_RSR (IMXRT_LPSPI3.offset070)
  6784. #define LPSPI3_RDR (IMXRT_LPSPI3.offset074)
  6785. #define IMXRT_LPSPI4 (*(IMXRT_REGISTER32_t *)IMXRT_LPSPI4_ADDRESS)
  6786. #define IMXRT_LPSPI4_S (*(IMXRT_LPSPI_t *)IMXRT_LPSPI4_ADDRESS)
  6787. #define LPSPI4_VERID (IMXRT_LPSPI4.offset000)
  6788. #define LPSPI4_PARAM (IMXRT_LPSPI4.offset004)
  6789. #define LPSPI4_CR (IMXRT_LPSPI4.offset010)
  6790. #define LPSPI4_SR (IMXRT_LPSPI4.offset014)
  6791. #define LPSPI4_IER (IMXRT_LPSPI4.offset018)
  6792. #define LPSPI4_DER (IMXRT_LPSPI4.offset01C)
  6793. #define LPSPI4_CFGR0 (IMXRT_LPSPI4.offset020)
  6794. #define LPSPI4_CFGR1 (IMXRT_LPSPI4.offset024)
  6795. #define LPSPI4_DMR0 (IMXRT_LPSPI4.offset030)
  6796. #define LPSPI4_DMR1 (IMXRT_LPSPI4.offset034)
  6797. #define LPSPI4_CCR (IMXRT_LPSPI4.offset040)
  6798. #define LPSPI4_FCR (IMXRT_LPSPI4.offset058)
  6799. #define LPSPI4_FSR (IMXRT_LPSPI4.offset05C)
  6800. #define LPSPI4_TCR (IMXRT_LPSPI4.offset060)
  6801. #define LPSPI4_TDR (IMXRT_LPSPI4.offset064)
  6802. #define LPSPI4_RSR (IMXRT_LPSPI4.offset070)
  6803. #define LPSPI4_RDR (IMXRT_LPSPI4.offset074)
  6804. #define LPSPI_CR_RRF ((uint32_t)(1<<9))
  6805. #define LPSPI_CR_RTF ((uint32_t)(1<<8))
  6806. #define LPSPI_CR_DBGEN ((uint32_t)(1<<3))
  6807. #define LPSPI_CR_DOZEN ((uint32_t)(1<<2))
  6808. #define LPSPI_CR_RST ((uint32_t)(1<<1))
  6809. #define LPSPI_CR_MEN ((uint32_t)(1<<0))
  6810. #define LPSPI_SR_MBF ((uint32_t)(1<<24))
  6811. #define LPSPI_SR_DMF ((uint32_t)(1<<13))
  6812. #define LPSPI_SR_REF ((uint32_t)(1<<12))
  6813. #define LPSPI_SR_TEF ((uint32_t)(1<<11))
  6814. #define LPSPI_SR_TCF ((uint32_t)(1<<10))
  6815. #define LPSPI_SR_FCF ((uint32_t)(1<<9))
  6816. #define LPSPI_SR_WCF ((uint32_t)(1<<8))
  6817. #define LPSPI_SR_RDF ((uint32_t)(1<<1))
  6818. #define LPSPI_SR_TDF ((uint32_t)(1<<0))
  6819. #define LPSPI_IER_DMIE ((uint32_t)(1<<13))
  6820. #define LPSPI_IER_REIE ((uint32_t)(1<<12))
  6821. #define LPSPI_IER_TEIE ((uint32_t)(1<<11))
  6822. #define LPSPI_IER_TCIE ((uint32_t)(1<<10))
  6823. #define LPSPI_IER_FCIE ((uint32_t)(1<<9))
  6824. #define LPSPI_IER_WCIE ((uint32_t)(1<<8))
  6825. #define LPSPI_IER_RDIE ((uint32_t)(1<<1))
  6826. #define LPSPI_IER_TDIE ((uint32_t)(1<<0))
  6827. #define LPSPI_DER_RDDE ((uint32_t)(1<<1))
  6828. #define LPSPI_DER_TDDE ((uint32_t)(1<<0))
  6829. #define LPSPI_CFGR0_RDMO ((uint32_t)(1<<9))
  6830. #define LPSPI_CFGR0_CIRFIFO ((uint32_t)(1<<8))
  6831. #define LPSPI_CFGR0_HRSEL ((uint32_t)(1<<2))
  6832. #define LPSPI_CFGR0_HRPOL ((uint32_t)(1<<1))
  6833. #define LPSPI_CFGR0_HREN ((uint32_t)(1<<0))
  6834. #define LPSPI_CFGR1_PCSCFG ((uint32_t)(1<<27))
  6835. #define LPSPI_CFGR1_OUTCFG ((uint32_t)(1<<26))
  6836. #define LPSPI_CFGR1_PINCFG(n) ((uint32_t)(((n) & 0x03) << 24))
  6837. #define LPSPI_CFGR1_MATCFG(n) ((uint32_t)(((n) & 0x07) << 16))
  6838. #define LPSPI_CFGR1_PCSPOL(n) ((uint32_t)(((n) & 0x0F) << 8))
  6839. #define LPSPI_CFGR1_NOSTALL ((uint32_t)(1<<3))
  6840. #define LPSPI_CFGR1_AUTOPCS ((uint32_t)(1<<2))
  6841. #define LPSPI_CFGR1_SAMPLE ((uint32_t)(1<<1))
  6842. #define LPSPI_CFGR1_MASTER ((uint32_t)(1<<0))
  6843. #define LPSPI_CCR_SCKPCS(n) ((uint32_t)(((n) & 0xFF) << 24))
  6844. #define LPSPI_CCR_PCSSCK(n) ((uint32_t)(((n) & 0xFF) << 16))
  6845. #define LPSPI_CCR_DBT(n) ((uint32_t)(((n) & 0xFF) << 8))
  6846. #define LPSPI_CCR_SCKDIV(n) ((uint32_t)(((n) & 0xFF) << 0))
  6847. #define LPSPI_FCR_RXWATER(n) ((uint32_t)(((n) & 0x0F) << 16))
  6848. #define LPSPI_FCR_TXWATER(n) ((uint32_t)(((n) & 0x0F) << 0))
  6849. #define LPSPI_FSR_RXCOUNT(n) ((uint32_t)(((n) & 0x1F) << 16))
  6850. #define LPSPI_FSR_TXCOUNT(n) ((uint32_t)(((n) & 0x1F) << 0))
  6851. #define LPSPI_TCR_CPOL ((uint32_t)(1<<31))
  6852. #define LPSPI_TCR_CPHA ((uint32_t)(1<<30))
  6853. #define LPSPI_TCR_PRESCALE(n) ((uint32_t)(((n) & 0x07) << 27))
  6854. #define LPSPI_TCR_PCS(n) ((uint32_t)(((n) & 0x03) << 24))
  6855. #define LPSPI_TCR_LSBF ((uint32_t)(1<<23))
  6856. #define LPSPI_TCR_BYSW ((uint32_t)(1<<22))
  6857. #define LPSPI_TCR_CONT ((uint32_t)(1<<21))
  6858. #define LPSPI_TCR_CONTC ((uint32_t)(1<<20))
  6859. #define LPSPI_TCR_RXMSK ((uint32_t)(1<<19))
  6860. #define LPSPI_TCR_TXMSK ((uint32_t)(1<<18))
  6861. #define LPSPI_TCR_WIDTH(n) ((uint32_t)(((n) & 0x03) << 16))
  6862. #define LPSPI_TCR_FRAMESZ(n) ((uint32_t)(((n) & 0xFFF) << 0))
  6863. #define LPSPI_RSR_RXEMPTY ((uint32_t)(1<<1))
  6864. #define LPSPI_RSR_SOF ((uint32_t)(1<<0))
  6865. // 49.4.1.1: page 2854
  6866. typedef struct {
  6867. const uint32_t VERID;
  6868. const uint32_t PARAM;
  6869. volatile uint32_t GLOBAL;
  6870. volatile uint32_t PINCFG;
  6871. volatile uint32_t BAUD;
  6872. volatile uint32_t STAT;
  6873. volatile uint32_t CTRL;
  6874. volatile uint32_t DATA;
  6875. volatile uint32_t MATCH;
  6876. volatile uint32_t MODIR;
  6877. volatile uint32_t FIFO;
  6878. volatile uint32_t WATER;
  6879. } IMXRT_LPUART_t;
  6880. #define IMXRT_LPUART1 (*(IMXRT_LPUART_t *)IMXRT_LPUART1_ADDRESS)
  6881. #define LPUART1_VERID (IMXRT_LPUART1.VERID)
  6882. #define LPUART1_PARAM (IMXRT_LPUART1.PARAM)
  6883. #define LPUART1_GLOBAL (IMXRT_LPUART1.GLOBAL)
  6884. #define LPUART1_PINCFG (IMXRT_LPUART1.PINCFG)
  6885. #define LPUART1_BAUD (IMXRT_LPUART1.BAUD)
  6886. #define LPUART1_STAT (IMXRT_LPUART1.STAT)
  6887. #define LPUART1_CTRL (IMXRT_LPUART1.CTRL)
  6888. #define LPUART1_DATA (IMXRT_LPUART1.DATA)
  6889. #define LPUART1_MATCH (IMXRT_LPUART1.MATCH)
  6890. #define LPUART1_MODIR (IMXRT_LPUART1.MODIR)
  6891. #define LPUART1_FIFO (IMXRT_LPUART1.FIFO)
  6892. #define LPUART1_WATER (IMXRT_LPUART1.WATER)
  6893. #define IMXRT_LPUART2 (*(IMXRT_LPUART_t *)IMXRT_LPUART2_ADDRESS)
  6894. #define LPUART2_VERID (IMXRT_LPUART2.VERID)
  6895. #define LPUART2_PARAM (IMXRT_LPUART2.PARAM)
  6896. #define LPUART2_GLOBAL (IMXRT_LPUART2.GLOBAL)
  6897. #define LPUART2_PINCFG (IMXRT_LPUART2.PINCFG)
  6898. #define LPUART2_BAUD (IMXRT_LPUART2.BAUD)
  6899. #define LPUART2_STAT (IMXRT_LPUART2.STAT)
  6900. #define LPUART2_CTRL (IMXRT_LPUART2.CTRL)
  6901. #define LPUART2_DATA (IMXRT_LPUART2.DATA)
  6902. #define LPUART2_MATCH (IMXRT_LPUART2.MATCH)
  6903. #define LPUART2_MODIR (IMXRT_LPUART2.MODIR)
  6904. #define LPUART2_FIFO (IMXRT_LPUART2.FIFO)
  6905. #define LPUART2_WATER (IMXRT_LPUART2.WATER)
  6906. #define IMXRT_LPUART3 (*(IMXRT_LPUART_t *)IMXRT_LPUART3_ADDRESS)
  6907. #define LPUART3_VERID (IMXRT_LPUART3.VERID)
  6908. #define LPUART3_PARAM (IMXRT_LPUART3.PARAM)
  6909. #define LPUART3_GLOBAL (IMXRT_LPUART3.GLOBAL)
  6910. #define LPUART3_PINCFG (IMXRT_LPUART3.PINCFG)
  6911. #define LPUART3_BAUD (IMXRT_LPUART3.BAUD)
  6912. #define LPUART3_STAT (IMXRT_LPUART3.STAT)
  6913. #define LPUART3_CTRL (IMXRT_LPUART3.CTRL)
  6914. #define LPUART3_DATA (IMXRT_LPUART3.DATA)
  6915. #define LPUART3_MATCH (IMXRT_LPUART3.MATCH)
  6916. #define LPUART3_MODIR (IMXRT_LPUART3.MODIR)
  6917. #define LPUART3_FIFO (IMXRT_LPUART3.FIFO)
  6918. #define LPUART3_WATER (IMXRT_LPUART3.WATER)
  6919. #define IMXRT_LPUART4 (*(IMXRT_LPUART_t *)IMXRT_LPUART4_ADDRESS)
  6920. #define LPUART4_VERID (IMXRT_LPUART4.VERID)
  6921. #define LPUART4_PARAM (IMXRT_LPUART4.PARAM)
  6922. #define LPUART4_GLOBAL (IMXRT_LPUART4.GLOBAL)
  6923. #define LPUART4_PINCFG (IMXRT_LPUART4.PINCFG)
  6924. #define LPUART4_BAUD (IMXRT_LPUART4.BAUD)
  6925. #define LPUART4_STAT (IMXRT_LPUART4.STAT)
  6926. #define LPUART4_CTRL (IMXRT_LPUART4.CTRL)
  6927. #define LPUART4_DATA (IMXRT_LPUART4.DATA)
  6928. #define LPUART4_MATCH (IMXRT_LPUART4.MATCH)
  6929. #define LPUART4_MODIR (IMXRT_LPUART4.MODIR)
  6930. #define LPUART4_FIFO (IMXRT_LPUART4.FIFO)
  6931. #define LPUART4_WATER (IMXRT_LPUART4.WATER)
  6932. #define IMXRT_LPUART5 (*(IMXRT_LPUART_t *)IMXRT_LPUART5_ADDRESS)
  6933. #define LPUART5_VERID (IMXRT_LPUART5.VERID)
  6934. #define LPUART5_PARAM (IMXRT_LPUART5.PARAM)
  6935. #define LPUART5_GLOBAL (IMXRT_LPUART5.GLOBAL)
  6936. #define LPUART5_PINCFG (IMXRT_LPUART5.PINCFG)
  6937. #define LPUART5_BAUD (IMXRT_LPUART5.BAUD)
  6938. #define LPUART5_STAT (IMXRT_LPUART5.STAT)
  6939. #define LPUART5_CTRL (IMXRT_LPUART5.CTRL)
  6940. #define LPUART5_DATA (IMXRT_LPUART5.DATA)
  6941. #define LPUART5_MATCH (IMXRT_LPUART5.MATCH)
  6942. #define LPUART5_MODIR (IMXRT_LPUART5.MODIR)
  6943. #define LPUART5_FIFO (IMXRT_LPUART5.FIFO)
  6944. #define LPUART5_WATER (IMXRT_LPUART5.WATER)
  6945. #define IMXRT_LPUART6 (*(IMXRT_LPUART_t *)IMXRT_LPUART6_ADDRESS)
  6946. #define LPUART6_VERID (IMXRT_LPUART6.VERID)
  6947. #define LPUART6_PARAM (IMXRT_LPUART6.PARAM)
  6948. #define LPUART6_GLOBAL (IMXRT_LPUART6.GLOBAL)
  6949. #define LPUART6_PINCFG (IMXRT_LPUART6.PINCFG)
  6950. #define LPUART6_BAUD (IMXRT_LPUART6.BAUD)
  6951. #define LPUART6_STAT (IMXRT_LPUART6.STAT)
  6952. #define LPUART6_CTRL (IMXRT_LPUART6.CTRL)
  6953. #define LPUART6_DATA (IMXRT_LPUART6.DATA)
  6954. #define LPUART6_MATCH (IMXRT_LPUART6.MATCH)
  6955. #define LPUART6_MODIR (IMXRT_LPUART6.MODIR)
  6956. #define LPUART6_FIFO (IMXRT_LPUART6.FIFO)
  6957. #define LPUART6_WATER (IMXRT_LPUART6.WATER)
  6958. #define IMXRT_LPUART7 (*(IMXRT_LPUART_t *)IMXRT_LPUART7_ADDRESS)
  6959. #define LPUART7_VERID (IMXRT_LPUART7.VERID)
  6960. #define LPUART7_PARAM (IMXRT_LPUART7.PARAM)
  6961. #define LPUART7_GLOBAL (IMXRT_LPUART7.GLOBAL)
  6962. #define LPUART7_PINCFG (IMXRT_LPUART7.PINCFG)
  6963. #define LPUART7_BAUD (IMXRT_LPUART7.BAUD)
  6964. #define LPUART7_STAT (IMXRT_LPUART7.STAT)
  6965. #define LPUART7_CTRL (IMXRT_LPUART7.CTRL)
  6966. #define LPUART7_DATA (IMXRT_LPUART7.DATA)
  6967. #define LPUART7_MATCH (IMXRT_LPUART7.MATCH)
  6968. #define LPUART7_MODIR (IMXRT_LPUART7.MODIR)
  6969. #define LPUART7_FIFO (IMXRT_LPUART7.FIFO)
  6970. #define LPUART7_WATER (IMXRT_LPUART7.WATER)
  6971. #define IMXRT_LPUART8 (*(IMXRT_LPUART_t *)IMXRT_LPUART8_ADDRESS)
  6972. #define LPUART8_VERID (IMXRT_LPUART8.VERID)
  6973. #define LPUART8_PARAM (IMXRT_LPUART8.PARAM)
  6974. #define LPUART8_GLOBAL (IMXRT_LPUART8.GLOBAL)
  6975. #define LPUART8_PINCFG (IMXRT_LPUART8.PINCFG)
  6976. #define LPUART8_BAUD (IMXRT_LPUART8.BAUD)
  6977. #define LPUART8_STAT (IMXRT_LPUART8.STAT)
  6978. #define LPUART8_CTRL (IMXRT_LPUART8.CTRL)
  6979. #define LPUART8_DATA (IMXRT_LPUART8.DATA)
  6980. #define LPUART8_MATCH (IMXRT_LPUART8.MATCH)
  6981. #define LPUART8_MODIR (IMXRT_LPUART8.MODIR)
  6982. #define LPUART8_FIFO (IMXRT_LPUART8.FIFO)
  6983. #define LPUART8_WATER (IMXRT_LPUART8.WATER)
  6984. #define LPUART_VERID_MAJOR(n) ((uint32_t)(((n) & 0xFF) << 24))
  6985. #define LPUART_VERID_MINOR(n) ((uint32_t)(((n) & 0xFF) << 16))
  6986. #define LPUART_VERID_FEATURE(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  6987. #define LPUART_PARAM_RXFIFO(n) ((uint32_t)(((n) & 0xFF) << 8))
  6988. #define LPUART_PARAM_TXFIFO(n) ((uint32_t)(((n) & 0xFF) << 0))
  6989. #define LPUART_GLOBAL_RST ((uint32_t)(1<<1))
  6990. #define LPUART_PINCFG_TRGSEL(n) ((uint32_t)(((n) & 0x03) << 0))
  6991. #define LPUART_BAUD_MAEN1 ((uint32_t)(1<<31))
  6992. #define LPUART_BAUD_MAEN2 ((uint32_t)(1<<30))
  6993. #define LPUART_BAUD_M10 ((uint32_t)(1<<29))
  6994. #define LPUART_BAUD_OSR(n) ((uint32_t)(((n) & 0x1F) << 24))
  6995. #define LPUART_BAUD_TDMAE ((uint32_t)(1<<23))
  6996. #define LPUART_BAUD_RDMAE ((uint32_t)(1<<21))
  6997. #define LPUART_BAUD_MATCFG(n) ((uint32_t)(((n) & 0x03) << 18))
  6998. #define LPUART_BAUD_BOTHEDGE ((uint32_t)(1<<17))
  6999. #define LPUART_BAUD_RESYNCDIS ((uint32_t)(1<<16))
  7000. #define LPUART_BAUD_LBKDIE ((uint32_t)(1<<15))
  7001. #define LPUART_BAUD_RXEDGIE ((uint32_t)(1<<14))
  7002. #define LPUART_BAUD_SBNS ((uint32_t)(1<<13))
  7003. #define LPUART_BAUD_SBR(n) ((uint32_t)(((n) & 0x01FFF) << 0))
  7004. #define LPUART_STAT_LBKDIF ((uint32_t)(1<<31))
  7005. #define LPUART_STAT_RXEDGIF ((uint32_t)(1<<30))
  7006. #define LPUART_STAT_MSBF ((uint32_t)(1<<29))
  7007. #define LPUART_STAT_RXINV ((uint32_t)(1<<28))
  7008. #define LPUART_STAT_RWUID ((uint32_t)(1<<27))
  7009. #define LPUART_STAT_BRK13 ((uint32_t)(1<<26))
  7010. #define LPUART_STAT_LBKDE ((uint32_t)(1<<25))
  7011. #define LPUART_STAT_RAF ((uint32_t)(1<<24))
  7012. #define LPUART_STAT_TDRE ((uint32_t)(1<<23))
  7013. #define LPUART_STAT_TC ((uint32_t)(1<<22))
  7014. #define LPUART_STAT_RDRF ((uint32_t)(1<<21))
  7015. #define LPUART_STAT_IDLE ((uint32_t)(1<<20))
  7016. #define LPUART_STAT_OR ((uint32_t)(1<<19))
  7017. #define LPUART_STAT_NF ((uint32_t)(1<<18))
  7018. #define LPUART_STAT_FE ((uint32_t)(1<<17))
  7019. #define LPUART_STAT_PF ((uint32_t)(1<<16))
  7020. #define LPUART_STAT_MA1F ((uint32_t)(1<<15))
  7021. #define LPUART_STAT_MA2F ((uint32_t)(1<<14))
  7022. #define LPUART_CTRL_R8T9 ((uint32_t)(1<<31))
  7023. #define LPUART_CTRL_R9T8 ((uint32_t)(1<<30))
  7024. #define LPUART_CTRL_TXDIR ((uint32_t)(1<<29))
  7025. #define LPUART_CTRL_TXINV ((uint32_t)(1<<28))
  7026. #define LPUART_CTRL_ORIE ((uint32_t)(1<<27))
  7027. #define LPUART_CTRL_NEIE ((uint32_t)(1<<26))
  7028. #define LPUART_CTRL_FEIE ((uint32_t)(1<<25))
  7029. #define LPUART_CTRL_PEIE ((uint32_t)(1<<24))
  7030. #define LPUART_CTRL_TIE ((uint32_t)(1<<23))
  7031. #define LPUART_CTRL_TCIE ((uint32_t)(1<<22))
  7032. #define LPUART_CTRL_RIE ((uint32_t)(1<<21))
  7033. #define LPUART_CTRL_ILIE ((uint32_t)(1<<20))
  7034. #define LPUART_CTRL_TE ((uint32_t)(1<<19))
  7035. #define LPUART_CTRL_RE ((uint32_t)(1<<18))
  7036. #define LPUART_CTRL_RWU ((uint32_t)(1<<17))
  7037. #define LPUART_CTRL_SBK ((uint32_t)(1<<16))
  7038. #define LPUART_CTRL_MA1IE ((uint32_t)(1<<15))
  7039. #define LPUART_CTRL_MA2IE ((uint32_t)(1<<14))
  7040. #define LPUART_CTRL_M7 ((uint32_t)(1<<11))
  7041. #define LPUART_CTRL_IDLECFG(n) ((uint32_t)(((n) & 0x07) << 8))
  7042. #define LPUART_CTRL_LOOPS ((uint32_t)(1<<7))
  7043. #define LPUART_CTRL_DOZEEN ((uint32_t)(1<<6))
  7044. #define LPUART_CTRL_RSRC ((uint32_t)(1<<5))
  7045. #define LPUART_CTRL_M ((uint32_t)(1<<4))
  7046. #define LPUART_CTRL_WAKE ((uint32_t)(1<<3))
  7047. #define LPUART_CTRL_ILT ((uint32_t)(1<<2))
  7048. #define LPUART_CTRL_PE ((uint32_t)(1<<1))
  7049. #define LPUART_CTRL_PT ((uint32_t)(1<<0))
  7050. #define LPUART_DATA_NOISY ((uint32_t)(1<<15))
  7051. #define LPUART_DATA_PARITYE ((uint32_t)(1<<14))
  7052. #define LPUART_DATA_FRETSC ((uint32_t)(1<<13))
  7053. #define LPUART_DATA_RXEMPT ((uint32_t)(1<<12))
  7054. #define LPUART_DATA_IDLINE ((uint32_t)(1<<11))
  7055. #define LPUART_MATCH_MA2(n) ((uint32_t)(((n) & 0x3FF) << 16))
  7056. #define LPUART_MATCH_MA1(n) ((uint32_t)(((n) & 0x3FF) << 0))
  7057. #define LPUART_MODIR_IREN ((uint32_t)(1<<18))
  7058. #define LPUART_MODIR_TNP(n) ((uint32_t)(((n) & 0x03) << 16))
  7059. #define LPUART_MODIR_RTSWATER(n) ((uint32_t)(((n) & 0x03) << 8))
  7060. #define LPUART_MODIR_TXCTSSRC ((uint32_t)(1<<5))
  7061. #define LPUART_MODIR_TXCTSC ((uint32_t)(1<<4))
  7062. #define LPUART_MODIR_RXRTSE ((uint32_t)(1<<3))
  7063. #define LPUART_MODIR_TXRTSPOL ((uint32_t)(1<<2))
  7064. #define LPUART_MODIR_TXRTSE ((uint32_t)(1<<1))
  7065. #define LPUART_MODIR_TXCTSE ((uint32_t)(1<<0))
  7066. #define LPUART_FIFO_TXEMPT ((uint32_t)(1<<23))
  7067. #define LPUART_FIFO_RXEMPT ((uint32_t)(1<<22))
  7068. #define LPUART_FIFO_TXOF ((uint32_t)(1<<17))
  7069. #define LPUART_FIFO_RXUF ((uint32_t)(1<<16))
  7070. #define LPUART_FIFO_TXFLUSH ((uint32_t)(1<<15))
  7071. #define LPUART_FIFO_RXFLUSH ((uint32_t)(1<<14))
  7072. #define LPUART_FIFO_RXIDEN(n) ((uint32_t)(((n) & 0x07) << 10))
  7073. #define LPUART_FIFO_TXOFE ((uint32_t)(1<<9))
  7074. #define LPUART_FIFO_RXUFE ((uint32_t)(1<<8))
  7075. #define LPUART_FIFO_TXFE ((uint32_t)(1<<7))
  7076. #define LPUART_FIFO_TXFIFOSIZE(n) ((uint32_t)(((n) & 0x07) << 4))
  7077. #define LPUART_FIFO_RXFE ((uint32_t)(1<<3))
  7078. #define LPUART_FIFO_RXFIFOSIZE(n) ((uint32_t)(((n) & 0x07) << 0))
  7079. #define LPUART_WATER_RXCOUNT(n) ((uint32_t)(((n) & 0x07) << 24))
  7080. #define LPUART_WATER_RXWATER(n) ((uint32_t)(((n) & 0x03) << 16))
  7081. #define LPUART_WATER_TXCOUNT(n) ((uint32_t)(((n) & 0x07) << 8))
  7082. #define LPUART_WATER_TXWATER(n) ((uint32_t)(((n) & 0x03) << 0))
  7083. // 23.6.1.1: page 1331
  7084. #define IMXRT_OCOTP (*(IMXRT_REGISTER32_t *)IMXRT_OCOTP_ADDRESS)
  7085. #define HW_OCOTP_CTRL (IMXRT_OCOTP.offset000)
  7086. #define HW_OCOTP_CTRL_SET (IMXRT_OCOTP.offset004)
  7087. #define HW_OCOTP_CTRL_CLR (IMXRT_OCOTP.offset008)
  7088. #define HW_OCOTP_CTRL_TOG (IMXRT_OCOTP.offset00C)
  7089. #define HW_OCOTP_TIMING (IMXRT_OCOTP.offset010)
  7090. #define HW_OCOTP_DATA (IMXRT_OCOTP.offset020)
  7091. #define HW_OCOTP_READ_CTRL (IMXRT_OCOTP.offset030)
  7092. #define HW_OCOTP_READ_FUSE_DATA (IMXRT_OCOTP.offset040)
  7093. #define HW_OCOTP_SW_STICKY (IMXRT_OCOTP.offset050)
  7094. #define HW_OCOTP_SCS (IMXRT_OCOTP.offset060)
  7095. #define HW_OCOTP_SCS_SET (IMXRT_OCOTP.offset064)
  7096. #define HW_OCOTP_SCS_CLR (IMXRT_OCOTP.offset068)
  7097. #define HW_OCOTP_SCS_TOG (IMXRT_OCOTP.offset06C)
  7098. #define HW_OCOTP_VERSION (IMXRT_OCOTP.offset090)
  7099. #define HW_OCOTP_TIMING2 (IMXRT_OCOTP.offset100)
  7100. #define HW_OCOTP_CTRL_WR_UNLOCK(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  7101. #define HW_OCOTP_CTRL_RELOAD_SHADOWS ((uint32_t)(1<<10))
  7102. #define HW_OCOTP_CTRL_ERROR ((uint32_t)(1<<9))
  7103. #define HW_OCOTP_CTRL_BUSY ((uint32_t)(1<<8))
  7104. #define HW_OCOTP_CTRL_ADDR(n) ((uint32_t)(((n) & 0x3F) << 0))
  7105. #define HW_OCOTP_TIMING_WAIT(n) ((uint32_t)(((n) & 0x3F) << 22))
  7106. #define HW_OCOTP_TIMING_STROBE_READ(n) ((uint32_t)(((n) & 0x3F) << 16))
  7107. #define HW_OCOTP_TIMING_RELAX(n) ((uint32_t)(((n) & 0x0F) << 12))
  7108. #define HW_OCOTP_TIMING_STROBE_PROG(n) ((uint32_t)(((n) & 0xFFF) << 0))
  7109. #define HW_OCOTP_READ_CTRL_READ_FUSE ((uint32_t)(1<<0))
  7110. #define HW_OCOTP_SW_STICKY_JTAG_BLOCK_RELEASE ((uint32_t)(1<<4))
  7111. #define HW_OCOTP_SW_STICKY_BLOCK_ROM_PART ((uint32_t)(1<<3))
  7112. #define HW_OCOTP_SW_STICKY_FIELD_RETURN_LOCK ((uint32_t)(1<<2))
  7113. #define HW_OCOTP_SW_STICKY_SRK_REVOKE_LOCK ((uint32_t)(1<<1))
  7114. #define HW_OCOTP_SW_STICKY_BLOCK_DTCP_KEY ((uint32_t)(1<<0))
  7115. #define HW_OCOTP_SCS_LOCK ((uint32_t)(1<<31))
  7116. #define HW_OCOTP_SCS_HAB_JDE ((uint32_t)(1<<0))
  7117. #define HW_OCOTP_TIMING2_RELAX1(n) ((uint32_t)(((n) & 0x7F) << 24))
  7118. #define HW_OCOTP_TIMING2_RELAX_READ(n) ((uint32_t)(((n) & 0x3F) << 16))
  7119. #define HW_OCOTP_TIMING2_RELAX_PROG(n) ((uint32_t)(((n) & 0xFFF) << 0))
  7120. #define IMXRT_OCOTP_VALUE (*(IMXRT_REGISTER32_t *)(IMXRT_OCOTP_ADDRESS+0x400))
  7121. #define HW_OCOTP_LOCK (IMXRT_OCOTP_VALUE.offset000)
  7122. #define HW_OCOTP_CFG0 (IMXRT_OCOTP_VALUE.offset010)
  7123. #define HW_OCOTP_CFG1 (IMXRT_OCOTP_VALUE.offset020)
  7124. #define HW_OCOTP_CFG2 (IMXRT_OCOTP_VALUE.offset030)
  7125. #define HW_OCOTP_CFG3 (IMXRT_OCOTP_VALUE.offset040)
  7126. #define HW_OCOTP_CFG4 (IMXRT_OCOTP_VALUE.offset050)
  7127. #define HW_OCOTP_CFG5 (IMXRT_OCOTP_VALUE.offset060)
  7128. #define HW_OCOTP_CFG6 (IMXRT_OCOTP_VALUE.offset070)
  7129. #define HW_OCOTP_MEM0 (IMXRT_OCOTP_VALUE.offset080)
  7130. #define HW_OCOTP_MEM1 (IMXRT_OCOTP_VALUE.offset090)
  7131. #define HW_OCOTP_MEM2 (IMXRT_OCOTP_VALUE.offset0A0)
  7132. #define HW_OCOTP_MEM3 (IMXRT_OCOTP_VALUE.offset0B0)
  7133. #define HW_OCOTP_MEM4 (IMXRT_OCOTP_VALUE.offset0C0)
  7134. #define HW_OCOTP_ANA0 (IMXRT_OCOTP_VALUE.offset0D0)
  7135. #define HW_OCOTP_ANA1 (IMXRT_OCOTP_VALUE.offset0E0)
  7136. #define HW_OCOTP_ANA2 (IMXRT_OCOTP_VALUE.offset0F0)
  7137. #define HW_OCOTP_OTPMK0 (IMXRT_OCOTP_VALUE.offset100)
  7138. #define HW_OCOTP_OTPMK1 (IMXRT_OCOTP_VALUE.offset110)
  7139. #define HW_OCOTP_OTPMK2 (IMXRT_OCOTP_VALUE.offset120)
  7140. #define HW_OCOTP_OTPMK3 (IMXRT_OCOTP_VALUE.offset130)
  7141. #define HW_OCOTP_OTPMK4 (IMXRT_OCOTP_VALUE.offset140)
  7142. #define HW_OCOTP_OTPMK5 (IMXRT_OCOTP_VALUE.offset150)
  7143. #define HW_OCOTP_OTPMK6 (IMXRT_OCOTP_VALUE.offset160)
  7144. #define HW_OCOTP_OTPMK7 (IMXRT_OCOTP_VALUE.offset170)
  7145. #define HW_OCOTP_SRK0 (IMXRT_OCOTP_VALUE.offset180)
  7146. #define HW_OCOTP_SRK1 (IMXRT_OCOTP_VALUE.offset190)
  7147. #define HW_OCOTP_SRK2 (IMXRT_OCOTP_VALUE.offset1A0)
  7148. #define HW_OCOTP_SRK3 (IMXRT_OCOTP_VALUE.offset1B0)
  7149. #define HW_OCOTP_SRK4 (IMXRT_OCOTP_VALUE.offset1C0)
  7150. #define HW_OCOTP_SRK5 (IMXRT_OCOTP_VALUE.offset1D0)
  7151. #define HW_OCOTP_SRK6 (IMXRT_OCOTP_VALUE.offset1E0)
  7152. #define HW_OCOTP_SRK7 (IMXRT_OCOTP_VALUE.offset1F0)
  7153. #define HW_OCOTP_SJC_RESP0 (IMXRT_OCOTP_VALUE.offset200)
  7154. #define HW_OCOTP_SJC_RESP1 (IMXRT_OCOTP_VALUE.offset210)
  7155. #define HW_OCOTP_MAC0 (IMXRT_OCOTP_VALUE.offset220)
  7156. #define HW_OCOTP_MAC1 (IMXRT_OCOTP_VALUE.offset230)
  7157. #define HW_OCOTP_MAC2 (IMXRT_OCOTP_VALUE.offset240)
  7158. #define HW_OCOTP_GP3 (IMXRT_OCOTP_VALUE.offset250) /* IMXRT1052 */
  7159. #define HW_OCOTP_OTPMK_CRC32 (IMXRT_OCOTP_VALUE.offset250) /* IMXRT1062 */
  7160. #define HW_OCOTP_GP1 (IMXRT_OCOTP_VALUE.offset260)
  7161. #define HW_OCOTP_GP2 (IMXRT_OCOTP_VALUE.offset270)
  7162. #define HW_OCOTP_SW_GP1 (IMXRT_OCOTP_VALUE.offset280)
  7163. #define HW_OCOTP_SW_GP20 (IMXRT_OCOTP_VALUE.offset290)
  7164. #define HW_OCOTP_SW_GP21 (IMXRT_OCOTP_VALUE.offset2A0)
  7165. #define HW_OCOTP_SW_GP22 (IMXRT_OCOTP_VALUE.offset2B0)
  7166. #define HW_OCOTP_SW_GP23 (IMXRT_OCOTP_VALUE.offset2C0)
  7167. #define HW_OCOTP_MISC_CONF0 (IMXRT_OCOTP_VALUE.offset2D0)
  7168. #define HW_OCOTP_MISC_CONF1 (IMXRT_OCOTP_VALUE.offset2E0)
  7169. #define HW_OCOTP_SRK_REVOKE (IMXRT_OCOTP_VALUE.offset2F0)
  7170. #if defined(__IMXRT1062__)
  7171. #define IMXRT_OCOTP_VALUE2 (*(IMXRT_REGISTER32_t *)(IMXRT_OCOTP_ADDRESS+0x800))
  7172. #define HW_OCOTP_ROM_PATCH0 (IMXRT_OCOTP_VALUE2.offset000)
  7173. #define HW_OCOTP_ROM_PATCH1 (IMXRT_OCOTP_VALUE2.offset010)
  7174. #define HW_OCOTP_ROM_PATCH2 (IMXRT_OCOTP_VALUE2.offset020)
  7175. #define HW_OCOTP_ROM_PATCH3 (IMXRT_OCOTP_VALUE2.offset030)
  7176. #define HW_OCOTP_ROM_PATCH4 (IMXRT_OCOTP_VALUE2.offset040)
  7177. #define HW_OCOTP_ROM_PATCH5 (IMXRT_OCOTP_VALUE2.offset050)
  7178. #define HW_OCOTP_ROM_PATCH6 (IMXRT_OCOTP_VALUE2.offset060)
  7179. #define HW_OCOTP_ROM_PATCH7 (IMXRT_OCOTP_VALUE2.offset070)
  7180. #define HW_OCOTP_GP30 (IMXRT_OCOTP_VALUE2.offset080)
  7181. #define HW_OCOTP_GP31 (IMXRT_OCOTP_VALUE2.offset090)
  7182. #define HW_OCOTP_GP32 (IMXRT_OCOTP_VALUE2.offset0A0)
  7183. #define HW_OCOTP_GP33 (IMXRT_OCOTP_VALUE2.offset0B0)
  7184. #define HW_OCOTP_GP40 (IMXRT_OCOTP_VALUE2.offset0C0)
  7185. #define HW_OCOTP_GP41 (IMXRT_OCOTP_VALUE2.offset0D0)
  7186. #define HW_OCOTP_GP42 (IMXRT_OCOTP_VALUE2.offset0E0)
  7187. #define HW_OCOTP_GP43 (IMXRT_OCOTP_VALUE2.offset0F0)
  7188. #endif
  7189. // 53.9.1: page 2978
  7190. #define IMXRT_PIT (*(IMXRT_REGISTER32_t *)IMXRT_PIT_ADDRESS)
  7191. #define PIT_MCR (IMXRT_PIT.offset000)
  7192. #define PIT_LTMR64H (IMXRT_PIT.offset0E0)
  7193. #define PIT_LTMR64L (IMXRT_PIT.offset0E4)
  7194. typedef struct {
  7195. volatile uint32_t LDVAL;
  7196. volatile uint32_t CVAL;
  7197. volatile uint32_t TCTRL;
  7198. volatile uint32_t TFLG;
  7199. } IMXRT_PIT_CHANNEL_t;
  7200. #define IMXRT_PIT_CHANNELS ((IMXRT_PIT_CHANNEL_t *)(&(IMXRT_PIT.offset100)))
  7201. #define PIT_LDVAL0 (IMXRT_PIT.offset100)
  7202. #define PIT_CVAL0 (IMXRT_PIT.offset104)
  7203. #define PIT_TCTRL0 (IMXRT_PIT.offset108)
  7204. #define PIT_TFLG0 (IMXRT_PIT.offset10C)
  7205. #define PIT_LDVAL1 (IMXRT_PIT.offset110)
  7206. #define PIT_CVAL1 (IMXRT_PIT.offset114)
  7207. #define PIT_TCTRL1 (IMXRT_PIT.offset118)
  7208. #define PIT_TFLG1 (IMXRT_PIT.offset11C)
  7209. #define PIT_LDVAL2 (IMXRT_PIT.offset120)
  7210. #define PIT_CVAL2 (IMXRT_PIT.offset124)
  7211. #define PIT_TCTRL2 (IMXRT_PIT.offset128)
  7212. #define PIT_TFLG2 (IMXRT_PIT.offset12C)
  7213. #define PIT_LDVAL3 (IMXRT_PIT.offset130)
  7214. #define PIT_CVAL3 (IMXRT_PIT.offset134)
  7215. #define PIT_TCTRL3 (IMXRT_PIT.offset138)
  7216. #define PIT_TFLG3 (IMXRT_PIT.offset13C)
  7217. #define PIT_MCR_MDIS ((uint32_t)(1<<1))
  7218. #define PIT_MCR_FRZ ((uint32_t)(1<<0))
  7219. #define PIT_TCTRL_CHN ((uint32_t)(1<<2))
  7220. #define PIT_TCTRL_TIE ((uint32_t)(1<<1))
  7221. #define PIT_TCTRL_TEN ((uint32_t)(1<<0))
  7222. #define PIT_TFLG_TIF ((uint32_t)(1<<0))
  7223. // 16.6: page 1160
  7224. #define IMXRT_PMU (*(IMXRT_REGISTER32_t *)IMXRT_PMU_ADDRESS)
  7225. #define PMU_REG_1P1 (IMXRT_PMU.offset110)
  7226. #define PMU_REG_1P1_SET (IMXRT_PMU.offset114)
  7227. #define PMU_REG_1P1_CLR (IMXRT_PMU.offset118)
  7228. #define PMU_REG_1P1_TOG (IMXRT_PMU.offset11C)
  7229. #define PMU_REG_3P0 (IMXRT_PMU.offset120)
  7230. #define PMU_REG_3P0_SET (IMXRT_PMU.offset124)
  7231. #define PMU_REG_3P0_CLR (IMXRT_PMU.offset128)
  7232. #define PMU_REG_3P0_TOG (IMXRT_PMU.offset12C)
  7233. #define PMU_REG_2P5 (IMXRT_PMU.offset130)
  7234. #define PMU_REG_2P5_SET (IMXRT_PMU.offset134)
  7235. #define PMU_REG_2P5_CLR (IMXRT_PMU.offset138)
  7236. #define PMU_REG_2P5_TOG (IMXRT_PMU.offset13C)
  7237. #define PMU_REG_CORE (IMXRT_PMU.offset140)
  7238. #define PMU_REG_CORE_SET (IMXRT_PMU.offset144)
  7239. #define PMU_REG_CORE_CLR (IMXRT_PMU.offset148)
  7240. #define PMU_REG_CORE_TOG (IMXRT_PMU.offset14C)
  7241. #define PMU_MISC0 (IMXRT_PMU.offset150)
  7242. #define PMU_MISC0_SET (IMXRT_PMU.offset154)
  7243. #define PMU_MISC0_CLR (IMXRT_PMU.offset158)
  7244. #define PMU_MISC0_TOG (IMXRT_PMU.offset15C)
  7245. #define PMU_MISC1 (IMXRT_PMU.offset160)
  7246. #define PMU_MISC1_SET (IMXRT_PMU.offset164)
  7247. #define PMU_MISC1_CLR (IMXRT_PMU.offset168)
  7248. #define PMU_MISC1_TOG (IMXRT_PMU.offset16C)
  7249. #define PMU_MISC2 (IMXRT_PMU.offset170)
  7250. #define PMU_MISC2_SET (IMXRT_PMU.offset174)
  7251. #define PMU_MISC2_CLR (IMXRT_PMU.offset178)
  7252. #define PMU_MISC2_TOG (IMXRT_PMU.offset17C)
  7253. #define PMU_REG_1P1_SELREF_WEAK_LINREG ((uint32_t)(1<<19))
  7254. #define PMU_REG_1P1_ENABLE_WEAK_LINREG ((uint32_t)(1<<18))
  7255. #define PMU_REG_1P1_OK_VDD1P1 ((uint32_t)(1<<17))
  7256. #define PMU_REG_1P1_BO_VDD1P1 ((uint32_t)(1<<16))
  7257. #define PMU_REG_1P1_OUTPUT_TRG(n) ((uint32_t)(((n) & 0x0F) << 8))
  7258. #define PMU_REG_1P1_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 4))
  7259. #define PMU_REG_1P1_ENABLE_PULLDOWN ((uint32_t)(1<<3))
  7260. #define PMU_REG_1P1_ENABLE_ILIMIT ((uint32_t)(1<<2))
  7261. #define PMU_REG_1P1_ENABLE_BO ((uint32_t)(1<<1))
  7262. #define PMU_REG_1P1_ENABLE_LINREG ((uint32_t)(1<<0))
  7263. #define PMU_REG_3P0_OK_VDD3P0 ((uint32_t)(1<<17))
  7264. #define PMU_REG_3P0_BO_VDD3P0 ((uint32_t)(1<<16))
  7265. #define PMU_REG_3P0_OUTPUT_TRG(n) ((uint32_t)(((n) & 0x1F) << 8))
  7266. #define PMU_REG_3P0_VBUS_SEL ((uint32_t)(1<<7))
  7267. #define PMU_REG_3P0_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 4))
  7268. #define PMU_REG_3P0_ENABLE_ILIMIT ((uint32_t)(1<<2))
  7269. #define PMU_REG_3P0_ENABLE_BO ((uint32_t)(1<<1))
  7270. #define PMU_REG_3P0_ENABLE_LINREG ((uint32_t)(1<<0))
  7271. #define PMU_REG_2P5_ENABLE_WEAK_LINREG ((uint32_t)(1<<18))
  7272. #define PMU_REG_2P5_OK_VDD2P5 ((uint32_t)(1<<17))
  7273. #define PMU_REG_2P5_BO_VDD2P5 ((uint32_t)(1<<16))
  7274. #define PMU_REG_2P5_OUTPUT_TRG(n) ((uint32_t)(((n) & 0x0F) << 8))
  7275. #define PMU_REG_2P5_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 4))
  7276. #define PMU_REG_2P5_ENABLE_PULLDOWN ((uint32_t)(1<<3))
  7277. #define PMU_REG_2P5_ENABLE_ILIMIT ((uint32_t)(1<<2))
  7278. #define PMU_REG_2P5_ENABLE_BO ((uint32_t)(1<<1))
  7279. #define PMU_REG_2P5_ENABLE_LINREG ((uint32_t)(1<<0))
  7280. #define PMU_REG_CORE_FET_ODRIVE ((uint32_t)(1<<29))
  7281. #define PMU_REG_CORE_RAMP_RATE(n) ((uint32_t)(((n) & 0x03) << 27))
  7282. #define PMU_REG_CORE_REG2_ADJ(n) ((uint32_t)(((n) & 0x0F) << 23))
  7283. #define PMU_REG_CORE_REG2_TARG(n) ((uint32_t)(((n) & 0x1F) << 18))
  7284. #define PMU_REG_CORE_REG1_ADJ(n) ((uint32_t)(((n) & 0x0F) << 14))
  7285. #define PMU_REG_CORE_REG1_TARG(n) ((uint32_t)(((n) & 0x1F) << 9))
  7286. #define PMU_REG_CORE_REG0_ADJ(n) ((uint32_t)(((n) & 0x0F) << 5))
  7287. #define PMU_REG_CORE_REG0_TARG(n) ((uint32_t)(((n) & 0x1F) << 0))
  7288. #define PMU_MISC0_VID_PLL_PREDIV ((uint32_t)(1<<31))
  7289. #define PMU_MISC0_XTAL_24M_PWD ((uint32_t)(1<<30))
  7290. #define PMU_MISC0_RTC_XTAL_SOURCE ((uint32_t)(1<<29))
  7291. #define PMU_MISC0_CLKGATE_DELAY(n) ((uint32_t)(((n) & 0x07) << 26))
  7292. #define PMU_MISC0_CLKGATE_CTRL ((uint32_t)(1<<25))
  7293. #define PMU_MISC0_OSC_XTALOK_EN ((uint32_t)(1<<16))
  7294. #define PMU_MISC0_OSC_XTALOK ((uint32_t)(1<<15))
  7295. #define PMU_MISC0_OSC_I(n) ((uint32_t)(((n) & 0x03) << 13))
  7296. #define PMU_MISC0_DISCON_HIGH_SNVS ((uint32_t)(1<<12))
  7297. #define PMU_MISC0_STOP_MODE_CONFIG(n) ((uint32_t)(((n) & 0x03) << 10))
  7298. #define PMU_MISC0_REFTOP_VBGUP ((uint32_t)(1<<7))
  7299. #define PMU_MISC0_REFTOP_VBGADJ(n) ((uint32_t)(((n) & 0x07) << 4))
  7300. #define PMU_MISC0_REFTOP_SELFBIASOFF ((uint32_t)(1<<3))
  7301. #define PMU_MISC0_REFTOP_PWD ((uint32_t)(1<<0))
  7302. #define PMU_MISC1_IRQ_DIG_BO ((uint32_t)(1<<31))
  7303. #define PMU_MISC1_IRQ_ANA_BO ((uint32_t)(1<<30))
  7304. #define PMU_MISC1_IRQ_TEMPHIGH ((uint32_t)(1<<29))
  7305. #define PMU_MISC1_IRQ_TEMPLOW ((uint32_t)(1<<28))
  7306. #define PMU_MISC1_IRQ_TEMPPANIC ((uint32_t)(1<<27))
  7307. #define PMU_MISC1_PFD_528_AUTOGATE_EN ((uint32_t)(1<<17))
  7308. #define PMU_MISC1_PFD_480_AUTOGATE_EN ((uint32_t)(1<<16))
  7309. #define PMU_MISC1_LVDSCLK2_IBEN ((uint32_t)(1<<13))
  7310. #define PMU_MISC1_LVDSCLK1_IBEN ((uint32_t)(1<<12))
  7311. #define PMU_MISC1_LVDSCLK2_OBEN ((uint32_t)(1<<11))
  7312. #define PMU_MISC1_LVDSCLK1_OBEN ((uint32_t)(1<<10))
  7313. #define PMU_MISC1_LVDS2_CLK_SEL(n) ((uint32_t)(((n) & 0x1F) << 5))
  7314. #define PMU_MISC1_LVDS1_CLK_SEL(n) ((uint32_t)(((n) & 0x1F) << 0))
  7315. #define PMU_MISC2_VIDEO_DIV(n) ((uint32_t)(((n) & 0x03) << 30))
  7316. #define PMU_MISC2_REG2_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 28))
  7317. #define PMU_MISC2_REG1_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 26))
  7318. #define PMU_MISC2_REG0_STEP_TIME(n) ((uint32_t)(((n) & 0x03) << 24))
  7319. #define PMU_MISC2_AUDIO_DIV_MSB ((uint32_t)(1<<23))
  7320. #define PMU_MISC2_REG2_OK ((uint32_t)(1<<22))
  7321. #define PMU_MISC2_REG2_ENABLE_BO ((uint32_t)(1<<21))
  7322. #define PMU_MISC2_REG2_BO_STATUS ((uint32_t)(1<<19))
  7323. #define PMU_MISC2_REG2_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 16))
  7324. #define PMU_MISC2_AUDIO_DIV_LSB ((uint32_t)(1<<15))
  7325. #define PMU_MISC2_REG1_ENABLE_BO ((uint32_t)(1<<13))
  7326. #define PMU_MISC2_REG1_BO_STATUS ((uint32_t)(1<<11))
  7327. #define PMU_MISC2_REG1_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 8))
  7328. #define PMU_MISC2_PLL3_DISABLE ((uint32_t)(1<<7))
  7329. #define PMU_MISC2_REG0_ENABLE_BO ((uint32_t)(1<<5))
  7330. #define PMU_MISC2_REG0_BO_STATUS ((uint32_t)(1<<3))
  7331. #define PMU_MISC2_REG0_BO_OFFSET(n) ((uint32_t)(((n) & 0x07) << 0))
  7332. // 36.8: page 1923
  7333. typedef struct
  7334. {
  7335. volatile uint32_t CTRL;
  7336. volatile uint32_t CTRL_SET;
  7337. volatile uint32_t CTRL_CLR;
  7338. volatile uint32_t CTLR_TOG;
  7339. volatile uint32_t STAT;
  7340. volatile uint32_t STAT_SET;
  7341. volatile uint32_t STAT_CLR;
  7342. volatile uint32_t STAT_TOG;
  7343. volatile uint32_t OUT_CTRL;
  7344. volatile uint32_t OUT_CTRL_SET;
  7345. volatile uint32_t OUT_CTRL_CLR;
  7346. volatile uint32_t OUT_CTRL_TOG;
  7347. volatile void* OUT_BUF;
  7348. volatile uint32_t unused1[3];
  7349. volatile void* OUT_BUF2;
  7350. volatile uint32_t unused2[3];
  7351. volatile uint32_t OUT_PITCH;
  7352. volatile uint32_t unused3[3];
  7353. volatile uint32_t OUT_LRC;
  7354. volatile uint32_t unused4[3];
  7355. volatile uint32_t OUT_PS_ULC;
  7356. volatile uint32_t unused5[3];
  7357. volatile uint32_t OUT_PS_LRC;
  7358. volatile uint32_t unused6[3];
  7359. volatile uint32_t OUT_AS_ULC;
  7360. volatile uint32_t unused7[3];
  7361. volatile uint32_t OUT_AS_LRC;
  7362. volatile uint32_t unused8[3];
  7363. volatile uint32_t PS_CTRL;
  7364. volatile uint32_t PS_CTRL_SET;
  7365. volatile uint32_t PS_CTRL_CLR;
  7366. volatile uint32_t PS_CTRL_TOG;
  7367. volatile void* PS_BUF;
  7368. volatile uint32_t unused9[3];
  7369. volatile void* PS_UBUF;
  7370. volatile uint32_t unused10[3];
  7371. volatile void* PS_VBUF;
  7372. volatile uint32_t unused11[3];
  7373. volatile uint32_t PS_PITCH;
  7374. volatile uint32_t unused12[3];
  7375. volatile uint32_t PS_BACKGROUND;
  7376. volatile uint32_t unused13[3];
  7377. volatile uint32_t PS_SCALE;
  7378. volatile uint32_t unused14[3];
  7379. volatile uint32_t PS_OFFSET;
  7380. volatile uint32_t unused15[3];
  7381. volatile uint32_t PS_CLRKEYLOW;
  7382. volatile uint32_t unused16[3];
  7383. volatile uint32_t PS_CLRKEYHIGH;
  7384. volatile uint32_t unused17[3];
  7385. volatile uint32_t AS_CTRL;
  7386. volatile uint32_t unused18[3];
  7387. volatile void* AS_BUF;
  7388. volatile uint32_t unused19[3];
  7389. volatile uint32_t AS_PITCH;
  7390. volatile uint32_t unused20[3];
  7391. volatile uint32_t AS_CLRKEYLOW;
  7392. volatile uint32_t unused21[3];
  7393. volatile uint32_t AS_CLRKEYHIGH;
  7394. volatile uint32_t unused22[3];
  7395. volatile uint32_t CSC1_COEF0;
  7396. volatile uint32_t unused23[3];
  7397. volatile uint32_t CSC1_COEF1;
  7398. volatile uint32_t unused24[3];
  7399. volatile uint32_t CSC1_COEF2;
  7400. volatile uint32_t unused25[87];
  7401. volatile uint32_t POWER;
  7402. volatile uint32_t unused26[55];
  7403. volatile uint32_t NEXT;
  7404. volatile uint32_t unused27[15];
  7405. volatile uint32_t PORTER_DUFF_CTRL;
  7406. } IMXRT_PXP_t;
  7407. #define IMXRT_PXP (*(IMXRT_PXP_t *)IMXRT_PXP_ADDRESS)
  7408. #define PXP_CTRL (IMXRT_PXP.CTRL)
  7409. #define PXP_CTRL_SET (IMXRT_PXP.CTRL_SET)
  7410. #define PXP_CTRL_CLR (IMXRT_PXP.CTRL_CLR)
  7411. #define PXP_CTRL_TOG (IMXRT_PXP.CTRL_TOG)
  7412. #define PXP_STAT (IMXRT_PXP.STAT)
  7413. #define PXP_STAT_SET (IMXRT_PXP.STAT_SET)
  7414. #define PXP_STAT_CLR (IMXRT_PXP.STAT_CLR)
  7415. #define PXP_STAT_TOG (IMXRT_PXP.STAT_TOG)
  7416. #define PXP_OUT_CTRL (IMXRT_PXP.OUT_CTRL)
  7417. #define PXP_OUT_CTRL_SET (IMXRT_PXP.OUT_CTRL_SET)
  7418. #define PXP_OUT_CTRL_CLR (IMXRT_PXP.OUT_CTRL_CLR)
  7419. #define PXP_OUT_CTRL_TOG (IMXRT_PXP.OUT_CTRL_TOG)
  7420. #define PXP_OUT_BUF (IMXRT_PXP.OUT_BUF)
  7421. #define PXP_OUT_BUF2 (IMXRT_PXP.OUT_BUF2)
  7422. #define PXP_OUT_PITCH (IMXRT_PXP.OUT_PITCH)
  7423. #define PXP_OUT_LRC (IMXRT_PXP.OUT_LRC)
  7424. #define PXP_OUT_PS_ULC (IMXRT_PXP.OUT_PS_ULC)
  7425. #define PXP_OUT_PS_LRC (IMXRT_PXP.OUT_PS_LRC)
  7426. #define PXP_OUT_AS_ULC (IMXRT_PXP.OUT_AS_ULC)
  7427. #define PXP_OUT_AS_LRC (IMXRT_PXP.OUT_AS_LRC)
  7428. #define PXP_PS_CTRL (IMXRT_PXP.PS_CTRL)
  7429. #define PXP_PS_CTRL_SET (IMXRT_PXP.PS_CTRL_SET)
  7430. #define PXP_PS_CTRL_CLR (IMXRT_PXP.PS_CTRL_CLR)
  7431. #define PXP_PS_CTRL_TOG (IMXRT_PXP.PS_CTRL_TOG)
  7432. #define PXP_PS_BUF (IMXRT_PXP.PS_BUF)
  7433. #define PXP_PS_UBUF (IMXRT_PXP.PS_UBUF)
  7434. #define PXP_PS_VBUF (IMXRT_PXP.PS_VBUF)
  7435. #define PXP_PS_PITCH (IMXRT_PXP.PS_PITCH)
  7436. #define PXP_PS_BACKGROUND_0 (IMXRT_PXP.PS_BACKGROUND)
  7437. #define PXP_PS_SCALE (IMXRT_PXP.PS_SCALE)
  7438. #define PXP_PS_OFFSET (IMXRT_PXP.PS_OFFSET)
  7439. #define PXP_PS_CLRKEYLOW_0 (IMXRT_PXP.PS_CLRKEYLOW)
  7440. #define PXP_PS_CLRKEYHIGH_0 (IMXRT_PXP.PS_CLRKEYHIGH)
  7441. #define PXP_AS_CTRL (IMXRT_PXP.AS_CTRL)
  7442. #define PXP_AS_BUF (IMXRT_PXP.AS_BUF)
  7443. #define PXP_AS_PITCH (IMXRT_PXP.AS_PITCH)
  7444. #define PXP_AS_CLRKEYLOW_0 (IMXRT_PXP.AS_CLRKEYLOW)
  7445. #define PXP_AS_CLRKEYHIGH_0 (IMXRT_PXP.AS_CLRKEYHIGH)
  7446. #define PXP_CSC1_COEF0 (IMXRT_PXP.CSC1_COEF0)
  7447. #define PXP_CSC1_COEF1 (IMXRT_PXP.CSC1_COEF1)
  7448. #define PXP_CSC1_COEF2 (IMXRT_PXP.CSC1_COEF2)
  7449. #define PXP_POWER (IMXRT_PXP.POWER)
  7450. #define PXP_NEXT (IMXRT_PXP.NEXT)
  7451. #define PXP_PORTER_DUFF_CTRL (IMXRT_PXP.PORTER_DUFF_CTRL)
  7452. #define PXP_ARGB8888 0x0 //32-bit pixels with alpha
  7453. #define PXP_RGBA888 0x1 //32-bit pixel with alpha at low 8 bits
  7454. #define PXP_RGB888 0x4 //32-bit pixels without alpha (unpacked 24-bit format)
  7455. #define PXP_RGB888P 0x5 //24-bit pixels (packed 24-bit format)
  7456. #define PXP_ARGB1555 0x8 //16-bit pixels with alpha at low 1 bit
  7457. #define PXP_ARGB4444 0x9 //16-bit pixels with alpha at low 4 bits
  7458. #define PXP_RGB555 0xC //16-bit pixels without alpha
  7459. #define PXP_RGB444 0xD //16-bit pixels without alpha
  7460. #define PXP_RGB565 0xE //16-bit pixels without alpha
  7461. #define PXP_YUV1P444 0x10 //32-bit pixels (1-plane XYUV unpacked)
  7462. #define PXP_UYVY1P422 0x12 //16-bit pixels (1-plane U0,Y0,V0,Y1 interleaved bytes)
  7463. #define PXP_VYUY1P422 0x13 //16-bit pixels (1-plane V0,Y0,U0,Y1 interleaved bytes)
  7464. #define PXP_Y8 0x14 //8-bit monochrome pixels (1-plane Y luma output)
  7465. #define PXP_Y4 0x15 //4-bit monochrome pixels (1-plane Y luma, 4 bit truncation)
  7466. #define PXP_YUV2P422 0x18 //16-bit pixels (2-plane UV interleaved bytes)
  7467. #define PXP_YUV2P420 0x19 //16-bit pixels (2-plane UV)
  7468. #define PXP_YVU2P422 0x1A //16-bit pixels (2-plane VU interleaved bytes)
  7469. #define PXP_YVU2P420 0x1B //16-bit pixels (2-plane VU)
  7470. #define PXP_YUV422 0x1E //16-bit pixels (3-plane format)
  7471. #define PXP_YUV420 0x1F //16-bit pixels (3-plane format)
  7472. #define PXP_MASKAS 0x0
  7473. #define PXP_MASKNOTAS 0x1
  7474. #define PXP_MASKASNOT 0x2
  7475. #define PXP_MERGEAS 0x3
  7476. #define PXP_MERGENOTAS 0x4
  7477. #define PXP_MERGEASNOT 0x5
  7478. #define PXP_NOTCOPYAS 0x6
  7479. #define PXP_NOT 0x7
  7480. #define PXP_NOTMASKAS 0x8
  7481. #define PXP_NOTMERGEAS 0x9
  7482. #define PXP_XORAS 0xA
  7483. #define PXP_NOTXORAS 0xB
  7484. #define PXP_CTRL_ENABLE ((uint32_t)(1))
  7485. #define PXP_CTRL_IRQ_ENABLE ((uint32_t)(1<<1))
  7486. #define PXP_CTRL_NEXT_IRQ_ENABLE ((uint32_t)(1<<2))
  7487. #define PXP_CTRL_ENABLE_LCD_HANDSHAKE ((uint32_t)(1<<4))
  7488. #define PXP_CTRL_ROTATE(n) ((uint32_t)(((n) & 0x03) << 8))
  7489. #define PXP_CTRL_HFLIP ((uint32_t)(1<<10))
  7490. #define PXP_CTRL_VFLIP ((uint32_t)(1<<11))
  7491. #define PXP_CTRL_ROT_POS ((uint32_t)(1<<22))
  7492. #define PXP_CTRL_BLOCK_SIZE ((uint32_t)(1<<23))
  7493. #define PXP_CTRL_EN_REPEAT ((uint32_t)(1<<28))
  7494. #define PXP_CTRL_CLKGATE ((uint32_t)(1<<30))
  7495. #define PXP_CTRL_SFTRST ((uint32_t)(1<<31))
  7496. #define PXP_STAT_IRQ ((uint32_t)(1))
  7497. #define PXP_STAT_AXI_WRITE_ERROR ((uint32_t)(1<<1))
  7498. #define PXP_STAT_AXI_READ_ERROR ((uint32_t)(1<<2))
  7499. #define PXP_STAT_NEXT_IRQ ((uint32_t)(1<<3))
  7500. #define PXP_STAT_AXI_ERROR_ID ((uint32_t)((PXP_STAT>>4) & 0xF))
  7501. #define PXP_STAT_LUT_DMA_LOAD_DONE_IRQ ((uint32_t)(1<<8))
  7502. #define PXP_STAT_BLOCKY ((uint32_t)((PXP_STAT>>16) & 0xFF))
  7503. #define PXP_STAT_BLOCKX ((uint32_t)((PXP_STAT>>24) & 0xFF))
  7504. #define PXP_OUT_CTRL_FORMAT(n) ((uint32_t)(((n) & 0x1F)))
  7505. #define PXP_OUT_CTRL_INTERLACED_OUTPUT(n) ((uint32_t)(((n) & 0x3) << 8))
  7506. #define PXP_OUT_CTRL_ALPHA_OUTPUT ((uint32_t)(1<<23))
  7507. #define PXP_OUT_CTRL_ALPHA(n) ((uint32_t)(((n) & 0xFF) << 24))
  7508. #define PXP_PS_CTRL_FORMAT(n) ((uint32_t)(((n) & 0x1F)))
  7509. #define PXP_PS_CTRL_WB_SWAP ((uint32_t)(1<<5))
  7510. #define PXP_PS_CTRL_DECY(n) ((uint32_t)(((n) & 0x3) << 8))
  7511. #define PXP_PS_CTRL_DECX(n) ((uint32_t)(((n) & 0x3) << 10))
  7512. #define PXP_AS_CTRL_ALPHA_CTRL(n) ((uint32_t)(((n) & 0x3) << 1))
  7513. #define PXP_AS_CTRL_ENABLE_COLORKEY ((uint32_t)(1<<3))
  7514. #define PXP_AS_CTRL_FORMAT(n) ((uint32_t)(((n) & 0xF) << 4))
  7515. #define PXP_AS_CTRL_ALPHA(n) ((uint32_t)(((n) & 0xFF) << 8))
  7516. #define PXP_AS_CTRL_ROP(n) ((uint32_t)(((n) & 0xF) << 16))
  7517. #define PXP_AS_CTRL_ALPHA_INVERT ((uint32_t)(1<<20))
  7518. #define PXP_COEF0_Y_OFFSET(n) ((uint32_t)(((n) & 0x1FF)))
  7519. #define PXP_COEF0_UV_OFFSET(n) ((uint32_t)(((n) & 0x1FF) << 9))
  7520. #define PXP_COEF0_C0(n) ((uint32_t)(((n) & 0x7FF) << 18))
  7521. #define PXP_COEF0_BYPASS ((uint32_t)(1<<30))
  7522. #define PXP_COEF0_YCBCR_MODE ((uint32_t)(1<<31))
  7523. #define PXP_COEF1_C4(n) ((uint32_t)(((n) & 0x7FF)))
  7524. #define PXP_COEF1_C1(n) ((uint32_t)(((n) & 0x7FF) << 16))
  7525. #define PXP_COEF2_C3(n) ((uint32_t)(((n) & 0x7FF)))
  7526. #define PXP_COEF2_C2(n) ((uint32_t)(((n) & 0x7FF) << 16))
  7527. #define PXP_POWER_ROT_MEM_LP_STATE(n) ((uint32_t)(((n) & 0x7) << 9))
  7528. #define PXP_POWER_CTRL(n) ((uint32_t)(((n) & 0xFFFFF) << 12))
  7529. #define PXP_NEXT_ENABLED ((uint32_t)(1))
  7530. #define PXP_NEXT_POINTER(n) ((uint32_t)(((n) & 0xFFFFFFFC)))
  7531. #define PXP_PORTER_DUFF_CTRL_PORTER_DUFF_ENABLE ((uint32_t)(1))
  7532. #define PXP_PORTER_DUFF_CTRL_S0_S1_FACTOR_MODE(n) ((uint32_t)(((n) & 0x3) << 1))
  7533. #define PXP_PORTER_DUFF_CTRL_S0_GLOBAL_ALPHA_MODE(n) ((uint32_t)(((n) & 0x3) << 3))
  7534. #define PXP_PORTER_DUFF_CTRL_S0_ALPHA_MODE ((uint32_t)(1<<5))
  7535. #define PXP_PORTER_DUFF_CTRL_S0_COLOR_MODE ((uint32_t)(1<<6))
  7536. #define PXP_PORTER_DUFF_CTRL_S1_S0_FACTOR_MODE(n) ((uint32_t)(((n) & 0x3) << 8))
  7537. #define PXP_PORTER_DUFF_CTRL_S1_GLOBAL_ALPHA_MODE(n) ((uint32_t)(((n) & 0x3) << 10))
  7538. #define PXP_PORTER_DUFF_CTRL_S1_ALPHA_MODE ((uint32_t)(1<<12))
  7539. #define PXP_PORTER_DUFF_CTRL_S1_COLOR_MODE ((uint32_t)(1<<13))
  7540. #define PXP_PORTER_DUFF_CTRL_S0_GLOBAL_ALPHA(n) ((uint32_t)(((n) & 0xFF) << 16))
  7541. #define PXP_PORTER_DUFF_CTRL_S1_GLOBAL_ALPHA(n) ((uint32_t)(((n) & 0xFF) << 24))
  7542. #define PXP_PITCH(n) ((uint32_t)(((n) & 0xFFFF)))
  7543. #define PXP_XCOORD(n) ((uint32_t)(((n) & 0x3FFFFFFF) << 16))
  7544. #define PXP_YCOORD(n) ((uint32_t)(((n) & 0x3FFFFFFF)))
  7545. #define PXP_XSCALE(n) ((uint32_t)(((n) & 0x7FFFFFFF)))
  7546. #define PXP_YSCALE(n) ((uint32_t)(((n) & 0x7FFFFFFF) << 16))
  7547. #define PXP_XOFFSET(n) ((uint32_t)(((n) & 0xFFFFFFF)))
  7548. #define PXP_YOFFSET(n) ((uint32_t)(((n) & 0xFFFFFFF) << 16))
  7549. #define PXP_COLOR(n) ((uint32_t)(((n) & 0xFFFFFF)))
  7550. // 54.6: page 2990
  7551. typedef struct
  7552. {
  7553. volatile uint16_t COMP1;
  7554. volatile uint16_t COMP2;
  7555. volatile uint16_t CAPT;
  7556. volatile uint16_t LOAD;
  7557. volatile uint16_t HOLD;
  7558. volatile uint16_t CNTR;
  7559. volatile uint16_t CTRL;
  7560. volatile uint16_t SCTRL;
  7561. volatile uint16_t CMPLD1;
  7562. volatile uint16_t CMPLD2;
  7563. volatile uint16_t CSCTRL;
  7564. volatile uint16_t FILT;
  7565. volatile uint16_t DMA;
  7566. volatile uint16_t unused1[3];
  7567. } IMXRT_TMR_CH_t;
  7568. typedef struct
  7569. {
  7570. union {
  7571. IMXRT_TMR_CH_t CH[4];
  7572. struct
  7573. {
  7574. volatile uint16_t unused2[15];
  7575. volatile uint16_t ENBL;
  7576. };
  7577. };
  7578. } IMXRT_TMR_t;
  7579. #define IMXRT_TMR1 (*(IMXRT_TMR_t *)IMXRT_TMR1_ADDRESS)
  7580. #define TMR1_COMP10 (IMXRT_TMR1.CH[0].COMP1)
  7581. #define TMR1_COMP20 (IMXRT_TMR1.CH[0].COMP2)
  7582. #define TMR1_CAPT0 (IMXRT_TMR1.CH[0].CAPT)
  7583. #define TMR1_LOAD0 (IMXRT_TMR1.CH[0].LOAD)
  7584. #define TMR1_HOLD0 (IMXRT_TMR1.CH[0].HOLD)
  7585. #define TMR1_CNTR0 (IMXRT_TMR1.CH[0].CNTR)
  7586. #define TMR1_CTRL0 (IMXRT_TMR1.CH[0].CTRL)
  7587. #define TMR1_SCTRL0 (IMXRT_TMR1.CH[0].SCTRL)
  7588. #define TMR1_CMPLD10 (IMXRT_TMR1.CH[0].CMPLD1)
  7589. #define TMR1_CMPLD20 (IMXRT_TMR1.CH[0].CMPLD2)
  7590. #define TMR1_CSCTRL0 (IMXRT_TMR1.CH[0].CSCTRL)
  7591. #define TMR1_FILT0 (IMXRT_TMR1.CH[0].FILT)
  7592. #define TMR1_DMA0 (IMXRT_TMR1.CH[0].DMA)
  7593. #define TMR1_ENBL (IMXRT_TMR1.ENBL)
  7594. #define TMR1_COMP11 (IMXRT_TMR1.CH[1].COMP1)
  7595. #define TMR1_COMP21 (IMXRT_TMR1.CH[1].COMP2)
  7596. #define TMR1_CAPT1 (IMXRT_TMR1.CH[1].CAPT)
  7597. #define TMR1_LOAD1 (IMXRT_TMR1.CH[1].LOAD)
  7598. #define TMR1_HOLD1 (IMXRT_TMR1.CH[1].HOLD)
  7599. #define TMR1_CNTR1 (IMXRT_TMR1.CH[1].CNTR)
  7600. #define TMR1_CTRL1 (IMXRT_TMR1.CH[1].CTRL)
  7601. #define TMR1_SCTRL1 (IMXRT_TMR1.CH[1].SCTRL)
  7602. #define TMR1_CMPLD11 (IMXRT_TMR1.CH[1].CMPLD1)
  7603. #define TMR1_CMPLD21 (IMXRT_TMR1.CH[1].CMPLD2)
  7604. #define TMR1_CSCTRL1 (IMXRT_TMR1.CH[1].CSCTRL)
  7605. #define TMR1_FILT1 (IMXRT_TMR1.CH[1].FILT)
  7606. #define TMR1_DMA1 (IMXRT_TMR1.CH[1].DMA)
  7607. #define TMR1_COMP12 (IMXRT_TMR1.CH[2].COMP1)
  7608. #define TMR1_COMP22 (IMXRT_TMR1.CH[2].COMP2)
  7609. #define TMR1_CAPT2 (IMXRT_TMR1.CH[2].CAPT)
  7610. #define TMR1_LOAD2 (IMXRT_TMR1.CH[2].LOAD)
  7611. #define TMR1_HOLD2 (IMXRT_TMR1.CH[2].HOLD)
  7612. #define TMR1_CNTR2 (IMXRT_TMR1.CH[2].CNTR)
  7613. #define TMR1_CTRL2 (IMXRT_TMR1.CH[2].CTRL)
  7614. #define TMR1_SCTRL2 (IMXRT_TMR1.CH[2].SCTRL)
  7615. #define TMR1_CMPLD12 (IMXRT_TMR1.CH[2].CMPLD1)
  7616. #define TMR1_CMPLD22 (IMXRT_TMR1.CH[2].CMPLD2)
  7617. #define TMR1_CSCTRL2 (IMXRT_TMR1.CH[2].CSCTRL)
  7618. #define TMR1_FILT2 (IMXRT_TMR1.CH[2].FILT)
  7619. #define TMR1_DMA2 (IMXRT_TMR1.CH[2].DMA)
  7620. #define TMR1_COMP13 (IMXRT_TMR1.CH[3].COMP1)
  7621. #define TMR1_COMP23 (IMXRT_TMR1.CH[3].COMP2)
  7622. #define TMR1_CAPT3 (IMXRT_TMR1.CH[3].CAPT)
  7623. #define TMR1_LOAD3 (IMXRT_TMR1.CH[3].LOAD)
  7624. #define TMR1_HOLD3 (IMXRT_TMR1.CH[3].HOLD)
  7625. #define TMR1_CNTR3 (IMXRT_TMR1.CH[3].CNTR)
  7626. #define TMR1_CTRL3 (IMXRT_TMR1.CH[3].CTRL)
  7627. #define TMR1_SCTRL3 (IMXRT_TMR1.CH[3].SCTRL)
  7628. #define TMR1_CMPLD13 (IMXRT_TMR1.CH[3].CMPLD1)
  7629. #define TMR1_CMPLD23 (IMXRT_TMR1.CH[3].CMPLD2)
  7630. #define TMR1_CSCTRL3 (IMXRT_TMR1.CH[3].CSCTRL)
  7631. #define TMR1_FILT3 (IMXRT_TMR1.CH[3].FILT)
  7632. #define TMR1_DMA3 (IMXRT_TMR1.CH[3].DMA)
  7633. #define IMXRT_TMR2 (*(IMXRT_TMR_t *)IMXRT_TMR2_ADDRESS)
  7634. #define TMR2_COMP10 (IMXRT_TMR2.CH[0].COMP1)
  7635. #define TMR2_COMP20 (IMXRT_TMR2.CH[0].COMP2)
  7636. #define TMR2_CAPT0 (IMXRT_TMR2.CH[0].CAPT)
  7637. #define TMR2_LOAD0 (IMXRT_TMR2.CH[0].LOAD)
  7638. #define TMR2_HOLD0 (IMXRT_TMR2.CH[0].HOLD)
  7639. #define TMR2_CNTR0 (IMXRT_TMR2.CH[0].CNTR)
  7640. #define TMR2_CTRL0 (IMXRT_TMR2.CH[0].CTRL)
  7641. #define TMR2_SCTRL0 (IMXRT_TMR2.CH[0].SCTRL)
  7642. #define TMR2_CMPLD10 (IMXRT_TMR2.CH[0].CMPLD1)
  7643. #define TMR2_CMPLD20 (IMXRT_TMR2.CH[0].CMPLD2)
  7644. #define TMR2_CSCTRL0 (IMXRT_TMR2.CH[0].CSCTRL)
  7645. #define TMR2_FILT0 (IMXRT_TMR2.CH[0].FILT)
  7646. #define TMR2_DMA0 (IMXRT_TMR2.CH[0].DMA)
  7647. #define TMR2_ENBL (IMXRT_TMR2.ENBL)
  7648. #define TMR2_COMP11 (IMXRT_TMR2.CH[1].COMP1)
  7649. #define TMR2_COMP21 (IMXRT_TMR2.CH[1].COMP2)
  7650. #define TMR2_CAPT1 (IMXRT_TMR2.CH[1].CAPT)
  7651. #define TMR2_LOAD1 (IMXRT_TMR2.CH[1].LOAD)
  7652. #define TMR2_HOLD1 (IMXRT_TMR2.CH[1].HOLD)
  7653. #define TMR2_CNTR1 (IMXRT_TMR2.CH[1].CNTR)
  7654. #define TMR2_CTRL1 (IMXRT_TMR2.CH[1].CTRL)
  7655. #define TMR2_SCTRL1 (IMXRT_TMR2.CH[1].SCTRL)
  7656. #define TMR2_CMPLD11 (IMXRT_TMR2.CH[1].CMPLD1)
  7657. #define TMR2_CMPLD21 (IMXRT_TMR2.CH[1].CMPLD2)
  7658. #define TMR2_CSCTRL1 (IMXRT_TMR2.CH[1].CSCTRL)
  7659. #define TMR2_FILT1 (IMXRT_TMR2.CH[1].FILT)
  7660. #define TMR2_DMA1 (IMXRT_TMR2.CH[1].DMA)
  7661. #define TMR2_COMP12 (IMXRT_TMR2.CH[2].COMP1)
  7662. #define TMR2_COMP22 (IMXRT_TMR2.CH[2].COMP2)
  7663. #define TMR2_CAPT2 (IMXRT_TMR2.CH[2].CAPT)
  7664. #define TMR2_LOAD2 (IMXRT_TMR2.CH[2].LOAD)
  7665. #define TMR2_HOLD2 (IMXRT_TMR2.CH[2].HOLD)
  7666. #define TMR2_CNTR2 (IMXRT_TMR2.CH[2].CNTR)
  7667. #define TMR2_CTRL2 (IMXRT_TMR2.CH[2].CTRL)
  7668. #define TMR2_SCTRL2 (IMXRT_TMR2.CH[2].SCTRL)
  7669. #define TMR2_CMPLD12 (IMXRT_TMR2.CH[2].CMPLD1)
  7670. #define TMR2_CMPLD22 (IMXRT_TMR2.CH[2].CMPLD2)
  7671. #define TMR2_CSCTRL2 (IMXRT_TMR2.CH[2].CSCTRL)
  7672. #define TMR2_FILT2 (IMXRT_TMR2.CH[2].FILT)
  7673. #define TMR2_DMA2 (IMXRT_TMR2.CH[2].DMA)
  7674. #define TMR2_COMP13 (IMXRT_TMR2.CH[3].COMP1)
  7675. #define TMR2_COMP23 (IMXRT_TMR2.CH[3].COMP2)
  7676. #define TMR2_CAPT3 (IMXRT_TMR2.CH[3].CAPT)
  7677. #define TMR2_LOAD3 (IMXRT_TMR2.CH[3].LOAD)
  7678. #define TMR2_HOLD3 (IMXRT_TMR2.CH[3].HOLD)
  7679. #define TMR2_CNTR3 (IMXRT_TMR2.CH[3].CNTR)
  7680. #define TMR2_CTRL3 (IMXRT_TMR2.CH[3].CTRL)
  7681. #define TMR2_SCTRL3 (IMXRT_TMR2.CH[3].SCTRL)
  7682. #define TMR2_CMPLD13 (IMXRT_TMR2.CH[3].CMPLD1)
  7683. #define TMR2_CMPLD23 (IMXRT_TMR2.CH[3].CMPLD2)
  7684. #define TMR2_CSCTRL3 (IMXRT_TMR2.CH[3].CSCTRL)
  7685. #define TMR2_FILT3 (IMXRT_TMR2.CH[3].FILT)
  7686. #define TMR2_DMA3 (IMXRT_TMR2.CH[3].DMA)
  7687. #define IMXRT_TMR3 (*(IMXRT_TMR_t *)IMXRT_TMR3_ADDRESS)
  7688. #define TMR3_COMP10 (IMXRT_TMR3.CH[0].COMP1)
  7689. #define TMR3_COMP20 (IMXRT_TMR3.CH[0].COMP2)
  7690. #define TMR3_CAPT0 (IMXRT_TMR3.CH[0].CAPT)
  7691. #define TMR3_LOAD0 (IMXRT_TMR3.CH[0].LOAD)
  7692. #define TMR3_HOLD0 (IMXRT_TMR3.CH[0].HOLD)
  7693. #define TMR3_CNTR0 (IMXRT_TMR3.CH[0].CNTR)
  7694. #define TMR3_CTRL0 (IMXRT_TMR3.CH[0].CTRL)
  7695. #define TMR3_SCTRL0 (IMXRT_TMR3.CH[0].SCTRL)
  7696. #define TMR3_CMPLD10 (IMXRT_TMR3.CH[0].CMPLD1)
  7697. #define TMR3_CMPLD20 (IMXRT_TMR3.CH[0].CMPLD2)
  7698. #define TMR3_CSCTRL0 (IMXRT_TMR3.CH[0].CSCTRL)
  7699. #define TMR3_FILT0 (IMXRT_TMR3.CH[0].FILT)
  7700. #define TMR3_DMA0 (IMXRT_TMR3.CH[0].DMA)
  7701. #define TMR3_ENBL (IMXRT_TMR3.ENBL)
  7702. #define TMR3_COMP11 (IMXRT_TMR3.CH[1].COMP1)
  7703. #define TMR3_COMP21 (IMXRT_TMR3.CH[1].COMP2)
  7704. #define TMR3_CAPT1 (IMXRT_TMR3.CH[1].CAPT)
  7705. #define TMR3_LOAD1 (IMXRT_TMR3.CH[1].LOAD)
  7706. #define TMR3_HOLD1 (IMXRT_TMR3.CH[1].HOLD)
  7707. #define TMR3_CNTR1 (IMXRT_TMR3.CH[1].CNTR)
  7708. #define TMR3_CTRL1 (IMXRT_TMR3.CH[1].CTRL)
  7709. #define TMR3_SCTRL1 (IMXRT_TMR3.CH[1].SCTRL)
  7710. #define TMR3_CMPLD11 (IMXRT_TMR3.CH[1].CMPLD1)
  7711. #define TMR3_CMPLD21 (IMXRT_TMR3.CH[1].CMPLD2)
  7712. #define TMR3_CSCTRL1 (IMXRT_TMR3.CH[1].CSCTRL)
  7713. #define TMR3_FILT1 (IMXRT_TMR3.CH[1].FILT)
  7714. #define TMR3_DMA1 (IMXRT_TMR3.CH[1].DMA)
  7715. #define TMR3_COMP12 (IMXRT_TMR3.CH[2].COMP1)
  7716. #define TMR3_COMP22 (IMXRT_TMR3.CH[2].COMP2)
  7717. #define TMR3_CAPT2 (IMXRT_TMR3.CH[2].CAPT)
  7718. #define TMR3_LOAD2 (IMXRT_TMR3.CH[2].LOAD)
  7719. #define TMR3_HOLD2 (IMXRT_TMR3.CH[2].HOLD)
  7720. #define TMR3_CNTR2 (IMXRT_TMR3.CH[2].CNTR)
  7721. #define TMR3_CTRL2 (IMXRT_TMR3.CH[2].CTRL)
  7722. #define TMR3_SCTRL2 (IMXRT_TMR3.CH[2].SCTRL)
  7723. #define TMR3_CMPLD12 (IMXRT_TMR3.CH[2].CMPLD1)
  7724. #define TMR3_CMPLD22 (IMXRT_TMR3.CH[2].CMPLD2)
  7725. #define TMR3_CSCTRL2 (IMXRT_TMR3.CH[2].CSCTRL)
  7726. #define TMR3_FILT2 (IMXRT_TMR3.CH[2].FILT)
  7727. #define TMR3_DMA2 (IMXRT_TMR3.CH[2].DMA)
  7728. #define TMR3_COMP13 (IMXRT_TMR3.CH[3].COMP1)
  7729. #define TMR3_COMP23 (IMXRT_TMR3.CH[3].COMP2)
  7730. #define TMR3_CAPT3 (IMXRT_TMR3.CH[3].CAPT)
  7731. #define TMR3_LOAD3 (IMXRT_TMR3.CH[3].LOAD)
  7732. #define TMR3_HOLD3 (IMXRT_TMR3.CH[3].HOLD)
  7733. #define TMR3_CNTR3 (IMXRT_TMR3.CH[3].CNTR)
  7734. #define TMR3_CTRL3 (IMXRT_TMR3.CH[3].CTRL)
  7735. #define TMR3_SCTRL3 (IMXRT_TMR3.CH[3].SCTRL)
  7736. #define TMR3_CMPLD13 (IMXRT_TMR3.CH[3].CMPLD1)
  7737. #define TMR3_CMPLD23 (IMXRT_TMR3.CH[3].CMPLD2)
  7738. #define TMR3_CSCTRL3 (IMXRT_TMR3.CH[3].CSCTRL)
  7739. #define TMR3_FILT3 (IMXRT_TMR3.CH[3].FILT)
  7740. #define TMR3_DMA3 (IMXRT_TMR3.CH[3].DMA)
  7741. #define IMXRT_TMR4 (*(IMXRT_TMR_t *)IMXRT_TMR4_ADDRESS)
  7742. #define TMR4_COMP10 (IMXRT_TMR4.CH[0].COMP1)
  7743. #define TMR4_COMP20 (IMXRT_TMR4.CH[0].COMP2)
  7744. #define TMR4_CAPT0 (IMXRT_TMR4.CH[0].CAPT)
  7745. #define TMR4_LOAD0 (IMXRT_TMR4.CH[0].LOAD)
  7746. #define TMR4_HOLD0 (IMXRT_TMR4.CH[0].HOLD)
  7747. #define TMR4_CNTR0 (IMXRT_TMR4.CH[0].CNTR)
  7748. #define TMR4_CTRL0 (IMXRT_TMR4.CH[0].CTRL)
  7749. #define TMR4_SCTRL0 (IMXRT_TMR4.CH[0].SCTRL)
  7750. #define TMR4_CMPLD10 (IMXRT_TMR4.CH[0].CMPLD1)
  7751. #define TMR4_CMPLD20 (IMXRT_TMR4.CH[0].CMPLD2)
  7752. #define TMR4_CSCTRL0 (IMXRT_TMR4.CH[0].CSCTRL)
  7753. #define TMR4_FILT0 (IMXRT_TMR4.CH[0].FILT)
  7754. #define TMR4_DMA0 (IMXRT_TMR4.CH[0].DMA)
  7755. #define TMR4_ENBL (IMXRT_TMR4.ENBL)
  7756. #define TMR4_COMP11 (IMXRT_TMR4.CH[1].COMP1)
  7757. #define TMR4_COMP21 (IMXRT_TMR4.CH[1].COMP2)
  7758. #define TMR4_CAPT1 (IMXRT_TMR4.CH[1].CAPT)
  7759. #define TMR4_LOAD1 (IMXRT_TMR4.CH[1].LOAD)
  7760. #define TMR4_HOLD1 (IMXRT_TMR4.CH[1].HOLD)
  7761. #define TMR4_CNTR1 (IMXRT_TMR4.CH[1].CNTR)
  7762. #define TMR4_CTRL1 (IMXRT_TMR4.CH[1].CTRL)
  7763. #define TMR4_SCTRL1 (IMXRT_TMR4.CH[1].SCTRL)
  7764. #define TMR4_CMPLD11 (IMXRT_TMR4.CH[1].CMPLD1)
  7765. #define TMR4_CMPLD21 (IMXRT_TMR4.CH[1].CMPLD2)
  7766. #define TMR4_CSCTRL1 (IMXRT_TMR4.CH[1].CSCTRL)
  7767. #define TMR4_FILT1 (IMXRT_TMR4.CH[1].FILT)
  7768. #define TMR4_DMA1 (IMXRT_TMR4.CH[1].DMA)
  7769. #define TMR4_COMP12 (IMXRT_TMR4.CH[2].COMP1)
  7770. #define TMR4_COMP22 (IMXRT_TMR4.CH[2].COMP2)
  7771. #define TMR4_CAPT2 (IMXRT_TMR4.CH[2].CAPT)
  7772. #define TMR4_LOAD2 (IMXRT_TMR4.CH[2].LOAD)
  7773. #define TMR4_HOLD2 (IMXRT_TMR4.CH[2].HOLD)
  7774. #define TMR4_CNTR2 (IMXRT_TMR4.CH[2].CNTR)
  7775. #define TMR4_CTRL2 (IMXRT_TMR4.CH[2].CTRL)
  7776. #define TMR4_SCTRL2 (IMXRT_TMR4.CH[2].SCTRL)
  7777. #define TMR4_CMPLD12 (IMXRT_TMR4.CH[2].CMPLD1)
  7778. #define TMR4_CMPLD22 (IMXRT_TMR4.CH[2].CMPLD2)
  7779. #define TMR4_CSCTRL2 (IMXRT_TMR4.CH[2].CSCTRL)
  7780. #define TMR4_FILT2 (IMXRT_TMR4.CH[2].FILT)
  7781. #define TMR4_DMA2 (IMXRT_TMR4.CH[2].DMA)
  7782. #define TMR4_COMP13 (IMXRT_TMR4.CH[3].COMP1)
  7783. #define TMR4_COMP23 (IMXRT_TMR4.CH[3].COMP2)
  7784. #define TMR4_CAPT3 (IMXRT_TMR4.CH[3].CAPT)
  7785. #define TMR4_LOAD3 (IMXRT_TMR4.CH[3].LOAD)
  7786. #define TMR4_HOLD3 (IMXRT_TMR4.CH[3].HOLD)
  7787. #define TMR4_CNTR3 (IMXRT_TMR4.CH[3].CNTR)
  7788. #define TMR4_CTRL3 (IMXRT_TMR4.CH[3].CTRL)
  7789. #define TMR4_SCTRL3 (IMXRT_TMR4.CH[3].SCTRL)
  7790. #define TMR4_CMPLD13 (IMXRT_TMR4.CH[3].CMPLD1)
  7791. #define TMR4_CMPLD23 (IMXRT_TMR4.CH[3].CMPLD2)
  7792. #define TMR4_CSCTRL3 (IMXRT_TMR4.CH[3].CSCTRL)
  7793. #define TMR4_FILT3 (IMXRT_TMR4.CH[3].FILT)
  7794. #define TMR4_DMA3 (IMXRT_TMR4.CH[3].DMA)
  7795. #define TMR_CTRL_CM(n) ((uint16_t)(((n) & 0x07) << 13))
  7796. #define TMR_CTRL_PCS(n) ((uint16_t)(((n) & 0x0F) << 9))
  7797. #define TMR_CTRL_SCS(n) ((uint16_t)(((n) & 0x03) << 7))
  7798. #define TMR_CTRL_ONCE ((uint16_t)(1<<6))
  7799. #define TMR_CTRL_LENGTH ((uint16_t)(1<<5))
  7800. #define TMR_CTRL_DIR ((uint16_t)(1<<4))
  7801. #define TMR_CTRL_COINIT ((uint16_t)(1<<3))
  7802. #define TMR_CTRL_OUTMODE(n) ((uint16_t)(((n) & 0x07) << 0))
  7803. #define TMR_SCTRL_TCF ((uint16_t)(1<<15))
  7804. #define TMR_SCTRL_TCFIE ((uint16_t)(1<<14))
  7805. #define TMR_SCTRL_TOF ((uint16_t)(1<<13))
  7806. #define TMR_SCTRL_TOFIE ((uint16_t)(1<<12))
  7807. #define TMR_SCTRL_IEF ((uint16_t)(1<<11))
  7808. #define TMR_SCTRL_IEFIE ((uint16_t)(1<<10))
  7809. #define TMR_SCTRL_IPS ((uint16_t)(1<<9))
  7810. #define TMR_SCTRL_INPUT ((uint16_t)(1<<8))
  7811. #define TMR_SCTRL_CAPTURE_MODE(n) ((uint16_t)(((n) & 0x03) << 6))
  7812. #define TMR_SCTRL_MSTR ((uint16_t)(1<<5))
  7813. #define TMR_SCTRL_EEOF ((uint16_t)(1<<4))
  7814. #define TMR_SCTRL_VAL ((uint16_t)(1<<3))
  7815. #define TMR_SCTRL_FORCE ((uint16_t)(1<<2))
  7816. #define TMR_SCTRL_OPS ((uint16_t)(1<<1))
  7817. #define TMR_SCTRL_OEN ((uint16_t)(1<<0))
  7818. #define TMR_CSCTRL_DBG_EN(n) ((uint16_t)(((n) & 0x03) << 14))
  7819. #define TMR_CSCTRL_FAULT ((uint16_t)(1<<13))
  7820. #define TMR_CSCTRL_ALT_LOAD ((uint16_t)(1<<12))
  7821. #define TMR_CSCTRL_ROC ((uint16_t)(1<<11))
  7822. #define TMR_CSCTRL_TCI ((uint16_t)(1<<10))
  7823. #define TMR_CSCTRL_UP ((uint16_t)(1<<9))
  7824. #define TMR_CSCTRL_TCF2EN ((uint16_t)(1<<7))
  7825. #define TMR_CSCTRL_TCF1EN ((uint16_t)(1<<6))
  7826. #define TMR_CSCTRL_TCF2 ((uint16_t)(1<<5))
  7827. #define TMR_CSCTRL_TCF1 ((uint16_t)(1<<4))
  7828. #define TMR_CSCTRL_CL2(n) ((uint16_t)(((n) & 0x03) << 2))
  7829. #define TMR_CSCTRL_CL1(n) ((uint16_t)(((n) & 0x03) << 0))
  7830. #define TMR_FILT_FILT_CNT(n) ((uint16_t)(((n) & 0x07) << 8))
  7831. #define TMR_FILT_FILT_PER(n) ((uint16_t)(((n) & 0xFF) << 0))
  7832. #define TMR_DMA_CMPLD2DE ((uint16_t)(1<<2))
  7833. #define TMR_DMA_CMPLD1DE ((uint16_t)(1<<1))
  7834. #define TMR_DMA_IEFDE ((uint16_t)(1<<0))
  7835. // 38.5.1.1: page 1981
  7836. #define IMXRT_I2S1 (*(IMXRT_REGISTER32_t *)IMXRT_I2S1_ADDRESS)
  7837. #define I2S1_VERID (IMXRT_I2S1.offset000)
  7838. #define I2S1_PARAM (IMXRT_I2S1.offset004)
  7839. #define I2S1_TCSR (IMXRT_I2S1.offset008)
  7840. #define I2S1_TCR1 (IMXRT_I2S1.offset00C)
  7841. #define I2S1_TCR2 (IMXRT_I2S1.offset010)
  7842. #define I2S1_TCR3 (IMXRT_I2S1.offset014)
  7843. #define I2S1_TCR4 (IMXRT_I2S1.offset018)
  7844. #define I2S1_TCR5 (IMXRT_I2S1.offset01C)
  7845. #define I2S1_TDR0 (IMXRT_I2S1.offset020)
  7846. #define I2S1_TDR1 (IMXRT_I2S1.offset024)
  7847. #define I2S1_TDR2 (IMXRT_I2S1.offset028)
  7848. #define I2S1_TDR3 (IMXRT_I2S1.offset02C)
  7849. #define I2S1_TFR0 (IMXRT_I2S1.offset040)
  7850. #define I2S1_TFR1 (IMXRT_I2S1.offset044)
  7851. #define I2S1_TFR2 (IMXRT_I2S1.offset048)
  7852. #define I2S1_TFR3 (IMXRT_I2S1.offset04C)
  7853. #define I2S1_TMR (IMXRT_I2S1.offset060)
  7854. #define I2S1_RCSR (IMXRT_I2S1.offset088)
  7855. #define I2S1_RCR1 (IMXRT_I2S1.offset08C)
  7856. #define I2S1_RCR2 (IMXRT_I2S1.offset090)
  7857. #define I2S1_RCR3 (IMXRT_I2S1.offset094)
  7858. #define I2S1_RCR4 (IMXRT_I2S1.offset098)
  7859. #define I2S1_RCR5 (IMXRT_I2S1.offset09C)
  7860. #define I2S1_RDR0 (IMXRT_I2S1.offset0A0)
  7861. #define I2S1_RDR1 (IMXRT_I2S1.offset0A4)
  7862. #define I2S1_RDR2 (IMXRT_I2S1.offset0A8)
  7863. #define I2S1_RDR3 (IMXRT_I2S1.offset0AC)
  7864. #define I2S1_RFR0 (IMXRT_I2S1.offset0C0)
  7865. #define I2S1_RFR1 (IMXRT_I2S1.offset0C4)
  7866. #define I2S1_RFR2 (IMXRT_I2S1.offset0C8)
  7867. #define I2S1_RFR3 (IMXRT_I2S1.offset0CC)
  7868. #define I2S1_RMR (IMXRT_I2S1.offset0E0)
  7869. #define IMXRT_I2S2 (*(IMXRT_REGISTER32_t *)IMXRT_I2S2_ADDRESS)
  7870. #define I2S2_VERID (IMXRT_I2S2.offset000)
  7871. #define I2S2_PARAM (IMXRT_I2S2.offset004)
  7872. #define I2S2_TCSR (IMXRT_I2S2.offset008)
  7873. #define I2S2_TCR1 (IMXRT_I2S2.offset00C)
  7874. #define I2S2_TCR2 (IMXRT_I2S2.offset010)
  7875. #define I2S2_TCR3 (IMXRT_I2S2.offset014)
  7876. #define I2S2_TCR4 (IMXRT_I2S2.offset018)
  7877. #define I2S2_TCR5 (IMXRT_I2S2.offset01C)
  7878. #define I2S2_TDR0 (IMXRT_I2S2.offset020)
  7879. #define I2S2_TDR1 (IMXRT_I2S2.offset024)
  7880. #define I2S2_TDR2 (IMXRT_I2S2.offset028)
  7881. #define I2S2_TDR3 (IMXRT_I2S2.offset02C)
  7882. #define I2S2_TFR0 (IMXRT_I2S2.offset040)
  7883. #define I2S2_TFR1 (IMXRT_I2S2.offset044)
  7884. #define I2S2_TFR2 (IMXRT_I2S2.offset048)
  7885. #define I2S2_TFR3 (IMXRT_I2S2.offset04C)
  7886. #define I2S2_TMR (IMXRT_I2S2.offset060)
  7887. #define I2S2_RCSR (IMXRT_I2S2.offset088)
  7888. #define I2S2_RCR1 (IMXRT_I2S2.offset08C)
  7889. #define I2S2_RCR2 (IMXRT_I2S2.offset090)
  7890. #define I2S2_RCR3 (IMXRT_I2S2.offset094)
  7891. #define I2S2_RCR4 (IMXRT_I2S2.offset098)
  7892. #define I2S2_RCR5 (IMXRT_I2S2.offset09C)
  7893. #define I2S2_RDR0 (IMXRT_I2S2.offset0A0)
  7894. #define I2S2_RDR1 (IMXRT_I2S2.offset0A4)
  7895. #define I2S2_RDR2 (IMXRT_I2S2.offset0A8)
  7896. #define I2S2_RDR3 (IMXRT_I2S2.offset0AC)
  7897. #define I2S2_RFR0 (IMXRT_I2S2.offset0C0)
  7898. #define I2S2_RFR1 (IMXRT_I2S2.offset0C4)
  7899. #define I2S2_RFR2 (IMXRT_I2S2.offset0C8)
  7900. #define I2S2_RFR3 (IMXRT_I2S2.offset0CC)
  7901. #define I2S2_RMR (IMXRT_I2S2.offset0E0)
  7902. #define IMXRT_I2S3 (*(IMXRT_REGISTER32_t *)IMXRT_I2S3_ADDRESS)
  7903. #define I2S3_VERID (IMXRT_I2S3.offset000)
  7904. #define I2S3_PARAM (IMXRT_I2S3.offset004)
  7905. #define I2S3_TCSR (IMXRT_I2S3.offset008)
  7906. #define I2S3_TCR1 (IMXRT_I2S3.offset00C)
  7907. #define I2S3_TCR2 (IMXRT_I2S3.offset010)
  7908. #define I2S3_TCR3 (IMXRT_I2S3.offset014)
  7909. #define I2S3_TCR4 (IMXRT_I2S3.offset018)
  7910. #define I2S3_TCR5 (IMXRT_I2S3.offset01C)
  7911. #define I2S3_TDR0 (IMXRT_I2S3.offset020)
  7912. #define I2S3_TDR1 (IMXRT_I2S3.offset024)
  7913. #define I2S3_TDR2 (IMXRT_I2S3.offset028)
  7914. #define I2S3_TDR3 (IMXRT_I2S3.offset02C)
  7915. #define I2S3_TFR0 (IMXRT_I2S3.offset040)
  7916. #define I2S3_TFR1 (IMXRT_I2S3.offset044)
  7917. #define I2S3_TFR2 (IMXRT_I2S3.offset048)
  7918. #define I2S3_TFR3 (IMXRT_I2S3.offset04C)
  7919. #define I2S3_TMR (IMXRT_I2S3.offset060)
  7920. #define I2S3_RCSR (IMXRT_I2S3.offset088)
  7921. #define I2S3_RCR1 (IMXRT_I2S3.offset08C)
  7922. #define I2S3_RCR2 (IMXRT_I2S3.offset090)
  7923. #define I2S3_RCR3 (IMXRT_I2S3.offset094)
  7924. #define I2S3_RCR4 (IMXRT_I2S3.offset098)
  7925. #define I2S3_RCR5 (IMXRT_I2S3.offset09C)
  7926. #define I2S3_RDR0 (IMXRT_I2S3.offset0A0)
  7927. #define I2S3_RDR1 (IMXRT_I2S3.offset0A4)
  7928. #define I2S3_RDR2 (IMXRT_I2S3.offset0A8)
  7929. #define I2S3_RDR3 (IMXRT_I2S3.offset0AC)
  7930. #define I2S3_RFR0 (IMXRT_I2S3.offset0C0)
  7931. #define I2S3_RFR1 (IMXRT_I2S3.offset0C4)
  7932. #define I2S3_RFR2 (IMXRT_I2S3.offset0C8)
  7933. #define I2S3_RFR3 (IMXRT_I2S3.offset0CC)
  7934. #define I2S3_RMR (IMXRT_I2S3.offset0E0)
  7935. #define I2S_RCR1_RFW(n) ((uint32_t)n & 0x1f) // Receive FIFO watermark
  7936. #define I2S_RCR2_DIV(n) ((uint32_t)n & 0xff) // Bit clock divide by (DIV+1)*2
  7937. #define I2S_RCR2_BCD ((uint32_t)1<<24) // Bit clock direction
  7938. #define I2S_RCR2_MSEL(n) ((uint32_t)(n & 3)<<26) // MCLK select, 0=bus clock, 1=I2S0_MCLK
  7939. #define I2S_RCR2_SYNC(n) ((uint32_t)(n & 3)<<30) // 0=async 1=sync with trasmitter
  7940. #define I2S_RCR3_RCE ((uint32_t)0x10000) // receive channel enable
  7941. #define I2S_RCR3_RCE_2CH ((uint32_t)0x30000)
  7942. #define I2S_RCR3_RCE_3CH ((uint32_t)0x70000)
  7943. #define I2S_RCR3_RCE_4CH ((uint32_t)0xF0000)
  7944. #define I2S_RCR4_FSD ((uint32_t)1) // Frame Sync Direction
  7945. #define I2S_RCR4_FSP ((uint32_t)1<<1)
  7946. #define I2S_RCR4_FSE ((uint32_t)8) // Frame Sync Early
  7947. #define I2S_RCR4_MF ((uint32_t)0x10) // MSB First
  7948. #define I2S_RCR4_SYWD(n) ((uint32_t)(n & 0x1f)<<8) // Sync Width
  7949. #define I2S_RCR4_FRSZ(n) ((uint32_t)(n & 0x0f)<<16) // Frame Size
  7950. #define I2S_RCR4_FCONT ((uint32_t)1<<28) // FIFO Continue on Error
  7951. #define I2S_RCR5_FBT(n) ((uint32_t)(n & 0x1f)<<8) // First Bit Shifted
  7952. #define I2S_RCR5_W0W(n) ((uint32_t)(n & 0x1f)<<16) // Word 0 Width
  7953. #define I2S_RCR5_WNW(n) ((uint32_t)(n & 0x1f)<<24) // Word N Width
  7954. #define I2S_RCR2_BCP ((uint32_t)1<<25)
  7955. #define I2S_RCSR_RE ((uint32_t)0x80000000) // Receiver Enable
  7956. #define I2S_RCSR_FR ((uint32_t)0x02000000) // FIFO Reset
  7957. #define I2S_RCSR_FRDE ((uint32_t)0x00000001) // FIFO Request DMA Enable
  7958. #define I2S_RCSR_BCE ((uint32_t)0x10000000) // Bit Clock Enable
  7959. #define I2S_TCR1_RFW(n) ((uint32_t)n & 0x1f) // Receive FIFO watermark
  7960. #define I2S_TCR2_DIV(n) ((uint32_t)n & 0xff) // Bit clock divide by (DIV+1)*2
  7961. #define I2S_TCR2_BCD ((uint32_t)1<<24) // Bit clock direction
  7962. #define I2S_TCR2_MSEL(n) ((uint32_t)(n & 3)<<26) // MCLK select, 0=bus clock, 1=I2S0_MCLK
  7963. #define I2S_TCR2_SYNC(n) ((uint32_t)(n & 3)<<30) // 0=async 1=sync with receiver
  7964. #define I2S_TCR3_TCE ((uint32_t)0x10000) // receive channel enable
  7965. #define I2S_TCR3_TCE_2CH ((uint32_t)0x30000)
  7966. #define I2S_TCR3_TCE_3CH ((uint32_t)0x70000)
  7967. #define I2S_TCR3_TCE_4CH ((uint32_t)0xF0000)
  7968. #define I2S_TCR4_FSD ((uint32_t)1) // Frame Sync Direction
  7969. #define I2S_TCR4_FSP ((uint32_t)1<<1)
  7970. #define I2S_TCR4_FSE ((uint32_t)8) // Frame Sync Early
  7971. #define I2S_TCR4_MF ((uint32_t)0x10) // MSB First
  7972. #define I2S_TCR4_SYWD(n) ((uint32_t)(n & 0x1f)<<8) // Sync Width
  7973. #define I2S_TCR4_FRSZ(n) ((uint32_t)(n & 0x0f)<<16) // Frame Size
  7974. #define I2S_TCR4_FCONT ((uint32_t)1<<28) // FIFO Continue on Error
  7975. #define I2S_TCR5_FBT(n) ((uint32_t)(n & 0x1f)<<8) // First Bit Shifted
  7976. #define I2S_TCR5_W0W(n) ((uint32_t)(n & 0x1f)<<16) // Word 0 Width
  7977. #define I2S_TCR5_WNW(n) ((uint32_t)(n & 0x1f)<<24) // Word N Width
  7978. #define I2S_TCR2_BCP ((uint32_t)1<<25)
  7979. #define I2S_TCSR_TE ((uint32_t)0x80000000) // Receiver Enable
  7980. #define I2S_TCSR_BCE ((uint32_t)0x10000000) // Bit Clock Enable
  7981. #define I2S_TCSR_FR ((uint32_t)0x02000000) // FIFO Reset
  7982. #define I2S_TCSR_FRDE ((uint32_t)0x00000001) // FIFO Request DMA Enable
  7983. // 25.4.1.1: page 1385
  7984. #define IMXRT_SEMC (*(IMXRT_REGISTER32_t *)IMXRT_SEMC_ADDRESS)
  7985. #define SEMC_MCR (IMXRT_SEMC.offset000)
  7986. #define SEMC_IOCR (IMXRT_SEMC.offset004)
  7987. #define SEMC_BMCR0 (IMXRT_SEMC.offset008)
  7988. #define SEMC_BMCR1 (IMXRT_SEMC.offset00C)
  7989. #define SEMC_BR0 (IMXRT_SEMC.offset010)
  7990. #define SEMC_BR1 (IMXRT_SEMC.offset014)
  7991. #define SEMC_BR2 (IMXRT_SEMC.offset018)
  7992. #define SEMC_BR3 (IMXRT_SEMC.offset01C)
  7993. #define SEMC_BR4 (IMXRT_SEMC.offset020)
  7994. #define SEMC_BR5 (IMXRT_SEMC.offset024)
  7995. #define SEMC_BR6 (IMXRT_SEMC.offset028)
  7996. #define SEMC_BR7 (IMXRT_SEMC.offset02C)
  7997. #define SEMC_BR8 (IMXRT_SEMC.offset030)
  7998. #define SEMC_INTEN (IMXRT_SEMC.offset038)
  7999. #define SEMC_INTR (IMXRT_SEMC.offset03C)
  8000. #define SEMC_SDRAMCR0 (IMXRT_SEMC.offset040)
  8001. #define SEMC_SDRAMCR1 (IMXRT_SEMC.offset044)
  8002. #define SEMC_SDRAMCR2 (IMXRT_SEMC.offset048)
  8003. #define SEMC_SDRAMCR3 (IMXRT_SEMC.offset04C)
  8004. #define SEMC_NANDCR0 (IMXRT_SEMC.offset050)
  8005. #define SEMC_NANDCR1 (IMXRT_SEMC.offset054)
  8006. #define SEMC_NANDCR2 (IMXRT_SEMC.offset058)
  8007. #define SEMC_NANDCR3 (IMXRT_SEMC.offset05C)
  8008. #define SEMC_ORCR0 (IMXRT_SEMC.offset060)
  8009. #define SEMC_ORCR1 (IMXRT_SEMC.offset064)
  8010. #define SEMC_ORCR2 (IMXRT_SEMC.offset068)
  8011. #define SEMC_ORCR3 (IMXRT_SEMC.offset06C)
  8012. #define SEMC_SRAMCR0 (IMXRT_SEMC.offset070)
  8013. #define SEMC_SRAMCR1 (IMXRT_SEMC.offset074)
  8014. #define SEMC_SRAMCR2 (IMXRT_SEMC.offset078)
  8015. #define SEMC_SRAMCR3 (IMXRT_SEMC.offset07C)
  8016. #define SEMC_DBICR0 (IMXRT_SEMC.offset080)
  8017. #define SEMC_DBICR1 (IMXRT_SEMC.offset084)
  8018. #define SEMC_IPCR0 (IMXRT_SEMC.offset090)
  8019. #define SEMC_IPCR1 (IMXRT_SEMC.offset094)
  8020. #define SEMC_IPCR2 (IMXRT_SEMC.offset098)
  8021. #define SEMC_IPCMD (IMXRT_SEMC.offset09C)
  8022. #define SEMC_IPTXDAT (IMXRT_SEMC.offset0A0)
  8023. #define SEMC_IPRXDAT (IMXRT_SEMC.offset0B0)
  8024. #define SEMC_STS0 (IMXRT_SEMC.offset0C0)
  8025. #define SEMC_STS1 (IMXRT_SEMC.offset0C4)
  8026. #define SEMC_STS2 (IMXRT_SEMC.offset0C8)
  8027. #define SEMC_STS3 (IMXRT_SEMC.offset0CC)
  8028. #define SEMC_STS4 (IMXRT_SEMC.offset0D0)
  8029. #define SEMC_STS5 (IMXRT_SEMC.offset0D4)
  8030. #define SEMC_STS6 (IMXRT_SEMC.offset0D8)
  8031. #define SEMC_STS7 (IMXRT_SEMC.offset0DC)
  8032. #define SEMC_STS8 (IMXRT_SEMC.offset0E0)
  8033. #define SEMC_STS9 (IMXRT_SEMC.offset0E4)
  8034. #define SEMC_STS10 (IMXRT_SEMC.offset0E8)
  8035. #define SEMC_STS11 (IMXRT_SEMC.offset0EC)
  8036. #define SEMC_STS12 (IMXRT_SEMC.offset0F0)
  8037. #define SEMC_STS13 (IMXRT_SEMC.offset0F4)
  8038. #define SEMC_STS14 (IMXRT_SEMC.offset0F8)
  8039. #define SEMC_STS15 (IMXRT_SEMC.offset0FC)
  8040. // 20.6.1: page 1242
  8041. #define IMXRT_SNVS (*(IMXRT_REGISTER32_t *)IMXRT_SNVS_ADDRESS)
  8042. #define SNVS_HPLR (IMXRT_SNVS.offset000)
  8043. #define SNVS_HPCOMR (IMXRT_SNVS.offset004)
  8044. #define SNVS_HPCR (IMXRT_SNVS.offset008)
  8045. #define SNVS_HPSICR (IMXRT_SNVS.offset00C)
  8046. #define SNVS_HPSVCR (IMXRT_SNVS.offset010)
  8047. #define SNVS_HPSR (IMXRT_SNVS.offset014)
  8048. #define SNVS_HPSVSR (IMXRT_SNVS.offset018)
  8049. #define SNVS_HPHACIVR (IMXRT_SNVS.offset01C)
  8050. #define SNVS_HPHACR (IMXRT_SNVS.offset020)
  8051. #define SNVS_HPRTCMR (IMXRT_SNVS.offset024)
  8052. #define SNVS_HPRTCLR (IMXRT_SNVS.offset028)
  8053. #define SNVS_HPTAMR (IMXRT_SNVS.offset02C)
  8054. #define SNVS_HPTALR (IMXRT_SNVS.offset030)
  8055. #define SNVS_LPLR (IMXRT_SNVS.offset034)
  8056. #define SNVS_LPCR (IMXRT_SNVS.offset038)
  8057. #define SNVS_LPMKCR (IMXRT_SNVS.offset03C)
  8058. #define SNVS_LPSVCR (IMXRT_SNVS.offset040)
  8059. #define SNVS_LPTDCR (IMXRT_SNVS.offset048)
  8060. #define SNVS_LPSR (IMXRT_SNVS.offset04C)
  8061. #define SNVS_LPSRTCMR (IMXRT_SNVS.offset050)
  8062. #define SNVS_LPSRTCLR (IMXRT_SNVS.offset054)
  8063. #define SNVS_LPTAR (IMXRT_SNVS.offset058)
  8064. #define SNVS_LPSMCMR (IMXRT_SNVS.offset05C)
  8065. #define SNVS_LPSMCLR (IMXRT_SNVS.offset060)
  8066. #define SNVS_LPPGDR (IMXRT_SNVS.offset064)
  8067. #define SNVS_LPGPR (IMXRT_SNVS.offset068)
  8068. #define SNVS_LPGPR0 (IMXRT_SNVS.offset100)
  8069. #define SNVS_LPGPR1 (IMXRT_SNVS.offset104)
  8070. #define SNVS_LPGPR2 (IMXRT_SNVS.offset108)
  8071. #define SNVS_LPGPR3 (IMXRT_SNVS.offset10C)
  8072. #define IMXRT_SNVS_b (*(IMXRT_REGISTER32_t *)(IMXRT_SNVS_ADDRESS+0x800))
  8073. #define SNVS_HPVIDR1 (IMXRT_SNVS_b.offset3F8)
  8074. #define SNVS_HPVIDR2 (IMXRT_SNVS_b.offset3FC)
  8075. #define SNVS_HPCR_BTN_MASK ((uint32_t)(1 << 27))
  8076. #define SNVS_HPCR_BTN_CONFIG(n) ((uint32_t)(((n) & 0x07) << 24))
  8077. #define SNVS_HPCR_HP_TS ((uint32_t)(1 << 16))
  8078. #define SNVS_HPCR_HPCALB_VAL(n) ((uint32_t)(((n) & 0x1F) << 10))
  8079. #define SNVS_HPCR_HPCALB_EN ((uint32_t)(1 << 8))
  8080. #define SNVS_HPCR_PI_FREQ(n) ((uint32_t)(((n) & 0x0F) << 4))
  8081. #define SNVS_HPCR_PI_EN ((uint32_t)(1 << 3))
  8082. #define SNVS_HPCR_DIS_PI ((uint32_t)(1 << 2))
  8083. #define SNVS_HPCR_HPTA_EN ((uint32_t)(1 << 1))
  8084. #define SNVS_HPCR_RTC_EN ((uint32_t)(1 << 0))
  8085. #define SNVS_DEFAULT_PGD_VALUE (0x41736166U)
  8086. #define SNVS_LPCR_SRTC_ENV ((uint32_t)(1 << 0))
  8087. #define SNVS_LPCR_MC_ENV ((uint32_t)(1 << 2))
  8088. #define SNVS_LPCR_LPWUI_EN ((uint32_t)(1 << 3))
  8089. #define SNVS_LPCR_DP_EN ((uint32_t)(1 << 5))
  8090. #define SNVS_LPCR_TOP ((uint32_t)(1 << 6))
  8091. #define SNVS_LPCR_PWR_GLITCH_EN ((uint32_t)(1 << 7))
  8092. #define SNVS_LPCR_BTN_PRESS_TIME(n) ((uint32_t)(((n) & 0x03) << 16))
  8093. #define SNVS_LPCR_DEBOUNCE(n) ((uint32_t)(((n) & 0x03) << 18))
  8094. #define SNVS_LPCR_ON_TIME(n) ((uint32_t)(((n) & 0x03) << 20))
  8095. #define SNVS_LPCR_PK_EN ((uint32_t)(1 << 22))
  8096. #define SNVS_LPCR_PK_OVERRIDE ((uint32_t)(1 << 23))
  8097. #define SNVS_LPCR_GPR_Z_DIS ((uint32_t)(1 << 24))
  8098. // 40.6: page 2035
  8099. #define IMXRT_SPDIF (*(IMXRT_REGISTER32_t *)IMXRT_SPDIF_ADDRESS)
  8100. #define SPDIF_SCR (IMXRT_SPDIF.offset000)
  8101. #define SPDIF_SRCD (IMXRT_SPDIF.offset004)
  8102. #define SPDIF_SRPC (IMXRT_SPDIF.offset008)
  8103. #define SPDIF_SIE (IMXRT_SPDIF.offset00C)
  8104. #define SPDIF_SIS (IMXRT_SPDIF.offset010)
  8105. #define SPDIF_SIC (IMXRT_SPDIF.offset010)
  8106. #define SPDIF_SRL (IMXRT_SPDIF.offset014)
  8107. #define SPDIF_SRR (IMXRT_SPDIF.offset018)
  8108. #define SPDIF_SRCSH (IMXRT_SPDIF.offset01C)
  8109. #define SPDIF_SRCSL (IMXRT_SPDIF.offset020)
  8110. #define SPDIF_SRU (IMXRT_SPDIF.offset024)
  8111. #define SPDIF_SRQ (IMXRT_SPDIF.offset028)
  8112. #define SPDIF_STL (IMXRT_SPDIF.offset02C)
  8113. #define SPDIF_STR (IMXRT_SPDIF.offset030)
  8114. #define SPDIF_STCSCH (IMXRT_SPDIF.offset034)
  8115. #define SPDIF_STCSCL (IMXRT_SPDIF.offset038)
  8116. #define SPDIF_SRFM (IMXRT_SPDIF.offset044)
  8117. #define SPDIF_STC (IMXRT_SPDIF.offset050)
  8118. #define SPDIF_SCR_RXFIFO_CTR ((uint32_t)(1 << 23))
  8119. #define SPDIF_SCR_RXFIFO_OFF_ON ((uint32_t)(1 << 22))
  8120. #define SPDIF_SCR_RXFIFO_RST ((uint32_t)(1 << 21))
  8121. #define SPDIF_SCR_RXFIFOFULL_SEL(n) ((uint32_t)(((n) & 0x03) << 19))
  8122. #define SPDIF_SCR_RXAUTOSYNC ((uint32_t)(1 << 18))
  8123. #define SPDIF_SCR_TXAUTOSYNC ((uint32_t)(1 << 17))
  8124. #define SPDIF_SCR_TXFIFOEMPTY_SEL(n) ((uint32_t)(((n) & 0x03) << 15))
  8125. #define SPDIF_SCR_LOW_POWER ((uint32_t)(1 << 13))
  8126. #define SPDIF_SCR_SOFT_RESET ((uint32_t)(1 << 12))
  8127. #define SPDIF_SCR_TXFIFO_CTRL(n) ((uint32_t)(((n) & 0x03) << 10))
  8128. #define SPDIF_SCR_DMA_RX_EN ((uint32_t)(1 << 9))
  8129. #define SPDIF_SCR_DMA_TX_EN ((uint32_t)(1 << 8))
  8130. #define SPDIF_SCR_VALCTRL ((uint32_t)(1 << 5))
  8131. #define SPDIF_SCR_TXSEL(n) ((uint32_t)(((n) & 0x07) << 2))
  8132. #define SPDIF_SCR_USRC_SEL(n) ((uint32_t)(((n) & 0x03) << 0))
  8133. #define SPDIF_SRCD_USYNCMODE ((uint32_t)(1 << 1))
  8134. #define SPDIF_SRPC_CLKSRC_SEL(n) ((uint32_t)(((n) & 0x0f) << 7))
  8135. #define SPDIF_SRPC_LOCK ((uint32_t)(1 << 6))
  8136. #define SPDIF_SRPC_GAINSEL(n) ((uint32_t)(((n) & 0x07) << 3))
  8137. #define SPDIF_SIE_LOCK ((uint32_t)(1 << 20))
  8138. #define SPDIF_SIE_TXUNOV ((uint32_t)(1 << 19))
  8139. #define SPDIF_SIE_TXRESYN ((uint32_t)(1 << 18))
  8140. #define SPDIF_SIE_CNEW ((uint32_t)(1 << 17))
  8141. #define SPDIF_SIE_VALNOGOOD ((uint32_t)(1 << 16))
  8142. #define SPDIF_SIE_SYMERR ((uint32_t)(1 << 15))
  8143. #define SPDIF_SIE_BITERR ((uint32_t)(1 << 14))
  8144. #define SPDIF_SIE_URXFUL ((uint32_t)(1 << 10))
  8145. #define SPDIF_SIE_URXOV ((uint32_t)(1 << 9))
  8146. #define SPDIF_SIE_QRXFUL ((uint32_t)(1 << 8))
  8147. #define SPDIF_SIE_QRXOV ((uint32_t)(1 << 7))
  8148. #define SPDIF_SIE_UQSYNC ((uint32_t)(1 << 6))
  8149. #define SPDIF_SIE_UQERR ((uint32_t)(1 << 5))
  8150. #define SPDIF_SIE_RXFIFOUNOV ((uint32_t)(1 << 4))
  8151. #define SPDIF_SIE_RXFIFORESYN ((uint32_t)(1 << 3))
  8152. #define SPDIF_SIE_LOCKLOSS ((uint32_t)(1 << 2))
  8153. #define SPDIF_SIE_TXEM ((uint32_t)(1 << 1))
  8154. #define SPDIF_SIE_RXFIFOFUL ((uint32_t)(1 << 0))
  8155. #define SPDIF_SIS_LOCK ((uint32_t)(1 << 20))
  8156. #define SPDIF_SIS_TXUNOV ((uint32_t)(1 << 19))
  8157. #define SPDIF_SIS_TXRESYN ((uint32_t)(1 << 18))
  8158. #define SPDIF_SIS_CNEW ((uint32_t)(1 << 17))
  8159. #define SPDIF_SIS_VALNOGOOD ((uint32_t)(1 << 16))
  8160. #define SPDIF_SIS_SYMERR ((uint32_t)(1 << 15))
  8161. #define SPDIF_SIS_BITERR ((uint32_t)(1 << 14))
  8162. #define SPDIF_SIS_URXFUL ((uint32_t)(1 << 10))
  8163. #define SPDIF_SIS_URXOV ((uint32_t)(1 << 9))
  8164. #define SPDIF_SIS_QRXFUL ((uint32_t)(1 << 8))
  8165. #define SPDIF_SIS_QRXOV ((uint32_t)(1 << 7))
  8166. #define SPDIF_SIS_UQSYNC ((uint32_t)(1 << 6))
  8167. #define SPDIF_SIS_UQERR ((uint32_t)(1 << 5))
  8168. #define SPDIF_SIS_RXFIFOUNOV ((uint32_t)(1 << 4))
  8169. #define SPDIF_SIS_RXFIFORESYN ((uint32_t)(1 << 3))
  8170. #define SPDIF_SIS_LOCKLOSS ((uint32_t)(1 << 2))
  8171. #define SPDIF_SIS_TXEM ((uint32_t)(1 << 1))
  8172. #define SPDIF_SIS_RXFIFOFUL ((uint32_t)(1 << 0))
  8173. #define SPDIF_SIC_LOCK ((uint32_t)(1 << 20))
  8174. #define SPDIF_SIC_TXUNOV ((uint32_t)(1 << 19))
  8175. #define SPDIF_SIC_TXRESYN ((uint32_t)(1 << 18))
  8176. #define SPDIF_SIC_CNEW ((uint32_t)(1 << 17))
  8177. #define SPDIF_SIC_VALNOGOOD ((uint32_t)(1 << 16))
  8178. #define SPDIF_SIC_SYMERR ((uint32_t)(1 << 15))
  8179. #define SPDIF_SIC_BITERR ((uint32_t)(1 << 14))
  8180. #define SPDIF_SIC_URXFUL ((uint32_t)(1 << 10))
  8181. #define SPDIF_SIC_URXOV ((uint32_t)(1 << 9))
  8182. #define SPDIF_SIC_QRXOV ((uint32_t)(1 << 7))
  8183. #define SPDIF_SIC_UQSYNC ((uint32_t)(1 << 6))
  8184. #define SPDIF_SIC_UQERR ((uint32_t)(1 << 5))
  8185. #define SPDIF_SIC_RXFIFOUNOV ((uint32_t)(1 << 4))
  8186. #define SPDIF_SIC_RXFIFORESYN ((uint32_t)(1 << 3))
  8187. #define SPDIF_SIC_LOCKLOSS ((uint32_t)(1 << 2))
  8188. #define SPDIF_STC_SYSCLK_DF(n) ((uint32_t)(((n) & 0x1ff) << 11))
  8189. #define SPDIF_STC_TXCLK_SOURCE(n) ((uint32_t)(((n) & 0x07) << 8))
  8190. #define SPDIF_STC_TX_ALL_CLK_EN ((uint32_t)(1 << 7))
  8191. #define SPDIF_STC_TXCLK_DF(n) ((uint32_t)(((n) & 0x7f) << 0))
  8192. // 21.8: page 1284
  8193. #define IMXRT_SRC (*(IMXRT_REGISTER32_t *)IMXRT_SRC_ADDRESS)
  8194. #define SRC_SCR (IMXRT_SRC.offset000)
  8195. #define SRC_SBMR1 (IMXRT_SRC.offset004)
  8196. #define SRC_SRSR (IMXRT_SRC.offset008)
  8197. #define SRC_SBMR2 (IMXRT_SRC.offset01C)
  8198. /*
  8199. These register are used by the ROM code and should not be used by application software
  8200. #define SRC_GPR1 (IMXRT_SRC.offset020)
  8201. #define SRC_GPR2 (IMXRT_SRC.offset024)
  8202. #define SRC_GPR3 (IMXRT_SRC.offset028)
  8203. #define SRC_GPR4 (IMXRT_SRC.offset02C)
  8204. #define SRC_GPR5 (IMXRT_SRC.offset030)
  8205. #define SRC_GPR6 (IMXRT_SRC.offset034)
  8206. #define SRC_GPR7 (IMXRT_SRC.offset038)
  8207. #define SRC_GPR8 (IMXRT_SRC.offset03C)
  8208. #define SRC_GPR9 (IMXRT_SRC.offset040)
  8209. #define SRC_GPR10 (IMXRT_SRC.offset044)
  8210. */
  8211. #define SRC_SCR_MASK_WDOG3_RST(n) ((uint32_t)(((n) & 0x0f) << 28))
  8212. #define SRC_SCR_DBG_RST_MSK_PG ((uint32_t)(1 << 25))
  8213. #define SRC_SCR_CORE0_DBG_RST ((uint32_t)(1 << 17))
  8214. #define SRC_SCR_CORE0_RST ((uint32_t)(1 << 13))
  8215. #define SRC_SCR_MASK_WDOG_RST(n) ((uint32_t)(((n) & 0x0f) << 7))
  8216. #define SRC_SBMR1_BOOT_CFG4(n) ((uint32_t)(((n) & 0xff) << 24))
  8217. #define SRC_SBMR1_BOOT_CFG3(n) ((uint32_t)(((n) & 0xff) << 16))
  8218. #define SRC_SBMR1_BOOT_CFG2(n) ((uint32_t)(((n) & 0xff) << 8))
  8219. #define SRC_SBMR1_BOOT_CFG1(n) ((uint32_t)(((n) & 0xff) << 0))
  8220. #define SRC_SRSR_TEMPSENSE_RST_B ((uint32_t)(1 << 8))
  8221. #define SRC_SRSR_WDOG3_RST_B ((uint32_t)(1 << 7))
  8222. #define SRC_SRSR_JTAG_SW_RST ((uint32_t)(1 << 6))
  8223. #define SRC_SRSR_JTAG_RST_B ((uint32_t)(1 << 5))
  8224. #define SRC_SRSR_WDOG_RST_B ((uint32_t)(1 << 4))
  8225. #define SRC_SRSR_IPP_USER_RESET_B ((uint32_t)(1 << 3))
  8226. #define SRC_SRSR_CSU_RESET_B ((uint32_t)(1 << 2))
  8227. #define SRC_SRSR_LOCKUP_SYSRESETREQ ((uint32_t)(1 << 1))
  8228. #define SRC_SRSR_IPP_RESET_B ((uint32_t)(1 << 0))
  8229. #define SRC_SBMR2_BMOD(n) ((uint32_t)(((n) & 0x03) << 24))
  8230. #define SRC_SBMR2_BT_FUSE_SEL ((uint32_t)(1 << 4))
  8231. #define SRC_SBMR2_DIR_BT_DIS ((uint32_t)(1 << 3))
  8232. #define SRC_SBMR2_SEC_CONFIG(n) ((uint32_t)(((n) & 0x03) << 0))
  8233. // 19.4: page 1224
  8234. #define IMXRT_TEMPMON (*(IMXRT_REGISTER32_t *)IMXRT_TEMPMON_ADDRESS)
  8235. #define TEMPMON_TEMPSENSE0 (IMXRT_TEMPMON.offset000)
  8236. #define TEMPMON_TEMPSENSE0_SET (IMXRT_TEMPMON.offset004)
  8237. #define TEMPMON_TEMPSENSE0_CLR (IMXRT_TEMPMON.offset008)
  8238. #define TEMPMON_TEMPSENSE0_TOG (IMXRT_TEMPMON.offset08c)
  8239. #define TEMPMON_TEMPSENSE1 (IMXRT_TEMPMON.offset090)
  8240. #define TEMPMON_TEMPSENSE1_SET (IMXRT_TEMPMON.offset094)
  8241. #define TEMPMON_TEMPSENSE1_CLR (IMXRT_TEMPMON.offset098)
  8242. #define TEMPMON_TEMPSENSE1_TOG (IMXRT_TEMPMON.offset09C)
  8243. #define TEMPMON_TEMPSENSE2 (IMXRT_TEMPMON.offset110)
  8244. #define TEMPMON_TEMPSENSE2_SET (IMXRT_TEMPMON.offset114)
  8245. #define TEMPMON_TEMPSENSE2_CLR (IMXRT_TEMPMON.offset118)
  8246. #define TEMPMON_TEMPSENSE2_TOG (IMXRT_TEMPMON.offset11C)
  8247. #define TEMPMON_CTRL0_ALARM_VALUE(n) ((uint32_t)(((n) & 0x0fff) << 20))
  8248. #define TEMPMON_CTRL0_TEMP_CNT(n) ((uint32_t)(((n) & 0x0fff) << 8))
  8249. #define TEMPMON_CTRL0_FINISHED ((uint32_t)(1 << 2))
  8250. #define TEMPMON_CTRL0_MEASURE_TEMP ((uint32_t)(1 << 1))
  8251. #define TEMPMON_CTRL0_POWER_DOWN ((uint32_t)(1 << 0))
  8252. #define TEMPMON_CTRL1_MEASURE_FREQ(n) ((uint32_t)(((n) & 0xffff) << 0))
  8253. #define TEMPMON_CTRL2_PANIC_ALARM_VALUE(n) ((uint32_t)(((n) & 0x0fff) << 16))
  8254. #define TEMPMON_CTRL2_LOW_ALARM_VALUE(n) ((uint32_t)(((n) & 0x0fff) << 0))
  8255. #define IMXRT_TRNG (*(IMXRT_REGISTER32_t *)IMXRT_TRNG_ADDRESS)
  8256. #define TRNG_MCTL (IMXRT_TRNG.offset000)
  8257. #define TRNG_SCMISC (IMXRT_TRNG.offset004)
  8258. #define TRNG_PKRRNG (IMXRT_TRNG.offset008)
  8259. #define TRNG_PKRMAX (IMXRT_TRNG.offset00C)
  8260. #define TRNG_PKRSQ (IMXRT_TRNG.offset00C)
  8261. #define TRNG_SDCTL (IMXRT_TRNG.offset010)
  8262. #define TRNG_SBLIM (IMXRT_TRNG.offset014)
  8263. #define TRNG_TOTSAM (IMXRT_TRNG.offset014)
  8264. #define TRNG_FRQMIN (IMXRT_TRNG.offset018)
  8265. #define TRNG_FRQCNT (IMXRT_TRNG.offset01C)
  8266. #define TRNG_FRQMAX (IMXRT_TRNG.offset01C)
  8267. #define TRNG_SCMC (IMXRT_TRNG.offset020)
  8268. #define TRNG_SCML (IMXRT_TRNG.offset020)
  8269. #define TRNG_SCR1C (IMXRT_TRNG.offset024)
  8270. #define TRNG_SCR1L (IMXRT_TRNG.offset024)
  8271. #define TRNG_SCR2C (IMXRT_TRNG.offset028)
  8272. #define TRNG_SCR2L (IMXRT_TRNG.offset028)
  8273. #define TRNG_SCR3C (IMXRT_TRNG.offset02C)
  8274. #define TRNG_SCR3L (IMXRT_TRNG.offset02C)
  8275. #define TRNG_SCR4C (IMXRT_TRNG.offset030)
  8276. #define TRNG_SCR4L (IMXRT_TRNG.offset030)
  8277. #define TRNG_SCR5C (IMXRT_TRNG.offset034)
  8278. #define TRNG_SCR5L (IMXRT_TRNG.offset034)
  8279. #define TRNG_SCR6PC (IMXRT_TRNG.offset038)
  8280. #define TRNG_SCR6PL (IMXRT_TRNG.offset038)
  8281. #define TRNG_STATUS (IMXRT_TRNG.offset03C)
  8282. #define TRNG_ENT0 (IMXRT_TRNG.offset040)
  8283. #define TRNG_ENT1 (IMXRT_TRNG.offset044)
  8284. #define TRNG_ENT2 (IMXRT_TRNG.offset048)
  8285. #define TRNG_ENT3 (IMXRT_TRNG.offset04C)
  8286. #define TRNG_ENT4 (IMXRT_TRNG.offset050)
  8287. #define TRNG_ENT5 (IMXRT_TRNG.offset054)
  8288. #define TRNG_ENT6 (IMXRT_TRNG.offset058)
  8289. #define TRNG_ENT7 (IMXRT_TRNG.offset05C)
  8290. #define TRNG_ENT8 (IMXRT_TRNG.offset060)
  8291. #define TRNG_ENT9 (IMXRT_TRNG.offset064)
  8292. #define TRNG_ENT10 (IMXRT_TRNG.offset068)
  8293. #define TRNG_ENT11 (IMXRT_TRNG.offset06C)
  8294. #define TRNG_ENT12 (IMXRT_TRNG.offset070)
  8295. #define TRNG_ENT13 (IMXRT_TRNG.offset074)
  8296. #define TRNG_ENT14 (IMXRT_TRNG.offset078)
  8297. #define TRNG_ENT15 (IMXRT_TRNG.offset07C)
  8298. #define TRNG_PKRCNT10 (IMXRT_TRNG.offset080)
  8299. #define TRNG_PKRCNT32 (IMXRT_TRNG.offset084)
  8300. #define TRNG_PKRCNT54 (IMXRT_TRNG.offset088)
  8301. #define TRNG_PKRCNT76 (IMXRT_TRNG.offset08C)
  8302. #define TRNG_PKRCNT98 (IMXRT_TRNG.offset090)
  8303. #define TRNG_PKRCNTBA (IMXRT_TRNG.offset094)
  8304. #define TRNG_PKRCNTDC (IMXRT_TRNG.offset098)
  8305. #define TRNG_PKRCNTFE (IMXRT_TRNG.offset09C)
  8306. #define TRNG_SEC_CFG (IMXRT_TRNG.offset0A0)
  8307. #define TRNG_INT_CTRL (IMXRT_TRNG.offset0A4)
  8308. #define TRNG_INT_MASK (IMXRT_TRNG.offset0A8)
  8309. #define TRNG_INT_STATUS (IMXRT_TRNG.offset0AC)
  8310. #define TRNG_VID1 (IMXRT_TRNG.offset0F0)
  8311. #define TRNG_MCTL_PRGM ((uint32_t)(1 << 16))
  8312. #define TRNG_MCTL_LRUN_CONT ((uint32_t)(1 << 14))
  8313. #define TRNG_MCTL_TSTOP_OK ((uint32_t)(1 << 13))
  8314. #define TRNG_MCTL_ERR ((uint32_t)(1 << 12))
  8315. #define TRNG_MCTL_TST_OUT ((uint32_t)(1 << 11))
  8316. #define TRNG_MCTL_ENT_VAL ((uint32_t)(1 << 10))
  8317. #define TRNG_MCTL_FCT_VAL ((uint32_t)(1 << 9))
  8318. #define TRNG_MCTL_FCT_FAIL ((uint32_t)(1 << 8))
  8319. #define TRNG_MCTL_FOR_SCLK ((uint32_t)(1 << 7))
  8320. #define TRNG_MCTL_RST_DEF ((uint32_t)(1 << 6))
  8321. #define TRNG_MCTL_TRNG_ACC ((uint32_t)(1 << 5))
  8322. #define TRNG_MCTL_OSC_DIV(n) ((uint32_t)(((n) & 0x03) << 2))
  8323. #define TRNG_MCTL_SAMP_MODE(n) ((uint32_t)(((n) & 0x03) << 0))
  8324. #define TRNG_SCMISC_RTY_CT(n) ((uint32_t)(((n) & 0x0F) << 16))
  8325. #define TRNG_SCMISC_LRUN_MAX(n) ((uint32_t)(((n) & 0xFF) << 0))
  8326. #define TRNG_SDCTL_ENT_DLY(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  8327. #define TRNG_SDCTL_SAMP_SIZE(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  8328. #define TRNG_SCML_MONO_RNG(n) ((uint32_t)(((n) & 0xFFFF) << 16))
  8329. #define TRNG_SCML_MONO_MAX(n) ((uint32_t)(((n) & 0xFFFF) << 0))
  8330. #define TRNG_SCR1L_RUN1_RNG(n) ((uint32_t)(((n) & 0x7FFF) << 16))
  8331. #define TRNG_SCR1L_RUN1_MAX(n) ((uint32_t)(((n) & 0x7FFF) << 0))
  8332. #define TRNG_SCR2L_RUN2_RNG(n) ((uint32_t)(((n) & 0x3FFF) << 16))
  8333. #define TRNG_SCR2L_RUN2_MAX(n) ((uint32_t)(((n) & 0x3FFF) << 0))
  8334. #define TRNG_SCR3L_RUN3_RNG(n) ((uint32_t)(((n) & 0x1FFF) << 16))
  8335. #define TRNG_SCR3L_RUN3_MAX(n) ((uint32_t)(((n) & 0x1FFF) << 0))
  8336. #define TRNG_SCR4L_RUN4_RNG(n) ((uint32_t)(((n) & 0x0FFF) << 16))
  8337. #define TRNG_SCR4L_RUN4_MAX(n) ((uint32_t)(((n) & 0x0FFF) << 0))
  8338. #define TRNG_SCR5L_RUN5_RNG(n) ((uint32_t)(((n) & 0x07FF) << 16))
  8339. #define TRNG_SCR5L_RUN5_MAX(n) ((uint32_t)(((n) & 0x07FF) << 0))
  8340. #define TRNG_SCR6PL_RUN6P_RNG(n) ((uint32_t)(((n) & 0x07FF) << 16))
  8341. #define TRNG_SCR6PL_RUN6P_MAX(n) ((uint32_t)(((n) & 0x07FF) << 0))
  8342. // defaults from NXP's SDK (fsl_trng.c)
  8343. #define TRNG_DEFAULT_ENTROPY_DELAY 3200
  8344. #define TRNG_DEFAULT_SAMPLE_SIZE 2500
  8345. #define TRNG_DEFAULT_SPARSE_BIT_LIMIT 63
  8346. #define TRNG_DEFAULT_RETRY_COUNT 1
  8347. #define TRNG_DEFAULT_RUN_MAX_LIMIT 34
  8348. #define TRNG_DEFAULT_MONOBIT_MAXIMUM 1384
  8349. #define TRNG_DEFAULT_MONOBIT_MINIMUM (TRNG_DEFAULT_MONOBIT_MAXIMUM - 268)
  8350. #define TRNG_DEFAULT_RUNBIT1_MAXIMUM 405
  8351. #define TRNG_DEFAULT_RUNBIT1_MINIMUM (TRNG_DEFAULT_RUNBIT1_MAXIMUM - 178)
  8352. #define TRNG_DEFAULT_RUNBIT2_MAXIMUM 220
  8353. #define TRNG_DEFAULT_RUNBIT2_MINIMUM (TRNG_DEFAULT_RUNBIT2_MAXIMUM - 122)
  8354. #define TRNG_DEFAULT_RUNBIT3_MAXIMUM 125
  8355. #define TRNG_DEFAULT_RUNBIT3_MINIMUM (TRNG_DEFAULT_RUNBIT3_MAXIMUM - 88)
  8356. #define TRNG_DEFAULT_RUNBIT4_MAXIMUM 75
  8357. #define TRNG_DEFAULT_RUNBIT4_MINIMUM (TRNG_DEFAULT_RUNBIT4_MAXIMUM - 64)
  8358. #define TRNG_DEFAULT_RUNBIT5_MAXIMUM 47
  8359. #define TRNG_DEFAULT_RUNBIT5_MINIMUM (TRNG_DEFAULT_RUNBIT5_MAXIMUM - 46)
  8360. #define TRNG_DEFAULT_RUNBIT6PLUS_MAXIMUM 47
  8361. #define TRNG_DEFAULT_RUNBIT6PLUS_MINIMUM (TRNG_DEFAULT_RUNBIT6PLUS_MAXIMUM - 46)
  8362. #define TRNG_DEFAULT_POKER_MAXIMUM 26912
  8363. #define TRNG_DEFAULT_POKER_MINIMUM (TRNG_DEFAULT_POKER_MAXIMUM - 2467)
  8364. #define TRNG_DEFAULT_FREQUENCY_MAXIMUM 25600
  8365. #define TRNG_DEFAULT_FREQUENCY_MINIMUM 1600
  8366. // 68.4: page 3406
  8367. #define IMXRT_TSC (*(IMXRT_REGISTER32_t *)IMXRT_TSC_ADDRESS)
  8368. #define TSC_BASIC_SETTING (IMXRT_TSC.offset000)
  8369. #define TSC_PS_INPUT_BUFFER_ADDR (IMXRT_TSC.offset010)
  8370. #define TSC_FLOW_CONTROL (IMXRT_TSC.offset020)
  8371. #define TSC_MEASEURE_VALUE (IMXRT_TSC.offset030)
  8372. #define TSC_INT_EN (IMXRT_TSC.offset040)
  8373. #define TSC_INT_SIG_EN (IMXRT_TSC.offset050)
  8374. #define TSC_INT_STATUS (IMXRT_TSC.offset060)
  8375. #define TSC_DEBUG_MODE (IMXRT_TSC.offset070)
  8376. #define TSC_DEBUG_MODE2 (IMXRT_TSC.offset080)
  8377. // 42.5.1.1: page 2212
  8378. #define IMXRT_USB1 (*(IMXRT_REGISTER32_t *)IMXRT_USB1_ADDRESS)
  8379. #define USB1_ID (IMXRT_USB1.offset000)
  8380. #define USB1_HWGENERAL (IMXRT_USB1.offset004)
  8381. #define USB1_HWHOST (IMXRT_USB1.offset008)
  8382. #define USB1_HWDEVICE (IMXRT_USB1.offset00C)
  8383. #define USB1_HWTXBUF (IMXRT_USB1.offset010)
  8384. #define USB1_HWRXBUF (IMXRT_USB1.offset014)
  8385. #define USB1_GPTIMER0LD (IMXRT_USB1.offset080)
  8386. #define USB1_GPTIMER0CTRL (IMXRT_USB1.offset084)
  8387. #define USB1_GPTIMER1LD (IMXRT_USB1.offset088)
  8388. #define USB1_GPTIMER1CTRL (IMXRT_USB1.offset08C)
  8389. #define USB1_SBUSCFG (IMXRT_USB1.offset090)
  8390. #define USB1_HCIVERSION (IMXRT_USB1.offset100)
  8391. #define USB1_HCSPARAMS (IMXRT_USB1.offset104)
  8392. #define USB1_HCCPARAMS (IMXRT_USB1.offset108)
  8393. #define USB1_DCIVERSION (IMXRT_USB1.offset120)
  8394. #define USB1_DCCPARAMS (IMXRT_USB1.offset124)
  8395. #define USB1_USBCMD (IMXRT_USB1.offset140)
  8396. #define USB1_USBSTS (IMXRT_USB1.offset144)
  8397. #define USB1_USBINTR (IMXRT_USB1.offset148)
  8398. #define USB1_FRINDEX (IMXRT_USB1.offset14C)
  8399. #define USB1_PERIODICLISTBASE (IMXRT_USB1.offset154)
  8400. #define USB1_DEVICEADDR (IMXRT_USB1.offset154)
  8401. #define USB1_ASYNCLISTADDR (IMXRT_USB1.offset158)
  8402. #define USB1_ENDPOINTLISTADDR (IMXRT_USB1.offset158)
  8403. #define USB1_BURSTSIZE (IMXRT_USB1.offset160)
  8404. #define USB1_TXFILLTUNING (IMXRT_USB1.offset164)
  8405. #define USB1_ENDPTNAK (IMXRT_USB1.offset178)
  8406. #define USB1_ENDPTNAKEN (IMXRT_USB1.offset17C)
  8407. #define USB1_CONFIGFLAG (IMXRT_USB1.offset180)
  8408. #define USB1_PORTSC1 (IMXRT_USB1.offset184)
  8409. #define USB1_OTGSC (IMXRT_USB1.offset1A4)
  8410. #define USB1_USBMODE (IMXRT_USB1.offset1A8)
  8411. #define USB1_ENDPTSETUPSTAT (IMXRT_USB1.offset1AC)
  8412. #define USB1_ENDPTPRIME (IMXRT_USB1.offset1B0)
  8413. #define USB1_ENDPTFLUSH (IMXRT_USB1.offset1B4)
  8414. #define USB1_ENDPTSTATUS (IMXRT_USB1.offset1B8)
  8415. #define USB1_ENDPTCOMPLETE (IMXRT_USB1.offset1BC)
  8416. #define USB1_ENDPTCTRL0 (IMXRT_USB1.offset1C0)
  8417. #define USB1_ENDPTCTRL1 (IMXRT_USB1.offset1C4)
  8418. #define USB1_ENDPTCTRL2 (IMXRT_USB1.offset1C8)
  8419. #define USB1_ENDPTCTRL3 (IMXRT_USB1.offset1CC)
  8420. #define USB1_ENDPTCTRL4 (IMXRT_USB1.offset1D0)
  8421. #define USB1_ENDPTCTRL5 (IMXRT_USB1.offset1D4)
  8422. #define USB1_ENDPTCTRL6 (IMXRT_USB1.offset1D8)
  8423. #define USB1_ENDPTCTRL7 (IMXRT_USB1.offset1DC)
  8424. #define IMXRT_USB2 (*(IMXRT_REGISTER32_t *)IMXRT_USB2_ADDRESS)
  8425. #define USB2_ID (IMXRT_USB2.offset000)
  8426. #define USB2_HWGENERAL (IMXRT_USB2.offset004)
  8427. #define USB2_HWHOST (IMXRT_USB2.offset008)
  8428. #define USB2_HWDEVICE (IMXRT_USB2.offset00C)
  8429. #define USB2_HWTXBUF (IMXRT_USB2.offset010)
  8430. #define USB2_HWRXBUF (IMXRT_USB2.offset014)
  8431. #define USB2_GPTIMER0LD (IMXRT_USB2.offset080)
  8432. #define USB2_GPTIMER0CTRL (IMXRT_USB2.offset084)
  8433. #define USB2_GPTIMER1LD (IMXRT_USB2.offset088)
  8434. #define USB2_GPTIMER1CTRL (IMXRT_USB2.offset08C)
  8435. #define USB2_SBUSCFG (IMXRT_USB2.offset090)
  8436. #define USB2_HCIVERSION (IMXRT_USB2.offset100)
  8437. #define USB2_HCSPARAMS (IMXRT_USB2.offset104)
  8438. #define USB2_HCCPARAMS (IMXRT_USB2.offset108)
  8439. #define USB2_DCIVERSION (IMXRT_USB2.offset120)
  8440. #define USB2_DCCPARAMS (IMXRT_USB2.offset124)
  8441. #define USB2_USBCMD (IMXRT_USB2.offset140)
  8442. #define USB2_USBSTS (IMXRT_USB2.offset144)
  8443. #define USB2_USBINTR (IMXRT_USB2.offset148)
  8444. #define USB2_FRINDEX (IMXRT_USB2.offset14C)
  8445. #define USB2_PERIODICLISTBASE (IMXRT_USB2.offset154)
  8446. #define USB2_DEVICEADDR (IMXRT_USB2.offset154)
  8447. #define USB2_ASYNCLISTADDR (IMXRT_USB2.offset158)
  8448. #define USB2_ENDPOINTLISTADDR (IMXRT_USB2.offset158)
  8449. #define USB2_BURSTSIZE (IMXRT_USB2.offset160)
  8450. #define USB2_TXFILLTUNING (IMXRT_USB2.offset164)
  8451. #define USB2_ENDPTNAK (IMXRT_USB2.offset178)
  8452. #define USB2_ENDPTNAKEN (IMXRT_USB2.offset17C)
  8453. #define USB2_CONFIGFLAG (IMXRT_USB2.offset180)
  8454. #define USB2_PORTSC1 (IMXRT_USB2.offset184)
  8455. #define USB2_OTGSC (IMXRT_USB2.offset1A4)
  8456. #define USB2_USBMODE (IMXRT_USB2.offset1A8)
  8457. #define USB2_ENDPTSETUPSTAT (IMXRT_USB2.offset1AC)
  8458. #define USB2_ENDPTPRIME (IMXRT_USB2.offset1B0)
  8459. #define USB2_ENDPTFLUSH (IMXRT_USB2.offset1B4)
  8460. #define USB2_ENDPTSTATUS (IMXRT_USB2.offset1B8)
  8461. #define USB2_ENDPTCOMPLETE (IMXRT_USB2.offset1BC)
  8462. #define USB2_ENDPTCTRL0 (IMXRT_USB2.offset1C0)
  8463. #define USB2_ENDPTCTRL1 (IMXRT_USB2.offset1C4)
  8464. #define USB2_ENDPTCTRL2 (IMXRT_USB2.offset1C8)
  8465. #define USB2_ENDPTCTRL3 (IMXRT_USB2.offset1CC)
  8466. #define USB2_ENDPTCTRL4 (IMXRT_USB2.offset1D0)
  8467. #define USB2_ENDPTCTRL5 (IMXRT_USB2.offset1D4)
  8468. #define USB2_ENDPTCTRL6 (IMXRT_USB2.offset1D8)
  8469. #define USB2_ENDPTCTRL7 (IMXRT_USB2.offset1DC)
  8470. #define USB_USBCMD_ITC(n) ((uint32_t)(((n) & 0xFF) << 16))
  8471. #define USB_USBCMD_FS_2 ((uint32_t)(1<<15))
  8472. #define USB_USBCMD_ATDTW ((uint32_t)(1<<14))
  8473. #define USB_USBCMD_SUTW ((uint32_t)(1<<13))
  8474. #define USB_USBCMD_ASPE ((uint32_t)(1<<11))
  8475. #define USB_USBCMD_ASP(n) ((uint32_t)(((n) & 0x03) << 8))
  8476. #define USB_USBCMD_IAA ((uint32_t)(1<<6))
  8477. #define USB_USBCMD_ASE ((uint32_t)(1<<5))
  8478. #define USB_USBCMD_PSE ((uint32_t)(1<<4))
  8479. #define USB_USBCMD_FS_1(n) ((uint32_t)(((n) & 0x03) << 2))
  8480. #define USB_USBCMD_RST ((uint32_t)(1<<1))
  8481. #define USB_USBCMD_RS ((uint32_t)(1<<0))
  8482. #define USB_USBSTS_TI1 ((uint32_t)(1<<25))
  8483. #define USB_USBSTS_TI0 ((uint32_t)(1<<24))
  8484. #define USB_USBSTS_NAKI ((uint32_t)(1<<16))
  8485. #define USB_USBSTS_AS ((uint32_t)(1<<15))
  8486. #define USB_USBSTS_PS ((uint32_t)(1<<14))
  8487. #define USB_USBSTS_RCL ((uint32_t)(1<<13))
  8488. #define USB_USBSTS_HCH ((uint32_t)(1<<12))
  8489. #define USB_USBSTS_ULPII ((uint32_t)(1<<10))
  8490. #define USB_USBSTS_SLI ((uint32_t)(1<<8))
  8491. #define USB_USBSTS_SRI ((uint32_t)(1<<7))
  8492. #define USB_USBSTS_URI ((uint32_t)(1<<6))
  8493. #define USB_USBSTS_AAI ((uint32_t)(1<<5))
  8494. #define USB_USBSTS_SEI ((uint32_t)(1<<4))
  8495. #define USB_USBSTS_FRI ((uint32_t)(1<<3))
  8496. #define USB_USBSTS_PCI ((uint32_t)(1<<2))
  8497. #define USB_USBSTS_UEI ((uint32_t)(1<<1))
  8498. #define USB_USBSTS_UI ((uint32_t)(1<<0))
  8499. #define USB_USBINTR_TIE1 ((uint32_t)(1<<25))
  8500. #define USB_USBINTR_TIE0 ((uint32_t)(1<<24))
  8501. #define USB_USBINTR_UPIE ((uint32_t)(1<<19))
  8502. #define USB_USBINTR_UAIE ((uint32_t)(1<<18))
  8503. #define USB_USBINTR_NAKE ((uint32_t)(1<<16))
  8504. #define USB_USBINTR_ULPIE ((uint32_t)(1<<10))
  8505. #define USB_USBINTR_SLE ((uint32_t)(1<<8))
  8506. #define USB_USBINTR_SRE ((uint32_t)(1<<7))
  8507. #define USB_USBINTR_URE ((uint32_t)(1<<6))
  8508. #define USB_USBINTR_AAE ((uint32_t)(1<<5))
  8509. #define USB_USBINTR_SEE ((uint32_t)(1<<4))
  8510. #define USB_USBINTR_FRE ((uint32_t)(1<<3))
  8511. #define USB_USBINTR_PCE ((uint32_t)(1<<2))
  8512. #define USB_USBINTR_UEE ((uint32_t)(1<<1))
  8513. #define USB_USBINTR_UE ((uint32_t)(1<<0))
  8514. #define USB_DEVICEADDR_USBADR(n) ((uint32_t)(((n) & 0x7F) << 25))
  8515. #define USB_DEVICEADDR_USBADRA ((uint32_t)(1<<24))
  8516. #define USB_PORTSC1_PTS_1(n) ((uint32_t)(((n) & 0x03) << 30))
  8517. #define USB_PORTSC1_STS ((uint32_t)(1<<29))
  8518. #define USB_PORTSC1_PTW ((uint32_t)(1<<28))
  8519. #define USB_PORTSC1_PSPD(n) ((uint32_t)(((n) & 0x03) << 26))
  8520. #define USB_PORTSC1_PTS_2 ((uint32_t)(1<<25))
  8521. #define USB_PORTSC1_PFSC ((uint32_t)(1<<24))
  8522. #define USB_PORTSC1_PHCD ((uint32_t)(1<<23))
  8523. #define USB_PORTSC1_WKOC ((uint32_t)(1<<22))
  8524. #define USB_PORTSC1_WKDC ((uint32_t)(1<<21))
  8525. #define USB_PORTSC1_WKCN ((uint32_t)(1<<20))
  8526. #define USB_PORTSC1_PTC(n) ((uint32_t)(((n) & 0x0F) << 16))
  8527. #define USB_PORTSC1_PIC(n) ((uint32_t)(((n) & 0x03) << 14))
  8528. #define USB_PORTSC1_PO ((uint32_t)(1<<13))
  8529. #define USB_PORTSC1_PP ((uint32_t)(1<<12))
  8530. #define USB_PORTSC1_LS(n) ((uint32_t)(((n) & 0x03) << 10))
  8531. #define USB_PORTSC1_HSP ((uint32_t)(1<<9))
  8532. #define USB_PORTSC1_PR ((uint32_t)(1<<8))
  8533. #define USB_PORTSC1_SUSP ((uint32_t)(1<<7))
  8534. #define USB_PORTSC1_FPR ((uint32_t)(1<<6))
  8535. #define USB_PORTSC1_OCC ((uint32_t)(1<<5))
  8536. #define USB_PORTSC1_OCA ((uint32_t)(1<<4))
  8537. #define USB_PORTSC1_PEC ((uint32_t)(1<<3))
  8538. #define USB_PORTSC1_PE ((uint32_t)(1<<2))
  8539. #define USB_PORTSC1_CSC ((uint32_t)(1<<1))
  8540. #define USB_PORTSC1_CCS ((uint32_t)(1<<0))
  8541. #define USB_USBMODE_SDIS ((uint32_t)(1<<4))
  8542. #define USB_USBMODE_SLOM ((uint32_t)(1<<3))
  8543. #define USB_USBMODE_ES ((uint32_t)(1<<2))
  8544. #define USB_USBMODE_CM(n) ((uint32_t)(((n) & 0x03) << 0))
  8545. #define USB_USBMODE_CM_MASK USB_USBMODE_CM(3)
  8546. #define USB_ENDPTCTRL_TXE ((uint32_t)(1<<23))
  8547. #define USB_ENDPTCTRL_TXR ((uint32_t)(1<<22))
  8548. #define USB_ENDPTCTRL_TXI ((uint32_t)(1<<21))
  8549. #define USB_ENDPTCTRL_TXT(n) ((uint32_t)(((n) & 0x03) << 18))
  8550. #define USB_ENDPTCTRL_TXD ((uint32_t)(1<<17))
  8551. #define USB_ENDPTCTRL_TXS ((uint32_t)(1<<16))
  8552. #define USB_ENDPTCTRL_RXE ((uint32_t)(1<<7))
  8553. #define USB_ENDPTCTRL_RXR ((uint32_t)(1<<6))
  8554. #define USB_ENDPTCTRL_RXI ((uint32_t)(1<<5))
  8555. #define USB_ENDPTCTRL_RXT(n) ((uint32_t)(((n) & 0x03) << 2))
  8556. #define USB_ENDPTCTRL_RXD ((uint32_t)(1<<1))
  8557. #define USB_ENDPTCTRL_RXS ((uint32_t)(1<<0))
  8558. #define USB_GPTIMERCTRL_GPTRUN ((uint32_t)(1<<31))
  8559. #define USB_GPTIMERCTRL_GPTRST ((uint32_t)(1<<30))
  8560. #define USB_GPTIMERCTRL_GPTMODE ((uint32_t)(1<<24))
  8561. #define USB_GPTIMERCTRL_GPTCNT(n) ((uint32_t)(((n) & 0xFFFFFF) << 0))
  8562. // 43.3: page 2474
  8563. #define IMXRT_USBPHY1 (*(IMXRT_REGISTER32_t *)IMXRT_USBPHY1_ADDRESS)
  8564. #define USBPHY1_PWD (IMXRT_USBPHY1.offset000)
  8565. #define USBPHY1_PWD_SET (IMXRT_USBPHY1.offset004)
  8566. #define USBPHY1_PWD_CLR (IMXRT_USBPHY1.offset008)
  8567. #define USBPHY1_PWD_TOG (IMXRT_USBPHY1.offset00C)
  8568. #define USBPHY1_TX (IMXRT_USBPHY1.offset010)
  8569. #define USBPHY1_TX_SET (IMXRT_USBPHY1.offset014)
  8570. #define USBPHY1_TX_CLR (IMXRT_USBPHY1.offset018)
  8571. #define USBPHY1_TX_TOG (IMXRT_USBPHY1.offset01C)
  8572. #define USBPHY1_RX (IMXRT_USBPHY1.offset020)
  8573. #define USBPHY1_RX_SET (IMXRT_USBPHY1.offset024)
  8574. #define USBPHY1_RX_CLR (IMXRT_USBPHY1.offset028)
  8575. #define USBPHY1_RX_TOG (IMXRT_USBPHY1.offset02C)
  8576. #define USBPHY1_CTRL (IMXRT_USBPHY1.offset030)
  8577. #define USBPHY1_CTRL_SET (IMXRT_USBPHY1.offset034)
  8578. #define USBPHY1_CTRL_CLR (IMXRT_USBPHY1.offset038)
  8579. #define USBPHY1_CTRL_TOG (IMXRT_USBPHY1.offset03C)
  8580. #define USBPHY1_STATUS (IMXRT_USBPHY1.offset040)
  8581. #define USBPHY1_DEBUG (IMXRT_USBPHY1.offset050)
  8582. #define USBPHY1_DEBUG_SET (IMXRT_USBPHY1.offset054)
  8583. #define USBPHY1_DEBUG_CLR (IMXRT_USBPHY1.offset058)
  8584. #define USBPHY1_DEBUG_TOG (IMXRT_USBPHY1.offset05C)
  8585. #define USBPHY1_DEBUG0_STATUS (IMXRT_USBPHY1.offset060)
  8586. #define USBPHY1_DEBUG1 (IMXRT_USBPHY1.offset070)
  8587. #define USBPHY1_DEBUG1_SET (IMXRT_USBPHY1.offset074)
  8588. #define USBPHY1_DEBUG1_CLR (IMXRT_USBPHY1.offset078)
  8589. #define USBPHY1_DEBUG1_TOG (IMXRT_USBPHY1.offset07C)
  8590. #define USBPHY1_VERSION (IMXRT_USBPHY1.offset080)
  8591. #define IMXRT_USBPHY2 (*(IMXRT_REGISTER32_t *)IMXRT_USBPHY2_ADDRESS)
  8592. #define USBPHY2_PWD (IMXRT_USBPHY2.offset000)
  8593. #define USBPHY2_PWD_SET (IMXRT_USBPHY2.offset004)
  8594. #define USBPHY2_PWD_CLR (IMXRT_USBPHY2.offset008)
  8595. #define USBPHY2_PWD_TOG (IMXRT_USBPHY2.offset00C)
  8596. #define USBPHY2_TX (IMXRT_USBPHY2.offset010)
  8597. #define USBPHY2_TX_SET (IMXRT_USBPHY2.offset014)
  8598. #define USBPHY2_TX_CLR (IMXRT_USBPHY2.offset018)
  8599. #define USBPHY2_TX_TOG (IMXRT_USBPHY2.offset01C)
  8600. #define USBPHY2_RX (IMXRT_USBPHY2.offset020)
  8601. #define USBPHY2_RX_SET (IMXRT_USBPHY2.offset024)
  8602. #define USBPHY2_RX_CLR (IMXRT_USBPHY2.offset028)
  8603. #define USBPHY2_RX_TOG (IMXRT_USBPHY2.offset02C)
  8604. #define USBPHY2_CTRL (IMXRT_USBPHY2.offset030)
  8605. #define USBPHY2_CTRL_SET (IMXRT_USBPHY2.offset034)
  8606. #define USBPHY2_CTRL_CLR (IMXRT_USBPHY2.offset038)
  8607. #define USBPHY2_CTRL_TOG (IMXRT_USBPHY2.offset03C)
  8608. #define USBPHY2_STATUS (IMXRT_USBPHY2.offset040)
  8609. #define USBPHY2_DEBUG (IMXRT_USBPHY2.offset050)
  8610. #define USBPHY2_DEBUG_SET (IMXRT_USBPHY2.offset054)
  8611. #define USBPHY2_DEBUG_CLR (IMXRT_USBPHY2.offset058)
  8612. #define USBPHY2_DEBUG_TOG (IMXRT_USBPHY2.offset05C)
  8613. #define USBPHY2_DEBUG0_STATUS (IMXRT_USBPHY2.offset060)
  8614. #define USBPHY2_DEBUG1 (IMXRT_USBPHY2.offset070)
  8615. #define USBPHY2_DEBUG1_SET (IMXRT_USBPHY2.offset074)
  8616. #define USBPHY2_DEBUG1_CLR (IMXRT_USBPHY2.offset078)
  8617. #define USBPHY2_DEBUG1_TOG (IMXRT_USBPHY2.offset07C)
  8618. #define USBPHY2_VERSION (IMXRT_USBPHY2.offset080)
  8619. #define USBPHY_PWD_RXPWDRX ((uint32_t)(1<<20))
  8620. #define USBPHY_PWD_RXPWDDIFF ((uint32_t)(1<<19))
  8621. #define USBPHY_PWD_RXPWD1PT1 ((uint32_t)(1<<18))
  8622. #define USBPHY_PWD_RXPWDENV ((uint32_t)(1<<17))
  8623. #define USBPHY_PWD_TXPWDV2I ((uint32_t)(1<<12))
  8624. #define USBPHY_PWD_TXPWDIBIAS ((uint32_t)(1<<11))
  8625. #define USBPHY_PWD_TXPWDFS ((uint32_t)(1<<10))
  8626. #define USBPHY_TX_USBPHY_TX_EDGECTRL(n) ((uint32_t)(((n) & 0x07) << 26))
  8627. #define USBPHY_TX_TXCAL45DP(n) ((uint32_t)(((n) & 0x0F) << 16))
  8628. #define USBPHY_TX_TXCAL45DN(n) ((uint32_t)(((n) & 0x0F) << 8))
  8629. #define USBPHY_TX_D_CAL(n) ((uint32_t)(((n) & 0x0F) << 0))
  8630. #define USBPHY_RX_RXDBYPASS ((uint32_t)(1<<22))
  8631. #define USBPHY_RX_DISCONADJ(n) ((uint32_t)(((n) & 0x07) << 4))
  8632. #define USBPHY_RX_ENVADJ(n) ((uint32_t)(((n) & 0x07) << 0))
  8633. #define USBPHY_CTRL_SFTRST ((uint32_t)(1<<31))
  8634. #define USBPHY_CTRL_CLKGATE ((uint32_t)(1<<30))
  8635. #define USBPHY_CTRL_UTMI_SUSPENDM ((uint32_t)(1<<29))
  8636. #define USBPHY_CTRL_HOST_FORCE_LS_SE0 ((uint32_t)(1<<28))
  8637. #define USBPHY_CTRL_OTG_ID_VALUE ((uint32_t)(1<<27))
  8638. #define USBPHY_CTRL_FSDLL_RST_EN ((uint32_t)(1<<24))
  8639. #define USBPHY_CTRL_ENVBUSCHG_WKUP ((uint32_t)(1<<23))
  8640. #define USBPHY_CTRL_ENIDCHG_WKUP ((uint32_t)(1<<22))
  8641. #define USBPHY_CTRL_ENDPDMCHG_WKUP ((uint32_t)(1<<21))
  8642. #define USBPHY_CTRL_ENAUTOCLR_PHY_PWD ((uint32_t)(1<<20))
  8643. #define USBPHY_CTRL_ENAUTOCLR_CLKGATE ((uint32_t)(1<<19))
  8644. #define USBPHY_CTRL_ENAUTO_PWRON_PLL ((uint32_t)(1<<18))
  8645. #define USBPHY_CTRL_WAKEUP_IRQ ((uint32_t)(1<<17))
  8646. #define USBPHY_CTRL_ENIRQWAKEUP ((uint32_t)(1<<16))
  8647. #define USBPHY_CTRL_ENUTMILEVEL3 ((uint32_t)(1<<15))
  8648. #define USBPHY_CTRL_ENUTMILEVEL2 ((uint32_t)(1<<14))
  8649. #define USBPHY_CTRL_DATA_ON_LRADC ((uint32_t)(1<<13))
  8650. #define USBPHY_CTRL_DEVPLUGIN_IRQ ((uint32_t)(1<<12))
  8651. #define USBPHY_CTRL_ENIRQDEVPLUGIN ((uint32_t)(1<<11))
  8652. #define USBPHY_CTRL_RESUME_IRQ ((uint32_t)(1<<10))
  8653. #define USBPHY_CTRL_ENIRQRESUMEDETECT ((uint32_t)(1<<9))
  8654. #define USBPHY_CTRL_RESUMEIRQSTICKY ((uint32_t)(1<<8))
  8655. #define USBPHY_CTRL_ENOTGIDDETECT ((uint32_t)(1<<7))
  8656. #define USBPHY_CTRL_OTG_ID_CHG_IRQ ((uint32_t)(1<<6))
  8657. #define USBPHY_CTRL_DEVPLUGIN_POLARITY ((uint32_t)(1<<5))
  8658. #define USBPHY_CTRL_ENDEVPLUGINDETECT ((uint32_t)(1<<4))
  8659. #define USBPHY_CTRL_HOSTDISCONDETECT_IRQ ((uint32_t)(1<<3))
  8660. #define USBPHY_CTRL_ENIRQHOSTDISCON ((uint32_t)(1<<2))
  8661. #define USBPHY_CTRL_ENHOSTDISCONDETECT ((uint32_t)(1<<1))
  8662. #define USBPHY_CTRL_ENOTG_ID_CHG_IRQ ((uint32_t)(1<<0))
  8663. // 26.9.1.1: page 1553
  8664. #define IMXRT_USDHC1 (*(IMXRT_REGISTER32_t *)IMXRT_USDHC1_ADDRESS)
  8665. #define USDHC1_DS_ADDR (IMXRT_USDHC1.offset000)
  8666. #define USDHC1_BLK_ATT (IMXRT_USDHC1.offset004)
  8667. #define USDHC1_CMD_ARG (IMXRT_USDHC1.offset008)
  8668. #define USDHC1_CMD_XFR_TYP (IMXRT_USDHC1.offset00C)
  8669. #define USDHC1_CMD_RSP0 (IMXRT_USDHC1.offset010)
  8670. #define USDHC1_CMD_RSP1 (IMXRT_USDHC1.offset014)
  8671. #define USDHC1_CMD_RSP2 (IMXRT_USDHC1.offset018)
  8672. #define USDHC1_CMD_RSP3 (IMXRT_USDHC1.offset01C)
  8673. #define USDHC1_DATA_BUFF_ACC_PORT (IMXRT_USDHC1.offset020)
  8674. #define USDHC1_PRES_STATE (IMXRT_USDHC1.offset024)
  8675. #define USDHC1_PROT_CTRL (IMXRT_USDHC1.offset028)
  8676. #define USDHC1_SYS_CTRL (IMXRT_USDHC1.offset02C)
  8677. #define USDHC1_INT_STATUS (IMXRT_USDHC1.offset030)
  8678. #define USDHC1_INT_STATUS_EN (IMXRT_USDHC1.offset034)
  8679. #define USDHC1_INT_SIGNAL_EN (IMXRT_USDHC1.offset038)
  8680. #define USDHC1_AUTOCMD12_ERR_STATUS (IMXRT_USDHC1.offset03C)
  8681. #define USDHC1_HOST_CTRL_CAP (IMXRT_USDHC1.offset040)
  8682. #define USDHC1_WTMK_LVL (IMXRT_USDHC1.offset044)
  8683. #define USDHC1_MIX_CTRL (IMXRT_USDHC1.offset048)
  8684. #define USDHC1_FORCE_EVENT (IMXRT_USDHC1.offset050)
  8685. #define USDHC1_ADMA_ERR_STATUS (IMXRT_USDHC1.offset054)
  8686. #define USDHC1_ADMA_SYS_ADDR (IMXRT_USDHC1.offset058)
  8687. #define USDHC1_DLL_CTRL (IMXRT_USDHC1.offset060)
  8688. #define USDHC1_DLL_STATUS (IMXRT_USDHC1.offset064)
  8689. #define USDHC1_CLK_TUNE_CTRL_STATUS (IMXRT_USDHC1.offset068)
  8690. #define USDHC1_VEND_SPEC (IMXRT_USDHC1.offset0C0)
  8691. #define USDHC1_MMC_BOOT (IMXRT_USDHC1.offset0C4)
  8692. #define USDHC1_VEND_SPEC2 (IMXRT_USDHC1.offset0C8)
  8693. #define USDHC1_TUNING_CTRL (IMXRT_USDHC1.offset0CC)
  8694. #define IMXRT_USDHC2 (*(IMXRT_REGISTER32_t *)IMXRT_USDHC2_ADDRESS)
  8695. #define USDHC2_DS_ADDR (IMXRT_USDHC2.offset000)
  8696. #define USDHC2_BLK_ATT (IMXRT_USDHC2.offset004)
  8697. #define USDHC2_CMD_ARG (IMXRT_USDHC2.offset008)
  8698. #define USDHC2_CMD_XFR_TYP (IMXRT_USDHC2.offset00C)
  8699. #define USDHC2_CMD_RSP0 (IMXRT_USDHC2.offset010)
  8700. #define USDHC2_CMD_RSP1 (IMXRT_USDHC2.offset014)
  8701. #define USDHC2_CMD_RSP2 (IMXRT_USDHC2.offset018)
  8702. #define USDHC2_CMD_RSP3 (IMXRT_USDHC2.offset01C)
  8703. #define USDHC2_DATA_BUFF_ACC_PORT (IMXRT_USDHC2.offset020)
  8704. #define USDHC2_PRES_STATE (IMXRT_USDHC2.offset024)
  8705. #define USDHC2_PROT_CTRL (IMXRT_USDHC2.offset028)
  8706. #define USDHC2_SYS_CTRL (IMXRT_USDHC2.offset02C)
  8707. #define USDHC2_INT_STATUS (IMXRT_USDHC2.offset030)
  8708. #define USDHC2_INT_STATUS_EN (IMXRT_USDHC2.offset034)
  8709. #define USDHC2_INT_SIGNAL_EN (IMXRT_USDHC2.offset038)
  8710. #define USDHC2_AUTOCMD12_ERR_STATUS (IMXRT_USDHC2.offset03C)
  8711. #define USDHC2_HOST_CTRL_CAP (IMXRT_USDHC2.offset040)
  8712. #define USDHC2_WTMK_LVL (IMXRT_USDHC2.offset044)
  8713. #define USDHC2_MIX_CTRL (IMXRT_USDHC2.offset048)
  8714. #define USDHC2_FORCE_EVENT (IMXRT_USDHC2.offset050)
  8715. #define USDHC2_ADMA_ERR_STATUS (IMXRT_USDHC2.offset054)
  8716. #define USDHC2_ADMA_SYS_ADDR (IMXRT_USDHC2.offset058)
  8717. #define USDHC2_DLL_CTRL (IMXRT_USDHC2.offset060)
  8718. #define USDHC2_DLL_STATUS (IMXRT_USDHC2.offset064)
  8719. #define USDHC2_CLK_TUNE_CTRL_STATUS (IMXRT_USDHC2.offset068)
  8720. #define USDHC2_VEND_SPEC (IMXRT_USDHC2.offset0C0)
  8721. #define USDHC2_MMC_BOOT (IMXRT_USDHC2.offset0C4)
  8722. #define USDHC2_VEND_SPEC2 (IMXRT_USDHC2.offset0C8)
  8723. #define USDHC2_TUNING_CTRL (IMXRT_USDHC2.offset0CC)
  8724. // 57.8.1.1: page 3187
  8725. #define IMXRT_WDOG1 (*(IMXRT_REGISTER16_t *)IMXRT_WDOG1_ADDRESS)
  8726. #define WDOG1_WCR (IMXRT_WDOG1.offset000)
  8727. #define WDOG1_WSR (IMXRT_WDOG1.offset002)
  8728. #define WDOG1_WRSR (IMXRT_WDOG1.offset004)
  8729. #define WDOG1_WICR (IMXRT_WDOG1.offset006)
  8730. #define WDOG1_WMCR (IMXRT_WDOG1.offset008)
  8731. #define IMXRT_WDOG2 (*(IMXRT_REGISTER16_t *)IMXRT_WDOG2_ADDRESS)
  8732. #define WDOG2_WCR (IMXRT_WDOG2.offset000)
  8733. #define WDOG2_WSR (IMXRT_WDOG2.offset002)
  8734. #define WDOG2_WRSR (IMXRT_WDOG2.offset004)
  8735. #define WDOG2_WICR (IMXRT_WDOG2.offset006)
  8736. #define WDOG2_WMCR (IMXRT_WDOG2.offset008)
  8737. #define WDOG_WCR_WDZST ((uint16_t)(1<<0))
  8738. #define WDOG_WCR_WDBG ((uint16_t)(1<<1))
  8739. #define WDOG_WCR_WDE ((uint16_t)(1<<2))
  8740. #define WDOG_WCR_WDT ((uint16_t)(1<<3))
  8741. #define WDOG_WCR_SRS ((uint16_t)(1<<4))
  8742. #define WDOG_WCR_WDA ((uint16_t)(1<<5))
  8743. #define WDOG_WCR_SRE ((uint16_t)(1<<6))
  8744. #define WDOG_WCR_WDW ((uint16_t)(1<<7))
  8745. #define WDOG_WCR_WT(n) ((uint16_t)(((n) & 0xFF) << 8))
  8746. #define WDOG_WRSR_SFTW ((uint16_t)(1<<0))
  8747. #define WDOG_WRSR_TOUT ((uint16_t)(1<<1))
  8748. #define WDOG_WRSR_POR ((uint16_t)(1<<4))
  8749. // 58.5.1.1: page 3205
  8750. #define IMXRT_WDOG3 (*(IMXRT_REGISTER32_t *)IMXRT_WDOG3_ADDRESS)
  8751. #define WDOG3_CS (IMXRT_WDOG3.offset000)
  8752. #define WDOG3_CNT (IMXRT_WDOG3.offset004)
  8753. #define WDOG3_TOVAL (IMXRT_WDOG3.offset008)
  8754. #define WDOG3_WIN (IMXRT_WDOG3.offset00C)
  8755. #define WDOG_CS_STOP ((uint16_t)(1<<0))
  8756. #define WDOG_CS_WAIT ((uint16_t)(1<<1))
  8757. #define WDOG_CS_DBG ((uint16_t)(1<<2))
  8758. #define WDOG_CS_TST(n) ((uint16_t)(((n) & 0x03) << 3))
  8759. #define WDOG_CS_UPDATE ((uint16_t)(1<<5))
  8760. #define WDOG_CS_INT ((uint16_t)(1<<6))
  8761. #define WDOG_CS_EN ((uint16_t)(1<<7))
  8762. #define WDOG_CS_CLK(n) ((uint16_t)(((n) & 0x03) << 8))
  8763. #define WDOG_CS_RCS ((uint16_t)(1<<10))
  8764. #define WDOG_CS_ULK ((uint16_t)(1<<11))
  8765. #define WDOG_CS_PRES ((uint16_t)(1<<12))
  8766. #define WDOG_CS_CMD32EN ((uint16_t)(1<<13))
  8767. #define WDOG_CS_FLG ((uint16_t)(1<<14))
  8768. #define WDOG_CS_WIN ((uint16_t)(1<<15))
  8769. // 61.4: page 3235
  8770. #define IMXRT_XBARA1 (*(IMXRT_REGISTER16_t *)IMXRT_XBARA1_ADDRESS)
  8771. #define XBARA1_SEL0 (IMXRT_XBARA1.offset000)
  8772. #define XBARA1_SEL1 (IMXRT_XBARA1.offset002)
  8773. #define XBARA1_SEL2 (IMXRT_XBARA1.offset004)
  8774. #define XBARA1_SEL3 (IMXRT_XBARA1.offset006)
  8775. #define XBARA1_SEL4 (IMXRT_XBARA1.offset008)
  8776. #define XBARA1_SEL5 (IMXRT_XBARA1.offset00A)
  8777. #define XBARA1_SEL6 (IMXRT_XBARA1.offset00C)
  8778. #define XBARA1_SEL7 (IMXRT_XBARA1.offset00E)
  8779. #define XBARA1_SEL8 (IMXRT_XBARA1.offset010)
  8780. #define XBARA1_SEL9 (IMXRT_XBARA1.offset012)
  8781. #define XBARA1_SEL10 (IMXRT_XBARA1.offset014)
  8782. #define XBARA1_SEL11 (IMXRT_XBARA1.offset016)
  8783. #define XBARA1_SEL12 (IMXRT_XBARA1.offset018)
  8784. #define XBARA1_SEL13 (IMXRT_XBARA1.offset01A)
  8785. #define XBARA1_SEL14 (IMXRT_XBARA1.offset01C)
  8786. #define XBARA1_SEL15 (IMXRT_XBARA1.offset01E)
  8787. #define XBARA1_SEL16 (IMXRT_XBARA1.offset020)
  8788. #define XBARA1_SEL17 (IMXRT_XBARA1.offset022)
  8789. #define XBARA1_SEL18 (IMXRT_XBARA1.offset024)
  8790. #define XBARA1_SEL19 (IMXRT_XBARA1.offset026)
  8791. #define XBARA1_SEL20 (IMXRT_XBARA1.offset028)
  8792. #define XBARA1_SEL21 (IMXRT_XBARA1.offset02A)
  8793. #define XBARA1_SEL22 (IMXRT_XBARA1.offset02C)
  8794. #define XBARA1_SEL23 (IMXRT_XBARA1.offset02E)
  8795. #define XBARA1_SEL24 (IMXRT_XBARA1.offset030)
  8796. #define XBARA1_SEL25 (IMXRT_XBARA1.offset032)
  8797. #define XBARA1_SEL26 (IMXRT_XBARA1.offset034)
  8798. #define XBARA1_SEL27 (IMXRT_XBARA1.offset036)
  8799. #define XBARA1_SEL28 (IMXRT_XBARA1.offset038)
  8800. #define XBARA1_SEL29 (IMXRT_XBARA1.offset03A)
  8801. #define XBARA1_SEL30 (IMXRT_XBARA1.offset03C)
  8802. #define XBARA1_SEL31 (IMXRT_XBARA1.offset03E)
  8803. #define XBARA1_SEL32 (IMXRT_XBARA1.offset040)
  8804. #define XBARA1_SEL33 (IMXRT_XBARA1.offset042)
  8805. #define XBARA1_SEL34 (IMXRT_XBARA1.offset044)
  8806. #define XBARA1_SEL35 (IMXRT_XBARA1.offset046)
  8807. #define XBARA1_SEL36 (IMXRT_XBARA1.offset048)
  8808. #define XBARA1_SEL37 (IMXRT_XBARA1.offset04A)
  8809. #define XBARA1_SEL38 (IMXRT_XBARA1.offset04C)
  8810. #define XBARA1_SEL39 (IMXRT_XBARA1.offset04E)
  8811. #define XBARA1_SEL40 (IMXRT_XBARA1.offset050)
  8812. #define XBARA1_SEL41 (IMXRT_XBARA1.offset052)
  8813. #define XBARA1_SEL42 (IMXRT_XBARA1.offset054)
  8814. #define XBARA1_SEL43 (IMXRT_XBARA1.offset056)
  8815. #define XBARA1_SEL44 (IMXRT_XBARA1.offset058)
  8816. #define XBARA1_SEL45 (IMXRT_XBARA1.offset05A)
  8817. #define XBARA1_SEL46 (IMXRT_XBARA1.offset05C)
  8818. #define XBARA1_SEL47 (IMXRT_XBARA1.offset05E)
  8819. #define XBARA1_SEL48 (IMXRT_XBARA1.offset060)
  8820. #define XBARA1_SEL49 (IMXRT_XBARA1.offset062)
  8821. #define XBARA1_SEL50 (IMXRT_XBARA1.offset064)
  8822. #define XBARA1_SEL51 (IMXRT_XBARA1.offset066)
  8823. #define XBARA1_SEL52 (IMXRT_XBARA1.offset068)
  8824. #define XBARA1_SEL53 (IMXRT_XBARA1.offset06A)
  8825. #define XBARA1_SEL54 (IMXRT_XBARA1.offset06C)
  8826. #define XBARA1_SEL55 (IMXRT_XBARA1.offset06E)
  8827. #define XBARA1_SEL56 (IMXRT_XBARA1.offset070)
  8828. #define XBARA1_SEL57 (IMXRT_XBARA1.offset072)
  8829. #define XBARA1_SEL58 (IMXRT_XBARA1.offset074)
  8830. #define XBARA1_SEL59 (IMXRT_XBARA1.offset076)
  8831. #define XBARA1_SEL60 (IMXRT_XBARA1.offset078)
  8832. #define XBARA1_SEL61 (IMXRT_XBARA1.offset07A)
  8833. #define XBARA1_SEL62 (IMXRT_XBARA1.offset07C)
  8834. #define XBARA1_SEL63 (IMXRT_XBARA1.offset07E)
  8835. #define XBARA1_SEL64 (IMXRT_XBARA1.offset080)
  8836. #define XBARA1_SEL65 (IMXRT_XBARA1.offset082)
  8837. #define XBARA1_CTRL0 (IMXRT_XBARA1.offset084)
  8838. #define XBARA1_CTRL1 (IMXRT_XBARA1.offset086)
  8839. #define XBARA_CTRL_STS1 ((uint16_t)(1<<12))
  8840. #define XBARA_CTRL_EDGE1(n) ((uint16_t)(((n) & 0x03) << 10))
  8841. #define XBARA_CTRL_IEN1 ((uint16_t)(1<<9))
  8842. #define XBARA_CTRL_DEN1 ((uint16_t)(1<<8))
  8843. #define XBARA_CTRL_STS0 ((uint16_t)(1<<4))
  8844. #define XBARA_CTRL_EDGE0(n) ((uint16_t)(((n) & 0x03) << 2))
  8845. #define XBARA_CTRL_IEN0 ((uint16_t)(1<<1))
  8846. #define XBARA_CTRL_DEN0 ((uint16_t)(1<<0))
  8847. // 62.3: page 3278
  8848. #define IMXRT_XBARB2 (*(IMXRT_REGISTER16_t *)IMXRT_XBARB2_ADDRESS)
  8849. #define XBARB2_SEL0 (IMXRT_XBARB2.offset000)
  8850. #define XBARB2_SEL1 (IMXRT_XBARB2.offset002)
  8851. #define XBARB2_SEL2 (IMXRT_XBARB2.offset004)
  8852. #define XBARB2_SEL3 (IMXRT_XBARB2.offset006)
  8853. #define XBARB2_SEL4 (IMXRT_XBARB2.offset008)
  8854. #define XBARB2_SEL5 (IMXRT_XBARB2.offset00A)
  8855. #define XBARB2_SEL6 (IMXRT_XBARB2.offset00C)
  8856. #define XBARB2_SEL7 (IMXRT_XBARB2.offset00E)
  8857. #define IMXRT_XBARB3 (*(IMXRT_REGISTER16_t *)IMXRT_XBARB3_ADDRESS)
  8858. #define XBARB3_SEL0 (IMXRT_XBARB3.offset000)
  8859. #define XBARB3_SEL1 (IMXRT_XBARB3.offset002)
  8860. #define XBARB3_SEL2 (IMXRT_XBARB3.offset004)
  8861. #define XBARB3_SEL3 (IMXRT_XBARB3.offset006)
  8862. #define XBARB3_SEL4 (IMXRT_XBARB3.offset008)
  8863. #define XBARB3_SEL5 (IMXRT_XBARB3.offset00A)
  8864. #define XBARB3_SEL6 (IMXRT_XBARB3.offset00C)
  8865. #define XBARB3_SEL7 (IMXRT_XBARB3.offset00E)
  8866. // XBAR1 Inputs and Outputs Table 3-4 Starting Page 62
  8867. #define XBARA1_IN_LOGIC_LOW 0
  8868. #define XBARA1_IN_LOGIC_HIGH 1
  8869. #define XBARA1_IN_IOMUX_XBAR_IN02 2
  8870. #define XBARA1_IN_IOMUX_XBAR_IN03 3
  8871. #define XBARA1_IN_IOMUX_XBAR_INOUT04 4
  8872. #define XBARA1_IN_IOMUX_XBAR_INOUT05 5
  8873. #define XBARA1_IN_IOMUX_XBAR_INOUT06 6
  8874. #define XBARA1_IN_IOMUX_XBAR_INOUT07 7
  8875. #define XBARA1_IN_IOMUX_XBAR_INOUT08 8
  8876. #define XBARA1_IN_IOMUX_XBAR_INOUT09 9
  8877. #define XBARA1_IN_IOMUX_XBAR_INOUT10 10
  8878. #define XBARA1_IN_IOMUX_XBAR_INOUT11 11
  8879. #define XBARA1_IN_IOMUX_XBAR_INOUT12 12
  8880. #define XBARA1_IN_IOMUX_XBAR_INOUT13 13
  8881. #define XBARA1_IN_IOMUX_XBAR_INOUT14 14
  8882. #define XBARA1_IN_IOMUX_XBAR_INOUT15 15
  8883. #define XBARA1_IN_IOMUX_XBAR_INOUT16 16
  8884. #define XBARA1_IN_IOMUX_XBAR_INOUT17 17
  8885. #define XBARA1_IN_IOMUX_XBAR_INOUT18 18
  8886. #define XBARA1_IN_IOMUX_XBAR_INOUT19 19
  8887. #define XBARA1_IN_IOMUX_XBAR_IN20 20
  8888. #define XBARA1_IN_IOMUX_XBAR_IN21 21
  8889. #define XBARA1_IN_IOMUX_XBAR_IN22 22
  8890. #define XBARA1_IN_IOMUX_XBAR_IN23 23
  8891. #define XBARA1_IN_IOMUX_XBAR_IN24 24
  8892. #define XBARA1_IN_IOMUX_XBAR_IN25 25
  8893. #define XBARA1_IN_ACMP1_OUT 26
  8894. #define XBARA1_IN_ACMP2_OUT 27
  8895. #define XBARA1_IN_ACMP3_OUT 28
  8896. #define XBARA1_IN_ACMP4_OUT 29
  8897. //#define XBARA1_IN_Reserved 30
  8898. //#define XBARA1_IN_Reserved 31
  8899. #define XBARA1_IN_QTIMER3_TIMER0 32
  8900. #define XBARA1_IN_QTIMER3_TIMER1 33
  8901. #define XBARA1_IN_QTIMER3_TIMER2 34
  8902. #define XBARA1_IN_QTIMER3_TIMER3 35
  8903. #define XBARA1_IN_QTIMER4_TIMER0 36
  8904. #define XBARA1_IN_QTIMER4_TIMER1 37
  8905. #define XBARA1_IN_QTIMER4_TIMER2 38
  8906. #define XBARA1_IN_QTIMER4_TIMER3 39
  8907. #define XBARA1_IN_FLEXPWM1_PWM1_OUT_TRIG0 40
  8908. #define XBARA1_IN_FLEXPWM1_PWM1_OUT_TRIG1 40
  8909. #define XBARA1_IN_FLEXPWM1_PWM2_OUT_TRIG0 41
  8910. #define XBARA1_IN_FLEXPWM1_PWM2_OUT_TRIG1 41
  8911. #define XBARA1_IN_FLEXPWM1_PWM3_OUT_TRIG0 42
  8912. #define XBARA1_IN_FLEXPWM1_PWM3_OUT_TRIG1 42
  8913. #define XBARA1_IN_FLEXPWM1_PWM4_OUT_TRIG0 43
  8914. #define XBARA1_IN_FLEXPWM1_PWM4_OUT_TRIG1 43
  8915. #define XBARA1_IN_FLEXPWM2_PWM1_OUT_TRIG0 44
  8916. #define XBARA1_IN_FLEXPWM2_PWM1_OUT_TRIG1 44
  8917. #define XBARA1_IN_FLEXPWM2_PWM2_OUT_TRIG0 45
  8918. #define XBARA1_IN_FLEXPWM2_PWM2_OUT_TRIG1 45
  8919. #define XBARA1_IN_FLEXPWM2_PWM3_OUT_TRIG0 46
  8920. #define XBARA1_IN_FLEXPWM2_PWM3_OUT_TRIG1 46
  8921. #define XBARA1_IN_FLEXPWM2_PWM4_OUT_TRIG0 47
  8922. #define XBARA1_IN_FLEXPWM2_PWM4_OUT_TRIG1 47
  8923. #define XBARA1_IN_FLEXPWM3_PWM1_OUT_TRIG0 48
  8924. #define XBARA1_IN_FLEXPWM3_PWM1_OUT_TRIG1 48
  8925. #define XBARA1_IN_FLEXPWM3_PWM2_OUT_TRIG0 49
  8926. #define XBARA1_IN_FLEXPWM3_PWM2_OUT_TRIG1 49
  8927. #define XBARA1_IN_FLEXPWM3_PWM3_OUT_TRIG0 50
  8928. #define XBARA1_IN_FLEXPWM3_PWM3_OUT_TRIG1 50
  8929. #define XBARA1_IN_FLEXPWM3_PWM4_OUT_TRIG0 51
  8930. #define XBARA1_IN_FLEXPWM3_PWM4_OUT_TRIG1 51
  8931. #define XBARA1_IN_FLEXPWM4_PWM1_OUT_TRIG0 52
  8932. #define XBARA1_IN_FLEXPWM4_PWM1_OUT_TRIG1 52
  8933. #define XBARA1_IN_FLEXPWM4_PWM2_OUT_TRIG0 53
  8934. #define XBARA1_IN_FLEXPWM4_PWM2_OUT_TRIG1 53
  8935. #define XBARA1_IN_FLEXPWM4_PWM3_OUT_TRIG0 54
  8936. #define XBARA1_IN_FLEXPWM4_PWM3_OUT_TRIG1 54
  8937. #define XBARA1_IN_FLEXPWM4_PWM4_OUT_TRIG0 55
  8938. #define XBARA1_IN_FLEXPWM4_PWM4_OUT_TRIG1 55
  8939. #define XBARA1_IN_PIT_TRIGGER0 56
  8940. #define XBARA1_IN_PIT_TRIGGER1 57
  8941. #define XBARA1_IN_PIT_TRIGGER2 58
  8942. #define XBARA1_IN_PIT_TRIGGER3 59
  8943. #define XBARA1_IN_ENC1_POS_MATCH 60
  8944. #define XBARA1_IN_ENC2_POS_MATCH 61
  8945. #define XBARA1_IN_ENC3_POS_MATCH 62
  8946. #define XBARA1_IN_ENC4_POS_MATCH 63
  8947. #define XBARA1_IN_DMA_DONE0 64
  8948. #define XBARA1_IN_DMA_DONE1 65
  8949. #define XBARA1_IN_DMA_DONE2 66
  8950. #define XBARA1_IN_DMA_DONE3 67
  8951. #define XBARA1_IN_DMA_DONE4 68
  8952. #define XBARA1_IN_DMA_DONE5 69
  8953. #define XBARA1_IN_DMA_DONE6 70
  8954. #define XBARA1_IN_DMA_DONE7 71
  8955. #define XBARA1_IN_AOI1_OUT0 72
  8956. #define XBARA1_IN_AOI1_OUT1 73
  8957. #define XBARA1_IN_AOI1_OUT2 74
  8958. #define XBARA1_IN_AOI1_OUT3 75
  8959. #define XBARA1_IN_AOI2_OUT0 76
  8960. #define XBARA1_IN_AOI2_OUT1 77
  8961. #define XBARA1_IN_AOI2_OUT2 78
  8962. #define XBARA1_IN_AOI2_OUT3 79
  8963. #define XBARA1_IN_ADC_ETC0_COCO0 80
  8964. #define XBARA1_IN_ADC_ETC0_COCO1 81
  8965. #define XBARA1_IN_ADC_ETC0_COCO2 82
  8966. #define XBARA1_IN_ADC_ETC0_COCO3 83
  8967. #define XBARA1_IN_ADC_ETC1_COCO0 84
  8968. #define XBARA1_IN_ADC_ETC1_COCO1 85
  8969. #define XBARA1_IN_ADC_ETC1_COCO2 86
  8970. #define XBARA1_IN_ADC_ETC1_COCO3 87
  8971. #define XBARA1_OUT_DMA_CH_MUX_REQ30 0
  8972. #define XBARA1_OUT_DMA_CH_MUX_REQ31 1
  8973. #define XBARA1_OUT_DMA_CH_MUX_REQ94 2
  8974. #define XBARA1_OUT_DMA_CH_MUX_REQ95 3
  8975. #define XBARA1_OUT_IOMUX_XBAR_INOUT04 4
  8976. #define XBARA1_OUT_IOMUX_XBAR_INOUT05 5
  8977. #define XBARA1_OUT_IOMUX_XBAR_INOUT06 6
  8978. #define XBARA1_OUT_IOMUX_XBAR_INOUT07 7
  8979. #define XBARA1_OUT_IOMUX_XBAR_INOUT08 8
  8980. #define XBARA1_OUT_IOMUX_XBAR_INOUT09 9
  8981. #define XBARA1_OUT_IOMUX_XBAR_INOUT10 10
  8982. #define XBARA1_OUT_IOMUX_XBAR_INOUT11 11
  8983. #define XBARA1_OUT_IOMUX_XBAR_INOUT12 12
  8984. #define XBARA1_OUT_IOMUX_XBAR_INOUT13 13
  8985. #define XBARA1_OUT_IOMUX_XBAR_INOUT14 14
  8986. #define XBARA1_OUT_IOMUX_XBAR_INOUT15 15
  8987. #define XBARA1_OUT_IOMUX_XBAR_INOUT16 16
  8988. #define XBARA1_OUT_IOMUX_XBAR_INOUT17 17
  8989. #define XBARA1_OUT_IOMUX_XBAR_INOUT18 18
  8990. #define XBARA1_OUT_IOMUX_XBAR_INOUT19 19
  8991. #define XBARA1_OUT_ACMP1_SAMPLE 20
  8992. #define XBARA1_OUT_ACMP2_SAMPLE 21
  8993. #define XBARA1_OUT_ACMP3_SAMPLE 22
  8994. #define XBARA1_OUT_ACMP4_SAMPLE 23
  8995. //#define XBARA1_OUT_Reserved 24
  8996. //#define XBARA1_OUT_Reserved 25
  8997. #define XBARA1_OUT_FLEXPWM1_PWM0_EXTA 26
  8998. #define XBARA1_OUT_FLEXPWM1_PWM1_EXTA 27
  8999. #define XBARA1_OUT_FLEXPWM1_PWM2_EXTA 28
  9000. #define XBARA1_OUT_FLEXPWM1_PWM3_EXTA 29
  9001. #define XBARA1_OUT_FLEXPWM1_PWM0_EXT_SYNC 30
  9002. #define XBARA1_OUT_FLEXPWM1_PWM1_EXT_SYNC 31
  9003. #define XBARA1_OUT_FLEXPWM1_PWM2_EXT_SYNC 32
  9004. #define XBARA1_OUT_FLEXPWM1_PWM3_EXT_SYNC 33
  9005. #define XBARA1_OUT_FLEXPWM1_EXT_CLK 34
  9006. #define XBARA1_OUT_FLEXPWM1_FAULT0 35
  9007. #define XBARA1_OUT_FLEXPWM1_FAULT1 36
  9008. #define XBARA1_OUT_FLEXPWM1_FAULT2 37
  9009. #define XBARA1_OUT_FLEXPWM2_FAULT2 37
  9010. #define XBARA1_OUT_FLEXPWM3_FAULT2 37
  9011. #define XBARA1_OUT_FLEXPWM4_FAULT2 37
  9012. #define XBARA1_OUT_FLEXPWM1_FAULT3 38
  9013. #define XBARA1_OUT_FLEXPWM2_FAULT3 38
  9014. #define XBARA1_OUT_FLEXPWM3_FAULT3 38
  9015. #define XBARA1_OUT_FLEXPWM4_FAULT3 38
  9016. #define XBARA1_OUT_FLEXPWM1_EXT_FORCE 39
  9017. #define XBARA1_OUT_FLEXPWM2_PWM0_EXTA 40
  9018. #define XBARA1_OUT_FLEXPWM3_PWM0_EXTA 40
  9019. #define XBARA1_OUT_FLEXPWM4_PWM0_EXTA 40
  9020. #define XBARA1_OUT_FLEXPWM2_PWM1_EXTA 41
  9021. #define XBARA1_OUT_FLEXPWM3_PWM1_EXTA 41
  9022. #define XBARA1_OUT_FLEXPWM4_PWM1_EXTA 41
  9023. #define XBARA1_OUT_FLEXPWM2_PWM2_EXTA 42
  9024. #define XBARA1_OUT_FLEXPWM3_PWM2_EXTA 42
  9025. #define XBARA1_OUT_FLEXPWM4_PWM2_EXTA 42
  9026. #define XBARA1_OUT_FLEXPWM2_PWM3_EXTA 43
  9027. #define XBARA1_OUT_FLEXPWM3_PWM3_EXTA 43
  9028. #define XBARA1_OUT_FLEXPWM4_PWM3_EXTA 43
  9029. #define XBARA1_OUT_FLEXPWM2_PWM0_EXT_SYNC 44
  9030. #define XBARA1_OUT_FLEXPWM2_PWM1_EXT_SYNC 45
  9031. #define XBARA1_OUT_FLEXPWM2_PWM2_EXT_SYNC 46
  9032. #define XBARA1_OUT_FLEXPWM2_PWM3_EXT_SYNC 47
  9033. #define XBARA1_OUT_FLEXPWM2_EXT_CLK 48
  9034. #define XBARA1_OUT_FLEXPWM3_EXT_CLK 48
  9035. #define XBARA1_OUT_FLEXPWM4_EXT_CLK 48
  9036. #define XBARA1_OUT_FLEXPWM2_FAULT0 49
  9037. #define XBARA1_OUT_FLEXPWM2_FAULT1 50
  9038. #define XBARA1_OUT_FLEXPWM2_EXT_FORCE 51
  9039. #define XBARA1_OUT_FLEXPWM3_EXT_SYNC0 52
  9040. #define XBARA1_OUT_FLEXPWM3_EXT_SYNC1 53
  9041. #define XBARA1_OUT_FLEXPWM3_EXT_SYNC2 54
  9042. #define XBARA1_OUT_FLEXPWM3_EXT_SYNC3 55
  9043. #define XBARA1_OUT_FLEXPWM3_FAULT0 56
  9044. #define XBARA1_OUT_FLEXPWM3_FAULT1 57
  9045. #define XBARA1_OUT_FLEXPWM3_EXT_FORCE 58
  9046. #define XBARA1_OUT_FLEXPWM4_EXT_SYNC0 59
  9047. #define XBARA1_OUT_FLEXPWM4_EXT_SYNC1 60
  9048. #define XBARA1_OUT_FLEXPWM4_EXT_SYNC2 61
  9049. #define XBARA1_OUT_FLEXPWM4_EXT_SYNC3 62
  9050. #define XBARA1_OUT_FLEXPWM4_FAULT0 63
  9051. #define XBARA1_OUT_FLEXPWM4_FAULT1 64
  9052. #define XBARA1_OUT_FLEXPWM4_EXT_FORCE 65
  9053. #define XBARA1_OUT_ENC1_PHASEA_INPUT 66
  9054. #define XBARA1_OUT_ENC1_PHASEB_INPUT 67
  9055. #define XBARA1_OUT_ENC1_INDEX 68
  9056. #define XBARA1_OUT_ENC1_HOME 69
  9057. #define XBARA1_OUT_ENC1_TRIGGER 70
  9058. #define XBARA1_OUT_ENC2_PHASEA_INPUT 71
  9059. #define XBARA1_OUT_ENC2_PHASEB_INPUT 72
  9060. #define XBARA1_OUT_ENC2_INDEX 73
  9061. #define XBARA1_OUT_ENC2_HOME 74
  9062. #define XBARA1_OUT_ENC2_TRIGGER 75
  9063. #define XBARA1_OUT_ENC3_PHASEA_INPUT 76
  9064. #define XBARA1_OUT_ENC3_PHASEB_INPUT 77
  9065. #define XBARA1_OUT_ENC3_INDEX 78
  9066. #define XBARA1_OUT_ENC3_HOME 79
  9067. #define XBARA1_OUT_ENC3_TRIGGER 80
  9068. #define XBARA1_OUT_ENC4_PHASEA_INPUT 81
  9069. #define XBARA1_OUT_ENC4_PHASEB_INPUT 82
  9070. #define XBARA1_OUT_ENC4_INDEX 83
  9071. #define XBARA1_OUT_ENC4_HOME 84
  9072. #define XBARA1_OUT_ENC4_TRIGGER 85
  9073. #define XBARA1_OUT_QTIMER1_TIMER0 86
  9074. #define XBARA1_OUT_QTIMER1_TIMER1 87
  9075. #define XBARA1_OUT_QTIMER1_TIMER2 88
  9076. #define XBARA1_OUT_QTIMER1_TIMER3 89
  9077. #define XBARA1_OUT_QTIMER2_TIMER0 90
  9078. #define XBARA1_OUT_QTIMER2_TIMER1 91
  9079. #define XBARA1_OUT_QTIMER2_TIMER2 92
  9080. #define XBARA1_OUT_QTIMER2_TIMER3 93
  9081. #define XBARA1_OUT_QTIMER3_TIMER0 94
  9082. #define XBARA1_OUT_QTIMER3_TIMER1 95
  9083. #define XBARA1_OUT_QTIMER3_TIMER2 96
  9084. #define XBARA1_OUT_QTIMER3_TIMER3 97
  9085. #define XBARA1_OUT_QTIMER4_TIMER0 98
  9086. #define XBARA1_OUT_QTIMER4_TIMER1 99
  9087. #define XBARA1_OUT_QTIMER4_TIMER2 100
  9088. #define XBARA1_OUT_QTIMER4_TIMER3 101
  9089. #define XBARA1_OUT_EWM_EWM_IN 102
  9090. #define XBARA1_OUT_ADC_ETC_TRIG00 103
  9091. #define XBARA1_OUT_ADC_ETC_TRIG01 104
  9092. #define XBARA1_OUT_ADC_ETC_TRIG02 105
  9093. #define XBARA1_OUT_ADC_ETC_TRIG03 106
  9094. #define XBARA1_OUT_ADC_ETC_TRIG10 107
  9095. #define XBARA1_OUT_ADC_ETC_TRIG11 108
  9096. #define XBARA1_OUT_ADC_ETC_TRIG12 109
  9097. #define XBARA1_OUT_ADC_ETC_TRIG13 110
  9098. #define XBARA1_OUT_LPI2C1_TRG_INPUT 111
  9099. #define XBARA1_OUT_LPI2C2_TRG_INPUT 112
  9100. #define XBARA1_OUT_LPI2C3_TRG_INPUT 113
  9101. #define XBARA1_OUT_LPI2C4_TRG_INPUT 114
  9102. #define XBARA1_OUT_LPSPI1_TRG_INPUT 115
  9103. #define XBARA1_OUT_LPSPI2_TRG_INPUT 116
  9104. #define XBARA1_OUT_LPSPI3_TRG_INPUT 117
  9105. #define XBARA1_OUT_LPSPI4_TRG_INPUT 118
  9106. #define XBARA1_OUT_LPUART1_TRG_INPUT 119
  9107. #define XBARA1_OUT_LPUART2_TRG_INPUT 120
  9108. #define XBARA1_OUT_LPUART3_TRG_INPUT 121
  9109. #define XBARA1_OUT_LPUART4_TRG_INPUT 122
  9110. #define XBARA1_OUT_LPUART5_TRG_INPUT 123
  9111. #define XBARA1_OUT_LPUART6_TRG_INPUT 124
  9112. #define XBARA1_OUT_LPUART7_TRG_INPUT 125
  9113. #define XBARA1_OUT_LPUART8_TRG_INPUT 126
  9114. #define XBARA1_OUT_FLEXIO1_TRIGGER_IN0 127
  9115. #define XBARA1_OUT_FLEXIO1_TRIGGER_IN1 128
  9116. #define XBARA1_OUT_FLEXIO2_TRIGGER_IN0 129
  9117. #define XBARA1_OUT_FLEXIO2_TRIGGER_IN1 130
  9118. //#define XBARA1_OUT_Reserved 131
  9119. // XBAR2 Inputs and Outputs Table 3-5 P63
  9120. #define XBARB2_IN_LOGIC_LOW 0
  9121. #define XBARB2_IN_LOGIC_HIGH 1
  9122. //#define XBARB2_IN_Reserved 2
  9123. //#define XBARB2_IN_Reserved 3
  9124. //#define XBARB2_IN_Reserved 4
  9125. //#define XBARB2_IN_Reserved 5
  9126. #define XBARB2_IN_ACMP1_OUT 6
  9127. #define XBARB2_IN_ACMP2_OUT 7
  9128. #define XBARB2_IN_ACMP3_OUT 8
  9129. #define XBARB2_IN_ACMP4_OUT 9
  9130. //#define XBARB2_IN_Reserved 10
  9131. //#define XBARB2_IN_Reserved 11
  9132. #define XBARB2_IN_QTIMER3_TIMER0 12
  9133. #define XBARB2_IN_QTIMER3_TIMER1 13
  9134. #define XBARB2_IN_QTIMER3_TIMER2 14
  9135. #define XBARB2_IN_QTIMER3_TIMER3 15
  9136. #define XBARB2_IN_QTIMER4_TIMER0 16
  9137. #define XBARB2_IN_QTIMER4_TIMER1 17
  9138. #define XBARB2_IN_QTIMER4_TIMER2 18
  9139. #define XBARB2_IN_QTIMER4_TIMER3 19
  9140. #define XBARB2_IN_FLEXPWM1_PWM1_OUT_TRIG0 20
  9141. #define XBARB2_IN_FLEXPWM1_PWM1_OUT_TRIG1 20
  9142. #define XBARB2_IN_FLEXPWM1_PWM2_OUT_TRIG0 21
  9143. #define XBARB2_IN_FLEXPWM1_PWM2_OUT_TRIG1 21
  9144. #define XBARB2_IN_FLEXPWM1_PWM3_OUT_TRIG0 22
  9145. #define XBARB2_IN_FLEXPWM1_PWM3_OUT_TRIG1 22
  9146. #define XBARB2_IN_FLEXPWM1_PWM4_OUT_TRIG0 23
  9147. #define XBARB2_IN_FLEXPWM1_PWM4_OUT_TRIG1 23
  9148. #define XBARB2_IN_FLEXPWM2_PWM1_OUT_TRIG0 24
  9149. #define XBARB2_IN_FLEXPWM2_PWM1_OUT_TRIG1 24
  9150. #define XBARB2_IN_FLEXPWM2_PWM2_OUT_TRIG0 25
  9151. #define XBARB2_IN_FLEXPWM2_PWM2_OUT_TRIG1 25
  9152. #define XBARB2_IN_FLEXPWM2_PWM3_OUT_TRIG0 26
  9153. #define XBARB2_IN_FLEXPWM2_PWM3_OUT_TRIG1 26
  9154. #define XBARB2_IN_FLEXPWM2_PWM4_OUT_TRIG0 27
  9155. #define XBARB2_IN_FLEXPWM2_PWM4_OUT_TRIG1 27
  9156. #define XBARB2_IN_FLEXPWM3_PWM1_OUT_TRIG0 28
  9157. #define XBARB2_IN_FLEXPWM3_PWM1_OUT_TRIG1 28
  9158. #define XBARB2_IN_FLEXPWM3_PWM2_OUT_TRIG0 29
  9159. #define XBARB2_IN_FLEXPWM3_PWM2_OUT_TRIG1 29
  9160. #define XBARB2_IN_FLEXPWM3_PWM3_OUT_TRIG0 30
  9161. #define XBARB2_IN_FLEXPWM3_PWM3_OUT_TRIG1 30
  9162. #define XBARB2_IN_FLEXPWM3_PWM4_OUT_TRIG0 31
  9163. #define XBARB2_IN_FLEXPWM3_PWM4_OUT_TRIG1 31
  9164. #define XBARB2_IN_FLEXPWM4_PWM1_OUT_TRIG0 32
  9165. #define XBARB2_IN_FLEXPWM4_PWM1_OUT_TRIG1 32
  9166. #define XBARB2_IN_FLEXPWM4_PWM2_OUT_TRIG0 33
  9167. #define XBARB2_IN_FLEXPWM4_PWM2_OUT_TRIG1 33
  9168. #define XBARB2_IN_FLEXPWM4_PWM3_OUT_TRIG0 34
  9169. #define XBARB2_IN_FLEXPWM4_PWM3_OUT_TRIG1 34
  9170. #define XBARB2_IN_FLEXPWM4_PWM4_OUT_TRIG0 35
  9171. #define XBARB2_IN_FLEXPWM4_PWM4_OUT_TRIG1 35
  9172. #define XBARB2_IN_PIT_TRIGGER0 36
  9173. #define XBARB2_IN_PIT_TRIGGER1 37
  9174. #define XBARB2_IN_ADC_ETC0_COCO0 38
  9175. #define XBARB2_IN_ADC_ETC0_COCO1 39
  9176. #define XBARB2_IN_ADC_ETC0_COCO2 40
  9177. #define XBARB2_IN_ADC_ETC0_COCO3 41
  9178. #define XBARB2_IN_ADC_ETC1_COCO0 42
  9179. #define XBARB2_IN_ADC_ETC1_COCO1 43
  9180. #define XBARB2_IN_ADC_ETC1_COCO2 44
  9181. #define XBARB2_IN_ADC_ETC1_COCO3 45
  9182. #define XBARB2_IN_ENC1_POS_MATCH 46
  9183. #define XBARB2_IN_ENC2_POS_MATCH 47
  9184. #define XBARB2_IN_ENC3_POS_MATCH 48
  9185. #define XBARB2_IN_ENC4_POS_MATCH 49
  9186. #define XBARB2_IN_DMA_DONE0 50
  9187. #define XBARB2_IN_DMA_DONE1 51
  9188. #define XBARB2_IN_DMA_DONE2 52
  9189. #define XBARB2_IN_DMA_DONE3 53
  9190. #define XBARB2_IN_DMA_DONE4 54
  9191. #define XBARB2_IN_DMA_DONE5 55
  9192. #define XBARB2_IN_DMA_DONE6 56
  9193. #define XBARB2_IN_DMA_DONE7 57
  9194. #define XBARB2_OUT_AOI1_IN00 0
  9195. #define XBARB2_OUT_AOI1_IN01 1
  9196. #define XBARB2_OUT_AOI1_IN02 2
  9197. #define XBARB2_OUT_AOI1_IN03 3
  9198. #define XBARB2_OUT_AOI1_IN04 4
  9199. #define XBARB2_OUT_AOI1_IN05 5
  9200. #define XBARB2_OUT_AOI1_IN06 6
  9201. #define XBARB2_OUT_AOI1_IN07 7
  9202. #define XBARB2_OUT_AOI1_IN08 8
  9203. #define XBARB2_OUT_AOI1_IN09 9
  9204. #define XBARB2_OUT_AOI1_IN10 10
  9205. #define XBARB2_OUT_AOI1_IN11 11
  9206. #define XBARB2_OUT_AOI1_IN12 12
  9207. #define XBARB2_OUT_AOI1_IN13 13
  9208. #define XBARB2_OUT_AOI1_IN14 14
  9209. // XBAR3 Inputs and Outputs Table 3-6 Page 63
  9210. #define XBARB3_IN_LOGIC_LOW 0
  9211. #define XBARB3_IN_LOGIC_HIGH 1
  9212. //#define XBARB3_IN_Reserved 2
  9213. //#define XBARB3_IN_Reserved 3
  9214. //#define XBARB3_IN_Reserved 4
  9215. //#define XBARB3_IN_Reserved 5
  9216. #define XBARB3_IN_ACMP1_OUT 6
  9217. #define XBARB3_IN_ACMP2_OUT 7
  9218. #define XBARB3_IN_ACMP3_OUT 8
  9219. #define XBARB3_IN_ACMP4_OUT 9
  9220. //#define XBARB3_IN_Reserved 10
  9221. //#define XBARB3_IN_Reserved 11
  9222. #define XBARB3_IN_QTIMER3_TIMER0 12
  9223. #define XBARB3_IN_QTIMER3_TIMER1 13
  9224. #define XBARB3_IN_QTIMER3_TIMER2 14
  9225. #define XBARB3_IN_QTIMER3_TIMER3 15
  9226. #define XBARB3_IN_QTIMER4_TIMER0 16
  9227. #define XBARB3_IN_QTIMER4_TIMER1 17
  9228. #define XBARB3_IN_QTIMER4_TIMER2 18
  9229. #define XBARB3_IN_QTIMER4_TIMER3 19
  9230. #define XBARB3_IN_FLEXPWM1_PWM1_OUT_TRIG0 20
  9231. #define XBARB3_IN_FLEXPWM1_PWM2_OUT_TRIG0 21
  9232. #define XBARB3_IN_FLEXPWM1_PWM3_OUT_TRIG0 22
  9233. #define XBARB3_IN_FLEXPWM1_PWM4_OUT_TRIG0 23
  9234. #define XBARB3_IN_FLEXPWM2_PWM1_OUT_TRIG0 24
  9235. #define XBARB3_IN_FLEXPWM2_PWM2_OUT_TRIG0 25
  9236. #define XBARB3_IN_FLEXPWM2_PWM3_OUT_TRIG0 26
  9237. #define XBARB3_IN_FLEXPWM2_PWM4_OUT_TRIG0 27
  9238. #define XBARB3_IN_FLEXPWM3_PWM1_OUT_TRIG0 28
  9239. #define XBARB3_IN_FLEXPWM3_PWM2_OUT_TRIG0 29
  9240. #define XBARB3_IN_FLEXPWM3_PWM3_OUT_TRIG0 30
  9241. #define XBARB3_IN_FLEXPWM3_PWM4_OUT_TRIG0 31
  9242. #define XBARB3_IN_FLEXPWM4_PWM1_OUT_TRIG0 32
  9243. #define XBARB3_IN_FLEXPWM4_PWM2_OUT_TRIG0 33
  9244. #define XBARB3_IN_FLEXPWM4_PWM3_OUT_TRIG0 34
  9245. #define XBARB3_IN_FLEXPWM4_PWM4_OUT_TRIG0 35
  9246. #define XBARB3_IN_PIT_TRIGGER0 36
  9247. #define XBARB3_IN_PIT_TRIGGER1 37
  9248. #define XBARB3_IN_ADC_ETC0_COCO0 38
  9249. #define XBARB3_IN_ADC_ETC0_COCO1 39
  9250. #define XBARB3_IN_ADC_ETC0_COCO2 40
  9251. #define XBARB3_IN_ADC_ETC0_COCO3 41
  9252. #define XBARB3_IN_ADC_ETC1_COCO0 42
  9253. #define XBARB3_IN_ADC_ETC1_COCO1 43
  9254. #define XBARB3_IN_ADC_ETC1_COCO2 44
  9255. #define XBARB3_IN_ADC_ETC1_COCO3 45
  9256. #define XBARB3_IN_ENC1_POS_MATCH 46
  9257. #define XBARB3_IN_ENC2_POS_MATCH 47
  9258. #define XBARB3_IN_ENC3_POS_MATCH 48
  9259. #define XBARB3_IN_ENC4_POS_MATCH 49
  9260. #define XBARB3_IN_DMA_DONE0 50
  9261. #define XBARB3_IN_DMA_DONE1 51
  9262. #define XBARB3_IN_DMA_DONE2 52
  9263. #define XBARB3_IN_DMA_DONE3 53
  9264. #define XBARB3_IN_DMA_DONE4 54
  9265. #define XBARB3_IN_DMA_DONE5 55
  9266. #define XBARB3_IN_DMA_DONE6 56
  9267. #define XBARB3_IN_DMA_DONE7 57
  9268. #define XBARB3_OUT_AOI2_IN00 0
  9269. #define XBARB3_OUT_AOI2_IN01 1
  9270. #define XBARB3_OUT_AOI2_IN02 2
  9271. #define XBARB3_OUT_AOI2_IN03 3
  9272. #define XBARB3_OUT_AOI2_IN04 4
  9273. #define XBARB3_OUT_AOI2_IN05 5
  9274. #define XBARB3_OUT_AOI2_IN06 6
  9275. #define XBARB3_OUT_AOI2_IN07 7
  9276. #define XBARB3_OUT_AOI2_IN08 8
  9277. #define XBARB3_OUT_AOI2_IN09 9
  9278. #define XBARB3_OUT_AOI2_IN10 10
  9279. #define XBARB3_OUT_AOI2_IN11 11
  9280. #define XBARB3_OUT_AOI2_IN12 12
  9281. #define XBARB3_OUT_AOI2_IN13 13
  9282. #define XBARB3_OUT_AOI2_IN14 14
  9283. #define XBARB3_OUT_AOI2_IN15 15
  9284. // 15.6: page 1142
  9285. #define IMXRT_XTALOSC24M (*(IMXRT_REGISTER32_t *)IMXRT_XTALOSC24M_ADDRESS)
  9286. #define XTALOSC24M_MISC0 (IMXRT_XTALOSC24M.offset150)
  9287. #define XTALOSC24M_LOWPWR_CTRL (IMXRT_XTALOSC24M.offset270)
  9288. #define XTALOSC24M_LOWPWR_CTRL_SET (IMXRT_XTALOSC24M.offset274)
  9289. #define XTALOSC24M_LOWPWR_CTRL_CLR (IMXRT_XTALOSC24M.offset278)
  9290. #define XTALOSC24M_LOWPWR_CTRL_TOG (IMXRT_XTALOSC24M.offset27C)
  9291. #define XTALOSC24M_OSC_CONFIG0 (IMXRT_XTALOSC24M.offset2A0)
  9292. #define XTALOSC24M_OSC_CONFIG0_SET (IMXRT_XTALOSC24M.offset2A4)
  9293. #define XTALOSC24M_OSC_CONFIG0_CLR (IMXRT_XTALOSC24M.offset2A8)
  9294. #define XTALOSC24M_OSC_CONFIG0_TOG (IMXRT_XTALOSC24M.offset2AC)
  9295. #define XTALOSC24M_OSC_CONFIG1 (IMXRT_XTALOSC24M.offset2B0)
  9296. #define XTALOSC24M_OSC_CONFIG1_SET (IMXRT_XTALOSC24M.offset2B4)
  9297. #define XTALOSC24M_OSC_CONFIG1_CLR (IMXRT_XTALOSC24M.offset2B8)
  9298. #define XTALOSC24M_OSC_CONFIG1_TOG (IMXRT_XTALOSC24M.offset2BC)
  9299. #define XTALOSC24M_OSC_CONFIG2 (IMXRT_XTALOSC24M.offset2C0)
  9300. #define XTALOSC24M_OSC_CONFIG2_SET (IMXRT_XTALOSC24M.offset2C4)
  9301. #define XTALOSC24M_OSC_CONFIG2_CLR (IMXRT_XTALOSC24M.offset2C8)
  9302. #define XTALOSC24M_OSC_CONFIG2_TOG (IMXRT_XTALOSC24M.offset2CC)
  9303. // 0 = highest priority
  9304. // Cortex-M7: 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224,240
  9305. #define NVIC_SET_PRIORITY(irqnum, priority) (*((volatile uint8_t *)0xE000E400 + (irqnum)) = (uint8_t)(priority))
  9306. #define NVIC_GET_PRIORITY(irqnum) (*((uint8_t *)0xE000E400 + (irqnum)))
  9307. #define __disable_irq() __asm__ volatile("CPSID i":::"memory");
  9308. #define __enable_irq() __asm__ volatile("CPSIE i":::"memory");
  9309. // System Control Space (SCS), ARMv7 ref manual, B3.2, page 708
  9310. #define SCB_CPUID (*(const uint32_t *)0xE000ED00) // CPUID Base Register
  9311. #define SCB_ICSR (*(volatile uint32_t *)0xE000ED04) // Interrupt Control and State
  9312. #define SCB_ICSR_NMIPENDSET ((uint32_t)(1<<31))
  9313. #define SCB_ICSR_PENDSVSET ((uint32_t)(1<<28))
  9314. #define SCB_ICSR_PENDSVCLR ((uint32_t)(1<<27))
  9315. #define SCB_ICSR_PENDSTSET ((uint32_t)(1<<26))
  9316. #define SCB_ICSR_PENDSTCLR ((uint32_t)(1<<25))
  9317. #define SCB_ICSR_ISRPREEMPT ((uint32_t)(1<<23))
  9318. #define SCB_ICSR_ISRPENDING ((uint32_t)(1<<22))
  9319. #define SCB_ICSR_RETTOBASE ((uint32_t)(1<<11))
  9320. #define SCB_VTOR (*(volatile uint32_t *)0xE000ED08) // Vector Table Offset
  9321. #define SCB_AIRCR (*(volatile uint32_t *)0xE000ED0C) // Application Interrupt & Reset
  9322. #define SCB_SCR (*(volatile uint32_t *)0xE000ED10) // System Control Register
  9323. #define SCB_SCR_SEVONPEND ((uint8_t)0x10) // Send Event on Pending bit
  9324. #define SCB_SCR_SLEEPDEEP ((uint8_t)0x04) // Sleep or Deep Sleep
  9325. #define SCB_SCR_SLEEPONEXIT ((uint8_t)0x02) // Sleep-on-exit
  9326. #define SCB_CCR (*(volatile uint32_t *)0xE000ED14) // Configuration and Control
  9327. #define SCB_CCR_BP ((uint32_t)(1<<18)) // Branch prediction enable
  9328. #define SCB_CCR_IC ((uint32_t)(1<<17)) // Instruction caches enable
  9329. #define SCB_CCR_DC ((uint32_t)(1<<16))
  9330. #define SCB_CCR_STKALIGN ((uint32_t)(1<<9))
  9331. #define SCB_CCR_BFHFNMIGN ((uint32_t)(1<<8))
  9332. #define SCB_CCR_DIV_0_TRP ((uint32_t)(1<<4))
  9333. #define SCB_CCR_UNALIGN_TRP ((uint32_t)(1<<3))
  9334. #define SCB_CCR_USERSETMPEND ((uint32_t)(1<<1))
  9335. #define SCB_CCR_NONBASETHRDENA ((uint32_t)(1<<0))
  9336. #define SCB_SHPR1 (*(volatile uint32_t *)0xE000ED18) // System Handler Priority 1
  9337. #define SCB_SHPR2 (*(volatile uint32_t *)0xE000ED1C) // System Handler Priority 2
  9338. #define SCB_SHPR3 (*(volatile uint32_t *)0xE000ED20) // System Handler Priority 3
  9339. #define SCB_SHCSR (*(volatile uint32_t *)0xE000ED24) // System Handler Control & State
  9340. #define SCB_CFSR (*(volatile uint32_t *)0xE000ED28) // Configurable Fault Status
  9341. #define SCB_HFSR (*(volatile uint32_t *)0xE000ED2C) // HardFault Status
  9342. #define SCB_DFSR (*(volatile uint32_t *)0xE000ED30) // Debug Fault Status
  9343. #define SCB_MMFAR (*(volatile uint32_t *)0xE000ED34) // MemManage Fault Address
  9344. #define SCB_BFAR (*(volatile uint32_t *)0xE000ED38) // Bus Fault Address
  9345. #define SCB_AFAR (*(volatile uint32_t *)0xE000ED3C) // Aux Fault Address
  9346. #define SCB_ID_PFR0 (*(const uint32_t *)0xE000ED40) // Processor Feature 0
  9347. #define SCB_ID_PFR1 (*(const uint32_t *)0xE000ED44) // Processor Feature 1
  9348. #define SCB_ID_DFR0 (*(const uint32_t *)0xE000ED48) // Debug Feature 0
  9349. #define SCB_ID_AFR0 (*(const uint32_t *)0xE000ED4C) // Auxiliary Feature 0
  9350. #define SCB_ID_MMFR0 (*(const uint32_t *)0xE000ED50) // Memory Model Feature 0
  9351. #define SCB_ID_MMFR1 (*(const uint32_t *)0xE000ED54) // Memory Model Feature 1
  9352. #define SCB_ID_MMFR2 (*(const uint32_t *)0xE000ED58) // Memory Model Feature 2
  9353. #define SCB_ID_MMFR3 (*(const uint32_t *)0xE000ED5C) // Memory Model Feature 3
  9354. #define SCB_ID_ISAR0 (*(const uint32_t *)0xE000ED60) // Instruction Set Attribute 0
  9355. #define SCB_ID_ISAR1 (*(const uint32_t *)0xE000ED64) // Instruction Set Attribute 1
  9356. #define SCB_ID_ISAR2 (*(const uint32_t *)0xE000ED68) // Instruction Set Attribute 2
  9357. #define SCB_ID_ISAR3 (*(const uint32_t *)0xE000ED6C) // Instruction Set Attribute 3
  9358. #define SCB_ID_ISAR4 (*(const uint32_t *)0xE000ED70) // Instruction Set Attribute 4
  9359. #define SCB_ID_CLIDR (*(const uint32_t *)0xE000ED78) // Cache Level ID
  9360. #define SCB_ID_CTR (*(const uint32_t *)0xE000ED7C) // Cache Type
  9361. #define SCB_ID_CCSIDR (*(const uint32_t *)0xE000ED80) // Cache Size ID
  9362. #define SCB_ID_CSSELR (*(volatile uint32_t *)0xE000ED84) // Cache Size Selection
  9363. #define SCB_CPACR (*(volatile uint32_t *)0xE000ED88) // Coprocessor Access Control
  9364. #define SCB_FPCCR (*(volatile uint32_t *)0xE000EF34) // FP Context Control
  9365. #define SCB_FPCAR (*(volatile uint32_t *)0xE000EF38) // FP Context Address
  9366. #define SCB_FPDSCR (*(volatile uint32_t *)0xE000EF3C) // FP Default Status Control
  9367. #define SCB_MVFR0 (*(volatile uint32_t *)0xE000EF40) // Media & FP Feature 0
  9368. #define SCB_MVFR1 (*(volatile uint32_t *)0xE000EF44) // Media & FP Feature 1
  9369. #define SCB_MVFR2 (*(volatile uint32_t *)0xE000EF48) // Media & FP Feature 2
  9370. #define SYST_CSR (*(volatile uint32_t *)0xE000E010) // SysTick Control and Status
  9371. #define SYST_CSR_COUNTFLAG ((uint32_t)(1<<16))
  9372. #define SYST_CSR_CLKSOURCE ((uint32_t)(1<<2))
  9373. #define SYST_CSR_TICKINT ((uint32_t)(1<<1))
  9374. #define SYST_CSR_ENABLE ((uint32_t)(1<<0))
  9375. #define SYST_RVR (*(volatile uint32_t *)0xE000E014) // SysTick Reload Value Register
  9376. #define SYST_CVR (*(volatile uint32_t *)0xE000E018) // SysTick Current Value Register
  9377. #define SYST_CALIB (*(const uint32_t *)0xE000E01C) // SysTick Calibration Value
  9378. // Nested Vectored Interrupt Controller, Table 3-4 & ARMv7 ref, appendix B3.4 (page 750)
  9379. #define NVIC_ISER0 (*(volatile uint32_t *)0xE000E100)
  9380. #define NVIC_ISER1 (*(volatile uint32_t *)0xE000E104)
  9381. #define NVIC_ISER2 (*(volatile uint32_t *)0xE000E108)
  9382. #define NVIC_ISER3 (*(volatile uint32_t *)0xE000E10C)
  9383. #define NVIC_ISER4 (*(volatile uint32_t *)0xE000E110)
  9384. #define NVIC_ICER0 (*(volatile uint32_t *)0xE000E180)
  9385. #define NVIC_ICER1 (*(volatile uint32_t *)0xE000E184)
  9386. #define NVIC_ICER2 (*(volatile uint32_t *)0xE000E188)
  9387. #define NVIC_ICER3 (*(volatile uint32_t *)0xE000E18C)
  9388. #define NVIC_ICER4 (*(volatile uint32_t *)0xE000E190)
  9389. #define NVIC_STIR (*(volatile uint32_t *)0xE000EF00)
  9390. #define NVIC_ENABLE_IRQ(n) (*(&NVIC_ISER0 + ((n) >> 5)) = (1 << ((n) & 31)))
  9391. #define NVIC_DISABLE_IRQ(n) (*(&NVIC_ICER0 + ((n) >> 5)) = (1 << ((n) & 31)))
  9392. #define NVIC_SET_PENDING(n) (*((volatile uint32_t *)0xE000E200 + ((n) >> 5)) = (1 << ((n) & 31)))
  9393. #define NVIC_CLEAR_PENDING(n) (*((volatile uint32_t *)0xE000E280 + ((n) >> 5)) = (1 << ((n) & 31)))
  9394. #define NVIC_IS_ENABLED(n) (*(&NVIC_ISER0 + ((n) >> 5)) & (1 << ((n) & 31)))
  9395. #define NVIC_IS_PENDING(n) (*((volatile uint32_t *)0xE000E200 + ((n) >> 5)) & (1 << ((n) & 31)))
  9396. #define NVIC_IS_ACTIVE(n) (*((volatile uint32_t *)0xE000E300 + ((n) >> 5)) & (1 << ((n) & 31)))
  9397. #define NVIC_TRIGGER_IRQ(n) NVIC_STIR=(n)
  9398. #define ARM_DEMCR (*(volatile uint32_t *)0xE000EDFC) // Debug Exception and Monitor Control
  9399. #define ARM_DEMCR_TRCENA (1 << 24) // Enable debugging & monitoring blocks
  9400. #define ARM_DWT_CTRL (*(volatile uint32_t *)0xE0001000) // DWT control register
  9401. #define ARM_DWT_CTRL_CYCCNTENA (1 << 0) // Enable cycle count
  9402. #define ARM_DWT_CYCCNT (*(volatile uint32_t *)0xE0001004) // Cycle count register
  9403. #define SCB_MPU_TYPE (*(volatile uint32_t *)0xE000ED90) //
  9404. #define SCB_MPU_CTRL (*(volatile uint32_t *)0xE000ED94) //
  9405. #define SCB_MPU_CTRL_PRIVDEFENA ((uint32_t)(1<<2)) // Enables default memory map
  9406. #define SCB_MPU_CTRL_HFNMIENA ((uint32_t)(1<<1)) // Use MPU for HardFault & NMI
  9407. #define SCB_MPU_CTRL_ENABLE ((uint32_t)(1<<0)) // Enables MPU
  9408. #define SCB_MPU_RNR (*(volatile uint32_t *)0xE000ED98) //
  9409. #define SCB_MPU_RBAR (*(volatile uint32_t *)0xE000ED9C) //
  9410. #define SCB_MPU_RBAR_ADDR_MASK ((uint32_t)(0xFFFFFFE0))
  9411. #define SCB_MPU_RBAR_VALID ((uint32_t)(1<<4))
  9412. #define SCB_MPU_RBAR_REGION(n) ((uint32_t)((n) & 15))
  9413. #define SCB_MPU_RASR (*(volatile uint32_t *)0xE000EDA0) // ARM DDI0403E, pg 696
  9414. #define SCB_MPU_RASR_XN ((uint32_t)(1<<28))
  9415. #define SCB_MPU_RASR_AP(n) ((uint32_t)(((n) & 7) << 24))
  9416. #define SCB_MPU_RASR_TEX(n) ((uint32_t)(((n) & 7) << 19))
  9417. #define SCB_MPU_RASR_S ((uint32_t)(1<<18))
  9418. #define SCB_MPU_RASR_C ((uint32_t)(1<<17))
  9419. #define SCB_MPU_RASR_B ((uint32_t)(1<<16))
  9420. #define SCB_MPU_RASR_SRD(n) ((uint32_t)(((n) & 255) << 8))
  9421. #define SCB_MPU_RASR_SIZE(n) ((uint32_t)(((n) & 31) << 1))
  9422. #define SCB_MPU_RASR_ENABLE ((uint32_t)(1<<0))
  9423. #define SCB_MPU_RBAR_A1 (*(volatile uint32_t *)0xE000EDA4) //
  9424. #define SCB_MPU_RASR_A1 (*(volatile uint32_t *)0xE000EDA8) //
  9425. #define SCB_MPU_RBAR_A2 (*(volatile uint32_t *)0xE000EDAC) //
  9426. #define SCB_MPU_RASR_A2 (*(volatile uint32_t *)0xE000EDB0) //
  9427. #define SCB_MPU_RBAR_A3 (*(volatile uint32_t *)0xE000EDB4) //
  9428. #define SCB_MPU_RASR_A3 (*(volatile uint32_t *)0xE000EDB8) //
  9429. #define SCB_CACHE_ICIALLU (*(volatile uint32_t *)0xE000EF50)
  9430. #define SCB_CACHE_ICIMVAU (*(volatile uint32_t *)0xE000EF58)
  9431. #define SCB_CACHE_DCIMVAC (*(volatile uint32_t *)0xE000EF5C)
  9432. #define SCB_CACHE_DCISW (*(volatile uint32_t *)0xE000EF60)
  9433. #define SCB_CACHE_DCCMVAU (*(volatile uint32_t *)0xE000EF64)
  9434. #define SCB_CACHE_DCCMVAC (*(volatile uint32_t *)0xE000EF68)
  9435. #define SCB_CACHE_DCCSW (*(volatile uint32_t *)0xE000EF6C)
  9436. #define SCB_CACHE_DCCIMVAC (*(volatile uint32_t *)0xE000EF70)
  9437. #define SCB_CACHE_DCCISW (*(volatile uint32_t *)0xE000EF74)
  9438. #define SCB_CACHE_BPIALL (*(volatile uint32_t *)0xE000EF78)
  9439. // Flush data from cache to memory
  9440. //
  9441. // Normally arm_dcache_flush() is used when metadata written to memory
  9442. // will be used by a DMA or a bus-master peripheral. Any data in the
  9443. // cache is written to memory. A copy remains in the cache, so this is
  9444. // typically used with special fields you will want to quickly access
  9445. // in the future. For data transmission, use arm_dcache_flush_delete().
  9446. __attribute__((always_inline, unused))
  9447. static inline void arm_dcache_flush(void *addr, uint32_t size)
  9448. {
  9449. uint32_t location = (uint32_t)addr & 0xFFFFFFE0;
  9450. uint32_t end_addr = (uint32_t)addr + size;
  9451. asm volatile("": : :"memory");
  9452. asm("dsb");
  9453. do {
  9454. SCB_CACHE_DCCMVAC = location;
  9455. location += 32;
  9456. } while (location < end_addr);
  9457. asm("dsb");
  9458. asm("isb");
  9459. }
  9460. // Delete data from the cache, without touching memory
  9461. //
  9462. // Normally arm_dcache_delete() is used before receiving data via
  9463. // DMA or from bus-master peripherals which write to memory. You
  9464. // want to delete anything the cache may have stored, so your next
  9465. // read is certain to access the physical memory.
  9466. __attribute__((always_inline, unused))
  9467. static inline void arm_dcache_delete(void *addr, uint32_t size)
  9468. {
  9469. uint32_t location = (uint32_t)addr & 0xFFFFFFE0;
  9470. uint32_t end_addr = (uint32_t)addr + size;
  9471. asm volatile("": : :"memory");
  9472. asm("dsb");
  9473. do {
  9474. SCB_CACHE_DCIMVAC = location;
  9475. location += 32;
  9476. } while (location < end_addr);
  9477. asm("dsb");
  9478. asm("isb");
  9479. }
  9480. // Flush data from cache to memory, and delete it from the cache
  9481. //
  9482. // Normally arm_dcache_flush_delete() is used when transmitting data
  9483. // via DMA or bus-master peripherals which read from memory. You want
  9484. // any cached data written to memory, and then removed from the cache,
  9485. // because you no longer need to access the data after transmission.
  9486. __attribute__((always_inline, unused))
  9487. static inline void arm_dcache_flush_delete(void *addr, uint32_t size)
  9488. {
  9489. uint32_t location = (uint32_t)addr & 0xFFFFFFE0;
  9490. uint32_t end_addr = (uint32_t)addr + size;
  9491. asm volatile("": : :"memory");
  9492. asm("dsb");
  9493. do {
  9494. SCB_CACHE_DCCIMVAC = location;
  9495. location += 32;
  9496. } while (location < end_addr);
  9497. asm("dsb");
  9498. asm("isb");
  9499. }