cmem7.h 636 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014
  1. /****************************************************************************************************//**
  2. * @file cmem7.h
  3. *
  4. * @brief CMSIS Cortex-M3 Peripheral Access Layer Header File for
  5. * cmem7 from <unknown Vendor>.
  6. *
  7. * @version V1.0
  8. * @date 5. January 2015
  9. *
  10. * @note Generated with SVDConv V2.75
  11. * from CMSIS SVD File 'SVDConv_CME_M7.svd' Version 1.0,
  12. *******************************************************************************************************/
  13. /** @addtogroup (null)
  14. * @{
  15. */
  16. /** @addtogroup cmem7
  17. * @{
  18. */
  19. #ifndef CMEM7_H
  20. #define CMEM7_H
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /* ------------------------- Interrupt Number Definition ------------------------ */
  25. typedef enum {
  26. /* ------------------- Cortex-M3 Processor Exceptions Numbers ------------------- */
  27. Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset */
  28. NonMaskableInt_IRQn = -14, /*!< 2 Non maskable Interrupt, cannot be stopped or preempted */
  29. HardFault_IRQn = -13, /*!< 3 Hard Fault, all classes of Fault */
  30. MemoryManagement_IRQn = -12, /*!< 4 Memory Management, MPU mismatch, including Access Violation
  31. and No Match */
  32. BusFault_IRQn = -11, /*!< 5 Bus Fault, Pre-Fetch-, Memory Access Fault, other address/memory
  33. related Fault */
  34. UsageFault_IRQn = -10, /*!< 6 Usage Fault, i.e. Undef Instruction, Illegal State Transition */
  35. SVCall_IRQn = -5, /*!< 11 System Service Call via SVC instruction */
  36. DebugMonitor_IRQn = -4, /*!< 12 Debug Monitor */
  37. PendSV_IRQn = -2, /*!< 14 Pendable request for system service */
  38. SysTick_IRQn = -1, /*!< 15 System Tick Timer */
  39. /* ---------------------- cmem7 Specific Interrupt Numbers ---------------------- */
  40. ETH_INT_IRQn = 0, /*!< 0 ETH_INT */
  41. USB_INT_IRQn = 1, /*!< 1 USB_INT */
  42. DMA_INT_IRQn = 2, /*!< 2 DMA_INT */
  43. CAN0_INT_IRQn = 3, /*!< 3 CAN0_INT */
  44. CAN1_INT_IRQn = 4, /*!< 4 CAN1_INT */
  45. FP0_INT_IRQn = 5, /*!< 5 FP0_INT */
  46. FP1_INT_IRQn = 6, /*!< 6 FP1_INT */
  47. FP2_INT_IRQn = 7, /*!< 7 FP2_INT */
  48. FP3_INT_IRQn = 8, /*!< 8 FP3_INT */
  49. FP4_INT_IRQn = 9, /*!< 9 FP4_INT */
  50. FP5_INT_IRQn = 10, /*!< 10 FP5_INT */
  51. FP6_INT_IRQn = 11, /*!< 11 FP6_INT */
  52. FP7_INT_IRQn = 12, /*!< 12 FP7_INT */
  53. FP8_INT_IRQn = 13, /*!< 13 FP8_INT */
  54. FP9_INT_IRQn = 14, /*!< 14 FP9_INT */
  55. FP10_INT_IRQn = 15, /*!< 15 FP10_INT */
  56. FP11_INT_IRQn = 16, /*!< 16 FP11_INT */
  57. FP12_INT_IRQn = 17, /*!< 17 FP12_INT */
  58. FP13_INT_IRQn = 18, /*!< 18 FP13_INT */
  59. FP14_INT_IRQn = 19, /*!< 19 FP14_INT */
  60. FP15_INT_IRQn = 20, /*!< 20 FP15_INT */
  61. UART0_INT_IRQn = 21, /*!< 21 UART0_INT */
  62. UART1_INT_IRQn = 22, /*!< 22 UART1_INT */
  63. ADC_INT_IRQn = 23, /*!< 23 ADC_INT */
  64. GPIO_INT_IRQn = 24, /*!< 24 GPIO_INT */
  65. SPI1_INT_IRQn = 25, /*!< 25 SPI1_INT */
  66. I2C1_INT_IRQn = 26, /*!< 26 I2C1_INT */
  67. SPI0_INT_IRQn = 27, /*!< 27 SPI0_INT */
  68. I2C0_INT_IRQn = 28, /*!< 28 I2C0_INT */
  69. RTC_1S_INT_IRQn = 29, /*!< 29 RTC_1S_INT */
  70. RTC_1MS_INT_IRQn = 30, /*!< 30 RTC_1MS_INT */
  71. WDG_INT_IRQn = 31, /*!< 31 WDG_INT */
  72. TIMER_INT_IRQn = 32, /*!< 32 TIMER_INT */
  73. DDRC_SW_PROC_IRQn = 33, /*!< 33 DDRC_SW_PROC */
  74. ETH_PMT_INT_IRQn = 34, /*!< 34 ETH_PMT_INT */
  75. PAD_INT_IRQn = 35, /*!< 35 PAD_INT */
  76. DDRC_LANE_SYNC_IRQn = 36, /*!< 36 DDRC_LANE_SYNC */
  77. UART2_INT_IRQn = 37 /*!< 37 UART2_INT */
  78. } IRQn_Type;
  79. /** @addtogroup Configuration_of_CMSIS
  80. * @{
  81. */
  82. /* ================================================================================ */
  83. /* ================ Processor and Core Peripheral Section ================ */
  84. /* ================================================================================ */
  85. /* ----------------Configuration of the Cortex-M3 Processor and Core Peripherals---------------- */
  86. #define __CM3_REV 0x0000 /*!< Cortex-M3 Core Revision */
  87. #define __MPU_PRESENT 0 /*!< MPU present or not */
  88. #define __NVIC_PRIO_BITS 0 /*!< Number of Bits used for Priority Levels */
  89. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  90. /** @} */ /* End of group Configuration_of_CMSIS */
  91. #include <core_cm3.h> /*!< Cortex-M3 processor and core peripherals */
  92. #include "system_cmem7.h" /*!< cmem7 System */
  93. /* ================================================================================ */
  94. /* ================ Device Specific Peripheral Section ================ */
  95. /* ================================================================================ */
  96. /** @addtogroup Device_Peripheral_Registers
  97. * @{
  98. */
  99. /* ------------------- Start of section using anonymous unions ------------------ */
  100. #if defined(__CC_ARM)
  101. #pragma push
  102. #pragma anon_unions
  103. #elif defined(__ICCARM__)
  104. #pragma language=extended
  105. #elif defined(__GNUC__)
  106. /* anonymous unions are enabled by default */
  107. #elif defined(__TMS470__)
  108. /* anonymous unions are enabled by default */
  109. #elif defined(__TASKING__)
  110. #pragma warning 586
  111. #else
  112. #warning Not supported compiler type
  113. #endif
  114. /* ================================================================================ */
  115. /* ================ UART0 ================ */
  116. /* ================================================================================ */
  117. /**
  118. * @brief asynchronous serial controller 0 (UART0)
  119. */
  120. typedef struct { /*!< UART0 Structure */
  121. __IO uint16_t BAUDRATE; /*!< baudrate Register */
  122. __I uint16_t RESERVED0;
  123. __IO uint16_t TX_BUF; /*!< transmit buffer Register */
  124. __I uint16_t RESERVED1;
  125. __I uint16_t RX_BUF; /*!< receive buffer Register */
  126. __I uint16_t RESERVED2;
  127. union {
  128. __IO uint32_t CTRL; /*!< control Register */
  129. struct {
  130. __IO uint32_t MODE : 3; /*!< asc mode control */
  131. __IO uint32_t STOP : 2; /*!< number of stop bits selection */
  132. __IO uint32_t PARITY : 1; /*!< parity selection */
  133. __IO uint32_t LOOPBACK : 1; /*!< loopback mode enable bit */
  134. uint32_t : 1;
  135. __IO uint32_t RX_EN : 1; /*!< receive enable bit */
  136. uint32_t : 1;
  137. __IO uint32_t FIFO_EN : 1; /*!< FIFO enable bit */
  138. __IO uint32_t CTS : 1; /*!< Clear to send, enable signal to send */
  139. __IO uint32_t BAUD_MODE : 1; /*!< baudrate generation mode */
  140. __IO uint32_t RX_THRESHOLD: 5; /*!< receive threshold */
  141. __IO uint32_t RX_HALF_FULL: 5; /*!< receive fifi half full level */
  142. } CTRL_b; /*!< BitSize */
  143. };
  144. union {
  145. __IO uint32_t INT_MASK; /*!< interrupt mask register */
  146. struct {
  147. __IO uint32_t RNE : 1; /*!< Receive FIFO not empty interrupt */
  148. __IO uint32_t TE : 1; /*!< Transmitter FIFO empty interrupt */
  149. __IO uint32_t THE : 1; /*!< Transmitter FIFO at least half empty flag */
  150. __IO uint32_t TONE : 1; /*!< timeout when the receiver FIFO is not empty interrupt */
  151. __IO uint32_t TOE : 1; /*!< timeout when the receiver FIFO is empty interrupt */
  152. __IO uint32_t RHF : 1; /*!< receiver FIFO is half full interrupt */
  153. __IO uint32_t TF : 1; /*!< transmitter FIFO full interrupt */
  154. __IO uint32_t PE : 1; /*!< parity error interrupt */
  155. __IO uint32_t FE : 1; /*!< frame error interrupt */
  156. __IO uint32_t OE : 1; /*!< overrun error interrupt */
  157. __IO uint32_t RX_THRE_REACH: 1; /*!< Receive threshold reach interrupt */
  158. } INT_MASK_b; /*!< BitSize */
  159. };
  160. union {
  161. __IO uint32_t STATUS; /*!< status register */
  162. struct {
  163. __IO uint32_t RNE : 1; /*!< receiver FIFO not empty */
  164. __IO uint32_t TE : 1; /*!< Transmitter FIFO empty */
  165. __IO uint32_t THE : 1; /*!< Transmitter FIFO at least half empty flag */
  166. __IO uint32_t TONE : 1; /*!< timeout when the receiver FIFO is not empty */
  167. __IO uint32_t TOE : 1; /*!< time out when the receiver FIFO is empty */
  168. __IO uint32_t RHF : 1; /*!< receiver FIFO is half full */
  169. __IO uint32_t TF : 1; /*!< transmitter FIFO is full */
  170. } STATUS_b; /*!< BitSize */
  171. };
  172. __IO uint8_t TIMEOUT; /*!< timeout Register */
  173. __I uint8_t RESERVED3[3];
  174. union {
  175. __IO uint32_t TX_RESET; /*!< transmit reset Register */
  176. struct {
  177. __IO uint32_t EN : 1; /*!< enable */
  178. } TX_RESET_b; /*!< BitSize */
  179. };
  180. union {
  181. __IO uint32_t RX_RESET; /*!< receive reset Register */
  182. struct {
  183. __IO uint32_t EN : 1; /*!< enable */
  184. } RX_RESET_b; /*!< BitSize */
  185. };
  186. union {
  187. __IO uint32_t RUN; /*!< uart enable register */
  188. struct {
  189. __IO uint32_t EN : 1; /*!< enable */
  190. } RUN_b; /*!< BitSize */
  191. };
  192. union {
  193. __IO uint32_t INT_RAW; /*!< raw interrupt before mask register */
  194. struct {
  195. __IO uint32_t RNE : 1; /*!< Receive FIFO not empty interrupt */
  196. __IO uint32_t TE : 1; /*!< Transmitter FIFO empty interrupt */
  197. __IO uint32_t THE : 1; /*!< Transmitter FIFO at least half empty flag */
  198. __IO uint32_t TONE : 1; /*!< timeout when the receiver FIFO is not empty interrupt */
  199. __IO uint32_t TOE : 1; /*!< timeout when the receiver FIFO is empty interrupt */
  200. __IO uint32_t RHF : 1; /*!< receiver FIFO is half full interrupt */
  201. __IO uint32_t TF : 1; /*!< transmitter FIFO full interrupt */
  202. __IO uint32_t PE : 1; /*!< parity error interrupt */
  203. __IO uint32_t FE : 1; /*!< frame error interrupt */
  204. __IO uint32_t OE : 1; /*!< overrun error interrupt */
  205. __IO uint32_t RX_THRE_REACH: 1; /*!< Receive threshold reach interrupt */
  206. } INT_RAW_b; /*!< BitSize */
  207. };
  208. union {
  209. __IO uint32_t INT_SEEN; /*!< interrupt after mask register */
  210. struct {
  211. __IO uint32_t RNE : 1; /*!< Receive FIFO not empty interrupt */
  212. __IO uint32_t TE : 1; /*!< Transmitter FIFO empty interrupt */
  213. __IO uint32_t THE : 1; /*!< Transmitter FIFO at least half empty flag */
  214. __IO uint32_t TONE : 1; /*!< timeout when the receiver FIFO is not empty interrupt */
  215. __IO uint32_t TOE : 1; /*!< timeout when the receiver FIFO is empty interrupt */
  216. __IO uint32_t RHF : 1; /*!< receiver FIFO is half full interrupt */
  217. __IO uint32_t TF : 1; /*!< transmitter FIFO full interrupt */
  218. __IO uint32_t PE : 1; /*!< parity error interrupt */
  219. __IO uint32_t FE : 1; /*!< frame error interrupt */
  220. __IO uint32_t OE : 1; /*!< overrun error interrupt */
  221. __IO uint32_t RX_THRE_REACH: 1; /*!< Receive threshold reach interrupt */
  222. } INT_SEEN_b; /*!< BitSize */
  223. };
  224. } UART0_Type;
  225. /* ================================================================================ */
  226. /* ================ WDG ================ */
  227. /* ================================================================================ */
  228. /**
  229. * @brief watchdog (WDG)
  230. */
  231. typedef struct { /*!< WDG Structure */
  232. union {
  233. __IO uint32_t CTRL; /*!< control Register */
  234. struct {
  235. __IO uint32_t EN : 1; /*!< flag indicates if watchdog is enabled or not */
  236. __IO uint32_t INT_LEN : 1; /*!< watchdog report interrupt when COUNTER is 1/4 or 1/2 of LENGTH */
  237. } CTRL_b; /*!< BitSize */
  238. };
  239. __IO uint32_t LEN; /*!< Ticks decrease down to 25% or 50% to trigger an interrupt */
  240. union {
  241. __IO uint32_t INT_CTRL; /*!< interrupt control */
  242. struct {
  243. __IO uint32_t MASK : 1; /*!< mask register */
  244. __IO uint32_t TRIGGER_MODE: 1; /*!< trigger mode */
  245. } INT_CTRL_b; /*!< BitSize */
  246. };
  247. union {
  248. __IO uint32_t INT_STA; /*!< interrupt status register */
  249. struct {
  250. __IO uint32_t STA : 1; /*!< interrupt status */
  251. } INT_STA_b; /*!< BitSize */
  252. };
  253. union {
  254. __IO uint32_t INT_RAW; /*!< interrupt raw register */
  255. struct {
  256. __IO uint32_t STA : 1; /*!< interrupt status */
  257. } INT_RAW_b; /*!< BitSize */
  258. };
  259. __I uint32_t CNT; /*!< counter register */
  260. } WDG_Type;
  261. /* ================================================================================ */
  262. /* ================ TIMER0 ================ */
  263. /* ================================================================================ */
  264. /**
  265. * @brief timer 0 (TIMER0)
  266. */
  267. typedef struct { /*!< TIMER0 Structure */
  268. union {
  269. __IO uint32_t CTRL; /*!< control Register */
  270. struct {
  271. __IO uint32_t EN : 1; /*!< flag indicates if timer is enabled or not */
  272. } CTRL_b; /*!< BitSize */
  273. };
  274. union {
  275. __IO uint32_t TYPE; /*!< type Register */
  276. struct {
  277. __IO uint32_t SIGNLE_SHOT: 1; /*!< indicate timer generate only one interrupt if not reload */
  278. } TYPE_b; /*!< BitSize */
  279. };
  280. __IO uint32_t LEN; /*!< length */
  281. union {
  282. __IO uint32_t INT_EN; /*!< interrupt enable */
  283. struct {
  284. __IO uint32_t EN_REVERSE : 1; /*!< flag indicates if timer is disable or not */
  285. } INT_EN_b; /*!< BitSize */
  286. };
  287. union {
  288. __IO uint32_t INT_STA; /*!< interrupt status */
  289. struct {
  290. __IO uint32_t STA : 1; /*!< interrupt status */
  291. } INT_STA_b; /*!< BitSize */
  292. };
  293. union {
  294. __IO uint32_t INT_RAW; /*!< interrupt raw register */
  295. struct {
  296. __IO uint32_t STA : 1; /*!< interrupt status */
  297. } INT_RAW_b; /*!< BitSize */
  298. };
  299. __I uint32_t CNT; /*!< counter register */
  300. } TIMER0_Type;
  301. /* ================================================================================ */
  302. /* ================ SPI0 ================ */
  303. /* ================================================================================ */
  304. /**
  305. * @brief SPI 0 (SPI0)
  306. */
  307. typedef struct { /*!< SPI0 Structure */
  308. union {
  309. __I uint32_t STATUS; /*!< status Register */
  310. struct {
  311. __I uint32_t RFIFO_EMPTY: 1; /*!< receive fifo is empty */
  312. __I uint32_t RFIFO_FULL : 1; /*!< receive fifo is full */
  313. __I uint32_t RFIFO_ALMOST_EMPTY: 1; /*!< receive fifo is almost empty */
  314. __I uint32_t RFIFO_ALMOST_FULL: 1; /*!< receive fifo almost full */
  315. __I uint32_t TFIFO_EMPTY: 1; /*!< transmit fifo is empty */
  316. __I uint32_t TFIFO_FULL : 1; /*!< transmit fifo is full */
  317. __I uint32_t TFIFO_ALMOST_EMPTY: 1; /*!< transmit fifo is almost empty */
  318. __I uint32_t TFIFO_ALMOST_FULL: 1; /*!< transmit fifo almost full */
  319. __I uint32_t BUSY : 1; /*!< indecates if SPI is idle or busy */
  320. } STATUS_b; /*!< BitSize */
  321. };
  322. union {
  323. __IO uint32_t CTRL; /*!< control Register */
  324. struct {
  325. __IO uint32_t EN : 1; /*!< indicates if SPI is enabled or not */
  326. __IO uint32_t RX_EN : 1; /*!< indicates if SPI receiver is enabled or not */
  327. __IO uint32_t CLK_HIGH : 1; /*!< indicats if idle clock polarity is high level */
  328. __IO uint32_t NEG_EDGE : 1; /*!< 1, indicates SPI takes sample at the rise edge and transmit
  329. data at the trailing edge. 0, conversely. */
  330. __IO uint32_t TX_BIT_SEQUENCE: 1; /*!< transmit bit sequence. 0 : MSB is sent first */
  331. __IO uint32_t RX_BIT_SEQUENCE: 1; /*!< receive bit sequence. 0: MSB is received first */
  332. } CTRL_b; /*!< BitSize */
  333. };
  334. union {
  335. __IO uint32_t INT_MASK; /*!< interrupt mask Register */
  336. struct {
  337. __IO uint32_t RFIFO_UNDERFLOW: 1; /*!< receive fifo underflow interrupt */
  338. __IO uint32_t RFIFO_OVERFLOW: 1; /*!< receive fifo overflow interrupt */
  339. __IO uint32_t RFIFO_ALMOST_FULL: 1; /*!< receive fifo almost full interrupt */
  340. __IO uint32_t TFIFO_UNDERFLOW: 1; /*!< transmit fifo underflow interrupt */
  341. __IO uint32_t TFIFO_OVERFLOW: 1; /*!< transmit fifo overflow interrupt */
  342. __IO uint32_t TFIFO_ALMOST_EMPTY: 1; /*!< transmit fifo almost empty interrupt */
  343. __IO uint32_t DONE : 1; /*!< transmit done interrupt */
  344. } INT_MASK_b; /*!< BitSize */
  345. };
  346. union {
  347. __IO uint32_t INT_STATUS; /*!< interrupt Register */
  348. struct {
  349. __IO uint32_t RFIFO_UNDERFLOW: 1; /*!< receive fifo underflow interrupt */
  350. __IO uint32_t RFIFO_OVERFLOW: 1; /*!< receive fifo overflow interrupt */
  351. __IO uint32_t RFIFO_ALMOST_FULL: 1; /*!< receive fifo almost full interrupt */
  352. __IO uint32_t TFIFO_UNDERFLOW: 1; /*!< transmit fifo underflow interrupt */
  353. __IO uint32_t TFIFO_OVERFLOW: 1; /*!< transmit fifo overflow interrupt */
  354. __IO uint32_t TFIFO_ALMOST_EMPTY: 1; /*!< transmit fifo almost empty interrupt */
  355. __IO uint32_t DONE : 1; /*!< transmit done interrupt */
  356. } INT_STATUS_b; /*!< BitSize */
  357. };
  358. union {
  359. __IO uint32_t INT_RAW; /*!< interrupt raw Register */
  360. struct {
  361. __IO uint32_t RFIFO_UNDERFLOW: 1; /*!< receive fifo underflow interrupt */
  362. __IO uint32_t RFIFO_OVERFLOW: 1; /*!< receive fifo overflow interrupt */
  363. __IO uint32_t RFIFO_ALMOST_FULL: 1; /*!< receive fifo almost full interrupt */
  364. __IO uint32_t TFIFO_UNDERFLOW: 1; /*!< transmit fifo underflow interrupt */
  365. __IO uint32_t TFIFO_OVERFLOW: 1; /*!< transmit fifo overflow interrupt */
  366. __IO uint32_t TFIFO_ALMOST_EMPTY: 1; /*!< transmit fifo almost empty interrupt */
  367. __IO uint32_t DONE : 1; /*!< transmit done interrupt */
  368. } INT_RAW_b; /*!< BitSize */
  369. };
  370. union {
  371. __IO uint32_t BCNT; /*!< bit length while transmitting and receiving */
  372. struct {
  373. __IO uint32_t CNT : 5; /*!< bit length while transmitting and receiving, BCNT + 1 */
  374. } BCNT_b; /*!< BitSize */
  375. };
  376. __IO uint8_t GAP; /*!< half cycle number between continuous data frame */
  377. __I uint8_t RESERVED0[3];
  378. __IO uint16_t DIV; /*!< frequency division register, fsck = fclk_io / (DIV + 1) / 2 */
  379. __I uint16_t RESERVED1;
  380. __IO uint32_t TRANS_CNT; /*!< transmit data length, data number = TRANS_CNT + 1 */
  381. union {
  382. __O uint32_t TRANS_START; /*!< transmit startup register, write 1 to trigger transmision once */
  383. struct {
  384. __O uint32_t TX_TRIGGER : 1; /*!< write 1 to trigger transmision once */
  385. } TRANS_START_b; /*!< BitSize */
  386. };
  387. __IO uint32_t RW_DATA; /*!< raw data register */
  388. } SPI0_Type;
  389. /* ================================================================================ */
  390. /* ================ I2C0 ================ */
  391. /* ================================================================================ */
  392. /**
  393. * @brief I2C 0 (I2C0)
  394. */
  395. typedef struct { /*!< I2C0 Structure */
  396. union {
  397. __IO uint32_t CTRL; /*!< control Register */
  398. struct {
  399. __IO uint32_t MODE : 1; /*!< master or slave mode */
  400. __IO uint32_t MASTER_ADDR_WIDTH: 1; /*!< 7- or 10-bits address as a master */
  401. __IO uint32_t SLAVE_ADDR_WIDTH: 1; /*!< 7- or 10-bits address width as a slave */
  402. } CTRL_b; /*!< BitSize */
  403. };
  404. union {
  405. __IO uint16_t TAR; /*!< target address Register */
  406. struct {
  407. __IO uint16_t ADDR10 : 10; /*!< 7- or 10-bits address */
  408. __IO uint16_t START_BYTE : 1; /*!< Enable start Byte for each transfer */
  409. } TAR_b; /*!< BitSize */
  410. };
  411. __I uint16_t RESERVED0;
  412. union {
  413. __IO uint16_t SAR; /*!< slave address Register */
  414. struct {
  415. __IO uint16_t ADDR10 : 10; /*!< 7- or 10-bits address */
  416. } SAR_b; /*!< BitSize */
  417. };
  418. __I uint16_t RESERVED1;
  419. union {
  420. __IO uint32_t DATA_CMD; /*!< I2C transfer data/command entry */
  421. struct {
  422. __IO uint32_t DATA : 8; /*!< 8-bits data */
  423. __O uint32_t RD_CMD : 1; /*!< read command for master mode only, write 0 if slave mode */
  424. __O uint32_t WR_CMD : 1; /*!< write command for master mode only */
  425. __O uint32_t WR_RD_CMD : 1; /*!< write and read command for master mode only */
  426. } DATA_CMD_b; /*!< BitSize */
  427. };
  428. union {
  429. __IO uint32_t WRITE_READ_CNT; /*!< I2C write and read data byte counter Register */
  430. struct {
  431. __IO uint32_t RD_BYTE_CNT: 9; /*!< Decide the number of bytes read back as a master-receiver */
  432. uint32_t : 7;
  433. __IO uint32_t WR_BYTE_CNT: 9; /*!< Decide the number of byte to send as a master-transmitter */
  434. } WRITE_READ_CNT_b; /*!< BitSize */
  435. };
  436. union {
  437. __IO uint32_t SCL_CNT; /*!< I2C clk pulse counter */
  438. struct {
  439. __IO uint32_t HIGH_LEVEL_TICK: 16; /*!< the SCL clock high-period count */
  440. __IO uint32_t LOW_LEVEL_TICK: 16; /*!< the SCL clock low-period count */
  441. } SCL_CNT_b; /*!< BitSize */
  442. };
  443. __I uint32_t RESERVED2;
  444. union {
  445. __I uint32_t INT_STATUS; /*!< I2C interrupt sources */
  446. struct {
  447. __I uint32_t RX_UNDER : 1; /*!< receiver underflow */
  448. __I uint32_t RX_OVER : 1; /*!< receiver overflow */
  449. __I uint32_t RX_FULL : 1; /*!< receiver is full */
  450. __I uint32_t TX_OVER : 1; /*!< transmit overflow */
  451. __I uint32_t TX_EMPTY : 1; /*!< transmit is empty */
  452. __I uint32_t RD_REQ : 1; /*!< read request */
  453. __I uint32_t TX_ABRT : 1; /*!< transmit abortion */
  454. __I uint32_t RX_DONE : 1; /*!< receive done */
  455. __I uint32_t TX_DONE : 1; /*!< transmit done */
  456. __I uint32_t WR_REQ : 1; /*!< write request */
  457. } INT_STATUS_b; /*!< BitSize */
  458. };
  459. union {
  460. __IO uint32_t INT_MASK; /*!< I2C interrupt mask register */
  461. struct {
  462. __I uint32_t RX_UNDER : 1; /*!< receiver underflow */
  463. __I uint32_t RX_OVER : 1; /*!< receiver overflow */
  464. __I uint32_t RX_FULL : 1; /*!< receiver is full */
  465. __I uint32_t TX_OVER : 1; /*!< transmit overflow */
  466. __I uint32_t TX_EMPTY : 1; /*!< transmit is empty */
  467. __I uint32_t RD_REQ : 1; /*!< read request */
  468. __I uint32_t TX_ABRT : 1; /*!< transmit abortion */
  469. __I uint32_t RX_DONE : 1; /*!< receive done */
  470. __I uint32_t TX_DONE : 1; /*!< transmit done */
  471. __I uint32_t WR_REQ : 1; /*!< write request */
  472. } INT_MASK_b; /*!< BitSize */
  473. };
  474. __I uint32_t RESERVED3;
  475. union {
  476. __IO uint32_t RX_TL; /*!< I2C receive FIFO threshold */
  477. struct {
  478. __IO uint32_t THRESHOLD : 5; /*!< FIFO threashold */
  479. } RX_TL_b; /*!< BitSize */
  480. };
  481. union {
  482. __IO uint32_t TX_TL; /*!< I2C transmit FIFO threshold */
  483. struct {
  484. __IO uint32_t THRESHOLD : 5; /*!< FIFO threashold */
  485. } TX_TL_b; /*!< BitSize */
  486. };
  487. union {
  488. __I uint32_t CLR_ALL_INT; /*!< I2C clear all interrupt register */
  489. struct {
  490. __I uint32_t CLEAR : 1; /*!< Read this register to clear all individual interrupts */
  491. } CLR_ALL_INT_b; /*!< BitSize */
  492. };
  493. union {
  494. __I uint32_t CLR_RX_UNDER; /*!< I2C clear RX_UNDER interrupt */
  495. struct {
  496. __I uint32_t CLEAR : 1; /*!< Read this register to clear the RX_UNDER interrupt (bit 19)
  497. of the I2C_STATUS register */
  498. } CLR_RX_UNDER_b; /*!< BitSize */
  499. };
  500. union {
  501. __I uint32_t CLR_RX_OVER; /*!< I2C clear RX_OVER interrupt */
  502. struct {
  503. __I uint32_t CLEAR : 1; /*!< Read this register to clear the RX_OVER interrupt (bit 20) of
  504. the I2C_STATUS register */
  505. } CLR_RX_OVER_b; /*!< BitSize */
  506. };
  507. union {
  508. __I uint32_t CLR_TX_OVER; /*!< I2C clear TX_OVER interrupt */
  509. struct {
  510. __I uint32_t CLEAR : 1; /*!< Read this register to clear the TX_OVER interrupt (bit 22) of
  511. the I2C_STATUS register */
  512. } CLR_TX_OVER_b; /*!< BitSize */
  513. };
  514. union {
  515. __I uint32_t CLR_RD_REQ; /*!< I2C clear RD_REQ interrupt */
  516. struct {
  517. __I uint32_t CLEAR : 1; /*!< Read this register to clear the RD_REQ interrupt (bit 24) of
  518. the I2C_STATUS register */
  519. } CLR_RD_REQ_b; /*!< BitSize */
  520. };
  521. union {
  522. __I uint32_t CLR_TX_ABRT; /*!< I2C clear TX_ABRT interrupt */
  523. struct {
  524. __I uint32_t CLEAR : 1; /*!< Read this register to clear the TX_ABRT interrupts (bit 25 ,
  525. bit 18, bit 17, bit 16 and bit 15) of the I2C_STATUS register. */
  526. } CLR_TX_ABRT_b; /*!< BitSize */
  527. };
  528. union {
  529. __I uint32_t CLR_RX_DONE; /*!< I2C clear RX_DONE interrupt */
  530. struct {
  531. __I uint32_t CLEAR : 1; /*!< Read this register to clear the RX_DONE interrupt (bit 26) of
  532. the I2C_STATUS register */
  533. } CLR_RX_DONE_b; /*!< BitSize */
  534. };
  535. union {
  536. __IO uint32_t ENABLE; /*!< I2C enable register */
  537. struct {
  538. __IO uint32_t EN : 1; /*!< enable device */
  539. uint32_t : 30;
  540. __IO uint32_t RESET : 1; /*!< TX and RX FIFO are held in an erased state( flushed) and all
  541. interrupts deserted */
  542. } ENABLE_b; /*!< BitSize */
  543. };
  544. union {
  545. __I uint32_t STATUS; /*!< I2C status register */
  546. struct {
  547. __I uint32_t BUSY : 1; /*!< I2C busy Status */
  548. __I uint32_t TX_FIFO_NOT_FULL: 1; /*!< transmit FIFO is not full */
  549. __I uint32_t TX_FIFO_EMPTY: 1; /*!< transmit FIFO is empty */
  550. __I uint32_t RX_FIFO_NOT_EMPTY: 1; /*!< receive FIFO is not empty */
  551. __I uint32_t RX_FIFO_FULL: 1; /*!< receive FIFO is full */
  552. __I uint32_t EN : 1; /*!< I2C is enabled */
  553. __I uint32_t TX_BYTE_W_ACK: 9; /*!< Number of bytes sent to slave with acknowledge during the last
  554. write transaction as a master-transmitter only */
  555. __I uint32_t ABRT_ADDR_NOACK: 1; /*!< the address sent was not acknowledged by any slave as a master */
  556. __I uint32_t ABRT_TX_DATA_NOACK: 1; /*!< the data sent was not acknowledged by any slave as a master */
  557. __I uint32_t ABRT_SLAVE_FLUSH_TX_FIFO: 1; /*!< Slave has received a read command and some data exists in the
  558. TX FIFO so the slave issues a TX_ABRT interrupt to flush old
  559. data in TX FIFO */
  560. __I uint32_t ABRT_SLAVE_RD_IN_TX: 1; /*!< When the processor side responds to a slave mode request for
  561. data to be transmitted to a remote master and user writes a
  562. 1 in CMD (bit 8) of I2C_DATA_CMD register */
  563. __I uint32_t RX_UNDER : 1; /*!< receiver is underflow */
  564. __I uint32_t RX_OVER : 1; /*!< receiver is overflow */
  565. __I uint32_t RX_FULL : 1; /*!< receiver is full */
  566. __I uint32_t TX_OVER : 1; /*!< transmit is overflow */
  567. __I uint32_t TX_EMPTY : 1; /*!< transmit is empty */
  568. __I uint32_t RD_REQ : 1; /*!< read request is received */
  569. __I uint32_t TX_ABRT : 1; /*!< transmit is abort */
  570. __I uint32_t RX_DONE : 1; /*!< receive is done */
  571. __I uint32_t TX_DONE : 1; /*!< transmit is done */
  572. __I uint32_t WR_REQ : 1; /*!< write request is received */
  573. __I uint32_t MST_RD_FLAG: 1; /*!< Master is executing read command */
  574. __I uint32_t MST_WR_FLAG: 1; /*!< Master is executing read command */
  575. __I uint32_t MST_WR_RD_FLAG: 1; /*!< Master is executing write-read command */
  576. } STATUS_b; /*!< BitSize */
  577. };
  578. union {
  579. __I uint32_t TX_FIFO_LEVEL; /*!< I2C transmit FIFO level */
  580. struct {
  581. __I uint32_t LEVEL : 5; /*!< FIFO level */
  582. } TX_FIFO_LEVEL_b; /*!< BitSize */
  583. };
  584. union {
  585. __I uint32_t RX_FIFO_LEVEL; /*!< I2C receive FIFO level */
  586. struct {
  587. __I uint32_t LEVEL : 5; /*!< FIFO level */
  588. } RX_FIFO_LEVEL_b; /*!< BitSize */
  589. };
  590. __I uint32_t RESERVED4;
  591. union {
  592. __O uint32_t SLAVE_NACK; /*!< I2C slave send a data NACK */
  593. struct {
  594. __O uint32_t NACK : 1; /*!< data NACK */
  595. } SLAVE_NACK_b; /*!< BitSize */
  596. };
  597. __I uint32_t RESERVED5;
  598. union {
  599. __IO uint32_t SDA_SETUP; /*!< I2C SDA setup timer */
  600. struct {
  601. __IO uint32_t TSETUP : 10; /*!< This counter defines the max value of the following constrains:THD:STA
  602. TSU:STO,TSETUP: T / INPUT_CLK_PERIOD */
  603. __IO uint32_t TSU_DAT : 8; /*!< This counter defines the constrain of TSU:DAT: 250ns (or 100ns)
  604. / INPUT_CLK_PERIOD */
  605. } SDA_SETUP_b; /*!< BitSize */
  606. };
  607. union {
  608. __IO uint32_t TSU_STA_SETUP; /*!< I2C Tsu_sta and Tbuf_free timer */
  609. struct {
  610. __IO uint32_t TBUF : 10; /*!< This counter defines the constrain of bus free interval: Tbuf,
  611. Tbuf : Tbus_free / INPUT_CLK_PERIOD */
  612. __IO uint32_t TSU_STA : 10; /*!< This counter defines the constrain of Tsu:sta, Tsu:sta : Tsu:sta
  613. / INPUT_CLK_PERIOD */
  614. __IO uint32_t SDA_FILTER_CNT: 4; /*!< SDA filter count */
  615. __IO uint32_t SDA_FILTER_EN: 1; /*!< SDA filter enable bit */
  616. __IO uint32_t SCL_FILTER_CNT: 4; /*!< SCL filter count */
  617. __IO uint32_t SCL_FILTER_EN: 1; /*!< SCL filter enable bit */
  618. } TSU_STA_SETUP_b; /*!< BitSize */
  619. };
  620. union {
  621. __I uint32_t CLR_TX_DONE; /*!< I2C clear TX_DONE interrupt */
  622. struct {
  623. __I uint32_t CLEAR : 1; /*!< Read this register to clear the TX_DONE interrupt (bit 27) of
  624. the I2C_STATUS register */
  625. } CLR_TX_DONE_b; /*!< BitSize */
  626. };
  627. } I2C0_Type;
  628. /* ================================================================================ */
  629. /* ================ RTC ================ */
  630. /* ================================================================================ */
  631. /**
  632. * @brief RTC (RTC)
  633. */
  634. typedef struct { /*!< RTC Structure */
  635. union {
  636. __IO uint32_t INT_STATUS; /*!< interrupt Register */
  637. struct {
  638. __IO uint32_t SECOND : 1; /*!< 1s interrupt, write 1 clear 0 */
  639. __IO uint32_t MILLSECOND : 1; /*!< 1ms interrupt, write 1 clear 0 */
  640. } INT_STATUS_b; /*!< BitSize */
  641. };
  642. __IO uint32_t SECOND; /*!< current seconds of system time */
  643. union {
  644. __IO uint16_t MILLSECOND; /*!< current millseconds of system time */
  645. struct {
  646. __IO uint16_t MS : 10; /*!< micro seconds */
  647. } MILLSECOND_b; /*!< BitSize */
  648. };
  649. } RTC_Type;
  650. /* ================================================================================ */
  651. /* ================ GPIO ================ */
  652. /* ================================================================================ */
  653. /**
  654. * @brief GPIO (GPIO)
  655. */
  656. typedef struct { /*!< GPIO Structure */
  657. __I uint32_t GPIO_IN; /*!< GPIO input data */
  658. __IO uint32_t GPIO_OUT_UNMASK; /*!< GPIO output mask Register */
  659. __IO uint32_t GPIO_OUT_DATA; /*!< GPIO output data register */
  660. __IO uint32_t GPIO_OE; /*!< GPIO output driver enable */
  661. __IO uint32_t GPIO_INT_MASK; /*!< GPIO input interrupt mask */
  662. __IO uint32_t GPIO_INT_STATUS; /*!< GPIO input interrupt status */
  663. __IO uint32_t GPIO_INT_RAW; /*!< GPIO input interrupt raw */
  664. __IO uint32_t GPIO_POSITIVE_EDGE_INT_TRIGGER; /*!< triggers an interrupt while a positive edge, else negitive edge */
  665. union {
  666. __IO uint32_t PWM_OUT_SEL; /*!< Select gpio output from PWM */
  667. struct {
  668. __IO uint32_t GPIO_31 : 1; /*!< GPIO[31] is selected to output PWM */
  669. __IO uint32_t GPIO_H_9 : 1; /*!< GPIO_H[9] is selected to output PWM */
  670. __IO uint32_t GPIO_H_19 : 1; /*!< GPIO_H[19] is selected to output PWM */
  671. __IO uint32_t GPIO_H_20 : 1; /*!< GPIO_H[20] is selected to output PWM */
  672. } PWM_OUT_SEL_b; /*!< BitSize */
  673. };
  674. union {
  675. __IO uint32_t PWM_OUT0_LEN; /*!< Pwm channel 0 paramters */
  676. struct {
  677. __IO uint32_t LOW_LEVEL_TICK: 16; /*!< low level width = ticks + 1 */
  678. __IO uint32_t HIGH_LEVEL_TICK: 16; /*!< high level width = ticks + 1 */
  679. } PWM_OUT0_LEN_b; /*!< BitSize */
  680. };
  681. union {
  682. __IO uint32_t PWM_OUT1_LEN; /*!< Pwm channel 1 paramters */
  683. struct {
  684. __IO uint32_t LOW_LEVEL_TICK: 16; /*!< low level width = ticks + 1 */
  685. __IO uint32_t HIGH_LEVEL_TICK: 16; /*!< high level width = ticks + 1 */
  686. } PWM_OUT1_LEN_b; /*!< BitSize */
  687. };
  688. union {
  689. __IO uint32_t PWM_OUT2_LEN; /*!< Pwm channel 2 paramters */
  690. struct {
  691. __IO uint32_t LOW_LEVEL_TICK: 16; /*!< low level width = ticks + 1 */
  692. __IO uint32_t HIGH_LEVEL_TICK: 16; /*!< high level width = ticks + 1 */
  693. } PWM_OUT2_LEN_b; /*!< BitSize */
  694. };
  695. union {
  696. __IO uint32_t PWM_OUT3_LEN; /*!< Pwm channel 3 paramters */
  697. struct {
  698. __IO uint32_t LOW_LEVEL_TICK: 16; /*!< low level width = ticks + 1 */
  699. __IO uint32_t HIGH_LEVEL_TICK: 16; /*!< high level width = ticks + 1 */
  700. } PWM_OUT3_LEN_b; /*!< BitSize */
  701. };
  702. union {
  703. __IO uint32_t PWM_OUT_EN; /*!< Pwm enable */
  704. struct {
  705. __IO uint32_t GPIO_31 : 1; /*!< GPIO[31] is selected to output PWM */
  706. __IO uint32_t GPIO_H_9 : 1; /*!< GPIO_H[9] is selected to output PWM */
  707. __IO uint32_t GPIO_H_19 : 1; /*!< GPIO_H[19] is selected to output PWM */
  708. __IO uint32_t GPIO_H_20 : 1; /*!< GPIO_H[20] is selected to output PWM */
  709. } PWM_OUT_EN_b; /*!< BitSize */
  710. };
  711. __I uint32_t GPIO_H_IN; /*!< GPIO_H input data */
  712. __IO uint32_t GPIO_H_OUT_UNMASK; /*!< GPIO_H output unmask Register */
  713. __IO uint32_t GPIO_H_OUT_DATA; /*!< GPIO_H output data register */
  714. __IO uint32_t GPIO_H_OE; /*!< GPIO_H output driver enable */
  715. __IO uint32_t GPIO_H_INT_MASK; /*!< GPIO_H interrupt mask */
  716. __IO uint32_t GPIO_H_INT_STATUS; /*!< GPIO_H interrupt status */
  717. __IO uint32_t GPIO_H_INT_RAW; /*!< GPIO_H interrupt raw */
  718. __IO uint32_t GPIO_H_POSITIVE_EDGE_INT_TRIGGER; /*!< triggers an interrupt while a positive edge, else negitive edge */
  719. __I uint32_t GPIO_N_IN; /*!< GPIO_N input data */
  720. __IO uint32_t GPIO_N_OUT_UNMASK; /*!< GPIO_N output unmask Register */
  721. __IO uint32_t GPIO_N_OUT_DATA; /*!< GPIO_N output data register */
  722. __IO uint32_t GPIO_N_OE; /*!< GPIO_N output driver enable */
  723. __IO uint32_t GPIO_N_INT_MASK; /*!< GPIO_N interrupt mask */
  724. __IO uint32_t GPIO_N_INT_STATUS; /*!< GPIO_N interrupt status */
  725. __IO uint32_t GPIO_N_INT_RAW; /*!< GPIO_N interrupt raw */
  726. __IO uint32_t GPIO_N_POSITIVE_EDGE_INT_TRIGGER; /*!< triggers an interrupt while a positive edge, else negitive edge */
  727. } GPIO_Type;
  728. /* ================================================================================ */
  729. /* ================ NOR_FLASH ================ */
  730. /* ================================================================================ */
  731. /**
  732. * @brief NOR_FLASH (NOR_FLASH)
  733. */
  734. typedef struct { /*!< NOR_FLASH Structure */
  735. union {
  736. __IO uint32_t CTRL0; /*!< control Register 0 */
  737. struct {
  738. __IO uint32_t DIV : 8; /*!< frequency division register, fsck = fclk_io / (DIV + 1) / 2 */
  739. __IO uint32_t CS_REVALID_INTERVAL: 8; /*!< interval from CS invalid to valid, number of half cycle of SCK */
  740. __IO uint32_t RW_BYTE_CNT: 16; /*!< RW byte count (eliminate CMD, ADDRESS, DUMMY in normal state,
  741. contains all in transparent state. 0 is unlimited */
  742. } CTRL0_b; /*!< BitSize */
  743. };
  744. union {
  745. __IO uint32_t CTRL1; /*!< control Register 1 */
  746. struct {
  747. __IO uint32_t CMD : 8; /*!< operated command */
  748. __IO uint32_t ADDRESS : 24; /*!< RW address */
  749. } CTRL1_b; /*!< BitSize */
  750. };
  751. union {
  752. __IO uint32_t TRIGGER; /*!< trigger register */
  753. struct {
  754. __O uint32_t OP_START : 1; /*!< operation start. */
  755. __IO uint32_t OP_CLEAN : 1; /*!< operation clean, stop current opration and clean FIFO */
  756. __IO uint32_t TRSP_RD_EN : 1; /*!< if a read operation after transparent operation */
  757. __IO uint32_t TRSP_EN : 1; /*!< enable transparent operation */
  758. } TRIGGER_b; /*!< BitSize */
  759. };
  760. union {
  761. __I uint32_t STATUS; /*!< status register */
  762. struct {
  763. __I uint32_t BUSY : 1; /*!< reading or writting */
  764. __I uint32_t RD_FIFO_ALMOST_FULL: 1; /*!< read FIFO is almost full */
  765. __I uint32_t RD_FIFO_EMPTY: 1; /*!< read FIFO is empty */
  766. __I uint32_t RD_FIFO_FULL: 1; /*!< read FIFO is full */
  767. __I uint32_t WR_FIFO_ALMOST_EMPTY: 1; /*!< write FIFO is almost empty */
  768. __I uint32_t WR_FIFO_FULL: 1; /*!< write FIFO is full */
  769. __I uint32_t WR_FIFO_EMPTY: 1; /*!< write FIFO is empty */
  770. } STATUS_b; /*!< BitSize */
  771. };
  772. __IO uint32_t DATA; /*!< data register. lower bits are significant in read and higher
  773. bits are significant in writting */
  774. union {
  775. __IO uint32_t BYPASS; /*!< bypass Register, is used for JTAG connecting FLASH directly */
  776. struct {
  777. __IO uint32_t EN : 1; /*!< enable bypass */
  778. } BYPASS_b; /*!< BitSize */
  779. };
  780. } NOR_FLASH_Type;
  781. /* ================================================================================ */
  782. /* ================ ADC ================ */
  783. /* ================================================================================ */
  784. /**
  785. * @brief ADC (ADC)
  786. */
  787. typedef struct { /*!< ADC Structure */
  788. union {
  789. __IO uint32_t POWERDOWN_RESET; /*!< power down and reset Register */
  790. struct {
  791. __IO uint32_t RESET_ADC2 : 1; /*!< ADC2, reset, active high */
  792. __IO uint32_t RESET_ADC1 : 1; /*!< ADC1, reset, active high */
  793. __IO uint32_t POWERDOWN_ADC2: 1; /*!< ADC2, power down, active high */
  794. __IO uint32_t POWERDOWN_ADC1: 1; /*!< ADC1, power down, active high */
  795. } POWERDOWN_RESET_b; /*!< BitSize */
  796. };
  797. union {
  798. __IO uint32_t CFG0; /*!< config Register */
  799. struct {
  800. __IO uint32_t VSEN : 3; /*!< ADC-1 VSEN Selection */
  801. __IO uint32_t PHASE_CTRL : 2; /*!< ADC-1 and ADC-2 CLK Phase Control */
  802. } CFG0_b; /*!< BitSize */
  803. };
  804. union {
  805. __IO uint32_t CFG_ADC1; /*!< config ADC1 register */
  806. struct {
  807. __IO uint32_t SYSTEM_MODE: 3; /*!< system mode selection */
  808. __IO uint32_t CHANNEL_SEL: 4; /*!< channel selection */
  809. __IO uint32_t MULTI_CHANNEL_CONTINUE_SCAN: 1;/*!< If continue to scan multiply channel, else single scan */
  810. __IO uint32_t MULTI_CHANNEL_BIT: 8; /*!< each bit represents each channel */
  811. } CFG_ADC1_b; /*!< BitSize */
  812. };
  813. union {
  814. __IO uint32_t CFG_ADC2; /*!< config ADC1 register */
  815. struct {
  816. __IO uint32_t SYSTEM_MODE: 3; /*!< system mode selection */
  817. __IO uint32_t CHANNEL_SEL: 4; /*!< channel selection */
  818. __IO uint32_t MULTI_CHANNEL_CONTINUE_SCAN: 1;/*!< If continue to scan multiply channel, else single scan */
  819. __IO uint32_t MULTI_CHANNEL_BIT: 8; /*!< each bit represents each channel */
  820. } CFG_ADC2_b; /*!< BitSize */
  821. };
  822. union {
  823. __IO uint32_t ADC1_FIFO_CLEAR; /*!< clear adc1 fifo data */
  824. struct {
  825. __IO uint32_t CLEAR : 1; /*!< clear fifo data, active high */
  826. } ADC1_FIFO_CLEAR_b; /*!< BitSize */
  827. };
  828. union {
  829. __IO uint32_t ADC2_FIFO_CLEAR; /*!< clear adc2 fifo data */
  830. struct {
  831. __IO uint32_t CLEAR : 1; /*!< clear fifo data, active high */
  832. } ADC2_FIFO_CLEAR_b; /*!< BitSize */
  833. };
  834. union {
  835. __IO uint32_t ALL_ADC_FIFO_CLEAR; /*!< clear adc1 and adc2 fifo data */
  836. struct {
  837. __IO uint32_t CLEAR : 1; /*!< clear fifo data, active high */
  838. } ALL_ADC_FIFO_CLEAR_b; /*!< BitSize */
  839. };
  840. union {
  841. __IO uint32_t INT_MASK; /*!< interrupt mask register */
  842. struct {
  843. __IO uint32_t ADC1_ALMOST_FULL: 1; /*!< ADC 1 almost full */
  844. __IO uint32_t ADC1_OVERFLOW: 1; /*!< ADC 1 is overflow */
  845. __IO uint32_t ADC1_EMPTY_ERR: 1; /*!< ADC 1 read empty error */
  846. __IO uint32_t ADC2_ALMOST_FULL: 1; /*!< ADC 2 almost full */
  847. __IO uint32_t ADC2_OVERFLOW: 1; /*!< ADC 2 is overflow */
  848. __IO uint32_t ADC2_EMPTY_ERR: 1; /*!< ADC 2 read empty error */
  849. } INT_MASK_b; /*!< BitSize */
  850. };
  851. union {
  852. __IO uint32_t INT_RAW; /*!< interrupt raw register */
  853. struct {
  854. __IO uint32_t ADC1_ALMOST_FULL: 1; /*!< ADC 1 almost full */
  855. __IO uint32_t ADC1_OVERFLOW: 1; /*!< ADC 1 is overflow */
  856. __IO uint32_t ADC1_EMPTY_ERR: 1; /*!< ADC 1 read empty error */
  857. __IO uint32_t ADC2_ALMOST_FULL: 1; /*!< ADC 2 almost full */
  858. __IO uint32_t ADC2_OVERFLOW: 1; /*!< ADC 2 is overflow */
  859. __IO uint32_t ADC2_EMPTY_ERR: 1; /*!< ADC 2 read empty error */
  860. } INT_RAW_b; /*!< BitSize */
  861. };
  862. union {
  863. __IO uint32_t INT_STATUS; /*!< interrupt status register */
  864. struct {
  865. __IO uint32_t ADC1_ALMOST_FULL: 1; /*!< ADC 1 almost full */
  866. __IO uint32_t ADC1_OVERFLOW: 1; /*!< ADC 1 is overflow */
  867. __IO uint32_t ADC1_EMPTY_ERR: 1; /*!< ADC 1 read empty error */
  868. __IO uint32_t ADC2_ALMOST_FULL: 1; /*!< ADC 2 almost full */
  869. __IO uint32_t ADC2_OVERFLOW: 1; /*!< ADC 2 is overflow */
  870. __IO uint32_t ADC2_EMPTY_ERR: 1; /*!< ADC 2 read empty error */
  871. } INT_STATUS_b; /*!< BitSize */
  872. };
  873. __I uint32_t ADC1_OUT; /*!< ADC-1 Output data (Signed-Magnitude Format) */
  874. __I uint32_t ADC2_OUT; /*!< ADC-2 Output data (Signed-Magnitude Format) */
  875. __I uint32_t ADC1_OUT_OFFSET_CALIBRATION; /*!< ADC-1 Output in offset calibration when Input=0, Ideally DAO[11:0]=000h */
  876. __I uint32_t ADC2_OUT_OFFSET_CALIBRATION; /*!< ADC-2 Output in offset calibration when Input=0, Ideally DAO[11:0]=000h */
  877. __I uint32_t ADC1_OUT_NEGTIVE_GAIN_CALIBRATION; /*!< ADC-1 Output in gain calibration when Input=-FS, Ideally DAO[11:0]=801h */
  878. __I uint32_t ADC2_OUT_NEGTIVE_GAIN_CALIBRATION; /*!< ADC-2 Output in gain calibration when Input=-FS, Ideally DAO[11:0]=801h */
  879. __I uint32_t ADC1_OUT_POSITIVE_GAIN_CALIBRATION;/*!< ADC-1 Output in gain calibration when Input=FS, Ideally DAO[11:0]=7FFh */
  880. __I uint32_t ADC2_OUT_POSITIVE_GAIN_CALIBRATION;/*!< ADC-2 Output in gain calibration when Input=FS, Ideally DAO[11:0]=7FFh */
  881. union {
  882. __I uint32_t EOC; /*!< Conversion End Indicator */
  883. struct {
  884. __I uint32_t ADC2_EOC_GAIN: 1; /*!< ADC2 EOC_GAIN signal, conversion is done */
  885. __I uint32_t ADC2_EOC_OFF: 1; /*!< ADC2 EOC_OFF signal, conversion is done */
  886. __I uint32_t ADC2_EOC : 1; /*!< ADC2 EOC signal, conversion is done */
  887. __I uint32_t ADC1_EOC_GAIN: 1; /*!< ADC1 EOC_GAIN signal, conversion is done */
  888. __I uint32_t ADC1_EOC_OFF: 1; /*!< ADC1 EOC_OFF signal, conversion is done */
  889. __I uint32_t ADC1_EOC : 1; /*!< ADC1 EOC signal, conversion is done */
  890. } EOC_b; /*!< BitSize */
  891. };
  892. union {
  893. __I uint32_t BUSY; /*!< ADC is busy */
  894. struct {
  895. __I uint32_t ADC1_BUSY : 1; /*!< ADC1 is busy */
  896. __I uint32_t ADC2_BUSY : 1; /*!< ADC2 is busy */
  897. } BUSY_b; /*!< BitSize */
  898. };
  899. union {
  900. __O uint32_t ADC1_START; /*!< ADC1 startup enable */
  901. struct {
  902. __O uint32_t EN : 1; /*!< start */
  903. } ADC1_START_b; /*!< BitSize */
  904. };
  905. union {
  906. __O uint32_t ADC1_STOP; /*!< ADC1 stop enable */
  907. struct {
  908. __O uint32_t EN : 1; /*!< start */
  909. } ADC1_STOP_b; /*!< BitSize */
  910. };
  911. union {
  912. __O uint16_t ADC1_FIFO_READ; /*!< ADC1 FIFO read data */
  913. struct {
  914. __O uint16_t DATA : 12; /*!< data */
  915. __O uint16_t CHANNEL : 4; /*!< channel number */
  916. } ADC1_FIFO_READ_b; /*!< BitSize */
  917. };
  918. __I uint16_t RESERVED0;
  919. union {
  920. __O uint32_t ADC2_START; /*!< ADC2 startup enable, only for single-conversion */
  921. struct {
  922. __O uint32_t EN : 1; /*!< start */
  923. } ADC2_START_b; /*!< BitSize */
  924. };
  925. union {
  926. __O uint32_t ADC2_STOP; /*!< ADC1 stop enable, only for single-conversion */
  927. struct {
  928. __O uint32_t EN : 1; /*!< start */
  929. } ADC2_STOP_b; /*!< BitSize */
  930. };
  931. union {
  932. __O uint16_t ADC2_FIFO_READ; /*!< ADC2 FIFO read data */
  933. struct {
  934. __O uint16_t DATA : 12; /*!< data */
  935. __O uint16_t CHANNEL : 4; /*!< channel number */
  936. } ADC2_FIFO_READ_b; /*!< BitSize */
  937. };
  938. __I uint16_t RESERVED1;
  939. union {
  940. __O uint32_t ALL_ADC_START; /*!< all ADCs start */
  941. struct {
  942. __O uint32_t EN : 1; /*!< start */
  943. } ALL_ADC_START_b; /*!< BitSize */
  944. };
  945. union {
  946. __O uint32_t ALL_ADC_STOP; /*!< all ADCs stop */
  947. struct {
  948. __O uint32_t EN : 1; /*!< start */
  949. } ALL_ADC_STOP_b; /*!< BitSize */
  950. };
  951. union {
  952. __I uint32_t ALL_ADC_FIFO_READ; /*!< all ADCs FIFO read data */
  953. struct {
  954. __I uint32_t ADC1_DATA : 12; /*!< ADC1 data */
  955. __I uint32_t ADC1_CHANNEL: 4; /*!< ADC1 channel number */
  956. __I uint32_t ADC2_DATA : 12; /*!< ADC2 data */
  957. __I uint32_t ADC2_CHANNEL: 4; /*!< ADC2 channel number */
  958. } ALL_ADC_FIFO_READ_b; /*!< BitSize */
  959. };
  960. union {
  961. __I uint32_t STATUS; /*!< status register */
  962. struct {
  963. __I uint32_t ADC1_READ_EMPTY: 1; /*!< ADC1 read empty */
  964. __I uint32_t ADC2_READ_EMPTY: 1; /*!< ADC2 read empty */
  965. __I uint32_t ADC1_READ_ALMOST_EMPTY: 1; /*!< ADC1 read almost empty */
  966. __I uint32_t ADC2_READ_ALMOST_EMPTY: 1; /*!< ADC2 read almost empty */
  967. __I uint32_t ADC1_WRITE_FULL: 1; /*!< ADC1 write full */
  968. __I uint32_t ADC2_WRITE_FULL: 1; /*!< ADC2 write full */
  969. __I uint32_t ADC1_WRITE_ALMOST_FULL: 1; /*!< ADC1 write almost full */
  970. __I uint32_t ADC2_WRITE_ALMOST_FULL: 1; /*!< ADC2 write almost full */
  971. } STATUS_b; /*!< BitSize */
  972. };
  973. } ADC_Type;
  974. /* ================================================================================ */
  975. /* ================ EFUSE ================ */
  976. /* ================================================================================ */
  977. /**
  978. * @brief EFUSE (EFUSE)
  979. */
  980. typedef struct { /*!< EFUSE Structure */
  981. union {
  982. __IO uint32_t USER_CTRL_LOW; /*!< low user region control */
  983. struct {
  984. __IO uint32_t WR_EN : 1; /*!< write enable. 1 : write data into EFUSE. clear 0 after read */
  985. __IO uint32_t RD_EN : 1; /*!< read enable. 1 : write data into EFUSE. clear 0 after read */
  986. __I uint32_t BUSY : 1; /*!< reading or writting */
  987. __IO uint32_t COMPARE_FAIL: 1; /*!< data read isn't consist with EFUSE */
  988. __I uint32_t RD_CRC_ERR : 1; /*!< CRC error in reading */
  989. __I uint32_t WR_CRC_ERR : 1; /*!< CRC error in writting */
  990. __I uint32_t LOCK : 1; /*!< user region in EFUSE is locked, EFUSE can't be burn */
  991. __IO uint32_t TMRF : 2; /*!< Reference resistor select, 1200ohm is recommended */
  992. } USER_CTRL_LOW_b; /*!< BitSize */
  993. };
  994. union {
  995. __IO uint32_t TIMING_0; /*!< timing 0 */
  996. struct {
  997. __IO uint32_t TPRS : 7; /*!< TPRS */
  998. __IO uint32_t TESR : 2; /*!< TESR */
  999. __IO uint32_t TRC : 4; /*!< TRC */
  1000. __IO uint32_t TRPW : 3; /*!< TRPW */
  1001. __IO uint32_t TRAH : 2; /*!< TRAH */
  1002. __IO uint32_t TRAC : 3; /*!< TRAC */
  1003. uint32_t : 6;
  1004. __IO uint32_t TPWPH : 5; /*!< TPWPH[6:2] */
  1005. } TIMING_0_b; /*!< BitSize */
  1006. };
  1007. union {
  1008. __IO uint32_t TIMING_1; /*!< timing 1 */
  1009. struct {
  1010. __IO uint32_t TPWPS : 7; /*!< TPWPS */
  1011. __IO uint32_t TEPS : 4; /*!< TEPS */
  1012. __IO uint32_t TPP : 11; /*!< TPP */
  1013. __IO uint32_t TPIT : 8; /*!< TPIT */
  1014. __IO uint32_t TPWPH : 2; /*!< TPWPS[1:0] */
  1015. } TIMING_1_b; /*!< BitSize */
  1016. };
  1017. __IO uint32_t USER_DATA0_LOW; /*!< user data [31:0] */
  1018. __IO uint32_t USER_DATA1_LOW; /*!< user data [63:32] */
  1019. __IO uint32_t USER_DATA2_LOW; /*!< user data [95:64] */
  1020. __IO uint32_t USER_DATA3_LOW; /*!< user data [127:96] */
  1021. union {
  1022. __IO uint32_t USER_DATA4_LOW; /*!< crc and lock bit */
  1023. struct {
  1024. __IO uint32_t LOCK : 1; /*!< write protection if true */
  1025. uint32_t : 23;
  1026. __IO uint32_t CRC : 8; /*!< CRC */
  1027. } USER_DATA4_LOW_b; /*!< BitSize */
  1028. };
  1029. __I uint32_t RESERVED0[3];
  1030. union {
  1031. __IO uint32_t USER_CTRL_HI; /*!< high user region control */
  1032. struct {
  1033. __IO uint32_t WR_EN : 1; /*!< write enable. 1 : write data into EFUSE. clear 0 after read */
  1034. __IO uint32_t RD_EN : 1; /*!< read enable. 1 : write data into EFUSE. clear 0 after read */
  1035. __I uint32_t BUSY : 1; /*!< reading or writting */
  1036. __IO uint32_t COMPARE_FAIL: 1; /*!< data read isn't consist with EFUSE */
  1037. __I uint32_t RD_CRC_ERR : 1; /*!< CRC error in reading */
  1038. __I uint32_t WR_CRC_ERR : 1; /*!< CRC error in writting */
  1039. __I uint32_t LOCK : 1; /*!< user region in EFUSE is locked, EFUSE can't be burn */
  1040. __IO uint32_t TMRF : 2; /*!< Reference resistor select, 1200ohm is recommended */
  1041. } USER_CTRL_HI_b; /*!< BitSize */
  1042. };
  1043. __IO uint32_t USER_DATA0_HI; /*!< user data [159:128] */
  1044. __IO uint32_t USER_DATA1_HI; /*!< user data [191:160] */
  1045. __IO uint32_t USER_DATA2_HI; /*!< user data [223:192] */
  1046. __IO uint32_t USER_DATA3_HI; /*!< user data [255:224] */
  1047. union {
  1048. __IO uint32_t USER_DATA4_HI; /*!< crc and lock bit */
  1049. struct {
  1050. __IO uint32_t LOCK : 1; /*!< write protection if true */
  1051. uint32_t : 23;
  1052. __IO uint32_t CRC : 8; /*!< CRC */
  1053. } USER_DATA4_HI_b; /*!< BitSize */
  1054. };
  1055. } EFUSE_Type;
  1056. /* ================================================================================ */
  1057. /* ================ CAN0 ================ */
  1058. /* ================================================================================ */
  1059. /**
  1060. * @brief CAN 0 (CAN0)
  1061. */
  1062. typedef struct { /*!< CAN0 Structure */
  1063. union {
  1064. __IO uint8_t MODE; /*!< mode Register */
  1065. struct {
  1066. __IO uint8_t RM : 1; /*!< reset mode if 1 or operation mode */
  1067. __IO uint8_t LOM : 1; /*!< Listen only mode */
  1068. __IO uint8_t STM : 1; /*!< self test mode */
  1069. __IO uint8_t AFM : 1; /*!< acceptance filter mode. Single filter if 1, dual filter if 0 */
  1070. __IO uint8_t SM : 1; /*!< sleep mode */
  1071. } MODE_b; /*!< BitSize */
  1072. };
  1073. __I uint8_t RESERVED0[3];
  1074. union {
  1075. __O uint8_t CMD; /*!< command Register */
  1076. struct {
  1077. __O uint8_t TR : 1; /*!< Set to 1 when a message is to be transmitted */
  1078. __O uint8_t AT : 1; /*!< Set to 1 to cancel the next transmission request */
  1079. __O uint8_t RRB : 1; /*!< Set to 1 to release the Receive Buffer */
  1080. __O uint8_t CDO : 1; /*!< Set to 1 to clear the data overrun condition signaled by the
  1081. Data Overrun Status bit (SR.1). */
  1082. __O uint8_t SSR : 1; /*!< Set to 1 when a message is to be transmitted and received simultaneously */
  1083. } CMD_b; /*!< BitSize */
  1084. };
  1085. __I uint8_t RESERVED1[3];
  1086. union {
  1087. __I uint8_t STATUS; /*!< status Register */
  1088. struct {
  1089. __I uint8_t RBNE : 1; /*!< Receive Buffer not empty */
  1090. __I uint8_t DO : 1; /*!< Data Overrun Status */
  1091. __I uint8_t TB_UNLOCK : 1; /*!< Transmit Buffer is unlocked and not in transmitting */
  1092. __I uint8_t TC : 1; /*!< Transmission complete */
  1093. __I uint8_t RXING : 1; /*!< receiving the data */
  1094. __I uint8_t TXING : 1; /*!< transmitting the data */
  1095. __I uint8_t ERR : 1; /*!< At least one of the error counters is more than Error Warning
  1096. Limit Register */
  1097. __I uint8_t BUS_OFF : 1; /*!< in 'Bus Off' state */
  1098. } STATUS_b; /*!< BitSize */
  1099. };
  1100. __I uint8_t RESERVED2[3];
  1101. union {
  1102. __I uint8_t INT; /*!< interrupt Register */
  1103. struct {
  1104. __I uint8_t RBNF : 1; /*!< Receive Buffer not empty */
  1105. __I uint8_t TB_UNLOCK : 1; /*!< Transmit Buffer is unlocked and not in transmitting */
  1106. __I uint8_t ERR : 1; /*!< Set on every change (set or clear) of either the Bus Status
  1107. or Error Status bits (SR.7,SR.6) */
  1108. __I uint8_t DO : 1; /*!< Data Overrun Status */
  1109. __I uint8_t WAKEUP : 1; /*!< wake-up */
  1110. __I uint8_t EP : 1; /*!< Set when the MCAN2 re-enters error active state after being
  1111. in error passive state or when at least one error counter exceeds
  1112. the protocol-defined level of 127 */
  1113. __I uint8_t AL : 1; /*!< Set when the MCAN2 loses arbitration and becomes a receiver */
  1114. __I uint8_t BUS_ERR : 1; /*!< Set when the MCAN2 detects an error on the CAN-bus */
  1115. } INT_b; /*!< BitSize */
  1116. };
  1117. __I uint8_t RESERVED3[3];
  1118. union {
  1119. __IO uint8_t INT_EN; /*!< interrupt enabled Register */
  1120. struct {
  1121. __I uint8_t RBNF : 1; /*!< Receive Buffer not empty */
  1122. __I uint8_t TB_UNLOCK : 1; /*!< Transmit Buffer is unlocked and not in transmitting */
  1123. __I uint8_t ERR : 1; /*!< Set on every change (set or clear) of either the Bus Status
  1124. or Error Status bits (SR.7,SR.6) */
  1125. __I uint8_t DO : 1; /*!< Data Overrun Status */
  1126. __I uint8_t WAKEUP : 1; /*!< wake-up */
  1127. __I uint8_t EP : 1; /*!< Set when the MCAN2 re-enters error active state after being
  1128. in error passive state or when at least one error counter exceeds
  1129. the protocol-defined level of 127 */
  1130. __I uint8_t AL : 1; /*!< Set when the MCAN2 loses arbitration and becomes a receiver */
  1131. __I uint8_t BUS_ERR : 1; /*!< Set when the MCAN2 detects an error on the CAN-bus */
  1132. } INT_EN_b; /*!< BitSize */
  1133. };
  1134. __I uint8_t RESERVED4[7];
  1135. union {
  1136. __IO uint8_t BTR0; /*!< Bus Timing 0 */
  1137. struct {
  1138. __IO uint8_t BRP : 6; /*!< TQ =2 x Txtal1 x (32 x BRP.5 + 16 x BRP.4 + 8 x BRP.3 + 4 x
  1139. BRP.2 + 2 x BRP.1 + BRP.0 + 1) */
  1140. __IO uint8_t SJW : 2; /*!< the maximum number of time quanta of sync segment */
  1141. } BTR0_b; /*!< BitSize */
  1142. };
  1143. __I uint8_t RESERVED5[3];
  1144. union {
  1145. __IO uint8_t BTR1; /*!< Bus Timing 1 */
  1146. struct {
  1147. __IO uint8_t TSEG1 : 4; /*!< the maximum number of time quanta of propagation and 1st phase
  1148. segment */
  1149. __IO uint8_t TSEG2 : 3; /*!< the maximum number of time quanta of 2nd phase segment */
  1150. __IO uint8_t SAM : 1; /*!< sample times. Sample 3 times if 1, once if 0 */
  1151. } BTR1_b; /*!< BitSize */
  1152. };
  1153. __I uint8_t RESERVED6[3];
  1154. union {
  1155. __IO uint8_t OCR; /*!< Output Control Register */
  1156. struct {
  1157. __IO uint8_t MODE : 2; /*!< output control mode */
  1158. } OCR_b; /*!< BitSize */
  1159. };
  1160. __I uint8_t RESERVED7[11];
  1161. union {
  1162. __I uint8_t ALC; /*!< Arbitration Lost Capture */
  1163. struct {
  1164. __I uint8_t BIT : 5; /*!< the current position of the Bit Processor when bus arbitration
  1165. lost, 1st bit (ID.28) if 0 */
  1166. } ALC_b; /*!< BitSize */
  1167. };
  1168. __I uint8_t RESERVED8[3];
  1169. union {
  1170. __I uint8_t ECC; /*!< Error Code Capture */
  1171. struct {
  1172. __I uint8_t SEGMENT : 5; /*!< segment code */
  1173. __I uint8_t DIRECTION : 1; /*!< If 1, the error occurred during reception. If 0, the error occurred
  1174. during transmission */
  1175. __I uint8_t ERR : 2; /*!< error code */
  1176. } ECC_b; /*!< BitSize */
  1177. };
  1178. __I uint8_t RESERVED9[3];
  1179. __IO uint8_t EWLR; /*!< Error Warning Limit */
  1180. __I uint8_t RESERVED10[3];
  1181. __IO uint8_t RXERR; /*!< Receive Error Counter */
  1182. __I uint8_t RESERVED11[3];
  1183. __IO uint8_t TXERR; /*!< Transmit Error Counter */
  1184. __I uint8_t RESERVED12[3];
  1185. union {
  1186. __IO uint8_t FI_OR_ACR0; /*!< Transmit Frame Information if writting or Receive Frame Information
  1187. if reading, ACR[0] if reset mode */
  1188. struct {
  1189. __IO uint8_t DLC : 4; /*!< byte number in the data */
  1190. uint8_t : 2;
  1191. __IO uint8_t RTR : 1; /*!< 1 indicates a remote frame; 0 indicates a data frame */
  1192. __IO uint8_t FF : 1; /*!< 1 selects Extended Frame Format (EFF); 0 selects Standard Frame
  1193. Format (SFF) */
  1194. } FI_OR_ACR0_b; /*!< BitSize */
  1195. };
  1196. __I uint8_t RESERVED13[3];
  1197. __IO uint8_t DI0_OR_ACR1; /*!< Transmit data Information if writting or Receive data Information
  1198. if reading, ACR[1] if reset mode */
  1199. __I uint8_t RESERVED14[3];
  1200. __IO uint8_t DI1_OR_ACR2; /*!< Transmit data Information if writting or Receive data Information
  1201. if reading, ACR[2] if reset mode */
  1202. __I uint8_t RESERVED15[3];
  1203. __IO uint8_t DI2_OR_ACR3; /*!< Transmit data Information if writting or Receive data Information
  1204. if reading, ACR[3] if reset mode */
  1205. __I uint8_t RESERVED16[3];
  1206. __IO uint8_t DI3_OR_AMR0; /*!< Transmit data Information if writting or Receive data Information
  1207. if reading, AMR[0] if reset mode */
  1208. __I uint8_t RESERVED17[3];
  1209. __IO uint8_t DI4_OR_AMR1; /*!< Transmit data Information if writting or Receive data Information
  1210. if reading, AMR[1] if reset mode */
  1211. __I uint8_t RESERVED18[3];
  1212. __IO uint8_t DI5_OR_AMR2; /*!< Transmit data Information if writting or Receive data Information
  1213. if reading, AMR[2] if reset mode */
  1214. __I uint8_t RESERVED19[3];
  1215. __IO uint8_t DI6_OR_AMR3; /*!< Transmit data Information if writting or Receive data Information
  1216. if reading, AMR[3] if reset mode */
  1217. __I uint8_t RESERVED20[3];
  1218. __IO uint8_t DI7; /*!< Transmit data Information if writting or Receive data Information
  1219. if reading */
  1220. __I uint8_t RESERVED21[3];
  1221. __IO uint8_t DI8; /*!< Transmit data Information if writting or Receive data Information
  1222. if reading */
  1223. __I uint8_t RESERVED22[3];
  1224. __IO uint8_t DI9; /*!< Transmit data Information if writting or Receive data Information
  1225. if reading */
  1226. __I uint8_t RESERVED23[3];
  1227. __IO uint8_t DI10; /*!< Transmit data Information if writting or Receive data Information
  1228. if reading */
  1229. __I uint8_t RESERVED24[3];
  1230. __IO uint8_t DI11; /*!< Transmit data Information if writting or Receive data Information
  1231. if reading */
  1232. __I uint8_t RESERVED25[3];
  1233. __IO uint8_t RMC; /*!< Receive Message Counter */
  1234. __I uint8_t RESERVED26[7];
  1235. union {
  1236. __IO uint8_t CDR; /*!< Clock Divider Register */
  1237. struct {
  1238. __IO uint8_t DIVIDER : 3; /*!< divider of XTAL1 */
  1239. __IO uint8_t OFF : 1; /*!< disable XTAL1 */
  1240. } CDR_b; /*!< BitSize */
  1241. };
  1242. } CAN0_Type;
  1243. /* ================================================================================ */
  1244. /* ================ DMA ================ */
  1245. /* ================================================================================ */
  1246. /**
  1247. * @brief DMA (DMA)
  1248. */
  1249. typedef struct { /*!< DMA Structure */
  1250. __IO uint32_t SAR0; /*!< Current Source Address of DMA transfer */
  1251. __I uint32_t RESERVED0;
  1252. __IO uint32_t DAR0; /*!< Current Destination Address of DMA transfer */
  1253. __I uint32_t RESERVED1;
  1254. union {
  1255. __IO uint32_t LLP0; /*!< Linked List Pointer Register for Channel */
  1256. struct {
  1257. __IO uint32_t LMS : 2; /*!< Identifies the AHB layer/interface where the memory device that
  1258. stores the next linked list item resides. */
  1259. __IO uint32_t LOC : 30; /*!< Starting Address In Memory of next LLI if block chaining is
  1260. enabled */
  1261. } LLP0_b; /*!< BitSize */
  1262. };
  1263. __I uint32_t RESERVED2;
  1264. union {
  1265. __IO uint32_t CTL_LOW0; /*!< Lower 32-bits Control Register for Channel */
  1266. struct {
  1267. __IO uint32_t INT_EN : 1; /*!< Interrupt Enable Bit */
  1268. __IO uint32_t DST_TR_WIDTH: 3; /*!< Destination Transfer Width */
  1269. __IO uint32_t SRC_TR_WIDTH: 3; /*!< Source Transfer Width */
  1270. __IO uint32_t DINC : 2; /*!< Destination Address Increment */
  1271. __IO uint32_t SINC : 2; /*!< Source Address Increment */
  1272. __IO uint32_t DEST_MSIZE : 3; /*!< Destination Burst Transaction Length */
  1273. __IO uint32_t SRC_MSIZE : 3; /*!< Source Burst Transaction Length */
  1274. __IO uint32_t SRC_GATHER_EN: 1; /*!< Source gather enable bit */
  1275. __IO uint32_t DST_SCATTER_EN: 1; /*!< Destination scatter enable bit */
  1276. uint32_t : 1;
  1277. __IO uint32_t TT_FC : 3; /*!< Transfer Type and Flow Control */
  1278. __IO uint32_t DMS : 2; /*!< Destination Master Select */
  1279. __IO uint32_t SMS : 2; /*!< Source Master Select */
  1280. __IO uint32_t LLP_DST_EN : 1; /*!< Block chaining is enabled on the destination side */
  1281. __IO uint32_t LLP_SRC_EN : 1; /*!< Block chaining is enabled on the source side */
  1282. } CTL_LOW0_b; /*!< BitSize */
  1283. };
  1284. union {
  1285. __IO uint32_t CTL_HI0; /*!< Higher 32-bits Control Register for Channel */
  1286. struct {
  1287. __IO uint32_t BLOCK_TS : 12; /*!< indicates the total number of single transactions to perform
  1288. for every block transfer */
  1289. __IO uint32_t DONE : 1; /*!< a block transfer is complete */
  1290. } CTL_HI0_b; /*!< BitSize */
  1291. };
  1292. __IO uint32_t SSTAT0; /*!< Source Status Register for Channel */
  1293. __I uint32_t RESERVED3;
  1294. __IO uint32_t DSTAT0; /*!< Destination Status Register for Channel */
  1295. __I uint32_t RESERVED4;
  1296. __IO uint32_t SSTATAR0; /*!< Source Status Address Register for Channel */
  1297. __I uint32_t RESERVED5;
  1298. __IO uint32_t DSTATAR0; /*!< Destination Status Address Register for Channel */
  1299. __I uint32_t RESERVED6;
  1300. union {
  1301. __IO uint32_t CFG_LOW0; /*!< Lower 32-bit Configuration Register for Channel */
  1302. struct {
  1303. uint32_t : 5;
  1304. __IO uint32_t CH_PRIOR : 3; /*!< Channel priority. A priority of 7 is the highest priority */
  1305. __IO uint32_t CH_SUSP : 1; /*!< Suspends all DMA data transfers from the source until this bit
  1306. is cleared. */
  1307. __I uint32_t FIFO_EMPTY : 1; /*!< Indicates if there is data left in the channel FIFO */
  1308. __IO uint32_t HS_SEL_DST : 1; /*!< If Destination Software handshaking interface */
  1309. __IO uint32_t HS_SEL_SRC : 1; /*!< If Source Software handshaking interface */
  1310. __IO uint32_t LOCK_CH_L : 2; /*!< Indicates the duration over which CFGx.LOCK_CH bit applies. */
  1311. __IO uint32_t LOCK_B_L : 2; /*!< Indicates the duration over which CFGx.LOCK_B bit applies. */
  1312. __IO uint32_t LOCK_CH : 1; /*!< Channel Lock Bit */
  1313. __IO uint32_t LOCK_B : 1; /*!< Bus Lock Bit */
  1314. __IO uint32_t DST_HS_POL : 1; /*!< Destination Handshaking Interface Polarity. 0: active high */
  1315. __IO uint32_t SRC_HS_POL : 1; /*!< Source Handshaking Interface Polarity. 0: active high */
  1316. __IO uint32_t MAX_ABRST : 10; /*!< Maximum AMBA Burst Length */
  1317. __IO uint32_t RELOAD_SRC : 1; /*!< Automatic Source Reload */
  1318. __IO uint32_t RELOAD_DST : 1; /*!< Automatic Destination Reload */
  1319. } CFG_LOW0_b; /*!< BitSize */
  1320. };
  1321. union {
  1322. __IO uint32_t CFG_HI0; /*!< Higher 32-bit Configuration Register for Channel */
  1323. struct {
  1324. __IO uint32_t FCMODE : 1; /*!< if source transaction requests aren't serviced when the Destination
  1325. Peripheral is the flow controller. */
  1326. __IO uint32_t FIFO_MODE : 1; /*!< Determines space or data needs to be available in the FIFO before
  1327. a burst transaction request is serviced. */
  1328. __IO uint32_t PROTCTL : 3; /*!< There is a one-to-one mapping of these register bits to the
  1329. HPROT[3:1] master interface signals */
  1330. __IO uint32_t DS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1331. __IO uint32_t SS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1332. } CFG_HI0_b; /*!< BitSize */
  1333. };
  1334. union {
  1335. __IO uint32_t SGR0; /*!< Source Gather Register for Channel */
  1336. struct {
  1337. __IO uint32_t SGI : 20; /*!< Source gather interval */
  1338. __IO uint32_t SGC : 12; /*!< Specifies the number of contiguous source transfers of CTLx.SRC_TR_WIDTH */
  1339. } SGR0_b; /*!< BitSize */
  1340. };
  1341. __I uint32_t RESERVED7;
  1342. union {
  1343. __IO uint32_t DSR0; /*!< Destination Scatter Register for Channel */
  1344. struct {
  1345. __IO uint32_t DSI : 20; /*!< Destination scatter interval */
  1346. __IO uint32_t DSC : 12; /*!< Specifies the number of contiguous destination transfers of
  1347. CTLx.DST_TR_WIDTH */
  1348. } DSR0_b; /*!< BitSize */
  1349. };
  1350. __I uint32_t RESERVED8;
  1351. __IO uint32_t SAR1; /*!< Current Source Address of DMA transfer */
  1352. __I uint32_t RESERVED9;
  1353. __IO uint32_t DAR1; /*!< Current Destination Address of DMA transfer */
  1354. __I uint32_t RESERVED10;
  1355. union {
  1356. __IO uint32_t LLP1; /*!< Linked List Pointer Register for Channel */
  1357. struct {
  1358. __IO uint32_t LMS : 2; /*!< Identifies the AHB layer/interface where the memory device that
  1359. stores the next linked list item resides. */
  1360. __IO uint32_t LOC : 30; /*!< Starting Address In Memory of next LLI if block chaining is
  1361. enabled */
  1362. } LLP1_b; /*!< BitSize */
  1363. };
  1364. __I uint32_t RESERVED11;
  1365. union {
  1366. __IO uint32_t CTL_LOW1; /*!< Lower 32-bits Control Register for Channel */
  1367. struct {
  1368. __IO uint32_t INT_EN : 1; /*!< Interrupt Enable Bit */
  1369. __IO uint32_t DST_TR_WIDTH: 3; /*!< Destination Transfer Width */
  1370. __IO uint32_t SRC_TR_WIDTH: 3; /*!< Source Transfer Width */
  1371. __IO uint32_t DINC : 2; /*!< Destination Address Increment */
  1372. __IO uint32_t SINC : 2; /*!< Source Address Increment */
  1373. __IO uint32_t DEST_MSIZE : 3; /*!< Destination Burst Transaction Length */
  1374. __IO uint32_t SRC_MSIZE : 3; /*!< Source Burst Transaction Length */
  1375. __IO uint32_t SRC_GATHER_EN: 1; /*!< Source gather enable bit */
  1376. __IO uint32_t DST_SCATTER_EN: 1; /*!< Destination scatter enable bit */
  1377. uint32_t : 1;
  1378. __IO uint32_t TT_FC : 3; /*!< Transfer Type and Flow Control */
  1379. __IO uint32_t DMS : 2; /*!< Destination Master Select */
  1380. __IO uint32_t SMS : 2; /*!< Source Master Select */
  1381. __IO uint32_t LLP_DST_EN : 1; /*!< Block chaining is enabled on the destination side */
  1382. __IO uint32_t LLP_SRC_EN : 1; /*!< Block chaining is enabled on the source side */
  1383. } CTL_LOW1_b; /*!< BitSize */
  1384. };
  1385. union {
  1386. __IO uint32_t CTL_HI1; /*!< Higher 32-bits Control Register for Channel */
  1387. struct {
  1388. __IO uint32_t BLOCK_TS : 12; /*!< indicates the total number of single transactions to perform
  1389. for every block transfer */
  1390. __IO uint32_t DONE : 1; /*!< a block transfer is complete */
  1391. } CTL_HI1_b; /*!< BitSize */
  1392. };
  1393. __IO uint32_t SSTAT1; /*!< Source Status Register for Channel */
  1394. __I uint32_t RESERVED12;
  1395. __IO uint32_t DSTAT1; /*!< Destination Status Register for Channel */
  1396. __I uint32_t RESERVED13;
  1397. __IO uint32_t SSTATAR1; /*!< Source Status Address Register for Channel */
  1398. __I uint32_t RESERVED14;
  1399. __IO uint32_t DSTATAR1; /*!< Destination Status Address Register for Channel */
  1400. __I uint32_t RESERVED15;
  1401. union {
  1402. __IO uint32_t CFG_LOW1; /*!< Lower 32-bit Configuration Register for Channel */
  1403. struct {
  1404. uint32_t : 5;
  1405. __IO uint32_t CH_PRIOR : 3; /*!< Channel priority. A priority of 7 is the highest priority */
  1406. __IO uint32_t CH_SUSP : 1; /*!< Suspends all DMA data transfers from the source until this bit
  1407. is cleared. */
  1408. __I uint32_t FIFO_EMPTY : 1; /*!< Indicates if there is data left in the channel FIFO */
  1409. __IO uint32_t HS_SEL_DST : 1; /*!< If Destination Software handshaking interface */
  1410. __IO uint32_t HS_SEL_SRC : 1; /*!< If Source Software handshaking interface */
  1411. __IO uint32_t LOCK_CH_L : 2; /*!< Indicates the duration over which CFGx.LOCK_CH bit applies. */
  1412. __IO uint32_t LOCK_B_L : 2; /*!< Indicates the duration over which CFGx.LOCK_B bit applies. */
  1413. __IO uint32_t LOCK_CH : 1; /*!< Channel Lock Bit */
  1414. __IO uint32_t LOCK_B : 1; /*!< Bus Lock Bit */
  1415. __IO uint32_t DST_HS_POL : 1; /*!< Destination Handshaking Interface Polarity. 0: active high */
  1416. __IO uint32_t SRC_HS_POL : 1; /*!< Source Handshaking Interface Polarity. 0: active high */
  1417. __IO uint32_t MAX_ABRST : 10; /*!< Maximum AMBA Burst Length */
  1418. __IO uint32_t RELOAD_SRC : 1; /*!< Automatic Source Reload */
  1419. __IO uint32_t RELOAD_DST : 1; /*!< Automatic Destination Reload */
  1420. } CFG_LOW1_b; /*!< BitSize */
  1421. };
  1422. union {
  1423. __IO uint32_t CFG_HI1; /*!< Higher 32-bit Configuration Register for Channel */
  1424. struct {
  1425. __IO uint32_t FCMODE : 1; /*!< if source transaction requests aren't serviced when the Destination
  1426. Peripheral is the flow controller. */
  1427. __IO uint32_t FIFO_MODE : 1; /*!< Determines space or data needs to be available in the FIFO before
  1428. a burst transaction request is serviced. */
  1429. __IO uint32_t PROTCTL : 3; /*!< There is a one-to-one mapping of these register bits to the
  1430. HPROT[3:1] master interface signals */
  1431. __IO uint32_t DS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1432. __IO uint32_t SS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1433. } CFG_HI1_b; /*!< BitSize */
  1434. };
  1435. union {
  1436. __IO uint32_t SGR1; /*!< Source Gather Register for Channel */
  1437. struct {
  1438. __IO uint32_t SGI : 20; /*!< Source gather interval */
  1439. __IO uint32_t SGC : 12; /*!< Specifies the number of contiguous source transfers of CTLx.SRC_TR_WIDTH */
  1440. } SGR1_b; /*!< BitSize */
  1441. };
  1442. __I uint32_t RESERVED16;
  1443. union {
  1444. __IO uint32_t DSR1; /*!< Destination Scatter Register for Channel */
  1445. struct {
  1446. __IO uint32_t DSI : 20; /*!< Destination scatter interval */
  1447. __IO uint32_t DSC : 12; /*!< Specifies the number of contiguous destination transfers of
  1448. CTLx.DST_TR_WIDTH */
  1449. } DSR1_b; /*!< BitSize */
  1450. };
  1451. __I uint32_t RESERVED17;
  1452. __IO uint32_t SAR2; /*!< Current Source Address of DMA transfer */
  1453. __I uint32_t RESERVED18;
  1454. __IO uint32_t DAR2; /*!< Current Destination Address of DMA transfer */
  1455. __I uint32_t RESERVED19;
  1456. union {
  1457. __IO uint32_t LLP2; /*!< Linked List Pointer Register for Channel */
  1458. struct {
  1459. __IO uint32_t LMS : 2; /*!< Identifies the AHB layer/interface where the memory device that
  1460. stores the next linked list item resides. */
  1461. __IO uint32_t LOC : 30; /*!< Starting Address In Memory of next LLI if block chaining is
  1462. enabled */
  1463. } LLP2_b; /*!< BitSize */
  1464. };
  1465. __I uint32_t RESERVED20;
  1466. union {
  1467. __IO uint32_t CTL_LOW2; /*!< Lower 32-bits Control Register for Channel */
  1468. struct {
  1469. __IO uint32_t INT_EN : 1; /*!< Interrupt Enable Bit */
  1470. __IO uint32_t DST_TR_WIDTH: 3; /*!< Destination Transfer Width */
  1471. __IO uint32_t SRC_TR_WIDTH: 3; /*!< Source Transfer Width */
  1472. __IO uint32_t DINC : 2; /*!< Destination Address Increment */
  1473. __IO uint32_t SINC : 2; /*!< Source Address Increment */
  1474. __IO uint32_t DEST_MSIZE : 3; /*!< Destination Burst Transaction Length */
  1475. __IO uint32_t SRC_MSIZE : 3; /*!< Source Burst Transaction Length */
  1476. __IO uint32_t SRC_GATHER_EN: 1; /*!< Source gather enable bit */
  1477. __IO uint32_t DST_SCATTER_EN: 1; /*!< Destination scatter enable bit */
  1478. uint32_t : 1;
  1479. __IO uint32_t TT_FC : 3; /*!< Transfer Type and Flow Control */
  1480. __IO uint32_t DMS : 2; /*!< Destination Master Select */
  1481. __IO uint32_t SMS : 2; /*!< Source Master Select */
  1482. __IO uint32_t LLP_DST_EN : 1; /*!< Block chaining is enabled on the destination side */
  1483. __IO uint32_t LLP_SRC_EN : 1; /*!< Block chaining is enabled on the source side */
  1484. } CTL_LOW2_b; /*!< BitSize */
  1485. };
  1486. union {
  1487. __IO uint32_t CTL_HI2; /*!< Higher 32-bits Control Register for Channel */
  1488. struct {
  1489. __IO uint32_t BLOCK_TS : 12; /*!< indicates the total number of single transactions to perform
  1490. for every block transfer */
  1491. __IO uint32_t DONE : 1; /*!< a block transfer is complete */
  1492. } CTL_HI2_b; /*!< BitSize */
  1493. };
  1494. __IO uint32_t SSTAT2; /*!< Source Status Register for Channel */
  1495. __I uint32_t RESERVED21;
  1496. __IO uint32_t DSTAT2; /*!< Destination Status Register for Channel */
  1497. __I uint32_t RESERVED22;
  1498. __IO uint32_t SSTATAR2; /*!< Source Status Address Register for Channel */
  1499. __I uint32_t RESERVED23;
  1500. __IO uint32_t DSTATAR2; /*!< Destination Status Address Register for Channel */
  1501. __I uint32_t RESERVED24;
  1502. union {
  1503. __IO uint32_t CFG_LOW2; /*!< Lower 32-bit Configuration Register for Channel */
  1504. struct {
  1505. uint32_t : 5;
  1506. __IO uint32_t CH_PRIOR : 3; /*!< Channel priority. A priority of 7 is the highest priority */
  1507. __IO uint32_t CH_SUSP : 1; /*!< Suspends all DMA data transfers from the source until this bit
  1508. is cleared. */
  1509. __I uint32_t FIFO_EMPTY : 1; /*!< Indicates if there is data left in the channel FIFO */
  1510. __IO uint32_t HS_SEL_DST : 1; /*!< If Destination Software handshaking interface */
  1511. __IO uint32_t HS_SEL_SRC : 1; /*!< If Source Software handshaking interface */
  1512. __IO uint32_t LOCK_CH_L : 2; /*!< Indicates the duration over which CFGx.LOCK_CH bit applies. */
  1513. __IO uint32_t LOCK_B_L : 2; /*!< Indicates the duration over which CFGx.LOCK_B bit applies. */
  1514. __IO uint32_t LOCK_CH : 1; /*!< Channel Lock Bit */
  1515. __IO uint32_t LOCK_B : 1; /*!< Bus Lock Bit */
  1516. __IO uint32_t DST_HS_POL : 1; /*!< Destination Handshaking Interface Polarity. 0: active high */
  1517. __IO uint32_t SRC_HS_POL : 1; /*!< Source Handshaking Interface Polarity. 0: active high */
  1518. __IO uint32_t MAX_ABRST : 10; /*!< Maximum AMBA Burst Length */
  1519. __IO uint32_t RELOAD_SRC : 1; /*!< Automatic Source Reload */
  1520. __IO uint32_t RELOAD_DST : 1; /*!< Automatic Destination Reload */
  1521. } CFG_LOW2_b; /*!< BitSize */
  1522. };
  1523. union {
  1524. __IO uint32_t CFG_HI2; /*!< Higher 32-bit Configuration Register for Channel */
  1525. struct {
  1526. __IO uint32_t FCMODE : 1; /*!< if source transaction requests aren't serviced when the Destination
  1527. Peripheral is the flow controller. */
  1528. __IO uint32_t FIFO_MODE : 1; /*!< Determines space or data needs to be available in the FIFO before
  1529. a burst transaction request is serviced. */
  1530. __IO uint32_t PROTCTL : 3; /*!< There is a one-to-one mapping of these register bits to the
  1531. HPROT[3:1] master interface signals */
  1532. __IO uint32_t DS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1533. __IO uint32_t SS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1534. } CFG_HI2_b; /*!< BitSize */
  1535. };
  1536. union {
  1537. __IO uint32_t SGR2; /*!< Source Gather Register for Channel */
  1538. struct {
  1539. __IO uint32_t SGI : 20; /*!< Source gather interval */
  1540. __IO uint32_t SGC : 12; /*!< Specifies the number of contiguous source transfers of CTLx.SRC_TR_WIDTH */
  1541. } SGR2_b; /*!< BitSize */
  1542. };
  1543. __I uint32_t RESERVED25;
  1544. union {
  1545. __IO uint32_t DSR2; /*!< Destination Scatter Register for Channel */
  1546. struct {
  1547. __IO uint32_t DSI : 20; /*!< Destination scatter interval */
  1548. __IO uint32_t DSC : 12; /*!< Specifies the number of contiguous destination transfers of
  1549. CTLx.DST_TR_WIDTH */
  1550. } DSR2_b; /*!< BitSize */
  1551. };
  1552. __I uint32_t RESERVED26;
  1553. __IO uint32_t SAR3; /*!< Current Source Address of DMA transfer */
  1554. __I uint32_t RESERVED27;
  1555. __IO uint32_t DAR3; /*!< Current Destination Address of DMA transfer */
  1556. __I uint32_t RESERVED28;
  1557. union {
  1558. __IO uint32_t LLP3; /*!< Linked List Pointer Register for Channel */
  1559. struct {
  1560. __IO uint32_t LMS : 2; /*!< Identifies the AHB layer/interface where the memory device that
  1561. stores the next linked list item resides. */
  1562. __IO uint32_t LOC : 30; /*!< Starting Address In Memory of next LLI if block chaining is
  1563. enabled */
  1564. } LLP3_b; /*!< BitSize */
  1565. };
  1566. __I uint32_t RESERVED29;
  1567. union {
  1568. __IO uint32_t CTL_LOW3; /*!< Lower 32-bits Control Register for Channel */
  1569. struct {
  1570. __IO uint32_t INT_EN : 1; /*!< Interrupt Enable Bit */
  1571. __IO uint32_t DST_TR_WIDTH: 3; /*!< Destination Transfer Width */
  1572. __IO uint32_t SRC_TR_WIDTH: 3; /*!< Source Transfer Width */
  1573. __IO uint32_t DINC : 2; /*!< Destination Address Increment */
  1574. __IO uint32_t SINC : 2; /*!< Source Address Increment */
  1575. __IO uint32_t DEST_MSIZE : 3; /*!< Destination Burst Transaction Length */
  1576. __IO uint32_t SRC_MSIZE : 3; /*!< Source Burst Transaction Length */
  1577. __IO uint32_t SRC_GATHER_EN: 1; /*!< Source gather enable bit */
  1578. __IO uint32_t DST_SCATTER_EN: 1; /*!< Destination scatter enable bit */
  1579. uint32_t : 1;
  1580. __IO uint32_t TT_FC : 3; /*!< Transfer Type and Flow Control */
  1581. __IO uint32_t DMS : 2; /*!< Destination Master Select */
  1582. __IO uint32_t SMS : 2; /*!< Source Master Select */
  1583. __IO uint32_t LLP_DST_EN : 1; /*!< Block chaining is enabled on the destination side */
  1584. __IO uint32_t LLP_SRC_EN : 1; /*!< Block chaining is enabled on the source side */
  1585. } CTL_LOW3_b; /*!< BitSize */
  1586. };
  1587. union {
  1588. __IO uint32_t CTL_HI3; /*!< Higher 32-bits Control Register for Channel */
  1589. struct {
  1590. __IO uint32_t BLOCK_TS : 12; /*!< indicates the total number of single transactions to perform
  1591. for every block transfer */
  1592. __IO uint32_t DONE : 1; /*!< a block transfer is complete */
  1593. } CTL_HI3_b; /*!< BitSize */
  1594. };
  1595. __IO uint32_t SSTAT3; /*!< Source Status Register for Channel */
  1596. __I uint32_t RESERVED30;
  1597. __IO uint32_t DSTAT3; /*!< Destination Status Register for Channel */
  1598. __I uint32_t RESERVED31;
  1599. __IO uint32_t SSTATAR3; /*!< Source Status Address Register for Channel */
  1600. __I uint32_t RESERVED32;
  1601. __IO uint32_t DSTATAR3; /*!< Destination Status Address Register for Channel */
  1602. __I uint32_t RESERVED33;
  1603. union {
  1604. __IO uint32_t CFG_LOW3; /*!< Lower 32-bit Configuration Register for Channel */
  1605. struct {
  1606. uint32_t : 5;
  1607. __IO uint32_t CH_PRIOR : 3; /*!< Channel priority. A priority of 7 is the highest priority */
  1608. __IO uint32_t CH_SUSP : 1; /*!< Suspends all DMA data transfers from the source until this bit
  1609. is cleared. */
  1610. __I uint32_t FIFO_EMPTY : 1; /*!< Indicates if there is data left in the channel FIFO */
  1611. __IO uint32_t HS_SEL_DST : 1; /*!< If Destination Software handshaking interface */
  1612. __IO uint32_t HS_SEL_SRC : 1; /*!< If Source Software handshaking interface */
  1613. __IO uint32_t LOCK_CH_L : 2; /*!< Indicates the duration over which CFGx.LOCK_CH bit applies. */
  1614. __IO uint32_t LOCK_B_L : 2; /*!< Indicates the duration over which CFGx.LOCK_B bit applies. */
  1615. __IO uint32_t LOCK_CH : 1; /*!< Channel Lock Bit */
  1616. __IO uint32_t LOCK_B : 1; /*!< Bus Lock Bit */
  1617. __IO uint32_t DST_HS_POL : 1; /*!< Destination Handshaking Interface Polarity. 0: active high */
  1618. __IO uint32_t SRC_HS_POL : 1; /*!< Source Handshaking Interface Polarity. 0: active high */
  1619. __IO uint32_t MAX_ABRST : 10; /*!< Maximum AMBA Burst Length */
  1620. __IO uint32_t RELOAD_SRC : 1; /*!< Automatic Source Reload */
  1621. __IO uint32_t RELOAD_DST : 1; /*!< Automatic Destination Reload */
  1622. } CFG_LOW3_b; /*!< BitSize */
  1623. };
  1624. union {
  1625. __IO uint32_t CFG_HI3; /*!< Higher 32-bit Configuration Register for Channel */
  1626. struct {
  1627. __IO uint32_t FCMODE : 1; /*!< if source transaction requests aren't serviced when the Destination
  1628. Peripheral is the flow controller. */
  1629. __IO uint32_t FIFO_MODE : 1; /*!< Determines space or data needs to be available in the FIFO before
  1630. a burst transaction request is serviced. */
  1631. __IO uint32_t PROTCTL : 3; /*!< There is a one-to-one mapping of these register bits to the
  1632. HPROT[3:1] master interface signals */
  1633. __IO uint32_t DS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1634. __IO uint32_t SS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1635. } CFG_HI3_b; /*!< BitSize */
  1636. };
  1637. union {
  1638. __IO uint32_t SGR3; /*!< Source Gather Register for Channel */
  1639. struct {
  1640. __IO uint32_t SGI : 20; /*!< Source gather interval */
  1641. __IO uint32_t SGC : 12; /*!< Specifies the number of contiguous source transfers of CTLx.SRC_TR_WIDTH */
  1642. } SGR3_b; /*!< BitSize */
  1643. };
  1644. __I uint32_t RESERVED34;
  1645. union {
  1646. __IO uint32_t DSR3; /*!< Destination Scatter Register for Channel */
  1647. struct {
  1648. __IO uint32_t DSI : 20; /*!< Destination scatter interval */
  1649. __IO uint32_t DSC : 12; /*!< Specifies the number of contiguous destination transfers of
  1650. CTLx.DST_TR_WIDTH */
  1651. } DSR3_b; /*!< BitSize */
  1652. };
  1653. __I uint32_t RESERVED35;
  1654. __IO uint32_t SAR4; /*!< Current Source Address of DMA transfer */
  1655. __I uint32_t RESERVED36;
  1656. __IO uint32_t DAR4; /*!< Current Destination Address of DMA transfer */
  1657. __I uint32_t RESERVED37;
  1658. union {
  1659. __IO uint32_t LLP4; /*!< Linked List Pointer Register for Channel */
  1660. struct {
  1661. __IO uint32_t LMS : 2; /*!< Identifies the AHB layer/interface where the memory device that
  1662. stores the next linked list item resides. */
  1663. __IO uint32_t LOC : 30; /*!< Starting Address In Memory of next LLI if block chaining is
  1664. enabled */
  1665. } LLP4_b; /*!< BitSize */
  1666. };
  1667. __I uint32_t RESERVED38;
  1668. union {
  1669. __IO uint32_t CTL_LOW4; /*!< Lower 32-bits Control Register for Channel */
  1670. struct {
  1671. __IO uint32_t INT_EN : 1; /*!< Interrupt Enable Bit */
  1672. __IO uint32_t DST_TR_WIDTH: 3; /*!< Destination Transfer Width */
  1673. __IO uint32_t SRC_TR_WIDTH: 3; /*!< Source Transfer Width */
  1674. __IO uint32_t DINC : 2; /*!< Destination Address Increment */
  1675. __IO uint32_t SINC : 2; /*!< Source Address Increment */
  1676. __IO uint32_t DEST_MSIZE : 3; /*!< Destination Burst Transaction Length */
  1677. __IO uint32_t SRC_MSIZE : 3; /*!< Source Burst Transaction Length */
  1678. __IO uint32_t SRC_GATHER_EN: 1; /*!< Source gather enable bit */
  1679. __IO uint32_t DST_SCATTER_EN: 1; /*!< Destination scatter enable bit */
  1680. uint32_t : 1;
  1681. __IO uint32_t TT_FC : 3; /*!< Transfer Type and Flow Control */
  1682. __IO uint32_t DMS : 2; /*!< Destination Master Select */
  1683. __IO uint32_t SMS : 2; /*!< Source Master Select */
  1684. __IO uint32_t LLP_DST_EN : 1; /*!< Block chaining is enabled on the destination side */
  1685. __IO uint32_t LLP_SRC_EN : 1; /*!< Block chaining is enabled on the source side */
  1686. } CTL_LOW4_b; /*!< BitSize */
  1687. };
  1688. union {
  1689. __IO uint32_t CTL_HI4; /*!< Higher 32-bits Control Register for Channel */
  1690. struct {
  1691. __IO uint32_t BLOCK_TS : 12; /*!< indicates the total number of single transactions to perform
  1692. for every block transfer */
  1693. __IO uint32_t DONE : 1; /*!< a block transfer is complete */
  1694. } CTL_HI4_b; /*!< BitSize */
  1695. };
  1696. __IO uint32_t SSTAT4; /*!< Source Status Register for Channel */
  1697. __I uint32_t RESERVED39;
  1698. __IO uint32_t DSTAT4; /*!< Destination Status Register for Channel */
  1699. __I uint32_t RESERVED40;
  1700. __IO uint32_t SSTATAR4; /*!< Source Status Address Register for Channel */
  1701. __I uint32_t RESERVED41;
  1702. __IO uint32_t DSTATAR4; /*!< Destination Status Address Register for Channel */
  1703. __I uint32_t RESERVED42;
  1704. union {
  1705. __IO uint32_t CFG_LOW4; /*!< Lower 32-bit Configuration Register for Channel */
  1706. struct {
  1707. uint32_t : 5;
  1708. __IO uint32_t CH_PRIOR : 3; /*!< Channel priority. A priority of 7 is the highest priority */
  1709. __IO uint32_t CH_SUSP : 1; /*!< Suspends all DMA data transfers from the source until this bit
  1710. is cleared. */
  1711. __I uint32_t FIFO_EMPTY : 1; /*!< Indicates if there is data left in the channel FIFO */
  1712. __IO uint32_t HS_SEL_DST : 1; /*!< If Destination Software handshaking interface */
  1713. __IO uint32_t HS_SEL_SRC : 1; /*!< If Source Software handshaking interface */
  1714. __IO uint32_t LOCK_CH_L : 2; /*!< Indicates the duration over which CFGx.LOCK_CH bit applies. */
  1715. __IO uint32_t LOCK_B_L : 2; /*!< Indicates the duration over which CFGx.LOCK_B bit applies. */
  1716. __IO uint32_t LOCK_CH : 1; /*!< Channel Lock Bit */
  1717. __IO uint32_t LOCK_B : 1; /*!< Bus Lock Bit */
  1718. __IO uint32_t DST_HS_POL : 1; /*!< Destination Handshaking Interface Polarity. 0: active high */
  1719. __IO uint32_t SRC_HS_POL : 1; /*!< Source Handshaking Interface Polarity. 0: active high */
  1720. __IO uint32_t MAX_ABRST : 10; /*!< Maximum AMBA Burst Length */
  1721. __IO uint32_t RELOAD_SRC : 1; /*!< Automatic Source Reload */
  1722. __IO uint32_t RELOAD_DST : 1; /*!< Automatic Destination Reload */
  1723. } CFG_LOW4_b; /*!< BitSize */
  1724. };
  1725. union {
  1726. __IO uint32_t CFG_HI4; /*!< Higher 32-bit Configuration Register for Channel */
  1727. struct {
  1728. __IO uint32_t FCMODE : 1; /*!< if source transaction requests aren't serviced when the Destination
  1729. Peripheral is the flow controller. */
  1730. __IO uint32_t FIFO_MODE : 1; /*!< Determines space or data needs to be available in the FIFO before
  1731. a burst transaction request is serviced. */
  1732. __IO uint32_t PROTCTL : 3; /*!< There is a one-to-one mapping of these register bits to the
  1733. HPROT[3:1] master interface signals */
  1734. __IO uint32_t DS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1735. __IO uint32_t SS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1736. } CFG_HI4_b; /*!< BitSize */
  1737. };
  1738. union {
  1739. __IO uint32_t SGR4; /*!< Source Gather Register for Channel */
  1740. struct {
  1741. __IO uint32_t SGI : 20; /*!< Source gather interval */
  1742. __IO uint32_t SGC : 12; /*!< Specifies the number of contiguous source transfers of CTLx.SRC_TR_WIDTH */
  1743. } SGR4_b; /*!< BitSize */
  1744. };
  1745. __I uint32_t RESERVED43;
  1746. union {
  1747. __IO uint32_t DSR4; /*!< Destination Scatter Register for Channel */
  1748. struct {
  1749. __IO uint32_t DSI : 20; /*!< Destination scatter interval */
  1750. __IO uint32_t DSC : 12; /*!< Specifies the number of contiguous destination transfers of
  1751. CTLx.DST_TR_WIDTH */
  1752. } DSR4_b; /*!< BitSize */
  1753. };
  1754. __I uint32_t RESERVED44;
  1755. __IO uint32_t SAR5; /*!< Current Source Address of DMA transfer */
  1756. __I uint32_t RESERVED45;
  1757. __IO uint32_t DAR5; /*!< Current Destination Address of DMA transfer */
  1758. __I uint32_t RESERVED46;
  1759. union {
  1760. __IO uint32_t LLP5; /*!< Linked List Pointer Register for Channel */
  1761. struct {
  1762. __IO uint32_t LMS : 2; /*!< Identifies the AHB layer/interface where the memory device that
  1763. stores the next linked list item resides. */
  1764. __IO uint32_t LOC : 30; /*!< Starting Address In Memory of next LLI if block chaining is
  1765. enabled */
  1766. } LLP5_b; /*!< BitSize */
  1767. };
  1768. __I uint32_t RESERVED47;
  1769. union {
  1770. __IO uint32_t CTL_LOW5; /*!< Lower 32-bits Control Register for Channel */
  1771. struct {
  1772. __IO uint32_t INT_EN : 1; /*!< Interrupt Enable Bit */
  1773. __IO uint32_t DST_TR_WIDTH: 3; /*!< Destination Transfer Width */
  1774. __IO uint32_t SRC_TR_WIDTH: 3; /*!< Source Transfer Width */
  1775. __IO uint32_t DINC : 2; /*!< Destination Address Increment */
  1776. __IO uint32_t SINC : 2; /*!< Source Address Increment */
  1777. __IO uint32_t DEST_MSIZE : 3; /*!< Destination Burst Transaction Length */
  1778. __IO uint32_t SRC_MSIZE : 3; /*!< Source Burst Transaction Length */
  1779. __IO uint32_t SRC_GATHER_EN: 1; /*!< Source gather enable bit */
  1780. __IO uint32_t DST_SCATTER_EN: 1; /*!< Destination scatter enable bit */
  1781. uint32_t : 1;
  1782. __IO uint32_t TT_FC : 3; /*!< Transfer Type and Flow Control */
  1783. __IO uint32_t DMS : 2; /*!< Destination Master Select */
  1784. __IO uint32_t SMS : 2; /*!< Source Master Select */
  1785. __IO uint32_t LLP_DST_EN : 1; /*!< Block chaining is enabled on the destination side */
  1786. __IO uint32_t LLP_SRC_EN : 1; /*!< Block chaining is enabled on the source side */
  1787. } CTL_LOW5_b; /*!< BitSize */
  1788. };
  1789. union {
  1790. __IO uint32_t CTL_HI5; /*!< Higher 32-bits Control Register for Channel */
  1791. struct {
  1792. __IO uint32_t BLOCK_TS : 12; /*!< indicates the total number of single transactions to perform
  1793. for every block transfer */
  1794. __IO uint32_t DONE : 1; /*!< a block transfer is complete */
  1795. } CTL_HI5_b; /*!< BitSize */
  1796. };
  1797. __IO uint32_t SSTAT5; /*!< Source Status Register for Channel */
  1798. __I uint32_t RESERVED48;
  1799. __IO uint32_t DSTAT5; /*!< Destination Status Register for Channel */
  1800. __I uint32_t RESERVED49;
  1801. __IO uint32_t SSTATAR5; /*!< Source Status Address Register for Channel */
  1802. __I uint32_t RESERVED50;
  1803. __IO uint32_t DSTATAR5; /*!< Destination Status Address Register for Channel */
  1804. __I uint32_t RESERVED51;
  1805. union {
  1806. __IO uint32_t CFG_LOW5; /*!< Lower 32-bit Configuration Register for Channel */
  1807. struct {
  1808. uint32_t : 5;
  1809. __IO uint32_t CH_PRIOR : 3; /*!< Channel priority. A priority of 7 is the highest priority */
  1810. __IO uint32_t CH_SUSP : 1; /*!< Suspends all DMA data transfers from the source until this bit
  1811. is cleared. */
  1812. __I uint32_t FIFO_EMPTY : 1; /*!< Indicates if there is data left in the channel FIFO */
  1813. __IO uint32_t HS_SEL_DST : 1; /*!< If Destination Software handshaking interface */
  1814. __IO uint32_t HS_SEL_SRC : 1; /*!< If Source Software handshaking interface */
  1815. __IO uint32_t LOCK_CH_L : 2; /*!< Indicates the duration over which CFGx.LOCK_CH bit applies. */
  1816. __IO uint32_t LOCK_B_L : 2; /*!< Indicates the duration over which CFGx.LOCK_B bit applies. */
  1817. __IO uint32_t LOCK_CH : 1; /*!< Channel Lock Bit */
  1818. __IO uint32_t LOCK_B : 1; /*!< Bus Lock Bit */
  1819. __IO uint32_t DST_HS_POL : 1; /*!< Destination Handshaking Interface Polarity. 0: active high */
  1820. __IO uint32_t SRC_HS_POL : 1; /*!< Source Handshaking Interface Polarity. 0: active high */
  1821. __IO uint32_t MAX_ABRST : 10; /*!< Maximum AMBA Burst Length */
  1822. __IO uint32_t RELOAD_SRC : 1; /*!< Automatic Source Reload */
  1823. __IO uint32_t RELOAD_DST : 1; /*!< Automatic Destination Reload */
  1824. } CFG_LOW5_b; /*!< BitSize */
  1825. };
  1826. union {
  1827. __IO uint32_t CFG_HI5; /*!< Higher 32-bit Configuration Register for Channel */
  1828. struct {
  1829. __IO uint32_t FCMODE : 1; /*!< if source transaction requests aren't serviced when the Destination
  1830. Peripheral is the flow controller. */
  1831. __IO uint32_t FIFO_MODE : 1; /*!< Determines space or data needs to be available in the FIFO before
  1832. a burst transaction request is serviced. */
  1833. __IO uint32_t PROTCTL : 3; /*!< There is a one-to-one mapping of these register bits to the
  1834. HPROT[3:1] master interface signals */
  1835. __IO uint32_t DS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1836. __IO uint32_t SS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1837. } CFG_HI5_b; /*!< BitSize */
  1838. };
  1839. union {
  1840. __IO uint32_t SGR5; /*!< Source Gather Register for Channel */
  1841. struct {
  1842. __IO uint32_t SGI : 20; /*!< Source gather interval */
  1843. __IO uint32_t SGC : 12; /*!< Specifies the number of contiguous source transfers of CTLx.SRC_TR_WIDTH */
  1844. } SGR5_b; /*!< BitSize */
  1845. };
  1846. __I uint32_t RESERVED52;
  1847. union {
  1848. __IO uint32_t DSR5; /*!< Destination Scatter Register for Channel */
  1849. struct {
  1850. __IO uint32_t DSI : 20; /*!< Destination scatter interval */
  1851. __IO uint32_t DSC : 12; /*!< Specifies the number of contiguous destination transfers of
  1852. CTLx.DST_TR_WIDTH */
  1853. } DSR5_b; /*!< BitSize */
  1854. };
  1855. __I uint32_t RESERVED53;
  1856. __IO uint32_t SAR6; /*!< Current Source Address of DMA transfer */
  1857. __I uint32_t RESERVED54;
  1858. __IO uint32_t DAR6; /*!< Current Destination Address of DMA transfer */
  1859. __I uint32_t RESERVED55;
  1860. union {
  1861. __IO uint32_t LLP6; /*!< Linked List Pointer Register for Channel */
  1862. struct {
  1863. __IO uint32_t LMS : 2; /*!< Identifies the AHB layer/interface where the memory device that
  1864. stores the next linked list item resides. */
  1865. __IO uint32_t LOC : 30; /*!< Starting Address In Memory of next LLI if block chaining is
  1866. enabled */
  1867. } LLP6_b; /*!< BitSize */
  1868. };
  1869. __I uint32_t RESERVED56;
  1870. union {
  1871. __IO uint32_t CTL_LOW6; /*!< Lower 32-bits Control Register for Channel */
  1872. struct {
  1873. __IO uint32_t INT_EN : 1; /*!< Interrupt Enable Bit */
  1874. __IO uint32_t DST_TR_WIDTH: 3; /*!< Destination Transfer Width */
  1875. __IO uint32_t SRC_TR_WIDTH: 3; /*!< Source Transfer Width */
  1876. __IO uint32_t DINC : 2; /*!< Destination Address Increment */
  1877. __IO uint32_t SINC : 2; /*!< Source Address Increment */
  1878. __IO uint32_t DEST_MSIZE : 3; /*!< Destination Burst Transaction Length */
  1879. __IO uint32_t SRC_MSIZE : 3; /*!< Source Burst Transaction Length */
  1880. __IO uint32_t SRC_GATHER_EN: 1; /*!< Source gather enable bit */
  1881. __IO uint32_t DST_SCATTER_EN: 1; /*!< Destination scatter enable bit */
  1882. uint32_t : 1;
  1883. __IO uint32_t TT_FC : 3; /*!< Transfer Type and Flow Control */
  1884. __IO uint32_t DMS : 2; /*!< Destination Master Select */
  1885. __IO uint32_t SMS : 2; /*!< Source Master Select */
  1886. __IO uint32_t LLP_DST_EN : 1; /*!< Block chaining is enabled on the destination side */
  1887. __IO uint32_t LLP_SRC_EN : 1; /*!< Block chaining is enabled on the source side */
  1888. } CTL_LOW6_b; /*!< BitSize */
  1889. };
  1890. union {
  1891. __IO uint32_t CTL_HI6; /*!< Higher 32-bits Control Register for Channel */
  1892. struct {
  1893. __IO uint32_t BLOCK_TS : 12; /*!< indicates the total number of single transactions to perform
  1894. for every block transfer */
  1895. __IO uint32_t DONE : 1; /*!< a block transfer is complete */
  1896. } CTL_HI6_b; /*!< BitSize */
  1897. };
  1898. __IO uint32_t SSTAT6; /*!< Source Status Register for Channel */
  1899. __I uint32_t RESERVED57;
  1900. __IO uint32_t DSTAT6; /*!< Destination Status Register for Channel */
  1901. __I uint32_t RESERVED58;
  1902. __IO uint32_t SSTATAR6; /*!< Source Status Address Register for Channel */
  1903. __I uint32_t RESERVED59;
  1904. __IO uint32_t DSTATAR6; /*!< Destination Status Address Register for Channel */
  1905. __I uint32_t RESERVED60;
  1906. union {
  1907. __IO uint32_t CFG_LOW6; /*!< Lower 32-bit Configuration Register for Channel */
  1908. struct {
  1909. uint32_t : 5;
  1910. __IO uint32_t CH_PRIOR : 3; /*!< Channel priority. A priority of 7 is the highest priority */
  1911. __IO uint32_t CH_SUSP : 1; /*!< Suspends all DMA data transfers from the source until this bit
  1912. is cleared. */
  1913. __I uint32_t FIFO_EMPTY : 1; /*!< Indicates if there is data left in the channel FIFO */
  1914. __IO uint32_t HS_SEL_DST : 1; /*!< If Destination Software handshaking interface */
  1915. __IO uint32_t HS_SEL_SRC : 1; /*!< If Source Software handshaking interface */
  1916. __IO uint32_t LOCK_CH_L : 2; /*!< Indicates the duration over which CFGx.LOCK_CH bit applies. */
  1917. __IO uint32_t LOCK_B_L : 2; /*!< Indicates the duration over which CFGx.LOCK_B bit applies. */
  1918. __IO uint32_t LOCK_CH : 1; /*!< Channel Lock Bit */
  1919. __IO uint32_t LOCK_B : 1; /*!< Bus Lock Bit */
  1920. __IO uint32_t DST_HS_POL : 1; /*!< Destination Handshaking Interface Polarity. 0: active high */
  1921. __IO uint32_t SRC_HS_POL : 1; /*!< Source Handshaking Interface Polarity. 0: active high */
  1922. __IO uint32_t MAX_ABRST : 10; /*!< Maximum AMBA Burst Length */
  1923. __IO uint32_t RELOAD_SRC : 1; /*!< Automatic Source Reload */
  1924. __IO uint32_t RELOAD_DST : 1; /*!< Automatic Destination Reload */
  1925. } CFG_LOW6_b; /*!< BitSize */
  1926. };
  1927. union {
  1928. __IO uint32_t CFG_HI6; /*!< Higher 32-bit Configuration Register for Channel */
  1929. struct {
  1930. __IO uint32_t FCMODE : 1; /*!< if source transaction requests aren't serviced when the Destination
  1931. Peripheral is the flow controller. */
  1932. __IO uint32_t FIFO_MODE : 1; /*!< Determines space or data needs to be available in the FIFO before
  1933. a burst transaction request is serviced. */
  1934. __IO uint32_t PROTCTL : 3; /*!< There is a one-to-one mapping of these register bits to the
  1935. HPROT[3:1] master interface signals */
  1936. __IO uint32_t DS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1937. __IO uint32_t SS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  1938. } CFG_HI6_b; /*!< BitSize */
  1939. };
  1940. union {
  1941. __IO uint32_t SGR6; /*!< Source Gather Register for Channel */
  1942. struct {
  1943. __IO uint32_t SGI : 20; /*!< Source gather interval */
  1944. __IO uint32_t SGC : 12; /*!< Specifies the number of contiguous source transfers of CTLx.SRC_TR_WIDTH */
  1945. } SGR6_b; /*!< BitSize */
  1946. };
  1947. __I uint32_t RESERVED61;
  1948. union {
  1949. __IO uint32_t DSR6; /*!< Destination Scatter Register for Channel */
  1950. struct {
  1951. __IO uint32_t DSI : 20; /*!< Destination scatter interval */
  1952. __IO uint32_t DSC : 12; /*!< Specifies the number of contiguous destination transfers of
  1953. CTLx.DST_TR_WIDTH */
  1954. } DSR6_b; /*!< BitSize */
  1955. };
  1956. __I uint32_t RESERVED62;
  1957. __IO uint32_t SAR7; /*!< Current Source Address of DMA transfer */
  1958. __I uint32_t RESERVED63;
  1959. __IO uint32_t DAR7; /*!< Current Destination Address of DMA transfer */
  1960. __I uint32_t RESERVED64;
  1961. union {
  1962. __IO uint32_t LLP7; /*!< Linked List Pointer Register for Channel */
  1963. struct {
  1964. __IO uint32_t LMS : 2; /*!< Identifies the AHB layer/interface where the memory device that
  1965. stores the next linked list item resides. */
  1966. __IO uint32_t LOC : 30; /*!< Starting Address In Memory of next LLI if block chaining is
  1967. enabled */
  1968. } LLP7_b; /*!< BitSize */
  1969. };
  1970. __I uint32_t RESERVED65;
  1971. union {
  1972. __IO uint32_t CTL_LOW7; /*!< Lower 32-bits Control Register for Channel */
  1973. struct {
  1974. __IO uint32_t INT_EN : 1; /*!< Interrupt Enable Bit */
  1975. __IO uint32_t DST_TR_WIDTH: 3; /*!< Destination Transfer Width */
  1976. __IO uint32_t SRC_TR_WIDTH: 3; /*!< Source Transfer Width */
  1977. __IO uint32_t DINC : 2; /*!< Destination Address Increment */
  1978. __IO uint32_t SINC : 2; /*!< Source Address Increment */
  1979. __IO uint32_t DEST_MSIZE : 3; /*!< Destination Burst Transaction Length */
  1980. __IO uint32_t SRC_MSIZE : 3; /*!< Source Burst Transaction Length */
  1981. __IO uint32_t SRC_GATHER_EN: 1; /*!< Source gather enable bit */
  1982. __IO uint32_t DST_SCATTER_EN: 1; /*!< Destination scatter enable bit */
  1983. uint32_t : 1;
  1984. __IO uint32_t TT_FC : 3; /*!< Transfer Type and Flow Control */
  1985. __IO uint32_t DMS : 2; /*!< Destination Master Select */
  1986. __IO uint32_t SMS : 2; /*!< Source Master Select */
  1987. __IO uint32_t LLP_DST_EN : 1; /*!< Block chaining is enabled on the destination side */
  1988. __IO uint32_t LLP_SRC_EN : 1; /*!< Block chaining is enabled on the source side */
  1989. } CTL_LOW7_b; /*!< BitSize */
  1990. };
  1991. union {
  1992. __IO uint32_t CTL_HI7; /*!< Higher 32-bits Control Register for Channel */
  1993. struct {
  1994. __IO uint32_t BLOCK_TS : 12; /*!< indicates the total number of single transactions to perform
  1995. for every block transfer */
  1996. __IO uint32_t DONE : 1; /*!< a block transfer is complete */
  1997. } CTL_HI7_b; /*!< BitSize */
  1998. };
  1999. __IO uint32_t SSTAT7; /*!< Source Status Register for Channel */
  2000. __I uint32_t RESERVED66;
  2001. __IO uint32_t DSTAT7; /*!< Destination Status Register for Channel */
  2002. __I uint32_t RESERVED67;
  2003. __IO uint32_t SSTATAR7; /*!< Source Status Address Register for Channel */
  2004. __I uint32_t RESERVED68;
  2005. __IO uint32_t DSTATAR7; /*!< Destination Status Address Register for Channel */
  2006. __I uint32_t RESERVED69;
  2007. union {
  2008. __IO uint32_t CFG_LOW7; /*!< Lower 32-bit Configuration Register for Channel */
  2009. struct {
  2010. uint32_t : 5;
  2011. __IO uint32_t CH_PRIOR : 3; /*!< Channel priority. A priority of 7 is the highest priority */
  2012. __IO uint32_t CH_SUSP : 1; /*!< Suspends all DMA data transfers from the source until this bit
  2013. is cleared. */
  2014. __I uint32_t FIFO_EMPTY : 1; /*!< Indicates if there is data left in the channel FIFO */
  2015. __IO uint32_t HS_SEL_DST : 1; /*!< If Destination Software handshaking interface */
  2016. __IO uint32_t HS_SEL_SRC : 1; /*!< If Source Software handshaking interface */
  2017. __IO uint32_t LOCK_CH_L : 2; /*!< Indicates the duration over which CFGx.LOCK_CH bit applies. */
  2018. __IO uint32_t LOCK_B_L : 2; /*!< Indicates the duration over which CFGx.LOCK_B bit applies. */
  2019. __IO uint32_t LOCK_CH : 1; /*!< Channel Lock Bit */
  2020. __IO uint32_t LOCK_B : 1; /*!< Bus Lock Bit */
  2021. __IO uint32_t DST_HS_POL : 1; /*!< Destination Handshaking Interface Polarity. 0: active high */
  2022. __IO uint32_t SRC_HS_POL : 1; /*!< Source Handshaking Interface Polarity. 0: active high */
  2023. __IO uint32_t MAX_ABRST : 10; /*!< Maximum AMBA Burst Length */
  2024. __IO uint32_t RELOAD_SRC : 1; /*!< Automatic Source Reload */
  2025. __IO uint32_t RELOAD_DST : 1; /*!< Automatic Destination Reload */
  2026. } CFG_LOW7_b; /*!< BitSize */
  2027. };
  2028. union {
  2029. __IO uint32_t CFG_HI7; /*!< Higher 32-bit Configuration Register for Channel */
  2030. struct {
  2031. __IO uint32_t FCMODE : 1; /*!< if source transaction requests aren't serviced when the Destination
  2032. Peripheral is the flow controller. */
  2033. __IO uint32_t FIFO_MODE : 1; /*!< Determines space or data needs to be available in the FIFO before
  2034. a burst transaction request is serviced. */
  2035. __IO uint32_t PROTCTL : 3; /*!< There is a one-to-one mapping of these register bits to the
  2036. HPROT[3:1] master interface signals */
  2037. __IO uint32_t DS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  2038. __IO uint32_t SS_UPD_EN : 1; /*!< STATx is only updated from STATARx */
  2039. } CFG_HI7_b; /*!< BitSize */
  2040. };
  2041. union {
  2042. __IO uint32_t SGR7; /*!< Source Gather Register for Channel */
  2043. struct {
  2044. __IO uint32_t SGI : 20; /*!< Source gather interval */
  2045. __IO uint32_t SGC : 12; /*!< Specifies the number of contiguous source transfers of CTLx.SRC_TR_WIDTH */
  2046. } SGR7_b; /*!< BitSize */
  2047. };
  2048. __I uint32_t RESERVED70;
  2049. union {
  2050. __IO uint32_t DSR7; /*!< Destination Scatter Register for Channel */
  2051. struct {
  2052. __IO uint32_t DSI : 20; /*!< Destination scatter interval */
  2053. __IO uint32_t DSC : 12; /*!< Specifies the number of contiguous destination transfers of
  2054. CTLx.DST_TR_WIDTH */
  2055. } DSR7_b; /*!< BitSize */
  2056. };
  2057. __I uint32_t RESERVED71[11];
  2058. __I uint8_t INT_TFR; /*!< DMA Transfer Complete */
  2059. __I uint8_t RESERVED72[7];
  2060. __I uint8_t INT_BLOCK; /*!< Block Transfer Complete */
  2061. __I uint8_t RESERVED73[7];
  2062. __I uint8_t INT_SRC_TRAN; /*!< Source Transaction Complete */
  2063. __I uint8_t RESERVED74[7];
  2064. __I uint8_t INT_DST_TRAN; /*!< Destination Transaction Complete */
  2065. __I uint8_t RESERVED75[7];
  2066. __I uint8_t INT_ERR; /*!< Error */
  2067. __I uint8_t RESERVED76[7];
  2068. union {
  2069. __IO uint16_t INT_EN_TFR; /*!< DMA Transfer Complete */
  2070. struct {
  2071. __IO uint16_t EN : 8; /*!< interrupt enable */
  2072. __IO uint16_t WE : 8; /*!< interrupt enable write enable */
  2073. } INT_EN_TFR_b; /*!< BitSize */
  2074. };
  2075. __I uint16_t RESERVED77[3];
  2076. union {
  2077. __IO uint16_t INT_EN_BLOCK; /*!< Block Transfer Complete */
  2078. struct {
  2079. __IO uint16_t EN : 8; /*!< interrupt enable */
  2080. __IO uint16_t WE : 8; /*!< interrupt enable write enable */
  2081. } INT_EN_BLOCK_b; /*!< BitSize */
  2082. };
  2083. __I uint16_t RESERVED78[3];
  2084. union {
  2085. __IO uint16_t INT_EN_SRC_TRAN; /*!< Source Transaction Complete */
  2086. struct {
  2087. __IO uint16_t EN : 8; /*!< interrupt enable */
  2088. __IO uint16_t WE : 8; /*!< interrupt enable write enable */
  2089. } INT_EN_SRC_TRAN_b; /*!< BitSize */
  2090. };
  2091. __I uint16_t RESERVED79[3];
  2092. union {
  2093. __IO uint16_t INT_EN_DST_TRAN; /*!< Destination Transaction Complete */
  2094. struct {
  2095. __IO uint16_t EN : 8; /*!< interrupt enable */
  2096. __IO uint16_t WE : 8; /*!< interrupt enable write enable */
  2097. } INT_EN_DST_TRAN_b; /*!< BitSize */
  2098. };
  2099. __I uint16_t RESERVED80[3];
  2100. union {
  2101. __IO uint16_t INT_EN_ERR; /*!< Error */
  2102. struct {
  2103. __IO uint16_t EN : 8; /*!< interrupt enable */
  2104. __IO uint16_t WE : 8; /*!< interrupt enable write enable */
  2105. } INT_EN_ERR_b; /*!< BitSize */
  2106. };
  2107. __I uint16_t RESERVED81[3];
  2108. __O uint8_t INT_CLEAR_TFR; /*!< DMA Transfer Complete */
  2109. __I uint8_t RESERVED82[7];
  2110. __O uint8_t INT_CLEAR_BLOCK; /*!< Block Transfer Complete */
  2111. __I uint8_t RESERVED83[7];
  2112. __O uint8_t INT_CLEAR_SRC_TRAN; /*!< Source Transaction Complete */
  2113. __I uint8_t RESERVED84[7];
  2114. __O uint8_t INT_CLEAR_DST_TRAN; /*!< Destination Transaction Complete */
  2115. __I uint8_t RESERVED85[7];
  2116. __O uint8_t INT_CLEAR_ERR; /*!< Error */
  2117. __I uint8_t RESERVED86[63];
  2118. union {
  2119. __IO uint32_t DMA_EN; /*!< DW_ahb_dmac Configuration Register */
  2120. struct {
  2121. __IO uint32_t EN : 1; /*!< enable */
  2122. } DMA_EN_b; /*!< BitSize */
  2123. };
  2124. __I uint32_t RESERVED87;
  2125. union {
  2126. __IO uint32_t CH_EN; /*!< DW_ahb_dmac Channel Enable Register */
  2127. struct {
  2128. __IO uint32_t EN : 8; /*!< enable */
  2129. __IO uint32_t WE : 8; /*!< enable write enable */
  2130. } CH_EN_b; /*!< BitSize */
  2131. };
  2132. __I uint32_t RESERVED88[10];
  2133. union {
  2134. __I uint32_t DMA_COMP_PARAMS_6_HI; /*!< Component Parameters for channel 7 */
  2135. struct {
  2136. __I uint32_t DTW : 3; /*!< If this is not hardcoded, then software can program the destination
  2137. transfer width. */
  2138. __I uint32_t STW : 3; /*!< If this is not hardcoded, then software can program the source
  2139. transfer width. */
  2140. __I uint32_t STAT_DST : 1; /*!< If destination status load feature is on */
  2141. __I uint32_t STAT_SRC : 1; /*!< If source status load feature is on */
  2142. __I uint32_t DST_SCA_EN : 1; /*!< If destination scatter feature is on */
  2143. __I uint32_t SRC_GAT_EN : 1; /*!< If source gather feature is on */
  2144. __I uint32_t LOCK_EN : 1; /*!< If channel lock feature is on */
  2145. __I uint32_t MULTI_BLK_EN: 1; /*!< If multi blocks transfer feature is on */
  2146. __I uint32_t CTL_WB_EN : 1; /*!< If write back initial values to relative registers feature is
  2147. on */
  2148. __I uint32_t HC_LLP : 1; /*!< If disable LLP feature is on */
  2149. uint32_t : 2;
  2150. __I uint32_t MAX_MULT_SIZE: 3; /*!< Maximum value of burst transaction size (SRC_MSIZE and DEST_MSIZE). */
  2151. __I uint32_t DMS : 3; /*!< Destination AHB dma interface */
  2152. __I uint32_t LMS : 3; /*!< Linked list AHB dma interface */
  2153. __I uint32_t SMS : 3; /*!< source AHB dma interface */
  2154. __I uint32_t FIFO_DEPTH : 3; /*!< FIFO depth in bytes */
  2155. } DMA_COMP_PARAMS_6_HI_b; /*!< BitSize */
  2156. };
  2157. union {
  2158. __I uint32_t DMA_COMP_PARAMS_5_LOW; /*!< Component Parameters for channel 6 */
  2159. struct {
  2160. __I uint32_t DTW : 3; /*!< If this is not hardcoded, then software can program the destination
  2161. transfer width. */
  2162. __I uint32_t STW : 3; /*!< If this is not hardcoded, then software can program the source
  2163. transfer width. */
  2164. __I uint32_t STAT_DST : 1; /*!< If destination status load feature is on */
  2165. __I uint32_t STAT_SRC : 1; /*!< If source status load feature is on */
  2166. __I uint32_t DST_SCA_EN : 1; /*!< If destination scatter feature is on */
  2167. __I uint32_t SRC_GAT_EN : 1; /*!< If source gather feature is on */
  2168. __I uint32_t LOCK_EN : 1; /*!< If channel lock feature is on */
  2169. __I uint32_t MULTI_BLK_EN: 1; /*!< If multi blocks transfer feature is on */
  2170. __I uint32_t CTL_WB_EN : 1; /*!< If write back initial values to relative registers feature is
  2171. on */
  2172. __I uint32_t HC_LLP : 1; /*!< If disable LLP feature is on */
  2173. uint32_t : 2;
  2174. __I uint32_t MAX_MULT_SIZE: 3; /*!< Maximum value of burst transaction size (SRC_MSIZE and DEST_MSIZE). */
  2175. __I uint32_t DMS : 3; /*!< Destination AHB dma interface */
  2176. __I uint32_t LMS : 3; /*!< Linked list AHB dma interface */
  2177. __I uint32_t SMS : 3; /*!< source AHB dma interface */
  2178. __I uint32_t FIFO_DEPTH : 3; /*!< FIFO depth in bytes */
  2179. } DMA_COMP_PARAMS_5_LOW_b; /*!< BitSize */
  2180. };
  2181. union {
  2182. __I uint32_t DMA_COMP_PARAMS_5_HI; /*!< Component Parameters for channel 5 */
  2183. struct {
  2184. __I uint32_t DTW : 3; /*!< If this is not hardcoded, then software can program the destination
  2185. transfer width. */
  2186. __I uint32_t STW : 3; /*!< If this is not hardcoded, then software can program the source
  2187. transfer width. */
  2188. __I uint32_t STAT_DST : 1; /*!< If destination status load feature is on */
  2189. __I uint32_t STAT_SRC : 1; /*!< If source status load feature is on */
  2190. __I uint32_t DST_SCA_EN : 1; /*!< If destination scatter feature is on */
  2191. __I uint32_t SRC_GAT_EN : 1; /*!< If source gather feature is on */
  2192. __I uint32_t LOCK_EN : 1; /*!< If channel lock feature is on */
  2193. __I uint32_t MULTI_BLK_EN: 1; /*!< If multi blocks transfer feature is on */
  2194. __I uint32_t CTL_WB_EN : 1; /*!< If write back initial values to relative registers feature is
  2195. on */
  2196. __I uint32_t HC_LLP : 1; /*!< If disable LLP feature is on */
  2197. uint32_t : 2;
  2198. __I uint32_t MAX_MULT_SIZE: 3; /*!< Maximum value of burst transaction size (SRC_MSIZE and DEST_MSIZE). */
  2199. __I uint32_t DMS : 3; /*!< Destination AHB dma interface */
  2200. __I uint32_t LMS : 3; /*!< Linked list AHB dma interface */
  2201. __I uint32_t SMS : 3; /*!< source AHB dma interface */
  2202. __I uint32_t FIFO_DEPTH : 3; /*!< FIFO depth in bytes */
  2203. } DMA_COMP_PARAMS_5_HI_b; /*!< BitSize */
  2204. };
  2205. union {
  2206. __I uint32_t DMA_COMP_PARAMS_4_LOW; /*!< Component Parameters for channel 4 */
  2207. struct {
  2208. __I uint32_t DTW : 3; /*!< If this is not hardcoded, then software can program the destination
  2209. transfer width. */
  2210. __I uint32_t STW : 3; /*!< If this is not hardcoded, then software can program the source
  2211. transfer width. */
  2212. __I uint32_t STAT_DST : 1; /*!< If destination status load feature is on */
  2213. __I uint32_t STAT_SRC : 1; /*!< If source status load feature is on */
  2214. __I uint32_t DST_SCA_EN : 1; /*!< If destination scatter feature is on */
  2215. __I uint32_t SRC_GAT_EN : 1; /*!< If source gather feature is on */
  2216. __I uint32_t LOCK_EN : 1; /*!< If channel lock feature is on */
  2217. __I uint32_t MULTI_BLK_EN: 1; /*!< If multi blocks transfer feature is on */
  2218. __I uint32_t CTL_WB_EN : 1; /*!< If write back initial values to relative registers feature is
  2219. on */
  2220. __I uint32_t HC_LLP : 1; /*!< If disable LLP feature is on */
  2221. uint32_t : 2;
  2222. __I uint32_t MAX_MULT_SIZE: 3; /*!< Maximum value of burst transaction size (SRC_MSIZE and DEST_MSIZE). */
  2223. __I uint32_t DMS : 3; /*!< Destination AHB dma interface */
  2224. __I uint32_t LMS : 3; /*!< Linked list AHB dma interface */
  2225. __I uint32_t SMS : 3; /*!< source AHB dma interface */
  2226. __I uint32_t FIFO_DEPTH : 3; /*!< FIFO depth in bytes */
  2227. } DMA_COMP_PARAMS_4_LOW_b; /*!< BitSize */
  2228. };
  2229. union {
  2230. __I uint32_t DMA_COMP_PARAMS_4_HI; /*!< Component Parameters for channel 3 */
  2231. struct {
  2232. __I uint32_t DTW : 3; /*!< If this is not hardcoded, then software can program the destination
  2233. transfer width. */
  2234. __I uint32_t STW : 3; /*!< If this is not hardcoded, then software can program the source
  2235. transfer width. */
  2236. __I uint32_t STAT_DST : 1; /*!< If destination status load feature is on */
  2237. __I uint32_t STAT_SRC : 1; /*!< If source status load feature is on */
  2238. __I uint32_t DST_SCA_EN : 1; /*!< If destination scatter feature is on */
  2239. __I uint32_t SRC_GAT_EN : 1; /*!< If source gather feature is on */
  2240. __I uint32_t LOCK_EN : 1; /*!< If channel lock feature is on */
  2241. __I uint32_t MULTI_BLK_EN: 1; /*!< If multi blocks transfer feature is on */
  2242. __I uint32_t CTL_WB_EN : 1; /*!< If write back initial values to relative registers feature is
  2243. on */
  2244. __I uint32_t HC_LLP : 1; /*!< If disable LLP feature is on */
  2245. uint32_t : 2;
  2246. __I uint32_t MAX_MULT_SIZE: 3; /*!< Maximum value of burst transaction size (SRC_MSIZE and DEST_MSIZE). */
  2247. __I uint32_t DMS : 3; /*!< Destination AHB dma interface */
  2248. __I uint32_t LMS : 3; /*!< Linked list AHB dma interface */
  2249. __I uint32_t SMS : 3; /*!< source AHB dma interface */
  2250. __I uint32_t FIFO_DEPTH : 3; /*!< FIFO depth in bytes */
  2251. } DMA_COMP_PARAMS_4_HI_b; /*!< BitSize */
  2252. };
  2253. union {
  2254. __I uint32_t DMA_COMP_PARAMS_3_LOW; /*!< Component Parameters for channel 2 */
  2255. struct {
  2256. __I uint32_t DTW : 3; /*!< If this is not hardcoded, then software can program the destination
  2257. transfer width. */
  2258. __I uint32_t STW : 3; /*!< If this is not hardcoded, then software can program the source
  2259. transfer width. */
  2260. __I uint32_t STAT_DST : 1; /*!< If destination status load feature is on */
  2261. __I uint32_t STAT_SRC : 1; /*!< If source status load feature is on */
  2262. __I uint32_t DST_SCA_EN : 1; /*!< If destination scatter feature is on */
  2263. __I uint32_t SRC_GAT_EN : 1; /*!< If source gather feature is on */
  2264. __I uint32_t LOCK_EN : 1; /*!< If channel lock feature is on */
  2265. __I uint32_t MULTI_BLK_EN: 1; /*!< If multi blocks transfer feature is on */
  2266. __I uint32_t CTL_WB_EN : 1; /*!< If write back initial values to relative registers feature is
  2267. on */
  2268. __I uint32_t HC_LLP : 1; /*!< If disable LLP feature is on */
  2269. uint32_t : 2;
  2270. __I uint32_t MAX_MULT_SIZE: 3; /*!< Maximum value of burst transaction size (SRC_MSIZE and DEST_MSIZE). */
  2271. __I uint32_t DMS : 3; /*!< Destination AHB dma interface */
  2272. __I uint32_t LMS : 3; /*!< Linked list AHB dma interface */
  2273. __I uint32_t SMS : 3; /*!< source AHB dma interface */
  2274. __I uint32_t FIFO_DEPTH : 3; /*!< FIFO depth in bytes */
  2275. } DMA_COMP_PARAMS_3_LOW_b; /*!< BitSize */
  2276. };
  2277. union {
  2278. __I uint32_t DMA_COMP_PARAMS_3_HI; /*!< Component Parameters for channel 1 */
  2279. struct {
  2280. __I uint32_t DTW : 3; /*!< If this is not hardcoded, then software can program the destination
  2281. transfer width. */
  2282. __I uint32_t STW : 3; /*!< If this is not hardcoded, then software can program the source
  2283. transfer width. */
  2284. __I uint32_t STAT_DST : 1; /*!< If destination status load feature is on */
  2285. __I uint32_t STAT_SRC : 1; /*!< If source status load feature is on */
  2286. __I uint32_t DST_SCA_EN : 1; /*!< If destination scatter feature is on */
  2287. __I uint32_t SRC_GAT_EN : 1; /*!< If source gather feature is on */
  2288. __I uint32_t LOCK_EN : 1; /*!< If channel lock feature is on */
  2289. __I uint32_t MULTI_BLK_EN: 1; /*!< If multi blocks transfer feature is on */
  2290. __I uint32_t CTL_WB_EN : 1; /*!< If write back initial values to relative registers feature is
  2291. on */
  2292. __I uint32_t HC_LLP : 1; /*!< If disable LLP feature is on */
  2293. uint32_t : 2;
  2294. __I uint32_t MAX_MULT_SIZE: 3; /*!< Maximum value of burst transaction size (SRC_MSIZE and DEST_MSIZE). */
  2295. __I uint32_t DMS : 3; /*!< Destination AHB dma interface */
  2296. __I uint32_t LMS : 3; /*!< Linked list AHB dma interface */
  2297. __I uint32_t SMS : 3; /*!< source AHB dma interface */
  2298. __I uint32_t FIFO_DEPTH : 3; /*!< FIFO depth in bytes */
  2299. } DMA_COMP_PARAMS_3_HI_b; /*!< BitSize */
  2300. };
  2301. union {
  2302. __I uint32_t DMA_COMP_PARAMS_2_LOW; /*!< Component Parameters for channel 0 */
  2303. struct {
  2304. __I uint32_t DTW : 3; /*!< If this is not hardcoded, then software can program the destination
  2305. transfer width. */
  2306. __I uint32_t STW : 3; /*!< If this is not hardcoded, then software can program the source
  2307. transfer width. */
  2308. __I uint32_t STAT_DST : 1; /*!< If destination status load feature is on */
  2309. __I uint32_t STAT_SRC : 1; /*!< If source status load feature is on */
  2310. __I uint32_t DST_SCA_EN : 1; /*!< If destination scatter feature is on */
  2311. __I uint32_t SRC_GAT_EN : 1; /*!< If source gather feature is on */
  2312. __I uint32_t LOCK_EN : 1; /*!< If channel lock feature is on */
  2313. __I uint32_t MULTI_BLK_EN: 1; /*!< If multi blocks transfer feature is on */
  2314. __I uint32_t CTL_WB_EN : 1; /*!< If write back initial values to relative registers feature is
  2315. on */
  2316. __I uint32_t HC_LLP : 1; /*!< If disable LLP feature is on */
  2317. uint32_t : 2;
  2318. __I uint32_t MAX_MULT_SIZE: 3; /*!< Maximum value of burst transaction size (SRC_MSIZE and DEST_MSIZE). */
  2319. __I uint32_t DMS : 3; /*!< Destination AHB dma interface */
  2320. __I uint32_t LMS : 3; /*!< Linked list AHB dma interface */
  2321. __I uint32_t SMS : 3; /*!< source AHB dma interface */
  2322. __I uint32_t FIFO_DEPTH : 3; /*!< FIFO depth in bytes */
  2323. } DMA_COMP_PARAMS_2_LOW_b; /*!< BitSize */
  2324. };
  2325. __I uint32_t RESERVED89;
  2326. union {
  2327. __I uint32_t DMA_COMP_PARAMS_1_LOW; /*!< Maximum block size for channel */
  2328. struct {
  2329. __I uint32_t CH0_MAX_BLK_SIZE: 4; /*!< Maximum block size for channel 0. */
  2330. __I uint32_t CH1_MAX_BLK_SIZE: 4; /*!< Maximum block size for channel 1 */
  2331. __I uint32_t CH2_MAX_BLK_SIZE: 4; /*!< Maximum block size for channel 2 */
  2332. __I uint32_t CH3_MAX_BLK_SIZE: 4; /*!< Maximum block size for channel 3 */
  2333. __I uint32_t CH4_MAX_BLK_SIZE: 4; /*!< Maximum block size for channel 4 */
  2334. __I uint32_t CH5_MAX_BLK_SIZE: 4; /*!< Maximum block size for channel 5 */
  2335. __I uint32_t CH6_MAX_BLK_SIZE: 4; /*!< Maximum block size for channel 6 */
  2336. __I uint32_t CH7_MAX_BLK_SIZE: 4; /*!< Maximum block size for channel 7 */
  2337. } DMA_COMP_PARAMS_1_LOW_b; /*!< BitSize */
  2338. };
  2339. } DMA_Type;
  2340. /* ================================================================================ */
  2341. /* ================ ETH ================ */
  2342. /* ================================================================================ */
  2343. /**
  2344. * @brief ETH (ETH)
  2345. */
  2346. typedef struct { /*!< ETH Structure */
  2347. union {
  2348. __IO uint32_t CONFIG; /*!< MAC Configuration Register */
  2349. struct {
  2350. __IO uint32_t PRELEN : 2; /*!< Preamble Length for Transmit frames */
  2351. __IO uint32_t RX_EN : 1; /*!< Receiver Enable */
  2352. __IO uint32_t TX_EN : 1; /*!< Transmitter Enable */
  2353. __IO uint32_t DC_EN : 1; /*!< Deferral Check Enable */
  2354. uint32_t : 2;
  2355. __IO uint32_t ACS : 1; /*!< Automatic Pad or CRC Stripping */
  2356. __IO uint32_t LUD : 1; /*!< Link Up or Down */
  2357. uint32_t : 1;
  2358. __IO uint32_t IPC : 1; /*!< Checksum Offload */
  2359. __IO uint32_t DM : 1; /*!< Duplex Mode */
  2360. __IO uint32_t LM : 1; /*!< Loopback Mode */
  2361. uint32_t : 1;
  2362. __IO uint32_t FES : 1; /*!< Speed in XMII interface */
  2363. __IO uint32_t PS : 1; /*!< the Ethernet line speed */
  2364. uint32_t : 4;
  2365. __IO uint32_t JE : 1; /*!< Jumbo enable */
  2366. uint32_t : 1;
  2367. __IO uint32_t JD : 1; /*!< if 0, the MAC cuts off the transmitter if more than 2,048 bytes
  2368. of data (10,240 if JE is set high) */
  2369. __IO uint32_t WD : 1; /*!< Watchdog Disable */
  2370. __IO uint32_t TC : 1; /*!< If 1, this bit enables the transmission of duplex mode, link
  2371. speed, and link up or down information to the PHY */
  2372. __IO uint32_t CST : 1; /*!< CRC Stripping for Type Frames */
  2373. uint32_t : 1;
  2374. __IO uint32_t TWOKPE : 1; /*!< If 0, 1518 bytes is considered as a giant frame, 1 is 2000 bytes. */
  2375. __IO uint32_t SARC : 3; /*!< Source Address Insertion or Replacement Control */
  2376. } CONFIG_b; /*!< BitSize */
  2377. };
  2378. union {
  2379. __IO uint32_t FF; /*!< MAC Frame Filter */
  2380. struct {
  2381. __IO uint32_t PR : 1; /*!< Receive all frames in spite of source and destination address */
  2382. __IO uint32_t HUC : 1; /*!< if 1, don't compare DA field in destination address filtering
  2383. of unicast frames with DA register */
  2384. __IO uint32_t HMC : 1; /*!< if 1, don't compare DA field in destination address filtering
  2385. of multicast frames with DA register */
  2386. __IO uint32_t DAIF : 1; /*!< if set, the Address Check block operates in inverse filtering
  2387. mode for the DA address comparison */
  2388. __IO uint32_t PM : 1; /*!< Pass All Multicast */
  2389. __IO uint32_t DBF : 1; /*!< Disable Broadcast Frames */
  2390. __IO uint32_t PCF : 2; /*!< Pass Control Frames */
  2391. __IO uint32_t SAIF : 1; /*!< If set, the frames whose SA matches the SA registers are marked
  2392. as failing the SA Address filter */
  2393. __IO uint32_t SAF : 1; /*!< Source Address Filter Enable */
  2394. __IO uint32_t HPF : 1; /*!< Hash or Perfect Filter */
  2395. uint32_t : 5;
  2396. __IO uint32_t VTFE : 1; /*!< VLAN Tag Filter Enable */
  2397. uint32_t : 3;
  2398. __IO uint32_t IPFE : 1; /*!< Layer 3 and Layer 4 Filter Enable */
  2399. __IO uint32_t DNTU : 1; /*!< Drop non-TCP/UDP over IP Frames */
  2400. uint32_t : 9;
  2401. __IO uint32_t RA : 1; /*!< Receive all */
  2402. } FF_b; /*!< BitSize */
  2403. };
  2404. __IO uint32_t HTH; /*!< Hash Table High Register */
  2405. __IO uint32_t HTL; /*!< Hash Table Low Register */
  2406. union {
  2407. __IO uint32_t GMII_ADDR; /*!< GMII Address Register */
  2408. struct {
  2409. __IO uint32_t BUSY : 1; /*!< GMII Busy */
  2410. __IO uint32_t GW : 1; /*!< GMII write or read */
  2411. __IO uint32_t CR : 4; /*!< CSR Clock Range */
  2412. __IO uint32_t GR : 5; /*!< These bits select the desired GMII register in the selected
  2413. PHY device */
  2414. __IO uint32_t PA : 5; /*!< This field indicates which of the 32 possible PHY devices are
  2415. being accessed */
  2416. } GMII_ADDR_b; /*!< BitSize */
  2417. };
  2418. __IO uint32_t GMII_DATA; /*!< GMII Data Register */
  2419. union {
  2420. __IO uint32_t FC; /*!< Flow Control Register */
  2421. struct {
  2422. __IO uint32_t FCB : 1; /*!< This bit initiates a Pause frame in the full-duplex mode */
  2423. __IO uint32_t TFE : 1; /*!< MAC enables the flow control operation to transmit Pause frames */
  2424. __IO uint32_t RFE : 1; /*!< MAC enables the flow control operation to receive Pause frames */
  2425. __IO uint32_t UP : 1; /*!< MAC can detect Pause frames with unicast address of the station */
  2426. } FC_b; /*!< BitSize */
  2427. };
  2428. union {
  2429. __IO uint32_t VLAN_TAG; /*!< VLAN Tag Register */
  2430. struct {
  2431. __IO uint32_t VL : 16; /*!< VLAN Tag Identifier for Receive Frames */
  2432. __IO uint32_t ETV : 1; /*!< Enable 12-Bit VLAN Tag Comparison */
  2433. __IO uint32_t VTIM : 1; /*!< If set, The frames that do not have matching VLAN Tag are marked
  2434. as matched */
  2435. __IO uint32_t ESVL : 1; /*!< If set, consider the S-VLAN (Type = 0x88A8) frames as valid
  2436. VLAN tagged frames */
  2437. __IO uint32_t VTHM : 1; /*!< When set, the most significant four bits of the VLAN tag's CRC
  2438. are used to index the content */
  2439. } VLAN_TAG_b; /*!< BitSize */
  2440. };
  2441. __I uint32_t RESERVED0[2];
  2442. __IO uint32_t RWUFFR; /*!< Remote Wake-Up Frame Filter Register */
  2443. union {
  2444. __IO uint32_t PMTCSR; /*!< PMT Control and Status Register */
  2445. struct {
  2446. __IO uint32_t PWRDWN : 1; /*!< Power Down */
  2447. __IO uint32_t MGKPKTEN : 1; /*!< Magic Packet Enable */
  2448. __IO uint32_t RWKPKTEN : 1; /*!< Remote Wake-Up Frame Enable */
  2449. uint32_t : 2;
  2450. __IO uint32_t MGKPRCVD : 1; /*!< the power management event is generated because of the reception
  2451. of a magic packet */
  2452. __IO uint32_t RWKPRCVD : 1; /*!< When set, this bit indicates the power management event is generated
  2453. because of the reception of a remote wake-up frame */
  2454. uint32_t : 2;
  2455. __IO uint32_t GLBLUCAST : 1; /*!< When set, enables any unicast packet filtered by the MAC (DAF)address
  2456. recognition to be a remote wake-up frame. */
  2457. uint32_t : 14;
  2458. __IO uint32_t RWKPTR : 3; /*!< Remote Wake-up FIFO Pointer */
  2459. uint32_t : 4;
  2460. __IO uint32_t RWKFILTRST : 1; /*!< Remote Wake-Up Frame Filter Register Pointer Reset. */
  2461. } PMTCSR_b; /*!< BitSize */
  2462. };
  2463. __I uint32_t RESERVED1[2];
  2464. __IO uint32_t MACISR; /*!< Interrupt Status Register */
  2465. __IO uint32_t MACIMR; /*!< Interrupt Mask Register */
  2466. __IO uint16_t ADDR0_HIGH; /*!< MAC Address0 High Register */
  2467. __I uint16_t RESERVED2;
  2468. __IO uint32_t ADDR0_LOW; /*!< MAC Address0 LOW Register */
  2469. union {
  2470. __IO uint32_t ADDR1_HIGH; /*!< MAC Address0 High Register */
  2471. struct {
  2472. __IO uint32_t ADDR : 16; /*!< MAC Address1 [47:32] */
  2473. uint32_t : 14;
  2474. __IO uint32_t SA : 1; /*!< MAC address1 is source or destination address compared with
  2475. received frame */
  2476. __IO uint32_t AE : 1; /*!< the address filter module uses the MAC address1 for filtering */
  2477. } ADDR1_HIGH_b; /*!< BitSize */
  2478. };
  2479. __IO uint32_t ADDR1_LOW; /*!< MAC Address1 LOW Register */
  2480. __I uint32_t RESERVED3[44];
  2481. union {
  2482. __IO uint32_t MMCCR; /*!< MMC Control Register */
  2483. struct {
  2484. __IO uint32_t CNTRST : 1; /*!< Counters Reset */
  2485. __IO uint32_t CNTSTOPRO : 1; /*!< Counter Stop Rollover */
  2486. __IO uint32_t RSTONRD : 1; /*!< Reset on Read */
  2487. __IO uint32_t CNTFREEZ : 1; /*!< MMC Counter Freeze */
  2488. __IO uint32_t CNTPRST : 1; /*!< Counters Preset */
  2489. __IO uint32_t CNTPRSTLVL : 1; /*!< Counters Preset */
  2490. uint32_t : 2;
  2491. __IO uint32_t UCDBC : 1; /*!< Update MMC Counters for Dropped Broadcast Frames */
  2492. } MMCCR_b; /*!< BitSize */
  2493. };
  2494. __IO uint32_t MMCRIR; /*!< MMC Receive Interrupt Register */
  2495. __IO uint32_t MMCTIR; /*!< MMC Transmit Interrupt Register */
  2496. __IO uint32_t MMCRIMR; /*!< MMC Receive interrupt mask */
  2497. __IO uint32_t MMCTIMR; /*!< MMC Transmit Interrupt Mask */
  2498. __I uint32_t RESERVED4[59];
  2499. __IO uint32_t MMCIRCOIM; /*!< MMC IPC Receive Checksum Offload Interrupt Mask */
  2500. __I uint32_t RESERVED5[319];
  2501. union {
  2502. __IO uint32_t PTPTSCR; /*!< Timestamp Control Register */
  2503. struct {
  2504. __IO uint32_t TSENA : 1; /*!< Timestamp Enable */
  2505. __IO uint32_t TSCFUPDT : 1; /*!< Timestamp Fine or Coarse Update */
  2506. __IO uint32_t TSINIT : 1; /*!< Timestamp Initialize */
  2507. __IO uint32_t TSUPDT : 1; /*!< Timestamp Update */
  2508. __IO uint32_t TSTRIG : 1; /*!< Timestamp Interrupt Trigger Enable */
  2509. __IO uint32_t TSADDREG : 1; /*!< Addend Reg Update */
  2510. } PTPTSCR_b; /*!< BitSize */
  2511. };
  2512. __IO uint32_t PTPSSIR; /*!< Sub-Second Increment Register */
  2513. __IO uint32_t PTPTSHR; /*!< System Time Seconds Register */
  2514. __IO uint32_t PTPTSLR; /*!< System Time Nanoseconds Register */
  2515. __IO uint32_t PTPTSHUR; /*!< System Time Seconds Update Register */
  2516. __IO uint32_t PTPTSLUR; /*!< System Time Nanoseconds Update Register */
  2517. __IO uint32_t PTPTSAR; /*!< Timestamp Addend Register */
  2518. __IO uint32_t PTPTTHR; /*!< Target Time Seconds Register */
  2519. __IO uint32_t PTPTTLR; /*!< Target Time Nanoseconds Register */
  2520. __I uint32_t RESERVED6[567];
  2521. union {
  2522. __IO uint32_t BUS_MODE; /*!< Flow Control Register */
  2523. struct {
  2524. __IO uint32_t SWR : 1; /*!< Software Reset */
  2525. __IO uint32_t DA : 1; /*!< This bit specifies the arbitration scheme between the transmit
  2526. and receive paths of Channel */
  2527. __IO uint32_t DSL : 5; /*!< the byte number of bus width to skip between two unchained descriptors */
  2528. __IO uint32_t ATDS : 1; /*!< When set, the size of the alternate descriptor increases to
  2529. 32 bytes */
  2530. __IO uint32_t PBL : 6; /*!< These bits indicate the maximum number of beats to be transferred
  2531. in one DMA transaction */
  2532. __IO uint32_t PR : 2; /*!< The Priority Ratio is (PR + 1) : 1 */
  2533. __IO uint32_t FB : 1; /*!< performs fixed burst transfers or not */
  2534. __IO uint32_t RPBL : 6; /*!< This field indicates the maximum number of beats to be transferred
  2535. in one Rx DMA transaction */
  2536. __IO uint32_t USP : 1; /*!< If set, RPBL is same as RPBL definition */
  2537. __IO uint32_t PBLx8 : 1; /*!< If set, all PBLs multiplies 8 */
  2538. __IO uint32_t AAL : 1; /*!< If set, all bursts aligned to the start address LS bits */
  2539. __IO uint32_t MB : 1; /*!< When this bit is set high and the FB bit is low, the AHB master
  2540. interface starts all bursts of length more than 16 with INCR */
  2541. __IO uint32_t TXPR : 1; /*!< When set, the transmit DMA has higher priority than the receive
  2542. DMA */
  2543. __IO uint32_t PRWG : 2; /*!< The Priority weight is (PRWG + 1) : 1 */
  2544. uint32_t : 1;
  2545. __IO uint32_t RIB : 1; /*!< If set, rebuilds the pending beats of any burst transfer initiated
  2546. with INCRx */
  2547. } BUS_MODE_b; /*!< BitSize */
  2548. };
  2549. __IO uint32_t TPD; /*!< Transmit Poll Demand */
  2550. __IO uint32_t RPD; /*!< Receive Poll Demand */
  2551. __IO uint32_t RDESLA; /*!< Receive Descriptor List Address */
  2552. __IO uint32_t TDESLA; /*!< Transmit Descriptor List Address */
  2553. union {
  2554. __IO uint32_t STATUS; /*!< Status Register */
  2555. struct {
  2556. __IO uint32_t TI : 1; /*!< This bit indicates that the frame transmission is complete */
  2557. __IO uint32_t TPS : 1; /*!< Transmit Process Stopped */
  2558. __IO uint32_t TU : 1; /*!< the host owns the Next Descriptor in the Transmit List and the
  2559. DMA cannot acquire it. */
  2560. __IO uint32_t TJT : 1; /*!< Transmit Jabber Timeout */
  2561. __IO uint32_t OVF : 1; /*!< Receive Overflow */
  2562. __IO uint32_t UNF : 1; /*!< Transmit Underflow */
  2563. __IO uint32_t RI : 1; /*!< the frame reception is complete */
  2564. __IO uint32_t RU : 1; /*!< Receive Buffer Unavailable */
  2565. __IO uint32_t RPS : 1; /*!< Receive Process Stopped */
  2566. __IO uint32_t RWT : 1; /*!< Receive Watchdog Timeout */
  2567. __IO uint32_t ETI : 1; /*!< the frame to be transmitted is fully transferred to the MTL
  2568. Transmit FIFO */
  2569. uint32_t : 2;
  2570. __IO uint32_t FBI : 1; /*!< a bus error occurred, as described in EB. */
  2571. __IO uint32_t ERI : 1; /*!< the DMA filled the first data buffer of the packet */
  2572. __IO uint32_t AIS : 1; /*!< Abnormal Interrupt Summary, must be cleared by writting */
  2573. __IO uint32_t NIS : 1; /*!< Normal Interrupt Summary, must be cleared by writting */
  2574. __I uint32_t RS : 3; /*!< Receive DMA FSM state */
  2575. __I uint32_t TS : 3; /*!< Transmit DMA FSM state */
  2576. __I uint32_t EB : 3; /*!< Error bit */
  2577. __I uint32_t GLI : 1; /*!< GMAC Line Interface Interrupt */
  2578. __I uint32_t GMI : 1; /*!< GMAC MMC Interrupt */
  2579. __I uint32_t GPI : 1; /*!< GMAC PMT Interrupt */
  2580. __I uint32_t TTI : 1; /*!< Timestamp Trigger Interrupt */
  2581. } STATUS_b; /*!< BitSize */
  2582. };
  2583. union {
  2584. __IO uint32_t OPERATION; /*!< Operation Mode Register */
  2585. struct {
  2586. uint32_t : 1;
  2587. __IO uint32_t SR : 1; /*!< Start or Stop Receive */
  2588. __IO uint32_t OSF : 1; /*!< Operate on Second Frame */
  2589. __IO uint32_t RT : 2; /*!< Receive Threshold Control */
  2590. __IO uint32_t DGF : 1; /*!< Drop Giant Frames */
  2591. __IO uint32_t FUF : 1; /*!< Forward Undersized Good Frames */
  2592. __IO uint32_t FEF : 1; /*!< Forward Error Frames */
  2593. uint32_t : 5;
  2594. __IO uint32_t ST : 1; /*!< Start or Stop Transmission Command */
  2595. __IO uint32_t TT : 3; /*!< Transmit Threshold Control */
  2596. uint32_t : 3;
  2597. __IO uint32_t FTF : 1; /*!< Flush Transmit FIFO */
  2598. __IO uint32_t TSF : 1; /*!< If set, transmission starts when a full frame resides in Transmit
  2599. FIFO */
  2600. uint32_t : 2;
  2601. __IO uint32_t DFF : 1; /*!< Disable Flushing of Received Frames */
  2602. __IO uint32_t RSF : 1; /*!< If set, the MTL reads a frame from the Rx FIFO while the complete
  2603. frame has been written to it, */
  2604. } OPERATION_b; /*!< BitSize */
  2605. };
  2606. union {
  2607. __IO uint32_t INT_EN; /*!< Interrupt Enable Register */
  2608. struct {
  2609. __IO uint32_t TIE : 1; /*!< Transmit Interrupt Enable */
  2610. __IO uint32_t TSE : 1; /*!< Transmit Stopped Enable */
  2611. __IO uint32_t TUE : 1; /*!< Transmit Buffer Unavailable Enable */
  2612. __IO uint32_t TJE : 1; /*!< Transmit Jabber Timeout Enable */
  2613. __IO uint32_t OVE : 1; /*!< Overflow Interrupt Enable */
  2614. __IO uint32_t UNE : 1; /*!< Underflow Interrupt Enable */
  2615. __IO uint32_t RIE : 1; /*!< Receive Interrupt Enable */
  2616. __IO uint32_t RUE : 1; /*!< Receive Buffer Unavailable Enable */
  2617. __IO uint32_t RSE : 1; /*!< Receive Stopped Enable */
  2618. __IO uint32_t RWE : 1; /*!< Receive Watchdog Timeout Enable */
  2619. __IO uint32_t ETE : 1; /*!< Early Transmit Interrupt Enable */
  2620. uint32_t : 2;
  2621. __IO uint32_t FBE : 1; /*!< Fatal Bus Error Enable */
  2622. __IO uint32_t ERE : 1; /*!< Early Receive Interrupt Enable */
  2623. __IO uint32_t AIE : 1; /*!< Abnormal Interrupt Summary Enable */
  2624. __IO uint32_t NIE : 1; /*!< Normal Interrupt Summary Enable */
  2625. } INT_EN_b; /*!< BitSize */
  2626. };
  2627. __I uint32_t RESERVED7[3];
  2628. union {
  2629. __IO uint32_t AHB_STATUS; /*!< AHB Status Register */
  2630. struct {
  2631. __IO uint32_t BUSY : 1; /*!< If set, it indicates that the AHB master interface FSMs are
  2632. in the non-idle state */
  2633. } AHB_STATUS_b; /*!< BitSize */
  2634. };
  2635. __I uint32_t RESERVED8[6];
  2636. __I uint32_t CURTDESAPTR; /*!< Current Host Transmit Descriptor Register */
  2637. __I uint32_t CURRDESAPTR; /*!< Current Host Receive Descriptor Register */
  2638. __I uint32_t CURTBUFAPTR; /*!< Current Host Transmit Buffer Address Register */
  2639. __I uint32_t CURRBUFAPTR; /*!< Current Host Receive Buffer Address Register */
  2640. } ETH_Type;
  2641. /* ================================================================================ */
  2642. /* ================ USB ================ */
  2643. /* ================================================================================ */
  2644. /**
  2645. * @brief USB (USB)
  2646. */
  2647. typedef struct { /*!< USB Structure */
  2648. union {
  2649. __IO uint32_t GOTGCTL; /*!< Control and Status register */
  2650. struct {
  2651. __I uint32_t SES_REQ_SCS: 1; /*!< set when a session request initiation is successful as a device */
  2652. __IO uint32_t SES_SEQ : 1; /*!< set to initiate a session request on the USB as a device */
  2653. __IO uint32_t VB_VALID_OV_EN: 1; /*!< enable/disable the software to override the Bvalid signal using
  2654. the GOTGCTL.VbvalidOvVal as a host */
  2655. __IO uint32_t VB_VALID_OV_VAL: 1; /*!< set Override value for vbusvalid signal when GOTGCTL.VbvalidOvEn
  2656. is set as a host */
  2657. __IO uint32_t A_VALID_OV_EN: 1; /*!< enable/disable the software to override the Avalid signal using
  2658. the GOTGCTL.AvalidOvVal as a host */
  2659. __IO uint32_t A_VALID_OV_VAL: 1; /*!< set Override value for Avalid signal when GOTGCTL.AvalidOvEn
  2660. is set as a host */
  2661. __IO uint32_t B_VALID_OV_EN: 1; /*!< enable/disable the software to override the Bvalid signal using
  2662. the GOTGCTL.BvalidOvVal as a device. */
  2663. __IO uint32_t B_VALID_OV_VAL: 1; /*!< set Override value for Bvalid signal when GOTGCTL.BvalidOvEn
  2664. is set as a device. */
  2665. __I uint32_t HST_NEG_SCS: 1; /*!< sets when host negotiation is successful as a device. */
  2666. __IO uint32_t HNP_REQ : 1; /*!< sets this bit to initiate an HNP request to the connected USB
  2667. host as a device */
  2668. __IO uint32_t HST_SET_HNP_EN: 1; /*!< Host Set HNP Enable as a host */
  2669. __IO uint32_t DEV_HNP_EN : 1; /*!< Device HNP Enabled as a device */
  2670. uint32_t : 4;
  2671. __I uint32_t CON_ID_STS : 1; /*!< Connector ID Status */
  2672. __I uint32_t DBNC_TIME : 1; /*!< the debounce time of a detected connection as a host */
  2673. __I uint32_t A_SES_VLD : 1; /*!< A-Session Valid as a host */
  2674. __I uint32_t B_SES_VLD : 1; /*!< B-Session Valid as a host */
  2675. __IO uint32_t OTG_VER : 1; /*!< If 0, OTG Version 1.3. If 1, OTG Version 2.0. */
  2676. } GOTGCTL_b; /*!< BitSize */
  2677. };
  2678. union {
  2679. __IO uint32_t GOTGINT; /*!< OTG interrupt Register */
  2680. struct {
  2681. uint32_t : 2;
  2682. __IO uint32_t SES_END_DET: 1; /*!< Set when the utmiotg_bvalid signal is deasserted */
  2683. uint32_t : 5;
  2684. __IO uint32_t SES_REQ_SUC_STS_CHNG: 1; /*!< Session Request Success Status Change */
  2685. __IO uint32_t HST_NEG_SUC_STS_CHNG: 1; /*!< Host Negotiation Success Status Change */
  2686. uint32_t : 7;
  2687. __IO uint32_t HST_NEG_DET: 1; /*!< if set, detects a host negotiation request on the USB */
  2688. __IO uint32_t A_DEV_TOUT_CHG: 1; /*!< A-device has timed out while waiting for the B-device to connect */
  2689. __IO uint32_t DBNCE_DONE : 1; /*!< debounce is completed after the device connect as a host */
  2690. } GOTGINT_b; /*!< BitSize */
  2691. };
  2692. union {
  2693. __IO uint32_t GAHBCFG; /*!< AHB Configuration Register */
  2694. struct {
  2695. __IO uint32_t GLBL_INTR_EN: 1; /*!< Global Interrupt Enable */
  2696. __IO uint32_t BST_LEN : 4; /*!< Burst Length/Type */
  2697. __IO uint32_t DMA_EN : 1; /*!< DMA enable */
  2698. uint32_t : 15;
  2699. __IO uint32_t REMOTE_MEM_SUPP: 1; /*!< enable the functionality to wait for the system DMA Done Signal
  2700. for the DMA Write Transfers */
  2701. __IO uint32_t NOTIFY_ALL_DMA_WRITE: 1; /*!< enable the System DMA Done functionality for all the DMA write
  2702. Transactions corresponding to the Channel/Endpoint */
  2703. __IO uint32_t AHB_SINGLE : 1; /*!< supports Single transfers for the remaining data in a transfer */
  2704. } GAHBCFG_b; /*!< BitSize */
  2705. };
  2706. union {
  2707. __IO uint32_t GUSBCFG; /*!< USB Configuration Register */
  2708. struct {
  2709. uint32_t : 3;
  2710. __IO uint32_t PHY_IF : 1; /*!< PHY Interface */
  2711. __IO uint32_t ULPI_UTMI_SEL: 1; /*!< 1, ULPI. 0, UTMI+ */
  2712. __IO uint32_t FS_IF : 1; /*!< 1, 3-pin bidirectional. 0, 6-pin unidirectional */
  2713. __IO uint32_t PHY_SEL : 1; /*!< 0, USB 2.0 High-Speed PHY. 1, USB 1.1 full-speed serial transceiver */
  2714. __IO uint32_t DDR_SEL : 1; /*!< 0, Single Data Rate ULPI Interface, with 8-bit-wide data bus.
  2715. 1, Double Data Rate ULPI Interface, with 4-bit-wide data bus */
  2716. __IO uint32_t SRP_CAP : 1; /*!< SRP-Capable */
  2717. __IO uint32_t HNP_CAP : 1; /*!< HNP-Capable */
  2718. __IO uint32_t USB_TRD_TIM: 4; /*!< Specifies the response time for a MAC request to the Packet
  2719. FIFO Controller (PFC) to fetch data from the DFIFO (SPRAM) as
  2720. a device. */
  2721. uint32_t : 1;
  2722. __IO uint32_t PHY_LPWR_CLK_SEL: 1; /*!< 0, 480-MHz Internal PLL clock. 1, 48-MHz External Clock */
  2723. uint32_t : 12;
  2724. __IO uint32_t TX_END_DELAY: 1; /*!< Tx End Delay as a device */
  2725. __IO uint32_t FORCE_HOST_MODE: 1; /*!< Force Host Mode */
  2726. __IO uint32_t FORCE_DEVICE_MODE: 1; /*!< Force Device Mode */
  2727. } GUSBCFG_b; /*!< BitSize */
  2728. };
  2729. union {
  2730. __IO uint32_t GRSTCTL; /*!< Reset Register */
  2731. struct {
  2732. __IO uint32_t CORE_SOFT_RST: 1; /*!< Core Soft Reset */
  2733. uint32_t : 1;
  2734. __IO uint32_t FRM_CNT_RST: 1; /*!< Host Frame Counter Reset */
  2735. uint32_t : 1;
  2736. __IO uint32_t RX_FIFO_FLUSH: 1; /*!< RxFIFO Flush */
  2737. __IO uint32_t TX_FIFO_FLUSH: 1; /*!< TxFIFO Flush */
  2738. __IO uint32_t TX_FIFO_FLUSH_NUM: 4; /*!< This field indicates which of the 32 possible PHY devices are
  2739. being accessed */
  2740. __IO uint32_t TX_FIFO_ALL: 1; /*!< TxFIFO flush all FIFOs */
  2741. uint32_t : 19;
  2742. __I uint32_t DMA_REQ : 1; /*!< Indicates that the DMA request is in progress */
  2743. __I uint32_t AHB_IDLE : 1; /*!< Indicates that the AHB Master State Machine is in the IDLE condition */
  2744. } GRSTCTL_b; /*!< BitSize */
  2745. };
  2746. union {
  2747. __IO uint32_t GINTSTS; /*!< Interrupt Register */
  2748. struct {
  2749. __I uint32_t CUR_MOD : 1; /*!< Current Mode of Operation */
  2750. __IO uint32_t MODE_MIS : 1; /*!< Mode Mismatch Interrupt */
  2751. __I uint32_t OTG_INT : 1; /*!< OTG Interrupt */
  2752. __IO uint32_t SOF : 1; /*!< Start of (micro)Frame */
  2753. __I uint32_t RFNE : 1; /*!< RxFIFO Non-Empty */
  2754. __I uint32_t NPTFE : 1; /*!< Non-periodic TxFIFO Empty */
  2755. __I uint32_t GIN_NAK_EFF: 1; /*!< Global IN Non-periodic NAK Effective as a device */
  2756. __I uint32_t GOUT_NAK_EFF: 1; /*!< Global OUT NAK Effective as a device */
  2757. uint32_t : 2;
  2758. __IO uint32_t EARLY_SUS : 1; /*!< an Idle state has been detected on the USB For 3 ms as a device */
  2759. __IO uint32_t USB_SUS : 1; /*!< A suspend was detected on the USB as a device */
  2760. __IO uint32_t USB_RST : 1; /*!< A reset is detected on the USB as a device */
  2761. __IO uint32_t ENUM_DONE : 1; /*!< speed enumeration is complete as a device */
  2762. __IO uint32_t ISO_OUT_DROP: 1; /*!< Drop an isochronous OUT packet while no space in RXFIFO as a
  2763. device */
  2764. __IO uint32_t EOPF : 1; /*!< End of Periodic Frame Interrupt as a device */
  2765. uint32_t : 1;
  2766. __I uint32_t EP_MIS : 1; /*!< Endpoint Mismatch Interrupt as a device */
  2767. __I uint32_t IEP_INT : 1; /*!< IN Endpoints Interrupt as a device */
  2768. __I uint32_t OEP_INT : 1; /*!< OUT Endpoints Interrupt as a device */
  2769. __IO uint32_t INCOMP_ISO_IN: 1; /*!< Incomplete Isochronous IN Transfer as a device */
  2770. __IO uint32_t IPT_IIOT : 1; /*!< OUT Incomplete Periodic Transfer as a host or Incomplete Isochronous
  2771. OUT Transfer as a device */
  2772. __IO uint32_t DFS : 1; /*!< Data Fetch Suspended as a device */
  2773. __IO uint32_t RST_DET : 1; /*!< reset detect as a device */
  2774. __I uint32_t HP : 1; /*!< a change in port status of one of the DWC_otg core ports as
  2775. a host */
  2776. __I uint32_t HC : 1; /*!< an interrupt is pending on one of the channels of the core as
  2777. a host */
  2778. __I uint32_t PTFE : 1; /*!< Periodic TxFIFO Empty as a host */
  2779. __IO uint32_t LPM : 1; /*!< LPM Transaction Received Interrupt */
  2780. __IO uint32_t CIDSC : 1; /*!< A change in connector ID status */
  2781. __IO uint32_t DD : 1; /*!< A change in connector ID status */
  2782. __IO uint32_t SR : 1; /*!< Session Request/New Session Detected Interrupt */
  2783. __IO uint32_t WAKEUP : 1; /*!< Resume/Remote Wakeup Detected Interrupt */
  2784. } GINTSTS_b; /*!< BitSize */
  2785. };
  2786. union {
  2787. __IO uint32_t GINTEN; /*!< Interrupt enable Register */
  2788. struct {
  2789. uint32_t : 1;
  2790. __IO uint32_t MODE_MIS : 1; /*!< Mode Mismatch */
  2791. __IO uint32_t OTG_INT : 1; /*!< OTG */
  2792. __IO uint32_t SOF : 1; /*!< Start of (micro)Frame */
  2793. __IO uint32_t RFNE : 1; /*!< RxFIFO Non-Empty */
  2794. __IO uint32_t NPTFE : 1; /*!< Non-periodic TxFIFO Empty */
  2795. __IO uint32_t GIN_NAK_EFF: 1; /*!< Global IN Non-periodic NAK Effective as a device */
  2796. __IO uint32_t GOUT_NAK_EFF: 1; /*!< Global OUT NAK Effective as a device */
  2797. uint32_t : 2;
  2798. __IO uint32_t EARLY_SUS : 1; /*!< an Idle state has been detected on the USB For 3 ms as a device */
  2799. __IO uint32_t USB_SUS : 1; /*!< A suspend was detected on the USB as a device */
  2800. __IO uint32_t USB_RST : 1; /*!< A reset is detected on the USB as a device */
  2801. __IO uint32_t ENUM_DONE : 1; /*!< speed enumeration is complete as a device */
  2802. __IO uint32_t ISO_OUT_DROP: 1; /*!< Drop an isochronous OUT packet while no space in RXFIFO as a
  2803. device */
  2804. __IO uint32_t EOPF : 1; /*!< End of Periodic Frame Interrupt as a device */
  2805. uint32_t : 1;
  2806. __IO uint32_t EP_MIS : 1; /*!< Endpoint Mismatch Interrupt as a device */
  2807. __IO uint32_t IEP_INT : 1; /*!< IN Endpoints Interrupt as a device */
  2808. __IO uint32_t OEP_INT : 1; /*!< OUT Endpoints Interrupt as a device */
  2809. __IO uint32_t INCOMP_ISO_IN: 1; /*!< Incomplete Isochronous IN Transfer as a device */
  2810. __IO uint32_t IPT_IIOT : 1; /*!< OUT Incomplete Periodic Transfer as a host or Incomplete Isochronous
  2811. OUT Transfer as a device */
  2812. __IO uint32_t DFS : 1; /*!< Data Fetch Suspended as a device */
  2813. __IO uint32_t RST_DET : 1; /*!< reset detect as a device */
  2814. __IO uint32_t HP : 1; /*!< a change in port status of one of the DWC_otg core ports as
  2815. a host */
  2816. __IO uint32_t HC : 1; /*!< an interrupt is pending on one of the channels of the core as
  2817. a host */
  2818. __IO uint32_t PTFE : 1; /*!< Periodic TxFIFO Empty as a host */
  2819. __IO uint32_t LPM : 1; /*!< LPM Transaction Received Interrupt */
  2820. __IO uint32_t CIDSC : 1; /*!< A change in connector ID status */
  2821. __IO uint32_t DD : 1; /*!< A change in connector ID status */
  2822. __IO uint32_t SR : 1; /*!< Session Request/New Session Detected Interrupt */
  2823. __IO uint32_t WAKEUP : 1; /*!< Resume/Remote Wakeup Detected Interrupt */
  2824. } GINTEN_b; /*!< BitSize */
  2825. };
  2826. union {
  2827. __I uint32_t GRXSTSR; /*!< Returns the contents of the top of the Receive FIFO */
  2828. struct {
  2829. __I uint32_t CH_EP_NUM : 4; /*!< channel number as a host or EP number as a device */
  2830. __I uint32_t BCNT : 11; /*!< byte count of the received packet */
  2831. __I uint32_t DPID : 2; /*!< Data PID of the received packet */
  2832. __I uint32_t PS : 4; /*!< the status of the received packet */
  2833. __I uint32_t FN : 4; /*!< the least significant 4 bits of the (micro)frame number in which
  2834. the packet is received on the USB */
  2835. } GRXSTSR_b; /*!< BitSize */
  2836. };
  2837. union {
  2838. __I uint32_t GRXSTSP; /*!< Pop the contents of the top of the Receive FIFO */
  2839. struct {
  2840. __I uint32_t CH_EP_NUM : 4; /*!< channel number as a host or EP number as a device */
  2841. __I uint32_t BCNT : 11; /*!< byte count of the received packet */
  2842. __I uint32_t DPID : 2; /*!< Data PID of the received packet */
  2843. __I uint32_t PS : 4; /*!< the status of the received packet */
  2844. __I uint32_t FN : 4; /*!< the least significant 4 bits of the (micro)frame number in which
  2845. the packet is received on the USB */
  2846. } GRXSTSP_b; /*!< BitSize */
  2847. };
  2848. __IO uint16_t GRXFSIZ; /*!< This value is in terms of 32-bit words, 16 is minimize and 32768
  2849. is max */
  2850. __I uint16_t RESERVED0;
  2851. union {
  2852. __IO uint32_t GNPTXFSIZ; /*!< Non-Periodic Transmit FIFO Size Register */
  2853. struct {
  2854. __IO uint32_t NTRSA_INEF0TRSA: 16; /*!< start address for Non-periodic Transmit FIFO RAM as a host or
  2855. IN Endpoint FIFO0 Transmit RAM as a device */
  2856. __IO uint32_t NTD_INEF0TD: 16; /*!< This value is in terms of 32-bit words, 16 is minimize and 32768
  2857. is max. Non-periodic TxFIFO Depth as a host or IN Endpoint TxFIFO
  2858. 0 Depth as a device */
  2859. } GNPTXFSIZ_b; /*!< BitSize */
  2860. };
  2861. union {
  2862. __I uint32_t GNPTXSTS; /*!< Non-Periodic Transmit FIFO/Queue Status Register */
  2863. struct {
  2864. __I uint32_t NTSA : 16; /*!< the amount of free space available in the Non-periodic TxFIFO,
  2865. max is 32768. */
  2866. __I uint32_t NTRQSA : 8; /*!< the amount of free space available in the Non-periodic Transmit
  2867. Request Queue, max is 8. */
  2868. __I uint32_t TNTRQ_LAST : 1; /*!< last Entry in the Non-periodic Tx Request Queue that is currently
  2869. being processed by the MAC */
  2870. __I uint32_t TNTRQ_TYPE : 2; /*!< type in the Non-periodic Tx Request Queue that is currently
  2871. being processed by the MAC */
  2872. __I uint32_t TNTRQ_CH : 4; /*!< Channel of top of the Non-periodic Transmit Request Queue */
  2873. } GNPTXSTS_b; /*!< BitSize */
  2874. };
  2875. __I uint32_t RESERVED1[5];
  2876. union {
  2877. __I uint32_t GHWCFG1; /*!< User HW Config1 Register */
  2878. struct {
  2879. __I uint32_t EP0_DIR : 2; /*!< Endpoint 0 direction, always Bidirection */
  2880. __I uint32_t EP1_DIR : 2; /*!< Endpoint 1 direction */
  2881. __I uint32_t EP2_DIR : 2; /*!< Endpoint 2 direction */
  2882. __I uint32_t EP3_DIR : 2; /*!< Endpoint 3 direction */
  2883. __I uint32_t EP4_DIR : 2; /*!< Endpoint 4 direction */
  2884. __I uint32_t EP5_DIR : 2; /*!< Endpoint 5 direction */
  2885. __I uint32_t EP6_DIR : 2; /*!< Endpoint 6 direction */
  2886. __I uint32_t EP7_DIR : 2; /*!< Endpoint 7 direction */
  2887. __I uint32_t EP8_DIR : 2; /*!< Endpoint 8 direction */
  2888. __I uint32_t EP9_DIR : 2; /*!< Endpoint 9 direction */
  2889. __I uint32_t EP10_DIR : 2; /*!< Endpoint 10 direction */
  2890. __I uint32_t EP11_DIR : 2; /*!< Endpoint 11 direction */
  2891. __I uint32_t EP12_DIR : 2; /*!< Endpoint 12 direction */
  2892. __I uint32_t EP13_DIR : 2; /*!< Endpoint 13 direction */
  2893. __I uint32_t EP14_DIR : 2; /*!< Endpoint 14 direction */
  2894. __I uint32_t EP15_DIR : 2; /*!< Endpoint 15 direction */
  2895. } GHWCFG1_b; /*!< BitSize */
  2896. };
  2897. __I uint32_t RESERVED2[3];
  2898. union {
  2899. __IO uint32_t GLPMCFG; /*!< Core LPM Configuration Register */
  2900. struct {
  2901. __IO uint32_t EP0_DIR : 1; /*!< LPM capability is enabled */
  2902. } GLPMCFG_b; /*!< BitSize */
  2903. };
  2904. union {
  2905. __IO uint32_t GPWRDN; /*!< Global Power Down Register */
  2906. struct {
  2907. uint32_t : 1;
  2908. __IO uint32_t PMU_ACTIVE : 1; /*!< PMU Active is enabled */
  2909. uint32_t : 1;
  2910. __IO uint32_t PDC : 1; /*!< Power Down Clamp is enabled */
  2911. __IO uint32_t PDR : 1; /*!< If clear, Reset DWC_otg */
  2912. __IO uint32_t PDS : 1; /*!< If 0, DWC_otg is in ON state, or OFF state */
  2913. __IO uint32_t DIS_VBUS : 1; /*!< Disable VBUS */
  2914. uint32_t : 8;
  2915. __IO uint32_t SRP_DETECT_INT: 1; /*!< SRP has been detected by the PMU as a host */
  2916. __IO uint32_t SRP_DETECT_INT_EN: 1; /*!< Enable For SRPDetect Interrupt as a host */
  2917. __IO uint32_t STATE_CHN_INT: 1; /*!< a status change in either the IDDIG or BSessVld signal */
  2918. __IO uint32_t STATE_CHN_INT_EN: 1; /*!< Enable For Status Change Interrupt */
  2919. __I uint32_t LINE_STATE : 2; /*!< the current linestate on USB as seen by the PMU module */
  2920. __I uint32_t IDDIG : 1; /*!< the status of the IDDIG signal. If 0, host mode. if 1, device
  2921. mode */
  2922. __I uint32_t B_SESS_VLD : 1; /*!< B session valid status signal from the PHY */
  2923. __IO uint32_t ADP_INT : 1; /*!< set whenever there is a ADP event */
  2924. } GPWRDN_b; /*!< BitSize */
  2925. };
  2926. union {
  2927. __IO uint32_t GDFIFOCFG; /*!< Global DFIFO Software Config Register */
  2928. struct {
  2929. __IO uint32_t GDFIFOCFG : 16; /*!< This field is for dynamic programming of the DFIFO Size. */
  2930. __IO uint32_t EPIBA : 16; /*!< This field provides the start address of the EP info controller */
  2931. } GDFIFOCFG_b; /*!< BitSize */
  2932. };
  2933. __I uint32_t RESERVED3[40];
  2934. union {
  2935. __IO uint32_t HPTXFSIZ; /*!< Host Periodic Transmit FIFO Size Register */
  2936. struct {
  2937. __IO uint32_t HPTSA : 16; /*!< start address of the Periodic TxFIFO */
  2938. __IO uint32_t EPIBA : 16; /*!< the size of the Periodic TxFIFO */
  2939. } HPTXFSIZ_b; /*!< BitSize */
  2940. };
  2941. union {
  2942. __IO uint32_t DIEPTXF1; /*!< Device In Endpoint Transmit FIFO Size Register */
  2943. struct {
  2944. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  2945. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  2946. } DIEPTXF1_b; /*!< BitSize */
  2947. };
  2948. union {
  2949. __IO uint32_t DIEPTXF2; /*!< Device In Endpoint Transmit FIFO Size Register */
  2950. struct {
  2951. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  2952. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  2953. } DIEPTXF2_b; /*!< BitSize */
  2954. };
  2955. union {
  2956. __IO uint32_t DIEPTXF3; /*!< Device In Endpoint Transmit FIFO Size Register */
  2957. struct {
  2958. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  2959. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  2960. } DIEPTXF3_b; /*!< BitSize */
  2961. };
  2962. union {
  2963. __IO uint32_t DIEPTXF4; /*!< Device In Endpoint Transmit FIFO Size Register */
  2964. struct {
  2965. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  2966. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  2967. } DIEPTXF4_b; /*!< BitSize */
  2968. };
  2969. union {
  2970. __IO uint32_t DIEPTXF5; /*!< Device In Endpoint Transmit FIFO Size Register */
  2971. struct {
  2972. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  2973. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  2974. } DIEPTXF5_b; /*!< BitSize */
  2975. };
  2976. union {
  2977. __IO uint32_t DIEPTXF6; /*!< Device In Endpoint Transmit FIFO Size Register */
  2978. struct {
  2979. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  2980. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  2981. } DIEPTXF6_b; /*!< BitSize */
  2982. };
  2983. union {
  2984. __IO uint32_t DIEPTXF7; /*!< Device In Endpoint Transmit FIFO Size Register */
  2985. struct {
  2986. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  2987. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  2988. } DIEPTXF7_b; /*!< BitSize */
  2989. };
  2990. union {
  2991. __IO uint32_t DIEPTXF8; /*!< Device In Endpoint Transmit FIFO Size Register */
  2992. struct {
  2993. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  2994. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  2995. } DIEPTXF8_b; /*!< BitSize */
  2996. };
  2997. union {
  2998. __IO uint32_t DIEPTXF9; /*!< Device In Endpoint Transmit FIFO Size Register */
  2999. struct {
  3000. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  3001. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  3002. } DIEPTXF9_b; /*!< BitSize */
  3003. };
  3004. union {
  3005. __IO uint32_t DIEPTXF10; /*!< Device In Endpoint Transmit FIFO Size Register */
  3006. struct {
  3007. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  3008. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  3009. } DIEPTXF10_b; /*!< BitSize */
  3010. };
  3011. union {
  3012. __IO uint32_t DIEPTXF11; /*!< Device In Endpoint Transmit FIFO Size Register */
  3013. struct {
  3014. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  3015. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  3016. } DIEPTXF11_b; /*!< BitSize */
  3017. };
  3018. union {
  3019. __IO uint32_t DIEPTXF12; /*!< Device In Endpoint Transmit FIFO Size Register */
  3020. struct {
  3021. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  3022. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  3023. } DIEPTXF12_b; /*!< BitSize */
  3024. };
  3025. union {
  3026. __IO uint32_t DIEPTXF13; /*!< Device In Endpoint Transmit FIFO Size Register */
  3027. struct {
  3028. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  3029. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  3030. } DIEPTXF13_b; /*!< BitSize */
  3031. };
  3032. union {
  3033. __IO uint32_t DIEPTXF14; /*!< Device In Endpoint Transmit FIFO Size Register */
  3034. struct {
  3035. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  3036. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  3037. } DIEPTXF14_b; /*!< BitSize */
  3038. };
  3039. union {
  3040. __IO uint32_t DIEPTXF15; /*!< Device In Endpoint Transmit FIFO Size Register */
  3041. struct {
  3042. __IO uint32_t INEFTRSA : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  3043. __IO uint32_t INETFD : 16; /*!< IN Endpoint TxFIFO Depth */
  3044. } DIEPTXF15_b; /*!< BitSize */
  3045. };
  3046. __I uint32_t RESERVED4[176];
  3047. union {
  3048. __IO uint32_t HCFG; /*!< Host Configuration Register */
  3049. struct {
  3050. __IO uint32_t FS_LS_PCS : 2; /*!< FS/LS PHY Clock Select as a host */
  3051. __IO uint32_t FS_LS_SUPPORT: 1; /*!< If set, FS/LS-only, even If the connected device can support
  3052. HS */
  3053. uint32_t : 4;
  3054. __IO uint32_t EN_32K_SUS : 1; /*!< Enable 32 KHz Suspend mode */
  3055. __IO uint32_t RVP : 8; /*!< ResValid number of clock cycles to detect a valid resume */
  3056. uint32_t : 7;
  3057. __IO uint32_t EN_SG_DMA : 1; /*!< Enable Scatter/gather DMA in Host mode */
  3058. __IO uint32_t FLE : 2; /*!< the number of entries in the Frame list. 8 times of FLE */
  3059. __IO uint32_t EPS : 1; /*!< Enables periodic scheduling */
  3060. uint32_t : 4;
  3061. __IO uint32_t MCRTE : 1; /*!< enable/disable the Host core to wait 200 PHY clock cycles at
  3062. the end of Resume to change the opmode signal to the PHY to
  3063. 00 after Suspend or LPM. */
  3064. } HCFG_b; /*!< BitSize */
  3065. };
  3066. union {
  3067. __IO uint32_t HFIR; /*!< Host Frame Interval Register */
  3068. struct {
  3069. __IO uint32_t FI : 16; /*!< IN Endpoint FIFOn Transmit RAM Start Address */
  3070. __IO uint32_t RC : 1; /*!< The HFIR can be dynamically reloaded during runtime if set */
  3071. } HFIR_b; /*!< BitSize */
  3072. };
  3073. union {
  3074. __I uint32_t HFNUM; /*!< Host Frame Number/Frame Time Remaining Register */
  3075. struct {
  3076. __I uint32_t FN : 16; /*!< This field increments when a new SOF is transmitted on the USB */
  3077. __I uint32_t FTR : 16; /*!< amount of time remaining in the current microframe (HS) or Frame
  3078. (FS/LS), in terms of PHY clocks */
  3079. } HFNUM_b; /*!< BitSize */
  3080. };
  3081. __I uint32_t RESERVED5;
  3082. union {
  3083. __I uint32_t HPTXSTS; /*!< Host Periodic Transmit FIFO/Queue Status Register */
  3084. struct {
  3085. __I uint32_t PTDFSA : 16; /*!< Indicates the number of free locations available to be written
  3086. to in the Periodic TxFIFO, max is 32768 */
  3087. __I uint32_t PTRQSA : 8; /*!< Indicates the number of free locations available to be written
  3088. in the Periodic Transmit Request Queue, max is 16 */
  3089. __I uint32_t TPTRQ_LAST : 1; /*!< last Entry in the periodic Tx Request Queue that is currently
  3090. being processed by the MAC */
  3091. __I uint32_t TPTRQ_TYPE : 2; /*!< type in the periodic Tx Request Queue that is currently being
  3092. processed by the MAC */
  3093. __I uint32_t TPTRQ_CH : 4; /*!< Channel of top of the periodic Transmit Request Queue */
  3094. __I uint32_t TPTRQ_ODD_FRAME: 1; /*!< If set, send in odd (micro)Frame */
  3095. } HPTXSTS_b; /*!< BitSize */
  3096. };
  3097. union {
  3098. __I uint32_t HAINT; /*!< Host All Channels Interrupt Register */
  3099. struct {
  3100. __I uint32_t INT : 16; /*!< Channel Interrupts, from 0 to 15. */
  3101. } HAINT_b; /*!< BitSize */
  3102. };
  3103. union {
  3104. __IO uint32_t HAINT_EN; /*!< Host All Channels Interrupt Enable Register */
  3105. struct {
  3106. __IO uint32_t EN : 16; /*!< Channel Interrupts Enable, from 0 to 15. */
  3107. } HAINT_EN_b; /*!< BitSize */
  3108. };
  3109. __IO uint32_t HFLBA; /*!< The starting address of the Frame list */
  3110. __I uint32_t RESERVED6[8];
  3111. union {
  3112. __IO uint32_t __HPRT; /*!< Host Port Control and Status Register */
  3113. struct {
  3114. __I uint32_t PCS : 1; /*!< If a device is attached to the port */
  3115. __IO uint32_t PCD : 1; /*!< A device connection is detected */
  3116. __IO uint32_t PE : 1; /*!< Port Enable */
  3117. __IO uint32_t PEDC : 1; /*!< Set if when the status of the Port Enable (bit 2) of this register
  3118. changes */
  3119. __I uint32_t POA : 1; /*!< Indicates the overcurrent condition of the port */
  3120. __IO uint32_t POC : 1; /*!< Set if when the status of the Port Overcurrent Active bit (bit
  3121. 4) in this register changes */
  3122. __IO uint32_t PR : 1; /*!< Application and Core all can perform resume by setting, then
  3123. clear it whatever resume is success or not */
  3124. __IO uint32_t PS : 1; /*!< Sets this bit to put this port in Suspend mode */
  3125. __IO uint32_t PRESET : 1; /*!< sets this bit, a reset sequence is started on this port */
  3126. uint32_t : 1;
  3127. __IO uint32_t PLSDP : 1; /*!< Logic level of D+ */
  3128. __IO uint32_t PLSDN : 1; /*!< Logic level of D- */
  3129. __IO uint32_t PP : 1; /*!< this field to control power to this port. 1, power on */
  3130. __IO uint32_t PTC : 4; /*!< The application writes a nonzero value to this field to put
  3131. the port into a Test mode */
  3132. __I uint32_t SPEED : 2; /*!< Indicates the speed of the device attached to this port */
  3133. } __HPRT_b; /*!< BitSize */
  3134. };
  3135. __I uint32_t RESERVED7[47];
  3136. union {
  3137. __IO uint32_t HCC0; /*!< Host Channel Characteristics Register */
  3138. struct {
  3139. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3140. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3141. source or sink. */
  3142. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3143. uint32_t : 1;
  3144. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3145. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3146. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3147. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3148. or sink. */
  3149. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3150. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3151. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3152. yet. */
  3153. } HCC0_b; /*!< BitSize */
  3154. };
  3155. __I uint32_t RESERVED8;
  3156. union {
  3157. __IO uint32_t HCINT0; /*!< Host Channel Interrupt Register */
  3158. struct {
  3159. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3160. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3161. source or sink. */
  3162. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3163. uint32_t : 8;
  3164. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3165. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3166. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3167. } HCINT0_b; /*!< BitSize */
  3168. };
  3169. union {
  3170. __IO uint32_t HCINT_EN0; /*!< Host Channel Interrupt Enable Register */
  3171. struct {
  3172. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3173. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3174. source or sink. */
  3175. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3176. uint32_t : 8;
  3177. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3178. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3179. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3180. } HCINT_EN0_b; /*!< BitSize */
  3181. };
  3182. union {
  3183. __IO uint32_t HCTSIZ0; /*!< Host Channel Transfer Size Register */
  3184. struct {
  3185. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3186. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3187. for 8th microframe in that frame. */
  3188. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3189. uint32_t : 13;
  3190. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3191. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3192. } HCTSIZ0_b; /*!< BitSize */
  3193. };
  3194. union {
  3195. __IO uint32_t HCDMA0; /*!< Host Channel-n DMA Address Register */
  3196. struct {
  3197. uint32_t : 3;
  3198. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3199. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3200. } HCDMA0_b; /*!< BitSize */
  3201. };
  3202. __I uint32_t RESERVED9;
  3203. __IO uint32_t HCDMAB0; /*!< Host Channel-n DMA Buffer Address Register */
  3204. union {
  3205. __IO uint32_t HCC1; /*!< Host Channel Characteristics Register */
  3206. struct {
  3207. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3208. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3209. source or sink. */
  3210. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3211. uint32_t : 1;
  3212. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3213. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3214. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3215. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3216. or sink. */
  3217. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3218. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3219. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3220. yet. */
  3221. } HCC1_b; /*!< BitSize */
  3222. };
  3223. __I uint32_t RESERVED10;
  3224. union {
  3225. __IO uint32_t HCINT1; /*!< Host Channel Interrupt Register */
  3226. struct {
  3227. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3228. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3229. source or sink. */
  3230. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3231. uint32_t : 8;
  3232. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3233. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3234. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3235. } HCINT1_b; /*!< BitSize */
  3236. };
  3237. union {
  3238. __IO uint32_t HCINT_EN1; /*!< Host Channel Interrupt Enable Register */
  3239. struct {
  3240. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3241. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3242. source or sink. */
  3243. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3244. uint32_t : 8;
  3245. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3246. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3247. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3248. } HCINT_EN1_b; /*!< BitSize */
  3249. };
  3250. union {
  3251. __IO uint32_t HCTSIZ1; /*!< Host Channel Transfer Size Register */
  3252. struct {
  3253. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3254. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3255. for 8th microframe in that frame. */
  3256. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3257. uint32_t : 13;
  3258. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3259. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3260. } HCTSIZ1_b; /*!< BitSize */
  3261. };
  3262. union {
  3263. __IO uint32_t HCDMA1; /*!< Host Channel-n DMA Address Register */
  3264. struct {
  3265. uint32_t : 3;
  3266. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3267. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3268. } HCDMA1_b; /*!< BitSize */
  3269. };
  3270. __I uint32_t RESERVED11;
  3271. __IO uint32_t HCDMAB1; /*!< Host Channel-n DMA Buffer Address Register */
  3272. union {
  3273. __IO uint32_t HCC2; /*!< Host Channel Characteristics Register */
  3274. struct {
  3275. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3276. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3277. source or sink. */
  3278. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3279. uint32_t : 1;
  3280. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3281. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3282. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3283. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3284. or sink. */
  3285. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3286. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3287. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3288. yet. */
  3289. } HCC2_b; /*!< BitSize */
  3290. };
  3291. __I uint32_t RESERVED12;
  3292. union {
  3293. __IO uint32_t HCINT2; /*!< Host Channel Interrupt Register */
  3294. struct {
  3295. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3296. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3297. source or sink. */
  3298. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3299. uint32_t : 8;
  3300. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3301. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3302. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3303. } HCINT2_b; /*!< BitSize */
  3304. };
  3305. union {
  3306. __IO uint32_t HCINT_EN2; /*!< Host Channel Interrupt Enable Register */
  3307. struct {
  3308. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3309. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3310. source or sink. */
  3311. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3312. uint32_t : 8;
  3313. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3314. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3315. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3316. } HCINT_EN2_b; /*!< BitSize */
  3317. };
  3318. union {
  3319. __IO uint32_t HCTSIZ2; /*!< Host Channel Transfer Size Register */
  3320. struct {
  3321. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3322. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3323. for 8th microframe in that frame. */
  3324. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3325. uint32_t : 13;
  3326. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3327. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3328. } HCTSIZ2_b; /*!< BitSize */
  3329. };
  3330. union {
  3331. __IO uint32_t HCDMA2; /*!< Host Channel-n DMA Address Register */
  3332. struct {
  3333. uint32_t : 3;
  3334. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3335. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3336. } HCDMA2_b; /*!< BitSize */
  3337. };
  3338. __I uint32_t RESERVED13;
  3339. __IO uint32_t HCDMAB2; /*!< Host Channel-n DMA Buffer Address Register */
  3340. union {
  3341. __IO uint32_t HCC3; /*!< Host Channel Characteristics Register */
  3342. struct {
  3343. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3344. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3345. source or sink. */
  3346. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3347. uint32_t : 1;
  3348. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3349. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3350. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3351. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3352. or sink. */
  3353. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3354. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3355. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3356. yet. */
  3357. } HCC3_b; /*!< BitSize */
  3358. };
  3359. __I uint32_t RESERVED14;
  3360. union {
  3361. __IO uint32_t HCINT3; /*!< Host Channel Interrupt Register */
  3362. struct {
  3363. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3364. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3365. source or sink. */
  3366. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3367. uint32_t : 8;
  3368. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3369. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3370. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3371. } HCINT3_b; /*!< BitSize */
  3372. };
  3373. union {
  3374. __IO uint32_t HCINT_EN3; /*!< Host Channel Interrupt Enable Register */
  3375. struct {
  3376. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3377. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3378. source or sink. */
  3379. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3380. uint32_t : 8;
  3381. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3382. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3383. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3384. } HCINT_EN3_b; /*!< BitSize */
  3385. };
  3386. union {
  3387. __IO uint32_t HCTSIZ3; /*!< Host Channel Transfer Size Register */
  3388. struct {
  3389. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3390. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3391. for 8th microframe in that frame. */
  3392. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3393. uint32_t : 13;
  3394. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3395. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3396. } HCTSIZ3_b; /*!< BitSize */
  3397. };
  3398. union {
  3399. __IO uint32_t HCDMA3; /*!< Host Channel-n DMA Address Register */
  3400. struct {
  3401. uint32_t : 3;
  3402. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3403. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3404. } HCDMA3_b; /*!< BitSize */
  3405. };
  3406. __I uint32_t RESERVED15;
  3407. __IO uint32_t HCDMAB3; /*!< Host Channel-n DMA Buffer Address Register */
  3408. union {
  3409. __IO uint32_t HCC4; /*!< Host Channel Characteristics Register */
  3410. struct {
  3411. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3412. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3413. source or sink. */
  3414. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3415. uint32_t : 1;
  3416. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3417. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3418. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3419. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3420. or sink. */
  3421. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3422. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3423. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3424. yet. */
  3425. } HCC4_b; /*!< BitSize */
  3426. };
  3427. __I uint32_t RESERVED16;
  3428. union {
  3429. __IO uint32_t HCINT4; /*!< Host Channel Interrupt Register */
  3430. struct {
  3431. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3432. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3433. source or sink. */
  3434. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3435. uint32_t : 8;
  3436. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3437. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3438. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3439. } HCINT4_b; /*!< BitSize */
  3440. };
  3441. union {
  3442. __IO uint32_t HCINT_EN4; /*!< Host Channel Interrupt Enable Register */
  3443. struct {
  3444. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3445. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3446. source or sink. */
  3447. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3448. uint32_t : 8;
  3449. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3450. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3451. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3452. } HCINT_EN4_b; /*!< BitSize */
  3453. };
  3454. union {
  3455. __IO uint32_t HCTSIZ4; /*!< Host Channel Transfer Size Register */
  3456. struct {
  3457. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3458. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3459. for 8th microframe in that frame. */
  3460. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3461. uint32_t : 13;
  3462. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3463. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3464. } HCTSIZ4_b; /*!< BitSize */
  3465. };
  3466. union {
  3467. __IO uint32_t HCDMA4; /*!< Host Channel-n DMA Address Register */
  3468. struct {
  3469. uint32_t : 3;
  3470. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3471. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3472. } HCDMA4_b; /*!< BitSize */
  3473. };
  3474. __I uint32_t RESERVED17;
  3475. __IO uint32_t HCDMAB4; /*!< Host Channel-n DMA Buffer Address Register */
  3476. union {
  3477. __IO uint32_t HCC5; /*!< Host Channel Characteristics Register */
  3478. struct {
  3479. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3480. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3481. source or sink. */
  3482. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3483. uint32_t : 1;
  3484. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3485. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3486. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3487. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3488. or sink. */
  3489. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3490. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3491. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3492. yet. */
  3493. } HCC5_b; /*!< BitSize */
  3494. };
  3495. __I uint32_t RESERVED18;
  3496. union {
  3497. __IO uint32_t HCINT5; /*!< Host Channel Interrupt Register */
  3498. struct {
  3499. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3500. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3501. source or sink. */
  3502. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3503. uint32_t : 8;
  3504. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3505. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3506. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3507. } HCINT5_b; /*!< BitSize */
  3508. };
  3509. union {
  3510. __IO uint32_t HCINT_EN5; /*!< Host Channel Interrupt Enable Register */
  3511. struct {
  3512. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3513. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3514. source or sink. */
  3515. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3516. uint32_t : 8;
  3517. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3518. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3519. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3520. } HCINT_EN5_b; /*!< BitSize */
  3521. };
  3522. union {
  3523. __IO uint32_t HCTSIZ5; /*!< Host Channel Transfer Size Register */
  3524. struct {
  3525. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3526. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3527. for 8th microframe in that frame. */
  3528. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3529. uint32_t : 13;
  3530. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3531. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3532. } HCTSIZ5_b; /*!< BitSize */
  3533. };
  3534. union {
  3535. __IO uint32_t HCDMA5; /*!< Host Channel-n DMA Address Register */
  3536. struct {
  3537. uint32_t : 3;
  3538. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3539. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3540. } HCDMA5_b; /*!< BitSize */
  3541. };
  3542. __I uint32_t RESERVED19;
  3543. __IO uint32_t HCDMAB5; /*!< Host Channel-n DMA Buffer Address Register */
  3544. union {
  3545. __IO uint32_t HCC6; /*!< Host Channel Characteristics Register */
  3546. struct {
  3547. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3548. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3549. source or sink. */
  3550. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3551. uint32_t : 1;
  3552. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3553. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3554. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3555. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3556. or sink. */
  3557. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3558. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3559. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3560. yet. */
  3561. } HCC6_b; /*!< BitSize */
  3562. };
  3563. __I uint32_t RESERVED20;
  3564. union {
  3565. __IO uint32_t HCINT6; /*!< Host Channel Interrupt Register */
  3566. struct {
  3567. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3568. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3569. source or sink. */
  3570. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3571. uint32_t : 8;
  3572. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3573. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3574. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3575. } HCINT6_b; /*!< BitSize */
  3576. };
  3577. union {
  3578. __IO uint32_t HCINT_EN6; /*!< Host Channel Interrupt Enable Register */
  3579. struct {
  3580. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3581. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3582. source or sink. */
  3583. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3584. uint32_t : 8;
  3585. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3586. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3587. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3588. } HCINT_EN6_b; /*!< BitSize */
  3589. };
  3590. union {
  3591. __IO uint32_t HCTSIZ6; /*!< Host Channel Transfer Size Register */
  3592. struct {
  3593. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3594. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3595. for 8th microframe in that frame. */
  3596. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3597. uint32_t : 13;
  3598. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3599. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3600. } HCTSIZ6_b; /*!< BitSize */
  3601. };
  3602. union {
  3603. __IO uint32_t HCDMA6; /*!< Host Channel-n DMA Address Register */
  3604. struct {
  3605. uint32_t : 3;
  3606. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3607. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3608. } HCDMA6_b; /*!< BitSize */
  3609. };
  3610. __I uint32_t RESERVED21;
  3611. __IO uint32_t HCDMAB6; /*!< Host Channel-n DMA Buffer Address Register */
  3612. union {
  3613. __IO uint32_t HCC7; /*!< Host Channel Characteristics Register */
  3614. struct {
  3615. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3616. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3617. source or sink. */
  3618. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3619. uint32_t : 1;
  3620. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3621. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3622. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3623. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3624. or sink. */
  3625. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3626. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3627. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3628. yet. */
  3629. } HCC7_b; /*!< BitSize */
  3630. };
  3631. __I uint32_t RESERVED22;
  3632. union {
  3633. __IO uint32_t HCINT7; /*!< Host Channel Interrupt Register */
  3634. struct {
  3635. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3636. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3637. source or sink. */
  3638. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3639. uint32_t : 8;
  3640. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3641. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3642. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3643. } HCINT7_b; /*!< BitSize */
  3644. };
  3645. union {
  3646. __IO uint32_t HCINT_EN7; /*!< Host Channel Interrupt Enable Register */
  3647. struct {
  3648. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3649. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3650. source or sink. */
  3651. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3652. uint32_t : 8;
  3653. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3654. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3655. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3656. } HCINT_EN7_b; /*!< BitSize */
  3657. };
  3658. union {
  3659. __IO uint32_t HCTSIZ7; /*!< Host Channel Transfer Size Register */
  3660. struct {
  3661. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3662. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3663. for 8th microframe in that frame. */
  3664. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3665. uint32_t : 13;
  3666. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3667. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3668. } HCTSIZ7_b; /*!< BitSize */
  3669. };
  3670. union {
  3671. __IO uint32_t HCDMA7; /*!< Host Channel-n DMA Address Register */
  3672. struct {
  3673. uint32_t : 3;
  3674. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3675. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3676. } HCDMA7_b; /*!< BitSize */
  3677. };
  3678. __I uint32_t RESERVED23;
  3679. __IO uint32_t HCDMAB7; /*!< Host Channel-n DMA Buffer Address Register */
  3680. union {
  3681. __IO uint32_t HCC8; /*!< Host Channel Characteristics Register */
  3682. struct {
  3683. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3684. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3685. source or sink. */
  3686. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3687. uint32_t : 1;
  3688. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3689. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3690. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3691. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3692. or sink. */
  3693. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3694. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3695. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3696. yet. */
  3697. } HCC8_b; /*!< BitSize */
  3698. };
  3699. __I uint32_t RESERVED24;
  3700. union {
  3701. __IO uint32_t HCINT8; /*!< Host Channel Interrupt Register */
  3702. struct {
  3703. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3704. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3705. source or sink. */
  3706. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3707. uint32_t : 8;
  3708. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3709. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3710. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3711. } HCINT8_b; /*!< BitSize */
  3712. };
  3713. union {
  3714. __IO uint32_t HCINT_EN8; /*!< Host Channel Interrupt Enable Register */
  3715. struct {
  3716. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3717. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3718. source or sink. */
  3719. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3720. uint32_t : 8;
  3721. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3722. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3723. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3724. } HCINT_EN8_b; /*!< BitSize */
  3725. };
  3726. union {
  3727. __IO uint32_t HCTSIZ8; /*!< Host Channel Transfer Size Register */
  3728. struct {
  3729. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3730. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3731. for 8th microframe in that frame. */
  3732. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3733. uint32_t : 13;
  3734. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3735. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3736. } HCTSIZ8_b; /*!< BitSize */
  3737. };
  3738. union {
  3739. __IO uint32_t HCDMA8; /*!< Host Channel-n DMA Address Register */
  3740. struct {
  3741. uint32_t : 3;
  3742. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3743. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3744. } HCDMA8_b; /*!< BitSize */
  3745. };
  3746. __I uint32_t RESERVED25;
  3747. __IO uint32_t HCDMAB8; /*!< Host Channel-n DMA Buffer Address Register */
  3748. union {
  3749. __IO uint32_t HCC9; /*!< Host Channel Characteristics Register */
  3750. struct {
  3751. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3752. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3753. source or sink. */
  3754. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3755. uint32_t : 1;
  3756. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3757. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3758. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3759. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3760. or sink. */
  3761. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3762. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3763. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3764. yet. */
  3765. } HCC9_b; /*!< BitSize */
  3766. };
  3767. __I uint32_t RESERVED26;
  3768. union {
  3769. __IO uint32_t HCINT9; /*!< Host Channel Interrupt Register */
  3770. struct {
  3771. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3772. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3773. source or sink. */
  3774. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3775. uint32_t : 8;
  3776. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3777. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3778. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3779. } HCINT9_b; /*!< BitSize */
  3780. };
  3781. union {
  3782. __IO uint32_t HCINT_EN9; /*!< Host Channel Interrupt Enable Register */
  3783. struct {
  3784. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3785. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3786. source or sink. */
  3787. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3788. uint32_t : 8;
  3789. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3790. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3791. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3792. } HCINT_EN9_b; /*!< BitSize */
  3793. };
  3794. union {
  3795. __IO uint32_t HCTSIZ9; /*!< Host Channel Transfer Size Register */
  3796. struct {
  3797. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3798. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3799. for 8th microframe in that frame. */
  3800. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3801. uint32_t : 13;
  3802. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3803. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3804. } HCTSIZ9_b; /*!< BitSize */
  3805. };
  3806. union {
  3807. __IO uint32_t HCDMA9; /*!< Host Channel-n DMA Address Register */
  3808. struct {
  3809. uint32_t : 3;
  3810. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3811. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3812. } HCDMA9_b; /*!< BitSize */
  3813. };
  3814. __I uint32_t RESERVED27;
  3815. __IO uint32_t HCDMAB9; /*!< Host Channel-n DMA Buffer Address Register */
  3816. union {
  3817. __IO uint32_t HCC10; /*!< Host Channel Characteristics Register */
  3818. struct {
  3819. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3820. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3821. source or sink. */
  3822. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3823. uint32_t : 1;
  3824. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3825. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3826. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3827. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3828. or sink. */
  3829. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3830. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3831. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3832. yet. */
  3833. } HCC10_b; /*!< BitSize */
  3834. };
  3835. __I uint32_t RESERVED28;
  3836. union {
  3837. __IO uint32_t HCINT10; /*!< Host Channel Interrupt Register */
  3838. struct {
  3839. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3840. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3841. source or sink. */
  3842. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3843. uint32_t : 8;
  3844. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3845. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3846. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3847. } HCINT10_b; /*!< BitSize */
  3848. };
  3849. union {
  3850. __IO uint32_t HCINT_EN10; /*!< Host Channel Interrupt Enable Register */
  3851. struct {
  3852. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3853. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3854. source or sink. */
  3855. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3856. uint32_t : 8;
  3857. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3858. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3859. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3860. } HCINT_EN10_b; /*!< BitSize */
  3861. };
  3862. union {
  3863. __IO uint32_t HCTSIZ10; /*!< Host Channel Transfer Size Register */
  3864. struct {
  3865. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3866. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3867. for 8th microframe in that frame. */
  3868. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3869. uint32_t : 13;
  3870. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3871. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3872. } HCTSIZ10_b; /*!< BitSize */
  3873. };
  3874. union {
  3875. __IO uint32_t HCDMA10; /*!< Host Channel-n DMA Address Register */
  3876. struct {
  3877. uint32_t : 3;
  3878. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3879. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3880. } HCDMA10_b; /*!< BitSize */
  3881. };
  3882. __I uint32_t RESERVED29;
  3883. __IO uint32_t HCDMAB10; /*!< Host Channel-n DMA Buffer Address Register */
  3884. union {
  3885. __IO uint32_t HCC11; /*!< Host Channel Characteristics Register */
  3886. struct {
  3887. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3888. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3889. source or sink. */
  3890. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3891. uint32_t : 1;
  3892. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3893. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3894. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3895. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3896. or sink. */
  3897. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3898. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3899. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3900. yet. */
  3901. } HCC11_b; /*!< BitSize */
  3902. };
  3903. __I uint32_t RESERVED30;
  3904. union {
  3905. __IO uint32_t HCINT11; /*!< Host Channel Interrupt Register */
  3906. struct {
  3907. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3908. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3909. source or sink. */
  3910. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3911. uint32_t : 8;
  3912. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3913. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3914. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3915. } HCINT11_b; /*!< BitSize */
  3916. };
  3917. union {
  3918. __IO uint32_t HCINT_EN11; /*!< Host Channel Interrupt Enable Register */
  3919. struct {
  3920. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3921. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3922. source or sink. */
  3923. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3924. uint32_t : 8;
  3925. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3926. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3927. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3928. } HCINT_EN11_b; /*!< BitSize */
  3929. };
  3930. union {
  3931. __IO uint32_t HCTSIZ11; /*!< Host Channel Transfer Size Register */
  3932. struct {
  3933. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  3934. microframe.Bit N indicates scheduling for Nth microframe scheduling
  3935. for 8th microframe in that frame. */
  3936. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  3937. uint32_t : 13;
  3938. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  3939. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  3940. } HCTSIZ11_b; /*!< BitSize */
  3941. };
  3942. union {
  3943. __IO uint32_t HCDMA11; /*!< Host Channel-n DMA Address Register */
  3944. struct {
  3945. uint32_t : 3;
  3946. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  3947. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  3948. } HCDMA11_b; /*!< BitSize */
  3949. };
  3950. __I uint32_t RESERVED31;
  3951. __IO uint32_t HCDMAB11; /*!< Host Channel-n DMA Buffer Address Register */
  3952. union {
  3953. __IO uint32_t HCC12; /*!< Host Channel Characteristics Register */
  3954. struct {
  3955. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  3956. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  3957. source or sink. */
  3958. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  3959. uint32_t : 1;
  3960. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  3961. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  3962. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  3963. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  3964. or sink. */
  3965. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  3966. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  3967. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  3968. yet. */
  3969. } HCC12_b; /*!< BitSize */
  3970. };
  3971. __I uint32_t RESERVED32;
  3972. union {
  3973. __IO uint32_t HCINT12; /*!< Host Channel Interrupt Register */
  3974. struct {
  3975. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3976. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3977. source or sink. */
  3978. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3979. uint32_t : 8;
  3980. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3981. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3982. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3983. } HCINT12_b; /*!< BitSize */
  3984. };
  3985. union {
  3986. __IO uint32_t HCINT_EN12; /*!< Host Channel Interrupt Enable Register */
  3987. struct {
  3988. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  3989. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  3990. source or sink. */
  3991. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  3992. uint32_t : 8;
  3993. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  3994. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  3995. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  3996. } HCINT_EN12_b; /*!< BitSize */
  3997. };
  3998. union {
  3999. __IO uint32_t HCTSIZ12; /*!< Host Channel Transfer Size Register */
  4000. struct {
  4001. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  4002. microframe.Bit N indicates scheduling for Nth microframe scheduling
  4003. for 8th microframe in that frame. */
  4004. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  4005. uint32_t : 13;
  4006. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  4007. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  4008. } HCTSIZ12_b; /*!< BitSize */
  4009. };
  4010. union {
  4011. __IO uint32_t HCDMA12; /*!< Host Channel-n DMA Address Register */
  4012. struct {
  4013. uint32_t : 3;
  4014. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  4015. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  4016. } HCDMA12_b; /*!< BitSize */
  4017. };
  4018. __I uint32_t RESERVED33;
  4019. __IO uint32_t HCDMAB12; /*!< Host Channel-n DMA Buffer Address Register */
  4020. union {
  4021. __IO uint32_t HCC13; /*!< Host Channel Characteristics Register */
  4022. struct {
  4023. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4024. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  4025. source or sink. */
  4026. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  4027. uint32_t : 1;
  4028. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  4029. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4030. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  4031. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  4032. or sink. */
  4033. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  4034. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  4035. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  4036. yet. */
  4037. } HCC13_b; /*!< BitSize */
  4038. };
  4039. __I uint32_t RESERVED34;
  4040. union {
  4041. __IO uint32_t HCINT13; /*!< Host Channel Interrupt Register */
  4042. struct {
  4043. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4044. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  4045. source or sink. */
  4046. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4047. uint32_t : 8;
  4048. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4049. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  4050. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  4051. } HCINT13_b; /*!< BitSize */
  4052. };
  4053. union {
  4054. __IO uint32_t HCINT_EN13; /*!< Host Channel Interrupt Enable Register */
  4055. struct {
  4056. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4057. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  4058. source or sink. */
  4059. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4060. uint32_t : 8;
  4061. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4062. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  4063. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  4064. } HCINT_EN13_b; /*!< BitSize */
  4065. };
  4066. union {
  4067. __IO uint32_t HCTSIZ13; /*!< Host Channel Transfer Size Register */
  4068. struct {
  4069. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  4070. microframe.Bit N indicates scheduling for Nth microframe scheduling
  4071. for 8th microframe in that frame. */
  4072. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  4073. uint32_t : 13;
  4074. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  4075. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  4076. } HCTSIZ13_b; /*!< BitSize */
  4077. };
  4078. union {
  4079. __IO uint32_t HCDMA13; /*!< Host Channel-n DMA Address Register */
  4080. struct {
  4081. uint32_t : 3;
  4082. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  4083. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  4084. } HCDMA13_b; /*!< BitSize */
  4085. };
  4086. __I uint32_t RESERVED35;
  4087. __IO uint32_t HCDMAB13; /*!< Host Channel-n DMA Buffer Address Register */
  4088. union {
  4089. __IO uint32_t HCC14; /*!< Host Channel Characteristics Register */
  4090. struct {
  4091. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4092. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  4093. source or sink. */
  4094. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  4095. uint32_t : 1;
  4096. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  4097. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4098. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  4099. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  4100. or sink. */
  4101. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  4102. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  4103. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  4104. yet. */
  4105. } HCC14_b; /*!< BitSize */
  4106. };
  4107. __I uint32_t RESERVED36;
  4108. union {
  4109. __IO uint32_t HCINT14; /*!< Host Channel Interrupt Register */
  4110. struct {
  4111. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4112. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  4113. source or sink. */
  4114. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4115. uint32_t : 8;
  4116. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4117. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  4118. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  4119. } HCINT14_b; /*!< BitSize */
  4120. };
  4121. union {
  4122. __IO uint32_t HCINT_EN14; /*!< Host Channel Interrupt Enable Register */
  4123. struct {
  4124. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4125. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  4126. source or sink. */
  4127. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4128. uint32_t : 8;
  4129. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4130. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  4131. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  4132. } HCINT_EN14_b; /*!< BitSize */
  4133. };
  4134. union {
  4135. __IO uint32_t HCTSIZ14; /*!< Host Channel Transfer Size Register */
  4136. struct {
  4137. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  4138. microframe.Bit N indicates scheduling for Nth microframe scheduling
  4139. for 8th microframe in that frame. */
  4140. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  4141. uint32_t : 13;
  4142. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  4143. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  4144. } HCTSIZ14_b; /*!< BitSize */
  4145. };
  4146. union {
  4147. __IO uint32_t HCDMA14; /*!< Host Channel-n DMA Address Register */
  4148. struct {
  4149. uint32_t : 3;
  4150. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  4151. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  4152. } HCDMA14_b; /*!< BitSize */
  4153. };
  4154. __I uint32_t RESERVED37;
  4155. __IO uint32_t HCDMAB14; /*!< Host Channel-n DMA Buffer Address Register */
  4156. union {
  4157. __IO uint32_t HCC15; /*!< Host Channel Characteristics Register */
  4158. struct {
  4159. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4160. __IO uint32_t EP_NUM : 4; /*!< Indicates the endpoint number on the device serving as the data
  4161. source or sink. */
  4162. __IO uint32_t EP_DIR : 1; /*!< Indicates whether the transaction is IN or OUT. 0, OUT. 1, IN */
  4163. uint32_t : 1;
  4164. __IO uint32_t LSD : 1; /*!< indicate that this channel is communicating to a low-speed device. */
  4165. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4166. __IO uint32_t EC : 2; /*!< Multi Count (MC) / Error Count (EC). */
  4167. __IO uint32_t DA : 7; /*!< This field selects the specific device serving as the data source
  4168. or sink. */
  4169. __IO uint32_t OF : 1; /*!< The frame is odd or even. */
  4170. __IO uint32_t CD : 1; /*!< sets this bit to stop transmitting/receiving data on a channel. */
  4171. __IO uint32_t CE : 1; /*!< If the descriptor structure and data buffer are ready or not
  4172. yet. */
  4173. } HCC15_b; /*!< BitSize */
  4174. };
  4175. __I uint32_t RESERVED38;
  4176. union {
  4177. __IO uint32_t HCINT15; /*!< Host Channel Interrupt Register */
  4178. struct {
  4179. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4180. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  4181. source or sink. */
  4182. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4183. uint32_t : 8;
  4184. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4185. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  4186. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  4187. } HCINT15_b; /*!< BitSize */
  4188. };
  4189. union {
  4190. __IO uint32_t HCINT_EN15; /*!< Host Channel Interrupt Enable Register */
  4191. struct {
  4192. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4193. __IO uint32_t CH_HALT : 1; /*!< Indicates the endpoint number on the device serving as the data
  4194. source or sink. */
  4195. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4196. uint32_t : 8;
  4197. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4198. __IO uint32_t ETE : 1; /*!< 3 consecutive transaction errors occurred on the USB bus */
  4199. __IO uint32_t DR : 1; /*!< the corresponding channel's descriptor list rolls over */
  4200. } HCINT_EN15_b; /*!< BitSize */
  4201. };
  4202. union {
  4203. __IO uint32_t HCTSIZ15; /*!< Host Channel Transfer Size Register */
  4204. struct {
  4205. __IO uint32_t SCHED_INFO : 8; /*!< Every bit in this 8 bit register indicates scheduling for that
  4206. microframe.Bit N indicates scheduling for Nth microframe scheduling
  4207. for 8th microframe in that frame. */
  4208. __IO uint32_t NTD : 8; /*!< Number of Transfer Descriptors. */
  4209. uint32_t : 13;
  4210. __IO uint32_t PID : 2; /*!< the type of PID to use for the initial transaction */
  4211. __IO uint32_t PING : 1; /*!< Setting this field to 1 directs the host to do PING protocol */
  4212. } HCTSIZ15_b; /*!< BitSize */
  4213. };
  4214. union {
  4215. __IO uint32_t HCDMA15; /*!< Host Channel-n DMA Address Register */
  4216. struct {
  4217. uint32_t : 3;
  4218. __IO uint32_t CTD : 6; /*!< Number of Transfer Descriptors for Non-Isochronous */
  4219. __IO uint32_t ADDR : 23; /*!< he start address of 512 bytes page for Non-Isochronous */
  4220. } HCDMA15_b; /*!< BitSize */
  4221. };
  4222. __I uint32_t RESERVED39;
  4223. __IO uint32_t HCDMAB15; /*!< Host Channel-n DMA Buffer Address Register */
  4224. __I uint32_t RESERVED40[64];
  4225. union {
  4226. __IO uint32_t DCFG; /*!< Device Configuration Register */
  4227. struct {
  4228. __IO uint32_t DSPEED : 2; /*!< the maximum speed the application can support */
  4229. __IO uint32_t NZLSOH : 1; /*!< select the handshake the core sends on receiving a non zero-length
  4230. data packet during the OUT transaction of a control transfer's
  4231. Status stage */
  4232. __IO uint32_t EN_32K_SUS : 1; /*!< Enable 32 KHz Suspend mode */
  4233. __IO uint32_t DEVICE_ADDR: 7; /*!< The application must program this field after every SetAddress
  4234. control command */
  4235. __IO uint32_t PFI : 2; /*!< Indicates the time within a (micro)frame at which the application
  4236. must be notified using the End Of Periodic Frame Interrupt */
  4237. __IO uint32_t EDON : 1; /*!< If set the core sets NAK after Bulk OUT transfer complete */
  4238. uint32_t : 9;
  4239. __IO uint32_t EN_SG_DMA : 1; /*!< enable the Scatter/Gather DMA operation */
  4240. __IO uint32_t PSI : 2; /*!< Periodic Scheduling Interval */
  4241. __IO uint32_t RVP : 6; /*!< It controls the resume period when the core resumes from suspend */
  4242. } DCFG_b; /*!< BitSize */
  4243. };
  4244. union {
  4245. __IO uint32_t DCTL; /*!< Device Control Register */
  4246. struct {
  4247. __IO uint32_t RWS : 1; /*!< If set, the core initiates remote signaling to wake the USB
  4248. hosts */
  4249. __IO uint32_t SD : 1; /*!< If set, generates a device disconnect event to the USB host */
  4250. __I uint32_t GNPINS : 1; /*!< A NAK handshake is sent out on all non-periodic IN endpoints,
  4251. irrespective of the data availability in the transmit FIFO. */
  4252. __I uint32_t GONS : 1; /*!< No data is written to the RxFIFO, irrespective of space availability.. */
  4253. __IO uint32_t TC : 3; /*!< Test Control */
  4254. __O uint32_t SGNPIN : 1; /*!< A write to this field sets the Global Non-periodic IN NAK */
  4255. __O uint32_t CGNPIN : 1; /*!< A write to this field clears the Global Non-periodic IN NAK */
  4256. __O uint32_t SGON : 1; /*!< A write to this field sets the Global OUT NAK */
  4257. __O uint32_t CGON : 1; /*!< A write to this field sets the Global OUT NAK. */
  4258. __IO uint32_t POPD : 1; /*!< Power-On Programming Done */
  4259. __IO uint32_t GMC : 2; /*!< GMC must be programmed only once after initialization. the number
  4260. of packets to be serviced for that end point before moving to
  4261. the next end point */
  4262. uint32_t : 1;
  4263. __IO uint32_t IFNIE : 1; /*!< Ignore frame number for isochronous endpoints */
  4264. __IO uint32_t NBE : 1; /*!< Set NAK automatically on babble */
  4265. __IO uint32_t ECBNA : 1; /*!< After receiving BNA interrupt, the core disables the endpoint */
  4266. } DCTL_b; /*!< BitSize */
  4267. };
  4268. union {
  4269. __I uint32_t DSTS; /*!< Device Status Register */
  4270. struct {
  4271. __I uint32_t SUSPEND : 1; /*!< this bit is set as long as a Suspend condition is detected on
  4272. the USB */
  4273. __I uint32_t SPEED : 2; /*!< Indicates the speed at which the DWC_otg core has come up after
  4274. speed detection through a chirp sequence */
  4275. __I uint32_t EE : 1; /*!< reason of suspend state */
  4276. uint32_t : 4;
  4277. __I uint32_t SOFFN : 14; /*!< Frame or Microframe Number of the Received SOF */
  4278. __I uint32_t DLSDP : 1; /*!< Logic level of D+ */
  4279. __I uint32_t DLSDN : 1; /*!< Logic level of D- */
  4280. } DSTS_b; /*!< BitSize */
  4281. };
  4282. __I uint32_t RESERVED41;
  4283. union {
  4284. __IO uint32_t DIEPEN; /*!< Device IN Endpoint Common Interrupt Enable Register */
  4285. struct {
  4286. __IO uint32_t TC : 1; /*!< Transfer Completed Interrupt */
  4287. __IO uint32_t ED : 1; /*!< Endpoint Disabled Interrupt */
  4288. __IO uint32_t AHB_ERR : 1; /*!< AHB Error Interrupt */
  4289. __IO uint32_t TIMEOUT : 1; /*!< Timeout Condition(Non-isochronous endpoints) */
  4290. __IO uint32_t ITRWTFE : 1; /*!< IN Token Received When TxFIFO Empty */
  4291. __IO uint32_t ITRWEPM : 1; /*!< IN Token received with EP Mismatch */
  4292. __IO uint32_t IENE : 1; /*!< IN Endpoint NAK Effective */
  4293. uint32_t : 1;
  4294. __IO uint32_t FU : 1; /*!< Fifo Underrun */
  4295. __IO uint32_t BNA : 1; /*!< BNA Interrupt */
  4296. uint32_t : 3;
  4297. __IO uint32_t NAK : 1; /*!< NAK interrupt */
  4298. } DIEPEN_b; /*!< BitSize */
  4299. };
  4300. union {
  4301. __IO uint32_t DOEPEN; /*!< Device OUT Endpoint Common Interrupt Enable Register */
  4302. struct {
  4303. __IO uint32_t TC : 1; /*!< Transfer Completed Interrupt */
  4304. __IO uint32_t ED : 1; /*!< Endpoint Disabled Interrupt */
  4305. __IO uint32_t AHB_ERR : 1; /*!< AHB Error Interrupt */
  4306. __IO uint32_t SPD : 1; /*!< SETUP Phase Done, Applies to control endpoints only */
  4307. __IO uint32_t OTRWED : 1; /*!< OUT Token Received when Endpoint Disabled, Applies to control
  4308. OUT endpoints only */
  4309. __IO uint32_t SPR : 1; /*!< Status Phase Received */
  4310. __IO uint32_t BTBSPR : 1; /*!< Back-to-Back SETUP Packets Received, Applies to control OUT
  4311. endpoints only */
  4312. uint32_t : 1;
  4313. __IO uint32_t OPE : 1; /*!< OUT Packet Error */
  4314. __IO uint32_t BNA : 1; /*!< BNA Interrupt */
  4315. uint32_t : 2;
  4316. __IO uint32_t BE : 1; /*!< Babble Error interrupt */
  4317. __IO uint32_t NAK : 1; /*!< NAK interrupt */
  4318. __IO uint32_t NYET : 1; /*!< NYET interrupt */
  4319. } DOEPEN_b; /*!< BitSize */
  4320. };
  4321. union {
  4322. __I uint32_t DAINT; /*!< Device All Channels Interrupt Register */
  4323. struct {
  4324. __I uint32_t INT : 16; /*!< IN Endpoint Interrupt Bits, from 0 to 15. */
  4325. __I uint32_t OUT_INT : 16; /*!< OUT Endpoint Interrupt Bits, from 0 to 15. */
  4326. } DAINT_b; /*!< BitSize */
  4327. };
  4328. union {
  4329. __IO uint32_t DAINT_EN; /*!< Device All Channels Interrupt Enable Register */
  4330. struct {
  4331. __IO uint32_t IN_EN : 16; /*!< IN EP Interrupt Enable, from 0 to 15. */
  4332. __IO uint32_t OUT_EN : 16; /*!< OUT EP Interrupt Enable, from 0 to 15. */
  4333. } DAINT_EN_b; /*!< BitSize */
  4334. };
  4335. __I uint32_t RESERVED42[4];
  4336. union {
  4337. __IO uint32_t DTHRCTL; /*!< Device Threshold Control Register */
  4338. struct {
  4339. __IO uint32_t NISOINETE : 1; /*!< Non-ISO IN Endpoints Threshold Enable */
  4340. __IO uint32_t ISOINETE : 1; /*!< ISO IN Endpoints Threshold Enable */
  4341. __IO uint32_t TTL : 9; /*!< This field specifies Transmit thresholding size in DWORDS */
  4342. __IO uint32_t ATR : 2; /*!< These bits define the ratio between the AHB threshold and the
  4343. MAC threshold for the transmit path only. */
  4344. uint32_t : 3;
  4345. __IO uint32_t RTE : 1; /*!< If set, the core enables thresholding in the receive direction */
  4346. __IO uint32_t RTL : 9; /*!< This field specifies Receive thresholding size in DWORDS */
  4347. uint32_t : 1;
  4348. __IO uint32_t APE : 1; /*!< This bit controls internal DMA arbiter parking for IN endpoints */
  4349. } DTHRCTL_b; /*!< BitSize */
  4350. };
  4351. __IO uint16_t DIEPEMPEN; /*!< Device IN Endpoint FIFO Empty Interrupt Enable Register */
  4352. __I uint16_t RESERVED43[101];
  4353. union {
  4354. __IO uint32_t DIEPCTL0; /*!< Device Control IN Endpoint 0 Control Register */
  4355. struct {
  4356. __IO uint32_t MPS : 2; /*!< Indicates the maximum packet size of the associated endpoint,
  4357. applies to IN and OUT endpoints */
  4358. uint32_t : 13;
  4359. __I uint32_t USBAE : 1; /*!< Always 1, indicating that control endpoint 0 is always active
  4360. in all configurations and interfaces */
  4361. uint32_t : 1;
  4362. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint */
  4363. __I uint32_t EP_TYPE : 2; /*!< Hardcoded to 00 for control */
  4364. uint32_t : 1;
  4365. __IO uint32_t STALL : 1; /*!< The application sets this bit, and the core clears it when a
  4366. SETUP token is received for this endpoint */
  4367. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4368. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4369. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4370. uint32_t : 2;
  4371. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4372. endpoint even before the transfer for that endpoint is complete */
  4373. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4374. transmit is setup */
  4375. } DIEPCTL0_b; /*!< BitSize */
  4376. };
  4377. __I uint32_t RESERVED44;
  4378. union {
  4379. __IO uint32_t DIEPINT0; /*!< Device IN Endpoint-n Interrupt Register */
  4380. struct {
  4381. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4382. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4383. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4384. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4385. endpoint */
  4386. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4387. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4388. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4389. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4390. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4391. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4392. uint32_t : 2;
  4393. __IO uint32_t BE : 1; /*!< Babble Error */
  4394. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4395. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4396. } DIEPINT0_b; /*!< BitSize */
  4397. };
  4398. __I uint32_t RESERVED45;
  4399. union {
  4400. __IO uint32_t DIEPTSIZ0; /*!< Device IN Endpoint 0 Transfer Size Register */
  4401. struct {
  4402. __IO uint32_t SIZE : 7; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4403. uint32_t : 12;
  4404. __IO uint32_t PACKET_CNT : 2; /*!< the total number of USB packets */
  4405. } DIEPTSIZ0_b; /*!< BitSize */
  4406. };
  4407. __IO uint32_t DIEPDMA0; /*!< Device IN Endpoint-n DMA Address Register */
  4408. __IO uint16_t DTXFSA0; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4409. __I uint16_t RESERVED46;
  4410. __I uint32_t DIEPDMAB0; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  4411. union {
  4412. __IO uint32_t DIEPCTL1; /*!< Device IN Endpoint N Control Register */
  4413. struct {
  4414. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4415. uint32_t : 4;
  4416. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  4417. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  4418. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  4419. set */
  4420. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4421. uint32_t : 1;
  4422. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  4423. To control endpoints, response an ACK */
  4424. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4425. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4426. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4427. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  4428. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  4429. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4430. endpoint even before the transfer for that endpoint is complete */
  4431. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4432. transmit is setup */
  4433. } DIEPCTL1_b; /*!< BitSize */
  4434. };
  4435. __I uint32_t RESERVED47;
  4436. union {
  4437. __IO uint32_t DIEPINT1; /*!< Device IN Endpoint-n Interrupt Register */
  4438. struct {
  4439. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4440. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4441. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4442. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4443. endpoint */
  4444. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4445. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4446. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4447. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4448. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4449. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4450. uint32_t : 2;
  4451. __IO uint32_t BE : 1; /*!< Babble Error */
  4452. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4453. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4454. } DIEPINT1_b; /*!< BitSize */
  4455. };
  4456. __I uint32_t RESERVED48;
  4457. union {
  4458. __IO uint32_t DIEPTSIZ1; /*!< Device IN Endpoint-n Transfer Size Register */
  4459. struct {
  4460. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4461. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  4462. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  4463. The number of packets must be fetched per non-periodic IN endpoints */
  4464. } DIEPTSIZ1_b; /*!< BitSize */
  4465. };
  4466. __IO uint32_t DIEPDMA1; /*!< Device IN Endpoint-n DMA Address Register */
  4467. __IO uint16_t DTXFSA1; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4468. __I uint16_t RESERVED49;
  4469. __I uint32_t DIEPDMAB1; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  4470. union {
  4471. __IO uint32_t DIEPCTL2; /*!< Device IN Endpoint N Control Register */
  4472. struct {
  4473. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4474. uint32_t : 4;
  4475. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  4476. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  4477. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  4478. set */
  4479. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4480. uint32_t : 1;
  4481. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  4482. To control endpoints, response an ACK */
  4483. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4484. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4485. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4486. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  4487. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  4488. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4489. endpoint even before the transfer for that endpoint is complete */
  4490. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4491. transmit is setup */
  4492. } DIEPCTL2_b; /*!< BitSize */
  4493. };
  4494. __I uint32_t RESERVED50;
  4495. union {
  4496. __IO uint32_t DIEPINT2; /*!< Device IN Endpoint-n Interrupt Register */
  4497. struct {
  4498. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4499. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4500. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4501. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4502. endpoint */
  4503. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4504. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4505. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4506. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4507. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4508. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4509. uint32_t : 2;
  4510. __IO uint32_t BE : 1; /*!< Babble Error */
  4511. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4512. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4513. } DIEPINT2_b; /*!< BitSize */
  4514. };
  4515. __I uint32_t RESERVED51;
  4516. union {
  4517. __IO uint32_t DIEPTSIZ2; /*!< Device IN Endpoint-n Transfer Size Register */
  4518. struct {
  4519. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4520. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  4521. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  4522. The number of packets must be fetched per non-periodic IN endpoints */
  4523. } DIEPTSIZ2_b; /*!< BitSize */
  4524. };
  4525. __IO uint32_t DIEPDMA2; /*!< Device IN Endpoint-n DMA Address Register */
  4526. __IO uint16_t DTXFSA2; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4527. __I uint16_t RESERVED52;
  4528. __I uint32_t DIEPDMAB2; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  4529. union {
  4530. __IO uint32_t DIEPCTL3; /*!< Device IN Endpoint N Control Register */
  4531. struct {
  4532. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4533. uint32_t : 4;
  4534. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  4535. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  4536. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  4537. set */
  4538. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4539. uint32_t : 1;
  4540. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  4541. To control endpoints, response an ACK */
  4542. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4543. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4544. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4545. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  4546. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  4547. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4548. endpoint even before the transfer for that endpoint is complete */
  4549. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4550. transmit is setup */
  4551. } DIEPCTL3_b; /*!< BitSize */
  4552. };
  4553. __I uint32_t RESERVED53;
  4554. union {
  4555. __IO uint32_t DIEPINT3; /*!< Device IN Endpoint-n Interrupt Register */
  4556. struct {
  4557. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4558. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4559. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4560. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4561. endpoint */
  4562. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4563. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4564. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4565. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4566. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4567. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4568. uint32_t : 2;
  4569. __IO uint32_t BE : 1; /*!< Babble Error */
  4570. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4571. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4572. } DIEPINT3_b; /*!< BitSize */
  4573. };
  4574. __I uint32_t RESERVED54;
  4575. union {
  4576. __IO uint32_t DIEPTSIZ3; /*!< Device IN Endpoint-n Transfer Size Register */
  4577. struct {
  4578. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4579. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  4580. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  4581. The number of packets must be fetched per non-periodic IN endpoints */
  4582. } DIEPTSIZ3_b; /*!< BitSize */
  4583. };
  4584. __IO uint32_t DIEPDMA3; /*!< Device IN Endpoint-n DMA Address Register */
  4585. __IO uint16_t DTXFSA3; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4586. __I uint16_t RESERVED55;
  4587. __I uint32_t DIEPDMAB3; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  4588. union {
  4589. __IO uint32_t DIEPCTL4; /*!< Device IN Endpoint N Control Register */
  4590. struct {
  4591. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4592. uint32_t : 4;
  4593. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  4594. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  4595. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  4596. set */
  4597. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4598. uint32_t : 1;
  4599. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  4600. To control endpoints, response an ACK */
  4601. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4602. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4603. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4604. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  4605. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  4606. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4607. endpoint even before the transfer for that endpoint is complete */
  4608. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4609. transmit is setup */
  4610. } DIEPCTL4_b; /*!< BitSize */
  4611. };
  4612. __I uint32_t RESERVED56;
  4613. union {
  4614. __IO uint32_t DIEPINT4; /*!< Device IN Endpoint-n Interrupt Register */
  4615. struct {
  4616. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4617. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4618. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4619. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4620. endpoint */
  4621. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4622. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4623. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4624. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4625. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4626. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4627. uint32_t : 2;
  4628. __IO uint32_t BE : 1; /*!< Babble Error */
  4629. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4630. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4631. } DIEPINT4_b; /*!< BitSize */
  4632. };
  4633. __I uint32_t RESERVED57;
  4634. union {
  4635. __IO uint32_t DIEPTSIZ4; /*!< Device IN Endpoint-n Transfer Size Register */
  4636. struct {
  4637. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4638. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  4639. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  4640. The number of packets must be fetched per non-periodic IN endpoints */
  4641. } DIEPTSIZ4_b; /*!< BitSize */
  4642. };
  4643. __IO uint32_t DIEPDMA4; /*!< Device IN Endpoint-n DMA Address Register */
  4644. __IO uint16_t DTXFSA4; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4645. __I uint16_t RESERVED58;
  4646. __I uint32_t DIEPDMAB4; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  4647. union {
  4648. __IO uint32_t DIEPCTL5; /*!< Device IN Endpoint N Control Register */
  4649. struct {
  4650. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4651. uint32_t : 4;
  4652. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  4653. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  4654. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  4655. set */
  4656. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4657. uint32_t : 1;
  4658. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  4659. To control endpoints, response an ACK */
  4660. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4661. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4662. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4663. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  4664. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  4665. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4666. endpoint even before the transfer for that endpoint is complete */
  4667. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4668. transmit is setup */
  4669. } DIEPCTL5_b; /*!< BitSize */
  4670. };
  4671. __I uint32_t RESERVED59;
  4672. union {
  4673. __IO uint32_t DIEPINT5; /*!< Device IN Endpoint-n Interrupt Register */
  4674. struct {
  4675. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4676. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4677. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4678. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4679. endpoint */
  4680. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4681. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4682. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4683. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4684. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4685. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4686. uint32_t : 2;
  4687. __IO uint32_t BE : 1; /*!< Babble Error */
  4688. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4689. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4690. } DIEPINT5_b; /*!< BitSize */
  4691. };
  4692. __I uint32_t RESERVED60;
  4693. union {
  4694. __IO uint32_t DIEPTSIZ5; /*!< Device IN Endpoint-n Transfer Size Register */
  4695. struct {
  4696. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4697. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  4698. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  4699. The number of packets must be fetched per non-periodic IN endpoints */
  4700. } DIEPTSIZ5_b; /*!< BitSize */
  4701. };
  4702. __IO uint32_t DIEPDMA5; /*!< Device IN Endpoint-n DMA Address Register */
  4703. __IO uint16_t DTXFSA5; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4704. __I uint16_t RESERVED61;
  4705. __I uint32_t DIEPDMAB5; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  4706. union {
  4707. __IO uint32_t DIEPCTL6; /*!< Device IN Endpoint N Control Register */
  4708. struct {
  4709. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4710. uint32_t : 4;
  4711. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  4712. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  4713. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  4714. set */
  4715. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4716. uint32_t : 1;
  4717. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  4718. To control endpoints, response an ACK */
  4719. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4720. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4721. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4722. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  4723. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  4724. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4725. endpoint even before the transfer for that endpoint is complete */
  4726. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4727. transmit is setup */
  4728. } DIEPCTL6_b; /*!< BitSize */
  4729. };
  4730. __I uint32_t RESERVED62;
  4731. union {
  4732. __IO uint32_t DIEPINT6; /*!< Device IN Endpoint-n Interrupt Register */
  4733. struct {
  4734. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4735. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4736. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4737. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4738. endpoint */
  4739. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4740. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4741. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4742. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4743. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4744. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4745. uint32_t : 2;
  4746. __IO uint32_t BE : 1; /*!< Babble Error */
  4747. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4748. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4749. } DIEPINT6_b; /*!< BitSize */
  4750. };
  4751. __I uint32_t RESERVED63;
  4752. union {
  4753. __IO uint32_t DIEPTSIZ6; /*!< Device IN Endpoint-n Transfer Size Register */
  4754. struct {
  4755. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4756. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  4757. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  4758. The number of packets must be fetched per non-periodic IN endpoints */
  4759. } DIEPTSIZ6_b; /*!< BitSize */
  4760. };
  4761. __IO uint32_t DIEPDMA6; /*!< Device IN Endpoint-n DMA Address Register */
  4762. __IO uint16_t DTXFSA6; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4763. __I uint16_t RESERVED64;
  4764. __I uint32_t DIEPDMAB6; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  4765. union {
  4766. __IO uint32_t DIEPCTL7; /*!< Device IN Endpoint N Control Register */
  4767. struct {
  4768. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4769. uint32_t : 4;
  4770. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  4771. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  4772. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  4773. set */
  4774. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4775. uint32_t : 1;
  4776. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  4777. To control endpoints, response an ACK */
  4778. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4779. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4780. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4781. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  4782. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  4783. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4784. endpoint even before the transfer for that endpoint is complete */
  4785. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4786. transmit is setup */
  4787. } DIEPCTL7_b; /*!< BitSize */
  4788. };
  4789. __I uint32_t RESERVED65;
  4790. union {
  4791. __IO uint32_t DIEPINT7; /*!< Device IN Endpoint-n Interrupt Register */
  4792. struct {
  4793. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4794. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4795. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4796. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4797. endpoint */
  4798. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4799. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4800. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4801. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4802. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4803. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4804. uint32_t : 2;
  4805. __IO uint32_t BE : 1; /*!< Babble Error */
  4806. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4807. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4808. } DIEPINT7_b; /*!< BitSize */
  4809. };
  4810. __I uint32_t RESERVED66;
  4811. union {
  4812. __IO uint32_t DIEPTSIZ7; /*!< Device IN Endpoint-n Transfer Size Register */
  4813. struct {
  4814. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4815. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  4816. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  4817. The number of packets must be fetched per non-periodic IN endpoints */
  4818. } DIEPTSIZ7_b; /*!< BitSize */
  4819. };
  4820. __IO uint32_t DIEPDMA7; /*!< Device IN Endpoint-n DMA Address Register */
  4821. __IO uint16_t DTXFSA7; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4822. __I uint16_t RESERVED67;
  4823. __I uint32_t DIEPDMAB7; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  4824. union {
  4825. __IO uint32_t DIEPCTL8; /*!< Device IN Endpoint N Control Register */
  4826. struct {
  4827. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4828. uint32_t : 4;
  4829. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  4830. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  4831. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  4832. set */
  4833. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4834. uint32_t : 1;
  4835. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  4836. To control endpoints, response an ACK */
  4837. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4838. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4839. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4840. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  4841. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  4842. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4843. endpoint even before the transfer for that endpoint is complete */
  4844. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4845. transmit is setup */
  4846. } DIEPCTL8_b; /*!< BitSize */
  4847. };
  4848. __I uint32_t RESERVED68;
  4849. union {
  4850. __IO uint32_t DIEPINT8; /*!< Device IN Endpoint-n Interrupt Register */
  4851. struct {
  4852. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4853. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4854. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4855. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4856. endpoint */
  4857. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4858. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4859. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4860. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4861. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4862. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4863. uint32_t : 2;
  4864. __IO uint32_t BE : 1; /*!< Babble Error */
  4865. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4866. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4867. } DIEPINT8_b; /*!< BitSize */
  4868. };
  4869. __I uint32_t RESERVED69;
  4870. union {
  4871. __IO uint32_t DIEPTSIZ8; /*!< Device IN Endpoint-n Transfer Size Register */
  4872. struct {
  4873. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4874. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  4875. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  4876. The number of packets must be fetched per non-periodic IN endpoints */
  4877. } DIEPTSIZ8_b; /*!< BitSize */
  4878. };
  4879. __IO uint32_t DIEPDMA8; /*!< Device IN Endpoint-n DMA Address Register */
  4880. __IO uint16_t DTXFSA8; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4881. __I uint16_t RESERVED70;
  4882. __I uint32_t DIEPDMAB8; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  4883. union {
  4884. __IO uint32_t DIEPCTL9; /*!< Device IN Endpoint N Control Register */
  4885. struct {
  4886. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4887. uint32_t : 4;
  4888. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  4889. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  4890. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  4891. set */
  4892. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4893. uint32_t : 1;
  4894. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  4895. To control endpoints, response an ACK */
  4896. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4897. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4898. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4899. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  4900. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  4901. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4902. endpoint even before the transfer for that endpoint is complete */
  4903. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4904. transmit is setup */
  4905. } DIEPCTL9_b; /*!< BitSize */
  4906. };
  4907. __I uint32_t RESERVED71;
  4908. union {
  4909. __IO uint32_t DIEPINT9; /*!< Device IN Endpoint-n Interrupt Register */
  4910. struct {
  4911. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4912. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4913. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4914. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4915. endpoint */
  4916. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4917. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4918. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4919. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4920. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4921. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4922. uint32_t : 2;
  4923. __IO uint32_t BE : 1; /*!< Babble Error */
  4924. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4925. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4926. } DIEPINT9_b; /*!< BitSize */
  4927. };
  4928. __I uint32_t RESERVED72;
  4929. union {
  4930. __IO uint32_t DIEPTSIZ9; /*!< Device IN Endpoint-n Transfer Size Register */
  4931. struct {
  4932. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4933. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  4934. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  4935. The number of packets must be fetched per non-periodic IN endpoints */
  4936. } DIEPTSIZ9_b; /*!< BitSize */
  4937. };
  4938. __IO uint32_t DIEPDMA9; /*!< Device IN Endpoint-n DMA Address Register */
  4939. __IO uint16_t DTXFSA9; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4940. __I uint16_t RESERVED73;
  4941. __I uint32_t DIEPDMAB9; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  4942. union {
  4943. __IO uint32_t DIEPCTL10; /*!< Device IN Endpoint N Control Register */
  4944. struct {
  4945. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  4946. uint32_t : 4;
  4947. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  4948. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  4949. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  4950. set */
  4951. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  4952. uint32_t : 1;
  4953. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  4954. To control endpoints, response an ACK */
  4955. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  4956. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  4957. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  4958. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  4959. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  4960. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  4961. endpoint even before the transfer for that endpoint is complete */
  4962. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  4963. transmit is setup */
  4964. } DIEPCTL10_b; /*!< BitSize */
  4965. };
  4966. __I uint32_t RESERVED74;
  4967. union {
  4968. __IO uint32_t DIEPINT10; /*!< Device IN Endpoint-n Interrupt Register */
  4969. struct {
  4970. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  4971. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  4972. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  4973. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  4974. endpoint */
  4975. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  4976. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  4977. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  4978. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  4979. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  4980. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  4981. uint32_t : 2;
  4982. __IO uint32_t BE : 1; /*!< Babble Error */
  4983. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  4984. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  4985. } DIEPINT10_b; /*!< BitSize */
  4986. };
  4987. __I uint32_t RESERVED75;
  4988. union {
  4989. __IO uint32_t DIEPTSIZ10; /*!< Device IN Endpoint-n Transfer Size Register */
  4990. struct {
  4991. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  4992. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  4993. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  4994. The number of packets must be fetched per non-periodic IN endpoints */
  4995. } DIEPTSIZ10_b; /*!< BitSize */
  4996. };
  4997. __IO uint32_t DIEPDMA10; /*!< Device IN Endpoint-n DMA Address Register */
  4998. __IO uint16_t DTXFSA10; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  4999. __I uint16_t RESERVED76;
  5000. __I uint32_t DIEPDMAB10; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  5001. union {
  5002. __IO uint32_t DIEPCTL11; /*!< Device IN Endpoint N Control Register */
  5003. struct {
  5004. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5005. uint32_t : 4;
  5006. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5007. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5008. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5009. set */
  5010. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5011. uint32_t : 1;
  5012. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  5013. To control endpoints, response an ACK */
  5014. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  5015. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5016. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5017. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5018. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5019. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  5020. endpoint even before the transfer for that endpoint is complete */
  5021. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5022. transmit is setup */
  5023. } DIEPCTL11_b; /*!< BitSize */
  5024. };
  5025. __I uint32_t RESERVED77;
  5026. union {
  5027. __IO uint32_t DIEPINT11; /*!< Device IN Endpoint-n Interrupt Register */
  5028. struct {
  5029. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5030. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5031. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5032. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  5033. endpoint */
  5034. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  5035. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  5036. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  5037. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5038. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  5039. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5040. uint32_t : 2;
  5041. __IO uint32_t BE : 1; /*!< Babble Error */
  5042. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5043. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5044. } DIEPINT11_b; /*!< BitSize */
  5045. };
  5046. __I uint32_t RESERVED78;
  5047. union {
  5048. __IO uint32_t DIEPTSIZ11; /*!< Device IN Endpoint-n Transfer Size Register */
  5049. struct {
  5050. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5051. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5052. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  5053. The number of packets must be fetched per non-periodic IN endpoints */
  5054. } DIEPTSIZ11_b; /*!< BitSize */
  5055. };
  5056. __IO uint32_t DIEPDMA11; /*!< Device IN Endpoint-n DMA Address Register */
  5057. __IO uint16_t DTXFSA11; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  5058. __I uint16_t RESERVED79;
  5059. __I uint32_t DIEPDMAB11; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  5060. union {
  5061. __IO uint32_t DIEPCTL12; /*!< Device IN Endpoint N Control Register */
  5062. struct {
  5063. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5064. uint32_t : 4;
  5065. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5066. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5067. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5068. set */
  5069. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5070. uint32_t : 1;
  5071. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  5072. To control endpoints, response an ACK */
  5073. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  5074. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5075. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5076. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5077. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5078. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  5079. endpoint even before the transfer for that endpoint is complete */
  5080. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5081. transmit is setup */
  5082. } DIEPCTL12_b; /*!< BitSize */
  5083. };
  5084. __I uint32_t RESERVED80;
  5085. union {
  5086. __IO uint32_t DIEPINT12; /*!< Device IN Endpoint-n Interrupt Register */
  5087. struct {
  5088. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5089. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5090. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5091. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  5092. endpoint */
  5093. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  5094. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  5095. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  5096. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5097. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  5098. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5099. uint32_t : 2;
  5100. __IO uint32_t BE : 1; /*!< Babble Error */
  5101. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5102. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5103. } DIEPINT12_b; /*!< BitSize */
  5104. };
  5105. __I uint32_t RESERVED81;
  5106. union {
  5107. __IO uint32_t DIEPTSIZ12; /*!< Device IN Endpoint-n Transfer Size Register */
  5108. struct {
  5109. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5110. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5111. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  5112. The number of packets must be fetched per non-periodic IN endpoints */
  5113. } DIEPTSIZ12_b; /*!< BitSize */
  5114. };
  5115. __IO uint32_t DIEPDMA12; /*!< Device IN Endpoint-n DMA Address Register */
  5116. __IO uint16_t DTXFSA12; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  5117. __I uint16_t RESERVED82;
  5118. __I uint32_t DIEPDMAB12; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  5119. union {
  5120. __IO uint32_t DIEPCTL13; /*!< Device IN Endpoint N Control Register */
  5121. struct {
  5122. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5123. uint32_t : 4;
  5124. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5125. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5126. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5127. set */
  5128. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5129. uint32_t : 1;
  5130. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  5131. To control endpoints, response an ACK */
  5132. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  5133. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5134. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5135. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5136. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5137. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  5138. endpoint even before the transfer for that endpoint is complete */
  5139. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5140. transmit is setup */
  5141. } DIEPCTL13_b; /*!< BitSize */
  5142. };
  5143. __I uint32_t RESERVED83;
  5144. union {
  5145. __IO uint32_t DIEPINT13; /*!< Device IN Endpoint-n Interrupt Register */
  5146. struct {
  5147. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5148. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5149. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5150. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  5151. endpoint */
  5152. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  5153. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  5154. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  5155. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5156. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  5157. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5158. uint32_t : 2;
  5159. __IO uint32_t BE : 1; /*!< Babble Error */
  5160. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5161. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5162. } DIEPINT13_b; /*!< BitSize */
  5163. };
  5164. __I uint32_t RESERVED84;
  5165. union {
  5166. __IO uint32_t DIEPTSIZ13; /*!< Device IN Endpoint-n Transfer Size Register */
  5167. struct {
  5168. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5169. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5170. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  5171. The number of packets must be fetched per non-periodic IN endpoints */
  5172. } DIEPTSIZ13_b; /*!< BitSize */
  5173. };
  5174. __IO uint32_t DIEPDMA13; /*!< Device IN Endpoint-n DMA Address Register */
  5175. __IO uint16_t DTXFSA13; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  5176. __I uint16_t RESERVED85;
  5177. __I uint32_t DIEPDMAB13; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  5178. union {
  5179. __IO uint32_t DIEPCTL14; /*!< Device IN Endpoint N Control Register */
  5180. struct {
  5181. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5182. uint32_t : 4;
  5183. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5184. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5185. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5186. set */
  5187. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5188. uint32_t : 1;
  5189. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  5190. To control endpoints, response an ACK */
  5191. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  5192. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5193. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5194. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5195. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5196. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  5197. endpoint even before the transfer for that endpoint is complete */
  5198. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5199. transmit is setup */
  5200. } DIEPCTL14_b; /*!< BitSize */
  5201. };
  5202. __I uint32_t RESERVED86;
  5203. union {
  5204. __IO uint32_t DIEPINT14; /*!< Device IN Endpoint-n Interrupt Register */
  5205. struct {
  5206. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5207. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5208. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5209. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  5210. endpoint */
  5211. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  5212. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  5213. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  5214. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5215. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  5216. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5217. uint32_t : 2;
  5218. __IO uint32_t BE : 1; /*!< Babble Error */
  5219. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5220. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5221. } DIEPINT14_b; /*!< BitSize */
  5222. };
  5223. __I uint32_t RESERVED87;
  5224. union {
  5225. __IO uint32_t DIEPTSIZ14; /*!< Device IN Endpoint-n Transfer Size Register */
  5226. struct {
  5227. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5228. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5229. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  5230. The number of packets must be fetched per non-periodic IN endpoints */
  5231. } DIEPTSIZ14_b; /*!< BitSize */
  5232. };
  5233. __IO uint32_t DIEPDMA14; /*!< Device IN Endpoint-n DMA Address Register */
  5234. __IO uint16_t DTXFSA14; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  5235. __I uint16_t RESERVED88;
  5236. __I uint32_t DIEPDMAB14; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  5237. union {
  5238. __IO uint32_t DIEPCTL15; /*!< Device IN Endpoint N Control Register */
  5239. struct {
  5240. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5241. uint32_t : 4;
  5242. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5243. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5244. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5245. set */
  5246. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5247. uint32_t : 1;
  5248. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous IN endpoints, stall all tokens.
  5249. To control endpoints, response an ACK */
  5250. __IO uint32_t TX_FIFO_NUM: 4; /*!< TxFIFO Number */
  5251. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5252. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5253. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5254. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5255. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop transmitting data on an
  5256. endpoint even before the transfer for that endpoint is complete */
  5257. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5258. transmit is setup */
  5259. } DIEPCTL15_b; /*!< BitSize */
  5260. };
  5261. __I uint32_t RESERVED89;
  5262. union {
  5263. __IO uint32_t DIEPINT15; /*!< Device IN Endpoint-n Interrupt Register */
  5264. struct {
  5265. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5266. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5267. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5268. __IO uint32_t TIMEOUT : 1; /*!< a timeout condition on the USB for the last IN token on this
  5269. endpoint */
  5270. __IO uint32_t INTRWTFE : 1; /*!< IN Token Received When TxFIFO is Empty */
  5271. __IO uint32_t INTRWEPM : 1; /*!< IN Token Received with EP Mismatch */
  5272. __IO uint32_t INEPNE : 1; /*!< IN Endpoint NAK Effective */
  5273. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5274. __IO uint32_t TFU : 1; /*!< Transmit FIFO Underrun */
  5275. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5276. uint32_t : 2;
  5277. __IO uint32_t BE : 1; /*!< Babble Error */
  5278. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5279. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5280. } DIEPINT15_b; /*!< BitSize */
  5281. };
  5282. __I uint32_t RESERVED90;
  5283. union {
  5284. __IO uint32_t DIEPTSIZ15; /*!< Device IN Endpoint-n Transfer Size Register */
  5285. struct {
  5286. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5287. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5288. __IO uint32_t MC : 2; /*!< the number of packets per microframe to periodic IN endpoints.
  5289. The number of packets must be fetched per non-periodic IN endpoints */
  5290. } DIEPTSIZ15_b; /*!< BitSize */
  5291. };
  5292. __IO uint32_t DIEPDMA15; /*!< Device IN Endpoint-n DMA Address Register */
  5293. __IO uint16_t DTXFSA15; /*!< Device IN Endpoint-n Transmit FIFO Space Avail Register */
  5294. __I uint16_t RESERVED91;
  5295. __I uint32_t DIEPDMAB15; /*!< Device IN Endpoint-n DMA Buffer Address Register */
  5296. union {
  5297. __IO uint32_t DOEPCTL0; /*!< Device Control OUT Endpoint 0 Control Register */
  5298. struct {
  5299. __IO uint32_t MPS : 2; /*!< Indicates the maximum packet size of the associated endpoint,
  5300. applies to IN and OUT endpoints */
  5301. uint32_t : 13;
  5302. __I uint32_t USBAE : 1; /*!< Always 1, indicating that control endpoint 0 is always active
  5303. in all configurations and interfaces */
  5304. uint32_t : 1;
  5305. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint */
  5306. __I uint32_t EP_TYPE : 2; /*!< Hardcoded to 00 for control */
  5307. __IO uint32_t SNOOP : 1; /*!< does not check if the OUT packets are correct before transferring */
  5308. __IO uint32_t STALL : 1; /*!< The application sets this bit, and the core clears it when a
  5309. SETUP token is received for this endpoint */
  5310. uint32_t : 4;
  5311. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5312. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5313. uint32_t : 2;
  5314. __I uint32_t EPD : 1; /*!< The application cannot disable control OUT endpoint 0 */
  5315. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5316. receive data is setup */
  5317. } DOEPCTL0_b; /*!< BitSize */
  5318. };
  5319. __I uint32_t RESERVED92;
  5320. union {
  5321. __IO uint32_t DOEPINT0; /*!< Device OUT Endpoint-n Interrupt Register */
  5322. struct {
  5323. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5324. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5325. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5326. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5327. endpoint is complete */
  5328. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5329. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5330. phase to the status phase of a Control Write transfer */
  5331. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5332. SETUP packets for this particular endpoint */
  5333. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5334. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5335. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5336. uint32_t : 2;
  5337. __IO uint32_t BE : 1; /*!< Babble Error */
  5338. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5339. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5340. } DOEPINT0_b; /*!< BitSize */
  5341. };
  5342. __I uint32_t RESERVED93;
  5343. union {
  5344. __IO uint32_t DOEPTSIZ0; /*!< Device OUT Endpoint 0 Transfer Size Register */
  5345. struct {
  5346. __IO uint32_t SIZE : 7; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5347. uint32_t : 12;
  5348. __IO uint32_t PACKET_CNT : 1; /*!< This field is decremented to zero after a packet is written
  5349. into the RxFIFO */
  5350. uint32_t : 9;
  5351. __IO uint32_t SETUP_CNT : 2; /*!< the number of back-to-back SETUP data packets the endpoint can
  5352. receive */
  5353. } DOEPTSIZ0_b; /*!< BitSize */
  5354. };
  5355. __IO uint32_t DOEPDMA0; /*!< Device OUT Endpoint-n DMA Address Register */
  5356. __I uint32_t RESERVED94;
  5357. __I uint32_t DOEPDMAB0; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5358. union {
  5359. __IO uint32_t DOEPCTL1; /*!< Device OUT Endpoint N Control Register */
  5360. struct {
  5361. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5362. uint32_t : 4;
  5363. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5364. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5365. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5366. set */
  5367. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5368. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5369. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5370. To control endpoints, response an ACK */
  5371. uint32_t : 4;
  5372. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5373. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5374. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5375. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5376. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5377. even before the transfer for that endpoint is complete */
  5378. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5379. receive data is setup */
  5380. } DOEPCTL1_b; /*!< BitSize */
  5381. };
  5382. __I uint32_t RESERVED95;
  5383. union {
  5384. __IO uint32_t DOEPINT1; /*!< Device OUT Endpoint-n Interrupt Register */
  5385. struct {
  5386. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5387. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5388. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5389. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5390. endpoint is complete */
  5391. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5392. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5393. phase to the status phase of a Control Write transfer */
  5394. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5395. SETUP packets for this particular endpoint */
  5396. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5397. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5398. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5399. uint32_t : 2;
  5400. __IO uint32_t BE : 1; /*!< Babble Error */
  5401. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5402. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5403. } DOEPINT1_b; /*!< BitSize */
  5404. };
  5405. __I uint32_t RESERVED96;
  5406. union {
  5407. __IO uint32_t DOEPTSIZ1; /*!< Device OUT Endpoint-n Transfer Size Register */
  5408. struct {
  5409. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5410. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5411. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  5412. To isochronous OUT endpoints, data PID received in the last
  5413. packet */
  5414. } DOEPTSIZ1_b; /*!< BitSize */
  5415. };
  5416. __IO uint32_t DOEPDMA1; /*!< Device OUT Endpoint-n DMA Address Register */
  5417. __I uint32_t RESERVED97;
  5418. __I uint32_t DOEPDMAB1; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5419. union {
  5420. __IO uint32_t DOEPCTL2; /*!< Device OUT Endpoint N Control Register */
  5421. struct {
  5422. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5423. uint32_t : 4;
  5424. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5425. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5426. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5427. set */
  5428. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5429. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5430. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5431. To control endpoints, response an ACK */
  5432. uint32_t : 4;
  5433. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5434. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5435. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5436. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5437. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5438. even before the transfer for that endpoint is complete */
  5439. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5440. receive data is setup */
  5441. } DOEPCTL2_b; /*!< BitSize */
  5442. };
  5443. __I uint32_t RESERVED98;
  5444. union {
  5445. __IO uint32_t DOEPINT2; /*!< Device OUT Endpoint-n Interrupt Register */
  5446. struct {
  5447. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5448. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5449. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5450. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5451. endpoint is complete */
  5452. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5453. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5454. phase to the status phase of a Control Write transfer */
  5455. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5456. SETUP packets for this particular endpoint */
  5457. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5458. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5459. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5460. uint32_t : 2;
  5461. __IO uint32_t BE : 1; /*!< Babble Error */
  5462. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5463. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5464. } DOEPINT2_b; /*!< BitSize */
  5465. };
  5466. __I uint32_t RESERVED99;
  5467. union {
  5468. __IO uint32_t DOEPTSIZ2; /*!< Device OUT Endpoint-n Transfer Size Register */
  5469. struct {
  5470. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5471. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5472. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  5473. To isochronous OUT endpoints, data PID received in the last
  5474. packet */
  5475. } DOEPTSIZ2_b; /*!< BitSize */
  5476. };
  5477. __IO uint32_t DOEPDMA2; /*!< Device OUT Endpoint-n DMA Address Register */
  5478. __I uint32_t RESERVED100;
  5479. __I uint32_t DOEPDMAB2; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5480. union {
  5481. __IO uint32_t DOEPCTL3; /*!< Device OUT Endpoint N Control Register */
  5482. struct {
  5483. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5484. uint32_t : 4;
  5485. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5486. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5487. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5488. set */
  5489. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5490. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5491. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5492. To control endpoints, response an ACK */
  5493. uint32_t : 4;
  5494. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5495. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5496. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5497. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5498. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5499. even before the transfer for that endpoint is complete */
  5500. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5501. receive data is setup */
  5502. } DOEPCTL3_b; /*!< BitSize */
  5503. };
  5504. __I uint32_t RESERVED101;
  5505. union {
  5506. __IO uint32_t DOEPINT3; /*!< Device OUT Endpoint-n Interrupt Register */
  5507. struct {
  5508. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5509. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5510. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5511. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5512. endpoint is complete */
  5513. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5514. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5515. phase to the status phase of a Control Write transfer */
  5516. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5517. SETUP packets for this particular endpoint */
  5518. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5519. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5520. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5521. uint32_t : 2;
  5522. __IO uint32_t BE : 1; /*!< Babble Error */
  5523. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5524. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5525. } DOEPINT3_b; /*!< BitSize */
  5526. };
  5527. __I uint32_t RESERVED102;
  5528. union {
  5529. __IO uint32_t DOEPTSIZ3; /*!< Device OUT Endpoint-n Transfer Size Register */
  5530. struct {
  5531. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5532. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5533. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  5534. To isochronous OUT endpoints, data PID received in the last
  5535. packet */
  5536. } DOEPTSIZ3_b; /*!< BitSize */
  5537. };
  5538. __IO uint32_t DOEPDMA3; /*!< Device OUT Endpoint-n DMA Address Register */
  5539. __I uint32_t RESERVED103;
  5540. __I uint32_t DOEPDMAB3; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5541. union {
  5542. __IO uint32_t DOEPCTL4; /*!< Device OUT Endpoint N Control Register */
  5543. struct {
  5544. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5545. uint32_t : 4;
  5546. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5547. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5548. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5549. set */
  5550. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5551. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5552. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5553. To control endpoints, response an ACK */
  5554. uint32_t : 4;
  5555. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5556. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5557. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5558. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5559. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5560. even before the transfer for that endpoint is complete */
  5561. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5562. receive data is setup */
  5563. } DOEPCTL4_b; /*!< BitSize */
  5564. };
  5565. __I uint32_t RESERVED104;
  5566. union {
  5567. __IO uint32_t DOEPINT4; /*!< Device OUT Endpoint-n Interrupt Register */
  5568. struct {
  5569. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5570. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5571. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5572. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5573. endpoint is complete */
  5574. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5575. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5576. phase to the status phase of a Control Write transfer */
  5577. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5578. SETUP packets for this particular endpoint */
  5579. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5580. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5581. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5582. uint32_t : 2;
  5583. __IO uint32_t BE : 1; /*!< Babble Error */
  5584. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5585. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5586. } DOEPINT4_b; /*!< BitSize */
  5587. };
  5588. __I uint32_t RESERVED105;
  5589. union {
  5590. __IO uint32_t DOEPTSIZ4; /*!< Device OUT Endpoint-n Transfer Size Register */
  5591. struct {
  5592. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5593. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5594. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  5595. To isochronous OUT endpoints, data PID received in the last
  5596. packet */
  5597. } DOEPTSIZ4_b; /*!< BitSize */
  5598. };
  5599. __IO uint32_t DOEPDMA4; /*!< Device OUT Endpoint-n DMA Address Register */
  5600. __I uint32_t RESERVED106;
  5601. __I uint32_t DOEPDMAB4; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5602. union {
  5603. __IO uint32_t DOEPCTL5; /*!< Device OUT Endpoint N Control Register */
  5604. struct {
  5605. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5606. uint32_t : 4;
  5607. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5608. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5609. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5610. set */
  5611. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5612. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5613. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5614. To control endpoints, response an ACK */
  5615. uint32_t : 4;
  5616. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5617. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5618. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5619. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5620. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5621. even before the transfer for that endpoint is complete */
  5622. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5623. receive data is setup */
  5624. } DOEPCTL5_b; /*!< BitSize */
  5625. };
  5626. __I uint32_t RESERVED107;
  5627. union {
  5628. __IO uint32_t DOEPINT5; /*!< Device OUT Endpoint-n Interrupt Register */
  5629. struct {
  5630. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5631. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5632. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5633. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5634. endpoint is complete */
  5635. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5636. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5637. phase to the status phase of a Control Write transfer */
  5638. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5639. SETUP packets for this particular endpoint */
  5640. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5641. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5642. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5643. uint32_t : 2;
  5644. __IO uint32_t BE : 1; /*!< Babble Error */
  5645. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5646. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5647. } DOEPINT5_b; /*!< BitSize */
  5648. };
  5649. __I uint32_t RESERVED108;
  5650. union {
  5651. __IO uint32_t DOEPTSIZ5; /*!< Device OUT Endpoint-n Transfer Size Register */
  5652. struct {
  5653. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5654. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5655. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  5656. To isochronous OUT endpoints, data PID received in the last
  5657. packet */
  5658. } DOEPTSIZ5_b; /*!< BitSize */
  5659. };
  5660. __IO uint32_t DOEPDMA5; /*!< Device OUT Endpoint-n DMA Address Register */
  5661. __I uint32_t RESERVED109;
  5662. __I uint32_t DOEPDMAB5; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5663. union {
  5664. __IO uint32_t DOEPCTL6; /*!< Device OUT Endpoint N Control Register */
  5665. struct {
  5666. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5667. uint32_t : 4;
  5668. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5669. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5670. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5671. set */
  5672. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5673. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5674. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5675. To control endpoints, response an ACK */
  5676. uint32_t : 4;
  5677. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5678. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5679. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5680. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5681. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5682. even before the transfer for that endpoint is complete */
  5683. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5684. receive data is setup */
  5685. } DOEPCTL6_b; /*!< BitSize */
  5686. };
  5687. __I uint32_t RESERVED110;
  5688. union {
  5689. __IO uint32_t DOEPINT6; /*!< Device OUT Endpoint-n Interrupt Register */
  5690. struct {
  5691. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5692. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5693. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5694. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5695. endpoint is complete */
  5696. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5697. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5698. phase to the status phase of a Control Write transfer */
  5699. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5700. SETUP packets for this particular endpoint */
  5701. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5702. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5703. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5704. uint32_t : 2;
  5705. __IO uint32_t BE : 1; /*!< Babble Error */
  5706. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5707. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5708. } DOEPINT6_b; /*!< BitSize */
  5709. };
  5710. __I uint32_t RESERVED111;
  5711. union {
  5712. __IO uint32_t DOEPTSIZ6; /*!< Device OUT Endpoint-n Transfer Size Register */
  5713. struct {
  5714. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5715. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5716. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  5717. To isochronous OUT endpoints, data PID received in the last
  5718. packet */
  5719. } DOEPTSIZ6_b; /*!< BitSize */
  5720. };
  5721. __IO uint32_t DOEPDMA6; /*!< Device OUT Endpoint-n DMA Address Register */
  5722. __I uint32_t RESERVED112;
  5723. __I uint32_t DOEPDMAB6; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5724. union {
  5725. __IO uint32_t DOEPCTL7; /*!< Device OUT Endpoint N Control Register */
  5726. struct {
  5727. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5728. uint32_t : 4;
  5729. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5730. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5731. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5732. set */
  5733. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5734. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5735. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5736. To control endpoints, response an ACK */
  5737. uint32_t : 4;
  5738. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5739. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5740. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5741. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5742. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5743. even before the transfer for that endpoint is complete */
  5744. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5745. receive data is setup */
  5746. } DOEPCTL7_b; /*!< BitSize */
  5747. };
  5748. __I uint32_t RESERVED113;
  5749. union {
  5750. __IO uint32_t DOEPINT7; /*!< Device OUT Endpoint-n Interrupt Register */
  5751. struct {
  5752. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5753. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5754. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5755. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5756. endpoint is complete */
  5757. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5758. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5759. phase to the status phase of a Control Write transfer */
  5760. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5761. SETUP packets for this particular endpoint */
  5762. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5763. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5764. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5765. uint32_t : 2;
  5766. __IO uint32_t BE : 1; /*!< Babble Error */
  5767. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5768. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5769. } DOEPINT7_b; /*!< BitSize */
  5770. };
  5771. __I uint32_t RESERVED114;
  5772. union {
  5773. __IO uint32_t DOEPTSIZ7; /*!< Device OUT Endpoint-n Transfer Size Register */
  5774. struct {
  5775. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5776. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5777. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  5778. To isochronous OUT endpoints, data PID received in the last
  5779. packet */
  5780. } DOEPTSIZ7_b; /*!< BitSize */
  5781. };
  5782. __IO uint32_t DOEPDMA7; /*!< Device OUT Endpoint-n DMA Address Register */
  5783. __I uint32_t RESERVED115;
  5784. __I uint32_t DOEPDMAB7; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5785. union {
  5786. __IO uint32_t DOEPCTL8; /*!< Device OUT Endpoint N Control Register */
  5787. struct {
  5788. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5789. uint32_t : 4;
  5790. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5791. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5792. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5793. set */
  5794. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5795. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5796. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5797. To control endpoints, response an ACK */
  5798. uint32_t : 4;
  5799. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5800. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5801. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5802. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5803. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5804. even before the transfer for that endpoint is complete */
  5805. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5806. receive data is setup */
  5807. } DOEPCTL8_b; /*!< BitSize */
  5808. };
  5809. __I uint32_t RESERVED116;
  5810. union {
  5811. __IO uint32_t DOEPINT8; /*!< Device OUT Endpoint-n Interrupt Register */
  5812. struct {
  5813. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5814. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5815. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5816. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5817. endpoint is complete */
  5818. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5819. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5820. phase to the status phase of a Control Write transfer */
  5821. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5822. SETUP packets for this particular endpoint */
  5823. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5824. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5825. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5826. uint32_t : 2;
  5827. __IO uint32_t BE : 1; /*!< Babble Error */
  5828. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5829. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5830. } DOEPINT8_b; /*!< BitSize */
  5831. };
  5832. __I uint32_t RESERVED117;
  5833. union {
  5834. __IO uint32_t DOEPTSIZ8; /*!< Device OUT Endpoint-n Transfer Size Register */
  5835. struct {
  5836. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5837. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5838. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  5839. To isochronous OUT endpoints, data PID received in the last
  5840. packet */
  5841. } DOEPTSIZ8_b; /*!< BitSize */
  5842. };
  5843. __IO uint32_t DOEPDMA8; /*!< Device OUT Endpoint-n DMA Address Register */
  5844. __I uint32_t RESERVED118;
  5845. __I uint32_t DOEPDMAB8; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5846. union {
  5847. __IO uint32_t DOEPCTL9; /*!< Device OUT Endpoint N Control Register */
  5848. struct {
  5849. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5850. uint32_t : 4;
  5851. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5852. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5853. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5854. set */
  5855. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5856. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5857. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5858. To control endpoints, response an ACK */
  5859. uint32_t : 4;
  5860. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5861. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5862. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5863. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5864. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5865. even before the transfer for that endpoint is complete */
  5866. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5867. receive data is setup */
  5868. } DOEPCTL9_b; /*!< BitSize */
  5869. };
  5870. __I uint32_t RESERVED119;
  5871. union {
  5872. __IO uint32_t DOEPINT9; /*!< Device OUT Endpoint-n Interrupt Register */
  5873. struct {
  5874. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5875. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5876. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5877. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5878. endpoint is complete */
  5879. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5880. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5881. phase to the status phase of a Control Write transfer */
  5882. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5883. SETUP packets for this particular endpoint */
  5884. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5885. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5886. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5887. uint32_t : 2;
  5888. __IO uint32_t BE : 1; /*!< Babble Error */
  5889. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5890. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5891. } DOEPINT9_b; /*!< BitSize */
  5892. };
  5893. __I uint32_t RESERVED120;
  5894. union {
  5895. __IO uint32_t DOEPTSIZ9; /*!< Device OUT Endpoint-n Transfer Size Register */
  5896. struct {
  5897. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5898. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5899. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  5900. To isochronous OUT endpoints, data PID received in the last
  5901. packet */
  5902. } DOEPTSIZ9_b; /*!< BitSize */
  5903. };
  5904. __IO uint32_t DOEPDMA9; /*!< Device OUT Endpoint-n DMA Address Register */
  5905. __I uint32_t RESERVED121;
  5906. __I uint32_t DOEPDMAB9; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5907. union {
  5908. __IO uint32_t DOEPCTL10; /*!< Device OUT Endpoint N Control Register */
  5909. struct {
  5910. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5911. uint32_t : 4;
  5912. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5913. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5914. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5915. set */
  5916. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5917. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5918. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5919. To control endpoints, response an ACK */
  5920. uint32_t : 4;
  5921. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5922. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5923. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5924. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5925. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5926. even before the transfer for that endpoint is complete */
  5927. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5928. receive data is setup */
  5929. } DOEPCTL10_b; /*!< BitSize */
  5930. };
  5931. __I uint32_t RESERVED122;
  5932. union {
  5933. __IO uint32_t DOEPINT10; /*!< Device OUT Endpoint-n Interrupt Register */
  5934. struct {
  5935. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5936. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5937. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5938. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  5939. endpoint is complete */
  5940. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  5941. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  5942. phase to the status phase of a Control Write transfer */
  5943. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  5944. SETUP packets for this particular endpoint */
  5945. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  5946. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  5947. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  5948. uint32_t : 2;
  5949. __IO uint32_t BE : 1; /*!< Babble Error */
  5950. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  5951. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  5952. } DOEPINT10_b; /*!< BitSize */
  5953. };
  5954. __I uint32_t RESERVED123;
  5955. union {
  5956. __IO uint32_t DOEPTSIZ10; /*!< Device OUT Endpoint-n Transfer Size Register */
  5957. struct {
  5958. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  5959. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  5960. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  5961. To isochronous OUT endpoints, data PID received in the last
  5962. packet */
  5963. } DOEPTSIZ10_b; /*!< BitSize */
  5964. };
  5965. __IO uint32_t DOEPDMA10; /*!< Device OUT Endpoint-n DMA Address Register */
  5966. __I uint32_t RESERVED124;
  5967. __I uint32_t DOEPDMAB10; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  5968. union {
  5969. __IO uint32_t DOEPCTL11; /*!< Device OUT Endpoint N Control Register */
  5970. struct {
  5971. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  5972. uint32_t : 4;
  5973. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  5974. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  5975. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  5976. set */
  5977. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  5978. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  5979. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  5980. To control endpoints, response an ACK */
  5981. uint32_t : 4;
  5982. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  5983. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  5984. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  5985. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  5986. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  5987. even before the transfer for that endpoint is complete */
  5988. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  5989. receive data is setup */
  5990. } DOEPCTL11_b; /*!< BitSize */
  5991. };
  5992. __I uint32_t RESERVED125;
  5993. union {
  5994. __IO uint32_t DOEPINT11; /*!< Device OUT Endpoint-n Interrupt Register */
  5995. struct {
  5996. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  5997. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  5998. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  5999. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  6000. endpoint is complete */
  6001. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  6002. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  6003. phase to the status phase of a Control Write transfer */
  6004. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  6005. SETUP packets for this particular endpoint */
  6006. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  6007. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  6008. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  6009. uint32_t : 2;
  6010. __IO uint32_t BE : 1; /*!< Babble Error */
  6011. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  6012. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  6013. } DOEPINT11_b; /*!< BitSize */
  6014. };
  6015. __I uint32_t RESERVED126;
  6016. union {
  6017. __IO uint32_t DOEPTSIZ11; /*!< Device OUT Endpoint-n Transfer Size Register */
  6018. struct {
  6019. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  6020. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  6021. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  6022. To isochronous OUT endpoints, data PID received in the last
  6023. packet */
  6024. } DOEPTSIZ11_b; /*!< BitSize */
  6025. };
  6026. __IO uint32_t DOEPDMA11; /*!< Device OUT Endpoint-n DMA Address Register */
  6027. __I uint32_t RESERVED127;
  6028. __I uint32_t DOEPDMAB11; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  6029. union {
  6030. __IO uint32_t DOEPCTL12; /*!< Device OUT Endpoint N Control Register */
  6031. struct {
  6032. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  6033. uint32_t : 4;
  6034. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  6035. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  6036. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  6037. set */
  6038. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  6039. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  6040. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  6041. To control endpoints, response an ACK */
  6042. uint32_t : 4;
  6043. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  6044. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  6045. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  6046. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  6047. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  6048. even before the transfer for that endpoint is complete */
  6049. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  6050. receive data is setup */
  6051. } DOEPCTL12_b; /*!< BitSize */
  6052. };
  6053. __I uint32_t RESERVED128;
  6054. union {
  6055. __IO uint32_t DOEPINT12; /*!< Device OUT Endpoint-n Interrupt Register */
  6056. struct {
  6057. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  6058. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  6059. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  6060. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  6061. endpoint is complete */
  6062. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  6063. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  6064. phase to the status phase of a Control Write transfer */
  6065. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  6066. SETUP packets for this particular endpoint */
  6067. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  6068. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  6069. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  6070. uint32_t : 2;
  6071. __IO uint32_t BE : 1; /*!< Babble Error */
  6072. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  6073. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  6074. } DOEPINT12_b; /*!< BitSize */
  6075. };
  6076. __I uint32_t RESERVED129;
  6077. union {
  6078. __IO uint32_t DOEPTSIZ12; /*!< Device OUT Endpoint-n Transfer Size Register */
  6079. struct {
  6080. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  6081. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  6082. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  6083. To isochronous OUT endpoints, data PID received in the last
  6084. packet */
  6085. } DOEPTSIZ12_b; /*!< BitSize */
  6086. };
  6087. __IO uint32_t DOEPDMA12; /*!< Device OUT Endpoint-n DMA Address Register */
  6088. __I uint32_t RESERVED130;
  6089. __I uint32_t DOEPDMAB12; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  6090. union {
  6091. __IO uint32_t DOEPCTL13; /*!< Device OUT Endpoint N Control Register */
  6092. struct {
  6093. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  6094. uint32_t : 4;
  6095. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  6096. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  6097. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  6098. set */
  6099. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  6100. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  6101. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  6102. To control endpoints, response an ACK */
  6103. uint32_t : 4;
  6104. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  6105. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  6106. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  6107. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  6108. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  6109. even before the transfer for that endpoint is complete */
  6110. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  6111. receive data is setup */
  6112. } DOEPCTL13_b; /*!< BitSize */
  6113. };
  6114. __I uint32_t RESERVED131;
  6115. union {
  6116. __IO uint32_t DOEPINT13; /*!< Device OUT Endpoint-n Interrupt Register */
  6117. struct {
  6118. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  6119. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  6120. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  6121. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  6122. endpoint is complete */
  6123. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  6124. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  6125. phase to the status phase of a Control Write transfer */
  6126. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  6127. SETUP packets for this particular endpoint */
  6128. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  6129. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  6130. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  6131. uint32_t : 2;
  6132. __IO uint32_t BE : 1; /*!< Babble Error */
  6133. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  6134. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  6135. } DOEPINT13_b; /*!< BitSize */
  6136. };
  6137. __I uint32_t RESERVED132;
  6138. union {
  6139. __IO uint32_t DOEPTSIZ13; /*!< Device OUT Endpoint-n Transfer Size Register */
  6140. struct {
  6141. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  6142. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  6143. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  6144. To isochronous OUT endpoints, data PID received in the last
  6145. packet */
  6146. } DOEPTSIZ13_b; /*!< BitSize */
  6147. };
  6148. __IO uint32_t DOEPDMA13; /*!< Device OUT Endpoint-n DMA Address Register */
  6149. __I uint32_t RESERVED133;
  6150. __I uint32_t DOEPDMAB13; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  6151. union {
  6152. __IO uint32_t DOEPCTL14; /*!< Device OUT Endpoint N Control Register */
  6153. struct {
  6154. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  6155. uint32_t : 4;
  6156. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  6157. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  6158. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  6159. set */
  6160. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  6161. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  6162. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  6163. To control endpoints, response an ACK */
  6164. uint32_t : 4;
  6165. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  6166. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  6167. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  6168. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  6169. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  6170. even before the transfer for that endpoint is complete */
  6171. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  6172. receive data is setup */
  6173. } DOEPCTL14_b; /*!< BitSize */
  6174. };
  6175. __I uint32_t RESERVED134;
  6176. union {
  6177. __IO uint32_t DOEPINT14; /*!< Device OUT Endpoint-n Interrupt Register */
  6178. struct {
  6179. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  6180. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  6181. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  6182. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  6183. endpoint is complete */
  6184. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  6185. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  6186. phase to the status phase of a Control Write transfer */
  6187. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  6188. SETUP packets for this particular endpoint */
  6189. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  6190. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  6191. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  6192. uint32_t : 2;
  6193. __IO uint32_t BE : 1; /*!< Babble Error */
  6194. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  6195. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  6196. } DOEPINT14_b; /*!< BitSize */
  6197. };
  6198. __I uint32_t RESERVED135;
  6199. union {
  6200. __IO uint32_t DOEPTSIZ14; /*!< Device OUT Endpoint-n Transfer Size Register */
  6201. struct {
  6202. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  6203. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  6204. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  6205. To isochronous OUT endpoints, data PID received in the last
  6206. packet */
  6207. } DOEPTSIZ14_b; /*!< BitSize */
  6208. };
  6209. __IO uint32_t DOEPDMA14; /*!< Device OUT Endpoint-n DMA Address Register */
  6210. __I uint32_t RESERVED136;
  6211. __I uint32_t DOEPDMAB14; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  6212. union {
  6213. __IO uint32_t DOEPCTL15; /*!< Device OUT Endpoint N Control Register */
  6214. struct {
  6215. __IO uint32_t MPS : 11; /*!< Indicates the maximum packet size of the associated endpoint */
  6216. uint32_t : 4;
  6217. __IO uint32_t UAE : 1; /*!< Indicates whether this endpoint is active */
  6218. __I uint32_t DPID : 1; /*!< Endpoint Data PID */
  6219. __I uint32_t NAK : 1; /*!< The core is transmitting NAK handshakes on this endpoint if
  6220. set */
  6221. __IO uint32_t EP_TYPE : 2; /*!< Indicates the transfer type selected. */
  6222. __IO uint32_t EC : 1; /*!< Doesn't check the correctness of OUT packets before transferring */
  6223. __IO uint32_t STALL : 1; /*!< To non-control, non-isochronous OUT endpoints, stall all tokens.
  6224. To control endpoints, response an ACK */
  6225. uint32_t : 4;
  6226. __O uint32_t CNAK : 1; /*!< A write to this bit clears the NAK bit for the endpoint */
  6227. __O uint32_t SNAK : 1; /*!< A write to this bit sets the NAK bit for the endpoint */
  6228. __O uint32_t SET_D0_PID : 1; /*!< Set DATA0 PID */
  6229. __O uint32_t SET_D1_PID : 1; /*!< Set DATA1 PID */
  6230. __IO uint32_t EPD : 1; /*!< The application sets this bit to stop receiving data on an endpoint
  6231. even before the transfer for that endpoint is complete */
  6232. __IO uint32_t EPE : 1; /*!< the descriptor structure and data buffer with data ready to
  6233. receive data is setup */
  6234. } DOEPCTL15_b; /*!< BitSize */
  6235. };
  6236. __I uint32_t RESERVED137;
  6237. union {
  6238. __IO uint32_t DOEPINT15; /*!< Device OUT Endpoint-n Interrupt Register */
  6239. struct {
  6240. __IO uint32_t TC : 1; /*!< Transfer completed normally without any errors */
  6241. __IO uint32_t EPD : 1; /*!< Endpoint Disabled Interrupt */
  6242. __IO uint32_t AHB_ERR : 1; /*!< there is an AHB error during AHB read/write */
  6243. __IO uint32_t SETUP : 1; /*!< Only for Control OUT endpoints, the SETUP phase for the control
  6244. endpoint is complete */
  6245. __IO uint32_t OUTTRWEPD : 1; /*!< OUT Token Received When Endpoint Disabled */
  6246. __IO uint32_t SPRFCW : 1; /*!< Only for Control OUT endpoints, the host has switched from data
  6247. phase to the status phase of a Control Write transfer */
  6248. __IO uint32_t B2BSETUPPR : 1; /*!< to Control OUT endpoints only, received more than three back-to-back
  6249. SETUP packets for this particular endpoint */
  6250. __I uint32_t TFE : 1; /*!< either half or completely empty depending on GAHBCFG.NPTxFEmpLvl */
  6251. __IO uint32_t OUTPE : 1; /*!< an overflow or a CRC error for an OUT packet */
  6252. __IO uint32_t BNA : 1; /*!< Buffer Not Available */
  6253. uint32_t : 2;
  6254. __IO uint32_t BE : 1; /*!< Babble Error */
  6255. __IO uint32_t NAK : 1; /*!< a NAK is transmitted */
  6256. __IO uint32_t NYET : 1; /*!< a NYET response is transmitted */
  6257. } DOEPINT15_b; /*!< BitSize */
  6258. };
  6259. __I uint32_t RESERVED138;
  6260. union {
  6261. __IO uint32_t DOEPTSIZ15; /*!< Device OUT Endpoint-n Transfer Size Register */
  6262. struct {
  6263. __IO uint32_t SIZE : 19; /*!< Indicates the transfer size in bytes for endpoint 0 */
  6264. __IO uint32_t PACKET_CNT : 10; /*!< the total number of USB packets */
  6265. __IO uint32_t SETUPCNT_PID: 2; /*!< To control OUT Endpoints only, back-to-back SETUP data packets.
  6266. To isochronous OUT endpoints, data PID received in the last
  6267. packet */
  6268. } DOEPTSIZ15_b; /*!< BitSize */
  6269. };
  6270. __IO uint32_t DOEPDMA15; /*!< Device OUT Endpoint-n DMA Address Register */
  6271. __I uint32_t RESERVED139;
  6272. __I uint32_t DOEPDMAB15; /*!< Device OUT Endpoint-n DMA Buffer Address Register */
  6273. } USB_Type;
  6274. /* ================================================================================ */
  6275. /* ================ GLOBAL_CTRL ================ */
  6276. /* ================================================================================ */
  6277. /**
  6278. * @brief GLOBAL_CTRL (GLOBAL_CTRL)
  6279. */
  6280. typedef struct { /*!< GLOBAL_CTRL Structure */
  6281. union {
  6282. __I uint32_t AES_STATUS; /*!< AES status */
  6283. struct {
  6284. __I uint32_t RD_ALMOST_EMPTY: 1; /*!< FIFO read almost empty */
  6285. __I uint32_t RD_EMPTY : 1; /*!< FIFO read empty */
  6286. __I uint32_t WR_FULL_ALMOST: 1; /*!< FIFO write almost full */
  6287. __I uint32_t WR_FULL : 1; /*!< FIFO write full */
  6288. __I uint32_t IDLE : 1; /*!< decryption finish */
  6289. } AES_STATUS_b; /*!< BitSize */
  6290. };
  6291. __I uint32_t RESERVED0[253];
  6292. union {
  6293. __IO uint32_t CLK_SEL_0; /*!< clock select 0 */
  6294. struct {
  6295. __IO uint32_t CAN1_CLK : 2; /*!< CAN1 clock frequency dividor based on system clock, which should
  6296. be 1/32, 1/4, 1/8, 1/16 from 0 to 3 */
  6297. __IO uint32_t CAN0_CLK : 2; /*!< CAN0 clock frequency dividor based on system clock, which should
  6298. be 1/32, 1/4, 1/8, 1/16 from 0 to 3 */
  6299. __IO uint32_t I2C1_CLK : 2; /*!< I2C1 clock frequency dividor based on system clock, which should
  6300. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6301. __IO uint32_t I2C0_CLK : 2; /*!< I2C0 clock frequency dividor based on system clock, which should
  6302. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6303. __IO uint32_t SPI1_CLK : 2; /*!< SPI1 clock frequency dividor based on system clock, which should
  6304. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6305. __IO uint32_t SPI0_CLK : 2; /*!< SPI0 clock frequency dividor based on system clock, which should
  6306. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6307. __IO uint32_t UART1_CLK : 2; /*!< UART1 clock frequency dividor based on system clock, which should
  6308. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6309. __IO uint32_t UART0_CLK : 2; /*!< UART0 clock frequency dividor based on system clock, which should
  6310. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6311. __IO uint32_t RTC_CLK : 2; /*!< RTC clock frequency dividor based on system clock, which should
  6312. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6313. __IO uint32_t GPIO_CLK : 2; /*!< GPIO clock frequency dividor based on system clock, which should
  6314. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6315. __IO uint32_t TIMER_CLK : 2; /*!< TIMER clock frequency dividor based on system clock, which should
  6316. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6317. __IO uint32_t WDG_CLK : 2; /*!< watchdog clock frequency dividor based on system clock, which
  6318. should be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6319. uint32_t : 2;
  6320. __IO uint32_t FLASH_CLK : 2; /*!< FLASH clock frequency dividor based on system clock, which should
  6321. be 1/1, 1/2, 1/4, 1/8 from 0 to 3 */
  6322. __IO uint32_t DMA_AHB_CLK: 2; /*!< DMA AHB bus clock frequency dividor based on system clock, which
  6323. should be 1/1, 1/2, 1/4, 1/8 from 0 to 3 */
  6324. __IO uint32_t USB_AHB_CLK: 2; /*!< USB AHB bus clock frequency dividor based on system clock, which
  6325. should be 1/1, 1/2, 1/4, 1/8 from 0 to 3 */
  6326. } CLK_SEL_0_b; /*!< BitSize */
  6327. };
  6328. union {
  6329. __IO uint32_t CLK_SEL_1; /*!< clock select 1 */
  6330. struct {
  6331. __IO uint32_t ETH_AHB_CLK: 2; /*!< ETH_AHB clock frequency dividor based on system clock, which
  6332. should be 1/1, 1/2, 1/4, 1/8 from 0 to 3 */
  6333. __IO uint32_t DDR_CLK : 2; /*!< DDR clock frequency dividor based on system clock, which should
  6334. be 1/1, 1/2, 1/4, 1/8 from 0 to 3 */
  6335. uint32_t : 4;
  6336. __IO uint32_t ADC_CLK : 2; /*!< ADC clock frequency dividor based on system clock, which should
  6337. be 1/8, 1/16, 1/32, external from 0 to 3 */
  6338. __IO uint32_t EFUSE_CLK : 2; /*!< EFUSE clock frequency dividor based on system clock, which should
  6339. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6340. __IO uint32_t SYS_CLK : 4; /*!< system clock clock frequency dividor based on system clock,
  6341. which should be oscillator(0), DLL(1), crystal(2), external(3),
  6342. JTAG(4), PS(8) */
  6343. __IO uint32_t UART2_CLK : 2; /*!< UART2 clock frequency dividor based on system clock, which should
  6344. be 1/2, 1/4, 1/8, 1/16 from 0 to 3 */
  6345. __IO uint32_t UTMI_CLK : 1; /*!< UTMI clock came from on-chip usb phy(0) or off-chip usb phy(1) */
  6346. } CLK_SEL_1_b; /*!< BitSize */
  6347. };
  6348. union {
  6349. __IO uint32_t USB_PHY_CTRL; /*!< USB Phy Control Register */
  6350. struct {
  6351. __IO uint32_t BITSTUFF : 1; /*!< 0: No bit stuff */
  6352. __IO uint32_t XTLSEL : 1; /*!< 0: 12MHz */
  6353. __IO uint32_t PLL : 1; /*!< PLL mode */
  6354. __IO uint32_t VOLDET : 1; /*!< Voltage Detector Enable, 0: Disable */
  6355. __IO uint32_t IDUP : 1; /*!< 0: ID is uplled up through 33k Ohm resister */
  6356. __IO uint32_t CKISEL : 1; /*!< Clock selection, 0: Crystal, 1: Internal Clock */
  6357. __IO uint32_t FMOD : 1; /*!< 1: Normal */
  6358. __IO uint32_t SQUELCH : 3; /*!< Squelch Reference Voltage, 000: 27.5mV, 001: 137.5mV, 111: 220mV */
  6359. __IO uint32_t HDISCDT : 3; /*!< Host Disconnect Detection Reference Voltage, 000: 500mV, 100:
  6360. 588mV, 111: 654mV */
  6361. __IO uint32_t PRTSEL : 1; /*!< 0: Internal OTG PHY, 1: UTMI to External PHY */
  6362. __IO uint32_t RSTPRT : 1; /*!< 0: The reverse of usb_rst_n will reset, 1: Reset OTG PHY */
  6363. } USB_PHY_CTRL_b; /*!< BitSize */
  6364. };
  6365. union {
  6366. __IO uint32_t RTC_INT_EN; /*!< RTC interrupt enable Register */
  6367. struct {
  6368. __IO uint32_t SECOND : 1; /*!< 1s interrupt enable */
  6369. __IO uint32_t MILLSECOND : 1; /*!< 1ms interrupt enable */
  6370. } RTC_INT_EN_b; /*!< BitSize */
  6371. };
  6372. __I uint32_t RESERVED1;
  6373. union {
  6374. __IO uint32_t NMI_SEL; /*!< nmi interrupt selection */
  6375. struct {
  6376. __IO uint32_t NMI : 7; /*!< NMI interrupt ID */
  6377. } NMI_SEL_b; /*!< BitSize */
  6378. };
  6379. __I uint32_t RESERVED2;
  6380. __IO uint32_t AES_TARGET_ADDR; /*!< AES target address, default is frame decoder address(0x41800000) */
  6381. union {
  6382. __IO uint32_t AES_BURST_TYPE; /*!< AES burst type */
  6383. struct {
  6384. __IO uint32_t TYPE : 2; /*!< burst type, fixed(0), incr(1) */
  6385. } AES_BURST_TYPE_b; /*!< BitSize */
  6386. };
  6387. __I uint32_t RESERVED3[3];
  6388. union {
  6389. __IO uint32_t ICACHE; /*!< ICACHE Enable */
  6390. struct {
  6391. __IO uint32_t EN : 1; /*!< ICACHE Enable */
  6392. } ICACHE_b; /*!< BitSize */
  6393. };
  6394. __IO uint32_t IBUSOFF; /*!< Code Bus Offset */
  6395. __IO uint32_t DBUSOFF; /*!< Data Bus Offset */
  6396. __IO uint32_t EXTADDR; /*!< Bus Ext Addr */
  6397. } GLOBAL_CTRL_Type;
  6398. /* ================================================================================ */
  6399. /* ================ AES ================ */
  6400. /* ================================================================================ */
  6401. /**
  6402. * @brief AES (AES)
  6403. */
  6404. typedef struct { /*!< AES Structure */
  6405. __IO uint32_t FIFO; /*!< data FIFO to be decoded */
  6406. union {
  6407. __O uint32_t FIFO_CLEAR; /*!< clear data FIFO */
  6408. struct {
  6409. __O uint32_t CLEAR : 1; /*!< clear after write 1 and write 0 */
  6410. } FIFO_CLEAR_b; /*!< BitSize */
  6411. };
  6412. } AES_Type;
  6413. /* ================================================================================ */
  6414. /* ================ DDRC ================ */
  6415. /* ================================================================================ */
  6416. /**
  6417. * @brief DDR_CFG (DDRC)
  6418. */
  6419. typedef struct { /*!< DDRC Structure */
  6420. __IO uint32_t CMD; /*!< DDR commands to program */
  6421. union {
  6422. __IO uint32_t CTRL; /*!< DDR Control */
  6423. struct {
  6424. __IO uint32_t TO : 1; /*!< Take over DDRC siggen */
  6425. __IO uint32_t CLR : 1; /*!< Clear commands in FIFO */
  6426. __O uint32_t STR : 1; /*!< Start to execute the commands in FIFO */
  6427. } CTRL_b; /*!< BitSize */
  6428. };
  6429. union {
  6430. __IO uint32_t MODE; /*!< DDR mode */
  6431. struct {
  6432. __IO uint32_t MODE : 6; /*!< DDRC Mode */
  6433. uint32_t : 2;
  6434. __IO uint32_t LANE : 1; /*!< LANE synchronization logic bypass */
  6435. uint32_t : 3;
  6436. __IO uint32_t ADEC : 1; /*!< address decoder mapping */
  6437. uint32_t : 3;
  6438. __IO uint32_t B16 : 2; /*!< Active 16 bit DQ position when the unmber of DQ IO is 16 */
  6439. uint32_t : 6;
  6440. __IO uint32_t CLKPOL : 2; /*!< DQS clkpol set by user on the PHY */
  6441. } MODE_b; /*!< BitSize */
  6442. };
  6443. union {
  6444. __IO uint32_t QUE; /*!< DDRC queue depth */
  6445. struct {
  6446. __IO uint32_t DEPTH : 1; /*!< DDRC queue depth */
  6447. } QUE_b; /*!< BitSize */
  6448. };
  6449. union {
  6450. __IO uint32_t REF; /*!< Refresh control */
  6451. struct {
  6452. __IO uint32_t THRD : 5; /*!< Number of refresh requests which can be postponed */
  6453. uint32_t : 3;
  6454. __IO uint32_t TRIG : 4; /*!< Number of refresh requests every dl_refi */
  6455. uint32_t : 4;
  6456. __IO uint32_t TIME : 16; /*!< Refresh interval time */
  6457. } REF_b; /*!< BitSize */
  6458. };
  6459. union {
  6460. __O uint32_t REF_TRIG; /*!< Refresh trigger */
  6461. struct {
  6462. __O uint32_t GO : 1; /*!< Write 1 to trigger one refresh request by cbus */
  6463. } REF_TRIG_b; /*!< BitSize */
  6464. };
  6465. union {
  6466. __O uint32_t ZQ_TRIG; /*!< ZQCTL trigger */
  6467. struct {
  6468. __O uint32_t CS : 1; /*!< Write 1 to trigger one ZQCS request by cbus */
  6469. __O uint32_t CL : 1; /*!< Write 1 to trigger one ZQCL request by cbus */
  6470. } ZQ_TRIG_b; /*!< BitSize */
  6471. };
  6472. union {
  6473. __IO uint32_t ZQCSR; /*!< ZQCSR */
  6474. struct {
  6475. __IO uint32_t EN : 1; /*!< Enable ZQCS request */
  6476. __IO uint32_t PRI : 1; /*!< 0: DMA access prior to ZQCS, 1: ZQCS prior to DMA access */
  6477. } ZQCSR_b; /*!< BitSize */
  6478. };
  6479. __IO uint32_t ZQCSI; /*!< ZQCS interval time */
  6480. union {
  6481. __IO uint32_t RCD; /*!< t(RCD) */
  6482. struct {
  6483. __IO uint32_t DI : 5; /*!< t(RCD), delay from ACT command to RW command of same bank */
  6484. } RCD_b; /*!< BitSize */
  6485. };
  6486. union {
  6487. __IO uint32_t RAS; /*!< t(RAS) */
  6488. struct {
  6489. __IO uint32_t DI : 6; /*!< t(RAS), delay from ACT command to PRE command of same bank */
  6490. } RAS_b; /*!< BitSize */
  6491. };
  6492. union {
  6493. __IO uint32_t RP; /*!< t(RP) */
  6494. struct {
  6495. __IO uint32_t DI : 5; /*!< t(RP), delay from PRE command to ACT/REF/ZQ command */
  6496. uint32_t : 3;
  6497. __IO uint32_t RPA : 1; /*!< 0: t(RP) delay for PREA command; 1: t(RP)+1 delay for PREA command */
  6498. } RP_b; /*!< BitSize */
  6499. };
  6500. union {
  6501. __IO uint32_t RC; /*!< t(RC) */
  6502. struct {
  6503. __IO uint32_t DI : 7; /*!< t(RC), delay from ACT command to ACT command of same bank */
  6504. } RC_b; /*!< BitSize */
  6505. };
  6506. union {
  6507. __IO uint32_t RRD; /*!< t(RRD) */
  6508. struct {
  6509. __IO uint32_t DI : 4; /*!< t(RRD), delay from ACT command to ACT command */
  6510. } RRD_b; /*!< BitSize */
  6511. };
  6512. union {
  6513. __IO uint32_t CCD; /*!< t(CCD) */
  6514. struct {
  6515. __IO uint32_t DI : 3; /*!< t(CCD), delay from RW command to RW command */
  6516. } CCD_b; /*!< BitSize */
  6517. };
  6518. union {
  6519. __IO uint32_t RTW; /*!< t(RTW) */
  6520. struct {
  6521. __IO uint32_t DI : 5; /*!< t(RTW), delay from RD command to WR command */
  6522. } RTW_b; /*!< BitSize */
  6523. };
  6524. union {
  6525. __IO uint32_t WTR; /*!< t(WTR) */
  6526. struct {
  6527. __IO uint32_t DI : 5; /*!< t(WTR), delay from WR command to RD command */
  6528. } WTR_b; /*!< BitSize */
  6529. };
  6530. union {
  6531. __IO uint32_t RTP; /*!< t(RTP) */
  6532. struct {
  6533. __IO uint32_t DI : 3; /*!< t(RTP), delay from RD command to PRE command of same bank */
  6534. } RTP_b; /*!< BitSize */
  6535. };
  6536. union {
  6537. __IO uint32_t WTP; /*!< t(WTP) */
  6538. struct {
  6539. __IO uint32_t DI : 6; /*!< t(WTP), delay from WR command to PRE command of same bank */
  6540. } WTP_b; /*!< BitSize */
  6541. };
  6542. union {
  6543. __IO uint32_t RFC; /*!< t(RFC) */
  6544. struct {
  6545. __IO uint32_t DI : 8; /*!< t(WTP), delay from WR command to PRE command of same bank */
  6546. } RFC_b; /*!< BitSize */
  6547. };
  6548. union {
  6549. __IO uint32_t ZQCL; /*!< t(ZQoper) */
  6550. struct {
  6551. __IO uint32_t DI : 9; /*!< t(ZQoper), delay from ZQCL command to REF/ZQ/ACT command */
  6552. } ZQCL_b; /*!< BitSize */
  6553. };
  6554. union {
  6555. __IO uint32_t ZQCS; /*!< t(ZQCS) */
  6556. struct {
  6557. __IO uint32_t DI : 7; /*!< t(ZQCS), delay from ZQCS command to REF/ZQ/ACT command */
  6558. } ZQCS_b; /*!< BitSize */
  6559. };
  6560. union {
  6561. __IO uint32_t FAW; /*!< t(FAW) */
  6562. struct {
  6563. __IO uint32_t DI : 6; /*!< t(FAW), 4 act command window time */
  6564. } FAW_b; /*!< BitSize */
  6565. };
  6566. union {
  6567. __IO uint32_t BURST; /*!< BURST */
  6568. struct {
  6569. __IO uint32_t LEN : 1; /*!< 0: length 8, 1: length 4 */
  6570. } BURST_b; /*!< BitSize */
  6571. };
  6572. union {
  6573. __IO uint32_t PHUNG; /*!< PHUNG */
  6574. struct {
  6575. __IO uint32_t MODE : 1; /*!< 0: normal mode, 1: prevent read hang mode */
  6576. __IO uint32_t LPM : 1; /*!< 1: stop the IO clk */
  6577. } PHUNG_b; /*!< BitSize */
  6578. };
  6579. union {
  6580. __IO uint32_t RL; /*!< READ Latency */
  6581. struct {
  6582. __IO uint32_t VAL : 5; /*!< READ Latency */
  6583. } RL_b; /*!< BitSize */
  6584. };
  6585. union {
  6586. __IO uint32_t WL; /*!< WRITE Latency */
  6587. struct {
  6588. __IO uint32_t VAL : 5; /*!< WRITE Latency */
  6589. } WL_b; /*!< BitSize */
  6590. };
  6591. union {
  6592. __IO uint32_t TRAIN; /*!< TRAIN */
  6593. struct {
  6594. __IO uint32_t EN : 4; /*!< Enable lane N training mode */
  6595. } TRAIN_b; /*!< BitSize */
  6596. };
  6597. union {
  6598. __IO uint32_t DQSEN0; /*!< Delay cycles of dqsen of byte lane 0 */
  6599. struct {
  6600. __IO uint32_t DL : 3; /*!< Delay cycles of dqsen of byte lane 0 */
  6601. } DQSEN0_b; /*!< BitSize */
  6602. };
  6603. union {
  6604. __IO uint32_t DQSEN1; /*!< Delay cycles of dqsen of byte lane 1 */
  6605. struct {
  6606. __IO uint32_t DL : 3; /*!< Delay cycles of dqsen of byte lane 1 */
  6607. } DQSEN1_b; /*!< BitSize */
  6608. };
  6609. union {
  6610. __IO uint32_t DQSEN2; /*!< Delay cycles of dqsen of byte lane 2 */
  6611. struct {
  6612. __IO uint32_t DL : 3; /*!< Delay cycles of dqsen of byte lane 2 */
  6613. } DQSEN2_b; /*!< BitSize */
  6614. };
  6615. union {
  6616. __IO uint32_t DQSEN3; /*!< Delay cycles of dqsen of byte lane 0 */
  6617. struct {
  6618. __IO uint32_t DL : 3; /*!< Delay cycles of dqsen of byte lane 3 */
  6619. } DQSEN3_b; /*!< BitSize */
  6620. };
  6621. union {
  6622. __IO uint32_t ODTH; /*!< Delay from WR command to odt high transition */
  6623. struct {
  6624. __IO uint32_t DL : 5; /*!< Delay from WR command to odt high transition */
  6625. } ODTH_b; /*!< BitSize */
  6626. };
  6627. union {
  6628. __IO uint32_t ODTL; /*!< Delay from WR command to odt low transition */
  6629. struct {
  6630. __IO uint32_t DL : 5; /*!< Delay from WR command to odt low transition */
  6631. } ODTL_b; /*!< BitSize */
  6632. };
  6633. union {
  6634. __O uint32_t ODT; /*!< Used in write leveling mode */
  6635. struct {
  6636. __O uint32_t TRIG : 1; /*!< 0: trigger odt low, 1: trigger odt high */
  6637. } ODT_b; /*!< BitSize */
  6638. };
  6639. union {
  6640. __O uint32_t DQS; /*!< Used in write leveling mode */
  6641. struct {
  6642. __O uint32_t TRIG : 1; /*!< Writing 1 to this register triggers a dqs pulse */
  6643. } DQS_b; /*!< BitSize */
  6644. };
  6645. union {
  6646. __I uint32_t STA; /*!< Commands FIFO */
  6647. struct {
  6648. __I uint32_t MODE : 1; /*!< DDRC in sw_proc mode */
  6649. __I uint32_t EMPTY : 1; /*!< Sw_proc command fifo empty */
  6650. __I uint32_t FULL : 1; /*!< Sw_proc command fifo full */
  6651. } STA_b; /*!< BitSize */
  6652. };
  6653. union {
  6654. __IO uint32_t INTCTL; /*!< Interrupt Control */
  6655. struct {
  6656. __IO uint32_t DONE : 1; /*!< 0: the sw_proc_done int will not be masked, 1: the sw_proc_done
  6657. int will be masked */
  6658. __IO uint32_t ERR : 1; /*!< mask of the lane_sync_error interrupt */
  6659. uint32_t : 14;
  6660. __IO uint32_t MODE : 1; /*!< Interrupt mode: 0: int level active, write 1 to clear; 1: int
  6661. edge active */
  6662. } INTCTL_b; /*!< BitSize */
  6663. };
  6664. union {
  6665. __IO uint32_t INTRAW; /*!< Interrupt RAW */
  6666. struct {
  6667. __IO uint32_t DONE : 1; /*!< Int register of sw_proc_done before mask */
  6668. __IO uint32_t ERR : 1; /*!< int reg of the lane sync error before masked */
  6669. } INTRAW_b; /*!< BitSize */
  6670. };
  6671. union {
  6672. __IO uint32_t INTSTA; /*!< Interrupt STA */
  6673. struct {
  6674. __IO uint32_t DONE : 1; /*!< Int register of sw_proc_done after mask */
  6675. __IO uint32_t ERR : 1; /*!< int register of lane sync error after masked */
  6676. } INTSTA_b; /*!< BitSize */
  6677. };
  6678. union {
  6679. __IO uint32_t PHY; /*!< PHY */
  6680. struct {
  6681. __IO uint32_t RST : 1; /*!< FPGA version, reset read dq fifo. Low active */
  6682. } PHY_b; /*!< BitSize */
  6683. };
  6684. union {
  6685. __IO uint32_t RDQ; /*!< FPGA version, read dq delay of byte lane N */
  6686. struct {
  6687. __IO uint32_t L3 : 6; /*!< FPGA version, read dq delay of byte lane3 */
  6688. uint32_t : 2;
  6689. __IO uint32_t L2 : 6; /*!< FPGA version, read dq delay of byte lane2 */
  6690. uint32_t : 2;
  6691. __IO uint32_t L1 : 6; /*!< FPGA version, read dq delay of byte lane3 */
  6692. uint32_t : 2;
  6693. __IO uint32_t L0 : 7; /*!< FPGA version, read dq delay of byte lane0 */
  6694. } RDQ_b; /*!< BitSize */
  6695. };
  6696. union {
  6697. __I uint32_t CALIB; /*!< calibration */
  6698. struct {
  6699. __I uint32_t TPU : 8; /*!< calibration result values, if fail then 0x40 */
  6700. __I uint32_t TPD : 8; /*!< calibration result values, if fail then 0x40 */
  6701. __I uint32_t PDR : 5; /*!< calibration result values, if fail then 0x40 */
  6702. __I uint32_t NDR : 5; /*!< calibration result values, if fail then 0x40 */
  6703. uint32_t : 5;
  6704. __IO uint32_t EN : 1; /*!< trigger the calibration processing which is sensitive to the
  6705. positive edge */
  6706. } CALIB_b; /*!< BitSize */
  6707. };
  6708. union {
  6709. __IO uint32_t ITMDLY; /*!< "itmdly" is the fine delay trim to the read path "dq", "itmsdly"
  6710. is to the read path of "dqs". From 000 to 111 increasingly,
  6711. each step is about 40ps */
  6712. struct {
  6713. __IO uint32_t I0 : 4; /*!< itmdly0 */
  6714. __IO uint32_t IS0 : 4; /*!< itmsdly0 */
  6715. __IO uint32_t I1 : 4; /*!< itmdly1 */
  6716. __IO uint32_t IS1 : 4; /*!< itmsdly1 */
  6717. __IO uint32_t I2 : 4; /*!< itmdly2 */
  6718. __IO uint32_t IS2 : 4; /*!< itmsdly2 */
  6719. __IO uint32_t I3 : 4; /*!< itmdly3 */
  6720. __IO uint32_t IS3 : 4; /*!< itmsdly3 */
  6721. } ITMDLY_b; /*!< BitSize */
  6722. };
  6723. union {
  6724. __IO uint32_t TUNE; /*!< CALIB_TUNE */
  6725. struct {
  6726. __IO uint32_t TPU : 4; /*!< tpu_tune, finial val = tune[3] ? val - tune : val + tune */
  6727. __IO uint32_t TPD : 4; /*!< tpd_tune, tune[3:0] for TPD/TPU, [2:0] is the tune val */
  6728. __IO uint32_t PDR : 4; /*!< pdr_tune, inial val = tune[2] ? val - tune : val + tune */
  6729. __IO uint32_t NDR : 4; /*!< ndr_tune, tune[2:0] for NDR/PDR, [1:0] is the tune val */
  6730. } TUNE_b; /*!< BitSize */
  6731. };
  6732. union {
  6733. __IO uint32_t RD_SEL; /*!< RD_WINDOWS_SEL */
  6734. struct {
  6735. __IO uint32_t PHY_SEL : 3; /*!< To fix the phy read valid issue, this is to adjust the read
  6736. data valid window to match the phy read valid by cycle level */
  6737. } RD_SEL_b; /*!< BitSize */
  6738. };
  6739. } DDRC_Type;
  6740. /* ================================================================================ */
  6741. /* ================ PDLOCK ================ */
  6742. /* ================================================================================ */
  6743. /**
  6744. * @brief PLL DLL LOCK (PDLOCK)
  6745. */
  6746. typedef struct { /*!< PDLOCK Structure */
  6747. union {
  6748. __I uint32_t GCLK; /*!< GCLK */
  6749. struct {
  6750. __I uint32_t C1R2P : 1; /*!< gclk_c1r2_pll_lock */
  6751. __I uint32_t C1R1P : 1; /*!< gclk_c1r1_pll_lock */
  6752. __I uint32_t C2R1P : 1; /*!< gclk_c2r1_pll_lock */
  6753. __I uint32_t C2R2P : 1; /*!< gclk_c2r2_pll_lock */
  6754. __I uint32_t C1R2D : 1; /*!< gclk_c1r2_dll_lock */
  6755. __I uint32_t C1R1D : 1; /*!< gclk_c1r1_dll_lock */
  6756. __I uint32_t C2R1D : 1; /*!< gclk_c2r1_dll_lock */
  6757. __I uint32_t C2R2D : 1; /*!< gclk_c2r2_dll_lock */
  6758. } GCLK_b; /*!< BitSize */
  6759. };
  6760. } PDLOCK_Type;
  6761. /* ================================================================================ */
  6762. /* ================ PDPROT ================ */
  6763. /* ================================================================================ */
  6764. /**
  6765. * @brief PLL DLL PROTECT (PDPROT)
  6766. */
  6767. typedef struct { /*!< PDPROT Structure */
  6768. union {
  6769. __O uint32_t LOCK; /*!< LOCK */
  6770. struct {
  6771. __O uint32_t EN : 1; /*!< Enable the PLL DLL Lock to Protect it */
  6772. } LOCK_b; /*!< BitSize */
  6773. };
  6774. } PDPROT_Type;
  6775. /* ================================================================================ */
  6776. /* ================ CFG_CTRL ================ */
  6777. /* ================================================================================ */
  6778. /**
  6779. * @brief CFG_CTRL (CFG_CTRL)
  6780. */
  6781. typedef struct { /*!< CFG_CTRL Structure */
  6782. __I uint32_t RESERVED0[3];
  6783. union {
  6784. __IO uint32_t DONE; /*!< DONE CFG */
  6785. struct {
  6786. __IO uint32_t CMD : 1; /*!< Write 1 indicate all chain data write over */
  6787. __IO uint32_t STA : 1; /*!< 1= all chain config process over, chip is in user mode */
  6788. } DONE_b; /*!< BitSize */
  6789. };
  6790. __I uint32_t RESERVED1[34];
  6791. union {
  6792. __IO uint32_t PDLLSTR; /*!< PLL DLL RESET */
  6793. struct {
  6794. __IO uint32_t C1R1P : 1; /*!< C1r1_rstpll_n, low active */
  6795. __IO uint32_t C1R2P : 1; /*!< C1r2_rstpll_n, low active */
  6796. __IO uint32_t C2R1P : 1; /*!< C2r1_rstpll_n, low active */
  6797. __IO uint32_t C2R2P : 1; /*!< C2r2_rstpll_n, low active */
  6798. __IO uint32_t C1R1D : 1; /*!< C1r1_rstdll_n, low active */
  6799. __IO uint32_t C1R2D : 1; /*!< C1r2_rstdll_n, low active */
  6800. __IO uint32_t C2R1D : 1; /*!< C2r1_rstdll_n, low active */
  6801. __IO uint32_t C2R2D : 1; /*!< C2r2_rstdll_n, low active */
  6802. } PDLLSTR_b; /*!< BitSize */
  6803. };
  6804. } CFG_CTRL_Type;
  6805. /* ================================================================================ */
  6806. /* ================ SOFT_RESET ================ */
  6807. /* ================================================================================ */
  6808. /**
  6809. * @brief SUB SOFT RESET (SOFT_RESET)
  6810. */
  6811. typedef struct { /*!< SOFT_RESET Structure */
  6812. union {
  6813. __IO uint32_t SOFTRST; /*!< SOFTRST */
  6814. struct {
  6815. __IO uint32_t CAN1_n : 1; /*!< soft_rst_can1_n */
  6816. __IO uint32_t CAN0_n : 1; /*!< soft_rst_can0_n */
  6817. __IO uint32_t I2C1_n : 1; /*!< soft_rst_i2c1_n */
  6818. __IO uint32_t I2C0_n : 1; /*!< soft_rst_i2c0_n */
  6819. __IO uint32_t SPI1_n : 1; /*!< soft_rst_spi1_n */
  6820. __IO uint32_t SPI0_n : 1; /*!< soft_rst_spi0_n */
  6821. __IO uint32_t UART1_n : 1; /*!< soft_rst_uart1_n */
  6822. __IO uint32_t UART0_n : 1; /*!< soft_rst_uart0_n */
  6823. __IO uint32_t RTC_n : 1; /*!< soft_rst_rtc_n */
  6824. __IO uint32_t GPIO_n : 1; /*!< soft_rst_gpio_n */
  6825. __IO uint32_t TIMER_n : 1; /*!< soft_rst_timer_n */
  6826. __IO uint32_t WDT_n : 1; /*!< soft_rst_wdt_n */
  6827. __IO uint32_t LVDS_n : 1; /*!< soft_rst_lvds_n */
  6828. __IO uint32_t FLS_n : 1; /*!< soft_rst_fls_n */
  6829. __IO uint32_t DMAC_AHB_n : 1; /*!< soft_rst_dmac_ahb_n */
  6830. __IO uint32_t USB_AHB_n : 1; /*!< soft_rst_usb_ahb_n */
  6831. __IO uint32_t ETH_AHB_n : 1; /*!< soft_rst_eth_ahb_n */
  6832. __IO uint32_t DDRC_n : 1; /*!< soft_rst_ddrc_n */
  6833. __IO uint32_t ARM_HCLK_n : 1; /*!< soft_rst_arm_HCLK_n */
  6834. __IO uint32_t _48_n : 1; /*!< soft_rst_48_n */
  6835. __IO uint32_t UTM_n : 1; /*!< soft_rst_utmi_n */
  6836. __IO uint32_t CACHE_n : 1; /*!< soft_rst_cache_n */
  6837. __IO uint32_t USB_n : 1; /*!< soft_rst_cache_n */
  6838. __IO uint32_t ETH_RX_n : 1; /*!< soft_rst_eth_rx_i_n */
  6839. __IO uint32_t ETH_TX_n : 1; /*!< soft_rst_eth_tx_i_n */
  6840. __IO uint32_t ADC_n : 1; /*!< soft_rst_adc_n */
  6841. __IO uint32_t EFUSE_n : 1; /*!< soft_rst_efuse_n */
  6842. __IO uint32_t Reserved1_n: 1; /*!< Reserved11 */
  6843. __IO uint32_t AES_n : 1; /*!< soft_rst_aes_n */
  6844. __IO uint32_t UART2_n : 1; /*!< soft_rst_uart2_n */
  6845. __IO uint32_t AS_n : 1; /*!< soft_rst_as_n */
  6846. __IO uint32_t FDCD_n : 1; /*!< soft_rst_fdcd_n */
  6847. } SOFTRST_b; /*!< BitSize */
  6848. };
  6849. } SOFT_RESET_Type;
  6850. /* -------------------- End of section using anonymous unions ------------------- */
  6851. #if defined(__CC_ARM)
  6852. #pragma pop
  6853. #elif defined(__ICCARM__)
  6854. /* leave anonymous unions enabled */
  6855. #elif defined(__GNUC__)
  6856. /* anonymous unions are enabled by default */
  6857. #elif defined(__TMS470__)
  6858. /* anonymous unions are enabled by default */
  6859. #elif defined(__TASKING__)
  6860. #pragma warning restore
  6861. #else
  6862. #warning Not supported compiler type
  6863. #endif
  6864. /* ================================================================================ */
  6865. /* ================ Peripheral memory map ================ */
  6866. /* ================================================================================ */
  6867. #define UART0_BASE 0x41005000UL
  6868. #define UART1_BASE 0x4100C000UL
  6869. #define UART2_BASE 0x4100E000UL
  6870. #define WDG_BASE 0x41001000UL
  6871. #define TIMER0_BASE 0x41000000UL
  6872. #define TIMER1_BASE 0x41000020UL
  6873. #define TIMER2_BASE 0x41000040UL
  6874. #define TIMER3_BASE 0x41000060UL
  6875. #define SPI0_BASE 0x41004000UL
  6876. #define SPI1_BASE 0x4100B000UL
  6877. #define I2C0_BASE 0x41003000UL
  6878. #define I2C1_BASE 0x4100A000UL
  6879. #define RTC_BASE 0x41007004UL
  6880. #define GPIO_BASE 0x41002000UL
  6881. #define NOR_FLASH_BASE 0x40800000UL
  6882. #define ADC_BASE 0x41006000UL
  6883. #define EFUSE_BASE 0x41008000UL
  6884. #define CAN0_BASE 0x41009000UL
  6885. #define CAN1_BASE 0x4100D000UL
  6886. #define DMA_BASE 0x41500000UL
  6887. #define ETH_BASE 0x41200000UL
  6888. #define USB_BASE 0x41300000UL
  6889. #define GLOBAL_CTRL_BASE 0x41007010UL
  6890. #define AES_BASE 0x41600000UL
  6891. #define DDRC_BASE 0x41400000UL
  6892. #define PDLOCK_BASE 0x41007000UL
  6893. #define PDPROT_BASE 0x41007C00UL
  6894. #define CFG_CTRL_BASE 0x41700000UL
  6895. #define SOFT_RESET_BASE 0x41007400UL
  6896. /* ================================================================================ */
  6897. /* ================ Peripheral declaration ================ */
  6898. /* ================================================================================ */
  6899. #define UART0 ((UART0_Type *) UART0_BASE)
  6900. #define UART1 ((UART0_Type *) UART1_BASE)
  6901. #define UART2 ((UART0_Type *) UART2_BASE)
  6902. #define WDG ((WDG_Type *) WDG_BASE)
  6903. #define TIMER0 ((TIMER0_Type *) TIMER0_BASE)
  6904. #define TIMER1 ((TIMER0_Type *) TIMER1_BASE)
  6905. #define TIMER2 ((TIMER0_Type *) TIMER2_BASE)
  6906. #define TIMER3 ((TIMER0_Type *) TIMER3_BASE)
  6907. #define SPI0 ((SPI0_Type *) SPI0_BASE)
  6908. #define SPI1 ((SPI0_Type *) SPI1_BASE)
  6909. #define I2C0 ((I2C0_Type *) I2C0_BASE)
  6910. #define I2C1 ((I2C0_Type *) I2C1_BASE)
  6911. #define RTC ((RTC_Type *) RTC_BASE)
  6912. #define GPIO ((GPIO_Type *) GPIO_BASE)
  6913. #define NOR_FLASH ((NOR_FLASH_Type *) NOR_FLASH_BASE)
  6914. #define ADC ((ADC_Type *) ADC_BASE)
  6915. #define EFUSE ((EFUSE_Type *) EFUSE_BASE)
  6916. #define CAN0 ((CAN0_Type *) CAN0_BASE)
  6917. #define CAN1 ((CAN0_Type *) CAN1_BASE)
  6918. #define DMA ((DMA_Type *) DMA_BASE)
  6919. #define ETH ((ETH_Type *) ETH_BASE)
  6920. #define USB ((USB_Type *) USB_BASE)
  6921. #define GLOBAL_CTRL ((GLOBAL_CTRL_Type *) GLOBAL_CTRL_BASE)
  6922. #define AES ((AES_Type *) AES_BASE)
  6923. #define DDRC ((DDRC_Type *) DDRC_BASE)
  6924. #define PDLOCK ((PDLOCK_Type *) PDLOCK_BASE)
  6925. #define PDPROT ((PDPROT_Type *) PDPROT_BASE)
  6926. #define CFG_CTRL ((CFG_CTRL_Type *) CFG_CTRL_BASE)
  6927. #define SOFT_RESET ((SOFT_RESET_Type *) SOFT_RESET_BASE)
  6928. /** @} */ /* End of group Device_Peripheral_Registers */
  6929. /** @} */ /* End of group cmem7 */
  6930. /** @} */ /* End of group (null) */
  6931. #ifdef __cplusplus
  6932. }
  6933. #endif
  6934. #endif /* cmem7_H */