lm3s8962.h 275 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034
  1. //*****************************************************************************
  2. //
  3. // lm3s8962.h - LM3S8962 Register Definitions
  4. //
  5. // Copyright (c) 2007-2010 Texas Instruments Incorporated. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Texas Instruments (TI) is supplying this software for use solely and
  9. // exclusively on TI's microcontroller products. The software is owned by
  10. // TI and/or its suppliers, and is protected under applicable copyright
  11. // laws. You may not combine this software with "viral" open-source
  12. // software in order to form a larger program.
  13. //
  14. // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
  15. // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
  16. // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  17. // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
  18. // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
  19. // DAMAGES, FOR ANY REASON WHATSOEVER.
  20. //
  21. // This is part of revision 6459 of the Stellaris Firmware Development Package.
  22. //
  23. //*****************************************************************************
  24. #ifndef __LM3S8962_H__
  25. #define __LM3S8962_H__
  26. //*****************************************************************************
  27. //
  28. // Watchdog Timer registers (WATCHDOG0)
  29. //
  30. //*****************************************************************************
  31. #define WATCHDOG0_LOAD_R (*((volatile unsigned long *)0x40000000))
  32. #define WATCHDOG0_VALUE_R (*((volatile unsigned long *)0x40000004))
  33. #define WATCHDOG0_CTL_R (*((volatile unsigned long *)0x40000008))
  34. #define WATCHDOG0_ICR_R (*((volatile unsigned long *)0x4000000C))
  35. #define WATCHDOG0_RIS_R (*((volatile unsigned long *)0x40000010))
  36. #define WATCHDOG0_MIS_R (*((volatile unsigned long *)0x40000014))
  37. #define WATCHDOG0_TEST_R (*((volatile unsigned long *)0x40000418))
  38. #define WATCHDOG0_LOCK_R (*((volatile unsigned long *)0x40000C00))
  39. //*****************************************************************************
  40. //
  41. // GPIO registers (PORTA)
  42. //
  43. //*****************************************************************************
  44. #define GPIO_PORTA_DATA_BITS_R ((volatile unsigned long *)0x40004000)
  45. #define GPIO_PORTA_DATA_R (*((volatile unsigned long *)0x400043FC))
  46. #define GPIO_PORTA_DIR_R (*((volatile unsigned long *)0x40004400))
  47. #define GPIO_PORTA_IS_R (*((volatile unsigned long *)0x40004404))
  48. #define GPIO_PORTA_IBE_R (*((volatile unsigned long *)0x40004408))
  49. #define GPIO_PORTA_IEV_R (*((volatile unsigned long *)0x4000440C))
  50. #define GPIO_PORTA_IM_R (*((volatile unsigned long *)0x40004410))
  51. #define GPIO_PORTA_RIS_R (*((volatile unsigned long *)0x40004414))
  52. #define GPIO_PORTA_MIS_R (*((volatile unsigned long *)0x40004418))
  53. #define GPIO_PORTA_ICR_R (*((volatile unsigned long *)0x4000441C))
  54. #define GPIO_PORTA_AFSEL_R (*((volatile unsigned long *)0x40004420))
  55. #define GPIO_PORTA_DR2R_R (*((volatile unsigned long *)0x40004500))
  56. #define GPIO_PORTA_DR4R_R (*((volatile unsigned long *)0x40004504))
  57. #define GPIO_PORTA_DR8R_R (*((volatile unsigned long *)0x40004508))
  58. #define GPIO_PORTA_ODR_R (*((volatile unsigned long *)0x4000450C))
  59. #define GPIO_PORTA_PUR_R (*((volatile unsigned long *)0x40004510))
  60. #define GPIO_PORTA_PDR_R (*((volatile unsigned long *)0x40004514))
  61. #define GPIO_PORTA_SLR_R (*((volatile unsigned long *)0x40004518))
  62. #define GPIO_PORTA_DEN_R (*((volatile unsigned long *)0x4000451C))
  63. #define GPIO_PORTA_LOCK_R (*((volatile unsigned long *)0x40004520))
  64. #define GPIO_PORTA_CR_R (*((volatile unsigned long *)0x40004524))
  65. //*****************************************************************************
  66. //
  67. // GPIO registers (PORTB)
  68. //
  69. //*****************************************************************************
  70. #define GPIO_PORTB_DATA_BITS_R ((volatile unsigned long *)0x40005000)
  71. #define GPIO_PORTB_DATA_R (*((volatile unsigned long *)0x400053FC))
  72. #define GPIO_PORTB_DIR_R (*((volatile unsigned long *)0x40005400))
  73. #define GPIO_PORTB_IS_R (*((volatile unsigned long *)0x40005404))
  74. #define GPIO_PORTB_IBE_R (*((volatile unsigned long *)0x40005408))
  75. #define GPIO_PORTB_IEV_R (*((volatile unsigned long *)0x4000540C))
  76. #define GPIO_PORTB_IM_R (*((volatile unsigned long *)0x40005410))
  77. #define GPIO_PORTB_RIS_R (*((volatile unsigned long *)0x40005414))
  78. #define GPIO_PORTB_MIS_R (*((volatile unsigned long *)0x40005418))
  79. #define GPIO_PORTB_ICR_R (*((volatile unsigned long *)0x4000541C))
  80. #define GPIO_PORTB_AFSEL_R (*((volatile unsigned long *)0x40005420))
  81. #define GPIO_PORTB_DR2R_R (*((volatile unsigned long *)0x40005500))
  82. #define GPIO_PORTB_DR4R_R (*((volatile unsigned long *)0x40005504))
  83. #define GPIO_PORTB_DR8R_R (*((volatile unsigned long *)0x40005508))
  84. #define GPIO_PORTB_ODR_R (*((volatile unsigned long *)0x4000550C))
  85. #define GPIO_PORTB_PUR_R (*((volatile unsigned long *)0x40005510))
  86. #define GPIO_PORTB_PDR_R (*((volatile unsigned long *)0x40005514))
  87. #define GPIO_PORTB_SLR_R (*((volatile unsigned long *)0x40005518))
  88. #define GPIO_PORTB_DEN_R (*((volatile unsigned long *)0x4000551C))
  89. #define GPIO_PORTB_LOCK_R (*((volatile unsigned long *)0x40005520))
  90. #define GPIO_PORTB_CR_R (*((volatile unsigned long *)0x40005524))
  91. //*****************************************************************************
  92. //
  93. // GPIO registers (PORTC)
  94. //
  95. //*****************************************************************************
  96. #define GPIO_PORTC_DATA_BITS_R ((volatile unsigned long *)0x40006000)
  97. #define GPIO_PORTC_DATA_R (*((volatile unsigned long *)0x400063FC))
  98. #define GPIO_PORTC_DIR_R (*((volatile unsigned long *)0x40006400))
  99. #define GPIO_PORTC_IS_R (*((volatile unsigned long *)0x40006404))
  100. #define GPIO_PORTC_IBE_R (*((volatile unsigned long *)0x40006408))
  101. #define GPIO_PORTC_IEV_R (*((volatile unsigned long *)0x4000640C))
  102. #define GPIO_PORTC_IM_R (*((volatile unsigned long *)0x40006410))
  103. #define GPIO_PORTC_RIS_R (*((volatile unsigned long *)0x40006414))
  104. #define GPIO_PORTC_MIS_R (*((volatile unsigned long *)0x40006418))
  105. #define GPIO_PORTC_ICR_R (*((volatile unsigned long *)0x4000641C))
  106. #define GPIO_PORTC_AFSEL_R (*((volatile unsigned long *)0x40006420))
  107. #define GPIO_PORTC_DR2R_R (*((volatile unsigned long *)0x40006500))
  108. #define GPIO_PORTC_DR4R_R (*((volatile unsigned long *)0x40006504))
  109. #define GPIO_PORTC_DR8R_R (*((volatile unsigned long *)0x40006508))
  110. #define GPIO_PORTC_ODR_R (*((volatile unsigned long *)0x4000650C))
  111. #define GPIO_PORTC_PUR_R (*((volatile unsigned long *)0x40006510))
  112. #define GPIO_PORTC_PDR_R (*((volatile unsigned long *)0x40006514))
  113. #define GPIO_PORTC_SLR_R (*((volatile unsigned long *)0x40006518))
  114. #define GPIO_PORTC_DEN_R (*((volatile unsigned long *)0x4000651C))
  115. #define GPIO_PORTC_LOCK_R (*((volatile unsigned long *)0x40006520))
  116. #define GPIO_PORTC_CR_R (*((volatile unsigned long *)0x40006524))
  117. //*****************************************************************************
  118. //
  119. // GPIO registers (PORTD)
  120. //
  121. //*****************************************************************************
  122. #define GPIO_PORTD_DATA_BITS_R ((volatile unsigned long *)0x40007000)
  123. #define GPIO_PORTD_DATA_R (*((volatile unsigned long *)0x400073FC))
  124. #define GPIO_PORTD_DIR_R (*((volatile unsigned long *)0x40007400))
  125. #define GPIO_PORTD_IS_R (*((volatile unsigned long *)0x40007404))
  126. #define GPIO_PORTD_IBE_R (*((volatile unsigned long *)0x40007408))
  127. #define GPIO_PORTD_IEV_R (*((volatile unsigned long *)0x4000740C))
  128. #define GPIO_PORTD_IM_R (*((volatile unsigned long *)0x40007410))
  129. #define GPIO_PORTD_RIS_R (*((volatile unsigned long *)0x40007414))
  130. #define GPIO_PORTD_MIS_R (*((volatile unsigned long *)0x40007418))
  131. #define GPIO_PORTD_ICR_R (*((volatile unsigned long *)0x4000741C))
  132. #define GPIO_PORTD_AFSEL_R (*((volatile unsigned long *)0x40007420))
  133. #define GPIO_PORTD_DR2R_R (*((volatile unsigned long *)0x40007500))
  134. #define GPIO_PORTD_DR4R_R (*((volatile unsigned long *)0x40007504))
  135. #define GPIO_PORTD_DR8R_R (*((volatile unsigned long *)0x40007508))
  136. #define GPIO_PORTD_ODR_R (*((volatile unsigned long *)0x4000750C))
  137. #define GPIO_PORTD_PUR_R (*((volatile unsigned long *)0x40007510))
  138. #define GPIO_PORTD_PDR_R (*((volatile unsigned long *)0x40007514))
  139. #define GPIO_PORTD_SLR_R (*((volatile unsigned long *)0x40007518))
  140. #define GPIO_PORTD_DEN_R (*((volatile unsigned long *)0x4000751C))
  141. #define GPIO_PORTD_LOCK_R (*((volatile unsigned long *)0x40007520))
  142. #define GPIO_PORTD_CR_R (*((volatile unsigned long *)0x40007524))
  143. //*****************************************************************************
  144. //
  145. // SSI registers (SSI0)
  146. //
  147. //*****************************************************************************
  148. #define SSI0_CR0_R (*((volatile unsigned long *)0x40008000))
  149. #define SSI0_CR1_R (*((volatile unsigned long *)0x40008004))
  150. #define SSI0_DR_R (*((volatile unsigned long *)0x40008008))
  151. #define SSI0_SR_R (*((volatile unsigned long *)0x4000800C))
  152. #define SSI0_CPSR_R (*((volatile unsigned long *)0x40008010))
  153. #define SSI0_IM_R (*((volatile unsigned long *)0x40008014))
  154. #define SSI0_RIS_R (*((volatile unsigned long *)0x40008018))
  155. #define SSI0_MIS_R (*((volatile unsigned long *)0x4000801C))
  156. #define SSI0_ICR_R (*((volatile unsigned long *)0x40008020))
  157. //*****************************************************************************
  158. //
  159. // UART registers (UART0)
  160. //
  161. //*****************************************************************************
  162. #define UART0_DR_R (*((volatile unsigned long *)0x4000C000))
  163. #define UART0_RSR_R (*((volatile unsigned long *)0x4000C004))
  164. #define UART0_ECR_R (*((volatile unsigned long *)0x4000C004))
  165. #define UART0_FR_R (*((volatile unsigned long *)0x4000C018))
  166. #define UART0_ILPR_R (*((volatile unsigned long *)0x4000C020))
  167. #define UART0_IBRD_R (*((volatile unsigned long *)0x4000C024))
  168. #define UART0_FBRD_R (*((volatile unsigned long *)0x4000C028))
  169. #define UART0_LCRH_R (*((volatile unsigned long *)0x4000C02C))
  170. #define UART0_CTL_R (*((volatile unsigned long *)0x4000C030))
  171. #define UART0_IFLS_R (*((volatile unsigned long *)0x4000C034))
  172. #define UART0_IM_R (*((volatile unsigned long *)0x4000C038))
  173. #define UART0_RIS_R (*((volatile unsigned long *)0x4000C03C))
  174. #define UART0_MIS_R (*((volatile unsigned long *)0x4000C040))
  175. #define UART0_ICR_R (*((volatile unsigned long *)0x4000C044))
  176. //*****************************************************************************
  177. //
  178. // UART registers (UART1)
  179. //
  180. //*****************************************************************************
  181. #define UART1_DR_R (*((volatile unsigned long *)0x4000D000))
  182. #define UART1_RSR_R (*((volatile unsigned long *)0x4000D004))
  183. #define UART1_ECR_R (*((volatile unsigned long *)0x4000D004))
  184. #define UART1_FR_R (*((volatile unsigned long *)0x4000D018))
  185. #define UART1_ILPR_R (*((volatile unsigned long *)0x4000D020))
  186. #define UART1_IBRD_R (*((volatile unsigned long *)0x4000D024))
  187. #define UART1_FBRD_R (*((volatile unsigned long *)0x4000D028))
  188. #define UART1_LCRH_R (*((volatile unsigned long *)0x4000D02C))
  189. #define UART1_CTL_R (*((volatile unsigned long *)0x4000D030))
  190. #define UART1_IFLS_R (*((volatile unsigned long *)0x4000D034))
  191. #define UART1_IM_R (*((volatile unsigned long *)0x4000D038))
  192. #define UART1_RIS_R (*((volatile unsigned long *)0x4000D03C))
  193. #define UART1_MIS_R (*((volatile unsigned long *)0x4000D040))
  194. #define UART1_ICR_R (*((volatile unsigned long *)0x4000D044))
  195. //*****************************************************************************
  196. //
  197. // I2C registers (I2C0 MASTER)
  198. //
  199. //*****************************************************************************
  200. #define I2C0_MASTER_MSA_R (*((volatile unsigned long *)0x40020000))
  201. #define I2C0_MASTER_SOAR_R (*((volatile unsigned long *)0x40020000))
  202. #define I2C0_MASTER_SCSR_R (*((volatile unsigned long *)0x40020004))
  203. #define I2C0_MASTER_MCS_R (*((volatile unsigned long *)0x40020004))
  204. #define I2C0_MASTER_SDR_R (*((volatile unsigned long *)0x40020008))
  205. #define I2C0_MASTER_MDR_R (*((volatile unsigned long *)0x40020008))
  206. #define I2C0_MASTER_MTPR_R (*((volatile unsigned long *)0x4002000C))
  207. #define I2C0_MASTER_SIMR_R (*((volatile unsigned long *)0x4002000C))
  208. #define I2C0_MASTER_SRIS_R (*((volatile unsigned long *)0x40020010))
  209. #define I2C0_MASTER_MIMR_R (*((volatile unsigned long *)0x40020010))
  210. #define I2C0_MASTER_MRIS_R (*((volatile unsigned long *)0x40020014))
  211. #define I2C0_MASTER_SMIS_R (*((volatile unsigned long *)0x40020014))
  212. #define I2C0_MASTER_SICR_R (*((volatile unsigned long *)0x40020018))
  213. #define I2C0_MASTER_MMIS_R (*((volatile unsigned long *)0x40020018))
  214. #define I2C0_MASTER_MICR_R (*((volatile unsigned long *)0x4002001C))
  215. #define I2C0_MASTER_MCR_R (*((volatile unsigned long *)0x40020020))
  216. //*****************************************************************************
  217. //
  218. // I2C registers (I2C0 SLAVE)
  219. //
  220. //*****************************************************************************
  221. #define I2C0_SLAVE_MSA_R (*((volatile unsigned long *)0x40020800))
  222. #define I2C0_SLAVE_SOAR_R (*((volatile unsigned long *)0x40020800))
  223. #define I2C0_SLAVE_SCSR_R (*((volatile unsigned long *)0x40020804))
  224. #define I2C0_SLAVE_MCS_R (*((volatile unsigned long *)0x40020804))
  225. #define I2C0_SLAVE_SDR_R (*((volatile unsigned long *)0x40020808))
  226. #define I2C0_SLAVE_MDR_R (*((volatile unsigned long *)0x40020808))
  227. #define I2C0_SLAVE_MTPR_R (*((volatile unsigned long *)0x4002080C))
  228. #define I2C0_SLAVE_SIMR_R (*((volatile unsigned long *)0x4002080C))
  229. #define I2C0_SLAVE_SRIS_R (*((volatile unsigned long *)0x40020810))
  230. #define I2C0_SLAVE_MIMR_R (*((volatile unsigned long *)0x40020810))
  231. #define I2C0_SLAVE_MRIS_R (*((volatile unsigned long *)0x40020814))
  232. #define I2C0_SLAVE_SMIS_R (*((volatile unsigned long *)0x40020814))
  233. #define I2C0_SLAVE_SICR_R (*((volatile unsigned long *)0x40020818))
  234. #define I2C0_SLAVE_MMIS_R (*((volatile unsigned long *)0x40020818))
  235. #define I2C0_SLAVE_MICR_R (*((volatile unsigned long *)0x4002081C))
  236. #define I2C0_SLAVE_MCR_R (*((volatile unsigned long *)0x40020820))
  237. //*****************************************************************************
  238. //
  239. // GPIO registers (PORTE)
  240. //
  241. //*****************************************************************************
  242. #define GPIO_PORTE_DATA_BITS_R ((volatile unsigned long *)0x40024000)
  243. #define GPIO_PORTE_DATA_R (*((volatile unsigned long *)0x400243FC))
  244. #define GPIO_PORTE_DIR_R (*((volatile unsigned long *)0x40024400))
  245. #define GPIO_PORTE_IS_R (*((volatile unsigned long *)0x40024404))
  246. #define GPIO_PORTE_IBE_R (*((volatile unsigned long *)0x40024408))
  247. #define GPIO_PORTE_IEV_R (*((volatile unsigned long *)0x4002440C))
  248. #define GPIO_PORTE_IM_R (*((volatile unsigned long *)0x40024410))
  249. #define GPIO_PORTE_RIS_R (*((volatile unsigned long *)0x40024414))
  250. #define GPIO_PORTE_MIS_R (*((volatile unsigned long *)0x40024418))
  251. #define GPIO_PORTE_ICR_R (*((volatile unsigned long *)0x4002441C))
  252. #define GPIO_PORTE_AFSEL_R (*((volatile unsigned long *)0x40024420))
  253. #define GPIO_PORTE_DR2R_R (*((volatile unsigned long *)0x40024500))
  254. #define GPIO_PORTE_DR4R_R (*((volatile unsigned long *)0x40024504))
  255. #define GPIO_PORTE_DR8R_R (*((volatile unsigned long *)0x40024508))
  256. #define GPIO_PORTE_ODR_R (*((volatile unsigned long *)0x4002450C))
  257. #define GPIO_PORTE_PUR_R (*((volatile unsigned long *)0x40024510))
  258. #define GPIO_PORTE_PDR_R (*((volatile unsigned long *)0x40024514))
  259. #define GPIO_PORTE_SLR_R (*((volatile unsigned long *)0x40024518))
  260. #define GPIO_PORTE_DEN_R (*((volatile unsigned long *)0x4002451C))
  261. #define GPIO_PORTE_LOCK_R (*((volatile unsigned long *)0x40024520))
  262. #define GPIO_PORTE_CR_R (*((volatile unsigned long *)0x40024524))
  263. //*****************************************************************************
  264. //
  265. // GPIO registers (PORTF)
  266. //
  267. //*****************************************************************************
  268. #define GPIO_PORTF_DATA_BITS_R ((volatile unsigned long *)0x40025000)
  269. #define GPIO_PORTF_DATA_R (*((volatile unsigned long *)0x400253FC))
  270. #define GPIO_PORTF_DIR_R (*((volatile unsigned long *)0x40025400))
  271. #define GPIO_PORTF_IS_R (*((volatile unsigned long *)0x40025404))
  272. #define GPIO_PORTF_IBE_R (*((volatile unsigned long *)0x40025408))
  273. #define GPIO_PORTF_IEV_R (*((volatile unsigned long *)0x4002540C))
  274. #define GPIO_PORTF_IM_R (*((volatile unsigned long *)0x40025410))
  275. #define GPIO_PORTF_RIS_R (*((volatile unsigned long *)0x40025414))
  276. #define GPIO_PORTF_MIS_R (*((volatile unsigned long *)0x40025418))
  277. #define GPIO_PORTF_ICR_R (*((volatile unsigned long *)0x4002541C))
  278. #define GPIO_PORTF_AFSEL_R (*((volatile unsigned long *)0x40025420))
  279. #define GPIO_PORTF_DR2R_R (*((volatile unsigned long *)0x40025500))
  280. #define GPIO_PORTF_DR4R_R (*((volatile unsigned long *)0x40025504))
  281. #define GPIO_PORTF_DR8R_R (*((volatile unsigned long *)0x40025508))
  282. #define GPIO_PORTF_ODR_R (*((volatile unsigned long *)0x4002550C))
  283. #define GPIO_PORTF_PUR_R (*((volatile unsigned long *)0x40025510))
  284. #define GPIO_PORTF_PDR_R (*((volatile unsigned long *)0x40025514))
  285. #define GPIO_PORTF_SLR_R (*((volatile unsigned long *)0x40025518))
  286. #define GPIO_PORTF_DEN_R (*((volatile unsigned long *)0x4002551C))
  287. #define GPIO_PORTF_LOCK_R (*((volatile unsigned long *)0x40025520))
  288. #define GPIO_PORTF_CR_R (*((volatile unsigned long *)0x40025524))
  289. //*****************************************************************************
  290. //
  291. // GPIO registers (PORTG)
  292. //
  293. //*****************************************************************************
  294. #define GPIO_PORTG_DATA_BITS_R ((volatile unsigned long *)0x40026000)
  295. #define GPIO_PORTG_DATA_R (*((volatile unsigned long *)0x400263FC))
  296. #define GPIO_PORTG_DIR_R (*((volatile unsigned long *)0x40026400))
  297. #define GPIO_PORTG_IS_R (*((volatile unsigned long *)0x40026404))
  298. #define GPIO_PORTG_IBE_R (*((volatile unsigned long *)0x40026408))
  299. #define GPIO_PORTG_IEV_R (*((volatile unsigned long *)0x4002640C))
  300. #define GPIO_PORTG_IM_R (*((volatile unsigned long *)0x40026410))
  301. #define GPIO_PORTG_RIS_R (*((volatile unsigned long *)0x40026414))
  302. #define GPIO_PORTG_MIS_R (*((volatile unsigned long *)0x40026418))
  303. #define GPIO_PORTG_ICR_R (*((volatile unsigned long *)0x4002641C))
  304. #define GPIO_PORTG_AFSEL_R (*((volatile unsigned long *)0x40026420))
  305. #define GPIO_PORTG_DR2R_R (*((volatile unsigned long *)0x40026500))
  306. #define GPIO_PORTG_DR4R_R (*((volatile unsigned long *)0x40026504))
  307. #define GPIO_PORTG_DR8R_R (*((volatile unsigned long *)0x40026508))
  308. #define GPIO_PORTG_ODR_R (*((volatile unsigned long *)0x4002650C))
  309. #define GPIO_PORTG_PUR_R (*((volatile unsigned long *)0x40026510))
  310. #define GPIO_PORTG_PDR_R (*((volatile unsigned long *)0x40026514))
  311. #define GPIO_PORTG_SLR_R (*((volatile unsigned long *)0x40026518))
  312. #define GPIO_PORTG_DEN_R (*((volatile unsigned long *)0x4002651C))
  313. #define GPIO_PORTG_LOCK_R (*((volatile unsigned long *)0x40026520))
  314. #define GPIO_PORTG_CR_R (*((volatile unsigned long *)0x40026524))
  315. //*****************************************************************************
  316. //
  317. // PWM registers (PWM)
  318. //
  319. //*****************************************************************************
  320. #define PWM_CTL_R (*((volatile unsigned long *)0x40028000))
  321. #define PWM_SYNC_R (*((volatile unsigned long *)0x40028004))
  322. #define PWM_ENABLE_R (*((volatile unsigned long *)0x40028008))
  323. #define PWM_INVERT_R (*((volatile unsigned long *)0x4002800C))
  324. #define PWM_FAULT_R (*((volatile unsigned long *)0x40028010))
  325. #define PWM_INTEN_R (*((volatile unsigned long *)0x40028014))
  326. #define PWM_RIS_R (*((volatile unsigned long *)0x40028018))
  327. #define PWM_ISC_R (*((volatile unsigned long *)0x4002801C))
  328. #define PWM_STATUS_R (*((volatile unsigned long *)0x40028020))
  329. #define PWM_0_CTL_R (*((volatile unsigned long *)0x40028040))
  330. #define PWM_0_INTEN_R (*((volatile unsigned long *)0x40028044))
  331. #define PWM_0_RIS_R (*((volatile unsigned long *)0x40028048))
  332. #define PWM_0_ISC_R (*((volatile unsigned long *)0x4002804C))
  333. #define PWM_0_LOAD_R (*((volatile unsigned long *)0x40028050))
  334. #define PWM_0_COUNT_R (*((volatile unsigned long *)0x40028054))
  335. #define PWM_0_CMPA_R (*((volatile unsigned long *)0x40028058))
  336. #define PWM_0_CMPB_R (*((volatile unsigned long *)0x4002805C))
  337. #define PWM_0_GENA_R (*((volatile unsigned long *)0x40028060))
  338. #define PWM_0_GENB_R (*((volatile unsigned long *)0x40028064))
  339. #define PWM_0_DBCTL_R (*((volatile unsigned long *)0x40028068))
  340. #define PWM_0_DBRISE_R (*((volatile unsigned long *)0x4002806C))
  341. #define PWM_0_DBFALL_R (*((volatile unsigned long *)0x40028070))
  342. #define PWM_1_CTL_R (*((volatile unsigned long *)0x40028080))
  343. #define PWM_1_INTEN_R (*((volatile unsigned long *)0x40028084))
  344. #define PWM_1_RIS_R (*((volatile unsigned long *)0x40028088))
  345. #define PWM_1_ISC_R (*((volatile unsigned long *)0x4002808C))
  346. #define PWM_1_LOAD_R (*((volatile unsigned long *)0x40028090))
  347. #define PWM_1_COUNT_R (*((volatile unsigned long *)0x40028094))
  348. #define PWM_1_CMPA_R (*((volatile unsigned long *)0x40028098))
  349. #define PWM_1_CMPB_R (*((volatile unsigned long *)0x4002809C))
  350. #define PWM_1_GENA_R (*((volatile unsigned long *)0x400280A0))
  351. #define PWM_1_GENB_R (*((volatile unsigned long *)0x400280A4))
  352. #define PWM_1_DBCTL_R (*((volatile unsigned long *)0x400280A8))
  353. #define PWM_1_DBRISE_R (*((volatile unsigned long *)0x400280AC))
  354. #define PWM_1_DBFALL_R (*((volatile unsigned long *)0x400280B0))
  355. #define PWM_2_CTL_R (*((volatile unsigned long *)0x400280C0))
  356. #define PWM_2_INTEN_R (*((volatile unsigned long *)0x400280C4))
  357. #define PWM_2_RIS_R (*((volatile unsigned long *)0x400280C8))
  358. #define PWM_2_ISC_R (*((volatile unsigned long *)0x400280CC))
  359. #define PWM_2_LOAD_R (*((volatile unsigned long *)0x400280D0))
  360. #define PWM_2_COUNT_R (*((volatile unsigned long *)0x400280D4))
  361. #define PWM_2_CMPA_R (*((volatile unsigned long *)0x400280D8))
  362. #define PWM_2_CMPB_R (*((volatile unsigned long *)0x400280DC))
  363. #define PWM_2_GENA_R (*((volatile unsigned long *)0x400280E0))
  364. #define PWM_2_GENB_R (*((volatile unsigned long *)0x400280E4))
  365. #define PWM_2_DBCTL_R (*((volatile unsigned long *)0x400280E8))
  366. #define PWM_2_DBRISE_R (*((volatile unsigned long *)0x400280EC))
  367. #define PWM_2_DBFALL_R (*((volatile unsigned long *)0x400280F0))
  368. //*****************************************************************************
  369. //
  370. // QEI registers (QEI0)
  371. //
  372. //*****************************************************************************
  373. #define QEI0_CTL_R (*((volatile unsigned long *)0x4002C000))
  374. #define QEI0_STAT_R (*((volatile unsigned long *)0x4002C004))
  375. #define QEI0_POS_R (*((volatile unsigned long *)0x4002C008))
  376. #define QEI0_MAXPOS_R (*((volatile unsigned long *)0x4002C00C))
  377. #define QEI0_LOAD_R (*((volatile unsigned long *)0x4002C010))
  378. #define QEI0_TIME_R (*((volatile unsigned long *)0x4002C014))
  379. #define QEI0_COUNT_R (*((volatile unsigned long *)0x4002C018))
  380. #define QEI0_SPEED_R (*((volatile unsigned long *)0x4002C01C))
  381. #define QEI0_INTEN_R (*((volatile unsigned long *)0x4002C020))
  382. #define QEI0_RIS_R (*((volatile unsigned long *)0x4002C024))
  383. #define QEI0_ISC_R (*((volatile unsigned long *)0x4002C028))
  384. //*****************************************************************************
  385. //
  386. // QEI registers (QEI1)
  387. //
  388. //*****************************************************************************
  389. #define QEI1_CTL_R (*((volatile unsigned long *)0x4002D000))
  390. #define QEI1_STAT_R (*((volatile unsigned long *)0x4002D004))
  391. #define QEI1_POS_R (*((volatile unsigned long *)0x4002D008))
  392. #define QEI1_MAXPOS_R (*((volatile unsigned long *)0x4002D00C))
  393. #define QEI1_LOAD_R (*((volatile unsigned long *)0x4002D010))
  394. #define QEI1_TIME_R (*((volatile unsigned long *)0x4002D014))
  395. #define QEI1_COUNT_R (*((volatile unsigned long *)0x4002D018))
  396. #define QEI1_SPEED_R (*((volatile unsigned long *)0x4002D01C))
  397. #define QEI1_INTEN_R (*((volatile unsigned long *)0x4002D020))
  398. #define QEI1_RIS_R (*((volatile unsigned long *)0x4002D024))
  399. #define QEI1_ISC_R (*((volatile unsigned long *)0x4002D028))
  400. //*****************************************************************************
  401. //
  402. // Timer registers (TIMER0)
  403. //
  404. //*****************************************************************************
  405. #define TIMER0_CFG_R (*((volatile unsigned long *)0x40030000))
  406. #define TIMER0_TAMR_R (*((volatile unsigned long *)0x40030004))
  407. #define TIMER0_TBMR_R (*((volatile unsigned long *)0x40030008))
  408. #define TIMER0_CTL_R (*((volatile unsigned long *)0x4003000C))
  409. #define TIMER0_IMR_R (*((volatile unsigned long *)0x40030018))
  410. #define TIMER0_RIS_R (*((volatile unsigned long *)0x4003001C))
  411. #define TIMER0_MIS_R (*((volatile unsigned long *)0x40030020))
  412. #define TIMER0_ICR_R (*((volatile unsigned long *)0x40030024))
  413. #define TIMER0_TAILR_R (*((volatile unsigned long *)0x40030028))
  414. #define TIMER0_TBILR_R (*((volatile unsigned long *)0x4003002C))
  415. #define TIMER0_TAMATCHR_R (*((volatile unsigned long *)0x40030030))
  416. #define TIMER0_TBMATCHR_R (*((volatile unsigned long *)0x40030034))
  417. #define TIMER0_TAPR_R (*((volatile unsigned long *)0x40030038))
  418. #define TIMER0_TBPR_R (*((volatile unsigned long *)0x4003003C))
  419. #define TIMER0_TAPMR_R (*((volatile unsigned long *)0x40030040))
  420. #define TIMER0_TBPMR_R (*((volatile unsigned long *)0x40030044))
  421. #define TIMER0_TAR_R (*((volatile unsigned long *)0x40030048))
  422. #define TIMER0_TBR_R (*((volatile unsigned long *)0x4003004C))
  423. //*****************************************************************************
  424. //
  425. // Timer registers (TIMER1)
  426. //
  427. //*****************************************************************************
  428. #define TIMER1_CFG_R (*((volatile unsigned long *)0x40031000))
  429. #define TIMER1_TAMR_R (*((volatile unsigned long *)0x40031004))
  430. #define TIMER1_TBMR_R (*((volatile unsigned long *)0x40031008))
  431. #define TIMER1_CTL_R (*((volatile unsigned long *)0x4003100C))
  432. #define TIMER1_IMR_R (*((volatile unsigned long *)0x40031018))
  433. #define TIMER1_RIS_R (*((volatile unsigned long *)0x4003101C))
  434. #define TIMER1_MIS_R (*((volatile unsigned long *)0x40031020))
  435. #define TIMER1_ICR_R (*((volatile unsigned long *)0x40031024))
  436. #define TIMER1_TAILR_R (*((volatile unsigned long *)0x40031028))
  437. #define TIMER1_TBILR_R (*((volatile unsigned long *)0x4003102C))
  438. #define TIMER1_TAMATCHR_R (*((volatile unsigned long *)0x40031030))
  439. #define TIMER1_TBMATCHR_R (*((volatile unsigned long *)0x40031034))
  440. #define TIMER1_TAPR_R (*((volatile unsigned long *)0x40031038))
  441. #define TIMER1_TBPR_R (*((volatile unsigned long *)0x4003103C))
  442. #define TIMER1_TAPMR_R (*((volatile unsigned long *)0x40031040))
  443. #define TIMER1_TBPMR_R (*((volatile unsigned long *)0x40031044))
  444. #define TIMER1_TAR_R (*((volatile unsigned long *)0x40031048))
  445. #define TIMER1_TBR_R (*((volatile unsigned long *)0x4003104C))
  446. //*****************************************************************************
  447. //
  448. // Timer registers (TIMER2)
  449. //
  450. //*****************************************************************************
  451. #define TIMER2_CFG_R (*((volatile unsigned long *)0x40032000))
  452. #define TIMER2_TAMR_R (*((volatile unsigned long *)0x40032004))
  453. #define TIMER2_TBMR_R (*((volatile unsigned long *)0x40032008))
  454. #define TIMER2_CTL_R (*((volatile unsigned long *)0x4003200C))
  455. #define TIMER2_IMR_R (*((volatile unsigned long *)0x40032018))
  456. #define TIMER2_RIS_R (*((volatile unsigned long *)0x4003201C))
  457. #define TIMER2_MIS_R (*((volatile unsigned long *)0x40032020))
  458. #define TIMER2_ICR_R (*((volatile unsigned long *)0x40032024))
  459. #define TIMER2_TAILR_R (*((volatile unsigned long *)0x40032028))
  460. #define TIMER2_TBILR_R (*((volatile unsigned long *)0x4003202C))
  461. #define TIMER2_TAMATCHR_R (*((volatile unsigned long *)0x40032030))
  462. #define TIMER2_TBMATCHR_R (*((volatile unsigned long *)0x40032034))
  463. #define TIMER2_TAPR_R (*((volatile unsigned long *)0x40032038))
  464. #define TIMER2_TBPR_R (*((volatile unsigned long *)0x4003203C))
  465. #define TIMER2_TAPMR_R (*((volatile unsigned long *)0x40032040))
  466. #define TIMER2_TBPMR_R (*((volatile unsigned long *)0x40032044))
  467. #define TIMER2_TAR_R (*((volatile unsigned long *)0x40032048))
  468. #define TIMER2_TBR_R (*((volatile unsigned long *)0x4003204C))
  469. //*****************************************************************************
  470. //
  471. // Timer registers (TIMER3)
  472. //
  473. //*****************************************************************************
  474. #define TIMER3_CFG_R (*((volatile unsigned long *)0x40033000))
  475. #define TIMER3_TAMR_R (*((volatile unsigned long *)0x40033004))
  476. #define TIMER3_TBMR_R (*((volatile unsigned long *)0x40033008))
  477. #define TIMER3_CTL_R (*((volatile unsigned long *)0x4003300C))
  478. #define TIMER3_IMR_R (*((volatile unsigned long *)0x40033018))
  479. #define TIMER3_RIS_R (*((volatile unsigned long *)0x4003301C))
  480. #define TIMER3_MIS_R (*((volatile unsigned long *)0x40033020))
  481. #define TIMER3_ICR_R (*((volatile unsigned long *)0x40033024))
  482. #define TIMER3_TAILR_R (*((volatile unsigned long *)0x40033028))
  483. #define TIMER3_TBILR_R (*((volatile unsigned long *)0x4003302C))
  484. #define TIMER3_TAMATCHR_R (*((volatile unsigned long *)0x40033030))
  485. #define TIMER3_TBMATCHR_R (*((volatile unsigned long *)0x40033034))
  486. #define TIMER3_TAPR_R (*((volatile unsigned long *)0x40033038))
  487. #define TIMER3_TBPR_R (*((volatile unsigned long *)0x4003303C))
  488. #define TIMER3_TAPMR_R (*((volatile unsigned long *)0x40033040))
  489. #define TIMER3_TBPMR_R (*((volatile unsigned long *)0x40033044))
  490. #define TIMER3_TAR_R (*((volatile unsigned long *)0x40033048))
  491. #define TIMER3_TBR_R (*((volatile unsigned long *)0x4003304C))
  492. //*****************************************************************************
  493. //
  494. // ADC registers (ADC0)
  495. //
  496. //*****************************************************************************
  497. #define ADC0_ACTSS_R (*((volatile unsigned long *)0x40038000))
  498. #define ADC0_RIS_R (*((volatile unsigned long *)0x40038004))
  499. #define ADC0_IM_R (*((volatile unsigned long *)0x40038008))
  500. #define ADC0_ISC_R (*((volatile unsigned long *)0x4003800C))
  501. #define ADC0_OSTAT_R (*((volatile unsigned long *)0x40038010))
  502. #define ADC0_EMUX_R (*((volatile unsigned long *)0x40038014))
  503. #define ADC0_USTAT_R (*((volatile unsigned long *)0x40038018))
  504. #define ADC0_SSPRI_R (*((volatile unsigned long *)0x40038020))
  505. #define ADC0_PSSI_R (*((volatile unsigned long *)0x40038028))
  506. #define ADC0_SAC_R (*((volatile unsigned long *)0x40038030))
  507. #define ADC0_SSMUX0_R (*((volatile unsigned long *)0x40038040))
  508. #define ADC0_SSCTL0_R (*((volatile unsigned long *)0x40038044))
  509. #define ADC0_SSFIFO0_R (*((volatile unsigned long *)0x40038048))
  510. #define ADC0_SSFSTAT0_R (*((volatile unsigned long *)0x4003804C))
  511. #define ADC0_SSMUX1_R (*((volatile unsigned long *)0x40038060))
  512. #define ADC0_SSCTL1_R (*((volatile unsigned long *)0x40038064))
  513. #define ADC0_SSFIFO1_R (*((volatile unsigned long *)0x40038068))
  514. #define ADC0_SSFSTAT1_R (*((volatile unsigned long *)0x4003806C))
  515. #define ADC0_SSMUX2_R (*((volatile unsigned long *)0x40038080))
  516. #define ADC0_SSCTL2_R (*((volatile unsigned long *)0x40038084))
  517. #define ADC0_SSFIFO2_R (*((volatile unsigned long *)0x40038088))
  518. #define ADC0_SSFSTAT2_R (*((volatile unsigned long *)0x4003808C))
  519. #define ADC0_SSMUX3_R (*((volatile unsigned long *)0x400380A0))
  520. #define ADC0_SSCTL3_R (*((volatile unsigned long *)0x400380A4))
  521. #define ADC0_SSFIFO3_R (*((volatile unsigned long *)0x400380A8))
  522. #define ADC0_SSFSTAT3_R (*((volatile unsigned long *)0x400380AC))
  523. #define ADC0_TMLB_R (*((volatile unsigned long *)0x40038100))
  524. //*****************************************************************************
  525. //
  526. // Comparator registers (COMP)
  527. //
  528. //*****************************************************************************
  529. #define COMP_ACMIS_R (*((volatile unsigned long *)0x4003C000))
  530. #define COMP_ACRIS_R (*((volatile unsigned long *)0x4003C004))
  531. #define COMP_ACINTEN_R (*((volatile unsigned long *)0x4003C008))
  532. #define COMP_ACREFCTL_R (*((volatile unsigned long *)0x4003C010))
  533. #define COMP_ACSTAT0_R (*((volatile unsigned long *)0x4003C020))
  534. #define COMP_ACCTL0_R (*((volatile unsigned long *)0x4003C024))
  535. //*****************************************************************************
  536. //
  537. // CAN registers (CAN0)
  538. //
  539. //*****************************************************************************
  540. #define CAN0_CTL_R (*((volatile unsigned long *)0x40040000))
  541. #define CAN0_STS_R (*((volatile unsigned long *)0x40040004))
  542. #define CAN0_ERR_R (*((volatile unsigned long *)0x40040008))
  543. #define CAN0_BIT_R (*((volatile unsigned long *)0x4004000C))
  544. #define CAN0_INT_R (*((volatile unsigned long *)0x40040010))
  545. #define CAN0_TST_R (*((volatile unsigned long *)0x40040014))
  546. #define CAN0_BRPE_R (*((volatile unsigned long *)0x40040018))
  547. #define CAN0_IF1CRQ_R (*((volatile unsigned long *)0x40040020))
  548. #define CAN0_IF1CMSK_R (*((volatile unsigned long *)0x40040024))
  549. #define CAN0_IF1MSK1_R (*((volatile unsigned long *)0x40040028))
  550. #define CAN0_IF1MSK2_R (*((volatile unsigned long *)0x4004002C))
  551. #define CAN0_IF1ARB1_R (*((volatile unsigned long *)0x40040030))
  552. #define CAN0_IF1ARB2_R (*((volatile unsigned long *)0x40040034))
  553. #define CAN0_IF1MCTL_R (*((volatile unsigned long *)0x40040038))
  554. #define CAN0_IF1DA1_R (*((volatile unsigned long *)0x4004003C))
  555. #define CAN0_IF1DA2_R (*((volatile unsigned long *)0x40040040))
  556. #define CAN0_IF1DB1_R (*((volatile unsigned long *)0x40040044))
  557. #define CAN0_IF1DB2_R (*((volatile unsigned long *)0x40040048))
  558. #define CAN0_IF2CRQ_R (*((volatile unsigned long *)0x40040080))
  559. #define CAN0_IF2CMSK_R (*((volatile unsigned long *)0x40040084))
  560. #define CAN0_IF2MSK1_R (*((volatile unsigned long *)0x40040088))
  561. #define CAN0_IF2MSK2_R (*((volatile unsigned long *)0x4004008C))
  562. #define CAN0_IF2ARB1_R (*((volatile unsigned long *)0x40040090))
  563. #define CAN0_IF2ARB2_R (*((volatile unsigned long *)0x40040094))
  564. #define CAN0_IF2MCTL_R (*((volatile unsigned long *)0x40040098))
  565. #define CAN0_IF2DA1_R (*((volatile unsigned long *)0x4004009C))
  566. #define CAN0_IF2DA2_R (*((volatile unsigned long *)0x400400A0))
  567. #define CAN0_IF2DB1_R (*((volatile unsigned long *)0x400400A4))
  568. #define CAN0_IF2DB2_R (*((volatile unsigned long *)0x400400A8))
  569. #define CAN0_TXRQ1_R (*((volatile unsigned long *)0x40040100))
  570. #define CAN0_TXRQ2_R (*((volatile unsigned long *)0x40040104))
  571. #define CAN0_NWDA1_R (*((volatile unsigned long *)0x40040120))
  572. #define CAN0_NWDA2_R (*((volatile unsigned long *)0x40040124))
  573. #define CAN0_MSG1INT_R (*((volatile unsigned long *)0x40040140))
  574. #define CAN0_MSG2INT_R (*((volatile unsigned long *)0x40040144))
  575. #define CAN0_MSG1VAL_R (*((volatile unsigned long *)0x40040160))
  576. #define CAN0_MSG2VAL_R (*((volatile unsigned long *)0x40040164))
  577. //*****************************************************************************
  578. //
  579. // Ethernet MAC registers (MAC)
  580. //
  581. //*****************************************************************************
  582. #define MAC_RIS_R (*((volatile unsigned long *)0x40048000))
  583. #define MAC_IACK_R (*((volatile unsigned long *)0x40048000))
  584. #define MAC_IM_R (*((volatile unsigned long *)0x40048004))
  585. #define MAC_RCTL_R (*((volatile unsigned long *)0x40048008))
  586. #define MAC_TCTL_R (*((volatile unsigned long *)0x4004800C))
  587. #define MAC_DATA_R (*((volatile unsigned long *)0x40048010))
  588. #define MAC_IA0_R (*((volatile unsigned long *)0x40048014))
  589. #define MAC_IA1_R (*((volatile unsigned long *)0x40048018))
  590. #define MAC_THR_R (*((volatile unsigned long *)0x4004801C))
  591. #define MAC_MCTL_R (*((volatile unsigned long *)0x40048020))
  592. #define MAC_MDV_R (*((volatile unsigned long *)0x40048024))
  593. #define MAC_MTXD_R (*((volatile unsigned long *)0x4004802C))
  594. #define MAC_MRXD_R (*((volatile unsigned long *)0x40048030))
  595. #define MAC_NP_R (*((volatile unsigned long *)0x40048034))
  596. #define MAC_TR_R (*((volatile unsigned long *)0x40048038))
  597. #define MAC_TS_R (*((volatile unsigned long *)0x4004803C))
  598. //*****************************************************************************
  599. //
  600. // Ethernet Controller PHY registers (MAC)
  601. //
  602. //*****************************************************************************
  603. #define PHY_MR0 0x00000000 // Ethernet PHY Management Register
  604. // 0 - Control
  605. #define PHY_MR1 0x00000001 // Ethernet PHY Management Register
  606. // 1 - Status
  607. #define PHY_MR2 0x00000002 // Ethernet PHY Management Register
  608. // 2 - PHY Identifier 1
  609. #define PHY_MR3 0x00000003 // Ethernet PHY Management Register
  610. // 3 - PHY Identifier 2
  611. #define PHY_MR4 0x00000004 // Ethernet PHY Management Register
  612. // 4 - Auto-Negotiation
  613. // Advertisement
  614. #define PHY_MR5 0x00000005 // Ethernet PHY Management Register
  615. // 5 - Auto-Negotiation Link
  616. // Partner Base Page Ability
  617. #define PHY_MR6 0x00000006 // Ethernet PHY Management Register
  618. // 6 - Auto-Negotiation Expansion
  619. #define PHY_MR16 0x00000010 // Ethernet PHY Management Register
  620. // 16 - Vendor-Specific
  621. #define PHY_MR17 0x00000011 // Ethernet PHY Management Register
  622. // 17 - Mode Control/Status
  623. #define PHY_MR18 0x00000012 // Ethernet PHY Management Register
  624. // 18 - Diagnostic
  625. #define PHY_MR19 0x00000013 // Ethernet PHY Management Register
  626. // 19 - Transceiver Control
  627. #define PHY_MR23 0x00000017 // Ethernet PHY Management Register
  628. // 23 - LED Configuration
  629. #define PHY_MR24 0x00000018 // Ethernet PHY Management Register
  630. // 24 -MDI/MDIX Control
  631. //*****************************************************************************
  632. //
  633. // Hibernation module registers (HIB)
  634. //
  635. //*****************************************************************************
  636. #define HIB_RTCC_R (*((volatile unsigned long *)0x400FC000))
  637. #define HIB_RTCM0_R (*((volatile unsigned long *)0x400FC004))
  638. #define HIB_RTCM1_R (*((volatile unsigned long *)0x400FC008))
  639. #define HIB_RTCLD_R (*((volatile unsigned long *)0x400FC00C))
  640. #define HIB_CTL_R (*((volatile unsigned long *)0x400FC010))
  641. #define HIB_IM_R (*((volatile unsigned long *)0x400FC014))
  642. #define HIB_RIS_R (*((volatile unsigned long *)0x400FC018))
  643. #define HIB_MIS_R (*((volatile unsigned long *)0x400FC01C))
  644. #define HIB_IC_R (*((volatile unsigned long *)0x400FC020))
  645. #define HIB_RTCT_R (*((volatile unsigned long *)0x400FC024))
  646. #define HIB_DATA_R (*((volatile unsigned long *)0x400FC030))
  647. //*****************************************************************************
  648. //
  649. // FLASH registers (FLASH CTRL)
  650. //
  651. //*****************************************************************************
  652. #define FLASH_FMA_R (*((volatile unsigned long *)0x400FD000))
  653. #define FLASH_FMD_R (*((volatile unsigned long *)0x400FD004))
  654. #define FLASH_FMC_R (*((volatile unsigned long *)0x400FD008))
  655. #define FLASH_FCRIS_R (*((volatile unsigned long *)0x400FD00C))
  656. #define FLASH_FCIM_R (*((volatile unsigned long *)0x400FD010))
  657. #define FLASH_FCMISC_R (*((volatile unsigned long *)0x400FD014))
  658. #define FLASH_USECRL_R (*((volatile unsigned long *)0x400FE140))
  659. #define FLASH_USERDBG_R (*((volatile unsigned long *)0x400FE1D0))
  660. #define FLASH_USERREG0_R (*((volatile unsigned long *)0x400FE1E0))
  661. #define FLASH_USERREG1_R (*((volatile unsigned long *)0x400FE1E4))
  662. #define FLASH_FMPRE0_R (*((volatile unsigned long *)0x400FE200))
  663. #define FLASH_FMPRE1_R (*((volatile unsigned long *)0x400FE204))
  664. #define FLASH_FMPRE2_R (*((volatile unsigned long *)0x400FE208))
  665. #define FLASH_FMPRE3_R (*((volatile unsigned long *)0x400FE20C))
  666. #define FLASH_FMPPE0_R (*((volatile unsigned long *)0x400FE400))
  667. #define FLASH_FMPPE1_R (*((volatile unsigned long *)0x400FE404))
  668. #define FLASH_FMPPE2_R (*((volatile unsigned long *)0x400FE408))
  669. #define FLASH_FMPPE3_R (*((volatile unsigned long *)0x400FE40C))
  670. //*****************************************************************************
  671. //
  672. // System Control registers (SYSCTL)
  673. //
  674. //*****************************************************************************
  675. #define SYSCTL_DID0_R (*((volatile unsigned long *)0x400FE000))
  676. #define SYSCTL_DID1_R (*((volatile unsigned long *)0x400FE004))
  677. #define SYSCTL_DC0_R (*((volatile unsigned long *)0x400FE008))
  678. #define SYSCTL_DC1_R (*((volatile unsigned long *)0x400FE010))
  679. #define SYSCTL_DC2_R (*((volatile unsigned long *)0x400FE014))
  680. #define SYSCTL_DC3_R (*((volatile unsigned long *)0x400FE018))
  681. #define SYSCTL_DC4_R (*((volatile unsigned long *)0x400FE01C))
  682. #define SYSCTL_PBORCTL_R (*((volatile unsigned long *)0x400FE030))
  683. #define SYSCTL_LDOPCTL_R (*((volatile unsigned long *)0x400FE034))
  684. #define SYSCTL_SRCR0_R (*((volatile unsigned long *)0x400FE040))
  685. #define SYSCTL_SRCR1_R (*((volatile unsigned long *)0x400FE044))
  686. #define SYSCTL_SRCR2_R (*((volatile unsigned long *)0x400FE048))
  687. #define SYSCTL_RIS_R (*((volatile unsigned long *)0x400FE050))
  688. #define SYSCTL_IMC_R (*((volatile unsigned long *)0x400FE054))
  689. #define SYSCTL_MISC_R (*((volatile unsigned long *)0x400FE058))
  690. #define SYSCTL_RESC_R (*((volatile unsigned long *)0x400FE05C))
  691. #define SYSCTL_RCC_R (*((volatile unsigned long *)0x400FE060))
  692. #define SYSCTL_PLLCFG_R (*((volatile unsigned long *)0x400FE064))
  693. #define SYSCTL_RCC2_R (*((volatile unsigned long *)0x400FE070))
  694. #define SYSCTL_RCGC0_R (*((volatile unsigned long *)0x400FE100))
  695. #define SYSCTL_RCGC1_R (*((volatile unsigned long *)0x400FE104))
  696. #define SYSCTL_RCGC2_R (*((volatile unsigned long *)0x400FE108))
  697. #define SYSCTL_SCGC0_R (*((volatile unsigned long *)0x400FE110))
  698. #define SYSCTL_SCGC1_R (*((volatile unsigned long *)0x400FE114))
  699. #define SYSCTL_SCGC2_R (*((volatile unsigned long *)0x400FE118))
  700. #define SYSCTL_DCGC0_R (*((volatile unsigned long *)0x400FE120))
  701. #define SYSCTL_DCGC1_R (*((volatile unsigned long *)0x400FE124))
  702. #define SYSCTL_DCGC2_R (*((volatile unsigned long *)0x400FE128))
  703. #define SYSCTL_DSLPCLKCFG_R (*((volatile unsigned long *)0x400FE144))
  704. //*****************************************************************************
  705. //
  706. // NVIC registers (NVIC)
  707. //
  708. //*****************************************************************************
  709. #define NVIC_INT_TYPE_R (*((volatile unsigned long *)0xE000E004))
  710. #define NVIC_ST_CTRL_R (*((volatile unsigned long *)0xE000E010))
  711. #define NVIC_ST_RELOAD_R (*((volatile unsigned long *)0xE000E014))
  712. #define NVIC_ST_CURRENT_R (*((volatile unsigned long *)0xE000E018))
  713. #define NVIC_ST_CAL_R (*((volatile unsigned long *)0xE000E01C))
  714. #define NVIC_EN0_R (*((volatile unsigned long *)0xE000E100))
  715. #define NVIC_EN1_R (*((volatile unsigned long *)0xE000E104))
  716. #define NVIC_DIS0_R (*((volatile unsigned long *)0xE000E180))
  717. #define NVIC_DIS1_R (*((volatile unsigned long *)0xE000E184))
  718. #define NVIC_PEND0_R (*((volatile unsigned long *)0xE000E200))
  719. #define NVIC_PEND1_R (*((volatile unsigned long *)0xE000E204))
  720. #define NVIC_UNPEND0_R (*((volatile unsigned long *)0xE000E280))
  721. #define NVIC_UNPEND1_R (*((volatile unsigned long *)0xE000E284))
  722. #define NVIC_ACTIVE0_R (*((volatile unsigned long *)0xE000E300))
  723. #define NVIC_ACTIVE1_R (*((volatile unsigned long *)0xE000E304))
  724. #define NVIC_PRI0_R (*((volatile unsigned long *)0xE000E400))
  725. #define NVIC_PRI1_R (*((volatile unsigned long *)0xE000E404))
  726. #define NVIC_PRI2_R (*((volatile unsigned long *)0xE000E408))
  727. #define NVIC_PRI3_R (*((volatile unsigned long *)0xE000E40C))
  728. #define NVIC_PRI4_R (*((volatile unsigned long *)0xE000E410))
  729. #define NVIC_PRI5_R (*((volatile unsigned long *)0xE000E414))
  730. #define NVIC_PRI6_R (*((volatile unsigned long *)0xE000E418))
  731. #define NVIC_PRI7_R (*((volatile unsigned long *)0xE000E41C))
  732. #define NVIC_PRI8_R (*((volatile unsigned long *)0xE000E420))
  733. #define NVIC_PRI9_R (*((volatile unsigned long *)0xE000E424))
  734. #define NVIC_PRI10_R (*((volatile unsigned long *)0xE000E428))
  735. #define NVIC_CPUID_R (*((volatile unsigned long *)0xE000ED00))
  736. #define NVIC_INT_CTRL_R (*((volatile unsigned long *)0xE000ED04))
  737. #define NVIC_VTABLE_R (*((volatile unsigned long *)0xE000ED08))
  738. #define NVIC_APINT_R (*((volatile unsigned long *)0xE000ED0C))
  739. #define NVIC_SYS_CTRL_R (*((volatile unsigned long *)0xE000ED10))
  740. #define NVIC_CFG_CTRL_R (*((volatile unsigned long *)0xE000ED14))
  741. #define NVIC_SYS_PRI1_R (*((volatile unsigned long *)0xE000ED18))
  742. #define NVIC_SYS_PRI2_R (*((volatile unsigned long *)0xE000ED1C))
  743. #define NVIC_SYS_PRI3_R (*((volatile unsigned long *)0xE000ED20))
  744. #define NVIC_SYS_HND_CTRL_R (*((volatile unsigned long *)0xE000ED24))
  745. #define NVIC_FAULT_STAT_R (*((volatile unsigned long *)0xE000ED28))
  746. #define NVIC_HFAULT_STAT_R (*((volatile unsigned long *)0xE000ED2C))
  747. #define NVIC_DEBUG_STAT_R (*((volatile unsigned long *)0xE000ED30))
  748. #define NVIC_MM_ADDR_R (*((volatile unsigned long *)0xE000ED34))
  749. #define NVIC_FAULT_ADDR_R (*((volatile unsigned long *)0xE000ED38))
  750. #define NVIC_MPU_TYPE_R (*((volatile unsigned long *)0xE000ED90))
  751. #define NVIC_MPU_CTRL_R (*((volatile unsigned long *)0xE000ED94))
  752. #define NVIC_MPU_NUMBER_R (*((volatile unsigned long *)0xE000ED98))
  753. #define NVIC_MPU_BASE_R (*((volatile unsigned long *)0xE000ED9C))
  754. #define NVIC_MPU_ATTR_R (*((volatile unsigned long *)0xE000EDA0))
  755. #define NVIC_DBG_CTRL_R (*((volatile unsigned long *)0xE000EDF0))
  756. #define NVIC_DBG_XFER_R (*((volatile unsigned long *)0xE000EDF4))
  757. #define NVIC_DBG_DATA_R (*((volatile unsigned long *)0xE000EDF8))
  758. #define NVIC_DBG_INT_R (*((volatile unsigned long *)0xE000EDFC))
  759. #define NVIC_SW_TRIG_R (*((volatile unsigned long *)0xE000EF00))
  760. //*****************************************************************************
  761. //
  762. // The following are defines for the bit fields in the WDT_O_LOAD register.
  763. //
  764. //*****************************************************************************
  765. #define WDT_LOAD_M 0xFFFFFFFF // Watchdog Load Value
  766. #define WDT_LOAD_S 0
  767. //*****************************************************************************
  768. //
  769. // The following are defines for the bit fields in the WDT_O_VALUE register.
  770. //
  771. //*****************************************************************************
  772. #define WDT_VALUE_M 0xFFFFFFFF // Watchdog Value
  773. #define WDT_VALUE_S 0
  774. //*****************************************************************************
  775. //
  776. // The following are defines for the bit fields in the WDT_O_CTL register.
  777. //
  778. //*****************************************************************************
  779. #define WDT_CTL_RESEN 0x00000002 // Watchdog Reset Enable
  780. #define WDT_CTL_INTEN 0x00000001 // Watchdog Interrupt Enable
  781. //*****************************************************************************
  782. //
  783. // The following are defines for the bit fields in the WDT_O_ICR register.
  784. //
  785. //*****************************************************************************
  786. #define WDT_ICR_M 0xFFFFFFFF // Watchdog Interrupt Clear
  787. #define WDT_ICR_S 0
  788. //*****************************************************************************
  789. //
  790. // The following are defines for the bit fields in the WDT_O_RIS register.
  791. //
  792. //*****************************************************************************
  793. #define WDT_RIS_WDTRIS 0x00000001 // Watchdog Raw Interrupt Status
  794. //*****************************************************************************
  795. //
  796. // The following are defines for the bit fields in the WDT_O_MIS register.
  797. //
  798. //*****************************************************************************
  799. #define WDT_MIS_WDTMIS 0x00000001 // Watchdog Masked Interrupt Status
  800. //*****************************************************************************
  801. //
  802. // The following are defines for the bit fields in the WDT_O_TEST register.
  803. //
  804. //*****************************************************************************
  805. #define WDT_TEST_STALL 0x00000100 // Watchdog Stall Enable
  806. //*****************************************************************************
  807. //
  808. // The following are defines for the bit fields in the WDT_O_LOCK register.
  809. //
  810. //*****************************************************************************
  811. #define WDT_LOCK_M 0xFFFFFFFF // Watchdog Lock
  812. #define WDT_LOCK_UNLOCKED 0x00000000 // Unlocked
  813. #define WDT_LOCK_LOCKED 0x00000001 // Locked
  814. #define WDT_LOCK_UNLOCK 0x1ACCE551 // Unlocks the watchdog timer
  815. //*****************************************************************************
  816. //
  817. // The following are defines for the bit fields in the GPIO_O_LOCK register.
  818. //
  819. //*****************************************************************************
  820. #define GPIO_LOCK_M 0xFFFFFFFF // GPIO Lock
  821. #define GPIO_LOCK_UNLOCKED 0x00000000 // The GPIOCR register is unlocked
  822. // and may be modified
  823. #define GPIO_LOCK_LOCKED 0x00000001 // The GPIOCR register is locked
  824. // and may not be modified
  825. #define GPIO_LOCK_KEY 0x1ACCE551 // Unlocks the GPIO_CR register
  826. //*****************************************************************************
  827. //
  828. // The following are defines for the bit fields in the SSI_O_CR0 register.
  829. //
  830. //*****************************************************************************
  831. #define SSI_CR0_SCR_M 0x0000FF00 // SSI Serial Clock Rate
  832. #define SSI_CR0_SPH 0x00000080 // SSI Serial Clock Phase
  833. #define SSI_CR0_SPO 0x00000040 // SSI Serial Clock Polarity
  834. #define SSI_CR0_FRF_M 0x00000030 // SSI Frame Format Select
  835. #define SSI_CR0_FRF_MOTO 0x00000000 // Freescale SPI Frame Format
  836. #define SSI_CR0_FRF_TI 0x00000010 // Texas Instruments Synchronous
  837. // Serial Frame Format
  838. #define SSI_CR0_FRF_NMW 0x00000020 // MICROWIRE Frame Format
  839. #define SSI_CR0_DSS_M 0x0000000F // SSI Data Size Select
  840. #define SSI_CR0_DSS_4 0x00000003 // 4-bit data
  841. #define SSI_CR0_DSS_5 0x00000004 // 5-bit data
  842. #define SSI_CR0_DSS_6 0x00000005 // 6-bit data
  843. #define SSI_CR0_DSS_7 0x00000006 // 7-bit data
  844. #define SSI_CR0_DSS_8 0x00000007 // 8-bit data
  845. #define SSI_CR0_DSS_9 0x00000008 // 9-bit data
  846. #define SSI_CR0_DSS_10 0x00000009 // 10-bit data
  847. #define SSI_CR0_DSS_11 0x0000000A // 11-bit data
  848. #define SSI_CR0_DSS_12 0x0000000B // 12-bit data
  849. #define SSI_CR0_DSS_13 0x0000000C // 13-bit data
  850. #define SSI_CR0_DSS_14 0x0000000D // 14-bit data
  851. #define SSI_CR0_DSS_15 0x0000000E // 15-bit data
  852. #define SSI_CR0_DSS_16 0x0000000F // 16-bit data
  853. #define SSI_CR0_SCR_S 8
  854. //*****************************************************************************
  855. //
  856. // The following are defines for the bit fields in the SSI_O_CR1 register.
  857. //
  858. //*****************************************************************************
  859. #define SSI_CR1_SOD 0x00000008 // SSI Slave Mode Output Disable
  860. #define SSI_CR1_MS 0x00000004 // SSI Master/Slave Select
  861. #define SSI_CR1_SSE 0x00000002 // SSI Synchronous Serial Port
  862. // Enable
  863. #define SSI_CR1_LBM 0x00000001 // SSI Loopback Mode
  864. //*****************************************************************************
  865. //
  866. // The following are defines for the bit fields in the SSI_O_DR register.
  867. //
  868. //*****************************************************************************
  869. #define SSI_DR_DATA_M 0x0000FFFF // SSI Receive/Transmit Data
  870. #define SSI_DR_DATA_S 0
  871. //*****************************************************************************
  872. //
  873. // The following are defines for the bit fields in the SSI_O_SR register.
  874. //
  875. //*****************************************************************************
  876. #define SSI_SR_BSY 0x00000010 // SSI Busy Bit
  877. #define SSI_SR_RFF 0x00000008 // SSI Receive FIFO Full
  878. #define SSI_SR_RNE 0x00000004 // SSI Receive FIFO Not Empty
  879. #define SSI_SR_TNF 0x00000002 // SSI Transmit FIFO Not Full
  880. #define SSI_SR_TFE 0x00000001 // SSI Transmit FIFO Empty
  881. //*****************************************************************************
  882. //
  883. // The following are defines for the bit fields in the SSI_O_CPSR register.
  884. //
  885. //*****************************************************************************
  886. #define SSI_CPSR_CPSDVSR_M 0x000000FF // SSI Clock Prescale Divisor
  887. #define SSI_CPSR_CPSDVSR_S 0
  888. //*****************************************************************************
  889. //
  890. // The following are defines for the bit fields in the SSI_O_IM register.
  891. //
  892. //*****************************************************************************
  893. #define SSI_IM_TXIM 0x00000008 // SSI Transmit FIFO Interrupt Mask
  894. #define SSI_IM_RXIM 0x00000004 // SSI Receive FIFO Interrupt Mask
  895. #define SSI_IM_RTIM 0x00000002 // SSI Receive Time-Out Interrupt
  896. // Mask
  897. #define SSI_IM_RORIM 0x00000001 // SSI Receive Overrun Interrupt
  898. // Mask
  899. //*****************************************************************************
  900. //
  901. // The following are defines for the bit fields in the SSI_O_RIS register.
  902. //
  903. //*****************************************************************************
  904. #define SSI_RIS_TXRIS 0x00000008 // SSI Transmit FIFO Raw Interrupt
  905. // Status
  906. #define SSI_RIS_RXRIS 0x00000004 // SSI Receive FIFO Raw Interrupt
  907. // Status
  908. #define SSI_RIS_RTRIS 0x00000002 // SSI Receive Time-Out Raw
  909. // Interrupt Status
  910. #define SSI_RIS_RORRIS 0x00000001 // SSI Receive Overrun Raw
  911. // Interrupt Status
  912. //*****************************************************************************
  913. //
  914. // The following are defines for the bit fields in the SSI_O_MIS register.
  915. //
  916. //*****************************************************************************
  917. #define SSI_MIS_TXMIS 0x00000008 // SSI Transmit FIFO Masked
  918. // Interrupt Status
  919. #define SSI_MIS_RXMIS 0x00000004 // SSI Receive FIFO Masked
  920. // Interrupt Status
  921. #define SSI_MIS_RTMIS 0x00000002 // SSI Receive Time-Out Masked
  922. // Interrupt Status
  923. #define SSI_MIS_RORMIS 0x00000001 // SSI Receive Overrun Masked
  924. // Interrupt Status
  925. //*****************************************************************************
  926. //
  927. // The following are defines for the bit fields in the SSI_O_ICR register.
  928. //
  929. //*****************************************************************************
  930. #define SSI_ICR_RTIC 0x00000002 // SSI Receive Time-Out Interrupt
  931. // Clear
  932. #define SSI_ICR_RORIC 0x00000001 // SSI Receive Overrun Interrupt
  933. // Clear
  934. //*****************************************************************************
  935. //
  936. // The following are defines for the bit fields in the UART_O_DR register.
  937. //
  938. //*****************************************************************************
  939. #define UART_DR_OE 0x00000800 // UART Overrun Error
  940. #define UART_DR_BE 0x00000400 // UART Break Error
  941. #define UART_DR_PE 0x00000200 // UART Parity Error
  942. #define UART_DR_FE 0x00000100 // UART Framing Error
  943. #define UART_DR_DATA_M 0x000000FF // Data Transmitted or Received
  944. #define UART_DR_DATA_S 0
  945. //*****************************************************************************
  946. //
  947. // The following are defines for the bit fields in the UART_O_RSR register.
  948. //
  949. //*****************************************************************************
  950. #define UART_RSR_OE 0x00000008 // UART Overrun Error
  951. #define UART_RSR_BE 0x00000004 // UART Break Error
  952. #define UART_RSR_PE 0x00000002 // UART Parity Error
  953. #define UART_RSR_FE 0x00000001 // UART Framing Error
  954. //*****************************************************************************
  955. //
  956. // The following are defines for the bit fields in the UART_O_ECR register.
  957. //
  958. //*****************************************************************************
  959. #define UART_ECR_DATA_M 0x000000FF // Error Clear
  960. #define UART_ECR_DATA_S 0
  961. //*****************************************************************************
  962. //
  963. // The following are defines for the bit fields in the UART_O_FR register.
  964. //
  965. //*****************************************************************************
  966. #define UART_FR_TXFE 0x00000080 // UART Transmit FIFO Empty
  967. #define UART_FR_RXFF 0x00000040 // UART Receive FIFO Full
  968. #define UART_FR_TXFF 0x00000020 // UART Transmit FIFO Full
  969. #define UART_FR_RXFE 0x00000010 // UART Receive FIFO Empty
  970. #define UART_FR_BUSY 0x00000008 // UART Busy
  971. //*****************************************************************************
  972. //
  973. // The following are defines for the bit fields in the UART_O_ILPR register.
  974. //
  975. //*****************************************************************************
  976. #define UART_ILPR_ILPDVSR_M 0x000000FF // IrDA Low-Power Divisor
  977. #define UART_ILPR_ILPDVSR_S 0
  978. //*****************************************************************************
  979. //
  980. // The following are defines for the bit fields in the UART_O_IBRD register.
  981. //
  982. //*****************************************************************************
  983. #define UART_IBRD_DIVINT_M 0x0000FFFF // Integer Baud-Rate Divisor
  984. #define UART_IBRD_DIVINT_S 0
  985. //*****************************************************************************
  986. //
  987. // The following are defines for the bit fields in the UART_O_FBRD register.
  988. //
  989. //*****************************************************************************
  990. #define UART_FBRD_DIVFRAC_M 0x0000003F // Fractional Baud-Rate Divisor
  991. #define UART_FBRD_DIVFRAC_S 0
  992. //*****************************************************************************
  993. //
  994. // The following are defines for the bit fields in the UART_O_LCRH register.
  995. //
  996. //*****************************************************************************
  997. #define UART_LCRH_SPS 0x00000080 // UART Stick Parity Select
  998. #define UART_LCRH_WLEN_M 0x00000060 // UART Word Length
  999. #define UART_LCRH_WLEN_5 0x00000000 // 5 bits (default)
  1000. #define UART_LCRH_WLEN_6 0x00000020 // 6 bits
  1001. #define UART_LCRH_WLEN_7 0x00000040 // 7 bits
  1002. #define UART_LCRH_WLEN_8 0x00000060 // 8 bits
  1003. #define UART_LCRH_FEN 0x00000010 // UART Enable FIFOs
  1004. #define UART_LCRH_STP2 0x00000008 // UART Two Stop Bits Select
  1005. #define UART_LCRH_EPS 0x00000004 // UART Even Parity Select
  1006. #define UART_LCRH_PEN 0x00000002 // UART Parity Enable
  1007. #define UART_LCRH_BRK 0x00000001 // UART Send Break
  1008. //*****************************************************************************
  1009. //
  1010. // The following are defines for the bit fields in the UART_O_CTL register.
  1011. //
  1012. //*****************************************************************************
  1013. #define UART_CTL_RXE 0x00000200 // UART Receive Enable
  1014. #define UART_CTL_TXE 0x00000100 // UART Transmit Enable
  1015. #define UART_CTL_LBE 0x00000080 // UART Loop Back Enable
  1016. #define UART_CTL_SIRLP 0x00000004 // UART SIR Low-Power Mode
  1017. #define UART_CTL_SIREN 0x00000002 // UART SIR Enable
  1018. #define UART_CTL_UARTEN 0x00000001 // UART Enable
  1019. //*****************************************************************************
  1020. //
  1021. // The following are defines for the bit fields in the UART_O_IFLS register.
  1022. //
  1023. //*****************************************************************************
  1024. #define UART_IFLS_RX_M 0x00000038 // UART Receive Interrupt FIFO
  1025. // Level Select
  1026. #define UART_IFLS_RX1_8 0x00000000 // RX FIFO >= 1/8 full
  1027. #define UART_IFLS_RX2_8 0x00000008 // RX FIFO >= 1/4 full
  1028. #define UART_IFLS_RX4_8 0x00000010 // RX FIFO >= 1/2 full (default)
  1029. #define UART_IFLS_RX6_8 0x00000018 // RX FIFO >= 3/4 full
  1030. #define UART_IFLS_RX7_8 0x00000020 // RX FIFO >= 7/8 full
  1031. #define UART_IFLS_TX_M 0x00000007 // UART Transmit Interrupt FIFO
  1032. // Level Select
  1033. #define UART_IFLS_TX1_8 0x00000000 // TX FIFO <= 1/8 full
  1034. #define UART_IFLS_TX2_8 0x00000001 // TX FIFO <= 1/4 full
  1035. #define UART_IFLS_TX4_8 0x00000002 // TX FIFO <= 1/2 full (default)
  1036. #define UART_IFLS_TX6_8 0x00000003 // TX FIFO <= 3/4 full
  1037. #define UART_IFLS_TX7_8 0x00000004 // TX FIFO <= 7/8 full
  1038. //*****************************************************************************
  1039. //
  1040. // The following are defines for the bit fields in the UART_O_IM register.
  1041. //
  1042. //*****************************************************************************
  1043. #define UART_IM_OEIM 0x00000400 // UART Overrun Error Interrupt
  1044. // Mask
  1045. #define UART_IM_BEIM 0x00000200 // UART Break Error Interrupt Mask
  1046. #define UART_IM_PEIM 0x00000100 // UART Parity Error Interrupt Mask
  1047. #define UART_IM_FEIM 0x00000080 // UART Framing Error Interrupt
  1048. // Mask
  1049. #define UART_IM_RTIM 0x00000040 // UART Receive Time-Out Interrupt
  1050. // Mask
  1051. #define UART_IM_TXIM 0x00000020 // UART Transmit Interrupt Mask
  1052. #define UART_IM_RXIM 0x00000010 // UART Receive Interrupt Mask
  1053. //*****************************************************************************
  1054. //
  1055. // The following are defines for the bit fields in the UART_O_RIS register.
  1056. //
  1057. //*****************************************************************************
  1058. #define UART_RIS_OERIS 0x00000400 // UART Overrun Error Raw Interrupt
  1059. // Status
  1060. #define UART_RIS_BERIS 0x00000200 // UART Break Error Raw Interrupt
  1061. // Status
  1062. #define UART_RIS_PERIS 0x00000100 // UART Parity Error Raw Interrupt
  1063. // Status
  1064. #define UART_RIS_FERIS 0x00000080 // UART Framing Error Raw Interrupt
  1065. // Status
  1066. #define UART_RIS_RTRIS 0x00000040 // UART Receive Time-Out Raw
  1067. // Interrupt Status
  1068. #define UART_RIS_TXRIS 0x00000020 // UART Transmit Raw Interrupt
  1069. // Status
  1070. #define UART_RIS_RXRIS 0x00000010 // UART Receive Raw Interrupt
  1071. // Status
  1072. //*****************************************************************************
  1073. //
  1074. // The following are defines for the bit fields in the UART_O_MIS register.
  1075. //
  1076. //*****************************************************************************
  1077. #define UART_MIS_OEMIS 0x00000400 // UART Overrun Error Masked
  1078. // Interrupt Status
  1079. #define UART_MIS_BEMIS 0x00000200 // UART Break Error Masked
  1080. // Interrupt Status
  1081. #define UART_MIS_PEMIS 0x00000100 // UART Parity Error Masked
  1082. // Interrupt Status
  1083. #define UART_MIS_FEMIS 0x00000080 // UART Framing Error Masked
  1084. // Interrupt Status
  1085. #define UART_MIS_RTMIS 0x00000040 // UART Receive Time-Out Masked
  1086. // Interrupt Status
  1087. #define UART_MIS_TXMIS 0x00000020 // UART Transmit Masked Interrupt
  1088. // Status
  1089. #define UART_MIS_RXMIS 0x00000010 // UART Receive Masked Interrupt
  1090. // Status
  1091. //*****************************************************************************
  1092. //
  1093. // The following are defines for the bit fields in the UART_O_ICR register.
  1094. //
  1095. //*****************************************************************************
  1096. #define UART_ICR_OEIC 0x00000400 // Overrun Error Interrupt Clear
  1097. #define UART_ICR_BEIC 0x00000200 // Break Error Interrupt Clear
  1098. #define UART_ICR_PEIC 0x00000100 // Parity Error Interrupt Clear
  1099. #define UART_ICR_FEIC 0x00000080 // Framing Error Interrupt Clear
  1100. #define UART_ICR_RTIC 0x00000040 // Receive Time-Out Interrupt Clear
  1101. #define UART_ICR_TXIC 0x00000020 // Transmit Interrupt Clear
  1102. #define UART_ICR_RXIC 0x00000010 // Receive Interrupt Clear
  1103. //*****************************************************************************
  1104. //
  1105. // The following are defines for the bit fields in the I2C_O_MSA register.
  1106. //
  1107. //*****************************************************************************
  1108. #define I2C_MSA_SA_M 0x000000FE // I2C Slave Address
  1109. #define I2C_MSA_RS 0x00000001 // Receive not send
  1110. #define I2C_MSA_SA_S 1
  1111. //*****************************************************************************
  1112. //
  1113. // The following are defines for the bit fields in the I2C_O_SOAR register.
  1114. //
  1115. //*****************************************************************************
  1116. #define I2C_SOAR_OAR_M 0x0000007F // I2C Slave Own Address
  1117. #define I2C_SOAR_OAR_S 0
  1118. //*****************************************************************************
  1119. //
  1120. // The following are defines for the bit fields in the I2C_O_SCSR register.
  1121. //
  1122. //*****************************************************************************
  1123. #define I2C_SCSR_FBR 0x00000004 // First Byte Received
  1124. #define I2C_SCSR_TREQ 0x00000002 // Transmit Request
  1125. #define I2C_SCSR_DA 0x00000001 // Device Active
  1126. #define I2C_SCSR_RREQ 0x00000001 // Receive Request
  1127. //*****************************************************************************
  1128. //
  1129. // The following are defines for the bit fields in the I2C_O_MCS register.
  1130. //
  1131. //*****************************************************************************
  1132. #define I2C_MCS_BUSBSY 0x00000040 // Bus Busy
  1133. #define I2C_MCS_IDLE 0x00000020 // I2C Idle
  1134. #define I2C_MCS_ARBLST 0x00000010 // Arbitration Lost
  1135. #define I2C_MCS_ACK 0x00000008 // Data Acknowledge Enable
  1136. #define I2C_MCS_DATACK 0x00000008 // Acknowledge Data
  1137. #define I2C_MCS_ADRACK 0x00000004 // Acknowledge Address
  1138. #define I2C_MCS_STOP 0x00000004 // Generate STOP
  1139. #define I2C_MCS_START 0x00000002 // Generate START
  1140. #define I2C_MCS_ERROR 0x00000002 // Error
  1141. #define I2C_MCS_RUN 0x00000001 // I2C Master Enable
  1142. #define I2C_MCS_BUSY 0x00000001 // I2C Busy
  1143. //*****************************************************************************
  1144. //
  1145. // The following are defines for the bit fields in the I2C_O_SDR register.
  1146. //
  1147. //*****************************************************************************
  1148. #define I2C_SDR_DATA_M 0x000000FF // Data for Transfer
  1149. #define I2C_SDR_DATA_S 0
  1150. //*****************************************************************************
  1151. //
  1152. // The following are defines for the bit fields in the I2C_O_MDR register.
  1153. //
  1154. //*****************************************************************************
  1155. #define I2C_MDR_DATA_M 0x000000FF // Data Transferred
  1156. #define I2C_MDR_DATA_S 0
  1157. //*****************************************************************************
  1158. //
  1159. // The following are defines for the bit fields in the I2C_O_MTPR register.
  1160. //
  1161. //*****************************************************************************
  1162. #define I2C_MTPR_TPR_M 0x0000007F // SCL Clock Period
  1163. #define I2C_MTPR_TPR_S 0
  1164. //*****************************************************************************
  1165. //
  1166. // The following are defines for the bit fields in the I2C_O_SIMR register.
  1167. //
  1168. //*****************************************************************************
  1169. #define I2C_SIMR_DATAIM 0x00000001 // Data Interrupt Mask
  1170. //*****************************************************************************
  1171. //
  1172. // The following are defines for the bit fields in the I2C_O_SRIS register.
  1173. //
  1174. //*****************************************************************************
  1175. #define I2C_SRIS_DATARIS 0x00000001 // Data Raw Interrupt Status
  1176. //*****************************************************************************
  1177. //
  1178. // The following are defines for the bit fields in the I2C_O_MIMR register.
  1179. //
  1180. //*****************************************************************************
  1181. #define I2C_MIMR_IM 0x00000001 // Interrupt Mask
  1182. //*****************************************************************************
  1183. //
  1184. // The following are defines for the bit fields in the I2C_O_MRIS register.
  1185. //
  1186. //*****************************************************************************
  1187. #define I2C_MRIS_RIS 0x00000001 // Raw Interrupt Status
  1188. //*****************************************************************************
  1189. //
  1190. // The following are defines for the bit fields in the I2C_O_SMIS register.
  1191. //
  1192. //*****************************************************************************
  1193. #define I2C_SMIS_DATAMIS 0x00000001 // Data Masked Interrupt Status
  1194. //*****************************************************************************
  1195. //
  1196. // The following are defines for the bit fields in the I2C_O_SICR register.
  1197. //
  1198. //*****************************************************************************
  1199. #define I2C_SICR_DATAIC 0x00000001 // Data Interrupt Clear
  1200. //*****************************************************************************
  1201. //
  1202. // The following are defines for the bit fields in the I2C_O_MMIS register.
  1203. //
  1204. //*****************************************************************************
  1205. #define I2C_MMIS_MIS 0x00000001 // Masked Interrupt Status
  1206. //*****************************************************************************
  1207. //
  1208. // The following are defines for the bit fields in the I2C_O_MICR register.
  1209. //
  1210. //*****************************************************************************
  1211. #define I2C_MICR_IC 0x00000001 // Interrupt Clear
  1212. //*****************************************************************************
  1213. //
  1214. // The following are defines for the bit fields in the I2C_O_MCR register.
  1215. //
  1216. //*****************************************************************************
  1217. #define I2C_MCR_SFE 0x00000020 // I2C Slave Function Enable
  1218. #define I2C_MCR_MFE 0x00000010 // I2C Master Function Enable
  1219. #define I2C_MCR_LPBK 0x00000001 // I2C Loopback
  1220. //*****************************************************************************
  1221. //
  1222. // The following are defines for the bit fields in the PWM_O_CTL register.
  1223. //
  1224. //*****************************************************************************
  1225. #define PWM_CTL_GLOBALSYNC2 0x00000004 // Update PWM Generator 2
  1226. #define PWM_CTL_GLOBALSYNC1 0x00000002 // Update PWM Generator 1
  1227. #define PWM_CTL_GLOBALSYNC0 0x00000001 // Update PWM Generator 0
  1228. //*****************************************************************************
  1229. //
  1230. // The following are defines for the bit fields in the PWM_O_SYNC register.
  1231. //
  1232. //*****************************************************************************
  1233. #define PWM_SYNC_SYNC2 0x00000004 // Reset Generator 2 Counter
  1234. #define PWM_SYNC_SYNC1 0x00000002 // Reset Generator 1 Counter
  1235. #define PWM_SYNC_SYNC0 0x00000001 // Reset Generator 0 Counter
  1236. //*****************************************************************************
  1237. //
  1238. // The following are defines for the bit fields in the PWM_O_ENABLE register.
  1239. //
  1240. //*****************************************************************************
  1241. #define PWM_ENABLE_PWM5EN 0x00000020 // PWM5 Output Enable
  1242. #define PWM_ENABLE_PWM4EN 0x00000010 // PWM4 Output Enable
  1243. #define PWM_ENABLE_PWM3EN 0x00000008 // PWM3 Output Enable
  1244. #define PWM_ENABLE_PWM2EN 0x00000004 // PWM2 Output Enable
  1245. #define PWM_ENABLE_PWM1EN 0x00000002 // PWM1 Output Enable
  1246. #define PWM_ENABLE_PWM0EN 0x00000001 // PWM0 Output Enable
  1247. //*****************************************************************************
  1248. //
  1249. // The following are defines for the bit fields in the PWM_O_INVERT register.
  1250. //
  1251. //*****************************************************************************
  1252. #define PWM_INVERT_PWM5INV 0x00000020 // Invert PWM5 Signal
  1253. #define PWM_INVERT_PWM4INV 0x00000010 // Invert PWM4 Signal
  1254. #define PWM_INVERT_PWM3INV 0x00000008 // Invert PWM3 Signal
  1255. #define PWM_INVERT_PWM2INV 0x00000004 // Invert PWM2 Signal
  1256. #define PWM_INVERT_PWM1INV 0x00000002 // Invert PWM1 Signal
  1257. #define PWM_INVERT_PWM0INV 0x00000001 // Invert PWM0 Signal
  1258. //*****************************************************************************
  1259. //
  1260. // The following are defines for the bit fields in the PWM_O_FAULT register.
  1261. //
  1262. //*****************************************************************************
  1263. #define PWM_FAULT_FAULT5 0x00000020 // PWM5 Fault
  1264. #define PWM_FAULT_FAULT4 0x00000010 // PWM4 Fault
  1265. #define PWM_FAULT_FAULT3 0x00000008 // PWM3 Fault
  1266. #define PWM_FAULT_FAULT2 0x00000004 // PWM2 Fault
  1267. #define PWM_FAULT_FAULT1 0x00000002 // PWM1 Fault
  1268. #define PWM_FAULT_FAULT0 0x00000001 // PWM0 Fault
  1269. //*****************************************************************************
  1270. //
  1271. // The following are defines for the bit fields in the PWM_O_INTEN register.
  1272. //
  1273. //*****************************************************************************
  1274. #define PWM_INTEN_INTFAULT 0x00010000 // Fault Interrupt Enable
  1275. #define PWM_INTEN_INTPWM2 0x00000004 // PWM2 Interrupt Enable
  1276. #define PWM_INTEN_INTPWM1 0x00000002 // PWM1 Interrupt Enable
  1277. #define PWM_INTEN_INTPWM0 0x00000001 // PWM0 Interrupt Enable
  1278. //*****************************************************************************
  1279. //
  1280. // The following are defines for the bit fields in the PWM_O_RIS register.
  1281. //
  1282. //*****************************************************************************
  1283. #define PWM_RIS_INTFAULT 0x00010000 // Fault Interrupt Asserted
  1284. #define PWM_RIS_INTPWM2 0x00000004 // PWM2 Interrupt Asserted
  1285. #define PWM_RIS_INTPWM1 0x00000002 // PWM1 Interrupt Asserted
  1286. #define PWM_RIS_INTPWM0 0x00000001 // PWM0 Interrupt Asserted
  1287. //*****************************************************************************
  1288. //
  1289. // The following are defines for the bit fields in the PWM_O_ISC register.
  1290. //
  1291. //*****************************************************************************
  1292. #define PWM_ISC_INTFAULT 0x00010000 // Fault Interrupt Asserted
  1293. #define PWM_ISC_INTPWM2 0x00000004 // PWM2 Interrupt Status
  1294. #define PWM_ISC_INTPWM1 0x00000002 // PWM1 Interrupt Status
  1295. #define PWM_ISC_INTPWM0 0x00000001 // PWM0 Interrupt Status
  1296. //*****************************************************************************
  1297. //
  1298. // The following are defines for the bit fields in the PWM_O_STATUS register.
  1299. //
  1300. //*****************************************************************************
  1301. #define PWM_STATUS_FAULT 0x00000001 // Fault Interrupt Status
  1302. //*****************************************************************************
  1303. //
  1304. // The following are defines for the bit fields in the PWM_O_X_CTL register.
  1305. //
  1306. //*****************************************************************************
  1307. #define PWM_X_CTL_CMPBUPD 0x00000020 // Comparator B Update Mode
  1308. #define PWM_X_CTL_CMPAUPD 0x00000010 // Comparator A Update Mode
  1309. #define PWM_X_CTL_LOADUPD 0x00000008 // Load Register Update Mode
  1310. #define PWM_X_CTL_DEBUG 0x00000004 // Debug Mode
  1311. #define PWM_X_CTL_MODE 0x00000002 // Counter Mode
  1312. #define PWM_X_CTL_ENABLE 0x00000001 // PWM Block Enable
  1313. //*****************************************************************************
  1314. //
  1315. // The following are defines for the bit fields in the PWM_O_X_INTEN register.
  1316. //
  1317. //*****************************************************************************
  1318. #define PWM_X_INTEN_TRCMPBD 0x00002000 // Trigger for Counter=PWMnCMPB
  1319. // Down
  1320. #define PWM_X_INTEN_TRCMPBU 0x00001000 // Trigger for Counter=PWMnCMPB Up
  1321. #define PWM_X_INTEN_TRCMPAD 0x00000800 // Trigger for Counter=PWMnCMPA
  1322. // Down
  1323. #define PWM_X_INTEN_TRCMPAU 0x00000400 // Trigger for Counter=PWMnCMPA Up
  1324. #define PWM_X_INTEN_TRCNTLOAD 0x00000200 // Trigger for Counter=PWMnLOAD
  1325. #define PWM_X_INTEN_TRCNTZERO 0x00000100 // Trigger for Counter=0
  1326. #define PWM_X_INTEN_INTCMPBD 0x00000020 // Interrupt for Counter=PWMnCMPB
  1327. // Down
  1328. #define PWM_X_INTEN_INTCMPBU 0x00000010 // Interrupt for Counter=PWMnCMPB
  1329. // Up
  1330. #define PWM_X_INTEN_INTCMPAD 0x00000008 // Interrupt for Counter=PWMnCMPA
  1331. // Down
  1332. #define PWM_X_INTEN_INTCMPAU 0x00000004 // Interrupt for Counter=PWMnCMPA
  1333. // Up
  1334. #define PWM_X_INTEN_INTCNTLOAD 0x00000002 // Interrupt for Counter=PWMnLOAD
  1335. #define PWM_X_INTEN_INTCNTZERO 0x00000001 // Interrupt for Counter=0
  1336. //*****************************************************************************
  1337. //
  1338. // The following are defines for the bit fields in the PWM_O_X_RIS register.
  1339. //
  1340. //*****************************************************************************
  1341. #define PWM_X_RIS_INTCMPBD 0x00000020 // Comparator B Down Interrupt
  1342. // Status
  1343. #define PWM_X_RIS_INTCMPBU 0x00000010 // Comparator B Up Interrupt Status
  1344. #define PWM_X_RIS_INTCMPAD 0x00000008 // Comparator A Down Interrupt
  1345. // Status
  1346. #define PWM_X_RIS_INTCMPAU 0x00000004 // Comparator A Up Interrupt Status
  1347. #define PWM_X_RIS_INTCNTLOAD 0x00000002 // Counter=Load Interrupt Status
  1348. #define PWM_X_RIS_INTCNTZERO 0x00000001 // Counter=0 Interrupt Status
  1349. //*****************************************************************************
  1350. //
  1351. // The following are defines for the bit fields in the PWM_O_X_ISC register.
  1352. //
  1353. //*****************************************************************************
  1354. #define PWM_X_ISC_INTCMPBD 0x00000020 // Comparator B Down Interrupt
  1355. #define PWM_X_ISC_INTCMPBU 0x00000010 // Comparator B Up Interrupt
  1356. #define PWM_X_ISC_INTCMPAD 0x00000008 // Comparator A Down Interrupt
  1357. #define PWM_X_ISC_INTCMPAU 0x00000004 // Comparator A Up Interrupt
  1358. #define PWM_X_ISC_INTCNTLOAD 0x00000002 // Counter=Load Interrupt
  1359. #define PWM_X_ISC_INTCNTZERO 0x00000001 // Counter=0 Interrupt
  1360. //*****************************************************************************
  1361. //
  1362. // The following are defines for the bit fields in the PWM_O_X_LOAD register.
  1363. //
  1364. //*****************************************************************************
  1365. #define PWM_X_LOAD_M 0x0000FFFF // Counter Load Value
  1366. #define PWM_X_LOAD_S 0
  1367. //*****************************************************************************
  1368. //
  1369. // The following are defines for the bit fields in the PWM_O_X_COUNT register.
  1370. //
  1371. //*****************************************************************************
  1372. #define PWM_X_COUNT_M 0x0000FFFF // Counter Value
  1373. #define PWM_X_COUNT_S 0
  1374. //*****************************************************************************
  1375. //
  1376. // The following are defines for the bit fields in the PWM_O_X_CMPA register.
  1377. //
  1378. //*****************************************************************************
  1379. #define PWM_X_CMPA_M 0x0000FFFF // Comparator A Value
  1380. #define PWM_X_CMPA_S 0
  1381. //*****************************************************************************
  1382. //
  1383. // The following are defines for the bit fields in the PWM_O_X_CMPB register.
  1384. //
  1385. //*****************************************************************************
  1386. #define PWM_X_CMPB_M 0x0000FFFF // Comparator B Value
  1387. #define PWM_X_CMPB_S 0
  1388. //*****************************************************************************
  1389. //
  1390. // The following are defines for the bit fields in the PWM_O_X_GENA register.
  1391. //
  1392. //*****************************************************************************
  1393. #define PWM_X_GENA_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down
  1394. #define PWM_X_GENA_ACTCMPBD_NONE \
  1395. 0x00000000 // Do nothing
  1396. #define PWM_X_GENA_ACTCMPBD_INV 0x00000400 // Invert pwmA
  1397. #define PWM_X_GENA_ACTCMPBD_ZERO \
  1398. 0x00000800 // Drive pwmA Low
  1399. #define PWM_X_GENA_ACTCMPBD_ONE 0x00000C00 // Drive pwmA High
  1400. #define PWM_X_GENA_ACTCMPBU_M 0x00000300 // Action for Comparator B Up
  1401. #define PWM_X_GENA_ACTCMPBU_NONE \
  1402. 0x00000000 // Do nothing
  1403. #define PWM_X_GENA_ACTCMPBU_INV 0x00000100 // Invert pwmA
  1404. #define PWM_X_GENA_ACTCMPBU_ZERO \
  1405. 0x00000200 // Drive pwmA Low
  1406. #define PWM_X_GENA_ACTCMPBU_ONE 0x00000300 // Drive pwmA High
  1407. #define PWM_X_GENA_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down
  1408. #define PWM_X_GENA_ACTCMPAD_NONE \
  1409. 0x00000000 // Do nothing
  1410. #define PWM_X_GENA_ACTCMPAD_INV 0x00000040 // Invert pwmA
  1411. #define PWM_X_GENA_ACTCMPAD_ZERO \
  1412. 0x00000080 // Drive pwmA Low
  1413. #define PWM_X_GENA_ACTCMPAD_ONE 0x000000C0 // Drive pwmA High
  1414. #define PWM_X_GENA_ACTCMPAU_M 0x00000030 // Action for Comparator A Up
  1415. #define PWM_X_GENA_ACTCMPAU_NONE \
  1416. 0x00000000 // Do nothing
  1417. #define PWM_X_GENA_ACTCMPAU_INV 0x00000010 // Invert pwmA
  1418. #define PWM_X_GENA_ACTCMPAU_ZERO \
  1419. 0x00000020 // Drive pwmA Low
  1420. #define PWM_X_GENA_ACTCMPAU_ONE 0x00000030 // Drive pwmA High
  1421. #define PWM_X_GENA_ACTLOAD_M 0x0000000C // Action for Counter=LOAD
  1422. #define PWM_X_GENA_ACTLOAD_NONE 0x00000000 // Do nothing
  1423. #define PWM_X_GENA_ACTLOAD_INV 0x00000004 // Invert pwmA
  1424. #define PWM_X_GENA_ACTLOAD_ZERO 0x00000008 // Drive pwmA Low
  1425. #define PWM_X_GENA_ACTLOAD_ONE 0x0000000C // Drive pwmA High
  1426. #define PWM_X_GENA_ACTZERO_M 0x00000003 // Action for Counter=0
  1427. #define PWM_X_GENA_ACTZERO_NONE 0x00000000 // Do nothing
  1428. #define PWM_X_GENA_ACTZERO_INV 0x00000001 // Invert pwmA
  1429. #define PWM_X_GENA_ACTZERO_ZERO 0x00000002 // Drive pwmA Low
  1430. #define PWM_X_GENA_ACTZERO_ONE 0x00000003 // Drive pwmA High
  1431. //*****************************************************************************
  1432. //
  1433. // The following are defines for the bit fields in the PWM_O_X_GENB register.
  1434. //
  1435. //*****************************************************************************
  1436. #define PWM_X_GENB_ACTCMPBD_M 0x00000C00 // Action for Comparator B Down
  1437. #define PWM_X_GENB_ACTCMPBD_NONE \
  1438. 0x00000000 // Do nothing
  1439. #define PWM_X_GENB_ACTCMPBD_INV 0x00000400 // Invert pwmB
  1440. #define PWM_X_GENB_ACTCMPBD_ZERO \
  1441. 0x00000800 // Drive pwmB Low
  1442. #define PWM_X_GENB_ACTCMPBD_ONE 0x00000C00 // Drive pwmB High
  1443. #define PWM_X_GENB_ACTCMPBU_M 0x00000300 // Action for Comparator B Up
  1444. #define PWM_X_GENB_ACTCMPBU_NONE \
  1445. 0x00000000 // Do nothing
  1446. #define PWM_X_GENB_ACTCMPBU_INV 0x00000100 // Invert pwmB
  1447. #define PWM_X_GENB_ACTCMPBU_ZERO \
  1448. 0x00000200 // Drive pwmB Low
  1449. #define PWM_X_GENB_ACTCMPBU_ONE 0x00000300 // Drive pwmB High
  1450. #define PWM_X_GENB_ACTCMPAD_M 0x000000C0 // Action for Comparator A Down
  1451. #define PWM_X_GENB_ACTCMPAD_NONE \
  1452. 0x00000000 // Do nothing
  1453. #define PWM_X_GENB_ACTCMPAD_INV 0x00000040 // Invert pwmB
  1454. #define PWM_X_GENB_ACTCMPAD_ZERO \
  1455. 0x00000080 // Drive pwmB Low
  1456. #define PWM_X_GENB_ACTCMPAD_ONE 0x000000C0 // Drive pwmB High
  1457. #define PWM_X_GENB_ACTCMPAU_M 0x00000030 // Action for Comparator A Up
  1458. #define PWM_X_GENB_ACTCMPAU_NONE \
  1459. 0x00000000 // Do nothing
  1460. #define PWM_X_GENB_ACTCMPAU_INV 0x00000010 // Invert pwmB
  1461. #define PWM_X_GENB_ACTCMPAU_ZERO \
  1462. 0x00000020 // Drive pwmB Low
  1463. #define PWM_X_GENB_ACTCMPAU_ONE 0x00000030 // Drive pwmB High
  1464. #define PWM_X_GENB_ACTLOAD_M 0x0000000C // Action for Counter=LOAD
  1465. #define PWM_X_GENB_ACTLOAD_NONE 0x00000000 // Do nothing
  1466. #define PWM_X_GENB_ACTLOAD_INV 0x00000004 // Invert pwmB
  1467. #define PWM_X_GENB_ACTLOAD_ZERO 0x00000008 // Drive pwmB Low
  1468. #define PWM_X_GENB_ACTLOAD_ONE 0x0000000C // Drive pwmB High
  1469. #define PWM_X_GENB_ACTZERO_M 0x00000003 // Action for Counter=0
  1470. #define PWM_X_GENB_ACTZERO_NONE 0x00000000 // Do nothing
  1471. #define PWM_X_GENB_ACTZERO_INV 0x00000001 // Invert pwmB
  1472. #define PWM_X_GENB_ACTZERO_ZERO 0x00000002 // Drive pwmB Low
  1473. #define PWM_X_GENB_ACTZERO_ONE 0x00000003 // Drive pwmB High
  1474. //*****************************************************************************
  1475. //
  1476. // The following are defines for the bit fields in the PWM_O_X_DBCTL register.
  1477. //
  1478. //*****************************************************************************
  1479. #define PWM_X_DBCTL_ENABLE 0x00000001 // Dead-Band Generator Enable
  1480. //*****************************************************************************
  1481. //
  1482. // The following are defines for the bit fields in the PWM_O_X_DBRISE register.
  1483. //
  1484. //*****************************************************************************
  1485. #define PWM_X_DBRISE_DELAY_M 0x00000FFF // Dead-Band Rise Delay
  1486. #define PWM_X_DBRISE_DELAY_S 0
  1487. //*****************************************************************************
  1488. //
  1489. // The following are defines for the bit fields in the PWM_O_X_DBFALL register.
  1490. //
  1491. //*****************************************************************************
  1492. #define PWM_X_DBFALL_DELAY_M 0x00000FFF // Dead-Band Fall Delay
  1493. #define PWM_X_DBFALL_DELAY_S 0
  1494. //*****************************************************************************
  1495. //
  1496. // The following are defines for the bit fields in the QEI_O_CTL register.
  1497. //
  1498. //*****************************************************************************
  1499. #define QEI_CTL_STALLEN 0x00001000 // Stall QEI
  1500. #define QEI_CTL_INVI 0x00000800 // Invert Index Pulse
  1501. #define QEI_CTL_INVB 0x00000400 // Invert PhB
  1502. #define QEI_CTL_INVA 0x00000200 // Invert PhA
  1503. #define QEI_CTL_VELDIV_M 0x000001C0 // Predivide Velocity
  1504. #define QEI_CTL_VELDIV_1 0x00000000 // QEI clock /1
  1505. #define QEI_CTL_VELDIV_2 0x00000040 // QEI clock /2
  1506. #define QEI_CTL_VELDIV_4 0x00000080 // QEI clock /4
  1507. #define QEI_CTL_VELDIV_8 0x000000C0 // QEI clock /8
  1508. #define QEI_CTL_VELDIV_16 0x00000100 // QEI clock /16
  1509. #define QEI_CTL_VELDIV_32 0x00000140 // QEI clock /32
  1510. #define QEI_CTL_VELDIV_64 0x00000180 // QEI clock /64
  1511. #define QEI_CTL_VELDIV_128 0x000001C0 // QEI clock /128
  1512. #define QEI_CTL_VELEN 0x00000020 // Capture Velocity
  1513. #define QEI_CTL_RESMODE 0x00000010 // Reset Mode
  1514. #define QEI_CTL_CAPMODE 0x00000008 // Capture Mode
  1515. #define QEI_CTL_SIGMODE 0x00000004 // Signal Mode
  1516. #define QEI_CTL_SWAP 0x00000002 // Swap Signals
  1517. #define QEI_CTL_ENABLE 0x00000001 // Enable QEI
  1518. //*****************************************************************************
  1519. //
  1520. // The following are defines for the bit fields in the QEI_O_STAT register.
  1521. //
  1522. //*****************************************************************************
  1523. #define QEI_STAT_DIRECTION 0x00000002 // Direction of Rotation
  1524. #define QEI_STAT_ERROR 0x00000001 // Error Detected
  1525. //*****************************************************************************
  1526. //
  1527. // The following are defines for the bit fields in the QEI_O_POS register.
  1528. //
  1529. //*****************************************************************************
  1530. #define QEI_POS_M 0xFFFFFFFF // Current Position Integrator
  1531. // Value
  1532. #define QEI_POS_S 0
  1533. //*****************************************************************************
  1534. //
  1535. // The following are defines for the bit fields in the QEI_O_MAXPOS register.
  1536. //
  1537. //*****************************************************************************
  1538. #define QEI_MAXPOS_M 0xFFFFFFFF // Maximum Position Integrator
  1539. // Value
  1540. #define QEI_MAXPOS_S 0
  1541. //*****************************************************************************
  1542. //
  1543. // The following are defines for the bit fields in the QEI_O_LOAD register.
  1544. //
  1545. //*****************************************************************************
  1546. #define QEI_LOAD_M 0xFFFFFFFF // Velocity Timer Load Value
  1547. #define QEI_LOAD_S 0
  1548. //*****************************************************************************
  1549. //
  1550. // The following are defines for the bit fields in the QEI_O_TIME register.
  1551. //
  1552. //*****************************************************************************
  1553. #define QEI_TIME_M 0xFFFFFFFF // Velocity Timer Current Value
  1554. #define QEI_TIME_S 0
  1555. //*****************************************************************************
  1556. //
  1557. // The following are defines for the bit fields in the QEI_O_COUNT register.
  1558. //
  1559. //*****************************************************************************
  1560. #define QEI_COUNT_M 0xFFFFFFFF // Velocity Pulse Count
  1561. #define QEI_COUNT_S 0
  1562. //*****************************************************************************
  1563. //
  1564. // The following are defines for the bit fields in the QEI_O_SPEED register.
  1565. //
  1566. //*****************************************************************************
  1567. #define QEI_SPEED_M 0xFFFFFFFF // Velocity
  1568. #define QEI_SPEED_S 0
  1569. //*****************************************************************************
  1570. //
  1571. // The following are defines for the bit fields in the QEI_O_INTEN register.
  1572. //
  1573. //*****************************************************************************
  1574. #define QEI_INTEN_ERROR 0x00000008 // Phase Error Interrupt Enable
  1575. #define QEI_INTEN_DIR 0x00000004 // Direction Change Interrupt
  1576. // Enable
  1577. #define QEI_INTEN_TIMER 0x00000002 // Timer Expires Interrupt Enable
  1578. #define QEI_INTEN_INDEX 0x00000001 // Index Pulse Detected Interrupt
  1579. // Enable
  1580. //*****************************************************************************
  1581. //
  1582. // The following are defines for the bit fields in the QEI_O_RIS register.
  1583. //
  1584. //*****************************************************************************
  1585. #define QEI_RIS_ERROR 0x00000008 // Phase Error Detected
  1586. #define QEI_RIS_DIR 0x00000004 // Direction Change Detected
  1587. #define QEI_RIS_TIMER 0x00000002 // Velocity Timer Expired
  1588. #define QEI_RIS_INDEX 0x00000001 // Index Pulse Asserted
  1589. //*****************************************************************************
  1590. //
  1591. // The following are defines for the bit fields in the QEI_O_ISC register.
  1592. //
  1593. //*****************************************************************************
  1594. #define QEI_ISC_ERROR 0x00000008 // Phase Error Interrupt
  1595. #define QEI_ISC_DIR 0x00000004 // Direction Change Interrupt
  1596. #define QEI_ISC_TIMER 0x00000002 // Velocity Timer Expired Interrupt
  1597. #define QEI_ISC_INDEX 0x00000001 // Index Pulse Interrupt
  1598. //*****************************************************************************
  1599. //
  1600. // The following are defines for the bit fields in the TIMER_O_CFG register.
  1601. //
  1602. //*****************************************************************************
  1603. #define TIMER_CFG_M 0x00000007 // GPTM Configuration
  1604. #define TIMER_CFG_32_BIT_TIMER 0x00000000 // 32-bit timer configuration
  1605. #define TIMER_CFG_32_BIT_RTC 0x00000001 // 32-bit real-time clock (RTC)
  1606. // counter configuration
  1607. #define TIMER_CFG_16_BIT 0x00000004 // 16-bit timer configuration. The
  1608. // function is controlled by bits
  1609. // 1:0 of GPTMTAMR and GPTMTBMR
  1610. //*****************************************************************************
  1611. //
  1612. // The following are defines for the bit fields in the TIMER_O_TAMR register.
  1613. //
  1614. //*****************************************************************************
  1615. #define TIMER_TAMR_TAAMS 0x00000008 // GPTM Timer A Alternate Mode
  1616. // Select
  1617. #define TIMER_TAMR_TACMR 0x00000004 // GPTM Timer A Capture Mode
  1618. #define TIMER_TAMR_TAMR_M 0x00000003 // GPTM Timer A Mode
  1619. #define TIMER_TAMR_TAMR_1_SHOT 0x00000001 // One-Shot Timer mode
  1620. #define TIMER_TAMR_TAMR_PERIOD 0x00000002 // Periodic Timer mode
  1621. #define TIMER_TAMR_TAMR_CAP 0x00000003 // Capture mode
  1622. //*****************************************************************************
  1623. //
  1624. // The following are defines for the bit fields in the TIMER_O_TBMR register.
  1625. //
  1626. //*****************************************************************************
  1627. #define TIMER_TBMR_TBAMS 0x00000008 // GPTM Timer B Alternate Mode
  1628. // Select
  1629. #define TIMER_TBMR_TBCMR 0x00000004 // GPTM Timer B Capture Mode
  1630. #define TIMER_TBMR_TBMR_M 0x00000003 // GPTM Timer B Mode
  1631. #define TIMER_TBMR_TBMR_1_SHOT 0x00000001 // One-Shot Timer mode
  1632. #define TIMER_TBMR_TBMR_PERIOD 0x00000002 // Periodic Timer mode
  1633. #define TIMER_TBMR_TBMR_CAP 0x00000003 // Capture mode
  1634. //*****************************************************************************
  1635. //
  1636. // The following are defines for the bit fields in the TIMER_O_CTL register.
  1637. //
  1638. //*****************************************************************************
  1639. #define TIMER_CTL_TBPWML 0x00004000 // GPTM Timer B PWM Output Level
  1640. #define TIMER_CTL_TBOTE 0x00002000 // GPTM Timer B Output Trigger
  1641. // Enable
  1642. #define TIMER_CTL_TBEVENT_M 0x00000C00 // GPTM Timer B Event Mode
  1643. #define TIMER_CTL_TBEVENT_POS 0x00000000 // Positive edge
  1644. #define TIMER_CTL_TBEVENT_NEG 0x00000400 // Negative edge
  1645. #define TIMER_CTL_TBEVENT_BOTH 0x00000C00 // Both edges
  1646. #define TIMER_CTL_TBSTALL 0x00000200 // GPTM Timer B Stall Enable
  1647. #define TIMER_CTL_TBEN 0x00000100 // GPTM Timer B Enable
  1648. #define TIMER_CTL_TAPWML 0x00000040 // GPTM Timer A PWM Output Level
  1649. #define TIMER_CTL_TAOTE 0x00000020 // GPTM Timer A Output Trigger
  1650. // Enable
  1651. #define TIMER_CTL_RTCEN 0x00000010 // GPTM RTC Enable
  1652. #define TIMER_CTL_TAEVENT_M 0x0000000C // GPTM Timer A Event Mode
  1653. #define TIMER_CTL_TAEVENT_POS 0x00000000 // Positive edge
  1654. #define TIMER_CTL_TAEVENT_NEG 0x00000004 // Negative edge
  1655. #define TIMER_CTL_TAEVENT_BOTH 0x0000000C // Both edges
  1656. #define TIMER_CTL_TASTALL 0x00000002 // GPTM Timer A Stall Enable
  1657. #define TIMER_CTL_TAEN 0x00000001 // GPTM Timer A Enable
  1658. //*****************************************************************************
  1659. //
  1660. // The following are defines for the bit fields in the TIMER_O_IMR register.
  1661. //
  1662. //*****************************************************************************
  1663. #define TIMER_IMR_CBEIM 0x00000400 // GPTM Capture B Event Interrupt
  1664. // Mask
  1665. #define TIMER_IMR_CBMIM 0x00000200 // GPTM Capture B Match Interrupt
  1666. // Mask
  1667. #define TIMER_IMR_TBTOIM 0x00000100 // GPTM Timer B Time-Out Interrupt
  1668. // Mask
  1669. #define TIMER_IMR_RTCIM 0x00000008 // GPTM RTC Interrupt Mask
  1670. #define TIMER_IMR_CAEIM 0x00000004 // GPTM Capture A Event Interrupt
  1671. // Mask
  1672. #define TIMER_IMR_CAMIM 0x00000002 // GPTM Capture A Match Interrupt
  1673. // Mask
  1674. #define TIMER_IMR_TATOIM 0x00000001 // GPTM Timer A Time-Out Interrupt
  1675. // Mask
  1676. //*****************************************************************************
  1677. //
  1678. // The following are defines for the bit fields in the TIMER_O_RIS register.
  1679. //
  1680. //*****************************************************************************
  1681. #define TIMER_RIS_CBERIS 0x00000400 // GPTM Capture B Event Raw
  1682. // Interrupt
  1683. #define TIMER_RIS_CBMRIS 0x00000200 // GPTM Capture B Match Raw
  1684. // Interrupt
  1685. #define TIMER_RIS_TBTORIS 0x00000100 // GPTM Timer B Time-Out Raw
  1686. // Interrupt
  1687. #define TIMER_RIS_RTCRIS 0x00000008 // GPTM RTC Raw Interrupt
  1688. #define TIMER_RIS_CAERIS 0x00000004 // GPTM Capture A Event Raw
  1689. // Interrupt
  1690. #define TIMER_RIS_CAMRIS 0x00000002 // GPTM Capture A Match Raw
  1691. // Interrupt
  1692. #define TIMER_RIS_TATORIS 0x00000001 // GPTM Timer A Time-Out Raw
  1693. // Interrupt
  1694. //*****************************************************************************
  1695. //
  1696. // The following are defines for the bit fields in the TIMER_O_MIS register.
  1697. //
  1698. //*****************************************************************************
  1699. #define TIMER_MIS_CBEMIS 0x00000400 // GPTM Capture B Event Masked
  1700. // Interrupt
  1701. #define TIMER_MIS_CBMMIS 0x00000200 // GPTM Capture B Match Masked
  1702. // Interrupt
  1703. #define TIMER_MIS_TBTOMIS 0x00000100 // GPTM Timer B Time-Out Masked
  1704. // Interrupt
  1705. #define TIMER_MIS_RTCMIS 0x00000008 // GPTM RTC Masked Interrupt
  1706. #define TIMER_MIS_CAEMIS 0x00000004 // GPTM Capture A Event Masked
  1707. // Interrupt
  1708. #define TIMER_MIS_CAMMIS 0x00000002 // GPTM Capture A Match Masked
  1709. // Interrupt
  1710. #define TIMER_MIS_TATOMIS 0x00000001 // GPTM Timer A Time-Out Masked
  1711. // Interrupt
  1712. //*****************************************************************************
  1713. //
  1714. // The following are defines for the bit fields in the TIMER_O_ICR register.
  1715. //
  1716. //*****************************************************************************
  1717. #define TIMER_ICR_CBECINT 0x00000400 // GPTM Capture B Event Interrupt
  1718. // Clear
  1719. #define TIMER_ICR_CBMCINT 0x00000200 // GPTM Capture B Match Interrupt
  1720. // Clear
  1721. #define TIMER_ICR_TBTOCINT 0x00000100 // GPTM Timer B Time-Out Interrupt
  1722. // Clear
  1723. #define TIMER_ICR_RTCCINT 0x00000008 // GPTM RTC Interrupt Clear
  1724. #define TIMER_ICR_CAECINT 0x00000004 // GPTM Capture A Event Interrupt
  1725. // Clear
  1726. #define TIMER_ICR_CAMCINT 0x00000002 // GPTM Capture A Match Interrupt
  1727. // Clear
  1728. #define TIMER_ICR_TATOCINT 0x00000001 // GPTM Timer A Time-Out Raw
  1729. // Interrupt
  1730. //*****************************************************************************
  1731. //
  1732. // The following are defines for the bit fields in the TIMER_O_TAILR register.
  1733. //
  1734. //*****************************************************************************
  1735. #define TIMER_TAILR_TAILRH_M 0xFFFF0000 // GPTM Timer A Interval Load
  1736. // Register High
  1737. #define TIMER_TAILR_TAILRL_M 0x0000FFFF // GPTM Timer A Interval Load
  1738. // Register Low
  1739. #define TIMER_TAILR_TAILRH_S 16
  1740. #define TIMER_TAILR_TAILRL_S 0
  1741. //*****************************************************************************
  1742. //
  1743. // The following are defines for the bit fields in the TIMER_O_TBILR register.
  1744. //
  1745. //*****************************************************************************
  1746. #define TIMER_TBILR_TBILRL_M 0x0000FFFF // GPTM Timer B Interval Load
  1747. // Register
  1748. #define TIMER_TBILR_TBILRL_S 0
  1749. //*****************************************************************************
  1750. //
  1751. // The following are defines for the bit fields in the TIMER_O_TAMATCHR
  1752. // register.
  1753. //
  1754. //*****************************************************************************
  1755. #define TIMER_TAMATCHR_TAMRH_M 0xFFFF0000 // GPTM Timer A Match Register High
  1756. #define TIMER_TAMATCHR_TAMRL_M 0x0000FFFF // GPTM Timer A Match Register Low
  1757. #define TIMER_TAMATCHR_TAMRH_S 16
  1758. #define TIMER_TAMATCHR_TAMRL_S 0
  1759. //*****************************************************************************
  1760. //
  1761. // The following are defines for the bit fields in the TIMER_O_TBMATCHR
  1762. // register.
  1763. //
  1764. //*****************************************************************************
  1765. #define TIMER_TBMATCHR_TBMRL_M 0x0000FFFF // GPTM Timer B Match Register Low
  1766. #define TIMER_TBMATCHR_TBMRL_S 0
  1767. //*****************************************************************************
  1768. //
  1769. // The following are defines for the bit fields in the TIMER_O_TAPR register.
  1770. //
  1771. //*****************************************************************************
  1772. #define TIMER_TAPR_TAPSR_M 0x000000FF // GPTM Timer A Prescale
  1773. #define TIMER_TAPR_TAPSR_S 0
  1774. //*****************************************************************************
  1775. //
  1776. // The following are defines for the bit fields in the TIMER_O_TBPR register.
  1777. //
  1778. //*****************************************************************************
  1779. #define TIMER_TBPR_TBPSR_M 0x000000FF // GPTM Timer B Prescale
  1780. #define TIMER_TBPR_TBPSR_S 0
  1781. //*****************************************************************************
  1782. //
  1783. // The following are defines for the bit fields in the TIMER_O_TAPMR register.
  1784. //
  1785. //*****************************************************************************
  1786. #define TIMER_TAPMR_TAPSMR_M 0x000000FF // GPTM TimerA Prescale Match
  1787. #define TIMER_TAPMR_TAPSMR_S 0
  1788. //*****************************************************************************
  1789. //
  1790. // The following are defines for the bit fields in the TIMER_O_TBPMR register.
  1791. //
  1792. //*****************************************************************************
  1793. #define TIMER_TBPMR_TBPSMR_M 0x000000FF // GPTM TimerB Prescale Match
  1794. #define TIMER_TBPMR_TBPSMR_S 0
  1795. //*****************************************************************************
  1796. //
  1797. // The following are defines for the bit fields in the TIMER_O_TAR register.
  1798. //
  1799. //*****************************************************************************
  1800. #define TIMER_TAR_TARH_M 0xFFFF0000 // GPTM Timer A Register High
  1801. #define TIMER_TAR_TARL_M 0x0000FFFF // GPTM Timer A Register Low
  1802. #define TIMER_TAR_TARH_S 16
  1803. #define TIMER_TAR_TARL_S 0
  1804. //*****************************************************************************
  1805. //
  1806. // The following are defines for the bit fields in the TIMER_O_TBR register.
  1807. //
  1808. //*****************************************************************************
  1809. #define TIMER_TBR_TBRL_M 0x0000FFFF // GPTM Timer B
  1810. #define TIMER_TBR_TBRL_S 0
  1811. //*****************************************************************************
  1812. //
  1813. // The following are defines for the bit fields in the ADC_O_ACTSS register.
  1814. //
  1815. //*****************************************************************************
  1816. #define ADC_ACTSS_ASEN3 0x00000008 // ADC SS3 Enable
  1817. #define ADC_ACTSS_ASEN2 0x00000004 // ADC SS2 Enable
  1818. #define ADC_ACTSS_ASEN1 0x00000002 // ADC SS1 Enable
  1819. #define ADC_ACTSS_ASEN0 0x00000001 // ADC SS0 Enable
  1820. //*****************************************************************************
  1821. //
  1822. // The following are defines for the bit fields in the ADC_O_RIS register.
  1823. //
  1824. //*****************************************************************************
  1825. #define ADC_RIS_INR3 0x00000008 // SS3 Raw Interrupt Status
  1826. #define ADC_RIS_INR2 0x00000004 // SS2 Raw Interrupt Status
  1827. #define ADC_RIS_INR1 0x00000002 // SS1 Raw Interrupt Status
  1828. #define ADC_RIS_INR0 0x00000001 // SS0 Raw Interrupt Status
  1829. //*****************************************************************************
  1830. //
  1831. // The following are defines for the bit fields in the ADC_O_IM register.
  1832. //
  1833. //*****************************************************************************
  1834. #define ADC_IM_MASK3 0x00000008 // SS3 Interrupt Mask
  1835. #define ADC_IM_MASK2 0x00000004 // SS2 Interrupt Mask
  1836. #define ADC_IM_MASK1 0x00000002 // SS1 Interrupt Mask
  1837. #define ADC_IM_MASK0 0x00000001 // SS0 Interrupt Mask
  1838. //*****************************************************************************
  1839. //
  1840. // The following are defines for the bit fields in the ADC_O_ISC register.
  1841. //
  1842. //*****************************************************************************
  1843. #define ADC_ISC_IN3 0x00000008 // SS3 Interrupt Status and Clear
  1844. #define ADC_ISC_IN2 0x00000004 // SS2 Interrupt Status and Clear
  1845. #define ADC_ISC_IN1 0x00000002 // SS1 Interrupt Status and Clear
  1846. #define ADC_ISC_IN0 0x00000001 // SS0 Interrupt Status and Clear
  1847. //*****************************************************************************
  1848. //
  1849. // The following are defines for the bit fields in the ADC_O_OSTAT register.
  1850. //
  1851. //*****************************************************************************
  1852. #define ADC_OSTAT_OV3 0x00000008 // SS3 FIFO Overflow
  1853. #define ADC_OSTAT_OV2 0x00000004 // SS2 FIFO Overflow
  1854. #define ADC_OSTAT_OV1 0x00000002 // SS1 FIFO Overflow
  1855. #define ADC_OSTAT_OV0 0x00000001 // SS0 FIFO Overflow
  1856. //*****************************************************************************
  1857. //
  1858. // The following are defines for the bit fields in the ADC_O_EMUX register.
  1859. //
  1860. //*****************************************************************************
  1861. #define ADC_EMUX_EM3_M 0x0000F000 // SS3 Trigger Select
  1862. #define ADC_EMUX_EM3_PROCESSOR 0x00000000 // Processor (default)
  1863. #define ADC_EMUX_EM3_COMP0 0x00001000 // Analog Comparator 0
  1864. #define ADC_EMUX_EM3_EXTERNAL 0x00004000 // External (GPIO PB4)
  1865. #define ADC_EMUX_EM3_TIMER 0x00005000 // Timer
  1866. #define ADC_EMUX_EM3_PWM0 0x00006000 // PWM0
  1867. #define ADC_EMUX_EM3_PWM1 0x00007000 // PWM1
  1868. #define ADC_EMUX_EM3_PWM2 0x00008000 // PWM2
  1869. #define ADC_EMUX_EM3_ALWAYS 0x0000F000 // Always (continuously sample)
  1870. #define ADC_EMUX_EM2_M 0x00000F00 // SS2 Trigger Select
  1871. #define ADC_EMUX_EM2_PROCESSOR 0x00000000 // Processor (default)
  1872. #define ADC_EMUX_EM2_COMP0 0x00000100 // Analog Comparator 0
  1873. #define ADC_EMUX_EM2_EXTERNAL 0x00000400 // External (GPIO PB4)
  1874. #define ADC_EMUX_EM2_TIMER 0x00000500 // Timer
  1875. #define ADC_EMUX_EM2_PWM0 0x00000600 // PWM0
  1876. #define ADC_EMUX_EM2_PWM1 0x00000700 // PWM1
  1877. #define ADC_EMUX_EM2_PWM2 0x00000800 // PWM2
  1878. #define ADC_EMUX_EM2_ALWAYS 0x00000F00 // Always (continuously sample)
  1879. #define ADC_EMUX_EM1_M 0x000000F0 // SS1 Trigger Select
  1880. #define ADC_EMUX_EM1_PROCESSOR 0x00000000 // Processor (default)
  1881. #define ADC_EMUX_EM1_COMP0 0x00000010 // Analog Comparator 0
  1882. #define ADC_EMUX_EM1_EXTERNAL 0x00000040 // External (GPIO PB4)
  1883. #define ADC_EMUX_EM1_TIMER 0x00000050 // Timer
  1884. #define ADC_EMUX_EM1_PWM0 0x00000060 // PWM0
  1885. #define ADC_EMUX_EM1_PWM1 0x00000070 // PWM1
  1886. #define ADC_EMUX_EM1_PWM2 0x00000080 // PWM2
  1887. #define ADC_EMUX_EM1_ALWAYS 0x000000F0 // Always (continuously sample)
  1888. #define ADC_EMUX_EM0_M 0x0000000F // SS0 Trigger Select
  1889. #define ADC_EMUX_EM0_PROCESSOR 0x00000000 // Processor (default)
  1890. #define ADC_EMUX_EM0_COMP0 0x00000001 // Analog Comparator 0
  1891. #define ADC_EMUX_EM0_EXTERNAL 0x00000004 // External (GPIO PB4)
  1892. #define ADC_EMUX_EM0_TIMER 0x00000005 // Timer
  1893. #define ADC_EMUX_EM0_PWM0 0x00000006 // PWM0
  1894. #define ADC_EMUX_EM0_PWM1 0x00000007 // PWM1
  1895. #define ADC_EMUX_EM0_PWM2 0x00000008 // PWM2
  1896. #define ADC_EMUX_EM0_ALWAYS 0x0000000F // Always (continuously sample)
  1897. //*****************************************************************************
  1898. //
  1899. // The following are defines for the bit fields in the ADC_O_USTAT register.
  1900. //
  1901. //*****************************************************************************
  1902. #define ADC_USTAT_UV3 0x00000008 // SS3 FIFO Underflow
  1903. #define ADC_USTAT_UV2 0x00000004 // SS2 FIFO Underflow
  1904. #define ADC_USTAT_UV1 0x00000002 // SS1 FIFO Underflow
  1905. #define ADC_USTAT_UV0 0x00000001 // SS0 FIFO Underflow
  1906. //*****************************************************************************
  1907. //
  1908. // The following are defines for the bit fields in the ADC_O_SSPRI register.
  1909. //
  1910. //*****************************************************************************
  1911. #define ADC_SSPRI_SS3_M 0x00003000 // SS3 Priority
  1912. #define ADC_SSPRI_SS3_1ST 0x00000000 // First priority
  1913. #define ADC_SSPRI_SS3_2ND 0x00001000 // Second priority
  1914. #define ADC_SSPRI_SS3_3RD 0x00002000 // Third priority
  1915. #define ADC_SSPRI_SS3_4TH 0x00003000 // Fourth priority
  1916. #define ADC_SSPRI_SS2_M 0x00000300 // SS2 Priority
  1917. #define ADC_SSPRI_SS2_1ST 0x00000000 // First priority
  1918. #define ADC_SSPRI_SS2_2ND 0x00000100 // Second priority
  1919. #define ADC_SSPRI_SS2_3RD 0x00000200 // Third priority
  1920. #define ADC_SSPRI_SS2_4TH 0x00000300 // Fourth priority
  1921. #define ADC_SSPRI_SS1_M 0x00000030 // SS1 Priority
  1922. #define ADC_SSPRI_SS1_1ST 0x00000000 // First priority
  1923. #define ADC_SSPRI_SS1_2ND 0x00000010 // Second priority
  1924. #define ADC_SSPRI_SS1_3RD 0x00000020 // Third priority
  1925. #define ADC_SSPRI_SS1_4TH 0x00000030 // Fourth priority
  1926. #define ADC_SSPRI_SS0_M 0x00000003 // SS0 Priority
  1927. #define ADC_SSPRI_SS0_1ST 0x00000000 // First priority
  1928. #define ADC_SSPRI_SS0_2ND 0x00000001 // Second priority
  1929. #define ADC_SSPRI_SS0_3RD 0x00000002 // Third priority
  1930. #define ADC_SSPRI_SS0_4TH 0x00000003 // Fourth priority
  1931. //*****************************************************************************
  1932. //
  1933. // The following are defines for the bit fields in the ADC_O_PSSI register.
  1934. //
  1935. //*****************************************************************************
  1936. #define ADC_PSSI_SS3 0x00000008 // SS3 Initiate
  1937. #define ADC_PSSI_SS2 0x00000004 // SS2 Initiate
  1938. #define ADC_PSSI_SS1 0x00000002 // SS1 Initiate
  1939. #define ADC_PSSI_SS0 0x00000001 // SS0 Initiate
  1940. //*****************************************************************************
  1941. //
  1942. // The following are defines for the bit fields in the ADC_O_SAC register.
  1943. //
  1944. //*****************************************************************************
  1945. #define ADC_SAC_AVG_M 0x00000007 // Hardware Averaging Control
  1946. #define ADC_SAC_AVG_OFF 0x00000000 // No hardware oversampling
  1947. #define ADC_SAC_AVG_2X 0x00000001 // 2x hardware oversampling
  1948. #define ADC_SAC_AVG_4X 0x00000002 // 4x hardware oversampling
  1949. #define ADC_SAC_AVG_8X 0x00000003 // 8x hardware oversampling
  1950. #define ADC_SAC_AVG_16X 0x00000004 // 16x hardware oversampling
  1951. #define ADC_SAC_AVG_32X 0x00000005 // 32x hardware oversampling
  1952. #define ADC_SAC_AVG_64X 0x00000006 // 64x hardware oversampling
  1953. //*****************************************************************************
  1954. //
  1955. // The following are defines for the bit fields in the ADC_O_SSMUX0 register.
  1956. //
  1957. //*****************************************************************************
  1958. #define ADC_SSMUX0_MUX7_M 0x30000000 // 8th Sample Input Select
  1959. #define ADC_SSMUX0_MUX6_M 0x03000000 // 7th Sample Input Select
  1960. #define ADC_SSMUX0_MUX5_M 0x00300000 // 6th Sample Input Select
  1961. #define ADC_SSMUX0_MUX4_M 0x00030000 // 5th Sample Input Select
  1962. #define ADC_SSMUX0_MUX3_M 0x00003000 // 4th Sample Input Select
  1963. #define ADC_SSMUX0_MUX2_M 0x00000300 // 3rd Sample Input Select
  1964. #define ADC_SSMUX0_MUX1_M 0x00000030 // 2nd Sample Input Select
  1965. #define ADC_SSMUX0_MUX0_M 0x00000003 // 1st Sample Input Select
  1966. #define ADC_SSMUX0_MUX7_S 28
  1967. #define ADC_SSMUX0_MUX6_S 24
  1968. #define ADC_SSMUX0_MUX5_S 20
  1969. #define ADC_SSMUX0_MUX4_S 16
  1970. #define ADC_SSMUX0_MUX3_S 12
  1971. #define ADC_SSMUX0_MUX2_S 8
  1972. #define ADC_SSMUX0_MUX1_S 4
  1973. #define ADC_SSMUX0_MUX0_S 0
  1974. //*****************************************************************************
  1975. //
  1976. // The following are defines for the bit fields in the ADC_O_SSCTL0 register.
  1977. //
  1978. //*****************************************************************************
  1979. #define ADC_SSCTL0_TS7 0x80000000 // 8th Sample Temp Sensor Select
  1980. #define ADC_SSCTL0_IE7 0x40000000 // 8th Sample Interrupt Enable
  1981. #define ADC_SSCTL0_END7 0x20000000 // 8th Sample is End of Sequence
  1982. #define ADC_SSCTL0_D7 0x10000000 // 8th Sample Diff Input Select
  1983. #define ADC_SSCTL0_TS6 0x08000000 // 7th Sample Temp Sensor Select
  1984. #define ADC_SSCTL0_IE6 0x04000000 // 7th Sample Interrupt Enable
  1985. #define ADC_SSCTL0_END6 0x02000000 // 7th Sample is End of Sequence
  1986. #define ADC_SSCTL0_D6 0x01000000 // 7th Sample Diff Input Select
  1987. #define ADC_SSCTL0_TS5 0x00800000 // 6th Sample Temp Sensor Select
  1988. #define ADC_SSCTL0_IE5 0x00400000 // 6th Sample Interrupt Enable
  1989. #define ADC_SSCTL0_END5 0x00200000 // 6th Sample is End of Sequence
  1990. #define ADC_SSCTL0_D5 0x00100000 // 6th Sample Diff Input Select
  1991. #define ADC_SSCTL0_TS4 0x00080000 // 5th Sample Temp Sensor Select
  1992. #define ADC_SSCTL0_IE4 0x00040000 // 5th Sample Interrupt Enable
  1993. #define ADC_SSCTL0_END4 0x00020000 // 5th Sample is End of Sequence
  1994. #define ADC_SSCTL0_D4 0x00010000 // 5th Sample Diff Input Select
  1995. #define ADC_SSCTL0_TS3 0x00008000 // 4th Sample Temp Sensor Select
  1996. #define ADC_SSCTL0_IE3 0x00004000 // 4th Sample Interrupt Enable
  1997. #define ADC_SSCTL0_END3 0x00002000 // 4th Sample is End of Sequence
  1998. #define ADC_SSCTL0_D3 0x00001000 // 4th Sample Diff Input Select
  1999. #define ADC_SSCTL0_TS2 0x00000800 // 3rd Sample Temp Sensor Select
  2000. #define ADC_SSCTL0_IE2 0x00000400 // 3rd Sample Interrupt Enable
  2001. #define ADC_SSCTL0_END2 0x00000200 // 3rd Sample is End of Sequence
  2002. #define ADC_SSCTL0_D2 0x00000100 // 3rd Sample Diff Input Select
  2003. #define ADC_SSCTL0_TS1 0x00000080 // 2nd Sample Temp Sensor Select
  2004. #define ADC_SSCTL0_IE1 0x00000040 // 2nd Sample Interrupt Enable
  2005. #define ADC_SSCTL0_END1 0x00000020 // 2nd Sample is End of Sequence
  2006. #define ADC_SSCTL0_D1 0x00000010 // 2nd Sample Diff Input Select
  2007. #define ADC_SSCTL0_TS0 0x00000008 // 1st Sample Temp Sensor Select
  2008. #define ADC_SSCTL0_IE0 0x00000004 // 1st Sample Interrupt Enable
  2009. #define ADC_SSCTL0_END0 0x00000002 // 1st Sample is End of Sequence
  2010. #define ADC_SSCTL0_D0 0x00000001 // 1st Sample Diff Input Select
  2011. //*****************************************************************************
  2012. //
  2013. // The following are defines for the bit fields in the ADC_O_SSFIFO0 register.
  2014. //
  2015. //*****************************************************************************
  2016. #define ADC_SSFIFO0_DATA_M 0x000003FF // Conversion Result Data
  2017. #define ADC_SSFIFO0_DATA_S 0
  2018. //*****************************************************************************
  2019. //
  2020. // The following are defines for the bit fields in the ADC_O_SSFSTAT0 register.
  2021. //
  2022. //*****************************************************************************
  2023. #define ADC_SSFSTAT0_FULL 0x00001000 // FIFO Full
  2024. #define ADC_SSFSTAT0_EMPTY 0x00000100 // FIFO Empty
  2025. #define ADC_SSFSTAT0_HPTR_M 0x000000F0 // FIFO Head Pointer
  2026. #define ADC_SSFSTAT0_TPTR_M 0x0000000F // FIFO Tail Pointer
  2027. #define ADC_SSFSTAT0_HPTR_S 4
  2028. #define ADC_SSFSTAT0_TPTR_S 0
  2029. //*****************************************************************************
  2030. //
  2031. // The following are defines for the bit fields in the ADC_O_SSMUX1 register.
  2032. //
  2033. //*****************************************************************************
  2034. #define ADC_SSMUX1_MUX3_M 0x00003000 // 4th Sample Input Select
  2035. #define ADC_SSMUX1_MUX2_M 0x00000300 // 3rd Sample Input Select
  2036. #define ADC_SSMUX1_MUX1_M 0x00000030 // 2nd Sample Input Select
  2037. #define ADC_SSMUX1_MUX0_M 0x00000003 // 1st Sample Input Select
  2038. #define ADC_SSMUX1_MUX3_S 12
  2039. #define ADC_SSMUX1_MUX2_S 8
  2040. #define ADC_SSMUX1_MUX1_S 4
  2041. #define ADC_SSMUX1_MUX0_S 0
  2042. //*****************************************************************************
  2043. //
  2044. // The following are defines for the bit fields in the ADC_O_SSCTL1 register.
  2045. //
  2046. //*****************************************************************************
  2047. #define ADC_SSCTL1_TS3 0x00008000 // 4th Sample Temp Sensor Select
  2048. #define ADC_SSCTL1_IE3 0x00004000 // 4th Sample Interrupt Enable
  2049. #define ADC_SSCTL1_END3 0x00002000 // 4th Sample is End of Sequence
  2050. #define ADC_SSCTL1_D3 0x00001000 // 4th Sample Diff Input Select
  2051. #define ADC_SSCTL1_TS2 0x00000800 // 3rd Sample Temp Sensor Select
  2052. #define ADC_SSCTL1_IE2 0x00000400 // 3rd Sample Interrupt Enable
  2053. #define ADC_SSCTL1_END2 0x00000200 // 3rd Sample is End of Sequence
  2054. #define ADC_SSCTL1_D2 0x00000100 // 3rd Sample Diff Input Select
  2055. #define ADC_SSCTL1_TS1 0x00000080 // 2nd Sample Temp Sensor Select
  2056. #define ADC_SSCTL1_IE1 0x00000040 // 2nd Sample Interrupt Enable
  2057. #define ADC_SSCTL1_END1 0x00000020 // 2nd Sample is End of Sequence
  2058. #define ADC_SSCTL1_D1 0x00000010 // 2nd Sample Diff Input Select
  2059. #define ADC_SSCTL1_TS0 0x00000008 // 1st Sample Temp Sensor Select
  2060. #define ADC_SSCTL1_IE0 0x00000004 // 1st Sample Interrupt Enable
  2061. #define ADC_SSCTL1_END0 0x00000002 // 1st Sample is End of Sequence
  2062. #define ADC_SSCTL1_D0 0x00000001 // 1st Sample Diff Input Select
  2063. //*****************************************************************************
  2064. //
  2065. // The following are defines for the bit fields in the ADC_O_SSFIFO1 register.
  2066. //
  2067. //*****************************************************************************
  2068. #define ADC_SSFIFO1_DATA_M 0x000003FF // Conversion Result Data
  2069. #define ADC_SSFIFO1_DATA_S 0
  2070. //*****************************************************************************
  2071. //
  2072. // The following are defines for the bit fields in the ADC_O_SSFSTAT1 register.
  2073. //
  2074. //*****************************************************************************
  2075. #define ADC_SSFSTAT1_FULL 0x00001000 // FIFO Full
  2076. #define ADC_SSFSTAT1_EMPTY 0x00000100 // FIFO Empty
  2077. #define ADC_SSFSTAT1_HPTR_M 0x000000F0 // FIFO Head Pointer
  2078. #define ADC_SSFSTAT1_TPTR_M 0x0000000F // FIFO Tail Pointer
  2079. #define ADC_SSFSTAT1_HPTR_S 4
  2080. #define ADC_SSFSTAT1_TPTR_S 0
  2081. //*****************************************************************************
  2082. //
  2083. // The following are defines for the bit fields in the ADC_O_SSMUX2 register.
  2084. //
  2085. //*****************************************************************************
  2086. #define ADC_SSMUX2_MUX3_M 0x00003000 // 4th Sample Input Select
  2087. #define ADC_SSMUX2_MUX2_M 0x00000300 // 3rd Sample Input Select
  2088. #define ADC_SSMUX2_MUX1_M 0x00000030 // 2nd Sample Input Select
  2089. #define ADC_SSMUX2_MUX0_M 0x00000003 // 1st Sample Input Select
  2090. #define ADC_SSMUX2_MUX3_S 12
  2091. #define ADC_SSMUX2_MUX2_S 8
  2092. #define ADC_SSMUX2_MUX1_S 4
  2093. #define ADC_SSMUX2_MUX0_S 0
  2094. //*****************************************************************************
  2095. //
  2096. // The following are defines for the bit fields in the ADC_O_SSCTL2 register.
  2097. //
  2098. //*****************************************************************************
  2099. #define ADC_SSCTL2_TS3 0x00008000 // 4th Sample Temp Sensor Select
  2100. #define ADC_SSCTL2_IE3 0x00004000 // 4th Sample Interrupt Enable
  2101. #define ADC_SSCTL2_END3 0x00002000 // 4th Sample is End of Sequence
  2102. #define ADC_SSCTL2_D3 0x00001000 // 4th Sample Diff Input Select
  2103. #define ADC_SSCTL2_TS2 0x00000800 // 3rd Sample Temp Sensor Select
  2104. #define ADC_SSCTL2_IE2 0x00000400 // 3rd Sample Interrupt Enable
  2105. #define ADC_SSCTL2_END2 0x00000200 // 3rd Sample is End of Sequence
  2106. #define ADC_SSCTL2_D2 0x00000100 // 3rd Sample Diff Input Select
  2107. #define ADC_SSCTL2_TS1 0x00000080 // 2nd Sample Temp Sensor Select
  2108. #define ADC_SSCTL2_IE1 0x00000040 // 2nd Sample Interrupt Enable
  2109. #define ADC_SSCTL2_END1 0x00000020 // 2nd Sample is End of Sequence
  2110. #define ADC_SSCTL2_D1 0x00000010 // 2nd Sample Diff Input Select
  2111. #define ADC_SSCTL2_TS0 0x00000008 // 1st Sample Temp Sensor Select
  2112. #define ADC_SSCTL2_IE0 0x00000004 // 1st Sample Interrupt Enable
  2113. #define ADC_SSCTL2_END0 0x00000002 // 1st Sample is End of Sequence
  2114. #define ADC_SSCTL2_D0 0x00000001 // 1st Sample Diff Input Select
  2115. //*****************************************************************************
  2116. //
  2117. // The following are defines for the bit fields in the ADC_O_SSFIFO2 register.
  2118. //
  2119. //*****************************************************************************
  2120. #define ADC_SSFIFO2_DATA_M 0x000003FF // Conversion Result Data
  2121. #define ADC_SSFIFO2_DATA_S 0
  2122. //*****************************************************************************
  2123. //
  2124. // The following are defines for the bit fields in the ADC_O_SSFSTAT2 register.
  2125. //
  2126. //*****************************************************************************
  2127. #define ADC_SSFSTAT2_FULL 0x00001000 // FIFO Full
  2128. #define ADC_SSFSTAT2_EMPTY 0x00000100 // FIFO Empty
  2129. #define ADC_SSFSTAT2_HPTR_M 0x000000F0 // FIFO Head Pointer
  2130. #define ADC_SSFSTAT2_TPTR_M 0x0000000F // FIFO Tail Pointer
  2131. #define ADC_SSFSTAT2_HPTR_S 4
  2132. #define ADC_SSFSTAT2_TPTR_S 0
  2133. //*****************************************************************************
  2134. //
  2135. // The following are defines for the bit fields in the ADC_O_SSMUX3 register.
  2136. //
  2137. //*****************************************************************************
  2138. #define ADC_SSMUX3_MUX0_M 0x00000003 // 1st Sample Input Select
  2139. #define ADC_SSMUX3_MUX0_S 0
  2140. //*****************************************************************************
  2141. //
  2142. // The following are defines for the bit fields in the ADC_O_SSCTL3 register.
  2143. //
  2144. //*****************************************************************************
  2145. #define ADC_SSCTL3_TS0 0x00000008 // 1st Sample Temp Sensor Select
  2146. #define ADC_SSCTL3_IE0 0x00000004 // 1st Sample Interrupt Enable
  2147. #define ADC_SSCTL3_END0 0x00000002 // 1st Sample is End of Sequence
  2148. #define ADC_SSCTL3_D0 0x00000001 // 1st Sample Diff Input Select
  2149. //*****************************************************************************
  2150. //
  2151. // The following are defines for the bit fields in the ADC_O_SSFIFO3 register.
  2152. //
  2153. //*****************************************************************************
  2154. #define ADC_SSFIFO3_DATA_M 0x000003FF // Conversion Result Data
  2155. #define ADC_SSFIFO3_DATA_S 0
  2156. //*****************************************************************************
  2157. //
  2158. // The following are defines for the bit fields in the ADC_O_SSFSTAT3 register.
  2159. //
  2160. //*****************************************************************************
  2161. #define ADC_SSFSTAT3_FULL 0x00001000 // FIFO Full
  2162. #define ADC_SSFSTAT3_EMPTY 0x00000100 // FIFO Empty
  2163. #define ADC_SSFSTAT3_HPTR_M 0x000000F0 // FIFO Head Pointer
  2164. #define ADC_SSFSTAT3_TPTR_M 0x0000000F // FIFO Tail Pointer
  2165. #define ADC_SSFSTAT3_HPTR_S 4
  2166. #define ADC_SSFSTAT3_TPTR_S 0
  2167. //*****************************************************************************
  2168. //
  2169. // The following are defines for the bit fields in the ADC_O_TMLB register.
  2170. //
  2171. //*****************************************************************************
  2172. #define ADC_TMLB_LB 0x00000001 // Loopback Mode Enable
  2173. //*****************************************************************************
  2174. //
  2175. // The following are defines for the the interpretation of the data in the
  2176. // SSFIFOx when the ADC TMLB is enabled.
  2177. //
  2178. //*****************************************************************************
  2179. #define ADC_SSFIFO_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter
  2180. #define ADC_SSFIFO_TMLB_CONT 0x00000020 // Continuation Sample Indicator
  2181. #define ADC_SSFIFO_TMLB_DIFF 0x00000010 // Differential Sample Indicator
  2182. #define ADC_SSFIFO_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator
  2183. #define ADC_SSFIFO_TMLB_MUX_M 0x00000007 // Analog Input Indicator
  2184. #define ADC_SSFIFO_TMLB_CNT_S 6 // Sample counter shift
  2185. #define ADC_SSFIFO_TMLB_MUX_S 0 // Input channel number shift
  2186. //*****************************************************************************
  2187. //
  2188. // The following are defines for the bit fields in the COMP_O_ACMIS register.
  2189. //
  2190. //*****************************************************************************
  2191. #define COMP_ACMIS_IN0 0x00000001 // Comparator 0 Masked Interrupt
  2192. // Status
  2193. //*****************************************************************************
  2194. //
  2195. // The following are defines for the bit fields in the COMP_O_ACRIS register.
  2196. //
  2197. //*****************************************************************************
  2198. #define COMP_ACRIS_IN0 0x00000001 // Comparator 0 Interrupt Status
  2199. //*****************************************************************************
  2200. //
  2201. // The following are defines for the bit fields in the COMP_O_ACINTEN register.
  2202. //
  2203. //*****************************************************************************
  2204. #define COMP_ACINTEN_IN0 0x00000001 // Comparator 0 Interrupt Enable
  2205. //*****************************************************************************
  2206. //
  2207. // The following are defines for the bit fields in the COMP_O_ACREFCTL
  2208. // register.
  2209. //
  2210. //*****************************************************************************
  2211. #define COMP_ACREFCTL_EN 0x00000200 // Resistor Ladder Enable
  2212. #define COMP_ACREFCTL_RNG 0x00000100 // Resistor Ladder Range
  2213. #define COMP_ACREFCTL_VREF_M 0x0000000F // Resistor Ladder Voltage Ref
  2214. #define COMP_ACREFCTL_VREF_S 0
  2215. //*****************************************************************************
  2216. //
  2217. // The following are defines for the bit fields in the COMP_O_ACSTAT0 register.
  2218. //
  2219. //*****************************************************************************
  2220. #define COMP_ACSTAT0_OVAL 0x00000002 // Comparator Output Value
  2221. //*****************************************************************************
  2222. //
  2223. // The following are defines for the bit fields in the COMP_O_ACCTL0 register.
  2224. //
  2225. //*****************************************************************************
  2226. #define COMP_ACCTL0_TOEN 0x00000800 // Trigger Output Enable
  2227. #define COMP_ACCTL0_ASRCP_M 0x00000600 // Analog Source Positive
  2228. #define COMP_ACCTL0_ASRCP_PIN 0x00000000 // Pin value of Cn+
  2229. #define COMP_ACCTL0_ASRCP_PIN0 0x00000200 // Pin value of C0+
  2230. #define COMP_ACCTL0_ASRCP_REF 0x00000400 // Internal voltage reference
  2231. // (VIREF)
  2232. #define COMP_ACCTL0_TSLVAL 0x00000080 // Trigger Sense Level Value
  2233. #define COMP_ACCTL0_TSEN_M 0x00000060 // Trigger Sense
  2234. #define COMP_ACCTL0_TSEN_LEVEL 0x00000000 // Level sense, see TSLVAL
  2235. #define COMP_ACCTL0_TSEN_FALL 0x00000020 // Falling edge
  2236. #define COMP_ACCTL0_TSEN_RISE 0x00000040 // Rising edge
  2237. #define COMP_ACCTL0_TSEN_BOTH 0x00000060 // Either edge
  2238. #define COMP_ACCTL0_ISLVAL 0x00000010 // Interrupt Sense Level Value
  2239. #define COMP_ACCTL0_ISEN_M 0x0000000C // Interrupt Sense
  2240. #define COMP_ACCTL0_ISEN_LEVEL 0x00000000 // Level sense, see ISLVAL
  2241. #define COMP_ACCTL0_ISEN_FALL 0x00000004 // Falling edge
  2242. #define COMP_ACCTL0_ISEN_RISE 0x00000008 // Rising edge
  2243. #define COMP_ACCTL0_ISEN_BOTH 0x0000000C // Either edge
  2244. #define COMP_ACCTL0_CINV 0x00000002 // Comparator Output Invert
  2245. //*****************************************************************************
  2246. //
  2247. // The following are defines for the bit fields in the CAN_O_CTL register.
  2248. //
  2249. //*****************************************************************************
  2250. #define CAN_CTL_TEST 0x00000080 // Test Mode Enable
  2251. #define CAN_CTL_CCE 0x00000040 // Configuration Change Enable
  2252. #define CAN_CTL_DAR 0x00000020 // Disable Automatic-Retransmission
  2253. #define CAN_CTL_EIE 0x00000008 // Error Interrupt Enable
  2254. #define CAN_CTL_SIE 0x00000004 // Status Interrupt Enable
  2255. #define CAN_CTL_IE 0x00000002 // CAN Interrupt Enable
  2256. #define CAN_CTL_INIT 0x00000001 // Initialization
  2257. //*****************************************************************************
  2258. //
  2259. // The following are defines for the bit fields in the CAN_O_STS register.
  2260. //
  2261. //*****************************************************************************
  2262. #define CAN_STS_BOFF 0x00000080 // Bus-Off Status
  2263. #define CAN_STS_EWARN 0x00000040 // Warning Status
  2264. #define CAN_STS_EPASS 0x00000020 // Error Passive
  2265. #define CAN_STS_RXOK 0x00000010 // Received a Message Successfully
  2266. #define CAN_STS_TXOK 0x00000008 // Transmitted a Message
  2267. // Successfully
  2268. #define CAN_STS_LEC_M 0x00000007 // Last Error Code
  2269. #define CAN_STS_LEC_NONE 0x00000000 // No Error
  2270. #define CAN_STS_LEC_STUFF 0x00000001 // Stuff Error
  2271. #define CAN_STS_LEC_FORM 0x00000002 // Format Error
  2272. #define CAN_STS_LEC_ACK 0x00000003 // ACK Error
  2273. #define CAN_STS_LEC_BIT1 0x00000004 // Bit 1 Error
  2274. #define CAN_STS_LEC_BIT0 0x00000005 // Bit 0 Error
  2275. #define CAN_STS_LEC_CRC 0x00000006 // CRC Error
  2276. #define CAN_STS_LEC_NOEVENT 0x00000007 // No Event
  2277. //*****************************************************************************
  2278. //
  2279. // The following are defines for the bit fields in the CAN_O_ERR register.
  2280. //
  2281. //*****************************************************************************
  2282. #define CAN_ERR_RP 0x00008000 // Received Error Passive
  2283. #define CAN_ERR_REC_M 0x00007F00 // Receive Error Counter
  2284. #define CAN_ERR_TEC_M 0x000000FF // Transmit Error Counter
  2285. #define CAN_ERR_REC_S 8
  2286. #define CAN_ERR_TEC_S 0
  2287. //*****************************************************************************
  2288. //
  2289. // The following are defines for the bit fields in the CAN_O_BIT register.
  2290. //
  2291. //*****************************************************************************
  2292. #define CAN_BIT_TSEG2_M 0x00007000 // Time Segment after Sample Point
  2293. #define CAN_BIT_TSEG1_M 0x00000F00 // Time Segment Before Sample Point
  2294. #define CAN_BIT_SJW_M 0x000000C0 // (Re)Synchronization Jump Width
  2295. #define CAN_BIT_BRP_M 0x0000003F // Baud Rate Prescaler
  2296. #define CAN_BIT_TSEG2_S 12
  2297. #define CAN_BIT_TSEG1_S 8
  2298. #define CAN_BIT_SJW_S 6
  2299. #define CAN_BIT_BRP_S 0
  2300. //*****************************************************************************
  2301. //
  2302. // The following are defines for the bit fields in the CAN_O_INT register.
  2303. //
  2304. //*****************************************************************************
  2305. #define CAN_INT_INTID_M 0x0000FFFF // Interrupt Identifier
  2306. #define CAN_INT_INTID_NONE 0x00000000 // No interrupt pending
  2307. #define CAN_INT_INTID_STATUS 0x00008000 // Status Interrupt
  2308. //*****************************************************************************
  2309. //
  2310. // The following are defines for the bit fields in the CAN_O_TST register.
  2311. //
  2312. //*****************************************************************************
  2313. #define CAN_TST_RX 0x00000080 // Receive Observation
  2314. #define CAN_TST_TX_M 0x00000060 // Transmit Control
  2315. #define CAN_TST_TX_CANCTL 0x00000000 // CAN Module Control
  2316. #define CAN_TST_TX_SAMPLE 0x00000020 // Sample Point
  2317. #define CAN_TST_TX_DOMINANT 0x00000040 // Driven Low
  2318. #define CAN_TST_TX_RECESSIVE 0x00000060 // Driven High
  2319. #define CAN_TST_LBACK 0x00000010 // Loopback Mode
  2320. #define CAN_TST_SILENT 0x00000008 // Silent Mode
  2321. #define CAN_TST_BASIC 0x00000004 // Basic Mode
  2322. //*****************************************************************************
  2323. //
  2324. // The following are defines for the bit fields in the CAN_O_BRPE register.
  2325. //
  2326. //*****************************************************************************
  2327. #define CAN_BRPE_BRPE_M 0x0000000F // Baud Rate Prescaler Extension
  2328. #define CAN_BRPE_BRPE_S 0
  2329. //*****************************************************************************
  2330. //
  2331. // The following are defines for the bit fields in the CAN_O_IF1CRQ register.
  2332. //
  2333. //*****************************************************************************
  2334. #define CAN_IF1CRQ_BUSY 0x00008000 // Busy Flag
  2335. #define CAN_IF1CRQ_MNUM_M 0x0000003F // Message Number
  2336. #define CAN_IF1CRQ_MNUM_RSVD 0x00000000 // 0 is not a valid message number;
  2337. // it is interpreted as 0x20, or
  2338. // object 32
  2339. #define CAN_IF1CRQ_MNUM_S 0
  2340. //*****************************************************************************
  2341. //
  2342. // The following are defines for the bit fields in the CAN_O_IF1CMSK register.
  2343. //
  2344. //*****************************************************************************
  2345. #define CAN_IF1CMSK_WRNRD 0x00000080 // Write, Not Read
  2346. #define CAN_IF1CMSK_MASK 0x00000040 // Access Mask Bits
  2347. #define CAN_IF1CMSK_ARB 0x00000020 // Access Arbitration Bits
  2348. #define CAN_IF1CMSK_CONTROL 0x00000010 // Access Control Bits
  2349. #define CAN_IF1CMSK_CLRINTPND 0x00000008 // Clear Interrupt Pending Bit
  2350. #define CAN_IF1CMSK_NEWDAT 0x00000004 // Access New Data
  2351. #define CAN_IF1CMSK_TXRQST 0x00000004 // Access Transmission Request
  2352. #define CAN_IF1CMSK_DATAA 0x00000002 // Access Data Byte 0 to 3
  2353. #define CAN_IF1CMSK_DATAB 0x00000001 // Access Data Byte 4 to 7
  2354. //*****************************************************************************
  2355. //
  2356. // The following are defines for the bit fields in the CAN_O_IF1MSK1 register.
  2357. //
  2358. //*****************************************************************************
  2359. #define CAN_IF1MSK1_IDMSK_M 0x0000FFFF // Identifier Mask
  2360. #define CAN_IF1MSK1_IDMSK_S 0
  2361. //*****************************************************************************
  2362. //
  2363. // The following are defines for the bit fields in the CAN_O_IF1MSK2 register.
  2364. //
  2365. //*****************************************************************************
  2366. #define CAN_IF1MSK2_MXTD 0x00008000 // Mask Extended Identifier
  2367. #define CAN_IF1MSK2_MDIR 0x00004000 // Mask Message Direction
  2368. #define CAN_IF1MSK2_IDMSK_M 0x00001FFF // Identifier Mask
  2369. #define CAN_IF1MSK2_IDMSK_S 0
  2370. //*****************************************************************************
  2371. //
  2372. // The following are defines for the bit fields in the CAN_O_IF1ARB1 register.
  2373. //
  2374. //*****************************************************************************
  2375. #define CAN_IF1ARB1_ID_M 0x0000FFFF // Message Identifier
  2376. #define CAN_IF1ARB1_ID_S 0
  2377. //*****************************************************************************
  2378. //
  2379. // The following are defines for the bit fields in the CAN_O_IF1ARB2 register.
  2380. //
  2381. //*****************************************************************************
  2382. #define CAN_IF1ARB2_MSGVAL 0x00008000 // Message Valid
  2383. #define CAN_IF1ARB2_XTD 0x00004000 // Extended Identifier
  2384. #define CAN_IF1ARB2_DIR 0x00002000 // Message Direction
  2385. #define CAN_IF1ARB2_ID_M 0x00001FFF // Message Identifier
  2386. #define CAN_IF1ARB2_ID_S 0
  2387. //*****************************************************************************
  2388. //
  2389. // The following are defines for the bit fields in the CAN_O_IF1MCTL register.
  2390. //
  2391. //*****************************************************************************
  2392. #define CAN_IF1MCTL_NEWDAT 0x00008000 // New Data
  2393. #define CAN_IF1MCTL_MSGLST 0x00004000 // Message Lost
  2394. #define CAN_IF1MCTL_INTPND 0x00002000 // Interrupt Pending
  2395. #define CAN_IF1MCTL_UMASK 0x00001000 // Use Acceptance Mask
  2396. #define CAN_IF1MCTL_TXIE 0x00000800 // Transmit Interrupt Enable
  2397. #define CAN_IF1MCTL_RXIE 0x00000400 // Receive Interrupt Enable
  2398. #define CAN_IF1MCTL_RMTEN 0x00000200 // Remote Enable
  2399. #define CAN_IF1MCTL_TXRQST 0x00000100 // Transmit Request
  2400. #define CAN_IF1MCTL_EOB 0x00000080 // End of Buffer
  2401. #define CAN_IF1MCTL_DLC_M 0x0000000F // Data Length Code
  2402. #define CAN_IF1MCTL_DLC_S 0
  2403. //*****************************************************************************
  2404. //
  2405. // The following are defines for the bit fields in the CAN_O_IF1DA1 register.
  2406. //
  2407. //*****************************************************************************
  2408. #define CAN_IF1DA1_DATA_M 0x0000FFFF // Data
  2409. #define CAN_IF1DA1_DATA_S 0
  2410. //*****************************************************************************
  2411. //
  2412. // The following are defines for the bit fields in the CAN_O_IF1DA2 register.
  2413. //
  2414. //*****************************************************************************
  2415. #define CAN_IF1DA2_DATA_M 0x0000FFFF // Data
  2416. #define CAN_IF1DA2_DATA_S 0
  2417. //*****************************************************************************
  2418. //
  2419. // The following are defines for the bit fields in the CAN_O_IF1DB1 register.
  2420. //
  2421. //*****************************************************************************
  2422. #define CAN_IF1DB1_DATA_M 0x0000FFFF // Data
  2423. #define CAN_IF1DB1_DATA_S 0
  2424. //*****************************************************************************
  2425. //
  2426. // The following are defines for the bit fields in the CAN_O_IF1DB2 register.
  2427. //
  2428. //*****************************************************************************
  2429. #define CAN_IF1DB2_DATA_M 0x0000FFFF // Data
  2430. #define CAN_IF1DB2_DATA_S 0
  2431. //*****************************************************************************
  2432. //
  2433. // The following are defines for the bit fields in the CAN_O_IF2CRQ register.
  2434. //
  2435. //*****************************************************************************
  2436. #define CAN_IF2CRQ_BUSY 0x00008000 // Busy Flag
  2437. #define CAN_IF2CRQ_MNUM_M 0x0000003F // Message Number
  2438. #define CAN_IF2CRQ_MNUM_RSVD 0x00000000 // 0 is not a valid message number;
  2439. // it is interpreted as 0x20, or
  2440. // object 32
  2441. #define CAN_IF2CRQ_MNUM_S 0
  2442. //*****************************************************************************
  2443. //
  2444. // The following are defines for the bit fields in the CAN_O_IF2CMSK register.
  2445. //
  2446. //*****************************************************************************
  2447. #define CAN_IF2CMSK_WRNRD 0x00000080 // Write, Not Read
  2448. #define CAN_IF2CMSK_MASK 0x00000040 // Access Mask Bits
  2449. #define CAN_IF2CMSK_ARB 0x00000020 // Access Arbitration Bits
  2450. #define CAN_IF2CMSK_CONTROL 0x00000010 // Access Control Bits
  2451. #define CAN_IF2CMSK_CLRINTPND 0x00000008 // Clear Interrupt Pending Bit
  2452. #define CAN_IF2CMSK_NEWDAT 0x00000004 // Access New Data
  2453. #define CAN_IF2CMSK_TXRQST 0x00000004 // Access Transmission Request
  2454. #define CAN_IF2CMSK_DATAA 0x00000002 // Access Data Byte 0 to 3
  2455. #define CAN_IF2CMSK_DATAB 0x00000001 // Access Data Byte 4 to 7
  2456. //*****************************************************************************
  2457. //
  2458. // The following are defines for the bit fields in the CAN_O_IF2MSK1 register.
  2459. //
  2460. //*****************************************************************************
  2461. #define CAN_IF2MSK1_IDMSK_M 0x0000FFFF // Identifier Mask
  2462. #define CAN_IF2MSK1_IDMSK_S 0
  2463. //*****************************************************************************
  2464. //
  2465. // The following are defines for the bit fields in the CAN_O_IF2MSK2 register.
  2466. //
  2467. //*****************************************************************************
  2468. #define CAN_IF2MSK2_MXTD 0x00008000 // Mask Extended Identifier
  2469. #define CAN_IF2MSK2_MDIR 0x00004000 // Mask Message Direction
  2470. #define CAN_IF2MSK2_IDMSK_M 0x00001FFF // Identifier Mask
  2471. #define CAN_IF2MSK2_IDMSK_S 0
  2472. //*****************************************************************************
  2473. //
  2474. // The following are defines for the bit fields in the CAN_O_IF2ARB1 register.
  2475. //
  2476. //*****************************************************************************
  2477. #define CAN_IF2ARB1_ID_M 0x0000FFFF // Message Identifier
  2478. #define CAN_IF2ARB1_ID_S 0
  2479. //*****************************************************************************
  2480. //
  2481. // The following are defines for the bit fields in the CAN_O_IF2ARB2 register.
  2482. //
  2483. //*****************************************************************************
  2484. #define CAN_IF2ARB2_MSGVAL 0x00008000 // Message Valid
  2485. #define CAN_IF2ARB2_XTD 0x00004000 // Extended Identifier
  2486. #define CAN_IF2ARB2_DIR 0x00002000 // Message Direction
  2487. #define CAN_IF2ARB2_ID_M 0x00001FFF // Message Identifier
  2488. #define CAN_IF2ARB2_ID_S 0
  2489. //*****************************************************************************
  2490. //
  2491. // The following are defines for the bit fields in the CAN_O_IF2MCTL register.
  2492. //
  2493. //*****************************************************************************
  2494. #define CAN_IF2MCTL_NEWDAT 0x00008000 // New Data
  2495. #define CAN_IF2MCTL_MSGLST 0x00004000 // Message Lost
  2496. #define CAN_IF2MCTL_INTPND 0x00002000 // Interrupt Pending
  2497. #define CAN_IF2MCTL_UMASK 0x00001000 // Use Acceptance Mask
  2498. #define CAN_IF2MCTL_TXIE 0x00000800 // Transmit Interrupt Enable
  2499. #define CAN_IF2MCTL_RXIE 0x00000400 // Receive Interrupt Enable
  2500. #define CAN_IF2MCTL_RMTEN 0x00000200 // Remote Enable
  2501. #define CAN_IF2MCTL_TXRQST 0x00000100 // Transmit Request
  2502. #define CAN_IF2MCTL_EOB 0x00000080 // End of Buffer
  2503. #define CAN_IF2MCTL_DLC_M 0x0000000F // Data Length Code
  2504. #define CAN_IF2MCTL_DLC_S 0
  2505. //*****************************************************************************
  2506. //
  2507. // The following are defines for the bit fields in the CAN_O_IF2DA1 register.
  2508. //
  2509. //*****************************************************************************
  2510. #define CAN_IF2DA1_DATA_M 0x0000FFFF // Data
  2511. #define CAN_IF2DA1_DATA_S 0
  2512. //*****************************************************************************
  2513. //
  2514. // The following are defines for the bit fields in the CAN_O_IF2DA2 register.
  2515. //
  2516. //*****************************************************************************
  2517. #define CAN_IF2DA2_DATA_M 0x0000FFFF // Data
  2518. #define CAN_IF2DA2_DATA_S 0
  2519. //*****************************************************************************
  2520. //
  2521. // The following are defines for the bit fields in the CAN_O_IF2DB1 register.
  2522. //
  2523. //*****************************************************************************
  2524. #define CAN_IF2DB1_DATA_M 0x0000FFFF // Data
  2525. #define CAN_IF2DB1_DATA_S 0
  2526. //*****************************************************************************
  2527. //
  2528. // The following are defines for the bit fields in the CAN_O_IF2DB2 register.
  2529. //
  2530. //*****************************************************************************
  2531. #define CAN_IF2DB2_DATA_M 0x0000FFFF // Data
  2532. #define CAN_IF2DB2_DATA_S 0
  2533. //*****************************************************************************
  2534. //
  2535. // The following are defines for the bit fields in the CAN_O_TXRQ1 register.
  2536. //
  2537. //*****************************************************************************
  2538. #define CAN_TXRQ1_TXRQST_M 0x0000FFFF // Transmission Request Bits
  2539. #define CAN_TXRQ1_TXRQST_S 0
  2540. //*****************************************************************************
  2541. //
  2542. // The following are defines for the bit fields in the CAN_O_TXRQ2 register.
  2543. //
  2544. //*****************************************************************************
  2545. #define CAN_TXRQ2_TXRQST_M 0x0000FFFF // Transmission Request Bits
  2546. #define CAN_TXRQ2_TXRQST_S 0
  2547. //*****************************************************************************
  2548. //
  2549. // The following are defines for the bit fields in the CAN_O_NWDA1 register.
  2550. //
  2551. //*****************************************************************************
  2552. #define CAN_NWDA1_NEWDAT_M 0x0000FFFF // New Data Bits
  2553. #define CAN_NWDA1_NEWDAT_S 0
  2554. //*****************************************************************************
  2555. //
  2556. // The following are defines for the bit fields in the CAN_O_NWDA2 register.
  2557. //
  2558. //*****************************************************************************
  2559. #define CAN_NWDA2_NEWDAT_M 0x0000FFFF // New Data Bits
  2560. #define CAN_NWDA2_NEWDAT_S 0
  2561. //*****************************************************************************
  2562. //
  2563. // The following are defines for the bit fields in the CAN_O_MSG1INT register.
  2564. //
  2565. //*****************************************************************************
  2566. #define CAN_MSG1INT_INTPND_M 0x0000FFFF // Interrupt Pending Bits
  2567. #define CAN_MSG1INT_INTPND_S 0
  2568. //*****************************************************************************
  2569. //
  2570. // The following are defines for the bit fields in the CAN_O_MSG2INT register.
  2571. //
  2572. //*****************************************************************************
  2573. #define CAN_MSG2INT_INTPND_M 0x0000FFFF // Interrupt Pending Bits
  2574. #define CAN_MSG2INT_INTPND_S 0
  2575. //*****************************************************************************
  2576. //
  2577. // The following are defines for the bit fields in the CAN_O_MSG1VAL register.
  2578. //
  2579. //*****************************************************************************
  2580. #define CAN_MSG1VAL_MSGVAL_M 0x0000FFFF // Message Valid Bits
  2581. #define CAN_MSG1VAL_MSGVAL_S 0
  2582. //*****************************************************************************
  2583. //
  2584. // The following are defines for the bit fields in the CAN_O_MSG2VAL register.
  2585. //
  2586. //*****************************************************************************
  2587. #define CAN_MSG2VAL_MSGVAL_M 0x0000FFFF // Message Valid Bits
  2588. #define CAN_MSG2VAL_MSGVAL_S 0
  2589. //*****************************************************************************
  2590. //
  2591. // The following are defines for the bit fields in the MAC_O_RIS register.
  2592. //
  2593. //*****************************************************************************
  2594. #define MAC_RIS_PHYINT 0x00000040 // PHY Interrupt
  2595. #define MAC_RIS_MDINT 0x00000020 // MII Transaction Complete
  2596. #define MAC_RIS_RXER 0x00000010 // Receive Error
  2597. #define MAC_RIS_FOV 0x00000008 // FIFO Overrun
  2598. #define MAC_RIS_TXEMP 0x00000004 // Transmit FIFO Empty
  2599. #define MAC_RIS_TXER 0x00000002 // Transmit Error
  2600. #define MAC_RIS_RXINT 0x00000001 // Packet Received
  2601. //*****************************************************************************
  2602. //
  2603. // The following are defines for the bit fields in the MAC_O_IACK register.
  2604. //
  2605. //*****************************************************************************
  2606. #define MAC_IACK_PHYINT 0x00000040 // Clear PHY Interrupt
  2607. #define MAC_IACK_MDINT 0x00000020 // Clear MII Transaction Complete
  2608. #define MAC_IACK_RXER 0x00000010 // Clear Receive Error
  2609. #define MAC_IACK_FOV 0x00000008 // Clear FIFO Overrun
  2610. #define MAC_IACK_TXEMP 0x00000004 // Clear Transmit FIFO Empty
  2611. #define MAC_IACK_TXER 0x00000002 // Clear Transmit Error
  2612. #define MAC_IACK_RXINT 0x00000001 // Clear Packet Received
  2613. //*****************************************************************************
  2614. //
  2615. // The following are defines for the bit fields in the MAC_O_IM register.
  2616. //
  2617. //*****************************************************************************
  2618. #define MAC_IM_PHYINTM 0x00000040 // Mask PHY Interrupt
  2619. #define MAC_IM_MDINTM 0x00000020 // Mask MII Transaction Complete
  2620. #define MAC_IM_RXERM 0x00000010 // Mask Receive Error
  2621. #define MAC_IM_FOVM 0x00000008 // Mask FIFO Overrun
  2622. #define MAC_IM_TXEMPM 0x00000004 // Mask Transmit FIFO Empty
  2623. #define MAC_IM_TXERM 0x00000002 // Mask Transmit Error
  2624. #define MAC_IM_RXINTM 0x00000001 // Mask Packet Received
  2625. //*****************************************************************************
  2626. //
  2627. // The following are defines for the bit fields in the MAC_O_RCTL register.
  2628. //
  2629. //*****************************************************************************
  2630. #define MAC_RCTL_RSTFIFO 0x00000010 // Clear Receive FIFO
  2631. #define MAC_RCTL_BADCRC 0x00000008 // Enable Reject Bad CRC
  2632. #define MAC_RCTL_PRMS 0x00000004 // Enable Promiscuous Mode
  2633. #define MAC_RCTL_AMUL 0x00000002 // Enable Multicast Frames
  2634. #define MAC_RCTL_RXEN 0x00000001 // Enable Receiver
  2635. //*****************************************************************************
  2636. //
  2637. // The following are defines for the bit fields in the MAC_O_TCTL register.
  2638. //
  2639. //*****************************************************************************
  2640. #define MAC_TCTL_DUPLEX 0x00000010 // Enable Duplex Mode
  2641. #define MAC_TCTL_CRC 0x00000004 // Enable CRC Generation
  2642. #define MAC_TCTL_PADEN 0x00000002 // Enable Packet Padding
  2643. #define MAC_TCTL_TXEN 0x00000001 // Enable Transmitter
  2644. //*****************************************************************************
  2645. //
  2646. // The following are defines for the bit fields in the MAC_O_DATA register.
  2647. //
  2648. //*****************************************************************************
  2649. #define MAC_DATA_TXDATA_M 0xFFFFFFFF // Transmit FIFO Data
  2650. #define MAC_DATA_RXDATA_M 0xFFFFFFFF // Receive FIFO Data
  2651. #define MAC_DATA_RXDATA_S 0
  2652. #define MAC_DATA_TXDATA_S 0
  2653. //*****************************************************************************
  2654. //
  2655. // The following are defines for the bit fields in the MAC_O_IA0 register.
  2656. //
  2657. //*****************************************************************************
  2658. #define MAC_IA0_MACOCT4_M 0xFF000000 // MAC Address Octet 4
  2659. #define MAC_IA0_MACOCT3_M 0x00FF0000 // MAC Address Octet 3
  2660. #define MAC_IA0_MACOCT2_M 0x0000FF00 // MAC Address Octet 2
  2661. #define MAC_IA0_MACOCT1_M 0x000000FF // MAC Address Octet 1
  2662. #define MAC_IA0_MACOCT4_S 24
  2663. #define MAC_IA0_MACOCT3_S 16
  2664. #define MAC_IA0_MACOCT2_S 8
  2665. #define MAC_IA0_MACOCT1_S 0
  2666. //*****************************************************************************
  2667. //
  2668. // The following are defines for the bit fields in the MAC_O_IA1 register.
  2669. //
  2670. //*****************************************************************************
  2671. #define MAC_IA1_MACOCT6_M 0x0000FF00 // MAC Address Octet 6
  2672. #define MAC_IA1_MACOCT5_M 0x000000FF // MAC Address Octet 5
  2673. #define MAC_IA1_MACOCT6_S 8
  2674. #define MAC_IA1_MACOCT5_S 0
  2675. //*****************************************************************************
  2676. //
  2677. // The following are defines for the bit fields in the MAC_O_THR register.
  2678. //
  2679. //*****************************************************************************
  2680. #define MAC_THR_THRESH_M 0x0000003F // Threshold Value
  2681. #define MAC_THR_THRESH_S 0
  2682. //*****************************************************************************
  2683. //
  2684. // The following are defines for the bit fields in the MAC_O_MCTL register.
  2685. //
  2686. //*****************************************************************************
  2687. #define MAC_MCTL_REGADR_M 0x000000F8 // MII Register Address
  2688. #define MAC_MCTL_WRITE 0x00000002 // MII Register Transaction Type
  2689. #define MAC_MCTL_START 0x00000001 // MII Register Transaction Enable
  2690. #define MAC_MCTL_REGADR_S 3
  2691. //*****************************************************************************
  2692. //
  2693. // The following are defines for the bit fields in the MAC_O_MDV register.
  2694. //
  2695. //*****************************************************************************
  2696. #define MAC_MDV_DIV_M 0x000000FF // Clock Divider
  2697. #define MAC_MDV_DIV_S 0
  2698. //*****************************************************************************
  2699. //
  2700. // The following are defines for the bit fields in the MAC_O_MTXD register.
  2701. //
  2702. //*****************************************************************************
  2703. #define MAC_MTXD_MDTX_M 0x0000FFFF // MII Register Transmit Data
  2704. #define MAC_MTXD_MDTX_S 0
  2705. //*****************************************************************************
  2706. //
  2707. // The following are defines for the bit fields in the MAC_O_MRXD register.
  2708. //
  2709. //*****************************************************************************
  2710. #define MAC_MRXD_MDRX_M 0x0000FFFF // MII Register Receive Data
  2711. #define MAC_MRXD_MDRX_S 0
  2712. //*****************************************************************************
  2713. //
  2714. // The following are defines for the bit fields in the MAC_O_NP register.
  2715. //
  2716. //*****************************************************************************
  2717. #define MAC_NP_NPR_M 0x0000003F // Number of Packets in Receive
  2718. // FIFO
  2719. #define MAC_NP_NPR_S 0
  2720. //*****************************************************************************
  2721. //
  2722. // The following are defines for the bit fields in the MAC_O_TR register.
  2723. //
  2724. //*****************************************************************************
  2725. #define MAC_TR_NEWTX 0x00000001 // New Transmission
  2726. //*****************************************************************************
  2727. //
  2728. // The following are defines for the bit fields in the MAC_O_TS register.
  2729. //
  2730. //*****************************************************************************
  2731. #define MAC_TS_TSEN 0x00000001 // Time Stamp Enable
  2732. //*****************************************************************************
  2733. //
  2734. // The following are defines for the bit fields in the PHY_MR0 register.
  2735. //
  2736. //*****************************************************************************
  2737. #define PHY_MR0_RESET 0x00008000 // Reset Registers
  2738. #define PHY_MR0_LOOPBK 0x00004000 // Loopback Mode
  2739. #define PHY_MR0_SPEEDSL 0x00002000 // Speed Select
  2740. #define PHY_MR0_ANEGEN 0x00001000 // Auto-Negotiation Enable
  2741. #define PHY_MR0_PWRDN 0x00000800 // Power Down
  2742. #define PHY_MR0_ISO 0x00000400 // Isolate
  2743. #define PHY_MR0_RANEG 0x00000200 // Restart Auto-Negotiation
  2744. #define PHY_MR0_DUPLEX 0x00000100 // Set Duplex Mode
  2745. #define PHY_MR0_COLT 0x00000080 // Collision Test
  2746. //*****************************************************************************
  2747. //
  2748. // The following are defines for the bit fields in the PHY_MR1 register.
  2749. //
  2750. //*****************************************************************************
  2751. #define PHY_MR1_100X_F 0x00004000 // 100BASE-TX Full-Duplex Mode
  2752. #define PHY_MR1_100X_H 0x00002000 // 100BASE-TX Half-Duplex Mode
  2753. #define PHY_MR1_10T_F 0x00001000 // 10BASE-T Full-Duplex Mode
  2754. #define PHY_MR1_10T_H 0x00000800 // 10BASE-T Half-Duplex Mode
  2755. #define PHY_MR1_MFPS 0x00000040 // Management Frames with Preamble
  2756. // Suppressed
  2757. #define PHY_MR1_ANEGC 0x00000020 // Auto-Negotiation Complete
  2758. #define PHY_MR1_RFAULT 0x00000010 // Remote Fault
  2759. #define PHY_MR1_ANEGA 0x00000008 // Auto-Negotiation
  2760. #define PHY_MR1_LINK 0x00000004 // Link Made
  2761. #define PHY_MR1_JAB 0x00000002 // Jabber Condition
  2762. #define PHY_MR1_EXTD 0x00000001 // Extended Capabilities
  2763. //*****************************************************************************
  2764. //
  2765. // The following are defines for the bit fields in the PHY_MR2 register.
  2766. //
  2767. //*****************************************************************************
  2768. #define PHY_MR2_OUI_M 0x0000FFFF // Organizationally Unique
  2769. // Identifier[21:6]
  2770. #define PHY_MR2_OUI_S 0
  2771. //*****************************************************************************
  2772. //
  2773. // The following are defines for the bit fields in the PHY_MR3 register.
  2774. //
  2775. //*****************************************************************************
  2776. #define PHY_MR3_OUI_M 0x0000FC00 // Organizationally Unique
  2777. // Identifier[5:0]
  2778. #define PHY_MR3_MN_M 0x000003F0 // Model Number
  2779. #define PHY_MR3_RN_M 0x0000000F // Revision Number
  2780. #define PHY_MR3_OUI_S 10
  2781. #define PHY_MR3_MN_S 4
  2782. #define PHY_MR3_RN_S 0
  2783. //*****************************************************************************
  2784. //
  2785. // The following are defines for the bit fields in the PHY_MR4 register.
  2786. //
  2787. //*****************************************************************************
  2788. #define PHY_MR4_NP 0x00008000 // Next Page
  2789. #define PHY_MR4_RF 0x00002000 // Remote Fault
  2790. #define PHY_MR4_A3 0x00000100 // Technology Ability Field [3]
  2791. #define PHY_MR4_A2 0x00000080 // Technology Ability Field [2]
  2792. #define PHY_MR4_A1 0x00000040 // Technology Ability Field [1]
  2793. #define PHY_MR4_A0 0x00000020 // Technology Ability Field [0]
  2794. #define PHY_MR4_S_M 0x0000001F // Selector Field
  2795. #define PHY_MR4_S_S 0
  2796. //*****************************************************************************
  2797. //
  2798. // The following are defines for the bit fields in the PHY_MR5 register.
  2799. //
  2800. //*****************************************************************************
  2801. #define PHY_MR5_NP 0x00008000 // Next Page
  2802. #define PHY_MR5_ACK 0x00004000 // Acknowledge
  2803. #define PHY_MR5_RF 0x00002000 // Remote Fault
  2804. #define PHY_MR5_A_M 0x00001FE0 // Technology Ability Field
  2805. #define PHY_MR5_S_M 0x0000001F // Selector Field
  2806. #define PHY_MR5_S_8023 0x00000001 // IEEE Std 802.3
  2807. #define PHY_MR5_S_8029 0x00000002 // IEEE Std 802.9 ISLAN-16T
  2808. #define PHY_MR5_S_8025 0x00000003 // IEEE Std 802.5
  2809. #define PHY_MR5_S_1394 0x00000004 // IEEE Std 1394
  2810. #define PHY_MR5_A_S 5
  2811. //*****************************************************************************
  2812. //
  2813. // The following are defines for the bit fields in the PHY_MR6 register.
  2814. //
  2815. //*****************************************************************************
  2816. #define PHY_MR6_PDF 0x00000010 // Parallel Detection Fault
  2817. #define PHY_MR6_LPNPA 0x00000008 // Link Partner is Next Page Able
  2818. #define PHY_MR6_PRX 0x00000002 // New Page Received
  2819. #define PHY_MR6_LPANEGA 0x00000001 // Link Partner is Auto-Negotiation
  2820. // Able
  2821. //*****************************************************************************
  2822. //
  2823. // The following are defines for the bit fields in the PHY_MR16 register.
  2824. //
  2825. //*****************************************************************************
  2826. #define PHY_MR16_RPTR 0x00008000 // Repeater Mode
  2827. #define PHY_MR16_INPOL 0x00004000 // Interrupt Polarity
  2828. #define PHY_MR16_TXHIM 0x00001000 // Transmit High Impedance Mode
  2829. #define PHY_MR16_SQEI 0x00000800 // SQE Inhibit Testing
  2830. #define PHY_MR16_NL10 0x00000400 // Natural Loopback Mode
  2831. #define PHY_MR16_APOL 0x00000020 // Auto-Polarity Disable
  2832. #define PHY_MR16_RVSPOL 0x00000010 // Receive Data Polarity
  2833. #define PHY_MR16_PCSBP 0x00000002 // PCS Bypass
  2834. #define PHY_MR16_RXCC 0x00000001 // Receive Clock Control
  2835. //*****************************************************************************
  2836. //
  2837. // The following are defines for the bit fields in the PHY_MR17 register.
  2838. //
  2839. //*****************************************************************************
  2840. #define PHY_MR17_JABBER_IE 0x00008000 // Jabber Interrupt Enable
  2841. #define PHY_MR17_RXER_IE 0x00004000 // Receive Error Interrupt Enable
  2842. #define PHY_MR17_PRX_IE 0x00002000 // Page Received Interrupt Enable
  2843. #define PHY_MR17_PDF_IE 0x00001000 // Parallel Detection Fault
  2844. // Interrupt Enable
  2845. #define PHY_MR17_LPACK_IE 0x00000800 // LP Acknowledge Interrupt Enable
  2846. #define PHY_MR17_LSCHG_IE 0x00000400 // Link Status Change Interrupt
  2847. // Enable
  2848. #define PHY_MR17_RFAULT_IE 0x00000200 // Remote Fault Interrupt Enable
  2849. #define PHY_MR17_ANEGCOMP_IE 0x00000100 // Auto-Negotiation Complete
  2850. // Interrupt Enable
  2851. #define PHY_MR17_JABBER_INT 0x00000080 // Jabber Event Interrupt
  2852. #define PHY_MR17_RXER_INT 0x00000040 // Receive Error Interrupt
  2853. #define PHY_MR17_PRX_INT 0x00000020 // Page Receive Interrupt
  2854. #define PHY_MR17_PDF_INT 0x00000010 // Parallel Detection Fault
  2855. // Interrupt
  2856. #define PHY_MR17_LPACK_INT 0x00000008 // LP Acknowledge Interrupt
  2857. #define PHY_MR17_LSCHG_INT 0x00000004 // Link Status Change Interrupt
  2858. #define PHY_MR17_RFAULT_INT 0x00000002 // Remote Fault Interrupt
  2859. #define PHY_MR17_ANEGCOMP_INT 0x00000001 // Auto-Negotiation Complete
  2860. // Interrupt
  2861. //*****************************************************************************
  2862. //
  2863. // The following are defines for the bit fields in the PHY_MR18 register.
  2864. //
  2865. //*****************************************************************************
  2866. #define PHY_MR18_ANEGF 0x00001000 // Auto-Negotiation Failure
  2867. #define PHY_MR18_DPLX 0x00000800 // Duplex Mode
  2868. #define PHY_MR18_RATE 0x00000400 // Rate
  2869. #define PHY_MR18_RXSD 0x00000200 // Receive Detection
  2870. #define PHY_MR18_RX_LOCK 0x00000100 // Receive PLL Lock
  2871. //*****************************************************************************
  2872. //
  2873. // The following are defines for the bit fields in the PHY_MR19 register.
  2874. //
  2875. //*****************************************************************************
  2876. #define PHY_MR19_TXO_M 0x0000C000 // Transmit Amplitude Selection
  2877. #define PHY_MR19_TXO_00DB 0x00000000 // Gain set for 0.0dB of insertion
  2878. // loss
  2879. #define PHY_MR19_TXO_04DB 0x00004000 // Gain set for 0.4dB of insertion
  2880. // loss
  2881. #define PHY_MR19_TXO_08DB 0x00008000 // Gain set for 0.8dB of insertion
  2882. // loss
  2883. #define PHY_MR19_TXO_12DB 0x0000C000 // Gain set for 1.2dB of insertion
  2884. // loss
  2885. //*****************************************************************************
  2886. //
  2887. // The following are defines for the bit fields in the PHY_MR23 register.
  2888. //
  2889. //*****************************************************************************
  2890. #define PHY_MR23_LED1_M 0x000000F0 // LED1 Source
  2891. #define PHY_MR23_LED1_LINK 0x00000000 // Link OK
  2892. #define PHY_MR23_LED1_RXTX 0x00000010 // RX or TX Activity (Default LED1)
  2893. #define PHY_MR23_LED1_100 0x00000050 // 100BASE-TX mode
  2894. #define PHY_MR23_LED1_10 0x00000060 // 10BASE-T mode
  2895. #define PHY_MR23_LED1_DUPLEX 0x00000070 // Full-Duplex
  2896. #define PHY_MR23_LED1_LINKACT 0x00000080 // Link OK & Blink=RX or TX
  2897. // Activity
  2898. #define PHY_MR23_LED0_M 0x0000000F // LED0 Source
  2899. #define PHY_MR23_LED0_LINK 0x00000000 // Link OK (Default LED0)
  2900. #define PHY_MR23_LED0_RXTX 0x00000001 // RX or TX Activity
  2901. #define PHY_MR23_LED0_100 0x00000005 // 100BASE-TX mode
  2902. #define PHY_MR23_LED0_10 0x00000006 // 10BASE-T mode
  2903. #define PHY_MR23_LED0_DUPLEX 0x00000007 // Full-Duplex
  2904. #define PHY_MR23_LED0_LINKACT 0x00000008 // Link OK & Blink=RX or TX
  2905. // Activity
  2906. //*****************************************************************************
  2907. //
  2908. // The following are defines for the bit fields in the PHY_MR24 register.
  2909. //
  2910. //*****************************************************************************
  2911. #define PHY_MR24_PD_MODE 0x00000080 // Parallel Detection Mode
  2912. #define PHY_MR24_AUTO_SW 0x00000040 // Auto-Switching Enable
  2913. #define PHY_MR24_MDIX 0x00000020 // Auto-Switching Configuration
  2914. #define PHY_MR24_MDIX_CM 0x00000010 // Auto-Switching Complete
  2915. #define PHY_MR24_MDIX_SD_M 0x0000000F // Auto-Switching Seed
  2916. #define PHY_MR24_MDIX_SD_S 0
  2917. //*****************************************************************************
  2918. //
  2919. // The following are defines for the bit fields in the HIB_RTCC register.
  2920. //
  2921. //*****************************************************************************
  2922. #define HIB_RTCC_M 0xFFFFFFFF // RTC Counter
  2923. #define HIB_RTCC_S 0
  2924. //*****************************************************************************
  2925. //
  2926. // The following are defines for the bit fields in the HIB_RTCM0 register.
  2927. //
  2928. //*****************************************************************************
  2929. #define HIB_RTCM0_M 0xFFFFFFFF // RTC Match 0
  2930. #define HIB_RTCM0_S 0
  2931. //*****************************************************************************
  2932. //
  2933. // The following are defines for the bit fields in the HIB_RTCM1 register.
  2934. //
  2935. //*****************************************************************************
  2936. #define HIB_RTCM1_M 0xFFFFFFFF // RTC Match 1
  2937. #define HIB_RTCM1_S 0
  2938. //*****************************************************************************
  2939. //
  2940. // The following are defines for the bit fields in the HIB_RTCLD register.
  2941. //
  2942. //*****************************************************************************
  2943. #define HIB_RTCLD_M 0xFFFFFFFF // RTC Load
  2944. #define HIB_RTCLD_S 0
  2945. //*****************************************************************************
  2946. //
  2947. // The following are defines for the bit fields in the HIB_CTL register.
  2948. //
  2949. //*****************************************************************************
  2950. #define HIB_CTL_VABORT 0x00000080 // Power Cut Abort Enable
  2951. #define HIB_CTL_CLK32EN 0x00000040 // Clocking Enable
  2952. #define HIB_CTL_LOWBATEN 0x00000020 // Low Battery Monitoring Enable
  2953. #define HIB_CTL_PINWEN 0x00000010 // External WAKE Pin Enable
  2954. #define HIB_CTL_RTCWEN 0x00000008 // RTC Wake-up Enable
  2955. #define HIB_CTL_CLKSEL 0x00000004 // Hibernation Module Clock Select
  2956. #define HIB_CTL_HIBREQ 0x00000002 // Hibernation Request
  2957. #define HIB_CTL_RTCEN 0x00000001 // RTC Timer Enable
  2958. //*****************************************************************************
  2959. //
  2960. // The following are defines for the bit fields in the HIB_IM register.
  2961. //
  2962. //*****************************************************************************
  2963. #define HIB_IM_EXTW 0x00000008 // External Wake-Up Interrupt Mask
  2964. #define HIB_IM_LOWBAT 0x00000004 // Low Battery Voltage Interrupt
  2965. // Mask
  2966. #define HIB_IM_RTCALT1 0x00000002 // RTC Alert 1 Interrupt Mask
  2967. #define HIB_IM_RTCALT0 0x00000001 // RTC Alert 0 Interrupt Mask
  2968. //*****************************************************************************
  2969. //
  2970. // The following are defines for the bit fields in the HIB_RIS register.
  2971. //
  2972. //*****************************************************************************
  2973. #define HIB_RIS_EXTW 0x00000008 // External Wake-Up Raw Interrupt
  2974. // Status
  2975. #define HIB_RIS_LOWBAT 0x00000004 // Low Battery Voltage Raw
  2976. // Interrupt Status
  2977. #define HIB_RIS_RTCALT1 0x00000002 // RTC Alert 1 Raw Interrupt Status
  2978. #define HIB_RIS_RTCALT0 0x00000001 // RTC Alert 0 Raw Interrupt Status
  2979. //*****************************************************************************
  2980. //
  2981. // The following are defines for the bit fields in the HIB_MIS register.
  2982. //
  2983. //*****************************************************************************
  2984. #define HIB_MIS_EXTW 0x00000008 // External Wake-Up Masked
  2985. // Interrupt Status
  2986. #define HIB_MIS_LOWBAT 0x00000004 // Low Battery Voltage Masked
  2987. // Interrupt Status
  2988. #define HIB_MIS_RTCALT1 0x00000002 // RTC Alert 1 Masked Interrupt
  2989. // Status
  2990. #define HIB_MIS_RTCALT0 0x00000001 // RTC Alert 0 Masked Interrupt
  2991. // Status
  2992. //*****************************************************************************
  2993. //
  2994. // The following are defines for the bit fields in the HIB_IC register.
  2995. //
  2996. //*****************************************************************************
  2997. #define HIB_IC_EXTW 0x00000008 // External Wake-Up Masked
  2998. // Interrupt Clear
  2999. #define HIB_IC_LOWBAT 0x00000004 // Low Battery Voltage Masked
  3000. // Interrupt Clear
  3001. #define HIB_IC_RTCALT1 0x00000002 // RTC Alert1 Masked Interrupt
  3002. // Clear
  3003. #define HIB_IC_RTCALT0 0x00000001 // RTC Alert0 Masked Interrupt
  3004. // Clear
  3005. //*****************************************************************************
  3006. //
  3007. // The following are defines for the bit fields in the HIB_RTCT register.
  3008. //
  3009. //*****************************************************************************
  3010. #define HIB_RTCT_TRIM_M 0x0000FFFF // RTC Trim Value
  3011. #define HIB_RTCT_TRIM_S 0
  3012. //*****************************************************************************
  3013. //
  3014. // The following are defines for the bit fields in the HIB_DATA register.
  3015. //
  3016. //*****************************************************************************
  3017. #define HIB_DATA_RTD_M 0xFFFFFFFF // Hibernation Module NV Data
  3018. #define HIB_DATA_RTD_S 0
  3019. //*****************************************************************************
  3020. //
  3021. // The following are defines for the bit fields in the FLASH_FMA register.
  3022. //
  3023. //*****************************************************************************
  3024. #define FLASH_FMA_OFFSET_M 0x0003FFFF // Address Offset
  3025. #define FLASH_FMA_OFFSET_S 0
  3026. //*****************************************************************************
  3027. //
  3028. // The following are defines for the bit fields in the FLASH_FMD register.
  3029. //
  3030. //*****************************************************************************
  3031. #define FLASH_FMD_DATA_M 0xFFFFFFFF // Data Value
  3032. #define FLASH_FMD_DATA_S 0
  3033. //*****************************************************************************
  3034. //
  3035. // The following are defines for the bit fields in the FLASH_FMC register.
  3036. //
  3037. //*****************************************************************************
  3038. #define FLASH_FMC_WRKEY 0xA4420000 // FLASH write key
  3039. #define FLASH_FMC_COMT 0x00000008 // Commit Register Value
  3040. #define FLASH_FMC_MERASE 0x00000004 // Mass Erase Flash Memory
  3041. #define FLASH_FMC_ERASE 0x00000002 // Erase a Page of Flash Memory
  3042. #define FLASH_FMC_WRITE 0x00000001 // Write a Word into Flash Memory
  3043. //*****************************************************************************
  3044. //
  3045. // The following are defines for the bit fields in the FLASH_FCRIS register.
  3046. //
  3047. //*****************************************************************************
  3048. #define FLASH_FCRIS_PRIS 0x00000002 // Programming Raw Interrupt Status
  3049. #define FLASH_FCRIS_ARIS 0x00000001 // Access Raw Interrupt Status
  3050. //*****************************************************************************
  3051. //
  3052. // The following are defines for the bit fields in the FLASH_FCIM register.
  3053. //
  3054. //*****************************************************************************
  3055. #define FLASH_FCIM_PMASK 0x00000002 // Programming Interrupt Mask
  3056. #define FLASH_FCIM_AMASK 0x00000001 // Access Interrupt Mask
  3057. //*****************************************************************************
  3058. //
  3059. // The following are defines for the bit fields in the FLASH_FCMISC register.
  3060. //
  3061. //*****************************************************************************
  3062. #define FLASH_FCMISC_PMISC 0x00000002 // Programming Masked Interrupt
  3063. // Status and Clear
  3064. #define FLASH_FCMISC_AMISC 0x00000001 // Access Masked Interrupt Status
  3065. // and Clear
  3066. //*****************************************************************************
  3067. //
  3068. // The following are defines for the bit fields in the FLASH_USECRL register.
  3069. //
  3070. //*****************************************************************************
  3071. #define FLASH_USECRL_M 0x000000FF // Microsecond Reload Value
  3072. #define FLASH_USECRL_S 0
  3073. //*****************************************************************************
  3074. //
  3075. // The following are defines for the bit fields in the FLASH_USERDBG register.
  3076. //
  3077. //*****************************************************************************
  3078. #define FLASH_USERDBG_NW 0x80000000 // User Debug Not Written
  3079. #define FLASH_USERDBG_DATA_M 0x7FFFFFFC // User Data
  3080. #define FLASH_USERDBG_DBG1 0x00000002 // Debug Control 1
  3081. #define FLASH_USERDBG_DBG0 0x00000001 // Debug Control 0
  3082. #define FLASH_USERDBG_DATA_S 2
  3083. //*****************************************************************************
  3084. //
  3085. // The following are defines for the bit fields in the FLASH_USERREG0 register.
  3086. //
  3087. //*****************************************************************************
  3088. #define FLASH_USERREG0_NW 0x80000000 // Not Written
  3089. #define FLASH_USERREG0_DATA_M 0x7FFFFFFF // User Data
  3090. #define FLASH_USERREG0_DATA_S 0
  3091. //*****************************************************************************
  3092. //
  3093. // The following are defines for the bit fields in the FLASH_USERREG1 register.
  3094. //
  3095. //*****************************************************************************
  3096. #define FLASH_USERREG1_NW 0x80000000 // Not Written
  3097. #define FLASH_USERREG1_DATA_M 0x7FFFFFFF // User Data
  3098. #define FLASH_USERREG1_DATA_S 0
  3099. //*****************************************************************************
  3100. //
  3101. // The following are defines for the erase size of the FLASH block that is
  3102. // erased by an erase operation, and the protect size is the size of the FLASH
  3103. // block that is protected by each protection register.
  3104. //
  3105. //*****************************************************************************
  3106. #define FLASH_PROTECT_SIZE 0x00000800
  3107. #define FLASH_ERASE_SIZE 0x00000400
  3108. //*****************************************************************************
  3109. //
  3110. // The following are defines for the bit fields in the SYSCTL_DID0 register.
  3111. //
  3112. //*****************************************************************************
  3113. #define SYSCTL_DID0_VER_M 0x70000000 // DID0 Version
  3114. #define SYSCTL_DID0_VER_1 0x10000000 // Second version of the DID0
  3115. // register format
  3116. #define SYSCTL_DID0_CLASS_M 0x00FF0000 // Device Class
  3117. #define SYSCTL_DID0_CLASS_FURY 0x00010000 // Stellaris(R) Fury-class devices
  3118. #define SYSCTL_DID0_MAJ_M 0x0000FF00 // Major Revision
  3119. #define SYSCTL_DID0_MAJ_REVA 0x00000000 // Revision A (initial device)
  3120. #define SYSCTL_DID0_MAJ_REVB 0x00000100 // Revision B (first base layer
  3121. // revision)
  3122. #define SYSCTL_DID0_MAJ_REVC 0x00000200 // Revision C (second base layer
  3123. // revision)
  3124. #define SYSCTL_DID0_MIN_M 0x000000FF // Minor Revision
  3125. #define SYSCTL_DID0_MIN_0 0x00000000 // Initial device, or a major
  3126. // revision update
  3127. #define SYSCTL_DID0_MIN_1 0x00000001 // First metal layer change
  3128. #define SYSCTL_DID0_MIN_2 0x00000002 // Second metal layer change
  3129. //*****************************************************************************
  3130. //
  3131. // The following are defines for the bit fields in the SYSCTL_DID1 register.
  3132. //
  3133. //*****************************************************************************
  3134. #define SYSCTL_DID1_VER_M 0xF0000000 // DID1 Version
  3135. #define SYSCTL_DID1_VER_1 0x10000000 // Second version of the DID1
  3136. // register format
  3137. #define SYSCTL_DID1_FAM_M 0x0F000000 // Family
  3138. #define SYSCTL_DID1_FAM_STELLARIS \
  3139. 0x00000000 // Stellaris family of
  3140. // microcontollers, that is, all
  3141. // devices with external part
  3142. // numbers starting with LM3S
  3143. #define SYSCTL_DID1_PRTNO_M 0x00FF0000 // Part Number
  3144. #define SYSCTL_DID1_PRTNO_8962 0x00A60000 // LM3S8962
  3145. #define SYSCTL_DID1_PINCNT_M 0x0000E000 // Package Pin Count
  3146. #define SYSCTL_DID1_PINCNT_100 0x00004000 // 100-pin package
  3147. #define SYSCTL_DID1_TEMP_M 0x000000E0 // Temperature Range
  3148. #define SYSCTL_DID1_TEMP_C 0x00000000 // Commercial temperature range (0C
  3149. // to 70C)
  3150. #define SYSCTL_DID1_TEMP_I 0x00000020 // Industrial temperature range
  3151. // (-40C to 85C)
  3152. #define SYSCTL_DID1_TEMP_E 0x00000040 // Extended temperature range (-40C
  3153. // to 105C)
  3154. #define SYSCTL_DID1_PKG_M 0x00000018 // Package Type
  3155. #define SYSCTL_DID1_PKG_SOIC 0x00000000 // SOIC package
  3156. #define SYSCTL_DID1_PKG_QFP 0x00000008 // LQFP package
  3157. #define SYSCTL_DID1_PKG_BGA 0x00000010 // BGA package
  3158. #define SYSCTL_DID1_ROHS 0x00000004 // RoHS-Compliance
  3159. #define SYSCTL_DID1_QUAL_M 0x00000003 // Qualification Status
  3160. #define SYSCTL_DID1_QUAL_ES 0x00000000 // Engineering Sample (unqualified)
  3161. #define SYSCTL_DID1_QUAL_PP 0x00000001 // Pilot Production (unqualified)
  3162. #define SYSCTL_DID1_QUAL_FQ 0x00000002 // Fully Qualified
  3163. //*****************************************************************************
  3164. //
  3165. // The following are defines for the bit fields in the SYSCTL_DC0 register.
  3166. //
  3167. //*****************************************************************************
  3168. #define SYSCTL_DC0_SRAMSZ_M 0xFFFF0000 // SRAM Size
  3169. #define SYSCTL_DC0_SRAMSZ_64KB 0x00FF0000 // 64 KB of SRAM
  3170. #define SYSCTL_DC0_FLASHSZ_M 0x0000FFFF // Flash Size
  3171. #define SYSCTL_DC0_FLASHSZ_256K 0x0000007F // 256 KB of Flash
  3172. #define SYSCTL_DC0_SRAMSZ_S 16 // SRAM size shift
  3173. #define SYSCTL_DC0_FLASHSZ_S 0 // Flash size shift
  3174. //*****************************************************************************
  3175. //
  3176. // The following are defines for the bit fields in the SYSCTL_DC1 register.
  3177. //
  3178. //*****************************************************************************
  3179. #define SYSCTL_DC1_CAN0 0x01000000 // CAN Module 0 Present
  3180. #define SYSCTL_DC1_PWM 0x00100000 // PWM Module Present
  3181. #define SYSCTL_DC1_ADC 0x00010000 // ADC Module Present
  3182. #define SYSCTL_DC1_MINSYSDIV_M 0x0000F000 // System Clock Divider
  3183. #define SYSCTL_DC1_MINSYSDIV_50 0x00003000 // Specifies a 50-MHz CPU clock
  3184. // with a PLL divider of 4
  3185. #define SYSCTL_DC1_ADCSPD_M 0x00000300 // Max ADC Speed
  3186. #define SYSCTL_DC1_ADCSPD_500K 0x00000200 // 500K samples/second
  3187. #define SYSCTL_DC1_MPU 0x00000080 // MPU Present
  3188. #define SYSCTL_DC1_HIB 0x00000040 // Hibernation Module Present
  3189. #define SYSCTL_DC1_TEMP 0x00000020 // Temp Sensor Present
  3190. #define SYSCTL_DC1_PLL 0x00000010 // PLL Present
  3191. #define SYSCTL_DC1_WDT 0x00000008 // Watchdog Timer Present
  3192. #define SYSCTL_DC1_SWO 0x00000004 // SWO Trace Port Present
  3193. #define SYSCTL_DC1_SWD 0x00000002 // SWD Present
  3194. #define SYSCTL_DC1_JTAG 0x00000001 // JTAG Present
  3195. //*****************************************************************************
  3196. //
  3197. // The following are defines for the bit fields in the SYSCTL_DC2 register.
  3198. //
  3199. //*****************************************************************************
  3200. #define SYSCTL_DC2_COMP0 0x01000000 // Analog Comparator 0 Present
  3201. #define SYSCTL_DC2_TIMER3 0x00080000 // Timer Module 3 Present
  3202. #define SYSCTL_DC2_TIMER2 0x00040000 // Timer Module 2 Present
  3203. #define SYSCTL_DC2_TIMER1 0x00020000 // Timer Module 1 Present
  3204. #define SYSCTL_DC2_TIMER0 0x00010000 // Timer Module 0 Present
  3205. #define SYSCTL_DC2_I2C0 0x00001000 // I2C Module 0 Present
  3206. #define SYSCTL_DC2_QEI1 0x00000200 // QEI Module 1 Present
  3207. #define SYSCTL_DC2_QEI0 0x00000100 // QEI Module 0 Present
  3208. #define SYSCTL_DC2_SSI0 0x00000010 // SSI Module 0 Present
  3209. #define SYSCTL_DC2_UART1 0x00000002 // UART Module 1 Present
  3210. #define SYSCTL_DC2_UART0 0x00000001 // UART Module 0 Present
  3211. //*****************************************************************************
  3212. //
  3213. // The following are defines for the bit fields in the SYSCTL_DC3 register.
  3214. //
  3215. //*****************************************************************************
  3216. #define SYSCTL_DC3_32KHZ 0x80000000 // 32KHz Input Clock Available
  3217. #define SYSCTL_DC3_CCP1 0x02000000 // CCP1 Pin Present
  3218. #define SYSCTL_DC3_CCP0 0x01000000 // CCP0 Pin Present
  3219. #define SYSCTL_DC3_ADC3 0x00080000 // ADC3 Pin Present
  3220. #define SYSCTL_DC3_ADC2 0x00040000 // ADC2 Pin Present
  3221. #define SYSCTL_DC3_ADC1 0x00020000 // ADC1 Pin Present
  3222. #define SYSCTL_DC3_ADC0 0x00010000 // ADC0 Pin Present
  3223. #define SYSCTL_DC3_PWMFAULT 0x00008000 // PWM Fault Pin Present
  3224. #define SYSCTL_DC3_C0O 0x00000100 // C0o Pin Present
  3225. #define SYSCTL_DC3_C0PLUS 0x00000080 // C0+ Pin Present
  3226. #define SYSCTL_DC3_C0MINUS 0x00000040 // C0- Pin Present
  3227. #define SYSCTL_DC3_PWM5 0x00000020 // PWM5 Pin Present
  3228. #define SYSCTL_DC3_PWM4 0x00000010 // PWM4 Pin Present
  3229. #define SYSCTL_DC3_PWM3 0x00000008 // PWM3 Pin Present
  3230. #define SYSCTL_DC3_PWM2 0x00000004 // PWM2 Pin Present
  3231. #define SYSCTL_DC3_PWM1 0x00000002 // PWM1 Pin Present
  3232. #define SYSCTL_DC3_PWM0 0x00000001 // PWM0 Pin Present
  3233. //*****************************************************************************
  3234. //
  3235. // The following are defines for the bit fields in the SYSCTL_DC4 register.
  3236. //
  3237. //*****************************************************************************
  3238. #define SYSCTL_DC4_EPHY0 0x40000000 // Ethernet PHY Layer 0 Present
  3239. #define SYSCTL_DC4_EMAC0 0x10000000 // Ethernet MAC Layer 0 Present
  3240. #define SYSCTL_DC4_E1588 0x01000000 // 1588 Capable
  3241. #define SYSCTL_DC4_GPIOG 0x00000040 // GPIO Port G Present
  3242. #define SYSCTL_DC4_GPIOF 0x00000020 // GPIO Port F Present
  3243. #define SYSCTL_DC4_GPIOE 0x00000010 // GPIO Port E Present
  3244. #define SYSCTL_DC4_GPIOD 0x00000008 // GPIO Port D Present
  3245. #define SYSCTL_DC4_GPIOC 0x00000004 // GPIO Port C Present
  3246. #define SYSCTL_DC4_GPIOB 0x00000002 // GPIO Port B Present
  3247. #define SYSCTL_DC4_GPIOA 0x00000001 // GPIO Port A Present
  3248. //*****************************************************************************
  3249. //
  3250. // The following are defines for the bit fields in the SYSCTL_PBORCTL register.
  3251. //
  3252. //*****************************************************************************
  3253. #define SYSCTL_PBORCTL_BORIOR 0x00000002 // BOR Interrupt or Reset
  3254. //*****************************************************************************
  3255. //
  3256. // The following are defines for the bit fields in the SYSCTL_LDOPCTL register.
  3257. //
  3258. //*****************************************************************************
  3259. #define SYSCTL_LDOPCTL_M 0x0000003F // LDO Output Voltage
  3260. #define SYSCTL_LDOPCTL_2_50V 0x00000000 // 2.50
  3261. #define SYSCTL_LDOPCTL_2_45V 0x00000001 // 2.45
  3262. #define SYSCTL_LDOPCTL_2_40V 0x00000002 // 2.40
  3263. #define SYSCTL_LDOPCTL_2_35V 0x00000003 // 2.35
  3264. #define SYSCTL_LDOPCTL_2_30V 0x00000004 // 2.30
  3265. #define SYSCTL_LDOPCTL_2_25V 0x00000005 // 2.25
  3266. #define SYSCTL_LDOPCTL_2_75V 0x0000001B // 2.75
  3267. #define SYSCTL_LDOPCTL_2_70V 0x0000001C // 2.70
  3268. #define SYSCTL_LDOPCTL_2_65V 0x0000001D // 2.65
  3269. #define SYSCTL_LDOPCTL_2_60V 0x0000001E // 2.60
  3270. #define SYSCTL_LDOPCTL_2_55V 0x0000001F // 2.55
  3271. //*****************************************************************************
  3272. //
  3273. // The following are defines for the bit fields in the SYSCTL_SRCR0 register.
  3274. //
  3275. //*****************************************************************************
  3276. #define SYSCTL_SRCR0_CAN0 0x01000000 // CAN0 Reset Control
  3277. #define SYSCTL_SRCR0_PWM 0x00100000 // PWM Reset Control
  3278. #define SYSCTL_SRCR0_ADC 0x00010000 // ADC0 Reset Control
  3279. #define SYSCTL_SRCR0_HIB 0x00000040 // HIB Reset Control
  3280. #define SYSCTL_SRCR0_WDT 0x00000008 // WDT Reset Control
  3281. //*****************************************************************************
  3282. //
  3283. // The following are defines for the bit fields in the SYSCTL_SRCR1 register.
  3284. //
  3285. //*****************************************************************************
  3286. #define SYSCTL_SRCR1_COMP0 0x01000000 // Analog Comp 0 Reset Control
  3287. #define SYSCTL_SRCR1_TIMER3 0x00080000 // Timer 3 Reset Control
  3288. #define SYSCTL_SRCR1_TIMER2 0x00040000 // Timer 2 Reset Control
  3289. #define SYSCTL_SRCR1_TIMER1 0x00020000 // Timer 1 Reset Control
  3290. #define SYSCTL_SRCR1_TIMER0 0x00010000 // Timer 0 Reset Control
  3291. #define SYSCTL_SRCR1_I2C0 0x00001000 // I2C0 Reset Control
  3292. #define SYSCTL_SRCR1_QEI1 0x00000200 // QEI1 Reset Control
  3293. #define SYSCTL_SRCR1_QEI0 0x00000100 // QEI0 Reset Control
  3294. #define SYSCTL_SRCR1_SSI0 0x00000010 // SSI0 Reset Control
  3295. #define SYSCTL_SRCR1_UART1 0x00000002 // UART1 Reset Control
  3296. #define SYSCTL_SRCR1_UART0 0x00000001 // UART0 Reset Control
  3297. //*****************************************************************************
  3298. //
  3299. // The following are defines for the bit fields in the SYSCTL_SRCR2 register.
  3300. //
  3301. //*****************************************************************************
  3302. #define SYSCTL_SRCR2_EPHY0 0x40000000 // PHY0 Reset Control
  3303. #define SYSCTL_SRCR2_EMAC0 0x10000000 // MAC0 Reset Control
  3304. #define SYSCTL_SRCR2_GPIOG 0x00000040 // Port G Reset Control
  3305. #define SYSCTL_SRCR2_GPIOF 0x00000020 // Port F Reset Control
  3306. #define SYSCTL_SRCR2_GPIOE 0x00000010 // Port E Reset Control
  3307. #define SYSCTL_SRCR2_GPIOD 0x00000008 // Port D Reset Control
  3308. #define SYSCTL_SRCR2_GPIOC 0x00000004 // Port C Reset Control
  3309. #define SYSCTL_SRCR2_GPIOB 0x00000002 // Port B Reset Control
  3310. #define SYSCTL_SRCR2_GPIOA 0x00000001 // Port A Reset Control
  3311. //*****************************************************************************
  3312. //
  3313. // The following are defines for the bit fields in the SYSCTL_RIS register.
  3314. //
  3315. //*****************************************************************************
  3316. #define SYSCTL_RIS_PLLLRIS 0x00000040 // PLL Lock Raw Interrupt Status
  3317. #define SYSCTL_RIS_BORRIS 0x00000002 // Brown-Out Reset Raw Interrupt
  3318. // Status
  3319. //*****************************************************************************
  3320. //
  3321. // The following are defines for the bit fields in the SYSCTL_IMC register.
  3322. //
  3323. //*****************************************************************************
  3324. #define SYSCTL_IMC_PLLLIM 0x00000040 // PLL Lock Interrupt Mask
  3325. #define SYSCTL_IMC_BORIM 0x00000002 // Brown-Out Reset Interrupt Mask
  3326. //*****************************************************************************
  3327. //
  3328. // The following are defines for the bit fields in the SYSCTL_MISC register.
  3329. //
  3330. //*****************************************************************************
  3331. #define SYSCTL_MISC_PLLLMIS 0x00000040 // PLL Lock Masked Interrupt Status
  3332. #define SYSCTL_MISC_BORMIS 0x00000002 // BOR Masked Interrupt Status
  3333. //*****************************************************************************
  3334. //
  3335. // The following are defines for the bit fields in the SYSCTL_RESC register.
  3336. //
  3337. //*****************************************************************************
  3338. #define SYSCTL_RESC_SW 0x00000010 // Software Reset
  3339. #define SYSCTL_RESC_WDT 0x00000008 // Watchdog Timer Reset
  3340. #define SYSCTL_RESC_BOR 0x00000004 // Brown-Out Reset
  3341. #define SYSCTL_RESC_POR 0x00000002 // Power-On Reset
  3342. #define SYSCTL_RESC_EXT 0x00000001 // External Reset
  3343. //*****************************************************************************
  3344. //
  3345. // The following are defines for the bit fields in the SYSCTL_RCC register.
  3346. //
  3347. //*****************************************************************************
  3348. #define SYSCTL_RCC_ACG 0x08000000 // Auto Clock Gating
  3349. #define SYSCTL_RCC_SYSDIV_M 0x07800000 // System Clock Divisor
  3350. #define SYSCTL_RCC_SYSDIV_2 0x00800000 // System clock /2
  3351. #define SYSCTL_RCC_SYSDIV_3 0x01000000 // System clock /3
  3352. #define SYSCTL_RCC_SYSDIV_4 0x01800000 // System clock /4
  3353. #define SYSCTL_RCC_SYSDIV_5 0x02000000 // System clock /5
  3354. #define SYSCTL_RCC_SYSDIV_6 0x02800000 // System clock /6
  3355. #define SYSCTL_RCC_SYSDIV_7 0x03000000 // System clock /7
  3356. #define SYSCTL_RCC_SYSDIV_8 0x03800000 // System clock /8
  3357. #define SYSCTL_RCC_SYSDIV_9 0x04000000 // System clock /9
  3358. #define SYSCTL_RCC_SYSDIV_10 0x04800000 // System clock /10
  3359. #define SYSCTL_RCC_SYSDIV_11 0x05000000 // System clock /11
  3360. #define SYSCTL_RCC_SYSDIV_12 0x05800000 // System clock /12
  3361. #define SYSCTL_RCC_SYSDIV_13 0x06000000 // System clock /13
  3362. #define SYSCTL_RCC_SYSDIV_14 0x06800000 // System clock /14
  3363. #define SYSCTL_RCC_SYSDIV_15 0x07000000 // System clock /15
  3364. #define SYSCTL_RCC_SYSDIV_16 0x07800000 // System clock /16
  3365. #define SYSCTL_RCC_USESYSDIV 0x00400000 // Enable System Clock Divider
  3366. #define SYSCTL_RCC_USEPWMDIV 0x00100000 // Enable PWM Clock Divisor
  3367. #define SYSCTL_RCC_PWMDIV_M 0x000E0000 // PWM Unit Clock Divisor
  3368. #define SYSCTL_RCC_PWMDIV_2 0x00000000 // PWM clock /2
  3369. #define SYSCTL_RCC_PWMDIV_4 0x00020000 // PWM clock /4
  3370. #define SYSCTL_RCC_PWMDIV_8 0x00040000 // PWM clock /8
  3371. #define SYSCTL_RCC_PWMDIV_16 0x00060000 // PWM clock /16
  3372. #define SYSCTL_RCC_PWMDIV_32 0x00080000 // PWM clock /32
  3373. #define SYSCTL_RCC_PWMDIV_64 0x000A0000 // PWM clock /64
  3374. #define SYSCTL_RCC_PWRDN 0x00002000 // PLL Power Down
  3375. #define SYSCTL_RCC_BYPASS 0x00000800 // PLL Bypass
  3376. #define SYSCTL_RCC_XTAL_M 0x000003C0 // Crystal Value
  3377. #define SYSCTL_RCC_XTAL_1MHZ 0x00000000 // 1 MHz
  3378. #define SYSCTL_RCC_XTAL_1_84MHZ 0x00000040 // 1.8432 MHz
  3379. #define SYSCTL_RCC_XTAL_2MHZ 0x00000080 // 2 MHz
  3380. #define SYSCTL_RCC_XTAL_2_45MHZ 0x000000C0 // 2.4576 MHz
  3381. #define SYSCTL_RCC_XTAL_3_57MHZ 0x00000100 // 3.579545 MHz
  3382. #define SYSCTL_RCC_XTAL_3_68MHZ 0x00000140 // 3.6864 MHz
  3383. #define SYSCTL_RCC_XTAL_4MHZ 0x00000180 // 4 MHz
  3384. #define SYSCTL_RCC_XTAL_4_09MHZ 0x000001C0 // 4.096 MHz
  3385. #define SYSCTL_RCC_XTAL_4_91MHZ 0x00000200 // 4.9152 MHz
  3386. #define SYSCTL_RCC_XTAL_5MHZ 0x00000240 // 5 MHz
  3387. #define SYSCTL_RCC_XTAL_5_12MHZ 0x00000280 // 5.12 MHz
  3388. #define SYSCTL_RCC_XTAL_6MHZ 0x000002C0 // 6 MHz
  3389. #define SYSCTL_RCC_XTAL_6_14MHZ 0x00000300 // 6.144 MHz
  3390. #define SYSCTL_RCC_XTAL_7_37MHZ 0x00000340 // 7.3728 MHz
  3391. #define SYSCTL_RCC_XTAL_8MHZ 0x00000380 // 8 MHz
  3392. #define SYSCTL_RCC_XTAL_8_19MHZ 0x000003C0 // 8.192 MHz
  3393. #define SYSCTL_RCC_OSCSRC_M 0x00000030 // Oscillator Source
  3394. #define SYSCTL_RCC_OSCSRC_MAIN 0x00000000 // MOSC
  3395. #define SYSCTL_RCC_OSCSRC_INT 0x00000010 // IOSC
  3396. #define SYSCTL_RCC_OSCSRC_INT4 0x00000020 // IOSC/4
  3397. #define SYSCTL_RCC_OSCSRC_30 0x00000030 // 30 kHz
  3398. #define SYSCTL_RCC_IOSCDIS 0x00000002 // Internal Oscillator Disable
  3399. #define SYSCTL_RCC_MOSCDIS 0x00000001 // Main Oscillator Disable
  3400. #define SYSCTL_RCC_SYSDIV_S 23
  3401. //*****************************************************************************
  3402. //
  3403. // The following are defines for the bit fields in the SYSCTL_PLLCFG register.
  3404. //
  3405. //*****************************************************************************
  3406. #define SYSCTL_PLLCFG_F_M 0x00003FE0 // PLL F Value
  3407. #define SYSCTL_PLLCFG_R_M 0x0000001F // PLL R Value
  3408. #define SYSCTL_PLLCFG_F_S 5
  3409. #define SYSCTL_PLLCFG_R_S 0
  3410. //*****************************************************************************
  3411. //
  3412. // The following are defines for the bit fields in the SYSCTL_RCC2 register.
  3413. //
  3414. //*****************************************************************************
  3415. #define SYSCTL_RCC2_USERCC2 0x80000000 // Use RCC2
  3416. #define SYSCTL_RCC2_SYSDIV2_M 0x1F800000 // System Clock Divisor 2
  3417. #define SYSCTL_RCC2_SYSDIV2_2 0x00800000 // System clock /2
  3418. #define SYSCTL_RCC2_SYSDIV2_3 0x01000000 // System clock /3
  3419. #define SYSCTL_RCC2_SYSDIV2_4 0x01800000 // System clock /4
  3420. #define SYSCTL_RCC2_SYSDIV2_5 0x02000000 // System clock /5
  3421. #define SYSCTL_RCC2_SYSDIV2_6 0x02800000 // System clock /6
  3422. #define SYSCTL_RCC2_SYSDIV2_7 0x03000000 // System clock /7
  3423. #define SYSCTL_RCC2_SYSDIV2_8 0x03800000 // System clock /8
  3424. #define SYSCTL_RCC2_SYSDIV2_9 0x04000000 // System clock /9
  3425. #define SYSCTL_RCC2_SYSDIV2_10 0x04800000 // System clock /10
  3426. #define SYSCTL_RCC2_SYSDIV2_11 0x05000000 // System clock /11
  3427. #define SYSCTL_RCC2_SYSDIV2_12 0x05800000 // System clock /12
  3428. #define SYSCTL_RCC2_SYSDIV2_13 0x06000000 // System clock /13
  3429. #define SYSCTL_RCC2_SYSDIV2_14 0x06800000 // System clock /14
  3430. #define SYSCTL_RCC2_SYSDIV2_15 0x07000000 // System clock /15
  3431. #define SYSCTL_RCC2_SYSDIV2_16 0x07800000 // System clock /16
  3432. #define SYSCTL_RCC2_SYSDIV2_17 0x08000000 // System clock /17
  3433. #define SYSCTL_RCC2_SYSDIV2_18 0x08800000 // System clock /18
  3434. #define SYSCTL_RCC2_SYSDIV2_19 0x09000000 // System clock /19
  3435. #define SYSCTL_RCC2_SYSDIV2_20 0x09800000 // System clock /20
  3436. #define SYSCTL_RCC2_SYSDIV2_21 0x0A000000 // System clock /21
  3437. #define SYSCTL_RCC2_SYSDIV2_22 0x0A800000 // System clock /22
  3438. #define SYSCTL_RCC2_SYSDIV2_23 0x0B000000 // System clock /23
  3439. #define SYSCTL_RCC2_SYSDIV2_24 0x0B800000 // System clock /24
  3440. #define SYSCTL_RCC2_SYSDIV2_25 0x0C000000 // System clock /25
  3441. #define SYSCTL_RCC2_SYSDIV2_26 0x0C800000 // System clock /26
  3442. #define SYSCTL_RCC2_SYSDIV2_27 0x0D000000 // System clock /27
  3443. #define SYSCTL_RCC2_SYSDIV2_28 0x0D800000 // System clock /28
  3444. #define SYSCTL_RCC2_SYSDIV2_29 0x0E000000 // System clock /29
  3445. #define SYSCTL_RCC2_SYSDIV2_30 0x0E800000 // System clock /30
  3446. #define SYSCTL_RCC2_SYSDIV2_31 0x0F000000 // System clock /31
  3447. #define SYSCTL_RCC2_SYSDIV2_32 0x0F800000 // System clock /32
  3448. #define SYSCTL_RCC2_SYSDIV2_33 0x10000000 // System clock /33
  3449. #define SYSCTL_RCC2_SYSDIV2_34 0x10800000 // System clock /34
  3450. #define SYSCTL_RCC2_SYSDIV2_35 0x11000000 // System clock /35
  3451. #define SYSCTL_RCC2_SYSDIV2_36 0x11800000 // System clock /36
  3452. #define SYSCTL_RCC2_SYSDIV2_37 0x12000000 // System clock /37
  3453. #define SYSCTL_RCC2_SYSDIV2_38 0x12800000 // System clock /38
  3454. #define SYSCTL_RCC2_SYSDIV2_39 0x13000000 // System clock /39
  3455. #define SYSCTL_RCC2_SYSDIV2_40 0x13800000 // System clock /40
  3456. #define SYSCTL_RCC2_SYSDIV2_41 0x14000000 // System clock /41
  3457. #define SYSCTL_RCC2_SYSDIV2_42 0x14800000 // System clock /42
  3458. #define SYSCTL_RCC2_SYSDIV2_43 0x15000000 // System clock /43
  3459. #define SYSCTL_RCC2_SYSDIV2_44 0x15800000 // System clock /44
  3460. #define SYSCTL_RCC2_SYSDIV2_45 0x16000000 // System clock /45
  3461. #define SYSCTL_RCC2_SYSDIV2_46 0x16800000 // System clock /46
  3462. #define SYSCTL_RCC2_SYSDIV2_47 0x17000000 // System clock /47
  3463. #define SYSCTL_RCC2_SYSDIV2_48 0x17800000 // System clock /48
  3464. #define SYSCTL_RCC2_SYSDIV2_49 0x18000000 // System clock /49
  3465. #define SYSCTL_RCC2_SYSDIV2_50 0x18800000 // System clock /50
  3466. #define SYSCTL_RCC2_SYSDIV2_51 0x19000000 // System clock /51
  3467. #define SYSCTL_RCC2_SYSDIV2_52 0x19800000 // System clock /52
  3468. #define SYSCTL_RCC2_SYSDIV2_53 0x1A000000 // System clock /53
  3469. #define SYSCTL_RCC2_SYSDIV2_54 0x1A800000 // System clock /54
  3470. #define SYSCTL_RCC2_SYSDIV2_55 0x1B000000 // System clock /55
  3471. #define SYSCTL_RCC2_SYSDIV2_56 0x1B800000 // System clock /56
  3472. #define SYSCTL_RCC2_SYSDIV2_57 0x1C000000 // System clock /57
  3473. #define SYSCTL_RCC2_SYSDIV2_58 0x1C800000 // System clock /58
  3474. #define SYSCTL_RCC2_SYSDIV2_59 0x1D000000 // System clock /59
  3475. #define SYSCTL_RCC2_SYSDIV2_60 0x1D800000 // System clock /60
  3476. #define SYSCTL_RCC2_SYSDIV2_61 0x1E000000 // System clock /61
  3477. #define SYSCTL_RCC2_SYSDIV2_62 0x1E800000 // System clock /62
  3478. #define SYSCTL_RCC2_SYSDIV2_63 0x1F000000 // System clock /63
  3479. #define SYSCTL_RCC2_SYSDIV2_64 0x1F800000 // System clock /64
  3480. #define SYSCTL_RCC2_PWRDN2 0x00002000 // Power-Down PLL 2
  3481. #define SYSCTL_RCC2_BYPASS2 0x00000800 // PLL Bypass 2
  3482. #define SYSCTL_RCC2_OSCSRC2_M 0x00000070 // Oscillator Source 2
  3483. #define SYSCTL_RCC2_OSCSRC2_MO 0x00000000 // MOSC
  3484. #define SYSCTL_RCC2_OSCSRC2_IO 0x00000010 // PIOSC
  3485. #define SYSCTL_RCC2_OSCSRC2_IO4 0x00000020 // PIOSC/4
  3486. #define SYSCTL_RCC2_OSCSRC2_30 0x00000030 // 30 kHz
  3487. #define SYSCTL_RCC2_OSCSRC2_32 0x00000070 // 32.768 kHz
  3488. #define SYSCTL_RCC2_SYSDIV2_S 23
  3489. //*****************************************************************************
  3490. //
  3491. // The following are defines for the bit fields in the SYSCTL_RCGC0 register.
  3492. //
  3493. //*****************************************************************************
  3494. #define SYSCTL_RCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control
  3495. #define SYSCTL_RCGC0_PWM 0x00100000 // PWM Clock Gating Control
  3496. #define SYSCTL_RCGC0_ADC 0x00010000 // ADC0 Clock Gating Control
  3497. #define SYSCTL_RCGC0_ADCSPD_M 0x00000300 // ADC Sample Speed
  3498. #define SYSCTL_RCGC0_ADCSPD125K 0x00000000 // 125K samples/second
  3499. #define SYSCTL_RCGC0_ADCSPD250K 0x00000100 // 250K samples/second
  3500. #define SYSCTL_RCGC0_ADCSPD500K 0x00000200 // 500K samples/second
  3501. #define SYSCTL_RCGC0_HIB 0x00000040 // HIB Clock Gating Control
  3502. #define SYSCTL_RCGC0_WDT 0x00000008 // WDT Clock Gating Control
  3503. //*****************************************************************************
  3504. //
  3505. // The following are defines for the bit fields in the SYSCTL_RCGC1 register.
  3506. //
  3507. //*****************************************************************************
  3508. #define SYSCTL_RCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating
  3509. #define SYSCTL_RCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control
  3510. #define SYSCTL_RCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control
  3511. #define SYSCTL_RCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control
  3512. #define SYSCTL_RCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control
  3513. #define SYSCTL_RCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control
  3514. #define SYSCTL_RCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control
  3515. #define SYSCTL_RCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control
  3516. #define SYSCTL_RCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control
  3517. #define SYSCTL_RCGC1_UART1 0x00000002 // UART1 Clock Gating Control
  3518. #define SYSCTL_RCGC1_UART0 0x00000001 // UART0 Clock Gating Control
  3519. //*****************************************************************************
  3520. //
  3521. // The following are defines for the bit fields in the SYSCTL_RCGC2 register.
  3522. //
  3523. //*****************************************************************************
  3524. #define SYSCTL_RCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control
  3525. #define SYSCTL_RCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control
  3526. #define SYSCTL_RCGC2_GPIOG 0x00000040 // Port G Clock Gating Control
  3527. #define SYSCTL_RCGC2_GPIOF 0x00000020 // Port F Clock Gating Control
  3528. #define SYSCTL_RCGC2_GPIOE 0x00000010 // Port E Clock Gating Control
  3529. #define SYSCTL_RCGC2_GPIOD 0x00000008 // Port D Clock Gating Control
  3530. #define SYSCTL_RCGC2_GPIOC 0x00000004 // Port C Clock Gating Control
  3531. #define SYSCTL_RCGC2_GPIOB 0x00000002 // Port B Clock Gating Control
  3532. #define SYSCTL_RCGC2_GPIOA 0x00000001 // Port A Clock Gating Control
  3533. //*****************************************************************************
  3534. //
  3535. // The following are defines for the bit fields in the SYSCTL_SCGC0 register.
  3536. //
  3537. //*****************************************************************************
  3538. #define SYSCTL_SCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control
  3539. #define SYSCTL_SCGC0_PWM 0x00100000 // PWM Clock Gating Control
  3540. #define SYSCTL_SCGC0_ADC 0x00010000 // ADC0 Clock Gating Control
  3541. #define SYSCTL_SCGC0_ADCSPD_M 0x00000300 // ADC Sample Speed
  3542. #define SYSCTL_SCGC0_ADCSPD125K 0x00000000 // 125K samples/second
  3543. #define SYSCTL_SCGC0_ADCSPD250K 0x00000100 // 250K samples/second
  3544. #define SYSCTL_SCGC0_ADCSPD500K 0x00000200 // 500K samples/second
  3545. #define SYSCTL_SCGC0_HIB 0x00000040 // HIB Clock Gating Control
  3546. #define SYSCTL_SCGC0_WDT 0x00000008 // WDT Clock Gating Control
  3547. //*****************************************************************************
  3548. //
  3549. // The following are defines for the bit fields in the SYSCTL_SCGC1 register.
  3550. //
  3551. //*****************************************************************************
  3552. #define SYSCTL_SCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating
  3553. #define SYSCTL_SCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control
  3554. #define SYSCTL_SCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control
  3555. #define SYSCTL_SCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control
  3556. #define SYSCTL_SCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control
  3557. #define SYSCTL_SCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control
  3558. #define SYSCTL_SCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control
  3559. #define SYSCTL_SCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control
  3560. #define SYSCTL_SCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control
  3561. #define SYSCTL_SCGC1_UART1 0x00000002 // UART1 Clock Gating Control
  3562. #define SYSCTL_SCGC1_UART0 0x00000001 // UART0 Clock Gating Control
  3563. //*****************************************************************************
  3564. //
  3565. // The following are defines for the bit fields in the SYSCTL_SCGC2 register.
  3566. //
  3567. //*****************************************************************************
  3568. #define SYSCTL_SCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control
  3569. #define SYSCTL_SCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control
  3570. #define SYSCTL_SCGC2_GPIOG 0x00000040 // Port G Clock Gating Control
  3571. #define SYSCTL_SCGC2_GPIOF 0x00000020 // Port F Clock Gating Control
  3572. #define SYSCTL_SCGC2_GPIOE 0x00000010 // Port E Clock Gating Control
  3573. #define SYSCTL_SCGC2_GPIOD 0x00000008 // Port D Clock Gating Control
  3574. #define SYSCTL_SCGC2_GPIOC 0x00000004 // Port C Clock Gating Control
  3575. #define SYSCTL_SCGC2_GPIOB 0x00000002 // Port B Clock Gating Control
  3576. #define SYSCTL_SCGC2_GPIOA 0x00000001 // Port A Clock Gating Control
  3577. //*****************************************************************************
  3578. //
  3579. // The following are defines for the bit fields in the SYSCTL_DCGC0 register.
  3580. //
  3581. //*****************************************************************************
  3582. #define SYSCTL_DCGC0_CAN0 0x01000000 // CAN0 Clock Gating Control
  3583. #define SYSCTL_DCGC0_PWM 0x00100000 // PWM Clock Gating Control
  3584. #define SYSCTL_DCGC0_ADC 0x00010000 // ADC0 Clock Gating Control
  3585. #define SYSCTL_DCGC0_HIB 0x00000040 // HIB Clock Gating Control
  3586. #define SYSCTL_DCGC0_WDT 0x00000008 // WDT Clock Gating Control
  3587. //*****************************************************************************
  3588. //
  3589. // The following are defines for the bit fields in the SYSCTL_DCGC1 register.
  3590. //
  3591. //*****************************************************************************
  3592. #define SYSCTL_DCGC1_COMP0 0x01000000 // Analog Comparator 0 Clock Gating
  3593. #define SYSCTL_DCGC1_TIMER3 0x00080000 // Timer 3 Clock Gating Control
  3594. #define SYSCTL_DCGC1_TIMER2 0x00040000 // Timer 2 Clock Gating Control
  3595. #define SYSCTL_DCGC1_TIMER1 0x00020000 // Timer 1 Clock Gating Control
  3596. #define SYSCTL_DCGC1_TIMER0 0x00010000 // Timer 0 Clock Gating Control
  3597. #define SYSCTL_DCGC1_I2C0 0x00001000 // I2C0 Clock Gating Control
  3598. #define SYSCTL_DCGC1_QEI1 0x00000200 // QEI1 Clock Gating Control
  3599. #define SYSCTL_DCGC1_QEI0 0x00000100 // QEI0 Clock Gating Control
  3600. #define SYSCTL_DCGC1_SSI0 0x00000010 // SSI0 Clock Gating Control
  3601. #define SYSCTL_DCGC1_UART1 0x00000002 // UART1 Clock Gating Control
  3602. #define SYSCTL_DCGC1_UART0 0x00000001 // UART0 Clock Gating Control
  3603. //*****************************************************************************
  3604. //
  3605. // The following are defines for the bit fields in the SYSCTL_DCGC2 register.
  3606. //
  3607. //*****************************************************************************
  3608. #define SYSCTL_DCGC2_EPHY0 0x40000000 // PHY0 Clock Gating Control
  3609. #define SYSCTL_DCGC2_EMAC0 0x10000000 // MAC0 Clock Gating Control
  3610. #define SYSCTL_DCGC2_GPIOG 0x00000040 // Port G Clock Gating Control
  3611. #define SYSCTL_DCGC2_GPIOF 0x00000020 // Port F Clock Gating Control
  3612. #define SYSCTL_DCGC2_GPIOE 0x00000010 // Port E Clock Gating Control
  3613. #define SYSCTL_DCGC2_GPIOD 0x00000008 // Port D Clock Gating Control
  3614. #define SYSCTL_DCGC2_GPIOC 0x00000004 // Port C Clock Gating Control
  3615. #define SYSCTL_DCGC2_GPIOB 0x00000002 // Port B Clock Gating Control
  3616. #define SYSCTL_DCGC2_GPIOA 0x00000001 // Port A Clock Gating Control
  3617. //*****************************************************************************
  3618. //
  3619. // The following are defines for the bit fields in the SYSCTL_DSLPCLKCFG
  3620. // register.
  3621. //
  3622. //*****************************************************************************
  3623. #define SYSCTL_DSLPCLKCFG_D_M 0x1F800000 // Divider Field Override
  3624. #define SYSCTL_DSLPCLKCFG_D_1 0x00000000 // System clock /1
  3625. #define SYSCTL_DSLPCLKCFG_D_2 0x00800000 // System clock /2
  3626. #define SYSCTL_DSLPCLKCFG_D_3 0x01000000 // System clock /3
  3627. #define SYSCTL_DSLPCLKCFG_D_4 0x01800000 // System clock /4
  3628. #define SYSCTL_DSLPCLKCFG_D_5 0x02000000 // System clock /5
  3629. #define SYSCTL_DSLPCLKCFG_D_6 0x02800000 // System clock /6
  3630. #define SYSCTL_DSLPCLKCFG_D_7 0x03000000 // System clock /7
  3631. #define SYSCTL_DSLPCLKCFG_D_8 0x03800000 // System clock /8
  3632. #define SYSCTL_DSLPCLKCFG_D_9 0x04000000 // System clock /9
  3633. #define SYSCTL_DSLPCLKCFG_D_10 0x04800000 // System clock /10
  3634. #define SYSCTL_DSLPCLKCFG_D_11 0x05000000 // System clock /11
  3635. #define SYSCTL_DSLPCLKCFG_D_12 0x05800000 // System clock /12
  3636. #define SYSCTL_DSLPCLKCFG_D_13 0x06000000 // System clock /13
  3637. #define SYSCTL_DSLPCLKCFG_D_14 0x06800000 // System clock /14
  3638. #define SYSCTL_DSLPCLKCFG_D_15 0x07000000 // System clock /15
  3639. #define SYSCTL_DSLPCLKCFG_D_16 0x07800000 // System clock /16
  3640. #define SYSCTL_DSLPCLKCFG_D_17 0x08000000 // System clock /17
  3641. #define SYSCTL_DSLPCLKCFG_D_18 0x08800000 // System clock /18
  3642. #define SYSCTL_DSLPCLKCFG_D_19 0x09000000 // System clock /19
  3643. #define SYSCTL_DSLPCLKCFG_D_20 0x09800000 // System clock /20
  3644. #define SYSCTL_DSLPCLKCFG_D_21 0x0A000000 // System clock /21
  3645. #define SYSCTL_DSLPCLKCFG_D_22 0x0A800000 // System clock /22
  3646. #define SYSCTL_DSLPCLKCFG_D_23 0x0B000000 // System clock /23
  3647. #define SYSCTL_DSLPCLKCFG_D_24 0x0B800000 // System clock /24
  3648. #define SYSCTL_DSLPCLKCFG_D_25 0x0C000000 // System clock /25
  3649. #define SYSCTL_DSLPCLKCFG_D_26 0x0C800000 // System clock /26
  3650. #define SYSCTL_DSLPCLKCFG_D_27 0x0D000000 // System clock /27
  3651. #define SYSCTL_DSLPCLKCFG_D_28 0x0D800000 // System clock /28
  3652. #define SYSCTL_DSLPCLKCFG_D_29 0x0E000000 // System clock /29
  3653. #define SYSCTL_DSLPCLKCFG_D_30 0x0E800000 // System clock /30
  3654. #define SYSCTL_DSLPCLKCFG_D_31 0x0F000000 // System clock /31
  3655. #define SYSCTL_DSLPCLKCFG_D_32 0x0F800000 // System clock /32
  3656. #define SYSCTL_DSLPCLKCFG_D_33 0x10000000 // System clock /33
  3657. #define SYSCTL_DSLPCLKCFG_D_34 0x10800000 // System clock /34
  3658. #define SYSCTL_DSLPCLKCFG_D_35 0x11000000 // System clock /35
  3659. #define SYSCTL_DSLPCLKCFG_D_36 0x11800000 // System clock /36
  3660. #define SYSCTL_DSLPCLKCFG_D_37 0x12000000 // System clock /37
  3661. #define SYSCTL_DSLPCLKCFG_D_38 0x12800000 // System clock /38
  3662. #define SYSCTL_DSLPCLKCFG_D_39 0x13000000 // System clock /39
  3663. #define SYSCTL_DSLPCLKCFG_D_40 0x13800000 // System clock /40
  3664. #define SYSCTL_DSLPCLKCFG_D_41 0x14000000 // System clock /41
  3665. #define SYSCTL_DSLPCLKCFG_D_42 0x14800000 // System clock /42
  3666. #define SYSCTL_DSLPCLKCFG_D_43 0x15000000 // System clock /43
  3667. #define SYSCTL_DSLPCLKCFG_D_44 0x15800000 // System clock /44
  3668. #define SYSCTL_DSLPCLKCFG_D_45 0x16000000 // System clock /45
  3669. #define SYSCTL_DSLPCLKCFG_D_46 0x16800000 // System clock /46
  3670. #define SYSCTL_DSLPCLKCFG_D_47 0x17000000 // System clock /47
  3671. #define SYSCTL_DSLPCLKCFG_D_48 0x17800000 // System clock /48
  3672. #define SYSCTL_DSLPCLKCFG_D_49 0x18000000 // System clock /49
  3673. #define SYSCTL_DSLPCLKCFG_D_50 0x18800000 // System clock /50
  3674. #define SYSCTL_DSLPCLKCFG_D_51 0x19000000 // System clock /51
  3675. #define SYSCTL_DSLPCLKCFG_D_52 0x19800000 // System clock /52
  3676. #define SYSCTL_DSLPCLKCFG_D_53 0x1A000000 // System clock /53
  3677. #define SYSCTL_DSLPCLKCFG_D_54 0x1A800000 // System clock /54
  3678. #define SYSCTL_DSLPCLKCFG_D_55 0x1B000000 // System clock /55
  3679. #define SYSCTL_DSLPCLKCFG_D_56 0x1B800000 // System clock /56
  3680. #define SYSCTL_DSLPCLKCFG_D_57 0x1C000000 // System clock /57
  3681. #define SYSCTL_DSLPCLKCFG_D_58 0x1C800000 // System clock /58
  3682. #define SYSCTL_DSLPCLKCFG_D_59 0x1D000000 // System clock /59
  3683. #define SYSCTL_DSLPCLKCFG_D_60 0x1D800000 // System clock /60
  3684. #define SYSCTL_DSLPCLKCFG_D_61 0x1E000000 // System clock /61
  3685. #define SYSCTL_DSLPCLKCFG_D_62 0x1E800000 // System clock /62
  3686. #define SYSCTL_DSLPCLKCFG_D_63 0x1F000000 // System clock /63
  3687. #define SYSCTL_DSLPCLKCFG_D_64 0x1F800000 // System clock /64
  3688. #define SYSCTL_DSLPCLKCFG_O_M 0x00000070 // Clock Source
  3689. #define SYSCTL_DSLPCLKCFG_O_IGN 0x00000000 // MOSC
  3690. #define SYSCTL_DSLPCLKCFG_O_IO 0x00000010 // PIOSC
  3691. #define SYSCTL_DSLPCLKCFG_O_30 0x00000030 // 30 kHz
  3692. #define SYSCTL_DSLPCLKCFG_O_32 0x00000070 // 32.768 kHz
  3693. #define SYSCTL_DSLPCLKCFG_D_S 23
  3694. //*****************************************************************************
  3695. //
  3696. // The following are defines for the bit fields in the NVIC_INT_TYPE register.
  3697. //
  3698. //*****************************************************************************
  3699. #define NVIC_INT_TYPE_LINES_M 0x0000001F // Number of interrupt lines (x32)
  3700. #define NVIC_INT_TYPE_LINES_S 0
  3701. //*****************************************************************************
  3702. //
  3703. // The following are defines for the bit fields in the NVIC_ST_CTRL register.
  3704. //
  3705. //*****************************************************************************
  3706. #define NVIC_ST_CTRL_COUNT 0x00010000 // Count flag
  3707. #define NVIC_ST_CTRL_CLK_SRC 0x00000004 // Clock Source
  3708. #define NVIC_ST_CTRL_INTEN 0x00000002 // Interrupt enable
  3709. #define NVIC_ST_CTRL_ENABLE 0x00000001 // Counter mode
  3710. //*****************************************************************************
  3711. //
  3712. // The following are defines for the bit fields in the NVIC_ST_RELOAD register.
  3713. //
  3714. //*****************************************************************************
  3715. #define NVIC_ST_RELOAD_M 0x00FFFFFF // Counter load value
  3716. #define NVIC_ST_RELOAD_S 0
  3717. //*****************************************************************************
  3718. //
  3719. // The following are defines for the bit fields in the NVIC_ST_CURRENT
  3720. // register.
  3721. //
  3722. //*****************************************************************************
  3723. #define NVIC_ST_CURRENT_M 0x00FFFFFF // Counter current value
  3724. #define NVIC_ST_CURRENT_S 0
  3725. //*****************************************************************************
  3726. //
  3727. // The following are defines for the bit fields in the NVIC_ST_CAL register.
  3728. //
  3729. //*****************************************************************************
  3730. #define NVIC_ST_CAL_NOREF 0x80000000 // No reference clock
  3731. #define NVIC_ST_CAL_SKEW 0x40000000 // Clock skew
  3732. #define NVIC_ST_CAL_ONEMS_M 0x00FFFFFF // 1ms reference value
  3733. #define NVIC_ST_CAL_ONEMS_S 0
  3734. //*****************************************************************************
  3735. //
  3736. // The following are defines for the bit fields in the NVIC_EN0 register.
  3737. //
  3738. //*****************************************************************************
  3739. #define NVIC_EN0_INT31 0x80000000 // Interrupt 31 enable
  3740. #define NVIC_EN0_INT30 0x40000000 // Interrupt 30 enable
  3741. #define NVIC_EN0_INT29 0x20000000 // Interrupt 29 enable
  3742. #define NVIC_EN0_INT28 0x10000000 // Interrupt 28 enable
  3743. #define NVIC_EN0_INT27 0x08000000 // Interrupt 27 enable
  3744. #define NVIC_EN0_INT26 0x04000000 // Interrupt 26 enable
  3745. #define NVIC_EN0_INT25 0x02000000 // Interrupt 25 enable
  3746. #define NVIC_EN0_INT24 0x01000000 // Interrupt 24 enable
  3747. #define NVIC_EN0_INT23 0x00800000 // Interrupt 23 enable
  3748. #define NVIC_EN0_INT22 0x00400000 // Interrupt 22 enable
  3749. #define NVIC_EN0_INT21 0x00200000 // Interrupt 21 enable
  3750. #define NVIC_EN0_INT20 0x00100000 // Interrupt 20 enable
  3751. #define NVIC_EN0_INT19 0x00080000 // Interrupt 19 enable
  3752. #define NVIC_EN0_INT18 0x00040000 // Interrupt 18 enable
  3753. #define NVIC_EN0_INT17 0x00020000 // Interrupt 17 enable
  3754. #define NVIC_EN0_INT16 0x00010000 // Interrupt 16 enable
  3755. #define NVIC_EN0_INT15 0x00008000 // Interrupt 15 enable
  3756. #define NVIC_EN0_INT14 0x00004000 // Interrupt 14 enable
  3757. #define NVIC_EN0_INT13 0x00002000 // Interrupt 13 enable
  3758. #define NVIC_EN0_INT12 0x00001000 // Interrupt 12 enable
  3759. #define NVIC_EN0_INT11 0x00000800 // Interrupt 11 enable
  3760. #define NVIC_EN0_INT10 0x00000400 // Interrupt 10 enable
  3761. #define NVIC_EN0_INT9 0x00000200 // Interrupt 9 enable
  3762. #define NVIC_EN0_INT8 0x00000100 // Interrupt 8 enable
  3763. #define NVIC_EN0_INT7 0x00000080 // Interrupt 7 enable
  3764. #define NVIC_EN0_INT6 0x00000040 // Interrupt 6 enable
  3765. #define NVIC_EN0_INT5 0x00000020 // Interrupt 5 enable
  3766. #define NVIC_EN0_INT4 0x00000010 // Interrupt 4 enable
  3767. #define NVIC_EN0_INT3 0x00000008 // Interrupt 3 enable
  3768. #define NVIC_EN0_INT2 0x00000004 // Interrupt 2 enable
  3769. #define NVIC_EN0_INT1 0x00000002 // Interrupt 1 enable
  3770. #define NVIC_EN0_INT0 0x00000001 // Interrupt 0 enable
  3771. //*****************************************************************************
  3772. //
  3773. // The following are defines for the bit fields in the NVIC_EN1 register.
  3774. //
  3775. //*****************************************************************************
  3776. #define NVIC_EN1_INT59 0x08000000 // Interrupt 59 enable
  3777. #define NVIC_EN1_INT58 0x04000000 // Interrupt 58 enable
  3778. #define NVIC_EN1_INT57 0x02000000 // Interrupt 57 enable
  3779. #define NVIC_EN1_INT56 0x01000000 // Interrupt 56 enable
  3780. #define NVIC_EN1_INT55 0x00800000 // Interrupt 55 enable
  3781. #define NVIC_EN1_INT54 0x00400000 // Interrupt 54 enable
  3782. #define NVIC_EN1_INT53 0x00200000 // Interrupt 53 enable
  3783. #define NVIC_EN1_INT52 0x00100000 // Interrupt 52 enable
  3784. #define NVIC_EN1_INT51 0x00080000 // Interrupt 51 enable
  3785. #define NVIC_EN1_INT50 0x00040000 // Interrupt 50 enable
  3786. #define NVIC_EN1_INT49 0x00020000 // Interrupt 49 enable
  3787. #define NVIC_EN1_INT48 0x00010000 // Interrupt 48 enable
  3788. #define NVIC_EN1_INT47 0x00008000 // Interrupt 47 enable
  3789. #define NVIC_EN1_INT46 0x00004000 // Interrupt 46 enable
  3790. #define NVIC_EN1_INT45 0x00002000 // Interrupt 45 enable
  3791. #define NVIC_EN1_INT44 0x00001000 // Interrupt 44 enable
  3792. #define NVIC_EN1_INT43 0x00000800 // Interrupt 43 enable
  3793. #define NVIC_EN1_INT42 0x00000400 // Interrupt 42 enable
  3794. #define NVIC_EN1_INT41 0x00000200 // Interrupt 41 enable
  3795. #define NVIC_EN1_INT40 0x00000100 // Interrupt 40 enable
  3796. #define NVIC_EN1_INT39 0x00000080 // Interrupt 39 enable
  3797. #define NVIC_EN1_INT38 0x00000040 // Interrupt 38 enable
  3798. #define NVIC_EN1_INT37 0x00000020 // Interrupt 37 enable
  3799. #define NVIC_EN1_INT36 0x00000010 // Interrupt 36 enable
  3800. #define NVIC_EN1_INT35 0x00000008 // Interrupt 35 enable
  3801. #define NVIC_EN1_INT34 0x00000004 // Interrupt 34 enable
  3802. #define NVIC_EN1_INT33 0x00000002 // Interrupt 33 enable
  3803. #define NVIC_EN1_INT32 0x00000001 // Interrupt 32 enable
  3804. //*****************************************************************************
  3805. //
  3806. // The following are defines for the bit fields in the NVIC_DIS0 register.
  3807. //
  3808. //*****************************************************************************
  3809. #define NVIC_DIS0_INT31 0x80000000 // Interrupt 31 disable
  3810. #define NVIC_DIS0_INT30 0x40000000 // Interrupt 30 disable
  3811. #define NVIC_DIS0_INT29 0x20000000 // Interrupt 29 disable
  3812. #define NVIC_DIS0_INT28 0x10000000 // Interrupt 28 disable
  3813. #define NVIC_DIS0_INT27 0x08000000 // Interrupt 27 disable
  3814. #define NVIC_DIS0_INT26 0x04000000 // Interrupt 26 disable
  3815. #define NVIC_DIS0_INT25 0x02000000 // Interrupt 25 disable
  3816. #define NVIC_DIS0_INT24 0x01000000 // Interrupt 24 disable
  3817. #define NVIC_DIS0_INT23 0x00800000 // Interrupt 23 disable
  3818. #define NVIC_DIS0_INT22 0x00400000 // Interrupt 22 disable
  3819. #define NVIC_DIS0_INT21 0x00200000 // Interrupt 21 disable
  3820. #define NVIC_DIS0_INT20 0x00100000 // Interrupt 20 disable
  3821. #define NVIC_DIS0_INT19 0x00080000 // Interrupt 19 disable
  3822. #define NVIC_DIS0_INT18 0x00040000 // Interrupt 18 disable
  3823. #define NVIC_DIS0_INT17 0x00020000 // Interrupt 17 disable
  3824. #define NVIC_DIS0_INT16 0x00010000 // Interrupt 16 disable
  3825. #define NVIC_DIS0_INT15 0x00008000 // Interrupt 15 disable
  3826. #define NVIC_DIS0_INT14 0x00004000 // Interrupt 14 disable
  3827. #define NVIC_DIS0_INT13 0x00002000 // Interrupt 13 disable
  3828. #define NVIC_DIS0_INT12 0x00001000 // Interrupt 12 disable
  3829. #define NVIC_DIS0_INT11 0x00000800 // Interrupt 11 disable
  3830. #define NVIC_DIS0_INT10 0x00000400 // Interrupt 10 disable
  3831. #define NVIC_DIS0_INT9 0x00000200 // Interrupt 9 disable
  3832. #define NVIC_DIS0_INT8 0x00000100 // Interrupt 8 disable
  3833. #define NVIC_DIS0_INT7 0x00000080 // Interrupt 7 disable
  3834. #define NVIC_DIS0_INT6 0x00000040 // Interrupt 6 disable
  3835. #define NVIC_DIS0_INT5 0x00000020 // Interrupt 5 disable
  3836. #define NVIC_DIS0_INT4 0x00000010 // Interrupt 4 disable
  3837. #define NVIC_DIS0_INT3 0x00000008 // Interrupt 3 disable
  3838. #define NVIC_DIS0_INT2 0x00000004 // Interrupt 2 disable
  3839. #define NVIC_DIS0_INT1 0x00000002 // Interrupt 1 disable
  3840. #define NVIC_DIS0_INT0 0x00000001 // Interrupt 0 disable
  3841. //*****************************************************************************
  3842. //
  3843. // The following are defines for the bit fields in the NVIC_DIS1 register.
  3844. //
  3845. //*****************************************************************************
  3846. #define NVIC_DIS1_INT59 0x08000000 // Interrupt 59 disable
  3847. #define NVIC_DIS1_INT58 0x04000000 // Interrupt 58 disable
  3848. #define NVIC_DIS1_INT57 0x02000000 // Interrupt 57 disable
  3849. #define NVIC_DIS1_INT56 0x01000000 // Interrupt 56 disable
  3850. #define NVIC_DIS1_INT55 0x00800000 // Interrupt 55 disable
  3851. #define NVIC_DIS1_INT54 0x00400000 // Interrupt 54 disable
  3852. #define NVIC_DIS1_INT53 0x00200000 // Interrupt 53 disable
  3853. #define NVIC_DIS1_INT52 0x00100000 // Interrupt 52 disable
  3854. #define NVIC_DIS1_INT51 0x00080000 // Interrupt 51 disable
  3855. #define NVIC_DIS1_INT50 0x00040000 // Interrupt 50 disable
  3856. #define NVIC_DIS1_INT49 0x00020000 // Interrupt 49 disable
  3857. #define NVIC_DIS1_INT48 0x00010000 // Interrupt 48 disable
  3858. #define NVIC_DIS1_INT47 0x00008000 // Interrupt 47 disable
  3859. #define NVIC_DIS1_INT46 0x00004000 // Interrupt 46 disable
  3860. #define NVIC_DIS1_INT45 0x00002000 // Interrupt 45 disable
  3861. #define NVIC_DIS1_INT44 0x00001000 // Interrupt 44 disable
  3862. #define NVIC_DIS1_INT43 0x00000800 // Interrupt 43 disable
  3863. #define NVIC_DIS1_INT42 0x00000400 // Interrupt 42 disable
  3864. #define NVIC_DIS1_INT41 0x00000200 // Interrupt 41 disable
  3865. #define NVIC_DIS1_INT40 0x00000100 // Interrupt 40 disable
  3866. #define NVIC_DIS1_INT39 0x00000080 // Interrupt 39 disable
  3867. #define NVIC_DIS1_INT38 0x00000040 // Interrupt 38 disable
  3868. #define NVIC_DIS1_INT37 0x00000020 // Interrupt 37 disable
  3869. #define NVIC_DIS1_INT36 0x00000010 // Interrupt 36 disable
  3870. #define NVIC_DIS1_INT35 0x00000008 // Interrupt 35 disable
  3871. #define NVIC_DIS1_INT34 0x00000004 // Interrupt 34 disable
  3872. #define NVIC_DIS1_INT33 0x00000002 // Interrupt 33 disable
  3873. #define NVIC_DIS1_INT32 0x00000001 // Interrupt 32 disable
  3874. //*****************************************************************************
  3875. //
  3876. // The following are defines for the bit fields in the NVIC_PEND0 register.
  3877. //
  3878. //*****************************************************************************
  3879. #define NVIC_PEND0_INT31 0x80000000 // Interrupt 31 pend
  3880. #define NVIC_PEND0_INT30 0x40000000 // Interrupt 30 pend
  3881. #define NVIC_PEND0_INT29 0x20000000 // Interrupt 29 pend
  3882. #define NVIC_PEND0_INT28 0x10000000 // Interrupt 28 pend
  3883. #define NVIC_PEND0_INT27 0x08000000 // Interrupt 27 pend
  3884. #define NVIC_PEND0_INT26 0x04000000 // Interrupt 26 pend
  3885. #define NVIC_PEND0_INT25 0x02000000 // Interrupt 25 pend
  3886. #define NVIC_PEND0_INT24 0x01000000 // Interrupt 24 pend
  3887. #define NVIC_PEND0_INT23 0x00800000 // Interrupt 23 pend
  3888. #define NVIC_PEND0_INT22 0x00400000 // Interrupt 22 pend
  3889. #define NVIC_PEND0_INT21 0x00200000 // Interrupt 21 pend
  3890. #define NVIC_PEND0_INT20 0x00100000 // Interrupt 20 pend
  3891. #define NVIC_PEND0_INT19 0x00080000 // Interrupt 19 pend
  3892. #define NVIC_PEND0_INT18 0x00040000 // Interrupt 18 pend
  3893. #define NVIC_PEND0_INT17 0x00020000 // Interrupt 17 pend
  3894. #define NVIC_PEND0_INT16 0x00010000 // Interrupt 16 pend
  3895. #define NVIC_PEND0_INT15 0x00008000 // Interrupt 15 pend
  3896. #define NVIC_PEND0_INT14 0x00004000 // Interrupt 14 pend
  3897. #define NVIC_PEND0_INT13 0x00002000 // Interrupt 13 pend
  3898. #define NVIC_PEND0_INT12 0x00001000 // Interrupt 12 pend
  3899. #define NVIC_PEND0_INT11 0x00000800 // Interrupt 11 pend
  3900. #define NVIC_PEND0_INT10 0x00000400 // Interrupt 10 pend
  3901. #define NVIC_PEND0_INT9 0x00000200 // Interrupt 9 pend
  3902. #define NVIC_PEND0_INT8 0x00000100 // Interrupt 8 pend
  3903. #define NVIC_PEND0_INT7 0x00000080 // Interrupt 7 pend
  3904. #define NVIC_PEND0_INT6 0x00000040 // Interrupt 6 pend
  3905. #define NVIC_PEND0_INT5 0x00000020 // Interrupt 5 pend
  3906. #define NVIC_PEND0_INT4 0x00000010 // Interrupt 4 pend
  3907. #define NVIC_PEND0_INT3 0x00000008 // Interrupt 3 pend
  3908. #define NVIC_PEND0_INT2 0x00000004 // Interrupt 2 pend
  3909. #define NVIC_PEND0_INT1 0x00000002 // Interrupt 1 pend
  3910. #define NVIC_PEND0_INT0 0x00000001 // Interrupt 0 pend
  3911. //*****************************************************************************
  3912. //
  3913. // The following are defines for the bit fields in the NVIC_PEND1 register.
  3914. //
  3915. //*****************************************************************************
  3916. #define NVIC_PEND1_INT59 0x08000000 // Interrupt 59 pend
  3917. #define NVIC_PEND1_INT58 0x04000000 // Interrupt 58 pend
  3918. #define NVIC_PEND1_INT57 0x02000000 // Interrupt 57 pend
  3919. #define NVIC_PEND1_INT56 0x01000000 // Interrupt 56 pend
  3920. #define NVIC_PEND1_INT55 0x00800000 // Interrupt 55 pend
  3921. #define NVIC_PEND1_INT54 0x00400000 // Interrupt 54 pend
  3922. #define NVIC_PEND1_INT53 0x00200000 // Interrupt 53 pend
  3923. #define NVIC_PEND1_INT52 0x00100000 // Interrupt 52 pend
  3924. #define NVIC_PEND1_INT51 0x00080000 // Interrupt 51 pend
  3925. #define NVIC_PEND1_INT50 0x00040000 // Interrupt 50 pend
  3926. #define NVIC_PEND1_INT49 0x00020000 // Interrupt 49 pend
  3927. #define NVIC_PEND1_INT48 0x00010000 // Interrupt 48 pend
  3928. #define NVIC_PEND1_INT47 0x00008000 // Interrupt 47 pend
  3929. #define NVIC_PEND1_INT46 0x00004000 // Interrupt 46 pend
  3930. #define NVIC_PEND1_INT45 0x00002000 // Interrupt 45 pend
  3931. #define NVIC_PEND1_INT44 0x00001000 // Interrupt 44 pend
  3932. #define NVIC_PEND1_INT43 0x00000800 // Interrupt 43 pend
  3933. #define NVIC_PEND1_INT42 0x00000400 // Interrupt 42 pend
  3934. #define NVIC_PEND1_INT41 0x00000200 // Interrupt 41 pend
  3935. #define NVIC_PEND1_INT40 0x00000100 // Interrupt 40 pend
  3936. #define NVIC_PEND1_INT39 0x00000080 // Interrupt 39 pend
  3937. #define NVIC_PEND1_INT38 0x00000040 // Interrupt 38 pend
  3938. #define NVIC_PEND1_INT37 0x00000020 // Interrupt 37 pend
  3939. #define NVIC_PEND1_INT36 0x00000010 // Interrupt 36 pend
  3940. #define NVIC_PEND1_INT35 0x00000008 // Interrupt 35 pend
  3941. #define NVIC_PEND1_INT34 0x00000004 // Interrupt 34 pend
  3942. #define NVIC_PEND1_INT33 0x00000002 // Interrupt 33 pend
  3943. #define NVIC_PEND1_INT32 0x00000001 // Interrupt 32 pend
  3944. //*****************************************************************************
  3945. //
  3946. // The following are defines for the bit fields in the NVIC_UNPEND0 register.
  3947. //
  3948. //*****************************************************************************
  3949. #define NVIC_UNPEND0_INT31 0x80000000 // Interrupt 31 unpend
  3950. #define NVIC_UNPEND0_INT30 0x40000000 // Interrupt 30 unpend
  3951. #define NVIC_UNPEND0_INT29 0x20000000 // Interrupt 29 unpend
  3952. #define NVIC_UNPEND0_INT28 0x10000000 // Interrupt 28 unpend
  3953. #define NVIC_UNPEND0_INT27 0x08000000 // Interrupt 27 unpend
  3954. #define NVIC_UNPEND0_INT26 0x04000000 // Interrupt 26 unpend
  3955. #define NVIC_UNPEND0_INT25 0x02000000 // Interrupt 25 unpend
  3956. #define NVIC_UNPEND0_INT24 0x01000000 // Interrupt 24 unpend
  3957. #define NVIC_UNPEND0_INT23 0x00800000 // Interrupt 23 unpend
  3958. #define NVIC_UNPEND0_INT22 0x00400000 // Interrupt 22 unpend
  3959. #define NVIC_UNPEND0_INT21 0x00200000 // Interrupt 21 unpend
  3960. #define NVIC_UNPEND0_INT20 0x00100000 // Interrupt 20 unpend
  3961. #define NVIC_UNPEND0_INT19 0x00080000 // Interrupt 19 unpend
  3962. #define NVIC_UNPEND0_INT18 0x00040000 // Interrupt 18 unpend
  3963. #define NVIC_UNPEND0_INT17 0x00020000 // Interrupt 17 unpend
  3964. #define NVIC_UNPEND0_INT16 0x00010000 // Interrupt 16 unpend
  3965. #define NVIC_UNPEND0_INT15 0x00008000 // Interrupt 15 unpend
  3966. #define NVIC_UNPEND0_INT14 0x00004000 // Interrupt 14 unpend
  3967. #define NVIC_UNPEND0_INT13 0x00002000 // Interrupt 13 unpend
  3968. #define NVIC_UNPEND0_INT12 0x00001000 // Interrupt 12 unpend
  3969. #define NVIC_UNPEND0_INT11 0x00000800 // Interrupt 11 unpend
  3970. #define NVIC_UNPEND0_INT10 0x00000400 // Interrupt 10 unpend
  3971. #define NVIC_UNPEND0_INT9 0x00000200 // Interrupt 9 unpend
  3972. #define NVIC_UNPEND0_INT8 0x00000100 // Interrupt 8 unpend
  3973. #define NVIC_UNPEND0_INT7 0x00000080 // Interrupt 7 unpend
  3974. #define NVIC_UNPEND0_INT6 0x00000040 // Interrupt 6 unpend
  3975. #define NVIC_UNPEND0_INT5 0x00000020 // Interrupt 5 unpend
  3976. #define NVIC_UNPEND0_INT4 0x00000010 // Interrupt 4 unpend
  3977. #define NVIC_UNPEND0_INT3 0x00000008 // Interrupt 3 unpend
  3978. #define NVIC_UNPEND0_INT2 0x00000004 // Interrupt 2 unpend
  3979. #define NVIC_UNPEND0_INT1 0x00000002 // Interrupt 1 unpend
  3980. #define NVIC_UNPEND0_INT0 0x00000001 // Interrupt 0 unpend
  3981. //*****************************************************************************
  3982. //
  3983. // The following are defines for the bit fields in the NVIC_UNPEND1 register.
  3984. //
  3985. //*****************************************************************************
  3986. #define NVIC_UNPEND1_INT59 0x08000000 // Interrupt 59 unpend
  3987. #define NVIC_UNPEND1_INT58 0x04000000 // Interrupt 58 unpend
  3988. #define NVIC_UNPEND1_INT57 0x02000000 // Interrupt 57 unpend
  3989. #define NVIC_UNPEND1_INT56 0x01000000 // Interrupt 56 unpend
  3990. #define NVIC_UNPEND1_INT55 0x00800000 // Interrupt 55 unpend
  3991. #define NVIC_UNPEND1_INT54 0x00400000 // Interrupt 54 unpend
  3992. #define NVIC_UNPEND1_INT53 0x00200000 // Interrupt 53 unpend
  3993. #define NVIC_UNPEND1_INT52 0x00100000 // Interrupt 52 unpend
  3994. #define NVIC_UNPEND1_INT51 0x00080000 // Interrupt 51 unpend
  3995. #define NVIC_UNPEND1_INT50 0x00040000 // Interrupt 50 unpend
  3996. #define NVIC_UNPEND1_INT49 0x00020000 // Interrupt 49 unpend
  3997. #define NVIC_UNPEND1_INT48 0x00010000 // Interrupt 48 unpend
  3998. #define NVIC_UNPEND1_INT47 0x00008000 // Interrupt 47 unpend
  3999. #define NVIC_UNPEND1_INT46 0x00004000 // Interrupt 46 unpend
  4000. #define NVIC_UNPEND1_INT45 0x00002000 // Interrupt 45 unpend
  4001. #define NVIC_UNPEND1_INT44 0x00001000 // Interrupt 44 unpend
  4002. #define NVIC_UNPEND1_INT43 0x00000800 // Interrupt 43 unpend
  4003. #define NVIC_UNPEND1_INT42 0x00000400 // Interrupt 42 unpend
  4004. #define NVIC_UNPEND1_INT41 0x00000200 // Interrupt 41 unpend
  4005. #define NVIC_UNPEND1_INT40 0x00000100 // Interrupt 40 unpend
  4006. #define NVIC_UNPEND1_INT39 0x00000080 // Interrupt 39 unpend
  4007. #define NVIC_UNPEND1_INT38 0x00000040 // Interrupt 38 unpend
  4008. #define NVIC_UNPEND1_INT37 0x00000020 // Interrupt 37 unpend
  4009. #define NVIC_UNPEND1_INT36 0x00000010 // Interrupt 36 unpend
  4010. #define NVIC_UNPEND1_INT35 0x00000008 // Interrupt 35 unpend
  4011. #define NVIC_UNPEND1_INT34 0x00000004 // Interrupt 34 unpend
  4012. #define NVIC_UNPEND1_INT33 0x00000002 // Interrupt 33 unpend
  4013. #define NVIC_UNPEND1_INT32 0x00000001 // Interrupt 32 unpend
  4014. //*****************************************************************************
  4015. //
  4016. // The following are defines for the bit fields in the NVIC_ACTIVE0 register.
  4017. //
  4018. //*****************************************************************************
  4019. #define NVIC_ACTIVE0_INT31 0x80000000 // Interrupt 31 active
  4020. #define NVIC_ACTIVE0_INT30 0x40000000 // Interrupt 30 active
  4021. #define NVIC_ACTIVE0_INT29 0x20000000 // Interrupt 29 active
  4022. #define NVIC_ACTIVE0_INT28 0x10000000 // Interrupt 28 active
  4023. #define NVIC_ACTIVE0_INT27 0x08000000 // Interrupt 27 active
  4024. #define NVIC_ACTIVE0_INT26 0x04000000 // Interrupt 26 active
  4025. #define NVIC_ACTIVE0_INT25 0x02000000 // Interrupt 25 active
  4026. #define NVIC_ACTIVE0_INT24 0x01000000 // Interrupt 24 active
  4027. #define NVIC_ACTIVE0_INT23 0x00800000 // Interrupt 23 active
  4028. #define NVIC_ACTIVE0_INT22 0x00400000 // Interrupt 22 active
  4029. #define NVIC_ACTIVE0_INT21 0x00200000 // Interrupt 21 active
  4030. #define NVIC_ACTIVE0_INT20 0x00100000 // Interrupt 20 active
  4031. #define NVIC_ACTIVE0_INT19 0x00080000 // Interrupt 19 active
  4032. #define NVIC_ACTIVE0_INT18 0x00040000 // Interrupt 18 active
  4033. #define NVIC_ACTIVE0_INT17 0x00020000 // Interrupt 17 active
  4034. #define NVIC_ACTIVE0_INT16 0x00010000 // Interrupt 16 active
  4035. #define NVIC_ACTIVE0_INT15 0x00008000 // Interrupt 15 active
  4036. #define NVIC_ACTIVE0_INT14 0x00004000 // Interrupt 14 active
  4037. #define NVIC_ACTIVE0_INT13 0x00002000 // Interrupt 13 active
  4038. #define NVIC_ACTIVE0_INT12 0x00001000 // Interrupt 12 active
  4039. #define NVIC_ACTIVE0_INT11 0x00000800 // Interrupt 11 active
  4040. #define NVIC_ACTIVE0_INT10 0x00000400 // Interrupt 10 active
  4041. #define NVIC_ACTIVE0_INT9 0x00000200 // Interrupt 9 active
  4042. #define NVIC_ACTIVE0_INT8 0x00000100 // Interrupt 8 active
  4043. #define NVIC_ACTIVE0_INT7 0x00000080 // Interrupt 7 active
  4044. #define NVIC_ACTIVE0_INT6 0x00000040 // Interrupt 6 active
  4045. #define NVIC_ACTIVE0_INT5 0x00000020 // Interrupt 5 active
  4046. #define NVIC_ACTIVE0_INT4 0x00000010 // Interrupt 4 active
  4047. #define NVIC_ACTIVE0_INT3 0x00000008 // Interrupt 3 active
  4048. #define NVIC_ACTIVE0_INT2 0x00000004 // Interrupt 2 active
  4049. #define NVIC_ACTIVE0_INT1 0x00000002 // Interrupt 1 active
  4050. #define NVIC_ACTIVE0_INT0 0x00000001 // Interrupt 0 active
  4051. //*****************************************************************************
  4052. //
  4053. // The following are defines for the bit fields in the NVIC_ACTIVE1 register.
  4054. //
  4055. //*****************************************************************************
  4056. #define NVIC_ACTIVE1_INT59 0x08000000 // Interrupt 59 active
  4057. #define NVIC_ACTIVE1_INT58 0x04000000 // Interrupt 58 active
  4058. #define NVIC_ACTIVE1_INT57 0x02000000 // Interrupt 57 active
  4059. #define NVIC_ACTIVE1_INT56 0x01000000 // Interrupt 56 active
  4060. #define NVIC_ACTIVE1_INT55 0x00800000 // Interrupt 55 active
  4061. #define NVIC_ACTIVE1_INT54 0x00400000 // Interrupt 54 active
  4062. #define NVIC_ACTIVE1_INT53 0x00200000 // Interrupt 53 active
  4063. #define NVIC_ACTIVE1_INT52 0x00100000 // Interrupt 52 active
  4064. #define NVIC_ACTIVE1_INT51 0x00080000 // Interrupt 51 active
  4065. #define NVIC_ACTIVE1_INT50 0x00040000 // Interrupt 50 active
  4066. #define NVIC_ACTIVE1_INT49 0x00020000 // Interrupt 49 active
  4067. #define NVIC_ACTIVE1_INT48 0x00010000 // Interrupt 48 active
  4068. #define NVIC_ACTIVE1_INT47 0x00008000 // Interrupt 47 active
  4069. #define NVIC_ACTIVE1_INT46 0x00004000 // Interrupt 46 active
  4070. #define NVIC_ACTIVE1_INT45 0x00002000 // Interrupt 45 active
  4071. #define NVIC_ACTIVE1_INT44 0x00001000 // Interrupt 44 active
  4072. #define NVIC_ACTIVE1_INT43 0x00000800 // Interrupt 43 active
  4073. #define NVIC_ACTIVE1_INT42 0x00000400 // Interrupt 42 active
  4074. #define NVIC_ACTIVE1_INT41 0x00000200 // Interrupt 41 active
  4075. #define NVIC_ACTIVE1_INT40 0x00000100 // Interrupt 40 active
  4076. #define NVIC_ACTIVE1_INT39 0x00000080 // Interrupt 39 active
  4077. #define NVIC_ACTIVE1_INT38 0x00000040 // Interrupt 38 active
  4078. #define NVIC_ACTIVE1_INT37 0x00000020 // Interrupt 37 active
  4079. #define NVIC_ACTIVE1_INT36 0x00000010 // Interrupt 36 active
  4080. #define NVIC_ACTIVE1_INT35 0x00000008 // Interrupt 35 active
  4081. #define NVIC_ACTIVE1_INT34 0x00000004 // Interrupt 34 active
  4082. #define NVIC_ACTIVE1_INT33 0x00000002 // Interrupt 33 active
  4083. #define NVIC_ACTIVE1_INT32 0x00000001 // Interrupt 32 active
  4084. //*****************************************************************************
  4085. //
  4086. // The following are defines for the bit fields in the NVIC_PRI0 register.
  4087. //
  4088. //*****************************************************************************
  4089. #define NVIC_PRI0_INT3_M 0xFF000000 // Interrupt 3 priority mask
  4090. #define NVIC_PRI0_INT2_M 0x00FF0000 // Interrupt 2 priority mask
  4091. #define NVIC_PRI0_INT1_M 0x0000FF00 // Interrupt 1 priority mask
  4092. #define NVIC_PRI0_INT0_M 0x000000FF // Interrupt 0 priority mask
  4093. #define NVIC_PRI0_INT3_S 24
  4094. #define NVIC_PRI0_INT2_S 16
  4095. #define NVIC_PRI0_INT1_S 8
  4096. #define NVIC_PRI0_INT0_S 0
  4097. //*****************************************************************************
  4098. //
  4099. // The following are defines for the bit fields in the NVIC_PRI1 register.
  4100. //
  4101. //*****************************************************************************
  4102. #define NVIC_PRI1_INT7_M 0xFF000000 // Interrupt 7 priority mask
  4103. #define NVIC_PRI1_INT6_M 0x00FF0000 // Interrupt 6 priority mask
  4104. #define NVIC_PRI1_INT5_M 0x0000FF00 // Interrupt 5 priority mask
  4105. #define NVIC_PRI1_INT4_M 0x000000FF // Interrupt 4 priority mask
  4106. #define NVIC_PRI1_INT7_S 24
  4107. #define NVIC_PRI1_INT6_S 16
  4108. #define NVIC_PRI1_INT5_S 8
  4109. #define NVIC_PRI1_INT4_S 0
  4110. //*****************************************************************************
  4111. //
  4112. // The following are defines for the bit fields in the NVIC_PRI2 register.
  4113. //
  4114. //*****************************************************************************
  4115. #define NVIC_PRI2_INT11_M 0xFF000000 // Interrupt 11 priority mask
  4116. #define NVIC_PRI2_INT10_M 0x00FF0000 // Interrupt 10 priority mask
  4117. #define NVIC_PRI2_INT9_M 0x0000FF00 // Interrupt 9 priority mask
  4118. #define NVIC_PRI2_INT8_M 0x000000FF // Interrupt 8 priority mask
  4119. #define NVIC_PRI2_INT11_S 24
  4120. #define NVIC_PRI2_INT10_S 16
  4121. #define NVIC_PRI2_INT9_S 8
  4122. #define NVIC_PRI2_INT8_S 0
  4123. //*****************************************************************************
  4124. //
  4125. // The following are defines for the bit fields in the NVIC_PRI3 register.
  4126. //
  4127. //*****************************************************************************
  4128. #define NVIC_PRI3_INT15_M 0xFF000000 // Interrupt 15 priority mask
  4129. #define NVIC_PRI3_INT14_M 0x00FF0000 // Interrupt 14 priority mask
  4130. #define NVIC_PRI3_INT13_M 0x0000FF00 // Interrupt 13 priority mask
  4131. #define NVIC_PRI3_INT12_M 0x000000FF // Interrupt 12 priority mask
  4132. #define NVIC_PRI3_INT15_S 24
  4133. #define NVIC_PRI3_INT14_S 16
  4134. #define NVIC_PRI3_INT13_S 8
  4135. #define NVIC_PRI3_INT12_S 0
  4136. //*****************************************************************************
  4137. //
  4138. // The following are defines for the bit fields in the NVIC_PRI4 register.
  4139. //
  4140. //*****************************************************************************
  4141. #define NVIC_PRI4_INT19_M 0xFF000000 // Interrupt 19 priority mask
  4142. #define NVIC_PRI4_INT18_M 0x00FF0000 // Interrupt 18 priority mask
  4143. #define NVIC_PRI4_INT17_M 0x0000FF00 // Interrupt 17 priority mask
  4144. #define NVIC_PRI4_INT16_M 0x000000FF // Interrupt 16 priority mask
  4145. #define NVIC_PRI4_INT19_S 24
  4146. #define NVIC_PRI4_INT18_S 16
  4147. #define NVIC_PRI4_INT17_S 8
  4148. #define NVIC_PRI4_INT16_S 0
  4149. //*****************************************************************************
  4150. //
  4151. // The following are defines for the bit fields in the NVIC_PRI5 register.
  4152. //
  4153. //*****************************************************************************
  4154. #define NVIC_PRI5_INT23_M 0xFF000000 // Interrupt 23 priority mask
  4155. #define NVIC_PRI5_INT22_M 0x00FF0000 // Interrupt 22 priority mask
  4156. #define NVIC_PRI5_INT21_M 0x0000FF00 // Interrupt 21 priority mask
  4157. #define NVIC_PRI5_INT20_M 0x000000FF // Interrupt 20 priority mask
  4158. #define NVIC_PRI5_INT23_S 24
  4159. #define NVIC_PRI5_INT22_S 16
  4160. #define NVIC_PRI5_INT21_S 8
  4161. #define NVIC_PRI5_INT20_S 0
  4162. //*****************************************************************************
  4163. //
  4164. // The following are defines for the bit fields in the NVIC_PRI6 register.
  4165. //
  4166. //*****************************************************************************
  4167. #define NVIC_PRI6_INT27_M 0xFF000000 // Interrupt 27 priority mask
  4168. #define NVIC_PRI6_INT26_M 0x00FF0000 // Interrupt 26 priority mask
  4169. #define NVIC_PRI6_INT25_M 0x0000FF00 // Interrupt 25 priority mask
  4170. #define NVIC_PRI6_INT24_M 0x000000FF // Interrupt 24 priority mask
  4171. #define NVIC_PRI6_INT27_S 24
  4172. #define NVIC_PRI6_INT26_S 16
  4173. #define NVIC_PRI6_INT25_S 8
  4174. #define NVIC_PRI6_INT24_S 0
  4175. //*****************************************************************************
  4176. //
  4177. // The following are defines for the bit fields in the NVIC_PRI7 register.
  4178. //
  4179. //*****************************************************************************
  4180. #define NVIC_PRI7_INT31_M 0xFF000000 // Interrupt 31 priority mask
  4181. #define NVIC_PRI7_INT30_M 0x00FF0000 // Interrupt 30 priority mask
  4182. #define NVIC_PRI7_INT29_M 0x0000FF00 // Interrupt 29 priority mask
  4183. #define NVIC_PRI7_INT28_M 0x000000FF // Interrupt 28 priority mask
  4184. #define NVIC_PRI7_INT31_S 24
  4185. #define NVIC_PRI7_INT30_S 16
  4186. #define NVIC_PRI7_INT29_S 8
  4187. #define NVIC_PRI7_INT28_S 0
  4188. //*****************************************************************************
  4189. //
  4190. // The following are defines for the bit fields in the NVIC_PRI8 register.
  4191. //
  4192. //*****************************************************************************
  4193. #define NVIC_PRI8_INT35_M 0xFF000000 // Interrupt 35 priority mask
  4194. #define NVIC_PRI8_INT34_M 0x00FF0000 // Interrupt 34 priority mask
  4195. #define NVIC_PRI8_INT33_M 0x0000FF00 // Interrupt 33 priority mask
  4196. #define NVIC_PRI8_INT32_M 0x000000FF // Interrupt 32 priority mask
  4197. #define NVIC_PRI8_INT35_S 24
  4198. #define NVIC_PRI8_INT34_S 16
  4199. #define NVIC_PRI8_INT33_S 8
  4200. #define NVIC_PRI8_INT32_S 0
  4201. //*****************************************************************************
  4202. //
  4203. // The following are defines for the bit fields in the NVIC_PRI9 register.
  4204. //
  4205. //*****************************************************************************
  4206. #define NVIC_PRI9_INT39_M 0xFF000000 // Interrupt 39 priority mask
  4207. #define NVIC_PRI9_INT38_M 0x00FF0000 // Interrupt 38 priority mask
  4208. #define NVIC_PRI9_INT37_M 0x0000FF00 // Interrupt 37 priority mask
  4209. #define NVIC_PRI9_INT36_M 0x000000FF // Interrupt 36 priority mask
  4210. #define NVIC_PRI9_INT39_S 24
  4211. #define NVIC_PRI9_INT38_S 16
  4212. #define NVIC_PRI9_INT37_S 8
  4213. #define NVIC_PRI9_INT36_S 0
  4214. //*****************************************************************************
  4215. //
  4216. // The following are defines for the bit fields in the NVIC_PRI10 register.
  4217. //
  4218. //*****************************************************************************
  4219. #define NVIC_PRI10_INT43_M 0xFF000000 // Interrupt 43 priority mask
  4220. #define NVIC_PRI10_INT42_M 0x00FF0000 // Interrupt 42 priority mask
  4221. #define NVIC_PRI10_INT41_M 0x0000FF00 // Interrupt 41 priority mask
  4222. #define NVIC_PRI10_INT40_M 0x000000FF // Interrupt 40 priority mask
  4223. #define NVIC_PRI10_INT43_S 24
  4224. #define NVIC_PRI10_INT42_S 16
  4225. #define NVIC_PRI10_INT41_S 8
  4226. #define NVIC_PRI10_INT40_S 0
  4227. //*****************************************************************************
  4228. //
  4229. // The following are defines for the bit fields in the NVIC_CPUID register.
  4230. //
  4231. //*****************************************************************************
  4232. #define NVIC_CPUID_IMP_M 0xFF000000 // Implementer
  4233. #define NVIC_CPUID_VAR_M 0x00F00000 // Variant
  4234. #define NVIC_CPUID_PARTNO_M 0x0000FFF0 // Processor part number
  4235. #define NVIC_CPUID_REV_M 0x0000000F // Revision
  4236. //*****************************************************************************
  4237. //
  4238. // The following are defines for the bit fields in the NVIC_INT_CTRL register.
  4239. //
  4240. //*****************************************************************************
  4241. #define NVIC_INT_CTRL_NMI_SET 0x80000000 // Pend a NMI
  4242. #define NVIC_INT_CTRL_PEND_SV 0x10000000 // Pend a PendSV
  4243. #define NVIC_INT_CTRL_UNPEND_SV 0x08000000 // Unpend a PendSV
  4244. #define NVIC_INT_CTRL_PENDSTSET 0x04000000 // Set pending SysTick interrupt
  4245. #define NVIC_INT_CTRL_PENDSTCLR 0x02000000 // Clear pending SysTick interrupt
  4246. #define NVIC_INT_CTRL_ISR_PRE 0x00800000 // Debug interrupt handling
  4247. #define NVIC_INT_CTRL_ISR_PEND 0x00400000 // Debug interrupt pending
  4248. #define NVIC_INT_CTRL_VEC_PEN_M 0x003FF000 // Highest pending exception
  4249. #define NVIC_INT_CTRL_RET_BASE 0x00000800 // Return to base
  4250. #define NVIC_INT_CTRL_VEC_ACT_M 0x000003FF // Current active exception
  4251. #define NVIC_INT_CTRL_VEC_PEN_S 12
  4252. #define NVIC_INT_CTRL_VEC_ACT_S 0
  4253. //*****************************************************************************
  4254. //
  4255. // The following are defines for the bit fields in the NVIC_VTABLE register.
  4256. //
  4257. //*****************************************************************************
  4258. #define NVIC_VTABLE_BASE 0x20000000 // Vector table base
  4259. #define NVIC_VTABLE_OFFSET_M 0x1FFFFF00 // Vector table offset
  4260. #define NVIC_VTABLE_OFFSET_S 8
  4261. //*****************************************************************************
  4262. //
  4263. // The following are defines for the bit fields in the NVIC_APINT register.
  4264. //
  4265. //*****************************************************************************
  4266. #define NVIC_APINT_VECTKEY_M 0xFFFF0000 // Vector key mask
  4267. #define NVIC_APINT_VECTKEY 0x05FA0000 // Vector key
  4268. #define NVIC_APINT_ENDIANESS 0x00008000 // Data endianess
  4269. #define NVIC_APINT_PRIGROUP_M 0x00000700 // Priority group
  4270. #define NVIC_APINT_PRIGROUP_7_1 0x00000000 // Priority group 7.1 split
  4271. #define NVIC_APINT_PRIGROUP_6_2 0x00000100 // Priority group 6.2 split
  4272. #define NVIC_APINT_PRIGROUP_5_3 0x00000200 // Priority group 5.3 split
  4273. #define NVIC_APINT_PRIGROUP_4_4 0x00000300 // Priority group 4.4 split
  4274. #define NVIC_APINT_PRIGROUP_3_5 0x00000400 // Priority group 3.5 split
  4275. #define NVIC_APINT_PRIGROUP_2_6 0x00000500 // Priority group 2.6 split
  4276. #define NVIC_APINT_PRIGROUP_1_7 0x00000600 // Priority group 1.7 split
  4277. #define NVIC_APINT_PRIGROUP_0_8 0x00000700 // Priority group 0.8 split
  4278. #define NVIC_APINT_SYSRESETREQ 0x00000004 // System reset request
  4279. #define NVIC_APINT_VECT_CLR_ACT 0x00000002 // Clear active NMI/fault info
  4280. #define NVIC_APINT_VECT_RESET 0x00000001 // System reset
  4281. //*****************************************************************************
  4282. //
  4283. // The following are defines for the bit fields in the NVIC_SYS_CTRL register.
  4284. //
  4285. //*****************************************************************************
  4286. #define NVIC_SYS_CTRL_SEVONPEND 0x00000010 // Wakeup on pend
  4287. #define NVIC_SYS_CTRL_SLEEPDEEP 0x00000004 // Deep sleep enable
  4288. #define NVIC_SYS_CTRL_SLEEPEXIT 0x00000002 // Sleep on ISR exit
  4289. //*****************************************************************************
  4290. //
  4291. // The following are defines for the bit fields in the NVIC_CFG_CTRL register.
  4292. //
  4293. //*****************************************************************************
  4294. #define NVIC_CFG_CTRL_BFHFNMIGN 0x00000100 // Ignore bus fault in NMI/fault
  4295. #define NVIC_CFG_CTRL_DIV0 0x00000010 // Trap on divide by 0
  4296. #define NVIC_CFG_CTRL_UNALIGNED 0x00000008 // Trap on unaligned access
  4297. #define NVIC_CFG_CTRL_DEEP_PEND 0x00000004 // Allow deep interrupt trigger
  4298. #define NVIC_CFG_CTRL_MAIN_PEND 0x00000002 // Allow main interrupt trigger
  4299. #define NVIC_CFG_CTRL_BASE_THR 0x00000001 // Thread state control
  4300. //*****************************************************************************
  4301. //
  4302. // The following are defines for the bit fields in the NVIC_SYS_PRI1 register.
  4303. //
  4304. //*****************************************************************************
  4305. #define NVIC_SYS_PRI1_RES_M 0xFF000000 // Priority of reserved handler
  4306. #define NVIC_SYS_PRI1_USAGE_M 0x00FF0000 // Priority of usage fault handler
  4307. #define NVIC_SYS_PRI1_BUS_M 0x0000FF00 // Priority of bus fault handler
  4308. #define NVIC_SYS_PRI1_MEM_M 0x000000FF // Priority of mem manage handler
  4309. #define NVIC_SYS_PRI1_USAGE_S 16
  4310. #define NVIC_SYS_PRI1_BUS_S 8
  4311. #define NVIC_SYS_PRI1_MEM_S 0
  4312. //*****************************************************************************
  4313. //
  4314. // The following are defines for the bit fields in the NVIC_SYS_PRI2 register.
  4315. //
  4316. //*****************************************************************************
  4317. #define NVIC_SYS_PRI2_SVC_M 0xFF000000 // Priority of SVCall handler
  4318. #define NVIC_SYS_PRI2_RES_M 0x00FFFFFF // Priority of reserved handlers
  4319. #define NVIC_SYS_PRI2_SVC_S 24
  4320. //*****************************************************************************
  4321. //
  4322. // The following are defines for the bit fields in the NVIC_SYS_PRI3 register.
  4323. //
  4324. //*****************************************************************************
  4325. #define NVIC_SYS_PRI3_TICK_M 0xFF000000 // Priority of Sys Tick handler
  4326. #define NVIC_SYS_PRI3_PENDSV_M 0x00FF0000 // Priority of PendSV handler
  4327. #define NVIC_SYS_PRI3_RES_M 0x0000FF00 // Priority of reserved handler
  4328. #define NVIC_SYS_PRI3_DEBUG_M 0x000000FF // Priority of debug handler
  4329. #define NVIC_SYS_PRI3_TICK_S 24
  4330. #define NVIC_SYS_PRI3_PENDSV_S 16
  4331. #define NVIC_SYS_PRI3_DEBUG_S 0
  4332. //*****************************************************************************
  4333. //
  4334. // The following are defines for the bit fields in the NVIC_SYS_HND_CTRL
  4335. // register.
  4336. //
  4337. //*****************************************************************************
  4338. #define NVIC_SYS_HND_CTRL_USAGE 0x00040000 // Usage fault enable
  4339. #define NVIC_SYS_HND_CTRL_BUS 0x00020000 // Bus fault enable
  4340. #define NVIC_SYS_HND_CTRL_MEM 0x00010000 // Mem manage fault enable
  4341. #define NVIC_SYS_HND_CTRL_SVC 0x00008000 // SVCall is pended
  4342. #define NVIC_SYS_HND_CTRL_BUSP 0x00004000 // Bus fault is pended
  4343. #define NVIC_SYS_HND_CTRL_TICK 0x00000800 // Sys tick is active
  4344. #define NVIC_SYS_HND_CTRL_PNDSV 0x00000400 // PendSV is active
  4345. #define NVIC_SYS_HND_CTRL_MON 0x00000100 // Monitor is active
  4346. #define NVIC_SYS_HND_CTRL_SVCA 0x00000080 // SVCall is active
  4347. #define NVIC_SYS_HND_CTRL_USGA 0x00000008 // Usage fault is active
  4348. #define NVIC_SYS_HND_CTRL_BUSA 0x00000002 // Bus fault is active
  4349. #define NVIC_SYS_HND_CTRL_MEMA 0x00000001 // Mem manage is active
  4350. //*****************************************************************************
  4351. //
  4352. // The following are defines for the bit fields in the NVIC_FAULT_STAT
  4353. // register.
  4354. //
  4355. //*****************************************************************************
  4356. #define NVIC_FAULT_STAT_DIV0 0x02000000 // Divide by zero fault
  4357. #define NVIC_FAULT_STAT_UNALIGN 0x01000000 // Unaligned access fault
  4358. #define NVIC_FAULT_STAT_NOCP 0x00080000 // No coprocessor fault
  4359. #define NVIC_FAULT_STAT_INVPC 0x00040000 // Invalid PC fault
  4360. #define NVIC_FAULT_STAT_INVSTAT 0x00020000 // Invalid state fault
  4361. #define NVIC_FAULT_STAT_UNDEF 0x00010000 // Undefined instruction fault
  4362. #define NVIC_FAULT_STAT_BFARV 0x00008000 // BFAR is valid
  4363. #define NVIC_FAULT_STAT_BSTKE 0x00001000 // Stack bus fault
  4364. #define NVIC_FAULT_STAT_BUSTKE 0x00000800 // Unstack bus fault
  4365. #define NVIC_FAULT_STAT_IMPRE 0x00000400 // Imprecise data bus error
  4366. #define NVIC_FAULT_STAT_PRECISE 0x00000200 // Precise data bus error
  4367. #define NVIC_FAULT_STAT_IBUS 0x00000100 // Instruction bus fault
  4368. #define NVIC_FAULT_STAT_MMARV 0x00000080 // MMAR is valid
  4369. #define NVIC_FAULT_STAT_MSTKE 0x00000010 // Stack access violation
  4370. #define NVIC_FAULT_STAT_MUSTKE 0x00000008 // Unstack access violation
  4371. #define NVIC_FAULT_STAT_DERR 0x00000002 // Data access violation
  4372. #define NVIC_FAULT_STAT_IERR 0x00000001 // Instruction access violation
  4373. //*****************************************************************************
  4374. //
  4375. // The following are defines for the bit fields in the NVIC_HFAULT_STAT
  4376. // register.
  4377. //
  4378. //*****************************************************************************
  4379. #define NVIC_HFAULT_STAT_DBG 0x80000000 // Debug event
  4380. #define NVIC_HFAULT_STAT_FORCED 0x40000000 // Cannot execute fault handler
  4381. #define NVIC_HFAULT_STAT_VECT 0x00000002 // Vector table read fault
  4382. //*****************************************************************************
  4383. //
  4384. // The following are defines for the bit fields in the NVIC_DEBUG_STAT
  4385. // register.
  4386. //
  4387. //*****************************************************************************
  4388. #define NVIC_DEBUG_STAT_EXTRNL 0x00000010 // EDBGRQ asserted
  4389. #define NVIC_DEBUG_STAT_VCATCH 0x00000008 // Vector catch
  4390. #define NVIC_DEBUG_STAT_DWTTRAP 0x00000004 // DWT match
  4391. #define NVIC_DEBUG_STAT_BKPT 0x00000002 // Breakpoint instruction
  4392. #define NVIC_DEBUG_STAT_HALTED 0x00000001 // Halt request
  4393. //*****************************************************************************
  4394. //
  4395. // The following are defines for the bit fields in the NVIC_MM_ADDR register.
  4396. //
  4397. //*****************************************************************************
  4398. #define NVIC_MM_ADDR_M 0xFFFFFFFF // Data fault address
  4399. #define NVIC_MM_ADDR_S 0
  4400. //*****************************************************************************
  4401. //
  4402. // The following are defines for the bit fields in the NVIC_FAULT_ADDR
  4403. // register.
  4404. //
  4405. //*****************************************************************************
  4406. #define NVIC_FAULT_ADDR_M 0xFFFFFFFF // Data bus fault address
  4407. #define NVIC_FAULT_ADDR_S 0
  4408. //*****************************************************************************
  4409. //
  4410. // The following are defines for the bit fields in the NVIC_MPU_TYPE register.
  4411. //
  4412. //*****************************************************************************
  4413. #define NVIC_MPU_TYPE_IREGION_M 0x00FF0000 // Number of I regions
  4414. #define NVIC_MPU_TYPE_DREGION_M 0x0000FF00 // Number of D regions
  4415. #define NVIC_MPU_TYPE_SEPARATE 0x00000001 // Separate or unified MPU
  4416. #define NVIC_MPU_TYPE_IREGION_S 16
  4417. #define NVIC_MPU_TYPE_DREGION_S 8
  4418. //*****************************************************************************
  4419. //
  4420. // The following are defines for the bit fields in the NVIC_MPU_CTRL register.
  4421. //
  4422. //*****************************************************************************
  4423. #define NVIC_MPU_CTRL_PRIVDEFEN 0x00000004 // MPU default region in priv mode
  4424. #define NVIC_MPU_CTRL_HFNMIENA 0x00000002 // MPU enabled during faults
  4425. #define NVIC_MPU_CTRL_ENABLE 0x00000001 // MPU enable
  4426. //*****************************************************************************
  4427. //
  4428. // The following are defines for the bit fields in the NVIC_MPU_NUMBER
  4429. // register.
  4430. //
  4431. //*****************************************************************************
  4432. #define NVIC_MPU_NUMBER_M 0x000000FF // MPU region to access
  4433. #define NVIC_MPU_NUMBER_S 0
  4434. //*****************************************************************************
  4435. //
  4436. // The following are defines for the bit fields in the NVIC_MPU_BASE register.
  4437. //
  4438. //*****************************************************************************
  4439. #define NVIC_MPU_BASE_ADDR_M 0xFFFFFFE0 // Base address mask
  4440. #define NVIC_MPU_BASE_VALID 0x00000010 // Region number valid
  4441. #define NVIC_MPU_BASE_REGION_M 0x0000000F // Region number
  4442. #define NVIC_MPU_BASE_ADDR_S 8
  4443. #define NVIC_MPU_BASE_REGION_S 0
  4444. //*****************************************************************************
  4445. //
  4446. // The following are defines for the bit fields in the NVIC_MPU_ATTR register.
  4447. //
  4448. //*****************************************************************************
  4449. #define NVIC_MPU_ATTR_M 0xFFFF0000 // Attributes
  4450. #define NVIC_MPU_ATTR_AP_NO_NO 0x00000000 // prv: no access, usr: no access
  4451. #define NVIC_MPU_ATTR_BUFFRABLE 0x00010000 // Bufferable
  4452. #define NVIC_MPU_ATTR_CACHEABLE 0x00020000 // Cacheable
  4453. #define NVIC_MPU_ATTR_SHAREABLE 0x00040000 // Shareable
  4454. #define NVIC_MPU_ATTR_TEX_M 0x00380000 // Type extension mask
  4455. #define NVIC_MPU_ATTR_AP_RW_NO 0x01000000 // prv: rw, usr: none
  4456. #define NVIC_MPU_ATTR_AP_RW_RO 0x02000000 // prv: rw, usr: read-only
  4457. #define NVIC_MPU_ATTR_AP_RW_RW 0x03000000 // prv: rw, usr: rw
  4458. #define NVIC_MPU_ATTR_AP_RO_NO 0x05000000 // prv: ro, usr: none
  4459. #define NVIC_MPU_ATTR_AP_RO_RO 0x06000000 // prv: ro, usr: ro
  4460. #define NVIC_MPU_ATTR_AP_M 0x07000000 // Access permissions mask
  4461. #define NVIC_MPU_ATTR_XN 0x10000000 // Execute disable
  4462. #define NVIC_MPU_ATTR_SRD_M 0x0000FF00 // Sub-region disable mask
  4463. #define NVIC_MPU_ATTR_SRD_0 0x00000100 // Sub-region 0 disable
  4464. #define NVIC_MPU_ATTR_SRD_1 0x00000200 // Sub-region 1 disable
  4465. #define NVIC_MPU_ATTR_SRD_2 0x00000400 // Sub-region 2 disable
  4466. #define NVIC_MPU_ATTR_SRD_3 0x00000800 // Sub-region 3 disable
  4467. #define NVIC_MPU_ATTR_SRD_4 0x00001000 // Sub-region 4 disable
  4468. #define NVIC_MPU_ATTR_SRD_5 0x00002000 // Sub-region 5 disable
  4469. #define NVIC_MPU_ATTR_SRD_6 0x00004000 // Sub-region 6 disable
  4470. #define NVIC_MPU_ATTR_SRD_7 0x00008000 // Sub-region 7 disable
  4471. #define NVIC_MPU_ATTR_SIZE_M 0x0000003E // Region size mask
  4472. #define NVIC_MPU_ATTR_SIZE_32B 0x00000008 // Region size 32 bytes
  4473. #define NVIC_MPU_ATTR_SIZE_64B 0x0000000A // Region size 64 bytes
  4474. #define NVIC_MPU_ATTR_SIZE_128B 0x0000000C // Region size 128 bytes
  4475. #define NVIC_MPU_ATTR_SIZE_256B 0x0000000E // Region size 256 bytes
  4476. #define NVIC_MPU_ATTR_SIZE_512B 0x00000010 // Region size 512 bytes
  4477. #define NVIC_MPU_ATTR_SIZE_1K 0x00000012 // Region size 1 Kbytes
  4478. #define NVIC_MPU_ATTR_SIZE_2K 0x00000014 // Region size 2 Kbytes
  4479. #define NVIC_MPU_ATTR_SIZE_4K 0x00000016 // Region size 4 Kbytes
  4480. #define NVIC_MPU_ATTR_SIZE_8K 0x00000018 // Region size 8 Kbytes
  4481. #define NVIC_MPU_ATTR_SIZE_16K 0x0000001A // Region size 16 Kbytes
  4482. #define NVIC_MPU_ATTR_SIZE_32K 0x0000001C // Region size 32 Kbytes
  4483. #define NVIC_MPU_ATTR_SIZE_64K 0x0000001E // Region size 64 Kbytes
  4484. #define NVIC_MPU_ATTR_SIZE_128K 0x00000020 // Region size 128 Kbytes
  4485. #define NVIC_MPU_ATTR_SIZE_256K 0x00000022 // Region size 256 Kbytes
  4486. #define NVIC_MPU_ATTR_SIZE_512K 0x00000024 // Region size 512 Kbytes
  4487. #define NVIC_MPU_ATTR_SIZE_1M 0x00000026 // Region size 1 Mbytes
  4488. #define NVIC_MPU_ATTR_SIZE_2M 0x00000028 // Region size 2 Mbytes
  4489. #define NVIC_MPU_ATTR_SIZE_4M 0x0000002A // Region size 4 Mbytes
  4490. #define NVIC_MPU_ATTR_SIZE_8M 0x0000002C // Region size 8 Mbytes
  4491. #define NVIC_MPU_ATTR_SIZE_16M 0x0000002E // Region size 16 Mbytes
  4492. #define NVIC_MPU_ATTR_SIZE_32M 0x00000030 // Region size 32 Mbytes
  4493. #define NVIC_MPU_ATTR_SIZE_64M 0x00000032 // Region size 64 Mbytes
  4494. #define NVIC_MPU_ATTR_SIZE_128M 0x00000034 // Region size 128 Mbytes
  4495. #define NVIC_MPU_ATTR_SIZE_256M 0x00000036 // Region size 256 Mbytes
  4496. #define NVIC_MPU_ATTR_SIZE_512M 0x00000038 // Region size 512 Mbytes
  4497. #define NVIC_MPU_ATTR_SIZE_1G 0x0000003A // Region size 1 Gbytes
  4498. #define NVIC_MPU_ATTR_SIZE_2G 0x0000003C // Region size 2 Gbytes
  4499. #define NVIC_MPU_ATTR_SIZE_4G 0x0000003E // Region size 4 Gbytes
  4500. #define NVIC_MPU_ATTR_ENABLE 0x00000001 // Region enable
  4501. //*****************************************************************************
  4502. //
  4503. // The following are defines for the bit fields in the NVIC_DBG_CTRL register.
  4504. //
  4505. //*****************************************************************************
  4506. #define NVIC_DBG_CTRL_DBGKEY_M 0xFFFF0000 // Debug key mask
  4507. #define NVIC_DBG_CTRL_DBGKEY 0xA05F0000 // Debug key
  4508. #define NVIC_DBG_CTRL_S_RESET_ST \
  4509. 0x02000000 // Core has reset since last read
  4510. #define NVIC_DBG_CTRL_S_RETIRE_ST \
  4511. 0x01000000 // Core has executed insruction
  4512. // since last read
  4513. #define NVIC_DBG_CTRL_S_LOCKUP 0x00080000 // Core is locked up
  4514. #define NVIC_DBG_CTRL_S_SLEEP 0x00040000 // Core is sleeping
  4515. #define NVIC_DBG_CTRL_S_HALT 0x00020000 // Core status on halt
  4516. #define NVIC_DBG_CTRL_S_REGRDY 0x00010000 // Register read/write available
  4517. #define NVIC_DBG_CTRL_C_SNAPSTALL \
  4518. 0x00000020 // Breaks a stalled load/store
  4519. #define NVIC_DBG_CTRL_C_MASKINT 0x00000008 // Mask interrupts when stepping
  4520. #define NVIC_DBG_CTRL_C_STEP 0x00000004 // Step the core
  4521. #define NVIC_DBG_CTRL_C_HALT 0x00000002 // Halt the core
  4522. #define NVIC_DBG_CTRL_C_DEBUGEN 0x00000001 // Enable debug
  4523. //*****************************************************************************
  4524. //
  4525. // The following are defines for the bit fields in the NVIC_DBG_XFER register.
  4526. //
  4527. //*****************************************************************************
  4528. #define NVIC_DBG_XFER_REG_WNR 0x00010000 // Write or not read
  4529. #define NVIC_DBG_XFER_REG_SEL_M 0x0000001F // Register
  4530. #define NVIC_DBG_XFER_REG_R0 0x00000000 // Register R0
  4531. #define NVIC_DBG_XFER_REG_R1 0x00000001 // Register R1
  4532. #define NVIC_DBG_XFER_REG_R2 0x00000002 // Register R2
  4533. #define NVIC_DBG_XFER_REG_R3 0x00000003 // Register R3
  4534. #define NVIC_DBG_XFER_REG_R4 0x00000004 // Register R4
  4535. #define NVIC_DBG_XFER_REG_R5 0x00000005 // Register R5
  4536. #define NVIC_DBG_XFER_REG_R6 0x00000006 // Register R6
  4537. #define NVIC_DBG_XFER_REG_R7 0x00000007 // Register R7
  4538. #define NVIC_DBG_XFER_REG_R8 0x00000008 // Register R8
  4539. #define NVIC_DBG_XFER_REG_R9 0x00000009 // Register R9
  4540. #define NVIC_DBG_XFER_REG_R10 0x0000000A // Register R10
  4541. #define NVIC_DBG_XFER_REG_R11 0x0000000B // Register R11
  4542. #define NVIC_DBG_XFER_REG_R12 0x0000000C // Register R12
  4543. #define NVIC_DBG_XFER_REG_R13 0x0000000D // Register R13
  4544. #define NVIC_DBG_XFER_REG_R14 0x0000000E // Register R14
  4545. #define NVIC_DBG_XFER_REG_R15 0x0000000F // Register R15
  4546. #define NVIC_DBG_XFER_REG_FLAGS 0x00000010 // xPSR/Flags register
  4547. #define NVIC_DBG_XFER_REG_MSP 0x00000011 // Main SP
  4548. #define NVIC_DBG_XFER_REG_PSP 0x00000012 // Process SP
  4549. #define NVIC_DBG_XFER_REG_DSP 0x00000013 // Deep SP
  4550. #define NVIC_DBG_XFER_REG_CFBP 0x00000014 // Control/Fault/BasePri/PriMask
  4551. //*****************************************************************************
  4552. //
  4553. // The following are defines for the bit fields in the NVIC_DBG_DATA register.
  4554. //
  4555. //*****************************************************************************
  4556. #define NVIC_DBG_DATA_M 0xFFFFFFFF // Data temporary cache
  4557. #define NVIC_DBG_DATA_S 0
  4558. //*****************************************************************************
  4559. //
  4560. // The following are defines for the bit fields in the NVIC_DBG_INT register.
  4561. //
  4562. //*****************************************************************************
  4563. #define NVIC_DBG_INT_HARDERR 0x00000400 // Debug trap on hard fault
  4564. #define NVIC_DBG_INT_INTERR 0x00000200 // Debug trap on interrupt errors
  4565. #define NVIC_DBG_INT_BUSERR 0x00000100 // Debug trap on bus error
  4566. #define NVIC_DBG_INT_STATERR 0x00000080 // Debug trap on usage fault state
  4567. #define NVIC_DBG_INT_CHKERR 0x00000040 // Debug trap on usage fault check
  4568. #define NVIC_DBG_INT_NOCPERR 0x00000020 // Debug trap on coprocessor error
  4569. #define NVIC_DBG_INT_MMERR 0x00000010 // Debug trap on mem manage fault
  4570. #define NVIC_DBG_INT_RESET 0x00000008 // Core reset status
  4571. #define NVIC_DBG_INT_RSTPENDCLR 0x00000004 // Clear pending core reset
  4572. #define NVIC_DBG_INT_RSTPENDING 0x00000002 // Core reset is pending
  4573. #define NVIC_DBG_INT_RSTVCATCH 0x00000001 // Reset vector catch
  4574. //*****************************************************************************
  4575. //
  4576. // The following are defines for the bit fields in the NVIC_SW_TRIG register.
  4577. //
  4578. //*****************************************************************************
  4579. #define NVIC_SW_TRIG_INTID_M 0x000003FF // Interrupt to trigger
  4580. #define NVIC_SW_TRIG_INTID_S 0
  4581. //*****************************************************************************
  4582. //
  4583. // The following definitions are deprecated.
  4584. //
  4585. //*****************************************************************************
  4586. #ifndef DEPRECATED
  4587. //*****************************************************************************
  4588. //
  4589. // Deprecated defines for the Watchdog
  4590. //
  4591. //*****************************************************************************
  4592. #define WATCHDOG_LOAD_R (*((volatile unsigned long *)0x40000000))
  4593. #define WATCHDOG_VALUE_R (*((volatile unsigned long *)0x40000004))
  4594. #define WATCHDOG_CTL_R (*((volatile unsigned long *)0x40000008))
  4595. #define WATCHDOG_ICR_R (*((volatile unsigned long *)0x4000000C))
  4596. #define WATCHDOG_RIS_R (*((volatile unsigned long *)0x40000010))
  4597. #define WATCHDOG_MIS_R (*((volatile unsigned long *)0x40000014))
  4598. #define WATCHDOG_TEST_R (*((volatile unsigned long *)0x40000418))
  4599. #define WATCHDOG_LOCK_R (*((volatile unsigned long *)0x40000C00))
  4600. //*****************************************************************************
  4601. //
  4602. // Deprecated defines for the bit fields in the I2C_O_SICR register.
  4603. //
  4604. //*****************************************************************************
  4605. #define I2C_SICR_IC 0x00000001 // Clear Interrupt
  4606. //*****************************************************************************
  4607. //
  4608. // Deprecated defines for the bit fields in the I2C_O_SMIS register.
  4609. //
  4610. //*****************************************************************************
  4611. #define I2C_SMIS_MIS 0x00000001 // Masked Interrupt Status
  4612. //*****************************************************************************
  4613. //
  4614. // Deprecated defines for the bit fields in the I2C_O_SRIS register.
  4615. //
  4616. //*****************************************************************************
  4617. #define I2C_SRIS_RIS 0x00000001 // Raw Interrupt Status
  4618. //*****************************************************************************
  4619. //
  4620. // Deprecated defines for the bit fields in the I2C_O_SIMR register.
  4621. //
  4622. //*****************************************************************************
  4623. #define I2C_SIMR_IM 0x00000001 // Interrupt Mask
  4624. //*****************************************************************************
  4625. //
  4626. // Deprecated defines for the bit fields in the the interpretation of the data
  4627. // in the SSFIFOx when the ADC TMLB is enabled. register.
  4628. //
  4629. //*****************************************************************************
  4630. #define ADC_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter
  4631. #define ADC_TMLB_CONT 0x00000020 // Continuation Sample Indicator
  4632. #define ADC_TMLB_DIFF 0x00000010 // Differential Sample Indicator
  4633. #define ADC_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator
  4634. #define ADC_TMLB_MUX_M 0x00000007 // Analog Input Indicator
  4635. #define ADC_TMLB_CNT_S 6 // Sample counter shift
  4636. #define ADC_TMLB_MUX_S 0 // Input channel number shift
  4637. //*****************************************************************************
  4638. //
  4639. // Deprecated defines for the ADC register offsets.
  4640. //
  4641. //*****************************************************************************
  4642. #define ADC_ACTSS_R (*((volatile unsigned long *)0x40038000))
  4643. #define ADC_RIS_R (*((volatile unsigned long *)0x40038004))
  4644. #define ADC_IM_R (*((volatile unsigned long *)0x40038008))
  4645. #define ADC_ISC_R (*((volatile unsigned long *)0x4003800C))
  4646. #define ADC_OSTAT_R (*((volatile unsigned long *)0x40038010))
  4647. #define ADC_EMUX_R (*((volatile unsigned long *)0x40038014))
  4648. #define ADC_USTAT_R (*((volatile unsigned long *)0x40038018))
  4649. #define ADC_SSPRI_R (*((volatile unsigned long *)0x40038020))
  4650. #define ADC_PSSI_R (*((volatile unsigned long *)0x40038028))
  4651. #define ADC_SAC_R (*((volatile unsigned long *)0x40038030))
  4652. #define ADC_SSMUX0_R (*((volatile unsigned long *)0x40038040))
  4653. #define ADC_SSCTL0_R (*((volatile unsigned long *)0x40038044))
  4654. #define ADC_SSFIFO0_R (*((volatile unsigned long *)0x40038048))
  4655. #define ADC_SSFSTAT0_R (*((volatile unsigned long *)0x4003804C))
  4656. #define ADC_SSMUX1_R (*((volatile unsigned long *)0x40038060))
  4657. #define ADC_SSCTL1_R (*((volatile unsigned long *)0x40038064))
  4658. #define ADC_SSFIFO1_R (*((volatile unsigned long *)0x40038068))
  4659. #define ADC_SSFSTAT1_R (*((volatile unsigned long *)0x4003806C))
  4660. #define ADC_SSMUX2_R (*((volatile unsigned long *)0x40038080))
  4661. #define ADC_SSCTL2_R (*((volatile unsigned long *)0x40038084))
  4662. #define ADC_SSFIFO2_R (*((volatile unsigned long *)0x40038088))
  4663. #define ADC_SSFSTAT2_R (*((volatile unsigned long *)0x4003808C))
  4664. #define ADC_SSMUX3_R (*((volatile unsigned long *)0x400380A0))
  4665. #define ADC_SSCTL3_R (*((volatile unsigned long *)0x400380A4))
  4666. #define ADC_SSFIFO3_R (*((volatile unsigned long *)0x400380A8))
  4667. #define ADC_SSFSTAT3_R (*((volatile unsigned long *)0x400380AC))
  4668. #define ADC_TMLB_R (*((volatile unsigned long *)0x40038100))
  4669. //*****************************************************************************
  4670. //
  4671. // Deprecated defines for the bit fields in the FLASH_FMC register.
  4672. //
  4673. //*****************************************************************************
  4674. #define FLASH_FMC_WRKEY_M 0xFFFF0000 // Flash Memory Write Key
  4675. #define FLASH_FMC_WRKEY_S 16
  4676. //*****************************************************************************
  4677. //
  4678. // Deprecated defines for the bit fields in the SYSCTL_DID1 register.
  4679. //
  4680. //*****************************************************************************
  4681. #define SYSCTL_DID1_PKG_28SOIC 0x00000000 // SOIC package
  4682. #define SYSCTL_DID1_PKG_48QFP 0x00000008 // QFP package
  4683. //*****************************************************************************
  4684. //
  4685. // Deprecated defines for the NVIC register addresses.
  4686. //
  4687. //*****************************************************************************
  4688. #define NVIC_MPU_R (*((volatile unsigned long *)0xE000ED9C))
  4689. #endif
  4690. #endif // __LM3S8962_H__