MK24F12.h 754 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819
  1. /*
  2. ** ###################################################################
  3. ** Processors: MK24FN1M0CAJ12
  4. ** MK24FN1M0VDC12
  5. ** MK24FN1M0VLL12
  6. ** MK24FN1M0VLQ12
  7. **
  8. ** Compilers: Keil ARM C/C++ Compiler
  9. ** Freescale C/C++ for Embedded ARM
  10. ** GNU C Compiler
  11. ** IAR ANSI C/C++ Compiler for ARM
  12. ** MCUXpresso Compiler
  13. **
  14. ** Reference manual: K24P144M120SF5RM, Rev.2, January 2014
  15. ** Version: rev. 2.8, 2016-03-21
  16. ** Build: b170811
  17. **
  18. ** Abstract:
  19. ** CMSIS Peripheral Access Layer for MK24F12
  20. **
  21. ** Copyright 1997-2016 Freescale Semiconductor, Inc.
  22. ** Copyright 2016-2017 NXP
  23. ** Redistribution and use in source and binary forms, with or without modification,
  24. ** are permitted provided that the following conditions are met:
  25. **
  26. ** 1. Redistributions of source code must retain the above copyright notice, this list
  27. ** of conditions and the following disclaimer.
  28. **
  29. ** 2. Redistributions in binary form must reproduce the above copyright notice, this
  30. ** list of conditions and the following disclaimer in the documentation and/or
  31. ** other materials provided with the distribution.
  32. **
  33. ** 3. Neither the name of the copyright holder nor the names of its
  34. ** contributors may be used to endorse or promote products derived from this
  35. ** software without specific prior written permission.
  36. **
  37. ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  38. ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  39. ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  40. ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  41. ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  42. ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  43. ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  44. ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  45. ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  46. ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  47. **
  48. ** http: www.nxp.com
  49. ** mail: support@nxp.com
  50. **
  51. ** Revisions:
  52. ** - rev. 1.0 (2013-08-12)
  53. ** Initial version.
  54. ** - rev. 2.0 (2013-10-29)
  55. ** Register accessor macros added to the memory map.
  56. ** Symbols for Processor Expert memory map compatibility added to the memory map.
  57. ** Startup file for gcc has been updated according to CMSIS 3.2.
  58. ** System initialization updated.
  59. ** MCG - registers updated.
  60. ** PORTA, PORTB, PORTC, PORTE - registers for digital filter removed.
  61. ** - rev. 2.1 (2013-10-30)
  62. ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled.
  63. ** - rev. 2.2 (2013-12-09)
  64. ** DMA - EARS register removed.
  65. ** AIPS0, AIPS1 - MPRA register updated.
  66. ** - rev. 2.3 (2014-01-24)
  67. ** Update according to reference manual rev. 2
  68. ** ENET, MCG, MCM, SIM, USB - registers updated
  69. ** - rev. 2.4 (2014-02-10)
  70. ** The declaration of clock configurations has been moved to separate header file system_MK24F12.h
  71. ** Update of SystemInit() and SystemCoreClockUpdate() functions.
  72. ** Module access macro module_BASES replaced by module_BASE_PTRS.
  73. ** - rev. 2.5 (2014-08-28)
  74. ** Update of system files - default clock configuration changed.
  75. ** Update of startup files - possibility to override DefaultISR added.
  76. ** - rev. 2.6 (2014-10-14)
  77. ** Interrupt INT_LPTimer renamed to INT_LPTMR0, interrupt INT_Watchdog renamed to INT_WDOG_EWM.
  78. ** - rev. 2.7 (2015-02-19)
  79. ** Renamed interrupt vector LLW to LLWU.
  80. ** - rev. 2.8 (2016-03-21)
  81. ** Added MK24FN1M0CAJ12 part.
  82. ** GPIO - renamed port instances: PTx -> GPIOx.
  83. **
  84. ** ###################################################################
  85. */
  86. /*!
  87. * @file MK24F12.h
  88. * @version 2.8
  89. * @date 2016-03-21
  90. * @brief CMSIS Peripheral Access Layer for MK24F12
  91. *
  92. * CMSIS Peripheral Access Layer for MK24F12
  93. */
  94. #ifndef _MK24F12_H_
  95. #define _MK24F12_H_ /**< Symbol preventing repeated inclusion */
  96. /** Memory map major version (memory maps with equal major version number are
  97. * compatible) */
  98. #define MCU_MEM_MAP_VERSION 0x0200U
  99. /** Memory map minor version */
  100. #define MCU_MEM_MAP_VERSION_MINOR 0x0008U
  101. /**
  102. * @brief Macro to calculate address of an aliased word in the peripheral
  103. * bitband area for a peripheral register and bit (bit band region 0x40000000 to
  104. * 0x400FFFFF).
  105. * @param Reg Register to access.
  106. * @param Bit Bit number to access.
  107. * @return Address of the aliased word in the peripheral bitband area.
  108. */
  109. #define BITBAND_REGADDR(Reg,Bit) (0x42000000u + (32u*((uint32_t)&(Reg) - (uint32_t)0x40000000u)) + (4u*((uint32_t)(Bit))))
  110. /**
  111. * @brief Macro to access a single bit of a peripheral register (bit band region
  112. * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  113. * be used for peripherals with 32bit access allowed.
  114. * @param Reg Register to access.
  115. * @param Bit Bit number to access.
  116. * @return Value of the targeted bit in the bit band region.
  117. */
  118. #define BITBAND_REG32(Reg,Bit) (*((uint32_t volatile*)(BITBAND_REGADDR((Reg),(Bit)))))
  119. #define BITBAND_REG(Reg,Bit) (BITBAND_REG32((Reg),(Bit)))
  120. /**
  121. * @brief Macro to access a single bit of a peripheral register (bit band region
  122. * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  123. * be used for peripherals with 16bit access allowed.
  124. * @param Reg Register to access.
  125. * @param Bit Bit number to access.
  126. * @return Value of the targeted bit in the bit band region.
  127. */
  128. #define BITBAND_REG16(Reg,Bit) (*((uint16_t volatile*)(BITBAND_REGADDR((Reg),(Bit)))))
  129. /**
  130. * @brief Macro to access a single bit of a peripheral register (bit band region
  131. * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can
  132. * be used for peripherals with 8bit access allowed.
  133. * @param Reg Register to access.
  134. * @param Bit Bit number to access.
  135. * @return Value of the targeted bit in the bit band region.
  136. */
  137. #define BITBAND_REG8(Reg,Bit) (*((uint8_t volatile*)(BITBAND_REGADDR((Reg),(Bit)))))
  138. /* ----------------------------------------------------------------------------
  139. -- Interrupt vector numbers
  140. ---------------------------------------------------------------------------- */
  141. /*!
  142. * @addtogroup Interrupt_vector_numbers Interrupt vector numbers
  143. * @{
  144. */
  145. /** Interrupt Number Definitions */
  146. #define NUMBER_OF_INT_VECTORS 102 /**< Number of interrupts in the Vector table */
  147. typedef enum IRQn {
  148. /* Auxiliary constants */
  149. NotAvail_IRQn = -128, /**< Not available device specific interrupt */
  150. /* Core interrupts */
  151. NonMaskableInt_IRQn = -14, /**< Non Maskable Interrupt */
  152. HardFault_IRQn = -13, /**< Cortex-M4 SV Hard Fault Interrupt */
  153. MemoryManagement_IRQn = -12, /**< Cortex-M4 Memory Management Interrupt */
  154. BusFault_IRQn = -11, /**< Cortex-M4 Bus Fault Interrupt */
  155. UsageFault_IRQn = -10, /**< Cortex-M4 Usage Fault Interrupt */
  156. SVCall_IRQn = -5, /**< Cortex-M4 SV Call Interrupt */
  157. DebugMonitor_IRQn = -4, /**< Cortex-M4 Debug Monitor Interrupt */
  158. PendSV_IRQn = -2, /**< Cortex-M4 Pend SV Interrupt */
  159. SysTick_IRQn = -1, /**< Cortex-M4 System Tick Interrupt */
  160. /* Device specific interrupts */
  161. DMA0_IRQn = 0, /**< DMA Channel 0 Transfer Complete */
  162. DMA1_IRQn = 1, /**< DMA Channel 1 Transfer Complete */
  163. DMA2_IRQn = 2, /**< DMA Channel 2 Transfer Complete */
  164. DMA3_IRQn = 3, /**< DMA Channel 3 Transfer Complete */
  165. DMA4_IRQn = 4, /**< DMA Channel 4 Transfer Complete */
  166. DMA5_IRQn = 5, /**< DMA Channel 5 Transfer Complete */
  167. DMA6_IRQn = 6, /**< DMA Channel 6 Transfer Complete */
  168. DMA7_IRQn = 7, /**< DMA Channel 7 Transfer Complete */
  169. DMA8_IRQn = 8, /**< DMA Channel 8 Transfer Complete */
  170. DMA9_IRQn = 9, /**< DMA Channel 9 Transfer Complete */
  171. DMA10_IRQn = 10, /**< DMA Channel 10 Transfer Complete */
  172. DMA11_IRQn = 11, /**< DMA Channel 11 Transfer Complete */
  173. DMA12_IRQn = 12, /**< DMA Channel 12 Transfer Complete */
  174. DMA13_IRQn = 13, /**< DMA Channel 13 Transfer Complete */
  175. DMA14_IRQn = 14, /**< DMA Channel 14 Transfer Complete */
  176. DMA15_IRQn = 15, /**< DMA Channel 15 Transfer Complete */
  177. DMA_Error_IRQn = 16, /**< DMA Error Interrupt */
  178. MCM_IRQn = 17, /**< Normal Interrupt */
  179. FTFE_IRQn = 18, /**< FTFE Command complete interrupt */
  180. Read_Collision_IRQn = 19, /**< Read Collision Interrupt */
  181. LVD_LVW_IRQn = 20, /**< Low Voltage Detect, Low Voltage Warning */
  182. LLWU_IRQn = 21, /**< Low Leakage Wakeup Unit */
  183. WDOG_EWM_IRQn = 22, /**< WDOG Interrupt */
  184. RNG_IRQn = 23, /**< RNG Interrupt */
  185. I2C0_IRQn = 24, /**< I2C0 interrupt */
  186. I2C1_IRQn = 25, /**< I2C1 interrupt */
  187. SPI0_IRQn = 26, /**< SPI0 Interrupt */
  188. SPI1_IRQn = 27, /**< SPI1 Interrupt */
  189. I2S0_Tx_IRQn = 28, /**< I2S0 transmit interrupt */
  190. I2S0_Rx_IRQn = 29, /**< I2S0 receive interrupt */
  191. UART0_LON_IRQn = 30, /**< UART0 LON interrupt */
  192. UART0_RX_TX_IRQn = 31, /**< UART0 Receive/Transmit interrupt */
  193. UART0_ERR_IRQn = 32, /**< UART0 Error interrupt */
  194. UART1_RX_TX_IRQn = 33, /**< UART1 Receive/Transmit interrupt */
  195. UART1_ERR_IRQn = 34, /**< UART1 Error interrupt */
  196. UART2_RX_TX_IRQn = 35, /**< UART2 Receive/Transmit interrupt */
  197. UART2_ERR_IRQn = 36, /**< UART2 Error interrupt */
  198. UART3_RX_TX_IRQn = 37, /**< UART3 Receive/Transmit interrupt */
  199. UART3_ERR_IRQn = 38, /**< UART3 Error interrupt */
  200. ADC0_IRQn = 39, /**< ADC0 interrupt */
  201. CMP0_IRQn = 40, /**< CMP0 interrupt */
  202. CMP1_IRQn = 41, /**< CMP1 interrupt */
  203. FTM0_IRQn = 42, /**< FTM0 fault, overflow and channels interrupt */
  204. FTM1_IRQn = 43, /**< FTM1 fault, overflow and channels interrupt */
  205. FTM2_IRQn = 44, /**< FTM2 fault, overflow and channels interrupt */
  206. CMT_IRQn = 45, /**< CMT interrupt */
  207. RTC_IRQn = 46, /**< RTC interrupt */
  208. RTC_Seconds_IRQn = 47, /**< RTC seconds interrupt */
  209. PIT0_IRQn = 48, /**< PIT timer channel 0 interrupt */
  210. PIT1_IRQn = 49, /**< PIT timer channel 1 interrupt */
  211. PIT2_IRQn = 50, /**< PIT timer channel 2 interrupt */
  212. PIT3_IRQn = 51, /**< PIT timer channel 3 interrupt */
  213. PDB0_IRQn = 52, /**< PDB0 Interrupt */
  214. USB0_IRQn = 53, /**< USB0 interrupt */
  215. USBDCD_IRQn = 54, /**< USBDCD Interrupt */
  216. Reserved71_IRQn = 55, /**< Reserved interrupt 71 */
  217. DAC0_IRQn = 56, /**< DAC0 interrupt */
  218. MCG_IRQn = 57, /**< MCG Interrupt */
  219. LPTMR0_IRQn = 58, /**< LPTimer interrupt */
  220. PORTA_IRQn = 59, /**< Port A interrupt */
  221. PORTB_IRQn = 60, /**< Port B interrupt */
  222. PORTC_IRQn = 61, /**< Port C interrupt */
  223. PORTD_IRQn = 62, /**< Port D interrupt */
  224. PORTE_IRQn = 63, /**< Port E interrupt */
  225. SWI_IRQn = 64, /**< Software interrupt */
  226. SPI2_IRQn = 65, /**< SPI2 Interrupt */
  227. UART4_RX_TX_IRQn = 66, /**< UART4 Receive/Transmit interrupt */
  228. UART4_ERR_IRQn = 67, /**< UART4 Error interrupt */
  229. UART5_RX_TX_IRQn = 68, /**< UART5 Receive/Transmit interrupt */
  230. UART5_ERR_IRQn = 69, /**< UART5 Error interrupt */
  231. CMP2_IRQn = 70, /**< CMP2 interrupt */
  232. FTM3_IRQn = 71, /**< FTM3 fault, overflow and channels interrupt */
  233. DAC1_IRQn = 72, /**< DAC1 interrupt */
  234. ADC1_IRQn = 73, /**< ADC1 interrupt */
  235. I2C2_IRQn = 74, /**< I2C2 interrupt */
  236. CAN0_ORed_Message_buffer_IRQn = 75, /**< CAN0 OR'd message buffers interrupt */
  237. CAN0_Bus_Off_IRQn = 76, /**< CAN0 bus off interrupt */
  238. CAN0_Error_IRQn = 77, /**< CAN0 error interrupt */
  239. CAN0_Tx_Warning_IRQn = 78, /**< CAN0 Tx warning interrupt */
  240. CAN0_Rx_Warning_IRQn = 79, /**< CAN0 Rx warning interrupt */
  241. CAN0_Wake_Up_IRQn = 80, /**< CAN0 wake up interrupt */
  242. SDHC_IRQn = 81, /**< SDHC interrupt */
  243. Reserved98_IRQn = 82, /**< Reserved interrupt 98 */
  244. Reserved99_IRQn = 83, /**< Reserved interrupt 99 */
  245. Reserved100_IRQn = 84, /**< Reserved interrupt 100 */
  246. Reserved101_IRQn = 85 /**< Reserved interrupt 101 */
  247. } IRQn_Type;
  248. /*!
  249. * @}
  250. */ /* end of group Interrupt_vector_numbers */
  251. /* ----------------------------------------------------------------------------
  252. -- Cortex M4 Core Configuration
  253. ---------------------------------------------------------------------------- */
  254. /*!
  255. * @addtogroup Cortex_Core_Configuration Cortex M4 Core Configuration
  256. * @{
  257. */
  258. #define __MPU_PRESENT 0 /**< Defines if an MPU is present or not */
  259. #define __NVIC_PRIO_BITS 4 /**< Number of priority bits implemented in the NVIC */
  260. #define __Vendor_SysTickConfig 0 /**< Vendor specific implementation of SysTickConfig is defined */
  261. #define __FPU_PRESENT 1 /**< Defines if an FPU is present or not */
  262. #include "core_cm4.h" /* Core Peripheral Access Layer */
  263. #include "system_MK24F12.h" /* Device specific configuration file */
  264. /*!
  265. * @}
  266. */ /* end of group Cortex_Core_Configuration */
  267. /* ----------------------------------------------------------------------------
  268. -- Mapping Information
  269. ---------------------------------------------------------------------------- */
  270. /*!
  271. * @addtogroup Mapping_Information Mapping Information
  272. * @{
  273. */
  274. /** Mapping Information */
  275. /*!
  276. * @addtogroup edma_request
  277. * @{
  278. */
  279. /*******************************************************************************
  280. * Definitions
  281. ******************************************************************************/
  282. /*!
  283. * @brief Structure for the DMA hardware request
  284. *
  285. * Defines the structure for the DMA hardware request collections. The user can configure the
  286. * hardware request into DMAMUX to trigger the DMA transfer accordingly. The index
  287. * of the hardware request varies according to the to SoC.
  288. */
  289. typedef enum _dma_request_source
  290. {
  291. kDmaRequestMux0Disable = 0|0x100U, /**< DMAMUX TriggerDisabled. */
  292. kDmaRequestMux0Reserved1 = 1|0x100U, /**< Reserved1 */
  293. kDmaRequestMux0UART0Rx = 2|0x100U, /**< UART0 Receive. */
  294. kDmaRequestMux0UART0Tx = 3|0x100U, /**< UART0 Transmit. */
  295. kDmaRequestMux0UART1Rx = 4|0x100U, /**< UART1 Receive. */
  296. kDmaRequestMux0UART1Tx = 5|0x100U, /**< UART1 Transmit. */
  297. kDmaRequestMux0UART2Rx = 6|0x100U, /**< UART2 Receive. */
  298. kDmaRequestMux0UART2Tx = 7|0x100U, /**< UART2 Transmit. */
  299. kDmaRequestMux0UART3Rx = 8|0x100U, /**< UART3 Receive. */
  300. kDmaRequestMux0UART3Tx = 9|0x100U, /**< UART3 Transmit. */
  301. kDmaRequestMux0UART4 = 10|0x100U, /**< UART4 Transmit or Receive. */
  302. kDmaRequestMux0UART5 = 11|0x100U, /**< UART5 Transmit or Receive. */
  303. kDmaRequestMux0I2S0Rx = 12|0x100U, /**< I2S0 Receive. */
  304. kDmaRequestMux0I2S0Tx = 13|0x100U, /**< I2S0 Transmit. */
  305. kDmaRequestMux0SPI0Rx = 14|0x100U, /**< SPI0 Receive. */
  306. kDmaRequestMux0SPI0Tx = 15|0x100U, /**< SPI0 Transmit. */
  307. kDmaRequestMux0SPI1 = 16|0x100U, /**< SPI1 Transmit or Receive. */
  308. kDmaRequestMux0SPI2 = 17|0x100U, /**< SPI2 Transmit or Receive. */
  309. kDmaRequestMux0I2C0 = 18|0x100U, /**< I2C0. */
  310. kDmaRequestMux0I2C1I2C2 = 19|0x100U, /**< I2C1 and I2C2. */
  311. kDmaRequestMux0I2C1 = 19|0x100U, /**< I2C1 and I2C2. */
  312. kDmaRequestMux0I2C2 = 19|0x100U, /**< I2C1 and I2C2. */
  313. kDmaRequestMux0FTM0Channel0 = 20|0x100U, /**< FTM0 C0V. */
  314. kDmaRequestMux0FTM0Channel1 = 21|0x100U, /**< FTM0 C1V. */
  315. kDmaRequestMux0FTM0Channel2 = 22|0x100U, /**< FTM0 C2V. */
  316. kDmaRequestMux0FTM0Channel3 = 23|0x100U, /**< FTM0 C3V. */
  317. kDmaRequestMux0FTM0Channel4 = 24|0x100U, /**< FTM0 C4V. */
  318. kDmaRequestMux0FTM0Channel5 = 25|0x100U, /**< FTM0 C5V. */
  319. kDmaRequestMux0FTM0Channel6 = 26|0x100U, /**< FTM0 C6V. */
  320. kDmaRequestMux0FTM0Channel7 = 27|0x100U, /**< FTM0 C7V. */
  321. kDmaRequestMux0FTM1Channel0 = 28|0x100U, /**< FTM1 C0V. */
  322. kDmaRequestMux0FTM1Channel1 = 29|0x100U, /**< FTM1 C1V. */
  323. kDmaRequestMux0FTM2Channel0 = 30|0x100U, /**< FTM2 C0V. */
  324. kDmaRequestMux0FTM2Channel1 = 31|0x100U, /**< FTM2 C1V. */
  325. kDmaRequestMux0FTM3Channel0 = 32|0x100U, /**< FTM3 C0V. */
  326. kDmaRequestMux0FTM3Channel1 = 33|0x100U, /**< FTM3 C1V. */
  327. kDmaRequestMux0FTM3Channel2 = 34|0x100U, /**< FTM3 C2V. */
  328. kDmaRequestMux0FTM3Channel3 = 35|0x100U, /**< FTM3 C3V. */
  329. kDmaRequestMux0FTM3Channel4 = 36|0x100U, /**< FTM3 C4V. */
  330. kDmaRequestMux0FTM3Channel5 = 37|0x100U, /**< FTM3 C5V. */
  331. kDmaRequestMux0FTM3Channel6 = 38|0x100U, /**< FTM3 C6V. */
  332. kDmaRequestMux0FTM3Channel7 = 39|0x100U, /**< FTM3 C7V. */
  333. kDmaRequestMux0ADC0 = 40|0x100U, /**< ADC0. */
  334. kDmaRequestMux0ADC1 = 41|0x100U, /**< ADC1. */
  335. kDmaRequestMux0CMP0 = 42|0x100U, /**< CMP0. */
  336. kDmaRequestMux0CMP1 = 43|0x100U, /**< CMP1. */
  337. kDmaRequestMux0CMP2 = 44|0x100U, /**< CMP2. */
  338. kDmaRequestMux0DAC0 = 45|0x100U, /**< DAC0. */
  339. kDmaRequestMux0DAC1 = 46|0x100U, /**< DAC1. */
  340. kDmaRequestMux0CMT = 47|0x100U, /**< CMT. */
  341. kDmaRequestMux0PDB = 48|0x100U, /**< PDB0. */
  342. kDmaRequestMux0PortA = 49|0x100U, /**< PTA. */
  343. kDmaRequestMux0PortB = 50|0x100U, /**< PTB. */
  344. kDmaRequestMux0PortC = 51|0x100U, /**< PTC. */
  345. kDmaRequestMux0PortD = 52|0x100U, /**< PTD. */
  346. kDmaRequestMux0PortE = 53|0x100U, /**< PTE. */
  347. kDmaRequestMux0Reserved54 = 54|0x100U, /**< Reserved54 */
  348. kDmaRequestMux0Reserved55 = 55|0x100U, /**< Reserved55 */
  349. kDmaRequestMux0Reserved56 = 56|0x100U, /**< Reserved56 */
  350. kDmaRequestMux0Reserved57 = 57|0x100U, /**< Reserved57 */
  351. kDmaRequestMux0AlwaysOn58 = 58|0x100U, /**< DMAMUX Always Enabled slot. */
  352. kDmaRequestMux0AlwaysOn59 = 59|0x100U, /**< DMAMUX Always Enabled slot. */
  353. kDmaRequestMux0AlwaysOn60 = 60|0x100U, /**< DMAMUX Always Enabled slot. */
  354. kDmaRequestMux0AlwaysOn61 = 61|0x100U, /**< DMAMUX Always Enabled slot. */
  355. kDmaRequestMux0AlwaysOn62 = 62|0x100U, /**< DMAMUX Always Enabled slot. */
  356. kDmaRequestMux0AlwaysOn63 = 63|0x100U, /**< DMAMUX Always Enabled slot. */
  357. } dma_request_source_t;
  358. /* @} */
  359. /*!
  360. * @}
  361. */ /* end of group Mapping_Information */
  362. /* ----------------------------------------------------------------------------
  363. -- Device Peripheral Access Layer
  364. ---------------------------------------------------------------------------- */
  365. /*!
  366. * @addtogroup Peripheral_access_layer Device Peripheral Access Layer
  367. * @{
  368. */
  369. /*
  370. ** Start of section using anonymous unions
  371. */
  372. #if defined(__ARMCC_VERSION)
  373. #pragma push
  374. #pragma anon_unions
  375. #elif defined(__CWCC__)
  376. #pragma push
  377. #pragma cpp_extensions on
  378. #elif defined(__GNUC__)
  379. /* anonymous unions are enabled by default */
  380. #elif defined(__IAR_SYSTEMS_ICC__)
  381. #pragma language=extended
  382. #else
  383. #error Not supported compiler type
  384. #endif
  385. /* ----------------------------------------------------------------------------
  386. -- ADC Peripheral Access Layer
  387. ---------------------------------------------------------------------------- */
  388. /*!
  389. * @addtogroup ADC_Peripheral_Access_Layer ADC Peripheral Access Layer
  390. * @{
  391. */
  392. /** ADC - Register Layout Typedef */
  393. typedef struct {
  394. __IO uint32_t SC1[2]; /**< ADC Status and Control Registers 1, array offset: 0x0, array step: 0x4 */
  395. __IO uint32_t CFG1; /**< ADC Configuration Register 1, offset: 0x8 */
  396. __IO uint32_t CFG2; /**< ADC Configuration Register 2, offset: 0xC */
  397. __I uint32_t R[2]; /**< ADC Data Result Register, array offset: 0x10, array step: 0x4 */
  398. __IO uint32_t CV1; /**< Compare Value Registers, offset: 0x18 */
  399. __IO uint32_t CV2; /**< Compare Value Registers, offset: 0x1C */
  400. __IO uint32_t SC2; /**< Status and Control Register 2, offset: 0x20 */
  401. __IO uint32_t SC3; /**< Status and Control Register 3, offset: 0x24 */
  402. __IO uint32_t OFS; /**< ADC Offset Correction Register, offset: 0x28 */
  403. __IO uint32_t PG; /**< ADC Plus-Side Gain Register, offset: 0x2C */
  404. __IO uint32_t MG; /**< ADC Minus-Side Gain Register, offset: 0x30 */
  405. __IO uint32_t CLPD; /**< ADC Plus-Side General Calibration Value Register, offset: 0x34 */
  406. __IO uint32_t CLPS; /**< ADC Plus-Side General Calibration Value Register, offset: 0x38 */
  407. __IO uint32_t CLP4; /**< ADC Plus-Side General Calibration Value Register, offset: 0x3C */
  408. __IO uint32_t CLP3; /**< ADC Plus-Side General Calibration Value Register, offset: 0x40 */
  409. __IO uint32_t CLP2; /**< ADC Plus-Side General Calibration Value Register, offset: 0x44 */
  410. __IO uint32_t CLP1; /**< ADC Plus-Side General Calibration Value Register, offset: 0x48 */
  411. __IO uint32_t CLP0; /**< ADC Plus-Side General Calibration Value Register, offset: 0x4C */
  412. uint8_t RESERVED_0[4];
  413. __IO uint32_t CLMD; /**< ADC Minus-Side General Calibration Value Register, offset: 0x54 */
  414. __IO uint32_t CLMS; /**< ADC Minus-Side General Calibration Value Register, offset: 0x58 */
  415. __IO uint32_t CLM4; /**< ADC Minus-Side General Calibration Value Register, offset: 0x5C */
  416. __IO uint32_t CLM3; /**< ADC Minus-Side General Calibration Value Register, offset: 0x60 */
  417. __IO uint32_t CLM2; /**< ADC Minus-Side General Calibration Value Register, offset: 0x64 */
  418. __IO uint32_t CLM1; /**< ADC Minus-Side General Calibration Value Register, offset: 0x68 */
  419. __IO uint32_t CLM0; /**< ADC Minus-Side General Calibration Value Register, offset: 0x6C */
  420. } ADC_Type;
  421. /* ----------------------------------------------------------------------------
  422. -- ADC Register Masks
  423. ---------------------------------------------------------------------------- */
  424. /*!
  425. * @addtogroup ADC_Register_Masks ADC Register Masks
  426. * @{
  427. */
  428. /*! @name SC1 - ADC Status and Control Registers 1 */
  429. #define ADC_SC1_ADCH_MASK (0x1FU)
  430. #define ADC_SC1_ADCH_SHIFT (0U)
  431. #define ADC_SC1_ADCH(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_ADCH_SHIFT)) & ADC_SC1_ADCH_MASK)
  432. #define ADC_SC1_DIFF_MASK (0x20U)
  433. #define ADC_SC1_DIFF_SHIFT (5U)
  434. #define ADC_SC1_DIFF(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_DIFF_SHIFT)) & ADC_SC1_DIFF_MASK)
  435. #define ADC_SC1_AIEN_MASK (0x40U)
  436. #define ADC_SC1_AIEN_SHIFT (6U)
  437. #define ADC_SC1_AIEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_AIEN_SHIFT)) & ADC_SC1_AIEN_MASK)
  438. #define ADC_SC1_COCO_MASK (0x80U)
  439. #define ADC_SC1_COCO_SHIFT (7U)
  440. #define ADC_SC1_COCO(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC1_COCO_SHIFT)) & ADC_SC1_COCO_MASK)
  441. /* The count of ADC_SC1 */
  442. #define ADC_SC1_COUNT (2U)
  443. /*! @name CFG1 - ADC Configuration Register 1 */
  444. #define ADC_CFG1_ADICLK_MASK (0x3U)
  445. #define ADC_CFG1_ADICLK_SHIFT (0U)
  446. #define ADC_CFG1_ADICLK(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADICLK_SHIFT)) & ADC_CFG1_ADICLK_MASK)
  447. #define ADC_CFG1_MODE_MASK (0xCU)
  448. #define ADC_CFG1_MODE_SHIFT (2U)
  449. #define ADC_CFG1_MODE(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_MODE_SHIFT)) & ADC_CFG1_MODE_MASK)
  450. #define ADC_CFG1_ADLSMP_MASK (0x10U)
  451. #define ADC_CFG1_ADLSMP_SHIFT (4U)
  452. #define ADC_CFG1_ADLSMP(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADLSMP_SHIFT)) & ADC_CFG1_ADLSMP_MASK)
  453. #define ADC_CFG1_ADIV_MASK (0x60U)
  454. #define ADC_CFG1_ADIV_SHIFT (5U)
  455. #define ADC_CFG1_ADIV(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADIV_SHIFT)) & ADC_CFG1_ADIV_MASK)
  456. #define ADC_CFG1_ADLPC_MASK (0x80U)
  457. #define ADC_CFG1_ADLPC_SHIFT (7U)
  458. #define ADC_CFG1_ADLPC(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG1_ADLPC_SHIFT)) & ADC_CFG1_ADLPC_MASK)
  459. /*! @name CFG2 - ADC Configuration Register 2 */
  460. #define ADC_CFG2_ADLSTS_MASK (0x3U)
  461. #define ADC_CFG2_ADLSTS_SHIFT (0U)
  462. #define ADC_CFG2_ADLSTS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_ADLSTS_SHIFT)) & ADC_CFG2_ADLSTS_MASK)
  463. #define ADC_CFG2_ADHSC_MASK (0x4U)
  464. #define ADC_CFG2_ADHSC_SHIFT (2U)
  465. #define ADC_CFG2_ADHSC(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_ADHSC_SHIFT)) & ADC_CFG2_ADHSC_MASK)
  466. #define ADC_CFG2_ADACKEN_MASK (0x8U)
  467. #define ADC_CFG2_ADACKEN_SHIFT (3U)
  468. #define ADC_CFG2_ADACKEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_ADACKEN_SHIFT)) & ADC_CFG2_ADACKEN_MASK)
  469. #define ADC_CFG2_MUXSEL_MASK (0x10U)
  470. #define ADC_CFG2_MUXSEL_SHIFT (4U)
  471. #define ADC_CFG2_MUXSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_CFG2_MUXSEL_SHIFT)) & ADC_CFG2_MUXSEL_MASK)
  472. /*! @name R - ADC Data Result Register */
  473. #define ADC_R_D_MASK (0xFFFFU)
  474. #define ADC_R_D_SHIFT (0U)
  475. #define ADC_R_D(x) (((uint32_t)(((uint32_t)(x)) << ADC_R_D_SHIFT)) & ADC_R_D_MASK)
  476. /* The count of ADC_R */
  477. #define ADC_R_COUNT (2U)
  478. /*! @name CV1 - Compare Value Registers */
  479. #define ADC_CV1_CV_MASK (0xFFFFU)
  480. #define ADC_CV1_CV_SHIFT (0U)
  481. #define ADC_CV1_CV(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV1_CV_SHIFT)) & ADC_CV1_CV_MASK)
  482. /*! @name CV2 - Compare Value Registers */
  483. #define ADC_CV2_CV_MASK (0xFFFFU)
  484. #define ADC_CV2_CV_SHIFT (0U)
  485. #define ADC_CV2_CV(x) (((uint32_t)(((uint32_t)(x)) << ADC_CV2_CV_SHIFT)) & ADC_CV2_CV_MASK)
  486. /*! @name SC2 - Status and Control Register 2 */
  487. #define ADC_SC2_REFSEL_MASK (0x3U)
  488. #define ADC_SC2_REFSEL_SHIFT (0U)
  489. #define ADC_SC2_REFSEL(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_REFSEL_SHIFT)) & ADC_SC2_REFSEL_MASK)
  490. #define ADC_SC2_DMAEN_MASK (0x4U)
  491. #define ADC_SC2_DMAEN_SHIFT (2U)
  492. #define ADC_SC2_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_DMAEN_SHIFT)) & ADC_SC2_DMAEN_MASK)
  493. #define ADC_SC2_ACREN_MASK (0x8U)
  494. #define ADC_SC2_ACREN_SHIFT (3U)
  495. #define ADC_SC2_ACREN(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ACREN_SHIFT)) & ADC_SC2_ACREN_MASK)
  496. #define ADC_SC2_ACFGT_MASK (0x10U)
  497. #define ADC_SC2_ACFGT_SHIFT (4U)
  498. #define ADC_SC2_ACFGT(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ACFGT_SHIFT)) & ADC_SC2_ACFGT_MASK)
  499. #define ADC_SC2_ACFE_MASK (0x20U)
  500. #define ADC_SC2_ACFE_SHIFT (5U)
  501. #define ADC_SC2_ACFE(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ACFE_SHIFT)) & ADC_SC2_ACFE_MASK)
  502. #define ADC_SC2_ADTRG_MASK (0x40U)
  503. #define ADC_SC2_ADTRG_SHIFT (6U)
  504. #define ADC_SC2_ADTRG(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ADTRG_SHIFT)) & ADC_SC2_ADTRG_MASK)
  505. #define ADC_SC2_ADACT_MASK (0x80U)
  506. #define ADC_SC2_ADACT_SHIFT (7U)
  507. #define ADC_SC2_ADACT(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC2_ADACT_SHIFT)) & ADC_SC2_ADACT_MASK)
  508. /*! @name SC3 - Status and Control Register 3 */
  509. #define ADC_SC3_AVGS_MASK (0x3U)
  510. #define ADC_SC3_AVGS_SHIFT (0U)
  511. #define ADC_SC3_AVGS(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_AVGS_SHIFT)) & ADC_SC3_AVGS_MASK)
  512. #define ADC_SC3_AVGE_MASK (0x4U)
  513. #define ADC_SC3_AVGE_SHIFT (2U)
  514. #define ADC_SC3_AVGE(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_AVGE_SHIFT)) & ADC_SC3_AVGE_MASK)
  515. #define ADC_SC3_ADCO_MASK (0x8U)
  516. #define ADC_SC3_ADCO_SHIFT (3U)
  517. #define ADC_SC3_ADCO(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_ADCO_SHIFT)) & ADC_SC3_ADCO_MASK)
  518. #define ADC_SC3_CALF_MASK (0x40U)
  519. #define ADC_SC3_CALF_SHIFT (6U)
  520. #define ADC_SC3_CALF(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_CALF_SHIFT)) & ADC_SC3_CALF_MASK)
  521. #define ADC_SC3_CAL_MASK (0x80U)
  522. #define ADC_SC3_CAL_SHIFT (7U)
  523. #define ADC_SC3_CAL(x) (((uint32_t)(((uint32_t)(x)) << ADC_SC3_CAL_SHIFT)) & ADC_SC3_CAL_MASK)
  524. /*! @name OFS - ADC Offset Correction Register */
  525. #define ADC_OFS_OFS_MASK (0xFFFFU)
  526. #define ADC_OFS_OFS_SHIFT (0U)
  527. #define ADC_OFS_OFS(x) (((uint32_t)(((uint32_t)(x)) << ADC_OFS_OFS_SHIFT)) & ADC_OFS_OFS_MASK)
  528. /*! @name PG - ADC Plus-Side Gain Register */
  529. #define ADC_PG_PG_MASK (0xFFFFU)
  530. #define ADC_PG_PG_SHIFT (0U)
  531. #define ADC_PG_PG(x) (((uint32_t)(((uint32_t)(x)) << ADC_PG_PG_SHIFT)) & ADC_PG_PG_MASK)
  532. /*! @name MG - ADC Minus-Side Gain Register */
  533. #define ADC_MG_MG_MASK (0xFFFFU)
  534. #define ADC_MG_MG_SHIFT (0U)
  535. #define ADC_MG_MG(x) (((uint32_t)(((uint32_t)(x)) << ADC_MG_MG_SHIFT)) & ADC_MG_MG_MASK)
  536. /*! @name CLPD - ADC Plus-Side General Calibration Value Register */
  537. #define ADC_CLPD_CLPD_MASK (0x3FU)
  538. #define ADC_CLPD_CLPD_SHIFT (0U)
  539. #define ADC_CLPD_CLPD(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLPD_CLPD_SHIFT)) & ADC_CLPD_CLPD_MASK)
  540. /*! @name CLPS - ADC Plus-Side General Calibration Value Register */
  541. #define ADC_CLPS_CLPS_MASK (0x3FU)
  542. #define ADC_CLPS_CLPS_SHIFT (0U)
  543. #define ADC_CLPS_CLPS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLPS_CLPS_SHIFT)) & ADC_CLPS_CLPS_MASK)
  544. /*! @name CLP4 - ADC Plus-Side General Calibration Value Register */
  545. #define ADC_CLP4_CLP4_MASK (0x3FFU)
  546. #define ADC_CLP4_CLP4_SHIFT (0U)
  547. #define ADC_CLP4_CLP4(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP4_CLP4_SHIFT)) & ADC_CLP4_CLP4_MASK)
  548. /*! @name CLP3 - ADC Plus-Side General Calibration Value Register */
  549. #define ADC_CLP3_CLP3_MASK (0x1FFU)
  550. #define ADC_CLP3_CLP3_SHIFT (0U)
  551. #define ADC_CLP3_CLP3(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP3_CLP3_SHIFT)) & ADC_CLP3_CLP3_MASK)
  552. /*! @name CLP2 - ADC Plus-Side General Calibration Value Register */
  553. #define ADC_CLP2_CLP2_MASK (0xFFU)
  554. #define ADC_CLP2_CLP2_SHIFT (0U)
  555. #define ADC_CLP2_CLP2(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP2_CLP2_SHIFT)) & ADC_CLP2_CLP2_MASK)
  556. /*! @name CLP1 - ADC Plus-Side General Calibration Value Register */
  557. #define ADC_CLP1_CLP1_MASK (0x7FU)
  558. #define ADC_CLP1_CLP1_SHIFT (0U)
  559. #define ADC_CLP1_CLP1(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP1_CLP1_SHIFT)) & ADC_CLP1_CLP1_MASK)
  560. /*! @name CLP0 - ADC Plus-Side General Calibration Value Register */
  561. #define ADC_CLP0_CLP0_MASK (0x3FU)
  562. #define ADC_CLP0_CLP0_SHIFT (0U)
  563. #define ADC_CLP0_CLP0(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLP0_CLP0_SHIFT)) & ADC_CLP0_CLP0_MASK)
  564. /*! @name CLMD - ADC Minus-Side General Calibration Value Register */
  565. #define ADC_CLMD_CLMD_MASK (0x3FU)
  566. #define ADC_CLMD_CLMD_SHIFT (0U)
  567. #define ADC_CLMD_CLMD(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLMD_CLMD_SHIFT)) & ADC_CLMD_CLMD_MASK)
  568. /*! @name CLMS - ADC Minus-Side General Calibration Value Register */
  569. #define ADC_CLMS_CLMS_MASK (0x3FU)
  570. #define ADC_CLMS_CLMS_SHIFT (0U)
  571. #define ADC_CLMS_CLMS(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLMS_CLMS_SHIFT)) & ADC_CLMS_CLMS_MASK)
  572. /*! @name CLM4 - ADC Minus-Side General Calibration Value Register */
  573. #define ADC_CLM4_CLM4_MASK (0x3FFU)
  574. #define ADC_CLM4_CLM4_SHIFT (0U)
  575. #define ADC_CLM4_CLM4(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM4_CLM4_SHIFT)) & ADC_CLM4_CLM4_MASK)
  576. /*! @name CLM3 - ADC Minus-Side General Calibration Value Register */
  577. #define ADC_CLM3_CLM3_MASK (0x1FFU)
  578. #define ADC_CLM3_CLM3_SHIFT (0U)
  579. #define ADC_CLM3_CLM3(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM3_CLM3_SHIFT)) & ADC_CLM3_CLM3_MASK)
  580. /*! @name CLM2 - ADC Minus-Side General Calibration Value Register */
  581. #define ADC_CLM2_CLM2_MASK (0xFFU)
  582. #define ADC_CLM2_CLM2_SHIFT (0U)
  583. #define ADC_CLM2_CLM2(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM2_CLM2_SHIFT)) & ADC_CLM2_CLM2_MASK)
  584. /*! @name CLM1 - ADC Minus-Side General Calibration Value Register */
  585. #define ADC_CLM1_CLM1_MASK (0x7FU)
  586. #define ADC_CLM1_CLM1_SHIFT (0U)
  587. #define ADC_CLM1_CLM1(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM1_CLM1_SHIFT)) & ADC_CLM1_CLM1_MASK)
  588. /*! @name CLM0 - ADC Minus-Side General Calibration Value Register */
  589. #define ADC_CLM0_CLM0_MASK (0x3FU)
  590. #define ADC_CLM0_CLM0_SHIFT (0U)
  591. #define ADC_CLM0_CLM0(x) (((uint32_t)(((uint32_t)(x)) << ADC_CLM0_CLM0_SHIFT)) & ADC_CLM0_CLM0_MASK)
  592. /*!
  593. * @}
  594. */ /* end of group ADC_Register_Masks */
  595. /* ADC - Peripheral instance base addresses */
  596. /** Peripheral ADC0 base address */
  597. #define ADC0_BASE (0x4003B000u)
  598. /** Peripheral ADC0 base pointer */
  599. #define ADC0 ((ADC_Type *)ADC0_BASE)
  600. /** Peripheral ADC1 base address */
  601. #define ADC1_BASE (0x400BB000u)
  602. /** Peripheral ADC1 base pointer */
  603. #define ADC1 ((ADC_Type *)ADC1_BASE)
  604. /** Array initializer of ADC peripheral base addresses */
  605. #define ADC_BASE_ADDRS { ADC0_BASE, ADC1_BASE }
  606. /** Array initializer of ADC peripheral base pointers */
  607. #define ADC_BASE_PTRS { ADC0, ADC1 }
  608. /** Interrupt vectors for the ADC peripheral type */
  609. #define ADC_IRQS { ADC0_IRQn, ADC1_IRQn }
  610. /*!
  611. * @}
  612. */ /* end of group ADC_Peripheral_Access_Layer */
  613. /* ----------------------------------------------------------------------------
  614. -- AIPS Peripheral Access Layer
  615. ---------------------------------------------------------------------------- */
  616. /*!
  617. * @addtogroup AIPS_Peripheral_Access_Layer AIPS Peripheral Access Layer
  618. * @{
  619. */
  620. /** AIPS - Register Layout Typedef */
  621. typedef struct {
  622. __IO uint32_t MPRA; /**< Master Privilege Register A, offset: 0x0 */
  623. uint8_t RESERVED_0[28];
  624. __IO uint32_t PACRA; /**< Peripheral Access Control Register, offset: 0x20 */
  625. __IO uint32_t PACRB; /**< Peripheral Access Control Register, offset: 0x24 */
  626. __IO uint32_t PACRC; /**< Peripheral Access Control Register, offset: 0x28 */
  627. __IO uint32_t PACRD; /**< Peripheral Access Control Register, offset: 0x2C */
  628. uint8_t RESERVED_1[16];
  629. __IO uint32_t PACRE; /**< Peripheral Access Control Register, offset: 0x40 */
  630. __IO uint32_t PACRF; /**< Peripheral Access Control Register, offset: 0x44 */
  631. __IO uint32_t PACRG; /**< Peripheral Access Control Register, offset: 0x48 */
  632. __IO uint32_t PACRH; /**< Peripheral Access Control Register, offset: 0x4C */
  633. __IO uint32_t PACRI; /**< Peripheral Access Control Register, offset: 0x50 */
  634. __IO uint32_t PACRJ; /**< Peripheral Access Control Register, offset: 0x54 */
  635. __IO uint32_t PACRK; /**< Peripheral Access Control Register, offset: 0x58 */
  636. __IO uint32_t PACRL; /**< Peripheral Access Control Register, offset: 0x5C */
  637. __IO uint32_t PACRM; /**< Peripheral Access Control Register, offset: 0x60 */
  638. __IO uint32_t PACRN; /**< Peripheral Access Control Register, offset: 0x64 */
  639. __IO uint32_t PACRO; /**< Peripheral Access Control Register, offset: 0x68 */
  640. __IO uint32_t PACRP; /**< Peripheral Access Control Register, offset: 0x6C */
  641. uint8_t RESERVED_2[16];
  642. __IO uint32_t PACRU; /**< Peripheral Access Control Register, offset: 0x80 */
  643. } AIPS_Type;
  644. /* ----------------------------------------------------------------------------
  645. -- AIPS Register Masks
  646. ---------------------------------------------------------------------------- */
  647. /*!
  648. * @addtogroup AIPS_Register_Masks AIPS Register Masks
  649. * @{
  650. */
  651. /*! @name MPRA - Master Privilege Register A */
  652. #define AIPS_MPRA_MPL5_MASK (0x100U)
  653. #define AIPS_MPRA_MPL5_SHIFT (8U)
  654. #define AIPS_MPRA_MPL5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL5_SHIFT)) & AIPS_MPRA_MPL5_MASK)
  655. #define AIPS_MPRA_MTW5_MASK (0x200U)
  656. #define AIPS_MPRA_MTW5_SHIFT (9U)
  657. #define AIPS_MPRA_MTW5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW5_SHIFT)) & AIPS_MPRA_MTW5_MASK)
  658. #define AIPS_MPRA_MTR5_MASK (0x400U)
  659. #define AIPS_MPRA_MTR5_SHIFT (10U)
  660. #define AIPS_MPRA_MTR5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR5_SHIFT)) & AIPS_MPRA_MTR5_MASK)
  661. #define AIPS_MPRA_MPL4_MASK (0x1000U)
  662. #define AIPS_MPRA_MPL4_SHIFT (12U)
  663. #define AIPS_MPRA_MPL4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL4_SHIFT)) & AIPS_MPRA_MPL4_MASK)
  664. #define AIPS_MPRA_MTW4_MASK (0x2000U)
  665. #define AIPS_MPRA_MTW4_SHIFT (13U)
  666. #define AIPS_MPRA_MTW4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW4_SHIFT)) & AIPS_MPRA_MTW4_MASK)
  667. #define AIPS_MPRA_MTR4_MASK (0x4000U)
  668. #define AIPS_MPRA_MTR4_SHIFT (14U)
  669. #define AIPS_MPRA_MTR4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR4_SHIFT)) & AIPS_MPRA_MTR4_MASK)
  670. #define AIPS_MPRA_MPL3_MASK (0x10000U)
  671. #define AIPS_MPRA_MPL3_SHIFT (16U)
  672. #define AIPS_MPRA_MPL3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL3_SHIFT)) & AIPS_MPRA_MPL3_MASK)
  673. #define AIPS_MPRA_MTW3_MASK (0x20000U)
  674. #define AIPS_MPRA_MTW3_SHIFT (17U)
  675. #define AIPS_MPRA_MTW3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW3_SHIFT)) & AIPS_MPRA_MTW3_MASK)
  676. #define AIPS_MPRA_MTR3_MASK (0x40000U)
  677. #define AIPS_MPRA_MTR3_SHIFT (18U)
  678. #define AIPS_MPRA_MTR3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR3_SHIFT)) & AIPS_MPRA_MTR3_MASK)
  679. #define AIPS_MPRA_MPL2_MASK (0x100000U)
  680. #define AIPS_MPRA_MPL2_SHIFT (20U)
  681. #define AIPS_MPRA_MPL2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL2_SHIFT)) & AIPS_MPRA_MPL2_MASK)
  682. #define AIPS_MPRA_MTW2_MASK (0x200000U)
  683. #define AIPS_MPRA_MTW2_SHIFT (21U)
  684. #define AIPS_MPRA_MTW2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW2_SHIFT)) & AIPS_MPRA_MTW2_MASK)
  685. #define AIPS_MPRA_MTR2_MASK (0x400000U)
  686. #define AIPS_MPRA_MTR2_SHIFT (22U)
  687. #define AIPS_MPRA_MTR2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR2_SHIFT)) & AIPS_MPRA_MTR2_MASK)
  688. #define AIPS_MPRA_MPL1_MASK (0x1000000U)
  689. #define AIPS_MPRA_MPL1_SHIFT (24U)
  690. #define AIPS_MPRA_MPL1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL1_SHIFT)) & AIPS_MPRA_MPL1_MASK)
  691. #define AIPS_MPRA_MTW1_MASK (0x2000000U)
  692. #define AIPS_MPRA_MTW1_SHIFT (25U)
  693. #define AIPS_MPRA_MTW1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW1_SHIFT)) & AIPS_MPRA_MTW1_MASK)
  694. #define AIPS_MPRA_MTR1_MASK (0x4000000U)
  695. #define AIPS_MPRA_MTR1_SHIFT (26U)
  696. #define AIPS_MPRA_MTR1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR1_SHIFT)) & AIPS_MPRA_MTR1_MASK)
  697. #define AIPS_MPRA_MPL0_MASK (0x10000000U)
  698. #define AIPS_MPRA_MPL0_SHIFT (28U)
  699. #define AIPS_MPRA_MPL0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MPL0_SHIFT)) & AIPS_MPRA_MPL0_MASK)
  700. #define AIPS_MPRA_MTW0_MASK (0x20000000U)
  701. #define AIPS_MPRA_MTW0_SHIFT (29U)
  702. #define AIPS_MPRA_MTW0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTW0_SHIFT)) & AIPS_MPRA_MTW0_MASK)
  703. #define AIPS_MPRA_MTR0_MASK (0x40000000U)
  704. #define AIPS_MPRA_MTR0_SHIFT (30U)
  705. #define AIPS_MPRA_MTR0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_MPRA_MTR0_SHIFT)) & AIPS_MPRA_MTR0_MASK)
  706. /*! @name PACRA - Peripheral Access Control Register */
  707. #define AIPS_PACRA_TP7_MASK (0x1U)
  708. #define AIPS_PACRA_TP7_SHIFT (0U)
  709. #define AIPS_PACRA_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP7_SHIFT)) & AIPS_PACRA_TP7_MASK)
  710. #define AIPS_PACRA_WP7_MASK (0x2U)
  711. #define AIPS_PACRA_WP7_SHIFT (1U)
  712. #define AIPS_PACRA_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP7_SHIFT)) & AIPS_PACRA_WP7_MASK)
  713. #define AIPS_PACRA_SP7_MASK (0x4U)
  714. #define AIPS_PACRA_SP7_SHIFT (2U)
  715. #define AIPS_PACRA_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP7_SHIFT)) & AIPS_PACRA_SP7_MASK)
  716. #define AIPS_PACRA_TP6_MASK (0x10U)
  717. #define AIPS_PACRA_TP6_SHIFT (4U)
  718. #define AIPS_PACRA_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP6_SHIFT)) & AIPS_PACRA_TP6_MASK)
  719. #define AIPS_PACRA_WP6_MASK (0x20U)
  720. #define AIPS_PACRA_WP6_SHIFT (5U)
  721. #define AIPS_PACRA_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP6_SHIFT)) & AIPS_PACRA_WP6_MASK)
  722. #define AIPS_PACRA_SP6_MASK (0x40U)
  723. #define AIPS_PACRA_SP6_SHIFT (6U)
  724. #define AIPS_PACRA_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP6_SHIFT)) & AIPS_PACRA_SP6_MASK)
  725. #define AIPS_PACRA_TP5_MASK (0x100U)
  726. #define AIPS_PACRA_TP5_SHIFT (8U)
  727. #define AIPS_PACRA_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP5_SHIFT)) & AIPS_PACRA_TP5_MASK)
  728. #define AIPS_PACRA_WP5_MASK (0x200U)
  729. #define AIPS_PACRA_WP5_SHIFT (9U)
  730. #define AIPS_PACRA_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP5_SHIFT)) & AIPS_PACRA_WP5_MASK)
  731. #define AIPS_PACRA_SP5_MASK (0x400U)
  732. #define AIPS_PACRA_SP5_SHIFT (10U)
  733. #define AIPS_PACRA_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP5_SHIFT)) & AIPS_PACRA_SP5_MASK)
  734. #define AIPS_PACRA_TP4_MASK (0x1000U)
  735. #define AIPS_PACRA_TP4_SHIFT (12U)
  736. #define AIPS_PACRA_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP4_SHIFT)) & AIPS_PACRA_TP4_MASK)
  737. #define AIPS_PACRA_WP4_MASK (0x2000U)
  738. #define AIPS_PACRA_WP4_SHIFT (13U)
  739. #define AIPS_PACRA_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP4_SHIFT)) & AIPS_PACRA_WP4_MASK)
  740. #define AIPS_PACRA_SP4_MASK (0x4000U)
  741. #define AIPS_PACRA_SP4_SHIFT (14U)
  742. #define AIPS_PACRA_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP4_SHIFT)) & AIPS_PACRA_SP4_MASK)
  743. #define AIPS_PACRA_TP3_MASK (0x10000U)
  744. #define AIPS_PACRA_TP3_SHIFT (16U)
  745. #define AIPS_PACRA_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP3_SHIFT)) & AIPS_PACRA_TP3_MASK)
  746. #define AIPS_PACRA_WP3_MASK (0x20000U)
  747. #define AIPS_PACRA_WP3_SHIFT (17U)
  748. #define AIPS_PACRA_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP3_SHIFT)) & AIPS_PACRA_WP3_MASK)
  749. #define AIPS_PACRA_SP3_MASK (0x40000U)
  750. #define AIPS_PACRA_SP3_SHIFT (18U)
  751. #define AIPS_PACRA_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP3_SHIFT)) & AIPS_PACRA_SP3_MASK)
  752. #define AIPS_PACRA_TP2_MASK (0x100000U)
  753. #define AIPS_PACRA_TP2_SHIFT (20U)
  754. #define AIPS_PACRA_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP2_SHIFT)) & AIPS_PACRA_TP2_MASK)
  755. #define AIPS_PACRA_WP2_MASK (0x200000U)
  756. #define AIPS_PACRA_WP2_SHIFT (21U)
  757. #define AIPS_PACRA_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP2_SHIFT)) & AIPS_PACRA_WP2_MASK)
  758. #define AIPS_PACRA_SP2_MASK (0x400000U)
  759. #define AIPS_PACRA_SP2_SHIFT (22U)
  760. #define AIPS_PACRA_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP2_SHIFT)) & AIPS_PACRA_SP2_MASK)
  761. #define AIPS_PACRA_TP1_MASK (0x1000000U)
  762. #define AIPS_PACRA_TP1_SHIFT (24U)
  763. #define AIPS_PACRA_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP1_SHIFT)) & AIPS_PACRA_TP1_MASK)
  764. #define AIPS_PACRA_WP1_MASK (0x2000000U)
  765. #define AIPS_PACRA_WP1_SHIFT (25U)
  766. #define AIPS_PACRA_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP1_SHIFT)) & AIPS_PACRA_WP1_MASK)
  767. #define AIPS_PACRA_SP1_MASK (0x4000000U)
  768. #define AIPS_PACRA_SP1_SHIFT (26U)
  769. #define AIPS_PACRA_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP1_SHIFT)) & AIPS_PACRA_SP1_MASK)
  770. #define AIPS_PACRA_TP0_MASK (0x10000000U)
  771. #define AIPS_PACRA_TP0_SHIFT (28U)
  772. #define AIPS_PACRA_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_TP0_SHIFT)) & AIPS_PACRA_TP0_MASK)
  773. #define AIPS_PACRA_WP0_MASK (0x20000000U)
  774. #define AIPS_PACRA_WP0_SHIFT (29U)
  775. #define AIPS_PACRA_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_WP0_SHIFT)) & AIPS_PACRA_WP0_MASK)
  776. #define AIPS_PACRA_SP0_MASK (0x40000000U)
  777. #define AIPS_PACRA_SP0_SHIFT (30U)
  778. #define AIPS_PACRA_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRA_SP0_SHIFT)) & AIPS_PACRA_SP0_MASK)
  779. /*! @name PACRB - Peripheral Access Control Register */
  780. #define AIPS_PACRB_TP7_MASK (0x1U)
  781. #define AIPS_PACRB_TP7_SHIFT (0U)
  782. #define AIPS_PACRB_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP7_SHIFT)) & AIPS_PACRB_TP7_MASK)
  783. #define AIPS_PACRB_WP7_MASK (0x2U)
  784. #define AIPS_PACRB_WP7_SHIFT (1U)
  785. #define AIPS_PACRB_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP7_SHIFT)) & AIPS_PACRB_WP7_MASK)
  786. #define AIPS_PACRB_SP7_MASK (0x4U)
  787. #define AIPS_PACRB_SP7_SHIFT (2U)
  788. #define AIPS_PACRB_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP7_SHIFT)) & AIPS_PACRB_SP7_MASK)
  789. #define AIPS_PACRB_TP6_MASK (0x10U)
  790. #define AIPS_PACRB_TP6_SHIFT (4U)
  791. #define AIPS_PACRB_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP6_SHIFT)) & AIPS_PACRB_TP6_MASK)
  792. #define AIPS_PACRB_WP6_MASK (0x20U)
  793. #define AIPS_PACRB_WP6_SHIFT (5U)
  794. #define AIPS_PACRB_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP6_SHIFT)) & AIPS_PACRB_WP6_MASK)
  795. #define AIPS_PACRB_SP6_MASK (0x40U)
  796. #define AIPS_PACRB_SP6_SHIFT (6U)
  797. #define AIPS_PACRB_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP6_SHIFT)) & AIPS_PACRB_SP6_MASK)
  798. #define AIPS_PACRB_TP5_MASK (0x100U)
  799. #define AIPS_PACRB_TP5_SHIFT (8U)
  800. #define AIPS_PACRB_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP5_SHIFT)) & AIPS_PACRB_TP5_MASK)
  801. #define AIPS_PACRB_WP5_MASK (0x200U)
  802. #define AIPS_PACRB_WP5_SHIFT (9U)
  803. #define AIPS_PACRB_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP5_SHIFT)) & AIPS_PACRB_WP5_MASK)
  804. #define AIPS_PACRB_SP5_MASK (0x400U)
  805. #define AIPS_PACRB_SP5_SHIFT (10U)
  806. #define AIPS_PACRB_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP5_SHIFT)) & AIPS_PACRB_SP5_MASK)
  807. #define AIPS_PACRB_TP4_MASK (0x1000U)
  808. #define AIPS_PACRB_TP4_SHIFT (12U)
  809. #define AIPS_PACRB_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP4_SHIFT)) & AIPS_PACRB_TP4_MASK)
  810. #define AIPS_PACRB_WP4_MASK (0x2000U)
  811. #define AIPS_PACRB_WP4_SHIFT (13U)
  812. #define AIPS_PACRB_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP4_SHIFT)) & AIPS_PACRB_WP4_MASK)
  813. #define AIPS_PACRB_SP4_MASK (0x4000U)
  814. #define AIPS_PACRB_SP4_SHIFT (14U)
  815. #define AIPS_PACRB_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP4_SHIFT)) & AIPS_PACRB_SP4_MASK)
  816. #define AIPS_PACRB_TP3_MASK (0x10000U)
  817. #define AIPS_PACRB_TP3_SHIFT (16U)
  818. #define AIPS_PACRB_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP3_SHIFT)) & AIPS_PACRB_TP3_MASK)
  819. #define AIPS_PACRB_WP3_MASK (0x20000U)
  820. #define AIPS_PACRB_WP3_SHIFT (17U)
  821. #define AIPS_PACRB_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP3_SHIFT)) & AIPS_PACRB_WP3_MASK)
  822. #define AIPS_PACRB_SP3_MASK (0x40000U)
  823. #define AIPS_PACRB_SP3_SHIFT (18U)
  824. #define AIPS_PACRB_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP3_SHIFT)) & AIPS_PACRB_SP3_MASK)
  825. #define AIPS_PACRB_TP2_MASK (0x100000U)
  826. #define AIPS_PACRB_TP2_SHIFT (20U)
  827. #define AIPS_PACRB_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP2_SHIFT)) & AIPS_PACRB_TP2_MASK)
  828. #define AIPS_PACRB_WP2_MASK (0x200000U)
  829. #define AIPS_PACRB_WP2_SHIFT (21U)
  830. #define AIPS_PACRB_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP2_SHIFT)) & AIPS_PACRB_WP2_MASK)
  831. #define AIPS_PACRB_SP2_MASK (0x400000U)
  832. #define AIPS_PACRB_SP2_SHIFT (22U)
  833. #define AIPS_PACRB_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP2_SHIFT)) & AIPS_PACRB_SP2_MASK)
  834. #define AIPS_PACRB_TP1_MASK (0x1000000U)
  835. #define AIPS_PACRB_TP1_SHIFT (24U)
  836. #define AIPS_PACRB_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP1_SHIFT)) & AIPS_PACRB_TP1_MASK)
  837. #define AIPS_PACRB_WP1_MASK (0x2000000U)
  838. #define AIPS_PACRB_WP1_SHIFT (25U)
  839. #define AIPS_PACRB_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP1_SHIFT)) & AIPS_PACRB_WP1_MASK)
  840. #define AIPS_PACRB_SP1_MASK (0x4000000U)
  841. #define AIPS_PACRB_SP1_SHIFT (26U)
  842. #define AIPS_PACRB_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP1_SHIFT)) & AIPS_PACRB_SP1_MASK)
  843. #define AIPS_PACRB_TP0_MASK (0x10000000U)
  844. #define AIPS_PACRB_TP0_SHIFT (28U)
  845. #define AIPS_PACRB_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_TP0_SHIFT)) & AIPS_PACRB_TP0_MASK)
  846. #define AIPS_PACRB_WP0_MASK (0x20000000U)
  847. #define AIPS_PACRB_WP0_SHIFT (29U)
  848. #define AIPS_PACRB_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_WP0_SHIFT)) & AIPS_PACRB_WP0_MASK)
  849. #define AIPS_PACRB_SP0_MASK (0x40000000U)
  850. #define AIPS_PACRB_SP0_SHIFT (30U)
  851. #define AIPS_PACRB_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRB_SP0_SHIFT)) & AIPS_PACRB_SP0_MASK)
  852. /*! @name PACRC - Peripheral Access Control Register */
  853. #define AIPS_PACRC_TP7_MASK (0x1U)
  854. #define AIPS_PACRC_TP7_SHIFT (0U)
  855. #define AIPS_PACRC_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP7_SHIFT)) & AIPS_PACRC_TP7_MASK)
  856. #define AIPS_PACRC_WP7_MASK (0x2U)
  857. #define AIPS_PACRC_WP7_SHIFT (1U)
  858. #define AIPS_PACRC_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP7_SHIFT)) & AIPS_PACRC_WP7_MASK)
  859. #define AIPS_PACRC_SP7_MASK (0x4U)
  860. #define AIPS_PACRC_SP7_SHIFT (2U)
  861. #define AIPS_PACRC_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP7_SHIFT)) & AIPS_PACRC_SP7_MASK)
  862. #define AIPS_PACRC_TP6_MASK (0x10U)
  863. #define AIPS_PACRC_TP6_SHIFT (4U)
  864. #define AIPS_PACRC_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP6_SHIFT)) & AIPS_PACRC_TP6_MASK)
  865. #define AIPS_PACRC_WP6_MASK (0x20U)
  866. #define AIPS_PACRC_WP6_SHIFT (5U)
  867. #define AIPS_PACRC_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP6_SHIFT)) & AIPS_PACRC_WP6_MASK)
  868. #define AIPS_PACRC_SP6_MASK (0x40U)
  869. #define AIPS_PACRC_SP6_SHIFT (6U)
  870. #define AIPS_PACRC_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP6_SHIFT)) & AIPS_PACRC_SP6_MASK)
  871. #define AIPS_PACRC_TP5_MASK (0x100U)
  872. #define AIPS_PACRC_TP5_SHIFT (8U)
  873. #define AIPS_PACRC_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP5_SHIFT)) & AIPS_PACRC_TP5_MASK)
  874. #define AIPS_PACRC_WP5_MASK (0x200U)
  875. #define AIPS_PACRC_WP5_SHIFT (9U)
  876. #define AIPS_PACRC_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP5_SHIFT)) & AIPS_PACRC_WP5_MASK)
  877. #define AIPS_PACRC_SP5_MASK (0x400U)
  878. #define AIPS_PACRC_SP5_SHIFT (10U)
  879. #define AIPS_PACRC_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP5_SHIFT)) & AIPS_PACRC_SP5_MASK)
  880. #define AIPS_PACRC_TP4_MASK (0x1000U)
  881. #define AIPS_PACRC_TP4_SHIFT (12U)
  882. #define AIPS_PACRC_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP4_SHIFT)) & AIPS_PACRC_TP4_MASK)
  883. #define AIPS_PACRC_WP4_MASK (0x2000U)
  884. #define AIPS_PACRC_WP4_SHIFT (13U)
  885. #define AIPS_PACRC_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP4_SHIFT)) & AIPS_PACRC_WP4_MASK)
  886. #define AIPS_PACRC_SP4_MASK (0x4000U)
  887. #define AIPS_PACRC_SP4_SHIFT (14U)
  888. #define AIPS_PACRC_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP4_SHIFT)) & AIPS_PACRC_SP4_MASK)
  889. #define AIPS_PACRC_TP3_MASK (0x10000U)
  890. #define AIPS_PACRC_TP3_SHIFT (16U)
  891. #define AIPS_PACRC_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP3_SHIFT)) & AIPS_PACRC_TP3_MASK)
  892. #define AIPS_PACRC_WP3_MASK (0x20000U)
  893. #define AIPS_PACRC_WP3_SHIFT (17U)
  894. #define AIPS_PACRC_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP3_SHIFT)) & AIPS_PACRC_WP3_MASK)
  895. #define AIPS_PACRC_SP3_MASK (0x40000U)
  896. #define AIPS_PACRC_SP3_SHIFT (18U)
  897. #define AIPS_PACRC_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP3_SHIFT)) & AIPS_PACRC_SP3_MASK)
  898. #define AIPS_PACRC_TP2_MASK (0x100000U)
  899. #define AIPS_PACRC_TP2_SHIFT (20U)
  900. #define AIPS_PACRC_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP2_SHIFT)) & AIPS_PACRC_TP2_MASK)
  901. #define AIPS_PACRC_WP2_MASK (0x200000U)
  902. #define AIPS_PACRC_WP2_SHIFT (21U)
  903. #define AIPS_PACRC_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP2_SHIFT)) & AIPS_PACRC_WP2_MASK)
  904. #define AIPS_PACRC_SP2_MASK (0x400000U)
  905. #define AIPS_PACRC_SP2_SHIFT (22U)
  906. #define AIPS_PACRC_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP2_SHIFT)) & AIPS_PACRC_SP2_MASK)
  907. #define AIPS_PACRC_TP1_MASK (0x1000000U)
  908. #define AIPS_PACRC_TP1_SHIFT (24U)
  909. #define AIPS_PACRC_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP1_SHIFT)) & AIPS_PACRC_TP1_MASK)
  910. #define AIPS_PACRC_WP1_MASK (0x2000000U)
  911. #define AIPS_PACRC_WP1_SHIFT (25U)
  912. #define AIPS_PACRC_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP1_SHIFT)) & AIPS_PACRC_WP1_MASK)
  913. #define AIPS_PACRC_SP1_MASK (0x4000000U)
  914. #define AIPS_PACRC_SP1_SHIFT (26U)
  915. #define AIPS_PACRC_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP1_SHIFT)) & AIPS_PACRC_SP1_MASK)
  916. #define AIPS_PACRC_TP0_MASK (0x10000000U)
  917. #define AIPS_PACRC_TP0_SHIFT (28U)
  918. #define AIPS_PACRC_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_TP0_SHIFT)) & AIPS_PACRC_TP0_MASK)
  919. #define AIPS_PACRC_WP0_MASK (0x20000000U)
  920. #define AIPS_PACRC_WP0_SHIFT (29U)
  921. #define AIPS_PACRC_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_WP0_SHIFT)) & AIPS_PACRC_WP0_MASK)
  922. #define AIPS_PACRC_SP0_MASK (0x40000000U)
  923. #define AIPS_PACRC_SP0_SHIFT (30U)
  924. #define AIPS_PACRC_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRC_SP0_SHIFT)) & AIPS_PACRC_SP0_MASK)
  925. /*! @name PACRD - Peripheral Access Control Register */
  926. #define AIPS_PACRD_TP7_MASK (0x1U)
  927. #define AIPS_PACRD_TP7_SHIFT (0U)
  928. #define AIPS_PACRD_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP7_SHIFT)) & AIPS_PACRD_TP7_MASK)
  929. #define AIPS_PACRD_WP7_MASK (0x2U)
  930. #define AIPS_PACRD_WP7_SHIFT (1U)
  931. #define AIPS_PACRD_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP7_SHIFT)) & AIPS_PACRD_WP7_MASK)
  932. #define AIPS_PACRD_SP7_MASK (0x4U)
  933. #define AIPS_PACRD_SP7_SHIFT (2U)
  934. #define AIPS_PACRD_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP7_SHIFT)) & AIPS_PACRD_SP7_MASK)
  935. #define AIPS_PACRD_TP6_MASK (0x10U)
  936. #define AIPS_PACRD_TP6_SHIFT (4U)
  937. #define AIPS_PACRD_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP6_SHIFT)) & AIPS_PACRD_TP6_MASK)
  938. #define AIPS_PACRD_WP6_MASK (0x20U)
  939. #define AIPS_PACRD_WP6_SHIFT (5U)
  940. #define AIPS_PACRD_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP6_SHIFT)) & AIPS_PACRD_WP6_MASK)
  941. #define AIPS_PACRD_SP6_MASK (0x40U)
  942. #define AIPS_PACRD_SP6_SHIFT (6U)
  943. #define AIPS_PACRD_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP6_SHIFT)) & AIPS_PACRD_SP6_MASK)
  944. #define AIPS_PACRD_TP5_MASK (0x100U)
  945. #define AIPS_PACRD_TP5_SHIFT (8U)
  946. #define AIPS_PACRD_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP5_SHIFT)) & AIPS_PACRD_TP5_MASK)
  947. #define AIPS_PACRD_WP5_MASK (0x200U)
  948. #define AIPS_PACRD_WP5_SHIFT (9U)
  949. #define AIPS_PACRD_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP5_SHIFT)) & AIPS_PACRD_WP5_MASK)
  950. #define AIPS_PACRD_SP5_MASK (0x400U)
  951. #define AIPS_PACRD_SP5_SHIFT (10U)
  952. #define AIPS_PACRD_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP5_SHIFT)) & AIPS_PACRD_SP5_MASK)
  953. #define AIPS_PACRD_TP4_MASK (0x1000U)
  954. #define AIPS_PACRD_TP4_SHIFT (12U)
  955. #define AIPS_PACRD_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP4_SHIFT)) & AIPS_PACRD_TP4_MASK)
  956. #define AIPS_PACRD_WP4_MASK (0x2000U)
  957. #define AIPS_PACRD_WP4_SHIFT (13U)
  958. #define AIPS_PACRD_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP4_SHIFT)) & AIPS_PACRD_WP4_MASK)
  959. #define AIPS_PACRD_SP4_MASK (0x4000U)
  960. #define AIPS_PACRD_SP4_SHIFT (14U)
  961. #define AIPS_PACRD_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP4_SHIFT)) & AIPS_PACRD_SP4_MASK)
  962. #define AIPS_PACRD_TP3_MASK (0x10000U)
  963. #define AIPS_PACRD_TP3_SHIFT (16U)
  964. #define AIPS_PACRD_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP3_SHIFT)) & AIPS_PACRD_TP3_MASK)
  965. #define AIPS_PACRD_WP3_MASK (0x20000U)
  966. #define AIPS_PACRD_WP3_SHIFT (17U)
  967. #define AIPS_PACRD_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP3_SHIFT)) & AIPS_PACRD_WP3_MASK)
  968. #define AIPS_PACRD_SP3_MASK (0x40000U)
  969. #define AIPS_PACRD_SP3_SHIFT (18U)
  970. #define AIPS_PACRD_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP3_SHIFT)) & AIPS_PACRD_SP3_MASK)
  971. #define AIPS_PACRD_TP2_MASK (0x100000U)
  972. #define AIPS_PACRD_TP2_SHIFT (20U)
  973. #define AIPS_PACRD_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP2_SHIFT)) & AIPS_PACRD_TP2_MASK)
  974. #define AIPS_PACRD_WP2_MASK (0x200000U)
  975. #define AIPS_PACRD_WP2_SHIFT (21U)
  976. #define AIPS_PACRD_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP2_SHIFT)) & AIPS_PACRD_WP2_MASK)
  977. #define AIPS_PACRD_SP2_MASK (0x400000U)
  978. #define AIPS_PACRD_SP2_SHIFT (22U)
  979. #define AIPS_PACRD_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP2_SHIFT)) & AIPS_PACRD_SP2_MASK)
  980. #define AIPS_PACRD_TP1_MASK (0x1000000U)
  981. #define AIPS_PACRD_TP1_SHIFT (24U)
  982. #define AIPS_PACRD_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP1_SHIFT)) & AIPS_PACRD_TP1_MASK)
  983. #define AIPS_PACRD_WP1_MASK (0x2000000U)
  984. #define AIPS_PACRD_WP1_SHIFT (25U)
  985. #define AIPS_PACRD_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP1_SHIFT)) & AIPS_PACRD_WP1_MASK)
  986. #define AIPS_PACRD_SP1_MASK (0x4000000U)
  987. #define AIPS_PACRD_SP1_SHIFT (26U)
  988. #define AIPS_PACRD_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP1_SHIFT)) & AIPS_PACRD_SP1_MASK)
  989. #define AIPS_PACRD_TP0_MASK (0x10000000U)
  990. #define AIPS_PACRD_TP0_SHIFT (28U)
  991. #define AIPS_PACRD_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_TP0_SHIFT)) & AIPS_PACRD_TP0_MASK)
  992. #define AIPS_PACRD_WP0_MASK (0x20000000U)
  993. #define AIPS_PACRD_WP0_SHIFT (29U)
  994. #define AIPS_PACRD_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_WP0_SHIFT)) & AIPS_PACRD_WP0_MASK)
  995. #define AIPS_PACRD_SP0_MASK (0x40000000U)
  996. #define AIPS_PACRD_SP0_SHIFT (30U)
  997. #define AIPS_PACRD_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRD_SP0_SHIFT)) & AIPS_PACRD_SP0_MASK)
  998. /*! @name PACRE - Peripheral Access Control Register */
  999. #define AIPS_PACRE_TP7_MASK (0x1U)
  1000. #define AIPS_PACRE_TP7_SHIFT (0U)
  1001. #define AIPS_PACRE_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP7_SHIFT)) & AIPS_PACRE_TP7_MASK)
  1002. #define AIPS_PACRE_WP7_MASK (0x2U)
  1003. #define AIPS_PACRE_WP7_SHIFT (1U)
  1004. #define AIPS_PACRE_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP7_SHIFT)) & AIPS_PACRE_WP7_MASK)
  1005. #define AIPS_PACRE_SP7_MASK (0x4U)
  1006. #define AIPS_PACRE_SP7_SHIFT (2U)
  1007. #define AIPS_PACRE_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP7_SHIFT)) & AIPS_PACRE_SP7_MASK)
  1008. #define AIPS_PACRE_TP6_MASK (0x10U)
  1009. #define AIPS_PACRE_TP6_SHIFT (4U)
  1010. #define AIPS_PACRE_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP6_SHIFT)) & AIPS_PACRE_TP6_MASK)
  1011. #define AIPS_PACRE_WP6_MASK (0x20U)
  1012. #define AIPS_PACRE_WP6_SHIFT (5U)
  1013. #define AIPS_PACRE_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP6_SHIFT)) & AIPS_PACRE_WP6_MASK)
  1014. #define AIPS_PACRE_SP6_MASK (0x40U)
  1015. #define AIPS_PACRE_SP6_SHIFT (6U)
  1016. #define AIPS_PACRE_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP6_SHIFT)) & AIPS_PACRE_SP6_MASK)
  1017. #define AIPS_PACRE_TP5_MASK (0x100U)
  1018. #define AIPS_PACRE_TP5_SHIFT (8U)
  1019. #define AIPS_PACRE_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP5_SHIFT)) & AIPS_PACRE_TP5_MASK)
  1020. #define AIPS_PACRE_WP5_MASK (0x200U)
  1021. #define AIPS_PACRE_WP5_SHIFT (9U)
  1022. #define AIPS_PACRE_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP5_SHIFT)) & AIPS_PACRE_WP5_MASK)
  1023. #define AIPS_PACRE_SP5_MASK (0x400U)
  1024. #define AIPS_PACRE_SP5_SHIFT (10U)
  1025. #define AIPS_PACRE_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP5_SHIFT)) & AIPS_PACRE_SP5_MASK)
  1026. #define AIPS_PACRE_TP4_MASK (0x1000U)
  1027. #define AIPS_PACRE_TP4_SHIFT (12U)
  1028. #define AIPS_PACRE_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP4_SHIFT)) & AIPS_PACRE_TP4_MASK)
  1029. #define AIPS_PACRE_WP4_MASK (0x2000U)
  1030. #define AIPS_PACRE_WP4_SHIFT (13U)
  1031. #define AIPS_PACRE_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP4_SHIFT)) & AIPS_PACRE_WP4_MASK)
  1032. #define AIPS_PACRE_SP4_MASK (0x4000U)
  1033. #define AIPS_PACRE_SP4_SHIFT (14U)
  1034. #define AIPS_PACRE_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP4_SHIFT)) & AIPS_PACRE_SP4_MASK)
  1035. #define AIPS_PACRE_TP3_MASK (0x10000U)
  1036. #define AIPS_PACRE_TP3_SHIFT (16U)
  1037. #define AIPS_PACRE_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP3_SHIFT)) & AIPS_PACRE_TP3_MASK)
  1038. #define AIPS_PACRE_WP3_MASK (0x20000U)
  1039. #define AIPS_PACRE_WP3_SHIFT (17U)
  1040. #define AIPS_PACRE_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP3_SHIFT)) & AIPS_PACRE_WP3_MASK)
  1041. #define AIPS_PACRE_SP3_MASK (0x40000U)
  1042. #define AIPS_PACRE_SP3_SHIFT (18U)
  1043. #define AIPS_PACRE_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP3_SHIFT)) & AIPS_PACRE_SP3_MASK)
  1044. #define AIPS_PACRE_TP2_MASK (0x100000U)
  1045. #define AIPS_PACRE_TP2_SHIFT (20U)
  1046. #define AIPS_PACRE_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP2_SHIFT)) & AIPS_PACRE_TP2_MASK)
  1047. #define AIPS_PACRE_WP2_MASK (0x200000U)
  1048. #define AIPS_PACRE_WP2_SHIFT (21U)
  1049. #define AIPS_PACRE_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP2_SHIFT)) & AIPS_PACRE_WP2_MASK)
  1050. #define AIPS_PACRE_SP2_MASK (0x400000U)
  1051. #define AIPS_PACRE_SP2_SHIFT (22U)
  1052. #define AIPS_PACRE_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP2_SHIFT)) & AIPS_PACRE_SP2_MASK)
  1053. #define AIPS_PACRE_TP1_MASK (0x1000000U)
  1054. #define AIPS_PACRE_TP1_SHIFT (24U)
  1055. #define AIPS_PACRE_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP1_SHIFT)) & AIPS_PACRE_TP1_MASK)
  1056. #define AIPS_PACRE_WP1_MASK (0x2000000U)
  1057. #define AIPS_PACRE_WP1_SHIFT (25U)
  1058. #define AIPS_PACRE_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP1_SHIFT)) & AIPS_PACRE_WP1_MASK)
  1059. #define AIPS_PACRE_SP1_MASK (0x4000000U)
  1060. #define AIPS_PACRE_SP1_SHIFT (26U)
  1061. #define AIPS_PACRE_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP1_SHIFT)) & AIPS_PACRE_SP1_MASK)
  1062. #define AIPS_PACRE_TP0_MASK (0x10000000U)
  1063. #define AIPS_PACRE_TP0_SHIFT (28U)
  1064. #define AIPS_PACRE_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_TP0_SHIFT)) & AIPS_PACRE_TP0_MASK)
  1065. #define AIPS_PACRE_WP0_MASK (0x20000000U)
  1066. #define AIPS_PACRE_WP0_SHIFT (29U)
  1067. #define AIPS_PACRE_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_WP0_SHIFT)) & AIPS_PACRE_WP0_MASK)
  1068. #define AIPS_PACRE_SP0_MASK (0x40000000U)
  1069. #define AIPS_PACRE_SP0_SHIFT (30U)
  1070. #define AIPS_PACRE_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRE_SP0_SHIFT)) & AIPS_PACRE_SP0_MASK)
  1071. /*! @name PACRF - Peripheral Access Control Register */
  1072. #define AIPS_PACRF_TP7_MASK (0x1U)
  1073. #define AIPS_PACRF_TP7_SHIFT (0U)
  1074. #define AIPS_PACRF_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP7_SHIFT)) & AIPS_PACRF_TP7_MASK)
  1075. #define AIPS_PACRF_WP7_MASK (0x2U)
  1076. #define AIPS_PACRF_WP7_SHIFT (1U)
  1077. #define AIPS_PACRF_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP7_SHIFT)) & AIPS_PACRF_WP7_MASK)
  1078. #define AIPS_PACRF_SP7_MASK (0x4U)
  1079. #define AIPS_PACRF_SP7_SHIFT (2U)
  1080. #define AIPS_PACRF_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP7_SHIFT)) & AIPS_PACRF_SP7_MASK)
  1081. #define AIPS_PACRF_TP6_MASK (0x10U)
  1082. #define AIPS_PACRF_TP6_SHIFT (4U)
  1083. #define AIPS_PACRF_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP6_SHIFT)) & AIPS_PACRF_TP6_MASK)
  1084. #define AIPS_PACRF_WP6_MASK (0x20U)
  1085. #define AIPS_PACRF_WP6_SHIFT (5U)
  1086. #define AIPS_PACRF_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP6_SHIFT)) & AIPS_PACRF_WP6_MASK)
  1087. #define AIPS_PACRF_SP6_MASK (0x40U)
  1088. #define AIPS_PACRF_SP6_SHIFT (6U)
  1089. #define AIPS_PACRF_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP6_SHIFT)) & AIPS_PACRF_SP6_MASK)
  1090. #define AIPS_PACRF_TP5_MASK (0x100U)
  1091. #define AIPS_PACRF_TP5_SHIFT (8U)
  1092. #define AIPS_PACRF_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP5_SHIFT)) & AIPS_PACRF_TP5_MASK)
  1093. #define AIPS_PACRF_WP5_MASK (0x200U)
  1094. #define AIPS_PACRF_WP5_SHIFT (9U)
  1095. #define AIPS_PACRF_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP5_SHIFT)) & AIPS_PACRF_WP5_MASK)
  1096. #define AIPS_PACRF_SP5_MASK (0x400U)
  1097. #define AIPS_PACRF_SP5_SHIFT (10U)
  1098. #define AIPS_PACRF_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP5_SHIFT)) & AIPS_PACRF_SP5_MASK)
  1099. #define AIPS_PACRF_TP4_MASK (0x1000U)
  1100. #define AIPS_PACRF_TP4_SHIFT (12U)
  1101. #define AIPS_PACRF_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP4_SHIFT)) & AIPS_PACRF_TP4_MASK)
  1102. #define AIPS_PACRF_WP4_MASK (0x2000U)
  1103. #define AIPS_PACRF_WP4_SHIFT (13U)
  1104. #define AIPS_PACRF_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP4_SHIFT)) & AIPS_PACRF_WP4_MASK)
  1105. #define AIPS_PACRF_SP4_MASK (0x4000U)
  1106. #define AIPS_PACRF_SP4_SHIFT (14U)
  1107. #define AIPS_PACRF_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP4_SHIFT)) & AIPS_PACRF_SP4_MASK)
  1108. #define AIPS_PACRF_TP3_MASK (0x10000U)
  1109. #define AIPS_PACRF_TP3_SHIFT (16U)
  1110. #define AIPS_PACRF_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP3_SHIFT)) & AIPS_PACRF_TP3_MASK)
  1111. #define AIPS_PACRF_WP3_MASK (0x20000U)
  1112. #define AIPS_PACRF_WP3_SHIFT (17U)
  1113. #define AIPS_PACRF_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP3_SHIFT)) & AIPS_PACRF_WP3_MASK)
  1114. #define AIPS_PACRF_SP3_MASK (0x40000U)
  1115. #define AIPS_PACRF_SP3_SHIFT (18U)
  1116. #define AIPS_PACRF_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP3_SHIFT)) & AIPS_PACRF_SP3_MASK)
  1117. #define AIPS_PACRF_TP2_MASK (0x100000U)
  1118. #define AIPS_PACRF_TP2_SHIFT (20U)
  1119. #define AIPS_PACRF_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP2_SHIFT)) & AIPS_PACRF_TP2_MASK)
  1120. #define AIPS_PACRF_WP2_MASK (0x200000U)
  1121. #define AIPS_PACRF_WP2_SHIFT (21U)
  1122. #define AIPS_PACRF_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP2_SHIFT)) & AIPS_PACRF_WP2_MASK)
  1123. #define AIPS_PACRF_SP2_MASK (0x400000U)
  1124. #define AIPS_PACRF_SP2_SHIFT (22U)
  1125. #define AIPS_PACRF_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP2_SHIFT)) & AIPS_PACRF_SP2_MASK)
  1126. #define AIPS_PACRF_TP1_MASK (0x1000000U)
  1127. #define AIPS_PACRF_TP1_SHIFT (24U)
  1128. #define AIPS_PACRF_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP1_SHIFT)) & AIPS_PACRF_TP1_MASK)
  1129. #define AIPS_PACRF_WP1_MASK (0x2000000U)
  1130. #define AIPS_PACRF_WP1_SHIFT (25U)
  1131. #define AIPS_PACRF_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP1_SHIFT)) & AIPS_PACRF_WP1_MASK)
  1132. #define AIPS_PACRF_SP1_MASK (0x4000000U)
  1133. #define AIPS_PACRF_SP1_SHIFT (26U)
  1134. #define AIPS_PACRF_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP1_SHIFT)) & AIPS_PACRF_SP1_MASK)
  1135. #define AIPS_PACRF_TP0_MASK (0x10000000U)
  1136. #define AIPS_PACRF_TP0_SHIFT (28U)
  1137. #define AIPS_PACRF_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_TP0_SHIFT)) & AIPS_PACRF_TP0_MASK)
  1138. #define AIPS_PACRF_WP0_MASK (0x20000000U)
  1139. #define AIPS_PACRF_WP0_SHIFT (29U)
  1140. #define AIPS_PACRF_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_WP0_SHIFT)) & AIPS_PACRF_WP0_MASK)
  1141. #define AIPS_PACRF_SP0_MASK (0x40000000U)
  1142. #define AIPS_PACRF_SP0_SHIFT (30U)
  1143. #define AIPS_PACRF_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRF_SP0_SHIFT)) & AIPS_PACRF_SP0_MASK)
  1144. /*! @name PACRG - Peripheral Access Control Register */
  1145. #define AIPS_PACRG_TP7_MASK (0x1U)
  1146. #define AIPS_PACRG_TP7_SHIFT (0U)
  1147. #define AIPS_PACRG_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP7_SHIFT)) & AIPS_PACRG_TP7_MASK)
  1148. #define AIPS_PACRG_WP7_MASK (0x2U)
  1149. #define AIPS_PACRG_WP7_SHIFT (1U)
  1150. #define AIPS_PACRG_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP7_SHIFT)) & AIPS_PACRG_WP7_MASK)
  1151. #define AIPS_PACRG_SP7_MASK (0x4U)
  1152. #define AIPS_PACRG_SP7_SHIFT (2U)
  1153. #define AIPS_PACRG_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP7_SHIFT)) & AIPS_PACRG_SP7_MASK)
  1154. #define AIPS_PACRG_TP6_MASK (0x10U)
  1155. #define AIPS_PACRG_TP6_SHIFT (4U)
  1156. #define AIPS_PACRG_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP6_SHIFT)) & AIPS_PACRG_TP6_MASK)
  1157. #define AIPS_PACRG_WP6_MASK (0x20U)
  1158. #define AIPS_PACRG_WP6_SHIFT (5U)
  1159. #define AIPS_PACRG_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP6_SHIFT)) & AIPS_PACRG_WP6_MASK)
  1160. #define AIPS_PACRG_SP6_MASK (0x40U)
  1161. #define AIPS_PACRG_SP6_SHIFT (6U)
  1162. #define AIPS_PACRG_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP6_SHIFT)) & AIPS_PACRG_SP6_MASK)
  1163. #define AIPS_PACRG_TP5_MASK (0x100U)
  1164. #define AIPS_PACRG_TP5_SHIFT (8U)
  1165. #define AIPS_PACRG_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP5_SHIFT)) & AIPS_PACRG_TP5_MASK)
  1166. #define AIPS_PACRG_WP5_MASK (0x200U)
  1167. #define AIPS_PACRG_WP5_SHIFT (9U)
  1168. #define AIPS_PACRG_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP5_SHIFT)) & AIPS_PACRG_WP5_MASK)
  1169. #define AIPS_PACRG_SP5_MASK (0x400U)
  1170. #define AIPS_PACRG_SP5_SHIFT (10U)
  1171. #define AIPS_PACRG_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP5_SHIFT)) & AIPS_PACRG_SP5_MASK)
  1172. #define AIPS_PACRG_TP4_MASK (0x1000U)
  1173. #define AIPS_PACRG_TP4_SHIFT (12U)
  1174. #define AIPS_PACRG_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP4_SHIFT)) & AIPS_PACRG_TP4_MASK)
  1175. #define AIPS_PACRG_WP4_MASK (0x2000U)
  1176. #define AIPS_PACRG_WP4_SHIFT (13U)
  1177. #define AIPS_PACRG_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP4_SHIFT)) & AIPS_PACRG_WP4_MASK)
  1178. #define AIPS_PACRG_SP4_MASK (0x4000U)
  1179. #define AIPS_PACRG_SP4_SHIFT (14U)
  1180. #define AIPS_PACRG_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP4_SHIFT)) & AIPS_PACRG_SP4_MASK)
  1181. #define AIPS_PACRG_TP3_MASK (0x10000U)
  1182. #define AIPS_PACRG_TP3_SHIFT (16U)
  1183. #define AIPS_PACRG_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP3_SHIFT)) & AIPS_PACRG_TP3_MASK)
  1184. #define AIPS_PACRG_WP3_MASK (0x20000U)
  1185. #define AIPS_PACRG_WP3_SHIFT (17U)
  1186. #define AIPS_PACRG_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP3_SHIFT)) & AIPS_PACRG_WP3_MASK)
  1187. #define AIPS_PACRG_SP3_MASK (0x40000U)
  1188. #define AIPS_PACRG_SP3_SHIFT (18U)
  1189. #define AIPS_PACRG_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP3_SHIFT)) & AIPS_PACRG_SP3_MASK)
  1190. #define AIPS_PACRG_TP2_MASK (0x100000U)
  1191. #define AIPS_PACRG_TP2_SHIFT (20U)
  1192. #define AIPS_PACRG_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP2_SHIFT)) & AIPS_PACRG_TP2_MASK)
  1193. #define AIPS_PACRG_WP2_MASK (0x200000U)
  1194. #define AIPS_PACRG_WP2_SHIFT (21U)
  1195. #define AIPS_PACRG_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP2_SHIFT)) & AIPS_PACRG_WP2_MASK)
  1196. #define AIPS_PACRG_SP2_MASK (0x400000U)
  1197. #define AIPS_PACRG_SP2_SHIFT (22U)
  1198. #define AIPS_PACRG_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP2_SHIFT)) & AIPS_PACRG_SP2_MASK)
  1199. #define AIPS_PACRG_TP1_MASK (0x1000000U)
  1200. #define AIPS_PACRG_TP1_SHIFT (24U)
  1201. #define AIPS_PACRG_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP1_SHIFT)) & AIPS_PACRG_TP1_MASK)
  1202. #define AIPS_PACRG_WP1_MASK (0x2000000U)
  1203. #define AIPS_PACRG_WP1_SHIFT (25U)
  1204. #define AIPS_PACRG_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP1_SHIFT)) & AIPS_PACRG_WP1_MASK)
  1205. #define AIPS_PACRG_SP1_MASK (0x4000000U)
  1206. #define AIPS_PACRG_SP1_SHIFT (26U)
  1207. #define AIPS_PACRG_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP1_SHIFT)) & AIPS_PACRG_SP1_MASK)
  1208. #define AIPS_PACRG_TP0_MASK (0x10000000U)
  1209. #define AIPS_PACRG_TP0_SHIFT (28U)
  1210. #define AIPS_PACRG_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_TP0_SHIFT)) & AIPS_PACRG_TP0_MASK)
  1211. #define AIPS_PACRG_WP0_MASK (0x20000000U)
  1212. #define AIPS_PACRG_WP0_SHIFT (29U)
  1213. #define AIPS_PACRG_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_WP0_SHIFT)) & AIPS_PACRG_WP0_MASK)
  1214. #define AIPS_PACRG_SP0_MASK (0x40000000U)
  1215. #define AIPS_PACRG_SP0_SHIFT (30U)
  1216. #define AIPS_PACRG_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRG_SP0_SHIFT)) & AIPS_PACRG_SP0_MASK)
  1217. /*! @name PACRH - Peripheral Access Control Register */
  1218. #define AIPS_PACRH_TP7_MASK (0x1U)
  1219. #define AIPS_PACRH_TP7_SHIFT (0U)
  1220. #define AIPS_PACRH_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP7_SHIFT)) & AIPS_PACRH_TP7_MASK)
  1221. #define AIPS_PACRH_WP7_MASK (0x2U)
  1222. #define AIPS_PACRH_WP7_SHIFT (1U)
  1223. #define AIPS_PACRH_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP7_SHIFT)) & AIPS_PACRH_WP7_MASK)
  1224. #define AIPS_PACRH_SP7_MASK (0x4U)
  1225. #define AIPS_PACRH_SP7_SHIFT (2U)
  1226. #define AIPS_PACRH_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP7_SHIFT)) & AIPS_PACRH_SP7_MASK)
  1227. #define AIPS_PACRH_TP6_MASK (0x10U)
  1228. #define AIPS_PACRH_TP6_SHIFT (4U)
  1229. #define AIPS_PACRH_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP6_SHIFT)) & AIPS_PACRH_TP6_MASK)
  1230. #define AIPS_PACRH_WP6_MASK (0x20U)
  1231. #define AIPS_PACRH_WP6_SHIFT (5U)
  1232. #define AIPS_PACRH_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP6_SHIFT)) & AIPS_PACRH_WP6_MASK)
  1233. #define AIPS_PACRH_SP6_MASK (0x40U)
  1234. #define AIPS_PACRH_SP6_SHIFT (6U)
  1235. #define AIPS_PACRH_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP6_SHIFT)) & AIPS_PACRH_SP6_MASK)
  1236. #define AIPS_PACRH_TP5_MASK (0x100U)
  1237. #define AIPS_PACRH_TP5_SHIFT (8U)
  1238. #define AIPS_PACRH_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP5_SHIFT)) & AIPS_PACRH_TP5_MASK)
  1239. #define AIPS_PACRH_WP5_MASK (0x200U)
  1240. #define AIPS_PACRH_WP5_SHIFT (9U)
  1241. #define AIPS_PACRH_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP5_SHIFT)) & AIPS_PACRH_WP5_MASK)
  1242. #define AIPS_PACRH_SP5_MASK (0x400U)
  1243. #define AIPS_PACRH_SP5_SHIFT (10U)
  1244. #define AIPS_PACRH_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP5_SHIFT)) & AIPS_PACRH_SP5_MASK)
  1245. #define AIPS_PACRH_TP4_MASK (0x1000U)
  1246. #define AIPS_PACRH_TP4_SHIFT (12U)
  1247. #define AIPS_PACRH_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP4_SHIFT)) & AIPS_PACRH_TP4_MASK)
  1248. #define AIPS_PACRH_WP4_MASK (0x2000U)
  1249. #define AIPS_PACRH_WP4_SHIFT (13U)
  1250. #define AIPS_PACRH_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP4_SHIFT)) & AIPS_PACRH_WP4_MASK)
  1251. #define AIPS_PACRH_SP4_MASK (0x4000U)
  1252. #define AIPS_PACRH_SP4_SHIFT (14U)
  1253. #define AIPS_PACRH_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP4_SHIFT)) & AIPS_PACRH_SP4_MASK)
  1254. #define AIPS_PACRH_TP3_MASK (0x10000U)
  1255. #define AIPS_PACRH_TP3_SHIFT (16U)
  1256. #define AIPS_PACRH_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP3_SHIFT)) & AIPS_PACRH_TP3_MASK)
  1257. #define AIPS_PACRH_WP3_MASK (0x20000U)
  1258. #define AIPS_PACRH_WP3_SHIFT (17U)
  1259. #define AIPS_PACRH_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP3_SHIFT)) & AIPS_PACRH_WP3_MASK)
  1260. #define AIPS_PACRH_SP3_MASK (0x40000U)
  1261. #define AIPS_PACRH_SP3_SHIFT (18U)
  1262. #define AIPS_PACRH_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP3_SHIFT)) & AIPS_PACRH_SP3_MASK)
  1263. #define AIPS_PACRH_TP2_MASK (0x100000U)
  1264. #define AIPS_PACRH_TP2_SHIFT (20U)
  1265. #define AIPS_PACRH_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP2_SHIFT)) & AIPS_PACRH_TP2_MASK)
  1266. #define AIPS_PACRH_WP2_MASK (0x200000U)
  1267. #define AIPS_PACRH_WP2_SHIFT (21U)
  1268. #define AIPS_PACRH_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP2_SHIFT)) & AIPS_PACRH_WP2_MASK)
  1269. #define AIPS_PACRH_SP2_MASK (0x400000U)
  1270. #define AIPS_PACRH_SP2_SHIFT (22U)
  1271. #define AIPS_PACRH_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP2_SHIFT)) & AIPS_PACRH_SP2_MASK)
  1272. #define AIPS_PACRH_TP1_MASK (0x1000000U)
  1273. #define AIPS_PACRH_TP1_SHIFT (24U)
  1274. #define AIPS_PACRH_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP1_SHIFT)) & AIPS_PACRH_TP1_MASK)
  1275. #define AIPS_PACRH_WP1_MASK (0x2000000U)
  1276. #define AIPS_PACRH_WP1_SHIFT (25U)
  1277. #define AIPS_PACRH_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP1_SHIFT)) & AIPS_PACRH_WP1_MASK)
  1278. #define AIPS_PACRH_SP1_MASK (0x4000000U)
  1279. #define AIPS_PACRH_SP1_SHIFT (26U)
  1280. #define AIPS_PACRH_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP1_SHIFT)) & AIPS_PACRH_SP1_MASK)
  1281. #define AIPS_PACRH_TP0_MASK (0x10000000U)
  1282. #define AIPS_PACRH_TP0_SHIFT (28U)
  1283. #define AIPS_PACRH_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_TP0_SHIFT)) & AIPS_PACRH_TP0_MASK)
  1284. #define AIPS_PACRH_WP0_MASK (0x20000000U)
  1285. #define AIPS_PACRH_WP0_SHIFT (29U)
  1286. #define AIPS_PACRH_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_WP0_SHIFT)) & AIPS_PACRH_WP0_MASK)
  1287. #define AIPS_PACRH_SP0_MASK (0x40000000U)
  1288. #define AIPS_PACRH_SP0_SHIFT (30U)
  1289. #define AIPS_PACRH_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRH_SP0_SHIFT)) & AIPS_PACRH_SP0_MASK)
  1290. /*! @name PACRI - Peripheral Access Control Register */
  1291. #define AIPS_PACRI_TP7_MASK (0x1U)
  1292. #define AIPS_PACRI_TP7_SHIFT (0U)
  1293. #define AIPS_PACRI_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP7_SHIFT)) & AIPS_PACRI_TP7_MASK)
  1294. #define AIPS_PACRI_WP7_MASK (0x2U)
  1295. #define AIPS_PACRI_WP7_SHIFT (1U)
  1296. #define AIPS_PACRI_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP7_SHIFT)) & AIPS_PACRI_WP7_MASK)
  1297. #define AIPS_PACRI_SP7_MASK (0x4U)
  1298. #define AIPS_PACRI_SP7_SHIFT (2U)
  1299. #define AIPS_PACRI_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP7_SHIFT)) & AIPS_PACRI_SP7_MASK)
  1300. #define AIPS_PACRI_TP6_MASK (0x10U)
  1301. #define AIPS_PACRI_TP6_SHIFT (4U)
  1302. #define AIPS_PACRI_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP6_SHIFT)) & AIPS_PACRI_TP6_MASK)
  1303. #define AIPS_PACRI_WP6_MASK (0x20U)
  1304. #define AIPS_PACRI_WP6_SHIFT (5U)
  1305. #define AIPS_PACRI_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP6_SHIFT)) & AIPS_PACRI_WP6_MASK)
  1306. #define AIPS_PACRI_SP6_MASK (0x40U)
  1307. #define AIPS_PACRI_SP6_SHIFT (6U)
  1308. #define AIPS_PACRI_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP6_SHIFT)) & AIPS_PACRI_SP6_MASK)
  1309. #define AIPS_PACRI_TP5_MASK (0x100U)
  1310. #define AIPS_PACRI_TP5_SHIFT (8U)
  1311. #define AIPS_PACRI_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP5_SHIFT)) & AIPS_PACRI_TP5_MASK)
  1312. #define AIPS_PACRI_WP5_MASK (0x200U)
  1313. #define AIPS_PACRI_WP5_SHIFT (9U)
  1314. #define AIPS_PACRI_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP5_SHIFT)) & AIPS_PACRI_WP5_MASK)
  1315. #define AIPS_PACRI_SP5_MASK (0x400U)
  1316. #define AIPS_PACRI_SP5_SHIFT (10U)
  1317. #define AIPS_PACRI_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP5_SHIFT)) & AIPS_PACRI_SP5_MASK)
  1318. #define AIPS_PACRI_TP4_MASK (0x1000U)
  1319. #define AIPS_PACRI_TP4_SHIFT (12U)
  1320. #define AIPS_PACRI_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP4_SHIFT)) & AIPS_PACRI_TP4_MASK)
  1321. #define AIPS_PACRI_WP4_MASK (0x2000U)
  1322. #define AIPS_PACRI_WP4_SHIFT (13U)
  1323. #define AIPS_PACRI_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP4_SHIFT)) & AIPS_PACRI_WP4_MASK)
  1324. #define AIPS_PACRI_SP4_MASK (0x4000U)
  1325. #define AIPS_PACRI_SP4_SHIFT (14U)
  1326. #define AIPS_PACRI_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP4_SHIFT)) & AIPS_PACRI_SP4_MASK)
  1327. #define AIPS_PACRI_TP3_MASK (0x10000U)
  1328. #define AIPS_PACRI_TP3_SHIFT (16U)
  1329. #define AIPS_PACRI_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP3_SHIFT)) & AIPS_PACRI_TP3_MASK)
  1330. #define AIPS_PACRI_WP3_MASK (0x20000U)
  1331. #define AIPS_PACRI_WP3_SHIFT (17U)
  1332. #define AIPS_PACRI_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP3_SHIFT)) & AIPS_PACRI_WP3_MASK)
  1333. #define AIPS_PACRI_SP3_MASK (0x40000U)
  1334. #define AIPS_PACRI_SP3_SHIFT (18U)
  1335. #define AIPS_PACRI_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP3_SHIFT)) & AIPS_PACRI_SP3_MASK)
  1336. #define AIPS_PACRI_TP2_MASK (0x100000U)
  1337. #define AIPS_PACRI_TP2_SHIFT (20U)
  1338. #define AIPS_PACRI_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP2_SHIFT)) & AIPS_PACRI_TP2_MASK)
  1339. #define AIPS_PACRI_WP2_MASK (0x200000U)
  1340. #define AIPS_PACRI_WP2_SHIFT (21U)
  1341. #define AIPS_PACRI_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP2_SHIFT)) & AIPS_PACRI_WP2_MASK)
  1342. #define AIPS_PACRI_SP2_MASK (0x400000U)
  1343. #define AIPS_PACRI_SP2_SHIFT (22U)
  1344. #define AIPS_PACRI_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP2_SHIFT)) & AIPS_PACRI_SP2_MASK)
  1345. #define AIPS_PACRI_TP1_MASK (0x1000000U)
  1346. #define AIPS_PACRI_TP1_SHIFT (24U)
  1347. #define AIPS_PACRI_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP1_SHIFT)) & AIPS_PACRI_TP1_MASK)
  1348. #define AIPS_PACRI_WP1_MASK (0x2000000U)
  1349. #define AIPS_PACRI_WP1_SHIFT (25U)
  1350. #define AIPS_PACRI_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP1_SHIFT)) & AIPS_PACRI_WP1_MASK)
  1351. #define AIPS_PACRI_SP1_MASK (0x4000000U)
  1352. #define AIPS_PACRI_SP1_SHIFT (26U)
  1353. #define AIPS_PACRI_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP1_SHIFT)) & AIPS_PACRI_SP1_MASK)
  1354. #define AIPS_PACRI_TP0_MASK (0x10000000U)
  1355. #define AIPS_PACRI_TP0_SHIFT (28U)
  1356. #define AIPS_PACRI_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_TP0_SHIFT)) & AIPS_PACRI_TP0_MASK)
  1357. #define AIPS_PACRI_WP0_MASK (0x20000000U)
  1358. #define AIPS_PACRI_WP0_SHIFT (29U)
  1359. #define AIPS_PACRI_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_WP0_SHIFT)) & AIPS_PACRI_WP0_MASK)
  1360. #define AIPS_PACRI_SP0_MASK (0x40000000U)
  1361. #define AIPS_PACRI_SP0_SHIFT (30U)
  1362. #define AIPS_PACRI_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRI_SP0_SHIFT)) & AIPS_PACRI_SP0_MASK)
  1363. /*! @name PACRJ - Peripheral Access Control Register */
  1364. #define AIPS_PACRJ_TP7_MASK (0x1U)
  1365. #define AIPS_PACRJ_TP7_SHIFT (0U)
  1366. #define AIPS_PACRJ_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP7_SHIFT)) & AIPS_PACRJ_TP7_MASK)
  1367. #define AIPS_PACRJ_WP7_MASK (0x2U)
  1368. #define AIPS_PACRJ_WP7_SHIFT (1U)
  1369. #define AIPS_PACRJ_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP7_SHIFT)) & AIPS_PACRJ_WP7_MASK)
  1370. #define AIPS_PACRJ_SP7_MASK (0x4U)
  1371. #define AIPS_PACRJ_SP7_SHIFT (2U)
  1372. #define AIPS_PACRJ_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP7_SHIFT)) & AIPS_PACRJ_SP7_MASK)
  1373. #define AIPS_PACRJ_TP6_MASK (0x10U)
  1374. #define AIPS_PACRJ_TP6_SHIFT (4U)
  1375. #define AIPS_PACRJ_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP6_SHIFT)) & AIPS_PACRJ_TP6_MASK)
  1376. #define AIPS_PACRJ_WP6_MASK (0x20U)
  1377. #define AIPS_PACRJ_WP6_SHIFT (5U)
  1378. #define AIPS_PACRJ_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP6_SHIFT)) & AIPS_PACRJ_WP6_MASK)
  1379. #define AIPS_PACRJ_SP6_MASK (0x40U)
  1380. #define AIPS_PACRJ_SP6_SHIFT (6U)
  1381. #define AIPS_PACRJ_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP6_SHIFT)) & AIPS_PACRJ_SP6_MASK)
  1382. #define AIPS_PACRJ_TP5_MASK (0x100U)
  1383. #define AIPS_PACRJ_TP5_SHIFT (8U)
  1384. #define AIPS_PACRJ_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP5_SHIFT)) & AIPS_PACRJ_TP5_MASK)
  1385. #define AIPS_PACRJ_WP5_MASK (0x200U)
  1386. #define AIPS_PACRJ_WP5_SHIFT (9U)
  1387. #define AIPS_PACRJ_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP5_SHIFT)) & AIPS_PACRJ_WP5_MASK)
  1388. #define AIPS_PACRJ_SP5_MASK (0x400U)
  1389. #define AIPS_PACRJ_SP5_SHIFT (10U)
  1390. #define AIPS_PACRJ_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP5_SHIFT)) & AIPS_PACRJ_SP5_MASK)
  1391. #define AIPS_PACRJ_TP4_MASK (0x1000U)
  1392. #define AIPS_PACRJ_TP4_SHIFT (12U)
  1393. #define AIPS_PACRJ_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP4_SHIFT)) & AIPS_PACRJ_TP4_MASK)
  1394. #define AIPS_PACRJ_WP4_MASK (0x2000U)
  1395. #define AIPS_PACRJ_WP4_SHIFT (13U)
  1396. #define AIPS_PACRJ_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP4_SHIFT)) & AIPS_PACRJ_WP4_MASK)
  1397. #define AIPS_PACRJ_SP4_MASK (0x4000U)
  1398. #define AIPS_PACRJ_SP4_SHIFT (14U)
  1399. #define AIPS_PACRJ_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP4_SHIFT)) & AIPS_PACRJ_SP4_MASK)
  1400. #define AIPS_PACRJ_TP3_MASK (0x10000U)
  1401. #define AIPS_PACRJ_TP3_SHIFT (16U)
  1402. #define AIPS_PACRJ_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP3_SHIFT)) & AIPS_PACRJ_TP3_MASK)
  1403. #define AIPS_PACRJ_WP3_MASK (0x20000U)
  1404. #define AIPS_PACRJ_WP3_SHIFT (17U)
  1405. #define AIPS_PACRJ_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP3_SHIFT)) & AIPS_PACRJ_WP3_MASK)
  1406. #define AIPS_PACRJ_SP3_MASK (0x40000U)
  1407. #define AIPS_PACRJ_SP3_SHIFT (18U)
  1408. #define AIPS_PACRJ_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP3_SHIFT)) & AIPS_PACRJ_SP3_MASK)
  1409. #define AIPS_PACRJ_TP2_MASK (0x100000U)
  1410. #define AIPS_PACRJ_TP2_SHIFT (20U)
  1411. #define AIPS_PACRJ_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP2_SHIFT)) & AIPS_PACRJ_TP2_MASK)
  1412. #define AIPS_PACRJ_WP2_MASK (0x200000U)
  1413. #define AIPS_PACRJ_WP2_SHIFT (21U)
  1414. #define AIPS_PACRJ_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP2_SHIFT)) & AIPS_PACRJ_WP2_MASK)
  1415. #define AIPS_PACRJ_SP2_MASK (0x400000U)
  1416. #define AIPS_PACRJ_SP2_SHIFT (22U)
  1417. #define AIPS_PACRJ_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP2_SHIFT)) & AIPS_PACRJ_SP2_MASK)
  1418. #define AIPS_PACRJ_TP1_MASK (0x1000000U)
  1419. #define AIPS_PACRJ_TP1_SHIFT (24U)
  1420. #define AIPS_PACRJ_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP1_SHIFT)) & AIPS_PACRJ_TP1_MASK)
  1421. #define AIPS_PACRJ_WP1_MASK (0x2000000U)
  1422. #define AIPS_PACRJ_WP1_SHIFT (25U)
  1423. #define AIPS_PACRJ_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP1_SHIFT)) & AIPS_PACRJ_WP1_MASK)
  1424. #define AIPS_PACRJ_SP1_MASK (0x4000000U)
  1425. #define AIPS_PACRJ_SP1_SHIFT (26U)
  1426. #define AIPS_PACRJ_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP1_SHIFT)) & AIPS_PACRJ_SP1_MASK)
  1427. #define AIPS_PACRJ_TP0_MASK (0x10000000U)
  1428. #define AIPS_PACRJ_TP0_SHIFT (28U)
  1429. #define AIPS_PACRJ_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_TP0_SHIFT)) & AIPS_PACRJ_TP0_MASK)
  1430. #define AIPS_PACRJ_WP0_MASK (0x20000000U)
  1431. #define AIPS_PACRJ_WP0_SHIFT (29U)
  1432. #define AIPS_PACRJ_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_WP0_SHIFT)) & AIPS_PACRJ_WP0_MASK)
  1433. #define AIPS_PACRJ_SP0_MASK (0x40000000U)
  1434. #define AIPS_PACRJ_SP0_SHIFT (30U)
  1435. #define AIPS_PACRJ_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRJ_SP0_SHIFT)) & AIPS_PACRJ_SP0_MASK)
  1436. /*! @name PACRK - Peripheral Access Control Register */
  1437. #define AIPS_PACRK_TP7_MASK (0x1U)
  1438. #define AIPS_PACRK_TP7_SHIFT (0U)
  1439. #define AIPS_PACRK_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP7_SHIFT)) & AIPS_PACRK_TP7_MASK)
  1440. #define AIPS_PACRK_WP7_MASK (0x2U)
  1441. #define AIPS_PACRK_WP7_SHIFT (1U)
  1442. #define AIPS_PACRK_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP7_SHIFT)) & AIPS_PACRK_WP7_MASK)
  1443. #define AIPS_PACRK_SP7_MASK (0x4U)
  1444. #define AIPS_PACRK_SP7_SHIFT (2U)
  1445. #define AIPS_PACRK_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP7_SHIFT)) & AIPS_PACRK_SP7_MASK)
  1446. #define AIPS_PACRK_TP6_MASK (0x10U)
  1447. #define AIPS_PACRK_TP6_SHIFT (4U)
  1448. #define AIPS_PACRK_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP6_SHIFT)) & AIPS_PACRK_TP6_MASK)
  1449. #define AIPS_PACRK_WP6_MASK (0x20U)
  1450. #define AIPS_PACRK_WP6_SHIFT (5U)
  1451. #define AIPS_PACRK_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP6_SHIFT)) & AIPS_PACRK_WP6_MASK)
  1452. #define AIPS_PACRK_SP6_MASK (0x40U)
  1453. #define AIPS_PACRK_SP6_SHIFT (6U)
  1454. #define AIPS_PACRK_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP6_SHIFT)) & AIPS_PACRK_SP6_MASK)
  1455. #define AIPS_PACRK_TP5_MASK (0x100U)
  1456. #define AIPS_PACRK_TP5_SHIFT (8U)
  1457. #define AIPS_PACRK_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP5_SHIFT)) & AIPS_PACRK_TP5_MASK)
  1458. #define AIPS_PACRK_WP5_MASK (0x200U)
  1459. #define AIPS_PACRK_WP5_SHIFT (9U)
  1460. #define AIPS_PACRK_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP5_SHIFT)) & AIPS_PACRK_WP5_MASK)
  1461. #define AIPS_PACRK_SP5_MASK (0x400U)
  1462. #define AIPS_PACRK_SP5_SHIFT (10U)
  1463. #define AIPS_PACRK_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP5_SHIFT)) & AIPS_PACRK_SP5_MASK)
  1464. #define AIPS_PACRK_TP4_MASK (0x1000U)
  1465. #define AIPS_PACRK_TP4_SHIFT (12U)
  1466. #define AIPS_PACRK_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP4_SHIFT)) & AIPS_PACRK_TP4_MASK)
  1467. #define AIPS_PACRK_WP4_MASK (0x2000U)
  1468. #define AIPS_PACRK_WP4_SHIFT (13U)
  1469. #define AIPS_PACRK_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP4_SHIFT)) & AIPS_PACRK_WP4_MASK)
  1470. #define AIPS_PACRK_SP4_MASK (0x4000U)
  1471. #define AIPS_PACRK_SP4_SHIFT (14U)
  1472. #define AIPS_PACRK_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP4_SHIFT)) & AIPS_PACRK_SP4_MASK)
  1473. #define AIPS_PACRK_TP3_MASK (0x10000U)
  1474. #define AIPS_PACRK_TP3_SHIFT (16U)
  1475. #define AIPS_PACRK_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP3_SHIFT)) & AIPS_PACRK_TP3_MASK)
  1476. #define AIPS_PACRK_WP3_MASK (0x20000U)
  1477. #define AIPS_PACRK_WP3_SHIFT (17U)
  1478. #define AIPS_PACRK_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP3_SHIFT)) & AIPS_PACRK_WP3_MASK)
  1479. #define AIPS_PACRK_SP3_MASK (0x40000U)
  1480. #define AIPS_PACRK_SP3_SHIFT (18U)
  1481. #define AIPS_PACRK_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP3_SHIFT)) & AIPS_PACRK_SP3_MASK)
  1482. #define AIPS_PACRK_TP2_MASK (0x100000U)
  1483. #define AIPS_PACRK_TP2_SHIFT (20U)
  1484. #define AIPS_PACRK_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP2_SHIFT)) & AIPS_PACRK_TP2_MASK)
  1485. #define AIPS_PACRK_WP2_MASK (0x200000U)
  1486. #define AIPS_PACRK_WP2_SHIFT (21U)
  1487. #define AIPS_PACRK_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP2_SHIFT)) & AIPS_PACRK_WP2_MASK)
  1488. #define AIPS_PACRK_SP2_MASK (0x400000U)
  1489. #define AIPS_PACRK_SP2_SHIFT (22U)
  1490. #define AIPS_PACRK_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP2_SHIFT)) & AIPS_PACRK_SP2_MASK)
  1491. #define AIPS_PACRK_TP1_MASK (0x1000000U)
  1492. #define AIPS_PACRK_TP1_SHIFT (24U)
  1493. #define AIPS_PACRK_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP1_SHIFT)) & AIPS_PACRK_TP1_MASK)
  1494. #define AIPS_PACRK_WP1_MASK (0x2000000U)
  1495. #define AIPS_PACRK_WP1_SHIFT (25U)
  1496. #define AIPS_PACRK_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP1_SHIFT)) & AIPS_PACRK_WP1_MASK)
  1497. #define AIPS_PACRK_SP1_MASK (0x4000000U)
  1498. #define AIPS_PACRK_SP1_SHIFT (26U)
  1499. #define AIPS_PACRK_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP1_SHIFT)) & AIPS_PACRK_SP1_MASK)
  1500. #define AIPS_PACRK_TP0_MASK (0x10000000U)
  1501. #define AIPS_PACRK_TP0_SHIFT (28U)
  1502. #define AIPS_PACRK_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_TP0_SHIFT)) & AIPS_PACRK_TP0_MASK)
  1503. #define AIPS_PACRK_WP0_MASK (0x20000000U)
  1504. #define AIPS_PACRK_WP0_SHIFT (29U)
  1505. #define AIPS_PACRK_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_WP0_SHIFT)) & AIPS_PACRK_WP0_MASK)
  1506. #define AIPS_PACRK_SP0_MASK (0x40000000U)
  1507. #define AIPS_PACRK_SP0_SHIFT (30U)
  1508. #define AIPS_PACRK_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRK_SP0_SHIFT)) & AIPS_PACRK_SP0_MASK)
  1509. /*! @name PACRL - Peripheral Access Control Register */
  1510. #define AIPS_PACRL_TP7_MASK (0x1U)
  1511. #define AIPS_PACRL_TP7_SHIFT (0U)
  1512. #define AIPS_PACRL_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP7_SHIFT)) & AIPS_PACRL_TP7_MASK)
  1513. #define AIPS_PACRL_WP7_MASK (0x2U)
  1514. #define AIPS_PACRL_WP7_SHIFT (1U)
  1515. #define AIPS_PACRL_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP7_SHIFT)) & AIPS_PACRL_WP7_MASK)
  1516. #define AIPS_PACRL_SP7_MASK (0x4U)
  1517. #define AIPS_PACRL_SP7_SHIFT (2U)
  1518. #define AIPS_PACRL_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP7_SHIFT)) & AIPS_PACRL_SP7_MASK)
  1519. #define AIPS_PACRL_TP6_MASK (0x10U)
  1520. #define AIPS_PACRL_TP6_SHIFT (4U)
  1521. #define AIPS_PACRL_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP6_SHIFT)) & AIPS_PACRL_TP6_MASK)
  1522. #define AIPS_PACRL_WP6_MASK (0x20U)
  1523. #define AIPS_PACRL_WP6_SHIFT (5U)
  1524. #define AIPS_PACRL_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP6_SHIFT)) & AIPS_PACRL_WP6_MASK)
  1525. #define AIPS_PACRL_SP6_MASK (0x40U)
  1526. #define AIPS_PACRL_SP6_SHIFT (6U)
  1527. #define AIPS_PACRL_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP6_SHIFT)) & AIPS_PACRL_SP6_MASK)
  1528. #define AIPS_PACRL_TP5_MASK (0x100U)
  1529. #define AIPS_PACRL_TP5_SHIFT (8U)
  1530. #define AIPS_PACRL_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP5_SHIFT)) & AIPS_PACRL_TP5_MASK)
  1531. #define AIPS_PACRL_WP5_MASK (0x200U)
  1532. #define AIPS_PACRL_WP5_SHIFT (9U)
  1533. #define AIPS_PACRL_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP5_SHIFT)) & AIPS_PACRL_WP5_MASK)
  1534. #define AIPS_PACRL_SP5_MASK (0x400U)
  1535. #define AIPS_PACRL_SP5_SHIFT (10U)
  1536. #define AIPS_PACRL_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP5_SHIFT)) & AIPS_PACRL_SP5_MASK)
  1537. #define AIPS_PACRL_TP4_MASK (0x1000U)
  1538. #define AIPS_PACRL_TP4_SHIFT (12U)
  1539. #define AIPS_PACRL_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP4_SHIFT)) & AIPS_PACRL_TP4_MASK)
  1540. #define AIPS_PACRL_WP4_MASK (0x2000U)
  1541. #define AIPS_PACRL_WP4_SHIFT (13U)
  1542. #define AIPS_PACRL_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP4_SHIFT)) & AIPS_PACRL_WP4_MASK)
  1543. #define AIPS_PACRL_SP4_MASK (0x4000U)
  1544. #define AIPS_PACRL_SP4_SHIFT (14U)
  1545. #define AIPS_PACRL_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP4_SHIFT)) & AIPS_PACRL_SP4_MASK)
  1546. #define AIPS_PACRL_TP3_MASK (0x10000U)
  1547. #define AIPS_PACRL_TP3_SHIFT (16U)
  1548. #define AIPS_PACRL_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP3_SHIFT)) & AIPS_PACRL_TP3_MASK)
  1549. #define AIPS_PACRL_WP3_MASK (0x20000U)
  1550. #define AIPS_PACRL_WP3_SHIFT (17U)
  1551. #define AIPS_PACRL_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP3_SHIFT)) & AIPS_PACRL_WP3_MASK)
  1552. #define AIPS_PACRL_SP3_MASK (0x40000U)
  1553. #define AIPS_PACRL_SP3_SHIFT (18U)
  1554. #define AIPS_PACRL_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP3_SHIFT)) & AIPS_PACRL_SP3_MASK)
  1555. #define AIPS_PACRL_TP2_MASK (0x100000U)
  1556. #define AIPS_PACRL_TP2_SHIFT (20U)
  1557. #define AIPS_PACRL_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP2_SHIFT)) & AIPS_PACRL_TP2_MASK)
  1558. #define AIPS_PACRL_WP2_MASK (0x200000U)
  1559. #define AIPS_PACRL_WP2_SHIFT (21U)
  1560. #define AIPS_PACRL_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP2_SHIFT)) & AIPS_PACRL_WP2_MASK)
  1561. #define AIPS_PACRL_SP2_MASK (0x400000U)
  1562. #define AIPS_PACRL_SP2_SHIFT (22U)
  1563. #define AIPS_PACRL_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP2_SHIFT)) & AIPS_PACRL_SP2_MASK)
  1564. #define AIPS_PACRL_TP1_MASK (0x1000000U)
  1565. #define AIPS_PACRL_TP1_SHIFT (24U)
  1566. #define AIPS_PACRL_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP1_SHIFT)) & AIPS_PACRL_TP1_MASK)
  1567. #define AIPS_PACRL_WP1_MASK (0x2000000U)
  1568. #define AIPS_PACRL_WP1_SHIFT (25U)
  1569. #define AIPS_PACRL_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP1_SHIFT)) & AIPS_PACRL_WP1_MASK)
  1570. #define AIPS_PACRL_SP1_MASK (0x4000000U)
  1571. #define AIPS_PACRL_SP1_SHIFT (26U)
  1572. #define AIPS_PACRL_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP1_SHIFT)) & AIPS_PACRL_SP1_MASK)
  1573. #define AIPS_PACRL_TP0_MASK (0x10000000U)
  1574. #define AIPS_PACRL_TP0_SHIFT (28U)
  1575. #define AIPS_PACRL_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_TP0_SHIFT)) & AIPS_PACRL_TP0_MASK)
  1576. #define AIPS_PACRL_WP0_MASK (0x20000000U)
  1577. #define AIPS_PACRL_WP0_SHIFT (29U)
  1578. #define AIPS_PACRL_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_WP0_SHIFT)) & AIPS_PACRL_WP0_MASK)
  1579. #define AIPS_PACRL_SP0_MASK (0x40000000U)
  1580. #define AIPS_PACRL_SP0_SHIFT (30U)
  1581. #define AIPS_PACRL_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRL_SP0_SHIFT)) & AIPS_PACRL_SP0_MASK)
  1582. /*! @name PACRM - Peripheral Access Control Register */
  1583. #define AIPS_PACRM_TP7_MASK (0x1U)
  1584. #define AIPS_PACRM_TP7_SHIFT (0U)
  1585. #define AIPS_PACRM_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP7_SHIFT)) & AIPS_PACRM_TP7_MASK)
  1586. #define AIPS_PACRM_WP7_MASK (0x2U)
  1587. #define AIPS_PACRM_WP7_SHIFT (1U)
  1588. #define AIPS_PACRM_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP7_SHIFT)) & AIPS_PACRM_WP7_MASK)
  1589. #define AIPS_PACRM_SP7_MASK (0x4U)
  1590. #define AIPS_PACRM_SP7_SHIFT (2U)
  1591. #define AIPS_PACRM_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP7_SHIFT)) & AIPS_PACRM_SP7_MASK)
  1592. #define AIPS_PACRM_TP6_MASK (0x10U)
  1593. #define AIPS_PACRM_TP6_SHIFT (4U)
  1594. #define AIPS_PACRM_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP6_SHIFT)) & AIPS_PACRM_TP6_MASK)
  1595. #define AIPS_PACRM_WP6_MASK (0x20U)
  1596. #define AIPS_PACRM_WP6_SHIFT (5U)
  1597. #define AIPS_PACRM_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP6_SHIFT)) & AIPS_PACRM_WP6_MASK)
  1598. #define AIPS_PACRM_SP6_MASK (0x40U)
  1599. #define AIPS_PACRM_SP6_SHIFT (6U)
  1600. #define AIPS_PACRM_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP6_SHIFT)) & AIPS_PACRM_SP6_MASK)
  1601. #define AIPS_PACRM_TP5_MASK (0x100U)
  1602. #define AIPS_PACRM_TP5_SHIFT (8U)
  1603. #define AIPS_PACRM_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP5_SHIFT)) & AIPS_PACRM_TP5_MASK)
  1604. #define AIPS_PACRM_WP5_MASK (0x200U)
  1605. #define AIPS_PACRM_WP5_SHIFT (9U)
  1606. #define AIPS_PACRM_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP5_SHIFT)) & AIPS_PACRM_WP5_MASK)
  1607. #define AIPS_PACRM_SP5_MASK (0x400U)
  1608. #define AIPS_PACRM_SP5_SHIFT (10U)
  1609. #define AIPS_PACRM_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP5_SHIFT)) & AIPS_PACRM_SP5_MASK)
  1610. #define AIPS_PACRM_TP4_MASK (0x1000U)
  1611. #define AIPS_PACRM_TP4_SHIFT (12U)
  1612. #define AIPS_PACRM_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP4_SHIFT)) & AIPS_PACRM_TP4_MASK)
  1613. #define AIPS_PACRM_WP4_MASK (0x2000U)
  1614. #define AIPS_PACRM_WP4_SHIFT (13U)
  1615. #define AIPS_PACRM_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP4_SHIFT)) & AIPS_PACRM_WP4_MASK)
  1616. #define AIPS_PACRM_SP4_MASK (0x4000U)
  1617. #define AIPS_PACRM_SP4_SHIFT (14U)
  1618. #define AIPS_PACRM_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP4_SHIFT)) & AIPS_PACRM_SP4_MASK)
  1619. #define AIPS_PACRM_TP3_MASK (0x10000U)
  1620. #define AIPS_PACRM_TP3_SHIFT (16U)
  1621. #define AIPS_PACRM_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP3_SHIFT)) & AIPS_PACRM_TP3_MASK)
  1622. #define AIPS_PACRM_WP3_MASK (0x20000U)
  1623. #define AIPS_PACRM_WP3_SHIFT (17U)
  1624. #define AIPS_PACRM_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP3_SHIFT)) & AIPS_PACRM_WP3_MASK)
  1625. #define AIPS_PACRM_SP3_MASK (0x40000U)
  1626. #define AIPS_PACRM_SP3_SHIFT (18U)
  1627. #define AIPS_PACRM_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP3_SHIFT)) & AIPS_PACRM_SP3_MASK)
  1628. #define AIPS_PACRM_TP2_MASK (0x100000U)
  1629. #define AIPS_PACRM_TP2_SHIFT (20U)
  1630. #define AIPS_PACRM_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP2_SHIFT)) & AIPS_PACRM_TP2_MASK)
  1631. #define AIPS_PACRM_WP2_MASK (0x200000U)
  1632. #define AIPS_PACRM_WP2_SHIFT (21U)
  1633. #define AIPS_PACRM_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP2_SHIFT)) & AIPS_PACRM_WP2_MASK)
  1634. #define AIPS_PACRM_SP2_MASK (0x400000U)
  1635. #define AIPS_PACRM_SP2_SHIFT (22U)
  1636. #define AIPS_PACRM_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP2_SHIFT)) & AIPS_PACRM_SP2_MASK)
  1637. #define AIPS_PACRM_TP1_MASK (0x1000000U)
  1638. #define AIPS_PACRM_TP1_SHIFT (24U)
  1639. #define AIPS_PACRM_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP1_SHIFT)) & AIPS_PACRM_TP1_MASK)
  1640. #define AIPS_PACRM_WP1_MASK (0x2000000U)
  1641. #define AIPS_PACRM_WP1_SHIFT (25U)
  1642. #define AIPS_PACRM_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP1_SHIFT)) & AIPS_PACRM_WP1_MASK)
  1643. #define AIPS_PACRM_SP1_MASK (0x4000000U)
  1644. #define AIPS_PACRM_SP1_SHIFT (26U)
  1645. #define AIPS_PACRM_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP1_SHIFT)) & AIPS_PACRM_SP1_MASK)
  1646. #define AIPS_PACRM_TP0_MASK (0x10000000U)
  1647. #define AIPS_PACRM_TP0_SHIFT (28U)
  1648. #define AIPS_PACRM_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_TP0_SHIFT)) & AIPS_PACRM_TP0_MASK)
  1649. #define AIPS_PACRM_WP0_MASK (0x20000000U)
  1650. #define AIPS_PACRM_WP0_SHIFT (29U)
  1651. #define AIPS_PACRM_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_WP0_SHIFT)) & AIPS_PACRM_WP0_MASK)
  1652. #define AIPS_PACRM_SP0_MASK (0x40000000U)
  1653. #define AIPS_PACRM_SP0_SHIFT (30U)
  1654. #define AIPS_PACRM_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRM_SP0_SHIFT)) & AIPS_PACRM_SP0_MASK)
  1655. /*! @name PACRN - Peripheral Access Control Register */
  1656. #define AIPS_PACRN_TP7_MASK (0x1U)
  1657. #define AIPS_PACRN_TP7_SHIFT (0U)
  1658. #define AIPS_PACRN_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP7_SHIFT)) & AIPS_PACRN_TP7_MASK)
  1659. #define AIPS_PACRN_WP7_MASK (0x2U)
  1660. #define AIPS_PACRN_WP7_SHIFT (1U)
  1661. #define AIPS_PACRN_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP7_SHIFT)) & AIPS_PACRN_WP7_MASK)
  1662. #define AIPS_PACRN_SP7_MASK (0x4U)
  1663. #define AIPS_PACRN_SP7_SHIFT (2U)
  1664. #define AIPS_PACRN_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP7_SHIFT)) & AIPS_PACRN_SP7_MASK)
  1665. #define AIPS_PACRN_TP6_MASK (0x10U)
  1666. #define AIPS_PACRN_TP6_SHIFT (4U)
  1667. #define AIPS_PACRN_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP6_SHIFT)) & AIPS_PACRN_TP6_MASK)
  1668. #define AIPS_PACRN_WP6_MASK (0x20U)
  1669. #define AIPS_PACRN_WP6_SHIFT (5U)
  1670. #define AIPS_PACRN_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP6_SHIFT)) & AIPS_PACRN_WP6_MASK)
  1671. #define AIPS_PACRN_SP6_MASK (0x40U)
  1672. #define AIPS_PACRN_SP6_SHIFT (6U)
  1673. #define AIPS_PACRN_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP6_SHIFT)) & AIPS_PACRN_SP6_MASK)
  1674. #define AIPS_PACRN_TP5_MASK (0x100U)
  1675. #define AIPS_PACRN_TP5_SHIFT (8U)
  1676. #define AIPS_PACRN_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP5_SHIFT)) & AIPS_PACRN_TP5_MASK)
  1677. #define AIPS_PACRN_WP5_MASK (0x200U)
  1678. #define AIPS_PACRN_WP5_SHIFT (9U)
  1679. #define AIPS_PACRN_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP5_SHIFT)) & AIPS_PACRN_WP5_MASK)
  1680. #define AIPS_PACRN_SP5_MASK (0x400U)
  1681. #define AIPS_PACRN_SP5_SHIFT (10U)
  1682. #define AIPS_PACRN_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP5_SHIFT)) & AIPS_PACRN_SP5_MASK)
  1683. #define AIPS_PACRN_TP4_MASK (0x1000U)
  1684. #define AIPS_PACRN_TP4_SHIFT (12U)
  1685. #define AIPS_PACRN_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP4_SHIFT)) & AIPS_PACRN_TP4_MASK)
  1686. #define AIPS_PACRN_WP4_MASK (0x2000U)
  1687. #define AIPS_PACRN_WP4_SHIFT (13U)
  1688. #define AIPS_PACRN_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP4_SHIFT)) & AIPS_PACRN_WP4_MASK)
  1689. #define AIPS_PACRN_SP4_MASK (0x4000U)
  1690. #define AIPS_PACRN_SP4_SHIFT (14U)
  1691. #define AIPS_PACRN_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP4_SHIFT)) & AIPS_PACRN_SP4_MASK)
  1692. #define AIPS_PACRN_TP3_MASK (0x10000U)
  1693. #define AIPS_PACRN_TP3_SHIFT (16U)
  1694. #define AIPS_PACRN_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP3_SHIFT)) & AIPS_PACRN_TP3_MASK)
  1695. #define AIPS_PACRN_WP3_MASK (0x20000U)
  1696. #define AIPS_PACRN_WP3_SHIFT (17U)
  1697. #define AIPS_PACRN_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP3_SHIFT)) & AIPS_PACRN_WP3_MASK)
  1698. #define AIPS_PACRN_SP3_MASK (0x40000U)
  1699. #define AIPS_PACRN_SP3_SHIFT (18U)
  1700. #define AIPS_PACRN_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP3_SHIFT)) & AIPS_PACRN_SP3_MASK)
  1701. #define AIPS_PACRN_TP2_MASK (0x100000U)
  1702. #define AIPS_PACRN_TP2_SHIFT (20U)
  1703. #define AIPS_PACRN_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP2_SHIFT)) & AIPS_PACRN_TP2_MASK)
  1704. #define AIPS_PACRN_WP2_MASK (0x200000U)
  1705. #define AIPS_PACRN_WP2_SHIFT (21U)
  1706. #define AIPS_PACRN_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP2_SHIFT)) & AIPS_PACRN_WP2_MASK)
  1707. #define AIPS_PACRN_SP2_MASK (0x400000U)
  1708. #define AIPS_PACRN_SP2_SHIFT (22U)
  1709. #define AIPS_PACRN_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP2_SHIFT)) & AIPS_PACRN_SP2_MASK)
  1710. #define AIPS_PACRN_TP1_MASK (0x1000000U)
  1711. #define AIPS_PACRN_TP1_SHIFT (24U)
  1712. #define AIPS_PACRN_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP1_SHIFT)) & AIPS_PACRN_TP1_MASK)
  1713. #define AIPS_PACRN_WP1_MASK (0x2000000U)
  1714. #define AIPS_PACRN_WP1_SHIFT (25U)
  1715. #define AIPS_PACRN_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP1_SHIFT)) & AIPS_PACRN_WP1_MASK)
  1716. #define AIPS_PACRN_SP1_MASK (0x4000000U)
  1717. #define AIPS_PACRN_SP1_SHIFT (26U)
  1718. #define AIPS_PACRN_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP1_SHIFT)) & AIPS_PACRN_SP1_MASK)
  1719. #define AIPS_PACRN_TP0_MASK (0x10000000U)
  1720. #define AIPS_PACRN_TP0_SHIFT (28U)
  1721. #define AIPS_PACRN_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_TP0_SHIFT)) & AIPS_PACRN_TP0_MASK)
  1722. #define AIPS_PACRN_WP0_MASK (0x20000000U)
  1723. #define AIPS_PACRN_WP0_SHIFT (29U)
  1724. #define AIPS_PACRN_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_WP0_SHIFT)) & AIPS_PACRN_WP0_MASK)
  1725. #define AIPS_PACRN_SP0_MASK (0x40000000U)
  1726. #define AIPS_PACRN_SP0_SHIFT (30U)
  1727. #define AIPS_PACRN_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRN_SP0_SHIFT)) & AIPS_PACRN_SP0_MASK)
  1728. /*! @name PACRO - Peripheral Access Control Register */
  1729. #define AIPS_PACRO_TP7_MASK (0x1U)
  1730. #define AIPS_PACRO_TP7_SHIFT (0U)
  1731. #define AIPS_PACRO_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP7_SHIFT)) & AIPS_PACRO_TP7_MASK)
  1732. #define AIPS_PACRO_WP7_MASK (0x2U)
  1733. #define AIPS_PACRO_WP7_SHIFT (1U)
  1734. #define AIPS_PACRO_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP7_SHIFT)) & AIPS_PACRO_WP7_MASK)
  1735. #define AIPS_PACRO_SP7_MASK (0x4U)
  1736. #define AIPS_PACRO_SP7_SHIFT (2U)
  1737. #define AIPS_PACRO_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP7_SHIFT)) & AIPS_PACRO_SP7_MASK)
  1738. #define AIPS_PACRO_TP6_MASK (0x10U)
  1739. #define AIPS_PACRO_TP6_SHIFT (4U)
  1740. #define AIPS_PACRO_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP6_SHIFT)) & AIPS_PACRO_TP6_MASK)
  1741. #define AIPS_PACRO_WP6_MASK (0x20U)
  1742. #define AIPS_PACRO_WP6_SHIFT (5U)
  1743. #define AIPS_PACRO_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP6_SHIFT)) & AIPS_PACRO_WP6_MASK)
  1744. #define AIPS_PACRO_SP6_MASK (0x40U)
  1745. #define AIPS_PACRO_SP6_SHIFT (6U)
  1746. #define AIPS_PACRO_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP6_SHIFT)) & AIPS_PACRO_SP6_MASK)
  1747. #define AIPS_PACRO_TP5_MASK (0x100U)
  1748. #define AIPS_PACRO_TP5_SHIFT (8U)
  1749. #define AIPS_PACRO_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP5_SHIFT)) & AIPS_PACRO_TP5_MASK)
  1750. #define AIPS_PACRO_WP5_MASK (0x200U)
  1751. #define AIPS_PACRO_WP5_SHIFT (9U)
  1752. #define AIPS_PACRO_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP5_SHIFT)) & AIPS_PACRO_WP5_MASK)
  1753. #define AIPS_PACRO_SP5_MASK (0x400U)
  1754. #define AIPS_PACRO_SP5_SHIFT (10U)
  1755. #define AIPS_PACRO_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP5_SHIFT)) & AIPS_PACRO_SP5_MASK)
  1756. #define AIPS_PACRO_TP4_MASK (0x1000U)
  1757. #define AIPS_PACRO_TP4_SHIFT (12U)
  1758. #define AIPS_PACRO_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP4_SHIFT)) & AIPS_PACRO_TP4_MASK)
  1759. #define AIPS_PACRO_WP4_MASK (0x2000U)
  1760. #define AIPS_PACRO_WP4_SHIFT (13U)
  1761. #define AIPS_PACRO_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP4_SHIFT)) & AIPS_PACRO_WP4_MASK)
  1762. #define AIPS_PACRO_SP4_MASK (0x4000U)
  1763. #define AIPS_PACRO_SP4_SHIFT (14U)
  1764. #define AIPS_PACRO_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP4_SHIFT)) & AIPS_PACRO_SP4_MASK)
  1765. #define AIPS_PACRO_TP3_MASK (0x10000U)
  1766. #define AIPS_PACRO_TP3_SHIFT (16U)
  1767. #define AIPS_PACRO_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP3_SHIFT)) & AIPS_PACRO_TP3_MASK)
  1768. #define AIPS_PACRO_WP3_MASK (0x20000U)
  1769. #define AIPS_PACRO_WP3_SHIFT (17U)
  1770. #define AIPS_PACRO_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP3_SHIFT)) & AIPS_PACRO_WP3_MASK)
  1771. #define AIPS_PACRO_SP3_MASK (0x40000U)
  1772. #define AIPS_PACRO_SP3_SHIFT (18U)
  1773. #define AIPS_PACRO_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP3_SHIFT)) & AIPS_PACRO_SP3_MASK)
  1774. #define AIPS_PACRO_TP2_MASK (0x100000U)
  1775. #define AIPS_PACRO_TP2_SHIFT (20U)
  1776. #define AIPS_PACRO_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP2_SHIFT)) & AIPS_PACRO_TP2_MASK)
  1777. #define AIPS_PACRO_WP2_MASK (0x200000U)
  1778. #define AIPS_PACRO_WP2_SHIFT (21U)
  1779. #define AIPS_PACRO_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP2_SHIFT)) & AIPS_PACRO_WP2_MASK)
  1780. #define AIPS_PACRO_SP2_MASK (0x400000U)
  1781. #define AIPS_PACRO_SP2_SHIFT (22U)
  1782. #define AIPS_PACRO_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP2_SHIFT)) & AIPS_PACRO_SP2_MASK)
  1783. #define AIPS_PACRO_TP1_MASK (0x1000000U)
  1784. #define AIPS_PACRO_TP1_SHIFT (24U)
  1785. #define AIPS_PACRO_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP1_SHIFT)) & AIPS_PACRO_TP1_MASK)
  1786. #define AIPS_PACRO_WP1_MASK (0x2000000U)
  1787. #define AIPS_PACRO_WP1_SHIFT (25U)
  1788. #define AIPS_PACRO_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP1_SHIFT)) & AIPS_PACRO_WP1_MASK)
  1789. #define AIPS_PACRO_SP1_MASK (0x4000000U)
  1790. #define AIPS_PACRO_SP1_SHIFT (26U)
  1791. #define AIPS_PACRO_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP1_SHIFT)) & AIPS_PACRO_SP1_MASK)
  1792. #define AIPS_PACRO_TP0_MASK (0x10000000U)
  1793. #define AIPS_PACRO_TP0_SHIFT (28U)
  1794. #define AIPS_PACRO_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_TP0_SHIFT)) & AIPS_PACRO_TP0_MASK)
  1795. #define AIPS_PACRO_WP0_MASK (0x20000000U)
  1796. #define AIPS_PACRO_WP0_SHIFT (29U)
  1797. #define AIPS_PACRO_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_WP0_SHIFT)) & AIPS_PACRO_WP0_MASK)
  1798. #define AIPS_PACRO_SP0_MASK (0x40000000U)
  1799. #define AIPS_PACRO_SP0_SHIFT (30U)
  1800. #define AIPS_PACRO_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRO_SP0_SHIFT)) & AIPS_PACRO_SP0_MASK)
  1801. /*! @name PACRP - Peripheral Access Control Register */
  1802. #define AIPS_PACRP_TP7_MASK (0x1U)
  1803. #define AIPS_PACRP_TP7_SHIFT (0U)
  1804. #define AIPS_PACRP_TP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP7_SHIFT)) & AIPS_PACRP_TP7_MASK)
  1805. #define AIPS_PACRP_WP7_MASK (0x2U)
  1806. #define AIPS_PACRP_WP7_SHIFT (1U)
  1807. #define AIPS_PACRP_WP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP7_SHIFT)) & AIPS_PACRP_WP7_MASK)
  1808. #define AIPS_PACRP_SP7_MASK (0x4U)
  1809. #define AIPS_PACRP_SP7_SHIFT (2U)
  1810. #define AIPS_PACRP_SP7(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP7_SHIFT)) & AIPS_PACRP_SP7_MASK)
  1811. #define AIPS_PACRP_TP6_MASK (0x10U)
  1812. #define AIPS_PACRP_TP6_SHIFT (4U)
  1813. #define AIPS_PACRP_TP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP6_SHIFT)) & AIPS_PACRP_TP6_MASK)
  1814. #define AIPS_PACRP_WP6_MASK (0x20U)
  1815. #define AIPS_PACRP_WP6_SHIFT (5U)
  1816. #define AIPS_PACRP_WP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP6_SHIFT)) & AIPS_PACRP_WP6_MASK)
  1817. #define AIPS_PACRP_SP6_MASK (0x40U)
  1818. #define AIPS_PACRP_SP6_SHIFT (6U)
  1819. #define AIPS_PACRP_SP6(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP6_SHIFT)) & AIPS_PACRP_SP6_MASK)
  1820. #define AIPS_PACRP_TP5_MASK (0x100U)
  1821. #define AIPS_PACRP_TP5_SHIFT (8U)
  1822. #define AIPS_PACRP_TP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP5_SHIFT)) & AIPS_PACRP_TP5_MASK)
  1823. #define AIPS_PACRP_WP5_MASK (0x200U)
  1824. #define AIPS_PACRP_WP5_SHIFT (9U)
  1825. #define AIPS_PACRP_WP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP5_SHIFT)) & AIPS_PACRP_WP5_MASK)
  1826. #define AIPS_PACRP_SP5_MASK (0x400U)
  1827. #define AIPS_PACRP_SP5_SHIFT (10U)
  1828. #define AIPS_PACRP_SP5(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP5_SHIFT)) & AIPS_PACRP_SP5_MASK)
  1829. #define AIPS_PACRP_TP4_MASK (0x1000U)
  1830. #define AIPS_PACRP_TP4_SHIFT (12U)
  1831. #define AIPS_PACRP_TP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP4_SHIFT)) & AIPS_PACRP_TP4_MASK)
  1832. #define AIPS_PACRP_WP4_MASK (0x2000U)
  1833. #define AIPS_PACRP_WP4_SHIFT (13U)
  1834. #define AIPS_PACRP_WP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP4_SHIFT)) & AIPS_PACRP_WP4_MASK)
  1835. #define AIPS_PACRP_SP4_MASK (0x4000U)
  1836. #define AIPS_PACRP_SP4_SHIFT (14U)
  1837. #define AIPS_PACRP_SP4(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP4_SHIFT)) & AIPS_PACRP_SP4_MASK)
  1838. #define AIPS_PACRP_TP3_MASK (0x10000U)
  1839. #define AIPS_PACRP_TP3_SHIFT (16U)
  1840. #define AIPS_PACRP_TP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP3_SHIFT)) & AIPS_PACRP_TP3_MASK)
  1841. #define AIPS_PACRP_WP3_MASK (0x20000U)
  1842. #define AIPS_PACRP_WP3_SHIFT (17U)
  1843. #define AIPS_PACRP_WP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP3_SHIFT)) & AIPS_PACRP_WP3_MASK)
  1844. #define AIPS_PACRP_SP3_MASK (0x40000U)
  1845. #define AIPS_PACRP_SP3_SHIFT (18U)
  1846. #define AIPS_PACRP_SP3(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP3_SHIFT)) & AIPS_PACRP_SP3_MASK)
  1847. #define AIPS_PACRP_TP2_MASK (0x100000U)
  1848. #define AIPS_PACRP_TP2_SHIFT (20U)
  1849. #define AIPS_PACRP_TP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP2_SHIFT)) & AIPS_PACRP_TP2_MASK)
  1850. #define AIPS_PACRP_WP2_MASK (0x200000U)
  1851. #define AIPS_PACRP_WP2_SHIFT (21U)
  1852. #define AIPS_PACRP_WP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP2_SHIFT)) & AIPS_PACRP_WP2_MASK)
  1853. #define AIPS_PACRP_SP2_MASK (0x400000U)
  1854. #define AIPS_PACRP_SP2_SHIFT (22U)
  1855. #define AIPS_PACRP_SP2(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP2_SHIFT)) & AIPS_PACRP_SP2_MASK)
  1856. #define AIPS_PACRP_TP1_MASK (0x1000000U)
  1857. #define AIPS_PACRP_TP1_SHIFT (24U)
  1858. #define AIPS_PACRP_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP1_SHIFT)) & AIPS_PACRP_TP1_MASK)
  1859. #define AIPS_PACRP_WP1_MASK (0x2000000U)
  1860. #define AIPS_PACRP_WP1_SHIFT (25U)
  1861. #define AIPS_PACRP_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP1_SHIFT)) & AIPS_PACRP_WP1_MASK)
  1862. #define AIPS_PACRP_SP1_MASK (0x4000000U)
  1863. #define AIPS_PACRP_SP1_SHIFT (26U)
  1864. #define AIPS_PACRP_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP1_SHIFT)) & AIPS_PACRP_SP1_MASK)
  1865. #define AIPS_PACRP_TP0_MASK (0x10000000U)
  1866. #define AIPS_PACRP_TP0_SHIFT (28U)
  1867. #define AIPS_PACRP_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_TP0_SHIFT)) & AIPS_PACRP_TP0_MASK)
  1868. #define AIPS_PACRP_WP0_MASK (0x20000000U)
  1869. #define AIPS_PACRP_WP0_SHIFT (29U)
  1870. #define AIPS_PACRP_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_WP0_SHIFT)) & AIPS_PACRP_WP0_MASK)
  1871. #define AIPS_PACRP_SP0_MASK (0x40000000U)
  1872. #define AIPS_PACRP_SP0_SHIFT (30U)
  1873. #define AIPS_PACRP_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRP_SP0_SHIFT)) & AIPS_PACRP_SP0_MASK)
  1874. /*! @name PACRU - Peripheral Access Control Register */
  1875. #define AIPS_PACRU_TP1_MASK (0x1000000U)
  1876. #define AIPS_PACRU_TP1_SHIFT (24U)
  1877. #define AIPS_PACRU_TP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRU_TP1_SHIFT)) & AIPS_PACRU_TP1_MASK)
  1878. #define AIPS_PACRU_WP1_MASK (0x2000000U)
  1879. #define AIPS_PACRU_WP1_SHIFT (25U)
  1880. #define AIPS_PACRU_WP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRU_WP1_SHIFT)) & AIPS_PACRU_WP1_MASK)
  1881. #define AIPS_PACRU_SP1_MASK (0x4000000U)
  1882. #define AIPS_PACRU_SP1_SHIFT (26U)
  1883. #define AIPS_PACRU_SP1(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRU_SP1_SHIFT)) & AIPS_PACRU_SP1_MASK)
  1884. #define AIPS_PACRU_TP0_MASK (0x10000000U)
  1885. #define AIPS_PACRU_TP0_SHIFT (28U)
  1886. #define AIPS_PACRU_TP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRU_TP0_SHIFT)) & AIPS_PACRU_TP0_MASK)
  1887. #define AIPS_PACRU_WP0_MASK (0x20000000U)
  1888. #define AIPS_PACRU_WP0_SHIFT (29U)
  1889. #define AIPS_PACRU_WP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRU_WP0_SHIFT)) & AIPS_PACRU_WP0_MASK)
  1890. #define AIPS_PACRU_SP0_MASK (0x40000000U)
  1891. #define AIPS_PACRU_SP0_SHIFT (30U)
  1892. #define AIPS_PACRU_SP0(x) (((uint32_t)(((uint32_t)(x)) << AIPS_PACRU_SP0_SHIFT)) & AIPS_PACRU_SP0_MASK)
  1893. /*!
  1894. * @}
  1895. */ /* end of group AIPS_Register_Masks */
  1896. /* AIPS - Peripheral instance base addresses */
  1897. /** Peripheral AIPS0 base address */
  1898. #define AIPS0_BASE (0x40000000u)
  1899. /** Peripheral AIPS0 base pointer */
  1900. #define AIPS0 ((AIPS_Type *)AIPS0_BASE)
  1901. /** Peripheral AIPS1 base address */
  1902. #define AIPS1_BASE (0x40080000u)
  1903. /** Peripheral AIPS1 base pointer */
  1904. #define AIPS1 ((AIPS_Type *)AIPS1_BASE)
  1905. /** Array initializer of AIPS peripheral base addresses */
  1906. #define AIPS_BASE_ADDRS { AIPS0_BASE, AIPS1_BASE }
  1907. /** Array initializer of AIPS peripheral base pointers */
  1908. #define AIPS_BASE_PTRS { AIPS0, AIPS1 }
  1909. /*!
  1910. * @}
  1911. */ /* end of group AIPS_Peripheral_Access_Layer */
  1912. /* ----------------------------------------------------------------------------
  1913. -- AXBS Peripheral Access Layer
  1914. ---------------------------------------------------------------------------- */
  1915. /*!
  1916. * @addtogroup AXBS_Peripheral_Access_Layer AXBS Peripheral Access Layer
  1917. * @{
  1918. */
  1919. /** AXBS - Register Layout Typedef */
  1920. typedef struct {
  1921. struct { /* offset: 0x0, array step: 0x100 */
  1922. __IO uint32_t PRS; /**< Priority Registers Slave, array offset: 0x0, array step: 0x100 */
  1923. uint8_t RESERVED_0[12];
  1924. __IO uint32_t CRS; /**< Control Register, array offset: 0x10, array step: 0x100 */
  1925. uint8_t RESERVED_1[236];
  1926. } SLAVE[5];
  1927. uint8_t RESERVED_0[768];
  1928. __IO uint32_t MGPCR0; /**< Master General Purpose Control Register, offset: 0x800 */
  1929. uint8_t RESERVED_1[252];
  1930. __IO uint32_t MGPCR1; /**< Master General Purpose Control Register, offset: 0x900 */
  1931. uint8_t RESERVED_2[252];
  1932. __IO uint32_t MGPCR2; /**< Master General Purpose Control Register, offset: 0xA00 */
  1933. uint8_t RESERVED_3[508];
  1934. __IO uint32_t MGPCR4; /**< Master General Purpose Control Register, offset: 0xC00 */
  1935. uint8_t RESERVED_4[252];
  1936. __IO uint32_t MGPCR5; /**< Master General Purpose Control Register, offset: 0xD00 */
  1937. } AXBS_Type;
  1938. /* ----------------------------------------------------------------------------
  1939. -- AXBS Register Masks
  1940. ---------------------------------------------------------------------------- */
  1941. /*!
  1942. * @addtogroup AXBS_Register_Masks AXBS Register Masks
  1943. * @{
  1944. */
  1945. /*! @name PRS - Priority Registers Slave */
  1946. #define AXBS_PRS_M0_MASK (0x7U)
  1947. #define AXBS_PRS_M0_SHIFT (0U)
  1948. #define AXBS_PRS_M0(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M0_SHIFT)) & AXBS_PRS_M0_MASK)
  1949. #define AXBS_PRS_M1_MASK (0x70U)
  1950. #define AXBS_PRS_M1_SHIFT (4U)
  1951. #define AXBS_PRS_M1(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M1_SHIFT)) & AXBS_PRS_M1_MASK)
  1952. #define AXBS_PRS_M2_MASK (0x700U)
  1953. #define AXBS_PRS_M2_SHIFT (8U)
  1954. #define AXBS_PRS_M2(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M2_SHIFT)) & AXBS_PRS_M2_MASK)
  1955. #define AXBS_PRS_M4_MASK (0x70000U)
  1956. #define AXBS_PRS_M4_SHIFT (16U)
  1957. #define AXBS_PRS_M4(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M4_SHIFT)) & AXBS_PRS_M4_MASK)
  1958. #define AXBS_PRS_M5_MASK (0x700000U)
  1959. #define AXBS_PRS_M5_SHIFT (20U)
  1960. #define AXBS_PRS_M5(x) (((uint32_t)(((uint32_t)(x)) << AXBS_PRS_M5_SHIFT)) & AXBS_PRS_M5_MASK)
  1961. /* The count of AXBS_PRS */
  1962. #define AXBS_PRS_COUNT (5U)
  1963. /*! @name CRS - Control Register */
  1964. #define AXBS_CRS_PARK_MASK (0x7U)
  1965. #define AXBS_CRS_PARK_SHIFT (0U)
  1966. #define AXBS_CRS_PARK(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_PARK_SHIFT)) & AXBS_CRS_PARK_MASK)
  1967. #define AXBS_CRS_PCTL_MASK (0x30U)
  1968. #define AXBS_CRS_PCTL_SHIFT (4U)
  1969. #define AXBS_CRS_PCTL(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_PCTL_SHIFT)) & AXBS_CRS_PCTL_MASK)
  1970. #define AXBS_CRS_ARB_MASK (0x300U)
  1971. #define AXBS_CRS_ARB_SHIFT (8U)
  1972. #define AXBS_CRS_ARB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_ARB_SHIFT)) & AXBS_CRS_ARB_MASK)
  1973. #define AXBS_CRS_HLP_MASK (0x40000000U)
  1974. #define AXBS_CRS_HLP_SHIFT (30U)
  1975. #define AXBS_CRS_HLP(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_HLP_SHIFT)) & AXBS_CRS_HLP_MASK)
  1976. #define AXBS_CRS_RO_MASK (0x80000000U)
  1977. #define AXBS_CRS_RO_SHIFT (31U)
  1978. #define AXBS_CRS_RO(x) (((uint32_t)(((uint32_t)(x)) << AXBS_CRS_RO_SHIFT)) & AXBS_CRS_RO_MASK)
  1979. /* The count of AXBS_CRS */
  1980. #define AXBS_CRS_COUNT (5U)
  1981. /*! @name MGPCR0 - Master General Purpose Control Register */
  1982. #define AXBS_MGPCR0_AULB_MASK (0x7U)
  1983. #define AXBS_MGPCR0_AULB_SHIFT (0U)
  1984. #define AXBS_MGPCR0_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR0_AULB_SHIFT)) & AXBS_MGPCR0_AULB_MASK)
  1985. /*! @name MGPCR1 - Master General Purpose Control Register */
  1986. #define AXBS_MGPCR1_AULB_MASK (0x7U)
  1987. #define AXBS_MGPCR1_AULB_SHIFT (0U)
  1988. #define AXBS_MGPCR1_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR1_AULB_SHIFT)) & AXBS_MGPCR1_AULB_MASK)
  1989. /*! @name MGPCR2 - Master General Purpose Control Register */
  1990. #define AXBS_MGPCR2_AULB_MASK (0x7U)
  1991. #define AXBS_MGPCR2_AULB_SHIFT (0U)
  1992. #define AXBS_MGPCR2_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR2_AULB_SHIFT)) & AXBS_MGPCR2_AULB_MASK)
  1993. /*! @name MGPCR4 - Master General Purpose Control Register */
  1994. #define AXBS_MGPCR4_AULB_MASK (0x7U)
  1995. #define AXBS_MGPCR4_AULB_SHIFT (0U)
  1996. #define AXBS_MGPCR4_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR4_AULB_SHIFT)) & AXBS_MGPCR4_AULB_MASK)
  1997. /*! @name MGPCR5 - Master General Purpose Control Register */
  1998. #define AXBS_MGPCR5_AULB_MASK (0x7U)
  1999. #define AXBS_MGPCR5_AULB_SHIFT (0U)
  2000. #define AXBS_MGPCR5_AULB(x) (((uint32_t)(((uint32_t)(x)) << AXBS_MGPCR5_AULB_SHIFT)) & AXBS_MGPCR5_AULB_MASK)
  2001. /*!
  2002. * @}
  2003. */ /* end of group AXBS_Register_Masks */
  2004. /* AXBS - Peripheral instance base addresses */
  2005. /** Peripheral AXBS base address */
  2006. #define AXBS_BASE (0x40004000u)
  2007. /** Peripheral AXBS base pointer */
  2008. #define AXBS ((AXBS_Type *)AXBS_BASE)
  2009. /** Array initializer of AXBS peripheral base addresses */
  2010. #define AXBS_BASE_ADDRS { AXBS_BASE }
  2011. /** Array initializer of AXBS peripheral base pointers */
  2012. #define AXBS_BASE_PTRS { AXBS }
  2013. /*!
  2014. * @}
  2015. */ /* end of group AXBS_Peripheral_Access_Layer */
  2016. /* ----------------------------------------------------------------------------
  2017. -- CAN Peripheral Access Layer
  2018. ---------------------------------------------------------------------------- */
  2019. /*!
  2020. * @addtogroup CAN_Peripheral_Access_Layer CAN Peripheral Access Layer
  2021. * @{
  2022. */
  2023. /** CAN - Register Layout Typedef */
  2024. typedef struct {
  2025. __IO uint32_t MCR; /**< Module Configuration Register, offset: 0x0 */
  2026. __IO uint32_t CTRL1; /**< Control 1 register, offset: 0x4 */
  2027. __IO uint32_t TIMER; /**< Free Running Timer, offset: 0x8 */
  2028. uint8_t RESERVED_0[4];
  2029. __IO uint32_t RXMGMASK; /**< Rx Mailboxes Global Mask Register, offset: 0x10 */
  2030. __IO uint32_t RX14MASK; /**< Rx 14 Mask register, offset: 0x14 */
  2031. __IO uint32_t RX15MASK; /**< Rx 15 Mask register, offset: 0x18 */
  2032. __IO uint32_t ECR; /**< Error Counter, offset: 0x1C */
  2033. __IO uint32_t ESR1; /**< Error and Status 1 register, offset: 0x20 */
  2034. uint8_t RESERVED_1[4];
  2035. __IO uint32_t IMASK1; /**< Interrupt Masks 1 register, offset: 0x28 */
  2036. uint8_t RESERVED_2[4];
  2037. __IO uint32_t IFLAG1; /**< Interrupt Flags 1 register, offset: 0x30 */
  2038. __IO uint32_t CTRL2; /**< Control 2 register, offset: 0x34 */
  2039. __I uint32_t ESR2; /**< Error and Status 2 register, offset: 0x38 */
  2040. uint8_t RESERVED_3[8];
  2041. __I uint32_t CRCR; /**< CRC Register, offset: 0x44 */
  2042. __IO uint32_t RXFGMASK; /**< Rx FIFO Global Mask register, offset: 0x48 */
  2043. __I uint32_t RXFIR; /**< Rx FIFO Information Register, offset: 0x4C */
  2044. uint8_t RESERVED_4[48];
  2045. struct { /* offset: 0x80, array step: 0x10 */
  2046. __IO uint32_t CS; /**< Message Buffer 0 CS Register..Message Buffer 15 CS Register, array offset: 0x80, array step: 0x10 */
  2047. __IO uint32_t ID; /**< Message Buffer 0 ID Register..Message Buffer 15 ID Register, array offset: 0x84, array step: 0x10 */
  2048. __IO uint32_t WORD0; /**< Message Buffer 0 WORD0 Register..Message Buffer 15 WORD0 Register, array offset: 0x88, array step: 0x10 */
  2049. __IO uint32_t WORD1; /**< Message Buffer 0 WORD1 Register..Message Buffer 15 WORD1 Register, array offset: 0x8C, array step: 0x10 */
  2050. } MB[16];
  2051. uint8_t RESERVED_5[1792];
  2052. __IO uint32_t RXIMR[16]; /**< Rx Individual Mask Registers, array offset: 0x880, array step: 0x4 */
  2053. } CAN_Type;
  2054. /* ----------------------------------------------------------------------------
  2055. -- CAN Register Masks
  2056. ---------------------------------------------------------------------------- */
  2057. /*!
  2058. * @addtogroup CAN_Register_Masks CAN Register Masks
  2059. * @{
  2060. */
  2061. /*! @name MCR - Module Configuration Register */
  2062. #define CAN_MCR_MAXMB_MASK (0x7FU)
  2063. #define CAN_MCR_MAXMB_SHIFT (0U)
  2064. #define CAN_MCR_MAXMB(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_MAXMB_SHIFT)) & CAN_MCR_MAXMB_MASK)
  2065. #define CAN_MCR_IDAM_MASK (0x300U)
  2066. #define CAN_MCR_IDAM_SHIFT (8U)
  2067. #define CAN_MCR_IDAM(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_IDAM_SHIFT)) & CAN_MCR_IDAM_MASK)
  2068. #define CAN_MCR_AEN_MASK (0x1000U)
  2069. #define CAN_MCR_AEN_SHIFT (12U)
  2070. #define CAN_MCR_AEN(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_AEN_SHIFT)) & CAN_MCR_AEN_MASK)
  2071. #define CAN_MCR_LPRIOEN_MASK (0x2000U)
  2072. #define CAN_MCR_LPRIOEN_SHIFT (13U)
  2073. #define CAN_MCR_LPRIOEN(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_LPRIOEN_SHIFT)) & CAN_MCR_LPRIOEN_MASK)
  2074. #define CAN_MCR_IRMQ_MASK (0x10000U)
  2075. #define CAN_MCR_IRMQ_SHIFT (16U)
  2076. #define CAN_MCR_IRMQ(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_IRMQ_SHIFT)) & CAN_MCR_IRMQ_MASK)
  2077. #define CAN_MCR_SRXDIS_MASK (0x20000U)
  2078. #define CAN_MCR_SRXDIS_SHIFT (17U)
  2079. #define CAN_MCR_SRXDIS(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_SRXDIS_SHIFT)) & CAN_MCR_SRXDIS_MASK)
  2080. #define CAN_MCR_WAKSRC_MASK (0x80000U)
  2081. #define CAN_MCR_WAKSRC_SHIFT (19U)
  2082. #define CAN_MCR_WAKSRC(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_WAKSRC_SHIFT)) & CAN_MCR_WAKSRC_MASK)
  2083. #define CAN_MCR_LPMACK_MASK (0x100000U)
  2084. #define CAN_MCR_LPMACK_SHIFT (20U)
  2085. #define CAN_MCR_LPMACK(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_LPMACK_SHIFT)) & CAN_MCR_LPMACK_MASK)
  2086. #define CAN_MCR_WRNEN_MASK (0x200000U)
  2087. #define CAN_MCR_WRNEN_SHIFT (21U)
  2088. #define CAN_MCR_WRNEN(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_WRNEN_SHIFT)) & CAN_MCR_WRNEN_MASK)
  2089. #define CAN_MCR_SLFWAK_MASK (0x400000U)
  2090. #define CAN_MCR_SLFWAK_SHIFT (22U)
  2091. #define CAN_MCR_SLFWAK(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_SLFWAK_SHIFT)) & CAN_MCR_SLFWAK_MASK)
  2092. #define CAN_MCR_SUPV_MASK (0x800000U)
  2093. #define CAN_MCR_SUPV_SHIFT (23U)
  2094. #define CAN_MCR_SUPV(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_SUPV_SHIFT)) & CAN_MCR_SUPV_MASK)
  2095. #define CAN_MCR_FRZACK_MASK (0x1000000U)
  2096. #define CAN_MCR_FRZACK_SHIFT (24U)
  2097. #define CAN_MCR_FRZACK(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_FRZACK_SHIFT)) & CAN_MCR_FRZACK_MASK)
  2098. #define CAN_MCR_SOFTRST_MASK (0x2000000U)
  2099. #define CAN_MCR_SOFTRST_SHIFT (25U)
  2100. #define CAN_MCR_SOFTRST(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_SOFTRST_SHIFT)) & CAN_MCR_SOFTRST_MASK)
  2101. #define CAN_MCR_WAKMSK_MASK (0x4000000U)
  2102. #define CAN_MCR_WAKMSK_SHIFT (26U)
  2103. #define CAN_MCR_WAKMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_WAKMSK_SHIFT)) & CAN_MCR_WAKMSK_MASK)
  2104. #define CAN_MCR_NOTRDY_MASK (0x8000000U)
  2105. #define CAN_MCR_NOTRDY_SHIFT (27U)
  2106. #define CAN_MCR_NOTRDY(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_NOTRDY_SHIFT)) & CAN_MCR_NOTRDY_MASK)
  2107. #define CAN_MCR_HALT_MASK (0x10000000U)
  2108. #define CAN_MCR_HALT_SHIFT (28U)
  2109. #define CAN_MCR_HALT(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_HALT_SHIFT)) & CAN_MCR_HALT_MASK)
  2110. #define CAN_MCR_RFEN_MASK (0x20000000U)
  2111. #define CAN_MCR_RFEN_SHIFT (29U)
  2112. #define CAN_MCR_RFEN(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_RFEN_SHIFT)) & CAN_MCR_RFEN_MASK)
  2113. #define CAN_MCR_FRZ_MASK (0x40000000U)
  2114. #define CAN_MCR_FRZ_SHIFT (30U)
  2115. #define CAN_MCR_FRZ(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_FRZ_SHIFT)) & CAN_MCR_FRZ_MASK)
  2116. #define CAN_MCR_MDIS_MASK (0x80000000U)
  2117. #define CAN_MCR_MDIS_SHIFT (31U)
  2118. #define CAN_MCR_MDIS(x) (((uint32_t)(((uint32_t)(x)) << CAN_MCR_MDIS_SHIFT)) & CAN_MCR_MDIS_MASK)
  2119. /*! @name CTRL1 - Control 1 register */
  2120. #define CAN_CTRL1_PROPSEG_MASK (0x7U)
  2121. #define CAN_CTRL1_PROPSEG_SHIFT (0U)
  2122. #define CAN_CTRL1_PROPSEG(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_PROPSEG_SHIFT)) & CAN_CTRL1_PROPSEG_MASK)
  2123. #define CAN_CTRL1_LOM_MASK (0x8U)
  2124. #define CAN_CTRL1_LOM_SHIFT (3U)
  2125. #define CAN_CTRL1_LOM(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_LOM_SHIFT)) & CAN_CTRL1_LOM_MASK)
  2126. #define CAN_CTRL1_LBUF_MASK (0x10U)
  2127. #define CAN_CTRL1_LBUF_SHIFT (4U)
  2128. #define CAN_CTRL1_LBUF(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_LBUF_SHIFT)) & CAN_CTRL1_LBUF_MASK)
  2129. #define CAN_CTRL1_TSYN_MASK (0x20U)
  2130. #define CAN_CTRL1_TSYN_SHIFT (5U)
  2131. #define CAN_CTRL1_TSYN(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_TSYN_SHIFT)) & CAN_CTRL1_TSYN_MASK)
  2132. #define CAN_CTRL1_BOFFREC_MASK (0x40U)
  2133. #define CAN_CTRL1_BOFFREC_SHIFT (6U)
  2134. #define CAN_CTRL1_BOFFREC(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_BOFFREC_SHIFT)) & CAN_CTRL1_BOFFREC_MASK)
  2135. #define CAN_CTRL1_SMP_MASK (0x80U)
  2136. #define CAN_CTRL1_SMP_SHIFT (7U)
  2137. #define CAN_CTRL1_SMP(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_SMP_SHIFT)) & CAN_CTRL1_SMP_MASK)
  2138. #define CAN_CTRL1_RWRNMSK_MASK (0x400U)
  2139. #define CAN_CTRL1_RWRNMSK_SHIFT (10U)
  2140. #define CAN_CTRL1_RWRNMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_RWRNMSK_SHIFT)) & CAN_CTRL1_RWRNMSK_MASK)
  2141. #define CAN_CTRL1_TWRNMSK_MASK (0x800U)
  2142. #define CAN_CTRL1_TWRNMSK_SHIFT (11U)
  2143. #define CAN_CTRL1_TWRNMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_TWRNMSK_SHIFT)) & CAN_CTRL1_TWRNMSK_MASK)
  2144. #define CAN_CTRL1_LPB_MASK (0x1000U)
  2145. #define CAN_CTRL1_LPB_SHIFT (12U)
  2146. #define CAN_CTRL1_LPB(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_LPB_SHIFT)) & CAN_CTRL1_LPB_MASK)
  2147. #define CAN_CTRL1_CLKSRC_MASK (0x2000U)
  2148. #define CAN_CTRL1_CLKSRC_SHIFT (13U)
  2149. #define CAN_CTRL1_CLKSRC(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_CLKSRC_SHIFT)) & CAN_CTRL1_CLKSRC_MASK)
  2150. #define CAN_CTRL1_ERRMSK_MASK (0x4000U)
  2151. #define CAN_CTRL1_ERRMSK_SHIFT (14U)
  2152. #define CAN_CTRL1_ERRMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_ERRMSK_SHIFT)) & CAN_CTRL1_ERRMSK_MASK)
  2153. #define CAN_CTRL1_BOFFMSK_MASK (0x8000U)
  2154. #define CAN_CTRL1_BOFFMSK_SHIFT (15U)
  2155. #define CAN_CTRL1_BOFFMSK(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_BOFFMSK_SHIFT)) & CAN_CTRL1_BOFFMSK_MASK)
  2156. #define CAN_CTRL1_PSEG2_MASK (0x70000U)
  2157. #define CAN_CTRL1_PSEG2_SHIFT (16U)
  2158. #define CAN_CTRL1_PSEG2(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_PSEG2_SHIFT)) & CAN_CTRL1_PSEG2_MASK)
  2159. #define CAN_CTRL1_PSEG1_MASK (0x380000U)
  2160. #define CAN_CTRL1_PSEG1_SHIFT (19U)
  2161. #define CAN_CTRL1_PSEG1(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_PSEG1_SHIFT)) & CAN_CTRL1_PSEG1_MASK)
  2162. #define CAN_CTRL1_RJW_MASK (0xC00000U)
  2163. #define CAN_CTRL1_RJW_SHIFT (22U)
  2164. #define CAN_CTRL1_RJW(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_RJW_SHIFT)) & CAN_CTRL1_RJW_MASK)
  2165. #define CAN_CTRL1_PRESDIV_MASK (0xFF000000U)
  2166. #define CAN_CTRL1_PRESDIV_SHIFT (24U)
  2167. #define CAN_CTRL1_PRESDIV(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL1_PRESDIV_SHIFT)) & CAN_CTRL1_PRESDIV_MASK)
  2168. /*! @name TIMER - Free Running Timer */
  2169. #define CAN_TIMER_TIMER_MASK (0xFFFFU)
  2170. #define CAN_TIMER_TIMER_SHIFT (0U)
  2171. #define CAN_TIMER_TIMER(x) (((uint32_t)(((uint32_t)(x)) << CAN_TIMER_TIMER_SHIFT)) & CAN_TIMER_TIMER_MASK)
  2172. /*! @name RXMGMASK - Rx Mailboxes Global Mask Register */
  2173. #define CAN_RXMGMASK_MG_MASK (0xFFFFFFFFU)
  2174. #define CAN_RXMGMASK_MG_SHIFT (0U)
  2175. #define CAN_RXMGMASK_MG(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXMGMASK_MG_SHIFT)) & CAN_RXMGMASK_MG_MASK)
  2176. /*! @name RX14MASK - Rx 14 Mask register */
  2177. #define CAN_RX14MASK_RX14M_MASK (0xFFFFFFFFU)
  2178. #define CAN_RX14MASK_RX14M_SHIFT (0U)
  2179. #define CAN_RX14MASK_RX14M(x) (((uint32_t)(((uint32_t)(x)) << CAN_RX14MASK_RX14M_SHIFT)) & CAN_RX14MASK_RX14M_MASK)
  2180. /*! @name RX15MASK - Rx 15 Mask register */
  2181. #define CAN_RX15MASK_RX15M_MASK (0xFFFFFFFFU)
  2182. #define CAN_RX15MASK_RX15M_SHIFT (0U)
  2183. #define CAN_RX15MASK_RX15M(x) (((uint32_t)(((uint32_t)(x)) << CAN_RX15MASK_RX15M_SHIFT)) & CAN_RX15MASK_RX15M_MASK)
  2184. /*! @name ECR - Error Counter */
  2185. #define CAN_ECR_TXERRCNT_MASK (0xFFU)
  2186. #define CAN_ECR_TXERRCNT_SHIFT (0U)
  2187. #define CAN_ECR_TXERRCNT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ECR_TXERRCNT_SHIFT)) & CAN_ECR_TXERRCNT_MASK)
  2188. #define CAN_ECR_RXERRCNT_MASK (0xFF00U)
  2189. #define CAN_ECR_RXERRCNT_SHIFT (8U)
  2190. #define CAN_ECR_RXERRCNT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ECR_RXERRCNT_SHIFT)) & CAN_ECR_RXERRCNT_MASK)
  2191. /*! @name ESR1 - Error and Status 1 register */
  2192. #define CAN_ESR1_WAKINT_MASK (0x1U)
  2193. #define CAN_ESR1_WAKINT_SHIFT (0U)
  2194. #define CAN_ESR1_WAKINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_WAKINT_SHIFT)) & CAN_ESR1_WAKINT_MASK)
  2195. #define CAN_ESR1_ERRINT_MASK (0x2U)
  2196. #define CAN_ESR1_ERRINT_SHIFT (1U)
  2197. #define CAN_ESR1_ERRINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_ERRINT_SHIFT)) & CAN_ESR1_ERRINT_MASK)
  2198. #define CAN_ESR1_BOFFINT_MASK (0x4U)
  2199. #define CAN_ESR1_BOFFINT_SHIFT (2U)
  2200. #define CAN_ESR1_BOFFINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_BOFFINT_SHIFT)) & CAN_ESR1_BOFFINT_MASK)
  2201. #define CAN_ESR1_RX_MASK (0x8U)
  2202. #define CAN_ESR1_RX_SHIFT (3U)
  2203. #define CAN_ESR1_RX(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_RX_SHIFT)) & CAN_ESR1_RX_MASK)
  2204. #define CAN_ESR1_FLTCONF_MASK (0x30U)
  2205. #define CAN_ESR1_FLTCONF_SHIFT (4U)
  2206. #define CAN_ESR1_FLTCONF(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_FLTCONF_SHIFT)) & CAN_ESR1_FLTCONF_MASK)
  2207. #define CAN_ESR1_TX_MASK (0x40U)
  2208. #define CAN_ESR1_TX_SHIFT (6U)
  2209. #define CAN_ESR1_TX(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_TX_SHIFT)) & CAN_ESR1_TX_MASK)
  2210. #define CAN_ESR1_IDLE_MASK (0x80U)
  2211. #define CAN_ESR1_IDLE_SHIFT (7U)
  2212. #define CAN_ESR1_IDLE(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_IDLE_SHIFT)) & CAN_ESR1_IDLE_MASK)
  2213. #define CAN_ESR1_RXWRN_MASK (0x100U)
  2214. #define CAN_ESR1_RXWRN_SHIFT (8U)
  2215. #define CAN_ESR1_RXWRN(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_RXWRN_SHIFT)) & CAN_ESR1_RXWRN_MASK)
  2216. #define CAN_ESR1_TXWRN_MASK (0x200U)
  2217. #define CAN_ESR1_TXWRN_SHIFT (9U)
  2218. #define CAN_ESR1_TXWRN(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_TXWRN_SHIFT)) & CAN_ESR1_TXWRN_MASK)
  2219. #define CAN_ESR1_STFERR_MASK (0x400U)
  2220. #define CAN_ESR1_STFERR_SHIFT (10U)
  2221. #define CAN_ESR1_STFERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_STFERR_SHIFT)) & CAN_ESR1_STFERR_MASK)
  2222. #define CAN_ESR1_FRMERR_MASK (0x800U)
  2223. #define CAN_ESR1_FRMERR_SHIFT (11U)
  2224. #define CAN_ESR1_FRMERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_FRMERR_SHIFT)) & CAN_ESR1_FRMERR_MASK)
  2225. #define CAN_ESR1_CRCERR_MASK (0x1000U)
  2226. #define CAN_ESR1_CRCERR_SHIFT (12U)
  2227. #define CAN_ESR1_CRCERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_CRCERR_SHIFT)) & CAN_ESR1_CRCERR_MASK)
  2228. #define CAN_ESR1_ACKERR_MASK (0x2000U)
  2229. #define CAN_ESR1_ACKERR_SHIFT (13U)
  2230. #define CAN_ESR1_ACKERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_ACKERR_SHIFT)) & CAN_ESR1_ACKERR_MASK)
  2231. #define CAN_ESR1_BIT0ERR_MASK (0x4000U)
  2232. #define CAN_ESR1_BIT0ERR_SHIFT (14U)
  2233. #define CAN_ESR1_BIT0ERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_BIT0ERR_SHIFT)) & CAN_ESR1_BIT0ERR_MASK)
  2234. #define CAN_ESR1_BIT1ERR_MASK (0x8000U)
  2235. #define CAN_ESR1_BIT1ERR_SHIFT (15U)
  2236. #define CAN_ESR1_BIT1ERR(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_BIT1ERR_SHIFT)) & CAN_ESR1_BIT1ERR_MASK)
  2237. #define CAN_ESR1_RWRNINT_MASK (0x10000U)
  2238. #define CAN_ESR1_RWRNINT_SHIFT (16U)
  2239. #define CAN_ESR1_RWRNINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_RWRNINT_SHIFT)) & CAN_ESR1_RWRNINT_MASK)
  2240. #define CAN_ESR1_TWRNINT_MASK (0x20000U)
  2241. #define CAN_ESR1_TWRNINT_SHIFT (17U)
  2242. #define CAN_ESR1_TWRNINT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_TWRNINT_SHIFT)) & CAN_ESR1_TWRNINT_MASK)
  2243. #define CAN_ESR1_SYNCH_MASK (0x40000U)
  2244. #define CAN_ESR1_SYNCH_SHIFT (18U)
  2245. #define CAN_ESR1_SYNCH(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR1_SYNCH_SHIFT)) & CAN_ESR1_SYNCH_MASK)
  2246. /*! @name IMASK1 - Interrupt Masks 1 register */
  2247. #define CAN_IMASK1_BUFLM_MASK (0xFFFFFFFFU)
  2248. #define CAN_IMASK1_BUFLM_SHIFT (0U)
  2249. #define CAN_IMASK1_BUFLM(x) (((uint32_t)(((uint32_t)(x)) << CAN_IMASK1_BUFLM_SHIFT)) & CAN_IMASK1_BUFLM_MASK)
  2250. /*! @name IFLAG1 - Interrupt Flags 1 register */
  2251. #define CAN_IFLAG1_BUF0I_MASK (0x1U)
  2252. #define CAN_IFLAG1_BUF0I_SHIFT (0U)
  2253. #define CAN_IFLAG1_BUF0I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF0I_SHIFT)) & CAN_IFLAG1_BUF0I_MASK)
  2254. #define CAN_IFLAG1_BUF4TO1I_MASK (0x1EU)
  2255. #define CAN_IFLAG1_BUF4TO1I_SHIFT (1U)
  2256. #define CAN_IFLAG1_BUF4TO1I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF4TO1I_SHIFT)) & CAN_IFLAG1_BUF4TO1I_MASK)
  2257. #define CAN_IFLAG1_BUF5I_MASK (0x20U)
  2258. #define CAN_IFLAG1_BUF5I_SHIFT (5U)
  2259. #define CAN_IFLAG1_BUF5I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF5I_SHIFT)) & CAN_IFLAG1_BUF5I_MASK)
  2260. #define CAN_IFLAG1_BUF6I_MASK (0x40U)
  2261. #define CAN_IFLAG1_BUF6I_SHIFT (6U)
  2262. #define CAN_IFLAG1_BUF6I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF6I_SHIFT)) & CAN_IFLAG1_BUF6I_MASK)
  2263. #define CAN_IFLAG1_BUF7I_MASK (0x80U)
  2264. #define CAN_IFLAG1_BUF7I_SHIFT (7U)
  2265. #define CAN_IFLAG1_BUF7I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF7I_SHIFT)) & CAN_IFLAG1_BUF7I_MASK)
  2266. #define CAN_IFLAG1_BUF31TO8I_MASK (0xFFFFFF00U)
  2267. #define CAN_IFLAG1_BUF31TO8I_SHIFT (8U)
  2268. #define CAN_IFLAG1_BUF31TO8I(x) (((uint32_t)(((uint32_t)(x)) << CAN_IFLAG1_BUF31TO8I_SHIFT)) & CAN_IFLAG1_BUF31TO8I_MASK)
  2269. /*! @name CTRL2 - Control 2 register */
  2270. #define CAN_CTRL2_EACEN_MASK (0x10000U)
  2271. #define CAN_CTRL2_EACEN_SHIFT (16U)
  2272. #define CAN_CTRL2_EACEN(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_EACEN_SHIFT)) & CAN_CTRL2_EACEN_MASK)
  2273. #define CAN_CTRL2_RRS_MASK (0x20000U)
  2274. #define CAN_CTRL2_RRS_SHIFT (17U)
  2275. #define CAN_CTRL2_RRS(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_RRS_SHIFT)) & CAN_CTRL2_RRS_MASK)
  2276. #define CAN_CTRL2_MRP_MASK (0x40000U)
  2277. #define CAN_CTRL2_MRP_SHIFT (18U)
  2278. #define CAN_CTRL2_MRP(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_MRP_SHIFT)) & CAN_CTRL2_MRP_MASK)
  2279. #define CAN_CTRL2_TASD_MASK (0xF80000U)
  2280. #define CAN_CTRL2_TASD_SHIFT (19U)
  2281. #define CAN_CTRL2_TASD(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_TASD_SHIFT)) & CAN_CTRL2_TASD_MASK)
  2282. #define CAN_CTRL2_RFFN_MASK (0xF000000U)
  2283. #define CAN_CTRL2_RFFN_SHIFT (24U)
  2284. #define CAN_CTRL2_RFFN(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_RFFN_SHIFT)) & CAN_CTRL2_RFFN_MASK)
  2285. #define CAN_CTRL2_WRMFRZ_MASK (0x10000000U)
  2286. #define CAN_CTRL2_WRMFRZ_SHIFT (28U)
  2287. #define CAN_CTRL2_WRMFRZ(x) (((uint32_t)(((uint32_t)(x)) << CAN_CTRL2_WRMFRZ_SHIFT)) & CAN_CTRL2_WRMFRZ_MASK)
  2288. /*! @name ESR2 - Error and Status 2 register */
  2289. #define CAN_ESR2_IMB_MASK (0x2000U)
  2290. #define CAN_ESR2_IMB_SHIFT (13U)
  2291. #define CAN_ESR2_IMB(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR2_IMB_SHIFT)) & CAN_ESR2_IMB_MASK)
  2292. #define CAN_ESR2_VPS_MASK (0x4000U)
  2293. #define CAN_ESR2_VPS_SHIFT (14U)
  2294. #define CAN_ESR2_VPS(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR2_VPS_SHIFT)) & CAN_ESR2_VPS_MASK)
  2295. #define CAN_ESR2_LPTM_MASK (0x7F0000U)
  2296. #define CAN_ESR2_LPTM_SHIFT (16U)
  2297. #define CAN_ESR2_LPTM(x) (((uint32_t)(((uint32_t)(x)) << CAN_ESR2_LPTM_SHIFT)) & CAN_ESR2_LPTM_MASK)
  2298. /*! @name CRCR - CRC Register */
  2299. #define CAN_CRCR_TXCRC_MASK (0x7FFFU)
  2300. #define CAN_CRCR_TXCRC_SHIFT (0U)
  2301. #define CAN_CRCR_TXCRC(x) (((uint32_t)(((uint32_t)(x)) << CAN_CRCR_TXCRC_SHIFT)) & CAN_CRCR_TXCRC_MASK)
  2302. #define CAN_CRCR_MBCRC_MASK (0x7F0000U)
  2303. #define CAN_CRCR_MBCRC_SHIFT (16U)
  2304. #define CAN_CRCR_MBCRC(x) (((uint32_t)(((uint32_t)(x)) << CAN_CRCR_MBCRC_SHIFT)) & CAN_CRCR_MBCRC_MASK)
  2305. /*! @name RXFGMASK - Rx FIFO Global Mask register */
  2306. #define CAN_RXFGMASK_FGM_MASK (0xFFFFFFFFU)
  2307. #define CAN_RXFGMASK_FGM_SHIFT (0U)
  2308. #define CAN_RXFGMASK_FGM(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXFGMASK_FGM_SHIFT)) & CAN_RXFGMASK_FGM_MASK)
  2309. /*! @name RXFIR - Rx FIFO Information Register */
  2310. #define CAN_RXFIR_IDHIT_MASK (0x1FFU)
  2311. #define CAN_RXFIR_IDHIT_SHIFT (0U)
  2312. #define CAN_RXFIR_IDHIT(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXFIR_IDHIT_SHIFT)) & CAN_RXFIR_IDHIT_MASK)
  2313. /*! @name CS - Message Buffer 0 CS Register..Message Buffer 15 CS Register */
  2314. #define CAN_CS_TIME_STAMP_MASK (0xFFFFU)
  2315. #define CAN_CS_TIME_STAMP_SHIFT (0U)
  2316. #define CAN_CS_TIME_STAMP(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_TIME_STAMP_SHIFT)) & CAN_CS_TIME_STAMP_MASK)
  2317. #define CAN_CS_DLC_MASK (0xF0000U)
  2318. #define CAN_CS_DLC_SHIFT (16U)
  2319. #define CAN_CS_DLC(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_DLC_SHIFT)) & CAN_CS_DLC_MASK)
  2320. #define CAN_CS_RTR_MASK (0x100000U)
  2321. #define CAN_CS_RTR_SHIFT (20U)
  2322. #define CAN_CS_RTR(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_RTR_SHIFT)) & CAN_CS_RTR_MASK)
  2323. #define CAN_CS_IDE_MASK (0x200000U)
  2324. #define CAN_CS_IDE_SHIFT (21U)
  2325. #define CAN_CS_IDE(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_IDE_SHIFT)) & CAN_CS_IDE_MASK)
  2326. #define CAN_CS_SRR_MASK (0x400000U)
  2327. #define CAN_CS_SRR_SHIFT (22U)
  2328. #define CAN_CS_SRR(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_SRR_SHIFT)) & CAN_CS_SRR_MASK)
  2329. #define CAN_CS_CODE_MASK (0xF000000U)
  2330. #define CAN_CS_CODE_SHIFT (24U)
  2331. #define CAN_CS_CODE(x) (((uint32_t)(((uint32_t)(x)) << CAN_CS_CODE_SHIFT)) & CAN_CS_CODE_MASK)
  2332. /* The count of CAN_CS */
  2333. #define CAN_CS_COUNT (16U)
  2334. /*! @name ID - Message Buffer 0 ID Register..Message Buffer 15 ID Register */
  2335. #define CAN_ID_EXT_MASK (0x3FFFFU)
  2336. #define CAN_ID_EXT_SHIFT (0U)
  2337. #define CAN_ID_EXT(x) (((uint32_t)(((uint32_t)(x)) << CAN_ID_EXT_SHIFT)) & CAN_ID_EXT_MASK)
  2338. #define CAN_ID_STD_MASK (0x1FFC0000U)
  2339. #define CAN_ID_STD_SHIFT (18U)
  2340. #define CAN_ID_STD(x) (((uint32_t)(((uint32_t)(x)) << CAN_ID_STD_SHIFT)) & CAN_ID_STD_MASK)
  2341. #define CAN_ID_PRIO_MASK (0xE0000000U)
  2342. #define CAN_ID_PRIO_SHIFT (29U)
  2343. #define CAN_ID_PRIO(x) (((uint32_t)(((uint32_t)(x)) << CAN_ID_PRIO_SHIFT)) & CAN_ID_PRIO_MASK)
  2344. /* The count of CAN_ID */
  2345. #define CAN_ID_COUNT (16U)
  2346. /*! @name WORD0 - Message Buffer 0 WORD0 Register..Message Buffer 15 WORD0 Register */
  2347. #define CAN_WORD0_DATA_BYTE_3_MASK (0xFFU)
  2348. #define CAN_WORD0_DATA_BYTE_3_SHIFT (0U)
  2349. #define CAN_WORD0_DATA_BYTE_3(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD0_DATA_BYTE_3_SHIFT)) & CAN_WORD0_DATA_BYTE_3_MASK)
  2350. #define CAN_WORD0_DATA_BYTE_2_MASK (0xFF00U)
  2351. #define CAN_WORD0_DATA_BYTE_2_SHIFT (8U)
  2352. #define CAN_WORD0_DATA_BYTE_2(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD0_DATA_BYTE_2_SHIFT)) & CAN_WORD0_DATA_BYTE_2_MASK)
  2353. #define CAN_WORD0_DATA_BYTE_1_MASK (0xFF0000U)
  2354. #define CAN_WORD0_DATA_BYTE_1_SHIFT (16U)
  2355. #define CAN_WORD0_DATA_BYTE_1(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD0_DATA_BYTE_1_SHIFT)) & CAN_WORD0_DATA_BYTE_1_MASK)
  2356. #define CAN_WORD0_DATA_BYTE_0_MASK (0xFF000000U)
  2357. #define CAN_WORD0_DATA_BYTE_0_SHIFT (24U)
  2358. #define CAN_WORD0_DATA_BYTE_0(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD0_DATA_BYTE_0_SHIFT)) & CAN_WORD0_DATA_BYTE_0_MASK)
  2359. /* The count of CAN_WORD0 */
  2360. #define CAN_WORD0_COUNT (16U)
  2361. /*! @name WORD1 - Message Buffer 0 WORD1 Register..Message Buffer 15 WORD1 Register */
  2362. #define CAN_WORD1_DATA_BYTE_7_MASK (0xFFU)
  2363. #define CAN_WORD1_DATA_BYTE_7_SHIFT (0U)
  2364. #define CAN_WORD1_DATA_BYTE_7(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD1_DATA_BYTE_7_SHIFT)) & CAN_WORD1_DATA_BYTE_7_MASK)
  2365. #define CAN_WORD1_DATA_BYTE_6_MASK (0xFF00U)
  2366. #define CAN_WORD1_DATA_BYTE_6_SHIFT (8U)
  2367. #define CAN_WORD1_DATA_BYTE_6(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD1_DATA_BYTE_6_SHIFT)) & CAN_WORD1_DATA_BYTE_6_MASK)
  2368. #define CAN_WORD1_DATA_BYTE_5_MASK (0xFF0000U)
  2369. #define CAN_WORD1_DATA_BYTE_5_SHIFT (16U)
  2370. #define CAN_WORD1_DATA_BYTE_5(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD1_DATA_BYTE_5_SHIFT)) & CAN_WORD1_DATA_BYTE_5_MASK)
  2371. #define CAN_WORD1_DATA_BYTE_4_MASK (0xFF000000U)
  2372. #define CAN_WORD1_DATA_BYTE_4_SHIFT (24U)
  2373. #define CAN_WORD1_DATA_BYTE_4(x) (((uint32_t)(((uint32_t)(x)) << CAN_WORD1_DATA_BYTE_4_SHIFT)) & CAN_WORD1_DATA_BYTE_4_MASK)
  2374. /* The count of CAN_WORD1 */
  2375. #define CAN_WORD1_COUNT (16U)
  2376. /*! @name RXIMR - Rx Individual Mask Registers */
  2377. #define CAN_RXIMR_MI_MASK (0xFFFFFFFFU)
  2378. #define CAN_RXIMR_MI_SHIFT (0U)
  2379. #define CAN_RXIMR_MI(x) (((uint32_t)(((uint32_t)(x)) << CAN_RXIMR_MI_SHIFT)) & CAN_RXIMR_MI_MASK)
  2380. /* The count of CAN_RXIMR */
  2381. #define CAN_RXIMR_COUNT (16U)
  2382. /*!
  2383. * @}
  2384. */ /* end of group CAN_Register_Masks */
  2385. /* CAN - Peripheral instance base addresses */
  2386. /** Peripheral CAN0 base address */
  2387. #define CAN0_BASE (0x40024000u)
  2388. /** Peripheral CAN0 base pointer */
  2389. #define CAN0 ((CAN_Type *)CAN0_BASE)
  2390. /** Array initializer of CAN peripheral base addresses */
  2391. #define CAN_BASE_ADDRS { CAN0_BASE }
  2392. /** Array initializer of CAN peripheral base pointers */
  2393. #define CAN_BASE_PTRS { CAN0 }
  2394. /** Interrupt vectors for the CAN peripheral type */
  2395. #define CAN_Rx_Warning_IRQS { CAN0_Rx_Warning_IRQn }
  2396. #define CAN_Tx_Warning_IRQS { CAN0_Tx_Warning_IRQn }
  2397. #define CAN_Wake_Up_IRQS { CAN0_Wake_Up_IRQn }
  2398. #define CAN_Error_IRQS { CAN0_Error_IRQn }
  2399. #define CAN_Bus_Off_IRQS { CAN0_Bus_Off_IRQn }
  2400. #define CAN_ORed_Message_buffer_IRQS { CAN0_ORed_Message_buffer_IRQn }
  2401. /*!
  2402. * @}
  2403. */ /* end of group CAN_Peripheral_Access_Layer */
  2404. /* ----------------------------------------------------------------------------
  2405. -- CAU Peripheral Access Layer
  2406. ---------------------------------------------------------------------------- */
  2407. /*!
  2408. * @addtogroup CAU_Peripheral_Access_Layer CAU Peripheral Access Layer
  2409. * @{
  2410. */
  2411. /** CAU - Register Layout Typedef */
  2412. typedef struct {
  2413. __O uint32_t DIRECT[16]; /**< Direct access register 0..Direct access register 15, array offset: 0x0, array step: 0x4 */
  2414. uint8_t RESERVED_0[2048];
  2415. __O uint32_t LDR_CASR; /**< Status register - Load Register command, offset: 0x840 */
  2416. __O uint32_t LDR_CAA; /**< Accumulator register - Load Register command, offset: 0x844 */
  2417. __O uint32_t LDR_CA[9]; /**< General Purpose Register 0 - Load Register command..General Purpose Register 8 - Load Register command, array offset: 0x848, array step: 0x4 */
  2418. uint8_t RESERVED_1[20];
  2419. __I uint32_t STR_CASR; /**< Status register - Store Register command, offset: 0x880 */
  2420. __I uint32_t STR_CAA; /**< Accumulator register - Store Register command, offset: 0x884 */
  2421. __I uint32_t STR_CA[9]; /**< General Purpose Register 0 - Store Register command..General Purpose Register 8 - Store Register command, array offset: 0x888, array step: 0x4 */
  2422. uint8_t RESERVED_2[20];
  2423. __O uint32_t ADR_CASR; /**< Status register - Add Register command, offset: 0x8C0 */
  2424. __O uint32_t ADR_CAA; /**< Accumulator register - Add to register command, offset: 0x8C4 */
  2425. __O uint32_t ADR_CA[9]; /**< General Purpose Register 0 - Add to register command..General Purpose Register 8 - Add to register command, array offset: 0x8C8, array step: 0x4 */
  2426. uint8_t RESERVED_3[20];
  2427. __O uint32_t RADR_CASR; /**< Status register - Reverse and Add to Register command, offset: 0x900 */
  2428. __O uint32_t RADR_CAA; /**< Accumulator register - Reverse and Add to Register command, offset: 0x904 */
  2429. __O uint32_t RADR_CA[9]; /**< General Purpose Register 0 - Reverse and Add to Register command..General Purpose Register 8 - Reverse and Add to Register command, array offset: 0x908, array step: 0x4 */
  2430. uint8_t RESERVED_4[84];
  2431. __O uint32_t XOR_CASR; /**< Status register - Exclusive Or command, offset: 0x980 */
  2432. __O uint32_t XOR_CAA; /**< Accumulator register - Exclusive Or command, offset: 0x984 */
  2433. __O uint32_t XOR_CA[9]; /**< General Purpose Register 0 - Exclusive Or command..General Purpose Register 8 - Exclusive Or command, array offset: 0x988, array step: 0x4 */
  2434. uint8_t RESERVED_5[20];
  2435. __O uint32_t ROTL_CASR; /**< Status register - Rotate Left command, offset: 0x9C0 */
  2436. __O uint32_t ROTL_CAA; /**< Accumulator register - Rotate Left command, offset: 0x9C4 */
  2437. __O uint32_t ROTL_CA[9]; /**< General Purpose Register 0 - Rotate Left command..General Purpose Register 8 - Rotate Left command, array offset: 0x9C8, array step: 0x4 */
  2438. uint8_t RESERVED_6[276];
  2439. __O uint32_t AESC_CASR; /**< Status register - AES Column Operation command, offset: 0xB00 */
  2440. __O uint32_t AESC_CAA; /**< Accumulator register - AES Column Operation command, offset: 0xB04 */
  2441. __O uint32_t AESC_CA[9]; /**< General Purpose Register 0 - AES Column Operation command..General Purpose Register 8 - AES Column Operation command, array offset: 0xB08, array step: 0x4 */
  2442. uint8_t RESERVED_7[20];
  2443. __O uint32_t AESIC_CASR; /**< Status register - AES Inverse Column Operation command, offset: 0xB40 */
  2444. __O uint32_t AESIC_CAA; /**< Accumulator register - AES Inverse Column Operation command, offset: 0xB44 */
  2445. __O uint32_t AESIC_CA[9]; /**< General Purpose Register 0 - AES Inverse Column Operation command..General Purpose Register 8 - AES Inverse Column Operation command, array offset: 0xB48, array step: 0x4 */
  2446. } CAU_Type;
  2447. /* ----------------------------------------------------------------------------
  2448. -- CAU Register Masks
  2449. ---------------------------------------------------------------------------- */
  2450. /*!
  2451. * @addtogroup CAU_Register_Masks CAU Register Masks
  2452. * @{
  2453. */
  2454. /*! @name DIRECT - Direct access register 0..Direct access register 15 */
  2455. #define CAU_DIRECT_CAU_DIRECT0_MASK (0xFFFFFFFFU)
  2456. #define CAU_DIRECT_CAU_DIRECT0_SHIFT (0U)
  2457. #define CAU_DIRECT_CAU_DIRECT0(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT0_SHIFT)) & CAU_DIRECT_CAU_DIRECT0_MASK)
  2458. #define CAU_DIRECT_CAU_DIRECT1_MASK (0xFFFFFFFFU)
  2459. #define CAU_DIRECT_CAU_DIRECT1_SHIFT (0U)
  2460. #define CAU_DIRECT_CAU_DIRECT1(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT1_SHIFT)) & CAU_DIRECT_CAU_DIRECT1_MASK)
  2461. #define CAU_DIRECT_CAU_DIRECT2_MASK (0xFFFFFFFFU)
  2462. #define CAU_DIRECT_CAU_DIRECT2_SHIFT (0U)
  2463. #define CAU_DIRECT_CAU_DIRECT2(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT2_SHIFT)) & CAU_DIRECT_CAU_DIRECT2_MASK)
  2464. #define CAU_DIRECT_CAU_DIRECT3_MASK (0xFFFFFFFFU)
  2465. #define CAU_DIRECT_CAU_DIRECT3_SHIFT (0U)
  2466. #define CAU_DIRECT_CAU_DIRECT3(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT3_SHIFT)) & CAU_DIRECT_CAU_DIRECT3_MASK)
  2467. #define CAU_DIRECT_CAU_DIRECT4_MASK (0xFFFFFFFFU)
  2468. #define CAU_DIRECT_CAU_DIRECT4_SHIFT (0U)
  2469. #define CAU_DIRECT_CAU_DIRECT4(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT4_SHIFT)) & CAU_DIRECT_CAU_DIRECT4_MASK)
  2470. #define CAU_DIRECT_CAU_DIRECT5_MASK (0xFFFFFFFFU)
  2471. #define CAU_DIRECT_CAU_DIRECT5_SHIFT (0U)
  2472. #define CAU_DIRECT_CAU_DIRECT5(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT5_SHIFT)) & CAU_DIRECT_CAU_DIRECT5_MASK)
  2473. #define CAU_DIRECT_CAU_DIRECT6_MASK (0xFFFFFFFFU)
  2474. #define CAU_DIRECT_CAU_DIRECT6_SHIFT (0U)
  2475. #define CAU_DIRECT_CAU_DIRECT6(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT6_SHIFT)) & CAU_DIRECT_CAU_DIRECT6_MASK)
  2476. #define CAU_DIRECT_CAU_DIRECT7_MASK (0xFFFFFFFFU)
  2477. #define CAU_DIRECT_CAU_DIRECT7_SHIFT (0U)
  2478. #define CAU_DIRECT_CAU_DIRECT7(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT7_SHIFT)) & CAU_DIRECT_CAU_DIRECT7_MASK)
  2479. #define CAU_DIRECT_CAU_DIRECT8_MASK (0xFFFFFFFFU)
  2480. #define CAU_DIRECT_CAU_DIRECT8_SHIFT (0U)
  2481. #define CAU_DIRECT_CAU_DIRECT8(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT8_SHIFT)) & CAU_DIRECT_CAU_DIRECT8_MASK)
  2482. #define CAU_DIRECT_CAU_DIRECT9_MASK (0xFFFFFFFFU)
  2483. #define CAU_DIRECT_CAU_DIRECT9_SHIFT (0U)
  2484. #define CAU_DIRECT_CAU_DIRECT9(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT9_SHIFT)) & CAU_DIRECT_CAU_DIRECT9_MASK)
  2485. #define CAU_DIRECT_CAU_DIRECT10_MASK (0xFFFFFFFFU)
  2486. #define CAU_DIRECT_CAU_DIRECT10_SHIFT (0U)
  2487. #define CAU_DIRECT_CAU_DIRECT10(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT10_SHIFT)) & CAU_DIRECT_CAU_DIRECT10_MASK)
  2488. #define CAU_DIRECT_CAU_DIRECT11_MASK (0xFFFFFFFFU)
  2489. #define CAU_DIRECT_CAU_DIRECT11_SHIFT (0U)
  2490. #define CAU_DIRECT_CAU_DIRECT11(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT11_SHIFT)) & CAU_DIRECT_CAU_DIRECT11_MASK)
  2491. #define CAU_DIRECT_CAU_DIRECT12_MASK (0xFFFFFFFFU)
  2492. #define CAU_DIRECT_CAU_DIRECT12_SHIFT (0U)
  2493. #define CAU_DIRECT_CAU_DIRECT12(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT12_SHIFT)) & CAU_DIRECT_CAU_DIRECT12_MASK)
  2494. #define CAU_DIRECT_CAU_DIRECT13_MASK (0xFFFFFFFFU)
  2495. #define CAU_DIRECT_CAU_DIRECT13_SHIFT (0U)
  2496. #define CAU_DIRECT_CAU_DIRECT13(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT13_SHIFT)) & CAU_DIRECT_CAU_DIRECT13_MASK)
  2497. #define CAU_DIRECT_CAU_DIRECT14_MASK (0xFFFFFFFFU)
  2498. #define CAU_DIRECT_CAU_DIRECT14_SHIFT (0U)
  2499. #define CAU_DIRECT_CAU_DIRECT14(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT14_SHIFT)) & CAU_DIRECT_CAU_DIRECT14_MASK)
  2500. #define CAU_DIRECT_CAU_DIRECT15_MASK (0xFFFFFFFFU)
  2501. #define CAU_DIRECT_CAU_DIRECT15_SHIFT (0U)
  2502. #define CAU_DIRECT_CAU_DIRECT15(x) (((uint32_t)(((uint32_t)(x)) << CAU_DIRECT_CAU_DIRECT15_SHIFT)) & CAU_DIRECT_CAU_DIRECT15_MASK)
  2503. /* The count of CAU_DIRECT */
  2504. #define CAU_DIRECT_COUNT (16U)
  2505. /*! @name LDR_CASR - Status register - Load Register command */
  2506. #define CAU_LDR_CASR_IC_MASK (0x1U)
  2507. #define CAU_LDR_CASR_IC_SHIFT (0U)
  2508. #define CAU_LDR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CASR_IC_SHIFT)) & CAU_LDR_CASR_IC_MASK)
  2509. #define CAU_LDR_CASR_DPE_MASK (0x2U)
  2510. #define CAU_LDR_CASR_DPE_SHIFT (1U)
  2511. #define CAU_LDR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CASR_DPE_SHIFT)) & CAU_LDR_CASR_DPE_MASK)
  2512. #define CAU_LDR_CASR_VER_MASK (0xF0000000U)
  2513. #define CAU_LDR_CASR_VER_SHIFT (28U)
  2514. #define CAU_LDR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CASR_VER_SHIFT)) & CAU_LDR_CASR_VER_MASK)
  2515. /*! @name LDR_CAA - Accumulator register - Load Register command */
  2516. #define CAU_LDR_CAA_ACC_MASK (0xFFFFFFFFU)
  2517. #define CAU_LDR_CAA_ACC_SHIFT (0U)
  2518. #define CAU_LDR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CAA_ACC_SHIFT)) & CAU_LDR_CAA_ACC_MASK)
  2519. /*! @name LDR_CA - General Purpose Register 0 - Load Register command..General Purpose Register 8 - Load Register command */
  2520. #define CAU_LDR_CA_CA0_MASK (0xFFFFFFFFU)
  2521. #define CAU_LDR_CA_CA0_SHIFT (0U)
  2522. #define CAU_LDR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA0_SHIFT)) & CAU_LDR_CA_CA0_MASK)
  2523. #define CAU_LDR_CA_CA1_MASK (0xFFFFFFFFU)
  2524. #define CAU_LDR_CA_CA1_SHIFT (0U)
  2525. #define CAU_LDR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA1_SHIFT)) & CAU_LDR_CA_CA1_MASK)
  2526. #define CAU_LDR_CA_CA2_MASK (0xFFFFFFFFU)
  2527. #define CAU_LDR_CA_CA2_SHIFT (0U)
  2528. #define CAU_LDR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA2_SHIFT)) & CAU_LDR_CA_CA2_MASK)
  2529. #define CAU_LDR_CA_CA3_MASK (0xFFFFFFFFU)
  2530. #define CAU_LDR_CA_CA3_SHIFT (0U)
  2531. #define CAU_LDR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA3_SHIFT)) & CAU_LDR_CA_CA3_MASK)
  2532. #define CAU_LDR_CA_CA4_MASK (0xFFFFFFFFU)
  2533. #define CAU_LDR_CA_CA4_SHIFT (0U)
  2534. #define CAU_LDR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA4_SHIFT)) & CAU_LDR_CA_CA4_MASK)
  2535. #define CAU_LDR_CA_CA5_MASK (0xFFFFFFFFU)
  2536. #define CAU_LDR_CA_CA5_SHIFT (0U)
  2537. #define CAU_LDR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA5_SHIFT)) & CAU_LDR_CA_CA5_MASK)
  2538. #define CAU_LDR_CA_CA6_MASK (0xFFFFFFFFU)
  2539. #define CAU_LDR_CA_CA6_SHIFT (0U)
  2540. #define CAU_LDR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA6_SHIFT)) & CAU_LDR_CA_CA6_MASK)
  2541. #define CAU_LDR_CA_CA7_MASK (0xFFFFFFFFU)
  2542. #define CAU_LDR_CA_CA7_SHIFT (0U)
  2543. #define CAU_LDR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA7_SHIFT)) & CAU_LDR_CA_CA7_MASK)
  2544. #define CAU_LDR_CA_CA8_MASK (0xFFFFFFFFU)
  2545. #define CAU_LDR_CA_CA8_SHIFT (0U)
  2546. #define CAU_LDR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_LDR_CA_CA8_SHIFT)) & CAU_LDR_CA_CA8_MASK)
  2547. /* The count of CAU_LDR_CA */
  2548. #define CAU_LDR_CA_COUNT (9U)
  2549. /*! @name STR_CASR - Status register - Store Register command */
  2550. #define CAU_STR_CASR_IC_MASK (0x1U)
  2551. #define CAU_STR_CASR_IC_SHIFT (0U)
  2552. #define CAU_STR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CASR_IC_SHIFT)) & CAU_STR_CASR_IC_MASK)
  2553. #define CAU_STR_CASR_DPE_MASK (0x2U)
  2554. #define CAU_STR_CASR_DPE_SHIFT (1U)
  2555. #define CAU_STR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CASR_DPE_SHIFT)) & CAU_STR_CASR_DPE_MASK)
  2556. #define CAU_STR_CASR_VER_MASK (0xF0000000U)
  2557. #define CAU_STR_CASR_VER_SHIFT (28U)
  2558. #define CAU_STR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CASR_VER_SHIFT)) & CAU_STR_CASR_VER_MASK)
  2559. /*! @name STR_CAA - Accumulator register - Store Register command */
  2560. #define CAU_STR_CAA_ACC_MASK (0xFFFFFFFFU)
  2561. #define CAU_STR_CAA_ACC_SHIFT (0U)
  2562. #define CAU_STR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CAA_ACC_SHIFT)) & CAU_STR_CAA_ACC_MASK)
  2563. /*! @name STR_CA - General Purpose Register 0 - Store Register command..General Purpose Register 8 - Store Register command */
  2564. #define CAU_STR_CA_CA0_MASK (0xFFFFFFFFU)
  2565. #define CAU_STR_CA_CA0_SHIFT (0U)
  2566. #define CAU_STR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA0_SHIFT)) & CAU_STR_CA_CA0_MASK)
  2567. #define CAU_STR_CA_CA1_MASK (0xFFFFFFFFU)
  2568. #define CAU_STR_CA_CA1_SHIFT (0U)
  2569. #define CAU_STR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA1_SHIFT)) & CAU_STR_CA_CA1_MASK)
  2570. #define CAU_STR_CA_CA2_MASK (0xFFFFFFFFU)
  2571. #define CAU_STR_CA_CA2_SHIFT (0U)
  2572. #define CAU_STR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA2_SHIFT)) & CAU_STR_CA_CA2_MASK)
  2573. #define CAU_STR_CA_CA3_MASK (0xFFFFFFFFU)
  2574. #define CAU_STR_CA_CA3_SHIFT (0U)
  2575. #define CAU_STR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA3_SHIFT)) & CAU_STR_CA_CA3_MASK)
  2576. #define CAU_STR_CA_CA4_MASK (0xFFFFFFFFU)
  2577. #define CAU_STR_CA_CA4_SHIFT (0U)
  2578. #define CAU_STR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA4_SHIFT)) & CAU_STR_CA_CA4_MASK)
  2579. #define CAU_STR_CA_CA5_MASK (0xFFFFFFFFU)
  2580. #define CAU_STR_CA_CA5_SHIFT (0U)
  2581. #define CAU_STR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA5_SHIFT)) & CAU_STR_CA_CA5_MASK)
  2582. #define CAU_STR_CA_CA6_MASK (0xFFFFFFFFU)
  2583. #define CAU_STR_CA_CA6_SHIFT (0U)
  2584. #define CAU_STR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA6_SHIFT)) & CAU_STR_CA_CA6_MASK)
  2585. #define CAU_STR_CA_CA7_MASK (0xFFFFFFFFU)
  2586. #define CAU_STR_CA_CA7_SHIFT (0U)
  2587. #define CAU_STR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA7_SHIFT)) & CAU_STR_CA_CA7_MASK)
  2588. #define CAU_STR_CA_CA8_MASK (0xFFFFFFFFU)
  2589. #define CAU_STR_CA_CA8_SHIFT (0U)
  2590. #define CAU_STR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_STR_CA_CA8_SHIFT)) & CAU_STR_CA_CA8_MASK)
  2591. /* The count of CAU_STR_CA */
  2592. #define CAU_STR_CA_COUNT (9U)
  2593. /*! @name ADR_CASR - Status register - Add Register command */
  2594. #define CAU_ADR_CASR_IC_MASK (0x1U)
  2595. #define CAU_ADR_CASR_IC_SHIFT (0U)
  2596. #define CAU_ADR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CASR_IC_SHIFT)) & CAU_ADR_CASR_IC_MASK)
  2597. #define CAU_ADR_CASR_DPE_MASK (0x2U)
  2598. #define CAU_ADR_CASR_DPE_SHIFT (1U)
  2599. #define CAU_ADR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CASR_DPE_SHIFT)) & CAU_ADR_CASR_DPE_MASK)
  2600. #define CAU_ADR_CASR_VER_MASK (0xF0000000U)
  2601. #define CAU_ADR_CASR_VER_SHIFT (28U)
  2602. #define CAU_ADR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CASR_VER_SHIFT)) & CAU_ADR_CASR_VER_MASK)
  2603. /*! @name ADR_CAA - Accumulator register - Add to register command */
  2604. #define CAU_ADR_CAA_ACC_MASK (0xFFFFFFFFU)
  2605. #define CAU_ADR_CAA_ACC_SHIFT (0U)
  2606. #define CAU_ADR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CAA_ACC_SHIFT)) & CAU_ADR_CAA_ACC_MASK)
  2607. /*! @name ADR_CA - General Purpose Register 0 - Add to register command..General Purpose Register 8 - Add to register command */
  2608. #define CAU_ADR_CA_CA0_MASK (0xFFFFFFFFU)
  2609. #define CAU_ADR_CA_CA0_SHIFT (0U)
  2610. #define CAU_ADR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA0_SHIFT)) & CAU_ADR_CA_CA0_MASK)
  2611. #define CAU_ADR_CA_CA1_MASK (0xFFFFFFFFU)
  2612. #define CAU_ADR_CA_CA1_SHIFT (0U)
  2613. #define CAU_ADR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA1_SHIFT)) & CAU_ADR_CA_CA1_MASK)
  2614. #define CAU_ADR_CA_CA2_MASK (0xFFFFFFFFU)
  2615. #define CAU_ADR_CA_CA2_SHIFT (0U)
  2616. #define CAU_ADR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA2_SHIFT)) & CAU_ADR_CA_CA2_MASK)
  2617. #define CAU_ADR_CA_CA3_MASK (0xFFFFFFFFU)
  2618. #define CAU_ADR_CA_CA3_SHIFT (0U)
  2619. #define CAU_ADR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA3_SHIFT)) & CAU_ADR_CA_CA3_MASK)
  2620. #define CAU_ADR_CA_CA4_MASK (0xFFFFFFFFU)
  2621. #define CAU_ADR_CA_CA4_SHIFT (0U)
  2622. #define CAU_ADR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA4_SHIFT)) & CAU_ADR_CA_CA4_MASK)
  2623. #define CAU_ADR_CA_CA5_MASK (0xFFFFFFFFU)
  2624. #define CAU_ADR_CA_CA5_SHIFT (0U)
  2625. #define CAU_ADR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA5_SHIFT)) & CAU_ADR_CA_CA5_MASK)
  2626. #define CAU_ADR_CA_CA6_MASK (0xFFFFFFFFU)
  2627. #define CAU_ADR_CA_CA6_SHIFT (0U)
  2628. #define CAU_ADR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA6_SHIFT)) & CAU_ADR_CA_CA6_MASK)
  2629. #define CAU_ADR_CA_CA7_MASK (0xFFFFFFFFU)
  2630. #define CAU_ADR_CA_CA7_SHIFT (0U)
  2631. #define CAU_ADR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA7_SHIFT)) & CAU_ADR_CA_CA7_MASK)
  2632. #define CAU_ADR_CA_CA8_MASK (0xFFFFFFFFU)
  2633. #define CAU_ADR_CA_CA8_SHIFT (0U)
  2634. #define CAU_ADR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_ADR_CA_CA8_SHIFT)) & CAU_ADR_CA_CA8_MASK)
  2635. /* The count of CAU_ADR_CA */
  2636. #define CAU_ADR_CA_COUNT (9U)
  2637. /*! @name RADR_CASR - Status register - Reverse and Add to Register command */
  2638. #define CAU_RADR_CASR_IC_MASK (0x1U)
  2639. #define CAU_RADR_CASR_IC_SHIFT (0U)
  2640. #define CAU_RADR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CASR_IC_SHIFT)) & CAU_RADR_CASR_IC_MASK)
  2641. #define CAU_RADR_CASR_DPE_MASK (0x2U)
  2642. #define CAU_RADR_CASR_DPE_SHIFT (1U)
  2643. #define CAU_RADR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CASR_DPE_SHIFT)) & CAU_RADR_CASR_DPE_MASK)
  2644. #define CAU_RADR_CASR_VER_MASK (0xF0000000U)
  2645. #define CAU_RADR_CASR_VER_SHIFT (28U)
  2646. #define CAU_RADR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CASR_VER_SHIFT)) & CAU_RADR_CASR_VER_MASK)
  2647. /*! @name RADR_CAA - Accumulator register - Reverse and Add to Register command */
  2648. #define CAU_RADR_CAA_ACC_MASK (0xFFFFFFFFU)
  2649. #define CAU_RADR_CAA_ACC_SHIFT (0U)
  2650. #define CAU_RADR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CAA_ACC_SHIFT)) & CAU_RADR_CAA_ACC_MASK)
  2651. /*! @name RADR_CA - General Purpose Register 0 - Reverse and Add to Register command..General Purpose Register 8 - Reverse and Add to Register command */
  2652. #define CAU_RADR_CA_CA0_MASK (0xFFFFFFFFU)
  2653. #define CAU_RADR_CA_CA0_SHIFT (0U)
  2654. #define CAU_RADR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA0_SHIFT)) & CAU_RADR_CA_CA0_MASK)
  2655. #define CAU_RADR_CA_CA1_MASK (0xFFFFFFFFU)
  2656. #define CAU_RADR_CA_CA1_SHIFT (0U)
  2657. #define CAU_RADR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA1_SHIFT)) & CAU_RADR_CA_CA1_MASK)
  2658. #define CAU_RADR_CA_CA2_MASK (0xFFFFFFFFU)
  2659. #define CAU_RADR_CA_CA2_SHIFT (0U)
  2660. #define CAU_RADR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA2_SHIFT)) & CAU_RADR_CA_CA2_MASK)
  2661. #define CAU_RADR_CA_CA3_MASK (0xFFFFFFFFU)
  2662. #define CAU_RADR_CA_CA3_SHIFT (0U)
  2663. #define CAU_RADR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA3_SHIFT)) & CAU_RADR_CA_CA3_MASK)
  2664. #define CAU_RADR_CA_CA4_MASK (0xFFFFFFFFU)
  2665. #define CAU_RADR_CA_CA4_SHIFT (0U)
  2666. #define CAU_RADR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA4_SHIFT)) & CAU_RADR_CA_CA4_MASK)
  2667. #define CAU_RADR_CA_CA5_MASK (0xFFFFFFFFU)
  2668. #define CAU_RADR_CA_CA5_SHIFT (0U)
  2669. #define CAU_RADR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA5_SHIFT)) & CAU_RADR_CA_CA5_MASK)
  2670. #define CAU_RADR_CA_CA6_MASK (0xFFFFFFFFU)
  2671. #define CAU_RADR_CA_CA6_SHIFT (0U)
  2672. #define CAU_RADR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA6_SHIFT)) & CAU_RADR_CA_CA6_MASK)
  2673. #define CAU_RADR_CA_CA7_MASK (0xFFFFFFFFU)
  2674. #define CAU_RADR_CA_CA7_SHIFT (0U)
  2675. #define CAU_RADR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA7_SHIFT)) & CAU_RADR_CA_CA7_MASK)
  2676. #define CAU_RADR_CA_CA8_MASK (0xFFFFFFFFU)
  2677. #define CAU_RADR_CA_CA8_SHIFT (0U)
  2678. #define CAU_RADR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_RADR_CA_CA8_SHIFT)) & CAU_RADR_CA_CA8_MASK)
  2679. /* The count of CAU_RADR_CA */
  2680. #define CAU_RADR_CA_COUNT (9U)
  2681. /*! @name XOR_CASR - Status register - Exclusive Or command */
  2682. #define CAU_XOR_CASR_IC_MASK (0x1U)
  2683. #define CAU_XOR_CASR_IC_SHIFT (0U)
  2684. #define CAU_XOR_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CASR_IC_SHIFT)) & CAU_XOR_CASR_IC_MASK)
  2685. #define CAU_XOR_CASR_DPE_MASK (0x2U)
  2686. #define CAU_XOR_CASR_DPE_SHIFT (1U)
  2687. #define CAU_XOR_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CASR_DPE_SHIFT)) & CAU_XOR_CASR_DPE_MASK)
  2688. #define CAU_XOR_CASR_VER_MASK (0xF0000000U)
  2689. #define CAU_XOR_CASR_VER_SHIFT (28U)
  2690. #define CAU_XOR_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CASR_VER_SHIFT)) & CAU_XOR_CASR_VER_MASK)
  2691. /*! @name XOR_CAA - Accumulator register - Exclusive Or command */
  2692. #define CAU_XOR_CAA_ACC_MASK (0xFFFFFFFFU)
  2693. #define CAU_XOR_CAA_ACC_SHIFT (0U)
  2694. #define CAU_XOR_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CAA_ACC_SHIFT)) & CAU_XOR_CAA_ACC_MASK)
  2695. /*! @name XOR_CA - General Purpose Register 0 - Exclusive Or command..General Purpose Register 8 - Exclusive Or command */
  2696. #define CAU_XOR_CA_CA0_MASK (0xFFFFFFFFU)
  2697. #define CAU_XOR_CA_CA0_SHIFT (0U)
  2698. #define CAU_XOR_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA0_SHIFT)) & CAU_XOR_CA_CA0_MASK)
  2699. #define CAU_XOR_CA_CA1_MASK (0xFFFFFFFFU)
  2700. #define CAU_XOR_CA_CA1_SHIFT (0U)
  2701. #define CAU_XOR_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA1_SHIFT)) & CAU_XOR_CA_CA1_MASK)
  2702. #define CAU_XOR_CA_CA2_MASK (0xFFFFFFFFU)
  2703. #define CAU_XOR_CA_CA2_SHIFT (0U)
  2704. #define CAU_XOR_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA2_SHIFT)) & CAU_XOR_CA_CA2_MASK)
  2705. #define CAU_XOR_CA_CA3_MASK (0xFFFFFFFFU)
  2706. #define CAU_XOR_CA_CA3_SHIFT (0U)
  2707. #define CAU_XOR_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA3_SHIFT)) & CAU_XOR_CA_CA3_MASK)
  2708. #define CAU_XOR_CA_CA4_MASK (0xFFFFFFFFU)
  2709. #define CAU_XOR_CA_CA4_SHIFT (0U)
  2710. #define CAU_XOR_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA4_SHIFT)) & CAU_XOR_CA_CA4_MASK)
  2711. #define CAU_XOR_CA_CA5_MASK (0xFFFFFFFFU)
  2712. #define CAU_XOR_CA_CA5_SHIFT (0U)
  2713. #define CAU_XOR_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA5_SHIFT)) & CAU_XOR_CA_CA5_MASK)
  2714. #define CAU_XOR_CA_CA6_MASK (0xFFFFFFFFU)
  2715. #define CAU_XOR_CA_CA6_SHIFT (0U)
  2716. #define CAU_XOR_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA6_SHIFT)) & CAU_XOR_CA_CA6_MASK)
  2717. #define CAU_XOR_CA_CA7_MASK (0xFFFFFFFFU)
  2718. #define CAU_XOR_CA_CA7_SHIFT (0U)
  2719. #define CAU_XOR_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA7_SHIFT)) & CAU_XOR_CA_CA7_MASK)
  2720. #define CAU_XOR_CA_CA8_MASK (0xFFFFFFFFU)
  2721. #define CAU_XOR_CA_CA8_SHIFT (0U)
  2722. #define CAU_XOR_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_XOR_CA_CA8_SHIFT)) & CAU_XOR_CA_CA8_MASK)
  2723. /* The count of CAU_XOR_CA */
  2724. #define CAU_XOR_CA_COUNT (9U)
  2725. /*! @name ROTL_CASR - Status register - Rotate Left command */
  2726. #define CAU_ROTL_CASR_IC_MASK (0x1U)
  2727. #define CAU_ROTL_CASR_IC_SHIFT (0U)
  2728. #define CAU_ROTL_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CASR_IC_SHIFT)) & CAU_ROTL_CASR_IC_MASK)
  2729. #define CAU_ROTL_CASR_DPE_MASK (0x2U)
  2730. #define CAU_ROTL_CASR_DPE_SHIFT (1U)
  2731. #define CAU_ROTL_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CASR_DPE_SHIFT)) & CAU_ROTL_CASR_DPE_MASK)
  2732. #define CAU_ROTL_CASR_VER_MASK (0xF0000000U)
  2733. #define CAU_ROTL_CASR_VER_SHIFT (28U)
  2734. #define CAU_ROTL_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CASR_VER_SHIFT)) & CAU_ROTL_CASR_VER_MASK)
  2735. /*! @name ROTL_CAA - Accumulator register - Rotate Left command */
  2736. #define CAU_ROTL_CAA_ACC_MASK (0xFFFFFFFFU)
  2737. #define CAU_ROTL_CAA_ACC_SHIFT (0U)
  2738. #define CAU_ROTL_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CAA_ACC_SHIFT)) & CAU_ROTL_CAA_ACC_MASK)
  2739. /*! @name ROTL_CA - General Purpose Register 0 - Rotate Left command..General Purpose Register 8 - Rotate Left command */
  2740. #define CAU_ROTL_CA_CA0_MASK (0xFFFFFFFFU)
  2741. #define CAU_ROTL_CA_CA0_SHIFT (0U)
  2742. #define CAU_ROTL_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA0_SHIFT)) & CAU_ROTL_CA_CA0_MASK)
  2743. #define CAU_ROTL_CA_CA1_MASK (0xFFFFFFFFU)
  2744. #define CAU_ROTL_CA_CA1_SHIFT (0U)
  2745. #define CAU_ROTL_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA1_SHIFT)) & CAU_ROTL_CA_CA1_MASK)
  2746. #define CAU_ROTL_CA_CA2_MASK (0xFFFFFFFFU)
  2747. #define CAU_ROTL_CA_CA2_SHIFT (0U)
  2748. #define CAU_ROTL_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA2_SHIFT)) & CAU_ROTL_CA_CA2_MASK)
  2749. #define CAU_ROTL_CA_CA3_MASK (0xFFFFFFFFU)
  2750. #define CAU_ROTL_CA_CA3_SHIFT (0U)
  2751. #define CAU_ROTL_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA3_SHIFT)) & CAU_ROTL_CA_CA3_MASK)
  2752. #define CAU_ROTL_CA_CA4_MASK (0xFFFFFFFFU)
  2753. #define CAU_ROTL_CA_CA4_SHIFT (0U)
  2754. #define CAU_ROTL_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA4_SHIFT)) & CAU_ROTL_CA_CA4_MASK)
  2755. #define CAU_ROTL_CA_CA5_MASK (0xFFFFFFFFU)
  2756. #define CAU_ROTL_CA_CA5_SHIFT (0U)
  2757. #define CAU_ROTL_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA5_SHIFT)) & CAU_ROTL_CA_CA5_MASK)
  2758. #define CAU_ROTL_CA_CA6_MASK (0xFFFFFFFFU)
  2759. #define CAU_ROTL_CA_CA6_SHIFT (0U)
  2760. #define CAU_ROTL_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA6_SHIFT)) & CAU_ROTL_CA_CA6_MASK)
  2761. #define CAU_ROTL_CA_CA7_MASK (0xFFFFFFFFU)
  2762. #define CAU_ROTL_CA_CA7_SHIFT (0U)
  2763. #define CAU_ROTL_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA7_SHIFT)) & CAU_ROTL_CA_CA7_MASK)
  2764. #define CAU_ROTL_CA_CA8_MASK (0xFFFFFFFFU)
  2765. #define CAU_ROTL_CA_CA8_SHIFT (0U)
  2766. #define CAU_ROTL_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_ROTL_CA_CA8_SHIFT)) & CAU_ROTL_CA_CA8_MASK)
  2767. /* The count of CAU_ROTL_CA */
  2768. #define CAU_ROTL_CA_COUNT (9U)
  2769. /*! @name AESC_CASR - Status register - AES Column Operation command */
  2770. #define CAU_AESC_CASR_IC_MASK (0x1U)
  2771. #define CAU_AESC_CASR_IC_SHIFT (0U)
  2772. #define CAU_AESC_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CASR_IC_SHIFT)) & CAU_AESC_CASR_IC_MASK)
  2773. #define CAU_AESC_CASR_DPE_MASK (0x2U)
  2774. #define CAU_AESC_CASR_DPE_SHIFT (1U)
  2775. #define CAU_AESC_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CASR_DPE_SHIFT)) & CAU_AESC_CASR_DPE_MASK)
  2776. #define CAU_AESC_CASR_VER_MASK (0xF0000000U)
  2777. #define CAU_AESC_CASR_VER_SHIFT (28U)
  2778. #define CAU_AESC_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CASR_VER_SHIFT)) & CAU_AESC_CASR_VER_MASK)
  2779. /*! @name AESC_CAA - Accumulator register - AES Column Operation command */
  2780. #define CAU_AESC_CAA_ACC_MASK (0xFFFFFFFFU)
  2781. #define CAU_AESC_CAA_ACC_SHIFT (0U)
  2782. #define CAU_AESC_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CAA_ACC_SHIFT)) & CAU_AESC_CAA_ACC_MASK)
  2783. /*! @name AESC_CA - General Purpose Register 0 - AES Column Operation command..General Purpose Register 8 - AES Column Operation command */
  2784. #define CAU_AESC_CA_CA0_MASK (0xFFFFFFFFU)
  2785. #define CAU_AESC_CA_CA0_SHIFT (0U)
  2786. #define CAU_AESC_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA0_SHIFT)) & CAU_AESC_CA_CA0_MASK)
  2787. #define CAU_AESC_CA_CA1_MASK (0xFFFFFFFFU)
  2788. #define CAU_AESC_CA_CA1_SHIFT (0U)
  2789. #define CAU_AESC_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA1_SHIFT)) & CAU_AESC_CA_CA1_MASK)
  2790. #define CAU_AESC_CA_CA2_MASK (0xFFFFFFFFU)
  2791. #define CAU_AESC_CA_CA2_SHIFT (0U)
  2792. #define CAU_AESC_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA2_SHIFT)) & CAU_AESC_CA_CA2_MASK)
  2793. #define CAU_AESC_CA_CA3_MASK (0xFFFFFFFFU)
  2794. #define CAU_AESC_CA_CA3_SHIFT (0U)
  2795. #define CAU_AESC_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA3_SHIFT)) & CAU_AESC_CA_CA3_MASK)
  2796. #define CAU_AESC_CA_CA4_MASK (0xFFFFFFFFU)
  2797. #define CAU_AESC_CA_CA4_SHIFT (0U)
  2798. #define CAU_AESC_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA4_SHIFT)) & CAU_AESC_CA_CA4_MASK)
  2799. #define CAU_AESC_CA_CA5_MASK (0xFFFFFFFFU)
  2800. #define CAU_AESC_CA_CA5_SHIFT (0U)
  2801. #define CAU_AESC_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA5_SHIFT)) & CAU_AESC_CA_CA5_MASK)
  2802. #define CAU_AESC_CA_CA6_MASK (0xFFFFFFFFU)
  2803. #define CAU_AESC_CA_CA6_SHIFT (0U)
  2804. #define CAU_AESC_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA6_SHIFT)) & CAU_AESC_CA_CA6_MASK)
  2805. #define CAU_AESC_CA_CA7_MASK (0xFFFFFFFFU)
  2806. #define CAU_AESC_CA_CA7_SHIFT (0U)
  2807. #define CAU_AESC_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA7_SHIFT)) & CAU_AESC_CA_CA7_MASK)
  2808. #define CAU_AESC_CA_CA8_MASK (0xFFFFFFFFU)
  2809. #define CAU_AESC_CA_CA8_SHIFT (0U)
  2810. #define CAU_AESC_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESC_CA_CA8_SHIFT)) & CAU_AESC_CA_CA8_MASK)
  2811. /* The count of CAU_AESC_CA */
  2812. #define CAU_AESC_CA_COUNT (9U)
  2813. /*! @name AESIC_CASR - Status register - AES Inverse Column Operation command */
  2814. #define CAU_AESIC_CASR_IC_MASK (0x1U)
  2815. #define CAU_AESIC_CASR_IC_SHIFT (0U)
  2816. #define CAU_AESIC_CASR_IC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CASR_IC_SHIFT)) & CAU_AESIC_CASR_IC_MASK)
  2817. #define CAU_AESIC_CASR_DPE_MASK (0x2U)
  2818. #define CAU_AESIC_CASR_DPE_SHIFT (1U)
  2819. #define CAU_AESIC_CASR_DPE(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CASR_DPE_SHIFT)) & CAU_AESIC_CASR_DPE_MASK)
  2820. #define CAU_AESIC_CASR_VER_MASK (0xF0000000U)
  2821. #define CAU_AESIC_CASR_VER_SHIFT (28U)
  2822. #define CAU_AESIC_CASR_VER(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CASR_VER_SHIFT)) & CAU_AESIC_CASR_VER_MASK)
  2823. /*! @name AESIC_CAA - Accumulator register - AES Inverse Column Operation command */
  2824. #define CAU_AESIC_CAA_ACC_MASK (0xFFFFFFFFU)
  2825. #define CAU_AESIC_CAA_ACC_SHIFT (0U)
  2826. #define CAU_AESIC_CAA_ACC(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CAA_ACC_SHIFT)) & CAU_AESIC_CAA_ACC_MASK)
  2827. /*! @name AESIC_CA - General Purpose Register 0 - AES Inverse Column Operation command..General Purpose Register 8 - AES Inverse Column Operation command */
  2828. #define CAU_AESIC_CA_CA0_MASK (0xFFFFFFFFU)
  2829. #define CAU_AESIC_CA_CA0_SHIFT (0U)
  2830. #define CAU_AESIC_CA_CA0(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA0_SHIFT)) & CAU_AESIC_CA_CA0_MASK)
  2831. #define CAU_AESIC_CA_CA1_MASK (0xFFFFFFFFU)
  2832. #define CAU_AESIC_CA_CA1_SHIFT (0U)
  2833. #define CAU_AESIC_CA_CA1(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA1_SHIFT)) & CAU_AESIC_CA_CA1_MASK)
  2834. #define CAU_AESIC_CA_CA2_MASK (0xFFFFFFFFU)
  2835. #define CAU_AESIC_CA_CA2_SHIFT (0U)
  2836. #define CAU_AESIC_CA_CA2(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA2_SHIFT)) & CAU_AESIC_CA_CA2_MASK)
  2837. #define CAU_AESIC_CA_CA3_MASK (0xFFFFFFFFU)
  2838. #define CAU_AESIC_CA_CA3_SHIFT (0U)
  2839. #define CAU_AESIC_CA_CA3(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA3_SHIFT)) & CAU_AESIC_CA_CA3_MASK)
  2840. #define CAU_AESIC_CA_CA4_MASK (0xFFFFFFFFU)
  2841. #define CAU_AESIC_CA_CA4_SHIFT (0U)
  2842. #define CAU_AESIC_CA_CA4(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA4_SHIFT)) & CAU_AESIC_CA_CA4_MASK)
  2843. #define CAU_AESIC_CA_CA5_MASK (0xFFFFFFFFU)
  2844. #define CAU_AESIC_CA_CA5_SHIFT (0U)
  2845. #define CAU_AESIC_CA_CA5(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA5_SHIFT)) & CAU_AESIC_CA_CA5_MASK)
  2846. #define CAU_AESIC_CA_CA6_MASK (0xFFFFFFFFU)
  2847. #define CAU_AESIC_CA_CA6_SHIFT (0U)
  2848. #define CAU_AESIC_CA_CA6(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA6_SHIFT)) & CAU_AESIC_CA_CA6_MASK)
  2849. #define CAU_AESIC_CA_CA7_MASK (0xFFFFFFFFU)
  2850. #define CAU_AESIC_CA_CA7_SHIFT (0U)
  2851. #define CAU_AESIC_CA_CA7(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA7_SHIFT)) & CAU_AESIC_CA_CA7_MASK)
  2852. #define CAU_AESIC_CA_CA8_MASK (0xFFFFFFFFU)
  2853. #define CAU_AESIC_CA_CA8_SHIFT (0U)
  2854. #define CAU_AESIC_CA_CA8(x) (((uint32_t)(((uint32_t)(x)) << CAU_AESIC_CA_CA8_SHIFT)) & CAU_AESIC_CA_CA8_MASK)
  2855. /* The count of CAU_AESIC_CA */
  2856. #define CAU_AESIC_CA_COUNT (9U)
  2857. /*!
  2858. * @}
  2859. */ /* end of group CAU_Register_Masks */
  2860. /* CAU - Peripheral instance base addresses */
  2861. /** Peripheral CAU base address */
  2862. #define CAU_BASE (0xE0081000u)
  2863. /** Peripheral CAU base pointer */
  2864. #define CAU ((CAU_Type *)CAU_BASE)
  2865. /** Array initializer of CAU peripheral base addresses */
  2866. #define CAU_BASE_ADDRS { CAU_BASE }
  2867. /** Array initializer of CAU peripheral base pointers */
  2868. #define CAU_BASE_PTRS { CAU }
  2869. /*!
  2870. * @}
  2871. */ /* end of group CAU_Peripheral_Access_Layer */
  2872. /* ----------------------------------------------------------------------------
  2873. -- CMP Peripheral Access Layer
  2874. ---------------------------------------------------------------------------- */
  2875. /*!
  2876. * @addtogroup CMP_Peripheral_Access_Layer CMP Peripheral Access Layer
  2877. * @{
  2878. */
  2879. /** CMP - Register Layout Typedef */
  2880. typedef struct {
  2881. __IO uint8_t CR0; /**< CMP Control Register 0, offset: 0x0 */
  2882. __IO uint8_t CR1; /**< CMP Control Register 1, offset: 0x1 */
  2883. __IO uint8_t FPR; /**< CMP Filter Period Register, offset: 0x2 */
  2884. __IO uint8_t SCR; /**< CMP Status and Control Register, offset: 0x3 */
  2885. __IO uint8_t DACCR; /**< DAC Control Register, offset: 0x4 */
  2886. __IO uint8_t MUXCR; /**< MUX Control Register, offset: 0x5 */
  2887. } CMP_Type;
  2888. /* ----------------------------------------------------------------------------
  2889. -- CMP Register Masks
  2890. ---------------------------------------------------------------------------- */
  2891. /*!
  2892. * @addtogroup CMP_Register_Masks CMP Register Masks
  2893. * @{
  2894. */
  2895. /*! @name CR0 - CMP Control Register 0 */
  2896. #define CMP_CR0_HYSTCTR_MASK (0x3U)
  2897. #define CMP_CR0_HYSTCTR_SHIFT (0U)
  2898. #define CMP_CR0_HYSTCTR(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR0_HYSTCTR_SHIFT)) & CMP_CR0_HYSTCTR_MASK)
  2899. #define CMP_CR0_FILTER_CNT_MASK (0x70U)
  2900. #define CMP_CR0_FILTER_CNT_SHIFT (4U)
  2901. #define CMP_CR0_FILTER_CNT(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR0_FILTER_CNT_SHIFT)) & CMP_CR0_FILTER_CNT_MASK)
  2902. /*! @name CR1 - CMP Control Register 1 */
  2903. #define CMP_CR1_EN_MASK (0x1U)
  2904. #define CMP_CR1_EN_SHIFT (0U)
  2905. #define CMP_CR1_EN(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_EN_SHIFT)) & CMP_CR1_EN_MASK)
  2906. #define CMP_CR1_OPE_MASK (0x2U)
  2907. #define CMP_CR1_OPE_SHIFT (1U)
  2908. #define CMP_CR1_OPE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_OPE_SHIFT)) & CMP_CR1_OPE_MASK)
  2909. #define CMP_CR1_COS_MASK (0x4U)
  2910. #define CMP_CR1_COS_SHIFT (2U)
  2911. #define CMP_CR1_COS(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_COS_SHIFT)) & CMP_CR1_COS_MASK)
  2912. #define CMP_CR1_INV_MASK (0x8U)
  2913. #define CMP_CR1_INV_SHIFT (3U)
  2914. #define CMP_CR1_INV(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_INV_SHIFT)) & CMP_CR1_INV_MASK)
  2915. #define CMP_CR1_PMODE_MASK (0x10U)
  2916. #define CMP_CR1_PMODE_SHIFT (4U)
  2917. #define CMP_CR1_PMODE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_PMODE_SHIFT)) & CMP_CR1_PMODE_MASK)
  2918. #define CMP_CR1_WE_MASK (0x40U)
  2919. #define CMP_CR1_WE_SHIFT (6U)
  2920. #define CMP_CR1_WE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_WE_SHIFT)) & CMP_CR1_WE_MASK)
  2921. #define CMP_CR1_SE_MASK (0x80U)
  2922. #define CMP_CR1_SE_SHIFT (7U)
  2923. #define CMP_CR1_SE(x) (((uint8_t)(((uint8_t)(x)) << CMP_CR1_SE_SHIFT)) & CMP_CR1_SE_MASK)
  2924. /*! @name FPR - CMP Filter Period Register */
  2925. #define CMP_FPR_FILT_PER_MASK (0xFFU)
  2926. #define CMP_FPR_FILT_PER_SHIFT (0U)
  2927. #define CMP_FPR_FILT_PER(x) (((uint8_t)(((uint8_t)(x)) << CMP_FPR_FILT_PER_SHIFT)) & CMP_FPR_FILT_PER_MASK)
  2928. /*! @name SCR - CMP Status and Control Register */
  2929. #define CMP_SCR_COUT_MASK (0x1U)
  2930. #define CMP_SCR_COUT_SHIFT (0U)
  2931. #define CMP_SCR_COUT(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_COUT_SHIFT)) & CMP_SCR_COUT_MASK)
  2932. #define CMP_SCR_CFF_MASK (0x2U)
  2933. #define CMP_SCR_CFF_SHIFT (1U)
  2934. #define CMP_SCR_CFF(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_CFF_SHIFT)) & CMP_SCR_CFF_MASK)
  2935. #define CMP_SCR_CFR_MASK (0x4U)
  2936. #define CMP_SCR_CFR_SHIFT (2U)
  2937. #define CMP_SCR_CFR(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_CFR_SHIFT)) & CMP_SCR_CFR_MASK)
  2938. #define CMP_SCR_IEF_MASK (0x8U)
  2939. #define CMP_SCR_IEF_SHIFT (3U)
  2940. #define CMP_SCR_IEF(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_IEF_SHIFT)) & CMP_SCR_IEF_MASK)
  2941. #define CMP_SCR_IER_MASK (0x10U)
  2942. #define CMP_SCR_IER_SHIFT (4U)
  2943. #define CMP_SCR_IER(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_IER_SHIFT)) & CMP_SCR_IER_MASK)
  2944. #define CMP_SCR_DMAEN_MASK (0x40U)
  2945. #define CMP_SCR_DMAEN_SHIFT (6U)
  2946. #define CMP_SCR_DMAEN(x) (((uint8_t)(((uint8_t)(x)) << CMP_SCR_DMAEN_SHIFT)) & CMP_SCR_DMAEN_MASK)
  2947. /*! @name DACCR - DAC Control Register */
  2948. #define CMP_DACCR_VOSEL_MASK (0x3FU)
  2949. #define CMP_DACCR_VOSEL_SHIFT (0U)
  2950. #define CMP_DACCR_VOSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_DACCR_VOSEL_SHIFT)) & CMP_DACCR_VOSEL_MASK)
  2951. #define CMP_DACCR_VRSEL_MASK (0x40U)
  2952. #define CMP_DACCR_VRSEL_SHIFT (6U)
  2953. #define CMP_DACCR_VRSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_DACCR_VRSEL_SHIFT)) & CMP_DACCR_VRSEL_MASK)
  2954. #define CMP_DACCR_DACEN_MASK (0x80U)
  2955. #define CMP_DACCR_DACEN_SHIFT (7U)
  2956. #define CMP_DACCR_DACEN(x) (((uint8_t)(((uint8_t)(x)) << CMP_DACCR_DACEN_SHIFT)) & CMP_DACCR_DACEN_MASK)
  2957. /*! @name MUXCR - MUX Control Register */
  2958. #define CMP_MUXCR_MSEL_MASK (0x7U)
  2959. #define CMP_MUXCR_MSEL_SHIFT (0U)
  2960. #define CMP_MUXCR_MSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_MUXCR_MSEL_SHIFT)) & CMP_MUXCR_MSEL_MASK)
  2961. #define CMP_MUXCR_PSEL_MASK (0x38U)
  2962. #define CMP_MUXCR_PSEL_SHIFT (3U)
  2963. #define CMP_MUXCR_PSEL(x) (((uint8_t)(((uint8_t)(x)) << CMP_MUXCR_PSEL_SHIFT)) & CMP_MUXCR_PSEL_MASK)
  2964. #define CMP_MUXCR_PSTM_MASK (0x80U)
  2965. #define CMP_MUXCR_PSTM_SHIFT (7U)
  2966. #define CMP_MUXCR_PSTM(x) (((uint8_t)(((uint8_t)(x)) << CMP_MUXCR_PSTM_SHIFT)) & CMP_MUXCR_PSTM_MASK)
  2967. /*!
  2968. * @}
  2969. */ /* end of group CMP_Register_Masks */
  2970. /* CMP - Peripheral instance base addresses */
  2971. /** Peripheral CMP0 base address */
  2972. #define CMP0_BASE (0x40073000u)
  2973. /** Peripheral CMP0 base pointer */
  2974. #define CMP0 ((CMP_Type *)CMP0_BASE)
  2975. /** Peripheral CMP1 base address */
  2976. #define CMP1_BASE (0x40073008u)
  2977. /** Peripheral CMP1 base pointer */
  2978. #define CMP1 ((CMP_Type *)CMP1_BASE)
  2979. /** Peripheral CMP2 base address */
  2980. #define CMP2_BASE (0x40073010u)
  2981. /** Peripheral CMP2 base pointer */
  2982. #define CMP2 ((CMP_Type *)CMP2_BASE)
  2983. /** Array initializer of CMP peripheral base addresses */
  2984. #define CMP_BASE_ADDRS { CMP0_BASE, CMP1_BASE, CMP2_BASE }
  2985. /** Array initializer of CMP peripheral base pointers */
  2986. #define CMP_BASE_PTRS { CMP0, CMP1, CMP2 }
  2987. /** Interrupt vectors for the CMP peripheral type */
  2988. #define CMP_IRQS { CMP0_IRQn, CMP1_IRQn, CMP2_IRQn }
  2989. /*!
  2990. * @}
  2991. */ /* end of group CMP_Peripheral_Access_Layer */
  2992. /* ----------------------------------------------------------------------------
  2993. -- CMT Peripheral Access Layer
  2994. ---------------------------------------------------------------------------- */
  2995. /*!
  2996. * @addtogroup CMT_Peripheral_Access_Layer CMT Peripheral Access Layer
  2997. * @{
  2998. */
  2999. /** CMT - Register Layout Typedef */
  3000. typedef struct {
  3001. __IO uint8_t CGH1; /**< CMT Carrier Generator High Data Register 1, offset: 0x0 */
  3002. __IO uint8_t CGL1; /**< CMT Carrier Generator Low Data Register 1, offset: 0x1 */
  3003. __IO uint8_t CGH2; /**< CMT Carrier Generator High Data Register 2, offset: 0x2 */
  3004. __IO uint8_t CGL2; /**< CMT Carrier Generator Low Data Register 2, offset: 0x3 */
  3005. __IO uint8_t OC; /**< CMT Output Control Register, offset: 0x4 */
  3006. __IO uint8_t MSC; /**< CMT Modulator Status and Control Register, offset: 0x5 */
  3007. __IO uint8_t CMD1; /**< CMT Modulator Data Register Mark High, offset: 0x6 */
  3008. __IO uint8_t CMD2; /**< CMT Modulator Data Register Mark Low, offset: 0x7 */
  3009. __IO uint8_t CMD3; /**< CMT Modulator Data Register Space High, offset: 0x8 */
  3010. __IO uint8_t CMD4; /**< CMT Modulator Data Register Space Low, offset: 0x9 */
  3011. __IO uint8_t PPS; /**< CMT Primary Prescaler Register, offset: 0xA */
  3012. __IO uint8_t DMA; /**< CMT Direct Memory Access Register, offset: 0xB */
  3013. } CMT_Type;
  3014. /* ----------------------------------------------------------------------------
  3015. -- CMT Register Masks
  3016. ---------------------------------------------------------------------------- */
  3017. /*!
  3018. * @addtogroup CMT_Register_Masks CMT Register Masks
  3019. * @{
  3020. */
  3021. /*! @name CGH1 - CMT Carrier Generator High Data Register 1 */
  3022. #define CMT_CGH1_PH_MASK (0xFFU)
  3023. #define CMT_CGH1_PH_SHIFT (0U)
  3024. #define CMT_CGH1_PH(x) (((uint8_t)(((uint8_t)(x)) << CMT_CGH1_PH_SHIFT)) & CMT_CGH1_PH_MASK)
  3025. /*! @name CGL1 - CMT Carrier Generator Low Data Register 1 */
  3026. #define CMT_CGL1_PL_MASK (0xFFU)
  3027. #define CMT_CGL1_PL_SHIFT (0U)
  3028. #define CMT_CGL1_PL(x) (((uint8_t)(((uint8_t)(x)) << CMT_CGL1_PL_SHIFT)) & CMT_CGL1_PL_MASK)
  3029. /*! @name CGH2 - CMT Carrier Generator High Data Register 2 */
  3030. #define CMT_CGH2_SH_MASK (0xFFU)
  3031. #define CMT_CGH2_SH_SHIFT (0U)
  3032. #define CMT_CGH2_SH(x) (((uint8_t)(((uint8_t)(x)) << CMT_CGH2_SH_SHIFT)) & CMT_CGH2_SH_MASK)
  3033. /*! @name CGL2 - CMT Carrier Generator Low Data Register 2 */
  3034. #define CMT_CGL2_SL_MASK (0xFFU)
  3035. #define CMT_CGL2_SL_SHIFT (0U)
  3036. #define CMT_CGL2_SL(x) (((uint8_t)(((uint8_t)(x)) << CMT_CGL2_SL_SHIFT)) & CMT_CGL2_SL_MASK)
  3037. /*! @name OC - CMT Output Control Register */
  3038. #define CMT_OC_IROPEN_MASK (0x20U)
  3039. #define CMT_OC_IROPEN_SHIFT (5U)
  3040. #define CMT_OC_IROPEN(x) (((uint8_t)(((uint8_t)(x)) << CMT_OC_IROPEN_SHIFT)) & CMT_OC_IROPEN_MASK)
  3041. #define CMT_OC_CMTPOL_MASK (0x40U)
  3042. #define CMT_OC_CMTPOL_SHIFT (6U)
  3043. #define CMT_OC_CMTPOL(x) (((uint8_t)(((uint8_t)(x)) << CMT_OC_CMTPOL_SHIFT)) & CMT_OC_CMTPOL_MASK)
  3044. #define CMT_OC_IROL_MASK (0x80U)
  3045. #define CMT_OC_IROL_SHIFT (7U)
  3046. #define CMT_OC_IROL(x) (((uint8_t)(((uint8_t)(x)) << CMT_OC_IROL_SHIFT)) & CMT_OC_IROL_MASK)
  3047. /*! @name MSC - CMT Modulator Status and Control Register */
  3048. #define CMT_MSC_MCGEN_MASK (0x1U)
  3049. #define CMT_MSC_MCGEN_SHIFT (0U)
  3050. #define CMT_MSC_MCGEN(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_MCGEN_SHIFT)) & CMT_MSC_MCGEN_MASK)
  3051. #define CMT_MSC_EOCIE_MASK (0x2U)
  3052. #define CMT_MSC_EOCIE_SHIFT (1U)
  3053. #define CMT_MSC_EOCIE(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_EOCIE_SHIFT)) & CMT_MSC_EOCIE_MASK)
  3054. #define CMT_MSC_FSK_MASK (0x4U)
  3055. #define CMT_MSC_FSK_SHIFT (2U)
  3056. #define CMT_MSC_FSK(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_FSK_SHIFT)) & CMT_MSC_FSK_MASK)
  3057. #define CMT_MSC_BASE_MASK (0x8U)
  3058. #define CMT_MSC_BASE_SHIFT (3U)
  3059. #define CMT_MSC_BASE(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_BASE_SHIFT)) & CMT_MSC_BASE_MASK)
  3060. #define CMT_MSC_EXSPC_MASK (0x10U)
  3061. #define CMT_MSC_EXSPC_SHIFT (4U)
  3062. #define CMT_MSC_EXSPC(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_EXSPC_SHIFT)) & CMT_MSC_EXSPC_MASK)
  3063. #define CMT_MSC_CMTDIV_MASK (0x60U)
  3064. #define CMT_MSC_CMTDIV_SHIFT (5U)
  3065. #define CMT_MSC_CMTDIV(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_CMTDIV_SHIFT)) & CMT_MSC_CMTDIV_MASK)
  3066. #define CMT_MSC_EOCF_MASK (0x80U)
  3067. #define CMT_MSC_EOCF_SHIFT (7U)
  3068. #define CMT_MSC_EOCF(x) (((uint8_t)(((uint8_t)(x)) << CMT_MSC_EOCF_SHIFT)) & CMT_MSC_EOCF_MASK)
  3069. /*! @name CMD1 - CMT Modulator Data Register Mark High */
  3070. #define CMT_CMD1_MB_MASK (0xFFU)
  3071. #define CMT_CMD1_MB_SHIFT (0U)
  3072. #define CMT_CMD1_MB(x) (((uint8_t)(((uint8_t)(x)) << CMT_CMD1_MB_SHIFT)) & CMT_CMD1_MB_MASK)
  3073. /*! @name CMD2 - CMT Modulator Data Register Mark Low */
  3074. #define CMT_CMD2_MB_MASK (0xFFU)
  3075. #define CMT_CMD2_MB_SHIFT (0U)
  3076. #define CMT_CMD2_MB(x) (((uint8_t)(((uint8_t)(x)) << CMT_CMD2_MB_SHIFT)) & CMT_CMD2_MB_MASK)
  3077. /*! @name CMD3 - CMT Modulator Data Register Space High */
  3078. #define CMT_CMD3_SB_MASK (0xFFU)
  3079. #define CMT_CMD3_SB_SHIFT (0U)
  3080. #define CMT_CMD3_SB(x) (((uint8_t)(((uint8_t)(x)) << CMT_CMD3_SB_SHIFT)) & CMT_CMD3_SB_MASK)
  3081. /*! @name CMD4 - CMT Modulator Data Register Space Low */
  3082. #define CMT_CMD4_SB_MASK (0xFFU)
  3083. #define CMT_CMD4_SB_SHIFT (0U)
  3084. #define CMT_CMD4_SB(x) (((uint8_t)(((uint8_t)(x)) << CMT_CMD4_SB_SHIFT)) & CMT_CMD4_SB_MASK)
  3085. /*! @name PPS - CMT Primary Prescaler Register */
  3086. #define CMT_PPS_PPSDIV_MASK (0xFU)
  3087. #define CMT_PPS_PPSDIV_SHIFT (0U)
  3088. #define CMT_PPS_PPSDIV(x) (((uint8_t)(((uint8_t)(x)) << CMT_PPS_PPSDIV_SHIFT)) & CMT_PPS_PPSDIV_MASK)
  3089. /*! @name DMA - CMT Direct Memory Access Register */
  3090. #define CMT_DMA_DMA_MASK (0x1U)
  3091. #define CMT_DMA_DMA_SHIFT (0U)
  3092. #define CMT_DMA_DMA(x) (((uint8_t)(((uint8_t)(x)) << CMT_DMA_DMA_SHIFT)) & CMT_DMA_DMA_MASK)
  3093. /*!
  3094. * @}
  3095. */ /* end of group CMT_Register_Masks */
  3096. /* CMT - Peripheral instance base addresses */
  3097. /** Peripheral CMT base address */
  3098. #define CMT_BASE (0x40062000u)
  3099. /** Peripheral CMT base pointer */
  3100. #define CMT ((CMT_Type *)CMT_BASE)
  3101. /** Array initializer of CMT peripheral base addresses */
  3102. #define CMT_BASE_ADDRS { CMT_BASE }
  3103. /** Array initializer of CMT peripheral base pointers */
  3104. #define CMT_BASE_PTRS { CMT }
  3105. /** Interrupt vectors for the CMT peripheral type */
  3106. #define CMT_IRQS { CMT_IRQn }
  3107. /*!
  3108. * @}
  3109. */ /* end of group CMT_Peripheral_Access_Layer */
  3110. /* ----------------------------------------------------------------------------
  3111. -- CRC Peripheral Access Layer
  3112. ---------------------------------------------------------------------------- */
  3113. /*!
  3114. * @addtogroup CRC_Peripheral_Access_Layer CRC Peripheral Access Layer
  3115. * @{
  3116. */
  3117. /** CRC - Register Layout Typedef */
  3118. typedef struct {
  3119. union { /* offset: 0x0 */
  3120. struct { /* offset: 0x0 */
  3121. __IO uint16_t DATAL; /**< CRC_DATAL register., offset: 0x0 */
  3122. __IO uint16_t DATAH; /**< CRC_DATAH register., offset: 0x2 */
  3123. } ACCESS16BIT;
  3124. __IO uint32_t DATA; /**< CRC Data register, offset: 0x0 */
  3125. struct { /* offset: 0x0 */
  3126. __IO uint8_t DATALL; /**< CRC_DATALL register., offset: 0x0 */
  3127. __IO uint8_t DATALU; /**< CRC_DATALU register., offset: 0x1 */
  3128. __IO uint8_t DATAHL; /**< CRC_DATAHL register., offset: 0x2 */
  3129. __IO uint8_t DATAHU; /**< CRC_DATAHU register., offset: 0x3 */
  3130. } ACCESS8BIT;
  3131. };
  3132. union { /* offset: 0x4 */
  3133. struct { /* offset: 0x4 */
  3134. __IO uint16_t GPOLYL; /**< CRC_GPOLYL register., offset: 0x4 */
  3135. __IO uint16_t GPOLYH; /**< CRC_GPOLYH register., offset: 0x6 */
  3136. } GPOLY_ACCESS16BIT;
  3137. __IO uint32_t GPOLY; /**< CRC Polynomial register, offset: 0x4 */
  3138. struct { /* offset: 0x4 */
  3139. __IO uint8_t GPOLYLL; /**< CRC_GPOLYLL register., offset: 0x4 */
  3140. __IO uint8_t GPOLYLU; /**< CRC_GPOLYLU register., offset: 0x5 */
  3141. __IO uint8_t GPOLYHL; /**< CRC_GPOLYHL register., offset: 0x6 */
  3142. __IO uint8_t GPOLYHU; /**< CRC_GPOLYHU register., offset: 0x7 */
  3143. } GPOLY_ACCESS8BIT;
  3144. };
  3145. union { /* offset: 0x8 */
  3146. __IO uint32_t CTRL; /**< CRC Control register, offset: 0x8 */
  3147. struct { /* offset: 0x8 */
  3148. uint8_t RESERVED_0[3];
  3149. __IO uint8_t CTRLHU; /**< CRC_CTRLHU register., offset: 0xB */
  3150. } CTRL_ACCESS8BIT;
  3151. };
  3152. } CRC_Type;
  3153. /* ----------------------------------------------------------------------------
  3154. -- CRC Register Masks
  3155. ---------------------------------------------------------------------------- */
  3156. /*!
  3157. * @addtogroup CRC_Register_Masks CRC Register Masks
  3158. * @{
  3159. */
  3160. /*! @name DATAL - CRC_DATAL register. */
  3161. #define CRC_DATAL_DATAL_MASK (0xFFFFU)
  3162. #define CRC_DATAL_DATAL_SHIFT (0U)
  3163. #define CRC_DATAL_DATAL(x) (((uint16_t)(((uint16_t)(x)) << CRC_DATAL_DATAL_SHIFT)) & CRC_DATAL_DATAL_MASK)
  3164. /*! @name DATAH - CRC_DATAH register. */
  3165. #define CRC_DATAH_DATAH_MASK (0xFFFFU)
  3166. #define CRC_DATAH_DATAH_SHIFT (0U)
  3167. #define CRC_DATAH_DATAH(x) (((uint16_t)(((uint16_t)(x)) << CRC_DATAH_DATAH_SHIFT)) & CRC_DATAH_DATAH_MASK)
  3168. /*! @name DATA - CRC Data register */
  3169. #define CRC_DATA_LL_MASK (0xFFU)
  3170. #define CRC_DATA_LL_SHIFT (0U)
  3171. #define CRC_DATA_LL(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_LL_SHIFT)) & CRC_DATA_LL_MASK)
  3172. #define CRC_DATA_LU_MASK (0xFF00U)
  3173. #define CRC_DATA_LU_SHIFT (8U)
  3174. #define CRC_DATA_LU(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_LU_SHIFT)) & CRC_DATA_LU_MASK)
  3175. #define CRC_DATA_HL_MASK (0xFF0000U)
  3176. #define CRC_DATA_HL_SHIFT (16U)
  3177. #define CRC_DATA_HL(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_HL_SHIFT)) & CRC_DATA_HL_MASK)
  3178. #define CRC_DATA_HU_MASK (0xFF000000U)
  3179. #define CRC_DATA_HU_SHIFT (24U)
  3180. #define CRC_DATA_HU(x) (((uint32_t)(((uint32_t)(x)) << CRC_DATA_HU_SHIFT)) & CRC_DATA_HU_MASK)
  3181. /*! @name DATALL - CRC_DATALL register. */
  3182. #define CRC_DATALL_DATALL_MASK (0xFFU)
  3183. #define CRC_DATALL_DATALL_SHIFT (0U)
  3184. #define CRC_DATALL_DATALL(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATALL_DATALL_SHIFT)) & CRC_DATALL_DATALL_MASK)
  3185. /*! @name DATALU - CRC_DATALU register. */
  3186. #define CRC_DATALU_DATALU_MASK (0xFFU)
  3187. #define CRC_DATALU_DATALU_SHIFT (0U)
  3188. #define CRC_DATALU_DATALU(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATALU_DATALU_SHIFT)) & CRC_DATALU_DATALU_MASK)
  3189. /*! @name DATAHL - CRC_DATAHL register. */
  3190. #define CRC_DATAHL_DATAHL_MASK (0xFFU)
  3191. #define CRC_DATAHL_DATAHL_SHIFT (0U)
  3192. #define CRC_DATAHL_DATAHL(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATAHL_DATAHL_SHIFT)) & CRC_DATAHL_DATAHL_MASK)
  3193. /*! @name DATAHU - CRC_DATAHU register. */
  3194. #define CRC_DATAHU_DATAHU_MASK (0xFFU)
  3195. #define CRC_DATAHU_DATAHU_SHIFT (0U)
  3196. #define CRC_DATAHU_DATAHU(x) (((uint8_t)(((uint8_t)(x)) << CRC_DATAHU_DATAHU_SHIFT)) & CRC_DATAHU_DATAHU_MASK)
  3197. /*! @name GPOLYL - CRC_GPOLYL register. */
  3198. #define CRC_GPOLYL_GPOLYL_MASK (0xFFFFU)
  3199. #define CRC_GPOLYL_GPOLYL_SHIFT (0U)
  3200. #define CRC_GPOLYL_GPOLYL(x) (((uint16_t)(((uint16_t)(x)) << CRC_GPOLYL_GPOLYL_SHIFT)) & CRC_GPOLYL_GPOLYL_MASK)
  3201. /*! @name GPOLYH - CRC_GPOLYH register. */
  3202. #define CRC_GPOLYH_GPOLYH_MASK (0xFFFFU)
  3203. #define CRC_GPOLYH_GPOLYH_SHIFT (0U)
  3204. #define CRC_GPOLYH_GPOLYH(x) (((uint16_t)(((uint16_t)(x)) << CRC_GPOLYH_GPOLYH_SHIFT)) & CRC_GPOLYH_GPOLYH_MASK)
  3205. /*! @name GPOLY - CRC Polynomial register */
  3206. #define CRC_GPOLY_LOW_MASK (0xFFFFU)
  3207. #define CRC_GPOLY_LOW_SHIFT (0U)
  3208. #define CRC_GPOLY_LOW(x) (((uint32_t)(((uint32_t)(x)) << CRC_GPOLY_LOW_SHIFT)) & CRC_GPOLY_LOW_MASK)
  3209. #define CRC_GPOLY_HIGH_MASK (0xFFFF0000U)
  3210. #define CRC_GPOLY_HIGH_SHIFT (16U)
  3211. #define CRC_GPOLY_HIGH(x) (((uint32_t)(((uint32_t)(x)) << CRC_GPOLY_HIGH_SHIFT)) & CRC_GPOLY_HIGH_MASK)
  3212. /*! @name GPOLYLL - CRC_GPOLYLL register. */
  3213. #define CRC_GPOLYLL_GPOLYLL_MASK (0xFFU)
  3214. #define CRC_GPOLYLL_GPOLYLL_SHIFT (0U)
  3215. #define CRC_GPOLYLL_GPOLYLL(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYLL_GPOLYLL_SHIFT)) & CRC_GPOLYLL_GPOLYLL_MASK)
  3216. /*! @name GPOLYLU - CRC_GPOLYLU register. */
  3217. #define CRC_GPOLYLU_GPOLYLU_MASK (0xFFU)
  3218. #define CRC_GPOLYLU_GPOLYLU_SHIFT (0U)
  3219. #define CRC_GPOLYLU_GPOLYLU(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYLU_GPOLYLU_SHIFT)) & CRC_GPOLYLU_GPOLYLU_MASK)
  3220. /*! @name GPOLYHL - CRC_GPOLYHL register. */
  3221. #define CRC_GPOLYHL_GPOLYHL_MASK (0xFFU)
  3222. #define CRC_GPOLYHL_GPOLYHL_SHIFT (0U)
  3223. #define CRC_GPOLYHL_GPOLYHL(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYHL_GPOLYHL_SHIFT)) & CRC_GPOLYHL_GPOLYHL_MASK)
  3224. /*! @name GPOLYHU - CRC_GPOLYHU register. */
  3225. #define CRC_GPOLYHU_GPOLYHU_MASK (0xFFU)
  3226. #define CRC_GPOLYHU_GPOLYHU_SHIFT (0U)
  3227. #define CRC_GPOLYHU_GPOLYHU(x) (((uint8_t)(((uint8_t)(x)) << CRC_GPOLYHU_GPOLYHU_SHIFT)) & CRC_GPOLYHU_GPOLYHU_MASK)
  3228. /*! @name CTRL - CRC Control register */
  3229. #define CRC_CTRL_TCRC_MASK (0x1000000U)
  3230. #define CRC_CTRL_TCRC_SHIFT (24U)
  3231. #define CRC_CTRL_TCRC(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TCRC_SHIFT)) & CRC_CTRL_TCRC_MASK)
  3232. #define CRC_CTRL_WAS_MASK (0x2000000U)
  3233. #define CRC_CTRL_WAS_SHIFT (25U)
  3234. #define CRC_CTRL_WAS(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_WAS_SHIFT)) & CRC_CTRL_WAS_MASK)
  3235. #define CRC_CTRL_FXOR_MASK (0x4000000U)
  3236. #define CRC_CTRL_FXOR_SHIFT (26U)
  3237. #define CRC_CTRL_FXOR(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_FXOR_SHIFT)) & CRC_CTRL_FXOR_MASK)
  3238. #define CRC_CTRL_TOTR_MASK (0x30000000U)
  3239. #define CRC_CTRL_TOTR_SHIFT (28U)
  3240. #define CRC_CTRL_TOTR(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TOTR_SHIFT)) & CRC_CTRL_TOTR_MASK)
  3241. #define CRC_CTRL_TOT_MASK (0xC0000000U)
  3242. #define CRC_CTRL_TOT_SHIFT (30U)
  3243. #define CRC_CTRL_TOT(x) (((uint32_t)(((uint32_t)(x)) << CRC_CTRL_TOT_SHIFT)) & CRC_CTRL_TOT_MASK)
  3244. /*! @name CTRLHU - CRC_CTRLHU register. */
  3245. #define CRC_CTRLHU_TCRC_MASK (0x1U)
  3246. #define CRC_CTRLHU_TCRC_SHIFT (0U)
  3247. #define CRC_CTRLHU_TCRC(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TCRC_SHIFT)) & CRC_CTRLHU_TCRC_MASK)
  3248. #define CRC_CTRLHU_WAS_MASK (0x2U)
  3249. #define CRC_CTRLHU_WAS_SHIFT (1U)
  3250. #define CRC_CTRLHU_WAS(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_WAS_SHIFT)) & CRC_CTRLHU_WAS_MASK)
  3251. #define CRC_CTRLHU_FXOR_MASK (0x4U)
  3252. #define CRC_CTRLHU_FXOR_SHIFT (2U)
  3253. #define CRC_CTRLHU_FXOR(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_FXOR_SHIFT)) & CRC_CTRLHU_FXOR_MASK)
  3254. #define CRC_CTRLHU_TOTR_MASK (0x30U)
  3255. #define CRC_CTRLHU_TOTR_SHIFT (4U)
  3256. #define CRC_CTRLHU_TOTR(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TOTR_SHIFT)) & CRC_CTRLHU_TOTR_MASK)
  3257. #define CRC_CTRLHU_TOT_MASK (0xC0U)
  3258. #define CRC_CTRLHU_TOT_SHIFT (6U)
  3259. #define CRC_CTRLHU_TOT(x) (((uint8_t)(((uint8_t)(x)) << CRC_CTRLHU_TOT_SHIFT)) & CRC_CTRLHU_TOT_MASK)
  3260. /*!
  3261. * @}
  3262. */ /* end of group CRC_Register_Masks */
  3263. /* CRC - Peripheral instance base addresses */
  3264. /** Peripheral CRC base address */
  3265. #define CRC_BASE (0x40032000u)
  3266. /** Peripheral CRC base pointer */
  3267. #define CRC0 ((CRC_Type *)CRC_BASE)
  3268. /** Array initializer of CRC peripheral base addresses */
  3269. #define CRC_BASE_ADDRS { CRC_BASE }
  3270. /** Array initializer of CRC peripheral base pointers */
  3271. #define CRC_BASE_PTRS { CRC0 }
  3272. /*!
  3273. * @}
  3274. */ /* end of group CRC_Peripheral_Access_Layer */
  3275. /* ----------------------------------------------------------------------------
  3276. -- DAC Peripheral Access Layer
  3277. ---------------------------------------------------------------------------- */
  3278. /*!
  3279. * @addtogroup DAC_Peripheral_Access_Layer DAC Peripheral Access Layer
  3280. * @{
  3281. */
  3282. /** DAC - Register Layout Typedef */
  3283. typedef struct {
  3284. struct { /* offset: 0x0, array step: 0x2 */
  3285. __IO uint8_t DATL; /**< DAC Data Low Register, array offset: 0x0, array step: 0x2 */
  3286. __IO uint8_t DATH; /**< DAC Data High Register, array offset: 0x1, array step: 0x2 */
  3287. } DAT[16];
  3288. __IO uint8_t SR; /**< DAC Status Register, offset: 0x20 */
  3289. __IO uint8_t C0; /**< DAC Control Register, offset: 0x21 */
  3290. __IO uint8_t C1; /**< DAC Control Register 1, offset: 0x22 */
  3291. __IO uint8_t C2; /**< DAC Control Register 2, offset: 0x23 */
  3292. } DAC_Type;
  3293. /* ----------------------------------------------------------------------------
  3294. -- DAC Register Masks
  3295. ---------------------------------------------------------------------------- */
  3296. /*!
  3297. * @addtogroup DAC_Register_Masks DAC Register Masks
  3298. * @{
  3299. */
  3300. /*! @name DATL - DAC Data Low Register */
  3301. #define DAC_DATL_DATA0_MASK (0xFFU)
  3302. #define DAC_DATL_DATA0_SHIFT (0U)
  3303. #define DAC_DATL_DATA0(x) (((uint8_t)(((uint8_t)(x)) << DAC_DATL_DATA0_SHIFT)) & DAC_DATL_DATA0_MASK)
  3304. /* The count of DAC_DATL */
  3305. #define DAC_DATL_COUNT (16U)
  3306. /*! @name DATH - DAC Data High Register */
  3307. #define DAC_DATH_DATA1_MASK (0xFU)
  3308. #define DAC_DATH_DATA1_SHIFT (0U)
  3309. #define DAC_DATH_DATA1(x) (((uint8_t)(((uint8_t)(x)) << DAC_DATH_DATA1_SHIFT)) & DAC_DATH_DATA1_MASK)
  3310. /* The count of DAC_DATH */
  3311. #define DAC_DATH_COUNT (16U)
  3312. /*! @name SR - DAC Status Register */
  3313. #define DAC_SR_DACBFRPBF_MASK (0x1U)
  3314. #define DAC_SR_DACBFRPBF_SHIFT (0U)
  3315. #define DAC_SR_DACBFRPBF(x) (((uint8_t)(((uint8_t)(x)) << DAC_SR_DACBFRPBF_SHIFT)) & DAC_SR_DACBFRPBF_MASK)
  3316. #define DAC_SR_DACBFRPTF_MASK (0x2U)
  3317. #define DAC_SR_DACBFRPTF_SHIFT (1U)
  3318. #define DAC_SR_DACBFRPTF(x) (((uint8_t)(((uint8_t)(x)) << DAC_SR_DACBFRPTF_SHIFT)) & DAC_SR_DACBFRPTF_MASK)
  3319. #define DAC_SR_DACBFWMF_MASK (0x4U)
  3320. #define DAC_SR_DACBFWMF_SHIFT (2U)
  3321. #define DAC_SR_DACBFWMF(x) (((uint8_t)(((uint8_t)(x)) << DAC_SR_DACBFWMF_SHIFT)) & DAC_SR_DACBFWMF_MASK)
  3322. /*! @name C0 - DAC Control Register */
  3323. #define DAC_C0_DACBBIEN_MASK (0x1U)
  3324. #define DAC_C0_DACBBIEN_SHIFT (0U)
  3325. #define DAC_C0_DACBBIEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACBBIEN_SHIFT)) & DAC_C0_DACBBIEN_MASK)
  3326. #define DAC_C0_DACBTIEN_MASK (0x2U)
  3327. #define DAC_C0_DACBTIEN_SHIFT (1U)
  3328. #define DAC_C0_DACBTIEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACBTIEN_SHIFT)) & DAC_C0_DACBTIEN_MASK)
  3329. #define DAC_C0_DACBWIEN_MASK (0x4U)
  3330. #define DAC_C0_DACBWIEN_SHIFT (2U)
  3331. #define DAC_C0_DACBWIEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACBWIEN_SHIFT)) & DAC_C0_DACBWIEN_MASK)
  3332. #define DAC_C0_LPEN_MASK (0x8U)
  3333. #define DAC_C0_LPEN_SHIFT (3U)
  3334. #define DAC_C0_LPEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_LPEN_SHIFT)) & DAC_C0_LPEN_MASK)
  3335. #define DAC_C0_DACSWTRG_MASK (0x10U)
  3336. #define DAC_C0_DACSWTRG_SHIFT (4U)
  3337. #define DAC_C0_DACSWTRG(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACSWTRG_SHIFT)) & DAC_C0_DACSWTRG_MASK)
  3338. #define DAC_C0_DACTRGSEL_MASK (0x20U)
  3339. #define DAC_C0_DACTRGSEL_SHIFT (5U)
  3340. #define DAC_C0_DACTRGSEL(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACTRGSEL_SHIFT)) & DAC_C0_DACTRGSEL_MASK)
  3341. #define DAC_C0_DACRFS_MASK (0x40U)
  3342. #define DAC_C0_DACRFS_SHIFT (6U)
  3343. #define DAC_C0_DACRFS(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACRFS_SHIFT)) & DAC_C0_DACRFS_MASK)
  3344. #define DAC_C0_DACEN_MASK (0x80U)
  3345. #define DAC_C0_DACEN_SHIFT (7U)
  3346. #define DAC_C0_DACEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C0_DACEN_SHIFT)) & DAC_C0_DACEN_MASK)
  3347. /*! @name C1 - DAC Control Register 1 */
  3348. #define DAC_C1_DACBFEN_MASK (0x1U)
  3349. #define DAC_C1_DACBFEN_SHIFT (0U)
  3350. #define DAC_C1_DACBFEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DACBFEN_SHIFT)) & DAC_C1_DACBFEN_MASK)
  3351. #define DAC_C1_DACBFMD_MASK (0x6U)
  3352. #define DAC_C1_DACBFMD_SHIFT (1U)
  3353. #define DAC_C1_DACBFMD(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DACBFMD_SHIFT)) & DAC_C1_DACBFMD_MASK)
  3354. #define DAC_C1_DACBFWM_MASK (0x18U)
  3355. #define DAC_C1_DACBFWM_SHIFT (3U)
  3356. #define DAC_C1_DACBFWM(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DACBFWM_SHIFT)) & DAC_C1_DACBFWM_MASK)
  3357. #define DAC_C1_DMAEN_MASK (0x80U)
  3358. #define DAC_C1_DMAEN_SHIFT (7U)
  3359. #define DAC_C1_DMAEN(x) (((uint8_t)(((uint8_t)(x)) << DAC_C1_DMAEN_SHIFT)) & DAC_C1_DMAEN_MASK)
  3360. /*! @name C2 - DAC Control Register 2 */
  3361. #define DAC_C2_DACBFUP_MASK (0xFU)
  3362. #define DAC_C2_DACBFUP_SHIFT (0U)
  3363. #define DAC_C2_DACBFUP(x) (((uint8_t)(((uint8_t)(x)) << DAC_C2_DACBFUP_SHIFT)) & DAC_C2_DACBFUP_MASK)
  3364. #define DAC_C2_DACBFRP_MASK (0xF0U)
  3365. #define DAC_C2_DACBFRP_SHIFT (4U)
  3366. #define DAC_C2_DACBFRP(x) (((uint8_t)(((uint8_t)(x)) << DAC_C2_DACBFRP_SHIFT)) & DAC_C2_DACBFRP_MASK)
  3367. /*!
  3368. * @}
  3369. */ /* end of group DAC_Register_Masks */
  3370. /* DAC - Peripheral instance base addresses */
  3371. /** Peripheral DAC0 base address */
  3372. #define DAC0_BASE (0x400CC000u)
  3373. /** Peripheral DAC0 base pointer */
  3374. #define DAC0 ((DAC_Type *)DAC0_BASE)
  3375. /** Peripheral DAC1 base address */
  3376. #define DAC1_BASE (0x400CD000u)
  3377. /** Peripheral DAC1 base pointer */
  3378. #define DAC1 ((DAC_Type *)DAC1_BASE)
  3379. /** Array initializer of DAC peripheral base addresses */
  3380. #define DAC_BASE_ADDRS { DAC0_BASE, DAC1_BASE }
  3381. /** Array initializer of DAC peripheral base pointers */
  3382. #define DAC_BASE_PTRS { DAC0, DAC1 }
  3383. /** Interrupt vectors for the DAC peripheral type */
  3384. #define DAC_IRQS { DAC0_IRQn, DAC1_IRQn }
  3385. /*!
  3386. * @}
  3387. */ /* end of group DAC_Peripheral_Access_Layer */
  3388. /* ----------------------------------------------------------------------------
  3389. -- DMA Peripheral Access Layer
  3390. ---------------------------------------------------------------------------- */
  3391. /*!
  3392. * @addtogroup DMA_Peripheral_Access_Layer DMA Peripheral Access Layer
  3393. * @{
  3394. */
  3395. /** DMA - Register Layout Typedef */
  3396. typedef struct {
  3397. __IO uint32_t CR; /**< Control Register, offset: 0x0 */
  3398. __I uint32_t ES; /**< Error Status Register, offset: 0x4 */
  3399. uint8_t RESERVED_0[4];
  3400. __IO uint32_t ERQ; /**< Enable Request Register, offset: 0xC */
  3401. uint8_t RESERVED_1[4];
  3402. __IO uint32_t EEI; /**< Enable Error Interrupt Register, offset: 0x14 */
  3403. __O uint8_t CEEI; /**< Clear Enable Error Interrupt Register, offset: 0x18 */
  3404. __O uint8_t SEEI; /**< Set Enable Error Interrupt Register, offset: 0x19 */
  3405. __O uint8_t CERQ; /**< Clear Enable Request Register, offset: 0x1A */
  3406. __O uint8_t SERQ; /**< Set Enable Request Register, offset: 0x1B */
  3407. __O uint8_t CDNE; /**< Clear DONE Status Bit Register, offset: 0x1C */
  3408. __O uint8_t SSRT; /**< Set START Bit Register, offset: 0x1D */
  3409. __O uint8_t CERR; /**< Clear Error Register, offset: 0x1E */
  3410. __O uint8_t CINT; /**< Clear Interrupt Request Register, offset: 0x1F */
  3411. uint8_t RESERVED_2[4];
  3412. __IO uint32_t INT; /**< Interrupt Request Register, offset: 0x24 */
  3413. uint8_t RESERVED_3[4];
  3414. __IO uint32_t ERR; /**< Error Register, offset: 0x2C */
  3415. uint8_t RESERVED_4[4];
  3416. __I uint32_t HRS; /**< Hardware Request Status Register, offset: 0x34 */
  3417. uint8_t RESERVED_5[200];
  3418. __IO uint8_t DCHPRI3; /**< Channel n Priority Register, offset: 0x100 */
  3419. __IO uint8_t DCHPRI2; /**< Channel n Priority Register, offset: 0x101 */
  3420. __IO uint8_t DCHPRI1; /**< Channel n Priority Register, offset: 0x102 */
  3421. __IO uint8_t DCHPRI0; /**< Channel n Priority Register, offset: 0x103 */
  3422. __IO uint8_t DCHPRI7; /**< Channel n Priority Register, offset: 0x104 */
  3423. __IO uint8_t DCHPRI6; /**< Channel n Priority Register, offset: 0x105 */
  3424. __IO uint8_t DCHPRI5; /**< Channel n Priority Register, offset: 0x106 */
  3425. __IO uint8_t DCHPRI4; /**< Channel n Priority Register, offset: 0x107 */
  3426. __IO uint8_t DCHPRI11; /**< Channel n Priority Register, offset: 0x108 */
  3427. __IO uint8_t DCHPRI10; /**< Channel n Priority Register, offset: 0x109 */
  3428. __IO uint8_t DCHPRI9; /**< Channel n Priority Register, offset: 0x10A */
  3429. __IO uint8_t DCHPRI8; /**< Channel n Priority Register, offset: 0x10B */
  3430. __IO uint8_t DCHPRI15; /**< Channel n Priority Register, offset: 0x10C */
  3431. __IO uint8_t DCHPRI14; /**< Channel n Priority Register, offset: 0x10D */
  3432. __IO uint8_t DCHPRI13; /**< Channel n Priority Register, offset: 0x10E */
  3433. __IO uint8_t DCHPRI12; /**< Channel n Priority Register, offset: 0x10F */
  3434. uint8_t RESERVED_6[3824];
  3435. struct { /* offset: 0x1000, array step: 0x20 */
  3436. __IO uint32_t SADDR; /**< TCD Source Address, array offset: 0x1000, array step: 0x20 */
  3437. __IO uint16_t SOFF; /**< TCD Signed Source Address Offset, array offset: 0x1004, array step: 0x20 */
  3438. __IO uint16_t ATTR; /**< TCD Transfer Attributes, array offset: 0x1006, array step: 0x20 */
  3439. union { /* offset: 0x1008, array step: 0x20 */
  3440. __IO uint32_t NBYTES_MLNO; /**< TCD Minor Byte Count (Minor Loop Disabled), array offset: 0x1008, array step: 0x20 */
  3441. __IO uint32_t NBYTES_MLOFFNO; /**< TCD Signed Minor Loop Offset (Minor Loop Enabled and Offset Disabled), array offset: 0x1008, array step: 0x20 */
  3442. __IO uint32_t NBYTES_MLOFFYES; /**< TCD Signed Minor Loop Offset (Minor Loop and Offset Enabled), array offset: 0x1008, array step: 0x20 */
  3443. };
  3444. __IO uint32_t SLAST; /**< TCD Last Source Address Adjustment, array offset: 0x100C, array step: 0x20 */
  3445. __IO uint32_t DADDR; /**< TCD Destination Address, array offset: 0x1010, array step: 0x20 */
  3446. __IO uint16_t DOFF; /**< TCD Signed Destination Address Offset, array offset: 0x1014, array step: 0x20 */
  3447. union { /* offset: 0x1016, array step: 0x20 */
  3448. __IO uint16_t CITER_ELINKNO; /**< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x1016, array step: 0x20 */
  3449. __IO uint16_t CITER_ELINKYES; /**< TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled), array offset: 0x1016, array step: 0x20 */
  3450. };
  3451. __IO uint32_t DLAST_SGA; /**< TCD Last Destination Address Adjustment/Scatter Gather Address, array offset: 0x1018, array step: 0x20 */
  3452. __IO uint16_t CSR; /**< TCD Control and Status, array offset: 0x101C, array step: 0x20 */
  3453. union { /* offset: 0x101E, array step: 0x20 */
  3454. __IO uint16_t BITER_ELINKNO; /**< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled), array offset: 0x101E, array step: 0x20 */
  3455. __IO uint16_t BITER_ELINKYES; /**< TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled), array offset: 0x101E, array step: 0x20 */
  3456. };
  3457. } TCD[16];
  3458. } DMA_Type;
  3459. /* ----------------------------------------------------------------------------
  3460. -- DMA Register Masks
  3461. ---------------------------------------------------------------------------- */
  3462. /*!
  3463. * @addtogroup DMA_Register_Masks DMA Register Masks
  3464. * @{
  3465. */
  3466. /*! @name CR - Control Register */
  3467. #define DMA_CR_EDBG_MASK (0x2U)
  3468. #define DMA_CR_EDBG_SHIFT (1U)
  3469. #define DMA_CR_EDBG(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_EDBG_SHIFT)) & DMA_CR_EDBG_MASK)
  3470. #define DMA_CR_ERCA_MASK (0x4U)
  3471. #define DMA_CR_ERCA_SHIFT (2U)
  3472. #define DMA_CR_ERCA(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ERCA_SHIFT)) & DMA_CR_ERCA_MASK)
  3473. #define DMA_CR_HOE_MASK (0x10U)
  3474. #define DMA_CR_HOE_SHIFT (4U)
  3475. #define DMA_CR_HOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_HOE_SHIFT)) & DMA_CR_HOE_MASK)
  3476. #define DMA_CR_HALT_MASK (0x20U)
  3477. #define DMA_CR_HALT_SHIFT (5U)
  3478. #define DMA_CR_HALT(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_HALT_SHIFT)) & DMA_CR_HALT_MASK)
  3479. #define DMA_CR_CLM_MASK (0x40U)
  3480. #define DMA_CR_CLM_SHIFT (6U)
  3481. #define DMA_CR_CLM(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_CLM_SHIFT)) & DMA_CR_CLM_MASK)
  3482. #define DMA_CR_EMLM_MASK (0x80U)
  3483. #define DMA_CR_EMLM_SHIFT (7U)
  3484. #define DMA_CR_EMLM(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_EMLM_SHIFT)) & DMA_CR_EMLM_MASK)
  3485. #define DMA_CR_ECX_MASK (0x10000U)
  3486. #define DMA_CR_ECX_SHIFT (16U)
  3487. #define DMA_CR_ECX(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_ECX_SHIFT)) & DMA_CR_ECX_MASK)
  3488. #define DMA_CR_CX_MASK (0x20000U)
  3489. #define DMA_CR_CX_SHIFT (17U)
  3490. #define DMA_CR_CX(x) (((uint32_t)(((uint32_t)(x)) << DMA_CR_CX_SHIFT)) & DMA_CR_CX_MASK)
  3491. /*! @name ES - Error Status Register */
  3492. #define DMA_ES_DBE_MASK (0x1U)
  3493. #define DMA_ES_DBE_SHIFT (0U)
  3494. #define DMA_ES_DBE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DBE_SHIFT)) & DMA_ES_DBE_MASK)
  3495. #define DMA_ES_SBE_MASK (0x2U)
  3496. #define DMA_ES_SBE_SHIFT (1U)
  3497. #define DMA_ES_SBE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SBE_SHIFT)) & DMA_ES_SBE_MASK)
  3498. #define DMA_ES_SGE_MASK (0x4U)
  3499. #define DMA_ES_SGE_SHIFT (2U)
  3500. #define DMA_ES_SGE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SGE_SHIFT)) & DMA_ES_SGE_MASK)
  3501. #define DMA_ES_NCE_MASK (0x8U)
  3502. #define DMA_ES_NCE_SHIFT (3U)
  3503. #define DMA_ES_NCE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_NCE_SHIFT)) & DMA_ES_NCE_MASK)
  3504. #define DMA_ES_DOE_MASK (0x10U)
  3505. #define DMA_ES_DOE_SHIFT (4U)
  3506. #define DMA_ES_DOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DOE_SHIFT)) & DMA_ES_DOE_MASK)
  3507. #define DMA_ES_DAE_MASK (0x20U)
  3508. #define DMA_ES_DAE_SHIFT (5U)
  3509. #define DMA_ES_DAE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_DAE_SHIFT)) & DMA_ES_DAE_MASK)
  3510. #define DMA_ES_SOE_MASK (0x40U)
  3511. #define DMA_ES_SOE_SHIFT (6U)
  3512. #define DMA_ES_SOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SOE_SHIFT)) & DMA_ES_SOE_MASK)
  3513. #define DMA_ES_SAE_MASK (0x80U)
  3514. #define DMA_ES_SAE_SHIFT (7U)
  3515. #define DMA_ES_SAE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_SAE_SHIFT)) & DMA_ES_SAE_MASK)
  3516. #define DMA_ES_ERRCHN_MASK (0xF00U)
  3517. #define DMA_ES_ERRCHN_SHIFT (8U)
  3518. #define DMA_ES_ERRCHN(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_ERRCHN_SHIFT)) & DMA_ES_ERRCHN_MASK)
  3519. #define DMA_ES_CPE_MASK (0x4000U)
  3520. #define DMA_ES_CPE_SHIFT (14U)
  3521. #define DMA_ES_CPE(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_CPE_SHIFT)) & DMA_ES_CPE_MASK)
  3522. #define DMA_ES_ECX_MASK (0x10000U)
  3523. #define DMA_ES_ECX_SHIFT (16U)
  3524. #define DMA_ES_ECX(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_ECX_SHIFT)) & DMA_ES_ECX_MASK)
  3525. #define DMA_ES_VLD_MASK (0x80000000U)
  3526. #define DMA_ES_VLD_SHIFT (31U)
  3527. #define DMA_ES_VLD(x) (((uint32_t)(((uint32_t)(x)) << DMA_ES_VLD_SHIFT)) & DMA_ES_VLD_MASK)
  3528. /*! @name ERQ - Enable Request Register */
  3529. #define DMA_ERQ_ERQ0_MASK (0x1U)
  3530. #define DMA_ERQ_ERQ0_SHIFT (0U)
  3531. #define DMA_ERQ_ERQ0(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ0_SHIFT)) & DMA_ERQ_ERQ0_MASK)
  3532. #define DMA_ERQ_ERQ1_MASK (0x2U)
  3533. #define DMA_ERQ_ERQ1_SHIFT (1U)
  3534. #define DMA_ERQ_ERQ1(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ1_SHIFT)) & DMA_ERQ_ERQ1_MASK)
  3535. #define DMA_ERQ_ERQ2_MASK (0x4U)
  3536. #define DMA_ERQ_ERQ2_SHIFT (2U)
  3537. #define DMA_ERQ_ERQ2(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ2_SHIFT)) & DMA_ERQ_ERQ2_MASK)
  3538. #define DMA_ERQ_ERQ3_MASK (0x8U)
  3539. #define DMA_ERQ_ERQ3_SHIFT (3U)
  3540. #define DMA_ERQ_ERQ3(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ3_SHIFT)) & DMA_ERQ_ERQ3_MASK)
  3541. #define DMA_ERQ_ERQ4_MASK (0x10U)
  3542. #define DMA_ERQ_ERQ4_SHIFT (4U)
  3543. #define DMA_ERQ_ERQ4(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ4_SHIFT)) & DMA_ERQ_ERQ4_MASK)
  3544. #define DMA_ERQ_ERQ5_MASK (0x20U)
  3545. #define DMA_ERQ_ERQ5_SHIFT (5U)
  3546. #define DMA_ERQ_ERQ5(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ5_SHIFT)) & DMA_ERQ_ERQ5_MASK)
  3547. #define DMA_ERQ_ERQ6_MASK (0x40U)
  3548. #define DMA_ERQ_ERQ6_SHIFT (6U)
  3549. #define DMA_ERQ_ERQ6(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ6_SHIFT)) & DMA_ERQ_ERQ6_MASK)
  3550. #define DMA_ERQ_ERQ7_MASK (0x80U)
  3551. #define DMA_ERQ_ERQ7_SHIFT (7U)
  3552. #define DMA_ERQ_ERQ7(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ7_SHIFT)) & DMA_ERQ_ERQ7_MASK)
  3553. #define DMA_ERQ_ERQ8_MASK (0x100U)
  3554. #define DMA_ERQ_ERQ8_SHIFT (8U)
  3555. #define DMA_ERQ_ERQ8(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ8_SHIFT)) & DMA_ERQ_ERQ8_MASK)
  3556. #define DMA_ERQ_ERQ9_MASK (0x200U)
  3557. #define DMA_ERQ_ERQ9_SHIFT (9U)
  3558. #define DMA_ERQ_ERQ9(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ9_SHIFT)) & DMA_ERQ_ERQ9_MASK)
  3559. #define DMA_ERQ_ERQ10_MASK (0x400U)
  3560. #define DMA_ERQ_ERQ10_SHIFT (10U)
  3561. #define DMA_ERQ_ERQ10(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ10_SHIFT)) & DMA_ERQ_ERQ10_MASK)
  3562. #define DMA_ERQ_ERQ11_MASK (0x800U)
  3563. #define DMA_ERQ_ERQ11_SHIFT (11U)
  3564. #define DMA_ERQ_ERQ11(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ11_SHIFT)) & DMA_ERQ_ERQ11_MASK)
  3565. #define DMA_ERQ_ERQ12_MASK (0x1000U)
  3566. #define DMA_ERQ_ERQ12_SHIFT (12U)
  3567. #define DMA_ERQ_ERQ12(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ12_SHIFT)) & DMA_ERQ_ERQ12_MASK)
  3568. #define DMA_ERQ_ERQ13_MASK (0x2000U)
  3569. #define DMA_ERQ_ERQ13_SHIFT (13U)
  3570. #define DMA_ERQ_ERQ13(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ13_SHIFT)) & DMA_ERQ_ERQ13_MASK)
  3571. #define DMA_ERQ_ERQ14_MASK (0x4000U)
  3572. #define DMA_ERQ_ERQ14_SHIFT (14U)
  3573. #define DMA_ERQ_ERQ14(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ14_SHIFT)) & DMA_ERQ_ERQ14_MASK)
  3574. #define DMA_ERQ_ERQ15_MASK (0x8000U)
  3575. #define DMA_ERQ_ERQ15_SHIFT (15U)
  3576. #define DMA_ERQ_ERQ15(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERQ_ERQ15_SHIFT)) & DMA_ERQ_ERQ15_MASK)
  3577. /*! @name EEI - Enable Error Interrupt Register */
  3578. #define DMA_EEI_EEI0_MASK (0x1U)
  3579. #define DMA_EEI_EEI0_SHIFT (0U)
  3580. #define DMA_EEI_EEI0(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI0_SHIFT)) & DMA_EEI_EEI0_MASK)
  3581. #define DMA_EEI_EEI1_MASK (0x2U)
  3582. #define DMA_EEI_EEI1_SHIFT (1U)
  3583. #define DMA_EEI_EEI1(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI1_SHIFT)) & DMA_EEI_EEI1_MASK)
  3584. #define DMA_EEI_EEI2_MASK (0x4U)
  3585. #define DMA_EEI_EEI2_SHIFT (2U)
  3586. #define DMA_EEI_EEI2(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI2_SHIFT)) & DMA_EEI_EEI2_MASK)
  3587. #define DMA_EEI_EEI3_MASK (0x8U)
  3588. #define DMA_EEI_EEI3_SHIFT (3U)
  3589. #define DMA_EEI_EEI3(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI3_SHIFT)) & DMA_EEI_EEI3_MASK)
  3590. #define DMA_EEI_EEI4_MASK (0x10U)
  3591. #define DMA_EEI_EEI4_SHIFT (4U)
  3592. #define DMA_EEI_EEI4(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI4_SHIFT)) & DMA_EEI_EEI4_MASK)
  3593. #define DMA_EEI_EEI5_MASK (0x20U)
  3594. #define DMA_EEI_EEI5_SHIFT (5U)
  3595. #define DMA_EEI_EEI5(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI5_SHIFT)) & DMA_EEI_EEI5_MASK)
  3596. #define DMA_EEI_EEI6_MASK (0x40U)
  3597. #define DMA_EEI_EEI6_SHIFT (6U)
  3598. #define DMA_EEI_EEI6(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI6_SHIFT)) & DMA_EEI_EEI6_MASK)
  3599. #define DMA_EEI_EEI7_MASK (0x80U)
  3600. #define DMA_EEI_EEI7_SHIFT (7U)
  3601. #define DMA_EEI_EEI7(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI7_SHIFT)) & DMA_EEI_EEI7_MASK)
  3602. #define DMA_EEI_EEI8_MASK (0x100U)
  3603. #define DMA_EEI_EEI8_SHIFT (8U)
  3604. #define DMA_EEI_EEI8(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI8_SHIFT)) & DMA_EEI_EEI8_MASK)
  3605. #define DMA_EEI_EEI9_MASK (0x200U)
  3606. #define DMA_EEI_EEI9_SHIFT (9U)
  3607. #define DMA_EEI_EEI9(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI9_SHIFT)) & DMA_EEI_EEI9_MASK)
  3608. #define DMA_EEI_EEI10_MASK (0x400U)
  3609. #define DMA_EEI_EEI10_SHIFT (10U)
  3610. #define DMA_EEI_EEI10(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI10_SHIFT)) & DMA_EEI_EEI10_MASK)
  3611. #define DMA_EEI_EEI11_MASK (0x800U)
  3612. #define DMA_EEI_EEI11_SHIFT (11U)
  3613. #define DMA_EEI_EEI11(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI11_SHIFT)) & DMA_EEI_EEI11_MASK)
  3614. #define DMA_EEI_EEI12_MASK (0x1000U)
  3615. #define DMA_EEI_EEI12_SHIFT (12U)
  3616. #define DMA_EEI_EEI12(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI12_SHIFT)) & DMA_EEI_EEI12_MASK)
  3617. #define DMA_EEI_EEI13_MASK (0x2000U)
  3618. #define DMA_EEI_EEI13_SHIFT (13U)
  3619. #define DMA_EEI_EEI13(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI13_SHIFT)) & DMA_EEI_EEI13_MASK)
  3620. #define DMA_EEI_EEI14_MASK (0x4000U)
  3621. #define DMA_EEI_EEI14_SHIFT (14U)
  3622. #define DMA_EEI_EEI14(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI14_SHIFT)) & DMA_EEI_EEI14_MASK)
  3623. #define DMA_EEI_EEI15_MASK (0x8000U)
  3624. #define DMA_EEI_EEI15_SHIFT (15U)
  3625. #define DMA_EEI_EEI15(x) (((uint32_t)(((uint32_t)(x)) << DMA_EEI_EEI15_SHIFT)) & DMA_EEI_EEI15_MASK)
  3626. /*! @name CEEI - Clear Enable Error Interrupt Register */
  3627. #define DMA_CEEI_CEEI_MASK (0xFU)
  3628. #define DMA_CEEI_CEEI_SHIFT (0U)
  3629. #define DMA_CEEI_CEEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_CEEI_SHIFT)) & DMA_CEEI_CEEI_MASK)
  3630. #define DMA_CEEI_CAEE_MASK (0x40U)
  3631. #define DMA_CEEI_CAEE_SHIFT (6U)
  3632. #define DMA_CEEI_CAEE(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_CAEE_SHIFT)) & DMA_CEEI_CAEE_MASK)
  3633. #define DMA_CEEI_NOP_MASK (0x80U)
  3634. #define DMA_CEEI_NOP_SHIFT (7U)
  3635. #define DMA_CEEI_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CEEI_NOP_SHIFT)) & DMA_CEEI_NOP_MASK)
  3636. /*! @name SEEI - Set Enable Error Interrupt Register */
  3637. #define DMA_SEEI_SEEI_MASK (0xFU)
  3638. #define DMA_SEEI_SEEI_SHIFT (0U)
  3639. #define DMA_SEEI_SEEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_SEEI_SHIFT)) & DMA_SEEI_SEEI_MASK)
  3640. #define DMA_SEEI_SAEE_MASK (0x40U)
  3641. #define DMA_SEEI_SAEE_SHIFT (6U)
  3642. #define DMA_SEEI_SAEE(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_SAEE_SHIFT)) & DMA_SEEI_SAEE_MASK)
  3643. #define DMA_SEEI_NOP_MASK (0x80U)
  3644. #define DMA_SEEI_NOP_SHIFT (7U)
  3645. #define DMA_SEEI_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SEEI_NOP_SHIFT)) & DMA_SEEI_NOP_MASK)
  3646. /*! @name CERQ - Clear Enable Request Register */
  3647. #define DMA_CERQ_CERQ_MASK (0xFU)
  3648. #define DMA_CERQ_CERQ_SHIFT (0U)
  3649. #define DMA_CERQ_CERQ(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_CERQ_SHIFT)) & DMA_CERQ_CERQ_MASK)
  3650. #define DMA_CERQ_CAER_MASK (0x40U)
  3651. #define DMA_CERQ_CAER_SHIFT (6U)
  3652. #define DMA_CERQ_CAER(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_CAER_SHIFT)) & DMA_CERQ_CAER_MASK)
  3653. #define DMA_CERQ_NOP_MASK (0x80U)
  3654. #define DMA_CERQ_NOP_SHIFT (7U)
  3655. #define DMA_CERQ_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERQ_NOP_SHIFT)) & DMA_CERQ_NOP_MASK)
  3656. /*! @name SERQ - Set Enable Request Register */
  3657. #define DMA_SERQ_SERQ_MASK (0xFU)
  3658. #define DMA_SERQ_SERQ_SHIFT (0U)
  3659. #define DMA_SERQ_SERQ(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_SERQ_SHIFT)) & DMA_SERQ_SERQ_MASK)
  3660. #define DMA_SERQ_SAER_MASK (0x40U)
  3661. #define DMA_SERQ_SAER_SHIFT (6U)
  3662. #define DMA_SERQ_SAER(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_SAER_SHIFT)) & DMA_SERQ_SAER_MASK)
  3663. #define DMA_SERQ_NOP_MASK (0x80U)
  3664. #define DMA_SERQ_NOP_SHIFT (7U)
  3665. #define DMA_SERQ_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SERQ_NOP_SHIFT)) & DMA_SERQ_NOP_MASK)
  3666. /*! @name CDNE - Clear DONE Status Bit Register */
  3667. #define DMA_CDNE_CDNE_MASK (0xFU)
  3668. #define DMA_CDNE_CDNE_SHIFT (0U)
  3669. #define DMA_CDNE_CDNE(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_CDNE_SHIFT)) & DMA_CDNE_CDNE_MASK)
  3670. #define DMA_CDNE_CADN_MASK (0x40U)
  3671. #define DMA_CDNE_CADN_SHIFT (6U)
  3672. #define DMA_CDNE_CADN(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_CADN_SHIFT)) & DMA_CDNE_CADN_MASK)
  3673. #define DMA_CDNE_NOP_MASK (0x80U)
  3674. #define DMA_CDNE_NOP_SHIFT (7U)
  3675. #define DMA_CDNE_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CDNE_NOP_SHIFT)) & DMA_CDNE_NOP_MASK)
  3676. /*! @name SSRT - Set START Bit Register */
  3677. #define DMA_SSRT_SSRT_MASK (0xFU)
  3678. #define DMA_SSRT_SSRT_SHIFT (0U)
  3679. #define DMA_SSRT_SSRT(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_SSRT_SHIFT)) & DMA_SSRT_SSRT_MASK)
  3680. #define DMA_SSRT_SAST_MASK (0x40U)
  3681. #define DMA_SSRT_SAST_SHIFT (6U)
  3682. #define DMA_SSRT_SAST(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_SAST_SHIFT)) & DMA_SSRT_SAST_MASK)
  3683. #define DMA_SSRT_NOP_MASK (0x80U)
  3684. #define DMA_SSRT_NOP_SHIFT (7U)
  3685. #define DMA_SSRT_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_SSRT_NOP_SHIFT)) & DMA_SSRT_NOP_MASK)
  3686. /*! @name CERR - Clear Error Register */
  3687. #define DMA_CERR_CERR_MASK (0xFU)
  3688. #define DMA_CERR_CERR_SHIFT (0U)
  3689. #define DMA_CERR_CERR(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_CERR_SHIFT)) & DMA_CERR_CERR_MASK)
  3690. #define DMA_CERR_CAEI_MASK (0x40U)
  3691. #define DMA_CERR_CAEI_SHIFT (6U)
  3692. #define DMA_CERR_CAEI(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_CAEI_SHIFT)) & DMA_CERR_CAEI_MASK)
  3693. #define DMA_CERR_NOP_MASK (0x80U)
  3694. #define DMA_CERR_NOP_SHIFT (7U)
  3695. #define DMA_CERR_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CERR_NOP_SHIFT)) & DMA_CERR_NOP_MASK)
  3696. /*! @name CINT - Clear Interrupt Request Register */
  3697. #define DMA_CINT_CINT_MASK (0xFU)
  3698. #define DMA_CINT_CINT_SHIFT (0U)
  3699. #define DMA_CINT_CINT(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_CINT_SHIFT)) & DMA_CINT_CINT_MASK)
  3700. #define DMA_CINT_CAIR_MASK (0x40U)
  3701. #define DMA_CINT_CAIR_SHIFT (6U)
  3702. #define DMA_CINT_CAIR(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_CAIR_SHIFT)) & DMA_CINT_CAIR_MASK)
  3703. #define DMA_CINT_NOP_MASK (0x80U)
  3704. #define DMA_CINT_NOP_SHIFT (7U)
  3705. #define DMA_CINT_NOP(x) (((uint8_t)(((uint8_t)(x)) << DMA_CINT_NOP_SHIFT)) & DMA_CINT_NOP_MASK)
  3706. /*! @name INT - Interrupt Request Register */
  3707. #define DMA_INT_INT0_MASK (0x1U)
  3708. #define DMA_INT_INT0_SHIFT (0U)
  3709. #define DMA_INT_INT0(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT0_SHIFT)) & DMA_INT_INT0_MASK)
  3710. #define DMA_INT_INT1_MASK (0x2U)
  3711. #define DMA_INT_INT1_SHIFT (1U)
  3712. #define DMA_INT_INT1(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT1_SHIFT)) & DMA_INT_INT1_MASK)
  3713. #define DMA_INT_INT2_MASK (0x4U)
  3714. #define DMA_INT_INT2_SHIFT (2U)
  3715. #define DMA_INT_INT2(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT2_SHIFT)) & DMA_INT_INT2_MASK)
  3716. #define DMA_INT_INT3_MASK (0x8U)
  3717. #define DMA_INT_INT3_SHIFT (3U)
  3718. #define DMA_INT_INT3(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT3_SHIFT)) & DMA_INT_INT3_MASK)
  3719. #define DMA_INT_INT4_MASK (0x10U)
  3720. #define DMA_INT_INT4_SHIFT (4U)
  3721. #define DMA_INT_INT4(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT4_SHIFT)) & DMA_INT_INT4_MASK)
  3722. #define DMA_INT_INT5_MASK (0x20U)
  3723. #define DMA_INT_INT5_SHIFT (5U)
  3724. #define DMA_INT_INT5(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT5_SHIFT)) & DMA_INT_INT5_MASK)
  3725. #define DMA_INT_INT6_MASK (0x40U)
  3726. #define DMA_INT_INT6_SHIFT (6U)
  3727. #define DMA_INT_INT6(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT6_SHIFT)) & DMA_INT_INT6_MASK)
  3728. #define DMA_INT_INT7_MASK (0x80U)
  3729. #define DMA_INT_INT7_SHIFT (7U)
  3730. #define DMA_INT_INT7(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT7_SHIFT)) & DMA_INT_INT7_MASK)
  3731. #define DMA_INT_INT8_MASK (0x100U)
  3732. #define DMA_INT_INT8_SHIFT (8U)
  3733. #define DMA_INT_INT8(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT8_SHIFT)) & DMA_INT_INT8_MASK)
  3734. #define DMA_INT_INT9_MASK (0x200U)
  3735. #define DMA_INT_INT9_SHIFT (9U)
  3736. #define DMA_INT_INT9(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT9_SHIFT)) & DMA_INT_INT9_MASK)
  3737. #define DMA_INT_INT10_MASK (0x400U)
  3738. #define DMA_INT_INT10_SHIFT (10U)
  3739. #define DMA_INT_INT10(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT10_SHIFT)) & DMA_INT_INT10_MASK)
  3740. #define DMA_INT_INT11_MASK (0x800U)
  3741. #define DMA_INT_INT11_SHIFT (11U)
  3742. #define DMA_INT_INT11(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT11_SHIFT)) & DMA_INT_INT11_MASK)
  3743. #define DMA_INT_INT12_MASK (0x1000U)
  3744. #define DMA_INT_INT12_SHIFT (12U)
  3745. #define DMA_INT_INT12(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT12_SHIFT)) & DMA_INT_INT12_MASK)
  3746. #define DMA_INT_INT13_MASK (0x2000U)
  3747. #define DMA_INT_INT13_SHIFT (13U)
  3748. #define DMA_INT_INT13(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT13_SHIFT)) & DMA_INT_INT13_MASK)
  3749. #define DMA_INT_INT14_MASK (0x4000U)
  3750. #define DMA_INT_INT14_SHIFT (14U)
  3751. #define DMA_INT_INT14(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT14_SHIFT)) & DMA_INT_INT14_MASK)
  3752. #define DMA_INT_INT15_MASK (0x8000U)
  3753. #define DMA_INT_INT15_SHIFT (15U)
  3754. #define DMA_INT_INT15(x) (((uint32_t)(((uint32_t)(x)) << DMA_INT_INT15_SHIFT)) & DMA_INT_INT15_MASK)
  3755. /*! @name ERR - Error Register */
  3756. #define DMA_ERR_ERR0_MASK (0x1U)
  3757. #define DMA_ERR_ERR0_SHIFT (0U)
  3758. #define DMA_ERR_ERR0(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR0_SHIFT)) & DMA_ERR_ERR0_MASK)
  3759. #define DMA_ERR_ERR1_MASK (0x2U)
  3760. #define DMA_ERR_ERR1_SHIFT (1U)
  3761. #define DMA_ERR_ERR1(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR1_SHIFT)) & DMA_ERR_ERR1_MASK)
  3762. #define DMA_ERR_ERR2_MASK (0x4U)
  3763. #define DMA_ERR_ERR2_SHIFT (2U)
  3764. #define DMA_ERR_ERR2(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR2_SHIFT)) & DMA_ERR_ERR2_MASK)
  3765. #define DMA_ERR_ERR3_MASK (0x8U)
  3766. #define DMA_ERR_ERR3_SHIFT (3U)
  3767. #define DMA_ERR_ERR3(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR3_SHIFT)) & DMA_ERR_ERR3_MASK)
  3768. #define DMA_ERR_ERR4_MASK (0x10U)
  3769. #define DMA_ERR_ERR4_SHIFT (4U)
  3770. #define DMA_ERR_ERR4(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR4_SHIFT)) & DMA_ERR_ERR4_MASK)
  3771. #define DMA_ERR_ERR5_MASK (0x20U)
  3772. #define DMA_ERR_ERR5_SHIFT (5U)
  3773. #define DMA_ERR_ERR5(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR5_SHIFT)) & DMA_ERR_ERR5_MASK)
  3774. #define DMA_ERR_ERR6_MASK (0x40U)
  3775. #define DMA_ERR_ERR6_SHIFT (6U)
  3776. #define DMA_ERR_ERR6(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR6_SHIFT)) & DMA_ERR_ERR6_MASK)
  3777. #define DMA_ERR_ERR7_MASK (0x80U)
  3778. #define DMA_ERR_ERR7_SHIFT (7U)
  3779. #define DMA_ERR_ERR7(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR7_SHIFT)) & DMA_ERR_ERR7_MASK)
  3780. #define DMA_ERR_ERR8_MASK (0x100U)
  3781. #define DMA_ERR_ERR8_SHIFT (8U)
  3782. #define DMA_ERR_ERR8(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR8_SHIFT)) & DMA_ERR_ERR8_MASK)
  3783. #define DMA_ERR_ERR9_MASK (0x200U)
  3784. #define DMA_ERR_ERR9_SHIFT (9U)
  3785. #define DMA_ERR_ERR9(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR9_SHIFT)) & DMA_ERR_ERR9_MASK)
  3786. #define DMA_ERR_ERR10_MASK (0x400U)
  3787. #define DMA_ERR_ERR10_SHIFT (10U)
  3788. #define DMA_ERR_ERR10(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR10_SHIFT)) & DMA_ERR_ERR10_MASK)
  3789. #define DMA_ERR_ERR11_MASK (0x800U)
  3790. #define DMA_ERR_ERR11_SHIFT (11U)
  3791. #define DMA_ERR_ERR11(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR11_SHIFT)) & DMA_ERR_ERR11_MASK)
  3792. #define DMA_ERR_ERR12_MASK (0x1000U)
  3793. #define DMA_ERR_ERR12_SHIFT (12U)
  3794. #define DMA_ERR_ERR12(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR12_SHIFT)) & DMA_ERR_ERR12_MASK)
  3795. #define DMA_ERR_ERR13_MASK (0x2000U)
  3796. #define DMA_ERR_ERR13_SHIFT (13U)
  3797. #define DMA_ERR_ERR13(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR13_SHIFT)) & DMA_ERR_ERR13_MASK)
  3798. #define DMA_ERR_ERR14_MASK (0x4000U)
  3799. #define DMA_ERR_ERR14_SHIFT (14U)
  3800. #define DMA_ERR_ERR14(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR14_SHIFT)) & DMA_ERR_ERR14_MASK)
  3801. #define DMA_ERR_ERR15_MASK (0x8000U)
  3802. #define DMA_ERR_ERR15_SHIFT (15U)
  3803. #define DMA_ERR_ERR15(x) (((uint32_t)(((uint32_t)(x)) << DMA_ERR_ERR15_SHIFT)) & DMA_ERR_ERR15_MASK)
  3804. /*! @name HRS - Hardware Request Status Register */
  3805. #define DMA_HRS_HRS0_MASK (0x1U)
  3806. #define DMA_HRS_HRS0_SHIFT (0U)
  3807. #define DMA_HRS_HRS0(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS0_SHIFT)) & DMA_HRS_HRS0_MASK)
  3808. #define DMA_HRS_HRS1_MASK (0x2U)
  3809. #define DMA_HRS_HRS1_SHIFT (1U)
  3810. #define DMA_HRS_HRS1(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS1_SHIFT)) & DMA_HRS_HRS1_MASK)
  3811. #define DMA_HRS_HRS2_MASK (0x4U)
  3812. #define DMA_HRS_HRS2_SHIFT (2U)
  3813. #define DMA_HRS_HRS2(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS2_SHIFT)) & DMA_HRS_HRS2_MASK)
  3814. #define DMA_HRS_HRS3_MASK (0x8U)
  3815. #define DMA_HRS_HRS3_SHIFT (3U)
  3816. #define DMA_HRS_HRS3(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS3_SHIFT)) & DMA_HRS_HRS3_MASK)
  3817. #define DMA_HRS_HRS4_MASK (0x10U)
  3818. #define DMA_HRS_HRS4_SHIFT (4U)
  3819. #define DMA_HRS_HRS4(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS4_SHIFT)) & DMA_HRS_HRS4_MASK)
  3820. #define DMA_HRS_HRS5_MASK (0x20U)
  3821. #define DMA_HRS_HRS5_SHIFT (5U)
  3822. #define DMA_HRS_HRS5(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS5_SHIFT)) & DMA_HRS_HRS5_MASK)
  3823. #define DMA_HRS_HRS6_MASK (0x40U)
  3824. #define DMA_HRS_HRS6_SHIFT (6U)
  3825. #define DMA_HRS_HRS6(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS6_SHIFT)) & DMA_HRS_HRS6_MASK)
  3826. #define DMA_HRS_HRS7_MASK (0x80U)
  3827. #define DMA_HRS_HRS7_SHIFT (7U)
  3828. #define DMA_HRS_HRS7(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS7_SHIFT)) & DMA_HRS_HRS7_MASK)
  3829. #define DMA_HRS_HRS8_MASK (0x100U)
  3830. #define DMA_HRS_HRS8_SHIFT (8U)
  3831. #define DMA_HRS_HRS8(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS8_SHIFT)) & DMA_HRS_HRS8_MASK)
  3832. #define DMA_HRS_HRS9_MASK (0x200U)
  3833. #define DMA_HRS_HRS9_SHIFT (9U)
  3834. #define DMA_HRS_HRS9(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS9_SHIFT)) & DMA_HRS_HRS9_MASK)
  3835. #define DMA_HRS_HRS10_MASK (0x400U)
  3836. #define DMA_HRS_HRS10_SHIFT (10U)
  3837. #define DMA_HRS_HRS10(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS10_SHIFT)) & DMA_HRS_HRS10_MASK)
  3838. #define DMA_HRS_HRS11_MASK (0x800U)
  3839. #define DMA_HRS_HRS11_SHIFT (11U)
  3840. #define DMA_HRS_HRS11(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS11_SHIFT)) & DMA_HRS_HRS11_MASK)
  3841. #define DMA_HRS_HRS12_MASK (0x1000U)
  3842. #define DMA_HRS_HRS12_SHIFT (12U)
  3843. #define DMA_HRS_HRS12(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS12_SHIFT)) & DMA_HRS_HRS12_MASK)
  3844. #define DMA_HRS_HRS13_MASK (0x2000U)
  3845. #define DMA_HRS_HRS13_SHIFT (13U)
  3846. #define DMA_HRS_HRS13(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS13_SHIFT)) & DMA_HRS_HRS13_MASK)
  3847. #define DMA_HRS_HRS14_MASK (0x4000U)
  3848. #define DMA_HRS_HRS14_SHIFT (14U)
  3849. #define DMA_HRS_HRS14(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS14_SHIFT)) & DMA_HRS_HRS14_MASK)
  3850. #define DMA_HRS_HRS15_MASK (0x8000U)
  3851. #define DMA_HRS_HRS15_SHIFT (15U)
  3852. #define DMA_HRS_HRS15(x) (((uint32_t)(((uint32_t)(x)) << DMA_HRS_HRS15_SHIFT)) & DMA_HRS_HRS15_MASK)
  3853. /*! @name DCHPRI3 - Channel n Priority Register */
  3854. #define DMA_DCHPRI3_CHPRI_MASK (0xFU)
  3855. #define DMA_DCHPRI3_CHPRI_SHIFT (0U)
  3856. #define DMA_DCHPRI3_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_CHPRI_SHIFT)) & DMA_DCHPRI3_CHPRI_MASK)
  3857. #define DMA_DCHPRI3_DPA_MASK (0x40U)
  3858. #define DMA_DCHPRI3_DPA_SHIFT (6U)
  3859. #define DMA_DCHPRI3_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_DPA_SHIFT)) & DMA_DCHPRI3_DPA_MASK)
  3860. #define DMA_DCHPRI3_ECP_MASK (0x80U)
  3861. #define DMA_DCHPRI3_ECP_SHIFT (7U)
  3862. #define DMA_DCHPRI3_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI3_ECP_SHIFT)) & DMA_DCHPRI3_ECP_MASK)
  3863. /*! @name DCHPRI2 - Channel n Priority Register */
  3864. #define DMA_DCHPRI2_CHPRI_MASK (0xFU)
  3865. #define DMA_DCHPRI2_CHPRI_SHIFT (0U)
  3866. #define DMA_DCHPRI2_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_CHPRI_SHIFT)) & DMA_DCHPRI2_CHPRI_MASK)
  3867. #define DMA_DCHPRI2_DPA_MASK (0x40U)
  3868. #define DMA_DCHPRI2_DPA_SHIFT (6U)
  3869. #define DMA_DCHPRI2_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_DPA_SHIFT)) & DMA_DCHPRI2_DPA_MASK)
  3870. #define DMA_DCHPRI2_ECP_MASK (0x80U)
  3871. #define DMA_DCHPRI2_ECP_SHIFT (7U)
  3872. #define DMA_DCHPRI2_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI2_ECP_SHIFT)) & DMA_DCHPRI2_ECP_MASK)
  3873. /*! @name DCHPRI1 - Channel n Priority Register */
  3874. #define DMA_DCHPRI1_CHPRI_MASK (0xFU)
  3875. #define DMA_DCHPRI1_CHPRI_SHIFT (0U)
  3876. #define DMA_DCHPRI1_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_CHPRI_SHIFT)) & DMA_DCHPRI1_CHPRI_MASK)
  3877. #define DMA_DCHPRI1_DPA_MASK (0x40U)
  3878. #define DMA_DCHPRI1_DPA_SHIFT (6U)
  3879. #define DMA_DCHPRI1_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_DPA_SHIFT)) & DMA_DCHPRI1_DPA_MASK)
  3880. #define DMA_DCHPRI1_ECP_MASK (0x80U)
  3881. #define DMA_DCHPRI1_ECP_SHIFT (7U)
  3882. #define DMA_DCHPRI1_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI1_ECP_SHIFT)) & DMA_DCHPRI1_ECP_MASK)
  3883. /*! @name DCHPRI0 - Channel n Priority Register */
  3884. #define DMA_DCHPRI0_CHPRI_MASK (0xFU)
  3885. #define DMA_DCHPRI0_CHPRI_SHIFT (0U)
  3886. #define DMA_DCHPRI0_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_CHPRI_SHIFT)) & DMA_DCHPRI0_CHPRI_MASK)
  3887. #define DMA_DCHPRI0_DPA_MASK (0x40U)
  3888. #define DMA_DCHPRI0_DPA_SHIFT (6U)
  3889. #define DMA_DCHPRI0_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_DPA_SHIFT)) & DMA_DCHPRI0_DPA_MASK)
  3890. #define DMA_DCHPRI0_ECP_MASK (0x80U)
  3891. #define DMA_DCHPRI0_ECP_SHIFT (7U)
  3892. #define DMA_DCHPRI0_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI0_ECP_SHIFT)) & DMA_DCHPRI0_ECP_MASK)
  3893. /*! @name DCHPRI7 - Channel n Priority Register */
  3894. #define DMA_DCHPRI7_CHPRI_MASK (0xFU)
  3895. #define DMA_DCHPRI7_CHPRI_SHIFT (0U)
  3896. #define DMA_DCHPRI7_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_CHPRI_SHIFT)) & DMA_DCHPRI7_CHPRI_MASK)
  3897. #define DMA_DCHPRI7_DPA_MASK (0x40U)
  3898. #define DMA_DCHPRI7_DPA_SHIFT (6U)
  3899. #define DMA_DCHPRI7_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_DPA_SHIFT)) & DMA_DCHPRI7_DPA_MASK)
  3900. #define DMA_DCHPRI7_ECP_MASK (0x80U)
  3901. #define DMA_DCHPRI7_ECP_SHIFT (7U)
  3902. #define DMA_DCHPRI7_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI7_ECP_SHIFT)) & DMA_DCHPRI7_ECP_MASK)
  3903. /*! @name DCHPRI6 - Channel n Priority Register */
  3904. #define DMA_DCHPRI6_CHPRI_MASK (0xFU)
  3905. #define DMA_DCHPRI6_CHPRI_SHIFT (0U)
  3906. #define DMA_DCHPRI6_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_CHPRI_SHIFT)) & DMA_DCHPRI6_CHPRI_MASK)
  3907. #define DMA_DCHPRI6_DPA_MASK (0x40U)
  3908. #define DMA_DCHPRI6_DPA_SHIFT (6U)
  3909. #define DMA_DCHPRI6_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_DPA_SHIFT)) & DMA_DCHPRI6_DPA_MASK)
  3910. #define DMA_DCHPRI6_ECP_MASK (0x80U)
  3911. #define DMA_DCHPRI6_ECP_SHIFT (7U)
  3912. #define DMA_DCHPRI6_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI6_ECP_SHIFT)) & DMA_DCHPRI6_ECP_MASK)
  3913. /*! @name DCHPRI5 - Channel n Priority Register */
  3914. #define DMA_DCHPRI5_CHPRI_MASK (0xFU)
  3915. #define DMA_DCHPRI5_CHPRI_SHIFT (0U)
  3916. #define DMA_DCHPRI5_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_CHPRI_SHIFT)) & DMA_DCHPRI5_CHPRI_MASK)
  3917. #define DMA_DCHPRI5_DPA_MASK (0x40U)
  3918. #define DMA_DCHPRI5_DPA_SHIFT (6U)
  3919. #define DMA_DCHPRI5_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_DPA_SHIFT)) & DMA_DCHPRI5_DPA_MASK)
  3920. #define DMA_DCHPRI5_ECP_MASK (0x80U)
  3921. #define DMA_DCHPRI5_ECP_SHIFT (7U)
  3922. #define DMA_DCHPRI5_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI5_ECP_SHIFT)) & DMA_DCHPRI5_ECP_MASK)
  3923. /*! @name DCHPRI4 - Channel n Priority Register */
  3924. #define DMA_DCHPRI4_CHPRI_MASK (0xFU)
  3925. #define DMA_DCHPRI4_CHPRI_SHIFT (0U)
  3926. #define DMA_DCHPRI4_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_CHPRI_SHIFT)) & DMA_DCHPRI4_CHPRI_MASK)
  3927. #define DMA_DCHPRI4_DPA_MASK (0x40U)
  3928. #define DMA_DCHPRI4_DPA_SHIFT (6U)
  3929. #define DMA_DCHPRI4_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_DPA_SHIFT)) & DMA_DCHPRI4_DPA_MASK)
  3930. #define DMA_DCHPRI4_ECP_MASK (0x80U)
  3931. #define DMA_DCHPRI4_ECP_SHIFT (7U)
  3932. #define DMA_DCHPRI4_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI4_ECP_SHIFT)) & DMA_DCHPRI4_ECP_MASK)
  3933. /*! @name DCHPRI11 - Channel n Priority Register */
  3934. #define DMA_DCHPRI11_CHPRI_MASK (0xFU)
  3935. #define DMA_DCHPRI11_CHPRI_SHIFT (0U)
  3936. #define DMA_DCHPRI11_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_CHPRI_SHIFT)) & DMA_DCHPRI11_CHPRI_MASK)
  3937. #define DMA_DCHPRI11_DPA_MASK (0x40U)
  3938. #define DMA_DCHPRI11_DPA_SHIFT (6U)
  3939. #define DMA_DCHPRI11_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_DPA_SHIFT)) & DMA_DCHPRI11_DPA_MASK)
  3940. #define DMA_DCHPRI11_ECP_MASK (0x80U)
  3941. #define DMA_DCHPRI11_ECP_SHIFT (7U)
  3942. #define DMA_DCHPRI11_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI11_ECP_SHIFT)) & DMA_DCHPRI11_ECP_MASK)
  3943. /*! @name DCHPRI10 - Channel n Priority Register */
  3944. #define DMA_DCHPRI10_CHPRI_MASK (0xFU)
  3945. #define DMA_DCHPRI10_CHPRI_SHIFT (0U)
  3946. #define DMA_DCHPRI10_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_CHPRI_SHIFT)) & DMA_DCHPRI10_CHPRI_MASK)
  3947. #define DMA_DCHPRI10_DPA_MASK (0x40U)
  3948. #define DMA_DCHPRI10_DPA_SHIFT (6U)
  3949. #define DMA_DCHPRI10_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_DPA_SHIFT)) & DMA_DCHPRI10_DPA_MASK)
  3950. #define DMA_DCHPRI10_ECP_MASK (0x80U)
  3951. #define DMA_DCHPRI10_ECP_SHIFT (7U)
  3952. #define DMA_DCHPRI10_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI10_ECP_SHIFT)) & DMA_DCHPRI10_ECP_MASK)
  3953. /*! @name DCHPRI9 - Channel n Priority Register */
  3954. #define DMA_DCHPRI9_CHPRI_MASK (0xFU)
  3955. #define DMA_DCHPRI9_CHPRI_SHIFT (0U)
  3956. #define DMA_DCHPRI9_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_CHPRI_SHIFT)) & DMA_DCHPRI9_CHPRI_MASK)
  3957. #define DMA_DCHPRI9_DPA_MASK (0x40U)
  3958. #define DMA_DCHPRI9_DPA_SHIFT (6U)
  3959. #define DMA_DCHPRI9_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_DPA_SHIFT)) & DMA_DCHPRI9_DPA_MASK)
  3960. #define DMA_DCHPRI9_ECP_MASK (0x80U)
  3961. #define DMA_DCHPRI9_ECP_SHIFT (7U)
  3962. #define DMA_DCHPRI9_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI9_ECP_SHIFT)) & DMA_DCHPRI9_ECP_MASK)
  3963. /*! @name DCHPRI8 - Channel n Priority Register */
  3964. #define DMA_DCHPRI8_CHPRI_MASK (0xFU)
  3965. #define DMA_DCHPRI8_CHPRI_SHIFT (0U)
  3966. #define DMA_DCHPRI8_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_CHPRI_SHIFT)) & DMA_DCHPRI8_CHPRI_MASK)
  3967. #define DMA_DCHPRI8_DPA_MASK (0x40U)
  3968. #define DMA_DCHPRI8_DPA_SHIFT (6U)
  3969. #define DMA_DCHPRI8_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_DPA_SHIFT)) & DMA_DCHPRI8_DPA_MASK)
  3970. #define DMA_DCHPRI8_ECP_MASK (0x80U)
  3971. #define DMA_DCHPRI8_ECP_SHIFT (7U)
  3972. #define DMA_DCHPRI8_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI8_ECP_SHIFT)) & DMA_DCHPRI8_ECP_MASK)
  3973. /*! @name DCHPRI15 - Channel n Priority Register */
  3974. #define DMA_DCHPRI15_CHPRI_MASK (0xFU)
  3975. #define DMA_DCHPRI15_CHPRI_SHIFT (0U)
  3976. #define DMA_DCHPRI15_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_CHPRI_SHIFT)) & DMA_DCHPRI15_CHPRI_MASK)
  3977. #define DMA_DCHPRI15_DPA_MASK (0x40U)
  3978. #define DMA_DCHPRI15_DPA_SHIFT (6U)
  3979. #define DMA_DCHPRI15_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_DPA_SHIFT)) & DMA_DCHPRI15_DPA_MASK)
  3980. #define DMA_DCHPRI15_ECP_MASK (0x80U)
  3981. #define DMA_DCHPRI15_ECP_SHIFT (7U)
  3982. #define DMA_DCHPRI15_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI15_ECP_SHIFT)) & DMA_DCHPRI15_ECP_MASK)
  3983. /*! @name DCHPRI14 - Channel n Priority Register */
  3984. #define DMA_DCHPRI14_CHPRI_MASK (0xFU)
  3985. #define DMA_DCHPRI14_CHPRI_SHIFT (0U)
  3986. #define DMA_DCHPRI14_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_CHPRI_SHIFT)) & DMA_DCHPRI14_CHPRI_MASK)
  3987. #define DMA_DCHPRI14_DPA_MASK (0x40U)
  3988. #define DMA_DCHPRI14_DPA_SHIFT (6U)
  3989. #define DMA_DCHPRI14_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_DPA_SHIFT)) & DMA_DCHPRI14_DPA_MASK)
  3990. #define DMA_DCHPRI14_ECP_MASK (0x80U)
  3991. #define DMA_DCHPRI14_ECP_SHIFT (7U)
  3992. #define DMA_DCHPRI14_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI14_ECP_SHIFT)) & DMA_DCHPRI14_ECP_MASK)
  3993. /*! @name DCHPRI13 - Channel n Priority Register */
  3994. #define DMA_DCHPRI13_CHPRI_MASK (0xFU)
  3995. #define DMA_DCHPRI13_CHPRI_SHIFT (0U)
  3996. #define DMA_DCHPRI13_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_CHPRI_SHIFT)) & DMA_DCHPRI13_CHPRI_MASK)
  3997. #define DMA_DCHPRI13_DPA_MASK (0x40U)
  3998. #define DMA_DCHPRI13_DPA_SHIFT (6U)
  3999. #define DMA_DCHPRI13_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_DPA_SHIFT)) & DMA_DCHPRI13_DPA_MASK)
  4000. #define DMA_DCHPRI13_ECP_MASK (0x80U)
  4001. #define DMA_DCHPRI13_ECP_SHIFT (7U)
  4002. #define DMA_DCHPRI13_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI13_ECP_SHIFT)) & DMA_DCHPRI13_ECP_MASK)
  4003. /*! @name DCHPRI12 - Channel n Priority Register */
  4004. #define DMA_DCHPRI12_CHPRI_MASK (0xFU)
  4005. #define DMA_DCHPRI12_CHPRI_SHIFT (0U)
  4006. #define DMA_DCHPRI12_CHPRI(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_CHPRI_SHIFT)) & DMA_DCHPRI12_CHPRI_MASK)
  4007. #define DMA_DCHPRI12_DPA_MASK (0x40U)
  4008. #define DMA_DCHPRI12_DPA_SHIFT (6U)
  4009. #define DMA_DCHPRI12_DPA(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_DPA_SHIFT)) & DMA_DCHPRI12_DPA_MASK)
  4010. #define DMA_DCHPRI12_ECP_MASK (0x80U)
  4011. #define DMA_DCHPRI12_ECP_SHIFT (7U)
  4012. #define DMA_DCHPRI12_ECP(x) (((uint8_t)(((uint8_t)(x)) << DMA_DCHPRI12_ECP_SHIFT)) & DMA_DCHPRI12_ECP_MASK)
  4013. /*! @name SADDR - TCD Source Address */
  4014. #define DMA_SADDR_SADDR_MASK (0xFFFFFFFFU)
  4015. #define DMA_SADDR_SADDR_SHIFT (0U)
  4016. #define DMA_SADDR_SADDR(x) (((uint32_t)(((uint32_t)(x)) << DMA_SADDR_SADDR_SHIFT)) & DMA_SADDR_SADDR_MASK)
  4017. /* The count of DMA_SADDR */
  4018. #define DMA_SADDR_COUNT (16U)
  4019. /*! @name SOFF - TCD Signed Source Address Offset */
  4020. #define DMA_SOFF_SOFF_MASK (0xFFFFU)
  4021. #define DMA_SOFF_SOFF_SHIFT (0U)
  4022. #define DMA_SOFF_SOFF(x) (((uint16_t)(((uint16_t)(x)) << DMA_SOFF_SOFF_SHIFT)) & DMA_SOFF_SOFF_MASK)
  4023. /* The count of DMA_SOFF */
  4024. #define DMA_SOFF_COUNT (16U)
  4025. /*! @name ATTR - TCD Transfer Attributes */
  4026. #define DMA_ATTR_DSIZE_MASK (0x7U)
  4027. #define DMA_ATTR_DSIZE_SHIFT (0U)
  4028. #define DMA_ATTR_DSIZE(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_DSIZE_SHIFT)) & DMA_ATTR_DSIZE_MASK)
  4029. #define DMA_ATTR_DMOD_MASK (0xF8U)
  4030. #define DMA_ATTR_DMOD_SHIFT (3U)
  4031. #define DMA_ATTR_DMOD(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_DMOD_SHIFT)) & DMA_ATTR_DMOD_MASK)
  4032. #define DMA_ATTR_SSIZE_MASK (0x700U)
  4033. #define DMA_ATTR_SSIZE_SHIFT (8U)
  4034. #define DMA_ATTR_SSIZE(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_SSIZE_SHIFT)) & DMA_ATTR_SSIZE_MASK)
  4035. #define DMA_ATTR_SMOD_MASK (0xF800U)
  4036. #define DMA_ATTR_SMOD_SHIFT (11U)
  4037. #define DMA_ATTR_SMOD(x) (((uint16_t)(((uint16_t)(x)) << DMA_ATTR_SMOD_SHIFT)) & DMA_ATTR_SMOD_MASK)
  4038. /* The count of DMA_ATTR */
  4039. #define DMA_ATTR_COUNT (16U)
  4040. /*! @name NBYTES_MLNO - TCD Minor Byte Count (Minor Loop Disabled) */
  4041. #define DMA_NBYTES_MLNO_NBYTES_MASK (0xFFFFFFFFU)
  4042. #define DMA_NBYTES_MLNO_NBYTES_SHIFT (0U)
  4043. #define DMA_NBYTES_MLNO_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLNO_NBYTES_SHIFT)) & DMA_NBYTES_MLNO_NBYTES_MASK)
  4044. /* The count of DMA_NBYTES_MLNO */
  4045. #define DMA_NBYTES_MLNO_COUNT (16U)
  4046. /*! @name NBYTES_MLOFFNO - TCD Signed Minor Loop Offset (Minor Loop Enabled and Offset Disabled) */
  4047. #define DMA_NBYTES_MLOFFNO_NBYTES_MASK (0x3FFFFFFFU)
  4048. #define DMA_NBYTES_MLOFFNO_NBYTES_SHIFT (0U)
  4049. #define DMA_NBYTES_MLOFFNO_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_NBYTES_SHIFT)) & DMA_NBYTES_MLOFFNO_NBYTES_MASK)
  4050. #define DMA_NBYTES_MLOFFNO_DMLOE_MASK (0x40000000U)
  4051. #define DMA_NBYTES_MLOFFNO_DMLOE_SHIFT (30U)
  4052. #define DMA_NBYTES_MLOFFNO_DMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_DMLOE_SHIFT)) & DMA_NBYTES_MLOFFNO_DMLOE_MASK)
  4053. #define DMA_NBYTES_MLOFFNO_SMLOE_MASK (0x80000000U)
  4054. #define DMA_NBYTES_MLOFFNO_SMLOE_SHIFT (31U)
  4055. #define DMA_NBYTES_MLOFFNO_SMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFNO_SMLOE_SHIFT)) & DMA_NBYTES_MLOFFNO_SMLOE_MASK)
  4056. /* The count of DMA_NBYTES_MLOFFNO */
  4057. #define DMA_NBYTES_MLOFFNO_COUNT (16U)
  4058. /*! @name NBYTES_MLOFFYES - TCD Signed Minor Loop Offset (Minor Loop and Offset Enabled) */
  4059. #define DMA_NBYTES_MLOFFYES_NBYTES_MASK (0x3FFU)
  4060. #define DMA_NBYTES_MLOFFYES_NBYTES_SHIFT (0U)
  4061. #define DMA_NBYTES_MLOFFYES_NBYTES(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_NBYTES_SHIFT)) & DMA_NBYTES_MLOFFYES_NBYTES_MASK)
  4062. #define DMA_NBYTES_MLOFFYES_MLOFF_MASK (0x3FFFFC00U)
  4063. #define DMA_NBYTES_MLOFFYES_MLOFF_SHIFT (10U)
  4064. #define DMA_NBYTES_MLOFFYES_MLOFF(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_MLOFF_SHIFT)) & DMA_NBYTES_MLOFFYES_MLOFF_MASK)
  4065. #define DMA_NBYTES_MLOFFYES_DMLOE_MASK (0x40000000U)
  4066. #define DMA_NBYTES_MLOFFYES_DMLOE_SHIFT (30U)
  4067. #define DMA_NBYTES_MLOFFYES_DMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_DMLOE_SHIFT)) & DMA_NBYTES_MLOFFYES_DMLOE_MASK)
  4068. #define DMA_NBYTES_MLOFFYES_SMLOE_MASK (0x80000000U)
  4069. #define DMA_NBYTES_MLOFFYES_SMLOE_SHIFT (31U)
  4070. #define DMA_NBYTES_MLOFFYES_SMLOE(x) (((uint32_t)(((uint32_t)(x)) << DMA_NBYTES_MLOFFYES_SMLOE_SHIFT)) & DMA_NBYTES_MLOFFYES_SMLOE_MASK)
  4071. /* The count of DMA_NBYTES_MLOFFYES */
  4072. #define DMA_NBYTES_MLOFFYES_COUNT (16U)
  4073. /*! @name SLAST - TCD Last Source Address Adjustment */
  4074. #define DMA_SLAST_SLAST_MASK (0xFFFFFFFFU)
  4075. #define DMA_SLAST_SLAST_SHIFT (0U)
  4076. #define DMA_SLAST_SLAST(x) (((uint32_t)(((uint32_t)(x)) << DMA_SLAST_SLAST_SHIFT)) & DMA_SLAST_SLAST_MASK)
  4077. /* The count of DMA_SLAST */
  4078. #define DMA_SLAST_COUNT (16U)
  4079. /*! @name DADDR - TCD Destination Address */
  4080. #define DMA_DADDR_DADDR_MASK (0xFFFFFFFFU)
  4081. #define DMA_DADDR_DADDR_SHIFT (0U)
  4082. #define DMA_DADDR_DADDR(x) (((uint32_t)(((uint32_t)(x)) << DMA_DADDR_DADDR_SHIFT)) & DMA_DADDR_DADDR_MASK)
  4083. /* The count of DMA_DADDR */
  4084. #define DMA_DADDR_COUNT (16U)
  4085. /*! @name DOFF - TCD Signed Destination Address Offset */
  4086. #define DMA_DOFF_DOFF_MASK (0xFFFFU)
  4087. #define DMA_DOFF_DOFF_SHIFT (0U)
  4088. #define DMA_DOFF_DOFF(x) (((uint16_t)(((uint16_t)(x)) << DMA_DOFF_DOFF_SHIFT)) & DMA_DOFF_DOFF_MASK)
  4089. /* The count of DMA_DOFF */
  4090. #define DMA_DOFF_COUNT (16U)
  4091. /*! @name CITER_ELINKNO - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled) */
  4092. #define DMA_CITER_ELINKNO_CITER_MASK (0x7FFFU)
  4093. #define DMA_CITER_ELINKNO_CITER_SHIFT (0U)
  4094. #define DMA_CITER_ELINKNO_CITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKNO_CITER_SHIFT)) & DMA_CITER_ELINKNO_CITER_MASK)
  4095. #define DMA_CITER_ELINKNO_ELINK_MASK (0x8000U)
  4096. #define DMA_CITER_ELINKNO_ELINK_SHIFT (15U)
  4097. #define DMA_CITER_ELINKNO_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKNO_ELINK_SHIFT)) & DMA_CITER_ELINKNO_ELINK_MASK)
  4098. /* The count of DMA_CITER_ELINKNO */
  4099. #define DMA_CITER_ELINKNO_COUNT (16U)
  4100. /*! @name CITER_ELINKYES - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled) */
  4101. #define DMA_CITER_ELINKYES_CITER_MASK (0x1FFU)
  4102. #define DMA_CITER_ELINKYES_CITER_SHIFT (0U)
  4103. #define DMA_CITER_ELINKYES_CITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_CITER_SHIFT)) & DMA_CITER_ELINKYES_CITER_MASK)
  4104. #define DMA_CITER_ELINKYES_LINKCH_MASK (0x1E00U)
  4105. #define DMA_CITER_ELINKYES_LINKCH_SHIFT (9U)
  4106. #define DMA_CITER_ELINKYES_LINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_LINKCH_SHIFT)) & DMA_CITER_ELINKYES_LINKCH_MASK)
  4107. #define DMA_CITER_ELINKYES_ELINK_MASK (0x8000U)
  4108. #define DMA_CITER_ELINKYES_ELINK_SHIFT (15U)
  4109. #define DMA_CITER_ELINKYES_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CITER_ELINKYES_ELINK_SHIFT)) & DMA_CITER_ELINKYES_ELINK_MASK)
  4110. /* The count of DMA_CITER_ELINKYES */
  4111. #define DMA_CITER_ELINKYES_COUNT (16U)
  4112. /*! @name DLAST_SGA - TCD Last Destination Address Adjustment/Scatter Gather Address */
  4113. #define DMA_DLAST_SGA_DLASTSGA_MASK (0xFFFFFFFFU)
  4114. #define DMA_DLAST_SGA_DLASTSGA_SHIFT (0U)
  4115. #define DMA_DLAST_SGA_DLASTSGA(x) (((uint32_t)(((uint32_t)(x)) << DMA_DLAST_SGA_DLASTSGA_SHIFT)) & DMA_DLAST_SGA_DLASTSGA_MASK)
  4116. /* The count of DMA_DLAST_SGA */
  4117. #define DMA_DLAST_SGA_COUNT (16U)
  4118. /*! @name CSR - TCD Control and Status */
  4119. #define DMA_CSR_START_MASK (0x1U)
  4120. #define DMA_CSR_START_SHIFT (0U)
  4121. #define DMA_CSR_START(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_START_SHIFT)) & DMA_CSR_START_MASK)
  4122. #define DMA_CSR_INTMAJOR_MASK (0x2U)
  4123. #define DMA_CSR_INTMAJOR_SHIFT (1U)
  4124. #define DMA_CSR_INTMAJOR(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_INTMAJOR_SHIFT)) & DMA_CSR_INTMAJOR_MASK)
  4125. #define DMA_CSR_INTHALF_MASK (0x4U)
  4126. #define DMA_CSR_INTHALF_SHIFT (2U)
  4127. #define DMA_CSR_INTHALF(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_INTHALF_SHIFT)) & DMA_CSR_INTHALF_MASK)
  4128. #define DMA_CSR_DREQ_MASK (0x8U)
  4129. #define DMA_CSR_DREQ_SHIFT (3U)
  4130. #define DMA_CSR_DREQ(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_DREQ_SHIFT)) & DMA_CSR_DREQ_MASK)
  4131. #define DMA_CSR_ESG_MASK (0x10U)
  4132. #define DMA_CSR_ESG_SHIFT (4U)
  4133. #define DMA_CSR_ESG(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_ESG_SHIFT)) & DMA_CSR_ESG_MASK)
  4134. #define DMA_CSR_MAJORELINK_MASK (0x20U)
  4135. #define DMA_CSR_MAJORELINK_SHIFT (5U)
  4136. #define DMA_CSR_MAJORELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_MAJORELINK_SHIFT)) & DMA_CSR_MAJORELINK_MASK)
  4137. #define DMA_CSR_ACTIVE_MASK (0x40U)
  4138. #define DMA_CSR_ACTIVE_SHIFT (6U)
  4139. #define DMA_CSR_ACTIVE(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_ACTIVE_SHIFT)) & DMA_CSR_ACTIVE_MASK)
  4140. #define DMA_CSR_DONE_MASK (0x80U)
  4141. #define DMA_CSR_DONE_SHIFT (7U)
  4142. #define DMA_CSR_DONE(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_DONE_SHIFT)) & DMA_CSR_DONE_MASK)
  4143. #define DMA_CSR_MAJORLINKCH_MASK (0xF00U)
  4144. #define DMA_CSR_MAJORLINKCH_SHIFT (8U)
  4145. #define DMA_CSR_MAJORLINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_MAJORLINKCH_SHIFT)) & DMA_CSR_MAJORLINKCH_MASK)
  4146. #define DMA_CSR_BWC_MASK (0xC000U)
  4147. #define DMA_CSR_BWC_SHIFT (14U)
  4148. #define DMA_CSR_BWC(x) (((uint16_t)(((uint16_t)(x)) << DMA_CSR_BWC_SHIFT)) & DMA_CSR_BWC_MASK)
  4149. /* The count of DMA_CSR */
  4150. #define DMA_CSR_COUNT (16U)
  4151. /*! @name BITER_ELINKNO - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled) */
  4152. #define DMA_BITER_ELINKNO_BITER_MASK (0x7FFFU)
  4153. #define DMA_BITER_ELINKNO_BITER_SHIFT (0U)
  4154. #define DMA_BITER_ELINKNO_BITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKNO_BITER_SHIFT)) & DMA_BITER_ELINKNO_BITER_MASK)
  4155. #define DMA_BITER_ELINKNO_ELINK_MASK (0x8000U)
  4156. #define DMA_BITER_ELINKNO_ELINK_SHIFT (15U)
  4157. #define DMA_BITER_ELINKNO_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKNO_ELINK_SHIFT)) & DMA_BITER_ELINKNO_ELINK_MASK)
  4158. /* The count of DMA_BITER_ELINKNO */
  4159. #define DMA_BITER_ELINKNO_COUNT (16U)
  4160. /*! @name BITER_ELINKYES - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled) */
  4161. #define DMA_BITER_ELINKYES_BITER_MASK (0x1FFU)
  4162. #define DMA_BITER_ELINKYES_BITER_SHIFT (0U)
  4163. #define DMA_BITER_ELINKYES_BITER(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_BITER_SHIFT)) & DMA_BITER_ELINKYES_BITER_MASK)
  4164. #define DMA_BITER_ELINKYES_LINKCH_MASK (0x1E00U)
  4165. #define DMA_BITER_ELINKYES_LINKCH_SHIFT (9U)
  4166. #define DMA_BITER_ELINKYES_LINKCH(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_LINKCH_SHIFT)) & DMA_BITER_ELINKYES_LINKCH_MASK)
  4167. #define DMA_BITER_ELINKYES_ELINK_MASK (0x8000U)
  4168. #define DMA_BITER_ELINKYES_ELINK_SHIFT (15U)
  4169. #define DMA_BITER_ELINKYES_ELINK(x) (((uint16_t)(((uint16_t)(x)) << DMA_BITER_ELINKYES_ELINK_SHIFT)) & DMA_BITER_ELINKYES_ELINK_MASK)
  4170. /* The count of DMA_BITER_ELINKYES */
  4171. #define DMA_BITER_ELINKYES_COUNT (16U)
  4172. /*!
  4173. * @}
  4174. */ /* end of group DMA_Register_Masks */
  4175. /* DMA - Peripheral instance base addresses */
  4176. /** Peripheral DMA base address */
  4177. #define DMA_BASE (0x40008000u)
  4178. /** Peripheral DMA base pointer */
  4179. #define DMA0 ((DMA_Type *)DMA_BASE)
  4180. /** Array initializer of DMA peripheral base addresses */
  4181. #define DMA_BASE_ADDRS { DMA_BASE }
  4182. /** Array initializer of DMA peripheral base pointers */
  4183. #define DMA_BASE_PTRS { DMA0 }
  4184. /** Interrupt vectors for the DMA peripheral type */
  4185. #define DMA_CHN_IRQS { { DMA0_IRQn, DMA1_IRQn, DMA2_IRQn, DMA3_IRQn, DMA4_IRQn, DMA5_IRQn, DMA6_IRQn, DMA7_IRQn, DMA8_IRQn, DMA9_IRQn, DMA10_IRQn, DMA11_IRQn, DMA12_IRQn, DMA13_IRQn, DMA14_IRQn, DMA15_IRQn } }
  4186. #define DMA_ERROR_IRQS { DMA_Error_IRQn }
  4187. /*!
  4188. * @}
  4189. */ /* end of group DMA_Peripheral_Access_Layer */
  4190. /* ----------------------------------------------------------------------------
  4191. -- DMAMUX Peripheral Access Layer
  4192. ---------------------------------------------------------------------------- */
  4193. /*!
  4194. * @addtogroup DMAMUX_Peripheral_Access_Layer DMAMUX Peripheral Access Layer
  4195. * @{
  4196. */
  4197. /** DMAMUX - Register Layout Typedef */
  4198. typedef struct {
  4199. __IO uint8_t CHCFG[16]; /**< Channel Configuration register, array offset: 0x0, array step: 0x1 */
  4200. } DMAMUX_Type;
  4201. /* ----------------------------------------------------------------------------
  4202. -- DMAMUX Register Masks
  4203. ---------------------------------------------------------------------------- */
  4204. /*!
  4205. * @addtogroup DMAMUX_Register_Masks DMAMUX Register Masks
  4206. * @{
  4207. */
  4208. /*! @name CHCFG - Channel Configuration register */
  4209. #define DMAMUX_CHCFG_SOURCE_MASK (0x3FU)
  4210. #define DMAMUX_CHCFG_SOURCE_SHIFT (0U)
  4211. #define DMAMUX_CHCFG_SOURCE(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_SOURCE_SHIFT)) & DMAMUX_CHCFG_SOURCE_MASK)
  4212. #define DMAMUX_CHCFG_TRIG_MASK (0x40U)
  4213. #define DMAMUX_CHCFG_TRIG_SHIFT (6U)
  4214. #define DMAMUX_CHCFG_TRIG(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_TRIG_SHIFT)) & DMAMUX_CHCFG_TRIG_MASK)
  4215. #define DMAMUX_CHCFG_ENBL_MASK (0x80U)
  4216. #define DMAMUX_CHCFG_ENBL_SHIFT (7U)
  4217. #define DMAMUX_CHCFG_ENBL(x) (((uint8_t)(((uint8_t)(x)) << DMAMUX_CHCFG_ENBL_SHIFT)) & DMAMUX_CHCFG_ENBL_MASK)
  4218. /* The count of DMAMUX_CHCFG */
  4219. #define DMAMUX_CHCFG_COUNT (16U)
  4220. /*!
  4221. * @}
  4222. */ /* end of group DMAMUX_Register_Masks */
  4223. /* DMAMUX - Peripheral instance base addresses */
  4224. /** Peripheral DMAMUX base address */
  4225. #define DMAMUX_BASE (0x40021000u)
  4226. /** Peripheral DMAMUX base pointer */
  4227. #define DMAMUX ((DMAMUX_Type *)DMAMUX_BASE)
  4228. /** Array initializer of DMAMUX peripheral base addresses */
  4229. #define DMAMUX_BASE_ADDRS { DMAMUX_BASE }
  4230. /** Array initializer of DMAMUX peripheral base pointers */
  4231. #define DMAMUX_BASE_PTRS { DMAMUX }
  4232. /*!
  4233. * @}
  4234. */ /* end of group DMAMUX_Peripheral_Access_Layer */
  4235. /* ----------------------------------------------------------------------------
  4236. -- EWM Peripheral Access Layer
  4237. ---------------------------------------------------------------------------- */
  4238. /*!
  4239. * @addtogroup EWM_Peripheral_Access_Layer EWM Peripheral Access Layer
  4240. * @{
  4241. */
  4242. /** EWM - Register Layout Typedef */
  4243. typedef struct {
  4244. __IO uint8_t CTRL; /**< Control Register, offset: 0x0 */
  4245. __O uint8_t SERV; /**< Service Register, offset: 0x1 */
  4246. __IO uint8_t CMPL; /**< Compare Low Register, offset: 0x2 */
  4247. __IO uint8_t CMPH; /**< Compare High Register, offset: 0x3 */
  4248. } EWM_Type;
  4249. /* ----------------------------------------------------------------------------
  4250. -- EWM Register Masks
  4251. ---------------------------------------------------------------------------- */
  4252. /*!
  4253. * @addtogroup EWM_Register_Masks EWM Register Masks
  4254. * @{
  4255. */
  4256. /*! @name CTRL - Control Register */
  4257. #define EWM_CTRL_EWMEN_MASK (0x1U)
  4258. #define EWM_CTRL_EWMEN_SHIFT (0U)
  4259. #define EWM_CTRL_EWMEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_EWMEN_SHIFT)) & EWM_CTRL_EWMEN_MASK)
  4260. #define EWM_CTRL_ASSIN_MASK (0x2U)
  4261. #define EWM_CTRL_ASSIN_SHIFT (1U)
  4262. #define EWM_CTRL_ASSIN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_ASSIN_SHIFT)) & EWM_CTRL_ASSIN_MASK)
  4263. #define EWM_CTRL_INEN_MASK (0x4U)
  4264. #define EWM_CTRL_INEN_SHIFT (2U)
  4265. #define EWM_CTRL_INEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_INEN_SHIFT)) & EWM_CTRL_INEN_MASK)
  4266. #define EWM_CTRL_INTEN_MASK (0x8U)
  4267. #define EWM_CTRL_INTEN_SHIFT (3U)
  4268. #define EWM_CTRL_INTEN(x) (((uint8_t)(((uint8_t)(x)) << EWM_CTRL_INTEN_SHIFT)) & EWM_CTRL_INTEN_MASK)
  4269. /*! @name SERV - Service Register */
  4270. #define EWM_SERV_SERVICE_MASK (0xFFU)
  4271. #define EWM_SERV_SERVICE_SHIFT (0U)
  4272. #define EWM_SERV_SERVICE(x) (((uint8_t)(((uint8_t)(x)) << EWM_SERV_SERVICE_SHIFT)) & EWM_SERV_SERVICE_MASK)
  4273. /*! @name CMPL - Compare Low Register */
  4274. #define EWM_CMPL_COMPAREL_MASK (0xFFU)
  4275. #define EWM_CMPL_COMPAREL_SHIFT (0U)
  4276. #define EWM_CMPL_COMPAREL(x) (((uint8_t)(((uint8_t)(x)) << EWM_CMPL_COMPAREL_SHIFT)) & EWM_CMPL_COMPAREL_MASK)
  4277. /*! @name CMPH - Compare High Register */
  4278. #define EWM_CMPH_COMPAREH_MASK (0xFFU)
  4279. #define EWM_CMPH_COMPAREH_SHIFT (0U)
  4280. #define EWM_CMPH_COMPAREH(x) (((uint8_t)(((uint8_t)(x)) << EWM_CMPH_COMPAREH_SHIFT)) & EWM_CMPH_COMPAREH_MASK)
  4281. /*!
  4282. * @}
  4283. */ /* end of group EWM_Register_Masks */
  4284. /* EWM - Peripheral instance base addresses */
  4285. /** Peripheral EWM base address */
  4286. #define EWM_BASE (0x40061000u)
  4287. /** Peripheral EWM base pointer */
  4288. #define EWM ((EWM_Type *)EWM_BASE)
  4289. /** Array initializer of EWM peripheral base addresses */
  4290. #define EWM_BASE_ADDRS { EWM_BASE }
  4291. /** Array initializer of EWM peripheral base pointers */
  4292. #define EWM_BASE_PTRS { EWM }
  4293. /** Interrupt vectors for the EWM peripheral type */
  4294. #define EWM_IRQS { WDOG_EWM_IRQn }
  4295. /*!
  4296. * @}
  4297. */ /* end of group EWM_Peripheral_Access_Layer */
  4298. /* ----------------------------------------------------------------------------
  4299. -- FB Peripheral Access Layer
  4300. ---------------------------------------------------------------------------- */
  4301. /*!
  4302. * @addtogroup FB_Peripheral_Access_Layer FB Peripheral Access Layer
  4303. * @{
  4304. */
  4305. /** FB - Register Layout Typedef */
  4306. typedef struct {
  4307. struct { /* offset: 0x0, array step: 0xC */
  4308. __IO uint32_t CSAR; /**< Chip Select Address Register, array offset: 0x0, array step: 0xC */
  4309. __IO uint32_t CSMR; /**< Chip Select Mask Register, array offset: 0x4, array step: 0xC */
  4310. __IO uint32_t CSCR; /**< Chip Select Control Register, array offset: 0x8, array step: 0xC */
  4311. } CS[6];
  4312. uint8_t RESERVED_0[24];
  4313. __IO uint32_t CSPMCR; /**< Chip Select port Multiplexing Control Register, offset: 0x60 */
  4314. } FB_Type;
  4315. /* ----------------------------------------------------------------------------
  4316. -- FB Register Masks
  4317. ---------------------------------------------------------------------------- */
  4318. /*!
  4319. * @addtogroup FB_Register_Masks FB Register Masks
  4320. * @{
  4321. */
  4322. /*! @name CSAR - Chip Select Address Register */
  4323. #define FB_CSAR_BA_MASK (0xFFFF0000U)
  4324. #define FB_CSAR_BA_SHIFT (16U)
  4325. #define FB_CSAR_BA(x) (((uint32_t)(((uint32_t)(x)) << FB_CSAR_BA_SHIFT)) & FB_CSAR_BA_MASK)
  4326. /* The count of FB_CSAR */
  4327. #define FB_CSAR_COUNT (6U)
  4328. /*! @name CSMR - Chip Select Mask Register */
  4329. #define FB_CSMR_V_MASK (0x1U)
  4330. #define FB_CSMR_V_SHIFT (0U)
  4331. #define FB_CSMR_V(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_V_SHIFT)) & FB_CSMR_V_MASK)
  4332. #define FB_CSMR_WP_MASK (0x100U)
  4333. #define FB_CSMR_WP_SHIFT (8U)
  4334. #define FB_CSMR_WP(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_WP_SHIFT)) & FB_CSMR_WP_MASK)
  4335. #define FB_CSMR_BAM_MASK (0xFFFF0000U)
  4336. #define FB_CSMR_BAM_SHIFT (16U)
  4337. #define FB_CSMR_BAM(x) (((uint32_t)(((uint32_t)(x)) << FB_CSMR_BAM_SHIFT)) & FB_CSMR_BAM_MASK)
  4338. /* The count of FB_CSMR */
  4339. #define FB_CSMR_COUNT (6U)
  4340. /*! @name CSCR - Chip Select Control Register */
  4341. #define FB_CSCR_BSTW_MASK (0x8U)
  4342. #define FB_CSCR_BSTW_SHIFT (3U)
  4343. #define FB_CSCR_BSTW(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BSTW_SHIFT)) & FB_CSCR_BSTW_MASK)
  4344. #define FB_CSCR_BSTR_MASK (0x10U)
  4345. #define FB_CSCR_BSTR_SHIFT (4U)
  4346. #define FB_CSCR_BSTR(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BSTR_SHIFT)) & FB_CSCR_BSTR_MASK)
  4347. #define FB_CSCR_BEM_MASK (0x20U)
  4348. #define FB_CSCR_BEM_SHIFT (5U)
  4349. #define FB_CSCR_BEM(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BEM_SHIFT)) & FB_CSCR_BEM_MASK)
  4350. #define FB_CSCR_PS_MASK (0xC0U)
  4351. #define FB_CSCR_PS_SHIFT (6U)
  4352. #define FB_CSCR_PS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_PS_SHIFT)) & FB_CSCR_PS_MASK)
  4353. #define FB_CSCR_AA_MASK (0x100U)
  4354. #define FB_CSCR_AA_SHIFT (8U)
  4355. #define FB_CSCR_AA(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_AA_SHIFT)) & FB_CSCR_AA_MASK)
  4356. #define FB_CSCR_BLS_MASK (0x200U)
  4357. #define FB_CSCR_BLS_SHIFT (9U)
  4358. #define FB_CSCR_BLS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_BLS_SHIFT)) & FB_CSCR_BLS_MASK)
  4359. #define FB_CSCR_WS_MASK (0xFC00U)
  4360. #define FB_CSCR_WS_SHIFT (10U)
  4361. #define FB_CSCR_WS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_WS_SHIFT)) & FB_CSCR_WS_MASK)
  4362. #define FB_CSCR_WRAH_MASK (0x30000U)
  4363. #define FB_CSCR_WRAH_SHIFT (16U)
  4364. #define FB_CSCR_WRAH(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_WRAH_SHIFT)) & FB_CSCR_WRAH_MASK)
  4365. #define FB_CSCR_RDAH_MASK (0xC0000U)
  4366. #define FB_CSCR_RDAH_SHIFT (18U)
  4367. #define FB_CSCR_RDAH(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_RDAH_SHIFT)) & FB_CSCR_RDAH_MASK)
  4368. #define FB_CSCR_ASET_MASK (0x300000U)
  4369. #define FB_CSCR_ASET_SHIFT (20U)
  4370. #define FB_CSCR_ASET(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_ASET_SHIFT)) & FB_CSCR_ASET_MASK)
  4371. #define FB_CSCR_EXTS_MASK (0x400000U)
  4372. #define FB_CSCR_EXTS_SHIFT (22U)
  4373. #define FB_CSCR_EXTS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_EXTS_SHIFT)) & FB_CSCR_EXTS_MASK)
  4374. #define FB_CSCR_SWSEN_MASK (0x800000U)
  4375. #define FB_CSCR_SWSEN_SHIFT (23U)
  4376. #define FB_CSCR_SWSEN(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_SWSEN_SHIFT)) & FB_CSCR_SWSEN_MASK)
  4377. #define FB_CSCR_SWS_MASK (0xFC000000U)
  4378. #define FB_CSCR_SWS_SHIFT (26U)
  4379. #define FB_CSCR_SWS(x) (((uint32_t)(((uint32_t)(x)) << FB_CSCR_SWS_SHIFT)) & FB_CSCR_SWS_MASK)
  4380. /* The count of FB_CSCR */
  4381. #define FB_CSCR_COUNT (6U)
  4382. /*! @name CSPMCR - Chip Select port Multiplexing Control Register */
  4383. #define FB_CSPMCR_GROUP5_MASK (0xF000U)
  4384. #define FB_CSPMCR_GROUP5_SHIFT (12U)
  4385. #define FB_CSPMCR_GROUP5(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP5_SHIFT)) & FB_CSPMCR_GROUP5_MASK)
  4386. #define FB_CSPMCR_GROUP4_MASK (0xF0000U)
  4387. #define FB_CSPMCR_GROUP4_SHIFT (16U)
  4388. #define FB_CSPMCR_GROUP4(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP4_SHIFT)) & FB_CSPMCR_GROUP4_MASK)
  4389. #define FB_CSPMCR_GROUP3_MASK (0xF00000U)
  4390. #define FB_CSPMCR_GROUP3_SHIFT (20U)
  4391. #define FB_CSPMCR_GROUP3(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP3_SHIFT)) & FB_CSPMCR_GROUP3_MASK)
  4392. #define FB_CSPMCR_GROUP2_MASK (0xF000000U)
  4393. #define FB_CSPMCR_GROUP2_SHIFT (24U)
  4394. #define FB_CSPMCR_GROUP2(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP2_SHIFT)) & FB_CSPMCR_GROUP2_MASK)
  4395. #define FB_CSPMCR_GROUP1_MASK (0xF0000000U)
  4396. #define FB_CSPMCR_GROUP1_SHIFT (28U)
  4397. #define FB_CSPMCR_GROUP1(x) (((uint32_t)(((uint32_t)(x)) << FB_CSPMCR_GROUP1_SHIFT)) & FB_CSPMCR_GROUP1_MASK)
  4398. /*!
  4399. * @}
  4400. */ /* end of group FB_Register_Masks */
  4401. /* FB - Peripheral instance base addresses */
  4402. /** Peripheral FB base address */
  4403. #define FB_BASE (0x4000C000u)
  4404. /** Peripheral FB base pointer */
  4405. #define FB ((FB_Type *)FB_BASE)
  4406. /** Array initializer of FB peripheral base addresses */
  4407. #define FB_BASE_ADDRS { FB_BASE }
  4408. /** Array initializer of FB peripheral base pointers */
  4409. #define FB_BASE_PTRS { FB }
  4410. /*!
  4411. * @}
  4412. */ /* end of group FB_Peripheral_Access_Layer */
  4413. /* ----------------------------------------------------------------------------
  4414. -- FMC Peripheral Access Layer
  4415. ---------------------------------------------------------------------------- */
  4416. /*!
  4417. * @addtogroup FMC_Peripheral_Access_Layer FMC Peripheral Access Layer
  4418. * @{
  4419. */
  4420. /** FMC - Register Layout Typedef */
  4421. typedef struct {
  4422. __IO uint32_t PFAPR; /**< Flash Access Protection Register, offset: 0x0 */
  4423. __IO uint32_t PFB0CR; /**< Flash Bank 0 Control Register, offset: 0x4 */
  4424. __IO uint32_t PFB1CR; /**< Flash Bank 1 Control Register, offset: 0x8 */
  4425. uint8_t RESERVED_0[244];
  4426. __IO uint32_t TAGVDW0S[4]; /**< Cache Tag Storage, array offset: 0x100, array step: 0x4 */
  4427. __IO uint32_t TAGVDW1S[4]; /**< Cache Tag Storage, array offset: 0x110, array step: 0x4 */
  4428. __IO uint32_t TAGVDW2S[4]; /**< Cache Tag Storage, array offset: 0x120, array step: 0x4 */
  4429. __IO uint32_t TAGVDW3S[4]; /**< Cache Tag Storage, array offset: 0x130, array step: 0x4 */
  4430. uint8_t RESERVED_1[192];
  4431. struct { /* offset: 0x200, array step: index*0x20, index2*0x8 */
  4432. __IO uint32_t DATA_U; /**< Cache Data Storage (upper word), array offset: 0x200, array step: index*0x20, index2*0x8 */
  4433. __IO uint32_t DATA_L; /**< Cache Data Storage (lower word), array offset: 0x204, array step: index*0x20, index2*0x8 */
  4434. } SET[4][4];
  4435. } FMC_Type;
  4436. /* ----------------------------------------------------------------------------
  4437. -- FMC Register Masks
  4438. ---------------------------------------------------------------------------- */
  4439. /*!
  4440. * @addtogroup FMC_Register_Masks FMC Register Masks
  4441. * @{
  4442. */
  4443. /*! @name PFAPR - Flash Access Protection Register */
  4444. #define FMC_PFAPR_M0AP_MASK (0x3U)
  4445. #define FMC_PFAPR_M0AP_SHIFT (0U)
  4446. #define FMC_PFAPR_M0AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M0AP_SHIFT)) & FMC_PFAPR_M0AP_MASK)
  4447. #define FMC_PFAPR_M1AP_MASK (0xCU)
  4448. #define FMC_PFAPR_M1AP_SHIFT (2U)
  4449. #define FMC_PFAPR_M1AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M1AP_SHIFT)) & FMC_PFAPR_M1AP_MASK)
  4450. #define FMC_PFAPR_M2AP_MASK (0x30U)
  4451. #define FMC_PFAPR_M2AP_SHIFT (4U)
  4452. #define FMC_PFAPR_M2AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M2AP_SHIFT)) & FMC_PFAPR_M2AP_MASK)
  4453. #define FMC_PFAPR_M3AP_MASK (0xC0U)
  4454. #define FMC_PFAPR_M3AP_SHIFT (6U)
  4455. #define FMC_PFAPR_M3AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M3AP_SHIFT)) & FMC_PFAPR_M3AP_MASK)
  4456. #define FMC_PFAPR_M4AP_MASK (0x300U)
  4457. #define FMC_PFAPR_M4AP_SHIFT (8U)
  4458. #define FMC_PFAPR_M4AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M4AP_SHIFT)) & FMC_PFAPR_M4AP_MASK)
  4459. #define FMC_PFAPR_M5AP_MASK (0xC00U)
  4460. #define FMC_PFAPR_M5AP_SHIFT (10U)
  4461. #define FMC_PFAPR_M5AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M5AP_SHIFT)) & FMC_PFAPR_M5AP_MASK)
  4462. #define FMC_PFAPR_M6AP_MASK (0x3000U)
  4463. #define FMC_PFAPR_M6AP_SHIFT (12U)
  4464. #define FMC_PFAPR_M6AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M6AP_SHIFT)) & FMC_PFAPR_M6AP_MASK)
  4465. #define FMC_PFAPR_M7AP_MASK (0xC000U)
  4466. #define FMC_PFAPR_M7AP_SHIFT (14U)
  4467. #define FMC_PFAPR_M7AP(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M7AP_SHIFT)) & FMC_PFAPR_M7AP_MASK)
  4468. #define FMC_PFAPR_M0PFD_MASK (0x10000U)
  4469. #define FMC_PFAPR_M0PFD_SHIFT (16U)
  4470. #define FMC_PFAPR_M0PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M0PFD_SHIFT)) & FMC_PFAPR_M0PFD_MASK)
  4471. #define FMC_PFAPR_M1PFD_MASK (0x20000U)
  4472. #define FMC_PFAPR_M1PFD_SHIFT (17U)
  4473. #define FMC_PFAPR_M1PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M1PFD_SHIFT)) & FMC_PFAPR_M1PFD_MASK)
  4474. #define FMC_PFAPR_M2PFD_MASK (0x40000U)
  4475. #define FMC_PFAPR_M2PFD_SHIFT (18U)
  4476. #define FMC_PFAPR_M2PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M2PFD_SHIFT)) & FMC_PFAPR_M2PFD_MASK)
  4477. #define FMC_PFAPR_M3PFD_MASK (0x80000U)
  4478. #define FMC_PFAPR_M3PFD_SHIFT (19U)
  4479. #define FMC_PFAPR_M3PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M3PFD_SHIFT)) & FMC_PFAPR_M3PFD_MASK)
  4480. #define FMC_PFAPR_M4PFD_MASK (0x100000U)
  4481. #define FMC_PFAPR_M4PFD_SHIFT (20U)
  4482. #define FMC_PFAPR_M4PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M4PFD_SHIFT)) & FMC_PFAPR_M4PFD_MASK)
  4483. #define FMC_PFAPR_M5PFD_MASK (0x200000U)
  4484. #define FMC_PFAPR_M5PFD_SHIFT (21U)
  4485. #define FMC_PFAPR_M5PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M5PFD_SHIFT)) & FMC_PFAPR_M5PFD_MASK)
  4486. #define FMC_PFAPR_M6PFD_MASK (0x400000U)
  4487. #define FMC_PFAPR_M6PFD_SHIFT (22U)
  4488. #define FMC_PFAPR_M6PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M6PFD_SHIFT)) & FMC_PFAPR_M6PFD_MASK)
  4489. #define FMC_PFAPR_M7PFD_MASK (0x800000U)
  4490. #define FMC_PFAPR_M7PFD_SHIFT (23U)
  4491. #define FMC_PFAPR_M7PFD(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFAPR_M7PFD_SHIFT)) & FMC_PFAPR_M7PFD_MASK)
  4492. /*! @name PFB0CR - Flash Bank 0 Control Register */
  4493. #define FMC_PFB0CR_B0SEBE_MASK (0x1U)
  4494. #define FMC_PFB0CR_B0SEBE_SHIFT (0U)
  4495. #define FMC_PFB0CR_B0SEBE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0SEBE_SHIFT)) & FMC_PFB0CR_B0SEBE_MASK)
  4496. #define FMC_PFB0CR_B0IPE_MASK (0x2U)
  4497. #define FMC_PFB0CR_B0IPE_SHIFT (1U)
  4498. #define FMC_PFB0CR_B0IPE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0IPE_SHIFT)) & FMC_PFB0CR_B0IPE_MASK)
  4499. #define FMC_PFB0CR_B0DPE_MASK (0x4U)
  4500. #define FMC_PFB0CR_B0DPE_SHIFT (2U)
  4501. #define FMC_PFB0CR_B0DPE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0DPE_SHIFT)) & FMC_PFB0CR_B0DPE_MASK)
  4502. #define FMC_PFB0CR_B0ICE_MASK (0x8U)
  4503. #define FMC_PFB0CR_B0ICE_SHIFT (3U)
  4504. #define FMC_PFB0CR_B0ICE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0ICE_SHIFT)) & FMC_PFB0CR_B0ICE_MASK)
  4505. #define FMC_PFB0CR_B0DCE_MASK (0x10U)
  4506. #define FMC_PFB0CR_B0DCE_SHIFT (4U)
  4507. #define FMC_PFB0CR_B0DCE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0DCE_SHIFT)) & FMC_PFB0CR_B0DCE_MASK)
  4508. #define FMC_PFB0CR_CRC_MASK (0xE0U)
  4509. #define FMC_PFB0CR_CRC_SHIFT (5U)
  4510. #define FMC_PFB0CR_CRC(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_CRC_SHIFT)) & FMC_PFB0CR_CRC_MASK)
  4511. #define FMC_PFB0CR_B0MW_MASK (0x60000U)
  4512. #define FMC_PFB0CR_B0MW_SHIFT (17U)
  4513. #define FMC_PFB0CR_B0MW(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0MW_SHIFT)) & FMC_PFB0CR_B0MW_MASK)
  4514. #define FMC_PFB0CR_S_B_INV_MASK (0x80000U)
  4515. #define FMC_PFB0CR_S_B_INV_SHIFT (19U)
  4516. #define FMC_PFB0CR_S_B_INV(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_S_B_INV_SHIFT)) & FMC_PFB0CR_S_B_INV_MASK)
  4517. #define FMC_PFB0CR_CINV_WAY_MASK (0xF00000U)
  4518. #define FMC_PFB0CR_CINV_WAY_SHIFT (20U)
  4519. #define FMC_PFB0CR_CINV_WAY(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_CINV_WAY_SHIFT)) & FMC_PFB0CR_CINV_WAY_MASK)
  4520. #define FMC_PFB0CR_CLCK_WAY_MASK (0xF000000U)
  4521. #define FMC_PFB0CR_CLCK_WAY_SHIFT (24U)
  4522. #define FMC_PFB0CR_CLCK_WAY(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_CLCK_WAY_SHIFT)) & FMC_PFB0CR_CLCK_WAY_MASK)
  4523. #define FMC_PFB0CR_B0RWSC_MASK (0xF0000000U)
  4524. #define FMC_PFB0CR_B0RWSC_SHIFT (28U)
  4525. #define FMC_PFB0CR_B0RWSC(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB0CR_B0RWSC_SHIFT)) & FMC_PFB0CR_B0RWSC_MASK)
  4526. /*! @name PFB1CR - Flash Bank 1 Control Register */
  4527. #define FMC_PFB1CR_B1SEBE_MASK (0x1U)
  4528. #define FMC_PFB1CR_B1SEBE_SHIFT (0U)
  4529. #define FMC_PFB1CR_B1SEBE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB1CR_B1SEBE_SHIFT)) & FMC_PFB1CR_B1SEBE_MASK)
  4530. #define FMC_PFB1CR_B1IPE_MASK (0x2U)
  4531. #define FMC_PFB1CR_B1IPE_SHIFT (1U)
  4532. #define FMC_PFB1CR_B1IPE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB1CR_B1IPE_SHIFT)) & FMC_PFB1CR_B1IPE_MASK)
  4533. #define FMC_PFB1CR_B1DPE_MASK (0x4U)
  4534. #define FMC_PFB1CR_B1DPE_SHIFT (2U)
  4535. #define FMC_PFB1CR_B1DPE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB1CR_B1DPE_SHIFT)) & FMC_PFB1CR_B1DPE_MASK)
  4536. #define FMC_PFB1CR_B1ICE_MASK (0x8U)
  4537. #define FMC_PFB1CR_B1ICE_SHIFT (3U)
  4538. #define FMC_PFB1CR_B1ICE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB1CR_B1ICE_SHIFT)) & FMC_PFB1CR_B1ICE_MASK)
  4539. #define FMC_PFB1CR_B1DCE_MASK (0x10U)
  4540. #define FMC_PFB1CR_B1DCE_SHIFT (4U)
  4541. #define FMC_PFB1CR_B1DCE(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB1CR_B1DCE_SHIFT)) & FMC_PFB1CR_B1DCE_MASK)
  4542. #define FMC_PFB1CR_B1MW_MASK (0x60000U)
  4543. #define FMC_PFB1CR_B1MW_SHIFT (17U)
  4544. #define FMC_PFB1CR_B1MW(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB1CR_B1MW_SHIFT)) & FMC_PFB1CR_B1MW_MASK)
  4545. #define FMC_PFB1CR_B1RWSC_MASK (0xF0000000U)
  4546. #define FMC_PFB1CR_B1RWSC_SHIFT (28U)
  4547. #define FMC_PFB1CR_B1RWSC(x) (((uint32_t)(((uint32_t)(x)) << FMC_PFB1CR_B1RWSC_SHIFT)) & FMC_PFB1CR_B1RWSC_MASK)
  4548. /*! @name TAGVDW0S - Cache Tag Storage */
  4549. #define FMC_TAGVDW0S_valid_MASK (0x1U)
  4550. #define FMC_TAGVDW0S_valid_SHIFT (0U)
  4551. #define FMC_TAGVDW0S_valid(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW0S_valid_SHIFT)) & FMC_TAGVDW0S_valid_MASK)
  4552. #define FMC_TAGVDW0S_tag_MASK (0x7FFE0U)
  4553. #define FMC_TAGVDW0S_tag_SHIFT (5U)
  4554. #define FMC_TAGVDW0S_tag(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW0S_tag_SHIFT)) & FMC_TAGVDW0S_tag_MASK)
  4555. /* The count of FMC_TAGVDW0S */
  4556. #define FMC_TAGVDW0S_COUNT (4U)
  4557. /*! @name TAGVDW1S - Cache Tag Storage */
  4558. #define FMC_TAGVDW1S_valid_MASK (0x1U)
  4559. #define FMC_TAGVDW1S_valid_SHIFT (0U)
  4560. #define FMC_TAGVDW1S_valid(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW1S_valid_SHIFT)) & FMC_TAGVDW1S_valid_MASK)
  4561. #define FMC_TAGVDW1S_tag_MASK (0x7FFE0U)
  4562. #define FMC_TAGVDW1S_tag_SHIFT (5U)
  4563. #define FMC_TAGVDW1S_tag(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW1S_tag_SHIFT)) & FMC_TAGVDW1S_tag_MASK)
  4564. /* The count of FMC_TAGVDW1S */
  4565. #define FMC_TAGVDW1S_COUNT (4U)
  4566. /*! @name TAGVDW2S - Cache Tag Storage */
  4567. #define FMC_TAGVDW2S_valid_MASK (0x1U)
  4568. #define FMC_TAGVDW2S_valid_SHIFT (0U)
  4569. #define FMC_TAGVDW2S_valid(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW2S_valid_SHIFT)) & FMC_TAGVDW2S_valid_MASK)
  4570. #define FMC_TAGVDW2S_tag_MASK (0x7FFE0U)
  4571. #define FMC_TAGVDW2S_tag_SHIFT (5U)
  4572. #define FMC_TAGVDW2S_tag(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW2S_tag_SHIFT)) & FMC_TAGVDW2S_tag_MASK)
  4573. /* The count of FMC_TAGVDW2S */
  4574. #define FMC_TAGVDW2S_COUNT (4U)
  4575. /*! @name TAGVDW3S - Cache Tag Storage */
  4576. #define FMC_TAGVDW3S_valid_MASK (0x1U)
  4577. #define FMC_TAGVDW3S_valid_SHIFT (0U)
  4578. #define FMC_TAGVDW3S_valid(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW3S_valid_SHIFT)) & FMC_TAGVDW3S_valid_MASK)
  4579. #define FMC_TAGVDW3S_tag_MASK (0x7FFE0U)
  4580. #define FMC_TAGVDW3S_tag_SHIFT (5U)
  4581. #define FMC_TAGVDW3S_tag(x) (((uint32_t)(((uint32_t)(x)) << FMC_TAGVDW3S_tag_SHIFT)) & FMC_TAGVDW3S_tag_MASK)
  4582. /* The count of FMC_TAGVDW3S */
  4583. #define FMC_TAGVDW3S_COUNT (4U)
  4584. /*! @name DATA_U - Cache Data Storage (upper word) */
  4585. #define FMC_DATA_U_data_MASK (0xFFFFFFFFU)
  4586. #define FMC_DATA_U_data_SHIFT (0U)
  4587. #define FMC_DATA_U_data(x) (((uint32_t)(((uint32_t)(x)) << FMC_DATA_U_data_SHIFT)) & FMC_DATA_U_data_MASK)
  4588. /* The count of FMC_DATA_U */
  4589. #define FMC_DATA_U_COUNT (4U)
  4590. /* The count of FMC_DATA_U */
  4591. #define FMC_DATA_U_COUNT2 (4U)
  4592. /*! @name DATA_L - Cache Data Storage (lower word) */
  4593. #define FMC_DATA_L_data_MASK (0xFFFFFFFFU)
  4594. #define FMC_DATA_L_data_SHIFT (0U)
  4595. #define FMC_DATA_L_data(x) (((uint32_t)(((uint32_t)(x)) << FMC_DATA_L_data_SHIFT)) & FMC_DATA_L_data_MASK)
  4596. /* The count of FMC_DATA_L */
  4597. #define FMC_DATA_L_COUNT (4U)
  4598. /* The count of FMC_DATA_L */
  4599. #define FMC_DATA_L_COUNT2 (4U)
  4600. /*!
  4601. * @}
  4602. */ /* end of group FMC_Register_Masks */
  4603. /* FMC - Peripheral instance base addresses */
  4604. /** Peripheral FMC base address */
  4605. #define FMC_BASE (0x4001F000u)
  4606. /** Peripheral FMC base pointer */
  4607. #define FMC ((FMC_Type *)FMC_BASE)
  4608. /** Array initializer of FMC peripheral base addresses */
  4609. #define FMC_BASE_ADDRS { FMC_BASE }
  4610. /** Array initializer of FMC peripheral base pointers */
  4611. #define FMC_BASE_PTRS { FMC }
  4612. /*!
  4613. * @}
  4614. */ /* end of group FMC_Peripheral_Access_Layer */
  4615. /* ----------------------------------------------------------------------------
  4616. -- FTFE Peripheral Access Layer
  4617. ---------------------------------------------------------------------------- */
  4618. /*!
  4619. * @addtogroup FTFE_Peripheral_Access_Layer FTFE Peripheral Access Layer
  4620. * @{
  4621. */
  4622. /** FTFE - Register Layout Typedef */
  4623. typedef struct {
  4624. __IO uint8_t FSTAT; /**< Flash Status Register, offset: 0x0 */
  4625. __IO uint8_t FCNFG; /**< Flash Configuration Register, offset: 0x1 */
  4626. __I uint8_t FSEC; /**< Flash Security Register, offset: 0x2 */
  4627. __I uint8_t FOPT; /**< Flash Option Register, offset: 0x3 */
  4628. __IO uint8_t FCCOB3; /**< Flash Common Command Object Registers, offset: 0x4 */
  4629. __IO uint8_t FCCOB2; /**< Flash Common Command Object Registers, offset: 0x5 */
  4630. __IO uint8_t FCCOB1; /**< Flash Common Command Object Registers, offset: 0x6 */
  4631. __IO uint8_t FCCOB0; /**< Flash Common Command Object Registers, offset: 0x7 */
  4632. __IO uint8_t FCCOB7; /**< Flash Common Command Object Registers, offset: 0x8 */
  4633. __IO uint8_t FCCOB6; /**< Flash Common Command Object Registers, offset: 0x9 */
  4634. __IO uint8_t FCCOB5; /**< Flash Common Command Object Registers, offset: 0xA */
  4635. __IO uint8_t FCCOB4; /**< Flash Common Command Object Registers, offset: 0xB */
  4636. __IO uint8_t FCCOBB; /**< Flash Common Command Object Registers, offset: 0xC */
  4637. __IO uint8_t FCCOBA; /**< Flash Common Command Object Registers, offset: 0xD */
  4638. __IO uint8_t FCCOB9; /**< Flash Common Command Object Registers, offset: 0xE */
  4639. __IO uint8_t FCCOB8; /**< Flash Common Command Object Registers, offset: 0xF */
  4640. __IO uint8_t FPROT3; /**< Program Flash Protection Registers, offset: 0x10 */
  4641. __IO uint8_t FPROT2; /**< Program Flash Protection Registers, offset: 0x11 */
  4642. __IO uint8_t FPROT1; /**< Program Flash Protection Registers, offset: 0x12 */
  4643. __IO uint8_t FPROT0; /**< Program Flash Protection Registers, offset: 0x13 */
  4644. } FTFE_Type;
  4645. /* ----------------------------------------------------------------------------
  4646. -- FTFE Register Masks
  4647. ---------------------------------------------------------------------------- */
  4648. /*!
  4649. * @addtogroup FTFE_Register_Masks FTFE Register Masks
  4650. * @{
  4651. */
  4652. /*! @name FSTAT - Flash Status Register */
  4653. #define FTFE_FSTAT_MGSTAT0_MASK (0x1U)
  4654. #define FTFE_FSTAT_MGSTAT0_SHIFT (0U)
  4655. #define FTFE_FSTAT_MGSTAT0(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_MGSTAT0_SHIFT)) & FTFE_FSTAT_MGSTAT0_MASK)
  4656. #define FTFE_FSTAT_FPVIOL_MASK (0x10U)
  4657. #define FTFE_FSTAT_FPVIOL_SHIFT (4U)
  4658. #define FTFE_FSTAT_FPVIOL(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_FPVIOL_SHIFT)) & FTFE_FSTAT_FPVIOL_MASK)
  4659. #define FTFE_FSTAT_ACCERR_MASK (0x20U)
  4660. #define FTFE_FSTAT_ACCERR_SHIFT (5U)
  4661. #define FTFE_FSTAT_ACCERR(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_ACCERR_SHIFT)) & FTFE_FSTAT_ACCERR_MASK)
  4662. #define FTFE_FSTAT_RDCOLERR_MASK (0x40U)
  4663. #define FTFE_FSTAT_RDCOLERR_SHIFT (6U)
  4664. #define FTFE_FSTAT_RDCOLERR(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_RDCOLERR_SHIFT)) & FTFE_FSTAT_RDCOLERR_MASK)
  4665. #define FTFE_FSTAT_CCIF_MASK (0x80U)
  4666. #define FTFE_FSTAT_CCIF_SHIFT (7U)
  4667. #define FTFE_FSTAT_CCIF(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSTAT_CCIF_SHIFT)) & FTFE_FSTAT_CCIF_MASK)
  4668. /*! @name FCNFG - Flash Configuration Register */
  4669. #define FTFE_FCNFG_EEERDY_MASK (0x1U)
  4670. #define FTFE_FCNFG_EEERDY_SHIFT (0U)
  4671. #define FTFE_FCNFG_EEERDY(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_EEERDY_SHIFT)) & FTFE_FCNFG_EEERDY_MASK)
  4672. #define FTFE_FCNFG_RAMRDY_MASK (0x2U)
  4673. #define FTFE_FCNFG_RAMRDY_SHIFT (1U)
  4674. #define FTFE_FCNFG_RAMRDY(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_RAMRDY_SHIFT)) & FTFE_FCNFG_RAMRDY_MASK)
  4675. #define FTFE_FCNFG_PFLSH_MASK (0x4U)
  4676. #define FTFE_FCNFG_PFLSH_SHIFT (2U)
  4677. #define FTFE_FCNFG_PFLSH(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_PFLSH_SHIFT)) & FTFE_FCNFG_PFLSH_MASK)
  4678. #define FTFE_FCNFG_SWAP_MASK (0x8U)
  4679. #define FTFE_FCNFG_SWAP_SHIFT (3U)
  4680. #define FTFE_FCNFG_SWAP(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_SWAP_SHIFT)) & FTFE_FCNFG_SWAP_MASK)
  4681. #define FTFE_FCNFG_ERSSUSP_MASK (0x10U)
  4682. #define FTFE_FCNFG_ERSSUSP_SHIFT (4U)
  4683. #define FTFE_FCNFG_ERSSUSP(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_ERSSUSP_SHIFT)) & FTFE_FCNFG_ERSSUSP_MASK)
  4684. #define FTFE_FCNFG_ERSAREQ_MASK (0x20U)
  4685. #define FTFE_FCNFG_ERSAREQ_SHIFT (5U)
  4686. #define FTFE_FCNFG_ERSAREQ(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_ERSAREQ_SHIFT)) & FTFE_FCNFG_ERSAREQ_MASK)
  4687. #define FTFE_FCNFG_RDCOLLIE_MASK (0x40U)
  4688. #define FTFE_FCNFG_RDCOLLIE_SHIFT (6U)
  4689. #define FTFE_FCNFG_RDCOLLIE(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_RDCOLLIE_SHIFT)) & FTFE_FCNFG_RDCOLLIE_MASK)
  4690. #define FTFE_FCNFG_CCIE_MASK (0x80U)
  4691. #define FTFE_FCNFG_CCIE_SHIFT (7U)
  4692. #define FTFE_FCNFG_CCIE(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCNFG_CCIE_SHIFT)) & FTFE_FCNFG_CCIE_MASK)
  4693. /*! @name FSEC - Flash Security Register */
  4694. #define FTFE_FSEC_SEC_MASK (0x3U)
  4695. #define FTFE_FSEC_SEC_SHIFT (0U)
  4696. #define FTFE_FSEC_SEC(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_SEC_SHIFT)) & FTFE_FSEC_SEC_MASK)
  4697. #define FTFE_FSEC_FSLACC_MASK (0xCU)
  4698. #define FTFE_FSEC_FSLACC_SHIFT (2U)
  4699. #define FTFE_FSEC_FSLACC(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_FSLACC_SHIFT)) & FTFE_FSEC_FSLACC_MASK)
  4700. #define FTFE_FSEC_MEEN_MASK (0x30U)
  4701. #define FTFE_FSEC_MEEN_SHIFT (4U)
  4702. #define FTFE_FSEC_MEEN(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_MEEN_SHIFT)) & FTFE_FSEC_MEEN_MASK)
  4703. #define FTFE_FSEC_KEYEN_MASK (0xC0U)
  4704. #define FTFE_FSEC_KEYEN_SHIFT (6U)
  4705. #define FTFE_FSEC_KEYEN(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FSEC_KEYEN_SHIFT)) & FTFE_FSEC_KEYEN_MASK)
  4706. /*! @name FOPT - Flash Option Register */
  4707. #define FTFE_FOPT_OPT_MASK (0xFFU)
  4708. #define FTFE_FOPT_OPT_SHIFT (0U)
  4709. #define FTFE_FOPT_OPT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FOPT_OPT_SHIFT)) & FTFE_FOPT_OPT_MASK)
  4710. /*! @name FCCOB3 - Flash Common Command Object Registers */
  4711. #define FTFE_FCCOB3_CCOBn_MASK (0xFFU)
  4712. #define FTFE_FCCOB3_CCOBn_SHIFT (0U)
  4713. #define FTFE_FCCOB3_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB3_CCOBn_SHIFT)) & FTFE_FCCOB3_CCOBn_MASK)
  4714. /*! @name FCCOB2 - Flash Common Command Object Registers */
  4715. #define FTFE_FCCOB2_CCOBn_MASK (0xFFU)
  4716. #define FTFE_FCCOB2_CCOBn_SHIFT (0U)
  4717. #define FTFE_FCCOB2_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB2_CCOBn_SHIFT)) & FTFE_FCCOB2_CCOBn_MASK)
  4718. /*! @name FCCOB1 - Flash Common Command Object Registers */
  4719. #define FTFE_FCCOB1_CCOBn_MASK (0xFFU)
  4720. #define FTFE_FCCOB1_CCOBn_SHIFT (0U)
  4721. #define FTFE_FCCOB1_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB1_CCOBn_SHIFT)) & FTFE_FCCOB1_CCOBn_MASK)
  4722. /*! @name FCCOB0 - Flash Common Command Object Registers */
  4723. #define FTFE_FCCOB0_CCOBn_MASK (0xFFU)
  4724. #define FTFE_FCCOB0_CCOBn_SHIFT (0U)
  4725. #define FTFE_FCCOB0_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB0_CCOBn_SHIFT)) & FTFE_FCCOB0_CCOBn_MASK)
  4726. /*! @name FCCOB7 - Flash Common Command Object Registers */
  4727. #define FTFE_FCCOB7_CCOBn_MASK (0xFFU)
  4728. #define FTFE_FCCOB7_CCOBn_SHIFT (0U)
  4729. #define FTFE_FCCOB7_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB7_CCOBn_SHIFT)) & FTFE_FCCOB7_CCOBn_MASK)
  4730. /*! @name FCCOB6 - Flash Common Command Object Registers */
  4731. #define FTFE_FCCOB6_CCOBn_MASK (0xFFU)
  4732. #define FTFE_FCCOB6_CCOBn_SHIFT (0U)
  4733. #define FTFE_FCCOB6_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB6_CCOBn_SHIFT)) & FTFE_FCCOB6_CCOBn_MASK)
  4734. /*! @name FCCOB5 - Flash Common Command Object Registers */
  4735. #define FTFE_FCCOB5_CCOBn_MASK (0xFFU)
  4736. #define FTFE_FCCOB5_CCOBn_SHIFT (0U)
  4737. #define FTFE_FCCOB5_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB5_CCOBn_SHIFT)) & FTFE_FCCOB5_CCOBn_MASK)
  4738. /*! @name FCCOB4 - Flash Common Command Object Registers */
  4739. #define FTFE_FCCOB4_CCOBn_MASK (0xFFU)
  4740. #define FTFE_FCCOB4_CCOBn_SHIFT (0U)
  4741. #define FTFE_FCCOB4_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB4_CCOBn_SHIFT)) & FTFE_FCCOB4_CCOBn_MASK)
  4742. /*! @name FCCOBB - Flash Common Command Object Registers */
  4743. #define FTFE_FCCOBB_CCOBn_MASK (0xFFU)
  4744. #define FTFE_FCCOBB_CCOBn_SHIFT (0U)
  4745. #define FTFE_FCCOBB_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOBB_CCOBn_SHIFT)) & FTFE_FCCOBB_CCOBn_MASK)
  4746. /*! @name FCCOBA - Flash Common Command Object Registers */
  4747. #define FTFE_FCCOBA_CCOBn_MASK (0xFFU)
  4748. #define FTFE_FCCOBA_CCOBn_SHIFT (0U)
  4749. #define FTFE_FCCOBA_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOBA_CCOBn_SHIFT)) & FTFE_FCCOBA_CCOBn_MASK)
  4750. /*! @name FCCOB9 - Flash Common Command Object Registers */
  4751. #define FTFE_FCCOB9_CCOBn_MASK (0xFFU)
  4752. #define FTFE_FCCOB9_CCOBn_SHIFT (0U)
  4753. #define FTFE_FCCOB9_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB9_CCOBn_SHIFT)) & FTFE_FCCOB9_CCOBn_MASK)
  4754. /*! @name FCCOB8 - Flash Common Command Object Registers */
  4755. #define FTFE_FCCOB8_CCOBn_MASK (0xFFU)
  4756. #define FTFE_FCCOB8_CCOBn_SHIFT (0U)
  4757. #define FTFE_FCCOB8_CCOBn(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FCCOB8_CCOBn_SHIFT)) & FTFE_FCCOB8_CCOBn_MASK)
  4758. /*! @name FPROT3 - Program Flash Protection Registers */
  4759. #define FTFE_FPROT3_PROT_MASK (0xFFU)
  4760. #define FTFE_FPROT3_PROT_SHIFT (0U)
  4761. #define FTFE_FPROT3_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROT3_PROT_SHIFT)) & FTFE_FPROT3_PROT_MASK)
  4762. /*! @name FPROT2 - Program Flash Protection Registers */
  4763. #define FTFE_FPROT2_PROT_MASK (0xFFU)
  4764. #define FTFE_FPROT2_PROT_SHIFT (0U)
  4765. #define FTFE_FPROT2_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROT2_PROT_SHIFT)) & FTFE_FPROT2_PROT_MASK)
  4766. /*! @name FPROT1 - Program Flash Protection Registers */
  4767. #define FTFE_FPROT1_PROT_MASK (0xFFU)
  4768. #define FTFE_FPROT1_PROT_SHIFT (0U)
  4769. #define FTFE_FPROT1_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROT1_PROT_SHIFT)) & FTFE_FPROT1_PROT_MASK)
  4770. /*! @name FPROT0 - Program Flash Protection Registers */
  4771. #define FTFE_FPROT0_PROT_MASK (0xFFU)
  4772. #define FTFE_FPROT0_PROT_SHIFT (0U)
  4773. #define FTFE_FPROT0_PROT(x) (((uint8_t)(((uint8_t)(x)) << FTFE_FPROT0_PROT_SHIFT)) & FTFE_FPROT0_PROT_MASK)
  4774. /*!
  4775. * @}
  4776. */ /* end of group FTFE_Register_Masks */
  4777. /* FTFE - Peripheral instance base addresses */
  4778. /** Peripheral FTFE base address */
  4779. #define FTFE_BASE (0x40020000u)
  4780. /** Peripheral FTFE base pointer */
  4781. #define FTFE ((FTFE_Type *)FTFE_BASE)
  4782. /** Array initializer of FTFE peripheral base addresses */
  4783. #define FTFE_BASE_ADDRS { FTFE_BASE }
  4784. /** Array initializer of FTFE peripheral base pointers */
  4785. #define FTFE_BASE_PTRS { FTFE }
  4786. /** Interrupt vectors for the FTFE peripheral type */
  4787. #define FTFE_COMMAND_COMPLETE_IRQS { FTFE_IRQn }
  4788. #define FTFE_READ_COLLISION_IRQS { Read_Collision_IRQn }
  4789. /*!
  4790. * @}
  4791. */ /* end of group FTFE_Peripheral_Access_Layer */
  4792. /* ----------------------------------------------------------------------------
  4793. -- FTM Peripheral Access Layer
  4794. ---------------------------------------------------------------------------- */
  4795. /*!
  4796. * @addtogroup FTM_Peripheral_Access_Layer FTM Peripheral Access Layer
  4797. * @{
  4798. */
  4799. /** FTM - Register Layout Typedef */
  4800. typedef struct {
  4801. __IO uint32_t SC; /**< Status And Control, offset: 0x0 */
  4802. __IO uint32_t CNT; /**< Counter, offset: 0x4 */
  4803. __IO uint32_t MOD; /**< Modulo, offset: 0x8 */
  4804. struct { /* offset: 0xC, array step: 0x8 */
  4805. __IO uint32_t CnSC; /**< Channel (n) Status And Control, array offset: 0xC, array step: 0x8 */
  4806. __IO uint32_t CnV; /**< Channel (n) Value, array offset: 0x10, array step: 0x8 */
  4807. } CONTROLS[8];
  4808. __IO uint32_t CNTIN; /**< Counter Initial Value, offset: 0x4C */
  4809. __IO uint32_t STATUS; /**< Capture And Compare Status, offset: 0x50 */
  4810. __IO uint32_t MODE; /**< Features Mode Selection, offset: 0x54 */
  4811. __IO uint32_t SYNC; /**< Synchronization, offset: 0x58 */
  4812. __IO uint32_t OUTINIT; /**< Initial State For Channels Output, offset: 0x5C */
  4813. __IO uint32_t OUTMASK; /**< Output Mask, offset: 0x60 */
  4814. __IO uint32_t COMBINE; /**< Function For Linked Channels, offset: 0x64 */
  4815. __IO uint32_t DEADTIME; /**< Deadtime Insertion Control, offset: 0x68 */
  4816. __IO uint32_t EXTTRIG; /**< FTM External Trigger, offset: 0x6C */
  4817. __IO uint32_t POL; /**< Channels Polarity, offset: 0x70 */
  4818. __IO uint32_t FMS; /**< Fault Mode Status, offset: 0x74 */
  4819. __IO uint32_t FILTER; /**< Input Capture Filter Control, offset: 0x78 */
  4820. __IO uint32_t FLTCTRL; /**< Fault Control, offset: 0x7C */
  4821. __IO uint32_t QDCTRL; /**< Quadrature Decoder Control And Status, offset: 0x80 */
  4822. __IO uint32_t CONF; /**< Configuration, offset: 0x84 */
  4823. __IO uint32_t FLTPOL; /**< FTM Fault Input Polarity, offset: 0x88 */
  4824. __IO uint32_t SYNCONF; /**< Synchronization Configuration, offset: 0x8C */
  4825. __IO uint32_t INVCTRL; /**< FTM Inverting Control, offset: 0x90 */
  4826. __IO uint32_t SWOCTRL; /**< FTM Software Output Control, offset: 0x94 */
  4827. __IO uint32_t PWMLOAD; /**< FTM PWM Load, offset: 0x98 */
  4828. } FTM_Type;
  4829. /* ----------------------------------------------------------------------------
  4830. -- FTM Register Masks
  4831. ---------------------------------------------------------------------------- */
  4832. /*!
  4833. * @addtogroup FTM_Register_Masks FTM Register Masks
  4834. * @{
  4835. */
  4836. /*! @name SC - Status And Control */
  4837. #define FTM_SC_PS_MASK (0x7U)
  4838. #define FTM_SC_PS_SHIFT (0U)
  4839. #define FTM_SC_PS(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_PS_SHIFT)) & FTM_SC_PS_MASK)
  4840. #define FTM_SC_CLKS_MASK (0x18U)
  4841. #define FTM_SC_CLKS_SHIFT (3U)
  4842. #define FTM_SC_CLKS(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_CLKS_SHIFT)) & FTM_SC_CLKS_MASK)
  4843. #define FTM_SC_CPWMS_MASK (0x20U)
  4844. #define FTM_SC_CPWMS_SHIFT (5U)
  4845. #define FTM_SC_CPWMS(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_CPWMS_SHIFT)) & FTM_SC_CPWMS_MASK)
  4846. #define FTM_SC_TOIE_MASK (0x40U)
  4847. #define FTM_SC_TOIE_SHIFT (6U)
  4848. #define FTM_SC_TOIE(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_TOIE_SHIFT)) & FTM_SC_TOIE_MASK)
  4849. #define FTM_SC_TOF_MASK (0x80U)
  4850. #define FTM_SC_TOF_SHIFT (7U)
  4851. #define FTM_SC_TOF(x) (((uint32_t)(((uint32_t)(x)) << FTM_SC_TOF_SHIFT)) & FTM_SC_TOF_MASK)
  4852. /*! @name CNT - Counter */
  4853. #define FTM_CNT_COUNT_MASK (0xFFFFU)
  4854. #define FTM_CNT_COUNT_SHIFT (0U)
  4855. #define FTM_CNT_COUNT(x) (((uint32_t)(((uint32_t)(x)) << FTM_CNT_COUNT_SHIFT)) & FTM_CNT_COUNT_MASK)
  4856. /*! @name MOD - Modulo */
  4857. #define FTM_MOD_MOD_MASK (0xFFFFU)
  4858. #define FTM_MOD_MOD_SHIFT (0U)
  4859. #define FTM_MOD_MOD(x) (((uint32_t)(((uint32_t)(x)) << FTM_MOD_MOD_SHIFT)) & FTM_MOD_MOD_MASK)
  4860. /*! @name CnSC - Channel (n) Status And Control */
  4861. #define FTM_CnSC_DMA_MASK (0x1U)
  4862. #define FTM_CnSC_DMA_SHIFT (0U)
  4863. #define FTM_CnSC_DMA(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_DMA_SHIFT)) & FTM_CnSC_DMA_MASK)
  4864. #define FTM_CnSC_ELSA_MASK (0x4U)
  4865. #define FTM_CnSC_ELSA_SHIFT (2U)
  4866. #define FTM_CnSC_ELSA(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_ELSA_SHIFT)) & FTM_CnSC_ELSA_MASK)
  4867. #define FTM_CnSC_ELSB_MASK (0x8U)
  4868. #define FTM_CnSC_ELSB_SHIFT (3U)
  4869. #define FTM_CnSC_ELSB(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_ELSB_SHIFT)) & FTM_CnSC_ELSB_MASK)
  4870. #define FTM_CnSC_MSA_MASK (0x10U)
  4871. #define FTM_CnSC_MSA_SHIFT (4U)
  4872. #define FTM_CnSC_MSA(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_MSA_SHIFT)) & FTM_CnSC_MSA_MASK)
  4873. #define FTM_CnSC_MSB_MASK (0x20U)
  4874. #define FTM_CnSC_MSB_SHIFT (5U)
  4875. #define FTM_CnSC_MSB(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_MSB_SHIFT)) & FTM_CnSC_MSB_MASK)
  4876. #define FTM_CnSC_CHIE_MASK (0x40U)
  4877. #define FTM_CnSC_CHIE_SHIFT (6U)
  4878. #define FTM_CnSC_CHIE(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_CHIE_SHIFT)) & FTM_CnSC_CHIE_MASK)
  4879. #define FTM_CnSC_CHF_MASK (0x80U)
  4880. #define FTM_CnSC_CHF_SHIFT (7U)
  4881. #define FTM_CnSC_CHF(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnSC_CHF_SHIFT)) & FTM_CnSC_CHF_MASK)
  4882. /* The count of FTM_CnSC */
  4883. #define FTM_CnSC_COUNT (8U)
  4884. /*! @name CnV - Channel (n) Value */
  4885. #define FTM_CnV_VAL_MASK (0xFFFFU)
  4886. #define FTM_CnV_VAL_SHIFT (0U)
  4887. #define FTM_CnV_VAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_CnV_VAL_SHIFT)) & FTM_CnV_VAL_MASK)
  4888. /* The count of FTM_CnV */
  4889. #define FTM_CnV_COUNT (8U)
  4890. /*! @name CNTIN - Counter Initial Value */
  4891. #define FTM_CNTIN_INIT_MASK (0xFFFFU)
  4892. #define FTM_CNTIN_INIT_SHIFT (0U)
  4893. #define FTM_CNTIN_INIT(x) (((uint32_t)(((uint32_t)(x)) << FTM_CNTIN_INIT_SHIFT)) & FTM_CNTIN_INIT_MASK)
  4894. /*! @name STATUS - Capture And Compare Status */
  4895. #define FTM_STATUS_CH0F_MASK (0x1U)
  4896. #define FTM_STATUS_CH0F_SHIFT (0U)
  4897. #define FTM_STATUS_CH0F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH0F_SHIFT)) & FTM_STATUS_CH0F_MASK)
  4898. #define FTM_STATUS_CH1F_MASK (0x2U)
  4899. #define FTM_STATUS_CH1F_SHIFT (1U)
  4900. #define FTM_STATUS_CH1F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH1F_SHIFT)) & FTM_STATUS_CH1F_MASK)
  4901. #define FTM_STATUS_CH2F_MASK (0x4U)
  4902. #define FTM_STATUS_CH2F_SHIFT (2U)
  4903. #define FTM_STATUS_CH2F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH2F_SHIFT)) & FTM_STATUS_CH2F_MASK)
  4904. #define FTM_STATUS_CH3F_MASK (0x8U)
  4905. #define FTM_STATUS_CH3F_SHIFT (3U)
  4906. #define FTM_STATUS_CH3F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH3F_SHIFT)) & FTM_STATUS_CH3F_MASK)
  4907. #define FTM_STATUS_CH4F_MASK (0x10U)
  4908. #define FTM_STATUS_CH4F_SHIFT (4U)
  4909. #define FTM_STATUS_CH4F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH4F_SHIFT)) & FTM_STATUS_CH4F_MASK)
  4910. #define FTM_STATUS_CH5F_MASK (0x20U)
  4911. #define FTM_STATUS_CH5F_SHIFT (5U)
  4912. #define FTM_STATUS_CH5F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH5F_SHIFT)) & FTM_STATUS_CH5F_MASK)
  4913. #define FTM_STATUS_CH6F_MASK (0x40U)
  4914. #define FTM_STATUS_CH6F_SHIFT (6U)
  4915. #define FTM_STATUS_CH6F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH6F_SHIFT)) & FTM_STATUS_CH6F_MASK)
  4916. #define FTM_STATUS_CH7F_MASK (0x80U)
  4917. #define FTM_STATUS_CH7F_SHIFT (7U)
  4918. #define FTM_STATUS_CH7F(x) (((uint32_t)(((uint32_t)(x)) << FTM_STATUS_CH7F_SHIFT)) & FTM_STATUS_CH7F_MASK)
  4919. /*! @name MODE - Features Mode Selection */
  4920. #define FTM_MODE_FTMEN_MASK (0x1U)
  4921. #define FTM_MODE_FTMEN_SHIFT (0U)
  4922. #define FTM_MODE_FTMEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_FTMEN_SHIFT)) & FTM_MODE_FTMEN_MASK)
  4923. #define FTM_MODE_INIT_MASK (0x2U)
  4924. #define FTM_MODE_INIT_SHIFT (1U)
  4925. #define FTM_MODE_INIT(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_INIT_SHIFT)) & FTM_MODE_INIT_MASK)
  4926. #define FTM_MODE_WPDIS_MASK (0x4U)
  4927. #define FTM_MODE_WPDIS_SHIFT (2U)
  4928. #define FTM_MODE_WPDIS(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_WPDIS_SHIFT)) & FTM_MODE_WPDIS_MASK)
  4929. #define FTM_MODE_PWMSYNC_MASK (0x8U)
  4930. #define FTM_MODE_PWMSYNC_SHIFT (3U)
  4931. #define FTM_MODE_PWMSYNC(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_PWMSYNC_SHIFT)) & FTM_MODE_PWMSYNC_MASK)
  4932. #define FTM_MODE_CAPTEST_MASK (0x10U)
  4933. #define FTM_MODE_CAPTEST_SHIFT (4U)
  4934. #define FTM_MODE_CAPTEST(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_CAPTEST_SHIFT)) & FTM_MODE_CAPTEST_MASK)
  4935. #define FTM_MODE_FAULTM_MASK (0x60U)
  4936. #define FTM_MODE_FAULTM_SHIFT (5U)
  4937. #define FTM_MODE_FAULTM(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_FAULTM_SHIFT)) & FTM_MODE_FAULTM_MASK)
  4938. #define FTM_MODE_FAULTIE_MASK (0x80U)
  4939. #define FTM_MODE_FAULTIE_SHIFT (7U)
  4940. #define FTM_MODE_FAULTIE(x) (((uint32_t)(((uint32_t)(x)) << FTM_MODE_FAULTIE_SHIFT)) & FTM_MODE_FAULTIE_MASK)
  4941. /*! @name SYNC - Synchronization */
  4942. #define FTM_SYNC_CNTMIN_MASK (0x1U)
  4943. #define FTM_SYNC_CNTMIN_SHIFT (0U)
  4944. #define FTM_SYNC_CNTMIN(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_CNTMIN_SHIFT)) & FTM_SYNC_CNTMIN_MASK)
  4945. #define FTM_SYNC_CNTMAX_MASK (0x2U)
  4946. #define FTM_SYNC_CNTMAX_SHIFT (1U)
  4947. #define FTM_SYNC_CNTMAX(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_CNTMAX_SHIFT)) & FTM_SYNC_CNTMAX_MASK)
  4948. #define FTM_SYNC_REINIT_MASK (0x4U)
  4949. #define FTM_SYNC_REINIT_SHIFT (2U)
  4950. #define FTM_SYNC_REINIT(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_REINIT_SHIFT)) & FTM_SYNC_REINIT_MASK)
  4951. #define FTM_SYNC_SYNCHOM_MASK (0x8U)
  4952. #define FTM_SYNC_SYNCHOM_SHIFT (3U)
  4953. #define FTM_SYNC_SYNCHOM(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_SYNCHOM_SHIFT)) & FTM_SYNC_SYNCHOM_MASK)
  4954. #define FTM_SYNC_TRIG0_MASK (0x10U)
  4955. #define FTM_SYNC_TRIG0_SHIFT (4U)
  4956. #define FTM_SYNC_TRIG0(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_TRIG0_SHIFT)) & FTM_SYNC_TRIG0_MASK)
  4957. #define FTM_SYNC_TRIG1_MASK (0x20U)
  4958. #define FTM_SYNC_TRIG1_SHIFT (5U)
  4959. #define FTM_SYNC_TRIG1(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_TRIG1_SHIFT)) & FTM_SYNC_TRIG1_MASK)
  4960. #define FTM_SYNC_TRIG2_MASK (0x40U)
  4961. #define FTM_SYNC_TRIG2_SHIFT (6U)
  4962. #define FTM_SYNC_TRIG2(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_TRIG2_SHIFT)) & FTM_SYNC_TRIG2_MASK)
  4963. #define FTM_SYNC_SWSYNC_MASK (0x80U)
  4964. #define FTM_SYNC_SWSYNC_SHIFT (7U)
  4965. #define FTM_SYNC_SWSYNC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNC_SWSYNC_SHIFT)) & FTM_SYNC_SWSYNC_MASK)
  4966. /*! @name OUTINIT - Initial State For Channels Output */
  4967. #define FTM_OUTINIT_CH0OI_MASK (0x1U)
  4968. #define FTM_OUTINIT_CH0OI_SHIFT (0U)
  4969. #define FTM_OUTINIT_CH0OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH0OI_SHIFT)) & FTM_OUTINIT_CH0OI_MASK)
  4970. #define FTM_OUTINIT_CH1OI_MASK (0x2U)
  4971. #define FTM_OUTINIT_CH1OI_SHIFT (1U)
  4972. #define FTM_OUTINIT_CH1OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH1OI_SHIFT)) & FTM_OUTINIT_CH1OI_MASK)
  4973. #define FTM_OUTINIT_CH2OI_MASK (0x4U)
  4974. #define FTM_OUTINIT_CH2OI_SHIFT (2U)
  4975. #define FTM_OUTINIT_CH2OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH2OI_SHIFT)) & FTM_OUTINIT_CH2OI_MASK)
  4976. #define FTM_OUTINIT_CH3OI_MASK (0x8U)
  4977. #define FTM_OUTINIT_CH3OI_SHIFT (3U)
  4978. #define FTM_OUTINIT_CH3OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH3OI_SHIFT)) & FTM_OUTINIT_CH3OI_MASK)
  4979. #define FTM_OUTINIT_CH4OI_MASK (0x10U)
  4980. #define FTM_OUTINIT_CH4OI_SHIFT (4U)
  4981. #define FTM_OUTINIT_CH4OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH4OI_SHIFT)) & FTM_OUTINIT_CH4OI_MASK)
  4982. #define FTM_OUTINIT_CH5OI_MASK (0x20U)
  4983. #define FTM_OUTINIT_CH5OI_SHIFT (5U)
  4984. #define FTM_OUTINIT_CH5OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH5OI_SHIFT)) & FTM_OUTINIT_CH5OI_MASK)
  4985. #define FTM_OUTINIT_CH6OI_MASK (0x40U)
  4986. #define FTM_OUTINIT_CH6OI_SHIFT (6U)
  4987. #define FTM_OUTINIT_CH6OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH6OI_SHIFT)) & FTM_OUTINIT_CH6OI_MASK)
  4988. #define FTM_OUTINIT_CH7OI_MASK (0x80U)
  4989. #define FTM_OUTINIT_CH7OI_SHIFT (7U)
  4990. #define FTM_OUTINIT_CH7OI(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTINIT_CH7OI_SHIFT)) & FTM_OUTINIT_CH7OI_MASK)
  4991. /*! @name OUTMASK - Output Mask */
  4992. #define FTM_OUTMASK_CH0OM_MASK (0x1U)
  4993. #define FTM_OUTMASK_CH0OM_SHIFT (0U)
  4994. #define FTM_OUTMASK_CH0OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH0OM_SHIFT)) & FTM_OUTMASK_CH0OM_MASK)
  4995. #define FTM_OUTMASK_CH1OM_MASK (0x2U)
  4996. #define FTM_OUTMASK_CH1OM_SHIFT (1U)
  4997. #define FTM_OUTMASK_CH1OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH1OM_SHIFT)) & FTM_OUTMASK_CH1OM_MASK)
  4998. #define FTM_OUTMASK_CH2OM_MASK (0x4U)
  4999. #define FTM_OUTMASK_CH2OM_SHIFT (2U)
  5000. #define FTM_OUTMASK_CH2OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH2OM_SHIFT)) & FTM_OUTMASK_CH2OM_MASK)
  5001. #define FTM_OUTMASK_CH3OM_MASK (0x8U)
  5002. #define FTM_OUTMASK_CH3OM_SHIFT (3U)
  5003. #define FTM_OUTMASK_CH3OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH3OM_SHIFT)) & FTM_OUTMASK_CH3OM_MASK)
  5004. #define FTM_OUTMASK_CH4OM_MASK (0x10U)
  5005. #define FTM_OUTMASK_CH4OM_SHIFT (4U)
  5006. #define FTM_OUTMASK_CH4OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH4OM_SHIFT)) & FTM_OUTMASK_CH4OM_MASK)
  5007. #define FTM_OUTMASK_CH5OM_MASK (0x20U)
  5008. #define FTM_OUTMASK_CH5OM_SHIFT (5U)
  5009. #define FTM_OUTMASK_CH5OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH5OM_SHIFT)) & FTM_OUTMASK_CH5OM_MASK)
  5010. #define FTM_OUTMASK_CH6OM_MASK (0x40U)
  5011. #define FTM_OUTMASK_CH6OM_SHIFT (6U)
  5012. #define FTM_OUTMASK_CH6OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH6OM_SHIFT)) & FTM_OUTMASK_CH6OM_MASK)
  5013. #define FTM_OUTMASK_CH7OM_MASK (0x80U)
  5014. #define FTM_OUTMASK_CH7OM_SHIFT (7U)
  5015. #define FTM_OUTMASK_CH7OM(x) (((uint32_t)(((uint32_t)(x)) << FTM_OUTMASK_CH7OM_SHIFT)) & FTM_OUTMASK_CH7OM_MASK)
  5016. /*! @name COMBINE - Function For Linked Channels */
  5017. #define FTM_COMBINE_COMBINE0_MASK (0x1U)
  5018. #define FTM_COMBINE_COMBINE0_SHIFT (0U)
  5019. #define FTM_COMBINE_COMBINE0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE0_SHIFT)) & FTM_COMBINE_COMBINE0_MASK)
  5020. #define FTM_COMBINE_COMP0_MASK (0x2U)
  5021. #define FTM_COMBINE_COMP0_SHIFT (1U)
  5022. #define FTM_COMBINE_COMP0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP0_SHIFT)) & FTM_COMBINE_COMP0_MASK)
  5023. #define FTM_COMBINE_DECAPEN0_MASK (0x4U)
  5024. #define FTM_COMBINE_DECAPEN0_SHIFT (2U)
  5025. #define FTM_COMBINE_DECAPEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN0_SHIFT)) & FTM_COMBINE_DECAPEN0_MASK)
  5026. #define FTM_COMBINE_DECAP0_MASK (0x8U)
  5027. #define FTM_COMBINE_DECAP0_SHIFT (3U)
  5028. #define FTM_COMBINE_DECAP0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP0_SHIFT)) & FTM_COMBINE_DECAP0_MASK)
  5029. #define FTM_COMBINE_DTEN0_MASK (0x10U)
  5030. #define FTM_COMBINE_DTEN0_SHIFT (4U)
  5031. #define FTM_COMBINE_DTEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN0_SHIFT)) & FTM_COMBINE_DTEN0_MASK)
  5032. #define FTM_COMBINE_SYNCEN0_MASK (0x20U)
  5033. #define FTM_COMBINE_SYNCEN0_SHIFT (5U)
  5034. #define FTM_COMBINE_SYNCEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN0_SHIFT)) & FTM_COMBINE_SYNCEN0_MASK)
  5035. #define FTM_COMBINE_FAULTEN0_MASK (0x40U)
  5036. #define FTM_COMBINE_FAULTEN0_SHIFT (6U)
  5037. #define FTM_COMBINE_FAULTEN0(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN0_SHIFT)) & FTM_COMBINE_FAULTEN0_MASK)
  5038. #define FTM_COMBINE_COMBINE1_MASK (0x100U)
  5039. #define FTM_COMBINE_COMBINE1_SHIFT (8U)
  5040. #define FTM_COMBINE_COMBINE1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE1_SHIFT)) & FTM_COMBINE_COMBINE1_MASK)
  5041. #define FTM_COMBINE_COMP1_MASK (0x200U)
  5042. #define FTM_COMBINE_COMP1_SHIFT (9U)
  5043. #define FTM_COMBINE_COMP1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP1_SHIFT)) & FTM_COMBINE_COMP1_MASK)
  5044. #define FTM_COMBINE_DECAPEN1_MASK (0x400U)
  5045. #define FTM_COMBINE_DECAPEN1_SHIFT (10U)
  5046. #define FTM_COMBINE_DECAPEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN1_SHIFT)) & FTM_COMBINE_DECAPEN1_MASK)
  5047. #define FTM_COMBINE_DECAP1_MASK (0x800U)
  5048. #define FTM_COMBINE_DECAP1_SHIFT (11U)
  5049. #define FTM_COMBINE_DECAP1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP1_SHIFT)) & FTM_COMBINE_DECAP1_MASK)
  5050. #define FTM_COMBINE_DTEN1_MASK (0x1000U)
  5051. #define FTM_COMBINE_DTEN1_SHIFT (12U)
  5052. #define FTM_COMBINE_DTEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN1_SHIFT)) & FTM_COMBINE_DTEN1_MASK)
  5053. #define FTM_COMBINE_SYNCEN1_MASK (0x2000U)
  5054. #define FTM_COMBINE_SYNCEN1_SHIFT (13U)
  5055. #define FTM_COMBINE_SYNCEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN1_SHIFT)) & FTM_COMBINE_SYNCEN1_MASK)
  5056. #define FTM_COMBINE_FAULTEN1_MASK (0x4000U)
  5057. #define FTM_COMBINE_FAULTEN1_SHIFT (14U)
  5058. #define FTM_COMBINE_FAULTEN1(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN1_SHIFT)) & FTM_COMBINE_FAULTEN1_MASK)
  5059. #define FTM_COMBINE_COMBINE2_MASK (0x10000U)
  5060. #define FTM_COMBINE_COMBINE2_SHIFT (16U)
  5061. #define FTM_COMBINE_COMBINE2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE2_SHIFT)) & FTM_COMBINE_COMBINE2_MASK)
  5062. #define FTM_COMBINE_COMP2_MASK (0x20000U)
  5063. #define FTM_COMBINE_COMP2_SHIFT (17U)
  5064. #define FTM_COMBINE_COMP2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP2_SHIFT)) & FTM_COMBINE_COMP2_MASK)
  5065. #define FTM_COMBINE_DECAPEN2_MASK (0x40000U)
  5066. #define FTM_COMBINE_DECAPEN2_SHIFT (18U)
  5067. #define FTM_COMBINE_DECAPEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN2_SHIFT)) & FTM_COMBINE_DECAPEN2_MASK)
  5068. #define FTM_COMBINE_DECAP2_MASK (0x80000U)
  5069. #define FTM_COMBINE_DECAP2_SHIFT (19U)
  5070. #define FTM_COMBINE_DECAP2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP2_SHIFT)) & FTM_COMBINE_DECAP2_MASK)
  5071. #define FTM_COMBINE_DTEN2_MASK (0x100000U)
  5072. #define FTM_COMBINE_DTEN2_SHIFT (20U)
  5073. #define FTM_COMBINE_DTEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN2_SHIFT)) & FTM_COMBINE_DTEN2_MASK)
  5074. #define FTM_COMBINE_SYNCEN2_MASK (0x200000U)
  5075. #define FTM_COMBINE_SYNCEN2_SHIFT (21U)
  5076. #define FTM_COMBINE_SYNCEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN2_SHIFT)) & FTM_COMBINE_SYNCEN2_MASK)
  5077. #define FTM_COMBINE_FAULTEN2_MASK (0x400000U)
  5078. #define FTM_COMBINE_FAULTEN2_SHIFT (22U)
  5079. #define FTM_COMBINE_FAULTEN2(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN2_SHIFT)) & FTM_COMBINE_FAULTEN2_MASK)
  5080. #define FTM_COMBINE_COMBINE3_MASK (0x1000000U)
  5081. #define FTM_COMBINE_COMBINE3_SHIFT (24U)
  5082. #define FTM_COMBINE_COMBINE3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMBINE3_SHIFT)) & FTM_COMBINE_COMBINE3_MASK)
  5083. #define FTM_COMBINE_COMP3_MASK (0x2000000U)
  5084. #define FTM_COMBINE_COMP3_SHIFT (25U)
  5085. #define FTM_COMBINE_COMP3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_COMP3_SHIFT)) & FTM_COMBINE_COMP3_MASK)
  5086. #define FTM_COMBINE_DECAPEN3_MASK (0x4000000U)
  5087. #define FTM_COMBINE_DECAPEN3_SHIFT (26U)
  5088. #define FTM_COMBINE_DECAPEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAPEN3_SHIFT)) & FTM_COMBINE_DECAPEN3_MASK)
  5089. #define FTM_COMBINE_DECAP3_MASK (0x8000000U)
  5090. #define FTM_COMBINE_DECAP3_SHIFT (27U)
  5091. #define FTM_COMBINE_DECAP3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DECAP3_SHIFT)) & FTM_COMBINE_DECAP3_MASK)
  5092. #define FTM_COMBINE_DTEN3_MASK (0x10000000U)
  5093. #define FTM_COMBINE_DTEN3_SHIFT (28U)
  5094. #define FTM_COMBINE_DTEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_DTEN3_SHIFT)) & FTM_COMBINE_DTEN3_MASK)
  5095. #define FTM_COMBINE_SYNCEN3_MASK (0x20000000U)
  5096. #define FTM_COMBINE_SYNCEN3_SHIFT (29U)
  5097. #define FTM_COMBINE_SYNCEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_SYNCEN3_SHIFT)) & FTM_COMBINE_SYNCEN3_MASK)
  5098. #define FTM_COMBINE_FAULTEN3_MASK (0x40000000U)
  5099. #define FTM_COMBINE_FAULTEN3_SHIFT (30U)
  5100. #define FTM_COMBINE_FAULTEN3(x) (((uint32_t)(((uint32_t)(x)) << FTM_COMBINE_FAULTEN3_SHIFT)) & FTM_COMBINE_FAULTEN3_MASK)
  5101. /*! @name DEADTIME - Deadtime Insertion Control */
  5102. #define FTM_DEADTIME_DTVAL_MASK (0x3FU)
  5103. #define FTM_DEADTIME_DTVAL_SHIFT (0U)
  5104. #define FTM_DEADTIME_DTVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_DEADTIME_DTVAL_SHIFT)) & FTM_DEADTIME_DTVAL_MASK)
  5105. #define FTM_DEADTIME_DTPS_MASK (0xC0U)
  5106. #define FTM_DEADTIME_DTPS_SHIFT (6U)
  5107. #define FTM_DEADTIME_DTPS(x) (((uint32_t)(((uint32_t)(x)) << FTM_DEADTIME_DTPS_SHIFT)) & FTM_DEADTIME_DTPS_MASK)
  5108. /*! @name EXTTRIG - FTM External Trigger */
  5109. #define FTM_EXTTRIG_CH2TRIG_MASK (0x1U)
  5110. #define FTM_EXTTRIG_CH2TRIG_SHIFT (0U)
  5111. #define FTM_EXTTRIG_CH2TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH2TRIG_SHIFT)) & FTM_EXTTRIG_CH2TRIG_MASK)
  5112. #define FTM_EXTTRIG_CH3TRIG_MASK (0x2U)
  5113. #define FTM_EXTTRIG_CH3TRIG_SHIFT (1U)
  5114. #define FTM_EXTTRIG_CH3TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH3TRIG_SHIFT)) & FTM_EXTTRIG_CH3TRIG_MASK)
  5115. #define FTM_EXTTRIG_CH4TRIG_MASK (0x4U)
  5116. #define FTM_EXTTRIG_CH4TRIG_SHIFT (2U)
  5117. #define FTM_EXTTRIG_CH4TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH4TRIG_SHIFT)) & FTM_EXTTRIG_CH4TRIG_MASK)
  5118. #define FTM_EXTTRIG_CH5TRIG_MASK (0x8U)
  5119. #define FTM_EXTTRIG_CH5TRIG_SHIFT (3U)
  5120. #define FTM_EXTTRIG_CH5TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH5TRIG_SHIFT)) & FTM_EXTTRIG_CH5TRIG_MASK)
  5121. #define FTM_EXTTRIG_CH0TRIG_MASK (0x10U)
  5122. #define FTM_EXTTRIG_CH0TRIG_SHIFT (4U)
  5123. #define FTM_EXTTRIG_CH0TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH0TRIG_SHIFT)) & FTM_EXTTRIG_CH0TRIG_MASK)
  5124. #define FTM_EXTTRIG_CH1TRIG_MASK (0x20U)
  5125. #define FTM_EXTTRIG_CH1TRIG_SHIFT (5U)
  5126. #define FTM_EXTTRIG_CH1TRIG(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_CH1TRIG_SHIFT)) & FTM_EXTTRIG_CH1TRIG_MASK)
  5127. #define FTM_EXTTRIG_INITTRIGEN_MASK (0x40U)
  5128. #define FTM_EXTTRIG_INITTRIGEN_SHIFT (6U)
  5129. #define FTM_EXTTRIG_INITTRIGEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_INITTRIGEN_SHIFT)) & FTM_EXTTRIG_INITTRIGEN_MASK)
  5130. #define FTM_EXTTRIG_TRIGF_MASK (0x80U)
  5131. #define FTM_EXTTRIG_TRIGF_SHIFT (7U)
  5132. #define FTM_EXTTRIG_TRIGF(x) (((uint32_t)(((uint32_t)(x)) << FTM_EXTTRIG_TRIGF_SHIFT)) & FTM_EXTTRIG_TRIGF_MASK)
  5133. /*! @name POL - Channels Polarity */
  5134. #define FTM_POL_POL0_MASK (0x1U)
  5135. #define FTM_POL_POL0_SHIFT (0U)
  5136. #define FTM_POL_POL0(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL0_SHIFT)) & FTM_POL_POL0_MASK)
  5137. #define FTM_POL_POL1_MASK (0x2U)
  5138. #define FTM_POL_POL1_SHIFT (1U)
  5139. #define FTM_POL_POL1(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL1_SHIFT)) & FTM_POL_POL1_MASK)
  5140. #define FTM_POL_POL2_MASK (0x4U)
  5141. #define FTM_POL_POL2_SHIFT (2U)
  5142. #define FTM_POL_POL2(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL2_SHIFT)) & FTM_POL_POL2_MASK)
  5143. #define FTM_POL_POL3_MASK (0x8U)
  5144. #define FTM_POL_POL3_SHIFT (3U)
  5145. #define FTM_POL_POL3(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL3_SHIFT)) & FTM_POL_POL3_MASK)
  5146. #define FTM_POL_POL4_MASK (0x10U)
  5147. #define FTM_POL_POL4_SHIFT (4U)
  5148. #define FTM_POL_POL4(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL4_SHIFT)) & FTM_POL_POL4_MASK)
  5149. #define FTM_POL_POL5_MASK (0x20U)
  5150. #define FTM_POL_POL5_SHIFT (5U)
  5151. #define FTM_POL_POL5(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL5_SHIFT)) & FTM_POL_POL5_MASK)
  5152. #define FTM_POL_POL6_MASK (0x40U)
  5153. #define FTM_POL_POL6_SHIFT (6U)
  5154. #define FTM_POL_POL6(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL6_SHIFT)) & FTM_POL_POL6_MASK)
  5155. #define FTM_POL_POL7_MASK (0x80U)
  5156. #define FTM_POL_POL7_SHIFT (7U)
  5157. #define FTM_POL_POL7(x) (((uint32_t)(((uint32_t)(x)) << FTM_POL_POL7_SHIFT)) & FTM_POL_POL7_MASK)
  5158. /*! @name FMS - Fault Mode Status */
  5159. #define FTM_FMS_FAULTF0_MASK (0x1U)
  5160. #define FTM_FMS_FAULTF0_SHIFT (0U)
  5161. #define FTM_FMS_FAULTF0(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF0_SHIFT)) & FTM_FMS_FAULTF0_MASK)
  5162. #define FTM_FMS_FAULTF1_MASK (0x2U)
  5163. #define FTM_FMS_FAULTF1_SHIFT (1U)
  5164. #define FTM_FMS_FAULTF1(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF1_SHIFT)) & FTM_FMS_FAULTF1_MASK)
  5165. #define FTM_FMS_FAULTF2_MASK (0x4U)
  5166. #define FTM_FMS_FAULTF2_SHIFT (2U)
  5167. #define FTM_FMS_FAULTF2(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF2_SHIFT)) & FTM_FMS_FAULTF2_MASK)
  5168. #define FTM_FMS_FAULTF3_MASK (0x8U)
  5169. #define FTM_FMS_FAULTF3_SHIFT (3U)
  5170. #define FTM_FMS_FAULTF3(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF3_SHIFT)) & FTM_FMS_FAULTF3_MASK)
  5171. #define FTM_FMS_FAULTIN_MASK (0x20U)
  5172. #define FTM_FMS_FAULTIN_SHIFT (5U)
  5173. #define FTM_FMS_FAULTIN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTIN_SHIFT)) & FTM_FMS_FAULTIN_MASK)
  5174. #define FTM_FMS_WPEN_MASK (0x40U)
  5175. #define FTM_FMS_WPEN_SHIFT (6U)
  5176. #define FTM_FMS_WPEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_WPEN_SHIFT)) & FTM_FMS_WPEN_MASK)
  5177. #define FTM_FMS_FAULTF_MASK (0x80U)
  5178. #define FTM_FMS_FAULTF_SHIFT (7U)
  5179. #define FTM_FMS_FAULTF(x) (((uint32_t)(((uint32_t)(x)) << FTM_FMS_FAULTF_SHIFT)) & FTM_FMS_FAULTF_MASK)
  5180. /*! @name FILTER - Input Capture Filter Control */
  5181. #define FTM_FILTER_CH0FVAL_MASK (0xFU)
  5182. #define FTM_FILTER_CH0FVAL_SHIFT (0U)
  5183. #define FTM_FILTER_CH0FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH0FVAL_SHIFT)) & FTM_FILTER_CH0FVAL_MASK)
  5184. #define FTM_FILTER_CH1FVAL_MASK (0xF0U)
  5185. #define FTM_FILTER_CH1FVAL_SHIFT (4U)
  5186. #define FTM_FILTER_CH1FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH1FVAL_SHIFT)) & FTM_FILTER_CH1FVAL_MASK)
  5187. #define FTM_FILTER_CH2FVAL_MASK (0xF00U)
  5188. #define FTM_FILTER_CH2FVAL_SHIFT (8U)
  5189. #define FTM_FILTER_CH2FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH2FVAL_SHIFT)) & FTM_FILTER_CH2FVAL_MASK)
  5190. #define FTM_FILTER_CH3FVAL_MASK (0xF000U)
  5191. #define FTM_FILTER_CH3FVAL_SHIFT (12U)
  5192. #define FTM_FILTER_CH3FVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FILTER_CH3FVAL_SHIFT)) & FTM_FILTER_CH3FVAL_MASK)
  5193. /*! @name FLTCTRL - Fault Control */
  5194. #define FTM_FLTCTRL_FAULT0EN_MASK (0x1U)
  5195. #define FTM_FLTCTRL_FAULT0EN_SHIFT (0U)
  5196. #define FTM_FLTCTRL_FAULT0EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT0EN_SHIFT)) & FTM_FLTCTRL_FAULT0EN_MASK)
  5197. #define FTM_FLTCTRL_FAULT1EN_MASK (0x2U)
  5198. #define FTM_FLTCTRL_FAULT1EN_SHIFT (1U)
  5199. #define FTM_FLTCTRL_FAULT1EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT1EN_SHIFT)) & FTM_FLTCTRL_FAULT1EN_MASK)
  5200. #define FTM_FLTCTRL_FAULT2EN_MASK (0x4U)
  5201. #define FTM_FLTCTRL_FAULT2EN_SHIFT (2U)
  5202. #define FTM_FLTCTRL_FAULT2EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT2EN_SHIFT)) & FTM_FLTCTRL_FAULT2EN_MASK)
  5203. #define FTM_FLTCTRL_FAULT3EN_MASK (0x8U)
  5204. #define FTM_FLTCTRL_FAULT3EN_SHIFT (3U)
  5205. #define FTM_FLTCTRL_FAULT3EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FAULT3EN_SHIFT)) & FTM_FLTCTRL_FAULT3EN_MASK)
  5206. #define FTM_FLTCTRL_FFLTR0EN_MASK (0x10U)
  5207. #define FTM_FLTCTRL_FFLTR0EN_SHIFT (4U)
  5208. #define FTM_FLTCTRL_FFLTR0EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR0EN_SHIFT)) & FTM_FLTCTRL_FFLTR0EN_MASK)
  5209. #define FTM_FLTCTRL_FFLTR1EN_MASK (0x20U)
  5210. #define FTM_FLTCTRL_FFLTR1EN_SHIFT (5U)
  5211. #define FTM_FLTCTRL_FFLTR1EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR1EN_SHIFT)) & FTM_FLTCTRL_FFLTR1EN_MASK)
  5212. #define FTM_FLTCTRL_FFLTR2EN_MASK (0x40U)
  5213. #define FTM_FLTCTRL_FFLTR2EN_SHIFT (6U)
  5214. #define FTM_FLTCTRL_FFLTR2EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR2EN_SHIFT)) & FTM_FLTCTRL_FFLTR2EN_MASK)
  5215. #define FTM_FLTCTRL_FFLTR3EN_MASK (0x80U)
  5216. #define FTM_FLTCTRL_FFLTR3EN_SHIFT (7U)
  5217. #define FTM_FLTCTRL_FFLTR3EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFLTR3EN_SHIFT)) & FTM_FLTCTRL_FFLTR3EN_MASK)
  5218. #define FTM_FLTCTRL_FFVAL_MASK (0xF00U)
  5219. #define FTM_FLTCTRL_FFVAL_SHIFT (8U)
  5220. #define FTM_FLTCTRL_FFVAL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTCTRL_FFVAL_SHIFT)) & FTM_FLTCTRL_FFVAL_MASK)
  5221. /*! @name QDCTRL - Quadrature Decoder Control And Status */
  5222. #define FTM_QDCTRL_QUADEN_MASK (0x1U)
  5223. #define FTM_QDCTRL_QUADEN_SHIFT (0U)
  5224. #define FTM_QDCTRL_QUADEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_QUADEN_SHIFT)) & FTM_QDCTRL_QUADEN_MASK)
  5225. #define FTM_QDCTRL_TOFDIR_MASK (0x2U)
  5226. #define FTM_QDCTRL_TOFDIR_SHIFT (1U)
  5227. #define FTM_QDCTRL_TOFDIR(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_TOFDIR_SHIFT)) & FTM_QDCTRL_TOFDIR_MASK)
  5228. #define FTM_QDCTRL_QUADIR_MASK (0x4U)
  5229. #define FTM_QDCTRL_QUADIR_SHIFT (2U)
  5230. #define FTM_QDCTRL_QUADIR(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_QUADIR_SHIFT)) & FTM_QDCTRL_QUADIR_MASK)
  5231. #define FTM_QDCTRL_QUADMODE_MASK (0x8U)
  5232. #define FTM_QDCTRL_QUADMODE_SHIFT (3U)
  5233. #define FTM_QDCTRL_QUADMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_QUADMODE_SHIFT)) & FTM_QDCTRL_QUADMODE_MASK)
  5234. #define FTM_QDCTRL_PHBPOL_MASK (0x10U)
  5235. #define FTM_QDCTRL_PHBPOL_SHIFT (4U)
  5236. #define FTM_QDCTRL_PHBPOL(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHBPOL_SHIFT)) & FTM_QDCTRL_PHBPOL_MASK)
  5237. #define FTM_QDCTRL_PHAPOL_MASK (0x20U)
  5238. #define FTM_QDCTRL_PHAPOL_SHIFT (5U)
  5239. #define FTM_QDCTRL_PHAPOL(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHAPOL_SHIFT)) & FTM_QDCTRL_PHAPOL_MASK)
  5240. #define FTM_QDCTRL_PHBFLTREN_MASK (0x40U)
  5241. #define FTM_QDCTRL_PHBFLTREN_SHIFT (6U)
  5242. #define FTM_QDCTRL_PHBFLTREN(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHBFLTREN_SHIFT)) & FTM_QDCTRL_PHBFLTREN_MASK)
  5243. #define FTM_QDCTRL_PHAFLTREN_MASK (0x80U)
  5244. #define FTM_QDCTRL_PHAFLTREN_SHIFT (7U)
  5245. #define FTM_QDCTRL_PHAFLTREN(x) (((uint32_t)(((uint32_t)(x)) << FTM_QDCTRL_PHAFLTREN_SHIFT)) & FTM_QDCTRL_PHAFLTREN_MASK)
  5246. /*! @name CONF - Configuration */
  5247. #define FTM_CONF_NUMTOF_MASK (0x1FU)
  5248. #define FTM_CONF_NUMTOF_SHIFT (0U)
  5249. #define FTM_CONF_NUMTOF(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_NUMTOF_SHIFT)) & FTM_CONF_NUMTOF_MASK)
  5250. #define FTM_CONF_BDMMODE_MASK (0xC0U)
  5251. #define FTM_CONF_BDMMODE_SHIFT (6U)
  5252. #define FTM_CONF_BDMMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_BDMMODE_SHIFT)) & FTM_CONF_BDMMODE_MASK)
  5253. #define FTM_CONF_GTBEEN_MASK (0x200U)
  5254. #define FTM_CONF_GTBEEN_SHIFT (9U)
  5255. #define FTM_CONF_GTBEEN(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_GTBEEN_SHIFT)) & FTM_CONF_GTBEEN_MASK)
  5256. #define FTM_CONF_GTBEOUT_MASK (0x400U)
  5257. #define FTM_CONF_GTBEOUT_SHIFT (10U)
  5258. #define FTM_CONF_GTBEOUT(x) (((uint32_t)(((uint32_t)(x)) << FTM_CONF_GTBEOUT_SHIFT)) & FTM_CONF_GTBEOUT_MASK)
  5259. /*! @name FLTPOL - FTM Fault Input Polarity */
  5260. #define FTM_FLTPOL_FLT0POL_MASK (0x1U)
  5261. #define FTM_FLTPOL_FLT0POL_SHIFT (0U)
  5262. #define FTM_FLTPOL_FLT0POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT0POL_SHIFT)) & FTM_FLTPOL_FLT0POL_MASK)
  5263. #define FTM_FLTPOL_FLT1POL_MASK (0x2U)
  5264. #define FTM_FLTPOL_FLT1POL_SHIFT (1U)
  5265. #define FTM_FLTPOL_FLT1POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT1POL_SHIFT)) & FTM_FLTPOL_FLT1POL_MASK)
  5266. #define FTM_FLTPOL_FLT2POL_MASK (0x4U)
  5267. #define FTM_FLTPOL_FLT2POL_SHIFT (2U)
  5268. #define FTM_FLTPOL_FLT2POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT2POL_SHIFT)) & FTM_FLTPOL_FLT2POL_MASK)
  5269. #define FTM_FLTPOL_FLT3POL_MASK (0x8U)
  5270. #define FTM_FLTPOL_FLT3POL_SHIFT (3U)
  5271. #define FTM_FLTPOL_FLT3POL(x) (((uint32_t)(((uint32_t)(x)) << FTM_FLTPOL_FLT3POL_SHIFT)) & FTM_FLTPOL_FLT3POL_MASK)
  5272. /*! @name SYNCONF - Synchronization Configuration */
  5273. #define FTM_SYNCONF_HWTRIGMODE_MASK (0x1U)
  5274. #define FTM_SYNCONF_HWTRIGMODE_SHIFT (0U)
  5275. #define FTM_SYNCONF_HWTRIGMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWTRIGMODE_SHIFT)) & FTM_SYNCONF_HWTRIGMODE_MASK)
  5276. #define FTM_SYNCONF_CNTINC_MASK (0x4U)
  5277. #define FTM_SYNCONF_CNTINC_SHIFT (2U)
  5278. #define FTM_SYNCONF_CNTINC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_CNTINC_SHIFT)) & FTM_SYNCONF_CNTINC_MASK)
  5279. #define FTM_SYNCONF_INVC_MASK (0x10U)
  5280. #define FTM_SYNCONF_INVC_SHIFT (4U)
  5281. #define FTM_SYNCONF_INVC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_INVC_SHIFT)) & FTM_SYNCONF_INVC_MASK)
  5282. #define FTM_SYNCONF_SWOC_MASK (0x20U)
  5283. #define FTM_SYNCONF_SWOC_SHIFT (5U)
  5284. #define FTM_SYNCONF_SWOC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWOC_SHIFT)) & FTM_SYNCONF_SWOC_MASK)
  5285. #define FTM_SYNCONF_SYNCMODE_MASK (0x80U)
  5286. #define FTM_SYNCONF_SYNCMODE_SHIFT (7U)
  5287. #define FTM_SYNCONF_SYNCMODE(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SYNCMODE_SHIFT)) & FTM_SYNCONF_SYNCMODE_MASK)
  5288. #define FTM_SYNCONF_SWRSTCNT_MASK (0x100U)
  5289. #define FTM_SYNCONF_SWRSTCNT_SHIFT (8U)
  5290. #define FTM_SYNCONF_SWRSTCNT(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWRSTCNT_SHIFT)) & FTM_SYNCONF_SWRSTCNT_MASK)
  5291. #define FTM_SYNCONF_SWWRBUF_MASK (0x200U)
  5292. #define FTM_SYNCONF_SWWRBUF_SHIFT (9U)
  5293. #define FTM_SYNCONF_SWWRBUF(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWWRBUF_SHIFT)) & FTM_SYNCONF_SWWRBUF_MASK)
  5294. #define FTM_SYNCONF_SWOM_MASK (0x400U)
  5295. #define FTM_SYNCONF_SWOM_SHIFT (10U)
  5296. #define FTM_SYNCONF_SWOM(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWOM_SHIFT)) & FTM_SYNCONF_SWOM_MASK)
  5297. #define FTM_SYNCONF_SWINVC_MASK (0x800U)
  5298. #define FTM_SYNCONF_SWINVC_SHIFT (11U)
  5299. #define FTM_SYNCONF_SWINVC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWINVC_SHIFT)) & FTM_SYNCONF_SWINVC_MASK)
  5300. #define FTM_SYNCONF_SWSOC_MASK (0x1000U)
  5301. #define FTM_SYNCONF_SWSOC_SHIFT (12U)
  5302. #define FTM_SYNCONF_SWSOC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_SWSOC_SHIFT)) & FTM_SYNCONF_SWSOC_MASK)
  5303. #define FTM_SYNCONF_HWRSTCNT_MASK (0x10000U)
  5304. #define FTM_SYNCONF_HWRSTCNT_SHIFT (16U)
  5305. #define FTM_SYNCONF_HWRSTCNT(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWRSTCNT_SHIFT)) & FTM_SYNCONF_HWRSTCNT_MASK)
  5306. #define FTM_SYNCONF_HWWRBUF_MASK (0x20000U)
  5307. #define FTM_SYNCONF_HWWRBUF_SHIFT (17U)
  5308. #define FTM_SYNCONF_HWWRBUF(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWWRBUF_SHIFT)) & FTM_SYNCONF_HWWRBUF_MASK)
  5309. #define FTM_SYNCONF_HWOM_MASK (0x40000U)
  5310. #define FTM_SYNCONF_HWOM_SHIFT (18U)
  5311. #define FTM_SYNCONF_HWOM(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWOM_SHIFT)) & FTM_SYNCONF_HWOM_MASK)
  5312. #define FTM_SYNCONF_HWINVC_MASK (0x80000U)
  5313. #define FTM_SYNCONF_HWINVC_SHIFT (19U)
  5314. #define FTM_SYNCONF_HWINVC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWINVC_SHIFT)) & FTM_SYNCONF_HWINVC_MASK)
  5315. #define FTM_SYNCONF_HWSOC_MASK (0x100000U)
  5316. #define FTM_SYNCONF_HWSOC_SHIFT (20U)
  5317. #define FTM_SYNCONF_HWSOC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SYNCONF_HWSOC_SHIFT)) & FTM_SYNCONF_HWSOC_MASK)
  5318. /*! @name INVCTRL - FTM Inverting Control */
  5319. #define FTM_INVCTRL_INV0EN_MASK (0x1U)
  5320. #define FTM_INVCTRL_INV0EN_SHIFT (0U)
  5321. #define FTM_INVCTRL_INV0EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV0EN_SHIFT)) & FTM_INVCTRL_INV0EN_MASK)
  5322. #define FTM_INVCTRL_INV1EN_MASK (0x2U)
  5323. #define FTM_INVCTRL_INV1EN_SHIFT (1U)
  5324. #define FTM_INVCTRL_INV1EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV1EN_SHIFT)) & FTM_INVCTRL_INV1EN_MASK)
  5325. #define FTM_INVCTRL_INV2EN_MASK (0x4U)
  5326. #define FTM_INVCTRL_INV2EN_SHIFT (2U)
  5327. #define FTM_INVCTRL_INV2EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV2EN_SHIFT)) & FTM_INVCTRL_INV2EN_MASK)
  5328. #define FTM_INVCTRL_INV3EN_MASK (0x8U)
  5329. #define FTM_INVCTRL_INV3EN_SHIFT (3U)
  5330. #define FTM_INVCTRL_INV3EN(x) (((uint32_t)(((uint32_t)(x)) << FTM_INVCTRL_INV3EN_SHIFT)) & FTM_INVCTRL_INV3EN_MASK)
  5331. /*! @name SWOCTRL - FTM Software Output Control */
  5332. #define FTM_SWOCTRL_CH0OC_MASK (0x1U)
  5333. #define FTM_SWOCTRL_CH0OC_SHIFT (0U)
  5334. #define FTM_SWOCTRL_CH0OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH0OC_SHIFT)) & FTM_SWOCTRL_CH0OC_MASK)
  5335. #define FTM_SWOCTRL_CH1OC_MASK (0x2U)
  5336. #define FTM_SWOCTRL_CH1OC_SHIFT (1U)
  5337. #define FTM_SWOCTRL_CH1OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH1OC_SHIFT)) & FTM_SWOCTRL_CH1OC_MASK)
  5338. #define FTM_SWOCTRL_CH2OC_MASK (0x4U)
  5339. #define FTM_SWOCTRL_CH2OC_SHIFT (2U)
  5340. #define FTM_SWOCTRL_CH2OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH2OC_SHIFT)) & FTM_SWOCTRL_CH2OC_MASK)
  5341. #define FTM_SWOCTRL_CH3OC_MASK (0x8U)
  5342. #define FTM_SWOCTRL_CH3OC_SHIFT (3U)
  5343. #define FTM_SWOCTRL_CH3OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH3OC_SHIFT)) & FTM_SWOCTRL_CH3OC_MASK)
  5344. #define FTM_SWOCTRL_CH4OC_MASK (0x10U)
  5345. #define FTM_SWOCTRL_CH4OC_SHIFT (4U)
  5346. #define FTM_SWOCTRL_CH4OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH4OC_SHIFT)) & FTM_SWOCTRL_CH4OC_MASK)
  5347. #define FTM_SWOCTRL_CH5OC_MASK (0x20U)
  5348. #define FTM_SWOCTRL_CH5OC_SHIFT (5U)
  5349. #define FTM_SWOCTRL_CH5OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH5OC_SHIFT)) & FTM_SWOCTRL_CH5OC_MASK)
  5350. #define FTM_SWOCTRL_CH6OC_MASK (0x40U)
  5351. #define FTM_SWOCTRL_CH6OC_SHIFT (6U)
  5352. #define FTM_SWOCTRL_CH6OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH6OC_SHIFT)) & FTM_SWOCTRL_CH6OC_MASK)
  5353. #define FTM_SWOCTRL_CH7OC_MASK (0x80U)
  5354. #define FTM_SWOCTRL_CH7OC_SHIFT (7U)
  5355. #define FTM_SWOCTRL_CH7OC(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH7OC_SHIFT)) & FTM_SWOCTRL_CH7OC_MASK)
  5356. #define FTM_SWOCTRL_CH0OCV_MASK (0x100U)
  5357. #define FTM_SWOCTRL_CH0OCV_SHIFT (8U)
  5358. #define FTM_SWOCTRL_CH0OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH0OCV_SHIFT)) & FTM_SWOCTRL_CH0OCV_MASK)
  5359. #define FTM_SWOCTRL_CH1OCV_MASK (0x200U)
  5360. #define FTM_SWOCTRL_CH1OCV_SHIFT (9U)
  5361. #define FTM_SWOCTRL_CH1OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH1OCV_SHIFT)) & FTM_SWOCTRL_CH1OCV_MASK)
  5362. #define FTM_SWOCTRL_CH2OCV_MASK (0x400U)
  5363. #define FTM_SWOCTRL_CH2OCV_SHIFT (10U)
  5364. #define FTM_SWOCTRL_CH2OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH2OCV_SHIFT)) & FTM_SWOCTRL_CH2OCV_MASK)
  5365. #define FTM_SWOCTRL_CH3OCV_MASK (0x800U)
  5366. #define FTM_SWOCTRL_CH3OCV_SHIFT (11U)
  5367. #define FTM_SWOCTRL_CH3OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH3OCV_SHIFT)) & FTM_SWOCTRL_CH3OCV_MASK)
  5368. #define FTM_SWOCTRL_CH4OCV_MASK (0x1000U)
  5369. #define FTM_SWOCTRL_CH4OCV_SHIFT (12U)
  5370. #define FTM_SWOCTRL_CH4OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH4OCV_SHIFT)) & FTM_SWOCTRL_CH4OCV_MASK)
  5371. #define FTM_SWOCTRL_CH5OCV_MASK (0x2000U)
  5372. #define FTM_SWOCTRL_CH5OCV_SHIFT (13U)
  5373. #define FTM_SWOCTRL_CH5OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH5OCV_SHIFT)) & FTM_SWOCTRL_CH5OCV_MASK)
  5374. #define FTM_SWOCTRL_CH6OCV_MASK (0x4000U)
  5375. #define FTM_SWOCTRL_CH6OCV_SHIFT (14U)
  5376. #define FTM_SWOCTRL_CH6OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH6OCV_SHIFT)) & FTM_SWOCTRL_CH6OCV_MASK)
  5377. #define FTM_SWOCTRL_CH7OCV_MASK (0x8000U)
  5378. #define FTM_SWOCTRL_CH7OCV_SHIFT (15U)
  5379. #define FTM_SWOCTRL_CH7OCV(x) (((uint32_t)(((uint32_t)(x)) << FTM_SWOCTRL_CH7OCV_SHIFT)) & FTM_SWOCTRL_CH7OCV_MASK)
  5380. /*! @name PWMLOAD - FTM PWM Load */
  5381. #define FTM_PWMLOAD_CH0SEL_MASK (0x1U)
  5382. #define FTM_PWMLOAD_CH0SEL_SHIFT (0U)
  5383. #define FTM_PWMLOAD_CH0SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH0SEL_SHIFT)) & FTM_PWMLOAD_CH0SEL_MASK)
  5384. #define FTM_PWMLOAD_CH1SEL_MASK (0x2U)
  5385. #define FTM_PWMLOAD_CH1SEL_SHIFT (1U)
  5386. #define FTM_PWMLOAD_CH1SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH1SEL_SHIFT)) & FTM_PWMLOAD_CH1SEL_MASK)
  5387. #define FTM_PWMLOAD_CH2SEL_MASK (0x4U)
  5388. #define FTM_PWMLOAD_CH2SEL_SHIFT (2U)
  5389. #define FTM_PWMLOAD_CH2SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH2SEL_SHIFT)) & FTM_PWMLOAD_CH2SEL_MASK)
  5390. #define FTM_PWMLOAD_CH3SEL_MASK (0x8U)
  5391. #define FTM_PWMLOAD_CH3SEL_SHIFT (3U)
  5392. #define FTM_PWMLOAD_CH3SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH3SEL_SHIFT)) & FTM_PWMLOAD_CH3SEL_MASK)
  5393. #define FTM_PWMLOAD_CH4SEL_MASK (0x10U)
  5394. #define FTM_PWMLOAD_CH4SEL_SHIFT (4U)
  5395. #define FTM_PWMLOAD_CH4SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH4SEL_SHIFT)) & FTM_PWMLOAD_CH4SEL_MASK)
  5396. #define FTM_PWMLOAD_CH5SEL_MASK (0x20U)
  5397. #define FTM_PWMLOAD_CH5SEL_SHIFT (5U)
  5398. #define FTM_PWMLOAD_CH5SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH5SEL_SHIFT)) & FTM_PWMLOAD_CH5SEL_MASK)
  5399. #define FTM_PWMLOAD_CH6SEL_MASK (0x40U)
  5400. #define FTM_PWMLOAD_CH6SEL_SHIFT (6U)
  5401. #define FTM_PWMLOAD_CH6SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH6SEL_SHIFT)) & FTM_PWMLOAD_CH6SEL_MASK)
  5402. #define FTM_PWMLOAD_CH7SEL_MASK (0x80U)
  5403. #define FTM_PWMLOAD_CH7SEL_SHIFT (7U)
  5404. #define FTM_PWMLOAD_CH7SEL(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_CH7SEL_SHIFT)) & FTM_PWMLOAD_CH7SEL_MASK)
  5405. #define FTM_PWMLOAD_LDOK_MASK (0x200U)
  5406. #define FTM_PWMLOAD_LDOK_SHIFT (9U)
  5407. #define FTM_PWMLOAD_LDOK(x) (((uint32_t)(((uint32_t)(x)) << FTM_PWMLOAD_LDOK_SHIFT)) & FTM_PWMLOAD_LDOK_MASK)
  5408. /*!
  5409. * @}
  5410. */ /* end of group FTM_Register_Masks */
  5411. /* FTM - Peripheral instance base addresses */
  5412. /** Peripheral FTM0 base address */
  5413. #define FTM0_BASE (0x40038000u)
  5414. /** Peripheral FTM0 base pointer */
  5415. #define FTM0 ((FTM_Type *)FTM0_BASE)
  5416. /** Peripheral FTM1 base address */
  5417. #define FTM1_BASE (0x40039000u)
  5418. /** Peripheral FTM1 base pointer */
  5419. #define FTM1 ((FTM_Type *)FTM1_BASE)
  5420. /** Peripheral FTM2 base address */
  5421. #define FTM2_BASE (0x4003A000u)
  5422. /** Peripheral FTM2 base pointer */
  5423. #define FTM2 ((FTM_Type *)FTM2_BASE)
  5424. /** Peripheral FTM3 base address */
  5425. #define FTM3_BASE (0x400B9000u)
  5426. /** Peripheral FTM3 base pointer */
  5427. #define FTM3 ((FTM_Type *)FTM3_BASE)
  5428. /** Array initializer of FTM peripheral base addresses */
  5429. #define FTM_BASE_ADDRS { FTM0_BASE, FTM1_BASE, FTM2_BASE, FTM3_BASE }
  5430. /** Array initializer of FTM peripheral base pointers */
  5431. #define FTM_BASE_PTRS { FTM0, FTM1, FTM2, FTM3 }
  5432. /** Interrupt vectors for the FTM peripheral type */
  5433. #define FTM_IRQS { FTM0_IRQn, FTM1_IRQn, FTM2_IRQn, FTM3_IRQn }
  5434. /*!
  5435. * @}
  5436. */ /* end of group FTM_Peripheral_Access_Layer */
  5437. /* ----------------------------------------------------------------------------
  5438. -- GPIO Peripheral Access Layer
  5439. ---------------------------------------------------------------------------- */
  5440. /*!
  5441. * @addtogroup GPIO_Peripheral_Access_Layer GPIO Peripheral Access Layer
  5442. * @{
  5443. */
  5444. /** GPIO - Register Layout Typedef */
  5445. typedef struct {
  5446. __IO uint32_t PDOR; /**< Port Data Output Register, offset: 0x0 */
  5447. __O uint32_t PSOR; /**< Port Set Output Register, offset: 0x4 */
  5448. __O uint32_t PCOR; /**< Port Clear Output Register, offset: 0x8 */
  5449. __O uint32_t PTOR; /**< Port Toggle Output Register, offset: 0xC */
  5450. __I uint32_t PDIR; /**< Port Data Input Register, offset: 0x10 */
  5451. __IO uint32_t PDDR; /**< Port Data Direction Register, offset: 0x14 */
  5452. } GPIO_Type;
  5453. /* ----------------------------------------------------------------------------
  5454. -- GPIO Register Masks
  5455. ---------------------------------------------------------------------------- */
  5456. /*!
  5457. * @addtogroup GPIO_Register_Masks GPIO Register Masks
  5458. * @{
  5459. */
  5460. /*! @name PDOR - Port Data Output Register */
  5461. #define GPIO_PDOR_PDO_MASK (0xFFFFFFFFU)
  5462. #define GPIO_PDOR_PDO_SHIFT (0U)
  5463. #define GPIO_PDOR_PDO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDOR_PDO_SHIFT)) & GPIO_PDOR_PDO_MASK)
  5464. /*! @name PSOR - Port Set Output Register */
  5465. #define GPIO_PSOR_PTSO_MASK (0xFFFFFFFFU)
  5466. #define GPIO_PSOR_PTSO_SHIFT (0U)
  5467. #define GPIO_PSOR_PTSO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PSOR_PTSO_SHIFT)) & GPIO_PSOR_PTSO_MASK)
  5468. /*! @name PCOR - Port Clear Output Register */
  5469. #define GPIO_PCOR_PTCO_MASK (0xFFFFFFFFU)
  5470. #define GPIO_PCOR_PTCO_SHIFT (0U)
  5471. #define GPIO_PCOR_PTCO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PCOR_PTCO_SHIFT)) & GPIO_PCOR_PTCO_MASK)
  5472. /*! @name PTOR - Port Toggle Output Register */
  5473. #define GPIO_PTOR_PTTO_MASK (0xFFFFFFFFU)
  5474. #define GPIO_PTOR_PTTO_SHIFT (0U)
  5475. #define GPIO_PTOR_PTTO(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PTOR_PTTO_SHIFT)) & GPIO_PTOR_PTTO_MASK)
  5476. /*! @name PDIR - Port Data Input Register */
  5477. #define GPIO_PDIR_PDI_MASK (0xFFFFFFFFU)
  5478. #define GPIO_PDIR_PDI_SHIFT (0U)
  5479. #define GPIO_PDIR_PDI(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDIR_PDI_SHIFT)) & GPIO_PDIR_PDI_MASK)
  5480. /*! @name PDDR - Port Data Direction Register */
  5481. #define GPIO_PDDR_PDD_MASK (0xFFFFFFFFU)
  5482. #define GPIO_PDDR_PDD_SHIFT (0U)
  5483. #define GPIO_PDDR_PDD(x) (((uint32_t)(((uint32_t)(x)) << GPIO_PDDR_PDD_SHIFT)) & GPIO_PDDR_PDD_MASK)
  5484. /*!
  5485. * @}
  5486. */ /* end of group GPIO_Register_Masks */
  5487. /* GPIO - Peripheral instance base addresses */
  5488. /** Peripheral GPIOA base address */
  5489. #define GPIOA_BASE (0x400FF000u)
  5490. /** Peripheral GPIOA base pointer */
  5491. #define GPIOA ((GPIO_Type *)GPIOA_BASE)
  5492. /** Peripheral GPIOB base address */
  5493. #define GPIOB_BASE (0x400FF040u)
  5494. /** Peripheral GPIOB base pointer */
  5495. #define GPIOB ((GPIO_Type *)GPIOB_BASE)
  5496. /** Peripheral GPIOC base address */
  5497. #define GPIOC_BASE (0x400FF080u)
  5498. /** Peripheral GPIOC base pointer */
  5499. #define GPIOC ((GPIO_Type *)GPIOC_BASE)
  5500. /** Peripheral GPIOD base address */
  5501. #define GPIOD_BASE (0x400FF0C0u)
  5502. /** Peripheral GPIOD base pointer */
  5503. #define GPIOD ((GPIO_Type *)GPIOD_BASE)
  5504. /** Peripheral GPIOE base address */
  5505. #define GPIOE_BASE (0x400FF100u)
  5506. /** Peripheral GPIOE base pointer */
  5507. #define GPIOE ((GPIO_Type *)GPIOE_BASE)
  5508. /** Array initializer of GPIO peripheral base addresses */
  5509. #define GPIO_BASE_ADDRS { GPIOA_BASE, GPIOB_BASE, GPIOC_BASE, GPIOD_BASE, GPIOE_BASE }
  5510. /** Array initializer of GPIO peripheral base pointers */
  5511. #define GPIO_BASE_PTRS { GPIOA, GPIOB, GPIOC, GPIOD, GPIOE }
  5512. /*!
  5513. * @}
  5514. */ /* end of group GPIO_Peripheral_Access_Layer */
  5515. /* ----------------------------------------------------------------------------
  5516. -- I2C Peripheral Access Layer
  5517. ---------------------------------------------------------------------------- */
  5518. /*!
  5519. * @addtogroup I2C_Peripheral_Access_Layer I2C Peripheral Access Layer
  5520. * @{
  5521. */
  5522. /** I2C - Register Layout Typedef */
  5523. typedef struct {
  5524. __IO uint8_t A1; /**< I2C Address Register 1, offset: 0x0 */
  5525. __IO uint8_t F; /**< I2C Frequency Divider register, offset: 0x1 */
  5526. __IO uint8_t C1; /**< I2C Control Register 1, offset: 0x2 */
  5527. __IO uint8_t S; /**< I2C Status register, offset: 0x3 */
  5528. __IO uint8_t D; /**< I2C Data I/O register, offset: 0x4 */
  5529. __IO uint8_t C2; /**< I2C Control Register 2, offset: 0x5 */
  5530. __IO uint8_t FLT; /**< I2C Programmable Input Glitch Filter register, offset: 0x6 */
  5531. __IO uint8_t RA; /**< I2C Range Address register, offset: 0x7 */
  5532. __IO uint8_t SMB; /**< I2C SMBus Control and Status register, offset: 0x8 */
  5533. __IO uint8_t A2; /**< I2C Address Register 2, offset: 0x9 */
  5534. __IO uint8_t SLTH; /**< I2C SCL Low Timeout Register High, offset: 0xA */
  5535. __IO uint8_t SLTL; /**< I2C SCL Low Timeout Register Low, offset: 0xB */
  5536. } I2C_Type;
  5537. /* ----------------------------------------------------------------------------
  5538. -- I2C Register Masks
  5539. ---------------------------------------------------------------------------- */
  5540. /*!
  5541. * @addtogroup I2C_Register_Masks I2C Register Masks
  5542. * @{
  5543. */
  5544. /*! @name A1 - I2C Address Register 1 */
  5545. #define I2C_A1_AD_MASK (0xFEU)
  5546. #define I2C_A1_AD_SHIFT (1U)
  5547. #define I2C_A1_AD(x) (((uint8_t)(((uint8_t)(x)) << I2C_A1_AD_SHIFT)) & I2C_A1_AD_MASK)
  5548. /*! @name F - I2C Frequency Divider register */
  5549. #define I2C_F_ICR_MASK (0x3FU)
  5550. #define I2C_F_ICR_SHIFT (0U)
  5551. #define I2C_F_ICR(x) (((uint8_t)(((uint8_t)(x)) << I2C_F_ICR_SHIFT)) & I2C_F_ICR_MASK)
  5552. #define I2C_F_MULT_MASK (0xC0U)
  5553. #define I2C_F_MULT_SHIFT (6U)
  5554. #define I2C_F_MULT(x) (((uint8_t)(((uint8_t)(x)) << I2C_F_MULT_SHIFT)) & I2C_F_MULT_MASK)
  5555. /*! @name C1 - I2C Control Register 1 */
  5556. #define I2C_C1_DMAEN_MASK (0x1U)
  5557. #define I2C_C1_DMAEN_SHIFT (0U)
  5558. #define I2C_C1_DMAEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_DMAEN_SHIFT)) & I2C_C1_DMAEN_MASK)
  5559. #define I2C_C1_WUEN_MASK (0x2U)
  5560. #define I2C_C1_WUEN_SHIFT (1U)
  5561. #define I2C_C1_WUEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_WUEN_SHIFT)) & I2C_C1_WUEN_MASK)
  5562. #define I2C_C1_RSTA_MASK (0x4U)
  5563. #define I2C_C1_RSTA_SHIFT (2U)
  5564. #define I2C_C1_RSTA(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_RSTA_SHIFT)) & I2C_C1_RSTA_MASK)
  5565. #define I2C_C1_TXAK_MASK (0x8U)
  5566. #define I2C_C1_TXAK_SHIFT (3U)
  5567. #define I2C_C1_TXAK(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_TXAK_SHIFT)) & I2C_C1_TXAK_MASK)
  5568. #define I2C_C1_TX_MASK (0x10U)
  5569. #define I2C_C1_TX_SHIFT (4U)
  5570. #define I2C_C1_TX(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_TX_SHIFT)) & I2C_C1_TX_MASK)
  5571. #define I2C_C1_MST_MASK (0x20U)
  5572. #define I2C_C1_MST_SHIFT (5U)
  5573. #define I2C_C1_MST(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_MST_SHIFT)) & I2C_C1_MST_MASK)
  5574. #define I2C_C1_IICIE_MASK (0x40U)
  5575. #define I2C_C1_IICIE_SHIFT (6U)
  5576. #define I2C_C1_IICIE(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_IICIE_SHIFT)) & I2C_C1_IICIE_MASK)
  5577. #define I2C_C1_IICEN_MASK (0x80U)
  5578. #define I2C_C1_IICEN_SHIFT (7U)
  5579. #define I2C_C1_IICEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C1_IICEN_SHIFT)) & I2C_C1_IICEN_MASK)
  5580. /*! @name S - I2C Status register */
  5581. #define I2C_S_RXAK_MASK (0x1U)
  5582. #define I2C_S_RXAK_SHIFT (0U)
  5583. #define I2C_S_RXAK(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_RXAK_SHIFT)) & I2C_S_RXAK_MASK)
  5584. #define I2C_S_IICIF_MASK (0x2U)
  5585. #define I2C_S_IICIF_SHIFT (1U)
  5586. #define I2C_S_IICIF(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_IICIF_SHIFT)) & I2C_S_IICIF_MASK)
  5587. #define I2C_S_SRW_MASK (0x4U)
  5588. #define I2C_S_SRW_SHIFT (2U)
  5589. #define I2C_S_SRW(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_SRW_SHIFT)) & I2C_S_SRW_MASK)
  5590. #define I2C_S_RAM_MASK (0x8U)
  5591. #define I2C_S_RAM_SHIFT (3U)
  5592. #define I2C_S_RAM(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_RAM_SHIFT)) & I2C_S_RAM_MASK)
  5593. #define I2C_S_ARBL_MASK (0x10U)
  5594. #define I2C_S_ARBL_SHIFT (4U)
  5595. #define I2C_S_ARBL(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_ARBL_SHIFT)) & I2C_S_ARBL_MASK)
  5596. #define I2C_S_BUSY_MASK (0x20U)
  5597. #define I2C_S_BUSY_SHIFT (5U)
  5598. #define I2C_S_BUSY(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_BUSY_SHIFT)) & I2C_S_BUSY_MASK)
  5599. #define I2C_S_IAAS_MASK (0x40U)
  5600. #define I2C_S_IAAS_SHIFT (6U)
  5601. #define I2C_S_IAAS(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_IAAS_SHIFT)) & I2C_S_IAAS_MASK)
  5602. #define I2C_S_TCF_MASK (0x80U)
  5603. #define I2C_S_TCF_SHIFT (7U)
  5604. #define I2C_S_TCF(x) (((uint8_t)(((uint8_t)(x)) << I2C_S_TCF_SHIFT)) & I2C_S_TCF_MASK)
  5605. /*! @name D - I2C Data I/O register */
  5606. #define I2C_D_DATA_MASK (0xFFU)
  5607. #define I2C_D_DATA_SHIFT (0U)
  5608. #define I2C_D_DATA(x) (((uint8_t)(((uint8_t)(x)) << I2C_D_DATA_SHIFT)) & I2C_D_DATA_MASK)
  5609. /*! @name C2 - I2C Control Register 2 */
  5610. #define I2C_C2_AD_MASK (0x7U)
  5611. #define I2C_C2_AD_SHIFT (0U)
  5612. #define I2C_C2_AD(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_AD_SHIFT)) & I2C_C2_AD_MASK)
  5613. #define I2C_C2_RMEN_MASK (0x8U)
  5614. #define I2C_C2_RMEN_SHIFT (3U)
  5615. #define I2C_C2_RMEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_RMEN_SHIFT)) & I2C_C2_RMEN_MASK)
  5616. #define I2C_C2_SBRC_MASK (0x10U)
  5617. #define I2C_C2_SBRC_SHIFT (4U)
  5618. #define I2C_C2_SBRC(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_SBRC_SHIFT)) & I2C_C2_SBRC_MASK)
  5619. #define I2C_C2_HDRS_MASK (0x20U)
  5620. #define I2C_C2_HDRS_SHIFT (5U)
  5621. #define I2C_C2_HDRS(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_HDRS_SHIFT)) & I2C_C2_HDRS_MASK)
  5622. #define I2C_C2_ADEXT_MASK (0x40U)
  5623. #define I2C_C2_ADEXT_SHIFT (6U)
  5624. #define I2C_C2_ADEXT(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_ADEXT_SHIFT)) & I2C_C2_ADEXT_MASK)
  5625. #define I2C_C2_GCAEN_MASK (0x80U)
  5626. #define I2C_C2_GCAEN_SHIFT (7U)
  5627. #define I2C_C2_GCAEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_C2_GCAEN_SHIFT)) & I2C_C2_GCAEN_MASK)
  5628. /*! @name FLT - I2C Programmable Input Glitch Filter register */
  5629. #define I2C_FLT_FLT_MASK (0xFU)
  5630. #define I2C_FLT_FLT_SHIFT (0U)
  5631. #define I2C_FLT_FLT(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_FLT_SHIFT)) & I2C_FLT_FLT_MASK)
  5632. #define I2C_FLT_STARTF_MASK (0x10U)
  5633. #define I2C_FLT_STARTF_SHIFT (4U)
  5634. #define I2C_FLT_STARTF(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_STARTF_SHIFT)) & I2C_FLT_STARTF_MASK)
  5635. #define I2C_FLT_SSIE_MASK (0x20U)
  5636. #define I2C_FLT_SSIE_SHIFT (5U)
  5637. #define I2C_FLT_SSIE(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_SSIE_SHIFT)) & I2C_FLT_SSIE_MASK)
  5638. #define I2C_FLT_STOPF_MASK (0x40U)
  5639. #define I2C_FLT_STOPF_SHIFT (6U)
  5640. #define I2C_FLT_STOPF(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_STOPF_SHIFT)) & I2C_FLT_STOPF_MASK)
  5641. #define I2C_FLT_SHEN_MASK (0x80U)
  5642. #define I2C_FLT_SHEN_SHIFT (7U)
  5643. #define I2C_FLT_SHEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_FLT_SHEN_SHIFT)) & I2C_FLT_SHEN_MASK)
  5644. /*! @name RA - I2C Range Address register */
  5645. #define I2C_RA_RAD_MASK (0xFEU)
  5646. #define I2C_RA_RAD_SHIFT (1U)
  5647. #define I2C_RA_RAD(x) (((uint8_t)(((uint8_t)(x)) << I2C_RA_RAD_SHIFT)) & I2C_RA_RAD_MASK)
  5648. /*! @name SMB - I2C SMBus Control and Status register */
  5649. #define I2C_SMB_SHTF2IE_MASK (0x1U)
  5650. #define I2C_SMB_SHTF2IE_SHIFT (0U)
  5651. #define I2C_SMB_SHTF2IE(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SHTF2IE_SHIFT)) & I2C_SMB_SHTF2IE_MASK)
  5652. #define I2C_SMB_SHTF2_MASK (0x2U)
  5653. #define I2C_SMB_SHTF2_SHIFT (1U)
  5654. #define I2C_SMB_SHTF2(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SHTF2_SHIFT)) & I2C_SMB_SHTF2_MASK)
  5655. #define I2C_SMB_SHTF1_MASK (0x4U)
  5656. #define I2C_SMB_SHTF1_SHIFT (2U)
  5657. #define I2C_SMB_SHTF1(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SHTF1_SHIFT)) & I2C_SMB_SHTF1_MASK)
  5658. #define I2C_SMB_SLTF_MASK (0x8U)
  5659. #define I2C_SMB_SLTF_SHIFT (3U)
  5660. #define I2C_SMB_SLTF(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SLTF_SHIFT)) & I2C_SMB_SLTF_MASK)
  5661. #define I2C_SMB_TCKSEL_MASK (0x10U)
  5662. #define I2C_SMB_TCKSEL_SHIFT (4U)
  5663. #define I2C_SMB_TCKSEL(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_TCKSEL_SHIFT)) & I2C_SMB_TCKSEL_MASK)
  5664. #define I2C_SMB_SIICAEN_MASK (0x20U)
  5665. #define I2C_SMB_SIICAEN_SHIFT (5U)
  5666. #define I2C_SMB_SIICAEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_SIICAEN_SHIFT)) & I2C_SMB_SIICAEN_MASK)
  5667. #define I2C_SMB_ALERTEN_MASK (0x40U)
  5668. #define I2C_SMB_ALERTEN_SHIFT (6U)
  5669. #define I2C_SMB_ALERTEN(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_ALERTEN_SHIFT)) & I2C_SMB_ALERTEN_MASK)
  5670. #define I2C_SMB_FACK_MASK (0x80U)
  5671. #define I2C_SMB_FACK_SHIFT (7U)
  5672. #define I2C_SMB_FACK(x) (((uint8_t)(((uint8_t)(x)) << I2C_SMB_FACK_SHIFT)) & I2C_SMB_FACK_MASK)
  5673. /*! @name A2 - I2C Address Register 2 */
  5674. #define I2C_A2_SAD_MASK (0xFEU)
  5675. #define I2C_A2_SAD_SHIFT (1U)
  5676. #define I2C_A2_SAD(x) (((uint8_t)(((uint8_t)(x)) << I2C_A2_SAD_SHIFT)) & I2C_A2_SAD_MASK)
  5677. /*! @name SLTH - I2C SCL Low Timeout Register High */
  5678. #define I2C_SLTH_SSLT_MASK (0xFFU)
  5679. #define I2C_SLTH_SSLT_SHIFT (0U)
  5680. #define I2C_SLTH_SSLT(x) (((uint8_t)(((uint8_t)(x)) << I2C_SLTH_SSLT_SHIFT)) & I2C_SLTH_SSLT_MASK)
  5681. /*! @name SLTL - I2C SCL Low Timeout Register Low */
  5682. #define I2C_SLTL_SSLT_MASK (0xFFU)
  5683. #define I2C_SLTL_SSLT_SHIFT (0U)
  5684. #define I2C_SLTL_SSLT(x) (((uint8_t)(((uint8_t)(x)) << I2C_SLTL_SSLT_SHIFT)) & I2C_SLTL_SSLT_MASK)
  5685. /*!
  5686. * @}
  5687. */ /* end of group I2C_Register_Masks */
  5688. /* I2C - Peripheral instance base addresses */
  5689. /** Peripheral I2C0 base address */
  5690. #define I2C0_BASE (0x40066000u)
  5691. /** Peripheral I2C0 base pointer */
  5692. #define I2C0 ((I2C_Type *)I2C0_BASE)
  5693. /** Peripheral I2C1 base address */
  5694. #define I2C1_BASE (0x40067000u)
  5695. /** Peripheral I2C1 base pointer */
  5696. #define I2C1 ((I2C_Type *)I2C1_BASE)
  5697. /** Peripheral I2C2 base address */
  5698. #define I2C2_BASE (0x400E6000u)
  5699. /** Peripheral I2C2 base pointer */
  5700. #define I2C2 ((I2C_Type *)I2C2_BASE)
  5701. /** Array initializer of I2C peripheral base addresses */
  5702. #define I2C_BASE_ADDRS { I2C0_BASE, I2C1_BASE, I2C2_BASE }
  5703. /** Array initializer of I2C peripheral base pointers */
  5704. #define I2C_BASE_PTRS { I2C0, I2C1, I2C2 }
  5705. /** Interrupt vectors for the I2C peripheral type */
  5706. #define I2C_IRQS { I2C0_IRQn, I2C1_IRQn, I2C2_IRQn }
  5707. /*!
  5708. * @}
  5709. */ /* end of group I2C_Peripheral_Access_Layer */
  5710. /* ----------------------------------------------------------------------------
  5711. -- I2S Peripheral Access Layer
  5712. ---------------------------------------------------------------------------- */
  5713. /*!
  5714. * @addtogroup I2S_Peripheral_Access_Layer I2S Peripheral Access Layer
  5715. * @{
  5716. */
  5717. /** I2S - Register Layout Typedef */
  5718. typedef struct {
  5719. __IO uint32_t TCSR; /**< SAI Transmit Control Register, offset: 0x0 */
  5720. __IO uint32_t TCR1; /**< SAI Transmit Configuration 1 Register, offset: 0x4 */
  5721. __IO uint32_t TCR2; /**< SAI Transmit Configuration 2 Register, offset: 0x8 */
  5722. __IO uint32_t TCR3; /**< SAI Transmit Configuration 3 Register, offset: 0xC */
  5723. __IO uint32_t TCR4; /**< SAI Transmit Configuration 4 Register, offset: 0x10 */
  5724. __IO uint32_t TCR5; /**< SAI Transmit Configuration 5 Register, offset: 0x14 */
  5725. uint8_t RESERVED_0[8];
  5726. __O uint32_t TDR[2]; /**< SAI Transmit Data Register, array offset: 0x20, array step: 0x4 */
  5727. uint8_t RESERVED_1[24];
  5728. __I uint32_t TFR[2]; /**< SAI Transmit FIFO Register, array offset: 0x40, array step: 0x4 */
  5729. uint8_t RESERVED_2[24];
  5730. __IO uint32_t TMR; /**< SAI Transmit Mask Register, offset: 0x60 */
  5731. uint8_t RESERVED_3[28];
  5732. __IO uint32_t RCSR; /**< SAI Receive Control Register, offset: 0x80 */
  5733. __IO uint32_t RCR1; /**< SAI Receive Configuration 1 Register, offset: 0x84 */
  5734. __IO uint32_t RCR2; /**< SAI Receive Configuration 2 Register, offset: 0x88 */
  5735. __IO uint32_t RCR3; /**< SAI Receive Configuration 3 Register, offset: 0x8C */
  5736. __IO uint32_t RCR4; /**< SAI Receive Configuration 4 Register, offset: 0x90 */
  5737. __IO uint32_t RCR5; /**< SAI Receive Configuration 5 Register, offset: 0x94 */
  5738. uint8_t RESERVED_4[8];
  5739. __I uint32_t RDR[2]; /**< SAI Receive Data Register, array offset: 0xA0, array step: 0x4 */
  5740. uint8_t RESERVED_5[24];
  5741. __I uint32_t RFR[2]; /**< SAI Receive FIFO Register, array offset: 0xC0, array step: 0x4 */
  5742. uint8_t RESERVED_6[24];
  5743. __IO uint32_t RMR; /**< SAI Receive Mask Register, offset: 0xE0 */
  5744. uint8_t RESERVED_7[28];
  5745. __IO uint32_t MCR; /**< SAI MCLK Control Register, offset: 0x100 */
  5746. __IO uint32_t MDR; /**< SAI MCLK Divide Register, offset: 0x104 */
  5747. } I2S_Type;
  5748. /* ----------------------------------------------------------------------------
  5749. -- I2S Register Masks
  5750. ---------------------------------------------------------------------------- */
  5751. /*!
  5752. * @addtogroup I2S_Register_Masks I2S Register Masks
  5753. * @{
  5754. */
  5755. /*! @name TCSR - SAI Transmit Control Register */
  5756. #define I2S_TCSR_FRDE_MASK (0x1U)
  5757. #define I2S_TCSR_FRDE_SHIFT (0U)
  5758. #define I2S_TCSR_FRDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRDE_SHIFT)) & I2S_TCSR_FRDE_MASK)
  5759. #define I2S_TCSR_FWDE_MASK (0x2U)
  5760. #define I2S_TCSR_FWDE_SHIFT (1U)
  5761. #define I2S_TCSR_FWDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWDE_SHIFT)) & I2S_TCSR_FWDE_MASK)
  5762. #define I2S_TCSR_FRIE_MASK (0x100U)
  5763. #define I2S_TCSR_FRIE_SHIFT (8U)
  5764. #define I2S_TCSR_FRIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRIE_SHIFT)) & I2S_TCSR_FRIE_MASK)
  5765. #define I2S_TCSR_FWIE_MASK (0x200U)
  5766. #define I2S_TCSR_FWIE_SHIFT (9U)
  5767. #define I2S_TCSR_FWIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWIE_SHIFT)) & I2S_TCSR_FWIE_MASK)
  5768. #define I2S_TCSR_FEIE_MASK (0x400U)
  5769. #define I2S_TCSR_FEIE_SHIFT (10U)
  5770. #define I2S_TCSR_FEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FEIE_SHIFT)) & I2S_TCSR_FEIE_MASK)
  5771. #define I2S_TCSR_SEIE_MASK (0x800U)
  5772. #define I2S_TCSR_SEIE_SHIFT (11U)
  5773. #define I2S_TCSR_SEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SEIE_SHIFT)) & I2S_TCSR_SEIE_MASK)
  5774. #define I2S_TCSR_WSIE_MASK (0x1000U)
  5775. #define I2S_TCSR_WSIE_SHIFT (12U)
  5776. #define I2S_TCSR_WSIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_WSIE_SHIFT)) & I2S_TCSR_WSIE_MASK)
  5777. #define I2S_TCSR_FRF_MASK (0x10000U)
  5778. #define I2S_TCSR_FRF_SHIFT (16U)
  5779. #define I2S_TCSR_FRF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FRF_SHIFT)) & I2S_TCSR_FRF_MASK)
  5780. #define I2S_TCSR_FWF_MASK (0x20000U)
  5781. #define I2S_TCSR_FWF_SHIFT (17U)
  5782. #define I2S_TCSR_FWF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FWF_SHIFT)) & I2S_TCSR_FWF_MASK)
  5783. #define I2S_TCSR_FEF_MASK (0x40000U)
  5784. #define I2S_TCSR_FEF_SHIFT (18U)
  5785. #define I2S_TCSR_FEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FEF_SHIFT)) & I2S_TCSR_FEF_MASK)
  5786. #define I2S_TCSR_SEF_MASK (0x80000U)
  5787. #define I2S_TCSR_SEF_SHIFT (19U)
  5788. #define I2S_TCSR_SEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SEF_SHIFT)) & I2S_TCSR_SEF_MASK)
  5789. #define I2S_TCSR_WSF_MASK (0x100000U)
  5790. #define I2S_TCSR_WSF_SHIFT (20U)
  5791. #define I2S_TCSR_WSF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_WSF_SHIFT)) & I2S_TCSR_WSF_MASK)
  5792. #define I2S_TCSR_SR_MASK (0x1000000U)
  5793. #define I2S_TCSR_SR_SHIFT (24U)
  5794. #define I2S_TCSR_SR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_SR_SHIFT)) & I2S_TCSR_SR_MASK)
  5795. #define I2S_TCSR_FR_MASK (0x2000000U)
  5796. #define I2S_TCSR_FR_SHIFT (25U)
  5797. #define I2S_TCSR_FR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_FR_SHIFT)) & I2S_TCSR_FR_MASK)
  5798. #define I2S_TCSR_BCE_MASK (0x10000000U)
  5799. #define I2S_TCSR_BCE_SHIFT (28U)
  5800. #define I2S_TCSR_BCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_BCE_SHIFT)) & I2S_TCSR_BCE_MASK)
  5801. #define I2S_TCSR_DBGE_MASK (0x20000000U)
  5802. #define I2S_TCSR_DBGE_SHIFT (29U)
  5803. #define I2S_TCSR_DBGE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_DBGE_SHIFT)) & I2S_TCSR_DBGE_MASK)
  5804. #define I2S_TCSR_STOPE_MASK (0x40000000U)
  5805. #define I2S_TCSR_STOPE_SHIFT (30U)
  5806. #define I2S_TCSR_STOPE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_STOPE_SHIFT)) & I2S_TCSR_STOPE_MASK)
  5807. #define I2S_TCSR_TE_MASK (0x80000000U)
  5808. #define I2S_TCSR_TE_SHIFT (31U)
  5809. #define I2S_TCSR_TE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCSR_TE_SHIFT)) & I2S_TCSR_TE_MASK)
  5810. /*! @name TCR1 - SAI Transmit Configuration 1 Register */
  5811. #define I2S_TCR1_TFW_MASK (0x7U)
  5812. #define I2S_TCR1_TFW_SHIFT (0U)
  5813. #define I2S_TCR1_TFW(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR1_TFW_SHIFT)) & I2S_TCR1_TFW_MASK)
  5814. /*! @name TCR2 - SAI Transmit Configuration 2 Register */
  5815. #define I2S_TCR2_DIV_MASK (0xFFU)
  5816. #define I2S_TCR2_DIV_SHIFT (0U)
  5817. #define I2S_TCR2_DIV(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_DIV_SHIFT)) & I2S_TCR2_DIV_MASK)
  5818. #define I2S_TCR2_BCD_MASK (0x1000000U)
  5819. #define I2S_TCR2_BCD_SHIFT (24U)
  5820. #define I2S_TCR2_BCD(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCD_SHIFT)) & I2S_TCR2_BCD_MASK)
  5821. #define I2S_TCR2_BCP_MASK (0x2000000U)
  5822. #define I2S_TCR2_BCP_SHIFT (25U)
  5823. #define I2S_TCR2_BCP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCP_SHIFT)) & I2S_TCR2_BCP_MASK)
  5824. #define I2S_TCR2_MSEL_MASK (0xC000000U)
  5825. #define I2S_TCR2_MSEL_SHIFT (26U)
  5826. #define I2S_TCR2_MSEL(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_MSEL_SHIFT)) & I2S_TCR2_MSEL_MASK)
  5827. #define I2S_TCR2_BCI_MASK (0x10000000U)
  5828. #define I2S_TCR2_BCI_SHIFT (28U)
  5829. #define I2S_TCR2_BCI(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCI_SHIFT)) & I2S_TCR2_BCI_MASK)
  5830. #define I2S_TCR2_BCS_MASK (0x20000000U)
  5831. #define I2S_TCR2_BCS_SHIFT (29U)
  5832. #define I2S_TCR2_BCS(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_BCS_SHIFT)) & I2S_TCR2_BCS_MASK)
  5833. #define I2S_TCR2_SYNC_MASK (0xC0000000U)
  5834. #define I2S_TCR2_SYNC_SHIFT (30U)
  5835. #define I2S_TCR2_SYNC(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR2_SYNC_SHIFT)) & I2S_TCR2_SYNC_MASK)
  5836. /*! @name TCR3 - SAI Transmit Configuration 3 Register */
  5837. #define I2S_TCR3_WDFL_MASK (0x1FU)
  5838. #define I2S_TCR3_WDFL_SHIFT (0U)
  5839. #define I2S_TCR3_WDFL(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_WDFL_SHIFT)) & I2S_TCR3_WDFL_MASK)
  5840. #define I2S_TCR3_TCE_MASK (0x30000U)
  5841. #define I2S_TCR3_TCE_SHIFT (16U)
  5842. #define I2S_TCR3_TCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR3_TCE_SHIFT)) & I2S_TCR3_TCE_MASK)
  5843. /*! @name TCR4 - SAI Transmit Configuration 4 Register */
  5844. #define I2S_TCR4_FSD_MASK (0x1U)
  5845. #define I2S_TCR4_FSD_SHIFT (0U)
  5846. #define I2S_TCR4_FSD(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSD_SHIFT)) & I2S_TCR4_FSD_MASK)
  5847. #define I2S_TCR4_FSP_MASK (0x2U)
  5848. #define I2S_TCR4_FSP_SHIFT (1U)
  5849. #define I2S_TCR4_FSP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSP_SHIFT)) & I2S_TCR4_FSP_MASK)
  5850. #define I2S_TCR4_FSE_MASK (0x8U)
  5851. #define I2S_TCR4_FSE_SHIFT (3U)
  5852. #define I2S_TCR4_FSE(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FSE_SHIFT)) & I2S_TCR4_FSE_MASK)
  5853. #define I2S_TCR4_MF_MASK (0x10U)
  5854. #define I2S_TCR4_MF_SHIFT (4U)
  5855. #define I2S_TCR4_MF(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_MF_SHIFT)) & I2S_TCR4_MF_MASK)
  5856. #define I2S_TCR4_SYWD_MASK (0x1F00U)
  5857. #define I2S_TCR4_SYWD_SHIFT (8U)
  5858. #define I2S_TCR4_SYWD(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_SYWD_SHIFT)) & I2S_TCR4_SYWD_MASK)
  5859. #define I2S_TCR4_FRSZ_MASK (0x1F0000U)
  5860. #define I2S_TCR4_FRSZ_SHIFT (16U)
  5861. #define I2S_TCR4_FRSZ(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR4_FRSZ_SHIFT)) & I2S_TCR4_FRSZ_MASK)
  5862. /*! @name TCR5 - SAI Transmit Configuration 5 Register */
  5863. #define I2S_TCR5_FBT_MASK (0x1F00U)
  5864. #define I2S_TCR5_FBT_SHIFT (8U)
  5865. #define I2S_TCR5_FBT(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_FBT_SHIFT)) & I2S_TCR5_FBT_MASK)
  5866. #define I2S_TCR5_W0W_MASK (0x1F0000U)
  5867. #define I2S_TCR5_W0W_SHIFT (16U)
  5868. #define I2S_TCR5_W0W(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_W0W_SHIFT)) & I2S_TCR5_W0W_MASK)
  5869. #define I2S_TCR5_WNW_MASK (0x1F000000U)
  5870. #define I2S_TCR5_WNW_SHIFT (24U)
  5871. #define I2S_TCR5_WNW(x) (((uint32_t)(((uint32_t)(x)) << I2S_TCR5_WNW_SHIFT)) & I2S_TCR5_WNW_MASK)
  5872. /*! @name TDR - SAI Transmit Data Register */
  5873. #define I2S_TDR_TDR_MASK (0xFFFFFFFFU)
  5874. #define I2S_TDR_TDR_SHIFT (0U)
  5875. #define I2S_TDR_TDR(x) (((uint32_t)(((uint32_t)(x)) << I2S_TDR_TDR_SHIFT)) & I2S_TDR_TDR_MASK)
  5876. /* The count of I2S_TDR */
  5877. #define I2S_TDR_COUNT (2U)
  5878. /*! @name TFR - SAI Transmit FIFO Register */
  5879. #define I2S_TFR_RFP_MASK (0xFU)
  5880. #define I2S_TFR_RFP_SHIFT (0U)
  5881. #define I2S_TFR_RFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TFR_RFP_SHIFT)) & I2S_TFR_RFP_MASK)
  5882. #define I2S_TFR_WFP_MASK (0xF0000U)
  5883. #define I2S_TFR_WFP_SHIFT (16U)
  5884. #define I2S_TFR_WFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_TFR_WFP_SHIFT)) & I2S_TFR_WFP_MASK)
  5885. /* The count of I2S_TFR */
  5886. #define I2S_TFR_COUNT (2U)
  5887. /*! @name TMR - SAI Transmit Mask Register */
  5888. #define I2S_TMR_TWM_MASK (0xFFFFFFFFU)
  5889. #define I2S_TMR_TWM_SHIFT (0U)
  5890. #define I2S_TMR_TWM(x) (((uint32_t)(((uint32_t)(x)) << I2S_TMR_TWM_SHIFT)) & I2S_TMR_TWM_MASK)
  5891. /*! @name RCSR - SAI Receive Control Register */
  5892. #define I2S_RCSR_FRDE_MASK (0x1U)
  5893. #define I2S_RCSR_FRDE_SHIFT (0U)
  5894. #define I2S_RCSR_FRDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRDE_SHIFT)) & I2S_RCSR_FRDE_MASK)
  5895. #define I2S_RCSR_FWDE_MASK (0x2U)
  5896. #define I2S_RCSR_FWDE_SHIFT (1U)
  5897. #define I2S_RCSR_FWDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWDE_SHIFT)) & I2S_RCSR_FWDE_MASK)
  5898. #define I2S_RCSR_FRIE_MASK (0x100U)
  5899. #define I2S_RCSR_FRIE_SHIFT (8U)
  5900. #define I2S_RCSR_FRIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRIE_SHIFT)) & I2S_RCSR_FRIE_MASK)
  5901. #define I2S_RCSR_FWIE_MASK (0x200U)
  5902. #define I2S_RCSR_FWIE_SHIFT (9U)
  5903. #define I2S_RCSR_FWIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWIE_SHIFT)) & I2S_RCSR_FWIE_MASK)
  5904. #define I2S_RCSR_FEIE_MASK (0x400U)
  5905. #define I2S_RCSR_FEIE_SHIFT (10U)
  5906. #define I2S_RCSR_FEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FEIE_SHIFT)) & I2S_RCSR_FEIE_MASK)
  5907. #define I2S_RCSR_SEIE_MASK (0x800U)
  5908. #define I2S_RCSR_SEIE_SHIFT (11U)
  5909. #define I2S_RCSR_SEIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SEIE_SHIFT)) & I2S_RCSR_SEIE_MASK)
  5910. #define I2S_RCSR_WSIE_MASK (0x1000U)
  5911. #define I2S_RCSR_WSIE_SHIFT (12U)
  5912. #define I2S_RCSR_WSIE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_WSIE_SHIFT)) & I2S_RCSR_WSIE_MASK)
  5913. #define I2S_RCSR_FRF_MASK (0x10000U)
  5914. #define I2S_RCSR_FRF_SHIFT (16U)
  5915. #define I2S_RCSR_FRF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FRF_SHIFT)) & I2S_RCSR_FRF_MASK)
  5916. #define I2S_RCSR_FWF_MASK (0x20000U)
  5917. #define I2S_RCSR_FWF_SHIFT (17U)
  5918. #define I2S_RCSR_FWF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FWF_SHIFT)) & I2S_RCSR_FWF_MASK)
  5919. #define I2S_RCSR_FEF_MASK (0x40000U)
  5920. #define I2S_RCSR_FEF_SHIFT (18U)
  5921. #define I2S_RCSR_FEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FEF_SHIFT)) & I2S_RCSR_FEF_MASK)
  5922. #define I2S_RCSR_SEF_MASK (0x80000U)
  5923. #define I2S_RCSR_SEF_SHIFT (19U)
  5924. #define I2S_RCSR_SEF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SEF_SHIFT)) & I2S_RCSR_SEF_MASK)
  5925. #define I2S_RCSR_WSF_MASK (0x100000U)
  5926. #define I2S_RCSR_WSF_SHIFT (20U)
  5927. #define I2S_RCSR_WSF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_WSF_SHIFT)) & I2S_RCSR_WSF_MASK)
  5928. #define I2S_RCSR_SR_MASK (0x1000000U)
  5929. #define I2S_RCSR_SR_SHIFT (24U)
  5930. #define I2S_RCSR_SR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_SR_SHIFT)) & I2S_RCSR_SR_MASK)
  5931. #define I2S_RCSR_FR_MASK (0x2000000U)
  5932. #define I2S_RCSR_FR_SHIFT (25U)
  5933. #define I2S_RCSR_FR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_FR_SHIFT)) & I2S_RCSR_FR_MASK)
  5934. #define I2S_RCSR_BCE_MASK (0x10000000U)
  5935. #define I2S_RCSR_BCE_SHIFT (28U)
  5936. #define I2S_RCSR_BCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_BCE_SHIFT)) & I2S_RCSR_BCE_MASK)
  5937. #define I2S_RCSR_DBGE_MASK (0x20000000U)
  5938. #define I2S_RCSR_DBGE_SHIFT (29U)
  5939. #define I2S_RCSR_DBGE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_DBGE_SHIFT)) & I2S_RCSR_DBGE_MASK)
  5940. #define I2S_RCSR_STOPE_MASK (0x40000000U)
  5941. #define I2S_RCSR_STOPE_SHIFT (30U)
  5942. #define I2S_RCSR_STOPE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_STOPE_SHIFT)) & I2S_RCSR_STOPE_MASK)
  5943. #define I2S_RCSR_RE_MASK (0x80000000U)
  5944. #define I2S_RCSR_RE_SHIFT (31U)
  5945. #define I2S_RCSR_RE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCSR_RE_SHIFT)) & I2S_RCSR_RE_MASK)
  5946. /*! @name RCR1 - SAI Receive Configuration 1 Register */
  5947. #define I2S_RCR1_RFW_MASK (0x7U)
  5948. #define I2S_RCR1_RFW_SHIFT (0U)
  5949. #define I2S_RCR1_RFW(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR1_RFW_SHIFT)) & I2S_RCR1_RFW_MASK)
  5950. /*! @name RCR2 - SAI Receive Configuration 2 Register */
  5951. #define I2S_RCR2_DIV_MASK (0xFFU)
  5952. #define I2S_RCR2_DIV_SHIFT (0U)
  5953. #define I2S_RCR2_DIV(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_DIV_SHIFT)) & I2S_RCR2_DIV_MASK)
  5954. #define I2S_RCR2_BCD_MASK (0x1000000U)
  5955. #define I2S_RCR2_BCD_SHIFT (24U)
  5956. #define I2S_RCR2_BCD(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCD_SHIFT)) & I2S_RCR2_BCD_MASK)
  5957. #define I2S_RCR2_BCP_MASK (0x2000000U)
  5958. #define I2S_RCR2_BCP_SHIFT (25U)
  5959. #define I2S_RCR2_BCP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCP_SHIFT)) & I2S_RCR2_BCP_MASK)
  5960. #define I2S_RCR2_MSEL_MASK (0xC000000U)
  5961. #define I2S_RCR2_MSEL_SHIFT (26U)
  5962. #define I2S_RCR2_MSEL(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_MSEL_SHIFT)) & I2S_RCR2_MSEL_MASK)
  5963. #define I2S_RCR2_BCI_MASK (0x10000000U)
  5964. #define I2S_RCR2_BCI_SHIFT (28U)
  5965. #define I2S_RCR2_BCI(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCI_SHIFT)) & I2S_RCR2_BCI_MASK)
  5966. #define I2S_RCR2_BCS_MASK (0x20000000U)
  5967. #define I2S_RCR2_BCS_SHIFT (29U)
  5968. #define I2S_RCR2_BCS(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_BCS_SHIFT)) & I2S_RCR2_BCS_MASK)
  5969. #define I2S_RCR2_SYNC_MASK (0xC0000000U)
  5970. #define I2S_RCR2_SYNC_SHIFT (30U)
  5971. #define I2S_RCR2_SYNC(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR2_SYNC_SHIFT)) & I2S_RCR2_SYNC_MASK)
  5972. /*! @name RCR3 - SAI Receive Configuration 3 Register */
  5973. #define I2S_RCR3_WDFL_MASK (0x1FU)
  5974. #define I2S_RCR3_WDFL_SHIFT (0U)
  5975. #define I2S_RCR3_WDFL(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_WDFL_SHIFT)) & I2S_RCR3_WDFL_MASK)
  5976. #define I2S_RCR3_RCE_MASK (0x30000U)
  5977. #define I2S_RCR3_RCE_SHIFT (16U)
  5978. #define I2S_RCR3_RCE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR3_RCE_SHIFT)) & I2S_RCR3_RCE_MASK)
  5979. /*! @name RCR4 - SAI Receive Configuration 4 Register */
  5980. #define I2S_RCR4_FSD_MASK (0x1U)
  5981. #define I2S_RCR4_FSD_SHIFT (0U)
  5982. #define I2S_RCR4_FSD(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSD_SHIFT)) & I2S_RCR4_FSD_MASK)
  5983. #define I2S_RCR4_FSP_MASK (0x2U)
  5984. #define I2S_RCR4_FSP_SHIFT (1U)
  5985. #define I2S_RCR4_FSP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSP_SHIFT)) & I2S_RCR4_FSP_MASK)
  5986. #define I2S_RCR4_FSE_MASK (0x8U)
  5987. #define I2S_RCR4_FSE_SHIFT (3U)
  5988. #define I2S_RCR4_FSE(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FSE_SHIFT)) & I2S_RCR4_FSE_MASK)
  5989. #define I2S_RCR4_MF_MASK (0x10U)
  5990. #define I2S_RCR4_MF_SHIFT (4U)
  5991. #define I2S_RCR4_MF(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_MF_SHIFT)) & I2S_RCR4_MF_MASK)
  5992. #define I2S_RCR4_SYWD_MASK (0x1F00U)
  5993. #define I2S_RCR4_SYWD_SHIFT (8U)
  5994. #define I2S_RCR4_SYWD(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_SYWD_SHIFT)) & I2S_RCR4_SYWD_MASK)
  5995. #define I2S_RCR4_FRSZ_MASK (0x1F0000U)
  5996. #define I2S_RCR4_FRSZ_SHIFT (16U)
  5997. #define I2S_RCR4_FRSZ(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR4_FRSZ_SHIFT)) & I2S_RCR4_FRSZ_MASK)
  5998. /*! @name RCR5 - SAI Receive Configuration 5 Register */
  5999. #define I2S_RCR5_FBT_MASK (0x1F00U)
  6000. #define I2S_RCR5_FBT_SHIFT (8U)
  6001. #define I2S_RCR5_FBT(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_FBT_SHIFT)) & I2S_RCR5_FBT_MASK)
  6002. #define I2S_RCR5_W0W_MASK (0x1F0000U)
  6003. #define I2S_RCR5_W0W_SHIFT (16U)
  6004. #define I2S_RCR5_W0W(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_W0W_SHIFT)) & I2S_RCR5_W0W_MASK)
  6005. #define I2S_RCR5_WNW_MASK (0x1F000000U)
  6006. #define I2S_RCR5_WNW_SHIFT (24U)
  6007. #define I2S_RCR5_WNW(x) (((uint32_t)(((uint32_t)(x)) << I2S_RCR5_WNW_SHIFT)) & I2S_RCR5_WNW_MASK)
  6008. /*! @name RDR - SAI Receive Data Register */
  6009. #define I2S_RDR_RDR_MASK (0xFFFFFFFFU)
  6010. #define I2S_RDR_RDR_SHIFT (0U)
  6011. #define I2S_RDR_RDR(x) (((uint32_t)(((uint32_t)(x)) << I2S_RDR_RDR_SHIFT)) & I2S_RDR_RDR_MASK)
  6012. /* The count of I2S_RDR */
  6013. #define I2S_RDR_COUNT (2U)
  6014. /*! @name RFR - SAI Receive FIFO Register */
  6015. #define I2S_RFR_RFP_MASK (0xFU)
  6016. #define I2S_RFR_RFP_SHIFT (0U)
  6017. #define I2S_RFR_RFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RFR_RFP_SHIFT)) & I2S_RFR_RFP_MASK)
  6018. #define I2S_RFR_WFP_MASK (0xF0000U)
  6019. #define I2S_RFR_WFP_SHIFT (16U)
  6020. #define I2S_RFR_WFP(x) (((uint32_t)(((uint32_t)(x)) << I2S_RFR_WFP_SHIFT)) & I2S_RFR_WFP_MASK)
  6021. /* The count of I2S_RFR */
  6022. #define I2S_RFR_COUNT (2U)
  6023. /*! @name RMR - SAI Receive Mask Register */
  6024. #define I2S_RMR_RWM_MASK (0xFFFFFFFFU)
  6025. #define I2S_RMR_RWM_SHIFT (0U)
  6026. #define I2S_RMR_RWM(x) (((uint32_t)(((uint32_t)(x)) << I2S_RMR_RWM_SHIFT)) & I2S_RMR_RWM_MASK)
  6027. /*! @name MCR - SAI MCLK Control Register */
  6028. #define I2S_MCR_MICS_MASK (0x3000000U)
  6029. #define I2S_MCR_MICS_SHIFT (24U)
  6030. #define I2S_MCR_MICS(x) (((uint32_t)(((uint32_t)(x)) << I2S_MCR_MICS_SHIFT)) & I2S_MCR_MICS_MASK)
  6031. #define I2S_MCR_MOE_MASK (0x40000000U)
  6032. #define I2S_MCR_MOE_SHIFT (30U)
  6033. #define I2S_MCR_MOE(x) (((uint32_t)(((uint32_t)(x)) << I2S_MCR_MOE_SHIFT)) & I2S_MCR_MOE_MASK)
  6034. #define I2S_MCR_DUF_MASK (0x80000000U)
  6035. #define I2S_MCR_DUF_SHIFT (31U)
  6036. #define I2S_MCR_DUF(x) (((uint32_t)(((uint32_t)(x)) << I2S_MCR_DUF_SHIFT)) & I2S_MCR_DUF_MASK)
  6037. /*! @name MDR - SAI MCLK Divide Register */
  6038. #define I2S_MDR_DIVIDE_MASK (0xFFFU)
  6039. #define I2S_MDR_DIVIDE_SHIFT (0U)
  6040. #define I2S_MDR_DIVIDE(x) (((uint32_t)(((uint32_t)(x)) << I2S_MDR_DIVIDE_SHIFT)) & I2S_MDR_DIVIDE_MASK)
  6041. #define I2S_MDR_FRACT_MASK (0xFF000U)
  6042. #define I2S_MDR_FRACT_SHIFT (12U)
  6043. #define I2S_MDR_FRACT(x) (((uint32_t)(((uint32_t)(x)) << I2S_MDR_FRACT_SHIFT)) & I2S_MDR_FRACT_MASK)
  6044. /*!
  6045. * @}
  6046. */ /* end of group I2S_Register_Masks */
  6047. /* I2S - Peripheral instance base addresses */
  6048. /** Peripheral I2S0 base address */
  6049. #define I2S0_BASE (0x4002F000u)
  6050. /** Peripheral I2S0 base pointer */
  6051. #define I2S0 ((I2S_Type *)I2S0_BASE)
  6052. /** Array initializer of I2S peripheral base addresses */
  6053. #define I2S_BASE_ADDRS { I2S0_BASE }
  6054. /** Array initializer of I2S peripheral base pointers */
  6055. #define I2S_BASE_PTRS { I2S0 }
  6056. /** Interrupt vectors for the I2S peripheral type */
  6057. #define I2S_RX_IRQS { I2S0_Rx_IRQn }
  6058. #define I2S_TX_IRQS { I2S0_Tx_IRQn }
  6059. /*!
  6060. * @}
  6061. */ /* end of group I2S_Peripheral_Access_Layer */
  6062. /* ----------------------------------------------------------------------------
  6063. -- LLWU Peripheral Access Layer
  6064. ---------------------------------------------------------------------------- */
  6065. /*!
  6066. * @addtogroup LLWU_Peripheral_Access_Layer LLWU Peripheral Access Layer
  6067. * @{
  6068. */
  6069. /** LLWU - Register Layout Typedef */
  6070. typedef struct {
  6071. __IO uint8_t PE1; /**< LLWU Pin Enable 1 register, offset: 0x0 */
  6072. __IO uint8_t PE2; /**< LLWU Pin Enable 2 register, offset: 0x1 */
  6073. __IO uint8_t PE3; /**< LLWU Pin Enable 3 register, offset: 0x2 */
  6074. __IO uint8_t PE4; /**< LLWU Pin Enable 4 register, offset: 0x3 */
  6075. __IO uint8_t ME; /**< LLWU Module Enable register, offset: 0x4 */
  6076. __IO uint8_t F1; /**< LLWU Flag 1 register, offset: 0x5 */
  6077. __IO uint8_t F2; /**< LLWU Flag 2 register, offset: 0x6 */
  6078. __I uint8_t F3; /**< LLWU Flag 3 register, offset: 0x7 */
  6079. __IO uint8_t FILT1; /**< LLWU Pin Filter 1 register, offset: 0x8 */
  6080. __IO uint8_t FILT2; /**< LLWU Pin Filter 2 register, offset: 0x9 */
  6081. __IO uint8_t RST; /**< LLWU Reset Enable register, offset: 0xA */
  6082. } LLWU_Type;
  6083. /* ----------------------------------------------------------------------------
  6084. -- LLWU Register Masks
  6085. ---------------------------------------------------------------------------- */
  6086. /*!
  6087. * @addtogroup LLWU_Register_Masks LLWU Register Masks
  6088. * @{
  6089. */
  6090. /*! @name PE1 - LLWU Pin Enable 1 register */
  6091. #define LLWU_PE1_WUPE0_MASK (0x3U)
  6092. #define LLWU_PE1_WUPE0_SHIFT (0U)
  6093. #define LLWU_PE1_WUPE0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE0_SHIFT)) & LLWU_PE1_WUPE0_MASK)
  6094. #define LLWU_PE1_WUPE1_MASK (0xCU)
  6095. #define LLWU_PE1_WUPE1_SHIFT (2U)
  6096. #define LLWU_PE1_WUPE1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE1_SHIFT)) & LLWU_PE1_WUPE1_MASK)
  6097. #define LLWU_PE1_WUPE2_MASK (0x30U)
  6098. #define LLWU_PE1_WUPE2_SHIFT (4U)
  6099. #define LLWU_PE1_WUPE2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE2_SHIFT)) & LLWU_PE1_WUPE2_MASK)
  6100. #define LLWU_PE1_WUPE3_MASK (0xC0U)
  6101. #define LLWU_PE1_WUPE3_SHIFT (6U)
  6102. #define LLWU_PE1_WUPE3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE1_WUPE3_SHIFT)) & LLWU_PE1_WUPE3_MASK)
  6103. /*! @name PE2 - LLWU Pin Enable 2 register */
  6104. #define LLWU_PE2_WUPE4_MASK (0x3U)
  6105. #define LLWU_PE2_WUPE4_SHIFT (0U)
  6106. #define LLWU_PE2_WUPE4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE4_SHIFT)) & LLWU_PE2_WUPE4_MASK)
  6107. #define LLWU_PE2_WUPE5_MASK (0xCU)
  6108. #define LLWU_PE2_WUPE5_SHIFT (2U)
  6109. #define LLWU_PE2_WUPE5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE5_SHIFT)) & LLWU_PE2_WUPE5_MASK)
  6110. #define LLWU_PE2_WUPE6_MASK (0x30U)
  6111. #define LLWU_PE2_WUPE6_SHIFT (4U)
  6112. #define LLWU_PE2_WUPE6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE6_SHIFT)) & LLWU_PE2_WUPE6_MASK)
  6113. #define LLWU_PE2_WUPE7_MASK (0xC0U)
  6114. #define LLWU_PE2_WUPE7_SHIFT (6U)
  6115. #define LLWU_PE2_WUPE7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE2_WUPE7_SHIFT)) & LLWU_PE2_WUPE7_MASK)
  6116. /*! @name PE3 - LLWU Pin Enable 3 register */
  6117. #define LLWU_PE3_WUPE8_MASK (0x3U)
  6118. #define LLWU_PE3_WUPE8_SHIFT (0U)
  6119. #define LLWU_PE3_WUPE8(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE8_SHIFT)) & LLWU_PE3_WUPE8_MASK)
  6120. #define LLWU_PE3_WUPE9_MASK (0xCU)
  6121. #define LLWU_PE3_WUPE9_SHIFT (2U)
  6122. #define LLWU_PE3_WUPE9(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE9_SHIFT)) & LLWU_PE3_WUPE9_MASK)
  6123. #define LLWU_PE3_WUPE10_MASK (0x30U)
  6124. #define LLWU_PE3_WUPE10_SHIFT (4U)
  6125. #define LLWU_PE3_WUPE10(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE10_SHIFT)) & LLWU_PE3_WUPE10_MASK)
  6126. #define LLWU_PE3_WUPE11_MASK (0xC0U)
  6127. #define LLWU_PE3_WUPE11_SHIFT (6U)
  6128. #define LLWU_PE3_WUPE11(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE3_WUPE11_SHIFT)) & LLWU_PE3_WUPE11_MASK)
  6129. /*! @name PE4 - LLWU Pin Enable 4 register */
  6130. #define LLWU_PE4_WUPE12_MASK (0x3U)
  6131. #define LLWU_PE4_WUPE12_SHIFT (0U)
  6132. #define LLWU_PE4_WUPE12(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE12_SHIFT)) & LLWU_PE4_WUPE12_MASK)
  6133. #define LLWU_PE4_WUPE13_MASK (0xCU)
  6134. #define LLWU_PE4_WUPE13_SHIFT (2U)
  6135. #define LLWU_PE4_WUPE13(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE13_SHIFT)) & LLWU_PE4_WUPE13_MASK)
  6136. #define LLWU_PE4_WUPE14_MASK (0x30U)
  6137. #define LLWU_PE4_WUPE14_SHIFT (4U)
  6138. #define LLWU_PE4_WUPE14(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE14_SHIFT)) & LLWU_PE4_WUPE14_MASK)
  6139. #define LLWU_PE4_WUPE15_MASK (0xC0U)
  6140. #define LLWU_PE4_WUPE15_SHIFT (6U)
  6141. #define LLWU_PE4_WUPE15(x) (((uint8_t)(((uint8_t)(x)) << LLWU_PE4_WUPE15_SHIFT)) & LLWU_PE4_WUPE15_MASK)
  6142. /*! @name ME - LLWU Module Enable register */
  6143. #define LLWU_ME_WUME0_MASK (0x1U)
  6144. #define LLWU_ME_WUME0_SHIFT (0U)
  6145. #define LLWU_ME_WUME0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME0_SHIFT)) & LLWU_ME_WUME0_MASK)
  6146. #define LLWU_ME_WUME1_MASK (0x2U)
  6147. #define LLWU_ME_WUME1_SHIFT (1U)
  6148. #define LLWU_ME_WUME1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME1_SHIFT)) & LLWU_ME_WUME1_MASK)
  6149. #define LLWU_ME_WUME2_MASK (0x4U)
  6150. #define LLWU_ME_WUME2_SHIFT (2U)
  6151. #define LLWU_ME_WUME2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME2_SHIFT)) & LLWU_ME_WUME2_MASK)
  6152. #define LLWU_ME_WUME3_MASK (0x8U)
  6153. #define LLWU_ME_WUME3_SHIFT (3U)
  6154. #define LLWU_ME_WUME3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME3_SHIFT)) & LLWU_ME_WUME3_MASK)
  6155. #define LLWU_ME_WUME4_MASK (0x10U)
  6156. #define LLWU_ME_WUME4_SHIFT (4U)
  6157. #define LLWU_ME_WUME4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME4_SHIFT)) & LLWU_ME_WUME4_MASK)
  6158. #define LLWU_ME_WUME5_MASK (0x20U)
  6159. #define LLWU_ME_WUME5_SHIFT (5U)
  6160. #define LLWU_ME_WUME5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME5_SHIFT)) & LLWU_ME_WUME5_MASK)
  6161. #define LLWU_ME_WUME6_MASK (0x40U)
  6162. #define LLWU_ME_WUME6_SHIFT (6U)
  6163. #define LLWU_ME_WUME6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME6_SHIFT)) & LLWU_ME_WUME6_MASK)
  6164. #define LLWU_ME_WUME7_MASK (0x80U)
  6165. #define LLWU_ME_WUME7_SHIFT (7U)
  6166. #define LLWU_ME_WUME7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_ME_WUME7_SHIFT)) & LLWU_ME_WUME7_MASK)
  6167. /*! @name F1 - LLWU Flag 1 register */
  6168. #define LLWU_F1_WUF0_MASK (0x1U)
  6169. #define LLWU_F1_WUF0_SHIFT (0U)
  6170. #define LLWU_F1_WUF0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F1_WUF0_SHIFT)) & LLWU_F1_WUF0_MASK)
  6171. #define LLWU_F1_WUF1_MASK (0x2U)
  6172. #define LLWU_F1_WUF1_SHIFT (1U)
  6173. #define LLWU_F1_WUF1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F1_WUF1_SHIFT)) & LLWU_F1_WUF1_MASK)
  6174. #define LLWU_F1_WUF2_MASK (0x4U)
  6175. #define LLWU_F1_WUF2_SHIFT (2U)
  6176. #define LLWU_F1_WUF2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F1_WUF2_SHIFT)) & LLWU_F1_WUF2_MASK)
  6177. #define LLWU_F1_WUF3_MASK (0x8U)
  6178. #define LLWU_F1_WUF3_SHIFT (3U)
  6179. #define LLWU_F1_WUF3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F1_WUF3_SHIFT)) & LLWU_F1_WUF3_MASK)
  6180. #define LLWU_F1_WUF4_MASK (0x10U)
  6181. #define LLWU_F1_WUF4_SHIFT (4U)
  6182. #define LLWU_F1_WUF4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F1_WUF4_SHIFT)) & LLWU_F1_WUF4_MASK)
  6183. #define LLWU_F1_WUF5_MASK (0x20U)
  6184. #define LLWU_F1_WUF5_SHIFT (5U)
  6185. #define LLWU_F1_WUF5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F1_WUF5_SHIFT)) & LLWU_F1_WUF5_MASK)
  6186. #define LLWU_F1_WUF6_MASK (0x40U)
  6187. #define LLWU_F1_WUF6_SHIFT (6U)
  6188. #define LLWU_F1_WUF6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F1_WUF6_SHIFT)) & LLWU_F1_WUF6_MASK)
  6189. #define LLWU_F1_WUF7_MASK (0x80U)
  6190. #define LLWU_F1_WUF7_SHIFT (7U)
  6191. #define LLWU_F1_WUF7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F1_WUF7_SHIFT)) & LLWU_F1_WUF7_MASK)
  6192. /*! @name F2 - LLWU Flag 2 register */
  6193. #define LLWU_F2_WUF8_MASK (0x1U)
  6194. #define LLWU_F2_WUF8_SHIFT (0U)
  6195. #define LLWU_F2_WUF8(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F2_WUF8_SHIFT)) & LLWU_F2_WUF8_MASK)
  6196. #define LLWU_F2_WUF9_MASK (0x2U)
  6197. #define LLWU_F2_WUF9_SHIFT (1U)
  6198. #define LLWU_F2_WUF9(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F2_WUF9_SHIFT)) & LLWU_F2_WUF9_MASK)
  6199. #define LLWU_F2_WUF10_MASK (0x4U)
  6200. #define LLWU_F2_WUF10_SHIFT (2U)
  6201. #define LLWU_F2_WUF10(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F2_WUF10_SHIFT)) & LLWU_F2_WUF10_MASK)
  6202. #define LLWU_F2_WUF11_MASK (0x8U)
  6203. #define LLWU_F2_WUF11_SHIFT (3U)
  6204. #define LLWU_F2_WUF11(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F2_WUF11_SHIFT)) & LLWU_F2_WUF11_MASK)
  6205. #define LLWU_F2_WUF12_MASK (0x10U)
  6206. #define LLWU_F2_WUF12_SHIFT (4U)
  6207. #define LLWU_F2_WUF12(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F2_WUF12_SHIFT)) & LLWU_F2_WUF12_MASK)
  6208. #define LLWU_F2_WUF13_MASK (0x20U)
  6209. #define LLWU_F2_WUF13_SHIFT (5U)
  6210. #define LLWU_F2_WUF13(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F2_WUF13_SHIFT)) & LLWU_F2_WUF13_MASK)
  6211. #define LLWU_F2_WUF14_MASK (0x40U)
  6212. #define LLWU_F2_WUF14_SHIFT (6U)
  6213. #define LLWU_F2_WUF14(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F2_WUF14_SHIFT)) & LLWU_F2_WUF14_MASK)
  6214. #define LLWU_F2_WUF15_MASK (0x80U)
  6215. #define LLWU_F2_WUF15_SHIFT (7U)
  6216. #define LLWU_F2_WUF15(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F2_WUF15_SHIFT)) & LLWU_F2_WUF15_MASK)
  6217. /*! @name F3 - LLWU Flag 3 register */
  6218. #define LLWU_F3_MWUF0_MASK (0x1U)
  6219. #define LLWU_F3_MWUF0_SHIFT (0U)
  6220. #define LLWU_F3_MWUF0(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F3_MWUF0_SHIFT)) & LLWU_F3_MWUF0_MASK)
  6221. #define LLWU_F3_MWUF1_MASK (0x2U)
  6222. #define LLWU_F3_MWUF1_SHIFT (1U)
  6223. #define LLWU_F3_MWUF1(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F3_MWUF1_SHIFT)) & LLWU_F3_MWUF1_MASK)
  6224. #define LLWU_F3_MWUF2_MASK (0x4U)
  6225. #define LLWU_F3_MWUF2_SHIFT (2U)
  6226. #define LLWU_F3_MWUF2(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F3_MWUF2_SHIFT)) & LLWU_F3_MWUF2_MASK)
  6227. #define LLWU_F3_MWUF3_MASK (0x8U)
  6228. #define LLWU_F3_MWUF3_SHIFT (3U)
  6229. #define LLWU_F3_MWUF3(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F3_MWUF3_SHIFT)) & LLWU_F3_MWUF3_MASK)
  6230. #define LLWU_F3_MWUF4_MASK (0x10U)
  6231. #define LLWU_F3_MWUF4_SHIFT (4U)
  6232. #define LLWU_F3_MWUF4(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F3_MWUF4_SHIFT)) & LLWU_F3_MWUF4_MASK)
  6233. #define LLWU_F3_MWUF5_MASK (0x20U)
  6234. #define LLWU_F3_MWUF5_SHIFT (5U)
  6235. #define LLWU_F3_MWUF5(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F3_MWUF5_SHIFT)) & LLWU_F3_MWUF5_MASK)
  6236. #define LLWU_F3_MWUF6_MASK (0x40U)
  6237. #define LLWU_F3_MWUF6_SHIFT (6U)
  6238. #define LLWU_F3_MWUF6(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F3_MWUF6_SHIFT)) & LLWU_F3_MWUF6_MASK)
  6239. #define LLWU_F3_MWUF7_MASK (0x80U)
  6240. #define LLWU_F3_MWUF7_SHIFT (7U)
  6241. #define LLWU_F3_MWUF7(x) (((uint8_t)(((uint8_t)(x)) << LLWU_F3_MWUF7_SHIFT)) & LLWU_F3_MWUF7_MASK)
  6242. /*! @name FILT1 - LLWU Pin Filter 1 register */
  6243. #define LLWU_FILT1_FILTSEL_MASK (0xFU)
  6244. #define LLWU_FILT1_FILTSEL_SHIFT (0U)
  6245. #define LLWU_FILT1_FILTSEL(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT1_FILTSEL_SHIFT)) & LLWU_FILT1_FILTSEL_MASK)
  6246. #define LLWU_FILT1_FILTE_MASK (0x60U)
  6247. #define LLWU_FILT1_FILTE_SHIFT (5U)
  6248. #define LLWU_FILT1_FILTE(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT1_FILTE_SHIFT)) & LLWU_FILT1_FILTE_MASK)
  6249. #define LLWU_FILT1_FILTF_MASK (0x80U)
  6250. #define LLWU_FILT1_FILTF_SHIFT (7U)
  6251. #define LLWU_FILT1_FILTF(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT1_FILTF_SHIFT)) & LLWU_FILT1_FILTF_MASK)
  6252. /*! @name FILT2 - LLWU Pin Filter 2 register */
  6253. #define LLWU_FILT2_FILTSEL_MASK (0xFU)
  6254. #define LLWU_FILT2_FILTSEL_SHIFT (0U)
  6255. #define LLWU_FILT2_FILTSEL(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT2_FILTSEL_SHIFT)) & LLWU_FILT2_FILTSEL_MASK)
  6256. #define LLWU_FILT2_FILTE_MASK (0x60U)
  6257. #define LLWU_FILT2_FILTE_SHIFT (5U)
  6258. #define LLWU_FILT2_FILTE(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT2_FILTE_SHIFT)) & LLWU_FILT2_FILTE_MASK)
  6259. #define LLWU_FILT2_FILTF_MASK (0x80U)
  6260. #define LLWU_FILT2_FILTF_SHIFT (7U)
  6261. #define LLWU_FILT2_FILTF(x) (((uint8_t)(((uint8_t)(x)) << LLWU_FILT2_FILTF_SHIFT)) & LLWU_FILT2_FILTF_MASK)
  6262. /*! @name RST - LLWU Reset Enable register */
  6263. #define LLWU_RST_RSTFILT_MASK (0x1U)
  6264. #define LLWU_RST_RSTFILT_SHIFT (0U)
  6265. #define LLWU_RST_RSTFILT(x) (((uint8_t)(((uint8_t)(x)) << LLWU_RST_RSTFILT_SHIFT)) & LLWU_RST_RSTFILT_MASK)
  6266. #define LLWU_RST_LLRSTE_MASK (0x2U)
  6267. #define LLWU_RST_LLRSTE_SHIFT (1U)
  6268. #define LLWU_RST_LLRSTE(x) (((uint8_t)(((uint8_t)(x)) << LLWU_RST_LLRSTE_SHIFT)) & LLWU_RST_LLRSTE_MASK)
  6269. /*!
  6270. * @}
  6271. */ /* end of group LLWU_Register_Masks */
  6272. /* LLWU - Peripheral instance base addresses */
  6273. /** Peripheral LLWU base address */
  6274. #define LLWU_BASE (0x4007C000u)
  6275. /** Peripheral LLWU base pointer */
  6276. #define LLWU ((LLWU_Type *)LLWU_BASE)
  6277. /** Array initializer of LLWU peripheral base addresses */
  6278. #define LLWU_BASE_ADDRS { LLWU_BASE }
  6279. /** Array initializer of LLWU peripheral base pointers */
  6280. #define LLWU_BASE_PTRS { LLWU }
  6281. /** Interrupt vectors for the LLWU peripheral type */
  6282. #define LLWU_IRQS { LLWU_IRQn }
  6283. /*!
  6284. * @}
  6285. */ /* end of group LLWU_Peripheral_Access_Layer */
  6286. /* ----------------------------------------------------------------------------
  6287. -- LPTMR Peripheral Access Layer
  6288. ---------------------------------------------------------------------------- */
  6289. /*!
  6290. * @addtogroup LPTMR_Peripheral_Access_Layer LPTMR Peripheral Access Layer
  6291. * @{
  6292. */
  6293. /** LPTMR - Register Layout Typedef */
  6294. typedef struct {
  6295. __IO uint32_t CSR; /**< Low Power Timer Control Status Register, offset: 0x0 */
  6296. __IO uint32_t PSR; /**< Low Power Timer Prescale Register, offset: 0x4 */
  6297. __IO uint32_t CMR; /**< Low Power Timer Compare Register, offset: 0x8 */
  6298. __IO uint32_t CNR; /**< Low Power Timer Counter Register, offset: 0xC */
  6299. } LPTMR_Type;
  6300. /* ----------------------------------------------------------------------------
  6301. -- LPTMR Register Masks
  6302. ---------------------------------------------------------------------------- */
  6303. /*!
  6304. * @addtogroup LPTMR_Register_Masks LPTMR Register Masks
  6305. * @{
  6306. */
  6307. /*! @name CSR - Low Power Timer Control Status Register */
  6308. #define LPTMR_CSR_TEN_MASK (0x1U)
  6309. #define LPTMR_CSR_TEN_SHIFT (0U)
  6310. #define LPTMR_CSR_TEN(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TEN_SHIFT)) & LPTMR_CSR_TEN_MASK)
  6311. #define LPTMR_CSR_TMS_MASK (0x2U)
  6312. #define LPTMR_CSR_TMS_SHIFT (1U)
  6313. #define LPTMR_CSR_TMS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TMS_SHIFT)) & LPTMR_CSR_TMS_MASK)
  6314. #define LPTMR_CSR_TFC_MASK (0x4U)
  6315. #define LPTMR_CSR_TFC_SHIFT (2U)
  6316. #define LPTMR_CSR_TFC(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TFC_SHIFT)) & LPTMR_CSR_TFC_MASK)
  6317. #define LPTMR_CSR_TPP_MASK (0x8U)
  6318. #define LPTMR_CSR_TPP_SHIFT (3U)
  6319. #define LPTMR_CSR_TPP(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TPP_SHIFT)) & LPTMR_CSR_TPP_MASK)
  6320. #define LPTMR_CSR_TPS_MASK (0x30U)
  6321. #define LPTMR_CSR_TPS_SHIFT (4U)
  6322. #define LPTMR_CSR_TPS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TPS_SHIFT)) & LPTMR_CSR_TPS_MASK)
  6323. #define LPTMR_CSR_TIE_MASK (0x40U)
  6324. #define LPTMR_CSR_TIE_SHIFT (6U)
  6325. #define LPTMR_CSR_TIE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TIE_SHIFT)) & LPTMR_CSR_TIE_MASK)
  6326. #define LPTMR_CSR_TCF_MASK (0x80U)
  6327. #define LPTMR_CSR_TCF_SHIFT (7U)
  6328. #define LPTMR_CSR_TCF(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CSR_TCF_SHIFT)) & LPTMR_CSR_TCF_MASK)
  6329. /*! @name PSR - Low Power Timer Prescale Register */
  6330. #define LPTMR_PSR_PCS_MASK (0x3U)
  6331. #define LPTMR_PSR_PCS_SHIFT (0U)
  6332. #define LPTMR_PSR_PCS(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PCS_SHIFT)) & LPTMR_PSR_PCS_MASK)
  6333. #define LPTMR_PSR_PBYP_MASK (0x4U)
  6334. #define LPTMR_PSR_PBYP_SHIFT (2U)
  6335. #define LPTMR_PSR_PBYP(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PBYP_SHIFT)) & LPTMR_PSR_PBYP_MASK)
  6336. #define LPTMR_PSR_PRESCALE_MASK (0x78U)
  6337. #define LPTMR_PSR_PRESCALE_SHIFT (3U)
  6338. #define LPTMR_PSR_PRESCALE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_PSR_PRESCALE_SHIFT)) & LPTMR_PSR_PRESCALE_MASK)
  6339. /*! @name CMR - Low Power Timer Compare Register */
  6340. #define LPTMR_CMR_COMPARE_MASK (0xFFFFU)
  6341. #define LPTMR_CMR_COMPARE_SHIFT (0U)
  6342. #define LPTMR_CMR_COMPARE(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CMR_COMPARE_SHIFT)) & LPTMR_CMR_COMPARE_MASK)
  6343. /*! @name CNR - Low Power Timer Counter Register */
  6344. #define LPTMR_CNR_COUNTER_MASK (0xFFFFU)
  6345. #define LPTMR_CNR_COUNTER_SHIFT (0U)
  6346. #define LPTMR_CNR_COUNTER(x) (((uint32_t)(((uint32_t)(x)) << LPTMR_CNR_COUNTER_SHIFT)) & LPTMR_CNR_COUNTER_MASK)
  6347. /*!
  6348. * @}
  6349. */ /* end of group LPTMR_Register_Masks */
  6350. /* LPTMR - Peripheral instance base addresses */
  6351. /** Peripheral LPTMR0 base address */
  6352. #define LPTMR0_BASE (0x40040000u)
  6353. /** Peripheral LPTMR0 base pointer */
  6354. #define LPTMR0 ((LPTMR_Type *)LPTMR0_BASE)
  6355. /** Array initializer of LPTMR peripheral base addresses */
  6356. #define LPTMR_BASE_ADDRS { LPTMR0_BASE }
  6357. /** Array initializer of LPTMR peripheral base pointers */
  6358. #define LPTMR_BASE_PTRS { LPTMR0 }
  6359. /** Interrupt vectors for the LPTMR peripheral type */
  6360. #define LPTMR_IRQS { LPTMR0_IRQn }
  6361. /*!
  6362. * @}
  6363. */ /* end of group LPTMR_Peripheral_Access_Layer */
  6364. /* ----------------------------------------------------------------------------
  6365. -- MCG Peripheral Access Layer
  6366. ---------------------------------------------------------------------------- */
  6367. /*!
  6368. * @addtogroup MCG_Peripheral_Access_Layer MCG Peripheral Access Layer
  6369. * @{
  6370. */
  6371. /** MCG - Register Layout Typedef */
  6372. typedef struct {
  6373. __IO uint8_t C1; /**< MCG Control 1 Register, offset: 0x0 */
  6374. __IO uint8_t C2; /**< MCG Control 2 Register, offset: 0x1 */
  6375. __IO uint8_t C3; /**< MCG Control 3 Register, offset: 0x2 */
  6376. __IO uint8_t C4; /**< MCG Control 4 Register, offset: 0x3 */
  6377. __IO uint8_t C5; /**< MCG Control 5 Register, offset: 0x4 */
  6378. __IO uint8_t C6; /**< MCG Control 6 Register, offset: 0x5 */
  6379. __IO uint8_t S; /**< MCG Status Register, offset: 0x6 */
  6380. uint8_t RESERVED_0[1];
  6381. __IO uint8_t SC; /**< MCG Status and Control Register, offset: 0x8 */
  6382. uint8_t RESERVED_1[1];
  6383. __IO uint8_t ATCVH; /**< MCG Auto Trim Compare Value High Register, offset: 0xA */
  6384. __IO uint8_t ATCVL; /**< MCG Auto Trim Compare Value Low Register, offset: 0xB */
  6385. __IO uint8_t C7; /**< MCG Control 7 Register, offset: 0xC */
  6386. __IO uint8_t C8; /**< MCG Control 8 Register, offset: 0xD */
  6387. } MCG_Type;
  6388. /* ----------------------------------------------------------------------------
  6389. -- MCG Register Masks
  6390. ---------------------------------------------------------------------------- */
  6391. /*!
  6392. * @addtogroup MCG_Register_Masks MCG Register Masks
  6393. * @{
  6394. */
  6395. /*! @name C1 - MCG Control 1 Register */
  6396. #define MCG_C1_IREFSTEN_MASK (0x1U)
  6397. #define MCG_C1_IREFSTEN_SHIFT (0U)
  6398. #define MCG_C1_IREFSTEN(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_IREFSTEN_SHIFT)) & MCG_C1_IREFSTEN_MASK)
  6399. #define MCG_C1_IRCLKEN_MASK (0x2U)
  6400. #define MCG_C1_IRCLKEN_SHIFT (1U)
  6401. #define MCG_C1_IRCLKEN(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_IRCLKEN_SHIFT)) & MCG_C1_IRCLKEN_MASK)
  6402. #define MCG_C1_IREFS_MASK (0x4U)
  6403. #define MCG_C1_IREFS_SHIFT (2U)
  6404. #define MCG_C1_IREFS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_IREFS_SHIFT)) & MCG_C1_IREFS_MASK)
  6405. #define MCG_C1_FRDIV_MASK (0x38U)
  6406. #define MCG_C1_FRDIV_SHIFT (3U)
  6407. #define MCG_C1_FRDIV(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_FRDIV_SHIFT)) & MCG_C1_FRDIV_MASK)
  6408. #define MCG_C1_CLKS_MASK (0xC0U)
  6409. #define MCG_C1_CLKS_SHIFT (6U)
  6410. #define MCG_C1_CLKS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C1_CLKS_SHIFT)) & MCG_C1_CLKS_MASK)
  6411. /*! @name C2 - MCG Control 2 Register */
  6412. #define MCG_C2_IRCS_MASK (0x1U)
  6413. #define MCG_C2_IRCS_SHIFT (0U)
  6414. #define MCG_C2_IRCS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_IRCS_SHIFT)) & MCG_C2_IRCS_MASK)
  6415. #define MCG_C2_LP_MASK (0x2U)
  6416. #define MCG_C2_LP_SHIFT (1U)
  6417. #define MCG_C2_LP(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_LP_SHIFT)) & MCG_C2_LP_MASK)
  6418. #define MCG_C2_EREFS_MASK (0x4U)
  6419. #define MCG_C2_EREFS_SHIFT (2U)
  6420. #define MCG_C2_EREFS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_EREFS_SHIFT)) & MCG_C2_EREFS_MASK)
  6421. #define MCG_C2_HGO_MASK (0x8U)
  6422. #define MCG_C2_HGO_SHIFT (3U)
  6423. #define MCG_C2_HGO(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_HGO_SHIFT)) & MCG_C2_HGO_MASK)
  6424. #define MCG_C2_RANGE_MASK (0x30U)
  6425. #define MCG_C2_RANGE_SHIFT (4U)
  6426. #define MCG_C2_RANGE(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_RANGE_SHIFT)) & MCG_C2_RANGE_MASK)
  6427. #define MCG_C2_FCFTRIM_MASK (0x40U)
  6428. #define MCG_C2_FCFTRIM_SHIFT (6U)
  6429. #define MCG_C2_FCFTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_FCFTRIM_SHIFT)) & MCG_C2_FCFTRIM_MASK)
  6430. #define MCG_C2_LOCRE0_MASK (0x80U)
  6431. #define MCG_C2_LOCRE0_SHIFT (7U)
  6432. #define MCG_C2_LOCRE0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C2_LOCRE0_SHIFT)) & MCG_C2_LOCRE0_MASK)
  6433. /*! @name C3 - MCG Control 3 Register */
  6434. #define MCG_C3_SCTRIM_MASK (0xFFU)
  6435. #define MCG_C3_SCTRIM_SHIFT (0U)
  6436. #define MCG_C3_SCTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C3_SCTRIM_SHIFT)) & MCG_C3_SCTRIM_MASK)
  6437. /*! @name C4 - MCG Control 4 Register */
  6438. #define MCG_C4_SCFTRIM_MASK (0x1U)
  6439. #define MCG_C4_SCFTRIM_SHIFT (0U)
  6440. #define MCG_C4_SCFTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_SCFTRIM_SHIFT)) & MCG_C4_SCFTRIM_MASK)
  6441. #define MCG_C4_FCTRIM_MASK (0x1EU)
  6442. #define MCG_C4_FCTRIM_SHIFT (1U)
  6443. #define MCG_C4_FCTRIM(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_FCTRIM_SHIFT)) & MCG_C4_FCTRIM_MASK)
  6444. #define MCG_C4_DRST_DRS_MASK (0x60U)
  6445. #define MCG_C4_DRST_DRS_SHIFT (5U)
  6446. #define MCG_C4_DRST_DRS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_DRST_DRS_SHIFT)) & MCG_C4_DRST_DRS_MASK)
  6447. #define MCG_C4_DMX32_MASK (0x80U)
  6448. #define MCG_C4_DMX32_SHIFT (7U)
  6449. #define MCG_C4_DMX32(x) (((uint8_t)(((uint8_t)(x)) << MCG_C4_DMX32_SHIFT)) & MCG_C4_DMX32_MASK)
  6450. /*! @name C5 - MCG Control 5 Register */
  6451. #define MCG_C5_PRDIV0_MASK (0x1FU)
  6452. #define MCG_C5_PRDIV0_SHIFT (0U)
  6453. #define MCG_C5_PRDIV0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C5_PRDIV0_SHIFT)) & MCG_C5_PRDIV0_MASK)
  6454. #define MCG_C5_PLLSTEN0_MASK (0x20U)
  6455. #define MCG_C5_PLLSTEN0_SHIFT (5U)
  6456. #define MCG_C5_PLLSTEN0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C5_PLLSTEN0_SHIFT)) & MCG_C5_PLLSTEN0_MASK)
  6457. #define MCG_C5_PLLCLKEN0_MASK (0x40U)
  6458. #define MCG_C5_PLLCLKEN0_SHIFT (6U)
  6459. #define MCG_C5_PLLCLKEN0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C5_PLLCLKEN0_SHIFT)) & MCG_C5_PLLCLKEN0_MASK)
  6460. /*! @name C6 - MCG Control 6 Register */
  6461. #define MCG_C6_VDIV0_MASK (0x1FU)
  6462. #define MCG_C6_VDIV0_SHIFT (0U)
  6463. #define MCG_C6_VDIV0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_VDIV0_SHIFT)) & MCG_C6_VDIV0_MASK)
  6464. #define MCG_C6_CME0_MASK (0x20U)
  6465. #define MCG_C6_CME0_SHIFT (5U)
  6466. #define MCG_C6_CME0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_CME0_SHIFT)) & MCG_C6_CME0_MASK)
  6467. #define MCG_C6_PLLS_MASK (0x40U)
  6468. #define MCG_C6_PLLS_SHIFT (6U)
  6469. #define MCG_C6_PLLS(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_PLLS_SHIFT)) & MCG_C6_PLLS_MASK)
  6470. #define MCG_C6_LOLIE0_MASK (0x80U)
  6471. #define MCG_C6_LOLIE0_SHIFT (7U)
  6472. #define MCG_C6_LOLIE0(x) (((uint8_t)(((uint8_t)(x)) << MCG_C6_LOLIE0_SHIFT)) & MCG_C6_LOLIE0_MASK)
  6473. /*! @name S - MCG Status Register */
  6474. #define MCG_S_IRCST_MASK (0x1U)
  6475. #define MCG_S_IRCST_SHIFT (0U)
  6476. #define MCG_S_IRCST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_IRCST_SHIFT)) & MCG_S_IRCST_MASK)
  6477. #define MCG_S_OSCINIT0_MASK (0x2U)
  6478. #define MCG_S_OSCINIT0_SHIFT (1U)
  6479. #define MCG_S_OSCINIT0(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_OSCINIT0_SHIFT)) & MCG_S_OSCINIT0_MASK)
  6480. #define MCG_S_CLKST_MASK (0xCU)
  6481. #define MCG_S_CLKST_SHIFT (2U)
  6482. #define MCG_S_CLKST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_CLKST_SHIFT)) & MCG_S_CLKST_MASK)
  6483. #define MCG_S_IREFST_MASK (0x10U)
  6484. #define MCG_S_IREFST_SHIFT (4U)
  6485. #define MCG_S_IREFST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_IREFST_SHIFT)) & MCG_S_IREFST_MASK)
  6486. #define MCG_S_PLLST_MASK (0x20U)
  6487. #define MCG_S_PLLST_SHIFT (5U)
  6488. #define MCG_S_PLLST(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_PLLST_SHIFT)) & MCG_S_PLLST_MASK)
  6489. #define MCG_S_LOCK0_MASK (0x40U)
  6490. #define MCG_S_LOCK0_SHIFT (6U)
  6491. #define MCG_S_LOCK0(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_LOCK0_SHIFT)) & MCG_S_LOCK0_MASK)
  6492. #define MCG_S_LOLS0_MASK (0x80U)
  6493. #define MCG_S_LOLS0_SHIFT (7U)
  6494. #define MCG_S_LOLS0(x) (((uint8_t)(((uint8_t)(x)) << MCG_S_LOLS0_SHIFT)) & MCG_S_LOLS0_MASK)
  6495. /*! @name SC - MCG Status and Control Register */
  6496. #define MCG_SC_LOCS0_MASK (0x1U)
  6497. #define MCG_SC_LOCS0_SHIFT (0U)
  6498. #define MCG_SC_LOCS0(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_LOCS0_SHIFT)) & MCG_SC_LOCS0_MASK)
  6499. #define MCG_SC_FCRDIV_MASK (0xEU)
  6500. #define MCG_SC_FCRDIV_SHIFT (1U)
  6501. #define MCG_SC_FCRDIV(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_FCRDIV_SHIFT)) & MCG_SC_FCRDIV_MASK)
  6502. #define MCG_SC_FLTPRSRV_MASK (0x10U)
  6503. #define MCG_SC_FLTPRSRV_SHIFT (4U)
  6504. #define MCG_SC_FLTPRSRV(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_FLTPRSRV_SHIFT)) & MCG_SC_FLTPRSRV_MASK)
  6505. #define MCG_SC_ATMF_MASK (0x20U)
  6506. #define MCG_SC_ATMF_SHIFT (5U)
  6507. #define MCG_SC_ATMF(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_ATMF_SHIFT)) & MCG_SC_ATMF_MASK)
  6508. #define MCG_SC_ATMS_MASK (0x40U)
  6509. #define MCG_SC_ATMS_SHIFT (6U)
  6510. #define MCG_SC_ATMS(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_ATMS_SHIFT)) & MCG_SC_ATMS_MASK)
  6511. #define MCG_SC_ATME_MASK (0x80U)
  6512. #define MCG_SC_ATME_SHIFT (7U)
  6513. #define MCG_SC_ATME(x) (((uint8_t)(((uint8_t)(x)) << MCG_SC_ATME_SHIFT)) & MCG_SC_ATME_MASK)
  6514. /*! @name ATCVH - MCG Auto Trim Compare Value High Register */
  6515. #define MCG_ATCVH_ATCVH_MASK (0xFFU)
  6516. #define MCG_ATCVH_ATCVH_SHIFT (0U)
  6517. #define MCG_ATCVH_ATCVH(x) (((uint8_t)(((uint8_t)(x)) << MCG_ATCVH_ATCVH_SHIFT)) & MCG_ATCVH_ATCVH_MASK)
  6518. /*! @name ATCVL - MCG Auto Trim Compare Value Low Register */
  6519. #define MCG_ATCVL_ATCVL_MASK (0xFFU)
  6520. #define MCG_ATCVL_ATCVL_SHIFT (0U)
  6521. #define MCG_ATCVL_ATCVL(x) (((uint8_t)(((uint8_t)(x)) << MCG_ATCVL_ATCVL_SHIFT)) & MCG_ATCVL_ATCVL_MASK)
  6522. /*! @name C7 - MCG Control 7 Register */
  6523. #define MCG_C7_OSCSEL_MASK (0x3U)
  6524. #define MCG_C7_OSCSEL_SHIFT (0U)
  6525. #define MCG_C7_OSCSEL(x) (((uint8_t)(((uint8_t)(x)) << MCG_C7_OSCSEL_SHIFT)) & MCG_C7_OSCSEL_MASK)
  6526. /*! @name C8 - MCG Control 8 Register */
  6527. #define MCG_C8_LOCS1_MASK (0x1U)
  6528. #define MCG_C8_LOCS1_SHIFT (0U)
  6529. #define MCG_C8_LOCS1(x) (((uint8_t)(((uint8_t)(x)) << MCG_C8_LOCS1_SHIFT)) & MCG_C8_LOCS1_MASK)
  6530. #define MCG_C8_CME1_MASK (0x20U)
  6531. #define MCG_C8_CME1_SHIFT (5U)
  6532. #define MCG_C8_CME1(x) (((uint8_t)(((uint8_t)(x)) << MCG_C8_CME1_SHIFT)) & MCG_C8_CME1_MASK)
  6533. #define MCG_C8_LOLRE_MASK (0x40U)
  6534. #define MCG_C8_LOLRE_SHIFT (6U)
  6535. #define MCG_C8_LOLRE(x) (((uint8_t)(((uint8_t)(x)) << MCG_C8_LOLRE_SHIFT)) & MCG_C8_LOLRE_MASK)
  6536. #define MCG_C8_LOCRE1_MASK (0x80U)
  6537. #define MCG_C8_LOCRE1_SHIFT (7U)
  6538. #define MCG_C8_LOCRE1(x) (((uint8_t)(((uint8_t)(x)) << MCG_C8_LOCRE1_SHIFT)) & MCG_C8_LOCRE1_MASK)
  6539. /*!
  6540. * @}
  6541. */ /* end of group MCG_Register_Masks */
  6542. /* MCG - Peripheral instance base addresses */
  6543. /** Peripheral MCG base address */
  6544. #define MCG_BASE (0x40064000u)
  6545. /** Peripheral MCG base pointer */
  6546. #define MCG ((MCG_Type *)MCG_BASE)
  6547. /** Array initializer of MCG peripheral base addresses */
  6548. #define MCG_BASE_ADDRS { MCG_BASE }
  6549. /** Array initializer of MCG peripheral base pointers */
  6550. #define MCG_BASE_PTRS { MCG }
  6551. /*!
  6552. * @}
  6553. */ /* end of group MCG_Peripheral_Access_Layer */
  6554. /* ----------------------------------------------------------------------------
  6555. -- MCM Peripheral Access Layer
  6556. ---------------------------------------------------------------------------- */
  6557. /*!
  6558. * @addtogroup MCM_Peripheral_Access_Layer MCM Peripheral Access Layer
  6559. * @{
  6560. */
  6561. /** MCM - Register Layout Typedef */
  6562. typedef struct {
  6563. uint8_t RESERVED_0[8];
  6564. __I uint16_t PLASC; /**< Crossbar Switch (AXBS) Slave Configuration, offset: 0x8 */
  6565. __I uint16_t PLAMC; /**< Crossbar Switch (AXBS) Master Configuration, offset: 0xA */
  6566. __IO uint32_t CR; /**< Control Register, offset: 0xC */
  6567. __IO uint32_t ISCR; /**< Interrupt Status Register, offset: 0x10 */
  6568. __IO uint32_t ETBCC; /**< ETB Counter Control register, offset: 0x14 */
  6569. __IO uint32_t ETBRL; /**< ETB Reload register, offset: 0x18 */
  6570. __I uint32_t ETBCNT; /**< ETB Counter Value register, offset: 0x1C */
  6571. uint8_t RESERVED_1[16];
  6572. __IO uint32_t PID; /**< Process ID register, offset: 0x30 */
  6573. } MCM_Type;
  6574. /* ----------------------------------------------------------------------------
  6575. -- MCM Register Masks
  6576. ---------------------------------------------------------------------------- */
  6577. /*!
  6578. * @addtogroup MCM_Register_Masks MCM Register Masks
  6579. * @{
  6580. */
  6581. /*! @name PLASC - Crossbar Switch (AXBS) Slave Configuration */
  6582. #define MCM_PLASC_ASC_MASK (0xFFU)
  6583. #define MCM_PLASC_ASC_SHIFT (0U)
  6584. #define MCM_PLASC_ASC(x) (((uint16_t)(((uint16_t)(x)) << MCM_PLASC_ASC_SHIFT)) & MCM_PLASC_ASC_MASK)
  6585. /*! @name PLAMC - Crossbar Switch (AXBS) Master Configuration */
  6586. #define MCM_PLAMC_AMC_MASK (0xFFU)
  6587. #define MCM_PLAMC_AMC_SHIFT (0U)
  6588. #define MCM_PLAMC_AMC(x) (((uint16_t)(((uint16_t)(x)) << MCM_PLAMC_AMC_SHIFT)) & MCM_PLAMC_AMC_MASK)
  6589. /*! @name CR - Control Register */
  6590. #define MCM_CR_SRAMUAP_MASK (0x3000000U)
  6591. #define MCM_CR_SRAMUAP_SHIFT (24U)
  6592. #define MCM_CR_SRAMUAP(x) (((uint32_t)(((uint32_t)(x)) << MCM_CR_SRAMUAP_SHIFT)) & MCM_CR_SRAMUAP_MASK)
  6593. #define MCM_CR_SRAMUWP_MASK (0x4000000U)
  6594. #define MCM_CR_SRAMUWP_SHIFT (26U)
  6595. #define MCM_CR_SRAMUWP(x) (((uint32_t)(((uint32_t)(x)) << MCM_CR_SRAMUWP_SHIFT)) & MCM_CR_SRAMUWP_MASK)
  6596. #define MCM_CR_SRAMLAP_MASK (0x30000000U)
  6597. #define MCM_CR_SRAMLAP_SHIFT (28U)
  6598. #define MCM_CR_SRAMLAP(x) (((uint32_t)(((uint32_t)(x)) << MCM_CR_SRAMLAP_SHIFT)) & MCM_CR_SRAMLAP_MASK)
  6599. #define MCM_CR_SRAMLWP_MASK (0x40000000U)
  6600. #define MCM_CR_SRAMLWP_SHIFT (30U)
  6601. #define MCM_CR_SRAMLWP(x) (((uint32_t)(((uint32_t)(x)) << MCM_CR_SRAMLWP_SHIFT)) & MCM_CR_SRAMLWP_MASK)
  6602. /*! @name ISCR - Interrupt Status Register */
  6603. #define MCM_ISCR_IRQ_MASK (0x2U)
  6604. #define MCM_ISCR_IRQ_SHIFT (1U)
  6605. #define MCM_ISCR_IRQ(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_IRQ_SHIFT)) & MCM_ISCR_IRQ_MASK)
  6606. #define MCM_ISCR_NMI_MASK (0x4U)
  6607. #define MCM_ISCR_NMI_SHIFT (2U)
  6608. #define MCM_ISCR_NMI(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_NMI_SHIFT)) & MCM_ISCR_NMI_MASK)
  6609. #define MCM_ISCR_DHREQ_MASK (0x8U)
  6610. #define MCM_ISCR_DHREQ_SHIFT (3U)
  6611. #define MCM_ISCR_DHREQ(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_DHREQ_SHIFT)) & MCM_ISCR_DHREQ_MASK)
  6612. #define MCM_ISCR_FIOC_MASK (0x100U)
  6613. #define MCM_ISCR_FIOC_SHIFT (8U)
  6614. #define MCM_ISCR_FIOC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIOC_SHIFT)) & MCM_ISCR_FIOC_MASK)
  6615. #define MCM_ISCR_FDZC_MASK (0x200U)
  6616. #define MCM_ISCR_FDZC_SHIFT (9U)
  6617. #define MCM_ISCR_FDZC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FDZC_SHIFT)) & MCM_ISCR_FDZC_MASK)
  6618. #define MCM_ISCR_FOFC_MASK (0x400U)
  6619. #define MCM_ISCR_FOFC_SHIFT (10U)
  6620. #define MCM_ISCR_FOFC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FOFC_SHIFT)) & MCM_ISCR_FOFC_MASK)
  6621. #define MCM_ISCR_FUFC_MASK (0x800U)
  6622. #define MCM_ISCR_FUFC_SHIFT (11U)
  6623. #define MCM_ISCR_FUFC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FUFC_SHIFT)) & MCM_ISCR_FUFC_MASK)
  6624. #define MCM_ISCR_FIXC_MASK (0x1000U)
  6625. #define MCM_ISCR_FIXC_SHIFT (12U)
  6626. #define MCM_ISCR_FIXC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIXC_SHIFT)) & MCM_ISCR_FIXC_MASK)
  6627. #define MCM_ISCR_FIDC_MASK (0x8000U)
  6628. #define MCM_ISCR_FIDC_SHIFT (15U)
  6629. #define MCM_ISCR_FIDC(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIDC_SHIFT)) & MCM_ISCR_FIDC_MASK)
  6630. #define MCM_ISCR_FIOCE_MASK (0x1000000U)
  6631. #define MCM_ISCR_FIOCE_SHIFT (24U)
  6632. #define MCM_ISCR_FIOCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIOCE_SHIFT)) & MCM_ISCR_FIOCE_MASK)
  6633. #define MCM_ISCR_FDZCE_MASK (0x2000000U)
  6634. #define MCM_ISCR_FDZCE_SHIFT (25U)
  6635. #define MCM_ISCR_FDZCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FDZCE_SHIFT)) & MCM_ISCR_FDZCE_MASK)
  6636. #define MCM_ISCR_FOFCE_MASK (0x4000000U)
  6637. #define MCM_ISCR_FOFCE_SHIFT (26U)
  6638. #define MCM_ISCR_FOFCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FOFCE_SHIFT)) & MCM_ISCR_FOFCE_MASK)
  6639. #define MCM_ISCR_FUFCE_MASK (0x8000000U)
  6640. #define MCM_ISCR_FUFCE_SHIFT (27U)
  6641. #define MCM_ISCR_FUFCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FUFCE_SHIFT)) & MCM_ISCR_FUFCE_MASK)
  6642. #define MCM_ISCR_FIXCE_MASK (0x10000000U)
  6643. #define MCM_ISCR_FIXCE_SHIFT (28U)
  6644. #define MCM_ISCR_FIXCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIXCE_SHIFT)) & MCM_ISCR_FIXCE_MASK)
  6645. #define MCM_ISCR_FIDCE_MASK (0x80000000U)
  6646. #define MCM_ISCR_FIDCE_SHIFT (31U)
  6647. #define MCM_ISCR_FIDCE(x) (((uint32_t)(((uint32_t)(x)) << MCM_ISCR_FIDCE_SHIFT)) & MCM_ISCR_FIDCE_MASK)
  6648. /*! @name ETBCC - ETB Counter Control register */
  6649. #define MCM_ETBCC_CNTEN_MASK (0x1U)
  6650. #define MCM_ETBCC_CNTEN_SHIFT (0U)
  6651. #define MCM_ETBCC_CNTEN(x) (((uint32_t)(((uint32_t)(x)) << MCM_ETBCC_CNTEN_SHIFT)) & MCM_ETBCC_CNTEN_MASK)
  6652. #define MCM_ETBCC_RSPT_MASK (0x6U)
  6653. #define MCM_ETBCC_RSPT_SHIFT (1U)
  6654. #define MCM_ETBCC_RSPT(x) (((uint32_t)(((uint32_t)(x)) << MCM_ETBCC_RSPT_SHIFT)) & MCM_ETBCC_RSPT_MASK)
  6655. #define MCM_ETBCC_RLRQ_MASK (0x8U)
  6656. #define MCM_ETBCC_RLRQ_SHIFT (3U)
  6657. #define MCM_ETBCC_RLRQ(x) (((uint32_t)(((uint32_t)(x)) << MCM_ETBCC_RLRQ_SHIFT)) & MCM_ETBCC_RLRQ_MASK)
  6658. #define MCM_ETBCC_ETDIS_MASK (0x10U)
  6659. #define MCM_ETBCC_ETDIS_SHIFT (4U)
  6660. #define MCM_ETBCC_ETDIS(x) (((uint32_t)(((uint32_t)(x)) << MCM_ETBCC_ETDIS_SHIFT)) & MCM_ETBCC_ETDIS_MASK)
  6661. #define MCM_ETBCC_ITDIS_MASK (0x20U)
  6662. #define MCM_ETBCC_ITDIS_SHIFT (5U)
  6663. #define MCM_ETBCC_ITDIS(x) (((uint32_t)(((uint32_t)(x)) << MCM_ETBCC_ITDIS_SHIFT)) & MCM_ETBCC_ITDIS_MASK)
  6664. /*! @name ETBRL - ETB Reload register */
  6665. #define MCM_ETBRL_RELOAD_MASK (0x7FFU)
  6666. #define MCM_ETBRL_RELOAD_SHIFT (0U)
  6667. #define MCM_ETBRL_RELOAD(x) (((uint32_t)(((uint32_t)(x)) << MCM_ETBRL_RELOAD_SHIFT)) & MCM_ETBRL_RELOAD_MASK)
  6668. /*! @name ETBCNT - ETB Counter Value register */
  6669. #define MCM_ETBCNT_COUNTER_MASK (0x7FFU)
  6670. #define MCM_ETBCNT_COUNTER_SHIFT (0U)
  6671. #define MCM_ETBCNT_COUNTER(x) (((uint32_t)(((uint32_t)(x)) << MCM_ETBCNT_COUNTER_SHIFT)) & MCM_ETBCNT_COUNTER_MASK)
  6672. /*! @name PID - Process ID register */
  6673. #define MCM_PID_PID_MASK (0xFFU)
  6674. #define MCM_PID_PID_SHIFT (0U)
  6675. #define MCM_PID_PID(x) (((uint32_t)(((uint32_t)(x)) << MCM_PID_PID_SHIFT)) & MCM_PID_PID_MASK)
  6676. /*!
  6677. * @}
  6678. */ /* end of group MCM_Register_Masks */
  6679. /* MCM - Peripheral instance base addresses */
  6680. /** Peripheral MCM base address */
  6681. #define MCM_BASE (0xE0080000u)
  6682. /** Peripheral MCM base pointer */
  6683. #define MCM ((MCM_Type *)MCM_BASE)
  6684. /** Array initializer of MCM peripheral base addresses */
  6685. #define MCM_BASE_ADDRS { MCM_BASE }
  6686. /** Array initializer of MCM peripheral base pointers */
  6687. #define MCM_BASE_PTRS { MCM }
  6688. /** Interrupt vectors for the MCM peripheral type */
  6689. #define MCM_IRQS { MCM_IRQn }
  6690. /*!
  6691. * @}
  6692. */ /* end of group MCM_Peripheral_Access_Layer */
  6693. /* ----------------------------------------------------------------------------
  6694. -- NV Peripheral Access Layer
  6695. ---------------------------------------------------------------------------- */
  6696. /*!
  6697. * @addtogroup NV_Peripheral_Access_Layer NV Peripheral Access Layer
  6698. * @{
  6699. */
  6700. /** NV - Register Layout Typedef */
  6701. typedef struct {
  6702. __I uint8_t BACKKEY3; /**< Backdoor Comparison Key 3., offset: 0x0 */
  6703. __I uint8_t BACKKEY2; /**< Backdoor Comparison Key 2., offset: 0x1 */
  6704. __I uint8_t BACKKEY1; /**< Backdoor Comparison Key 1., offset: 0x2 */
  6705. __I uint8_t BACKKEY0; /**< Backdoor Comparison Key 0., offset: 0x3 */
  6706. __I uint8_t BACKKEY7; /**< Backdoor Comparison Key 7., offset: 0x4 */
  6707. __I uint8_t BACKKEY6; /**< Backdoor Comparison Key 6., offset: 0x5 */
  6708. __I uint8_t BACKKEY5; /**< Backdoor Comparison Key 5., offset: 0x6 */
  6709. __I uint8_t BACKKEY4; /**< Backdoor Comparison Key 4., offset: 0x7 */
  6710. __I uint8_t FPROT3; /**< Non-volatile P-Flash Protection 1 - Low Register, offset: 0x8 */
  6711. __I uint8_t FPROT2; /**< Non-volatile P-Flash Protection 1 - High Register, offset: 0x9 */
  6712. __I uint8_t FPROT1; /**< Non-volatile P-Flash Protection 0 - Low Register, offset: 0xA */
  6713. __I uint8_t FPROT0; /**< Non-volatile P-Flash Protection 0 - High Register, offset: 0xB */
  6714. __I uint8_t FSEC; /**< Non-volatile Flash Security Register, offset: 0xC */
  6715. __I uint8_t FOPT; /**< Non-volatile Flash Option Register, offset: 0xD */
  6716. __I uint8_t FEPROT; /**< Non-volatile EERAM Protection Register, offset: 0xE */
  6717. __I uint8_t FDPROT; /**< Non-volatile D-Flash Protection Register, offset: 0xF */
  6718. } NV_Type;
  6719. /* ----------------------------------------------------------------------------
  6720. -- NV Register Masks
  6721. ---------------------------------------------------------------------------- */
  6722. /*!
  6723. * @addtogroup NV_Register_Masks NV Register Masks
  6724. * @{
  6725. */
  6726. /*! @name BACKKEY3 - Backdoor Comparison Key 3. */
  6727. #define NV_BACKKEY3_KEY_MASK (0xFFU)
  6728. #define NV_BACKKEY3_KEY_SHIFT (0U)
  6729. #define NV_BACKKEY3_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY3_KEY_SHIFT)) & NV_BACKKEY3_KEY_MASK)
  6730. /*! @name BACKKEY2 - Backdoor Comparison Key 2. */
  6731. #define NV_BACKKEY2_KEY_MASK (0xFFU)
  6732. #define NV_BACKKEY2_KEY_SHIFT (0U)
  6733. #define NV_BACKKEY2_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY2_KEY_SHIFT)) & NV_BACKKEY2_KEY_MASK)
  6734. /*! @name BACKKEY1 - Backdoor Comparison Key 1. */
  6735. #define NV_BACKKEY1_KEY_MASK (0xFFU)
  6736. #define NV_BACKKEY1_KEY_SHIFT (0U)
  6737. #define NV_BACKKEY1_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY1_KEY_SHIFT)) & NV_BACKKEY1_KEY_MASK)
  6738. /*! @name BACKKEY0 - Backdoor Comparison Key 0. */
  6739. #define NV_BACKKEY0_KEY_MASK (0xFFU)
  6740. #define NV_BACKKEY0_KEY_SHIFT (0U)
  6741. #define NV_BACKKEY0_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY0_KEY_SHIFT)) & NV_BACKKEY0_KEY_MASK)
  6742. /*! @name BACKKEY7 - Backdoor Comparison Key 7. */
  6743. #define NV_BACKKEY7_KEY_MASK (0xFFU)
  6744. #define NV_BACKKEY7_KEY_SHIFT (0U)
  6745. #define NV_BACKKEY7_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY7_KEY_SHIFT)) & NV_BACKKEY7_KEY_MASK)
  6746. /*! @name BACKKEY6 - Backdoor Comparison Key 6. */
  6747. #define NV_BACKKEY6_KEY_MASK (0xFFU)
  6748. #define NV_BACKKEY6_KEY_SHIFT (0U)
  6749. #define NV_BACKKEY6_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY6_KEY_SHIFT)) & NV_BACKKEY6_KEY_MASK)
  6750. /*! @name BACKKEY5 - Backdoor Comparison Key 5. */
  6751. #define NV_BACKKEY5_KEY_MASK (0xFFU)
  6752. #define NV_BACKKEY5_KEY_SHIFT (0U)
  6753. #define NV_BACKKEY5_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY5_KEY_SHIFT)) & NV_BACKKEY5_KEY_MASK)
  6754. /*! @name BACKKEY4 - Backdoor Comparison Key 4. */
  6755. #define NV_BACKKEY4_KEY_MASK (0xFFU)
  6756. #define NV_BACKKEY4_KEY_SHIFT (0U)
  6757. #define NV_BACKKEY4_KEY(x) (((uint8_t)(((uint8_t)(x)) << NV_BACKKEY4_KEY_SHIFT)) & NV_BACKKEY4_KEY_MASK)
  6758. /*! @name FPROT3 - Non-volatile P-Flash Protection 1 - Low Register */
  6759. #define NV_FPROT3_PROT_MASK (0xFFU)
  6760. #define NV_FPROT3_PROT_SHIFT (0U)
  6761. #define NV_FPROT3_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT3_PROT_SHIFT)) & NV_FPROT3_PROT_MASK)
  6762. /*! @name FPROT2 - Non-volatile P-Flash Protection 1 - High Register */
  6763. #define NV_FPROT2_PROT_MASK (0xFFU)
  6764. #define NV_FPROT2_PROT_SHIFT (0U)
  6765. #define NV_FPROT2_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT2_PROT_SHIFT)) & NV_FPROT2_PROT_MASK)
  6766. /*! @name FPROT1 - Non-volatile P-Flash Protection 0 - Low Register */
  6767. #define NV_FPROT1_PROT_MASK (0xFFU)
  6768. #define NV_FPROT1_PROT_SHIFT (0U)
  6769. #define NV_FPROT1_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT1_PROT_SHIFT)) & NV_FPROT1_PROT_MASK)
  6770. /*! @name FPROT0 - Non-volatile P-Flash Protection 0 - High Register */
  6771. #define NV_FPROT0_PROT_MASK (0xFFU)
  6772. #define NV_FPROT0_PROT_SHIFT (0U)
  6773. #define NV_FPROT0_PROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FPROT0_PROT_SHIFT)) & NV_FPROT0_PROT_MASK)
  6774. /*! @name FSEC - Non-volatile Flash Security Register */
  6775. #define NV_FSEC_SEC_MASK (0x3U)
  6776. #define NV_FSEC_SEC_SHIFT (0U)
  6777. #define NV_FSEC_SEC(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_SEC_SHIFT)) & NV_FSEC_SEC_MASK)
  6778. #define NV_FSEC_FSLACC_MASK (0xCU)
  6779. #define NV_FSEC_FSLACC_SHIFT (2U)
  6780. #define NV_FSEC_FSLACC(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_FSLACC_SHIFT)) & NV_FSEC_FSLACC_MASK)
  6781. #define NV_FSEC_MEEN_MASK (0x30U)
  6782. #define NV_FSEC_MEEN_SHIFT (4U)
  6783. #define NV_FSEC_MEEN(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_MEEN_SHIFT)) & NV_FSEC_MEEN_MASK)
  6784. #define NV_FSEC_KEYEN_MASK (0xC0U)
  6785. #define NV_FSEC_KEYEN_SHIFT (6U)
  6786. #define NV_FSEC_KEYEN(x) (((uint8_t)(((uint8_t)(x)) << NV_FSEC_KEYEN_SHIFT)) & NV_FSEC_KEYEN_MASK)
  6787. /*! @name FOPT - Non-volatile Flash Option Register */
  6788. #define NV_FOPT_LPBOOT_MASK (0x1U)
  6789. #define NV_FOPT_LPBOOT_SHIFT (0U)
  6790. #define NV_FOPT_LPBOOT(x) (((uint8_t)(((uint8_t)(x)) << NV_FOPT_LPBOOT_SHIFT)) & NV_FOPT_LPBOOT_MASK)
  6791. #define NV_FOPT_EZPORT_DIS_MASK (0x2U)
  6792. #define NV_FOPT_EZPORT_DIS_SHIFT (1U)
  6793. #define NV_FOPT_EZPORT_DIS(x) (((uint8_t)(((uint8_t)(x)) << NV_FOPT_EZPORT_DIS_SHIFT)) & NV_FOPT_EZPORT_DIS_MASK)
  6794. /*! @name FEPROT - Non-volatile EERAM Protection Register */
  6795. #define NV_FEPROT_EPROT_MASK (0xFFU)
  6796. #define NV_FEPROT_EPROT_SHIFT (0U)
  6797. #define NV_FEPROT_EPROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FEPROT_EPROT_SHIFT)) & NV_FEPROT_EPROT_MASK)
  6798. /*! @name FDPROT - Non-volatile D-Flash Protection Register */
  6799. #define NV_FDPROT_DPROT_MASK (0xFFU)
  6800. #define NV_FDPROT_DPROT_SHIFT (0U)
  6801. #define NV_FDPROT_DPROT(x) (((uint8_t)(((uint8_t)(x)) << NV_FDPROT_DPROT_SHIFT)) & NV_FDPROT_DPROT_MASK)
  6802. /*!
  6803. * @}
  6804. */ /* end of group NV_Register_Masks */
  6805. /* NV - Peripheral instance base addresses */
  6806. /** Peripheral FTFE_FlashConfig base address */
  6807. #define FTFE_FlashConfig_BASE (0x400u)
  6808. /** Peripheral FTFE_FlashConfig base pointer */
  6809. #define FTFE_FlashConfig ((NV_Type *)FTFE_FlashConfig_BASE)
  6810. /** Array initializer of NV peripheral base addresses */
  6811. #define NV_BASE_ADDRS { FTFE_FlashConfig_BASE }
  6812. /** Array initializer of NV peripheral base pointers */
  6813. #define NV_BASE_PTRS { FTFE_FlashConfig }
  6814. /*!
  6815. * @}
  6816. */ /* end of group NV_Peripheral_Access_Layer */
  6817. /* ----------------------------------------------------------------------------
  6818. -- OSC Peripheral Access Layer
  6819. ---------------------------------------------------------------------------- */
  6820. /*!
  6821. * @addtogroup OSC_Peripheral_Access_Layer OSC Peripheral Access Layer
  6822. * @{
  6823. */
  6824. /** OSC - Register Layout Typedef */
  6825. typedef struct {
  6826. __IO uint8_t CR; /**< OSC Control Register, offset: 0x0 */
  6827. } OSC_Type;
  6828. /* ----------------------------------------------------------------------------
  6829. -- OSC Register Masks
  6830. ---------------------------------------------------------------------------- */
  6831. /*!
  6832. * @addtogroup OSC_Register_Masks OSC Register Masks
  6833. * @{
  6834. */
  6835. /*! @name CR - OSC Control Register */
  6836. #define OSC_CR_SC16P_MASK (0x1U)
  6837. #define OSC_CR_SC16P_SHIFT (0U)
  6838. #define OSC_CR_SC16P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC16P_SHIFT)) & OSC_CR_SC16P_MASK)
  6839. #define OSC_CR_SC8P_MASK (0x2U)
  6840. #define OSC_CR_SC8P_SHIFT (1U)
  6841. #define OSC_CR_SC8P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC8P_SHIFT)) & OSC_CR_SC8P_MASK)
  6842. #define OSC_CR_SC4P_MASK (0x4U)
  6843. #define OSC_CR_SC4P_SHIFT (2U)
  6844. #define OSC_CR_SC4P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC4P_SHIFT)) & OSC_CR_SC4P_MASK)
  6845. #define OSC_CR_SC2P_MASK (0x8U)
  6846. #define OSC_CR_SC2P_SHIFT (3U)
  6847. #define OSC_CR_SC2P(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_SC2P_SHIFT)) & OSC_CR_SC2P_MASK)
  6848. #define OSC_CR_EREFSTEN_MASK (0x20U)
  6849. #define OSC_CR_EREFSTEN_SHIFT (5U)
  6850. #define OSC_CR_EREFSTEN(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_EREFSTEN_SHIFT)) & OSC_CR_EREFSTEN_MASK)
  6851. #define OSC_CR_ERCLKEN_MASK (0x80U)
  6852. #define OSC_CR_ERCLKEN_SHIFT (7U)
  6853. #define OSC_CR_ERCLKEN(x) (((uint8_t)(((uint8_t)(x)) << OSC_CR_ERCLKEN_SHIFT)) & OSC_CR_ERCLKEN_MASK)
  6854. /*!
  6855. * @}
  6856. */ /* end of group OSC_Register_Masks */
  6857. /* OSC - Peripheral instance base addresses */
  6858. /** Peripheral OSC base address */
  6859. #define OSC_BASE (0x40065000u)
  6860. /** Peripheral OSC base pointer */
  6861. #define OSC ((OSC_Type *)OSC_BASE)
  6862. /** Array initializer of OSC peripheral base addresses */
  6863. #define OSC_BASE_ADDRS { OSC_BASE }
  6864. /** Array initializer of OSC peripheral base pointers */
  6865. #define OSC_BASE_PTRS { OSC }
  6866. /*!
  6867. * @}
  6868. */ /* end of group OSC_Peripheral_Access_Layer */
  6869. /* ----------------------------------------------------------------------------
  6870. -- PDB Peripheral Access Layer
  6871. ---------------------------------------------------------------------------- */
  6872. /*!
  6873. * @addtogroup PDB_Peripheral_Access_Layer PDB Peripheral Access Layer
  6874. * @{
  6875. */
  6876. /** PDB - Register Layout Typedef */
  6877. typedef struct {
  6878. __IO uint32_t SC; /**< Status and Control register, offset: 0x0 */
  6879. __IO uint32_t MOD; /**< Modulus register, offset: 0x4 */
  6880. __I uint32_t CNT; /**< Counter register, offset: 0x8 */
  6881. __IO uint32_t IDLY; /**< Interrupt Delay register, offset: 0xC */
  6882. struct { /* offset: 0x10, array step: 0x28 */
  6883. __IO uint32_t C1; /**< Channel n Control register 1, array offset: 0x10, array step: 0x28 */
  6884. __IO uint32_t S; /**< Channel n Status register, array offset: 0x14, array step: 0x28 */
  6885. __IO uint32_t DLY[2]; /**< Channel n Delay 0 register..Channel n Delay 1 register, array offset: 0x18, array step: index*0x28, index2*0x4 */
  6886. uint8_t RESERVED_0[24];
  6887. } CH[2];
  6888. uint8_t RESERVED_0[240];
  6889. struct { /* offset: 0x150, array step: 0x8 */
  6890. __IO uint32_t INTC; /**< DAC Interval Trigger n Control register, array offset: 0x150, array step: 0x8 */
  6891. __IO uint32_t INT; /**< DAC Interval n register, array offset: 0x154, array step: 0x8 */
  6892. } DAC[2];
  6893. uint8_t RESERVED_1[48];
  6894. __IO uint32_t POEN; /**< Pulse-Out n Enable register, offset: 0x190 */
  6895. __IO uint32_t PODLY[3]; /**< Pulse-Out n Delay register, array offset: 0x194, array step: 0x4 */
  6896. } PDB_Type;
  6897. /* ----------------------------------------------------------------------------
  6898. -- PDB Register Masks
  6899. ---------------------------------------------------------------------------- */
  6900. /*!
  6901. * @addtogroup PDB_Register_Masks PDB Register Masks
  6902. * @{
  6903. */
  6904. /*! @name SC - Status and Control register */
  6905. #define PDB_SC_LDOK_MASK (0x1U)
  6906. #define PDB_SC_LDOK_SHIFT (0U)
  6907. #define PDB_SC_LDOK(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_LDOK_SHIFT)) & PDB_SC_LDOK_MASK)
  6908. #define PDB_SC_CONT_MASK (0x2U)
  6909. #define PDB_SC_CONT_SHIFT (1U)
  6910. #define PDB_SC_CONT(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_CONT_SHIFT)) & PDB_SC_CONT_MASK)
  6911. #define PDB_SC_MULT_MASK (0xCU)
  6912. #define PDB_SC_MULT_SHIFT (2U)
  6913. #define PDB_SC_MULT(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_MULT_SHIFT)) & PDB_SC_MULT_MASK)
  6914. #define PDB_SC_PDBIE_MASK (0x20U)
  6915. #define PDB_SC_PDBIE_SHIFT (5U)
  6916. #define PDB_SC_PDBIE(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBIE_SHIFT)) & PDB_SC_PDBIE_MASK)
  6917. #define PDB_SC_PDBIF_MASK (0x40U)
  6918. #define PDB_SC_PDBIF_SHIFT (6U)
  6919. #define PDB_SC_PDBIF(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBIF_SHIFT)) & PDB_SC_PDBIF_MASK)
  6920. #define PDB_SC_PDBEN_MASK (0x80U)
  6921. #define PDB_SC_PDBEN_SHIFT (7U)
  6922. #define PDB_SC_PDBEN(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBEN_SHIFT)) & PDB_SC_PDBEN_MASK)
  6923. #define PDB_SC_TRGSEL_MASK (0xF00U)
  6924. #define PDB_SC_TRGSEL_SHIFT (8U)
  6925. #define PDB_SC_TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_TRGSEL_SHIFT)) & PDB_SC_TRGSEL_MASK)
  6926. #define PDB_SC_PRESCALER_MASK (0x7000U)
  6927. #define PDB_SC_PRESCALER_SHIFT (12U)
  6928. #define PDB_SC_PRESCALER(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PRESCALER_SHIFT)) & PDB_SC_PRESCALER_MASK)
  6929. #define PDB_SC_DMAEN_MASK (0x8000U)
  6930. #define PDB_SC_DMAEN_SHIFT (15U)
  6931. #define PDB_SC_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_DMAEN_SHIFT)) & PDB_SC_DMAEN_MASK)
  6932. #define PDB_SC_SWTRIG_MASK (0x10000U)
  6933. #define PDB_SC_SWTRIG_SHIFT (16U)
  6934. #define PDB_SC_SWTRIG(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_SWTRIG_SHIFT)) & PDB_SC_SWTRIG_MASK)
  6935. #define PDB_SC_PDBEIE_MASK (0x20000U)
  6936. #define PDB_SC_PDBEIE_SHIFT (17U)
  6937. #define PDB_SC_PDBEIE(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_PDBEIE_SHIFT)) & PDB_SC_PDBEIE_MASK)
  6938. #define PDB_SC_LDMOD_MASK (0xC0000U)
  6939. #define PDB_SC_LDMOD_SHIFT (18U)
  6940. #define PDB_SC_LDMOD(x) (((uint32_t)(((uint32_t)(x)) << PDB_SC_LDMOD_SHIFT)) & PDB_SC_LDMOD_MASK)
  6941. /*! @name MOD - Modulus register */
  6942. #define PDB_MOD_MOD_MASK (0xFFFFU)
  6943. #define PDB_MOD_MOD_SHIFT (0U)
  6944. #define PDB_MOD_MOD(x) (((uint32_t)(((uint32_t)(x)) << PDB_MOD_MOD_SHIFT)) & PDB_MOD_MOD_MASK)
  6945. /*! @name CNT - Counter register */
  6946. #define PDB_CNT_CNT_MASK (0xFFFFU)
  6947. #define PDB_CNT_CNT_SHIFT (0U)
  6948. #define PDB_CNT_CNT(x) (((uint32_t)(((uint32_t)(x)) << PDB_CNT_CNT_SHIFT)) & PDB_CNT_CNT_MASK)
  6949. /*! @name IDLY - Interrupt Delay register */
  6950. #define PDB_IDLY_IDLY_MASK (0xFFFFU)
  6951. #define PDB_IDLY_IDLY_SHIFT (0U)
  6952. #define PDB_IDLY_IDLY(x) (((uint32_t)(((uint32_t)(x)) << PDB_IDLY_IDLY_SHIFT)) & PDB_IDLY_IDLY_MASK)
  6953. /*! @name C1 - Channel n Control register 1 */
  6954. #define PDB_C1_EN_MASK (0xFFU)
  6955. #define PDB_C1_EN_SHIFT (0U)
  6956. #define PDB_C1_EN(x) (((uint32_t)(((uint32_t)(x)) << PDB_C1_EN_SHIFT)) & PDB_C1_EN_MASK)
  6957. #define PDB_C1_TOS_MASK (0xFF00U)
  6958. #define PDB_C1_TOS_SHIFT (8U)
  6959. #define PDB_C1_TOS(x) (((uint32_t)(((uint32_t)(x)) << PDB_C1_TOS_SHIFT)) & PDB_C1_TOS_MASK)
  6960. #define PDB_C1_BB_MASK (0xFF0000U)
  6961. #define PDB_C1_BB_SHIFT (16U)
  6962. #define PDB_C1_BB(x) (((uint32_t)(((uint32_t)(x)) << PDB_C1_BB_SHIFT)) & PDB_C1_BB_MASK)
  6963. /* The count of PDB_C1 */
  6964. #define PDB_C1_COUNT (2U)
  6965. /*! @name S - Channel n Status register */
  6966. #define PDB_S_ERR_MASK (0xFFU)
  6967. #define PDB_S_ERR_SHIFT (0U)
  6968. #define PDB_S_ERR(x) (((uint32_t)(((uint32_t)(x)) << PDB_S_ERR_SHIFT)) & PDB_S_ERR_MASK)
  6969. #define PDB_S_CF_MASK (0xFF0000U)
  6970. #define PDB_S_CF_SHIFT (16U)
  6971. #define PDB_S_CF(x) (((uint32_t)(((uint32_t)(x)) << PDB_S_CF_SHIFT)) & PDB_S_CF_MASK)
  6972. /* The count of PDB_S */
  6973. #define PDB_S_COUNT (2U)
  6974. /*! @name DLY - Channel n Delay 0 register..Channel n Delay 1 register */
  6975. #define PDB_DLY_DLY_MASK (0xFFFFU)
  6976. #define PDB_DLY_DLY_SHIFT (0U)
  6977. #define PDB_DLY_DLY(x) (((uint32_t)(((uint32_t)(x)) << PDB_DLY_DLY_SHIFT)) & PDB_DLY_DLY_MASK)
  6978. /* The count of PDB_DLY */
  6979. #define PDB_DLY_COUNT (2U)
  6980. /* The count of PDB_DLY */
  6981. #define PDB_DLY_COUNT2 (2U)
  6982. /*! @name INTC - DAC Interval Trigger n Control register */
  6983. #define PDB_INTC_TOE_MASK (0x1U)
  6984. #define PDB_INTC_TOE_SHIFT (0U)
  6985. #define PDB_INTC_TOE(x) (((uint32_t)(((uint32_t)(x)) << PDB_INTC_TOE_SHIFT)) & PDB_INTC_TOE_MASK)
  6986. #define PDB_INTC_EXT_MASK (0x2U)
  6987. #define PDB_INTC_EXT_SHIFT (1U)
  6988. #define PDB_INTC_EXT(x) (((uint32_t)(((uint32_t)(x)) << PDB_INTC_EXT_SHIFT)) & PDB_INTC_EXT_MASK)
  6989. /* The count of PDB_INTC */
  6990. #define PDB_INTC_COUNT (2U)
  6991. /*! @name INT - DAC Interval n register */
  6992. #define PDB_INT_INT_MASK (0xFFFFU)
  6993. #define PDB_INT_INT_SHIFT (0U)
  6994. #define PDB_INT_INT(x) (((uint32_t)(((uint32_t)(x)) << PDB_INT_INT_SHIFT)) & PDB_INT_INT_MASK)
  6995. /* The count of PDB_INT */
  6996. #define PDB_INT_COUNT (2U)
  6997. /*! @name POEN - Pulse-Out n Enable register */
  6998. #define PDB_POEN_POEN_MASK (0xFFU)
  6999. #define PDB_POEN_POEN_SHIFT (0U)
  7000. #define PDB_POEN_POEN(x) (((uint32_t)(((uint32_t)(x)) << PDB_POEN_POEN_SHIFT)) & PDB_POEN_POEN_MASK)
  7001. /*! @name PODLY - Pulse-Out n Delay register */
  7002. #define PDB_PODLY_DLY2_MASK (0xFFFFU)
  7003. #define PDB_PODLY_DLY2_SHIFT (0U)
  7004. #define PDB_PODLY_DLY2(x) (((uint32_t)(((uint32_t)(x)) << PDB_PODLY_DLY2_SHIFT)) & PDB_PODLY_DLY2_MASK)
  7005. #define PDB_PODLY_DLY1_MASK (0xFFFF0000U)
  7006. #define PDB_PODLY_DLY1_SHIFT (16U)
  7007. #define PDB_PODLY_DLY1(x) (((uint32_t)(((uint32_t)(x)) << PDB_PODLY_DLY1_SHIFT)) & PDB_PODLY_DLY1_MASK)
  7008. /* The count of PDB_PODLY */
  7009. #define PDB_PODLY_COUNT (3U)
  7010. /*!
  7011. * @}
  7012. */ /* end of group PDB_Register_Masks */
  7013. /* PDB - Peripheral instance base addresses */
  7014. /** Peripheral PDB0 base address */
  7015. #define PDB0_BASE (0x40036000u)
  7016. /** Peripheral PDB0 base pointer */
  7017. #define PDB0 ((PDB_Type *)PDB0_BASE)
  7018. /** Array initializer of PDB peripheral base addresses */
  7019. #define PDB_BASE_ADDRS { PDB0_BASE }
  7020. /** Array initializer of PDB peripheral base pointers */
  7021. #define PDB_BASE_PTRS { PDB0 }
  7022. /** Interrupt vectors for the PDB peripheral type */
  7023. #define PDB_IRQS { PDB0_IRQn }
  7024. /*!
  7025. * @}
  7026. */ /* end of group PDB_Peripheral_Access_Layer */
  7027. /* ----------------------------------------------------------------------------
  7028. -- PIT Peripheral Access Layer
  7029. ---------------------------------------------------------------------------- */
  7030. /*!
  7031. * @addtogroup PIT_Peripheral_Access_Layer PIT Peripheral Access Layer
  7032. * @{
  7033. */
  7034. /** PIT - Register Layout Typedef */
  7035. typedef struct {
  7036. __IO uint32_t MCR; /**< PIT Module Control Register, offset: 0x0 */
  7037. uint8_t RESERVED_0[252];
  7038. struct { /* offset: 0x100, array step: 0x10 */
  7039. __IO uint32_t LDVAL; /**< Timer Load Value Register, array offset: 0x100, array step: 0x10 */
  7040. __I uint32_t CVAL; /**< Current Timer Value Register, array offset: 0x104, array step: 0x10 */
  7041. __IO uint32_t TCTRL; /**< Timer Control Register, array offset: 0x108, array step: 0x10 */
  7042. __IO uint32_t TFLG; /**< Timer Flag Register, array offset: 0x10C, array step: 0x10 */
  7043. } CHANNEL[4];
  7044. } PIT_Type;
  7045. /* ----------------------------------------------------------------------------
  7046. -- PIT Register Masks
  7047. ---------------------------------------------------------------------------- */
  7048. /*!
  7049. * @addtogroup PIT_Register_Masks PIT Register Masks
  7050. * @{
  7051. */
  7052. /*! @name MCR - PIT Module Control Register */
  7053. #define PIT_MCR_FRZ_MASK (0x1U)
  7054. #define PIT_MCR_FRZ_SHIFT (0U)
  7055. #define PIT_MCR_FRZ(x) (((uint32_t)(((uint32_t)(x)) << PIT_MCR_FRZ_SHIFT)) & PIT_MCR_FRZ_MASK)
  7056. #define PIT_MCR_MDIS_MASK (0x2U)
  7057. #define PIT_MCR_MDIS_SHIFT (1U)
  7058. #define PIT_MCR_MDIS(x) (((uint32_t)(((uint32_t)(x)) << PIT_MCR_MDIS_SHIFT)) & PIT_MCR_MDIS_MASK)
  7059. /*! @name LDVAL - Timer Load Value Register */
  7060. #define PIT_LDVAL_TSV_MASK (0xFFFFFFFFU)
  7061. #define PIT_LDVAL_TSV_SHIFT (0U)
  7062. #define PIT_LDVAL_TSV(x) (((uint32_t)(((uint32_t)(x)) << PIT_LDVAL_TSV_SHIFT)) & PIT_LDVAL_TSV_MASK)
  7063. /* The count of PIT_LDVAL */
  7064. #define PIT_LDVAL_COUNT (4U)
  7065. /*! @name CVAL - Current Timer Value Register */
  7066. #define PIT_CVAL_TVL_MASK (0xFFFFFFFFU)
  7067. #define PIT_CVAL_TVL_SHIFT (0U)
  7068. #define PIT_CVAL_TVL(x) (((uint32_t)(((uint32_t)(x)) << PIT_CVAL_TVL_SHIFT)) & PIT_CVAL_TVL_MASK)
  7069. /* The count of PIT_CVAL */
  7070. #define PIT_CVAL_COUNT (4U)
  7071. /*! @name TCTRL - Timer Control Register */
  7072. #define PIT_TCTRL_TEN_MASK (0x1U)
  7073. #define PIT_TCTRL_TEN_SHIFT (0U)
  7074. #define PIT_TCTRL_TEN(x) (((uint32_t)(((uint32_t)(x)) << PIT_TCTRL_TEN_SHIFT)) & PIT_TCTRL_TEN_MASK)
  7075. #define PIT_TCTRL_TIE_MASK (0x2U)
  7076. #define PIT_TCTRL_TIE_SHIFT (1U)
  7077. #define PIT_TCTRL_TIE(x) (((uint32_t)(((uint32_t)(x)) << PIT_TCTRL_TIE_SHIFT)) & PIT_TCTRL_TIE_MASK)
  7078. #define PIT_TCTRL_CHN_MASK (0x4U)
  7079. #define PIT_TCTRL_CHN_SHIFT (2U)
  7080. #define PIT_TCTRL_CHN(x) (((uint32_t)(((uint32_t)(x)) << PIT_TCTRL_CHN_SHIFT)) & PIT_TCTRL_CHN_MASK)
  7081. /* The count of PIT_TCTRL */
  7082. #define PIT_TCTRL_COUNT (4U)
  7083. /*! @name TFLG - Timer Flag Register */
  7084. #define PIT_TFLG_TIF_MASK (0x1U)
  7085. #define PIT_TFLG_TIF_SHIFT (0U)
  7086. #define PIT_TFLG_TIF(x) (((uint32_t)(((uint32_t)(x)) << PIT_TFLG_TIF_SHIFT)) & PIT_TFLG_TIF_MASK)
  7087. /* The count of PIT_TFLG */
  7088. #define PIT_TFLG_COUNT (4U)
  7089. /*!
  7090. * @}
  7091. */ /* end of group PIT_Register_Masks */
  7092. /* PIT - Peripheral instance base addresses */
  7093. /** Peripheral PIT base address */
  7094. #define PIT_BASE (0x40037000u)
  7095. /** Peripheral PIT base pointer */
  7096. #define PIT ((PIT_Type *)PIT_BASE)
  7097. /** Array initializer of PIT peripheral base addresses */
  7098. #define PIT_BASE_ADDRS { PIT_BASE }
  7099. /** Array initializer of PIT peripheral base pointers */
  7100. #define PIT_BASE_PTRS { PIT }
  7101. /** Interrupt vectors for the PIT peripheral type */
  7102. #define PIT_IRQS { { PIT0_IRQn, PIT1_IRQn, PIT2_IRQn, PIT3_IRQn } }
  7103. /*!
  7104. * @}
  7105. */ /* end of group PIT_Peripheral_Access_Layer */
  7106. /* ----------------------------------------------------------------------------
  7107. -- PMC Peripheral Access Layer
  7108. ---------------------------------------------------------------------------- */
  7109. /*!
  7110. * @addtogroup PMC_Peripheral_Access_Layer PMC Peripheral Access Layer
  7111. * @{
  7112. */
  7113. /** PMC - Register Layout Typedef */
  7114. typedef struct {
  7115. __IO uint8_t LVDSC1; /**< Low Voltage Detect Status And Control 1 register, offset: 0x0 */
  7116. __IO uint8_t LVDSC2; /**< Low Voltage Detect Status And Control 2 register, offset: 0x1 */
  7117. __IO uint8_t REGSC; /**< Regulator Status And Control register, offset: 0x2 */
  7118. } PMC_Type;
  7119. /* ----------------------------------------------------------------------------
  7120. -- PMC Register Masks
  7121. ---------------------------------------------------------------------------- */
  7122. /*!
  7123. * @addtogroup PMC_Register_Masks PMC Register Masks
  7124. * @{
  7125. */
  7126. /*! @name LVDSC1 - Low Voltage Detect Status And Control 1 register */
  7127. #define PMC_LVDSC1_LVDV_MASK (0x3U)
  7128. #define PMC_LVDSC1_LVDV_SHIFT (0U)
  7129. #define PMC_LVDSC1_LVDV(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDV_SHIFT)) & PMC_LVDSC1_LVDV_MASK)
  7130. #define PMC_LVDSC1_LVDRE_MASK (0x10U)
  7131. #define PMC_LVDSC1_LVDRE_SHIFT (4U)
  7132. #define PMC_LVDSC1_LVDRE(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDRE_SHIFT)) & PMC_LVDSC1_LVDRE_MASK)
  7133. #define PMC_LVDSC1_LVDIE_MASK (0x20U)
  7134. #define PMC_LVDSC1_LVDIE_SHIFT (5U)
  7135. #define PMC_LVDSC1_LVDIE(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDIE_SHIFT)) & PMC_LVDSC1_LVDIE_MASK)
  7136. #define PMC_LVDSC1_LVDACK_MASK (0x40U)
  7137. #define PMC_LVDSC1_LVDACK_SHIFT (6U)
  7138. #define PMC_LVDSC1_LVDACK(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDACK_SHIFT)) & PMC_LVDSC1_LVDACK_MASK)
  7139. #define PMC_LVDSC1_LVDF_MASK (0x80U)
  7140. #define PMC_LVDSC1_LVDF_SHIFT (7U)
  7141. #define PMC_LVDSC1_LVDF(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC1_LVDF_SHIFT)) & PMC_LVDSC1_LVDF_MASK)
  7142. /*! @name LVDSC2 - Low Voltage Detect Status And Control 2 register */
  7143. #define PMC_LVDSC2_LVWV_MASK (0x3U)
  7144. #define PMC_LVDSC2_LVWV_SHIFT (0U)
  7145. #define PMC_LVDSC2_LVWV(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWV_SHIFT)) & PMC_LVDSC2_LVWV_MASK)
  7146. #define PMC_LVDSC2_LVWIE_MASK (0x20U)
  7147. #define PMC_LVDSC2_LVWIE_SHIFT (5U)
  7148. #define PMC_LVDSC2_LVWIE(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWIE_SHIFT)) & PMC_LVDSC2_LVWIE_MASK)
  7149. #define PMC_LVDSC2_LVWACK_MASK (0x40U)
  7150. #define PMC_LVDSC2_LVWACK_SHIFT (6U)
  7151. #define PMC_LVDSC2_LVWACK(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWACK_SHIFT)) & PMC_LVDSC2_LVWACK_MASK)
  7152. #define PMC_LVDSC2_LVWF_MASK (0x80U)
  7153. #define PMC_LVDSC2_LVWF_SHIFT (7U)
  7154. #define PMC_LVDSC2_LVWF(x) (((uint8_t)(((uint8_t)(x)) << PMC_LVDSC2_LVWF_SHIFT)) & PMC_LVDSC2_LVWF_MASK)
  7155. /*! @name REGSC - Regulator Status And Control register */
  7156. #define PMC_REGSC_BGBE_MASK (0x1U)
  7157. #define PMC_REGSC_BGBE_SHIFT (0U)
  7158. #define PMC_REGSC_BGBE(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_BGBE_SHIFT)) & PMC_REGSC_BGBE_MASK)
  7159. #define PMC_REGSC_REGONS_MASK (0x4U)
  7160. #define PMC_REGSC_REGONS_SHIFT (2U)
  7161. #define PMC_REGSC_REGONS(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_REGONS_SHIFT)) & PMC_REGSC_REGONS_MASK)
  7162. #define PMC_REGSC_ACKISO_MASK (0x8U)
  7163. #define PMC_REGSC_ACKISO_SHIFT (3U)
  7164. #define PMC_REGSC_ACKISO(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_ACKISO_SHIFT)) & PMC_REGSC_ACKISO_MASK)
  7165. #define PMC_REGSC_BGEN_MASK (0x10U)
  7166. #define PMC_REGSC_BGEN_SHIFT (4U)
  7167. #define PMC_REGSC_BGEN(x) (((uint8_t)(((uint8_t)(x)) << PMC_REGSC_BGEN_SHIFT)) & PMC_REGSC_BGEN_MASK)
  7168. /*!
  7169. * @}
  7170. */ /* end of group PMC_Register_Masks */
  7171. /* PMC - Peripheral instance base addresses */
  7172. /** Peripheral PMC base address */
  7173. #define PMC_BASE (0x4007D000u)
  7174. /** Peripheral PMC base pointer */
  7175. #define PMC ((PMC_Type *)PMC_BASE)
  7176. /** Array initializer of PMC peripheral base addresses */
  7177. #define PMC_BASE_ADDRS { PMC_BASE }
  7178. /** Array initializer of PMC peripheral base pointers */
  7179. #define PMC_BASE_PTRS { PMC }
  7180. /** Interrupt vectors for the PMC peripheral type */
  7181. #define PMC_IRQS { LVD_LVW_IRQn }
  7182. /*!
  7183. * @}
  7184. */ /* end of group PMC_Peripheral_Access_Layer */
  7185. /* ----------------------------------------------------------------------------
  7186. -- PORT Peripheral Access Layer
  7187. ---------------------------------------------------------------------------- */
  7188. /*!
  7189. * @addtogroup PORT_Peripheral_Access_Layer PORT Peripheral Access Layer
  7190. * @{
  7191. */
  7192. /** PORT - Register Layout Typedef */
  7193. typedef struct {
  7194. __IO uint32_t PCR[32]; /**< Pin Control Register n, array offset: 0x0, array step: 0x4 */
  7195. __O uint32_t GPCLR; /**< Global Pin Control Low Register, offset: 0x80 */
  7196. __O uint32_t GPCHR; /**< Global Pin Control High Register, offset: 0x84 */
  7197. uint8_t RESERVED_0[24];
  7198. __IO uint32_t ISFR; /**< Interrupt Status Flag Register, offset: 0xA0 */
  7199. uint8_t RESERVED_1[28];
  7200. __IO uint32_t DFER; /**< Digital Filter Enable Register, offset: 0xC0 */
  7201. __IO uint32_t DFCR; /**< Digital Filter Clock Register, offset: 0xC4 */
  7202. __IO uint32_t DFWR; /**< Digital Filter Width Register, offset: 0xC8 */
  7203. } PORT_Type;
  7204. /* ----------------------------------------------------------------------------
  7205. -- PORT Register Masks
  7206. ---------------------------------------------------------------------------- */
  7207. /*!
  7208. * @addtogroup PORT_Register_Masks PORT Register Masks
  7209. * @{
  7210. */
  7211. /*! @name PCR - Pin Control Register n */
  7212. #define PORT_PCR_PS_MASK (0x1U)
  7213. #define PORT_PCR_PS_SHIFT (0U)
  7214. #define PORT_PCR_PS(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PS_SHIFT)) & PORT_PCR_PS_MASK)
  7215. #define PORT_PCR_PE_MASK (0x2U)
  7216. #define PORT_PCR_PE_SHIFT (1U)
  7217. #define PORT_PCR_PE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PE_SHIFT)) & PORT_PCR_PE_MASK)
  7218. #define PORT_PCR_SRE_MASK (0x4U)
  7219. #define PORT_PCR_SRE_SHIFT (2U)
  7220. #define PORT_PCR_SRE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_SRE_SHIFT)) & PORT_PCR_SRE_MASK)
  7221. #define PORT_PCR_PFE_MASK (0x10U)
  7222. #define PORT_PCR_PFE_SHIFT (4U)
  7223. #define PORT_PCR_PFE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_PFE_SHIFT)) & PORT_PCR_PFE_MASK)
  7224. #define PORT_PCR_ODE_MASK (0x20U)
  7225. #define PORT_PCR_ODE_SHIFT (5U)
  7226. #define PORT_PCR_ODE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_ODE_SHIFT)) & PORT_PCR_ODE_MASK)
  7227. #define PORT_PCR_DSE_MASK (0x40U)
  7228. #define PORT_PCR_DSE_SHIFT (6U)
  7229. #define PORT_PCR_DSE(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_DSE_SHIFT)) & PORT_PCR_DSE_MASK)
  7230. #define PORT_PCR_MUX_MASK (0x700U)
  7231. #define PORT_PCR_MUX_SHIFT (8U)
  7232. #define PORT_PCR_MUX(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_MUX_SHIFT)) & PORT_PCR_MUX_MASK)
  7233. #define PORT_PCR_LK_MASK (0x8000U)
  7234. #define PORT_PCR_LK_SHIFT (15U)
  7235. #define PORT_PCR_LK(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_LK_SHIFT)) & PORT_PCR_LK_MASK)
  7236. #define PORT_PCR_IRQC_MASK (0xF0000U)
  7237. #define PORT_PCR_IRQC_SHIFT (16U)
  7238. #define PORT_PCR_IRQC(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_IRQC_SHIFT)) & PORT_PCR_IRQC_MASK)
  7239. #define PORT_PCR_ISF_MASK (0x1000000U)
  7240. #define PORT_PCR_ISF_SHIFT (24U)
  7241. #define PORT_PCR_ISF(x) (((uint32_t)(((uint32_t)(x)) << PORT_PCR_ISF_SHIFT)) & PORT_PCR_ISF_MASK)
  7242. /* The count of PORT_PCR */
  7243. #define PORT_PCR_COUNT (32U)
  7244. /*! @name GPCLR - Global Pin Control Low Register */
  7245. #define PORT_GPCLR_GPWD_MASK (0xFFFFU)
  7246. #define PORT_GPCLR_GPWD_SHIFT (0U)
  7247. #define PORT_GPCLR_GPWD(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCLR_GPWD_SHIFT)) & PORT_GPCLR_GPWD_MASK)
  7248. #define PORT_GPCLR_GPWE_MASK (0xFFFF0000U)
  7249. #define PORT_GPCLR_GPWE_SHIFT (16U)
  7250. #define PORT_GPCLR_GPWE(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCLR_GPWE_SHIFT)) & PORT_GPCLR_GPWE_MASK)
  7251. /*! @name GPCHR - Global Pin Control High Register */
  7252. #define PORT_GPCHR_GPWD_MASK (0xFFFFU)
  7253. #define PORT_GPCHR_GPWD_SHIFT (0U)
  7254. #define PORT_GPCHR_GPWD(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCHR_GPWD_SHIFT)) & PORT_GPCHR_GPWD_MASK)
  7255. #define PORT_GPCHR_GPWE_MASK (0xFFFF0000U)
  7256. #define PORT_GPCHR_GPWE_SHIFT (16U)
  7257. #define PORT_GPCHR_GPWE(x) (((uint32_t)(((uint32_t)(x)) << PORT_GPCHR_GPWE_SHIFT)) & PORT_GPCHR_GPWE_MASK)
  7258. /*! @name ISFR - Interrupt Status Flag Register */
  7259. #define PORT_ISFR_ISF_MASK (0xFFFFFFFFU)
  7260. #define PORT_ISFR_ISF_SHIFT (0U)
  7261. #define PORT_ISFR_ISF(x) (((uint32_t)(((uint32_t)(x)) << PORT_ISFR_ISF_SHIFT)) & PORT_ISFR_ISF_MASK)
  7262. /*! @name DFER - Digital Filter Enable Register */
  7263. #define PORT_DFER_DFE_MASK (0xFFFFFFFFU)
  7264. #define PORT_DFER_DFE_SHIFT (0U)
  7265. #define PORT_DFER_DFE(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFER_DFE_SHIFT)) & PORT_DFER_DFE_MASK)
  7266. /*! @name DFCR - Digital Filter Clock Register */
  7267. #define PORT_DFCR_CS_MASK (0x1U)
  7268. #define PORT_DFCR_CS_SHIFT (0U)
  7269. #define PORT_DFCR_CS(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFCR_CS_SHIFT)) & PORT_DFCR_CS_MASK)
  7270. /*! @name DFWR - Digital Filter Width Register */
  7271. #define PORT_DFWR_FILT_MASK (0x1FU)
  7272. #define PORT_DFWR_FILT_SHIFT (0U)
  7273. #define PORT_DFWR_FILT(x) (((uint32_t)(((uint32_t)(x)) << PORT_DFWR_FILT_SHIFT)) & PORT_DFWR_FILT_MASK)
  7274. /*!
  7275. * @}
  7276. */ /* end of group PORT_Register_Masks */
  7277. /* PORT - Peripheral instance base addresses */
  7278. /** Peripheral PORTA base address */
  7279. #define PORTA_BASE (0x40049000u)
  7280. /** Peripheral PORTA base pointer */
  7281. #define PORTA ((PORT_Type *)PORTA_BASE)
  7282. /** Peripheral PORTB base address */
  7283. #define PORTB_BASE (0x4004A000u)
  7284. /** Peripheral PORTB base pointer */
  7285. #define PORTB ((PORT_Type *)PORTB_BASE)
  7286. /** Peripheral PORTC base address */
  7287. #define PORTC_BASE (0x4004B000u)
  7288. /** Peripheral PORTC base pointer */
  7289. #define PORTC ((PORT_Type *)PORTC_BASE)
  7290. /** Peripheral PORTD base address */
  7291. #define PORTD_BASE (0x4004C000u)
  7292. /** Peripheral PORTD base pointer */
  7293. #define PORTD ((PORT_Type *)PORTD_BASE)
  7294. /** Peripheral PORTE base address */
  7295. #define PORTE_BASE (0x4004D000u)
  7296. /** Peripheral PORTE base pointer */
  7297. #define PORTE ((PORT_Type *)PORTE_BASE)
  7298. /** Array initializer of PORT peripheral base addresses */
  7299. #define PORT_BASE_ADDRS { PORTA_BASE, PORTB_BASE, PORTC_BASE, PORTD_BASE, PORTE_BASE }
  7300. /** Array initializer of PORT peripheral base pointers */
  7301. #define PORT_BASE_PTRS { PORTA, PORTB, PORTC, PORTD, PORTE }
  7302. /** Interrupt vectors for the PORT peripheral type */
  7303. #define PORT_IRQS { PORTA_IRQn, PORTB_IRQn, PORTC_IRQn, PORTD_IRQn, PORTE_IRQn }
  7304. /*!
  7305. * @}
  7306. */ /* end of group PORT_Peripheral_Access_Layer */
  7307. /* ----------------------------------------------------------------------------
  7308. -- RCM Peripheral Access Layer
  7309. ---------------------------------------------------------------------------- */
  7310. /*!
  7311. * @addtogroup RCM_Peripheral_Access_Layer RCM Peripheral Access Layer
  7312. * @{
  7313. */
  7314. /** RCM - Register Layout Typedef */
  7315. typedef struct {
  7316. __I uint8_t SRS0; /**< System Reset Status Register 0, offset: 0x0 */
  7317. __I uint8_t SRS1; /**< System Reset Status Register 1, offset: 0x1 */
  7318. uint8_t RESERVED_0[2];
  7319. __IO uint8_t RPFC; /**< Reset Pin Filter Control register, offset: 0x4 */
  7320. __IO uint8_t RPFW; /**< Reset Pin Filter Width register, offset: 0x5 */
  7321. uint8_t RESERVED_1[1];
  7322. __I uint8_t MR; /**< Mode Register, offset: 0x7 */
  7323. } RCM_Type;
  7324. /* ----------------------------------------------------------------------------
  7325. -- RCM Register Masks
  7326. ---------------------------------------------------------------------------- */
  7327. /*!
  7328. * @addtogroup RCM_Register_Masks RCM Register Masks
  7329. * @{
  7330. */
  7331. /*! @name SRS0 - System Reset Status Register 0 */
  7332. #define RCM_SRS0_WAKEUP_MASK (0x1U)
  7333. #define RCM_SRS0_WAKEUP_SHIFT (0U)
  7334. #define RCM_SRS0_WAKEUP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_WAKEUP_SHIFT)) & RCM_SRS0_WAKEUP_MASK)
  7335. #define RCM_SRS0_LVD_MASK (0x2U)
  7336. #define RCM_SRS0_LVD_SHIFT (1U)
  7337. #define RCM_SRS0_LVD(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_LVD_SHIFT)) & RCM_SRS0_LVD_MASK)
  7338. #define RCM_SRS0_LOC_MASK (0x4U)
  7339. #define RCM_SRS0_LOC_SHIFT (2U)
  7340. #define RCM_SRS0_LOC(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_LOC_SHIFT)) & RCM_SRS0_LOC_MASK)
  7341. #define RCM_SRS0_LOL_MASK (0x8U)
  7342. #define RCM_SRS0_LOL_SHIFT (3U)
  7343. #define RCM_SRS0_LOL(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_LOL_SHIFT)) & RCM_SRS0_LOL_MASK)
  7344. #define RCM_SRS0_WDOG_MASK (0x20U)
  7345. #define RCM_SRS0_WDOG_SHIFT (5U)
  7346. #define RCM_SRS0_WDOG(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_WDOG_SHIFT)) & RCM_SRS0_WDOG_MASK)
  7347. #define RCM_SRS0_PIN_MASK (0x40U)
  7348. #define RCM_SRS0_PIN_SHIFT (6U)
  7349. #define RCM_SRS0_PIN(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_PIN_SHIFT)) & RCM_SRS0_PIN_MASK)
  7350. #define RCM_SRS0_POR_MASK (0x80U)
  7351. #define RCM_SRS0_POR_SHIFT (7U)
  7352. #define RCM_SRS0_POR(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS0_POR_SHIFT)) & RCM_SRS0_POR_MASK)
  7353. /*! @name SRS1 - System Reset Status Register 1 */
  7354. #define RCM_SRS1_JTAG_MASK (0x1U)
  7355. #define RCM_SRS1_JTAG_SHIFT (0U)
  7356. #define RCM_SRS1_JTAG(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_JTAG_SHIFT)) & RCM_SRS1_JTAG_MASK)
  7357. #define RCM_SRS1_LOCKUP_MASK (0x2U)
  7358. #define RCM_SRS1_LOCKUP_SHIFT (1U)
  7359. #define RCM_SRS1_LOCKUP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_LOCKUP_SHIFT)) & RCM_SRS1_LOCKUP_MASK)
  7360. #define RCM_SRS1_SW_MASK (0x4U)
  7361. #define RCM_SRS1_SW_SHIFT (2U)
  7362. #define RCM_SRS1_SW(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_SW_SHIFT)) & RCM_SRS1_SW_MASK)
  7363. #define RCM_SRS1_MDM_AP_MASK (0x8U)
  7364. #define RCM_SRS1_MDM_AP_SHIFT (3U)
  7365. #define RCM_SRS1_MDM_AP(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_MDM_AP_SHIFT)) & RCM_SRS1_MDM_AP_MASK)
  7366. #define RCM_SRS1_EZPT_MASK (0x10U)
  7367. #define RCM_SRS1_EZPT_SHIFT (4U)
  7368. #define RCM_SRS1_EZPT(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_EZPT_SHIFT)) & RCM_SRS1_EZPT_MASK)
  7369. #define RCM_SRS1_SACKERR_MASK (0x20U)
  7370. #define RCM_SRS1_SACKERR_SHIFT (5U)
  7371. #define RCM_SRS1_SACKERR(x) (((uint8_t)(((uint8_t)(x)) << RCM_SRS1_SACKERR_SHIFT)) & RCM_SRS1_SACKERR_MASK)
  7372. /*! @name RPFC - Reset Pin Filter Control register */
  7373. #define RCM_RPFC_RSTFLTSRW_MASK (0x3U)
  7374. #define RCM_RPFC_RSTFLTSRW_SHIFT (0U)
  7375. #define RCM_RPFC_RSTFLTSRW(x) (((uint8_t)(((uint8_t)(x)) << RCM_RPFC_RSTFLTSRW_SHIFT)) & RCM_RPFC_RSTFLTSRW_MASK)
  7376. #define RCM_RPFC_RSTFLTSS_MASK (0x4U)
  7377. #define RCM_RPFC_RSTFLTSS_SHIFT (2U)
  7378. #define RCM_RPFC_RSTFLTSS(x) (((uint8_t)(((uint8_t)(x)) << RCM_RPFC_RSTFLTSS_SHIFT)) & RCM_RPFC_RSTFLTSS_MASK)
  7379. /*! @name RPFW - Reset Pin Filter Width register */
  7380. #define RCM_RPFW_RSTFLTSEL_MASK (0x1FU)
  7381. #define RCM_RPFW_RSTFLTSEL_SHIFT (0U)
  7382. #define RCM_RPFW_RSTFLTSEL(x) (((uint8_t)(((uint8_t)(x)) << RCM_RPFW_RSTFLTSEL_SHIFT)) & RCM_RPFW_RSTFLTSEL_MASK)
  7383. /*! @name MR - Mode Register */
  7384. #define RCM_MR_EZP_MS_MASK (0x2U)
  7385. #define RCM_MR_EZP_MS_SHIFT (1U)
  7386. #define RCM_MR_EZP_MS(x) (((uint8_t)(((uint8_t)(x)) << RCM_MR_EZP_MS_SHIFT)) & RCM_MR_EZP_MS_MASK)
  7387. /*!
  7388. * @}
  7389. */ /* end of group RCM_Register_Masks */
  7390. /* RCM - Peripheral instance base addresses */
  7391. /** Peripheral RCM base address */
  7392. #define RCM_BASE (0x4007F000u)
  7393. /** Peripheral RCM base pointer */
  7394. #define RCM ((RCM_Type *)RCM_BASE)
  7395. /** Array initializer of RCM peripheral base addresses */
  7396. #define RCM_BASE_ADDRS { RCM_BASE }
  7397. /** Array initializer of RCM peripheral base pointers */
  7398. #define RCM_BASE_PTRS { RCM }
  7399. /*!
  7400. * @}
  7401. */ /* end of group RCM_Peripheral_Access_Layer */
  7402. /* ----------------------------------------------------------------------------
  7403. -- RFSYS Peripheral Access Layer
  7404. ---------------------------------------------------------------------------- */
  7405. /*!
  7406. * @addtogroup RFSYS_Peripheral_Access_Layer RFSYS Peripheral Access Layer
  7407. * @{
  7408. */
  7409. /** RFSYS - Register Layout Typedef */
  7410. typedef struct {
  7411. __IO uint32_t REG[8]; /**< Register file register, array offset: 0x0, array step: 0x4 */
  7412. } RFSYS_Type;
  7413. /* ----------------------------------------------------------------------------
  7414. -- RFSYS Register Masks
  7415. ---------------------------------------------------------------------------- */
  7416. /*!
  7417. * @addtogroup RFSYS_Register_Masks RFSYS Register Masks
  7418. * @{
  7419. */
  7420. /*! @name REG - Register file register */
  7421. #define RFSYS_REG_LL_MASK (0xFFU)
  7422. #define RFSYS_REG_LL_SHIFT (0U)
  7423. #define RFSYS_REG_LL(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_LL_SHIFT)) & RFSYS_REG_LL_MASK)
  7424. #define RFSYS_REG_LH_MASK (0xFF00U)
  7425. #define RFSYS_REG_LH_SHIFT (8U)
  7426. #define RFSYS_REG_LH(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_LH_SHIFT)) & RFSYS_REG_LH_MASK)
  7427. #define RFSYS_REG_HL_MASK (0xFF0000U)
  7428. #define RFSYS_REG_HL_SHIFT (16U)
  7429. #define RFSYS_REG_HL(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_HL_SHIFT)) & RFSYS_REG_HL_MASK)
  7430. #define RFSYS_REG_HH_MASK (0xFF000000U)
  7431. #define RFSYS_REG_HH_SHIFT (24U)
  7432. #define RFSYS_REG_HH(x) (((uint32_t)(((uint32_t)(x)) << RFSYS_REG_HH_SHIFT)) & RFSYS_REG_HH_MASK)
  7433. /* The count of RFSYS_REG */
  7434. #define RFSYS_REG_COUNT (8U)
  7435. /*!
  7436. * @}
  7437. */ /* end of group RFSYS_Register_Masks */
  7438. /* RFSYS - Peripheral instance base addresses */
  7439. /** Peripheral RFSYS base address */
  7440. #define RFSYS_BASE (0x40041000u)
  7441. /** Peripheral RFSYS base pointer */
  7442. #define RFSYS ((RFSYS_Type *)RFSYS_BASE)
  7443. /** Array initializer of RFSYS peripheral base addresses */
  7444. #define RFSYS_BASE_ADDRS { RFSYS_BASE }
  7445. /** Array initializer of RFSYS peripheral base pointers */
  7446. #define RFSYS_BASE_PTRS { RFSYS }
  7447. /*!
  7448. * @}
  7449. */ /* end of group RFSYS_Peripheral_Access_Layer */
  7450. /* ----------------------------------------------------------------------------
  7451. -- RFVBAT Peripheral Access Layer
  7452. ---------------------------------------------------------------------------- */
  7453. /*!
  7454. * @addtogroup RFVBAT_Peripheral_Access_Layer RFVBAT Peripheral Access Layer
  7455. * @{
  7456. */
  7457. /** RFVBAT - Register Layout Typedef */
  7458. typedef struct {
  7459. __IO uint32_t REG[8]; /**< VBAT register file register, array offset: 0x0, array step: 0x4 */
  7460. } RFVBAT_Type;
  7461. /* ----------------------------------------------------------------------------
  7462. -- RFVBAT Register Masks
  7463. ---------------------------------------------------------------------------- */
  7464. /*!
  7465. * @addtogroup RFVBAT_Register_Masks RFVBAT Register Masks
  7466. * @{
  7467. */
  7468. /*! @name REG - VBAT register file register */
  7469. #define RFVBAT_REG_LL_MASK (0xFFU)
  7470. #define RFVBAT_REG_LL_SHIFT (0U)
  7471. #define RFVBAT_REG_LL(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_LL_SHIFT)) & RFVBAT_REG_LL_MASK)
  7472. #define RFVBAT_REG_LH_MASK (0xFF00U)
  7473. #define RFVBAT_REG_LH_SHIFT (8U)
  7474. #define RFVBAT_REG_LH(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_LH_SHIFT)) & RFVBAT_REG_LH_MASK)
  7475. #define RFVBAT_REG_HL_MASK (0xFF0000U)
  7476. #define RFVBAT_REG_HL_SHIFT (16U)
  7477. #define RFVBAT_REG_HL(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_HL_SHIFT)) & RFVBAT_REG_HL_MASK)
  7478. #define RFVBAT_REG_HH_MASK (0xFF000000U)
  7479. #define RFVBAT_REG_HH_SHIFT (24U)
  7480. #define RFVBAT_REG_HH(x) (((uint32_t)(((uint32_t)(x)) << RFVBAT_REG_HH_SHIFT)) & RFVBAT_REG_HH_MASK)
  7481. /* The count of RFVBAT_REG */
  7482. #define RFVBAT_REG_COUNT (8U)
  7483. /*!
  7484. * @}
  7485. */ /* end of group RFVBAT_Register_Masks */
  7486. /* RFVBAT - Peripheral instance base addresses */
  7487. /** Peripheral RFVBAT base address */
  7488. #define RFVBAT_BASE (0x4003E000u)
  7489. /** Peripheral RFVBAT base pointer */
  7490. #define RFVBAT ((RFVBAT_Type *)RFVBAT_BASE)
  7491. /** Array initializer of RFVBAT peripheral base addresses */
  7492. #define RFVBAT_BASE_ADDRS { RFVBAT_BASE }
  7493. /** Array initializer of RFVBAT peripheral base pointers */
  7494. #define RFVBAT_BASE_PTRS { RFVBAT }
  7495. /*!
  7496. * @}
  7497. */ /* end of group RFVBAT_Peripheral_Access_Layer */
  7498. /* ----------------------------------------------------------------------------
  7499. -- RNG Peripheral Access Layer
  7500. ---------------------------------------------------------------------------- */
  7501. /*!
  7502. * @addtogroup RNG_Peripheral_Access_Layer RNG Peripheral Access Layer
  7503. * @{
  7504. */
  7505. /** RNG - Register Layout Typedef */
  7506. typedef struct {
  7507. __IO uint32_t CR; /**< RNGA Control Register, offset: 0x0 */
  7508. __I uint32_t SR; /**< RNGA Status Register, offset: 0x4 */
  7509. __O uint32_t ER; /**< RNGA Entropy Register, offset: 0x8 */
  7510. __I uint32_t OR; /**< RNGA Output Register, offset: 0xC */
  7511. } RNG_Type;
  7512. /* ----------------------------------------------------------------------------
  7513. -- RNG Register Masks
  7514. ---------------------------------------------------------------------------- */
  7515. /*!
  7516. * @addtogroup RNG_Register_Masks RNG Register Masks
  7517. * @{
  7518. */
  7519. /*! @name CR - RNGA Control Register */
  7520. #define RNG_CR_GO_MASK (0x1U)
  7521. #define RNG_CR_GO_SHIFT (0U)
  7522. #define RNG_CR_GO(x) (((uint32_t)(((uint32_t)(x)) << RNG_CR_GO_SHIFT)) & RNG_CR_GO_MASK)
  7523. #define RNG_CR_HA_MASK (0x2U)
  7524. #define RNG_CR_HA_SHIFT (1U)
  7525. #define RNG_CR_HA(x) (((uint32_t)(((uint32_t)(x)) << RNG_CR_HA_SHIFT)) & RNG_CR_HA_MASK)
  7526. #define RNG_CR_INTM_MASK (0x4U)
  7527. #define RNG_CR_INTM_SHIFT (2U)
  7528. #define RNG_CR_INTM(x) (((uint32_t)(((uint32_t)(x)) << RNG_CR_INTM_SHIFT)) & RNG_CR_INTM_MASK)
  7529. #define RNG_CR_CLRI_MASK (0x8U)
  7530. #define RNG_CR_CLRI_SHIFT (3U)
  7531. #define RNG_CR_CLRI(x) (((uint32_t)(((uint32_t)(x)) << RNG_CR_CLRI_SHIFT)) & RNG_CR_CLRI_MASK)
  7532. #define RNG_CR_SLP_MASK (0x10U)
  7533. #define RNG_CR_SLP_SHIFT (4U)
  7534. #define RNG_CR_SLP(x) (((uint32_t)(((uint32_t)(x)) << RNG_CR_SLP_SHIFT)) & RNG_CR_SLP_MASK)
  7535. /*! @name SR - RNGA Status Register */
  7536. #define RNG_SR_SECV_MASK (0x1U)
  7537. #define RNG_SR_SECV_SHIFT (0U)
  7538. #define RNG_SR_SECV(x) (((uint32_t)(((uint32_t)(x)) << RNG_SR_SECV_SHIFT)) & RNG_SR_SECV_MASK)
  7539. #define RNG_SR_LRS_MASK (0x2U)
  7540. #define RNG_SR_LRS_SHIFT (1U)
  7541. #define RNG_SR_LRS(x) (((uint32_t)(((uint32_t)(x)) << RNG_SR_LRS_SHIFT)) & RNG_SR_LRS_MASK)
  7542. #define RNG_SR_ORU_MASK (0x4U)
  7543. #define RNG_SR_ORU_SHIFT (2U)
  7544. #define RNG_SR_ORU(x) (((uint32_t)(((uint32_t)(x)) << RNG_SR_ORU_SHIFT)) & RNG_SR_ORU_MASK)
  7545. #define RNG_SR_ERRI_MASK (0x8U)
  7546. #define RNG_SR_ERRI_SHIFT (3U)
  7547. #define RNG_SR_ERRI(x) (((uint32_t)(((uint32_t)(x)) << RNG_SR_ERRI_SHIFT)) & RNG_SR_ERRI_MASK)
  7548. #define RNG_SR_SLP_MASK (0x10U)
  7549. #define RNG_SR_SLP_SHIFT (4U)
  7550. #define RNG_SR_SLP(x) (((uint32_t)(((uint32_t)(x)) << RNG_SR_SLP_SHIFT)) & RNG_SR_SLP_MASK)
  7551. #define RNG_SR_OREG_LVL_MASK (0xFF00U)
  7552. #define RNG_SR_OREG_LVL_SHIFT (8U)
  7553. #define RNG_SR_OREG_LVL(x) (((uint32_t)(((uint32_t)(x)) << RNG_SR_OREG_LVL_SHIFT)) & RNG_SR_OREG_LVL_MASK)
  7554. #define RNG_SR_OREG_SIZE_MASK (0xFF0000U)
  7555. #define RNG_SR_OREG_SIZE_SHIFT (16U)
  7556. #define RNG_SR_OREG_SIZE(x) (((uint32_t)(((uint32_t)(x)) << RNG_SR_OREG_SIZE_SHIFT)) & RNG_SR_OREG_SIZE_MASK)
  7557. /*! @name ER - RNGA Entropy Register */
  7558. #define RNG_ER_EXT_ENT_MASK (0xFFFFFFFFU)
  7559. #define RNG_ER_EXT_ENT_SHIFT (0U)
  7560. #define RNG_ER_EXT_ENT(x) (((uint32_t)(((uint32_t)(x)) << RNG_ER_EXT_ENT_SHIFT)) & RNG_ER_EXT_ENT_MASK)
  7561. /*! @name OR - RNGA Output Register */
  7562. #define RNG_OR_RANDOUT_MASK (0xFFFFFFFFU)
  7563. #define RNG_OR_RANDOUT_SHIFT (0U)
  7564. #define RNG_OR_RANDOUT(x) (((uint32_t)(((uint32_t)(x)) << RNG_OR_RANDOUT_SHIFT)) & RNG_OR_RANDOUT_MASK)
  7565. /*!
  7566. * @}
  7567. */ /* end of group RNG_Register_Masks */
  7568. /* RNG - Peripheral instance base addresses */
  7569. /** Peripheral RNG base address */
  7570. #define RNG_BASE (0x40029000u)
  7571. /** Peripheral RNG base pointer */
  7572. #define RNG ((RNG_Type *)RNG_BASE)
  7573. /** Array initializer of RNG peripheral base addresses */
  7574. #define RNG_BASE_ADDRS { RNG_BASE }
  7575. /** Array initializer of RNG peripheral base pointers */
  7576. #define RNG_BASE_PTRS { RNG }
  7577. /** Interrupt vectors for the RNG peripheral type */
  7578. #define RNG_IRQS { RNG_IRQn }
  7579. /*!
  7580. * @}
  7581. */ /* end of group RNG_Peripheral_Access_Layer */
  7582. /* ----------------------------------------------------------------------------
  7583. -- RTC Peripheral Access Layer
  7584. ---------------------------------------------------------------------------- */
  7585. /*!
  7586. * @addtogroup RTC_Peripheral_Access_Layer RTC Peripheral Access Layer
  7587. * @{
  7588. */
  7589. /** RTC - Register Layout Typedef */
  7590. typedef struct {
  7591. __IO uint32_t TSR; /**< RTC Time Seconds Register, offset: 0x0 */
  7592. __IO uint32_t TPR; /**< RTC Time Prescaler Register, offset: 0x4 */
  7593. __IO uint32_t TAR; /**< RTC Time Alarm Register, offset: 0x8 */
  7594. __IO uint32_t TCR; /**< RTC Time Compensation Register, offset: 0xC */
  7595. __IO uint32_t CR; /**< RTC Control Register, offset: 0x10 */
  7596. __IO uint32_t SR; /**< RTC Status Register, offset: 0x14 */
  7597. __IO uint32_t LR; /**< RTC Lock Register, offset: 0x18 */
  7598. __IO uint32_t IER; /**< RTC Interrupt Enable Register, offset: 0x1C */
  7599. uint8_t RESERVED_0[2016];
  7600. __IO uint32_t WAR; /**< RTC Write Access Register, offset: 0x800 */
  7601. __IO uint32_t RAR; /**< RTC Read Access Register, offset: 0x804 */
  7602. } RTC_Type;
  7603. /* ----------------------------------------------------------------------------
  7604. -- RTC Register Masks
  7605. ---------------------------------------------------------------------------- */
  7606. /*!
  7607. * @addtogroup RTC_Register_Masks RTC Register Masks
  7608. * @{
  7609. */
  7610. /*! @name TSR - RTC Time Seconds Register */
  7611. #define RTC_TSR_TSR_MASK (0xFFFFFFFFU)
  7612. #define RTC_TSR_TSR_SHIFT (0U)
  7613. #define RTC_TSR_TSR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TSR_TSR_SHIFT)) & RTC_TSR_TSR_MASK)
  7614. /*! @name TPR - RTC Time Prescaler Register */
  7615. #define RTC_TPR_TPR_MASK (0xFFFFU)
  7616. #define RTC_TPR_TPR_SHIFT (0U)
  7617. #define RTC_TPR_TPR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TPR_TPR_SHIFT)) & RTC_TPR_TPR_MASK)
  7618. /*! @name TAR - RTC Time Alarm Register */
  7619. #define RTC_TAR_TAR_MASK (0xFFFFFFFFU)
  7620. #define RTC_TAR_TAR_SHIFT (0U)
  7621. #define RTC_TAR_TAR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TAR_TAR_SHIFT)) & RTC_TAR_TAR_MASK)
  7622. /*! @name TCR - RTC Time Compensation Register */
  7623. #define RTC_TCR_TCR_MASK (0xFFU)
  7624. #define RTC_TCR_TCR_SHIFT (0U)
  7625. #define RTC_TCR_TCR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_TCR_SHIFT)) & RTC_TCR_TCR_MASK)
  7626. #define RTC_TCR_CIR_MASK (0xFF00U)
  7627. #define RTC_TCR_CIR_SHIFT (8U)
  7628. #define RTC_TCR_CIR(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_CIR_SHIFT)) & RTC_TCR_CIR_MASK)
  7629. #define RTC_TCR_TCV_MASK (0xFF0000U)
  7630. #define RTC_TCR_TCV_SHIFT (16U)
  7631. #define RTC_TCR_TCV(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_TCV_SHIFT)) & RTC_TCR_TCV_MASK)
  7632. #define RTC_TCR_CIC_MASK (0xFF000000U)
  7633. #define RTC_TCR_CIC_SHIFT (24U)
  7634. #define RTC_TCR_CIC(x) (((uint32_t)(((uint32_t)(x)) << RTC_TCR_CIC_SHIFT)) & RTC_TCR_CIC_MASK)
  7635. /*! @name CR - RTC Control Register */
  7636. #define RTC_CR_SWR_MASK (0x1U)
  7637. #define RTC_CR_SWR_SHIFT (0U)
  7638. #define RTC_CR_SWR(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SWR_SHIFT)) & RTC_CR_SWR_MASK)
  7639. #define RTC_CR_WPE_MASK (0x2U)
  7640. #define RTC_CR_WPE_SHIFT (1U)
  7641. #define RTC_CR_WPE(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_WPE_SHIFT)) & RTC_CR_WPE_MASK)
  7642. #define RTC_CR_SUP_MASK (0x4U)
  7643. #define RTC_CR_SUP_SHIFT (2U)
  7644. #define RTC_CR_SUP(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SUP_SHIFT)) & RTC_CR_SUP_MASK)
  7645. #define RTC_CR_UM_MASK (0x8U)
  7646. #define RTC_CR_UM_SHIFT (3U)
  7647. #define RTC_CR_UM(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_UM_SHIFT)) & RTC_CR_UM_MASK)
  7648. #define RTC_CR_WPS_MASK (0x10U)
  7649. #define RTC_CR_WPS_SHIFT (4U)
  7650. #define RTC_CR_WPS(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_WPS_SHIFT)) & RTC_CR_WPS_MASK)
  7651. #define RTC_CR_OSCE_MASK (0x100U)
  7652. #define RTC_CR_OSCE_SHIFT (8U)
  7653. #define RTC_CR_OSCE(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_OSCE_SHIFT)) & RTC_CR_OSCE_MASK)
  7654. #define RTC_CR_CLKO_MASK (0x200U)
  7655. #define RTC_CR_CLKO_SHIFT (9U)
  7656. #define RTC_CR_CLKO(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_CLKO_SHIFT)) & RTC_CR_CLKO_MASK)
  7657. #define RTC_CR_SC16P_MASK (0x400U)
  7658. #define RTC_CR_SC16P_SHIFT (10U)
  7659. #define RTC_CR_SC16P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC16P_SHIFT)) & RTC_CR_SC16P_MASK)
  7660. #define RTC_CR_SC8P_MASK (0x800U)
  7661. #define RTC_CR_SC8P_SHIFT (11U)
  7662. #define RTC_CR_SC8P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC8P_SHIFT)) & RTC_CR_SC8P_MASK)
  7663. #define RTC_CR_SC4P_MASK (0x1000U)
  7664. #define RTC_CR_SC4P_SHIFT (12U)
  7665. #define RTC_CR_SC4P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC4P_SHIFT)) & RTC_CR_SC4P_MASK)
  7666. #define RTC_CR_SC2P_MASK (0x2000U)
  7667. #define RTC_CR_SC2P_SHIFT (13U)
  7668. #define RTC_CR_SC2P(x) (((uint32_t)(((uint32_t)(x)) << RTC_CR_SC2P_SHIFT)) & RTC_CR_SC2P_MASK)
  7669. /*! @name SR - RTC Status Register */
  7670. #define RTC_SR_TIF_MASK (0x1U)
  7671. #define RTC_SR_TIF_SHIFT (0U)
  7672. #define RTC_SR_TIF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TIF_SHIFT)) & RTC_SR_TIF_MASK)
  7673. #define RTC_SR_TOF_MASK (0x2U)
  7674. #define RTC_SR_TOF_SHIFT (1U)
  7675. #define RTC_SR_TOF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TOF_SHIFT)) & RTC_SR_TOF_MASK)
  7676. #define RTC_SR_TAF_MASK (0x4U)
  7677. #define RTC_SR_TAF_SHIFT (2U)
  7678. #define RTC_SR_TAF(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TAF_SHIFT)) & RTC_SR_TAF_MASK)
  7679. #define RTC_SR_TCE_MASK (0x10U)
  7680. #define RTC_SR_TCE_SHIFT (4U)
  7681. #define RTC_SR_TCE(x) (((uint32_t)(((uint32_t)(x)) << RTC_SR_TCE_SHIFT)) & RTC_SR_TCE_MASK)
  7682. /*! @name LR - RTC Lock Register */
  7683. #define RTC_LR_TCL_MASK (0x8U)
  7684. #define RTC_LR_TCL_SHIFT (3U)
  7685. #define RTC_LR_TCL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_TCL_SHIFT)) & RTC_LR_TCL_MASK)
  7686. #define RTC_LR_CRL_MASK (0x10U)
  7687. #define RTC_LR_CRL_SHIFT (4U)
  7688. #define RTC_LR_CRL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_CRL_SHIFT)) & RTC_LR_CRL_MASK)
  7689. #define RTC_LR_SRL_MASK (0x20U)
  7690. #define RTC_LR_SRL_SHIFT (5U)
  7691. #define RTC_LR_SRL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_SRL_SHIFT)) & RTC_LR_SRL_MASK)
  7692. #define RTC_LR_LRL_MASK (0x40U)
  7693. #define RTC_LR_LRL_SHIFT (6U)
  7694. #define RTC_LR_LRL(x) (((uint32_t)(((uint32_t)(x)) << RTC_LR_LRL_SHIFT)) & RTC_LR_LRL_MASK)
  7695. /*! @name IER - RTC Interrupt Enable Register */
  7696. #define RTC_IER_TIIE_MASK (0x1U)
  7697. #define RTC_IER_TIIE_SHIFT (0U)
  7698. #define RTC_IER_TIIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TIIE_SHIFT)) & RTC_IER_TIIE_MASK)
  7699. #define RTC_IER_TOIE_MASK (0x2U)
  7700. #define RTC_IER_TOIE_SHIFT (1U)
  7701. #define RTC_IER_TOIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TOIE_SHIFT)) & RTC_IER_TOIE_MASK)
  7702. #define RTC_IER_TAIE_MASK (0x4U)
  7703. #define RTC_IER_TAIE_SHIFT (2U)
  7704. #define RTC_IER_TAIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TAIE_SHIFT)) & RTC_IER_TAIE_MASK)
  7705. #define RTC_IER_TSIE_MASK (0x10U)
  7706. #define RTC_IER_TSIE_SHIFT (4U)
  7707. #define RTC_IER_TSIE(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_TSIE_SHIFT)) & RTC_IER_TSIE_MASK)
  7708. #define RTC_IER_WPON_MASK (0x80U)
  7709. #define RTC_IER_WPON_SHIFT (7U)
  7710. #define RTC_IER_WPON(x) (((uint32_t)(((uint32_t)(x)) << RTC_IER_WPON_SHIFT)) & RTC_IER_WPON_MASK)
  7711. /*! @name WAR - RTC Write Access Register */
  7712. #define RTC_WAR_TSRW_MASK (0x1U)
  7713. #define RTC_WAR_TSRW_SHIFT (0U)
  7714. #define RTC_WAR_TSRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TSRW_SHIFT)) & RTC_WAR_TSRW_MASK)
  7715. #define RTC_WAR_TPRW_MASK (0x2U)
  7716. #define RTC_WAR_TPRW_SHIFT (1U)
  7717. #define RTC_WAR_TPRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TPRW_SHIFT)) & RTC_WAR_TPRW_MASK)
  7718. #define RTC_WAR_TARW_MASK (0x4U)
  7719. #define RTC_WAR_TARW_SHIFT (2U)
  7720. #define RTC_WAR_TARW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TARW_SHIFT)) & RTC_WAR_TARW_MASK)
  7721. #define RTC_WAR_TCRW_MASK (0x8U)
  7722. #define RTC_WAR_TCRW_SHIFT (3U)
  7723. #define RTC_WAR_TCRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_TCRW_SHIFT)) & RTC_WAR_TCRW_MASK)
  7724. #define RTC_WAR_CRW_MASK (0x10U)
  7725. #define RTC_WAR_CRW_SHIFT (4U)
  7726. #define RTC_WAR_CRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_CRW_SHIFT)) & RTC_WAR_CRW_MASK)
  7727. #define RTC_WAR_SRW_MASK (0x20U)
  7728. #define RTC_WAR_SRW_SHIFT (5U)
  7729. #define RTC_WAR_SRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_SRW_SHIFT)) & RTC_WAR_SRW_MASK)
  7730. #define RTC_WAR_LRW_MASK (0x40U)
  7731. #define RTC_WAR_LRW_SHIFT (6U)
  7732. #define RTC_WAR_LRW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_LRW_SHIFT)) & RTC_WAR_LRW_MASK)
  7733. #define RTC_WAR_IERW_MASK (0x80U)
  7734. #define RTC_WAR_IERW_SHIFT (7U)
  7735. #define RTC_WAR_IERW(x) (((uint32_t)(((uint32_t)(x)) << RTC_WAR_IERW_SHIFT)) & RTC_WAR_IERW_MASK)
  7736. /*! @name RAR - RTC Read Access Register */
  7737. #define RTC_RAR_TSRR_MASK (0x1U)
  7738. #define RTC_RAR_TSRR_SHIFT (0U)
  7739. #define RTC_RAR_TSRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TSRR_SHIFT)) & RTC_RAR_TSRR_MASK)
  7740. #define RTC_RAR_TPRR_MASK (0x2U)
  7741. #define RTC_RAR_TPRR_SHIFT (1U)
  7742. #define RTC_RAR_TPRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TPRR_SHIFT)) & RTC_RAR_TPRR_MASK)
  7743. #define RTC_RAR_TARR_MASK (0x4U)
  7744. #define RTC_RAR_TARR_SHIFT (2U)
  7745. #define RTC_RAR_TARR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TARR_SHIFT)) & RTC_RAR_TARR_MASK)
  7746. #define RTC_RAR_TCRR_MASK (0x8U)
  7747. #define RTC_RAR_TCRR_SHIFT (3U)
  7748. #define RTC_RAR_TCRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_TCRR_SHIFT)) & RTC_RAR_TCRR_MASK)
  7749. #define RTC_RAR_CRR_MASK (0x10U)
  7750. #define RTC_RAR_CRR_SHIFT (4U)
  7751. #define RTC_RAR_CRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_CRR_SHIFT)) & RTC_RAR_CRR_MASK)
  7752. #define RTC_RAR_SRR_MASK (0x20U)
  7753. #define RTC_RAR_SRR_SHIFT (5U)
  7754. #define RTC_RAR_SRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_SRR_SHIFT)) & RTC_RAR_SRR_MASK)
  7755. #define RTC_RAR_LRR_MASK (0x40U)
  7756. #define RTC_RAR_LRR_SHIFT (6U)
  7757. #define RTC_RAR_LRR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_LRR_SHIFT)) & RTC_RAR_LRR_MASK)
  7758. #define RTC_RAR_IERR_MASK (0x80U)
  7759. #define RTC_RAR_IERR_SHIFT (7U)
  7760. #define RTC_RAR_IERR(x) (((uint32_t)(((uint32_t)(x)) << RTC_RAR_IERR_SHIFT)) & RTC_RAR_IERR_MASK)
  7761. /*!
  7762. * @}
  7763. */ /* end of group RTC_Register_Masks */
  7764. /* RTC - Peripheral instance base addresses */
  7765. /** Peripheral RTC base address */
  7766. #define RTC_BASE (0x4003D000u)
  7767. /** Peripheral RTC base pointer */
  7768. #define RTC ((RTC_Type *)RTC_BASE)
  7769. /** Array initializer of RTC peripheral base addresses */
  7770. #define RTC_BASE_ADDRS { RTC_BASE }
  7771. /** Array initializer of RTC peripheral base pointers */
  7772. #define RTC_BASE_PTRS { RTC }
  7773. /** Interrupt vectors for the RTC peripheral type */
  7774. #define RTC_IRQS { RTC_IRQn }
  7775. #define RTC_SECONDS_IRQS { RTC_Seconds_IRQn }
  7776. /*!
  7777. * @}
  7778. */ /* end of group RTC_Peripheral_Access_Layer */
  7779. /* ----------------------------------------------------------------------------
  7780. -- SDHC Peripheral Access Layer
  7781. ---------------------------------------------------------------------------- */
  7782. /*!
  7783. * @addtogroup SDHC_Peripheral_Access_Layer SDHC Peripheral Access Layer
  7784. * @{
  7785. */
  7786. /** SDHC - Register Layout Typedef */
  7787. typedef struct {
  7788. __IO uint32_t DSADDR; /**< DMA System Address register, offset: 0x0 */
  7789. __IO uint32_t BLKATTR; /**< Block Attributes register, offset: 0x4 */
  7790. __IO uint32_t CMDARG; /**< Command Argument register, offset: 0x8 */
  7791. __IO uint32_t XFERTYP; /**< Transfer Type register, offset: 0xC */
  7792. __I uint32_t CMDRSP[4]; /**< Command Response 0..Command Response 3, array offset: 0x10, array step: 0x4 */
  7793. __IO uint32_t DATPORT; /**< Buffer Data Port register, offset: 0x20 */
  7794. __I uint32_t PRSSTAT; /**< Present State register, offset: 0x24 */
  7795. __IO uint32_t PROCTL; /**< Protocol Control register, offset: 0x28 */
  7796. __IO uint32_t SYSCTL; /**< System Control register, offset: 0x2C */
  7797. __IO uint32_t IRQSTAT; /**< Interrupt Status register, offset: 0x30 */
  7798. __IO uint32_t IRQSTATEN; /**< Interrupt Status Enable register, offset: 0x34 */
  7799. __IO uint32_t IRQSIGEN; /**< Interrupt Signal Enable register, offset: 0x38 */
  7800. __I uint32_t AC12ERR; /**< Auto CMD12 Error Status Register, offset: 0x3C */
  7801. __I uint32_t HTCAPBLT; /**< Host Controller Capabilities, offset: 0x40 */
  7802. __IO uint32_t WML; /**< Watermark Level Register, offset: 0x44 */
  7803. uint8_t RESERVED_0[8];
  7804. __O uint32_t FEVT; /**< Force Event register, offset: 0x50 */
  7805. __I uint32_t ADMAES; /**< ADMA Error Status register, offset: 0x54 */
  7806. __IO uint32_t ADSADDR; /**< ADMA System Addressregister, offset: 0x58 */
  7807. uint8_t RESERVED_1[100];
  7808. __IO uint32_t VENDOR; /**< Vendor Specific register, offset: 0xC0 */
  7809. __IO uint32_t MMCBOOT; /**< MMC Boot register, offset: 0xC4 */
  7810. uint8_t RESERVED_2[52];
  7811. __I uint32_t HOSTVER; /**< Host Controller Version, offset: 0xFC */
  7812. } SDHC_Type;
  7813. /* ----------------------------------------------------------------------------
  7814. -- SDHC Register Masks
  7815. ---------------------------------------------------------------------------- */
  7816. /*!
  7817. * @addtogroup SDHC_Register_Masks SDHC Register Masks
  7818. * @{
  7819. */
  7820. /*! @name DSADDR - DMA System Address register */
  7821. #define SDHC_DSADDR_DSADDR_MASK (0xFFFFFFFCU)
  7822. #define SDHC_DSADDR_DSADDR_SHIFT (2U)
  7823. #define SDHC_DSADDR_DSADDR(x) (((uint32_t)(((uint32_t)(x)) << SDHC_DSADDR_DSADDR_SHIFT)) & SDHC_DSADDR_DSADDR_MASK)
  7824. /*! @name BLKATTR - Block Attributes register */
  7825. #define SDHC_BLKATTR_BLKSIZE_MASK (0x1FFFU)
  7826. #define SDHC_BLKATTR_BLKSIZE_SHIFT (0U)
  7827. #define SDHC_BLKATTR_BLKSIZE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_BLKATTR_BLKSIZE_SHIFT)) & SDHC_BLKATTR_BLKSIZE_MASK)
  7828. #define SDHC_BLKATTR_BLKCNT_MASK (0xFFFF0000U)
  7829. #define SDHC_BLKATTR_BLKCNT_SHIFT (16U)
  7830. #define SDHC_BLKATTR_BLKCNT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_BLKATTR_BLKCNT_SHIFT)) & SDHC_BLKATTR_BLKCNT_MASK)
  7831. /*! @name CMDARG - Command Argument register */
  7832. #define SDHC_CMDARG_CMDARG_MASK (0xFFFFFFFFU)
  7833. #define SDHC_CMDARG_CMDARG_SHIFT (0U)
  7834. #define SDHC_CMDARG_CMDARG(x) (((uint32_t)(((uint32_t)(x)) << SDHC_CMDARG_CMDARG_SHIFT)) & SDHC_CMDARG_CMDARG_MASK)
  7835. /*! @name XFERTYP - Transfer Type register */
  7836. #define SDHC_XFERTYP_DMAEN_MASK (0x1U)
  7837. #define SDHC_XFERTYP_DMAEN_SHIFT (0U)
  7838. #define SDHC_XFERTYP_DMAEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_DMAEN_SHIFT)) & SDHC_XFERTYP_DMAEN_MASK)
  7839. #define SDHC_XFERTYP_BCEN_MASK (0x2U)
  7840. #define SDHC_XFERTYP_BCEN_SHIFT (1U)
  7841. #define SDHC_XFERTYP_BCEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_BCEN_SHIFT)) & SDHC_XFERTYP_BCEN_MASK)
  7842. #define SDHC_XFERTYP_AC12EN_MASK (0x4U)
  7843. #define SDHC_XFERTYP_AC12EN_SHIFT (2U)
  7844. #define SDHC_XFERTYP_AC12EN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_AC12EN_SHIFT)) & SDHC_XFERTYP_AC12EN_MASK)
  7845. #define SDHC_XFERTYP_DTDSEL_MASK (0x10U)
  7846. #define SDHC_XFERTYP_DTDSEL_SHIFT (4U)
  7847. #define SDHC_XFERTYP_DTDSEL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_DTDSEL_SHIFT)) & SDHC_XFERTYP_DTDSEL_MASK)
  7848. #define SDHC_XFERTYP_MSBSEL_MASK (0x20U)
  7849. #define SDHC_XFERTYP_MSBSEL_SHIFT (5U)
  7850. #define SDHC_XFERTYP_MSBSEL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_MSBSEL_SHIFT)) & SDHC_XFERTYP_MSBSEL_MASK)
  7851. #define SDHC_XFERTYP_RSPTYP_MASK (0x30000U)
  7852. #define SDHC_XFERTYP_RSPTYP_SHIFT (16U)
  7853. #define SDHC_XFERTYP_RSPTYP(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_RSPTYP_SHIFT)) & SDHC_XFERTYP_RSPTYP_MASK)
  7854. #define SDHC_XFERTYP_CCCEN_MASK (0x80000U)
  7855. #define SDHC_XFERTYP_CCCEN_SHIFT (19U)
  7856. #define SDHC_XFERTYP_CCCEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_CCCEN_SHIFT)) & SDHC_XFERTYP_CCCEN_MASK)
  7857. #define SDHC_XFERTYP_CICEN_MASK (0x100000U)
  7858. #define SDHC_XFERTYP_CICEN_SHIFT (20U)
  7859. #define SDHC_XFERTYP_CICEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_CICEN_SHIFT)) & SDHC_XFERTYP_CICEN_MASK)
  7860. #define SDHC_XFERTYP_DPSEL_MASK (0x200000U)
  7861. #define SDHC_XFERTYP_DPSEL_SHIFT (21U)
  7862. #define SDHC_XFERTYP_DPSEL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_DPSEL_SHIFT)) & SDHC_XFERTYP_DPSEL_MASK)
  7863. #define SDHC_XFERTYP_CMDTYP_MASK (0xC00000U)
  7864. #define SDHC_XFERTYP_CMDTYP_SHIFT (22U)
  7865. #define SDHC_XFERTYP_CMDTYP(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_CMDTYP_SHIFT)) & SDHC_XFERTYP_CMDTYP_MASK)
  7866. #define SDHC_XFERTYP_CMDINX_MASK (0x3F000000U)
  7867. #define SDHC_XFERTYP_CMDINX_SHIFT (24U)
  7868. #define SDHC_XFERTYP_CMDINX(x) (((uint32_t)(((uint32_t)(x)) << SDHC_XFERTYP_CMDINX_SHIFT)) & SDHC_XFERTYP_CMDINX_MASK)
  7869. /*! @name CMDRSP - Command Response 0..Command Response 3 */
  7870. #define SDHC_CMDRSP_CMDRSP0_MASK (0xFFFFFFFFU)
  7871. #define SDHC_CMDRSP_CMDRSP0_SHIFT (0U)
  7872. #define SDHC_CMDRSP_CMDRSP0(x) (((uint32_t)(((uint32_t)(x)) << SDHC_CMDRSP_CMDRSP0_SHIFT)) & SDHC_CMDRSP_CMDRSP0_MASK)
  7873. #define SDHC_CMDRSP_CMDRSP1_MASK (0xFFFFFFFFU)
  7874. #define SDHC_CMDRSP_CMDRSP1_SHIFT (0U)
  7875. #define SDHC_CMDRSP_CMDRSP1(x) (((uint32_t)(((uint32_t)(x)) << SDHC_CMDRSP_CMDRSP1_SHIFT)) & SDHC_CMDRSP_CMDRSP1_MASK)
  7876. #define SDHC_CMDRSP_CMDRSP2_MASK (0xFFFFFFFFU)
  7877. #define SDHC_CMDRSP_CMDRSP2_SHIFT (0U)
  7878. #define SDHC_CMDRSP_CMDRSP2(x) (((uint32_t)(((uint32_t)(x)) << SDHC_CMDRSP_CMDRSP2_SHIFT)) & SDHC_CMDRSP_CMDRSP2_MASK)
  7879. #define SDHC_CMDRSP_CMDRSP3_MASK (0xFFFFFFFFU)
  7880. #define SDHC_CMDRSP_CMDRSP3_SHIFT (0U)
  7881. #define SDHC_CMDRSP_CMDRSP3(x) (((uint32_t)(((uint32_t)(x)) << SDHC_CMDRSP_CMDRSP3_SHIFT)) & SDHC_CMDRSP_CMDRSP3_MASK)
  7882. /* The count of SDHC_CMDRSP */
  7883. #define SDHC_CMDRSP_COUNT (4U)
  7884. /*! @name DATPORT - Buffer Data Port register */
  7885. #define SDHC_DATPORT_DATCONT_MASK (0xFFFFFFFFU)
  7886. #define SDHC_DATPORT_DATCONT_SHIFT (0U)
  7887. #define SDHC_DATPORT_DATCONT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_DATPORT_DATCONT_SHIFT)) & SDHC_DATPORT_DATCONT_MASK)
  7888. /*! @name PRSSTAT - Present State register */
  7889. #define SDHC_PRSSTAT_CIHB_MASK (0x1U)
  7890. #define SDHC_PRSSTAT_CIHB_SHIFT (0U)
  7891. #define SDHC_PRSSTAT_CIHB(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_CIHB_SHIFT)) & SDHC_PRSSTAT_CIHB_MASK)
  7892. #define SDHC_PRSSTAT_CDIHB_MASK (0x2U)
  7893. #define SDHC_PRSSTAT_CDIHB_SHIFT (1U)
  7894. #define SDHC_PRSSTAT_CDIHB(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_CDIHB_SHIFT)) & SDHC_PRSSTAT_CDIHB_MASK)
  7895. #define SDHC_PRSSTAT_DLA_MASK (0x4U)
  7896. #define SDHC_PRSSTAT_DLA_SHIFT (2U)
  7897. #define SDHC_PRSSTAT_DLA(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_DLA_SHIFT)) & SDHC_PRSSTAT_DLA_MASK)
  7898. #define SDHC_PRSSTAT_SDSTB_MASK (0x8U)
  7899. #define SDHC_PRSSTAT_SDSTB_SHIFT (3U)
  7900. #define SDHC_PRSSTAT_SDSTB(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_SDSTB_SHIFT)) & SDHC_PRSSTAT_SDSTB_MASK)
  7901. #define SDHC_PRSSTAT_IPGOFF_MASK (0x10U)
  7902. #define SDHC_PRSSTAT_IPGOFF_SHIFT (4U)
  7903. #define SDHC_PRSSTAT_IPGOFF(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_IPGOFF_SHIFT)) & SDHC_PRSSTAT_IPGOFF_MASK)
  7904. #define SDHC_PRSSTAT_HCKOFF_MASK (0x20U)
  7905. #define SDHC_PRSSTAT_HCKOFF_SHIFT (5U)
  7906. #define SDHC_PRSSTAT_HCKOFF(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_HCKOFF_SHIFT)) & SDHC_PRSSTAT_HCKOFF_MASK)
  7907. #define SDHC_PRSSTAT_PEROFF_MASK (0x40U)
  7908. #define SDHC_PRSSTAT_PEROFF_SHIFT (6U)
  7909. #define SDHC_PRSSTAT_PEROFF(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_PEROFF_SHIFT)) & SDHC_PRSSTAT_PEROFF_MASK)
  7910. #define SDHC_PRSSTAT_SDOFF_MASK (0x80U)
  7911. #define SDHC_PRSSTAT_SDOFF_SHIFT (7U)
  7912. #define SDHC_PRSSTAT_SDOFF(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_SDOFF_SHIFT)) & SDHC_PRSSTAT_SDOFF_MASK)
  7913. #define SDHC_PRSSTAT_WTA_MASK (0x100U)
  7914. #define SDHC_PRSSTAT_WTA_SHIFT (8U)
  7915. #define SDHC_PRSSTAT_WTA(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_WTA_SHIFT)) & SDHC_PRSSTAT_WTA_MASK)
  7916. #define SDHC_PRSSTAT_RTA_MASK (0x200U)
  7917. #define SDHC_PRSSTAT_RTA_SHIFT (9U)
  7918. #define SDHC_PRSSTAT_RTA(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_RTA_SHIFT)) & SDHC_PRSSTAT_RTA_MASK)
  7919. #define SDHC_PRSSTAT_BWEN_MASK (0x400U)
  7920. #define SDHC_PRSSTAT_BWEN_SHIFT (10U)
  7921. #define SDHC_PRSSTAT_BWEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_BWEN_SHIFT)) & SDHC_PRSSTAT_BWEN_MASK)
  7922. #define SDHC_PRSSTAT_BREN_MASK (0x800U)
  7923. #define SDHC_PRSSTAT_BREN_SHIFT (11U)
  7924. #define SDHC_PRSSTAT_BREN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_BREN_SHIFT)) & SDHC_PRSSTAT_BREN_MASK)
  7925. #define SDHC_PRSSTAT_CINS_MASK (0x10000U)
  7926. #define SDHC_PRSSTAT_CINS_SHIFT (16U)
  7927. #define SDHC_PRSSTAT_CINS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_CINS_SHIFT)) & SDHC_PRSSTAT_CINS_MASK)
  7928. #define SDHC_PRSSTAT_CLSL_MASK (0x800000U)
  7929. #define SDHC_PRSSTAT_CLSL_SHIFT (23U)
  7930. #define SDHC_PRSSTAT_CLSL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_CLSL_SHIFT)) & SDHC_PRSSTAT_CLSL_MASK)
  7931. #define SDHC_PRSSTAT_DLSL_MASK (0xFF000000U)
  7932. #define SDHC_PRSSTAT_DLSL_SHIFT (24U)
  7933. #define SDHC_PRSSTAT_DLSL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PRSSTAT_DLSL_SHIFT)) & SDHC_PRSSTAT_DLSL_MASK)
  7934. /*! @name PROCTL - Protocol Control register */
  7935. #define SDHC_PROCTL_LCTL_MASK (0x1U)
  7936. #define SDHC_PROCTL_LCTL_SHIFT (0U)
  7937. #define SDHC_PROCTL_LCTL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_LCTL_SHIFT)) & SDHC_PROCTL_LCTL_MASK)
  7938. #define SDHC_PROCTL_DTW_MASK (0x6U)
  7939. #define SDHC_PROCTL_DTW_SHIFT (1U)
  7940. #define SDHC_PROCTL_DTW(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_DTW_SHIFT)) & SDHC_PROCTL_DTW_MASK)
  7941. #define SDHC_PROCTL_D3CD_MASK (0x8U)
  7942. #define SDHC_PROCTL_D3CD_SHIFT (3U)
  7943. #define SDHC_PROCTL_D3CD(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_D3CD_SHIFT)) & SDHC_PROCTL_D3CD_MASK)
  7944. #define SDHC_PROCTL_EMODE_MASK (0x30U)
  7945. #define SDHC_PROCTL_EMODE_SHIFT (4U)
  7946. #define SDHC_PROCTL_EMODE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_EMODE_SHIFT)) & SDHC_PROCTL_EMODE_MASK)
  7947. #define SDHC_PROCTL_CDTL_MASK (0x40U)
  7948. #define SDHC_PROCTL_CDTL_SHIFT (6U)
  7949. #define SDHC_PROCTL_CDTL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_CDTL_SHIFT)) & SDHC_PROCTL_CDTL_MASK)
  7950. #define SDHC_PROCTL_CDSS_MASK (0x80U)
  7951. #define SDHC_PROCTL_CDSS_SHIFT (7U)
  7952. #define SDHC_PROCTL_CDSS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_CDSS_SHIFT)) & SDHC_PROCTL_CDSS_MASK)
  7953. #define SDHC_PROCTL_DMAS_MASK (0x300U)
  7954. #define SDHC_PROCTL_DMAS_SHIFT (8U)
  7955. #define SDHC_PROCTL_DMAS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_DMAS_SHIFT)) & SDHC_PROCTL_DMAS_MASK)
  7956. #define SDHC_PROCTL_SABGREQ_MASK (0x10000U)
  7957. #define SDHC_PROCTL_SABGREQ_SHIFT (16U)
  7958. #define SDHC_PROCTL_SABGREQ(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_SABGREQ_SHIFT)) & SDHC_PROCTL_SABGREQ_MASK)
  7959. #define SDHC_PROCTL_CREQ_MASK (0x20000U)
  7960. #define SDHC_PROCTL_CREQ_SHIFT (17U)
  7961. #define SDHC_PROCTL_CREQ(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_CREQ_SHIFT)) & SDHC_PROCTL_CREQ_MASK)
  7962. #define SDHC_PROCTL_RWCTL_MASK (0x40000U)
  7963. #define SDHC_PROCTL_RWCTL_SHIFT (18U)
  7964. #define SDHC_PROCTL_RWCTL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_RWCTL_SHIFT)) & SDHC_PROCTL_RWCTL_MASK)
  7965. #define SDHC_PROCTL_IABG_MASK (0x80000U)
  7966. #define SDHC_PROCTL_IABG_SHIFT (19U)
  7967. #define SDHC_PROCTL_IABG(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_IABG_SHIFT)) & SDHC_PROCTL_IABG_MASK)
  7968. #define SDHC_PROCTL_WECINT_MASK (0x1000000U)
  7969. #define SDHC_PROCTL_WECINT_SHIFT (24U)
  7970. #define SDHC_PROCTL_WECINT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_WECINT_SHIFT)) & SDHC_PROCTL_WECINT_MASK)
  7971. #define SDHC_PROCTL_WECINS_MASK (0x2000000U)
  7972. #define SDHC_PROCTL_WECINS_SHIFT (25U)
  7973. #define SDHC_PROCTL_WECINS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_WECINS_SHIFT)) & SDHC_PROCTL_WECINS_MASK)
  7974. #define SDHC_PROCTL_WECRM_MASK (0x4000000U)
  7975. #define SDHC_PROCTL_WECRM_SHIFT (26U)
  7976. #define SDHC_PROCTL_WECRM(x) (((uint32_t)(((uint32_t)(x)) << SDHC_PROCTL_WECRM_SHIFT)) & SDHC_PROCTL_WECRM_MASK)
  7977. /*! @name SYSCTL - System Control register */
  7978. #define SDHC_SYSCTL_IPGEN_MASK (0x1U)
  7979. #define SDHC_SYSCTL_IPGEN_SHIFT (0U)
  7980. #define SDHC_SYSCTL_IPGEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_IPGEN_SHIFT)) & SDHC_SYSCTL_IPGEN_MASK)
  7981. #define SDHC_SYSCTL_HCKEN_MASK (0x2U)
  7982. #define SDHC_SYSCTL_HCKEN_SHIFT (1U)
  7983. #define SDHC_SYSCTL_HCKEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_HCKEN_SHIFT)) & SDHC_SYSCTL_HCKEN_MASK)
  7984. #define SDHC_SYSCTL_PEREN_MASK (0x4U)
  7985. #define SDHC_SYSCTL_PEREN_SHIFT (2U)
  7986. #define SDHC_SYSCTL_PEREN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_PEREN_SHIFT)) & SDHC_SYSCTL_PEREN_MASK)
  7987. #define SDHC_SYSCTL_SDCLKEN_MASK (0x8U)
  7988. #define SDHC_SYSCTL_SDCLKEN_SHIFT (3U)
  7989. #define SDHC_SYSCTL_SDCLKEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_SDCLKEN_SHIFT)) & SDHC_SYSCTL_SDCLKEN_MASK)
  7990. #define SDHC_SYSCTL_DVS_MASK (0xF0U)
  7991. #define SDHC_SYSCTL_DVS_SHIFT (4U)
  7992. #define SDHC_SYSCTL_DVS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_DVS_SHIFT)) & SDHC_SYSCTL_DVS_MASK)
  7993. #define SDHC_SYSCTL_SDCLKFS_MASK (0xFF00U)
  7994. #define SDHC_SYSCTL_SDCLKFS_SHIFT (8U)
  7995. #define SDHC_SYSCTL_SDCLKFS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_SDCLKFS_SHIFT)) & SDHC_SYSCTL_SDCLKFS_MASK)
  7996. #define SDHC_SYSCTL_DTOCV_MASK (0xF0000U)
  7997. #define SDHC_SYSCTL_DTOCV_SHIFT (16U)
  7998. #define SDHC_SYSCTL_DTOCV(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_DTOCV_SHIFT)) & SDHC_SYSCTL_DTOCV_MASK)
  7999. #define SDHC_SYSCTL_RSTA_MASK (0x1000000U)
  8000. #define SDHC_SYSCTL_RSTA_SHIFT (24U)
  8001. #define SDHC_SYSCTL_RSTA(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_RSTA_SHIFT)) & SDHC_SYSCTL_RSTA_MASK)
  8002. #define SDHC_SYSCTL_RSTC_MASK (0x2000000U)
  8003. #define SDHC_SYSCTL_RSTC_SHIFT (25U)
  8004. #define SDHC_SYSCTL_RSTC(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_RSTC_SHIFT)) & SDHC_SYSCTL_RSTC_MASK)
  8005. #define SDHC_SYSCTL_RSTD_MASK (0x4000000U)
  8006. #define SDHC_SYSCTL_RSTD_SHIFT (26U)
  8007. #define SDHC_SYSCTL_RSTD(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_RSTD_SHIFT)) & SDHC_SYSCTL_RSTD_MASK)
  8008. #define SDHC_SYSCTL_INITA_MASK (0x8000000U)
  8009. #define SDHC_SYSCTL_INITA_SHIFT (27U)
  8010. #define SDHC_SYSCTL_INITA(x) (((uint32_t)(((uint32_t)(x)) << SDHC_SYSCTL_INITA_SHIFT)) & SDHC_SYSCTL_INITA_MASK)
  8011. /*! @name IRQSTAT - Interrupt Status register */
  8012. #define SDHC_IRQSTAT_CC_MASK (0x1U)
  8013. #define SDHC_IRQSTAT_CC_SHIFT (0U)
  8014. #define SDHC_IRQSTAT_CC(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CC_SHIFT)) & SDHC_IRQSTAT_CC_MASK)
  8015. #define SDHC_IRQSTAT_TC_MASK (0x2U)
  8016. #define SDHC_IRQSTAT_TC_SHIFT (1U)
  8017. #define SDHC_IRQSTAT_TC(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_TC_SHIFT)) & SDHC_IRQSTAT_TC_MASK)
  8018. #define SDHC_IRQSTAT_BGE_MASK (0x4U)
  8019. #define SDHC_IRQSTAT_BGE_SHIFT (2U)
  8020. #define SDHC_IRQSTAT_BGE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_BGE_SHIFT)) & SDHC_IRQSTAT_BGE_MASK)
  8021. #define SDHC_IRQSTAT_DINT_MASK (0x8U)
  8022. #define SDHC_IRQSTAT_DINT_SHIFT (3U)
  8023. #define SDHC_IRQSTAT_DINT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_DINT_SHIFT)) & SDHC_IRQSTAT_DINT_MASK)
  8024. #define SDHC_IRQSTAT_BWR_MASK (0x10U)
  8025. #define SDHC_IRQSTAT_BWR_SHIFT (4U)
  8026. #define SDHC_IRQSTAT_BWR(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_BWR_SHIFT)) & SDHC_IRQSTAT_BWR_MASK)
  8027. #define SDHC_IRQSTAT_BRR_MASK (0x20U)
  8028. #define SDHC_IRQSTAT_BRR_SHIFT (5U)
  8029. #define SDHC_IRQSTAT_BRR(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_BRR_SHIFT)) & SDHC_IRQSTAT_BRR_MASK)
  8030. #define SDHC_IRQSTAT_CINS_MASK (0x40U)
  8031. #define SDHC_IRQSTAT_CINS_SHIFT (6U)
  8032. #define SDHC_IRQSTAT_CINS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CINS_SHIFT)) & SDHC_IRQSTAT_CINS_MASK)
  8033. #define SDHC_IRQSTAT_CRM_MASK (0x80U)
  8034. #define SDHC_IRQSTAT_CRM_SHIFT (7U)
  8035. #define SDHC_IRQSTAT_CRM(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CRM_SHIFT)) & SDHC_IRQSTAT_CRM_MASK)
  8036. #define SDHC_IRQSTAT_CINT_MASK (0x100U)
  8037. #define SDHC_IRQSTAT_CINT_SHIFT (8U)
  8038. #define SDHC_IRQSTAT_CINT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CINT_SHIFT)) & SDHC_IRQSTAT_CINT_MASK)
  8039. #define SDHC_IRQSTAT_CTOE_MASK (0x10000U)
  8040. #define SDHC_IRQSTAT_CTOE_SHIFT (16U)
  8041. #define SDHC_IRQSTAT_CTOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CTOE_SHIFT)) & SDHC_IRQSTAT_CTOE_MASK)
  8042. #define SDHC_IRQSTAT_CCE_MASK (0x20000U)
  8043. #define SDHC_IRQSTAT_CCE_SHIFT (17U)
  8044. #define SDHC_IRQSTAT_CCE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CCE_SHIFT)) & SDHC_IRQSTAT_CCE_MASK)
  8045. #define SDHC_IRQSTAT_CEBE_MASK (0x40000U)
  8046. #define SDHC_IRQSTAT_CEBE_SHIFT (18U)
  8047. #define SDHC_IRQSTAT_CEBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CEBE_SHIFT)) & SDHC_IRQSTAT_CEBE_MASK)
  8048. #define SDHC_IRQSTAT_CIE_MASK (0x80000U)
  8049. #define SDHC_IRQSTAT_CIE_SHIFT (19U)
  8050. #define SDHC_IRQSTAT_CIE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_CIE_SHIFT)) & SDHC_IRQSTAT_CIE_MASK)
  8051. #define SDHC_IRQSTAT_DTOE_MASK (0x100000U)
  8052. #define SDHC_IRQSTAT_DTOE_SHIFT (20U)
  8053. #define SDHC_IRQSTAT_DTOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_DTOE_SHIFT)) & SDHC_IRQSTAT_DTOE_MASK)
  8054. #define SDHC_IRQSTAT_DCE_MASK (0x200000U)
  8055. #define SDHC_IRQSTAT_DCE_SHIFT (21U)
  8056. #define SDHC_IRQSTAT_DCE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_DCE_SHIFT)) & SDHC_IRQSTAT_DCE_MASK)
  8057. #define SDHC_IRQSTAT_DEBE_MASK (0x400000U)
  8058. #define SDHC_IRQSTAT_DEBE_SHIFT (22U)
  8059. #define SDHC_IRQSTAT_DEBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_DEBE_SHIFT)) & SDHC_IRQSTAT_DEBE_MASK)
  8060. #define SDHC_IRQSTAT_AC12E_MASK (0x1000000U)
  8061. #define SDHC_IRQSTAT_AC12E_SHIFT (24U)
  8062. #define SDHC_IRQSTAT_AC12E(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_AC12E_SHIFT)) & SDHC_IRQSTAT_AC12E_MASK)
  8063. #define SDHC_IRQSTAT_DMAE_MASK (0x10000000U)
  8064. #define SDHC_IRQSTAT_DMAE_SHIFT (28U)
  8065. #define SDHC_IRQSTAT_DMAE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTAT_DMAE_SHIFT)) & SDHC_IRQSTAT_DMAE_MASK)
  8066. /*! @name IRQSTATEN - Interrupt Status Enable register */
  8067. #define SDHC_IRQSTATEN_CCSEN_MASK (0x1U)
  8068. #define SDHC_IRQSTATEN_CCSEN_SHIFT (0U)
  8069. #define SDHC_IRQSTATEN_CCSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CCSEN_SHIFT)) & SDHC_IRQSTATEN_CCSEN_MASK)
  8070. #define SDHC_IRQSTATEN_TCSEN_MASK (0x2U)
  8071. #define SDHC_IRQSTATEN_TCSEN_SHIFT (1U)
  8072. #define SDHC_IRQSTATEN_TCSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_TCSEN_SHIFT)) & SDHC_IRQSTATEN_TCSEN_MASK)
  8073. #define SDHC_IRQSTATEN_BGESEN_MASK (0x4U)
  8074. #define SDHC_IRQSTATEN_BGESEN_SHIFT (2U)
  8075. #define SDHC_IRQSTATEN_BGESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_BGESEN_SHIFT)) & SDHC_IRQSTATEN_BGESEN_MASK)
  8076. #define SDHC_IRQSTATEN_DINTSEN_MASK (0x8U)
  8077. #define SDHC_IRQSTATEN_DINTSEN_SHIFT (3U)
  8078. #define SDHC_IRQSTATEN_DINTSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_DINTSEN_SHIFT)) & SDHC_IRQSTATEN_DINTSEN_MASK)
  8079. #define SDHC_IRQSTATEN_BWRSEN_MASK (0x10U)
  8080. #define SDHC_IRQSTATEN_BWRSEN_SHIFT (4U)
  8081. #define SDHC_IRQSTATEN_BWRSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_BWRSEN_SHIFT)) & SDHC_IRQSTATEN_BWRSEN_MASK)
  8082. #define SDHC_IRQSTATEN_BRRSEN_MASK (0x20U)
  8083. #define SDHC_IRQSTATEN_BRRSEN_SHIFT (5U)
  8084. #define SDHC_IRQSTATEN_BRRSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_BRRSEN_SHIFT)) & SDHC_IRQSTATEN_BRRSEN_MASK)
  8085. #define SDHC_IRQSTATEN_CINSEN_MASK (0x40U)
  8086. #define SDHC_IRQSTATEN_CINSEN_SHIFT (6U)
  8087. #define SDHC_IRQSTATEN_CINSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CINSEN_SHIFT)) & SDHC_IRQSTATEN_CINSEN_MASK)
  8088. #define SDHC_IRQSTATEN_CRMSEN_MASK (0x80U)
  8089. #define SDHC_IRQSTATEN_CRMSEN_SHIFT (7U)
  8090. #define SDHC_IRQSTATEN_CRMSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CRMSEN_SHIFT)) & SDHC_IRQSTATEN_CRMSEN_MASK)
  8091. #define SDHC_IRQSTATEN_CINTSEN_MASK (0x100U)
  8092. #define SDHC_IRQSTATEN_CINTSEN_SHIFT (8U)
  8093. #define SDHC_IRQSTATEN_CINTSEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CINTSEN_SHIFT)) & SDHC_IRQSTATEN_CINTSEN_MASK)
  8094. #define SDHC_IRQSTATEN_CTOESEN_MASK (0x10000U)
  8095. #define SDHC_IRQSTATEN_CTOESEN_SHIFT (16U)
  8096. #define SDHC_IRQSTATEN_CTOESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CTOESEN_SHIFT)) & SDHC_IRQSTATEN_CTOESEN_MASK)
  8097. #define SDHC_IRQSTATEN_CCESEN_MASK (0x20000U)
  8098. #define SDHC_IRQSTATEN_CCESEN_SHIFT (17U)
  8099. #define SDHC_IRQSTATEN_CCESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CCESEN_SHIFT)) & SDHC_IRQSTATEN_CCESEN_MASK)
  8100. #define SDHC_IRQSTATEN_CEBESEN_MASK (0x40000U)
  8101. #define SDHC_IRQSTATEN_CEBESEN_SHIFT (18U)
  8102. #define SDHC_IRQSTATEN_CEBESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CEBESEN_SHIFT)) & SDHC_IRQSTATEN_CEBESEN_MASK)
  8103. #define SDHC_IRQSTATEN_CIESEN_MASK (0x80000U)
  8104. #define SDHC_IRQSTATEN_CIESEN_SHIFT (19U)
  8105. #define SDHC_IRQSTATEN_CIESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_CIESEN_SHIFT)) & SDHC_IRQSTATEN_CIESEN_MASK)
  8106. #define SDHC_IRQSTATEN_DTOESEN_MASK (0x100000U)
  8107. #define SDHC_IRQSTATEN_DTOESEN_SHIFT (20U)
  8108. #define SDHC_IRQSTATEN_DTOESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_DTOESEN_SHIFT)) & SDHC_IRQSTATEN_DTOESEN_MASK)
  8109. #define SDHC_IRQSTATEN_DCESEN_MASK (0x200000U)
  8110. #define SDHC_IRQSTATEN_DCESEN_SHIFT (21U)
  8111. #define SDHC_IRQSTATEN_DCESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_DCESEN_SHIFT)) & SDHC_IRQSTATEN_DCESEN_MASK)
  8112. #define SDHC_IRQSTATEN_DEBESEN_MASK (0x400000U)
  8113. #define SDHC_IRQSTATEN_DEBESEN_SHIFT (22U)
  8114. #define SDHC_IRQSTATEN_DEBESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_DEBESEN_SHIFT)) & SDHC_IRQSTATEN_DEBESEN_MASK)
  8115. #define SDHC_IRQSTATEN_AC12ESEN_MASK (0x1000000U)
  8116. #define SDHC_IRQSTATEN_AC12ESEN_SHIFT (24U)
  8117. #define SDHC_IRQSTATEN_AC12ESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_AC12ESEN_SHIFT)) & SDHC_IRQSTATEN_AC12ESEN_MASK)
  8118. #define SDHC_IRQSTATEN_DMAESEN_MASK (0x10000000U)
  8119. #define SDHC_IRQSTATEN_DMAESEN_SHIFT (28U)
  8120. #define SDHC_IRQSTATEN_DMAESEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSTATEN_DMAESEN_SHIFT)) & SDHC_IRQSTATEN_DMAESEN_MASK)
  8121. /*! @name IRQSIGEN - Interrupt Signal Enable register */
  8122. #define SDHC_IRQSIGEN_CCIEN_MASK (0x1U)
  8123. #define SDHC_IRQSIGEN_CCIEN_SHIFT (0U)
  8124. #define SDHC_IRQSIGEN_CCIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CCIEN_SHIFT)) & SDHC_IRQSIGEN_CCIEN_MASK)
  8125. #define SDHC_IRQSIGEN_TCIEN_MASK (0x2U)
  8126. #define SDHC_IRQSIGEN_TCIEN_SHIFT (1U)
  8127. #define SDHC_IRQSIGEN_TCIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_TCIEN_SHIFT)) & SDHC_IRQSIGEN_TCIEN_MASK)
  8128. #define SDHC_IRQSIGEN_BGEIEN_MASK (0x4U)
  8129. #define SDHC_IRQSIGEN_BGEIEN_SHIFT (2U)
  8130. #define SDHC_IRQSIGEN_BGEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_BGEIEN_SHIFT)) & SDHC_IRQSIGEN_BGEIEN_MASK)
  8131. #define SDHC_IRQSIGEN_DINTIEN_MASK (0x8U)
  8132. #define SDHC_IRQSIGEN_DINTIEN_SHIFT (3U)
  8133. #define SDHC_IRQSIGEN_DINTIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_DINTIEN_SHIFT)) & SDHC_IRQSIGEN_DINTIEN_MASK)
  8134. #define SDHC_IRQSIGEN_BWRIEN_MASK (0x10U)
  8135. #define SDHC_IRQSIGEN_BWRIEN_SHIFT (4U)
  8136. #define SDHC_IRQSIGEN_BWRIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_BWRIEN_SHIFT)) & SDHC_IRQSIGEN_BWRIEN_MASK)
  8137. #define SDHC_IRQSIGEN_BRRIEN_MASK (0x20U)
  8138. #define SDHC_IRQSIGEN_BRRIEN_SHIFT (5U)
  8139. #define SDHC_IRQSIGEN_BRRIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_BRRIEN_SHIFT)) & SDHC_IRQSIGEN_BRRIEN_MASK)
  8140. #define SDHC_IRQSIGEN_CINSIEN_MASK (0x40U)
  8141. #define SDHC_IRQSIGEN_CINSIEN_SHIFT (6U)
  8142. #define SDHC_IRQSIGEN_CINSIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CINSIEN_SHIFT)) & SDHC_IRQSIGEN_CINSIEN_MASK)
  8143. #define SDHC_IRQSIGEN_CRMIEN_MASK (0x80U)
  8144. #define SDHC_IRQSIGEN_CRMIEN_SHIFT (7U)
  8145. #define SDHC_IRQSIGEN_CRMIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CRMIEN_SHIFT)) & SDHC_IRQSIGEN_CRMIEN_MASK)
  8146. #define SDHC_IRQSIGEN_CINTIEN_MASK (0x100U)
  8147. #define SDHC_IRQSIGEN_CINTIEN_SHIFT (8U)
  8148. #define SDHC_IRQSIGEN_CINTIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CINTIEN_SHIFT)) & SDHC_IRQSIGEN_CINTIEN_MASK)
  8149. #define SDHC_IRQSIGEN_CTOEIEN_MASK (0x10000U)
  8150. #define SDHC_IRQSIGEN_CTOEIEN_SHIFT (16U)
  8151. #define SDHC_IRQSIGEN_CTOEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CTOEIEN_SHIFT)) & SDHC_IRQSIGEN_CTOEIEN_MASK)
  8152. #define SDHC_IRQSIGEN_CCEIEN_MASK (0x20000U)
  8153. #define SDHC_IRQSIGEN_CCEIEN_SHIFT (17U)
  8154. #define SDHC_IRQSIGEN_CCEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CCEIEN_SHIFT)) & SDHC_IRQSIGEN_CCEIEN_MASK)
  8155. #define SDHC_IRQSIGEN_CEBEIEN_MASK (0x40000U)
  8156. #define SDHC_IRQSIGEN_CEBEIEN_SHIFT (18U)
  8157. #define SDHC_IRQSIGEN_CEBEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CEBEIEN_SHIFT)) & SDHC_IRQSIGEN_CEBEIEN_MASK)
  8158. #define SDHC_IRQSIGEN_CIEIEN_MASK (0x80000U)
  8159. #define SDHC_IRQSIGEN_CIEIEN_SHIFT (19U)
  8160. #define SDHC_IRQSIGEN_CIEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_CIEIEN_SHIFT)) & SDHC_IRQSIGEN_CIEIEN_MASK)
  8161. #define SDHC_IRQSIGEN_DTOEIEN_MASK (0x100000U)
  8162. #define SDHC_IRQSIGEN_DTOEIEN_SHIFT (20U)
  8163. #define SDHC_IRQSIGEN_DTOEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_DTOEIEN_SHIFT)) & SDHC_IRQSIGEN_DTOEIEN_MASK)
  8164. #define SDHC_IRQSIGEN_DCEIEN_MASK (0x200000U)
  8165. #define SDHC_IRQSIGEN_DCEIEN_SHIFT (21U)
  8166. #define SDHC_IRQSIGEN_DCEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_DCEIEN_SHIFT)) & SDHC_IRQSIGEN_DCEIEN_MASK)
  8167. #define SDHC_IRQSIGEN_DEBEIEN_MASK (0x400000U)
  8168. #define SDHC_IRQSIGEN_DEBEIEN_SHIFT (22U)
  8169. #define SDHC_IRQSIGEN_DEBEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_DEBEIEN_SHIFT)) & SDHC_IRQSIGEN_DEBEIEN_MASK)
  8170. #define SDHC_IRQSIGEN_AC12EIEN_MASK (0x1000000U)
  8171. #define SDHC_IRQSIGEN_AC12EIEN_SHIFT (24U)
  8172. #define SDHC_IRQSIGEN_AC12EIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_AC12EIEN_SHIFT)) & SDHC_IRQSIGEN_AC12EIEN_MASK)
  8173. #define SDHC_IRQSIGEN_DMAEIEN_MASK (0x10000000U)
  8174. #define SDHC_IRQSIGEN_DMAEIEN_SHIFT (28U)
  8175. #define SDHC_IRQSIGEN_DMAEIEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_IRQSIGEN_DMAEIEN_SHIFT)) & SDHC_IRQSIGEN_DMAEIEN_MASK)
  8176. /*! @name AC12ERR - Auto CMD12 Error Status Register */
  8177. #define SDHC_AC12ERR_AC12NE_MASK (0x1U)
  8178. #define SDHC_AC12ERR_AC12NE_SHIFT (0U)
  8179. #define SDHC_AC12ERR_AC12NE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_AC12NE_SHIFT)) & SDHC_AC12ERR_AC12NE_MASK)
  8180. #define SDHC_AC12ERR_AC12TOE_MASK (0x2U)
  8181. #define SDHC_AC12ERR_AC12TOE_SHIFT (1U)
  8182. #define SDHC_AC12ERR_AC12TOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_AC12TOE_SHIFT)) & SDHC_AC12ERR_AC12TOE_MASK)
  8183. #define SDHC_AC12ERR_AC12EBE_MASK (0x4U)
  8184. #define SDHC_AC12ERR_AC12EBE_SHIFT (2U)
  8185. #define SDHC_AC12ERR_AC12EBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_AC12EBE_SHIFT)) & SDHC_AC12ERR_AC12EBE_MASK)
  8186. #define SDHC_AC12ERR_AC12CE_MASK (0x8U)
  8187. #define SDHC_AC12ERR_AC12CE_SHIFT (3U)
  8188. #define SDHC_AC12ERR_AC12CE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_AC12CE_SHIFT)) & SDHC_AC12ERR_AC12CE_MASK)
  8189. #define SDHC_AC12ERR_AC12IE_MASK (0x10U)
  8190. #define SDHC_AC12ERR_AC12IE_SHIFT (4U)
  8191. #define SDHC_AC12ERR_AC12IE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_AC12IE_SHIFT)) & SDHC_AC12ERR_AC12IE_MASK)
  8192. #define SDHC_AC12ERR_CNIBAC12E_MASK (0x80U)
  8193. #define SDHC_AC12ERR_CNIBAC12E_SHIFT (7U)
  8194. #define SDHC_AC12ERR_CNIBAC12E(x) (((uint32_t)(((uint32_t)(x)) << SDHC_AC12ERR_CNIBAC12E_SHIFT)) & SDHC_AC12ERR_CNIBAC12E_MASK)
  8195. /*! @name HTCAPBLT - Host Controller Capabilities */
  8196. #define SDHC_HTCAPBLT_MBL_MASK (0x70000U)
  8197. #define SDHC_HTCAPBLT_MBL_SHIFT (16U)
  8198. #define SDHC_HTCAPBLT_MBL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_MBL_SHIFT)) & SDHC_HTCAPBLT_MBL_MASK)
  8199. #define SDHC_HTCAPBLT_ADMAS_MASK (0x100000U)
  8200. #define SDHC_HTCAPBLT_ADMAS_SHIFT (20U)
  8201. #define SDHC_HTCAPBLT_ADMAS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_ADMAS_SHIFT)) & SDHC_HTCAPBLT_ADMAS_MASK)
  8202. #define SDHC_HTCAPBLT_HSS_MASK (0x200000U)
  8203. #define SDHC_HTCAPBLT_HSS_SHIFT (21U)
  8204. #define SDHC_HTCAPBLT_HSS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_HSS_SHIFT)) & SDHC_HTCAPBLT_HSS_MASK)
  8205. #define SDHC_HTCAPBLT_DMAS_MASK (0x400000U)
  8206. #define SDHC_HTCAPBLT_DMAS_SHIFT (22U)
  8207. #define SDHC_HTCAPBLT_DMAS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_DMAS_SHIFT)) & SDHC_HTCAPBLT_DMAS_MASK)
  8208. #define SDHC_HTCAPBLT_SRS_MASK (0x800000U)
  8209. #define SDHC_HTCAPBLT_SRS_SHIFT (23U)
  8210. #define SDHC_HTCAPBLT_SRS(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_SRS_SHIFT)) & SDHC_HTCAPBLT_SRS_MASK)
  8211. #define SDHC_HTCAPBLT_VS33_MASK (0x1000000U)
  8212. #define SDHC_HTCAPBLT_VS33_SHIFT (24U)
  8213. #define SDHC_HTCAPBLT_VS33(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HTCAPBLT_VS33_SHIFT)) & SDHC_HTCAPBLT_VS33_MASK)
  8214. /*! @name WML - Watermark Level Register */
  8215. #define SDHC_WML_RDWML_MASK (0xFFU)
  8216. #define SDHC_WML_RDWML_SHIFT (0U)
  8217. #define SDHC_WML_RDWML(x) (((uint32_t)(((uint32_t)(x)) << SDHC_WML_RDWML_SHIFT)) & SDHC_WML_RDWML_MASK)
  8218. #define SDHC_WML_WRWML_MASK (0xFF0000U)
  8219. #define SDHC_WML_WRWML_SHIFT (16U)
  8220. #define SDHC_WML_WRWML(x) (((uint32_t)(((uint32_t)(x)) << SDHC_WML_WRWML_SHIFT)) & SDHC_WML_WRWML_MASK)
  8221. /*! @name FEVT - Force Event register */
  8222. #define SDHC_FEVT_AC12NE_MASK (0x1U)
  8223. #define SDHC_FEVT_AC12NE_SHIFT (0U)
  8224. #define SDHC_FEVT_AC12NE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12NE_SHIFT)) & SDHC_FEVT_AC12NE_MASK)
  8225. #define SDHC_FEVT_AC12TOE_MASK (0x2U)
  8226. #define SDHC_FEVT_AC12TOE_SHIFT (1U)
  8227. #define SDHC_FEVT_AC12TOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12TOE_SHIFT)) & SDHC_FEVT_AC12TOE_MASK)
  8228. #define SDHC_FEVT_AC12CE_MASK (0x4U)
  8229. #define SDHC_FEVT_AC12CE_SHIFT (2U)
  8230. #define SDHC_FEVT_AC12CE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12CE_SHIFT)) & SDHC_FEVT_AC12CE_MASK)
  8231. #define SDHC_FEVT_AC12EBE_MASK (0x8U)
  8232. #define SDHC_FEVT_AC12EBE_SHIFT (3U)
  8233. #define SDHC_FEVT_AC12EBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12EBE_SHIFT)) & SDHC_FEVT_AC12EBE_MASK)
  8234. #define SDHC_FEVT_AC12IE_MASK (0x10U)
  8235. #define SDHC_FEVT_AC12IE_SHIFT (4U)
  8236. #define SDHC_FEVT_AC12IE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12IE_SHIFT)) & SDHC_FEVT_AC12IE_MASK)
  8237. #define SDHC_FEVT_CNIBAC12E_MASK (0x80U)
  8238. #define SDHC_FEVT_CNIBAC12E_SHIFT (7U)
  8239. #define SDHC_FEVT_CNIBAC12E(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CNIBAC12E_SHIFT)) & SDHC_FEVT_CNIBAC12E_MASK)
  8240. #define SDHC_FEVT_CTOE_MASK (0x10000U)
  8241. #define SDHC_FEVT_CTOE_SHIFT (16U)
  8242. #define SDHC_FEVT_CTOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CTOE_SHIFT)) & SDHC_FEVT_CTOE_MASK)
  8243. #define SDHC_FEVT_CCE_MASK (0x20000U)
  8244. #define SDHC_FEVT_CCE_SHIFT (17U)
  8245. #define SDHC_FEVT_CCE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CCE_SHIFT)) & SDHC_FEVT_CCE_MASK)
  8246. #define SDHC_FEVT_CEBE_MASK (0x40000U)
  8247. #define SDHC_FEVT_CEBE_SHIFT (18U)
  8248. #define SDHC_FEVT_CEBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CEBE_SHIFT)) & SDHC_FEVT_CEBE_MASK)
  8249. #define SDHC_FEVT_CIE_MASK (0x80000U)
  8250. #define SDHC_FEVT_CIE_SHIFT (19U)
  8251. #define SDHC_FEVT_CIE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CIE_SHIFT)) & SDHC_FEVT_CIE_MASK)
  8252. #define SDHC_FEVT_DTOE_MASK (0x100000U)
  8253. #define SDHC_FEVT_DTOE_SHIFT (20U)
  8254. #define SDHC_FEVT_DTOE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_DTOE_SHIFT)) & SDHC_FEVT_DTOE_MASK)
  8255. #define SDHC_FEVT_DCE_MASK (0x200000U)
  8256. #define SDHC_FEVT_DCE_SHIFT (21U)
  8257. #define SDHC_FEVT_DCE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_DCE_SHIFT)) & SDHC_FEVT_DCE_MASK)
  8258. #define SDHC_FEVT_DEBE_MASK (0x400000U)
  8259. #define SDHC_FEVT_DEBE_SHIFT (22U)
  8260. #define SDHC_FEVT_DEBE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_DEBE_SHIFT)) & SDHC_FEVT_DEBE_MASK)
  8261. #define SDHC_FEVT_AC12E_MASK (0x1000000U)
  8262. #define SDHC_FEVT_AC12E_SHIFT (24U)
  8263. #define SDHC_FEVT_AC12E(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_AC12E_SHIFT)) & SDHC_FEVT_AC12E_MASK)
  8264. #define SDHC_FEVT_DMAE_MASK (0x10000000U)
  8265. #define SDHC_FEVT_DMAE_SHIFT (28U)
  8266. #define SDHC_FEVT_DMAE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_DMAE_SHIFT)) & SDHC_FEVT_DMAE_MASK)
  8267. #define SDHC_FEVT_CINT_MASK (0x80000000U)
  8268. #define SDHC_FEVT_CINT_SHIFT (31U)
  8269. #define SDHC_FEVT_CINT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_FEVT_CINT_SHIFT)) & SDHC_FEVT_CINT_MASK)
  8270. /*! @name ADMAES - ADMA Error Status register */
  8271. #define SDHC_ADMAES_ADMAES_MASK (0x3U)
  8272. #define SDHC_ADMAES_ADMAES_SHIFT (0U)
  8273. #define SDHC_ADMAES_ADMAES(x) (((uint32_t)(((uint32_t)(x)) << SDHC_ADMAES_ADMAES_SHIFT)) & SDHC_ADMAES_ADMAES_MASK)
  8274. #define SDHC_ADMAES_ADMALME_MASK (0x4U)
  8275. #define SDHC_ADMAES_ADMALME_SHIFT (2U)
  8276. #define SDHC_ADMAES_ADMALME(x) (((uint32_t)(((uint32_t)(x)) << SDHC_ADMAES_ADMALME_SHIFT)) & SDHC_ADMAES_ADMALME_MASK)
  8277. #define SDHC_ADMAES_ADMADCE_MASK (0x8U)
  8278. #define SDHC_ADMAES_ADMADCE_SHIFT (3U)
  8279. #define SDHC_ADMAES_ADMADCE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_ADMAES_ADMADCE_SHIFT)) & SDHC_ADMAES_ADMADCE_MASK)
  8280. /*! @name ADSADDR - ADMA System Addressregister */
  8281. #define SDHC_ADSADDR_ADSADDR_MASK (0xFFFFFFFCU)
  8282. #define SDHC_ADSADDR_ADSADDR_SHIFT (2U)
  8283. #define SDHC_ADSADDR_ADSADDR(x) (((uint32_t)(((uint32_t)(x)) << SDHC_ADSADDR_ADSADDR_SHIFT)) & SDHC_ADSADDR_ADSADDR_MASK)
  8284. /*! @name VENDOR - Vendor Specific register */
  8285. #define SDHC_VENDOR_EXTDMAEN_MASK (0x1U)
  8286. #define SDHC_VENDOR_EXTDMAEN_SHIFT (0U)
  8287. #define SDHC_VENDOR_EXTDMAEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_VENDOR_EXTDMAEN_SHIFT)) & SDHC_VENDOR_EXTDMAEN_MASK)
  8288. #define SDHC_VENDOR_EXBLKNU_MASK (0x2U)
  8289. #define SDHC_VENDOR_EXBLKNU_SHIFT (1U)
  8290. #define SDHC_VENDOR_EXBLKNU(x) (((uint32_t)(((uint32_t)(x)) << SDHC_VENDOR_EXBLKNU_SHIFT)) & SDHC_VENDOR_EXBLKNU_MASK)
  8291. #define SDHC_VENDOR_INTSTVAL_MASK (0xFF0000U)
  8292. #define SDHC_VENDOR_INTSTVAL_SHIFT (16U)
  8293. #define SDHC_VENDOR_INTSTVAL(x) (((uint32_t)(((uint32_t)(x)) << SDHC_VENDOR_INTSTVAL_SHIFT)) & SDHC_VENDOR_INTSTVAL_MASK)
  8294. /*! @name MMCBOOT - MMC Boot register */
  8295. #define SDHC_MMCBOOT_DTOCVACK_MASK (0xFU)
  8296. #define SDHC_MMCBOOT_DTOCVACK_SHIFT (0U)
  8297. #define SDHC_MMCBOOT_DTOCVACK(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_DTOCVACK_SHIFT)) & SDHC_MMCBOOT_DTOCVACK_MASK)
  8298. #define SDHC_MMCBOOT_BOOTACK_MASK (0x10U)
  8299. #define SDHC_MMCBOOT_BOOTACK_SHIFT (4U)
  8300. #define SDHC_MMCBOOT_BOOTACK(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_BOOTACK_SHIFT)) & SDHC_MMCBOOT_BOOTACK_MASK)
  8301. #define SDHC_MMCBOOT_BOOTMODE_MASK (0x20U)
  8302. #define SDHC_MMCBOOT_BOOTMODE_SHIFT (5U)
  8303. #define SDHC_MMCBOOT_BOOTMODE(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_BOOTMODE_SHIFT)) & SDHC_MMCBOOT_BOOTMODE_MASK)
  8304. #define SDHC_MMCBOOT_BOOTEN_MASK (0x40U)
  8305. #define SDHC_MMCBOOT_BOOTEN_SHIFT (6U)
  8306. #define SDHC_MMCBOOT_BOOTEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_BOOTEN_SHIFT)) & SDHC_MMCBOOT_BOOTEN_MASK)
  8307. #define SDHC_MMCBOOT_AUTOSABGEN_MASK (0x80U)
  8308. #define SDHC_MMCBOOT_AUTOSABGEN_SHIFT (7U)
  8309. #define SDHC_MMCBOOT_AUTOSABGEN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_AUTOSABGEN_SHIFT)) & SDHC_MMCBOOT_AUTOSABGEN_MASK)
  8310. #define SDHC_MMCBOOT_BOOTBLKCNT_MASK (0xFFFF0000U)
  8311. #define SDHC_MMCBOOT_BOOTBLKCNT_SHIFT (16U)
  8312. #define SDHC_MMCBOOT_BOOTBLKCNT(x) (((uint32_t)(((uint32_t)(x)) << SDHC_MMCBOOT_BOOTBLKCNT_SHIFT)) & SDHC_MMCBOOT_BOOTBLKCNT_MASK)
  8313. /*! @name HOSTVER - Host Controller Version */
  8314. #define SDHC_HOSTVER_SVN_MASK (0xFFU)
  8315. #define SDHC_HOSTVER_SVN_SHIFT (0U)
  8316. #define SDHC_HOSTVER_SVN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HOSTVER_SVN_SHIFT)) & SDHC_HOSTVER_SVN_MASK)
  8317. #define SDHC_HOSTVER_VVN_MASK (0xFF00U)
  8318. #define SDHC_HOSTVER_VVN_SHIFT (8U)
  8319. #define SDHC_HOSTVER_VVN(x) (((uint32_t)(((uint32_t)(x)) << SDHC_HOSTVER_VVN_SHIFT)) & SDHC_HOSTVER_VVN_MASK)
  8320. /*!
  8321. * @}
  8322. */ /* end of group SDHC_Register_Masks */
  8323. /* SDHC - Peripheral instance base addresses */
  8324. /** Peripheral SDHC base address */
  8325. #define SDHC_BASE (0x400B1000u)
  8326. /** Peripheral SDHC base pointer */
  8327. #define SDHC ((SDHC_Type *)SDHC_BASE)
  8328. /** Array initializer of SDHC peripheral base addresses */
  8329. #define SDHC_BASE_ADDRS { SDHC_BASE }
  8330. /** Array initializer of SDHC peripheral base pointers */
  8331. #define SDHC_BASE_PTRS { SDHC }
  8332. /** Interrupt vectors for the SDHC peripheral type */
  8333. #define SDHC_IRQS { SDHC_IRQn }
  8334. /*!
  8335. * @}
  8336. */ /* end of group SDHC_Peripheral_Access_Layer */
  8337. /* ----------------------------------------------------------------------------
  8338. -- SIM Peripheral Access Layer
  8339. ---------------------------------------------------------------------------- */
  8340. /*!
  8341. * @addtogroup SIM_Peripheral_Access_Layer SIM Peripheral Access Layer
  8342. * @{
  8343. */
  8344. /** SIM - Register Layout Typedef */
  8345. typedef struct {
  8346. __IO uint32_t SOPT1; /**< System Options Register 1, offset: 0x0 */
  8347. __IO uint32_t SOPT1CFG; /**< SOPT1 Configuration Register, offset: 0x4 */
  8348. uint8_t RESERVED_0[4092];
  8349. __IO uint32_t SOPT2; /**< System Options Register 2, offset: 0x1004 */
  8350. uint8_t RESERVED_1[4];
  8351. __IO uint32_t SOPT4; /**< System Options Register 4, offset: 0x100C */
  8352. __IO uint32_t SOPT5; /**< System Options Register 5, offset: 0x1010 */
  8353. uint8_t RESERVED_2[4];
  8354. __IO uint32_t SOPT7; /**< System Options Register 7, offset: 0x1018 */
  8355. uint8_t RESERVED_3[8];
  8356. __I uint32_t SDID; /**< System Device Identification Register, offset: 0x1024 */
  8357. __IO uint32_t SCGC1; /**< System Clock Gating Control Register 1, offset: 0x1028 */
  8358. __IO uint32_t SCGC2; /**< System Clock Gating Control Register 2, offset: 0x102C */
  8359. __IO uint32_t SCGC3; /**< System Clock Gating Control Register 3, offset: 0x1030 */
  8360. __IO uint32_t SCGC4; /**< System Clock Gating Control Register 4, offset: 0x1034 */
  8361. __IO uint32_t SCGC5; /**< System Clock Gating Control Register 5, offset: 0x1038 */
  8362. __IO uint32_t SCGC6; /**< System Clock Gating Control Register 6, offset: 0x103C */
  8363. __IO uint32_t SCGC7; /**< System Clock Gating Control Register 7, offset: 0x1040 */
  8364. __IO uint32_t CLKDIV1; /**< System Clock Divider Register 1, offset: 0x1044 */
  8365. __IO uint32_t CLKDIV2; /**< System Clock Divider Register 2, offset: 0x1048 */
  8366. __IO uint32_t FCFG1; /**< Flash Configuration Register 1, offset: 0x104C */
  8367. __I uint32_t FCFG2; /**< Flash Configuration Register 2, offset: 0x1050 */
  8368. __I uint32_t UIDH; /**< Unique Identification Register High, offset: 0x1054 */
  8369. __I uint32_t UIDMH; /**< Unique Identification Register Mid-High, offset: 0x1058 */
  8370. __I uint32_t UIDML; /**< Unique Identification Register Mid Low, offset: 0x105C */
  8371. __I uint32_t UIDL; /**< Unique Identification Register Low, offset: 0x1060 */
  8372. } SIM_Type;
  8373. /* ----------------------------------------------------------------------------
  8374. -- SIM Register Masks
  8375. ---------------------------------------------------------------------------- */
  8376. /*!
  8377. * @addtogroup SIM_Register_Masks SIM Register Masks
  8378. * @{
  8379. */
  8380. /*! @name SOPT1 - System Options Register 1 */
  8381. #define SIM_SOPT1_RAMSIZE_MASK (0xF000U)
  8382. #define SIM_SOPT1_RAMSIZE_SHIFT (12U)
  8383. #define SIM_SOPT1_RAMSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_RAMSIZE_SHIFT)) & SIM_SOPT1_RAMSIZE_MASK)
  8384. #define SIM_SOPT1_OSC32KSEL_MASK (0xC0000U)
  8385. #define SIM_SOPT1_OSC32KSEL_SHIFT (18U)
  8386. #define SIM_SOPT1_OSC32KSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_OSC32KSEL_SHIFT)) & SIM_SOPT1_OSC32KSEL_MASK)
  8387. #define SIM_SOPT1_USBVSTBY_MASK (0x20000000U)
  8388. #define SIM_SOPT1_USBVSTBY_SHIFT (29U)
  8389. #define SIM_SOPT1_USBVSTBY(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_USBVSTBY_SHIFT)) & SIM_SOPT1_USBVSTBY_MASK)
  8390. #define SIM_SOPT1_USBSSTBY_MASK (0x40000000U)
  8391. #define SIM_SOPT1_USBSSTBY_SHIFT (30U)
  8392. #define SIM_SOPT1_USBSSTBY(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_USBSSTBY_SHIFT)) & SIM_SOPT1_USBSSTBY_MASK)
  8393. #define SIM_SOPT1_USBREGEN_MASK (0x80000000U)
  8394. #define SIM_SOPT1_USBREGEN_SHIFT (31U)
  8395. #define SIM_SOPT1_USBREGEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1_USBREGEN_SHIFT)) & SIM_SOPT1_USBREGEN_MASK)
  8396. /*! @name SOPT1CFG - SOPT1 Configuration Register */
  8397. #define SIM_SOPT1CFG_URWE_MASK (0x1000000U)
  8398. #define SIM_SOPT1CFG_URWE_SHIFT (24U)
  8399. #define SIM_SOPT1CFG_URWE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1CFG_URWE_SHIFT)) & SIM_SOPT1CFG_URWE_MASK)
  8400. #define SIM_SOPT1CFG_UVSWE_MASK (0x2000000U)
  8401. #define SIM_SOPT1CFG_UVSWE_SHIFT (25U)
  8402. #define SIM_SOPT1CFG_UVSWE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1CFG_UVSWE_SHIFT)) & SIM_SOPT1CFG_UVSWE_MASK)
  8403. #define SIM_SOPT1CFG_USSWE_MASK (0x4000000U)
  8404. #define SIM_SOPT1CFG_USSWE_SHIFT (26U)
  8405. #define SIM_SOPT1CFG_USSWE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT1CFG_USSWE_SHIFT)) & SIM_SOPT1CFG_USSWE_MASK)
  8406. /*! @name SOPT2 - System Options Register 2 */
  8407. #define SIM_SOPT2_RTCCLKOUTSEL_MASK (0x10U)
  8408. #define SIM_SOPT2_RTCCLKOUTSEL_SHIFT (4U)
  8409. #define SIM_SOPT2_RTCCLKOUTSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_RTCCLKOUTSEL_SHIFT)) & SIM_SOPT2_RTCCLKOUTSEL_MASK)
  8410. #define SIM_SOPT2_CLKOUTSEL_MASK (0xE0U)
  8411. #define SIM_SOPT2_CLKOUTSEL_SHIFT (5U)
  8412. #define SIM_SOPT2_CLKOUTSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_CLKOUTSEL_SHIFT)) & SIM_SOPT2_CLKOUTSEL_MASK)
  8413. #define SIM_SOPT2_FBSL_MASK (0x300U)
  8414. #define SIM_SOPT2_FBSL_SHIFT (8U)
  8415. #define SIM_SOPT2_FBSL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_FBSL_SHIFT)) & SIM_SOPT2_FBSL_MASK)
  8416. #define SIM_SOPT2_PTD7PAD_MASK (0x800U)
  8417. #define SIM_SOPT2_PTD7PAD_SHIFT (11U)
  8418. #define SIM_SOPT2_PTD7PAD(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_PTD7PAD_SHIFT)) & SIM_SOPT2_PTD7PAD_MASK)
  8419. #define SIM_SOPT2_TRACECLKSEL_MASK (0x1000U)
  8420. #define SIM_SOPT2_TRACECLKSEL_SHIFT (12U)
  8421. #define SIM_SOPT2_TRACECLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_TRACECLKSEL_SHIFT)) & SIM_SOPT2_TRACECLKSEL_MASK)
  8422. #define SIM_SOPT2_PLLFLLSEL_MASK (0x30000U)
  8423. #define SIM_SOPT2_PLLFLLSEL_SHIFT (16U)
  8424. #define SIM_SOPT2_PLLFLLSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_PLLFLLSEL_SHIFT)) & SIM_SOPT2_PLLFLLSEL_MASK)
  8425. #define SIM_SOPT2_USBSRC_MASK (0x40000U)
  8426. #define SIM_SOPT2_USBSRC_SHIFT (18U)
  8427. #define SIM_SOPT2_USBSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_USBSRC_SHIFT)) & SIM_SOPT2_USBSRC_MASK)
  8428. #define SIM_SOPT2_SDHCSRC_MASK (0x30000000U)
  8429. #define SIM_SOPT2_SDHCSRC_SHIFT (28U)
  8430. #define SIM_SOPT2_SDHCSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT2_SDHCSRC_SHIFT)) & SIM_SOPT2_SDHCSRC_MASK)
  8431. /*! @name SOPT4 - System Options Register 4 */
  8432. #define SIM_SOPT4_FTM0FLT0_MASK (0x1U)
  8433. #define SIM_SOPT4_FTM0FLT0_SHIFT (0U)
  8434. #define SIM_SOPT4_FTM0FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0FLT0_SHIFT)) & SIM_SOPT4_FTM0FLT0_MASK)
  8435. #define SIM_SOPT4_FTM0FLT1_MASK (0x2U)
  8436. #define SIM_SOPT4_FTM0FLT1_SHIFT (1U)
  8437. #define SIM_SOPT4_FTM0FLT1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0FLT1_SHIFT)) & SIM_SOPT4_FTM0FLT1_MASK)
  8438. #define SIM_SOPT4_FTM0FLT2_MASK (0x4U)
  8439. #define SIM_SOPT4_FTM0FLT2_SHIFT (2U)
  8440. #define SIM_SOPT4_FTM0FLT2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0FLT2_SHIFT)) & SIM_SOPT4_FTM0FLT2_MASK)
  8441. #define SIM_SOPT4_FTM1FLT0_MASK (0x10U)
  8442. #define SIM_SOPT4_FTM1FLT0_SHIFT (4U)
  8443. #define SIM_SOPT4_FTM1FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM1FLT0_SHIFT)) & SIM_SOPT4_FTM1FLT0_MASK)
  8444. #define SIM_SOPT4_FTM2FLT0_MASK (0x100U)
  8445. #define SIM_SOPT4_FTM2FLT0_SHIFT (8U)
  8446. #define SIM_SOPT4_FTM2FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM2FLT0_SHIFT)) & SIM_SOPT4_FTM2FLT0_MASK)
  8447. #define SIM_SOPT4_FTM3FLT0_MASK (0x1000U)
  8448. #define SIM_SOPT4_FTM3FLT0_SHIFT (12U)
  8449. #define SIM_SOPT4_FTM3FLT0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3FLT0_SHIFT)) & SIM_SOPT4_FTM3FLT0_MASK)
  8450. #define SIM_SOPT4_FTM1CH0SRC_MASK (0xC0000U)
  8451. #define SIM_SOPT4_FTM1CH0SRC_SHIFT (18U)
  8452. #define SIM_SOPT4_FTM1CH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM1CH0SRC_SHIFT)) & SIM_SOPT4_FTM1CH0SRC_MASK)
  8453. #define SIM_SOPT4_FTM2CH0SRC_MASK (0x300000U)
  8454. #define SIM_SOPT4_FTM2CH0SRC_SHIFT (20U)
  8455. #define SIM_SOPT4_FTM2CH0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM2CH0SRC_SHIFT)) & SIM_SOPT4_FTM2CH0SRC_MASK)
  8456. #define SIM_SOPT4_FTM0CLKSEL_MASK (0x1000000U)
  8457. #define SIM_SOPT4_FTM0CLKSEL_SHIFT (24U)
  8458. #define SIM_SOPT4_FTM0CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0CLKSEL_SHIFT)) & SIM_SOPT4_FTM0CLKSEL_MASK)
  8459. #define SIM_SOPT4_FTM1CLKSEL_MASK (0x2000000U)
  8460. #define SIM_SOPT4_FTM1CLKSEL_SHIFT (25U)
  8461. #define SIM_SOPT4_FTM1CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM1CLKSEL_SHIFT)) & SIM_SOPT4_FTM1CLKSEL_MASK)
  8462. #define SIM_SOPT4_FTM2CLKSEL_MASK (0x4000000U)
  8463. #define SIM_SOPT4_FTM2CLKSEL_SHIFT (26U)
  8464. #define SIM_SOPT4_FTM2CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM2CLKSEL_SHIFT)) & SIM_SOPT4_FTM2CLKSEL_MASK)
  8465. #define SIM_SOPT4_FTM3CLKSEL_MASK (0x8000000U)
  8466. #define SIM_SOPT4_FTM3CLKSEL_SHIFT (27U)
  8467. #define SIM_SOPT4_FTM3CLKSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3CLKSEL_SHIFT)) & SIM_SOPT4_FTM3CLKSEL_MASK)
  8468. #define SIM_SOPT4_FTM0TRG0SRC_MASK (0x10000000U)
  8469. #define SIM_SOPT4_FTM0TRG0SRC_SHIFT (28U)
  8470. #define SIM_SOPT4_FTM0TRG0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0TRG0SRC_SHIFT)) & SIM_SOPT4_FTM0TRG0SRC_MASK)
  8471. #define SIM_SOPT4_FTM0TRG1SRC_MASK (0x20000000U)
  8472. #define SIM_SOPT4_FTM0TRG1SRC_SHIFT (29U)
  8473. #define SIM_SOPT4_FTM0TRG1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM0TRG1SRC_SHIFT)) & SIM_SOPT4_FTM0TRG1SRC_MASK)
  8474. #define SIM_SOPT4_FTM3TRG0SRC_MASK (0x40000000U)
  8475. #define SIM_SOPT4_FTM3TRG0SRC_SHIFT (30U)
  8476. #define SIM_SOPT4_FTM3TRG0SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3TRG0SRC_SHIFT)) & SIM_SOPT4_FTM3TRG0SRC_MASK)
  8477. #define SIM_SOPT4_FTM3TRG1SRC_MASK (0x80000000U)
  8478. #define SIM_SOPT4_FTM3TRG1SRC_SHIFT (31U)
  8479. #define SIM_SOPT4_FTM3TRG1SRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT4_FTM3TRG1SRC_SHIFT)) & SIM_SOPT4_FTM3TRG1SRC_MASK)
  8480. /*! @name SOPT5 - System Options Register 5 */
  8481. #define SIM_SOPT5_UART0TXSRC_MASK (0x3U)
  8482. #define SIM_SOPT5_UART0TXSRC_SHIFT (0U)
  8483. #define SIM_SOPT5_UART0TXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_UART0TXSRC_SHIFT)) & SIM_SOPT5_UART0TXSRC_MASK)
  8484. #define SIM_SOPT5_UART0RXSRC_MASK (0xCU)
  8485. #define SIM_SOPT5_UART0RXSRC_SHIFT (2U)
  8486. #define SIM_SOPT5_UART0RXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_UART0RXSRC_SHIFT)) & SIM_SOPT5_UART0RXSRC_MASK)
  8487. #define SIM_SOPT5_UART1TXSRC_MASK (0x30U)
  8488. #define SIM_SOPT5_UART1TXSRC_SHIFT (4U)
  8489. #define SIM_SOPT5_UART1TXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_UART1TXSRC_SHIFT)) & SIM_SOPT5_UART1TXSRC_MASK)
  8490. #define SIM_SOPT5_UART1RXSRC_MASK (0xC0U)
  8491. #define SIM_SOPT5_UART1RXSRC_SHIFT (6U)
  8492. #define SIM_SOPT5_UART1RXSRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT5_UART1RXSRC_SHIFT)) & SIM_SOPT5_UART1RXSRC_MASK)
  8493. /*! @name SOPT7 - System Options Register 7 */
  8494. #define SIM_SOPT7_ADC0TRGSEL_MASK (0xFU)
  8495. #define SIM_SOPT7_ADC0TRGSEL_SHIFT (0U)
  8496. #define SIM_SOPT7_ADC0TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_ADC0TRGSEL_SHIFT)) & SIM_SOPT7_ADC0TRGSEL_MASK)
  8497. #define SIM_SOPT7_ADC0PRETRGSEL_MASK (0x10U)
  8498. #define SIM_SOPT7_ADC0PRETRGSEL_SHIFT (4U)
  8499. #define SIM_SOPT7_ADC0PRETRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_ADC0PRETRGSEL_SHIFT)) & SIM_SOPT7_ADC0PRETRGSEL_MASK)
  8500. #define SIM_SOPT7_ADC0ALTTRGEN_MASK (0x80U)
  8501. #define SIM_SOPT7_ADC0ALTTRGEN_SHIFT (7U)
  8502. #define SIM_SOPT7_ADC0ALTTRGEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_ADC0ALTTRGEN_SHIFT)) & SIM_SOPT7_ADC0ALTTRGEN_MASK)
  8503. #define SIM_SOPT7_ADC1TRGSEL_MASK (0xF00U)
  8504. #define SIM_SOPT7_ADC1TRGSEL_SHIFT (8U)
  8505. #define SIM_SOPT7_ADC1TRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_ADC1TRGSEL_SHIFT)) & SIM_SOPT7_ADC1TRGSEL_MASK)
  8506. #define SIM_SOPT7_ADC1PRETRGSEL_MASK (0x1000U)
  8507. #define SIM_SOPT7_ADC1PRETRGSEL_SHIFT (12U)
  8508. #define SIM_SOPT7_ADC1PRETRGSEL(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_ADC1PRETRGSEL_SHIFT)) & SIM_SOPT7_ADC1PRETRGSEL_MASK)
  8509. #define SIM_SOPT7_ADC1ALTTRGEN_MASK (0x8000U)
  8510. #define SIM_SOPT7_ADC1ALTTRGEN_SHIFT (15U)
  8511. #define SIM_SOPT7_ADC1ALTTRGEN(x) (((uint32_t)(((uint32_t)(x)) << SIM_SOPT7_ADC1ALTTRGEN_SHIFT)) & SIM_SOPT7_ADC1ALTTRGEN_MASK)
  8512. /*! @name SDID - System Device Identification Register */
  8513. #define SIM_SDID_PINID_MASK (0xFU)
  8514. #define SIM_SDID_PINID_SHIFT (0U)
  8515. #define SIM_SDID_PINID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_PINID_SHIFT)) & SIM_SDID_PINID_MASK)
  8516. #define SIM_SDID_FAMID_MASK (0x70U)
  8517. #define SIM_SDID_FAMID_SHIFT (4U)
  8518. #define SIM_SDID_FAMID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_FAMID_SHIFT)) & SIM_SDID_FAMID_MASK)
  8519. #define SIM_SDID_DIEID_MASK (0xF80U)
  8520. #define SIM_SDID_DIEID_SHIFT (7U)
  8521. #define SIM_SDID_DIEID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_DIEID_SHIFT)) & SIM_SDID_DIEID_MASK)
  8522. #define SIM_SDID_REVID_MASK (0xF000U)
  8523. #define SIM_SDID_REVID_SHIFT (12U)
  8524. #define SIM_SDID_REVID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_REVID_SHIFT)) & SIM_SDID_REVID_MASK)
  8525. #define SIM_SDID_SERIESID_MASK (0xF00000U)
  8526. #define SIM_SDID_SERIESID_SHIFT (20U)
  8527. #define SIM_SDID_SERIESID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SERIESID_SHIFT)) & SIM_SDID_SERIESID_MASK)
  8528. #define SIM_SDID_SUBFAMID_MASK (0xF000000U)
  8529. #define SIM_SDID_SUBFAMID_SHIFT (24U)
  8530. #define SIM_SDID_SUBFAMID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_SUBFAMID_SHIFT)) & SIM_SDID_SUBFAMID_MASK)
  8531. #define SIM_SDID_FAMILYID_MASK (0xF0000000U)
  8532. #define SIM_SDID_FAMILYID_SHIFT (28U)
  8533. #define SIM_SDID_FAMILYID(x) (((uint32_t)(((uint32_t)(x)) << SIM_SDID_FAMILYID_SHIFT)) & SIM_SDID_FAMILYID_MASK)
  8534. /*! @name SCGC1 - System Clock Gating Control Register 1 */
  8535. #define SIM_SCGC1_I2C2_MASK (0x40U)
  8536. #define SIM_SCGC1_I2C2_SHIFT (6U)
  8537. #define SIM_SCGC1_I2C2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_I2C2_SHIFT)) & SIM_SCGC1_I2C2_MASK)
  8538. #define SIM_SCGC1_UART4_MASK (0x400U)
  8539. #define SIM_SCGC1_UART4_SHIFT (10U)
  8540. #define SIM_SCGC1_UART4(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_UART4_SHIFT)) & SIM_SCGC1_UART4_MASK)
  8541. #define SIM_SCGC1_UART5_MASK (0x800U)
  8542. #define SIM_SCGC1_UART5_SHIFT (11U)
  8543. #define SIM_SCGC1_UART5(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC1_UART5_SHIFT)) & SIM_SCGC1_UART5_MASK)
  8544. /*! @name SCGC2 - System Clock Gating Control Register 2 */
  8545. #define SIM_SCGC2_DAC0_MASK (0x1000U)
  8546. #define SIM_SCGC2_DAC0_SHIFT (12U)
  8547. #define SIM_SCGC2_DAC0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_DAC0_SHIFT)) & SIM_SCGC2_DAC0_MASK)
  8548. #define SIM_SCGC2_DAC1_MASK (0x2000U)
  8549. #define SIM_SCGC2_DAC1_SHIFT (13U)
  8550. #define SIM_SCGC2_DAC1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC2_DAC1_SHIFT)) & SIM_SCGC2_DAC1_MASK)
  8551. /*! @name SCGC3 - System Clock Gating Control Register 3 */
  8552. #define SIM_SCGC3_RNGA_MASK (0x1U)
  8553. #define SIM_SCGC3_RNGA_SHIFT (0U)
  8554. #define SIM_SCGC3_RNGA(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_RNGA_SHIFT)) & SIM_SCGC3_RNGA_MASK)
  8555. #define SIM_SCGC3_SPI2_MASK (0x1000U)
  8556. #define SIM_SCGC3_SPI2_SHIFT (12U)
  8557. #define SIM_SCGC3_SPI2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_SPI2_SHIFT)) & SIM_SCGC3_SPI2_MASK)
  8558. #define SIM_SCGC3_SDHC_MASK (0x20000U)
  8559. #define SIM_SCGC3_SDHC_SHIFT (17U)
  8560. #define SIM_SCGC3_SDHC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_SDHC_SHIFT)) & SIM_SCGC3_SDHC_MASK)
  8561. #define SIM_SCGC3_FTM2_MASK (0x1000000U)
  8562. #define SIM_SCGC3_FTM2_SHIFT (24U)
  8563. #define SIM_SCGC3_FTM2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_FTM2_SHIFT)) & SIM_SCGC3_FTM2_MASK)
  8564. #define SIM_SCGC3_FTM3_MASK (0x2000000U)
  8565. #define SIM_SCGC3_FTM3_SHIFT (25U)
  8566. #define SIM_SCGC3_FTM3(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_FTM3_SHIFT)) & SIM_SCGC3_FTM3_MASK)
  8567. #define SIM_SCGC3_ADC1_MASK (0x8000000U)
  8568. #define SIM_SCGC3_ADC1_SHIFT (27U)
  8569. #define SIM_SCGC3_ADC1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC3_ADC1_SHIFT)) & SIM_SCGC3_ADC1_MASK)
  8570. /*! @name SCGC4 - System Clock Gating Control Register 4 */
  8571. #define SIM_SCGC4_EWM_MASK (0x2U)
  8572. #define SIM_SCGC4_EWM_SHIFT (1U)
  8573. #define SIM_SCGC4_EWM(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_EWM_SHIFT)) & SIM_SCGC4_EWM_MASK)
  8574. #define SIM_SCGC4_CMT_MASK (0x4U)
  8575. #define SIM_SCGC4_CMT_SHIFT (2U)
  8576. #define SIM_SCGC4_CMT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_CMT_SHIFT)) & SIM_SCGC4_CMT_MASK)
  8577. #define SIM_SCGC4_I2C0_MASK (0x40U)
  8578. #define SIM_SCGC4_I2C0_SHIFT (6U)
  8579. #define SIM_SCGC4_I2C0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_I2C0_SHIFT)) & SIM_SCGC4_I2C0_MASK)
  8580. #define SIM_SCGC4_I2C1_MASK (0x80U)
  8581. #define SIM_SCGC4_I2C1_SHIFT (7U)
  8582. #define SIM_SCGC4_I2C1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_I2C1_SHIFT)) & SIM_SCGC4_I2C1_MASK)
  8583. #define SIM_SCGC4_UART0_MASK (0x400U)
  8584. #define SIM_SCGC4_UART0_SHIFT (10U)
  8585. #define SIM_SCGC4_UART0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_UART0_SHIFT)) & SIM_SCGC4_UART0_MASK)
  8586. #define SIM_SCGC4_UART1_MASK (0x800U)
  8587. #define SIM_SCGC4_UART1_SHIFT (11U)
  8588. #define SIM_SCGC4_UART1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_UART1_SHIFT)) & SIM_SCGC4_UART1_MASK)
  8589. #define SIM_SCGC4_UART2_MASK (0x1000U)
  8590. #define SIM_SCGC4_UART2_SHIFT (12U)
  8591. #define SIM_SCGC4_UART2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_UART2_SHIFT)) & SIM_SCGC4_UART2_MASK)
  8592. #define SIM_SCGC4_UART3_MASK (0x2000U)
  8593. #define SIM_SCGC4_UART3_SHIFT (13U)
  8594. #define SIM_SCGC4_UART3(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_UART3_SHIFT)) & SIM_SCGC4_UART3_MASK)
  8595. #define SIM_SCGC4_USBOTG_MASK (0x40000U)
  8596. #define SIM_SCGC4_USBOTG_SHIFT (18U)
  8597. #define SIM_SCGC4_USBOTG(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_USBOTG_SHIFT)) & SIM_SCGC4_USBOTG_MASK)
  8598. #define SIM_SCGC4_CMP_MASK (0x80000U)
  8599. #define SIM_SCGC4_CMP_SHIFT (19U)
  8600. #define SIM_SCGC4_CMP(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_CMP_SHIFT)) & SIM_SCGC4_CMP_MASK)
  8601. #define SIM_SCGC4_VREF_MASK (0x100000U)
  8602. #define SIM_SCGC4_VREF_SHIFT (20U)
  8603. #define SIM_SCGC4_VREF(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC4_VREF_SHIFT)) & SIM_SCGC4_VREF_MASK)
  8604. /*! @name SCGC5 - System Clock Gating Control Register 5 */
  8605. #define SIM_SCGC5_LPTMR_MASK (0x1U)
  8606. #define SIM_SCGC5_LPTMR_SHIFT (0U)
  8607. #define SIM_SCGC5_LPTMR(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_LPTMR_SHIFT)) & SIM_SCGC5_LPTMR_MASK)
  8608. #define SIM_SCGC5_PORTA_MASK (0x200U)
  8609. #define SIM_SCGC5_PORTA_SHIFT (9U)
  8610. #define SIM_SCGC5_PORTA(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTA_SHIFT)) & SIM_SCGC5_PORTA_MASK)
  8611. #define SIM_SCGC5_PORTB_MASK (0x400U)
  8612. #define SIM_SCGC5_PORTB_SHIFT (10U)
  8613. #define SIM_SCGC5_PORTB(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTB_SHIFT)) & SIM_SCGC5_PORTB_MASK)
  8614. #define SIM_SCGC5_PORTC_MASK (0x800U)
  8615. #define SIM_SCGC5_PORTC_SHIFT (11U)
  8616. #define SIM_SCGC5_PORTC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTC_SHIFT)) & SIM_SCGC5_PORTC_MASK)
  8617. #define SIM_SCGC5_PORTD_MASK (0x1000U)
  8618. #define SIM_SCGC5_PORTD_SHIFT (12U)
  8619. #define SIM_SCGC5_PORTD(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTD_SHIFT)) & SIM_SCGC5_PORTD_MASK)
  8620. #define SIM_SCGC5_PORTE_MASK (0x2000U)
  8621. #define SIM_SCGC5_PORTE_SHIFT (13U)
  8622. #define SIM_SCGC5_PORTE(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC5_PORTE_SHIFT)) & SIM_SCGC5_PORTE_MASK)
  8623. /*! @name SCGC6 - System Clock Gating Control Register 6 */
  8624. #define SIM_SCGC6_FTF_MASK (0x1U)
  8625. #define SIM_SCGC6_FTF_SHIFT (0U)
  8626. #define SIM_SCGC6_FTF(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTF_SHIFT)) & SIM_SCGC6_FTF_MASK)
  8627. #define SIM_SCGC6_DMAMUX_MASK (0x2U)
  8628. #define SIM_SCGC6_DMAMUX_SHIFT (1U)
  8629. #define SIM_SCGC6_DMAMUX(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_DMAMUX_SHIFT)) & SIM_SCGC6_DMAMUX_MASK)
  8630. #define SIM_SCGC6_FLEXCAN0_MASK (0x10U)
  8631. #define SIM_SCGC6_FLEXCAN0_SHIFT (4U)
  8632. #define SIM_SCGC6_FLEXCAN0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FLEXCAN0_SHIFT)) & SIM_SCGC6_FLEXCAN0_MASK)
  8633. #define SIM_SCGC6_RNGA_MASK (0x200U)
  8634. #define SIM_SCGC6_RNGA_SHIFT (9U)
  8635. #define SIM_SCGC6_RNGA(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_RNGA_SHIFT)) & SIM_SCGC6_RNGA_MASK)
  8636. #define SIM_SCGC6_SPI0_MASK (0x1000U)
  8637. #define SIM_SCGC6_SPI0_SHIFT (12U)
  8638. #define SIM_SCGC6_SPI0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_SPI0_SHIFT)) & SIM_SCGC6_SPI0_MASK)
  8639. #define SIM_SCGC6_SPI1_MASK (0x2000U)
  8640. #define SIM_SCGC6_SPI1_SHIFT (13U)
  8641. #define SIM_SCGC6_SPI1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_SPI1_SHIFT)) & SIM_SCGC6_SPI1_MASK)
  8642. #define SIM_SCGC6_I2S_MASK (0x8000U)
  8643. #define SIM_SCGC6_I2S_SHIFT (15U)
  8644. #define SIM_SCGC6_I2S(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_I2S_SHIFT)) & SIM_SCGC6_I2S_MASK)
  8645. #define SIM_SCGC6_CRC_MASK (0x40000U)
  8646. #define SIM_SCGC6_CRC_SHIFT (18U)
  8647. #define SIM_SCGC6_CRC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_CRC_SHIFT)) & SIM_SCGC6_CRC_MASK)
  8648. #define SIM_SCGC6_USBDCD_MASK (0x200000U)
  8649. #define SIM_SCGC6_USBDCD_SHIFT (21U)
  8650. #define SIM_SCGC6_USBDCD(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_USBDCD_SHIFT)) & SIM_SCGC6_USBDCD_MASK)
  8651. #define SIM_SCGC6_PDB_MASK (0x400000U)
  8652. #define SIM_SCGC6_PDB_SHIFT (22U)
  8653. #define SIM_SCGC6_PDB(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_PDB_SHIFT)) & SIM_SCGC6_PDB_MASK)
  8654. #define SIM_SCGC6_PIT_MASK (0x800000U)
  8655. #define SIM_SCGC6_PIT_SHIFT (23U)
  8656. #define SIM_SCGC6_PIT(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_PIT_SHIFT)) & SIM_SCGC6_PIT_MASK)
  8657. #define SIM_SCGC6_FTM0_MASK (0x1000000U)
  8658. #define SIM_SCGC6_FTM0_SHIFT (24U)
  8659. #define SIM_SCGC6_FTM0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTM0_SHIFT)) & SIM_SCGC6_FTM0_MASK)
  8660. #define SIM_SCGC6_FTM1_MASK (0x2000000U)
  8661. #define SIM_SCGC6_FTM1_SHIFT (25U)
  8662. #define SIM_SCGC6_FTM1(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTM1_SHIFT)) & SIM_SCGC6_FTM1_MASK)
  8663. #define SIM_SCGC6_FTM2_MASK (0x4000000U)
  8664. #define SIM_SCGC6_FTM2_SHIFT (26U)
  8665. #define SIM_SCGC6_FTM2(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_FTM2_SHIFT)) & SIM_SCGC6_FTM2_MASK)
  8666. #define SIM_SCGC6_ADC0_MASK (0x8000000U)
  8667. #define SIM_SCGC6_ADC0_SHIFT (27U)
  8668. #define SIM_SCGC6_ADC0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_ADC0_SHIFT)) & SIM_SCGC6_ADC0_MASK)
  8669. #define SIM_SCGC6_RTC_MASK (0x20000000U)
  8670. #define SIM_SCGC6_RTC_SHIFT (29U)
  8671. #define SIM_SCGC6_RTC(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_RTC_SHIFT)) & SIM_SCGC6_RTC_MASK)
  8672. #define SIM_SCGC6_DAC0_MASK (0x80000000U)
  8673. #define SIM_SCGC6_DAC0_SHIFT (31U)
  8674. #define SIM_SCGC6_DAC0(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC6_DAC0_SHIFT)) & SIM_SCGC6_DAC0_MASK)
  8675. /*! @name SCGC7 - System Clock Gating Control Register 7 */
  8676. #define SIM_SCGC7_FLEXBUS_MASK (0x1U)
  8677. #define SIM_SCGC7_FLEXBUS_SHIFT (0U)
  8678. #define SIM_SCGC7_FLEXBUS(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC7_FLEXBUS_SHIFT)) & SIM_SCGC7_FLEXBUS_MASK)
  8679. #define SIM_SCGC7_DMA_MASK (0x2U)
  8680. #define SIM_SCGC7_DMA_SHIFT (1U)
  8681. #define SIM_SCGC7_DMA(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC7_DMA_SHIFT)) & SIM_SCGC7_DMA_MASK)
  8682. #define SIM_SCGC7_MPU_MASK (0x4U)
  8683. #define SIM_SCGC7_MPU_SHIFT (2U)
  8684. #define SIM_SCGC7_MPU(x) (((uint32_t)(((uint32_t)(x)) << SIM_SCGC7_MPU_SHIFT)) & SIM_SCGC7_MPU_MASK)
  8685. /*! @name CLKDIV1 - System Clock Divider Register 1 */
  8686. #define SIM_CLKDIV1_OUTDIV4_MASK (0xF0000U)
  8687. #define SIM_CLKDIV1_OUTDIV4_SHIFT (16U)
  8688. #define SIM_CLKDIV1_OUTDIV4(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV4_SHIFT)) & SIM_CLKDIV1_OUTDIV4_MASK)
  8689. #define SIM_CLKDIV1_OUTDIV3_MASK (0xF00000U)
  8690. #define SIM_CLKDIV1_OUTDIV3_SHIFT (20U)
  8691. #define SIM_CLKDIV1_OUTDIV3(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV3_SHIFT)) & SIM_CLKDIV1_OUTDIV3_MASK)
  8692. #define SIM_CLKDIV1_OUTDIV2_MASK (0xF000000U)
  8693. #define SIM_CLKDIV1_OUTDIV2_SHIFT (24U)
  8694. #define SIM_CLKDIV1_OUTDIV2(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV2_SHIFT)) & SIM_CLKDIV1_OUTDIV2_MASK)
  8695. #define SIM_CLKDIV1_OUTDIV1_MASK (0xF0000000U)
  8696. #define SIM_CLKDIV1_OUTDIV1_SHIFT (28U)
  8697. #define SIM_CLKDIV1_OUTDIV1(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV1_OUTDIV1_SHIFT)) & SIM_CLKDIV1_OUTDIV1_MASK)
  8698. /*! @name CLKDIV2 - System Clock Divider Register 2 */
  8699. #define SIM_CLKDIV2_USBFRAC_MASK (0x1U)
  8700. #define SIM_CLKDIV2_USBFRAC_SHIFT (0U)
  8701. #define SIM_CLKDIV2_USBFRAC(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV2_USBFRAC_SHIFT)) & SIM_CLKDIV2_USBFRAC_MASK)
  8702. #define SIM_CLKDIV2_USBDIV_MASK (0xEU)
  8703. #define SIM_CLKDIV2_USBDIV_SHIFT (1U)
  8704. #define SIM_CLKDIV2_USBDIV(x) (((uint32_t)(((uint32_t)(x)) << SIM_CLKDIV2_USBDIV_SHIFT)) & SIM_CLKDIV2_USBDIV_MASK)
  8705. /*! @name FCFG1 - Flash Configuration Register 1 */
  8706. #define SIM_FCFG1_FLASHDIS_MASK (0x1U)
  8707. #define SIM_FCFG1_FLASHDIS_SHIFT (0U)
  8708. #define SIM_FCFG1_FLASHDIS(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLASHDIS_SHIFT)) & SIM_FCFG1_FLASHDIS_MASK)
  8709. #define SIM_FCFG1_FLASHDOZE_MASK (0x2U)
  8710. #define SIM_FCFG1_FLASHDOZE_SHIFT (1U)
  8711. #define SIM_FCFG1_FLASHDOZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_FLASHDOZE_SHIFT)) & SIM_FCFG1_FLASHDOZE_MASK)
  8712. #define SIM_FCFG1_DEPART_MASK (0xF00U)
  8713. #define SIM_FCFG1_DEPART_SHIFT (8U)
  8714. #define SIM_FCFG1_DEPART(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_DEPART_SHIFT)) & SIM_FCFG1_DEPART_MASK)
  8715. #define SIM_FCFG1_EESIZE_MASK (0xF0000U)
  8716. #define SIM_FCFG1_EESIZE_SHIFT (16U)
  8717. #define SIM_FCFG1_EESIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_EESIZE_SHIFT)) & SIM_FCFG1_EESIZE_MASK)
  8718. #define SIM_FCFG1_PFSIZE_MASK (0xF000000U)
  8719. #define SIM_FCFG1_PFSIZE_SHIFT (24U)
  8720. #define SIM_FCFG1_PFSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_PFSIZE_SHIFT)) & SIM_FCFG1_PFSIZE_MASK)
  8721. #define SIM_FCFG1_NVMSIZE_MASK (0xF0000000U)
  8722. #define SIM_FCFG1_NVMSIZE_SHIFT (28U)
  8723. #define SIM_FCFG1_NVMSIZE(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG1_NVMSIZE_SHIFT)) & SIM_FCFG1_NVMSIZE_MASK)
  8724. /*! @name FCFG2 - Flash Configuration Register 2 */
  8725. #define SIM_FCFG2_MAXADDR1_MASK (0x7F0000U)
  8726. #define SIM_FCFG2_MAXADDR1_SHIFT (16U)
  8727. #define SIM_FCFG2_MAXADDR1(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_MAXADDR1_SHIFT)) & SIM_FCFG2_MAXADDR1_MASK)
  8728. #define SIM_FCFG2_PFLSH_MASK (0x800000U)
  8729. #define SIM_FCFG2_PFLSH_SHIFT (23U)
  8730. #define SIM_FCFG2_PFLSH(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_PFLSH_SHIFT)) & SIM_FCFG2_PFLSH_MASK)
  8731. #define SIM_FCFG2_MAXADDR0_MASK (0x7F000000U)
  8732. #define SIM_FCFG2_MAXADDR0_SHIFT (24U)
  8733. #define SIM_FCFG2_MAXADDR0(x) (((uint32_t)(((uint32_t)(x)) << SIM_FCFG2_MAXADDR0_SHIFT)) & SIM_FCFG2_MAXADDR0_MASK)
  8734. /*! @name UIDH - Unique Identification Register High */
  8735. #define SIM_UIDH_UID_MASK (0xFFFFFFFFU)
  8736. #define SIM_UIDH_UID_SHIFT (0U)
  8737. #define SIM_UIDH_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDH_UID_SHIFT)) & SIM_UIDH_UID_MASK)
  8738. /*! @name UIDMH - Unique Identification Register Mid-High */
  8739. #define SIM_UIDMH_UID_MASK (0xFFFFFFFFU)
  8740. #define SIM_UIDMH_UID_SHIFT (0U)
  8741. #define SIM_UIDMH_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDMH_UID_SHIFT)) & SIM_UIDMH_UID_MASK)
  8742. /*! @name UIDML - Unique Identification Register Mid Low */
  8743. #define SIM_UIDML_UID_MASK (0xFFFFFFFFU)
  8744. #define SIM_UIDML_UID_SHIFT (0U)
  8745. #define SIM_UIDML_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDML_UID_SHIFT)) & SIM_UIDML_UID_MASK)
  8746. /*! @name UIDL - Unique Identification Register Low */
  8747. #define SIM_UIDL_UID_MASK (0xFFFFFFFFU)
  8748. #define SIM_UIDL_UID_SHIFT (0U)
  8749. #define SIM_UIDL_UID(x) (((uint32_t)(((uint32_t)(x)) << SIM_UIDL_UID_SHIFT)) & SIM_UIDL_UID_MASK)
  8750. /*!
  8751. * @}
  8752. */ /* end of group SIM_Register_Masks */
  8753. /* SIM - Peripheral instance base addresses */
  8754. /** Peripheral SIM base address */
  8755. #define SIM_BASE (0x40047000u)
  8756. /** Peripheral SIM base pointer */
  8757. #define SIM ((SIM_Type *)SIM_BASE)
  8758. /** Array initializer of SIM peripheral base addresses */
  8759. #define SIM_BASE_ADDRS { SIM_BASE }
  8760. /** Array initializer of SIM peripheral base pointers */
  8761. #define SIM_BASE_PTRS { SIM }
  8762. /*!
  8763. * @}
  8764. */ /* end of group SIM_Peripheral_Access_Layer */
  8765. /* ----------------------------------------------------------------------------
  8766. -- SMC Peripheral Access Layer
  8767. ---------------------------------------------------------------------------- */
  8768. /*!
  8769. * @addtogroup SMC_Peripheral_Access_Layer SMC Peripheral Access Layer
  8770. * @{
  8771. */
  8772. /** SMC - Register Layout Typedef */
  8773. typedef struct {
  8774. __IO uint8_t PMPROT; /**< Power Mode Protection register, offset: 0x0 */
  8775. __IO uint8_t PMCTRL; /**< Power Mode Control register, offset: 0x1 */
  8776. __IO uint8_t VLLSCTRL; /**< VLLS Control register, offset: 0x2 */
  8777. __I uint8_t PMSTAT; /**< Power Mode Status register, offset: 0x3 */
  8778. } SMC_Type;
  8779. /* ----------------------------------------------------------------------------
  8780. -- SMC Register Masks
  8781. ---------------------------------------------------------------------------- */
  8782. /*!
  8783. * @addtogroup SMC_Register_Masks SMC Register Masks
  8784. * @{
  8785. */
  8786. /*! @name PMPROT - Power Mode Protection register */
  8787. #define SMC_PMPROT_AVLLS_MASK (0x2U)
  8788. #define SMC_PMPROT_AVLLS_SHIFT (1U)
  8789. #define SMC_PMPROT_AVLLS(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMPROT_AVLLS_SHIFT)) & SMC_PMPROT_AVLLS_MASK)
  8790. #define SMC_PMPROT_ALLS_MASK (0x8U)
  8791. #define SMC_PMPROT_ALLS_SHIFT (3U)
  8792. #define SMC_PMPROT_ALLS(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMPROT_ALLS_SHIFT)) & SMC_PMPROT_ALLS_MASK)
  8793. #define SMC_PMPROT_AVLP_MASK (0x20U)
  8794. #define SMC_PMPROT_AVLP_SHIFT (5U)
  8795. #define SMC_PMPROT_AVLP(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMPROT_AVLP_SHIFT)) & SMC_PMPROT_AVLP_MASK)
  8796. /*! @name PMCTRL - Power Mode Control register */
  8797. #define SMC_PMCTRL_STOPM_MASK (0x7U)
  8798. #define SMC_PMCTRL_STOPM_SHIFT (0U)
  8799. #define SMC_PMCTRL_STOPM(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMCTRL_STOPM_SHIFT)) & SMC_PMCTRL_STOPM_MASK)
  8800. #define SMC_PMCTRL_STOPA_MASK (0x8U)
  8801. #define SMC_PMCTRL_STOPA_SHIFT (3U)
  8802. #define SMC_PMCTRL_STOPA(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMCTRL_STOPA_SHIFT)) & SMC_PMCTRL_STOPA_MASK)
  8803. #define SMC_PMCTRL_RUNM_MASK (0x60U)
  8804. #define SMC_PMCTRL_RUNM_SHIFT (5U)
  8805. #define SMC_PMCTRL_RUNM(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMCTRL_RUNM_SHIFT)) & SMC_PMCTRL_RUNM_MASK)
  8806. #define SMC_PMCTRL_LPWUI_MASK (0x80U)
  8807. #define SMC_PMCTRL_LPWUI_SHIFT (7U)
  8808. #define SMC_PMCTRL_LPWUI(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMCTRL_LPWUI_SHIFT)) & SMC_PMCTRL_LPWUI_MASK)
  8809. /*! @name VLLSCTRL - VLLS Control register */
  8810. #define SMC_VLLSCTRL_VLLSM_MASK (0x7U)
  8811. #define SMC_VLLSCTRL_VLLSM_SHIFT (0U)
  8812. #define SMC_VLLSCTRL_VLLSM(x) (((uint8_t)(((uint8_t)(x)) << SMC_VLLSCTRL_VLLSM_SHIFT)) & SMC_VLLSCTRL_VLLSM_MASK)
  8813. #define SMC_VLLSCTRL_PORPO_MASK (0x20U)
  8814. #define SMC_VLLSCTRL_PORPO_SHIFT (5U)
  8815. #define SMC_VLLSCTRL_PORPO(x) (((uint8_t)(((uint8_t)(x)) << SMC_VLLSCTRL_PORPO_SHIFT)) & SMC_VLLSCTRL_PORPO_MASK)
  8816. /*! @name PMSTAT - Power Mode Status register */
  8817. #define SMC_PMSTAT_PMSTAT_MASK (0x7FU)
  8818. #define SMC_PMSTAT_PMSTAT_SHIFT (0U)
  8819. #define SMC_PMSTAT_PMSTAT(x) (((uint8_t)(((uint8_t)(x)) << SMC_PMSTAT_PMSTAT_SHIFT)) & SMC_PMSTAT_PMSTAT_MASK)
  8820. /*!
  8821. * @}
  8822. */ /* end of group SMC_Register_Masks */
  8823. /* SMC - Peripheral instance base addresses */
  8824. /** Peripheral SMC base address */
  8825. #define SMC_BASE (0x4007E000u)
  8826. /** Peripheral SMC base pointer */
  8827. #define SMC ((SMC_Type *)SMC_BASE)
  8828. /** Array initializer of SMC peripheral base addresses */
  8829. #define SMC_BASE_ADDRS { SMC_BASE }
  8830. /** Array initializer of SMC peripheral base pointers */
  8831. #define SMC_BASE_PTRS { SMC }
  8832. /*!
  8833. * @}
  8834. */ /* end of group SMC_Peripheral_Access_Layer */
  8835. /* ----------------------------------------------------------------------------
  8836. -- SPI Peripheral Access Layer
  8837. ---------------------------------------------------------------------------- */
  8838. /*!
  8839. * @addtogroup SPI_Peripheral_Access_Layer SPI Peripheral Access Layer
  8840. * @{
  8841. */
  8842. /** SPI - Register Layout Typedef */
  8843. typedef struct {
  8844. __IO uint32_t MCR; /**< Module Configuration Register, offset: 0x0 */
  8845. uint8_t RESERVED_0[4];
  8846. __IO uint32_t TCR; /**< Transfer Count Register, offset: 0x8 */
  8847. union { /* offset: 0xC */
  8848. __IO uint32_t CTAR[2]; /**< Clock and Transfer Attributes Register (In Master Mode), array offset: 0xC, array step: 0x4 */
  8849. __IO uint32_t CTAR_SLAVE[1]; /**< Clock and Transfer Attributes Register (In Slave Mode), array offset: 0xC, array step: 0x4 */
  8850. };
  8851. uint8_t RESERVED_1[24];
  8852. __IO uint32_t SR; /**< Status Register, offset: 0x2C */
  8853. __IO uint32_t RSER; /**< DMA/Interrupt Request Select and Enable Register, offset: 0x30 */
  8854. union { /* offset: 0x34 */
  8855. __IO uint32_t PUSHR; /**< PUSH TX FIFO Register In Master Mode, offset: 0x34 */
  8856. __IO uint32_t PUSHR_SLAVE; /**< PUSH TX FIFO Register In Slave Mode, offset: 0x34 */
  8857. };
  8858. __I uint32_t POPR; /**< POP RX FIFO Register, offset: 0x38 */
  8859. __I uint32_t TXFR0; /**< Transmit FIFO Registers, offset: 0x3C */
  8860. __I uint32_t TXFR1; /**< Transmit FIFO Registers, offset: 0x40 */
  8861. __I uint32_t TXFR2; /**< Transmit FIFO Registers, offset: 0x44 */
  8862. __I uint32_t TXFR3; /**< Transmit FIFO Registers, offset: 0x48 */
  8863. uint8_t RESERVED_2[48];
  8864. __I uint32_t RXFR0; /**< Receive FIFO Registers, offset: 0x7C */
  8865. __I uint32_t RXFR1; /**< Receive FIFO Registers, offset: 0x80 */
  8866. __I uint32_t RXFR2; /**< Receive FIFO Registers, offset: 0x84 */
  8867. __I uint32_t RXFR3; /**< Receive FIFO Registers, offset: 0x88 */
  8868. } SPI_Type;
  8869. /* ----------------------------------------------------------------------------
  8870. -- SPI Register Masks
  8871. ---------------------------------------------------------------------------- */
  8872. /*!
  8873. * @addtogroup SPI_Register_Masks SPI Register Masks
  8874. * @{
  8875. */
  8876. /*! @name MCR - Module Configuration Register */
  8877. #define SPI_MCR_HALT_MASK (0x1U)
  8878. #define SPI_MCR_HALT_SHIFT (0U)
  8879. #define SPI_MCR_HALT(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_HALT_SHIFT)) & SPI_MCR_HALT_MASK)
  8880. #define SPI_MCR_SMPL_PT_MASK (0x300U)
  8881. #define SPI_MCR_SMPL_PT_SHIFT (8U)
  8882. #define SPI_MCR_SMPL_PT(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_SMPL_PT_SHIFT)) & SPI_MCR_SMPL_PT_MASK)
  8883. #define SPI_MCR_CLR_RXF_MASK (0x400U)
  8884. #define SPI_MCR_CLR_RXF_SHIFT (10U)
  8885. #define SPI_MCR_CLR_RXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_CLR_RXF_SHIFT)) & SPI_MCR_CLR_RXF_MASK)
  8886. #define SPI_MCR_CLR_TXF_MASK (0x800U)
  8887. #define SPI_MCR_CLR_TXF_SHIFT (11U)
  8888. #define SPI_MCR_CLR_TXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_CLR_TXF_SHIFT)) & SPI_MCR_CLR_TXF_MASK)
  8889. #define SPI_MCR_DIS_RXF_MASK (0x1000U)
  8890. #define SPI_MCR_DIS_RXF_SHIFT (12U)
  8891. #define SPI_MCR_DIS_RXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DIS_RXF_SHIFT)) & SPI_MCR_DIS_RXF_MASK)
  8892. #define SPI_MCR_DIS_TXF_MASK (0x2000U)
  8893. #define SPI_MCR_DIS_TXF_SHIFT (13U)
  8894. #define SPI_MCR_DIS_TXF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DIS_TXF_SHIFT)) & SPI_MCR_DIS_TXF_MASK)
  8895. #define SPI_MCR_MDIS_MASK (0x4000U)
  8896. #define SPI_MCR_MDIS_SHIFT (14U)
  8897. #define SPI_MCR_MDIS(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_MDIS_SHIFT)) & SPI_MCR_MDIS_MASK)
  8898. #define SPI_MCR_DOZE_MASK (0x8000U)
  8899. #define SPI_MCR_DOZE_SHIFT (15U)
  8900. #define SPI_MCR_DOZE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DOZE_SHIFT)) & SPI_MCR_DOZE_MASK)
  8901. #define SPI_MCR_PCSIS_MASK (0x3F0000U)
  8902. #define SPI_MCR_PCSIS_SHIFT (16U)
  8903. #define SPI_MCR_PCSIS(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_PCSIS_SHIFT)) & SPI_MCR_PCSIS_MASK)
  8904. #define SPI_MCR_ROOE_MASK (0x1000000U)
  8905. #define SPI_MCR_ROOE_SHIFT (24U)
  8906. #define SPI_MCR_ROOE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_ROOE_SHIFT)) & SPI_MCR_ROOE_MASK)
  8907. #define SPI_MCR_PCSSE_MASK (0x2000000U)
  8908. #define SPI_MCR_PCSSE_SHIFT (25U)
  8909. #define SPI_MCR_PCSSE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_PCSSE_SHIFT)) & SPI_MCR_PCSSE_MASK)
  8910. #define SPI_MCR_MTFE_MASK (0x4000000U)
  8911. #define SPI_MCR_MTFE_SHIFT (26U)
  8912. #define SPI_MCR_MTFE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_MTFE_SHIFT)) & SPI_MCR_MTFE_MASK)
  8913. #define SPI_MCR_FRZ_MASK (0x8000000U)
  8914. #define SPI_MCR_FRZ_SHIFT (27U)
  8915. #define SPI_MCR_FRZ(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_FRZ_SHIFT)) & SPI_MCR_FRZ_MASK)
  8916. #define SPI_MCR_DCONF_MASK (0x30000000U)
  8917. #define SPI_MCR_DCONF_SHIFT (28U)
  8918. #define SPI_MCR_DCONF(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_DCONF_SHIFT)) & SPI_MCR_DCONF_MASK)
  8919. #define SPI_MCR_CONT_SCKE_MASK (0x40000000U)
  8920. #define SPI_MCR_CONT_SCKE_SHIFT (30U)
  8921. #define SPI_MCR_CONT_SCKE(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_CONT_SCKE_SHIFT)) & SPI_MCR_CONT_SCKE_MASK)
  8922. #define SPI_MCR_MSTR_MASK (0x80000000U)
  8923. #define SPI_MCR_MSTR_SHIFT (31U)
  8924. #define SPI_MCR_MSTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_MCR_MSTR_SHIFT)) & SPI_MCR_MSTR_MASK)
  8925. /*! @name TCR - Transfer Count Register */
  8926. #define SPI_TCR_SPI_TCNT_MASK (0xFFFF0000U)
  8927. #define SPI_TCR_SPI_TCNT_SHIFT (16U)
  8928. #define SPI_TCR_SPI_TCNT(x) (((uint32_t)(((uint32_t)(x)) << SPI_TCR_SPI_TCNT_SHIFT)) & SPI_TCR_SPI_TCNT_MASK)
  8929. /*! @name CTAR - Clock and Transfer Attributes Register (In Master Mode) */
  8930. #define SPI_CTAR_BR_MASK (0xFU)
  8931. #define SPI_CTAR_BR_SHIFT (0U)
  8932. #define SPI_CTAR_BR(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_BR_SHIFT)) & SPI_CTAR_BR_MASK)
  8933. #define SPI_CTAR_DT_MASK (0xF0U)
  8934. #define SPI_CTAR_DT_SHIFT (4U)
  8935. #define SPI_CTAR_DT(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_DT_SHIFT)) & SPI_CTAR_DT_MASK)
  8936. #define SPI_CTAR_ASC_MASK (0xF00U)
  8937. #define SPI_CTAR_ASC_SHIFT (8U)
  8938. #define SPI_CTAR_ASC(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_ASC_SHIFT)) & SPI_CTAR_ASC_MASK)
  8939. #define SPI_CTAR_CSSCK_MASK (0xF000U)
  8940. #define SPI_CTAR_CSSCK_SHIFT (12U)
  8941. #define SPI_CTAR_CSSCK(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_CSSCK_SHIFT)) & SPI_CTAR_CSSCK_MASK)
  8942. #define SPI_CTAR_PBR_MASK (0x30000U)
  8943. #define SPI_CTAR_PBR_SHIFT (16U)
  8944. #define SPI_CTAR_PBR(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PBR_SHIFT)) & SPI_CTAR_PBR_MASK)
  8945. #define SPI_CTAR_PDT_MASK (0xC0000U)
  8946. #define SPI_CTAR_PDT_SHIFT (18U)
  8947. #define SPI_CTAR_PDT(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PDT_SHIFT)) & SPI_CTAR_PDT_MASK)
  8948. #define SPI_CTAR_PASC_MASK (0x300000U)
  8949. #define SPI_CTAR_PASC_SHIFT (20U)
  8950. #define SPI_CTAR_PASC(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PASC_SHIFT)) & SPI_CTAR_PASC_MASK)
  8951. #define SPI_CTAR_PCSSCK_MASK (0xC00000U)
  8952. #define SPI_CTAR_PCSSCK_SHIFT (22U)
  8953. #define SPI_CTAR_PCSSCK(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_PCSSCK_SHIFT)) & SPI_CTAR_PCSSCK_MASK)
  8954. #define SPI_CTAR_LSBFE_MASK (0x1000000U)
  8955. #define SPI_CTAR_LSBFE_SHIFT (24U)
  8956. #define SPI_CTAR_LSBFE(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_LSBFE_SHIFT)) & SPI_CTAR_LSBFE_MASK)
  8957. #define SPI_CTAR_CPHA_MASK (0x2000000U)
  8958. #define SPI_CTAR_CPHA_SHIFT (25U)
  8959. #define SPI_CTAR_CPHA(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_CPHA_SHIFT)) & SPI_CTAR_CPHA_MASK)
  8960. #define SPI_CTAR_CPOL_MASK (0x4000000U)
  8961. #define SPI_CTAR_CPOL_SHIFT (26U)
  8962. #define SPI_CTAR_CPOL(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_CPOL_SHIFT)) & SPI_CTAR_CPOL_MASK)
  8963. #define SPI_CTAR_FMSZ_MASK (0x78000000U)
  8964. #define SPI_CTAR_FMSZ_SHIFT (27U)
  8965. #define SPI_CTAR_FMSZ(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_FMSZ_SHIFT)) & SPI_CTAR_FMSZ_MASK)
  8966. #define SPI_CTAR_DBR_MASK (0x80000000U)
  8967. #define SPI_CTAR_DBR_SHIFT (31U)
  8968. #define SPI_CTAR_DBR(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_DBR_SHIFT)) & SPI_CTAR_DBR_MASK)
  8969. /* The count of SPI_CTAR */
  8970. #define SPI_CTAR_COUNT (2U)
  8971. /*! @name CTAR_SLAVE - Clock and Transfer Attributes Register (In Slave Mode) */
  8972. #define SPI_CTAR_SLAVE_CPHA_MASK (0x2000000U)
  8973. #define SPI_CTAR_SLAVE_CPHA_SHIFT (25U)
  8974. #define SPI_CTAR_SLAVE_CPHA(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_SLAVE_CPHA_SHIFT)) & SPI_CTAR_SLAVE_CPHA_MASK)
  8975. #define SPI_CTAR_SLAVE_CPOL_MASK (0x4000000U)
  8976. #define SPI_CTAR_SLAVE_CPOL_SHIFT (26U)
  8977. #define SPI_CTAR_SLAVE_CPOL(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_SLAVE_CPOL_SHIFT)) & SPI_CTAR_SLAVE_CPOL_MASK)
  8978. #define SPI_CTAR_SLAVE_FMSZ_MASK (0xF8000000U)
  8979. #define SPI_CTAR_SLAVE_FMSZ_SHIFT (27U)
  8980. #define SPI_CTAR_SLAVE_FMSZ(x) (((uint32_t)(((uint32_t)(x)) << SPI_CTAR_SLAVE_FMSZ_SHIFT)) & SPI_CTAR_SLAVE_FMSZ_MASK)
  8981. /* The count of SPI_CTAR_SLAVE */
  8982. #define SPI_CTAR_SLAVE_COUNT (1U)
  8983. /*! @name SR - Status Register */
  8984. #define SPI_SR_POPNXTPTR_MASK (0xFU)
  8985. #define SPI_SR_POPNXTPTR_SHIFT (0U)
  8986. #define SPI_SR_POPNXTPTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_POPNXTPTR_SHIFT)) & SPI_SR_POPNXTPTR_MASK)
  8987. #define SPI_SR_RXCTR_MASK (0xF0U)
  8988. #define SPI_SR_RXCTR_SHIFT (4U)
  8989. #define SPI_SR_RXCTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_RXCTR_SHIFT)) & SPI_SR_RXCTR_MASK)
  8990. #define SPI_SR_TXNXTPTR_MASK (0xF00U)
  8991. #define SPI_SR_TXNXTPTR_SHIFT (8U)
  8992. #define SPI_SR_TXNXTPTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TXNXTPTR_SHIFT)) & SPI_SR_TXNXTPTR_MASK)
  8993. #define SPI_SR_TXCTR_MASK (0xF000U)
  8994. #define SPI_SR_TXCTR_SHIFT (12U)
  8995. #define SPI_SR_TXCTR(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TXCTR_SHIFT)) & SPI_SR_TXCTR_MASK)
  8996. #define SPI_SR_RFDF_MASK (0x20000U)
  8997. #define SPI_SR_RFDF_SHIFT (17U)
  8998. #define SPI_SR_RFDF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_RFDF_SHIFT)) & SPI_SR_RFDF_MASK)
  8999. #define SPI_SR_RFOF_MASK (0x80000U)
  9000. #define SPI_SR_RFOF_SHIFT (19U)
  9001. #define SPI_SR_RFOF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_RFOF_SHIFT)) & SPI_SR_RFOF_MASK)
  9002. #define SPI_SR_TFFF_MASK (0x2000000U)
  9003. #define SPI_SR_TFFF_SHIFT (25U)
  9004. #define SPI_SR_TFFF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TFFF_SHIFT)) & SPI_SR_TFFF_MASK)
  9005. #define SPI_SR_TFUF_MASK (0x8000000U)
  9006. #define SPI_SR_TFUF_SHIFT (27U)
  9007. #define SPI_SR_TFUF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TFUF_SHIFT)) & SPI_SR_TFUF_MASK)
  9008. #define SPI_SR_EOQF_MASK (0x10000000U)
  9009. #define SPI_SR_EOQF_SHIFT (28U)
  9010. #define SPI_SR_EOQF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_EOQF_SHIFT)) & SPI_SR_EOQF_MASK)
  9011. #define SPI_SR_TXRXS_MASK (0x40000000U)
  9012. #define SPI_SR_TXRXS_SHIFT (30U)
  9013. #define SPI_SR_TXRXS(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TXRXS_SHIFT)) & SPI_SR_TXRXS_MASK)
  9014. #define SPI_SR_TCF_MASK (0x80000000U)
  9015. #define SPI_SR_TCF_SHIFT (31U)
  9016. #define SPI_SR_TCF(x) (((uint32_t)(((uint32_t)(x)) << SPI_SR_TCF_SHIFT)) & SPI_SR_TCF_MASK)
  9017. /*! @name RSER - DMA/Interrupt Request Select and Enable Register */
  9018. #define SPI_RSER_RFDF_DIRS_MASK (0x10000U)
  9019. #define SPI_RSER_RFDF_DIRS_SHIFT (16U)
  9020. #define SPI_RSER_RFDF_DIRS(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_RFDF_DIRS_SHIFT)) & SPI_RSER_RFDF_DIRS_MASK)
  9021. #define SPI_RSER_RFDF_RE_MASK (0x20000U)
  9022. #define SPI_RSER_RFDF_RE_SHIFT (17U)
  9023. #define SPI_RSER_RFDF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_RFDF_RE_SHIFT)) & SPI_RSER_RFDF_RE_MASK)
  9024. #define SPI_RSER_RFOF_RE_MASK (0x80000U)
  9025. #define SPI_RSER_RFOF_RE_SHIFT (19U)
  9026. #define SPI_RSER_RFOF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_RFOF_RE_SHIFT)) & SPI_RSER_RFOF_RE_MASK)
  9027. #define SPI_RSER_TFFF_DIRS_MASK (0x1000000U)
  9028. #define SPI_RSER_TFFF_DIRS_SHIFT (24U)
  9029. #define SPI_RSER_TFFF_DIRS(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TFFF_DIRS_SHIFT)) & SPI_RSER_TFFF_DIRS_MASK)
  9030. #define SPI_RSER_TFFF_RE_MASK (0x2000000U)
  9031. #define SPI_RSER_TFFF_RE_SHIFT (25U)
  9032. #define SPI_RSER_TFFF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TFFF_RE_SHIFT)) & SPI_RSER_TFFF_RE_MASK)
  9033. #define SPI_RSER_TFUF_RE_MASK (0x8000000U)
  9034. #define SPI_RSER_TFUF_RE_SHIFT (27U)
  9035. #define SPI_RSER_TFUF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TFUF_RE_SHIFT)) & SPI_RSER_TFUF_RE_MASK)
  9036. #define SPI_RSER_EOQF_RE_MASK (0x10000000U)
  9037. #define SPI_RSER_EOQF_RE_SHIFT (28U)
  9038. #define SPI_RSER_EOQF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_EOQF_RE_SHIFT)) & SPI_RSER_EOQF_RE_MASK)
  9039. #define SPI_RSER_TCF_RE_MASK (0x80000000U)
  9040. #define SPI_RSER_TCF_RE_SHIFT (31U)
  9041. #define SPI_RSER_TCF_RE(x) (((uint32_t)(((uint32_t)(x)) << SPI_RSER_TCF_RE_SHIFT)) & SPI_RSER_TCF_RE_MASK)
  9042. /*! @name PUSHR - PUSH TX FIFO Register In Master Mode */
  9043. #define SPI_PUSHR_TXDATA_MASK (0xFFFFU)
  9044. #define SPI_PUSHR_TXDATA_SHIFT (0U)
  9045. #define SPI_PUSHR_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_TXDATA_SHIFT)) & SPI_PUSHR_TXDATA_MASK)
  9046. #define SPI_PUSHR_PCS_MASK (0x3F0000U)
  9047. #define SPI_PUSHR_PCS_SHIFT (16U)
  9048. #define SPI_PUSHR_PCS(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_PCS_SHIFT)) & SPI_PUSHR_PCS_MASK)
  9049. #define SPI_PUSHR_CTCNT_MASK (0x4000000U)
  9050. #define SPI_PUSHR_CTCNT_SHIFT (26U)
  9051. #define SPI_PUSHR_CTCNT(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_CTCNT_SHIFT)) & SPI_PUSHR_CTCNT_MASK)
  9052. #define SPI_PUSHR_EOQ_MASK (0x8000000U)
  9053. #define SPI_PUSHR_EOQ_SHIFT (27U)
  9054. #define SPI_PUSHR_EOQ(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_EOQ_SHIFT)) & SPI_PUSHR_EOQ_MASK)
  9055. #define SPI_PUSHR_CTAS_MASK (0x70000000U)
  9056. #define SPI_PUSHR_CTAS_SHIFT (28U)
  9057. #define SPI_PUSHR_CTAS(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_CTAS_SHIFT)) & SPI_PUSHR_CTAS_MASK)
  9058. #define SPI_PUSHR_CONT_MASK (0x80000000U)
  9059. #define SPI_PUSHR_CONT_SHIFT (31U)
  9060. #define SPI_PUSHR_CONT(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_CONT_SHIFT)) & SPI_PUSHR_CONT_MASK)
  9061. /*! @name PUSHR_SLAVE - PUSH TX FIFO Register In Slave Mode */
  9062. #define SPI_PUSHR_SLAVE_TXDATA_MASK (0xFFFFFFFFU)
  9063. #define SPI_PUSHR_SLAVE_TXDATA_SHIFT (0U)
  9064. #define SPI_PUSHR_SLAVE_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_PUSHR_SLAVE_TXDATA_SHIFT)) & SPI_PUSHR_SLAVE_TXDATA_MASK)
  9065. /*! @name POPR - POP RX FIFO Register */
  9066. #define SPI_POPR_RXDATA_MASK (0xFFFFFFFFU)
  9067. #define SPI_POPR_RXDATA_SHIFT (0U)
  9068. #define SPI_POPR_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_POPR_RXDATA_SHIFT)) & SPI_POPR_RXDATA_MASK)
  9069. /*! @name TXFR0 - Transmit FIFO Registers */
  9070. #define SPI_TXFR0_TXDATA_MASK (0xFFFFU)
  9071. #define SPI_TXFR0_TXDATA_SHIFT (0U)
  9072. #define SPI_TXFR0_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR0_TXDATA_SHIFT)) & SPI_TXFR0_TXDATA_MASK)
  9073. #define SPI_TXFR0_TXCMD_TXDATA_MASK (0xFFFF0000U)
  9074. #define SPI_TXFR0_TXCMD_TXDATA_SHIFT (16U)
  9075. #define SPI_TXFR0_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR0_TXCMD_TXDATA_SHIFT)) & SPI_TXFR0_TXCMD_TXDATA_MASK)
  9076. /*! @name TXFR1 - Transmit FIFO Registers */
  9077. #define SPI_TXFR1_TXDATA_MASK (0xFFFFU)
  9078. #define SPI_TXFR1_TXDATA_SHIFT (0U)
  9079. #define SPI_TXFR1_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR1_TXDATA_SHIFT)) & SPI_TXFR1_TXDATA_MASK)
  9080. #define SPI_TXFR1_TXCMD_TXDATA_MASK (0xFFFF0000U)
  9081. #define SPI_TXFR1_TXCMD_TXDATA_SHIFT (16U)
  9082. #define SPI_TXFR1_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR1_TXCMD_TXDATA_SHIFT)) & SPI_TXFR1_TXCMD_TXDATA_MASK)
  9083. /*! @name TXFR2 - Transmit FIFO Registers */
  9084. #define SPI_TXFR2_TXDATA_MASK (0xFFFFU)
  9085. #define SPI_TXFR2_TXDATA_SHIFT (0U)
  9086. #define SPI_TXFR2_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR2_TXDATA_SHIFT)) & SPI_TXFR2_TXDATA_MASK)
  9087. #define SPI_TXFR2_TXCMD_TXDATA_MASK (0xFFFF0000U)
  9088. #define SPI_TXFR2_TXCMD_TXDATA_SHIFT (16U)
  9089. #define SPI_TXFR2_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR2_TXCMD_TXDATA_SHIFT)) & SPI_TXFR2_TXCMD_TXDATA_MASK)
  9090. /*! @name TXFR3 - Transmit FIFO Registers */
  9091. #define SPI_TXFR3_TXDATA_MASK (0xFFFFU)
  9092. #define SPI_TXFR3_TXDATA_SHIFT (0U)
  9093. #define SPI_TXFR3_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR3_TXDATA_SHIFT)) & SPI_TXFR3_TXDATA_MASK)
  9094. #define SPI_TXFR3_TXCMD_TXDATA_MASK (0xFFFF0000U)
  9095. #define SPI_TXFR3_TXCMD_TXDATA_SHIFT (16U)
  9096. #define SPI_TXFR3_TXCMD_TXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_TXFR3_TXCMD_TXDATA_SHIFT)) & SPI_TXFR3_TXCMD_TXDATA_MASK)
  9097. /*! @name RXFR0 - Receive FIFO Registers */
  9098. #define SPI_RXFR0_RXDATA_MASK (0xFFFFFFFFU)
  9099. #define SPI_RXFR0_RXDATA_SHIFT (0U)
  9100. #define SPI_RXFR0_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR0_RXDATA_SHIFT)) & SPI_RXFR0_RXDATA_MASK)
  9101. /*! @name RXFR1 - Receive FIFO Registers */
  9102. #define SPI_RXFR1_RXDATA_MASK (0xFFFFFFFFU)
  9103. #define SPI_RXFR1_RXDATA_SHIFT (0U)
  9104. #define SPI_RXFR1_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR1_RXDATA_SHIFT)) & SPI_RXFR1_RXDATA_MASK)
  9105. /*! @name RXFR2 - Receive FIFO Registers */
  9106. #define SPI_RXFR2_RXDATA_MASK (0xFFFFFFFFU)
  9107. #define SPI_RXFR2_RXDATA_SHIFT (0U)
  9108. #define SPI_RXFR2_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR2_RXDATA_SHIFT)) & SPI_RXFR2_RXDATA_MASK)
  9109. /*! @name RXFR3 - Receive FIFO Registers */
  9110. #define SPI_RXFR3_RXDATA_MASK (0xFFFFFFFFU)
  9111. #define SPI_RXFR3_RXDATA_SHIFT (0U)
  9112. #define SPI_RXFR3_RXDATA(x) (((uint32_t)(((uint32_t)(x)) << SPI_RXFR3_RXDATA_SHIFT)) & SPI_RXFR3_RXDATA_MASK)
  9113. /*!
  9114. * @}
  9115. */ /* end of group SPI_Register_Masks */
  9116. /* SPI - Peripheral instance base addresses */
  9117. /** Peripheral SPI0 base address */
  9118. #define SPI0_BASE (0x4002C000u)
  9119. /** Peripheral SPI0 base pointer */
  9120. #define SPI0 ((SPI_Type *)SPI0_BASE)
  9121. /** Peripheral SPI1 base address */
  9122. #define SPI1_BASE (0x4002D000u)
  9123. /** Peripheral SPI1 base pointer */
  9124. #define SPI1 ((SPI_Type *)SPI1_BASE)
  9125. /** Peripheral SPI2 base address */
  9126. #define SPI2_BASE (0x400AC000u)
  9127. /** Peripheral SPI2 base pointer */
  9128. #define SPI2 ((SPI_Type *)SPI2_BASE)
  9129. /** Array initializer of SPI peripheral base addresses */
  9130. #define SPI_BASE_ADDRS { SPI0_BASE, SPI1_BASE, SPI2_BASE }
  9131. /** Array initializer of SPI peripheral base pointers */
  9132. #define SPI_BASE_PTRS { SPI0, SPI1, SPI2 }
  9133. /** Interrupt vectors for the SPI peripheral type */
  9134. #define SPI_IRQS { SPI0_IRQn, SPI1_IRQn, SPI2_IRQn }
  9135. /*!
  9136. * @}
  9137. */ /* end of group SPI_Peripheral_Access_Layer */
  9138. /* ----------------------------------------------------------------------------
  9139. -- SYSMPU Peripheral Access Layer
  9140. ---------------------------------------------------------------------------- */
  9141. /*!
  9142. * @addtogroup SYSMPU_Peripheral_Access_Layer SYSMPU Peripheral Access Layer
  9143. * @{
  9144. */
  9145. /** SYSMPU - Register Layout Typedef */
  9146. typedef struct {
  9147. __IO uint32_t CESR; /**< Control/Error Status Register, offset: 0x0 */
  9148. uint8_t RESERVED_0[12];
  9149. struct { /* offset: 0x10, array step: 0x8 */
  9150. __I uint32_t EAR; /**< Error Address Register, slave port n, array offset: 0x10, array step: 0x8 */
  9151. __I uint32_t EDR; /**< Error Detail Register, slave port n, array offset: 0x14, array step: 0x8 */
  9152. } SP[5];
  9153. uint8_t RESERVED_1[968];
  9154. __IO uint32_t WORD[12][4]; /**< Region Descriptor n, Word 0..Region Descriptor n, Word 3, array offset: 0x400, array step: index*0x10, index2*0x4 */
  9155. uint8_t RESERVED_2[832];
  9156. __IO uint32_t RGDAAC[12]; /**< Region Descriptor Alternate Access Control n, array offset: 0x800, array step: 0x4 */
  9157. } SYSMPU_Type;
  9158. /* ----------------------------------------------------------------------------
  9159. -- SYSMPU Register Masks
  9160. ---------------------------------------------------------------------------- */
  9161. /*!
  9162. * @addtogroup SYSMPU_Register_Masks SYSMPU Register Masks
  9163. * @{
  9164. */
  9165. /*! @name CESR - Control/Error Status Register */
  9166. #define SYSMPU_CESR_VLD_MASK (0x1U)
  9167. #define SYSMPU_CESR_VLD_SHIFT (0U)
  9168. #define SYSMPU_CESR_VLD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_VLD_SHIFT)) & SYSMPU_CESR_VLD_MASK)
  9169. #define SYSMPU_CESR_NRGD_MASK (0xF00U)
  9170. #define SYSMPU_CESR_NRGD_SHIFT (8U)
  9171. #define SYSMPU_CESR_NRGD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_NRGD_SHIFT)) & SYSMPU_CESR_NRGD_MASK)
  9172. #define SYSMPU_CESR_NSP_MASK (0xF000U)
  9173. #define SYSMPU_CESR_NSP_SHIFT (12U)
  9174. #define SYSMPU_CESR_NSP(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_NSP_SHIFT)) & SYSMPU_CESR_NSP_MASK)
  9175. #define SYSMPU_CESR_HRL_MASK (0xF0000U)
  9176. #define SYSMPU_CESR_HRL_SHIFT (16U)
  9177. #define SYSMPU_CESR_HRL(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_HRL_SHIFT)) & SYSMPU_CESR_HRL_MASK)
  9178. #define SYSMPU_CESR_SPERR_MASK (0xF8000000U)
  9179. #define SYSMPU_CESR_SPERR_SHIFT (27U)
  9180. #define SYSMPU_CESR_SPERR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_CESR_SPERR_SHIFT)) & SYSMPU_CESR_SPERR_MASK)
  9181. /*! @name EAR - Error Address Register, slave port n */
  9182. #define SYSMPU_EAR_EADDR_MASK (0xFFFFFFFFU)
  9183. #define SYSMPU_EAR_EADDR_SHIFT (0U)
  9184. #define SYSMPU_EAR_EADDR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EAR_EADDR_SHIFT)) & SYSMPU_EAR_EADDR_MASK)
  9185. /* The count of SYSMPU_EAR */
  9186. #define SYSMPU_EAR_COUNT (5U)
  9187. /*! @name EDR - Error Detail Register, slave port n */
  9188. #define SYSMPU_EDR_ERW_MASK (0x1U)
  9189. #define SYSMPU_EDR_ERW_SHIFT (0U)
  9190. #define SYSMPU_EDR_ERW(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_ERW_SHIFT)) & SYSMPU_EDR_ERW_MASK)
  9191. #define SYSMPU_EDR_EATTR_MASK (0xEU)
  9192. #define SYSMPU_EDR_EATTR_SHIFT (1U)
  9193. #define SYSMPU_EDR_EATTR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EATTR_SHIFT)) & SYSMPU_EDR_EATTR_MASK)
  9194. #define SYSMPU_EDR_EMN_MASK (0xF0U)
  9195. #define SYSMPU_EDR_EMN_SHIFT (4U)
  9196. #define SYSMPU_EDR_EMN(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EMN_SHIFT)) & SYSMPU_EDR_EMN_MASK)
  9197. #define SYSMPU_EDR_EPID_MASK (0xFF00U)
  9198. #define SYSMPU_EDR_EPID_SHIFT (8U)
  9199. #define SYSMPU_EDR_EPID(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EPID_SHIFT)) & SYSMPU_EDR_EPID_MASK)
  9200. #define SYSMPU_EDR_EACD_MASK (0xFFFF0000U)
  9201. #define SYSMPU_EDR_EACD_SHIFT (16U)
  9202. #define SYSMPU_EDR_EACD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_EDR_EACD_SHIFT)) & SYSMPU_EDR_EACD_MASK)
  9203. /* The count of SYSMPU_EDR */
  9204. #define SYSMPU_EDR_COUNT (5U)
  9205. /*! @name WORD - Region Descriptor n, Word 0..Region Descriptor n, Word 3 */
  9206. #define SYSMPU_WORD_VLD_MASK (0x1U)
  9207. #define SYSMPU_WORD_VLD_SHIFT (0U)
  9208. #define SYSMPU_WORD_VLD(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_VLD_SHIFT)) & SYSMPU_WORD_VLD_MASK)
  9209. #define SYSMPU_WORD_M0UM_MASK (0x7U)
  9210. #define SYSMPU_WORD_M0UM_SHIFT (0U)
  9211. #define SYSMPU_WORD_M0UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M0UM_SHIFT)) & SYSMPU_WORD_M0UM_MASK)
  9212. #define SYSMPU_WORD_M0SM_MASK (0x18U)
  9213. #define SYSMPU_WORD_M0SM_SHIFT (3U)
  9214. #define SYSMPU_WORD_M0SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M0SM_SHIFT)) & SYSMPU_WORD_M0SM_MASK)
  9215. #define SYSMPU_WORD_M0PE_MASK (0x20U)
  9216. #define SYSMPU_WORD_M0PE_SHIFT (5U)
  9217. #define SYSMPU_WORD_M0PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M0PE_SHIFT)) & SYSMPU_WORD_M0PE_MASK)
  9218. #define SYSMPU_WORD_ENDADDR_MASK (0xFFFFFFE0U)
  9219. #define SYSMPU_WORD_ENDADDR_SHIFT (5U)
  9220. #define SYSMPU_WORD_ENDADDR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_ENDADDR_SHIFT)) & SYSMPU_WORD_ENDADDR_MASK)
  9221. #define SYSMPU_WORD_SRTADDR_MASK (0xFFFFFFE0U)
  9222. #define SYSMPU_WORD_SRTADDR_SHIFT (5U)
  9223. #define SYSMPU_WORD_SRTADDR(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_SRTADDR_SHIFT)) & SYSMPU_WORD_SRTADDR_MASK)
  9224. #define SYSMPU_WORD_M1UM_MASK (0x1C0U)
  9225. #define SYSMPU_WORD_M1UM_SHIFT (6U)
  9226. #define SYSMPU_WORD_M1UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M1UM_SHIFT)) & SYSMPU_WORD_M1UM_MASK)
  9227. #define SYSMPU_WORD_M1SM_MASK (0x600U)
  9228. #define SYSMPU_WORD_M1SM_SHIFT (9U)
  9229. #define SYSMPU_WORD_M1SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M1SM_SHIFT)) & SYSMPU_WORD_M1SM_MASK)
  9230. #define SYSMPU_WORD_M1PE_MASK (0x800U)
  9231. #define SYSMPU_WORD_M1PE_SHIFT (11U)
  9232. #define SYSMPU_WORD_M1PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M1PE_SHIFT)) & SYSMPU_WORD_M1PE_MASK)
  9233. #define SYSMPU_WORD_M2UM_MASK (0x7000U)
  9234. #define SYSMPU_WORD_M2UM_SHIFT (12U)
  9235. #define SYSMPU_WORD_M2UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M2UM_SHIFT)) & SYSMPU_WORD_M2UM_MASK)
  9236. #define SYSMPU_WORD_M2SM_MASK (0x18000U)
  9237. #define SYSMPU_WORD_M2SM_SHIFT (15U)
  9238. #define SYSMPU_WORD_M2SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M2SM_SHIFT)) & SYSMPU_WORD_M2SM_MASK)
  9239. #define SYSMPU_WORD_PIDMASK_MASK (0xFF0000U)
  9240. #define SYSMPU_WORD_PIDMASK_SHIFT (16U)
  9241. #define SYSMPU_WORD_PIDMASK(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_PIDMASK_SHIFT)) & SYSMPU_WORD_PIDMASK_MASK)
  9242. #define SYSMPU_WORD_M2PE_MASK (0x20000U)
  9243. #define SYSMPU_WORD_M2PE_SHIFT (17U)
  9244. #define SYSMPU_WORD_M2PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M2PE_SHIFT)) & SYSMPU_WORD_M2PE_MASK)
  9245. #define SYSMPU_WORD_M3UM_MASK (0x1C0000U)
  9246. #define SYSMPU_WORD_M3UM_SHIFT (18U)
  9247. #define SYSMPU_WORD_M3UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M3UM_SHIFT)) & SYSMPU_WORD_M3UM_MASK)
  9248. #define SYSMPU_WORD_M3SM_MASK (0x600000U)
  9249. #define SYSMPU_WORD_M3SM_SHIFT (21U)
  9250. #define SYSMPU_WORD_M3SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M3SM_SHIFT)) & SYSMPU_WORD_M3SM_MASK)
  9251. #define SYSMPU_WORD_M3PE_MASK (0x800000U)
  9252. #define SYSMPU_WORD_M3PE_SHIFT (23U)
  9253. #define SYSMPU_WORD_M3PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M3PE_SHIFT)) & SYSMPU_WORD_M3PE_MASK)
  9254. #define SYSMPU_WORD_PID_MASK (0xFF000000U)
  9255. #define SYSMPU_WORD_PID_SHIFT (24U)
  9256. #define SYSMPU_WORD_PID(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_PID_SHIFT)) & SYSMPU_WORD_PID_MASK)
  9257. #define SYSMPU_WORD_M4WE_MASK (0x1000000U)
  9258. #define SYSMPU_WORD_M4WE_SHIFT (24U)
  9259. #define SYSMPU_WORD_M4WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M4WE_SHIFT)) & SYSMPU_WORD_M4WE_MASK)
  9260. #define SYSMPU_WORD_M4RE_MASK (0x2000000U)
  9261. #define SYSMPU_WORD_M4RE_SHIFT (25U)
  9262. #define SYSMPU_WORD_M4RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M4RE_SHIFT)) & SYSMPU_WORD_M4RE_MASK)
  9263. #define SYSMPU_WORD_M5WE_MASK (0x4000000U)
  9264. #define SYSMPU_WORD_M5WE_SHIFT (26U)
  9265. #define SYSMPU_WORD_M5WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M5WE_SHIFT)) & SYSMPU_WORD_M5WE_MASK)
  9266. #define SYSMPU_WORD_M5RE_MASK (0x8000000U)
  9267. #define SYSMPU_WORD_M5RE_SHIFT (27U)
  9268. #define SYSMPU_WORD_M5RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M5RE_SHIFT)) & SYSMPU_WORD_M5RE_MASK)
  9269. #define SYSMPU_WORD_M6WE_MASK (0x10000000U)
  9270. #define SYSMPU_WORD_M6WE_SHIFT (28U)
  9271. #define SYSMPU_WORD_M6WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M6WE_SHIFT)) & SYSMPU_WORD_M6WE_MASK)
  9272. #define SYSMPU_WORD_M6RE_MASK (0x20000000U)
  9273. #define SYSMPU_WORD_M6RE_SHIFT (29U)
  9274. #define SYSMPU_WORD_M6RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M6RE_SHIFT)) & SYSMPU_WORD_M6RE_MASK)
  9275. #define SYSMPU_WORD_M7WE_MASK (0x40000000U)
  9276. #define SYSMPU_WORD_M7WE_SHIFT (30U)
  9277. #define SYSMPU_WORD_M7WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M7WE_SHIFT)) & SYSMPU_WORD_M7WE_MASK)
  9278. #define SYSMPU_WORD_M7RE_MASK (0x80000000U)
  9279. #define SYSMPU_WORD_M7RE_SHIFT (31U)
  9280. #define SYSMPU_WORD_M7RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_WORD_M7RE_SHIFT)) & SYSMPU_WORD_M7RE_MASK)
  9281. /* The count of SYSMPU_WORD */
  9282. #define SYSMPU_WORD_COUNT (12U)
  9283. /* The count of SYSMPU_WORD */
  9284. #define SYSMPU_WORD_COUNT2 (4U)
  9285. /*! @name RGDAAC - Region Descriptor Alternate Access Control n */
  9286. #define SYSMPU_RGDAAC_M0UM_MASK (0x7U)
  9287. #define SYSMPU_RGDAAC_M0UM_SHIFT (0U)
  9288. #define SYSMPU_RGDAAC_M0UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M0UM_SHIFT)) & SYSMPU_RGDAAC_M0UM_MASK)
  9289. #define SYSMPU_RGDAAC_M0SM_MASK (0x18U)
  9290. #define SYSMPU_RGDAAC_M0SM_SHIFT (3U)
  9291. #define SYSMPU_RGDAAC_M0SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M0SM_SHIFT)) & SYSMPU_RGDAAC_M0SM_MASK)
  9292. #define SYSMPU_RGDAAC_M0PE_MASK (0x20U)
  9293. #define SYSMPU_RGDAAC_M0PE_SHIFT (5U)
  9294. #define SYSMPU_RGDAAC_M0PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M0PE_SHIFT)) & SYSMPU_RGDAAC_M0PE_MASK)
  9295. #define SYSMPU_RGDAAC_M1UM_MASK (0x1C0U)
  9296. #define SYSMPU_RGDAAC_M1UM_SHIFT (6U)
  9297. #define SYSMPU_RGDAAC_M1UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M1UM_SHIFT)) & SYSMPU_RGDAAC_M1UM_MASK)
  9298. #define SYSMPU_RGDAAC_M1SM_MASK (0x600U)
  9299. #define SYSMPU_RGDAAC_M1SM_SHIFT (9U)
  9300. #define SYSMPU_RGDAAC_M1SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M1SM_SHIFT)) & SYSMPU_RGDAAC_M1SM_MASK)
  9301. #define SYSMPU_RGDAAC_M1PE_MASK (0x800U)
  9302. #define SYSMPU_RGDAAC_M1PE_SHIFT (11U)
  9303. #define SYSMPU_RGDAAC_M1PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M1PE_SHIFT)) & SYSMPU_RGDAAC_M1PE_MASK)
  9304. #define SYSMPU_RGDAAC_M2UM_MASK (0x7000U)
  9305. #define SYSMPU_RGDAAC_M2UM_SHIFT (12U)
  9306. #define SYSMPU_RGDAAC_M2UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M2UM_SHIFT)) & SYSMPU_RGDAAC_M2UM_MASK)
  9307. #define SYSMPU_RGDAAC_M2SM_MASK (0x18000U)
  9308. #define SYSMPU_RGDAAC_M2SM_SHIFT (15U)
  9309. #define SYSMPU_RGDAAC_M2SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M2SM_SHIFT)) & SYSMPU_RGDAAC_M2SM_MASK)
  9310. #define SYSMPU_RGDAAC_M2PE_MASK (0x20000U)
  9311. #define SYSMPU_RGDAAC_M2PE_SHIFT (17U)
  9312. #define SYSMPU_RGDAAC_M2PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M2PE_SHIFT)) & SYSMPU_RGDAAC_M2PE_MASK)
  9313. #define SYSMPU_RGDAAC_M3UM_MASK (0x1C0000U)
  9314. #define SYSMPU_RGDAAC_M3UM_SHIFT (18U)
  9315. #define SYSMPU_RGDAAC_M3UM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M3UM_SHIFT)) & SYSMPU_RGDAAC_M3UM_MASK)
  9316. #define SYSMPU_RGDAAC_M3SM_MASK (0x600000U)
  9317. #define SYSMPU_RGDAAC_M3SM_SHIFT (21U)
  9318. #define SYSMPU_RGDAAC_M3SM(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M3SM_SHIFT)) & SYSMPU_RGDAAC_M3SM_MASK)
  9319. #define SYSMPU_RGDAAC_M3PE_MASK (0x800000U)
  9320. #define SYSMPU_RGDAAC_M3PE_SHIFT (23U)
  9321. #define SYSMPU_RGDAAC_M3PE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M3PE_SHIFT)) & SYSMPU_RGDAAC_M3PE_MASK)
  9322. #define SYSMPU_RGDAAC_M4WE_MASK (0x1000000U)
  9323. #define SYSMPU_RGDAAC_M4WE_SHIFT (24U)
  9324. #define SYSMPU_RGDAAC_M4WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M4WE_SHIFT)) & SYSMPU_RGDAAC_M4WE_MASK)
  9325. #define SYSMPU_RGDAAC_M4RE_MASK (0x2000000U)
  9326. #define SYSMPU_RGDAAC_M4RE_SHIFT (25U)
  9327. #define SYSMPU_RGDAAC_M4RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M4RE_SHIFT)) & SYSMPU_RGDAAC_M4RE_MASK)
  9328. #define SYSMPU_RGDAAC_M5WE_MASK (0x4000000U)
  9329. #define SYSMPU_RGDAAC_M5WE_SHIFT (26U)
  9330. #define SYSMPU_RGDAAC_M5WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M5WE_SHIFT)) & SYSMPU_RGDAAC_M5WE_MASK)
  9331. #define SYSMPU_RGDAAC_M5RE_MASK (0x8000000U)
  9332. #define SYSMPU_RGDAAC_M5RE_SHIFT (27U)
  9333. #define SYSMPU_RGDAAC_M5RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M5RE_SHIFT)) & SYSMPU_RGDAAC_M5RE_MASK)
  9334. #define SYSMPU_RGDAAC_M6WE_MASK (0x10000000U)
  9335. #define SYSMPU_RGDAAC_M6WE_SHIFT (28U)
  9336. #define SYSMPU_RGDAAC_M6WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M6WE_SHIFT)) & SYSMPU_RGDAAC_M6WE_MASK)
  9337. #define SYSMPU_RGDAAC_M6RE_MASK (0x20000000U)
  9338. #define SYSMPU_RGDAAC_M6RE_SHIFT (29U)
  9339. #define SYSMPU_RGDAAC_M6RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M6RE_SHIFT)) & SYSMPU_RGDAAC_M6RE_MASK)
  9340. #define SYSMPU_RGDAAC_M7WE_MASK (0x40000000U)
  9341. #define SYSMPU_RGDAAC_M7WE_SHIFT (30U)
  9342. #define SYSMPU_RGDAAC_M7WE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M7WE_SHIFT)) & SYSMPU_RGDAAC_M7WE_MASK)
  9343. #define SYSMPU_RGDAAC_M7RE_MASK (0x80000000U)
  9344. #define SYSMPU_RGDAAC_M7RE_SHIFT (31U)
  9345. #define SYSMPU_RGDAAC_M7RE(x) (((uint32_t)(((uint32_t)(x)) << SYSMPU_RGDAAC_M7RE_SHIFT)) & SYSMPU_RGDAAC_M7RE_MASK)
  9346. /* The count of SYSMPU_RGDAAC */
  9347. #define SYSMPU_RGDAAC_COUNT (12U)
  9348. /*!
  9349. * @}
  9350. */ /* end of group SYSMPU_Register_Masks */
  9351. /* SYSMPU - Peripheral instance base addresses */
  9352. /** Peripheral SYSMPU base address */
  9353. #define SYSMPU_BASE (0x4000D000u)
  9354. /** Peripheral SYSMPU base pointer */
  9355. #define SYSMPU ((SYSMPU_Type *)SYSMPU_BASE)
  9356. /** Array initializer of SYSMPU peripheral base addresses */
  9357. #define SYSMPU_BASE_ADDRS { SYSMPU_BASE }
  9358. /** Array initializer of SYSMPU peripheral base pointers */
  9359. #define SYSMPU_BASE_PTRS { SYSMPU }
  9360. /*!
  9361. * @}
  9362. */ /* end of group SYSMPU_Peripheral_Access_Layer */
  9363. /* ----------------------------------------------------------------------------
  9364. -- UART Peripheral Access Layer
  9365. ---------------------------------------------------------------------------- */
  9366. /*!
  9367. * @addtogroup UART_Peripheral_Access_Layer UART Peripheral Access Layer
  9368. * @{
  9369. */
  9370. /** UART - Register Layout Typedef */
  9371. typedef struct {
  9372. __IO uint8_t BDH; /**< UART Baud Rate Registers: High, offset: 0x0 */
  9373. __IO uint8_t BDL; /**< UART Baud Rate Registers: Low, offset: 0x1 */
  9374. __IO uint8_t C1; /**< UART Control Register 1, offset: 0x2 */
  9375. __IO uint8_t C2; /**< UART Control Register 2, offset: 0x3 */
  9376. __I uint8_t S1; /**< UART Status Register 1, offset: 0x4 */
  9377. __IO uint8_t S2; /**< UART Status Register 2, offset: 0x5 */
  9378. __IO uint8_t C3; /**< UART Control Register 3, offset: 0x6 */
  9379. __IO uint8_t D; /**< UART Data Register, offset: 0x7 */
  9380. __IO uint8_t MA1; /**< UART Match Address Registers 1, offset: 0x8 */
  9381. __IO uint8_t MA2; /**< UART Match Address Registers 2, offset: 0x9 */
  9382. __IO uint8_t C4; /**< UART Control Register 4, offset: 0xA */
  9383. __IO uint8_t C5; /**< UART Control Register 5, offset: 0xB */
  9384. __I uint8_t ED; /**< UART Extended Data Register, offset: 0xC */
  9385. __IO uint8_t MODEM; /**< UART Modem Register, offset: 0xD */
  9386. __IO uint8_t IR; /**< UART Infrared Register, offset: 0xE */
  9387. uint8_t RESERVED_0[1];
  9388. __IO uint8_t PFIFO; /**< UART FIFO Parameters, offset: 0x10 */
  9389. __IO uint8_t CFIFO; /**< UART FIFO Control Register, offset: 0x11 */
  9390. __IO uint8_t SFIFO; /**< UART FIFO Status Register, offset: 0x12 */
  9391. __IO uint8_t TWFIFO; /**< UART FIFO Transmit Watermark, offset: 0x13 */
  9392. __I uint8_t TCFIFO; /**< UART FIFO Transmit Count, offset: 0x14 */
  9393. __IO uint8_t RWFIFO; /**< UART FIFO Receive Watermark, offset: 0x15 */
  9394. __I uint8_t RCFIFO; /**< UART FIFO Receive Count, offset: 0x16 */
  9395. uint8_t RESERVED_1[1];
  9396. __IO uint8_t C7816; /**< UART 7816 Control Register, offset: 0x18 */
  9397. __IO uint8_t IE7816; /**< UART 7816 Interrupt Enable Register, offset: 0x19 */
  9398. __IO uint8_t IS7816; /**< UART 7816 Interrupt Status Register, offset: 0x1A */
  9399. union { /* offset: 0x1B */
  9400. __IO uint8_t WP7816T0; /**< UART 7816 Wait Parameter Register, offset: 0x1B */
  9401. __IO uint8_t WP7816T1; /**< UART 7816 Wait Parameter Register, offset: 0x1B */
  9402. };
  9403. __IO uint8_t WN7816; /**< UART 7816 Wait N Register, offset: 0x1C */
  9404. __IO uint8_t WF7816; /**< UART 7816 Wait FD Register, offset: 0x1D */
  9405. __IO uint8_t ET7816; /**< UART 7816 Error Threshold Register, offset: 0x1E */
  9406. __IO uint8_t TL7816; /**< UART 7816 Transmit Length Register, offset: 0x1F */
  9407. } UART_Type;
  9408. /* ----------------------------------------------------------------------------
  9409. -- UART Register Masks
  9410. ---------------------------------------------------------------------------- */
  9411. /*!
  9412. * @addtogroup UART_Register_Masks UART Register Masks
  9413. * @{
  9414. */
  9415. /*! @name BDH - UART Baud Rate Registers: High */
  9416. #define UART_BDH_SBR_MASK (0x1FU)
  9417. #define UART_BDH_SBR_SHIFT (0U)
  9418. #define UART_BDH_SBR(x) (((uint8_t)(((uint8_t)(x)) << UART_BDH_SBR_SHIFT)) & UART_BDH_SBR_MASK)
  9419. #define UART_BDH_SBNS_MASK (0x20U)
  9420. #define UART_BDH_SBNS_SHIFT (5U)
  9421. #define UART_BDH_SBNS(x) (((uint8_t)(((uint8_t)(x)) << UART_BDH_SBNS_SHIFT)) & UART_BDH_SBNS_MASK)
  9422. #define UART_BDH_RXEDGIE_MASK (0x40U)
  9423. #define UART_BDH_RXEDGIE_SHIFT (6U)
  9424. #define UART_BDH_RXEDGIE(x) (((uint8_t)(((uint8_t)(x)) << UART_BDH_RXEDGIE_SHIFT)) & UART_BDH_RXEDGIE_MASK)
  9425. #define UART_BDH_LBKDIE_MASK (0x80U)
  9426. #define UART_BDH_LBKDIE_SHIFT (7U)
  9427. #define UART_BDH_LBKDIE(x) (((uint8_t)(((uint8_t)(x)) << UART_BDH_LBKDIE_SHIFT)) & UART_BDH_LBKDIE_MASK)
  9428. /*! @name BDL - UART Baud Rate Registers: Low */
  9429. #define UART_BDL_SBR_MASK (0xFFU)
  9430. #define UART_BDL_SBR_SHIFT (0U)
  9431. #define UART_BDL_SBR(x) (((uint8_t)(((uint8_t)(x)) << UART_BDL_SBR_SHIFT)) & UART_BDL_SBR_MASK)
  9432. /*! @name C1 - UART Control Register 1 */
  9433. #define UART_C1_PT_MASK (0x1U)
  9434. #define UART_C1_PT_SHIFT (0U)
  9435. #define UART_C1_PT(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_PT_SHIFT)) & UART_C1_PT_MASK)
  9436. #define UART_C1_PE_MASK (0x2U)
  9437. #define UART_C1_PE_SHIFT (1U)
  9438. #define UART_C1_PE(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_PE_SHIFT)) & UART_C1_PE_MASK)
  9439. #define UART_C1_ILT_MASK (0x4U)
  9440. #define UART_C1_ILT_SHIFT (2U)
  9441. #define UART_C1_ILT(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_ILT_SHIFT)) & UART_C1_ILT_MASK)
  9442. #define UART_C1_WAKE_MASK (0x8U)
  9443. #define UART_C1_WAKE_SHIFT (3U)
  9444. #define UART_C1_WAKE(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_WAKE_SHIFT)) & UART_C1_WAKE_MASK)
  9445. #define UART_C1_M_MASK (0x10U)
  9446. #define UART_C1_M_SHIFT (4U)
  9447. #define UART_C1_M(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_M_SHIFT)) & UART_C1_M_MASK)
  9448. #define UART_C1_RSRC_MASK (0x20U)
  9449. #define UART_C1_RSRC_SHIFT (5U)
  9450. #define UART_C1_RSRC(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_RSRC_SHIFT)) & UART_C1_RSRC_MASK)
  9451. #define UART_C1_UARTSWAI_MASK (0x40U)
  9452. #define UART_C1_UARTSWAI_SHIFT (6U)
  9453. #define UART_C1_UARTSWAI(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_UARTSWAI_SHIFT)) & UART_C1_UARTSWAI_MASK)
  9454. #define UART_C1_LOOPS_MASK (0x80U)
  9455. #define UART_C1_LOOPS_SHIFT (7U)
  9456. #define UART_C1_LOOPS(x) (((uint8_t)(((uint8_t)(x)) << UART_C1_LOOPS_SHIFT)) & UART_C1_LOOPS_MASK)
  9457. /*! @name C2 - UART Control Register 2 */
  9458. #define UART_C2_SBK_MASK (0x1U)
  9459. #define UART_C2_SBK_SHIFT (0U)
  9460. #define UART_C2_SBK(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_SBK_SHIFT)) & UART_C2_SBK_MASK)
  9461. #define UART_C2_RWU_MASK (0x2U)
  9462. #define UART_C2_RWU_SHIFT (1U)
  9463. #define UART_C2_RWU(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_RWU_SHIFT)) & UART_C2_RWU_MASK)
  9464. #define UART_C2_RE_MASK (0x4U)
  9465. #define UART_C2_RE_SHIFT (2U)
  9466. #define UART_C2_RE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_RE_SHIFT)) & UART_C2_RE_MASK)
  9467. #define UART_C2_TE_MASK (0x8U)
  9468. #define UART_C2_TE_SHIFT (3U)
  9469. #define UART_C2_TE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_TE_SHIFT)) & UART_C2_TE_MASK)
  9470. #define UART_C2_ILIE_MASK (0x10U)
  9471. #define UART_C2_ILIE_SHIFT (4U)
  9472. #define UART_C2_ILIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_ILIE_SHIFT)) & UART_C2_ILIE_MASK)
  9473. #define UART_C2_RIE_MASK (0x20U)
  9474. #define UART_C2_RIE_SHIFT (5U)
  9475. #define UART_C2_RIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_RIE_SHIFT)) & UART_C2_RIE_MASK)
  9476. #define UART_C2_TCIE_MASK (0x40U)
  9477. #define UART_C2_TCIE_SHIFT (6U)
  9478. #define UART_C2_TCIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_TCIE_SHIFT)) & UART_C2_TCIE_MASK)
  9479. #define UART_C2_TIE_MASK (0x80U)
  9480. #define UART_C2_TIE_SHIFT (7U)
  9481. #define UART_C2_TIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C2_TIE_SHIFT)) & UART_C2_TIE_MASK)
  9482. /*! @name S1 - UART Status Register 1 */
  9483. #define UART_S1_PF_MASK (0x1U)
  9484. #define UART_S1_PF_SHIFT (0U)
  9485. #define UART_S1_PF(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_PF_SHIFT)) & UART_S1_PF_MASK)
  9486. #define UART_S1_FE_MASK (0x2U)
  9487. #define UART_S1_FE_SHIFT (1U)
  9488. #define UART_S1_FE(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_FE_SHIFT)) & UART_S1_FE_MASK)
  9489. #define UART_S1_NF_MASK (0x4U)
  9490. #define UART_S1_NF_SHIFT (2U)
  9491. #define UART_S1_NF(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_NF_SHIFT)) & UART_S1_NF_MASK)
  9492. #define UART_S1_OR_MASK (0x8U)
  9493. #define UART_S1_OR_SHIFT (3U)
  9494. #define UART_S1_OR(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_OR_SHIFT)) & UART_S1_OR_MASK)
  9495. #define UART_S1_IDLE_MASK (0x10U)
  9496. #define UART_S1_IDLE_SHIFT (4U)
  9497. #define UART_S1_IDLE(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_IDLE_SHIFT)) & UART_S1_IDLE_MASK)
  9498. #define UART_S1_RDRF_MASK (0x20U)
  9499. #define UART_S1_RDRF_SHIFT (5U)
  9500. #define UART_S1_RDRF(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_RDRF_SHIFT)) & UART_S1_RDRF_MASK)
  9501. #define UART_S1_TC_MASK (0x40U)
  9502. #define UART_S1_TC_SHIFT (6U)
  9503. #define UART_S1_TC(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_TC_SHIFT)) & UART_S1_TC_MASK)
  9504. #define UART_S1_TDRE_MASK (0x80U)
  9505. #define UART_S1_TDRE_SHIFT (7U)
  9506. #define UART_S1_TDRE(x) (((uint8_t)(((uint8_t)(x)) << UART_S1_TDRE_SHIFT)) & UART_S1_TDRE_MASK)
  9507. /*! @name S2 - UART Status Register 2 */
  9508. #define UART_S2_RAF_MASK (0x1U)
  9509. #define UART_S2_RAF_SHIFT (0U)
  9510. #define UART_S2_RAF(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_RAF_SHIFT)) & UART_S2_RAF_MASK)
  9511. #define UART_S2_LBKDE_MASK (0x2U)
  9512. #define UART_S2_LBKDE_SHIFT (1U)
  9513. #define UART_S2_LBKDE(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_LBKDE_SHIFT)) & UART_S2_LBKDE_MASK)
  9514. #define UART_S2_BRK13_MASK (0x4U)
  9515. #define UART_S2_BRK13_SHIFT (2U)
  9516. #define UART_S2_BRK13(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_BRK13_SHIFT)) & UART_S2_BRK13_MASK)
  9517. #define UART_S2_RWUID_MASK (0x8U)
  9518. #define UART_S2_RWUID_SHIFT (3U)
  9519. #define UART_S2_RWUID(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_RWUID_SHIFT)) & UART_S2_RWUID_MASK)
  9520. #define UART_S2_RXINV_MASK (0x10U)
  9521. #define UART_S2_RXINV_SHIFT (4U)
  9522. #define UART_S2_RXINV(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_RXINV_SHIFT)) & UART_S2_RXINV_MASK)
  9523. #define UART_S2_MSBF_MASK (0x20U)
  9524. #define UART_S2_MSBF_SHIFT (5U)
  9525. #define UART_S2_MSBF(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_MSBF_SHIFT)) & UART_S2_MSBF_MASK)
  9526. #define UART_S2_RXEDGIF_MASK (0x40U)
  9527. #define UART_S2_RXEDGIF_SHIFT (6U)
  9528. #define UART_S2_RXEDGIF(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_RXEDGIF_SHIFT)) & UART_S2_RXEDGIF_MASK)
  9529. #define UART_S2_LBKDIF_MASK (0x80U)
  9530. #define UART_S2_LBKDIF_SHIFT (7U)
  9531. #define UART_S2_LBKDIF(x) (((uint8_t)(((uint8_t)(x)) << UART_S2_LBKDIF_SHIFT)) & UART_S2_LBKDIF_MASK)
  9532. /*! @name C3 - UART Control Register 3 */
  9533. #define UART_C3_PEIE_MASK (0x1U)
  9534. #define UART_C3_PEIE_SHIFT (0U)
  9535. #define UART_C3_PEIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_PEIE_SHIFT)) & UART_C3_PEIE_MASK)
  9536. #define UART_C3_FEIE_MASK (0x2U)
  9537. #define UART_C3_FEIE_SHIFT (1U)
  9538. #define UART_C3_FEIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_FEIE_SHIFT)) & UART_C3_FEIE_MASK)
  9539. #define UART_C3_NEIE_MASK (0x4U)
  9540. #define UART_C3_NEIE_SHIFT (2U)
  9541. #define UART_C3_NEIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_NEIE_SHIFT)) & UART_C3_NEIE_MASK)
  9542. #define UART_C3_ORIE_MASK (0x8U)
  9543. #define UART_C3_ORIE_SHIFT (3U)
  9544. #define UART_C3_ORIE(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_ORIE_SHIFT)) & UART_C3_ORIE_MASK)
  9545. #define UART_C3_TXINV_MASK (0x10U)
  9546. #define UART_C3_TXINV_SHIFT (4U)
  9547. #define UART_C3_TXINV(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_TXINV_SHIFT)) & UART_C3_TXINV_MASK)
  9548. #define UART_C3_TXDIR_MASK (0x20U)
  9549. #define UART_C3_TXDIR_SHIFT (5U)
  9550. #define UART_C3_TXDIR(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_TXDIR_SHIFT)) & UART_C3_TXDIR_MASK)
  9551. #define UART_C3_T8_MASK (0x40U)
  9552. #define UART_C3_T8_SHIFT (6U)
  9553. #define UART_C3_T8(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_T8_SHIFT)) & UART_C3_T8_MASK)
  9554. #define UART_C3_R8_MASK (0x80U)
  9555. #define UART_C3_R8_SHIFT (7U)
  9556. #define UART_C3_R8(x) (((uint8_t)(((uint8_t)(x)) << UART_C3_R8_SHIFT)) & UART_C3_R8_MASK)
  9557. /*! @name D - UART Data Register */
  9558. #define UART_D_RT_MASK (0xFFU)
  9559. #define UART_D_RT_SHIFT (0U)
  9560. #define UART_D_RT(x) (((uint8_t)(((uint8_t)(x)) << UART_D_RT_SHIFT)) & UART_D_RT_MASK)
  9561. /*! @name MA1 - UART Match Address Registers 1 */
  9562. #define UART_MA1_MA_MASK (0xFFU)
  9563. #define UART_MA1_MA_SHIFT (0U)
  9564. #define UART_MA1_MA(x) (((uint8_t)(((uint8_t)(x)) << UART_MA1_MA_SHIFT)) & UART_MA1_MA_MASK)
  9565. /*! @name MA2 - UART Match Address Registers 2 */
  9566. #define UART_MA2_MA_MASK (0xFFU)
  9567. #define UART_MA2_MA_SHIFT (0U)
  9568. #define UART_MA2_MA(x) (((uint8_t)(((uint8_t)(x)) << UART_MA2_MA_SHIFT)) & UART_MA2_MA_MASK)
  9569. /*! @name C4 - UART Control Register 4 */
  9570. #define UART_C4_BRFA_MASK (0x1FU)
  9571. #define UART_C4_BRFA_SHIFT (0U)
  9572. #define UART_C4_BRFA(x) (((uint8_t)(((uint8_t)(x)) << UART_C4_BRFA_SHIFT)) & UART_C4_BRFA_MASK)
  9573. #define UART_C4_M10_MASK (0x20U)
  9574. #define UART_C4_M10_SHIFT (5U)
  9575. #define UART_C4_M10(x) (((uint8_t)(((uint8_t)(x)) << UART_C4_M10_SHIFT)) & UART_C4_M10_MASK)
  9576. #define UART_C4_MAEN2_MASK (0x40U)
  9577. #define UART_C4_MAEN2_SHIFT (6U)
  9578. #define UART_C4_MAEN2(x) (((uint8_t)(((uint8_t)(x)) << UART_C4_MAEN2_SHIFT)) & UART_C4_MAEN2_MASK)
  9579. #define UART_C4_MAEN1_MASK (0x80U)
  9580. #define UART_C4_MAEN1_SHIFT (7U)
  9581. #define UART_C4_MAEN1(x) (((uint8_t)(((uint8_t)(x)) << UART_C4_MAEN1_SHIFT)) & UART_C4_MAEN1_MASK)
  9582. /*! @name C5 - UART Control Register 5 */
  9583. #define UART_C5_LBKDDMAS_MASK (0x8U)
  9584. #define UART_C5_LBKDDMAS_SHIFT (3U)
  9585. #define UART_C5_LBKDDMAS(x) (((uint8_t)(((uint8_t)(x)) << UART_C5_LBKDDMAS_SHIFT)) & UART_C5_LBKDDMAS_MASK)
  9586. #define UART_C5_ILDMAS_MASK (0x10U)
  9587. #define UART_C5_ILDMAS_SHIFT (4U)
  9588. #define UART_C5_ILDMAS(x) (((uint8_t)(((uint8_t)(x)) << UART_C5_ILDMAS_SHIFT)) & UART_C5_ILDMAS_MASK)
  9589. #define UART_C5_RDMAS_MASK (0x20U)
  9590. #define UART_C5_RDMAS_SHIFT (5U)
  9591. #define UART_C5_RDMAS(x) (((uint8_t)(((uint8_t)(x)) << UART_C5_RDMAS_SHIFT)) & UART_C5_RDMAS_MASK)
  9592. #define UART_C5_TCDMAS_MASK (0x40U)
  9593. #define UART_C5_TCDMAS_SHIFT (6U)
  9594. #define UART_C5_TCDMAS(x) (((uint8_t)(((uint8_t)(x)) << UART_C5_TCDMAS_SHIFT)) & UART_C5_TCDMAS_MASK)
  9595. #define UART_C5_TDMAS_MASK (0x80U)
  9596. #define UART_C5_TDMAS_SHIFT (7U)
  9597. #define UART_C5_TDMAS(x) (((uint8_t)(((uint8_t)(x)) << UART_C5_TDMAS_SHIFT)) & UART_C5_TDMAS_MASK)
  9598. /*! @name ED - UART Extended Data Register */
  9599. #define UART_ED_PARITYE_MASK (0x40U)
  9600. #define UART_ED_PARITYE_SHIFT (6U)
  9601. #define UART_ED_PARITYE(x) (((uint8_t)(((uint8_t)(x)) << UART_ED_PARITYE_SHIFT)) & UART_ED_PARITYE_MASK)
  9602. #define UART_ED_NOISY_MASK (0x80U)
  9603. #define UART_ED_NOISY_SHIFT (7U)
  9604. #define UART_ED_NOISY(x) (((uint8_t)(((uint8_t)(x)) << UART_ED_NOISY_SHIFT)) & UART_ED_NOISY_MASK)
  9605. /*! @name MODEM - UART Modem Register */
  9606. #define UART_MODEM_TXCTSE_MASK (0x1U)
  9607. #define UART_MODEM_TXCTSE_SHIFT (0U)
  9608. #define UART_MODEM_TXCTSE(x) (((uint8_t)(((uint8_t)(x)) << UART_MODEM_TXCTSE_SHIFT)) & UART_MODEM_TXCTSE_MASK)
  9609. #define UART_MODEM_TXRTSE_MASK (0x2U)
  9610. #define UART_MODEM_TXRTSE_SHIFT (1U)
  9611. #define UART_MODEM_TXRTSE(x) (((uint8_t)(((uint8_t)(x)) << UART_MODEM_TXRTSE_SHIFT)) & UART_MODEM_TXRTSE_MASK)
  9612. #define UART_MODEM_TXRTSPOL_MASK (0x4U)
  9613. #define UART_MODEM_TXRTSPOL_SHIFT (2U)
  9614. #define UART_MODEM_TXRTSPOL(x) (((uint8_t)(((uint8_t)(x)) << UART_MODEM_TXRTSPOL_SHIFT)) & UART_MODEM_TXRTSPOL_MASK)
  9615. #define UART_MODEM_RXRTSE_MASK (0x8U)
  9616. #define UART_MODEM_RXRTSE_SHIFT (3U)
  9617. #define UART_MODEM_RXRTSE(x) (((uint8_t)(((uint8_t)(x)) << UART_MODEM_RXRTSE_SHIFT)) & UART_MODEM_RXRTSE_MASK)
  9618. /*! @name IR - UART Infrared Register */
  9619. #define UART_IR_TNP_MASK (0x3U)
  9620. #define UART_IR_TNP_SHIFT (0U)
  9621. #define UART_IR_TNP(x) (((uint8_t)(((uint8_t)(x)) << UART_IR_TNP_SHIFT)) & UART_IR_TNP_MASK)
  9622. #define UART_IR_IREN_MASK (0x4U)
  9623. #define UART_IR_IREN_SHIFT (2U)
  9624. #define UART_IR_IREN(x) (((uint8_t)(((uint8_t)(x)) << UART_IR_IREN_SHIFT)) & UART_IR_IREN_MASK)
  9625. /*! @name PFIFO - UART FIFO Parameters */
  9626. #define UART_PFIFO_RXFIFOSIZE_MASK (0x7U)
  9627. #define UART_PFIFO_RXFIFOSIZE_SHIFT (0U)
  9628. #define UART_PFIFO_RXFIFOSIZE(x) (((uint8_t)(((uint8_t)(x)) << UART_PFIFO_RXFIFOSIZE_SHIFT)) & UART_PFIFO_RXFIFOSIZE_MASK)
  9629. #define UART_PFIFO_RXFE_MASK (0x8U)
  9630. #define UART_PFIFO_RXFE_SHIFT (3U)
  9631. #define UART_PFIFO_RXFE(x) (((uint8_t)(((uint8_t)(x)) << UART_PFIFO_RXFE_SHIFT)) & UART_PFIFO_RXFE_MASK)
  9632. #define UART_PFIFO_TXFIFOSIZE_MASK (0x70U)
  9633. #define UART_PFIFO_TXFIFOSIZE_SHIFT (4U)
  9634. #define UART_PFIFO_TXFIFOSIZE(x) (((uint8_t)(((uint8_t)(x)) << UART_PFIFO_TXFIFOSIZE_SHIFT)) & UART_PFIFO_TXFIFOSIZE_MASK)
  9635. #define UART_PFIFO_TXFE_MASK (0x80U)
  9636. #define UART_PFIFO_TXFE_SHIFT (7U)
  9637. #define UART_PFIFO_TXFE(x) (((uint8_t)(((uint8_t)(x)) << UART_PFIFO_TXFE_SHIFT)) & UART_PFIFO_TXFE_MASK)
  9638. /*! @name CFIFO - UART FIFO Control Register */
  9639. #define UART_CFIFO_RXUFE_MASK (0x1U)
  9640. #define UART_CFIFO_RXUFE_SHIFT (0U)
  9641. #define UART_CFIFO_RXUFE(x) (((uint8_t)(((uint8_t)(x)) << UART_CFIFO_RXUFE_SHIFT)) & UART_CFIFO_RXUFE_MASK)
  9642. #define UART_CFIFO_TXOFE_MASK (0x2U)
  9643. #define UART_CFIFO_TXOFE_SHIFT (1U)
  9644. #define UART_CFIFO_TXOFE(x) (((uint8_t)(((uint8_t)(x)) << UART_CFIFO_TXOFE_SHIFT)) & UART_CFIFO_TXOFE_MASK)
  9645. #define UART_CFIFO_RXOFE_MASK (0x4U)
  9646. #define UART_CFIFO_RXOFE_SHIFT (2U)
  9647. #define UART_CFIFO_RXOFE(x) (((uint8_t)(((uint8_t)(x)) << UART_CFIFO_RXOFE_SHIFT)) & UART_CFIFO_RXOFE_MASK)
  9648. #define UART_CFIFO_RXFLUSH_MASK (0x40U)
  9649. #define UART_CFIFO_RXFLUSH_SHIFT (6U)
  9650. #define UART_CFIFO_RXFLUSH(x) (((uint8_t)(((uint8_t)(x)) << UART_CFIFO_RXFLUSH_SHIFT)) & UART_CFIFO_RXFLUSH_MASK)
  9651. #define UART_CFIFO_TXFLUSH_MASK (0x80U)
  9652. #define UART_CFIFO_TXFLUSH_SHIFT (7U)
  9653. #define UART_CFIFO_TXFLUSH(x) (((uint8_t)(((uint8_t)(x)) << UART_CFIFO_TXFLUSH_SHIFT)) & UART_CFIFO_TXFLUSH_MASK)
  9654. /*! @name SFIFO - UART FIFO Status Register */
  9655. #define UART_SFIFO_RXUF_MASK (0x1U)
  9656. #define UART_SFIFO_RXUF_SHIFT (0U)
  9657. #define UART_SFIFO_RXUF(x) (((uint8_t)(((uint8_t)(x)) << UART_SFIFO_RXUF_SHIFT)) & UART_SFIFO_RXUF_MASK)
  9658. #define UART_SFIFO_TXOF_MASK (0x2U)
  9659. #define UART_SFIFO_TXOF_SHIFT (1U)
  9660. #define UART_SFIFO_TXOF(x) (((uint8_t)(((uint8_t)(x)) << UART_SFIFO_TXOF_SHIFT)) & UART_SFIFO_TXOF_MASK)
  9661. #define UART_SFIFO_RXOF_MASK (0x4U)
  9662. #define UART_SFIFO_RXOF_SHIFT (2U)
  9663. #define UART_SFIFO_RXOF(x) (((uint8_t)(((uint8_t)(x)) << UART_SFIFO_RXOF_SHIFT)) & UART_SFIFO_RXOF_MASK)
  9664. #define UART_SFIFO_RXEMPT_MASK (0x40U)
  9665. #define UART_SFIFO_RXEMPT_SHIFT (6U)
  9666. #define UART_SFIFO_RXEMPT(x) (((uint8_t)(((uint8_t)(x)) << UART_SFIFO_RXEMPT_SHIFT)) & UART_SFIFO_RXEMPT_MASK)
  9667. #define UART_SFIFO_TXEMPT_MASK (0x80U)
  9668. #define UART_SFIFO_TXEMPT_SHIFT (7U)
  9669. #define UART_SFIFO_TXEMPT(x) (((uint8_t)(((uint8_t)(x)) << UART_SFIFO_TXEMPT_SHIFT)) & UART_SFIFO_TXEMPT_MASK)
  9670. /*! @name TWFIFO - UART FIFO Transmit Watermark */
  9671. #define UART_TWFIFO_TXWATER_MASK (0xFFU)
  9672. #define UART_TWFIFO_TXWATER_SHIFT (0U)
  9673. #define UART_TWFIFO_TXWATER(x) (((uint8_t)(((uint8_t)(x)) << UART_TWFIFO_TXWATER_SHIFT)) & UART_TWFIFO_TXWATER_MASK)
  9674. /*! @name TCFIFO - UART FIFO Transmit Count */
  9675. #define UART_TCFIFO_TXCOUNT_MASK (0xFFU)
  9676. #define UART_TCFIFO_TXCOUNT_SHIFT (0U)
  9677. #define UART_TCFIFO_TXCOUNT(x) (((uint8_t)(((uint8_t)(x)) << UART_TCFIFO_TXCOUNT_SHIFT)) & UART_TCFIFO_TXCOUNT_MASK)
  9678. /*! @name RWFIFO - UART FIFO Receive Watermark */
  9679. #define UART_RWFIFO_RXWATER_MASK (0xFFU)
  9680. #define UART_RWFIFO_RXWATER_SHIFT (0U)
  9681. #define UART_RWFIFO_RXWATER(x) (((uint8_t)(((uint8_t)(x)) << UART_RWFIFO_RXWATER_SHIFT)) & UART_RWFIFO_RXWATER_MASK)
  9682. /*! @name RCFIFO - UART FIFO Receive Count */
  9683. #define UART_RCFIFO_RXCOUNT_MASK (0xFFU)
  9684. #define UART_RCFIFO_RXCOUNT_SHIFT (0U)
  9685. #define UART_RCFIFO_RXCOUNT(x) (((uint8_t)(((uint8_t)(x)) << UART_RCFIFO_RXCOUNT_SHIFT)) & UART_RCFIFO_RXCOUNT_MASK)
  9686. /*! @name C7816 - UART 7816 Control Register */
  9687. #define UART_C7816_ISO_7816E_MASK (0x1U)
  9688. #define UART_C7816_ISO_7816E_SHIFT (0U)
  9689. #define UART_C7816_ISO_7816E(x) (((uint8_t)(((uint8_t)(x)) << UART_C7816_ISO_7816E_SHIFT)) & UART_C7816_ISO_7816E_MASK)
  9690. #define UART_C7816_TTYPE_MASK (0x2U)
  9691. #define UART_C7816_TTYPE_SHIFT (1U)
  9692. #define UART_C7816_TTYPE(x) (((uint8_t)(((uint8_t)(x)) << UART_C7816_TTYPE_SHIFT)) & UART_C7816_TTYPE_MASK)
  9693. #define UART_C7816_INIT_MASK (0x4U)
  9694. #define UART_C7816_INIT_SHIFT (2U)
  9695. #define UART_C7816_INIT(x) (((uint8_t)(((uint8_t)(x)) << UART_C7816_INIT_SHIFT)) & UART_C7816_INIT_MASK)
  9696. #define UART_C7816_ANACK_MASK (0x8U)
  9697. #define UART_C7816_ANACK_SHIFT (3U)
  9698. #define UART_C7816_ANACK(x) (((uint8_t)(((uint8_t)(x)) << UART_C7816_ANACK_SHIFT)) & UART_C7816_ANACK_MASK)
  9699. #define UART_C7816_ONACK_MASK (0x10U)
  9700. #define UART_C7816_ONACK_SHIFT (4U)
  9701. #define UART_C7816_ONACK(x) (((uint8_t)(((uint8_t)(x)) << UART_C7816_ONACK_SHIFT)) & UART_C7816_ONACK_MASK)
  9702. /*! @name IE7816 - UART 7816 Interrupt Enable Register */
  9703. #define UART_IE7816_RXTE_MASK (0x1U)
  9704. #define UART_IE7816_RXTE_SHIFT (0U)
  9705. #define UART_IE7816_RXTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_RXTE_SHIFT)) & UART_IE7816_RXTE_MASK)
  9706. #define UART_IE7816_TXTE_MASK (0x2U)
  9707. #define UART_IE7816_TXTE_SHIFT (1U)
  9708. #define UART_IE7816_TXTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_TXTE_SHIFT)) & UART_IE7816_TXTE_MASK)
  9709. #define UART_IE7816_GTVE_MASK (0x4U)
  9710. #define UART_IE7816_GTVE_SHIFT (2U)
  9711. #define UART_IE7816_GTVE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_GTVE_SHIFT)) & UART_IE7816_GTVE_MASK)
  9712. #define UART_IE7816_INITDE_MASK (0x10U)
  9713. #define UART_IE7816_INITDE_SHIFT (4U)
  9714. #define UART_IE7816_INITDE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_INITDE_SHIFT)) & UART_IE7816_INITDE_MASK)
  9715. #define UART_IE7816_BWTE_MASK (0x20U)
  9716. #define UART_IE7816_BWTE_SHIFT (5U)
  9717. #define UART_IE7816_BWTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_BWTE_SHIFT)) & UART_IE7816_BWTE_MASK)
  9718. #define UART_IE7816_CWTE_MASK (0x40U)
  9719. #define UART_IE7816_CWTE_SHIFT (6U)
  9720. #define UART_IE7816_CWTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_CWTE_SHIFT)) & UART_IE7816_CWTE_MASK)
  9721. #define UART_IE7816_WTE_MASK (0x80U)
  9722. #define UART_IE7816_WTE_SHIFT (7U)
  9723. #define UART_IE7816_WTE(x) (((uint8_t)(((uint8_t)(x)) << UART_IE7816_WTE_SHIFT)) & UART_IE7816_WTE_MASK)
  9724. /*! @name IS7816 - UART 7816 Interrupt Status Register */
  9725. #define UART_IS7816_RXT_MASK (0x1U)
  9726. #define UART_IS7816_RXT_SHIFT (0U)
  9727. #define UART_IS7816_RXT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_RXT_SHIFT)) & UART_IS7816_RXT_MASK)
  9728. #define UART_IS7816_TXT_MASK (0x2U)
  9729. #define UART_IS7816_TXT_SHIFT (1U)
  9730. #define UART_IS7816_TXT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_TXT_SHIFT)) & UART_IS7816_TXT_MASK)
  9731. #define UART_IS7816_GTV_MASK (0x4U)
  9732. #define UART_IS7816_GTV_SHIFT (2U)
  9733. #define UART_IS7816_GTV(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_GTV_SHIFT)) & UART_IS7816_GTV_MASK)
  9734. #define UART_IS7816_INITD_MASK (0x10U)
  9735. #define UART_IS7816_INITD_SHIFT (4U)
  9736. #define UART_IS7816_INITD(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_INITD_SHIFT)) & UART_IS7816_INITD_MASK)
  9737. #define UART_IS7816_BWT_MASK (0x20U)
  9738. #define UART_IS7816_BWT_SHIFT (5U)
  9739. #define UART_IS7816_BWT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_BWT_SHIFT)) & UART_IS7816_BWT_MASK)
  9740. #define UART_IS7816_CWT_MASK (0x40U)
  9741. #define UART_IS7816_CWT_SHIFT (6U)
  9742. #define UART_IS7816_CWT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_CWT_SHIFT)) & UART_IS7816_CWT_MASK)
  9743. #define UART_IS7816_WT_MASK (0x80U)
  9744. #define UART_IS7816_WT_SHIFT (7U)
  9745. #define UART_IS7816_WT(x) (((uint8_t)(((uint8_t)(x)) << UART_IS7816_WT_SHIFT)) & UART_IS7816_WT_MASK)
  9746. /*! @name WP7816T0 - UART 7816 Wait Parameter Register */
  9747. #define UART_WP7816T0_WI_MASK (0xFFU)
  9748. #define UART_WP7816T0_WI_SHIFT (0U)
  9749. #define UART_WP7816T0_WI(x) (((uint8_t)(((uint8_t)(x)) << UART_WP7816T0_WI_SHIFT)) & UART_WP7816T0_WI_MASK)
  9750. /*! @name WP7816T1 - UART 7816 Wait Parameter Register */
  9751. #define UART_WP7816T1_BWI_MASK (0xFU)
  9752. #define UART_WP7816T1_BWI_SHIFT (0U)
  9753. #define UART_WP7816T1_BWI(x) (((uint8_t)(((uint8_t)(x)) << UART_WP7816T1_BWI_SHIFT)) & UART_WP7816T1_BWI_MASK)
  9754. #define UART_WP7816T1_CWI_MASK (0xF0U)
  9755. #define UART_WP7816T1_CWI_SHIFT (4U)
  9756. #define UART_WP7816T1_CWI(x) (((uint8_t)(((uint8_t)(x)) << UART_WP7816T1_CWI_SHIFT)) & UART_WP7816T1_CWI_MASK)
  9757. /*! @name WN7816 - UART 7816 Wait N Register */
  9758. #define UART_WN7816_GTN_MASK (0xFFU)
  9759. #define UART_WN7816_GTN_SHIFT (0U)
  9760. #define UART_WN7816_GTN(x) (((uint8_t)(((uint8_t)(x)) << UART_WN7816_GTN_SHIFT)) & UART_WN7816_GTN_MASK)
  9761. /*! @name WF7816 - UART 7816 Wait FD Register */
  9762. #define UART_WF7816_GTFD_MASK (0xFFU)
  9763. #define UART_WF7816_GTFD_SHIFT (0U)
  9764. #define UART_WF7816_GTFD(x) (((uint8_t)(((uint8_t)(x)) << UART_WF7816_GTFD_SHIFT)) & UART_WF7816_GTFD_MASK)
  9765. /*! @name ET7816 - UART 7816 Error Threshold Register */
  9766. #define UART_ET7816_RXTHRESHOLD_MASK (0xFU)
  9767. #define UART_ET7816_RXTHRESHOLD_SHIFT (0U)
  9768. #define UART_ET7816_RXTHRESHOLD(x) (((uint8_t)(((uint8_t)(x)) << UART_ET7816_RXTHRESHOLD_SHIFT)) & UART_ET7816_RXTHRESHOLD_MASK)
  9769. #define UART_ET7816_TXTHRESHOLD_MASK (0xF0U)
  9770. #define UART_ET7816_TXTHRESHOLD_SHIFT (4U)
  9771. #define UART_ET7816_TXTHRESHOLD(x) (((uint8_t)(((uint8_t)(x)) << UART_ET7816_TXTHRESHOLD_SHIFT)) & UART_ET7816_TXTHRESHOLD_MASK)
  9772. /*! @name TL7816 - UART 7816 Transmit Length Register */
  9773. #define UART_TL7816_TLEN_MASK (0xFFU)
  9774. #define UART_TL7816_TLEN_SHIFT (0U)
  9775. #define UART_TL7816_TLEN(x) (((uint8_t)(((uint8_t)(x)) << UART_TL7816_TLEN_SHIFT)) & UART_TL7816_TLEN_MASK)
  9776. /*!
  9777. * @}
  9778. */ /* end of group UART_Register_Masks */
  9779. /* UART - Peripheral instance base addresses */
  9780. /** Peripheral UART0 base address */
  9781. #define UART0_BASE (0x4006A000u)
  9782. /** Peripheral UART0 base pointer */
  9783. #define UART0 ((UART_Type *)UART0_BASE)
  9784. /** Peripheral UART1 base address */
  9785. #define UART1_BASE (0x4006B000u)
  9786. /** Peripheral UART1 base pointer */
  9787. #define UART1 ((UART_Type *)UART1_BASE)
  9788. /** Peripheral UART2 base address */
  9789. #define UART2_BASE (0x4006C000u)
  9790. /** Peripheral UART2 base pointer */
  9791. #define UART2 ((UART_Type *)UART2_BASE)
  9792. /** Peripheral UART3 base address */
  9793. #define UART3_BASE (0x4006D000u)
  9794. /** Peripheral UART3 base pointer */
  9795. #define UART3 ((UART_Type *)UART3_BASE)
  9796. /** Peripheral UART4 base address */
  9797. #define UART4_BASE (0x400EA000u)
  9798. /** Peripheral UART4 base pointer */
  9799. #define UART4 ((UART_Type *)UART4_BASE)
  9800. /** Peripheral UART5 base address */
  9801. #define UART5_BASE (0x400EB000u)
  9802. /** Peripheral UART5 base pointer */
  9803. #define UART5 ((UART_Type *)UART5_BASE)
  9804. /** Array initializer of UART peripheral base addresses */
  9805. #define UART_BASE_ADDRS { UART0_BASE, UART1_BASE, UART2_BASE, UART3_BASE, UART4_BASE, UART5_BASE }
  9806. /** Array initializer of UART peripheral base pointers */
  9807. #define UART_BASE_PTRS { UART0, UART1, UART2, UART3, UART4, UART5 }
  9808. /** Interrupt vectors for the UART peripheral type */
  9809. #define UART_RX_TX_IRQS { UART0_RX_TX_IRQn, UART1_RX_TX_IRQn, UART2_RX_TX_IRQn, UART3_RX_TX_IRQn, UART4_RX_TX_IRQn, UART5_RX_TX_IRQn }
  9810. #define UART_ERR_IRQS { UART0_ERR_IRQn, UART1_ERR_IRQn, UART2_ERR_IRQn, UART3_ERR_IRQn, UART4_ERR_IRQn, UART5_ERR_IRQn }
  9811. #define UART_LON_IRQS { UART0_LON_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn, NotAvail_IRQn }
  9812. /*!
  9813. * @}
  9814. */ /* end of group UART_Peripheral_Access_Layer */
  9815. /* ----------------------------------------------------------------------------
  9816. -- USB Peripheral Access Layer
  9817. ---------------------------------------------------------------------------- */
  9818. /*!
  9819. * @addtogroup USB_Peripheral_Access_Layer USB Peripheral Access Layer
  9820. * @{
  9821. */
  9822. /** USB - Register Layout Typedef */
  9823. typedef struct {
  9824. __I uint8_t PERID; /**< Peripheral ID register, offset: 0x0 */
  9825. uint8_t RESERVED_0[3];
  9826. __I uint8_t IDCOMP; /**< Peripheral ID Complement register, offset: 0x4 */
  9827. uint8_t RESERVED_1[3];
  9828. __I uint8_t REV; /**< Peripheral Revision register, offset: 0x8 */
  9829. uint8_t RESERVED_2[3];
  9830. __I uint8_t ADDINFO; /**< Peripheral Additional Info register, offset: 0xC */
  9831. uint8_t RESERVED_3[3];
  9832. __IO uint8_t OTGISTAT; /**< OTG Interrupt Status register, offset: 0x10 */
  9833. uint8_t RESERVED_4[3];
  9834. __IO uint8_t OTGICR; /**< OTG Interrupt Control register, offset: 0x14 */
  9835. uint8_t RESERVED_5[3];
  9836. __IO uint8_t OTGSTAT; /**< OTG Status register, offset: 0x18 */
  9837. uint8_t RESERVED_6[3];
  9838. __IO uint8_t OTGCTL; /**< OTG Control register, offset: 0x1C */
  9839. uint8_t RESERVED_7[99];
  9840. __IO uint8_t ISTAT; /**< Interrupt Status register, offset: 0x80 */
  9841. uint8_t RESERVED_8[3];
  9842. __IO uint8_t INTEN; /**< Interrupt Enable register, offset: 0x84 */
  9843. uint8_t RESERVED_9[3];
  9844. __IO uint8_t ERRSTAT; /**< Error Interrupt Status register, offset: 0x88 */
  9845. uint8_t RESERVED_10[3];
  9846. __IO uint8_t ERREN; /**< Error Interrupt Enable register, offset: 0x8C */
  9847. uint8_t RESERVED_11[3];
  9848. __I uint8_t STAT; /**< Status register, offset: 0x90 */
  9849. uint8_t RESERVED_12[3];
  9850. __IO uint8_t CTL; /**< Control register, offset: 0x94 */
  9851. uint8_t RESERVED_13[3];
  9852. __IO uint8_t ADDR; /**< Address register, offset: 0x98 */
  9853. uint8_t RESERVED_14[3];
  9854. __IO uint8_t BDTPAGE1; /**< BDT Page register 1, offset: 0x9C */
  9855. uint8_t RESERVED_15[3];
  9856. __IO uint8_t FRMNUML; /**< Frame Number register Low, offset: 0xA0 */
  9857. uint8_t RESERVED_16[3];
  9858. __IO uint8_t FRMNUMH; /**< Frame Number register High, offset: 0xA4 */
  9859. uint8_t RESERVED_17[3];
  9860. __IO uint8_t TOKEN; /**< Token register, offset: 0xA8 */
  9861. uint8_t RESERVED_18[3];
  9862. __IO uint8_t SOFTHLD; /**< SOF Threshold register, offset: 0xAC */
  9863. uint8_t RESERVED_19[3];
  9864. __IO uint8_t BDTPAGE2; /**< BDT Page Register 2, offset: 0xB0 */
  9865. uint8_t RESERVED_20[3];
  9866. __IO uint8_t BDTPAGE3; /**< BDT Page Register 3, offset: 0xB4 */
  9867. uint8_t RESERVED_21[11];
  9868. struct { /* offset: 0xC0, array step: 0x4 */
  9869. __IO uint8_t ENDPT; /**< Endpoint Control register, array offset: 0xC0, array step: 0x4 */
  9870. uint8_t RESERVED_0[3];
  9871. } ENDPOINT[16];
  9872. __IO uint8_t USBCTRL; /**< USB Control register, offset: 0x100 */
  9873. uint8_t RESERVED_22[3];
  9874. __I uint8_t OBSERVE; /**< USB OTG Observe register, offset: 0x104 */
  9875. uint8_t RESERVED_23[3];
  9876. __IO uint8_t CONTROL; /**< USB OTG Control register, offset: 0x108 */
  9877. uint8_t RESERVED_24[3];
  9878. __IO uint8_t USBTRC0; /**< USB Transceiver Control register 0, offset: 0x10C */
  9879. uint8_t RESERVED_25[7];
  9880. __IO uint8_t USBFRMADJUST; /**< Frame Adjust Register, offset: 0x114 */
  9881. uint8_t RESERVED_26[43];
  9882. __IO uint8_t CLK_RECOVER_CTRL; /**< USB Clock recovery control, offset: 0x140 */
  9883. uint8_t RESERVED_27[3];
  9884. __IO uint8_t CLK_RECOVER_IRC_EN; /**< IRC48M oscillator enable register, offset: 0x144 */
  9885. uint8_t RESERVED_28[23];
  9886. __IO uint8_t CLK_RECOVER_INT_STATUS; /**< Clock recovery separated interrupt status, offset: 0x15C */
  9887. } USB_Type;
  9888. /* ----------------------------------------------------------------------------
  9889. -- USB Register Masks
  9890. ---------------------------------------------------------------------------- */
  9891. /*!
  9892. * @addtogroup USB_Register_Masks USB Register Masks
  9893. * @{
  9894. */
  9895. /*! @name PERID - Peripheral ID register */
  9896. #define USB_PERID_ID_MASK (0x3FU)
  9897. #define USB_PERID_ID_SHIFT (0U)
  9898. #define USB_PERID_ID(x) (((uint8_t)(((uint8_t)(x)) << USB_PERID_ID_SHIFT)) & USB_PERID_ID_MASK)
  9899. /*! @name IDCOMP - Peripheral ID Complement register */
  9900. #define USB_IDCOMP_NID_MASK (0x3FU)
  9901. #define USB_IDCOMP_NID_SHIFT (0U)
  9902. #define USB_IDCOMP_NID(x) (((uint8_t)(((uint8_t)(x)) << USB_IDCOMP_NID_SHIFT)) & USB_IDCOMP_NID_MASK)
  9903. /*! @name REV - Peripheral Revision register */
  9904. #define USB_REV_REV_MASK (0xFFU)
  9905. #define USB_REV_REV_SHIFT (0U)
  9906. #define USB_REV_REV(x) (((uint8_t)(((uint8_t)(x)) << USB_REV_REV_SHIFT)) & USB_REV_REV_MASK)
  9907. /*! @name ADDINFO - Peripheral Additional Info register */
  9908. #define USB_ADDINFO_IEHOST_MASK (0x1U)
  9909. #define USB_ADDINFO_IEHOST_SHIFT (0U)
  9910. #define USB_ADDINFO_IEHOST(x) (((uint8_t)(((uint8_t)(x)) << USB_ADDINFO_IEHOST_SHIFT)) & USB_ADDINFO_IEHOST_MASK)
  9911. #define USB_ADDINFO_IRQNUM_MASK (0xF8U)
  9912. #define USB_ADDINFO_IRQNUM_SHIFT (3U)
  9913. #define USB_ADDINFO_IRQNUM(x) (((uint8_t)(((uint8_t)(x)) << USB_ADDINFO_IRQNUM_SHIFT)) & USB_ADDINFO_IRQNUM_MASK)
  9914. /*! @name OTGISTAT - OTG Interrupt Status register */
  9915. #define USB_OTGISTAT_AVBUSCHG_MASK (0x1U)
  9916. #define USB_OTGISTAT_AVBUSCHG_SHIFT (0U)
  9917. #define USB_OTGISTAT_AVBUSCHG(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_AVBUSCHG_SHIFT)) & USB_OTGISTAT_AVBUSCHG_MASK)
  9918. #define USB_OTGISTAT_B_SESS_CHG_MASK (0x4U)
  9919. #define USB_OTGISTAT_B_SESS_CHG_SHIFT (2U)
  9920. #define USB_OTGISTAT_B_SESS_CHG(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_B_SESS_CHG_SHIFT)) & USB_OTGISTAT_B_SESS_CHG_MASK)
  9921. #define USB_OTGISTAT_SESSVLDCHG_MASK (0x8U)
  9922. #define USB_OTGISTAT_SESSVLDCHG_SHIFT (3U)
  9923. #define USB_OTGISTAT_SESSVLDCHG(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_SESSVLDCHG_SHIFT)) & USB_OTGISTAT_SESSVLDCHG_MASK)
  9924. #define USB_OTGISTAT_LINE_STATE_CHG_MASK (0x20U)
  9925. #define USB_OTGISTAT_LINE_STATE_CHG_SHIFT (5U)
  9926. #define USB_OTGISTAT_LINE_STATE_CHG(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_LINE_STATE_CHG_SHIFT)) & USB_OTGISTAT_LINE_STATE_CHG_MASK)
  9927. #define USB_OTGISTAT_ONEMSEC_MASK (0x40U)
  9928. #define USB_OTGISTAT_ONEMSEC_SHIFT (6U)
  9929. #define USB_OTGISTAT_ONEMSEC(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_ONEMSEC_SHIFT)) & USB_OTGISTAT_ONEMSEC_MASK)
  9930. #define USB_OTGISTAT_IDCHG_MASK (0x80U)
  9931. #define USB_OTGISTAT_IDCHG_SHIFT (7U)
  9932. #define USB_OTGISTAT_IDCHG(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGISTAT_IDCHG_SHIFT)) & USB_OTGISTAT_IDCHG_MASK)
  9933. /*! @name OTGICR - OTG Interrupt Control register */
  9934. #define USB_OTGICR_AVBUSEN_MASK (0x1U)
  9935. #define USB_OTGICR_AVBUSEN_SHIFT (0U)
  9936. #define USB_OTGICR_AVBUSEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_AVBUSEN_SHIFT)) & USB_OTGICR_AVBUSEN_MASK)
  9937. #define USB_OTGICR_BSESSEN_MASK (0x4U)
  9938. #define USB_OTGICR_BSESSEN_SHIFT (2U)
  9939. #define USB_OTGICR_BSESSEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_BSESSEN_SHIFT)) & USB_OTGICR_BSESSEN_MASK)
  9940. #define USB_OTGICR_SESSVLDEN_MASK (0x8U)
  9941. #define USB_OTGICR_SESSVLDEN_SHIFT (3U)
  9942. #define USB_OTGICR_SESSVLDEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_SESSVLDEN_SHIFT)) & USB_OTGICR_SESSVLDEN_MASK)
  9943. #define USB_OTGICR_LINESTATEEN_MASK (0x20U)
  9944. #define USB_OTGICR_LINESTATEEN_SHIFT (5U)
  9945. #define USB_OTGICR_LINESTATEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_LINESTATEEN_SHIFT)) & USB_OTGICR_LINESTATEEN_MASK)
  9946. #define USB_OTGICR_ONEMSECEN_MASK (0x40U)
  9947. #define USB_OTGICR_ONEMSECEN_SHIFT (6U)
  9948. #define USB_OTGICR_ONEMSECEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_ONEMSECEN_SHIFT)) & USB_OTGICR_ONEMSECEN_MASK)
  9949. #define USB_OTGICR_IDEN_MASK (0x80U)
  9950. #define USB_OTGICR_IDEN_SHIFT (7U)
  9951. #define USB_OTGICR_IDEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGICR_IDEN_SHIFT)) & USB_OTGICR_IDEN_MASK)
  9952. /*! @name OTGSTAT - OTG Status register */
  9953. #define USB_OTGSTAT_AVBUSVLD_MASK (0x1U)
  9954. #define USB_OTGSTAT_AVBUSVLD_SHIFT (0U)
  9955. #define USB_OTGSTAT_AVBUSVLD(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_AVBUSVLD_SHIFT)) & USB_OTGSTAT_AVBUSVLD_MASK)
  9956. #define USB_OTGSTAT_BSESSEND_MASK (0x4U)
  9957. #define USB_OTGSTAT_BSESSEND_SHIFT (2U)
  9958. #define USB_OTGSTAT_BSESSEND(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_BSESSEND_SHIFT)) & USB_OTGSTAT_BSESSEND_MASK)
  9959. #define USB_OTGSTAT_SESS_VLD_MASK (0x8U)
  9960. #define USB_OTGSTAT_SESS_VLD_SHIFT (3U)
  9961. #define USB_OTGSTAT_SESS_VLD(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_SESS_VLD_SHIFT)) & USB_OTGSTAT_SESS_VLD_MASK)
  9962. #define USB_OTGSTAT_LINESTATESTABLE_MASK (0x20U)
  9963. #define USB_OTGSTAT_LINESTATESTABLE_SHIFT (5U)
  9964. #define USB_OTGSTAT_LINESTATESTABLE(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_LINESTATESTABLE_SHIFT)) & USB_OTGSTAT_LINESTATESTABLE_MASK)
  9965. #define USB_OTGSTAT_ONEMSECEN_MASK (0x40U)
  9966. #define USB_OTGSTAT_ONEMSECEN_SHIFT (6U)
  9967. #define USB_OTGSTAT_ONEMSECEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_ONEMSECEN_SHIFT)) & USB_OTGSTAT_ONEMSECEN_MASK)
  9968. #define USB_OTGSTAT_ID_MASK (0x80U)
  9969. #define USB_OTGSTAT_ID_SHIFT (7U)
  9970. #define USB_OTGSTAT_ID(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGSTAT_ID_SHIFT)) & USB_OTGSTAT_ID_MASK)
  9971. /*! @name OTGCTL - OTG Control register */
  9972. #define USB_OTGCTL_OTGEN_MASK (0x4U)
  9973. #define USB_OTGCTL_OTGEN_SHIFT (2U)
  9974. #define USB_OTGCTL_OTGEN(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGCTL_OTGEN_SHIFT)) & USB_OTGCTL_OTGEN_MASK)
  9975. #define USB_OTGCTL_DMLOW_MASK (0x10U)
  9976. #define USB_OTGCTL_DMLOW_SHIFT (4U)
  9977. #define USB_OTGCTL_DMLOW(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGCTL_DMLOW_SHIFT)) & USB_OTGCTL_DMLOW_MASK)
  9978. #define USB_OTGCTL_DPLOW_MASK (0x20U)
  9979. #define USB_OTGCTL_DPLOW_SHIFT (5U)
  9980. #define USB_OTGCTL_DPLOW(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGCTL_DPLOW_SHIFT)) & USB_OTGCTL_DPLOW_MASK)
  9981. #define USB_OTGCTL_DPHIGH_MASK (0x80U)
  9982. #define USB_OTGCTL_DPHIGH_SHIFT (7U)
  9983. #define USB_OTGCTL_DPHIGH(x) (((uint8_t)(((uint8_t)(x)) << USB_OTGCTL_DPHIGH_SHIFT)) & USB_OTGCTL_DPHIGH_MASK)
  9984. /*! @name ISTAT - Interrupt Status register */
  9985. #define USB_ISTAT_USBRST_MASK (0x1U)
  9986. #define USB_ISTAT_USBRST_SHIFT (0U)
  9987. #define USB_ISTAT_USBRST(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_USBRST_SHIFT)) & USB_ISTAT_USBRST_MASK)
  9988. #define USB_ISTAT_ERROR_MASK (0x2U)
  9989. #define USB_ISTAT_ERROR_SHIFT (1U)
  9990. #define USB_ISTAT_ERROR(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_ERROR_SHIFT)) & USB_ISTAT_ERROR_MASK)
  9991. #define USB_ISTAT_SOFTOK_MASK (0x4U)
  9992. #define USB_ISTAT_SOFTOK_SHIFT (2U)
  9993. #define USB_ISTAT_SOFTOK(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_SOFTOK_SHIFT)) & USB_ISTAT_SOFTOK_MASK)
  9994. #define USB_ISTAT_TOKDNE_MASK (0x8U)
  9995. #define USB_ISTAT_TOKDNE_SHIFT (3U)
  9996. #define USB_ISTAT_TOKDNE(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_TOKDNE_SHIFT)) & USB_ISTAT_TOKDNE_MASK)
  9997. #define USB_ISTAT_SLEEP_MASK (0x10U)
  9998. #define USB_ISTAT_SLEEP_SHIFT (4U)
  9999. #define USB_ISTAT_SLEEP(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_SLEEP_SHIFT)) & USB_ISTAT_SLEEP_MASK)
  10000. #define USB_ISTAT_RESUME_MASK (0x20U)
  10001. #define USB_ISTAT_RESUME_SHIFT (5U)
  10002. #define USB_ISTAT_RESUME(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_RESUME_SHIFT)) & USB_ISTAT_RESUME_MASK)
  10003. #define USB_ISTAT_ATTACH_MASK (0x40U)
  10004. #define USB_ISTAT_ATTACH_SHIFT (6U)
  10005. #define USB_ISTAT_ATTACH(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_ATTACH_SHIFT)) & USB_ISTAT_ATTACH_MASK)
  10006. #define USB_ISTAT_STALL_MASK (0x80U)
  10007. #define USB_ISTAT_STALL_SHIFT (7U)
  10008. #define USB_ISTAT_STALL(x) (((uint8_t)(((uint8_t)(x)) << USB_ISTAT_STALL_SHIFT)) & USB_ISTAT_STALL_MASK)
  10009. /*! @name INTEN - Interrupt Enable register */
  10010. #define USB_INTEN_USBRSTEN_MASK (0x1U)
  10011. #define USB_INTEN_USBRSTEN_SHIFT (0U)
  10012. #define USB_INTEN_USBRSTEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_USBRSTEN_SHIFT)) & USB_INTEN_USBRSTEN_MASK)
  10013. #define USB_INTEN_ERROREN_MASK (0x2U)
  10014. #define USB_INTEN_ERROREN_SHIFT (1U)
  10015. #define USB_INTEN_ERROREN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_ERROREN_SHIFT)) & USB_INTEN_ERROREN_MASK)
  10016. #define USB_INTEN_SOFTOKEN_MASK (0x4U)
  10017. #define USB_INTEN_SOFTOKEN_SHIFT (2U)
  10018. #define USB_INTEN_SOFTOKEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_SOFTOKEN_SHIFT)) & USB_INTEN_SOFTOKEN_MASK)
  10019. #define USB_INTEN_TOKDNEEN_MASK (0x8U)
  10020. #define USB_INTEN_TOKDNEEN_SHIFT (3U)
  10021. #define USB_INTEN_TOKDNEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_TOKDNEEN_SHIFT)) & USB_INTEN_TOKDNEEN_MASK)
  10022. #define USB_INTEN_SLEEPEN_MASK (0x10U)
  10023. #define USB_INTEN_SLEEPEN_SHIFT (4U)
  10024. #define USB_INTEN_SLEEPEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_SLEEPEN_SHIFT)) & USB_INTEN_SLEEPEN_MASK)
  10025. #define USB_INTEN_RESUMEEN_MASK (0x20U)
  10026. #define USB_INTEN_RESUMEEN_SHIFT (5U)
  10027. #define USB_INTEN_RESUMEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_RESUMEEN_SHIFT)) & USB_INTEN_RESUMEEN_MASK)
  10028. #define USB_INTEN_ATTACHEN_MASK (0x40U)
  10029. #define USB_INTEN_ATTACHEN_SHIFT (6U)
  10030. #define USB_INTEN_ATTACHEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_ATTACHEN_SHIFT)) & USB_INTEN_ATTACHEN_MASK)
  10031. #define USB_INTEN_STALLEN_MASK (0x80U)
  10032. #define USB_INTEN_STALLEN_SHIFT (7U)
  10033. #define USB_INTEN_STALLEN(x) (((uint8_t)(((uint8_t)(x)) << USB_INTEN_STALLEN_SHIFT)) & USB_INTEN_STALLEN_MASK)
  10034. /*! @name ERRSTAT - Error Interrupt Status register */
  10035. #define USB_ERRSTAT_PIDERR_MASK (0x1U)
  10036. #define USB_ERRSTAT_PIDERR_SHIFT (0U)
  10037. #define USB_ERRSTAT_PIDERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_PIDERR_SHIFT)) & USB_ERRSTAT_PIDERR_MASK)
  10038. #define USB_ERRSTAT_CRC5EOF_MASK (0x2U)
  10039. #define USB_ERRSTAT_CRC5EOF_SHIFT (1U)
  10040. #define USB_ERRSTAT_CRC5EOF(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_CRC5EOF_SHIFT)) & USB_ERRSTAT_CRC5EOF_MASK)
  10041. #define USB_ERRSTAT_CRC16_MASK (0x4U)
  10042. #define USB_ERRSTAT_CRC16_SHIFT (2U)
  10043. #define USB_ERRSTAT_CRC16(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_CRC16_SHIFT)) & USB_ERRSTAT_CRC16_MASK)
  10044. #define USB_ERRSTAT_DFN8_MASK (0x8U)
  10045. #define USB_ERRSTAT_DFN8_SHIFT (3U)
  10046. #define USB_ERRSTAT_DFN8(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_DFN8_SHIFT)) & USB_ERRSTAT_DFN8_MASK)
  10047. #define USB_ERRSTAT_BTOERR_MASK (0x10U)
  10048. #define USB_ERRSTAT_BTOERR_SHIFT (4U)
  10049. #define USB_ERRSTAT_BTOERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_BTOERR_SHIFT)) & USB_ERRSTAT_BTOERR_MASK)
  10050. #define USB_ERRSTAT_DMAERR_MASK (0x20U)
  10051. #define USB_ERRSTAT_DMAERR_SHIFT (5U)
  10052. #define USB_ERRSTAT_DMAERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_DMAERR_SHIFT)) & USB_ERRSTAT_DMAERR_MASK)
  10053. #define USB_ERRSTAT_BTSERR_MASK (0x80U)
  10054. #define USB_ERRSTAT_BTSERR_SHIFT (7U)
  10055. #define USB_ERRSTAT_BTSERR(x) (((uint8_t)(((uint8_t)(x)) << USB_ERRSTAT_BTSERR_SHIFT)) & USB_ERRSTAT_BTSERR_MASK)
  10056. /*! @name ERREN - Error Interrupt Enable register */
  10057. #define USB_ERREN_PIDERREN_MASK (0x1U)
  10058. #define USB_ERREN_PIDERREN_SHIFT (0U)
  10059. #define USB_ERREN_PIDERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_PIDERREN_SHIFT)) & USB_ERREN_PIDERREN_MASK)
  10060. #define USB_ERREN_CRC5EOFEN_MASK (0x2U)
  10061. #define USB_ERREN_CRC5EOFEN_SHIFT (1U)
  10062. #define USB_ERREN_CRC5EOFEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_CRC5EOFEN_SHIFT)) & USB_ERREN_CRC5EOFEN_MASK)
  10063. #define USB_ERREN_CRC16EN_MASK (0x4U)
  10064. #define USB_ERREN_CRC16EN_SHIFT (2U)
  10065. #define USB_ERREN_CRC16EN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_CRC16EN_SHIFT)) & USB_ERREN_CRC16EN_MASK)
  10066. #define USB_ERREN_DFN8EN_MASK (0x8U)
  10067. #define USB_ERREN_DFN8EN_SHIFT (3U)
  10068. #define USB_ERREN_DFN8EN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_DFN8EN_SHIFT)) & USB_ERREN_DFN8EN_MASK)
  10069. #define USB_ERREN_BTOERREN_MASK (0x10U)
  10070. #define USB_ERREN_BTOERREN_SHIFT (4U)
  10071. #define USB_ERREN_BTOERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_BTOERREN_SHIFT)) & USB_ERREN_BTOERREN_MASK)
  10072. #define USB_ERREN_DMAERREN_MASK (0x20U)
  10073. #define USB_ERREN_DMAERREN_SHIFT (5U)
  10074. #define USB_ERREN_DMAERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_DMAERREN_SHIFT)) & USB_ERREN_DMAERREN_MASK)
  10075. #define USB_ERREN_BTSERREN_MASK (0x80U)
  10076. #define USB_ERREN_BTSERREN_SHIFT (7U)
  10077. #define USB_ERREN_BTSERREN(x) (((uint8_t)(((uint8_t)(x)) << USB_ERREN_BTSERREN_SHIFT)) & USB_ERREN_BTSERREN_MASK)
  10078. /*! @name STAT - Status register */
  10079. #define USB_STAT_ODD_MASK (0x4U)
  10080. #define USB_STAT_ODD_SHIFT (2U)
  10081. #define USB_STAT_ODD(x) (((uint8_t)(((uint8_t)(x)) << USB_STAT_ODD_SHIFT)) & USB_STAT_ODD_MASK)
  10082. #define USB_STAT_TX_MASK (0x8U)
  10083. #define USB_STAT_TX_SHIFT (3U)
  10084. #define USB_STAT_TX(x) (((uint8_t)(((uint8_t)(x)) << USB_STAT_TX_SHIFT)) & USB_STAT_TX_MASK)
  10085. #define USB_STAT_ENDP_MASK (0xF0U)
  10086. #define USB_STAT_ENDP_SHIFT (4U)
  10087. #define USB_STAT_ENDP(x) (((uint8_t)(((uint8_t)(x)) << USB_STAT_ENDP_SHIFT)) & USB_STAT_ENDP_MASK)
  10088. /*! @name CTL - Control register */
  10089. #define USB_CTL_USBENSOFEN_MASK (0x1U)
  10090. #define USB_CTL_USBENSOFEN_SHIFT (0U)
  10091. #define USB_CTL_USBENSOFEN(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_USBENSOFEN_SHIFT)) & USB_CTL_USBENSOFEN_MASK)
  10092. #define USB_CTL_ODDRST_MASK (0x2U)
  10093. #define USB_CTL_ODDRST_SHIFT (1U)
  10094. #define USB_CTL_ODDRST(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_ODDRST_SHIFT)) & USB_CTL_ODDRST_MASK)
  10095. #define USB_CTL_RESUME_MASK (0x4U)
  10096. #define USB_CTL_RESUME_SHIFT (2U)
  10097. #define USB_CTL_RESUME(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_RESUME_SHIFT)) & USB_CTL_RESUME_MASK)
  10098. #define USB_CTL_HOSTMODEEN_MASK (0x8U)
  10099. #define USB_CTL_HOSTMODEEN_SHIFT (3U)
  10100. #define USB_CTL_HOSTMODEEN(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_HOSTMODEEN_SHIFT)) & USB_CTL_HOSTMODEEN_MASK)
  10101. #define USB_CTL_RESET_MASK (0x10U)
  10102. #define USB_CTL_RESET_SHIFT (4U)
  10103. #define USB_CTL_RESET(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_RESET_SHIFT)) & USB_CTL_RESET_MASK)
  10104. #define USB_CTL_TXSUSPENDTOKENBUSY_MASK (0x20U)
  10105. #define USB_CTL_TXSUSPENDTOKENBUSY_SHIFT (5U)
  10106. #define USB_CTL_TXSUSPENDTOKENBUSY(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_TXSUSPENDTOKENBUSY_SHIFT)) & USB_CTL_TXSUSPENDTOKENBUSY_MASK)
  10107. #define USB_CTL_SE0_MASK (0x40U)
  10108. #define USB_CTL_SE0_SHIFT (6U)
  10109. #define USB_CTL_SE0(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_SE0_SHIFT)) & USB_CTL_SE0_MASK)
  10110. #define USB_CTL_JSTATE_MASK (0x80U)
  10111. #define USB_CTL_JSTATE_SHIFT (7U)
  10112. #define USB_CTL_JSTATE(x) (((uint8_t)(((uint8_t)(x)) << USB_CTL_JSTATE_SHIFT)) & USB_CTL_JSTATE_MASK)
  10113. /*! @name ADDR - Address register */
  10114. #define USB_ADDR_ADDR_MASK (0x7FU)
  10115. #define USB_ADDR_ADDR_SHIFT (0U)
  10116. #define USB_ADDR_ADDR(x) (((uint8_t)(((uint8_t)(x)) << USB_ADDR_ADDR_SHIFT)) & USB_ADDR_ADDR_MASK)
  10117. #define USB_ADDR_LSEN_MASK (0x80U)
  10118. #define USB_ADDR_LSEN_SHIFT (7U)
  10119. #define USB_ADDR_LSEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ADDR_LSEN_SHIFT)) & USB_ADDR_LSEN_MASK)
  10120. /*! @name BDTPAGE1 - BDT Page register 1 */
  10121. #define USB_BDTPAGE1_BDTBA_MASK (0xFEU)
  10122. #define USB_BDTPAGE1_BDTBA_SHIFT (1U)
  10123. #define USB_BDTPAGE1_BDTBA(x) (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE1_BDTBA_SHIFT)) & USB_BDTPAGE1_BDTBA_MASK)
  10124. /*! @name FRMNUML - Frame Number register Low */
  10125. #define USB_FRMNUML_FRM_MASK (0xFFU)
  10126. #define USB_FRMNUML_FRM_SHIFT (0U)
  10127. #define USB_FRMNUML_FRM(x) (((uint8_t)(((uint8_t)(x)) << USB_FRMNUML_FRM_SHIFT)) & USB_FRMNUML_FRM_MASK)
  10128. /*! @name FRMNUMH - Frame Number register High */
  10129. #define USB_FRMNUMH_FRM_MASK (0x7U)
  10130. #define USB_FRMNUMH_FRM_SHIFT (0U)
  10131. #define USB_FRMNUMH_FRM(x) (((uint8_t)(((uint8_t)(x)) << USB_FRMNUMH_FRM_SHIFT)) & USB_FRMNUMH_FRM_MASK)
  10132. /*! @name TOKEN - Token register */
  10133. #define USB_TOKEN_TOKENENDPT_MASK (0xFU)
  10134. #define USB_TOKEN_TOKENENDPT_SHIFT (0U)
  10135. #define USB_TOKEN_TOKENENDPT(x) (((uint8_t)(((uint8_t)(x)) << USB_TOKEN_TOKENENDPT_SHIFT)) & USB_TOKEN_TOKENENDPT_MASK)
  10136. #define USB_TOKEN_TOKENPID_MASK (0xF0U)
  10137. #define USB_TOKEN_TOKENPID_SHIFT (4U)
  10138. #define USB_TOKEN_TOKENPID(x) (((uint8_t)(((uint8_t)(x)) << USB_TOKEN_TOKENPID_SHIFT)) & USB_TOKEN_TOKENPID_MASK)
  10139. /*! @name SOFTHLD - SOF Threshold register */
  10140. #define USB_SOFTHLD_CNT_MASK (0xFFU)
  10141. #define USB_SOFTHLD_CNT_SHIFT (0U)
  10142. #define USB_SOFTHLD_CNT(x) (((uint8_t)(((uint8_t)(x)) << USB_SOFTHLD_CNT_SHIFT)) & USB_SOFTHLD_CNT_MASK)
  10143. /*! @name BDTPAGE2 - BDT Page Register 2 */
  10144. #define USB_BDTPAGE2_BDTBA_MASK (0xFFU)
  10145. #define USB_BDTPAGE2_BDTBA_SHIFT (0U)
  10146. #define USB_BDTPAGE2_BDTBA(x) (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE2_BDTBA_SHIFT)) & USB_BDTPAGE2_BDTBA_MASK)
  10147. /*! @name BDTPAGE3 - BDT Page Register 3 */
  10148. #define USB_BDTPAGE3_BDTBA_MASK (0xFFU)
  10149. #define USB_BDTPAGE3_BDTBA_SHIFT (0U)
  10150. #define USB_BDTPAGE3_BDTBA(x) (((uint8_t)(((uint8_t)(x)) << USB_BDTPAGE3_BDTBA_SHIFT)) & USB_BDTPAGE3_BDTBA_MASK)
  10151. /*! @name ENDPT - Endpoint Control register */
  10152. #define USB_ENDPT_EPHSHK_MASK (0x1U)
  10153. #define USB_ENDPT_EPHSHK_SHIFT (0U)
  10154. #define USB_ENDPT_EPHSHK(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPHSHK_SHIFT)) & USB_ENDPT_EPHSHK_MASK)
  10155. #define USB_ENDPT_EPSTALL_MASK (0x2U)
  10156. #define USB_ENDPT_EPSTALL_SHIFT (1U)
  10157. #define USB_ENDPT_EPSTALL(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPSTALL_SHIFT)) & USB_ENDPT_EPSTALL_MASK)
  10158. #define USB_ENDPT_EPTXEN_MASK (0x4U)
  10159. #define USB_ENDPT_EPTXEN_SHIFT (2U)
  10160. #define USB_ENDPT_EPTXEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPTXEN_SHIFT)) & USB_ENDPT_EPTXEN_MASK)
  10161. #define USB_ENDPT_EPRXEN_MASK (0x8U)
  10162. #define USB_ENDPT_EPRXEN_SHIFT (3U)
  10163. #define USB_ENDPT_EPRXEN(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPRXEN_SHIFT)) & USB_ENDPT_EPRXEN_MASK)
  10164. #define USB_ENDPT_EPCTLDIS_MASK (0x10U)
  10165. #define USB_ENDPT_EPCTLDIS_SHIFT (4U)
  10166. #define USB_ENDPT_EPCTLDIS(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_EPCTLDIS_SHIFT)) & USB_ENDPT_EPCTLDIS_MASK)
  10167. #define USB_ENDPT_RETRYDIS_MASK (0x40U)
  10168. #define USB_ENDPT_RETRYDIS_SHIFT (6U)
  10169. #define USB_ENDPT_RETRYDIS(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_RETRYDIS_SHIFT)) & USB_ENDPT_RETRYDIS_MASK)
  10170. #define USB_ENDPT_HOSTWOHUB_MASK (0x80U)
  10171. #define USB_ENDPT_HOSTWOHUB_SHIFT (7U)
  10172. #define USB_ENDPT_HOSTWOHUB(x) (((uint8_t)(((uint8_t)(x)) << USB_ENDPT_HOSTWOHUB_SHIFT)) & USB_ENDPT_HOSTWOHUB_MASK)
  10173. /* The count of USB_ENDPT */
  10174. #define USB_ENDPT_COUNT (16U)
  10175. /*! @name USBCTRL - USB Control register */
  10176. #define USB_USBCTRL_PDE_MASK (0x40U)
  10177. #define USB_USBCTRL_PDE_SHIFT (6U)
  10178. #define USB_USBCTRL_PDE(x) (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_PDE_SHIFT)) & USB_USBCTRL_PDE_MASK)
  10179. #define USB_USBCTRL_SUSP_MASK (0x80U)
  10180. #define USB_USBCTRL_SUSP_SHIFT (7U)
  10181. #define USB_USBCTRL_SUSP(x) (((uint8_t)(((uint8_t)(x)) << USB_USBCTRL_SUSP_SHIFT)) & USB_USBCTRL_SUSP_MASK)
  10182. /*! @name OBSERVE - USB OTG Observe register */
  10183. #define USB_OBSERVE_DMPD_MASK (0x10U)
  10184. #define USB_OBSERVE_DMPD_SHIFT (4U)
  10185. #define USB_OBSERVE_DMPD(x) (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DMPD_SHIFT)) & USB_OBSERVE_DMPD_MASK)
  10186. #define USB_OBSERVE_DPPD_MASK (0x40U)
  10187. #define USB_OBSERVE_DPPD_SHIFT (6U)
  10188. #define USB_OBSERVE_DPPD(x) (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DPPD_SHIFT)) & USB_OBSERVE_DPPD_MASK)
  10189. #define USB_OBSERVE_DPPU_MASK (0x80U)
  10190. #define USB_OBSERVE_DPPU_SHIFT (7U)
  10191. #define USB_OBSERVE_DPPU(x) (((uint8_t)(((uint8_t)(x)) << USB_OBSERVE_DPPU_SHIFT)) & USB_OBSERVE_DPPU_MASK)
  10192. /*! @name CONTROL - USB OTG Control register */
  10193. #define USB_CONTROL_DPPULLUPNONOTG_MASK (0x10U)
  10194. #define USB_CONTROL_DPPULLUPNONOTG_SHIFT (4U)
  10195. #define USB_CONTROL_DPPULLUPNONOTG(x) (((uint8_t)(((uint8_t)(x)) << USB_CONTROL_DPPULLUPNONOTG_SHIFT)) & USB_CONTROL_DPPULLUPNONOTG_MASK)
  10196. /*! @name USBTRC0 - USB Transceiver Control register 0 */
  10197. #define USB_USBTRC0_USB_RESUME_INT_MASK (0x1U)
  10198. #define USB_USBTRC0_USB_RESUME_INT_SHIFT (0U)
  10199. #define USB_USBTRC0_USB_RESUME_INT(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USB_RESUME_INT_SHIFT)) & USB_USBTRC0_USB_RESUME_INT_MASK)
  10200. #define USB_USBTRC0_SYNC_DET_MASK (0x2U)
  10201. #define USB_USBTRC0_SYNC_DET_SHIFT (1U)
  10202. #define USB_USBTRC0_SYNC_DET(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_SYNC_DET_SHIFT)) & USB_USBTRC0_SYNC_DET_MASK)
  10203. #define USB_USBTRC0_USB_CLK_RECOVERY_INT_MASK (0x4U)
  10204. #define USB_USBTRC0_USB_CLK_RECOVERY_INT_SHIFT (2U)
  10205. #define USB_USBTRC0_USB_CLK_RECOVERY_INT(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USB_CLK_RECOVERY_INT_SHIFT)) & USB_USBTRC0_USB_CLK_RECOVERY_INT_MASK)
  10206. #define USB_USBTRC0_USBRESMEN_MASK (0x20U)
  10207. #define USB_USBTRC0_USBRESMEN_SHIFT (5U)
  10208. #define USB_USBTRC0_USBRESMEN(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USBRESMEN_SHIFT)) & USB_USBTRC0_USBRESMEN_MASK)
  10209. #define USB_USBTRC0_USBRESET_MASK (0x80U)
  10210. #define USB_USBTRC0_USBRESET_SHIFT (7U)
  10211. #define USB_USBTRC0_USBRESET(x) (((uint8_t)(((uint8_t)(x)) << USB_USBTRC0_USBRESET_SHIFT)) & USB_USBTRC0_USBRESET_MASK)
  10212. /*! @name USBFRMADJUST - Frame Adjust Register */
  10213. #define USB_USBFRMADJUST_ADJ_MASK (0xFFU)
  10214. #define USB_USBFRMADJUST_ADJ_SHIFT (0U)
  10215. #define USB_USBFRMADJUST_ADJ(x) (((uint8_t)(((uint8_t)(x)) << USB_USBFRMADJUST_ADJ_SHIFT)) & USB_USBFRMADJUST_ADJ_MASK)
  10216. /*! @name CLK_RECOVER_CTRL - USB Clock recovery control */
  10217. #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_MASK (0x20U)
  10218. #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_SHIFT (5U)
  10219. #define USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_RESTART_IFRTRIM_EN_MASK)
  10220. #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_MASK (0x40U)
  10221. #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_SHIFT (6U)
  10222. #define USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_RESET_RESUME_ROUGH_EN_MASK)
  10223. #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK (0x80U)
  10224. #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_SHIFT (7U)
  10225. #define USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_SHIFT)) & USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK)
  10226. /*! @name CLK_RECOVER_IRC_EN - IRC48M oscillator enable register */
  10227. #define USB_CLK_RECOVER_IRC_EN_REG_EN_MASK (0x1U)
  10228. #define USB_CLK_RECOVER_IRC_EN_REG_EN_SHIFT (0U)
  10229. #define USB_CLK_RECOVER_IRC_EN_REG_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_IRC_EN_REG_EN_SHIFT)) & USB_CLK_RECOVER_IRC_EN_REG_EN_MASK)
  10230. #define USB_CLK_RECOVER_IRC_EN_IRC_EN_MASK (0x2U)
  10231. #define USB_CLK_RECOVER_IRC_EN_IRC_EN_SHIFT (1U)
  10232. #define USB_CLK_RECOVER_IRC_EN_IRC_EN(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_IRC_EN_IRC_EN_SHIFT)) & USB_CLK_RECOVER_IRC_EN_IRC_EN_MASK)
  10233. /*! @name CLK_RECOVER_INT_STATUS - Clock recovery separated interrupt status */
  10234. #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_MASK (0x10U)
  10235. #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_SHIFT (4U)
  10236. #define USB_CLK_RECOVER_INT_STATUS_OVF_ERROR(x) (((uint8_t)(((uint8_t)(x)) << USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_SHIFT)) & USB_CLK_RECOVER_INT_STATUS_OVF_ERROR_MASK)
  10237. /*!
  10238. * @}
  10239. */ /* end of group USB_Register_Masks */
  10240. /* USB - Peripheral instance base addresses */
  10241. /** Peripheral USB0 base address */
  10242. #define USB0_BASE (0x40072000u)
  10243. /** Peripheral USB0 base pointer */
  10244. #define USB0 ((USB_Type *)USB0_BASE)
  10245. /** Array initializer of USB peripheral base addresses */
  10246. #define USB_BASE_ADDRS { USB0_BASE }
  10247. /** Array initializer of USB peripheral base pointers */
  10248. #define USB_BASE_PTRS { USB0 }
  10249. /** Interrupt vectors for the USB peripheral type */
  10250. #define USB_IRQS { USB0_IRQn }
  10251. /*!
  10252. * @}
  10253. */ /* end of group USB_Peripheral_Access_Layer */
  10254. /* ----------------------------------------------------------------------------
  10255. -- USBDCD Peripheral Access Layer
  10256. ---------------------------------------------------------------------------- */
  10257. /*!
  10258. * @addtogroup USBDCD_Peripheral_Access_Layer USBDCD Peripheral Access Layer
  10259. * @{
  10260. */
  10261. /** USBDCD - Register Layout Typedef */
  10262. typedef struct {
  10263. __IO uint32_t CONTROL; /**< Control register, offset: 0x0 */
  10264. __IO uint32_t CLOCK; /**< Clock register, offset: 0x4 */
  10265. __I uint32_t STATUS; /**< Status register, offset: 0x8 */
  10266. uint8_t RESERVED_0[4];
  10267. __IO uint32_t TIMER0; /**< TIMER0 register, offset: 0x10 */
  10268. __IO uint32_t TIMER1; /**< TIMER1 register, offset: 0x14 */
  10269. union { /* offset: 0x18 */
  10270. __IO uint32_t TIMER2_BC11; /**< TIMER2_BC11 register, offset: 0x18 */
  10271. __IO uint32_t TIMER2_BC12; /**< TIMER2_BC12 register, offset: 0x18 */
  10272. };
  10273. } USBDCD_Type;
  10274. /* ----------------------------------------------------------------------------
  10275. -- USBDCD Register Masks
  10276. ---------------------------------------------------------------------------- */
  10277. /*!
  10278. * @addtogroup USBDCD_Register_Masks USBDCD Register Masks
  10279. * @{
  10280. */
  10281. /*! @name CONTROL - Control register */
  10282. #define USBDCD_CONTROL_IACK_MASK (0x1U)
  10283. #define USBDCD_CONTROL_IACK_SHIFT (0U)
  10284. #define USBDCD_CONTROL_IACK(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_IACK_SHIFT)) & USBDCD_CONTROL_IACK_MASK)
  10285. #define USBDCD_CONTROL_IF_MASK (0x100U)
  10286. #define USBDCD_CONTROL_IF_SHIFT (8U)
  10287. #define USBDCD_CONTROL_IF(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_IF_SHIFT)) & USBDCD_CONTROL_IF_MASK)
  10288. #define USBDCD_CONTROL_IE_MASK (0x10000U)
  10289. #define USBDCD_CONTROL_IE_SHIFT (16U)
  10290. #define USBDCD_CONTROL_IE(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_IE_SHIFT)) & USBDCD_CONTROL_IE_MASK)
  10291. #define USBDCD_CONTROL_BC12_MASK (0x20000U)
  10292. #define USBDCD_CONTROL_BC12_SHIFT (17U)
  10293. #define USBDCD_CONTROL_BC12(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_BC12_SHIFT)) & USBDCD_CONTROL_BC12_MASK)
  10294. #define USBDCD_CONTROL_START_MASK (0x1000000U)
  10295. #define USBDCD_CONTROL_START_SHIFT (24U)
  10296. #define USBDCD_CONTROL_START(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_START_SHIFT)) & USBDCD_CONTROL_START_MASK)
  10297. #define USBDCD_CONTROL_SR_MASK (0x2000000U)
  10298. #define USBDCD_CONTROL_SR_SHIFT (25U)
  10299. #define USBDCD_CONTROL_SR(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CONTROL_SR_SHIFT)) & USBDCD_CONTROL_SR_MASK)
  10300. /*! @name CLOCK - Clock register */
  10301. #define USBDCD_CLOCK_CLOCK_UNIT_MASK (0x1U)
  10302. #define USBDCD_CLOCK_CLOCK_UNIT_SHIFT (0U)
  10303. #define USBDCD_CLOCK_CLOCK_UNIT(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CLOCK_CLOCK_UNIT_SHIFT)) & USBDCD_CLOCK_CLOCK_UNIT_MASK)
  10304. #define USBDCD_CLOCK_CLOCK_SPEED_MASK (0xFFCU)
  10305. #define USBDCD_CLOCK_CLOCK_SPEED_SHIFT (2U)
  10306. #define USBDCD_CLOCK_CLOCK_SPEED(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_CLOCK_CLOCK_SPEED_SHIFT)) & USBDCD_CLOCK_CLOCK_SPEED_MASK)
  10307. /*! @name STATUS - Status register */
  10308. #define USBDCD_STATUS_SEQ_RES_MASK (0x30000U)
  10309. #define USBDCD_STATUS_SEQ_RES_SHIFT (16U)
  10310. #define USBDCD_STATUS_SEQ_RES(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_STATUS_SEQ_RES_SHIFT)) & USBDCD_STATUS_SEQ_RES_MASK)
  10311. #define USBDCD_STATUS_SEQ_STAT_MASK (0xC0000U)
  10312. #define USBDCD_STATUS_SEQ_STAT_SHIFT (18U)
  10313. #define USBDCD_STATUS_SEQ_STAT(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_STATUS_SEQ_STAT_SHIFT)) & USBDCD_STATUS_SEQ_STAT_MASK)
  10314. #define USBDCD_STATUS_ERR_MASK (0x100000U)
  10315. #define USBDCD_STATUS_ERR_SHIFT (20U)
  10316. #define USBDCD_STATUS_ERR(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_STATUS_ERR_SHIFT)) & USBDCD_STATUS_ERR_MASK)
  10317. #define USBDCD_STATUS_TO_MASK (0x200000U)
  10318. #define USBDCD_STATUS_TO_SHIFT (21U)
  10319. #define USBDCD_STATUS_TO(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_STATUS_TO_SHIFT)) & USBDCD_STATUS_TO_MASK)
  10320. #define USBDCD_STATUS_ACTIVE_MASK (0x400000U)
  10321. #define USBDCD_STATUS_ACTIVE_SHIFT (22U)
  10322. #define USBDCD_STATUS_ACTIVE(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_STATUS_ACTIVE_SHIFT)) & USBDCD_STATUS_ACTIVE_MASK)
  10323. /*! @name TIMER0 - TIMER0 register */
  10324. #define USBDCD_TIMER0_TUNITCON_MASK (0xFFFU)
  10325. #define USBDCD_TIMER0_TUNITCON_SHIFT (0U)
  10326. #define USBDCD_TIMER0_TUNITCON(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER0_TUNITCON_SHIFT)) & USBDCD_TIMER0_TUNITCON_MASK)
  10327. #define USBDCD_TIMER0_TSEQ_INIT_MASK (0x3FF0000U)
  10328. #define USBDCD_TIMER0_TSEQ_INIT_SHIFT (16U)
  10329. #define USBDCD_TIMER0_TSEQ_INIT(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER0_TSEQ_INIT_SHIFT)) & USBDCD_TIMER0_TSEQ_INIT_MASK)
  10330. /*! @name TIMER1 - TIMER1 register */
  10331. #define USBDCD_TIMER1_TVDPSRC_ON_MASK (0x3FFU)
  10332. #define USBDCD_TIMER1_TVDPSRC_ON_SHIFT (0U)
  10333. #define USBDCD_TIMER1_TVDPSRC_ON(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER1_TVDPSRC_ON_SHIFT)) & USBDCD_TIMER1_TVDPSRC_ON_MASK)
  10334. #define USBDCD_TIMER1_TDCD_DBNC_MASK (0x3FF0000U)
  10335. #define USBDCD_TIMER1_TDCD_DBNC_SHIFT (16U)
  10336. #define USBDCD_TIMER1_TDCD_DBNC(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER1_TDCD_DBNC_SHIFT)) & USBDCD_TIMER1_TDCD_DBNC_MASK)
  10337. /*! @name TIMER2_BC11 - TIMER2_BC11 register */
  10338. #define USBDCD_TIMER2_BC11_CHECK_DM_MASK (0xFU)
  10339. #define USBDCD_TIMER2_BC11_CHECK_DM_SHIFT (0U)
  10340. #define USBDCD_TIMER2_BC11_CHECK_DM(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER2_BC11_CHECK_DM_SHIFT)) & USBDCD_TIMER2_BC11_CHECK_DM_MASK)
  10341. #define USBDCD_TIMER2_BC11_TVDPSRC_CON_MASK (0x3FF0000U)
  10342. #define USBDCD_TIMER2_BC11_TVDPSRC_CON_SHIFT (16U)
  10343. #define USBDCD_TIMER2_BC11_TVDPSRC_CON(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER2_BC11_TVDPSRC_CON_SHIFT)) & USBDCD_TIMER2_BC11_TVDPSRC_CON_MASK)
  10344. /*! @name TIMER2_BC12 - TIMER2_BC12 register */
  10345. #define USBDCD_TIMER2_BC12_TVDMSRC_ON_MASK (0x3FFU)
  10346. #define USBDCD_TIMER2_BC12_TVDMSRC_ON_SHIFT (0U)
  10347. #define USBDCD_TIMER2_BC12_TVDMSRC_ON(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER2_BC12_TVDMSRC_ON_SHIFT)) & USBDCD_TIMER2_BC12_TVDMSRC_ON_MASK)
  10348. #define USBDCD_TIMER2_BC12_TWAIT_AFTER_PRD_MASK (0x3FF0000U)
  10349. #define USBDCD_TIMER2_BC12_TWAIT_AFTER_PRD_SHIFT (16U)
  10350. #define USBDCD_TIMER2_BC12_TWAIT_AFTER_PRD(x) (((uint32_t)(((uint32_t)(x)) << USBDCD_TIMER2_BC12_TWAIT_AFTER_PRD_SHIFT)) & USBDCD_TIMER2_BC12_TWAIT_AFTER_PRD_MASK)
  10351. /*!
  10352. * @}
  10353. */ /* end of group USBDCD_Register_Masks */
  10354. /* USBDCD - Peripheral instance base addresses */
  10355. /** Peripheral USBDCD base address */
  10356. #define USBDCD_BASE (0x40035000u)
  10357. /** Peripheral USBDCD base pointer */
  10358. #define USBDCD ((USBDCD_Type *)USBDCD_BASE)
  10359. /** Array initializer of USBDCD peripheral base addresses */
  10360. #define USBDCD_BASE_ADDRS { USBDCD_BASE }
  10361. /** Array initializer of USBDCD peripheral base pointers */
  10362. #define USBDCD_BASE_PTRS { USBDCD }
  10363. /** Interrupt vectors for the USBDCD peripheral type */
  10364. #define USBDCD_IRQS { USBDCD_IRQn }
  10365. /*!
  10366. * @}
  10367. */ /* end of group USBDCD_Peripheral_Access_Layer */
  10368. /* ----------------------------------------------------------------------------
  10369. -- VREF Peripheral Access Layer
  10370. ---------------------------------------------------------------------------- */
  10371. /*!
  10372. * @addtogroup VREF_Peripheral_Access_Layer VREF Peripheral Access Layer
  10373. * @{
  10374. */
  10375. /** VREF - Register Layout Typedef */
  10376. typedef struct {
  10377. __IO uint8_t TRM; /**< VREF Trim Register, offset: 0x0 */
  10378. __IO uint8_t SC; /**< VREF Status and Control Register, offset: 0x1 */
  10379. } VREF_Type;
  10380. /* ----------------------------------------------------------------------------
  10381. -- VREF Register Masks
  10382. ---------------------------------------------------------------------------- */
  10383. /*!
  10384. * @addtogroup VREF_Register_Masks VREF Register Masks
  10385. * @{
  10386. */
  10387. /*! @name TRM - VREF Trim Register */
  10388. #define VREF_TRM_TRIM_MASK (0x3FU)
  10389. #define VREF_TRM_TRIM_SHIFT (0U)
  10390. #define VREF_TRM_TRIM(x) (((uint8_t)(((uint8_t)(x)) << VREF_TRM_TRIM_SHIFT)) & VREF_TRM_TRIM_MASK)
  10391. #define VREF_TRM_CHOPEN_MASK (0x40U)
  10392. #define VREF_TRM_CHOPEN_SHIFT (6U)
  10393. #define VREF_TRM_CHOPEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_TRM_CHOPEN_SHIFT)) & VREF_TRM_CHOPEN_MASK)
  10394. /*! @name SC - VREF Status and Control Register */
  10395. #define VREF_SC_MODE_LV_MASK (0x3U)
  10396. #define VREF_SC_MODE_LV_SHIFT (0U)
  10397. #define VREF_SC_MODE_LV(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_MODE_LV_SHIFT)) & VREF_SC_MODE_LV_MASK)
  10398. #define VREF_SC_VREFST_MASK (0x4U)
  10399. #define VREF_SC_VREFST_SHIFT (2U)
  10400. #define VREF_SC_VREFST(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_VREFST_SHIFT)) & VREF_SC_VREFST_MASK)
  10401. #define VREF_SC_ICOMPEN_MASK (0x20U)
  10402. #define VREF_SC_ICOMPEN_SHIFT (5U)
  10403. #define VREF_SC_ICOMPEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_ICOMPEN_SHIFT)) & VREF_SC_ICOMPEN_MASK)
  10404. #define VREF_SC_REGEN_MASK (0x40U)
  10405. #define VREF_SC_REGEN_SHIFT (6U)
  10406. #define VREF_SC_REGEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_REGEN_SHIFT)) & VREF_SC_REGEN_MASK)
  10407. #define VREF_SC_VREFEN_MASK (0x80U)
  10408. #define VREF_SC_VREFEN_SHIFT (7U)
  10409. #define VREF_SC_VREFEN(x) (((uint8_t)(((uint8_t)(x)) << VREF_SC_VREFEN_SHIFT)) & VREF_SC_VREFEN_MASK)
  10410. /*!
  10411. * @}
  10412. */ /* end of group VREF_Register_Masks */
  10413. /* VREF - Peripheral instance base addresses */
  10414. /** Peripheral VREF base address */
  10415. #define VREF_BASE (0x40074000u)
  10416. /** Peripheral VREF base pointer */
  10417. #define VREF ((VREF_Type *)VREF_BASE)
  10418. /** Array initializer of VREF peripheral base addresses */
  10419. #define VREF_BASE_ADDRS { VREF_BASE }
  10420. /** Array initializer of VREF peripheral base pointers */
  10421. #define VREF_BASE_PTRS { VREF }
  10422. /*!
  10423. * @}
  10424. */ /* end of group VREF_Peripheral_Access_Layer */
  10425. /* ----------------------------------------------------------------------------
  10426. -- WDOG Peripheral Access Layer
  10427. ---------------------------------------------------------------------------- */
  10428. /*!
  10429. * @addtogroup WDOG_Peripheral_Access_Layer WDOG Peripheral Access Layer
  10430. * @{
  10431. */
  10432. /** WDOG - Register Layout Typedef */
  10433. typedef struct {
  10434. __IO uint16_t STCTRLH; /**< Watchdog Status and Control Register High, offset: 0x0 */
  10435. __IO uint16_t STCTRLL; /**< Watchdog Status and Control Register Low, offset: 0x2 */
  10436. __IO uint16_t TOVALH; /**< Watchdog Time-out Value Register High, offset: 0x4 */
  10437. __IO uint16_t TOVALL; /**< Watchdog Time-out Value Register Low, offset: 0x6 */
  10438. __IO uint16_t WINH; /**< Watchdog Window Register High, offset: 0x8 */
  10439. __IO uint16_t WINL; /**< Watchdog Window Register Low, offset: 0xA */
  10440. __IO uint16_t REFRESH; /**< Watchdog Refresh register, offset: 0xC */
  10441. __IO uint16_t UNLOCK; /**< Watchdog Unlock register, offset: 0xE */
  10442. __IO uint16_t TMROUTH; /**< Watchdog Timer Output Register High, offset: 0x10 */
  10443. __IO uint16_t TMROUTL; /**< Watchdog Timer Output Register Low, offset: 0x12 */
  10444. __IO uint16_t RSTCNT; /**< Watchdog Reset Count register, offset: 0x14 */
  10445. __IO uint16_t PRESC; /**< Watchdog Prescaler register, offset: 0x16 */
  10446. } WDOG_Type;
  10447. /* ----------------------------------------------------------------------------
  10448. -- WDOG Register Masks
  10449. ---------------------------------------------------------------------------- */
  10450. /*!
  10451. * @addtogroup WDOG_Register_Masks WDOG Register Masks
  10452. * @{
  10453. */
  10454. /*! @name STCTRLH - Watchdog Status and Control Register High */
  10455. #define WDOG_STCTRLH_WDOGEN_MASK (0x1U)
  10456. #define WDOG_STCTRLH_WDOGEN_SHIFT (0U)
  10457. #define WDOG_STCTRLH_WDOGEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_WDOGEN_SHIFT)) & WDOG_STCTRLH_WDOGEN_MASK)
  10458. #define WDOG_STCTRLH_CLKSRC_MASK (0x2U)
  10459. #define WDOG_STCTRLH_CLKSRC_SHIFT (1U)
  10460. #define WDOG_STCTRLH_CLKSRC(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_CLKSRC_SHIFT)) & WDOG_STCTRLH_CLKSRC_MASK)
  10461. #define WDOG_STCTRLH_IRQRSTEN_MASK (0x4U)
  10462. #define WDOG_STCTRLH_IRQRSTEN_SHIFT (2U)
  10463. #define WDOG_STCTRLH_IRQRSTEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_IRQRSTEN_SHIFT)) & WDOG_STCTRLH_IRQRSTEN_MASK)
  10464. #define WDOG_STCTRLH_WINEN_MASK (0x8U)
  10465. #define WDOG_STCTRLH_WINEN_SHIFT (3U)
  10466. #define WDOG_STCTRLH_WINEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_WINEN_SHIFT)) & WDOG_STCTRLH_WINEN_MASK)
  10467. #define WDOG_STCTRLH_ALLOWUPDATE_MASK (0x10U)
  10468. #define WDOG_STCTRLH_ALLOWUPDATE_SHIFT (4U)
  10469. #define WDOG_STCTRLH_ALLOWUPDATE(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_ALLOWUPDATE_SHIFT)) & WDOG_STCTRLH_ALLOWUPDATE_MASK)
  10470. #define WDOG_STCTRLH_DBGEN_MASK (0x20U)
  10471. #define WDOG_STCTRLH_DBGEN_SHIFT (5U)
  10472. #define WDOG_STCTRLH_DBGEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_DBGEN_SHIFT)) & WDOG_STCTRLH_DBGEN_MASK)
  10473. #define WDOG_STCTRLH_STOPEN_MASK (0x40U)
  10474. #define WDOG_STCTRLH_STOPEN_SHIFT (6U)
  10475. #define WDOG_STCTRLH_STOPEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_STOPEN_SHIFT)) & WDOG_STCTRLH_STOPEN_MASK)
  10476. #define WDOG_STCTRLH_WAITEN_MASK (0x80U)
  10477. #define WDOG_STCTRLH_WAITEN_SHIFT (7U)
  10478. #define WDOG_STCTRLH_WAITEN(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_WAITEN_SHIFT)) & WDOG_STCTRLH_WAITEN_MASK)
  10479. #define WDOG_STCTRLH_TESTWDOG_MASK (0x400U)
  10480. #define WDOG_STCTRLH_TESTWDOG_SHIFT (10U)
  10481. #define WDOG_STCTRLH_TESTWDOG(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_TESTWDOG_SHIFT)) & WDOG_STCTRLH_TESTWDOG_MASK)
  10482. #define WDOG_STCTRLH_TESTSEL_MASK (0x800U)
  10483. #define WDOG_STCTRLH_TESTSEL_SHIFT (11U)
  10484. #define WDOG_STCTRLH_TESTSEL(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_TESTSEL_SHIFT)) & WDOG_STCTRLH_TESTSEL_MASK)
  10485. #define WDOG_STCTRLH_BYTESEL_MASK (0x3000U)
  10486. #define WDOG_STCTRLH_BYTESEL_SHIFT (12U)
  10487. #define WDOG_STCTRLH_BYTESEL(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_BYTESEL_SHIFT)) & WDOG_STCTRLH_BYTESEL_MASK)
  10488. #define WDOG_STCTRLH_DISTESTWDOG_MASK (0x4000U)
  10489. #define WDOG_STCTRLH_DISTESTWDOG_SHIFT (14U)
  10490. #define WDOG_STCTRLH_DISTESTWDOG(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLH_DISTESTWDOG_SHIFT)) & WDOG_STCTRLH_DISTESTWDOG_MASK)
  10491. /*! @name STCTRLL - Watchdog Status and Control Register Low */
  10492. #define WDOG_STCTRLL_INTFLG_MASK (0x8000U)
  10493. #define WDOG_STCTRLL_INTFLG_SHIFT (15U)
  10494. #define WDOG_STCTRLL_INTFLG(x) (((uint16_t)(((uint16_t)(x)) << WDOG_STCTRLL_INTFLG_SHIFT)) & WDOG_STCTRLL_INTFLG_MASK)
  10495. /*! @name TOVALH - Watchdog Time-out Value Register High */
  10496. #define WDOG_TOVALH_TOVALHIGH_MASK (0xFFFFU)
  10497. #define WDOG_TOVALH_TOVALHIGH_SHIFT (0U)
  10498. #define WDOG_TOVALH_TOVALHIGH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TOVALH_TOVALHIGH_SHIFT)) & WDOG_TOVALH_TOVALHIGH_MASK)
  10499. /*! @name TOVALL - Watchdog Time-out Value Register Low */
  10500. #define WDOG_TOVALL_TOVALLOW_MASK (0xFFFFU)
  10501. #define WDOG_TOVALL_TOVALLOW_SHIFT (0U)
  10502. #define WDOG_TOVALL_TOVALLOW(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TOVALL_TOVALLOW_SHIFT)) & WDOG_TOVALL_TOVALLOW_MASK)
  10503. /*! @name WINH - Watchdog Window Register High */
  10504. #define WDOG_WINH_WINHIGH_MASK (0xFFFFU)
  10505. #define WDOG_WINH_WINHIGH_SHIFT (0U)
  10506. #define WDOG_WINH_WINHIGH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_WINH_WINHIGH_SHIFT)) & WDOG_WINH_WINHIGH_MASK)
  10507. /*! @name WINL - Watchdog Window Register Low */
  10508. #define WDOG_WINL_WINLOW_MASK (0xFFFFU)
  10509. #define WDOG_WINL_WINLOW_SHIFT (0U)
  10510. #define WDOG_WINL_WINLOW(x) (((uint16_t)(((uint16_t)(x)) << WDOG_WINL_WINLOW_SHIFT)) & WDOG_WINL_WINLOW_MASK)
  10511. /*! @name REFRESH - Watchdog Refresh register */
  10512. #define WDOG_REFRESH_WDOGREFRESH_MASK (0xFFFFU)
  10513. #define WDOG_REFRESH_WDOGREFRESH_SHIFT (0U)
  10514. #define WDOG_REFRESH_WDOGREFRESH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_REFRESH_WDOGREFRESH_SHIFT)) & WDOG_REFRESH_WDOGREFRESH_MASK)
  10515. /*! @name UNLOCK - Watchdog Unlock register */
  10516. #define WDOG_UNLOCK_WDOGUNLOCK_MASK (0xFFFFU)
  10517. #define WDOG_UNLOCK_WDOGUNLOCK_SHIFT (0U)
  10518. #define WDOG_UNLOCK_WDOGUNLOCK(x) (((uint16_t)(((uint16_t)(x)) << WDOG_UNLOCK_WDOGUNLOCK_SHIFT)) & WDOG_UNLOCK_WDOGUNLOCK_MASK)
  10519. /*! @name TMROUTH - Watchdog Timer Output Register High */
  10520. #define WDOG_TMROUTH_TIMEROUTHIGH_MASK (0xFFFFU)
  10521. #define WDOG_TMROUTH_TIMEROUTHIGH_SHIFT (0U)
  10522. #define WDOG_TMROUTH_TIMEROUTHIGH(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TMROUTH_TIMEROUTHIGH_SHIFT)) & WDOG_TMROUTH_TIMEROUTHIGH_MASK)
  10523. /*! @name TMROUTL - Watchdog Timer Output Register Low */
  10524. #define WDOG_TMROUTL_TIMEROUTLOW_MASK (0xFFFFU)
  10525. #define WDOG_TMROUTL_TIMEROUTLOW_SHIFT (0U)
  10526. #define WDOG_TMROUTL_TIMEROUTLOW(x) (((uint16_t)(((uint16_t)(x)) << WDOG_TMROUTL_TIMEROUTLOW_SHIFT)) & WDOG_TMROUTL_TIMEROUTLOW_MASK)
  10527. /*! @name RSTCNT - Watchdog Reset Count register */
  10528. #define WDOG_RSTCNT_RSTCNT_MASK (0xFFFFU)
  10529. #define WDOG_RSTCNT_RSTCNT_SHIFT (0U)
  10530. #define WDOG_RSTCNT_RSTCNT(x) (((uint16_t)(((uint16_t)(x)) << WDOG_RSTCNT_RSTCNT_SHIFT)) & WDOG_RSTCNT_RSTCNT_MASK)
  10531. /*! @name PRESC - Watchdog Prescaler register */
  10532. #define WDOG_PRESC_PRESCVAL_MASK (0x700U)
  10533. #define WDOG_PRESC_PRESCVAL_SHIFT (8U)
  10534. #define WDOG_PRESC_PRESCVAL(x) (((uint16_t)(((uint16_t)(x)) << WDOG_PRESC_PRESCVAL_SHIFT)) & WDOG_PRESC_PRESCVAL_MASK)
  10535. /*!
  10536. * @}
  10537. */ /* end of group WDOG_Register_Masks */
  10538. /* WDOG - Peripheral instance base addresses */
  10539. /** Peripheral WDOG base address */
  10540. #define WDOG_BASE (0x40052000u)
  10541. /** Peripheral WDOG base pointer */
  10542. #define WDOG ((WDOG_Type *)WDOG_BASE)
  10543. /** Array initializer of WDOG peripheral base addresses */
  10544. #define WDOG_BASE_ADDRS { WDOG_BASE }
  10545. /** Array initializer of WDOG peripheral base pointers */
  10546. #define WDOG_BASE_PTRS { WDOG }
  10547. /** Interrupt vectors for the WDOG peripheral type */
  10548. #define WDOG_IRQS { WDOG_EWM_IRQn }
  10549. /*!
  10550. * @}
  10551. */ /* end of group WDOG_Peripheral_Access_Layer */
  10552. /*
  10553. ** End of section using anonymous unions
  10554. */
  10555. #if defined(__ARMCC_VERSION)
  10556. #pragma pop
  10557. #elif defined(__CWCC__)
  10558. #pragma pop
  10559. #elif defined(__GNUC__)
  10560. /* leave anonymous unions enabled */
  10561. #elif defined(__IAR_SYSTEMS_ICC__)
  10562. #pragma language=default
  10563. #else
  10564. #error Not supported compiler type
  10565. #endif
  10566. /*!
  10567. * @}
  10568. */ /* end of group Peripheral_access_layer */
  10569. /* ----------------------------------------------------------------------------
  10570. -- Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
  10571. ---------------------------------------------------------------------------- */
  10572. /*!
  10573. * @addtogroup Bit_Field_Generic_Macros Macros for use with bit field definitions (xxx_SHIFT, xxx_MASK).
  10574. * @{
  10575. */
  10576. #if defined(__ARMCC_VERSION)
  10577. #if (__ARMCC_VERSION >= 6010050)
  10578. #pragma clang system_header
  10579. #endif
  10580. #elif defined(__IAR_SYSTEMS_ICC__)
  10581. #pragma system_include
  10582. #endif
  10583. /**
  10584. * @brief Mask and left-shift a bit field value for use in a register bit range.
  10585. * @param field Name of the register bit field.
  10586. * @param value Value of the bit field.
  10587. * @return Masked and shifted value.
  10588. */
  10589. #define NXP_VAL2FLD(field, value) (((value) << (field ## _SHIFT)) & (field ## _MASK))
  10590. /**
  10591. * @brief Mask and right-shift a register value to extract a bit field value.
  10592. * @param field Name of the register bit field.
  10593. * @param value Value of the register.
  10594. * @return Masked and shifted bit field value.
  10595. */
  10596. #define NXP_FLD2VAL(field, value) (((value) & (field ## _MASK)) >> (field ## _SHIFT))
  10597. /*!
  10598. * @}
  10599. */ /* end of group Bit_Field_Generic_Macros */
  10600. /* ----------------------------------------------------------------------------
  10601. -- SDK Compatibility
  10602. ---------------------------------------------------------------------------- */
  10603. /*!
  10604. * @addtogroup SDK_Compatibility_Symbols SDK Compatibility
  10605. * @{
  10606. */
  10607. #define MCG_C2_EREFS0_MASK MCG_C2_EREFS_MASK
  10608. #define MCG_C2_EREFS0_SHIFT MCG_C2_EREFS_SHIFT
  10609. #define MCG_C2_HGO0_MASK MCG_C2_HGO_MASK
  10610. #define MCG_C2_HGO0_SHIFT MCG_C2_HGO_SHIFT
  10611. #define MCG_C2_RANGE0_MASK MCG_C2_RANGE_MASK
  10612. #define MCG_C2_RANGE0_SHIFT MCG_C2_RANGE_SHIFT
  10613. #define MCG_C2_RANGE0(x) MCG_C2_RANGE(x)
  10614. #define MCM_ISR_REG(base) MCM_ISCR_REG(base)
  10615. #define MCM_ISR_FIOC_MASK MCM_ISCR_FIOC_MASK
  10616. #define MCM_ISR_FIOC_SHIFT MCM_ISCR_FIOC_SHIFT
  10617. #define MCM_ISR_FDZC_MASK MCM_ISCR_FDZC_MASK
  10618. #define MCM_ISR_FDZC_SHIFT MCM_ISCR_FDZC_SHIFT
  10619. #define MCM_ISR_FOFC_MASK MCM_ISCR_FOFC_MASK
  10620. #define MCM_ISR_FOFC_SHIFT MCM_ISCR_FOFC_SHIFT
  10621. #define MCM_ISR_FUFC_MASK MCM_ISCR_FUFC_MASK
  10622. #define MCM_ISR_FUFC_SHIFT MCM_ISCR_FUFC_SHIFT
  10623. #define MCM_ISR_FIXC_MASK MCM_ISCR_FIXC_MASK
  10624. #define MCM_ISR_FIXC_SHIFT MCM_ISCR_FIXC_SHIFT
  10625. #define MCM_ISR_FIDC_MASK MCM_ISCR_FIDC_MASK
  10626. #define MCM_ISR_FIDC_SHIFT MCM_ISCR_FIDC_SHIFT
  10627. #define MCM_ISR_FIOCE_MASK MCM_ISCR_FIOCE_MASK
  10628. #define MCM_ISR_FIOCE_SHIFT MCM_ISCR_FIOCE_SHIFT
  10629. #define MCM_ISR_FDZCE_MASK MCM_ISCR_FDZCE_MASK
  10630. #define MCM_ISR_FDZCE_SHIFT MCM_ISCR_FDZCE_SHIFT
  10631. #define MCM_ISR_FOFCE_MASK MCM_ISCR_FOFCE_MASK
  10632. #define MCM_ISR_FOFCE_SHIFT MCM_ISCR_FOFCE_SHIFT
  10633. #define MCM_ISR_FUFCE_MASK MCM_ISCR_FUFCE_MASK
  10634. #define MCM_ISR_FUFCE_SHIFT MCM_ISCR_FUFCE_SHIFT
  10635. #define MCM_ISR_FIXCE_MASK MCM_ISCR_FIXCE_MASK
  10636. #define MCM_ISR_FIXCE_SHIFT MCM_ISCR_FIXCE_SHIFT
  10637. #define MCM_ISR_FIDCE_MASK MCM_ISCR_FIDCE_MASK
  10638. #define MCM_ISR_FIDCE_SHIFT MCM_ISCR_FIDCE_SHIFT
  10639. #define DSPI0 SPI0
  10640. #define DSPI1 SPI1
  10641. #define DSPI2 SPI2
  10642. #define FLEXCAN0 CAN0
  10643. #define PTA_BASE GPIOA_BASE
  10644. #define PTA GPIOA
  10645. #define PTB_BASE GPIOB_BASE
  10646. #define PTB GPIOB
  10647. #define PTC_BASE GPIOC_BASE
  10648. #define PTC GPIOC
  10649. #define PTD_BASE GPIOD_BASE
  10650. #define PTD GPIOD
  10651. #define PTE_BASE GPIOE_BASE
  10652. #define PTE GPIOE
  10653. #define UART_WP7816_T_TYPE0_REG(base) UART_WP7816T0_REG(base)
  10654. #define UART_WP7816_T_TYPE1_REG(base) UART_WP7816T1_REG(base)
  10655. #define UART_WP7816_T_TYPE0_WI_MASK UART_WP7816T0_WI_MASK
  10656. #define UART_WP7816_T_TYPE0_WI_SHIFT UART_WP7816T0_WI_SHIFT
  10657. #define UART_WP7816_T_TYPE0_WI(x) UART_WP7816T0_WI(x)
  10658. #define UART_WP7816_T_TYPE1_BWI_MASK UART_WP7816T1_BWI_MASK
  10659. #define UART_WP7816_T_TYPE1_BWI_SHIFT UART_WP7816T1_BWI_SHIFT
  10660. #define UART_WP7816_T_TYPE1_BWI(x) UART_WP7816T1_BWI(x)
  10661. #define UART_WP7816_T_TYPE1_CWI_MASK UART_WP7816T1_CWI_MASK
  10662. #define UART_WP7816_T_TYPE1_CWI_SHIFT UART_WP7816T1_CWI_SHIFT
  10663. #define UART_WP7816_T_TYPE1_CWI(x) UART_WP7816T1_CWI(x)
  10664. #define Watchdog_IRQn WDOG_EWM_IRQn
  10665. #define Watchdog_IRQHandler WDOG_EWM_IRQHandler
  10666. #define LPTimer_IRQn LPTMR0_IRQn
  10667. #define LPTimer_IRQHandler LPTMR0_IRQHandler
  10668. #define LLW_IRQn LLWU_IRQn
  10669. #define LLW_IRQHandler LLWU_IRQHandler
  10670. #define DMAMUX0 DMAMUX
  10671. #define WDOG0 WDOG
  10672. #define MCM0 MCM
  10673. #define RTC0 RTC
  10674. /*!
  10675. * @}
  10676. */ /* end of group SDK_Compatibility_Symbols */
  10677. #endif /* _MK24F12_H_ */