MK64F12_enet.h 315 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441
  1. /*
  2. * Copyright (c) 2014, Freescale Semiconductor, Inc.
  3. * All rights reserved.
  4. *
  5. * THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESS OR IMPLIED
  6. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  7. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
  8. * SHALL FREESCALE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  9. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
  10. * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  11. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  12. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  13. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  14. * OF SUCH DAMAGE.
  15. */
  16. /*
  17. * WARNING! DO NOT EDIT THIS FILE DIRECTLY!
  18. *
  19. * This file was generated automatically and any changes may be lost.
  20. */
  21. #ifndef __HW_ENET_REGISTERS_H__
  22. #define __HW_ENET_REGISTERS_H__
  23. #include "regs.h"
  24. /*
  25. * MK64F12 ENET
  26. *
  27. * Ethernet MAC-NET Core
  28. *
  29. * Registers defined in this header file:
  30. * - HW_ENET_EIR - Interrupt Event Register
  31. * - HW_ENET_EIMR - Interrupt Mask Register
  32. * - HW_ENET_RDAR - Receive Descriptor Active Register
  33. * - HW_ENET_TDAR - Transmit Descriptor Active Register
  34. * - HW_ENET_ECR - Ethernet Control Register
  35. * - HW_ENET_MMFR - MII Management Frame Register
  36. * - HW_ENET_MSCR - MII Speed Control Register
  37. * - HW_ENET_MIBC - MIB Control Register
  38. * - HW_ENET_RCR - Receive Control Register
  39. * - HW_ENET_TCR - Transmit Control Register
  40. * - HW_ENET_PALR - Physical Address Lower Register
  41. * - HW_ENET_PAUR - Physical Address Upper Register
  42. * - HW_ENET_OPD - Opcode/Pause Duration Register
  43. * - HW_ENET_IAUR - Descriptor Individual Upper Address Register
  44. * - HW_ENET_IALR - Descriptor Individual Lower Address Register
  45. * - HW_ENET_GAUR - Descriptor Group Upper Address Register
  46. * - HW_ENET_GALR - Descriptor Group Lower Address Register
  47. * - HW_ENET_TFWR - Transmit FIFO Watermark Register
  48. * - HW_ENET_RDSR - Receive Descriptor Ring Start Register
  49. * - HW_ENET_TDSR - Transmit Buffer Descriptor Ring Start Register
  50. * - HW_ENET_MRBR - Maximum Receive Buffer Size Register
  51. * - HW_ENET_RSFL - Receive FIFO Section Full Threshold
  52. * - HW_ENET_RSEM - Receive FIFO Section Empty Threshold
  53. * - HW_ENET_RAEM - Receive FIFO Almost Empty Threshold
  54. * - HW_ENET_RAFL - Receive FIFO Almost Full Threshold
  55. * - HW_ENET_TSEM - Transmit FIFO Section Empty Threshold
  56. * - HW_ENET_TAEM - Transmit FIFO Almost Empty Threshold
  57. * - HW_ENET_TAFL - Transmit FIFO Almost Full Threshold
  58. * - HW_ENET_TIPG - Transmit Inter-Packet Gap
  59. * - HW_ENET_FTRL - Frame Truncation Length
  60. * - HW_ENET_TACC - Transmit Accelerator Function Configuration
  61. * - HW_ENET_RACC - Receive Accelerator Function Configuration
  62. * - HW_ENET_RMON_T_PACKETS - Tx Packet Count Statistic Register
  63. * - HW_ENET_RMON_T_BC_PKT - Tx Broadcast Packets Statistic Register
  64. * - HW_ENET_RMON_T_MC_PKT - Tx Multicast Packets Statistic Register
  65. * - HW_ENET_RMON_T_CRC_ALIGN - Tx Packets with CRC/Align Error Statistic Register
  66. * - HW_ENET_RMON_T_UNDERSIZE - Tx Packets Less Than Bytes and Good CRC Statistic Register
  67. * - HW_ENET_RMON_T_OVERSIZE - Tx Packets GT MAX_FL bytes and Good CRC Statistic Register
  68. * - HW_ENET_RMON_T_FRAG - Tx Packets Less Than 64 Bytes and Bad CRC Statistic Register
  69. * - HW_ENET_RMON_T_JAB - Tx Packets Greater Than MAX_FL bytes and Bad CRC Statistic Register
  70. * - HW_ENET_RMON_T_COL - Tx Collision Count Statistic Register
  71. * - HW_ENET_RMON_T_P64 - Tx 64-Byte Packets Statistic Register
  72. * - HW_ENET_RMON_T_P65TO127 - Tx 65- to 127-byte Packets Statistic Register
  73. * - HW_ENET_RMON_T_P128TO255 - Tx 128- to 255-byte Packets Statistic Register
  74. * - HW_ENET_RMON_T_P256TO511 - Tx 256- to 511-byte Packets Statistic Register
  75. * - HW_ENET_RMON_T_P512TO1023 - Tx 512- to 1023-byte Packets Statistic Register
  76. * - HW_ENET_RMON_T_P1024TO2047 - Tx 1024- to 2047-byte Packets Statistic Register
  77. * - HW_ENET_RMON_T_P_GTE2048 - Tx Packets Greater Than 2048 Bytes Statistic Register
  78. * - HW_ENET_RMON_T_OCTETS - Tx Octets Statistic Register
  79. * - HW_ENET_IEEE_T_FRAME_OK - Frames Transmitted OK Statistic Register
  80. * - HW_ENET_IEEE_T_1COL - Frames Transmitted with Single Collision Statistic Register
  81. * - HW_ENET_IEEE_T_MCOL - Frames Transmitted with Multiple Collisions Statistic Register
  82. * - HW_ENET_IEEE_T_DEF - Frames Transmitted after Deferral Delay Statistic Register
  83. * - HW_ENET_IEEE_T_LCOL - Frames Transmitted with Late Collision Statistic Register
  84. * - HW_ENET_IEEE_T_EXCOL - Frames Transmitted with Excessive Collisions Statistic Register
  85. * - HW_ENET_IEEE_T_MACERR - Frames Transmitted with Tx FIFO Underrun Statistic Register
  86. * - HW_ENET_IEEE_T_CSERR - Frames Transmitted with Carrier Sense Error Statistic Register
  87. * - HW_ENET_IEEE_T_FDXFC - Flow Control Pause Frames Transmitted Statistic Register
  88. * - HW_ENET_IEEE_T_OCTETS_OK - Octet Count for Frames Transmitted w/o Error Statistic Register
  89. * - HW_ENET_RMON_R_PACKETS - Rx Packet Count Statistic Register
  90. * - HW_ENET_RMON_R_BC_PKT - Rx Broadcast Packets Statistic Register
  91. * - HW_ENET_RMON_R_MC_PKT - Rx Multicast Packets Statistic Register
  92. * - HW_ENET_RMON_R_CRC_ALIGN - Rx Packets with CRC/Align Error Statistic Register
  93. * - HW_ENET_RMON_R_UNDERSIZE - Rx Packets with Less Than 64 Bytes and Good CRC Statistic Register
  94. * - HW_ENET_RMON_R_OVERSIZE - Rx Packets Greater Than MAX_FL and Good CRC Statistic Register
  95. * - HW_ENET_RMON_R_FRAG - Rx Packets Less Than 64 Bytes and Bad CRC Statistic Register
  96. * - HW_ENET_RMON_R_JAB - Rx Packets Greater Than MAX_FL Bytes and Bad CRC Statistic Register
  97. * - HW_ENET_RMON_R_P64 - Rx 64-Byte Packets Statistic Register
  98. * - HW_ENET_RMON_R_P65TO127 - Rx 65- to 127-Byte Packets Statistic Register
  99. * - HW_ENET_RMON_R_P128TO255 - Rx 128- to 255-Byte Packets Statistic Register
  100. * - HW_ENET_RMON_R_P256TO511 - Rx 256- to 511-Byte Packets Statistic Register
  101. * - HW_ENET_RMON_R_P512TO1023 - Rx 512- to 1023-Byte Packets Statistic Register
  102. * - HW_ENET_RMON_R_P1024TO2047 - Rx 1024- to 2047-Byte Packets Statistic Register
  103. * - HW_ENET_RMON_R_GTE2048 - Rx Packets Greater than 2048 Bytes Statistic Register
  104. * - HW_ENET_RMON_R_OCTETS - Rx Octets Statistic Register
  105. * - HW_ENET_IEEE_R_DROP - Frames not Counted Correctly Statistic Register
  106. * - HW_ENET_IEEE_R_FRAME_OK - Frames Received OK Statistic Register
  107. * - HW_ENET_IEEE_R_CRC - Frames Received with CRC Error Statistic Register
  108. * - HW_ENET_IEEE_R_ALIGN - Frames Received with Alignment Error Statistic Register
  109. * - HW_ENET_IEEE_R_MACERR - Receive FIFO Overflow Count Statistic Register
  110. * - HW_ENET_IEEE_R_FDXFC - Flow Control Pause Frames Received Statistic Register
  111. * - HW_ENET_IEEE_R_OCTETS_OK - Octet Count for Frames Received without Error Statistic Register
  112. * - HW_ENET_ATCR - Adjustable Timer Control Register
  113. * - HW_ENET_ATVR - Timer Value Register
  114. * - HW_ENET_ATOFF - Timer Offset Register
  115. * - HW_ENET_ATPER - Timer Period Register
  116. * - HW_ENET_ATCOR - Timer Correction Register
  117. * - HW_ENET_ATINC - Time-Stamping Clock Period Register
  118. * - HW_ENET_ATSTMP - Timestamp of Last Transmitted Frame
  119. * - HW_ENET_TGSR - Timer Global Status Register
  120. * - HW_ENET_TCSRn - Timer Control Status Register
  121. * - HW_ENET_TCCRn - Timer Compare Capture Register
  122. *
  123. * - hw_enet_t - Struct containing all module registers.
  124. */
  125. //! @name Module base addresses
  126. //@{
  127. #ifndef REGS_ENET_BASE
  128. #define HW_ENET_INSTANCE_COUNT (1U) //!< Number of instances of the ENET module.
  129. #define HW_ENET0 (0U) //!< Instance number for ENET.
  130. #define REGS_ENET0_BASE (0x400C0000U) //!< Base address for ENET.
  131. //! @brief Table of base addresses for ENET instances.
  132. static const uint32_t __g_regs_ENET_base_addresses[] = {
  133. REGS_ENET0_BASE,
  134. };
  135. //! @brief Get the base address of ENET by instance number.
  136. //! @param x ENET instance number, from 0 through 0.
  137. #define REGS_ENET_BASE(x) (__g_regs_ENET_base_addresses[(x)])
  138. //! @brief Get the instance number given a base address.
  139. //! @param b Base address for an instance of ENET.
  140. #define REGS_ENET_INSTANCE(b) ((b) == REGS_ENET0_BASE ? HW_ENET0 : 0)
  141. #endif
  142. //@}
  143. //-------------------------------------------------------------------------------------------
  144. // HW_ENET_EIR - Interrupt Event Register
  145. //-------------------------------------------------------------------------------------------
  146. #ifndef __LANGUAGE_ASM__
  147. /*!
  148. * @brief HW_ENET_EIR - Interrupt Event Register (RW)
  149. *
  150. * Reset value: 0x00000000U
  151. *
  152. * When an event occurs that sets a bit in EIR, an interrupt occurs if the
  153. * corresponding bit in the interrupt mask register (EIMR) is also set. Writing a 1 to
  154. * an EIR bit clears it; writing 0 has no effect. This register is cleared upon
  155. * hardware reset. TxBD[INT] and RxBD[INT] must be set to 1 to allow setting the
  156. * corresponding EIR register flags in enhanced mode, ENET_ECR[EN1588] = 1.
  157. * Legacy mode does not require these flags to be enabled.
  158. */
  159. typedef union _hw_enet_eir
  160. {
  161. uint32_t U;
  162. struct _hw_enet_eir_bitfields
  163. {
  164. uint32_t RESERVED0 : 15; //!< [14:0]
  165. uint32_t TS_TIMER : 1; //!< [15] Timestamp Timer
  166. uint32_t TS_AVAIL : 1; //!< [16] Transmit Timestamp Available
  167. uint32_t WAKEUP : 1; //!< [17] Node Wakeup Request Indication
  168. uint32_t PLR : 1; //!< [18] Payload Receive Error
  169. uint32_t UN : 1; //!< [19] Transmit FIFO Underrun
  170. uint32_t RL : 1; //!< [20] Collision Retry Limit
  171. uint32_t LC : 1; //!< [21] Late Collision
  172. uint32_t EBERR : 1; //!< [22] Ethernet Bus Error
  173. uint32_t MII : 1; //!< [23] MII Interrupt.
  174. uint32_t RXB : 1; //!< [24] Receive Buffer Interrupt
  175. uint32_t RXF : 1; //!< [25] Receive Frame Interrupt
  176. uint32_t TXB : 1; //!< [26] Transmit Buffer Interrupt
  177. uint32_t TXF : 1; //!< [27] Transmit Frame Interrupt
  178. uint32_t GRA : 1; //!< [28] Graceful Stop Complete
  179. uint32_t BABT : 1; //!< [29] Babbling Transmit Error
  180. uint32_t BABR : 1; //!< [30] Babbling Receive Error
  181. uint32_t RESERVED1 : 1; //!< [31]
  182. } B;
  183. } hw_enet_eir_t;
  184. #endif
  185. /*!
  186. * @name Constants and macros for entire ENET_EIR register
  187. */
  188. //@{
  189. #define HW_ENET_EIR_ADDR(x) (REGS_ENET_BASE(x) + 0x4U)
  190. #ifndef __LANGUAGE_ASM__
  191. #define HW_ENET_EIR(x) (*(__IO hw_enet_eir_t *) HW_ENET_EIR_ADDR(x))
  192. #define HW_ENET_EIR_RD(x) (HW_ENET_EIR(x).U)
  193. #define HW_ENET_EIR_WR(x, v) (HW_ENET_EIR(x).U = (v))
  194. #define HW_ENET_EIR_SET(x, v) (HW_ENET_EIR_WR(x, HW_ENET_EIR_RD(x) | (v)))
  195. #define HW_ENET_EIR_CLR(x, v) (HW_ENET_EIR_WR(x, HW_ENET_EIR_RD(x) & ~(v)))
  196. #define HW_ENET_EIR_TOG(x, v) (HW_ENET_EIR_WR(x, HW_ENET_EIR_RD(x) ^ (v)))
  197. #endif
  198. //@}
  199. /*
  200. * Constants & macros for individual ENET_EIR bitfields
  201. */
  202. /*!
  203. * @name Register ENET_EIR, field TS_TIMER[15] (W1C)
  204. *
  205. * The adjustable timer reached the period event. A period event interrupt can
  206. * be generated if ATCR[PEREN] is set and the timer wraps according to the
  207. * periodic setting in the ATPER register. Set the timer period value before setting
  208. * ATCR[PEREN].
  209. */
  210. //@{
  211. #define BP_ENET_EIR_TS_TIMER (15U) //!< Bit position for ENET_EIR_TS_TIMER.
  212. #define BM_ENET_EIR_TS_TIMER (0x00008000U) //!< Bit mask for ENET_EIR_TS_TIMER.
  213. #define BS_ENET_EIR_TS_TIMER (1U) //!< Bit field size in bits for ENET_EIR_TS_TIMER.
  214. #ifndef __LANGUAGE_ASM__
  215. //! @brief Read current value of the ENET_EIR_TS_TIMER field.
  216. #define BR_ENET_EIR_TS_TIMER(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_TS_TIMER))
  217. #endif
  218. //! @brief Format value for bitfield ENET_EIR_TS_TIMER.
  219. #define BF_ENET_EIR_TS_TIMER(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_TS_TIMER), uint32_t) & BM_ENET_EIR_TS_TIMER)
  220. #ifndef __LANGUAGE_ASM__
  221. //! @brief Set the TS_TIMER field to a new value.
  222. #define BW_ENET_EIR_TS_TIMER(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_TS_TIMER) = (v))
  223. #endif
  224. //@}
  225. /*!
  226. * @name Register ENET_EIR, field TS_AVAIL[16] (W1C)
  227. *
  228. * Indicates that the timestamp of the last transmitted timing frame is
  229. * available in the ATSTMP register.
  230. */
  231. //@{
  232. #define BP_ENET_EIR_TS_AVAIL (16U) //!< Bit position for ENET_EIR_TS_AVAIL.
  233. #define BM_ENET_EIR_TS_AVAIL (0x00010000U) //!< Bit mask for ENET_EIR_TS_AVAIL.
  234. #define BS_ENET_EIR_TS_AVAIL (1U) //!< Bit field size in bits for ENET_EIR_TS_AVAIL.
  235. #ifndef __LANGUAGE_ASM__
  236. //! @brief Read current value of the ENET_EIR_TS_AVAIL field.
  237. #define BR_ENET_EIR_TS_AVAIL(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_TS_AVAIL))
  238. #endif
  239. //! @brief Format value for bitfield ENET_EIR_TS_AVAIL.
  240. #define BF_ENET_EIR_TS_AVAIL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_TS_AVAIL), uint32_t) & BM_ENET_EIR_TS_AVAIL)
  241. #ifndef __LANGUAGE_ASM__
  242. //! @brief Set the TS_AVAIL field to a new value.
  243. #define BW_ENET_EIR_TS_AVAIL(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_TS_AVAIL) = (v))
  244. #endif
  245. //@}
  246. /*!
  247. * @name Register ENET_EIR, field WAKEUP[17] (W1C)
  248. *
  249. * Read-only status bit to indicate that a magic packet has been detected. Will
  250. * act only if ECR[MAGICEN] is set.
  251. */
  252. //@{
  253. #define BP_ENET_EIR_WAKEUP (17U) //!< Bit position for ENET_EIR_WAKEUP.
  254. #define BM_ENET_EIR_WAKEUP (0x00020000U) //!< Bit mask for ENET_EIR_WAKEUP.
  255. #define BS_ENET_EIR_WAKEUP (1U) //!< Bit field size in bits for ENET_EIR_WAKEUP.
  256. #ifndef __LANGUAGE_ASM__
  257. //! @brief Read current value of the ENET_EIR_WAKEUP field.
  258. #define BR_ENET_EIR_WAKEUP(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_WAKEUP))
  259. #endif
  260. //! @brief Format value for bitfield ENET_EIR_WAKEUP.
  261. #define BF_ENET_EIR_WAKEUP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_WAKEUP), uint32_t) & BM_ENET_EIR_WAKEUP)
  262. #ifndef __LANGUAGE_ASM__
  263. //! @brief Set the WAKEUP field to a new value.
  264. #define BW_ENET_EIR_WAKEUP(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_WAKEUP) = (v))
  265. #endif
  266. //@}
  267. /*!
  268. * @name Register ENET_EIR, field PLR[18] (W1C)
  269. *
  270. * Indicates a frame was received with a payload length error. See Frame
  271. * Length/Type Verification: Payload Length Check for more information.
  272. */
  273. //@{
  274. #define BP_ENET_EIR_PLR (18U) //!< Bit position for ENET_EIR_PLR.
  275. #define BM_ENET_EIR_PLR (0x00040000U) //!< Bit mask for ENET_EIR_PLR.
  276. #define BS_ENET_EIR_PLR (1U) //!< Bit field size in bits for ENET_EIR_PLR.
  277. #ifndef __LANGUAGE_ASM__
  278. //! @brief Read current value of the ENET_EIR_PLR field.
  279. #define BR_ENET_EIR_PLR(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_PLR))
  280. #endif
  281. //! @brief Format value for bitfield ENET_EIR_PLR.
  282. #define BF_ENET_EIR_PLR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_PLR), uint32_t) & BM_ENET_EIR_PLR)
  283. #ifndef __LANGUAGE_ASM__
  284. //! @brief Set the PLR field to a new value.
  285. #define BW_ENET_EIR_PLR(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_PLR) = (v))
  286. #endif
  287. //@}
  288. /*!
  289. * @name Register ENET_EIR, field UN[19] (W1C)
  290. *
  291. * Indicates the transmit FIFO became empty before the complete frame was
  292. * transmitted. A bad CRC is appended to the frame fragment and the remainder of the
  293. * frame is discarded.
  294. */
  295. //@{
  296. #define BP_ENET_EIR_UN (19U) //!< Bit position for ENET_EIR_UN.
  297. #define BM_ENET_EIR_UN (0x00080000U) //!< Bit mask for ENET_EIR_UN.
  298. #define BS_ENET_EIR_UN (1U) //!< Bit field size in bits for ENET_EIR_UN.
  299. #ifndef __LANGUAGE_ASM__
  300. //! @brief Read current value of the ENET_EIR_UN field.
  301. #define BR_ENET_EIR_UN(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_UN))
  302. #endif
  303. //! @brief Format value for bitfield ENET_EIR_UN.
  304. #define BF_ENET_EIR_UN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_UN), uint32_t) & BM_ENET_EIR_UN)
  305. #ifndef __LANGUAGE_ASM__
  306. //! @brief Set the UN field to a new value.
  307. #define BW_ENET_EIR_UN(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_UN) = (v))
  308. #endif
  309. //@}
  310. /*!
  311. * @name Register ENET_EIR, field RL[20] (W1C)
  312. *
  313. * Indicates a collision occurred on each of 16 successive attempts to transmit
  314. * the frame. The frame is discarded without being transmitted and transmission
  315. * of the next frame commences. This error can only occur in half-duplex mode.
  316. */
  317. //@{
  318. #define BP_ENET_EIR_RL (20U) //!< Bit position for ENET_EIR_RL.
  319. #define BM_ENET_EIR_RL (0x00100000U) //!< Bit mask for ENET_EIR_RL.
  320. #define BS_ENET_EIR_RL (1U) //!< Bit field size in bits for ENET_EIR_RL.
  321. #ifndef __LANGUAGE_ASM__
  322. //! @brief Read current value of the ENET_EIR_RL field.
  323. #define BR_ENET_EIR_RL(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_RL))
  324. #endif
  325. //! @brief Format value for bitfield ENET_EIR_RL.
  326. #define BF_ENET_EIR_RL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_RL), uint32_t) & BM_ENET_EIR_RL)
  327. #ifndef __LANGUAGE_ASM__
  328. //! @brief Set the RL field to a new value.
  329. #define BW_ENET_EIR_RL(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_RL) = (v))
  330. #endif
  331. //@}
  332. /*!
  333. * @name Register ENET_EIR, field LC[21] (W1C)
  334. *
  335. * Indicates a collision occurred beyond the collision window (slot time) in
  336. * half-duplex mode. The frame truncates with a bad CRC and the remainder of the
  337. * frame is discarded.
  338. */
  339. //@{
  340. #define BP_ENET_EIR_LC (21U) //!< Bit position for ENET_EIR_LC.
  341. #define BM_ENET_EIR_LC (0x00200000U) //!< Bit mask for ENET_EIR_LC.
  342. #define BS_ENET_EIR_LC (1U) //!< Bit field size in bits for ENET_EIR_LC.
  343. #ifndef __LANGUAGE_ASM__
  344. //! @brief Read current value of the ENET_EIR_LC field.
  345. #define BR_ENET_EIR_LC(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_LC))
  346. #endif
  347. //! @brief Format value for bitfield ENET_EIR_LC.
  348. #define BF_ENET_EIR_LC(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_LC), uint32_t) & BM_ENET_EIR_LC)
  349. #ifndef __LANGUAGE_ASM__
  350. //! @brief Set the LC field to a new value.
  351. #define BW_ENET_EIR_LC(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_LC) = (v))
  352. #endif
  353. //@}
  354. /*!
  355. * @name Register ENET_EIR, field EBERR[22] (W1C)
  356. *
  357. * Indicates a system bus error occurred when a uDMA transaction is underway.
  358. * When this bit is set, ECR[ETHEREN] is cleared, halting frame processing by the
  359. * MAC. When this occurs, software must ensure proper actions, possibly resetting
  360. * the system, to resume normal operation.
  361. */
  362. //@{
  363. #define BP_ENET_EIR_EBERR (22U) //!< Bit position for ENET_EIR_EBERR.
  364. #define BM_ENET_EIR_EBERR (0x00400000U) //!< Bit mask for ENET_EIR_EBERR.
  365. #define BS_ENET_EIR_EBERR (1U) //!< Bit field size in bits for ENET_EIR_EBERR.
  366. #ifndef __LANGUAGE_ASM__
  367. //! @brief Read current value of the ENET_EIR_EBERR field.
  368. #define BR_ENET_EIR_EBERR(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_EBERR))
  369. #endif
  370. //! @brief Format value for bitfield ENET_EIR_EBERR.
  371. #define BF_ENET_EIR_EBERR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_EBERR), uint32_t) & BM_ENET_EIR_EBERR)
  372. #ifndef __LANGUAGE_ASM__
  373. //! @brief Set the EBERR field to a new value.
  374. #define BW_ENET_EIR_EBERR(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_EBERR) = (v))
  375. #endif
  376. //@}
  377. /*!
  378. * @name Register ENET_EIR, field MII[23] (W1C)
  379. *
  380. * Indicates that the MII has completed the data transfer requested.
  381. */
  382. //@{
  383. #define BP_ENET_EIR_MII (23U) //!< Bit position for ENET_EIR_MII.
  384. #define BM_ENET_EIR_MII (0x00800000U) //!< Bit mask for ENET_EIR_MII.
  385. #define BS_ENET_EIR_MII (1U) //!< Bit field size in bits for ENET_EIR_MII.
  386. #ifndef __LANGUAGE_ASM__
  387. //! @brief Read current value of the ENET_EIR_MII field.
  388. #define BR_ENET_EIR_MII(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_MII))
  389. #endif
  390. //! @brief Format value for bitfield ENET_EIR_MII.
  391. #define BF_ENET_EIR_MII(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_MII), uint32_t) & BM_ENET_EIR_MII)
  392. #ifndef __LANGUAGE_ASM__
  393. //! @brief Set the MII field to a new value.
  394. #define BW_ENET_EIR_MII(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_MII) = (v))
  395. #endif
  396. //@}
  397. /*!
  398. * @name Register ENET_EIR, field RXB[24] (W1C)
  399. *
  400. * Indicates a receive buffer descriptor is not the last in the frame has been
  401. * updated.
  402. */
  403. //@{
  404. #define BP_ENET_EIR_RXB (24U) //!< Bit position for ENET_EIR_RXB.
  405. #define BM_ENET_EIR_RXB (0x01000000U) //!< Bit mask for ENET_EIR_RXB.
  406. #define BS_ENET_EIR_RXB (1U) //!< Bit field size in bits for ENET_EIR_RXB.
  407. #ifndef __LANGUAGE_ASM__
  408. //! @brief Read current value of the ENET_EIR_RXB field.
  409. #define BR_ENET_EIR_RXB(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_RXB))
  410. #endif
  411. //! @brief Format value for bitfield ENET_EIR_RXB.
  412. #define BF_ENET_EIR_RXB(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_RXB), uint32_t) & BM_ENET_EIR_RXB)
  413. #ifndef __LANGUAGE_ASM__
  414. //! @brief Set the RXB field to a new value.
  415. #define BW_ENET_EIR_RXB(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_RXB) = (v))
  416. #endif
  417. //@}
  418. /*!
  419. * @name Register ENET_EIR, field RXF[25] (W1C)
  420. *
  421. * Indicates a frame has been received and the last corresponding buffer
  422. * descriptor has been updated.
  423. */
  424. //@{
  425. #define BP_ENET_EIR_RXF (25U) //!< Bit position for ENET_EIR_RXF.
  426. #define BM_ENET_EIR_RXF (0x02000000U) //!< Bit mask for ENET_EIR_RXF.
  427. #define BS_ENET_EIR_RXF (1U) //!< Bit field size in bits for ENET_EIR_RXF.
  428. #ifndef __LANGUAGE_ASM__
  429. //! @brief Read current value of the ENET_EIR_RXF field.
  430. #define BR_ENET_EIR_RXF(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_RXF))
  431. #endif
  432. //! @brief Format value for bitfield ENET_EIR_RXF.
  433. #define BF_ENET_EIR_RXF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_RXF), uint32_t) & BM_ENET_EIR_RXF)
  434. #ifndef __LANGUAGE_ASM__
  435. //! @brief Set the RXF field to a new value.
  436. #define BW_ENET_EIR_RXF(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_RXF) = (v))
  437. #endif
  438. //@}
  439. /*!
  440. * @name Register ENET_EIR, field TXB[26] (W1C)
  441. *
  442. * Indicates a transmit buffer descriptor has been updated.
  443. */
  444. //@{
  445. #define BP_ENET_EIR_TXB (26U) //!< Bit position for ENET_EIR_TXB.
  446. #define BM_ENET_EIR_TXB (0x04000000U) //!< Bit mask for ENET_EIR_TXB.
  447. #define BS_ENET_EIR_TXB (1U) //!< Bit field size in bits for ENET_EIR_TXB.
  448. #ifndef __LANGUAGE_ASM__
  449. //! @brief Read current value of the ENET_EIR_TXB field.
  450. #define BR_ENET_EIR_TXB(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_TXB))
  451. #endif
  452. //! @brief Format value for bitfield ENET_EIR_TXB.
  453. #define BF_ENET_EIR_TXB(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_TXB), uint32_t) & BM_ENET_EIR_TXB)
  454. #ifndef __LANGUAGE_ASM__
  455. //! @brief Set the TXB field to a new value.
  456. #define BW_ENET_EIR_TXB(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_TXB) = (v))
  457. #endif
  458. //@}
  459. /*!
  460. * @name Register ENET_EIR, field TXF[27] (W1C)
  461. *
  462. * Indicates a frame has been transmitted and the last corresponding buffer
  463. * descriptor has been updated.
  464. */
  465. //@{
  466. #define BP_ENET_EIR_TXF (27U) //!< Bit position for ENET_EIR_TXF.
  467. #define BM_ENET_EIR_TXF (0x08000000U) //!< Bit mask for ENET_EIR_TXF.
  468. #define BS_ENET_EIR_TXF (1U) //!< Bit field size in bits for ENET_EIR_TXF.
  469. #ifndef __LANGUAGE_ASM__
  470. //! @brief Read current value of the ENET_EIR_TXF field.
  471. #define BR_ENET_EIR_TXF(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_TXF))
  472. #endif
  473. //! @brief Format value for bitfield ENET_EIR_TXF.
  474. #define BF_ENET_EIR_TXF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_TXF), uint32_t) & BM_ENET_EIR_TXF)
  475. #ifndef __LANGUAGE_ASM__
  476. //! @brief Set the TXF field to a new value.
  477. #define BW_ENET_EIR_TXF(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_TXF) = (v))
  478. #endif
  479. //@}
  480. /*!
  481. * @name Register ENET_EIR, field GRA[28] (W1C)
  482. *
  483. * This interrupt is asserted after the transmitter is put into a pause state
  484. * after completion of the frame currently being transmitted. See Graceful Transmit
  485. * Stop (GTS) for conditions that lead to graceful stop. The GRA interrupt is
  486. * asserted only when the TX transitions into the stopped state. If this bit is
  487. * cleared by writing 1 and the TX is still stopped, the bit is not set again.
  488. */
  489. //@{
  490. #define BP_ENET_EIR_GRA (28U) //!< Bit position for ENET_EIR_GRA.
  491. #define BM_ENET_EIR_GRA (0x10000000U) //!< Bit mask for ENET_EIR_GRA.
  492. #define BS_ENET_EIR_GRA (1U) //!< Bit field size in bits for ENET_EIR_GRA.
  493. #ifndef __LANGUAGE_ASM__
  494. //! @brief Read current value of the ENET_EIR_GRA field.
  495. #define BR_ENET_EIR_GRA(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_GRA))
  496. #endif
  497. //! @brief Format value for bitfield ENET_EIR_GRA.
  498. #define BF_ENET_EIR_GRA(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_GRA), uint32_t) & BM_ENET_EIR_GRA)
  499. #ifndef __LANGUAGE_ASM__
  500. //! @brief Set the GRA field to a new value.
  501. #define BW_ENET_EIR_GRA(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_GRA) = (v))
  502. #endif
  503. //@}
  504. /*!
  505. * @name Register ENET_EIR, field BABT[29] (W1C)
  506. *
  507. * Indicates the transmitted frame length exceeds RCR[MAX_FL] bytes. Usually
  508. * this condition is caused when a frame that is too long is placed into the
  509. * transmit data buffer(s). Truncation does not occur.
  510. */
  511. //@{
  512. #define BP_ENET_EIR_BABT (29U) //!< Bit position for ENET_EIR_BABT.
  513. #define BM_ENET_EIR_BABT (0x20000000U) //!< Bit mask for ENET_EIR_BABT.
  514. #define BS_ENET_EIR_BABT (1U) //!< Bit field size in bits for ENET_EIR_BABT.
  515. #ifndef __LANGUAGE_ASM__
  516. //! @brief Read current value of the ENET_EIR_BABT field.
  517. #define BR_ENET_EIR_BABT(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_BABT))
  518. #endif
  519. //! @brief Format value for bitfield ENET_EIR_BABT.
  520. #define BF_ENET_EIR_BABT(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_BABT), uint32_t) & BM_ENET_EIR_BABT)
  521. #ifndef __LANGUAGE_ASM__
  522. //! @brief Set the BABT field to a new value.
  523. #define BW_ENET_EIR_BABT(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_BABT) = (v))
  524. #endif
  525. //@}
  526. /*!
  527. * @name Register ENET_EIR, field BABR[30] (W1C)
  528. *
  529. * Indicates a frame was received with length in excess of RCR[MAX_FL] bytes.
  530. */
  531. //@{
  532. #define BP_ENET_EIR_BABR (30U) //!< Bit position for ENET_EIR_BABR.
  533. #define BM_ENET_EIR_BABR (0x40000000U) //!< Bit mask for ENET_EIR_BABR.
  534. #define BS_ENET_EIR_BABR (1U) //!< Bit field size in bits for ENET_EIR_BABR.
  535. #ifndef __LANGUAGE_ASM__
  536. //! @brief Read current value of the ENET_EIR_BABR field.
  537. #define BR_ENET_EIR_BABR(x) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_BABR))
  538. #endif
  539. //! @brief Format value for bitfield ENET_EIR_BABR.
  540. #define BF_ENET_EIR_BABR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIR_BABR), uint32_t) & BM_ENET_EIR_BABR)
  541. #ifndef __LANGUAGE_ASM__
  542. //! @brief Set the BABR field to a new value.
  543. #define BW_ENET_EIR_BABR(x, v) (BITBAND_ACCESS32(HW_ENET_EIR_ADDR(x), BP_ENET_EIR_BABR) = (v))
  544. #endif
  545. //@}
  546. //-------------------------------------------------------------------------------------------
  547. // HW_ENET_EIMR - Interrupt Mask Register
  548. //-------------------------------------------------------------------------------------------
  549. #ifndef __LANGUAGE_ASM__
  550. /*!
  551. * @brief HW_ENET_EIMR - Interrupt Mask Register (RW)
  552. *
  553. * Reset value: 0x00000000U
  554. *
  555. * EIMR controls which interrupt events are allowed to generate actual
  556. * interrupts. A hardware reset clears this register. If the corresponding bits in the EIR
  557. * and EIMR registers are set, an interrupt is generated. The interrupt signal
  558. * remains asserted until a 1 is written to the EIR field (write 1 to clear) or a
  559. * 0 is written to the EIMR field.
  560. */
  561. typedef union _hw_enet_eimr
  562. {
  563. uint32_t U;
  564. struct _hw_enet_eimr_bitfields
  565. {
  566. uint32_t RESERVED0 : 15; //!< [14:0]
  567. uint32_t TS_TIMER : 1; //!< [15] TS_TIMER Interrupt Mask
  568. uint32_t TS_AVAIL : 1; //!< [16] TS_AVAIL Interrupt Mask
  569. uint32_t WAKEUP : 1; //!< [17] WAKEUP Interrupt Mask
  570. uint32_t PLR : 1; //!< [18] PLR Interrupt Mask
  571. uint32_t UN : 1; //!< [19] UN Interrupt Mask
  572. uint32_t RL : 1; //!< [20] RL Interrupt Mask
  573. uint32_t LC : 1; //!< [21] LC Interrupt Mask
  574. uint32_t EBERR : 1; //!< [22] EBERR Interrupt Mask
  575. uint32_t MII : 1; //!< [23] MII Interrupt Mask
  576. uint32_t RXB : 1; //!< [24] RXB Interrupt Mask
  577. uint32_t RXF : 1; //!< [25] RXF Interrupt Mask
  578. uint32_t TXB : 1; //!< [26] TXB Interrupt Mask
  579. uint32_t TXF : 1; //!< [27] TXF Interrupt Mask
  580. uint32_t GRA : 1; //!< [28] GRA Interrupt Mask
  581. uint32_t BABT : 1; //!< [29] BABT Interrupt Mask
  582. uint32_t BABR : 1; //!< [30] BABR Interrupt Mask
  583. uint32_t RESERVED1 : 1; //!< [31]
  584. } B;
  585. } hw_enet_eimr_t;
  586. #endif
  587. /*!
  588. * @name Constants and macros for entire ENET_EIMR register
  589. */
  590. //@{
  591. #define HW_ENET_EIMR_ADDR(x) (REGS_ENET_BASE(x) + 0x8U)
  592. #ifndef __LANGUAGE_ASM__
  593. #define HW_ENET_EIMR(x) (*(__IO hw_enet_eimr_t *) HW_ENET_EIMR_ADDR(x))
  594. #define HW_ENET_EIMR_RD(x) (HW_ENET_EIMR(x).U)
  595. #define HW_ENET_EIMR_WR(x, v) (HW_ENET_EIMR(x).U = (v))
  596. #define HW_ENET_EIMR_SET(x, v) (HW_ENET_EIMR_WR(x, HW_ENET_EIMR_RD(x) | (v)))
  597. #define HW_ENET_EIMR_CLR(x, v) (HW_ENET_EIMR_WR(x, HW_ENET_EIMR_RD(x) & ~(v)))
  598. #define HW_ENET_EIMR_TOG(x, v) (HW_ENET_EIMR_WR(x, HW_ENET_EIMR_RD(x) ^ (v)))
  599. #endif
  600. //@}
  601. /*
  602. * Constants & macros for individual ENET_EIMR bitfields
  603. */
  604. /*!
  605. * @name Register ENET_EIMR, field TS_TIMER[15] (RW)
  606. *
  607. * Corresponds to interrupt source EIR[TS_TIMER] register and determines whether
  608. * an interrupt condition can generate an interrupt. At every module clock, the
  609. * EIR samples the signal generated by the interrupting source. The corresponding
  610. * EIR TS_TIMER field reflects the state of the interrupt signal even if the
  611. * corresponding EIMR field is cleared.
  612. */
  613. //@{
  614. #define BP_ENET_EIMR_TS_TIMER (15U) //!< Bit position for ENET_EIMR_TS_TIMER.
  615. #define BM_ENET_EIMR_TS_TIMER (0x00008000U) //!< Bit mask for ENET_EIMR_TS_TIMER.
  616. #define BS_ENET_EIMR_TS_TIMER (1U) //!< Bit field size in bits for ENET_EIMR_TS_TIMER.
  617. #ifndef __LANGUAGE_ASM__
  618. //! @brief Read current value of the ENET_EIMR_TS_TIMER field.
  619. #define BR_ENET_EIMR_TS_TIMER(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_TS_TIMER))
  620. #endif
  621. //! @brief Format value for bitfield ENET_EIMR_TS_TIMER.
  622. #define BF_ENET_EIMR_TS_TIMER(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_TS_TIMER), uint32_t) & BM_ENET_EIMR_TS_TIMER)
  623. #ifndef __LANGUAGE_ASM__
  624. //! @brief Set the TS_TIMER field to a new value.
  625. #define BW_ENET_EIMR_TS_TIMER(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_TS_TIMER) = (v))
  626. #endif
  627. //@}
  628. /*!
  629. * @name Register ENET_EIMR, field TS_AVAIL[16] (RW)
  630. *
  631. * Corresponds to interrupt source EIR[TS_AVAIL] register and determines whether
  632. * an interrupt condition can generate an interrupt. At every module clock, the
  633. * EIR samples the signal generated by the interrupting source. The corresponding
  634. * EIR TS_AVAIL field reflects the state of the interrupt signal even if the
  635. * corresponding EIMR field is cleared.
  636. */
  637. //@{
  638. #define BP_ENET_EIMR_TS_AVAIL (16U) //!< Bit position for ENET_EIMR_TS_AVAIL.
  639. #define BM_ENET_EIMR_TS_AVAIL (0x00010000U) //!< Bit mask for ENET_EIMR_TS_AVAIL.
  640. #define BS_ENET_EIMR_TS_AVAIL (1U) //!< Bit field size in bits for ENET_EIMR_TS_AVAIL.
  641. #ifndef __LANGUAGE_ASM__
  642. //! @brief Read current value of the ENET_EIMR_TS_AVAIL field.
  643. #define BR_ENET_EIMR_TS_AVAIL(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_TS_AVAIL))
  644. #endif
  645. //! @brief Format value for bitfield ENET_EIMR_TS_AVAIL.
  646. #define BF_ENET_EIMR_TS_AVAIL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_TS_AVAIL), uint32_t) & BM_ENET_EIMR_TS_AVAIL)
  647. #ifndef __LANGUAGE_ASM__
  648. //! @brief Set the TS_AVAIL field to a new value.
  649. #define BW_ENET_EIMR_TS_AVAIL(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_TS_AVAIL) = (v))
  650. #endif
  651. //@}
  652. /*!
  653. * @name Register ENET_EIMR, field WAKEUP[17] (RW)
  654. *
  655. * Corresponds to interrupt source EIR[WAKEUP] register and determines whether
  656. * an interrupt condition can generate an interrupt. At every module clock, the
  657. * EIR samples the signal generated by the interrupting source. The corresponding
  658. * EIR WAKEUP field reflects the state of the interrupt signal even if the
  659. * corresponding EIMR field is cleared.
  660. */
  661. //@{
  662. #define BP_ENET_EIMR_WAKEUP (17U) //!< Bit position for ENET_EIMR_WAKEUP.
  663. #define BM_ENET_EIMR_WAKEUP (0x00020000U) //!< Bit mask for ENET_EIMR_WAKEUP.
  664. #define BS_ENET_EIMR_WAKEUP (1U) //!< Bit field size in bits for ENET_EIMR_WAKEUP.
  665. #ifndef __LANGUAGE_ASM__
  666. //! @brief Read current value of the ENET_EIMR_WAKEUP field.
  667. #define BR_ENET_EIMR_WAKEUP(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_WAKEUP))
  668. #endif
  669. //! @brief Format value for bitfield ENET_EIMR_WAKEUP.
  670. #define BF_ENET_EIMR_WAKEUP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_WAKEUP), uint32_t) & BM_ENET_EIMR_WAKEUP)
  671. #ifndef __LANGUAGE_ASM__
  672. //! @brief Set the WAKEUP field to a new value.
  673. #define BW_ENET_EIMR_WAKEUP(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_WAKEUP) = (v))
  674. #endif
  675. //@}
  676. /*!
  677. * @name Register ENET_EIMR, field PLR[18] (RW)
  678. *
  679. * Corresponds to interrupt source EIR[PLR] and determines whether an interrupt
  680. * condition can generate an interrupt. At every module clock, the EIR samples
  681. * the signal generated by the interrupting source. The corresponding EIR PLR field
  682. * reflects the state of the interrupt signal even if the corresponding EIMR
  683. * field is cleared.
  684. */
  685. //@{
  686. #define BP_ENET_EIMR_PLR (18U) //!< Bit position for ENET_EIMR_PLR.
  687. #define BM_ENET_EIMR_PLR (0x00040000U) //!< Bit mask for ENET_EIMR_PLR.
  688. #define BS_ENET_EIMR_PLR (1U) //!< Bit field size in bits for ENET_EIMR_PLR.
  689. #ifndef __LANGUAGE_ASM__
  690. //! @brief Read current value of the ENET_EIMR_PLR field.
  691. #define BR_ENET_EIMR_PLR(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_PLR))
  692. #endif
  693. //! @brief Format value for bitfield ENET_EIMR_PLR.
  694. #define BF_ENET_EIMR_PLR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_PLR), uint32_t) & BM_ENET_EIMR_PLR)
  695. #ifndef __LANGUAGE_ASM__
  696. //! @brief Set the PLR field to a new value.
  697. #define BW_ENET_EIMR_PLR(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_PLR) = (v))
  698. #endif
  699. //@}
  700. /*!
  701. * @name Register ENET_EIMR, field UN[19] (RW)
  702. *
  703. * Corresponds to interrupt source EIR[UN] and determines whether an interrupt
  704. * condition can generate an interrupt. At every module clock, the EIR samples the
  705. * signal generated by the interrupting source. The corresponding EIR UN field
  706. * reflects the state of the interrupt signal even if the corresponding EIMR field
  707. * is cleared.
  708. */
  709. //@{
  710. #define BP_ENET_EIMR_UN (19U) //!< Bit position for ENET_EIMR_UN.
  711. #define BM_ENET_EIMR_UN (0x00080000U) //!< Bit mask for ENET_EIMR_UN.
  712. #define BS_ENET_EIMR_UN (1U) //!< Bit field size in bits for ENET_EIMR_UN.
  713. #ifndef __LANGUAGE_ASM__
  714. //! @brief Read current value of the ENET_EIMR_UN field.
  715. #define BR_ENET_EIMR_UN(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_UN))
  716. #endif
  717. //! @brief Format value for bitfield ENET_EIMR_UN.
  718. #define BF_ENET_EIMR_UN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_UN), uint32_t) & BM_ENET_EIMR_UN)
  719. #ifndef __LANGUAGE_ASM__
  720. //! @brief Set the UN field to a new value.
  721. #define BW_ENET_EIMR_UN(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_UN) = (v))
  722. #endif
  723. //@}
  724. /*!
  725. * @name Register ENET_EIMR, field RL[20] (RW)
  726. *
  727. * Corresponds to interrupt source EIR[RL] and determines whether an interrupt
  728. * condition can generate an interrupt. At every module clock, the EIR samples the
  729. * signal generated by the interrupting source. The corresponding EIR RL field
  730. * reflects the state of the interrupt signal even if the corresponding EIMR field
  731. * is cleared.
  732. */
  733. //@{
  734. #define BP_ENET_EIMR_RL (20U) //!< Bit position for ENET_EIMR_RL.
  735. #define BM_ENET_EIMR_RL (0x00100000U) //!< Bit mask for ENET_EIMR_RL.
  736. #define BS_ENET_EIMR_RL (1U) //!< Bit field size in bits for ENET_EIMR_RL.
  737. #ifndef __LANGUAGE_ASM__
  738. //! @brief Read current value of the ENET_EIMR_RL field.
  739. #define BR_ENET_EIMR_RL(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_RL))
  740. #endif
  741. //! @brief Format value for bitfield ENET_EIMR_RL.
  742. #define BF_ENET_EIMR_RL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_RL), uint32_t) & BM_ENET_EIMR_RL)
  743. #ifndef __LANGUAGE_ASM__
  744. //! @brief Set the RL field to a new value.
  745. #define BW_ENET_EIMR_RL(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_RL) = (v))
  746. #endif
  747. //@}
  748. /*!
  749. * @name Register ENET_EIMR, field LC[21] (RW)
  750. *
  751. * Corresponds to interrupt source EIR[LC] and determines whether an interrupt
  752. * condition can generate an interrupt. At every module clock, the EIR samples the
  753. * signal generated by the interrupting source. The corresponding EIR LC field
  754. * reflects the state of the interrupt signal even if the corresponding EIMR field
  755. * is cleared.
  756. */
  757. //@{
  758. #define BP_ENET_EIMR_LC (21U) //!< Bit position for ENET_EIMR_LC.
  759. #define BM_ENET_EIMR_LC (0x00200000U) //!< Bit mask for ENET_EIMR_LC.
  760. #define BS_ENET_EIMR_LC (1U) //!< Bit field size in bits for ENET_EIMR_LC.
  761. #ifndef __LANGUAGE_ASM__
  762. //! @brief Read current value of the ENET_EIMR_LC field.
  763. #define BR_ENET_EIMR_LC(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_LC))
  764. #endif
  765. //! @brief Format value for bitfield ENET_EIMR_LC.
  766. #define BF_ENET_EIMR_LC(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_LC), uint32_t) & BM_ENET_EIMR_LC)
  767. #ifndef __LANGUAGE_ASM__
  768. //! @brief Set the LC field to a new value.
  769. #define BW_ENET_EIMR_LC(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_LC) = (v))
  770. #endif
  771. //@}
  772. /*!
  773. * @name Register ENET_EIMR, field EBERR[22] (RW)
  774. *
  775. * Corresponds to interrupt source EIR[EBERR] and determines whether an
  776. * interrupt condition can generate an interrupt. At every module clock, the EIR samples
  777. * the signal generated by the interrupting source. The corresponding EIR EBERR
  778. * field reflects the state of the interrupt signal even if the corresponding EIMR
  779. * field is cleared.
  780. */
  781. //@{
  782. #define BP_ENET_EIMR_EBERR (22U) //!< Bit position for ENET_EIMR_EBERR.
  783. #define BM_ENET_EIMR_EBERR (0x00400000U) //!< Bit mask for ENET_EIMR_EBERR.
  784. #define BS_ENET_EIMR_EBERR (1U) //!< Bit field size in bits for ENET_EIMR_EBERR.
  785. #ifndef __LANGUAGE_ASM__
  786. //! @brief Read current value of the ENET_EIMR_EBERR field.
  787. #define BR_ENET_EIMR_EBERR(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_EBERR))
  788. #endif
  789. //! @brief Format value for bitfield ENET_EIMR_EBERR.
  790. #define BF_ENET_EIMR_EBERR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_EBERR), uint32_t) & BM_ENET_EIMR_EBERR)
  791. #ifndef __LANGUAGE_ASM__
  792. //! @brief Set the EBERR field to a new value.
  793. #define BW_ENET_EIMR_EBERR(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_EBERR) = (v))
  794. #endif
  795. //@}
  796. /*!
  797. * @name Register ENET_EIMR, field MII[23] (RW)
  798. *
  799. * Corresponds to interrupt source EIR[MII] and determines whether an interrupt
  800. * condition can generate an interrupt. At every module clock, the EIR samples
  801. * the signal generated by the interrupting source. The corresponding EIR MII field
  802. * reflects the state of the interrupt signal even if the corresponding EIMR
  803. * field is cleared.
  804. */
  805. //@{
  806. #define BP_ENET_EIMR_MII (23U) //!< Bit position for ENET_EIMR_MII.
  807. #define BM_ENET_EIMR_MII (0x00800000U) //!< Bit mask for ENET_EIMR_MII.
  808. #define BS_ENET_EIMR_MII (1U) //!< Bit field size in bits for ENET_EIMR_MII.
  809. #ifndef __LANGUAGE_ASM__
  810. //! @brief Read current value of the ENET_EIMR_MII field.
  811. #define BR_ENET_EIMR_MII(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_MII))
  812. #endif
  813. //! @brief Format value for bitfield ENET_EIMR_MII.
  814. #define BF_ENET_EIMR_MII(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_MII), uint32_t) & BM_ENET_EIMR_MII)
  815. #ifndef __LANGUAGE_ASM__
  816. //! @brief Set the MII field to a new value.
  817. #define BW_ENET_EIMR_MII(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_MII) = (v))
  818. #endif
  819. //@}
  820. /*!
  821. * @name Register ENET_EIMR, field RXB[24] (RW)
  822. *
  823. * Corresponds to interrupt source EIR[RXB] and determines whether an interrupt
  824. * condition can generate an interrupt. At every module clock, the EIR samples
  825. * the signal generated by the interrupting source. The corresponding EIR RXB field
  826. * reflects the state of the interrupt signal even if the corresponding EIMR
  827. * field is cleared.
  828. */
  829. //@{
  830. #define BP_ENET_EIMR_RXB (24U) //!< Bit position for ENET_EIMR_RXB.
  831. #define BM_ENET_EIMR_RXB (0x01000000U) //!< Bit mask for ENET_EIMR_RXB.
  832. #define BS_ENET_EIMR_RXB (1U) //!< Bit field size in bits for ENET_EIMR_RXB.
  833. #ifndef __LANGUAGE_ASM__
  834. //! @brief Read current value of the ENET_EIMR_RXB field.
  835. #define BR_ENET_EIMR_RXB(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_RXB))
  836. #endif
  837. //! @brief Format value for bitfield ENET_EIMR_RXB.
  838. #define BF_ENET_EIMR_RXB(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_RXB), uint32_t) & BM_ENET_EIMR_RXB)
  839. #ifndef __LANGUAGE_ASM__
  840. //! @brief Set the RXB field to a new value.
  841. #define BW_ENET_EIMR_RXB(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_RXB) = (v))
  842. #endif
  843. //@}
  844. /*!
  845. * @name Register ENET_EIMR, field RXF[25] (RW)
  846. *
  847. * Corresponds to interrupt source EIR[RXF] and determines whether an interrupt
  848. * condition can generate an interrupt. At every module clock, the EIR samples
  849. * the signal generated by the interrupting source. The corresponding EIR RXF field
  850. * reflects the state of the interrupt signal even if the corresponding EIMR
  851. * field is cleared.
  852. */
  853. //@{
  854. #define BP_ENET_EIMR_RXF (25U) //!< Bit position for ENET_EIMR_RXF.
  855. #define BM_ENET_EIMR_RXF (0x02000000U) //!< Bit mask for ENET_EIMR_RXF.
  856. #define BS_ENET_EIMR_RXF (1U) //!< Bit field size in bits for ENET_EIMR_RXF.
  857. #ifndef __LANGUAGE_ASM__
  858. //! @brief Read current value of the ENET_EIMR_RXF field.
  859. #define BR_ENET_EIMR_RXF(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_RXF))
  860. #endif
  861. //! @brief Format value for bitfield ENET_EIMR_RXF.
  862. #define BF_ENET_EIMR_RXF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_RXF), uint32_t) & BM_ENET_EIMR_RXF)
  863. #ifndef __LANGUAGE_ASM__
  864. //! @brief Set the RXF field to a new value.
  865. #define BW_ENET_EIMR_RXF(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_RXF) = (v))
  866. #endif
  867. //@}
  868. /*!
  869. * @name Register ENET_EIMR, field TXB[26] (RW)
  870. *
  871. * Corresponds to interrupt source EIR[TXB] and determines whether an interrupt
  872. * condition can generate an interrupt. At every module clock, the EIR samples
  873. * the signal generated by the interrupting source. The corresponding EIR TXF field
  874. * reflects the state of the interrupt signal even if the corresponding EIMR
  875. * field is cleared.
  876. *
  877. * Values:
  878. * - 0 - The corresponding interrupt source is masked.
  879. * - 1 - The corresponding interrupt source is not masked.
  880. */
  881. //@{
  882. #define BP_ENET_EIMR_TXB (26U) //!< Bit position for ENET_EIMR_TXB.
  883. #define BM_ENET_EIMR_TXB (0x04000000U) //!< Bit mask for ENET_EIMR_TXB.
  884. #define BS_ENET_EIMR_TXB (1U) //!< Bit field size in bits for ENET_EIMR_TXB.
  885. #ifndef __LANGUAGE_ASM__
  886. //! @brief Read current value of the ENET_EIMR_TXB field.
  887. #define BR_ENET_EIMR_TXB(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_TXB))
  888. #endif
  889. //! @brief Format value for bitfield ENET_EIMR_TXB.
  890. #define BF_ENET_EIMR_TXB(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_TXB), uint32_t) & BM_ENET_EIMR_TXB)
  891. #ifndef __LANGUAGE_ASM__
  892. //! @brief Set the TXB field to a new value.
  893. #define BW_ENET_EIMR_TXB(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_TXB) = (v))
  894. #endif
  895. //@}
  896. /*!
  897. * @name Register ENET_EIMR, field TXF[27] (RW)
  898. *
  899. * Corresponds to interrupt source EIR[TXF] and determines whether an interrupt
  900. * condition can generate an interrupt. At every module clock, the EIR samples
  901. * the signal generated by the interrupting source. The corresponding EIR TXF field
  902. * reflects the state of the interrupt signal even if the corresponding EIMR
  903. * field is cleared.
  904. *
  905. * Values:
  906. * - 0 - The corresponding interrupt source is masked.
  907. * - 1 - The corresponding interrupt source is not masked.
  908. */
  909. //@{
  910. #define BP_ENET_EIMR_TXF (27U) //!< Bit position for ENET_EIMR_TXF.
  911. #define BM_ENET_EIMR_TXF (0x08000000U) //!< Bit mask for ENET_EIMR_TXF.
  912. #define BS_ENET_EIMR_TXF (1U) //!< Bit field size in bits for ENET_EIMR_TXF.
  913. #ifndef __LANGUAGE_ASM__
  914. //! @brief Read current value of the ENET_EIMR_TXF field.
  915. #define BR_ENET_EIMR_TXF(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_TXF))
  916. #endif
  917. //! @brief Format value for bitfield ENET_EIMR_TXF.
  918. #define BF_ENET_EIMR_TXF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_TXF), uint32_t) & BM_ENET_EIMR_TXF)
  919. #ifndef __LANGUAGE_ASM__
  920. //! @brief Set the TXF field to a new value.
  921. #define BW_ENET_EIMR_TXF(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_TXF) = (v))
  922. #endif
  923. //@}
  924. /*!
  925. * @name Register ENET_EIMR, field GRA[28] (RW)
  926. *
  927. * Corresponds to interrupt source EIR[GRA] and determines whether an interrupt
  928. * condition can generate an interrupt. At every module clock, the EIR samples
  929. * the signal generated by the interrupting source. The corresponding EIR GRA field
  930. * reflects the state of the interrupt signal even if the corresponding EIMR
  931. * field is cleared.
  932. *
  933. * Values:
  934. * - 0 - The corresponding interrupt source is masked.
  935. * - 1 - The corresponding interrupt source is not masked.
  936. */
  937. //@{
  938. #define BP_ENET_EIMR_GRA (28U) //!< Bit position for ENET_EIMR_GRA.
  939. #define BM_ENET_EIMR_GRA (0x10000000U) //!< Bit mask for ENET_EIMR_GRA.
  940. #define BS_ENET_EIMR_GRA (1U) //!< Bit field size in bits for ENET_EIMR_GRA.
  941. #ifndef __LANGUAGE_ASM__
  942. //! @brief Read current value of the ENET_EIMR_GRA field.
  943. #define BR_ENET_EIMR_GRA(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_GRA))
  944. #endif
  945. //! @brief Format value for bitfield ENET_EIMR_GRA.
  946. #define BF_ENET_EIMR_GRA(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_GRA), uint32_t) & BM_ENET_EIMR_GRA)
  947. #ifndef __LANGUAGE_ASM__
  948. //! @brief Set the GRA field to a new value.
  949. #define BW_ENET_EIMR_GRA(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_GRA) = (v))
  950. #endif
  951. //@}
  952. /*!
  953. * @name Register ENET_EIMR, field BABT[29] (RW)
  954. *
  955. * Corresponds to interrupt source EIR[BABT] and determines whether an interrupt
  956. * condition can generate an interrupt. At every module clock, the EIR samples
  957. * the signal generated by the interrupting source. The corresponding EIR BABT
  958. * field reflects the state of the interrupt signal even if the corresponding EIMR
  959. * field is cleared.
  960. *
  961. * Values:
  962. * - 0 - The corresponding interrupt source is masked.
  963. * - 1 - The corresponding interrupt source is not masked.
  964. */
  965. //@{
  966. #define BP_ENET_EIMR_BABT (29U) //!< Bit position for ENET_EIMR_BABT.
  967. #define BM_ENET_EIMR_BABT (0x20000000U) //!< Bit mask for ENET_EIMR_BABT.
  968. #define BS_ENET_EIMR_BABT (1U) //!< Bit field size in bits for ENET_EIMR_BABT.
  969. #ifndef __LANGUAGE_ASM__
  970. //! @brief Read current value of the ENET_EIMR_BABT field.
  971. #define BR_ENET_EIMR_BABT(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_BABT))
  972. #endif
  973. //! @brief Format value for bitfield ENET_EIMR_BABT.
  974. #define BF_ENET_EIMR_BABT(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_BABT), uint32_t) & BM_ENET_EIMR_BABT)
  975. #ifndef __LANGUAGE_ASM__
  976. //! @brief Set the BABT field to a new value.
  977. #define BW_ENET_EIMR_BABT(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_BABT) = (v))
  978. #endif
  979. //@}
  980. /*!
  981. * @name Register ENET_EIMR, field BABR[30] (RW)
  982. *
  983. * Corresponds to interrupt source EIR[BABR] and determines whether an interrupt
  984. * condition can generate an interrupt. At every module clock, the EIR samples
  985. * the signal generated by the interrupting source. The corresponding EIR BABR
  986. * field reflects the state of the interrupt signal even if the corresponding EIMR
  987. * field is cleared.
  988. *
  989. * Values:
  990. * - 0 - The corresponding interrupt source is masked.
  991. * - 1 - The corresponding interrupt source is not masked.
  992. */
  993. //@{
  994. #define BP_ENET_EIMR_BABR (30U) //!< Bit position for ENET_EIMR_BABR.
  995. #define BM_ENET_EIMR_BABR (0x40000000U) //!< Bit mask for ENET_EIMR_BABR.
  996. #define BS_ENET_EIMR_BABR (1U) //!< Bit field size in bits for ENET_EIMR_BABR.
  997. #ifndef __LANGUAGE_ASM__
  998. //! @brief Read current value of the ENET_EIMR_BABR field.
  999. #define BR_ENET_EIMR_BABR(x) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_BABR))
  1000. #endif
  1001. //! @brief Format value for bitfield ENET_EIMR_BABR.
  1002. #define BF_ENET_EIMR_BABR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_EIMR_BABR), uint32_t) & BM_ENET_EIMR_BABR)
  1003. #ifndef __LANGUAGE_ASM__
  1004. //! @brief Set the BABR field to a new value.
  1005. #define BW_ENET_EIMR_BABR(x, v) (BITBAND_ACCESS32(HW_ENET_EIMR_ADDR(x), BP_ENET_EIMR_BABR) = (v))
  1006. #endif
  1007. //@}
  1008. //-------------------------------------------------------------------------------------------
  1009. // HW_ENET_RDAR - Receive Descriptor Active Register
  1010. //-------------------------------------------------------------------------------------------
  1011. #ifndef __LANGUAGE_ASM__
  1012. /*!
  1013. * @brief HW_ENET_RDAR - Receive Descriptor Active Register (RW)
  1014. *
  1015. * Reset value: 0x00000000U
  1016. *
  1017. * RDAR is a command register, written by the user, to indicate that the receive
  1018. * descriptor ring has been updated, that is, that the driver produced empty
  1019. * receive buffers with the empty bit set.
  1020. */
  1021. typedef union _hw_enet_rdar
  1022. {
  1023. uint32_t U;
  1024. struct _hw_enet_rdar_bitfields
  1025. {
  1026. uint32_t RESERVED0 : 24; //!< [23:0]
  1027. uint32_t RDAR : 1; //!< [24] Receive Descriptor Active
  1028. uint32_t RESERVED1 : 7; //!< [31:25]
  1029. } B;
  1030. } hw_enet_rdar_t;
  1031. #endif
  1032. /*!
  1033. * @name Constants and macros for entire ENET_RDAR register
  1034. */
  1035. //@{
  1036. #define HW_ENET_RDAR_ADDR(x) (REGS_ENET_BASE(x) + 0x10U)
  1037. #ifndef __LANGUAGE_ASM__
  1038. #define HW_ENET_RDAR(x) (*(__IO hw_enet_rdar_t *) HW_ENET_RDAR_ADDR(x))
  1039. #define HW_ENET_RDAR_RD(x) (HW_ENET_RDAR(x).U)
  1040. #define HW_ENET_RDAR_WR(x, v) (HW_ENET_RDAR(x).U = (v))
  1041. #define HW_ENET_RDAR_SET(x, v) (HW_ENET_RDAR_WR(x, HW_ENET_RDAR_RD(x) | (v)))
  1042. #define HW_ENET_RDAR_CLR(x, v) (HW_ENET_RDAR_WR(x, HW_ENET_RDAR_RD(x) & ~(v)))
  1043. #define HW_ENET_RDAR_TOG(x, v) (HW_ENET_RDAR_WR(x, HW_ENET_RDAR_RD(x) ^ (v)))
  1044. #endif
  1045. //@}
  1046. /*
  1047. * Constants & macros for individual ENET_RDAR bitfields
  1048. */
  1049. /*!
  1050. * @name Register ENET_RDAR, field RDAR[24] (RW)
  1051. *
  1052. * Always set to 1 when this register is written, regardless of the value
  1053. * written. This field is cleared by the MAC device when no additional empty
  1054. * descriptors remain in the receive ring. It is also cleared when ECR[ETHEREN] transitions
  1055. * from set to cleared or when ECR[RESET] is set.
  1056. */
  1057. //@{
  1058. #define BP_ENET_RDAR_RDAR (24U) //!< Bit position for ENET_RDAR_RDAR.
  1059. #define BM_ENET_RDAR_RDAR (0x01000000U) //!< Bit mask for ENET_RDAR_RDAR.
  1060. #define BS_ENET_RDAR_RDAR (1U) //!< Bit field size in bits for ENET_RDAR_RDAR.
  1061. #ifndef __LANGUAGE_ASM__
  1062. //! @brief Read current value of the ENET_RDAR_RDAR field.
  1063. #define BR_ENET_RDAR_RDAR(x) (BITBAND_ACCESS32(HW_ENET_RDAR_ADDR(x), BP_ENET_RDAR_RDAR))
  1064. #endif
  1065. //! @brief Format value for bitfield ENET_RDAR_RDAR.
  1066. #define BF_ENET_RDAR_RDAR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RDAR_RDAR), uint32_t) & BM_ENET_RDAR_RDAR)
  1067. #ifndef __LANGUAGE_ASM__
  1068. //! @brief Set the RDAR field to a new value.
  1069. #define BW_ENET_RDAR_RDAR(x, v) (BITBAND_ACCESS32(HW_ENET_RDAR_ADDR(x), BP_ENET_RDAR_RDAR) = (v))
  1070. #endif
  1071. //@}
  1072. //-------------------------------------------------------------------------------------------
  1073. // HW_ENET_TDAR - Transmit Descriptor Active Register
  1074. //-------------------------------------------------------------------------------------------
  1075. #ifndef __LANGUAGE_ASM__
  1076. /*!
  1077. * @brief HW_ENET_TDAR - Transmit Descriptor Active Register (RW)
  1078. *
  1079. * Reset value: 0x00000000U
  1080. *
  1081. * The TDAR is a command register that the user writes to indicate that the
  1082. * transmit descriptor ring has been updated, that is, that transmit buffers have
  1083. * been produced by the driver with the ready bit set in the buffer descriptor. The
  1084. * TDAR register is cleared at reset, when ECR[ETHEREN] transitions from set to
  1085. * cleared, or when ECR[RESET] is set.
  1086. */
  1087. typedef union _hw_enet_tdar
  1088. {
  1089. uint32_t U;
  1090. struct _hw_enet_tdar_bitfields
  1091. {
  1092. uint32_t RESERVED0 : 24; //!< [23:0]
  1093. uint32_t TDAR : 1; //!< [24] Transmit Descriptor Active
  1094. uint32_t RESERVED1 : 7; //!< [31:25]
  1095. } B;
  1096. } hw_enet_tdar_t;
  1097. #endif
  1098. /*!
  1099. * @name Constants and macros for entire ENET_TDAR register
  1100. */
  1101. //@{
  1102. #define HW_ENET_TDAR_ADDR(x) (REGS_ENET_BASE(x) + 0x14U)
  1103. #ifndef __LANGUAGE_ASM__
  1104. #define HW_ENET_TDAR(x) (*(__IO hw_enet_tdar_t *) HW_ENET_TDAR_ADDR(x))
  1105. #define HW_ENET_TDAR_RD(x) (HW_ENET_TDAR(x).U)
  1106. #define HW_ENET_TDAR_WR(x, v) (HW_ENET_TDAR(x).U = (v))
  1107. #define HW_ENET_TDAR_SET(x, v) (HW_ENET_TDAR_WR(x, HW_ENET_TDAR_RD(x) | (v)))
  1108. #define HW_ENET_TDAR_CLR(x, v) (HW_ENET_TDAR_WR(x, HW_ENET_TDAR_RD(x) & ~(v)))
  1109. #define HW_ENET_TDAR_TOG(x, v) (HW_ENET_TDAR_WR(x, HW_ENET_TDAR_RD(x) ^ (v)))
  1110. #endif
  1111. //@}
  1112. /*
  1113. * Constants & macros for individual ENET_TDAR bitfields
  1114. */
  1115. /*!
  1116. * @name Register ENET_TDAR, field TDAR[24] (RW)
  1117. *
  1118. * Always set to 1 when this register is written, regardless of the value
  1119. * written. This bit is cleared by the MAC device when no additional ready descriptors
  1120. * remain in the transmit ring. Also cleared when ECR[ETHEREN] transitions from
  1121. * set to cleared or when ECR[RESET] is set.
  1122. */
  1123. //@{
  1124. #define BP_ENET_TDAR_TDAR (24U) //!< Bit position for ENET_TDAR_TDAR.
  1125. #define BM_ENET_TDAR_TDAR (0x01000000U) //!< Bit mask for ENET_TDAR_TDAR.
  1126. #define BS_ENET_TDAR_TDAR (1U) //!< Bit field size in bits for ENET_TDAR_TDAR.
  1127. #ifndef __LANGUAGE_ASM__
  1128. //! @brief Read current value of the ENET_TDAR_TDAR field.
  1129. #define BR_ENET_TDAR_TDAR(x) (BITBAND_ACCESS32(HW_ENET_TDAR_ADDR(x), BP_ENET_TDAR_TDAR))
  1130. #endif
  1131. //! @brief Format value for bitfield ENET_TDAR_TDAR.
  1132. #define BF_ENET_TDAR_TDAR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TDAR_TDAR), uint32_t) & BM_ENET_TDAR_TDAR)
  1133. #ifndef __LANGUAGE_ASM__
  1134. //! @brief Set the TDAR field to a new value.
  1135. #define BW_ENET_TDAR_TDAR(x, v) (BITBAND_ACCESS32(HW_ENET_TDAR_ADDR(x), BP_ENET_TDAR_TDAR) = (v))
  1136. #endif
  1137. //@}
  1138. //-------------------------------------------------------------------------------------------
  1139. // HW_ENET_ECR - Ethernet Control Register
  1140. //-------------------------------------------------------------------------------------------
  1141. #ifndef __LANGUAGE_ASM__
  1142. /*!
  1143. * @brief HW_ENET_ECR - Ethernet Control Register (RW)
  1144. *
  1145. * Reset value: 0xF0000000U
  1146. *
  1147. * ECR is a read/write user register, though hardware may also alter fields in
  1148. * this register. It controls many of the high level features of the Ethernet MAC,
  1149. * including legacy FEC support through the EN1588 field.
  1150. */
  1151. typedef union _hw_enet_ecr
  1152. {
  1153. uint32_t U;
  1154. struct _hw_enet_ecr_bitfields
  1155. {
  1156. uint32_t RESET : 1; //!< [0] Ethernet MAC Reset
  1157. uint32_t ETHEREN : 1; //!< [1] Ethernet Enable
  1158. uint32_t MAGICEN : 1; //!< [2] Magic Packet Detection Enable
  1159. uint32_t SLEEP : 1; //!< [3] Sleep Mode Enable
  1160. uint32_t EN1588 : 1; //!< [4] EN1588 Enable
  1161. uint32_t RESERVED0 : 1; //!< [5]
  1162. uint32_t DBGEN : 1; //!< [6] Debug Enable
  1163. uint32_t STOPEN : 1; //!< [7] STOPEN Signal Control
  1164. uint32_t DBSWP : 1; //!< [8] Descriptor Byte Swapping Enable
  1165. uint32_t RESERVED1 : 23; //!< [31:9]
  1166. } B;
  1167. } hw_enet_ecr_t;
  1168. #endif
  1169. /*!
  1170. * @name Constants and macros for entire ENET_ECR register
  1171. */
  1172. //@{
  1173. #define HW_ENET_ECR_ADDR(x) (REGS_ENET_BASE(x) + 0x24U)
  1174. #ifndef __LANGUAGE_ASM__
  1175. #define HW_ENET_ECR(x) (*(__IO hw_enet_ecr_t *) HW_ENET_ECR_ADDR(x))
  1176. #define HW_ENET_ECR_RD(x) (HW_ENET_ECR(x).U)
  1177. #define HW_ENET_ECR_WR(x, v) (HW_ENET_ECR(x).U = (v))
  1178. #define HW_ENET_ECR_SET(x, v) (HW_ENET_ECR_WR(x, HW_ENET_ECR_RD(x) | (v)))
  1179. #define HW_ENET_ECR_CLR(x, v) (HW_ENET_ECR_WR(x, HW_ENET_ECR_RD(x) & ~(v)))
  1180. #define HW_ENET_ECR_TOG(x, v) (HW_ENET_ECR_WR(x, HW_ENET_ECR_RD(x) ^ (v)))
  1181. #endif
  1182. //@}
  1183. /*
  1184. * Constants & macros for individual ENET_ECR bitfields
  1185. */
  1186. /*!
  1187. * @name Register ENET_ECR, field RESET[0] (RW)
  1188. *
  1189. * When this field is set, it clears the ETHEREN field.
  1190. */
  1191. //@{
  1192. #define BP_ENET_ECR_RESET (0U) //!< Bit position for ENET_ECR_RESET.
  1193. #define BM_ENET_ECR_RESET (0x00000001U) //!< Bit mask for ENET_ECR_RESET.
  1194. #define BS_ENET_ECR_RESET (1U) //!< Bit field size in bits for ENET_ECR_RESET.
  1195. #ifndef __LANGUAGE_ASM__
  1196. //! @brief Read current value of the ENET_ECR_RESET field.
  1197. #define BR_ENET_ECR_RESET(x) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_RESET))
  1198. #endif
  1199. //! @brief Format value for bitfield ENET_ECR_RESET.
  1200. #define BF_ENET_ECR_RESET(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ECR_RESET), uint32_t) & BM_ENET_ECR_RESET)
  1201. #ifndef __LANGUAGE_ASM__
  1202. //! @brief Set the RESET field to a new value.
  1203. #define BW_ENET_ECR_RESET(x, v) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_RESET) = (v))
  1204. #endif
  1205. //@}
  1206. /*!
  1207. * @name Register ENET_ECR, field ETHEREN[1] (RW)
  1208. *
  1209. * Enables/disables the Ethernet MAC. When the MAC is disabled, the buffer
  1210. * descriptors for an aborted transmit frame are not updated. The uDMA, buffer
  1211. * descriptor, and FIFO control logic are reset, including the buffer descriptor and
  1212. * FIFO pointers. Hardware clears this field under the following conditions: RESET
  1213. * is set by software An error condition causes the EBERR field to set. ETHEREN
  1214. * must be set at the very last step during ENET
  1215. * configuration/setup/initialization, only after all other ENET-related registers have been configured. If ETHEREN
  1216. * is cleared to 0 by software then then next time ETHEREN is set, the EIR
  1217. * interrupts must cleared to 0 due to previous pending interrupts.
  1218. *
  1219. * Values:
  1220. * - 0 - Reception immediately stops and transmission stops after a bad CRC is
  1221. * appended to any currently transmitted frame.
  1222. * - 1 - MAC is enabled, and reception and transmission are possible.
  1223. */
  1224. //@{
  1225. #define BP_ENET_ECR_ETHEREN (1U) //!< Bit position for ENET_ECR_ETHEREN.
  1226. #define BM_ENET_ECR_ETHEREN (0x00000002U) //!< Bit mask for ENET_ECR_ETHEREN.
  1227. #define BS_ENET_ECR_ETHEREN (1U) //!< Bit field size in bits for ENET_ECR_ETHEREN.
  1228. #ifndef __LANGUAGE_ASM__
  1229. //! @brief Read current value of the ENET_ECR_ETHEREN field.
  1230. #define BR_ENET_ECR_ETHEREN(x) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_ETHEREN))
  1231. #endif
  1232. //! @brief Format value for bitfield ENET_ECR_ETHEREN.
  1233. #define BF_ENET_ECR_ETHEREN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ECR_ETHEREN), uint32_t) & BM_ENET_ECR_ETHEREN)
  1234. #ifndef __LANGUAGE_ASM__
  1235. //! @brief Set the ETHEREN field to a new value.
  1236. #define BW_ENET_ECR_ETHEREN(x, v) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_ETHEREN) = (v))
  1237. #endif
  1238. //@}
  1239. /*!
  1240. * @name Register ENET_ECR, field MAGICEN[2] (RW)
  1241. *
  1242. * Enables/disables magic packet detection. MAGICEN is relevant only if the
  1243. * SLEEP field is set. If MAGICEN is set, changing the SLEEP field enables/disables
  1244. * sleep mode and magic packet detection.
  1245. *
  1246. * Values:
  1247. * - 0 - Magic detection logic disabled.
  1248. * - 1 - The MAC core detects magic packets and asserts EIR[WAKEUP] when a frame
  1249. * is detected.
  1250. */
  1251. //@{
  1252. #define BP_ENET_ECR_MAGICEN (2U) //!< Bit position for ENET_ECR_MAGICEN.
  1253. #define BM_ENET_ECR_MAGICEN (0x00000004U) //!< Bit mask for ENET_ECR_MAGICEN.
  1254. #define BS_ENET_ECR_MAGICEN (1U) //!< Bit field size in bits for ENET_ECR_MAGICEN.
  1255. #ifndef __LANGUAGE_ASM__
  1256. //! @brief Read current value of the ENET_ECR_MAGICEN field.
  1257. #define BR_ENET_ECR_MAGICEN(x) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_MAGICEN))
  1258. #endif
  1259. //! @brief Format value for bitfield ENET_ECR_MAGICEN.
  1260. #define BF_ENET_ECR_MAGICEN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ECR_MAGICEN), uint32_t) & BM_ENET_ECR_MAGICEN)
  1261. #ifndef __LANGUAGE_ASM__
  1262. //! @brief Set the MAGICEN field to a new value.
  1263. #define BW_ENET_ECR_MAGICEN(x, v) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_MAGICEN) = (v))
  1264. #endif
  1265. //@}
  1266. /*!
  1267. * @name Register ENET_ECR, field SLEEP[3] (RW)
  1268. *
  1269. * Values:
  1270. * - 0 - Normal operating mode.
  1271. * - 1 - Sleep mode.
  1272. */
  1273. //@{
  1274. #define BP_ENET_ECR_SLEEP (3U) //!< Bit position for ENET_ECR_SLEEP.
  1275. #define BM_ENET_ECR_SLEEP (0x00000008U) //!< Bit mask for ENET_ECR_SLEEP.
  1276. #define BS_ENET_ECR_SLEEP (1U) //!< Bit field size in bits for ENET_ECR_SLEEP.
  1277. #ifndef __LANGUAGE_ASM__
  1278. //! @brief Read current value of the ENET_ECR_SLEEP field.
  1279. #define BR_ENET_ECR_SLEEP(x) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_SLEEP))
  1280. #endif
  1281. //! @brief Format value for bitfield ENET_ECR_SLEEP.
  1282. #define BF_ENET_ECR_SLEEP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ECR_SLEEP), uint32_t) & BM_ENET_ECR_SLEEP)
  1283. #ifndef __LANGUAGE_ASM__
  1284. //! @brief Set the SLEEP field to a new value.
  1285. #define BW_ENET_ECR_SLEEP(x, v) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_SLEEP) = (v))
  1286. #endif
  1287. //@}
  1288. /*!
  1289. * @name Register ENET_ECR, field EN1588[4] (RW)
  1290. *
  1291. * Enables enhanced functionality of the MAC.
  1292. *
  1293. * Values:
  1294. * - 0 - Legacy FEC buffer descriptors and functions enabled.
  1295. * - 1 - Enhanced frame time-stamping functions enabled.
  1296. */
  1297. //@{
  1298. #define BP_ENET_ECR_EN1588 (4U) //!< Bit position for ENET_ECR_EN1588.
  1299. #define BM_ENET_ECR_EN1588 (0x00000010U) //!< Bit mask for ENET_ECR_EN1588.
  1300. #define BS_ENET_ECR_EN1588 (1U) //!< Bit field size in bits for ENET_ECR_EN1588.
  1301. #ifndef __LANGUAGE_ASM__
  1302. //! @brief Read current value of the ENET_ECR_EN1588 field.
  1303. #define BR_ENET_ECR_EN1588(x) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_EN1588))
  1304. #endif
  1305. //! @brief Format value for bitfield ENET_ECR_EN1588.
  1306. #define BF_ENET_ECR_EN1588(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ECR_EN1588), uint32_t) & BM_ENET_ECR_EN1588)
  1307. #ifndef __LANGUAGE_ASM__
  1308. //! @brief Set the EN1588 field to a new value.
  1309. #define BW_ENET_ECR_EN1588(x, v) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_EN1588) = (v))
  1310. #endif
  1311. //@}
  1312. /*!
  1313. * @name Register ENET_ECR, field DBGEN[6] (RW)
  1314. *
  1315. * Enables the MAC to enter hardware freeze mode when the device enters debug
  1316. * mode.
  1317. *
  1318. * Values:
  1319. * - 0 - MAC continues operation in debug mode.
  1320. * - 1 - MAC enters hardware freeze mode when the processor is in debug mode.
  1321. */
  1322. //@{
  1323. #define BP_ENET_ECR_DBGEN (6U) //!< Bit position for ENET_ECR_DBGEN.
  1324. #define BM_ENET_ECR_DBGEN (0x00000040U) //!< Bit mask for ENET_ECR_DBGEN.
  1325. #define BS_ENET_ECR_DBGEN (1U) //!< Bit field size in bits for ENET_ECR_DBGEN.
  1326. #ifndef __LANGUAGE_ASM__
  1327. //! @brief Read current value of the ENET_ECR_DBGEN field.
  1328. #define BR_ENET_ECR_DBGEN(x) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_DBGEN))
  1329. #endif
  1330. //! @brief Format value for bitfield ENET_ECR_DBGEN.
  1331. #define BF_ENET_ECR_DBGEN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ECR_DBGEN), uint32_t) & BM_ENET_ECR_DBGEN)
  1332. #ifndef __LANGUAGE_ASM__
  1333. //! @brief Set the DBGEN field to a new value.
  1334. #define BW_ENET_ECR_DBGEN(x, v) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_DBGEN) = (v))
  1335. #endif
  1336. //@}
  1337. /*!
  1338. * @name Register ENET_ECR, field STOPEN[7] (RW)
  1339. *
  1340. * Controls device behavior in doze mode. In doze mode, if this field is set
  1341. * then all the clocks of the ENET assembly are disabled, except the RMII /MII
  1342. * clock. Doze mode is similar to a conditional stop mode entry for the ENET assembly
  1343. * depending on ECR[STOPEN]. If module clocks are gated in this mode, the module
  1344. * can still wake the system after receiving a magic packet in stop mode. MAGICEN
  1345. * must be set prior to entering sleep/stop mode.
  1346. */
  1347. //@{
  1348. #define BP_ENET_ECR_STOPEN (7U) //!< Bit position for ENET_ECR_STOPEN.
  1349. #define BM_ENET_ECR_STOPEN (0x00000080U) //!< Bit mask for ENET_ECR_STOPEN.
  1350. #define BS_ENET_ECR_STOPEN (1U) //!< Bit field size in bits for ENET_ECR_STOPEN.
  1351. #ifndef __LANGUAGE_ASM__
  1352. //! @brief Read current value of the ENET_ECR_STOPEN field.
  1353. #define BR_ENET_ECR_STOPEN(x) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_STOPEN))
  1354. #endif
  1355. //! @brief Format value for bitfield ENET_ECR_STOPEN.
  1356. #define BF_ENET_ECR_STOPEN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ECR_STOPEN), uint32_t) & BM_ENET_ECR_STOPEN)
  1357. #ifndef __LANGUAGE_ASM__
  1358. //! @brief Set the STOPEN field to a new value.
  1359. #define BW_ENET_ECR_STOPEN(x, v) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_STOPEN) = (v))
  1360. #endif
  1361. //@}
  1362. /*!
  1363. * @name Register ENET_ECR, field DBSWP[8] (RW)
  1364. *
  1365. * Swaps the byte locations of the buffer descriptors. This field must be
  1366. * written to 1 after reset.
  1367. *
  1368. * Values:
  1369. * - 0 - The buffer descriptor bytes are not swapped to support big-endian
  1370. * devices.
  1371. * - 1 - The buffer descriptor bytes are swapped to support little-endian
  1372. * devices.
  1373. */
  1374. //@{
  1375. #define BP_ENET_ECR_DBSWP (8U) //!< Bit position for ENET_ECR_DBSWP.
  1376. #define BM_ENET_ECR_DBSWP (0x00000100U) //!< Bit mask for ENET_ECR_DBSWP.
  1377. #define BS_ENET_ECR_DBSWP (1U) //!< Bit field size in bits for ENET_ECR_DBSWP.
  1378. #ifndef __LANGUAGE_ASM__
  1379. //! @brief Read current value of the ENET_ECR_DBSWP field.
  1380. #define BR_ENET_ECR_DBSWP(x) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_DBSWP))
  1381. #endif
  1382. //! @brief Format value for bitfield ENET_ECR_DBSWP.
  1383. #define BF_ENET_ECR_DBSWP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ECR_DBSWP), uint32_t) & BM_ENET_ECR_DBSWP)
  1384. #ifndef __LANGUAGE_ASM__
  1385. //! @brief Set the DBSWP field to a new value.
  1386. #define BW_ENET_ECR_DBSWP(x, v) (BITBAND_ACCESS32(HW_ENET_ECR_ADDR(x), BP_ENET_ECR_DBSWP) = (v))
  1387. #endif
  1388. //@}
  1389. //-------------------------------------------------------------------------------------------
  1390. // HW_ENET_MMFR - MII Management Frame Register
  1391. //-------------------------------------------------------------------------------------------
  1392. #ifndef __LANGUAGE_ASM__
  1393. /*!
  1394. * @brief HW_ENET_MMFR - MII Management Frame Register (RW)
  1395. *
  1396. * Reset value: 0x00000000U
  1397. *
  1398. * Writing to MMFR triggers a management frame transaction to the PHY device
  1399. * unless MSCR is programmed to zero. If MSCR is changed from zero to non-zero
  1400. * during a write to MMFR, an MII frame is generated with the data previously written
  1401. * to the MMFR. This allows MMFR and MSCR to be programmed in either order if
  1402. * MSCR is currently zero. If the MMFR register is written while frame generation is
  1403. * in progress, the frame contents are altered. Software must use the EIR[MII]
  1404. * interrupt indication to avoid writing to the MMFR register while frame
  1405. * generation is in progress.
  1406. */
  1407. typedef union _hw_enet_mmfr
  1408. {
  1409. uint32_t U;
  1410. struct _hw_enet_mmfr_bitfields
  1411. {
  1412. uint32_t DATA : 16; //!< [15:0] Management Frame Data
  1413. uint32_t TA : 2; //!< [17:16] Turn Around
  1414. uint32_t RA : 5; //!< [22:18] Register Address
  1415. uint32_t PA : 5; //!< [27:23] PHY Address
  1416. uint32_t OP : 2; //!< [29:28] Operation Code
  1417. uint32_t ST : 2; //!< [31:30] Start Of Frame Delimiter
  1418. } B;
  1419. } hw_enet_mmfr_t;
  1420. #endif
  1421. /*!
  1422. * @name Constants and macros for entire ENET_MMFR register
  1423. */
  1424. //@{
  1425. #define HW_ENET_MMFR_ADDR(x) (REGS_ENET_BASE(x) + 0x40U)
  1426. #ifndef __LANGUAGE_ASM__
  1427. #define HW_ENET_MMFR(x) (*(__IO hw_enet_mmfr_t *) HW_ENET_MMFR_ADDR(x))
  1428. #define HW_ENET_MMFR_RD(x) (HW_ENET_MMFR(x).U)
  1429. #define HW_ENET_MMFR_WR(x, v) (HW_ENET_MMFR(x).U = (v))
  1430. #define HW_ENET_MMFR_SET(x, v) (HW_ENET_MMFR_WR(x, HW_ENET_MMFR_RD(x) | (v)))
  1431. #define HW_ENET_MMFR_CLR(x, v) (HW_ENET_MMFR_WR(x, HW_ENET_MMFR_RD(x) & ~(v)))
  1432. #define HW_ENET_MMFR_TOG(x, v) (HW_ENET_MMFR_WR(x, HW_ENET_MMFR_RD(x) ^ (v)))
  1433. #endif
  1434. //@}
  1435. /*
  1436. * Constants & macros for individual ENET_MMFR bitfields
  1437. */
  1438. /*!
  1439. * @name Register ENET_MMFR, field DATA[15:0] (RW)
  1440. *
  1441. * This is the field for data to be written to or read from the PHY register.
  1442. */
  1443. //@{
  1444. #define BP_ENET_MMFR_DATA (0U) //!< Bit position for ENET_MMFR_DATA.
  1445. #define BM_ENET_MMFR_DATA (0x0000FFFFU) //!< Bit mask for ENET_MMFR_DATA.
  1446. #define BS_ENET_MMFR_DATA (16U) //!< Bit field size in bits for ENET_MMFR_DATA.
  1447. #ifndef __LANGUAGE_ASM__
  1448. //! @brief Read current value of the ENET_MMFR_DATA field.
  1449. #define BR_ENET_MMFR_DATA(x) (HW_ENET_MMFR(x).B.DATA)
  1450. #endif
  1451. //! @brief Format value for bitfield ENET_MMFR_DATA.
  1452. #define BF_ENET_MMFR_DATA(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MMFR_DATA), uint32_t) & BM_ENET_MMFR_DATA)
  1453. #ifndef __LANGUAGE_ASM__
  1454. //! @brief Set the DATA field to a new value.
  1455. #define BW_ENET_MMFR_DATA(x, v) (HW_ENET_MMFR_WR(x, (HW_ENET_MMFR_RD(x) & ~BM_ENET_MMFR_DATA) | BF_ENET_MMFR_DATA(v)))
  1456. #endif
  1457. //@}
  1458. /*!
  1459. * @name Register ENET_MMFR, field TA[17:16] (RW)
  1460. *
  1461. * This field must be programmed to 10 to generate a valid MII management frame.
  1462. */
  1463. //@{
  1464. #define BP_ENET_MMFR_TA (16U) //!< Bit position for ENET_MMFR_TA.
  1465. #define BM_ENET_MMFR_TA (0x00030000U) //!< Bit mask for ENET_MMFR_TA.
  1466. #define BS_ENET_MMFR_TA (2U) //!< Bit field size in bits for ENET_MMFR_TA.
  1467. #ifndef __LANGUAGE_ASM__
  1468. //! @brief Read current value of the ENET_MMFR_TA field.
  1469. #define BR_ENET_MMFR_TA(x) (HW_ENET_MMFR(x).B.TA)
  1470. #endif
  1471. //! @brief Format value for bitfield ENET_MMFR_TA.
  1472. #define BF_ENET_MMFR_TA(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MMFR_TA), uint32_t) & BM_ENET_MMFR_TA)
  1473. #ifndef __LANGUAGE_ASM__
  1474. //! @brief Set the TA field to a new value.
  1475. #define BW_ENET_MMFR_TA(x, v) (HW_ENET_MMFR_WR(x, (HW_ENET_MMFR_RD(x) & ~BM_ENET_MMFR_TA) | BF_ENET_MMFR_TA(v)))
  1476. #endif
  1477. //@}
  1478. /*!
  1479. * @name Register ENET_MMFR, field RA[22:18] (RW)
  1480. *
  1481. * Specifies one of up to 32 registers within the specified PHY device.
  1482. */
  1483. //@{
  1484. #define BP_ENET_MMFR_RA (18U) //!< Bit position for ENET_MMFR_RA.
  1485. #define BM_ENET_MMFR_RA (0x007C0000U) //!< Bit mask for ENET_MMFR_RA.
  1486. #define BS_ENET_MMFR_RA (5U) //!< Bit field size in bits for ENET_MMFR_RA.
  1487. #ifndef __LANGUAGE_ASM__
  1488. //! @brief Read current value of the ENET_MMFR_RA field.
  1489. #define BR_ENET_MMFR_RA(x) (HW_ENET_MMFR(x).B.RA)
  1490. #endif
  1491. //! @brief Format value for bitfield ENET_MMFR_RA.
  1492. #define BF_ENET_MMFR_RA(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MMFR_RA), uint32_t) & BM_ENET_MMFR_RA)
  1493. #ifndef __LANGUAGE_ASM__
  1494. //! @brief Set the RA field to a new value.
  1495. #define BW_ENET_MMFR_RA(x, v) (HW_ENET_MMFR_WR(x, (HW_ENET_MMFR_RD(x) & ~BM_ENET_MMFR_RA) | BF_ENET_MMFR_RA(v)))
  1496. #endif
  1497. //@}
  1498. /*!
  1499. * @name Register ENET_MMFR, field PA[27:23] (RW)
  1500. *
  1501. * Specifies one of up to 32 attached PHY devices.
  1502. */
  1503. //@{
  1504. #define BP_ENET_MMFR_PA (23U) //!< Bit position for ENET_MMFR_PA.
  1505. #define BM_ENET_MMFR_PA (0x0F800000U) //!< Bit mask for ENET_MMFR_PA.
  1506. #define BS_ENET_MMFR_PA (5U) //!< Bit field size in bits for ENET_MMFR_PA.
  1507. #ifndef __LANGUAGE_ASM__
  1508. //! @brief Read current value of the ENET_MMFR_PA field.
  1509. #define BR_ENET_MMFR_PA(x) (HW_ENET_MMFR(x).B.PA)
  1510. #endif
  1511. //! @brief Format value for bitfield ENET_MMFR_PA.
  1512. #define BF_ENET_MMFR_PA(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MMFR_PA), uint32_t) & BM_ENET_MMFR_PA)
  1513. #ifndef __LANGUAGE_ASM__
  1514. //! @brief Set the PA field to a new value.
  1515. #define BW_ENET_MMFR_PA(x, v) (HW_ENET_MMFR_WR(x, (HW_ENET_MMFR_RD(x) & ~BM_ENET_MMFR_PA) | BF_ENET_MMFR_PA(v)))
  1516. #endif
  1517. //@}
  1518. /*!
  1519. * @name Register ENET_MMFR, field OP[29:28] (RW)
  1520. *
  1521. * Determines the frame operation.
  1522. *
  1523. * Values:
  1524. * - 00 - Write frame operation, but not MII compliant.
  1525. * - 01 - Write frame operation for a valid MII management frame.
  1526. * - 10 - Read frame operation for a valid MII management frame.
  1527. * - 11 - Read frame operation, but not MII compliant.
  1528. */
  1529. //@{
  1530. #define BP_ENET_MMFR_OP (28U) //!< Bit position for ENET_MMFR_OP.
  1531. #define BM_ENET_MMFR_OP (0x30000000U) //!< Bit mask for ENET_MMFR_OP.
  1532. #define BS_ENET_MMFR_OP (2U) //!< Bit field size in bits for ENET_MMFR_OP.
  1533. #ifndef __LANGUAGE_ASM__
  1534. //! @brief Read current value of the ENET_MMFR_OP field.
  1535. #define BR_ENET_MMFR_OP(x) (HW_ENET_MMFR(x).B.OP)
  1536. #endif
  1537. //! @brief Format value for bitfield ENET_MMFR_OP.
  1538. #define BF_ENET_MMFR_OP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MMFR_OP), uint32_t) & BM_ENET_MMFR_OP)
  1539. #ifndef __LANGUAGE_ASM__
  1540. //! @brief Set the OP field to a new value.
  1541. #define BW_ENET_MMFR_OP(x, v) (HW_ENET_MMFR_WR(x, (HW_ENET_MMFR_RD(x) & ~BM_ENET_MMFR_OP) | BF_ENET_MMFR_OP(v)))
  1542. #endif
  1543. //@}
  1544. /*!
  1545. * @name Register ENET_MMFR, field ST[31:30] (RW)
  1546. *
  1547. * These fields must be programmed to 01 for a valid MII management frame.
  1548. */
  1549. //@{
  1550. #define BP_ENET_MMFR_ST (30U) //!< Bit position for ENET_MMFR_ST.
  1551. #define BM_ENET_MMFR_ST (0xC0000000U) //!< Bit mask for ENET_MMFR_ST.
  1552. #define BS_ENET_MMFR_ST (2U) //!< Bit field size in bits for ENET_MMFR_ST.
  1553. #ifndef __LANGUAGE_ASM__
  1554. //! @brief Read current value of the ENET_MMFR_ST field.
  1555. #define BR_ENET_MMFR_ST(x) (HW_ENET_MMFR(x).B.ST)
  1556. #endif
  1557. //! @brief Format value for bitfield ENET_MMFR_ST.
  1558. #define BF_ENET_MMFR_ST(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MMFR_ST), uint32_t) & BM_ENET_MMFR_ST)
  1559. #ifndef __LANGUAGE_ASM__
  1560. //! @brief Set the ST field to a new value.
  1561. #define BW_ENET_MMFR_ST(x, v) (HW_ENET_MMFR_WR(x, (HW_ENET_MMFR_RD(x) & ~BM_ENET_MMFR_ST) | BF_ENET_MMFR_ST(v)))
  1562. #endif
  1563. //@}
  1564. //-------------------------------------------------------------------------------------------
  1565. // HW_ENET_MSCR - MII Speed Control Register
  1566. //-------------------------------------------------------------------------------------------
  1567. #ifndef __LANGUAGE_ASM__
  1568. /*!
  1569. * @brief HW_ENET_MSCR - MII Speed Control Register (RW)
  1570. *
  1571. * Reset value: 0x00000000U
  1572. *
  1573. * MSCR provides control of the MII clock (MDC pin) frequency and allows a
  1574. * preamble drop on the MII management frame. The MII_SPEED field must be programmed
  1575. * with a value to provide an MDC frequency of less than or equal to 2.5 MHz to be
  1576. * compliant with the IEEE 802.3 MII specification. The MII_SPEED must be set to
  1577. * a non-zero value to source a read or write management frame. After the
  1578. * management frame is complete, the MSCR register may optionally be cleared to turn
  1579. * off MDC. The MDC signal generated has a 50% duty cycle except when MII_SPEED
  1580. * changes during operation. This change takes effect following a rising or falling
  1581. * edge of MDC. If the internal module clock is 25 MHz, programming this register
  1582. * to 0x0000_0004 results in an MDC as stated in the following equation: 25 MHz
  1583. * / ((4 + 1) x 2) = 2.5 MHz The following table shows the optimum values for
  1584. * MII_SPEED as a function of internal module clock frequency. Programming Examples
  1585. * for MSCR Internal MAC clock frequency MSCR [MII_SPEED] MDC frequency 25 MHz
  1586. * 0x4 2.50 MHz 33 MHz 0x6 2.36 MHz 40 MHz 0x7 2.50 MHz 50 MHz 0x9 2.50 MHz 66 MHz
  1587. * 0xD 2.36 MHz
  1588. */
  1589. typedef union _hw_enet_mscr
  1590. {
  1591. uint32_t U;
  1592. struct _hw_enet_mscr_bitfields
  1593. {
  1594. uint32_t RESERVED0 : 1; //!< [0]
  1595. uint32_t MII_SPEED : 6; //!< [6:1] MII Speed
  1596. uint32_t DIS_PRE : 1; //!< [7] Disable Preamble
  1597. uint32_t HOLDTIME : 3; //!< [10:8] Hold time On MDIO Output
  1598. uint32_t RESERVED1 : 21; //!< [31:11]
  1599. } B;
  1600. } hw_enet_mscr_t;
  1601. #endif
  1602. /*!
  1603. * @name Constants and macros for entire ENET_MSCR register
  1604. */
  1605. //@{
  1606. #define HW_ENET_MSCR_ADDR(x) (REGS_ENET_BASE(x) + 0x44U)
  1607. #ifndef __LANGUAGE_ASM__
  1608. #define HW_ENET_MSCR(x) (*(__IO hw_enet_mscr_t *) HW_ENET_MSCR_ADDR(x))
  1609. #define HW_ENET_MSCR_RD(x) (HW_ENET_MSCR(x).U)
  1610. #define HW_ENET_MSCR_WR(x, v) (HW_ENET_MSCR(x).U = (v))
  1611. #define HW_ENET_MSCR_SET(x, v) (HW_ENET_MSCR_WR(x, HW_ENET_MSCR_RD(x) | (v)))
  1612. #define HW_ENET_MSCR_CLR(x, v) (HW_ENET_MSCR_WR(x, HW_ENET_MSCR_RD(x) & ~(v)))
  1613. #define HW_ENET_MSCR_TOG(x, v) (HW_ENET_MSCR_WR(x, HW_ENET_MSCR_RD(x) ^ (v)))
  1614. #endif
  1615. //@}
  1616. /*
  1617. * Constants & macros for individual ENET_MSCR bitfields
  1618. */
  1619. /*!
  1620. * @name Register ENET_MSCR, field MII_SPEED[6:1] (RW)
  1621. *
  1622. * Controls the frequency of the MII management interface clock (MDC) relative
  1623. * to the internal module clock. A value of 0 in this field turns off MDC and
  1624. * leaves it in low voltage state. Any non-zero value results in the MDC frequency
  1625. * of: 1/((MII_SPEED + 1) x 2) of the internal module clock frequency
  1626. */
  1627. //@{
  1628. #define BP_ENET_MSCR_MII_SPEED (1U) //!< Bit position for ENET_MSCR_MII_SPEED.
  1629. #define BM_ENET_MSCR_MII_SPEED (0x0000007EU) //!< Bit mask for ENET_MSCR_MII_SPEED.
  1630. #define BS_ENET_MSCR_MII_SPEED (6U) //!< Bit field size in bits for ENET_MSCR_MII_SPEED.
  1631. #ifndef __LANGUAGE_ASM__
  1632. //! @brief Read current value of the ENET_MSCR_MII_SPEED field.
  1633. #define BR_ENET_MSCR_MII_SPEED(x) (HW_ENET_MSCR(x).B.MII_SPEED)
  1634. #endif
  1635. //! @brief Format value for bitfield ENET_MSCR_MII_SPEED.
  1636. #define BF_ENET_MSCR_MII_SPEED(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MSCR_MII_SPEED), uint32_t) & BM_ENET_MSCR_MII_SPEED)
  1637. #ifndef __LANGUAGE_ASM__
  1638. //! @brief Set the MII_SPEED field to a new value.
  1639. #define BW_ENET_MSCR_MII_SPEED(x, v) (HW_ENET_MSCR_WR(x, (HW_ENET_MSCR_RD(x) & ~BM_ENET_MSCR_MII_SPEED) | BF_ENET_MSCR_MII_SPEED(v)))
  1640. #endif
  1641. //@}
  1642. /*!
  1643. * @name Register ENET_MSCR, field DIS_PRE[7] (RW)
  1644. *
  1645. * Enables/disables prepending a preamble to the MII management frame. The MII
  1646. * standard allows the preamble to be dropped if the attached PHY devices do not
  1647. * require it.
  1648. *
  1649. * Values:
  1650. * - 0 - Preamble enabled.
  1651. * - 1 - Preamble (32 ones) is not prepended to the MII management frame.
  1652. */
  1653. //@{
  1654. #define BP_ENET_MSCR_DIS_PRE (7U) //!< Bit position for ENET_MSCR_DIS_PRE.
  1655. #define BM_ENET_MSCR_DIS_PRE (0x00000080U) //!< Bit mask for ENET_MSCR_DIS_PRE.
  1656. #define BS_ENET_MSCR_DIS_PRE (1U) //!< Bit field size in bits for ENET_MSCR_DIS_PRE.
  1657. #ifndef __LANGUAGE_ASM__
  1658. //! @brief Read current value of the ENET_MSCR_DIS_PRE field.
  1659. #define BR_ENET_MSCR_DIS_PRE(x) (BITBAND_ACCESS32(HW_ENET_MSCR_ADDR(x), BP_ENET_MSCR_DIS_PRE))
  1660. #endif
  1661. //! @brief Format value for bitfield ENET_MSCR_DIS_PRE.
  1662. #define BF_ENET_MSCR_DIS_PRE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MSCR_DIS_PRE), uint32_t) & BM_ENET_MSCR_DIS_PRE)
  1663. #ifndef __LANGUAGE_ASM__
  1664. //! @brief Set the DIS_PRE field to a new value.
  1665. #define BW_ENET_MSCR_DIS_PRE(x, v) (BITBAND_ACCESS32(HW_ENET_MSCR_ADDR(x), BP_ENET_MSCR_DIS_PRE) = (v))
  1666. #endif
  1667. //@}
  1668. /*!
  1669. * @name Register ENET_MSCR, field HOLDTIME[10:8] (RW)
  1670. *
  1671. * IEEE802.3 clause 22 defines a minimum of 10 ns for the hold time on the MDIO
  1672. * output. Depending on the host bus frequency, the setting may need to be
  1673. * increased.
  1674. *
  1675. * Values:
  1676. * - 000 - 1 internal module clock cycle
  1677. * - 001 - 2 internal module clock cycles
  1678. * - 010 - 3 internal module clock cycles
  1679. * - 111 - 8 internal module clock cycles
  1680. */
  1681. //@{
  1682. #define BP_ENET_MSCR_HOLDTIME (8U) //!< Bit position for ENET_MSCR_HOLDTIME.
  1683. #define BM_ENET_MSCR_HOLDTIME (0x00000700U) //!< Bit mask for ENET_MSCR_HOLDTIME.
  1684. #define BS_ENET_MSCR_HOLDTIME (3U) //!< Bit field size in bits for ENET_MSCR_HOLDTIME.
  1685. #ifndef __LANGUAGE_ASM__
  1686. //! @brief Read current value of the ENET_MSCR_HOLDTIME field.
  1687. #define BR_ENET_MSCR_HOLDTIME(x) (HW_ENET_MSCR(x).B.HOLDTIME)
  1688. #endif
  1689. //! @brief Format value for bitfield ENET_MSCR_HOLDTIME.
  1690. #define BF_ENET_MSCR_HOLDTIME(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MSCR_HOLDTIME), uint32_t) & BM_ENET_MSCR_HOLDTIME)
  1691. #ifndef __LANGUAGE_ASM__
  1692. //! @brief Set the HOLDTIME field to a new value.
  1693. #define BW_ENET_MSCR_HOLDTIME(x, v) (HW_ENET_MSCR_WR(x, (HW_ENET_MSCR_RD(x) & ~BM_ENET_MSCR_HOLDTIME) | BF_ENET_MSCR_HOLDTIME(v)))
  1694. #endif
  1695. //@}
  1696. //-------------------------------------------------------------------------------------------
  1697. // HW_ENET_MIBC - MIB Control Register
  1698. //-------------------------------------------------------------------------------------------
  1699. #ifndef __LANGUAGE_ASM__
  1700. /*!
  1701. * @brief HW_ENET_MIBC - MIB Control Register (RW)
  1702. *
  1703. * Reset value: 0xC0000000U
  1704. *
  1705. * MIBC is a read/write register controlling and observing the state of the MIB
  1706. * block. Access this register to disable the MIB block operation or clear the
  1707. * MIB counters. The MIB_DIS field resets to 1.
  1708. */
  1709. typedef union _hw_enet_mibc
  1710. {
  1711. uint32_t U;
  1712. struct _hw_enet_mibc_bitfields
  1713. {
  1714. uint32_t RESERVED0 : 29; //!< [28:0]
  1715. uint32_t MIB_CLEAR : 1; //!< [29] MIB Clear
  1716. uint32_t MIB_IDLE : 1; //!< [30] MIB Idle
  1717. uint32_t MIB_DIS : 1; //!< [31] Disable MIB Logic
  1718. } B;
  1719. } hw_enet_mibc_t;
  1720. #endif
  1721. /*!
  1722. * @name Constants and macros for entire ENET_MIBC register
  1723. */
  1724. //@{
  1725. #define HW_ENET_MIBC_ADDR(x) (REGS_ENET_BASE(x) + 0x64U)
  1726. #ifndef __LANGUAGE_ASM__
  1727. #define HW_ENET_MIBC(x) (*(__IO hw_enet_mibc_t *) HW_ENET_MIBC_ADDR(x))
  1728. #define HW_ENET_MIBC_RD(x) (HW_ENET_MIBC(x).U)
  1729. #define HW_ENET_MIBC_WR(x, v) (HW_ENET_MIBC(x).U = (v))
  1730. #define HW_ENET_MIBC_SET(x, v) (HW_ENET_MIBC_WR(x, HW_ENET_MIBC_RD(x) | (v)))
  1731. #define HW_ENET_MIBC_CLR(x, v) (HW_ENET_MIBC_WR(x, HW_ENET_MIBC_RD(x) & ~(v)))
  1732. #define HW_ENET_MIBC_TOG(x, v) (HW_ENET_MIBC_WR(x, HW_ENET_MIBC_RD(x) ^ (v)))
  1733. #endif
  1734. //@}
  1735. /*
  1736. * Constants & macros for individual ENET_MIBC bitfields
  1737. */
  1738. /*!
  1739. * @name Register ENET_MIBC, field MIB_CLEAR[29] (RW)
  1740. *
  1741. * If set, all statistics counters are reset to 0. This field is not
  1742. * self-clearing. To clear the MIB counters set and then clear the field.
  1743. */
  1744. //@{
  1745. #define BP_ENET_MIBC_MIB_CLEAR (29U) //!< Bit position for ENET_MIBC_MIB_CLEAR.
  1746. #define BM_ENET_MIBC_MIB_CLEAR (0x20000000U) //!< Bit mask for ENET_MIBC_MIB_CLEAR.
  1747. #define BS_ENET_MIBC_MIB_CLEAR (1U) //!< Bit field size in bits for ENET_MIBC_MIB_CLEAR.
  1748. #ifndef __LANGUAGE_ASM__
  1749. //! @brief Read current value of the ENET_MIBC_MIB_CLEAR field.
  1750. #define BR_ENET_MIBC_MIB_CLEAR(x) (BITBAND_ACCESS32(HW_ENET_MIBC_ADDR(x), BP_ENET_MIBC_MIB_CLEAR))
  1751. #endif
  1752. //! @brief Format value for bitfield ENET_MIBC_MIB_CLEAR.
  1753. #define BF_ENET_MIBC_MIB_CLEAR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MIBC_MIB_CLEAR), uint32_t) & BM_ENET_MIBC_MIB_CLEAR)
  1754. #ifndef __LANGUAGE_ASM__
  1755. //! @brief Set the MIB_CLEAR field to a new value.
  1756. #define BW_ENET_MIBC_MIB_CLEAR(x, v) (BITBAND_ACCESS32(HW_ENET_MIBC_ADDR(x), BP_ENET_MIBC_MIB_CLEAR) = (v))
  1757. #endif
  1758. //@}
  1759. /*!
  1760. * @name Register ENET_MIBC, field MIB_IDLE[30] (RO)
  1761. *
  1762. * If this status field is set, the MIB block is not currently updating any MIB
  1763. * counters.
  1764. */
  1765. //@{
  1766. #define BP_ENET_MIBC_MIB_IDLE (30U) //!< Bit position for ENET_MIBC_MIB_IDLE.
  1767. #define BM_ENET_MIBC_MIB_IDLE (0x40000000U) //!< Bit mask for ENET_MIBC_MIB_IDLE.
  1768. #define BS_ENET_MIBC_MIB_IDLE (1U) //!< Bit field size in bits for ENET_MIBC_MIB_IDLE.
  1769. #ifndef __LANGUAGE_ASM__
  1770. //! @brief Read current value of the ENET_MIBC_MIB_IDLE field.
  1771. #define BR_ENET_MIBC_MIB_IDLE(x) (BITBAND_ACCESS32(HW_ENET_MIBC_ADDR(x), BP_ENET_MIBC_MIB_IDLE))
  1772. #endif
  1773. //@}
  1774. /*!
  1775. * @name Register ENET_MIBC, field MIB_DIS[31] (RW)
  1776. *
  1777. * If this control field is set, the MIB logic halts and does not update any MIB
  1778. * counters.
  1779. */
  1780. //@{
  1781. #define BP_ENET_MIBC_MIB_DIS (31U) //!< Bit position for ENET_MIBC_MIB_DIS.
  1782. #define BM_ENET_MIBC_MIB_DIS (0x80000000U) //!< Bit mask for ENET_MIBC_MIB_DIS.
  1783. #define BS_ENET_MIBC_MIB_DIS (1U) //!< Bit field size in bits for ENET_MIBC_MIB_DIS.
  1784. #ifndef __LANGUAGE_ASM__
  1785. //! @brief Read current value of the ENET_MIBC_MIB_DIS field.
  1786. #define BR_ENET_MIBC_MIB_DIS(x) (BITBAND_ACCESS32(HW_ENET_MIBC_ADDR(x), BP_ENET_MIBC_MIB_DIS))
  1787. #endif
  1788. //! @brief Format value for bitfield ENET_MIBC_MIB_DIS.
  1789. #define BF_ENET_MIBC_MIB_DIS(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MIBC_MIB_DIS), uint32_t) & BM_ENET_MIBC_MIB_DIS)
  1790. #ifndef __LANGUAGE_ASM__
  1791. //! @brief Set the MIB_DIS field to a new value.
  1792. #define BW_ENET_MIBC_MIB_DIS(x, v) (BITBAND_ACCESS32(HW_ENET_MIBC_ADDR(x), BP_ENET_MIBC_MIB_DIS) = (v))
  1793. #endif
  1794. //@}
  1795. //-------------------------------------------------------------------------------------------
  1796. // HW_ENET_RCR - Receive Control Register
  1797. //-------------------------------------------------------------------------------------------
  1798. #ifndef __LANGUAGE_ASM__
  1799. /*!
  1800. * @brief HW_ENET_RCR - Receive Control Register (RW)
  1801. *
  1802. * Reset value: 0x05EE0001U
  1803. */
  1804. typedef union _hw_enet_rcr
  1805. {
  1806. uint32_t U;
  1807. struct _hw_enet_rcr_bitfields
  1808. {
  1809. uint32_t LOOP : 1; //!< [0] Internal Loopback
  1810. uint32_t DRT : 1; //!< [1] Disable Receive On Transmit
  1811. uint32_t MII_MODE : 1; //!< [2] Media Independent Interface Mode
  1812. uint32_t PROM : 1; //!< [3] Promiscuous Mode
  1813. uint32_t BC_REJ : 1; //!< [4] Broadcast Frame Reject
  1814. uint32_t FCE : 1; //!< [5] Flow Control Enable
  1815. uint32_t RESERVED0 : 2; //!< [7:6]
  1816. uint32_t RMII_MODE : 1; //!< [8] RMII Mode Enable
  1817. uint32_t RMII_10T : 1; //!< [9]
  1818. uint32_t RESERVED1 : 2; //!< [11:10]
  1819. uint32_t PADEN : 1; //!< [12] Enable Frame Padding Remove On Receive
  1820. uint32_t PAUFWD : 1; //!< [13] Terminate/Forward Pause Frames
  1821. uint32_t CRCFWD : 1; //!< [14] Terminate/Forward Received CRC
  1822. uint32_t CFEN : 1; //!< [15] MAC Control Frame Enable
  1823. uint32_t MAX_FL : 14; //!< [29:16] Maximum Frame Length
  1824. uint32_t NLC : 1; //!< [30] Payload Length Check Disable
  1825. uint32_t GRS : 1; //!< [31] Graceful Receive Stopped
  1826. } B;
  1827. } hw_enet_rcr_t;
  1828. #endif
  1829. /*!
  1830. * @name Constants and macros for entire ENET_RCR register
  1831. */
  1832. //@{
  1833. #define HW_ENET_RCR_ADDR(x) (REGS_ENET_BASE(x) + 0x84U)
  1834. #ifndef __LANGUAGE_ASM__
  1835. #define HW_ENET_RCR(x) (*(__IO hw_enet_rcr_t *) HW_ENET_RCR_ADDR(x))
  1836. #define HW_ENET_RCR_RD(x) (HW_ENET_RCR(x).U)
  1837. #define HW_ENET_RCR_WR(x, v) (HW_ENET_RCR(x).U = (v))
  1838. #define HW_ENET_RCR_SET(x, v) (HW_ENET_RCR_WR(x, HW_ENET_RCR_RD(x) | (v)))
  1839. #define HW_ENET_RCR_CLR(x, v) (HW_ENET_RCR_WR(x, HW_ENET_RCR_RD(x) & ~(v)))
  1840. #define HW_ENET_RCR_TOG(x, v) (HW_ENET_RCR_WR(x, HW_ENET_RCR_RD(x) ^ (v)))
  1841. #endif
  1842. //@}
  1843. /*
  1844. * Constants & macros for individual ENET_RCR bitfields
  1845. */
  1846. /*!
  1847. * @name Register ENET_RCR, field LOOP[0] (RW)
  1848. *
  1849. * This is an MII internal loopback, therefore MII_MODE must be written to 1 and
  1850. * RMII_MODE must be written to 0.
  1851. *
  1852. * Values:
  1853. * - 0 - Loopback disabled.
  1854. * - 1 - Transmitted frames are looped back internal to the device and transmit
  1855. * MII output signals are not asserted. DRT must be cleared.
  1856. */
  1857. //@{
  1858. #define BP_ENET_RCR_LOOP (0U) //!< Bit position for ENET_RCR_LOOP.
  1859. #define BM_ENET_RCR_LOOP (0x00000001U) //!< Bit mask for ENET_RCR_LOOP.
  1860. #define BS_ENET_RCR_LOOP (1U) //!< Bit field size in bits for ENET_RCR_LOOP.
  1861. #ifndef __LANGUAGE_ASM__
  1862. //! @brief Read current value of the ENET_RCR_LOOP field.
  1863. #define BR_ENET_RCR_LOOP(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_LOOP))
  1864. #endif
  1865. //! @brief Format value for bitfield ENET_RCR_LOOP.
  1866. #define BF_ENET_RCR_LOOP(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_LOOP), uint32_t) & BM_ENET_RCR_LOOP)
  1867. #ifndef __LANGUAGE_ASM__
  1868. //! @brief Set the LOOP field to a new value.
  1869. #define BW_ENET_RCR_LOOP(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_LOOP) = (v))
  1870. #endif
  1871. //@}
  1872. /*!
  1873. * @name Register ENET_RCR, field DRT[1] (RW)
  1874. *
  1875. * Values:
  1876. * - 0 - Receive path operates independently of transmit. Used for full-duplex
  1877. * or to monitor transmit activity in half-duplex mode.
  1878. * - 1 - Disable reception of frames while transmitting. Normally used for
  1879. * half-duplex mode.
  1880. */
  1881. //@{
  1882. #define BP_ENET_RCR_DRT (1U) //!< Bit position for ENET_RCR_DRT.
  1883. #define BM_ENET_RCR_DRT (0x00000002U) //!< Bit mask for ENET_RCR_DRT.
  1884. #define BS_ENET_RCR_DRT (1U) //!< Bit field size in bits for ENET_RCR_DRT.
  1885. #ifndef __LANGUAGE_ASM__
  1886. //! @brief Read current value of the ENET_RCR_DRT field.
  1887. #define BR_ENET_RCR_DRT(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_DRT))
  1888. #endif
  1889. //! @brief Format value for bitfield ENET_RCR_DRT.
  1890. #define BF_ENET_RCR_DRT(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_DRT), uint32_t) & BM_ENET_RCR_DRT)
  1891. #ifndef __LANGUAGE_ASM__
  1892. //! @brief Set the DRT field to a new value.
  1893. #define BW_ENET_RCR_DRT(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_DRT) = (v))
  1894. #endif
  1895. //@}
  1896. /*!
  1897. * @name Register ENET_RCR, field MII_MODE[2] (RW)
  1898. *
  1899. * This field must always be set.
  1900. *
  1901. * Values:
  1902. * - 0 - Reserved.
  1903. * - 1 - MII or RMII mode, as indicated by the RMII_MODE field.
  1904. */
  1905. //@{
  1906. #define BP_ENET_RCR_MII_MODE (2U) //!< Bit position for ENET_RCR_MII_MODE.
  1907. #define BM_ENET_RCR_MII_MODE (0x00000004U) //!< Bit mask for ENET_RCR_MII_MODE.
  1908. #define BS_ENET_RCR_MII_MODE (1U) //!< Bit field size in bits for ENET_RCR_MII_MODE.
  1909. #ifndef __LANGUAGE_ASM__
  1910. //! @brief Read current value of the ENET_RCR_MII_MODE field.
  1911. #define BR_ENET_RCR_MII_MODE(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_MII_MODE))
  1912. #endif
  1913. //! @brief Format value for bitfield ENET_RCR_MII_MODE.
  1914. #define BF_ENET_RCR_MII_MODE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_MII_MODE), uint32_t) & BM_ENET_RCR_MII_MODE)
  1915. #ifndef __LANGUAGE_ASM__
  1916. //! @brief Set the MII_MODE field to a new value.
  1917. #define BW_ENET_RCR_MII_MODE(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_MII_MODE) = (v))
  1918. #endif
  1919. //@}
  1920. /*!
  1921. * @name Register ENET_RCR, field PROM[3] (RW)
  1922. *
  1923. * All frames are accepted regardless of address matching.
  1924. *
  1925. * Values:
  1926. * - 0 - Disabled.
  1927. * - 1 - Enabled.
  1928. */
  1929. //@{
  1930. #define BP_ENET_RCR_PROM (3U) //!< Bit position for ENET_RCR_PROM.
  1931. #define BM_ENET_RCR_PROM (0x00000008U) //!< Bit mask for ENET_RCR_PROM.
  1932. #define BS_ENET_RCR_PROM (1U) //!< Bit field size in bits for ENET_RCR_PROM.
  1933. #ifndef __LANGUAGE_ASM__
  1934. //! @brief Read current value of the ENET_RCR_PROM field.
  1935. #define BR_ENET_RCR_PROM(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_PROM))
  1936. #endif
  1937. //! @brief Format value for bitfield ENET_RCR_PROM.
  1938. #define BF_ENET_RCR_PROM(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_PROM), uint32_t) & BM_ENET_RCR_PROM)
  1939. #ifndef __LANGUAGE_ASM__
  1940. //! @brief Set the PROM field to a new value.
  1941. #define BW_ENET_RCR_PROM(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_PROM) = (v))
  1942. #endif
  1943. //@}
  1944. /*!
  1945. * @name Register ENET_RCR, field BC_REJ[4] (RW)
  1946. *
  1947. * If set, frames with destination address (DA) equal to 0xFFFF_FFFF_FFFF are
  1948. * rejected unless the PROM field is set. If BC_REJ and PROM are set, frames with
  1949. * broadcast DA are accepted and the MISS (M) is set in the receive buffer
  1950. * descriptor.
  1951. */
  1952. //@{
  1953. #define BP_ENET_RCR_BC_REJ (4U) //!< Bit position for ENET_RCR_BC_REJ.
  1954. #define BM_ENET_RCR_BC_REJ (0x00000010U) //!< Bit mask for ENET_RCR_BC_REJ.
  1955. #define BS_ENET_RCR_BC_REJ (1U) //!< Bit field size in bits for ENET_RCR_BC_REJ.
  1956. #ifndef __LANGUAGE_ASM__
  1957. //! @brief Read current value of the ENET_RCR_BC_REJ field.
  1958. #define BR_ENET_RCR_BC_REJ(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_BC_REJ))
  1959. #endif
  1960. //! @brief Format value for bitfield ENET_RCR_BC_REJ.
  1961. #define BF_ENET_RCR_BC_REJ(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_BC_REJ), uint32_t) & BM_ENET_RCR_BC_REJ)
  1962. #ifndef __LANGUAGE_ASM__
  1963. //! @brief Set the BC_REJ field to a new value.
  1964. #define BW_ENET_RCR_BC_REJ(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_BC_REJ) = (v))
  1965. #endif
  1966. //@}
  1967. /*!
  1968. * @name Register ENET_RCR, field FCE[5] (RW)
  1969. *
  1970. * If set, the receiver detects PAUSE frames. Upon PAUSE frame detection, the
  1971. * transmitter stops transmitting data frames for a given duration.
  1972. */
  1973. //@{
  1974. #define BP_ENET_RCR_FCE (5U) //!< Bit position for ENET_RCR_FCE.
  1975. #define BM_ENET_RCR_FCE (0x00000020U) //!< Bit mask for ENET_RCR_FCE.
  1976. #define BS_ENET_RCR_FCE (1U) //!< Bit field size in bits for ENET_RCR_FCE.
  1977. #ifndef __LANGUAGE_ASM__
  1978. //! @brief Read current value of the ENET_RCR_FCE field.
  1979. #define BR_ENET_RCR_FCE(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_FCE))
  1980. #endif
  1981. //! @brief Format value for bitfield ENET_RCR_FCE.
  1982. #define BF_ENET_RCR_FCE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_FCE), uint32_t) & BM_ENET_RCR_FCE)
  1983. #ifndef __LANGUAGE_ASM__
  1984. //! @brief Set the FCE field to a new value.
  1985. #define BW_ENET_RCR_FCE(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_FCE) = (v))
  1986. #endif
  1987. //@}
  1988. /*!
  1989. * @name Register ENET_RCR, field RMII_MODE[8] (RW)
  1990. *
  1991. * Specifies whether the MAC is configured for MII mode or RMII operation .
  1992. *
  1993. * Values:
  1994. * - 0 - MAC configured for MII mode.
  1995. * - 1 - MAC configured for RMII operation.
  1996. */
  1997. //@{
  1998. #define BP_ENET_RCR_RMII_MODE (8U) //!< Bit position for ENET_RCR_RMII_MODE.
  1999. #define BM_ENET_RCR_RMII_MODE (0x00000100U) //!< Bit mask for ENET_RCR_RMII_MODE.
  2000. #define BS_ENET_RCR_RMII_MODE (1U) //!< Bit field size in bits for ENET_RCR_RMII_MODE.
  2001. #ifndef __LANGUAGE_ASM__
  2002. //! @brief Read current value of the ENET_RCR_RMII_MODE field.
  2003. #define BR_ENET_RCR_RMII_MODE(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_RMII_MODE))
  2004. #endif
  2005. //! @brief Format value for bitfield ENET_RCR_RMII_MODE.
  2006. #define BF_ENET_RCR_RMII_MODE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_RMII_MODE), uint32_t) & BM_ENET_RCR_RMII_MODE)
  2007. #ifndef __LANGUAGE_ASM__
  2008. //! @brief Set the RMII_MODE field to a new value.
  2009. #define BW_ENET_RCR_RMII_MODE(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_RMII_MODE) = (v))
  2010. #endif
  2011. //@}
  2012. /*!
  2013. * @name Register ENET_RCR, field RMII_10T[9] (RW)
  2014. *
  2015. * Enables 10-Mbps mode of the RMII .
  2016. *
  2017. * Values:
  2018. * - 0 - 100 Mbps operation.
  2019. * - 1 - 10 Mbps operation.
  2020. */
  2021. //@{
  2022. #define BP_ENET_RCR_RMII_10T (9U) //!< Bit position for ENET_RCR_RMII_10T.
  2023. #define BM_ENET_RCR_RMII_10T (0x00000200U) //!< Bit mask for ENET_RCR_RMII_10T.
  2024. #define BS_ENET_RCR_RMII_10T (1U) //!< Bit field size in bits for ENET_RCR_RMII_10T.
  2025. #ifndef __LANGUAGE_ASM__
  2026. //! @brief Read current value of the ENET_RCR_RMII_10T field.
  2027. #define BR_ENET_RCR_RMII_10T(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_RMII_10T))
  2028. #endif
  2029. //! @brief Format value for bitfield ENET_RCR_RMII_10T.
  2030. #define BF_ENET_RCR_RMII_10T(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_RMII_10T), uint32_t) & BM_ENET_RCR_RMII_10T)
  2031. #ifndef __LANGUAGE_ASM__
  2032. //! @brief Set the RMII_10T field to a new value.
  2033. #define BW_ENET_RCR_RMII_10T(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_RMII_10T) = (v))
  2034. #endif
  2035. //@}
  2036. /*!
  2037. * @name Register ENET_RCR, field PADEN[12] (RW)
  2038. *
  2039. * Specifies whether the MAC removes padding from received frames.
  2040. *
  2041. * Values:
  2042. * - 0 - No padding is removed on receive by the MAC.
  2043. * - 1 - Padding is removed from received frames.
  2044. */
  2045. //@{
  2046. #define BP_ENET_RCR_PADEN (12U) //!< Bit position for ENET_RCR_PADEN.
  2047. #define BM_ENET_RCR_PADEN (0x00001000U) //!< Bit mask for ENET_RCR_PADEN.
  2048. #define BS_ENET_RCR_PADEN (1U) //!< Bit field size in bits for ENET_RCR_PADEN.
  2049. #ifndef __LANGUAGE_ASM__
  2050. //! @brief Read current value of the ENET_RCR_PADEN field.
  2051. #define BR_ENET_RCR_PADEN(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_PADEN))
  2052. #endif
  2053. //! @brief Format value for bitfield ENET_RCR_PADEN.
  2054. #define BF_ENET_RCR_PADEN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_PADEN), uint32_t) & BM_ENET_RCR_PADEN)
  2055. #ifndef __LANGUAGE_ASM__
  2056. //! @brief Set the PADEN field to a new value.
  2057. #define BW_ENET_RCR_PADEN(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_PADEN) = (v))
  2058. #endif
  2059. //@}
  2060. /*!
  2061. * @name Register ENET_RCR, field PAUFWD[13] (RW)
  2062. *
  2063. * Specifies whether pause frames are terminated or forwarded.
  2064. *
  2065. * Values:
  2066. * - 0 - Pause frames are terminated and discarded in the MAC.
  2067. * - 1 - Pause frames are forwarded to the user application.
  2068. */
  2069. //@{
  2070. #define BP_ENET_RCR_PAUFWD (13U) //!< Bit position for ENET_RCR_PAUFWD.
  2071. #define BM_ENET_RCR_PAUFWD (0x00002000U) //!< Bit mask for ENET_RCR_PAUFWD.
  2072. #define BS_ENET_RCR_PAUFWD (1U) //!< Bit field size in bits for ENET_RCR_PAUFWD.
  2073. #ifndef __LANGUAGE_ASM__
  2074. //! @brief Read current value of the ENET_RCR_PAUFWD field.
  2075. #define BR_ENET_RCR_PAUFWD(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_PAUFWD))
  2076. #endif
  2077. //! @brief Format value for bitfield ENET_RCR_PAUFWD.
  2078. #define BF_ENET_RCR_PAUFWD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_PAUFWD), uint32_t) & BM_ENET_RCR_PAUFWD)
  2079. #ifndef __LANGUAGE_ASM__
  2080. //! @brief Set the PAUFWD field to a new value.
  2081. #define BW_ENET_RCR_PAUFWD(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_PAUFWD) = (v))
  2082. #endif
  2083. //@}
  2084. /*!
  2085. * @name Register ENET_RCR, field CRCFWD[14] (RW)
  2086. *
  2087. * Specifies whether the CRC field of received frames is transmitted or
  2088. * stripped. If padding function is enabled (PADEN = 1), CRCFWD is ignored and the CRC
  2089. * field is checked and always terminated and removed.
  2090. *
  2091. * Values:
  2092. * - 0 - The CRC field of received frames is transmitted to the user application.
  2093. * - 1 - The CRC field is stripped from the frame.
  2094. */
  2095. //@{
  2096. #define BP_ENET_RCR_CRCFWD (14U) //!< Bit position for ENET_RCR_CRCFWD.
  2097. #define BM_ENET_RCR_CRCFWD (0x00004000U) //!< Bit mask for ENET_RCR_CRCFWD.
  2098. #define BS_ENET_RCR_CRCFWD (1U) //!< Bit field size in bits for ENET_RCR_CRCFWD.
  2099. #ifndef __LANGUAGE_ASM__
  2100. //! @brief Read current value of the ENET_RCR_CRCFWD field.
  2101. #define BR_ENET_RCR_CRCFWD(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_CRCFWD))
  2102. #endif
  2103. //! @brief Format value for bitfield ENET_RCR_CRCFWD.
  2104. #define BF_ENET_RCR_CRCFWD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_CRCFWD), uint32_t) & BM_ENET_RCR_CRCFWD)
  2105. #ifndef __LANGUAGE_ASM__
  2106. //! @brief Set the CRCFWD field to a new value.
  2107. #define BW_ENET_RCR_CRCFWD(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_CRCFWD) = (v))
  2108. #endif
  2109. //@}
  2110. /*!
  2111. * @name Register ENET_RCR, field CFEN[15] (RW)
  2112. *
  2113. * Enables/disables the MAC control frame.
  2114. *
  2115. * Values:
  2116. * - 0 - MAC control frames with any opcode other than 0x0001 (pause frame) are
  2117. * accepted and forwarded to the client interface.
  2118. * - 1 - MAC control frames with any opcode other than 0x0001 (pause frame) are
  2119. * silently discarded.
  2120. */
  2121. //@{
  2122. #define BP_ENET_RCR_CFEN (15U) //!< Bit position for ENET_RCR_CFEN.
  2123. #define BM_ENET_RCR_CFEN (0x00008000U) //!< Bit mask for ENET_RCR_CFEN.
  2124. #define BS_ENET_RCR_CFEN (1U) //!< Bit field size in bits for ENET_RCR_CFEN.
  2125. #ifndef __LANGUAGE_ASM__
  2126. //! @brief Read current value of the ENET_RCR_CFEN field.
  2127. #define BR_ENET_RCR_CFEN(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_CFEN))
  2128. #endif
  2129. //! @brief Format value for bitfield ENET_RCR_CFEN.
  2130. #define BF_ENET_RCR_CFEN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_CFEN), uint32_t) & BM_ENET_RCR_CFEN)
  2131. #ifndef __LANGUAGE_ASM__
  2132. //! @brief Set the CFEN field to a new value.
  2133. #define BW_ENET_RCR_CFEN(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_CFEN) = (v))
  2134. #endif
  2135. //@}
  2136. /*!
  2137. * @name Register ENET_RCR, field MAX_FL[29:16] (RW)
  2138. *
  2139. * Resets to decimal 1518. Length is measured starting at DA and includes the
  2140. * CRC at the end of the frame. Transmit frames longer than MAX_FL cause the BABT
  2141. * interrupt to occur. Receive frames longer than MAX_FL cause the BABR interrupt
  2142. * to occur and set the LG field in the end of frame receive buffer descriptor.
  2143. * The recommended default value to be programmed is 1518 or 1522 if VLAN tags are
  2144. * supported.
  2145. */
  2146. //@{
  2147. #define BP_ENET_RCR_MAX_FL (16U) //!< Bit position for ENET_RCR_MAX_FL.
  2148. #define BM_ENET_RCR_MAX_FL (0x3FFF0000U) //!< Bit mask for ENET_RCR_MAX_FL.
  2149. #define BS_ENET_RCR_MAX_FL (14U) //!< Bit field size in bits for ENET_RCR_MAX_FL.
  2150. #ifndef __LANGUAGE_ASM__
  2151. //! @brief Read current value of the ENET_RCR_MAX_FL field.
  2152. #define BR_ENET_RCR_MAX_FL(x) (HW_ENET_RCR(x).B.MAX_FL)
  2153. #endif
  2154. //! @brief Format value for bitfield ENET_RCR_MAX_FL.
  2155. #define BF_ENET_RCR_MAX_FL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_MAX_FL), uint32_t) & BM_ENET_RCR_MAX_FL)
  2156. #ifndef __LANGUAGE_ASM__
  2157. //! @brief Set the MAX_FL field to a new value.
  2158. #define BW_ENET_RCR_MAX_FL(x, v) (HW_ENET_RCR_WR(x, (HW_ENET_RCR_RD(x) & ~BM_ENET_RCR_MAX_FL) | BF_ENET_RCR_MAX_FL(v)))
  2159. #endif
  2160. //@}
  2161. /*!
  2162. * @name Register ENET_RCR, field NLC[30] (RW)
  2163. *
  2164. * Enables/disables a payload length check.
  2165. *
  2166. * Values:
  2167. * - 0 - The payload length check is disabled.
  2168. * - 1 - The core checks the frame's payload length with the frame length/type
  2169. * field. Errors are indicated in the EIR[PLC] field.
  2170. */
  2171. //@{
  2172. #define BP_ENET_RCR_NLC (30U) //!< Bit position for ENET_RCR_NLC.
  2173. #define BM_ENET_RCR_NLC (0x40000000U) //!< Bit mask for ENET_RCR_NLC.
  2174. #define BS_ENET_RCR_NLC (1U) //!< Bit field size in bits for ENET_RCR_NLC.
  2175. #ifndef __LANGUAGE_ASM__
  2176. //! @brief Read current value of the ENET_RCR_NLC field.
  2177. #define BR_ENET_RCR_NLC(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_NLC))
  2178. #endif
  2179. //! @brief Format value for bitfield ENET_RCR_NLC.
  2180. #define BF_ENET_RCR_NLC(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RCR_NLC), uint32_t) & BM_ENET_RCR_NLC)
  2181. #ifndef __LANGUAGE_ASM__
  2182. //! @brief Set the NLC field to a new value.
  2183. #define BW_ENET_RCR_NLC(x, v) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_NLC) = (v))
  2184. #endif
  2185. //@}
  2186. /*!
  2187. * @name Register ENET_RCR, field GRS[31] (RO)
  2188. *
  2189. * Read-only status indicating that the MAC receive datapath is stopped.
  2190. */
  2191. //@{
  2192. #define BP_ENET_RCR_GRS (31U) //!< Bit position for ENET_RCR_GRS.
  2193. #define BM_ENET_RCR_GRS (0x80000000U) //!< Bit mask for ENET_RCR_GRS.
  2194. #define BS_ENET_RCR_GRS (1U) //!< Bit field size in bits for ENET_RCR_GRS.
  2195. #ifndef __LANGUAGE_ASM__
  2196. //! @brief Read current value of the ENET_RCR_GRS field.
  2197. #define BR_ENET_RCR_GRS(x) (BITBAND_ACCESS32(HW_ENET_RCR_ADDR(x), BP_ENET_RCR_GRS))
  2198. #endif
  2199. //@}
  2200. //-------------------------------------------------------------------------------------------
  2201. // HW_ENET_TCR - Transmit Control Register
  2202. //-------------------------------------------------------------------------------------------
  2203. #ifndef __LANGUAGE_ASM__
  2204. /*!
  2205. * @brief HW_ENET_TCR - Transmit Control Register (RW)
  2206. *
  2207. * Reset value: 0x00000000U
  2208. *
  2209. * TCR is read/write and configures the transmit block. This register is cleared
  2210. * at system reset. FDEN can only be modified when ECR[ETHEREN] is cleared.
  2211. */
  2212. typedef union _hw_enet_tcr
  2213. {
  2214. uint32_t U;
  2215. struct _hw_enet_tcr_bitfields
  2216. {
  2217. uint32_t GTS : 1; //!< [0] Graceful Transmit Stop
  2218. uint32_t RESERVED0 : 1; //!< [1]
  2219. uint32_t FDEN : 1; //!< [2] Full-Duplex Enable
  2220. uint32_t TFC_PAUSE : 1; //!< [3] Transmit Frame Control Pause
  2221. uint32_t RFC_PAUSE : 1; //!< [4] Receive Frame Control Pause
  2222. uint32_t ADDSEL : 3; //!< [7:5] Source MAC Address Select On Transmit
  2223. uint32_t ADDINS : 1; //!< [8] Set MAC Address On Transmit
  2224. uint32_t CRCFWD : 1; //!< [9] Forward Frame From Application With CRC
  2225. uint32_t RESERVED1 : 22; //!< [31:10]
  2226. } B;
  2227. } hw_enet_tcr_t;
  2228. #endif
  2229. /*!
  2230. * @name Constants and macros for entire ENET_TCR register
  2231. */
  2232. //@{
  2233. #define HW_ENET_TCR_ADDR(x) (REGS_ENET_BASE(x) + 0xC4U)
  2234. #ifndef __LANGUAGE_ASM__
  2235. #define HW_ENET_TCR(x) (*(__IO hw_enet_tcr_t *) HW_ENET_TCR_ADDR(x))
  2236. #define HW_ENET_TCR_RD(x) (HW_ENET_TCR(x).U)
  2237. #define HW_ENET_TCR_WR(x, v) (HW_ENET_TCR(x).U = (v))
  2238. #define HW_ENET_TCR_SET(x, v) (HW_ENET_TCR_WR(x, HW_ENET_TCR_RD(x) | (v)))
  2239. #define HW_ENET_TCR_CLR(x, v) (HW_ENET_TCR_WR(x, HW_ENET_TCR_RD(x) & ~(v)))
  2240. #define HW_ENET_TCR_TOG(x, v) (HW_ENET_TCR_WR(x, HW_ENET_TCR_RD(x) ^ (v)))
  2241. #endif
  2242. //@}
  2243. /*
  2244. * Constants & macros for individual ENET_TCR bitfields
  2245. */
  2246. /*!
  2247. * @name Register ENET_TCR, field GTS[0] (RW)
  2248. *
  2249. * When this field is set, MAC stops transmission after any frame currently
  2250. * transmitted is complete and EIR[GRA] is set. If frame transmission is not
  2251. * currently underway, the GRA interrupt is asserted immediately. After transmission
  2252. * finishes, clear GTS to restart. The next frame in the transmit FIFO is then
  2253. * transmitted. If an early collision occurs during transmission when GTS is set,
  2254. * transmission stops after the collision. The frame is transmitted again after GTS is
  2255. * cleared. There may be old frames in the transmit FIFO that transmit when GTS
  2256. * is reasserted. To avoid this, clear ECR[ETHEREN] following the GRA interrupt.
  2257. */
  2258. //@{
  2259. #define BP_ENET_TCR_GTS (0U) //!< Bit position for ENET_TCR_GTS.
  2260. #define BM_ENET_TCR_GTS (0x00000001U) //!< Bit mask for ENET_TCR_GTS.
  2261. #define BS_ENET_TCR_GTS (1U) //!< Bit field size in bits for ENET_TCR_GTS.
  2262. #ifndef __LANGUAGE_ASM__
  2263. //! @brief Read current value of the ENET_TCR_GTS field.
  2264. #define BR_ENET_TCR_GTS(x) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_GTS))
  2265. #endif
  2266. //! @brief Format value for bitfield ENET_TCR_GTS.
  2267. #define BF_ENET_TCR_GTS(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCR_GTS), uint32_t) & BM_ENET_TCR_GTS)
  2268. #ifndef __LANGUAGE_ASM__
  2269. //! @brief Set the GTS field to a new value.
  2270. #define BW_ENET_TCR_GTS(x, v) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_GTS) = (v))
  2271. #endif
  2272. //@}
  2273. /*!
  2274. * @name Register ENET_TCR, field FDEN[2] (RW)
  2275. *
  2276. * If this field is set, frames transmit independent of carrier sense and
  2277. * collision inputs. Only modify this bit when ECR[ETHEREN] is cleared.
  2278. */
  2279. //@{
  2280. #define BP_ENET_TCR_FDEN (2U) //!< Bit position for ENET_TCR_FDEN.
  2281. #define BM_ENET_TCR_FDEN (0x00000004U) //!< Bit mask for ENET_TCR_FDEN.
  2282. #define BS_ENET_TCR_FDEN (1U) //!< Bit field size in bits for ENET_TCR_FDEN.
  2283. #ifndef __LANGUAGE_ASM__
  2284. //! @brief Read current value of the ENET_TCR_FDEN field.
  2285. #define BR_ENET_TCR_FDEN(x) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_FDEN))
  2286. #endif
  2287. //! @brief Format value for bitfield ENET_TCR_FDEN.
  2288. #define BF_ENET_TCR_FDEN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCR_FDEN), uint32_t) & BM_ENET_TCR_FDEN)
  2289. #ifndef __LANGUAGE_ASM__
  2290. //! @brief Set the FDEN field to a new value.
  2291. #define BW_ENET_TCR_FDEN(x, v) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_FDEN) = (v))
  2292. #endif
  2293. //@}
  2294. /*!
  2295. * @name Register ENET_TCR, field TFC_PAUSE[3] (RW)
  2296. *
  2297. * Pauses frame transmission. When this field is set, EIR[GRA] is set. With
  2298. * transmission of data frames stopped, the MAC transmits a MAC control PAUSE frame.
  2299. * Next, the MAC clears TFC_PAUSE and resumes transmitting data frames. If the
  2300. * transmitter pauses due to user assertion of GTS or reception of a PAUSE frame,
  2301. * the MAC may continue transmitting a MAC control PAUSE frame.
  2302. *
  2303. * Values:
  2304. * - 0 - No PAUSE frame transmitted.
  2305. * - 1 - The MAC stops transmission of data frames after the current
  2306. * transmission is complete.
  2307. */
  2308. //@{
  2309. #define BP_ENET_TCR_TFC_PAUSE (3U) //!< Bit position for ENET_TCR_TFC_PAUSE.
  2310. #define BM_ENET_TCR_TFC_PAUSE (0x00000008U) //!< Bit mask for ENET_TCR_TFC_PAUSE.
  2311. #define BS_ENET_TCR_TFC_PAUSE (1U) //!< Bit field size in bits for ENET_TCR_TFC_PAUSE.
  2312. #ifndef __LANGUAGE_ASM__
  2313. //! @brief Read current value of the ENET_TCR_TFC_PAUSE field.
  2314. #define BR_ENET_TCR_TFC_PAUSE(x) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_TFC_PAUSE))
  2315. #endif
  2316. //! @brief Format value for bitfield ENET_TCR_TFC_PAUSE.
  2317. #define BF_ENET_TCR_TFC_PAUSE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCR_TFC_PAUSE), uint32_t) & BM_ENET_TCR_TFC_PAUSE)
  2318. #ifndef __LANGUAGE_ASM__
  2319. //! @brief Set the TFC_PAUSE field to a new value.
  2320. #define BW_ENET_TCR_TFC_PAUSE(x, v) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_TFC_PAUSE) = (v))
  2321. #endif
  2322. //@}
  2323. /*!
  2324. * @name Register ENET_TCR, field RFC_PAUSE[4] (RO)
  2325. *
  2326. * This status field is set when a full-duplex flow control pause frame is
  2327. * received and the transmitter pauses for the duration defined in this pause frame.
  2328. * This field automatically clears when the pause duration is complete.
  2329. */
  2330. //@{
  2331. #define BP_ENET_TCR_RFC_PAUSE (4U) //!< Bit position for ENET_TCR_RFC_PAUSE.
  2332. #define BM_ENET_TCR_RFC_PAUSE (0x00000010U) //!< Bit mask for ENET_TCR_RFC_PAUSE.
  2333. #define BS_ENET_TCR_RFC_PAUSE (1U) //!< Bit field size in bits for ENET_TCR_RFC_PAUSE.
  2334. #ifndef __LANGUAGE_ASM__
  2335. //! @brief Read current value of the ENET_TCR_RFC_PAUSE field.
  2336. #define BR_ENET_TCR_RFC_PAUSE(x) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_RFC_PAUSE))
  2337. #endif
  2338. //@}
  2339. /*!
  2340. * @name Register ENET_TCR, field ADDSEL[7:5] (RW)
  2341. *
  2342. * If ADDINS is set, indicates the MAC address that overwrites the source MAC
  2343. * address.
  2344. *
  2345. * Values:
  2346. * - 000 - Node MAC address programmed on PADDR1/2 registers.
  2347. * - 100 - Reserved.
  2348. * - 101 - Reserved.
  2349. * - 110 - Reserved.
  2350. */
  2351. //@{
  2352. #define BP_ENET_TCR_ADDSEL (5U) //!< Bit position for ENET_TCR_ADDSEL.
  2353. #define BM_ENET_TCR_ADDSEL (0x000000E0U) //!< Bit mask for ENET_TCR_ADDSEL.
  2354. #define BS_ENET_TCR_ADDSEL (3U) //!< Bit field size in bits for ENET_TCR_ADDSEL.
  2355. #ifndef __LANGUAGE_ASM__
  2356. //! @brief Read current value of the ENET_TCR_ADDSEL field.
  2357. #define BR_ENET_TCR_ADDSEL(x) (HW_ENET_TCR(x).B.ADDSEL)
  2358. #endif
  2359. //! @brief Format value for bitfield ENET_TCR_ADDSEL.
  2360. #define BF_ENET_TCR_ADDSEL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCR_ADDSEL), uint32_t) & BM_ENET_TCR_ADDSEL)
  2361. #ifndef __LANGUAGE_ASM__
  2362. //! @brief Set the ADDSEL field to a new value.
  2363. #define BW_ENET_TCR_ADDSEL(x, v) (HW_ENET_TCR_WR(x, (HW_ENET_TCR_RD(x) & ~BM_ENET_TCR_ADDSEL) | BF_ENET_TCR_ADDSEL(v)))
  2364. #endif
  2365. //@}
  2366. /*!
  2367. * @name Register ENET_TCR, field ADDINS[8] (RW)
  2368. *
  2369. * Values:
  2370. * - 0 - The source MAC address is not modified by the MAC.
  2371. * - 1 - The MAC overwrites the source MAC address with the programmed MAC
  2372. * address according to ADDSEL.
  2373. */
  2374. //@{
  2375. #define BP_ENET_TCR_ADDINS (8U) //!< Bit position for ENET_TCR_ADDINS.
  2376. #define BM_ENET_TCR_ADDINS (0x00000100U) //!< Bit mask for ENET_TCR_ADDINS.
  2377. #define BS_ENET_TCR_ADDINS (1U) //!< Bit field size in bits for ENET_TCR_ADDINS.
  2378. #ifndef __LANGUAGE_ASM__
  2379. //! @brief Read current value of the ENET_TCR_ADDINS field.
  2380. #define BR_ENET_TCR_ADDINS(x) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_ADDINS))
  2381. #endif
  2382. //! @brief Format value for bitfield ENET_TCR_ADDINS.
  2383. #define BF_ENET_TCR_ADDINS(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCR_ADDINS), uint32_t) & BM_ENET_TCR_ADDINS)
  2384. #ifndef __LANGUAGE_ASM__
  2385. //! @brief Set the ADDINS field to a new value.
  2386. #define BW_ENET_TCR_ADDINS(x, v) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_ADDINS) = (v))
  2387. #endif
  2388. //@}
  2389. /*!
  2390. * @name Register ENET_TCR, field CRCFWD[9] (RW)
  2391. *
  2392. * Values:
  2393. * - 0 - TxBD[TC] controls whether the frame has a CRC from the application.
  2394. * - 1 - The transmitter does not append any CRC to transmitted frames, as it is
  2395. * expecting a frame with CRC from the application.
  2396. */
  2397. //@{
  2398. #define BP_ENET_TCR_CRCFWD (9U) //!< Bit position for ENET_TCR_CRCFWD.
  2399. #define BM_ENET_TCR_CRCFWD (0x00000200U) //!< Bit mask for ENET_TCR_CRCFWD.
  2400. #define BS_ENET_TCR_CRCFWD (1U) //!< Bit field size in bits for ENET_TCR_CRCFWD.
  2401. #ifndef __LANGUAGE_ASM__
  2402. //! @brief Read current value of the ENET_TCR_CRCFWD field.
  2403. #define BR_ENET_TCR_CRCFWD(x) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_CRCFWD))
  2404. #endif
  2405. //! @brief Format value for bitfield ENET_TCR_CRCFWD.
  2406. #define BF_ENET_TCR_CRCFWD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCR_CRCFWD), uint32_t) & BM_ENET_TCR_CRCFWD)
  2407. #ifndef __LANGUAGE_ASM__
  2408. //! @brief Set the CRCFWD field to a new value.
  2409. #define BW_ENET_TCR_CRCFWD(x, v) (BITBAND_ACCESS32(HW_ENET_TCR_ADDR(x), BP_ENET_TCR_CRCFWD) = (v))
  2410. #endif
  2411. //@}
  2412. //-------------------------------------------------------------------------------------------
  2413. // HW_ENET_PALR - Physical Address Lower Register
  2414. //-------------------------------------------------------------------------------------------
  2415. #ifndef __LANGUAGE_ASM__
  2416. /*!
  2417. * @brief HW_ENET_PALR - Physical Address Lower Register (RW)
  2418. *
  2419. * Reset value: 0x00000000U
  2420. *
  2421. * PALR contains the lower 32 bits (bytes 0, 1, 2, 3) of the 48-bit address used
  2422. * in the address recognition process to compare with the destination address
  2423. * (DA) field of receive frames with an individual DA. In addition, this register
  2424. * is used in bytes 0 through 3 of the six-byte source address field when
  2425. * transmitting PAUSE frames. This register is not reset and you must initialize it.
  2426. */
  2427. typedef union _hw_enet_palr
  2428. {
  2429. uint32_t U;
  2430. struct _hw_enet_palr_bitfields
  2431. {
  2432. uint32_t PADDR1 : 32; //!< [31:0] Pause Address
  2433. } B;
  2434. } hw_enet_palr_t;
  2435. #endif
  2436. /*!
  2437. * @name Constants and macros for entire ENET_PALR register
  2438. */
  2439. //@{
  2440. #define HW_ENET_PALR_ADDR(x) (REGS_ENET_BASE(x) + 0xE4U)
  2441. #ifndef __LANGUAGE_ASM__
  2442. #define HW_ENET_PALR(x) (*(__IO hw_enet_palr_t *) HW_ENET_PALR_ADDR(x))
  2443. #define HW_ENET_PALR_RD(x) (HW_ENET_PALR(x).U)
  2444. #define HW_ENET_PALR_WR(x, v) (HW_ENET_PALR(x).U = (v))
  2445. #define HW_ENET_PALR_SET(x, v) (HW_ENET_PALR_WR(x, HW_ENET_PALR_RD(x) | (v)))
  2446. #define HW_ENET_PALR_CLR(x, v) (HW_ENET_PALR_WR(x, HW_ENET_PALR_RD(x) & ~(v)))
  2447. #define HW_ENET_PALR_TOG(x, v) (HW_ENET_PALR_WR(x, HW_ENET_PALR_RD(x) ^ (v)))
  2448. #endif
  2449. //@}
  2450. /*
  2451. * Constants & macros for individual ENET_PALR bitfields
  2452. */
  2453. /*!
  2454. * @name Register ENET_PALR, field PADDR1[31:0] (RW)
  2455. *
  2456. * Bytes 0 (bits 31:24), 1 (bits 23:16), 2 (bits 15:8), and 3 (bits 7:0) of the
  2457. * 6-byte individual address are used for exact match and the source address
  2458. * field in PAUSE frames.
  2459. */
  2460. //@{
  2461. #define BP_ENET_PALR_PADDR1 (0U) //!< Bit position for ENET_PALR_PADDR1.
  2462. #define BM_ENET_PALR_PADDR1 (0xFFFFFFFFU) //!< Bit mask for ENET_PALR_PADDR1.
  2463. #define BS_ENET_PALR_PADDR1 (32U) //!< Bit field size in bits for ENET_PALR_PADDR1.
  2464. #ifndef __LANGUAGE_ASM__
  2465. //! @brief Read current value of the ENET_PALR_PADDR1 field.
  2466. #define BR_ENET_PALR_PADDR1(x) (HW_ENET_PALR(x).U)
  2467. #endif
  2468. //! @brief Format value for bitfield ENET_PALR_PADDR1.
  2469. #define BF_ENET_PALR_PADDR1(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_PALR_PADDR1), uint32_t) & BM_ENET_PALR_PADDR1)
  2470. #ifndef __LANGUAGE_ASM__
  2471. //! @brief Set the PADDR1 field to a new value.
  2472. #define BW_ENET_PALR_PADDR1(x, v) (HW_ENET_PALR_WR(x, v))
  2473. #endif
  2474. //@}
  2475. //-------------------------------------------------------------------------------------------
  2476. // HW_ENET_PAUR - Physical Address Upper Register
  2477. //-------------------------------------------------------------------------------------------
  2478. #ifndef __LANGUAGE_ASM__
  2479. /*!
  2480. * @brief HW_ENET_PAUR - Physical Address Upper Register (RW)
  2481. *
  2482. * Reset value: 0x00008808U
  2483. *
  2484. * PAUR contains the upper 16 bits (bytes 4 and 5) of the 48-bit address used in
  2485. * the address recognition process to compare with the destination address (DA)
  2486. * field of receive frames with an individual DA. In addition, this register is
  2487. * used in bytes 4 and 5 of the six-byte source address field when transmitting
  2488. * PAUSE frames. Bits 15:0 of PAUR contain a constant type field (0x8808) for
  2489. * transmission of PAUSE frames. The upper 16 bits of this register are not reset and
  2490. * you must initialize it.
  2491. */
  2492. typedef union _hw_enet_paur
  2493. {
  2494. uint32_t U;
  2495. struct _hw_enet_paur_bitfields
  2496. {
  2497. uint32_t TYPE : 16; //!< [15:0] Type Field In PAUSE Frames
  2498. uint32_t PADDR2 : 16; //!< [31:16]
  2499. } B;
  2500. } hw_enet_paur_t;
  2501. #endif
  2502. /*!
  2503. * @name Constants and macros for entire ENET_PAUR register
  2504. */
  2505. //@{
  2506. #define HW_ENET_PAUR_ADDR(x) (REGS_ENET_BASE(x) + 0xE8U)
  2507. #ifndef __LANGUAGE_ASM__
  2508. #define HW_ENET_PAUR(x) (*(__IO hw_enet_paur_t *) HW_ENET_PAUR_ADDR(x))
  2509. #define HW_ENET_PAUR_RD(x) (HW_ENET_PAUR(x).U)
  2510. #define HW_ENET_PAUR_WR(x, v) (HW_ENET_PAUR(x).U = (v))
  2511. #define HW_ENET_PAUR_SET(x, v) (HW_ENET_PAUR_WR(x, HW_ENET_PAUR_RD(x) | (v)))
  2512. #define HW_ENET_PAUR_CLR(x, v) (HW_ENET_PAUR_WR(x, HW_ENET_PAUR_RD(x) & ~(v)))
  2513. #define HW_ENET_PAUR_TOG(x, v) (HW_ENET_PAUR_WR(x, HW_ENET_PAUR_RD(x) ^ (v)))
  2514. #endif
  2515. //@}
  2516. /*
  2517. * Constants & macros for individual ENET_PAUR bitfields
  2518. */
  2519. /*!
  2520. * @name Register ENET_PAUR, field TYPE[15:0] (RO)
  2521. *
  2522. * These fields have a constant value of 0x8808.
  2523. */
  2524. //@{
  2525. #define BP_ENET_PAUR_TYPE (0U) //!< Bit position for ENET_PAUR_TYPE.
  2526. #define BM_ENET_PAUR_TYPE (0x0000FFFFU) //!< Bit mask for ENET_PAUR_TYPE.
  2527. #define BS_ENET_PAUR_TYPE (16U) //!< Bit field size in bits for ENET_PAUR_TYPE.
  2528. #ifndef __LANGUAGE_ASM__
  2529. //! @brief Read current value of the ENET_PAUR_TYPE field.
  2530. #define BR_ENET_PAUR_TYPE(x) (HW_ENET_PAUR(x).B.TYPE)
  2531. #endif
  2532. //@}
  2533. /*!
  2534. * @name Register ENET_PAUR, field PADDR2[31:16] (RW)
  2535. *
  2536. * Bytes 4 (bits 31:24) and 5 (bits 23:16) of the 6-byte individual address used
  2537. * for exact match, and the source address field in PAUSE frames.
  2538. */
  2539. //@{
  2540. #define BP_ENET_PAUR_PADDR2 (16U) //!< Bit position for ENET_PAUR_PADDR2.
  2541. #define BM_ENET_PAUR_PADDR2 (0xFFFF0000U) //!< Bit mask for ENET_PAUR_PADDR2.
  2542. #define BS_ENET_PAUR_PADDR2 (16U) //!< Bit field size in bits for ENET_PAUR_PADDR2.
  2543. #ifndef __LANGUAGE_ASM__
  2544. //! @brief Read current value of the ENET_PAUR_PADDR2 field.
  2545. #define BR_ENET_PAUR_PADDR2(x) (HW_ENET_PAUR(x).B.PADDR2)
  2546. #endif
  2547. //! @brief Format value for bitfield ENET_PAUR_PADDR2.
  2548. #define BF_ENET_PAUR_PADDR2(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_PAUR_PADDR2), uint32_t) & BM_ENET_PAUR_PADDR2)
  2549. #ifndef __LANGUAGE_ASM__
  2550. //! @brief Set the PADDR2 field to a new value.
  2551. #define BW_ENET_PAUR_PADDR2(x, v) (HW_ENET_PAUR_WR(x, (HW_ENET_PAUR_RD(x) & ~BM_ENET_PAUR_PADDR2) | BF_ENET_PAUR_PADDR2(v)))
  2552. #endif
  2553. //@}
  2554. //-------------------------------------------------------------------------------------------
  2555. // HW_ENET_OPD - Opcode/Pause Duration Register
  2556. //-------------------------------------------------------------------------------------------
  2557. #ifndef __LANGUAGE_ASM__
  2558. /*!
  2559. * @brief HW_ENET_OPD - Opcode/Pause Duration Register (RW)
  2560. *
  2561. * Reset value: 0x00010000U
  2562. *
  2563. * OPD is read/write accessible. This register contains the 16-bit opcode and
  2564. * 16-bit pause duration fields used in transmission of a PAUSE frame. The opcode
  2565. * field is a constant value, 0x0001. When another node detects a PAUSE frame,
  2566. * that node pauses transmission for the duration specified in the pause duration
  2567. * field. The lower 16 bits of this register are not reset and you must initialize
  2568. * it.
  2569. */
  2570. typedef union _hw_enet_opd
  2571. {
  2572. uint32_t U;
  2573. struct _hw_enet_opd_bitfields
  2574. {
  2575. uint32_t PAUSE_DUR : 16; //!< [15:0] Pause Duration
  2576. uint32_t OPCODE : 16; //!< [31:16] Opcode Field In PAUSE Frames
  2577. } B;
  2578. } hw_enet_opd_t;
  2579. #endif
  2580. /*!
  2581. * @name Constants and macros for entire ENET_OPD register
  2582. */
  2583. //@{
  2584. #define HW_ENET_OPD_ADDR(x) (REGS_ENET_BASE(x) + 0xECU)
  2585. #ifndef __LANGUAGE_ASM__
  2586. #define HW_ENET_OPD(x) (*(__IO hw_enet_opd_t *) HW_ENET_OPD_ADDR(x))
  2587. #define HW_ENET_OPD_RD(x) (HW_ENET_OPD(x).U)
  2588. #define HW_ENET_OPD_WR(x, v) (HW_ENET_OPD(x).U = (v))
  2589. #define HW_ENET_OPD_SET(x, v) (HW_ENET_OPD_WR(x, HW_ENET_OPD_RD(x) | (v)))
  2590. #define HW_ENET_OPD_CLR(x, v) (HW_ENET_OPD_WR(x, HW_ENET_OPD_RD(x) & ~(v)))
  2591. #define HW_ENET_OPD_TOG(x, v) (HW_ENET_OPD_WR(x, HW_ENET_OPD_RD(x) ^ (v)))
  2592. #endif
  2593. //@}
  2594. /*
  2595. * Constants & macros for individual ENET_OPD bitfields
  2596. */
  2597. /*!
  2598. * @name Register ENET_OPD, field PAUSE_DUR[15:0] (RW)
  2599. *
  2600. * Pause duration field used in PAUSE frames.
  2601. */
  2602. //@{
  2603. #define BP_ENET_OPD_PAUSE_DUR (0U) //!< Bit position for ENET_OPD_PAUSE_DUR.
  2604. #define BM_ENET_OPD_PAUSE_DUR (0x0000FFFFU) //!< Bit mask for ENET_OPD_PAUSE_DUR.
  2605. #define BS_ENET_OPD_PAUSE_DUR (16U) //!< Bit field size in bits for ENET_OPD_PAUSE_DUR.
  2606. #ifndef __LANGUAGE_ASM__
  2607. //! @brief Read current value of the ENET_OPD_PAUSE_DUR field.
  2608. #define BR_ENET_OPD_PAUSE_DUR(x) (HW_ENET_OPD(x).B.PAUSE_DUR)
  2609. #endif
  2610. //! @brief Format value for bitfield ENET_OPD_PAUSE_DUR.
  2611. #define BF_ENET_OPD_PAUSE_DUR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_OPD_PAUSE_DUR), uint32_t) & BM_ENET_OPD_PAUSE_DUR)
  2612. #ifndef __LANGUAGE_ASM__
  2613. //! @brief Set the PAUSE_DUR field to a new value.
  2614. #define BW_ENET_OPD_PAUSE_DUR(x, v) (HW_ENET_OPD_WR(x, (HW_ENET_OPD_RD(x) & ~BM_ENET_OPD_PAUSE_DUR) | BF_ENET_OPD_PAUSE_DUR(v)))
  2615. #endif
  2616. //@}
  2617. /*!
  2618. * @name Register ENET_OPD, field OPCODE[31:16] (RO)
  2619. *
  2620. * These fields have a constant value of 0x0001.
  2621. */
  2622. //@{
  2623. #define BP_ENET_OPD_OPCODE (16U) //!< Bit position for ENET_OPD_OPCODE.
  2624. #define BM_ENET_OPD_OPCODE (0xFFFF0000U) //!< Bit mask for ENET_OPD_OPCODE.
  2625. #define BS_ENET_OPD_OPCODE (16U) //!< Bit field size in bits for ENET_OPD_OPCODE.
  2626. #ifndef __LANGUAGE_ASM__
  2627. //! @brief Read current value of the ENET_OPD_OPCODE field.
  2628. #define BR_ENET_OPD_OPCODE(x) (HW_ENET_OPD(x).B.OPCODE)
  2629. #endif
  2630. //@}
  2631. //-------------------------------------------------------------------------------------------
  2632. // HW_ENET_IAUR - Descriptor Individual Upper Address Register
  2633. //-------------------------------------------------------------------------------------------
  2634. #ifndef __LANGUAGE_ASM__
  2635. /*!
  2636. * @brief HW_ENET_IAUR - Descriptor Individual Upper Address Register (RW)
  2637. *
  2638. * Reset value: 0x00000000U
  2639. *
  2640. * IAUR contains the upper 32 bits of the 64-bit individual address hash table.
  2641. * The address recognition process uses this table to check for a possible match
  2642. * with the destination address (DA) field of receive frames with an individual
  2643. * DA. This register is not reset and you must initialize it.
  2644. */
  2645. typedef union _hw_enet_iaur
  2646. {
  2647. uint32_t U;
  2648. struct _hw_enet_iaur_bitfields
  2649. {
  2650. uint32_t IADDR1 : 32; //!< [31:0]
  2651. } B;
  2652. } hw_enet_iaur_t;
  2653. #endif
  2654. /*!
  2655. * @name Constants and macros for entire ENET_IAUR register
  2656. */
  2657. //@{
  2658. #define HW_ENET_IAUR_ADDR(x) (REGS_ENET_BASE(x) + 0x118U)
  2659. #ifndef __LANGUAGE_ASM__
  2660. #define HW_ENET_IAUR(x) (*(__IO hw_enet_iaur_t *) HW_ENET_IAUR_ADDR(x))
  2661. #define HW_ENET_IAUR_RD(x) (HW_ENET_IAUR(x).U)
  2662. #define HW_ENET_IAUR_WR(x, v) (HW_ENET_IAUR(x).U = (v))
  2663. #define HW_ENET_IAUR_SET(x, v) (HW_ENET_IAUR_WR(x, HW_ENET_IAUR_RD(x) | (v)))
  2664. #define HW_ENET_IAUR_CLR(x, v) (HW_ENET_IAUR_WR(x, HW_ENET_IAUR_RD(x) & ~(v)))
  2665. #define HW_ENET_IAUR_TOG(x, v) (HW_ENET_IAUR_WR(x, HW_ENET_IAUR_RD(x) ^ (v)))
  2666. #endif
  2667. //@}
  2668. /*
  2669. * Constants & macros for individual ENET_IAUR bitfields
  2670. */
  2671. /*!
  2672. * @name Register ENET_IAUR, field IADDR1[31:0] (RW)
  2673. *
  2674. * Contains the upper 32 bits of the 64-bit hash table used in the address
  2675. * recognition process for receive frames with a unicast address. Bit 31 of IADDR1
  2676. * contains hash index bit 63. Bit 0 of IADDR1 contains hash index bit 32.
  2677. */
  2678. //@{
  2679. #define BP_ENET_IAUR_IADDR1 (0U) //!< Bit position for ENET_IAUR_IADDR1.
  2680. #define BM_ENET_IAUR_IADDR1 (0xFFFFFFFFU) //!< Bit mask for ENET_IAUR_IADDR1.
  2681. #define BS_ENET_IAUR_IADDR1 (32U) //!< Bit field size in bits for ENET_IAUR_IADDR1.
  2682. #ifndef __LANGUAGE_ASM__
  2683. //! @brief Read current value of the ENET_IAUR_IADDR1 field.
  2684. #define BR_ENET_IAUR_IADDR1(x) (HW_ENET_IAUR(x).U)
  2685. #endif
  2686. //! @brief Format value for bitfield ENET_IAUR_IADDR1.
  2687. #define BF_ENET_IAUR_IADDR1(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_IAUR_IADDR1), uint32_t) & BM_ENET_IAUR_IADDR1)
  2688. #ifndef __LANGUAGE_ASM__
  2689. //! @brief Set the IADDR1 field to a new value.
  2690. #define BW_ENET_IAUR_IADDR1(x, v) (HW_ENET_IAUR_WR(x, v))
  2691. #endif
  2692. //@}
  2693. //-------------------------------------------------------------------------------------------
  2694. // HW_ENET_IALR - Descriptor Individual Lower Address Register
  2695. //-------------------------------------------------------------------------------------------
  2696. #ifndef __LANGUAGE_ASM__
  2697. /*!
  2698. * @brief HW_ENET_IALR - Descriptor Individual Lower Address Register (RW)
  2699. *
  2700. * Reset value: 0x00000000U
  2701. *
  2702. * IALR contains the lower 32 bits of the 64-bit individual address hash table.
  2703. * The address recognition process uses this table to check for a possible match
  2704. * with the DA field of receive frames with an individual DA. This register is
  2705. * not reset and you must initialize it.
  2706. */
  2707. typedef union _hw_enet_ialr
  2708. {
  2709. uint32_t U;
  2710. struct _hw_enet_ialr_bitfields
  2711. {
  2712. uint32_t IADDR2 : 32; //!< [31:0]
  2713. } B;
  2714. } hw_enet_ialr_t;
  2715. #endif
  2716. /*!
  2717. * @name Constants and macros for entire ENET_IALR register
  2718. */
  2719. //@{
  2720. #define HW_ENET_IALR_ADDR(x) (REGS_ENET_BASE(x) + 0x11CU)
  2721. #ifndef __LANGUAGE_ASM__
  2722. #define HW_ENET_IALR(x) (*(__IO hw_enet_ialr_t *) HW_ENET_IALR_ADDR(x))
  2723. #define HW_ENET_IALR_RD(x) (HW_ENET_IALR(x).U)
  2724. #define HW_ENET_IALR_WR(x, v) (HW_ENET_IALR(x).U = (v))
  2725. #define HW_ENET_IALR_SET(x, v) (HW_ENET_IALR_WR(x, HW_ENET_IALR_RD(x) | (v)))
  2726. #define HW_ENET_IALR_CLR(x, v) (HW_ENET_IALR_WR(x, HW_ENET_IALR_RD(x) & ~(v)))
  2727. #define HW_ENET_IALR_TOG(x, v) (HW_ENET_IALR_WR(x, HW_ENET_IALR_RD(x) ^ (v)))
  2728. #endif
  2729. //@}
  2730. /*
  2731. * Constants & macros for individual ENET_IALR bitfields
  2732. */
  2733. /*!
  2734. * @name Register ENET_IALR, field IADDR2[31:0] (RW)
  2735. *
  2736. * Contains the lower 32 bits of the 64-bit hash table used in the address
  2737. * recognition process for receive frames with a unicast address. Bit 31 of IADDR2
  2738. * contains hash index bit 31. Bit 0 of IADDR2 contains hash index bit 0.
  2739. */
  2740. //@{
  2741. #define BP_ENET_IALR_IADDR2 (0U) //!< Bit position for ENET_IALR_IADDR2.
  2742. #define BM_ENET_IALR_IADDR2 (0xFFFFFFFFU) //!< Bit mask for ENET_IALR_IADDR2.
  2743. #define BS_ENET_IALR_IADDR2 (32U) //!< Bit field size in bits for ENET_IALR_IADDR2.
  2744. #ifndef __LANGUAGE_ASM__
  2745. //! @brief Read current value of the ENET_IALR_IADDR2 field.
  2746. #define BR_ENET_IALR_IADDR2(x) (HW_ENET_IALR(x).U)
  2747. #endif
  2748. //! @brief Format value for bitfield ENET_IALR_IADDR2.
  2749. #define BF_ENET_IALR_IADDR2(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_IALR_IADDR2), uint32_t) & BM_ENET_IALR_IADDR2)
  2750. #ifndef __LANGUAGE_ASM__
  2751. //! @brief Set the IADDR2 field to a new value.
  2752. #define BW_ENET_IALR_IADDR2(x, v) (HW_ENET_IALR_WR(x, v))
  2753. #endif
  2754. //@}
  2755. //-------------------------------------------------------------------------------------------
  2756. // HW_ENET_GAUR - Descriptor Group Upper Address Register
  2757. //-------------------------------------------------------------------------------------------
  2758. #ifndef __LANGUAGE_ASM__
  2759. /*!
  2760. * @brief HW_ENET_GAUR - Descriptor Group Upper Address Register (RW)
  2761. *
  2762. * Reset value: 0x00000000U
  2763. *
  2764. * GAUR contains the upper 32 bits of the 64-bit hash table used in the address
  2765. * recognition process for receive frames with a multicast address. You must
  2766. * initialize this register.
  2767. */
  2768. typedef union _hw_enet_gaur
  2769. {
  2770. uint32_t U;
  2771. struct _hw_enet_gaur_bitfields
  2772. {
  2773. uint32_t GADDR1 : 32; //!< [31:0]
  2774. } B;
  2775. } hw_enet_gaur_t;
  2776. #endif
  2777. /*!
  2778. * @name Constants and macros for entire ENET_GAUR register
  2779. */
  2780. //@{
  2781. #define HW_ENET_GAUR_ADDR(x) (REGS_ENET_BASE(x) + 0x120U)
  2782. #ifndef __LANGUAGE_ASM__
  2783. #define HW_ENET_GAUR(x) (*(__IO hw_enet_gaur_t *) HW_ENET_GAUR_ADDR(x))
  2784. #define HW_ENET_GAUR_RD(x) (HW_ENET_GAUR(x).U)
  2785. #define HW_ENET_GAUR_WR(x, v) (HW_ENET_GAUR(x).U = (v))
  2786. #define HW_ENET_GAUR_SET(x, v) (HW_ENET_GAUR_WR(x, HW_ENET_GAUR_RD(x) | (v)))
  2787. #define HW_ENET_GAUR_CLR(x, v) (HW_ENET_GAUR_WR(x, HW_ENET_GAUR_RD(x) & ~(v)))
  2788. #define HW_ENET_GAUR_TOG(x, v) (HW_ENET_GAUR_WR(x, HW_ENET_GAUR_RD(x) ^ (v)))
  2789. #endif
  2790. //@}
  2791. /*
  2792. * Constants & macros for individual ENET_GAUR bitfields
  2793. */
  2794. /*!
  2795. * @name Register ENET_GAUR, field GADDR1[31:0] (RW)
  2796. *
  2797. * Contains the upper 32 bits of the 64-bit hash table used in the address
  2798. * recognition process for receive frames with a multicast address. Bit 31 of GADDR1
  2799. * contains hash index bit 63. Bit 0 of GADDR1 contains hash index bit 32.
  2800. */
  2801. //@{
  2802. #define BP_ENET_GAUR_GADDR1 (0U) //!< Bit position for ENET_GAUR_GADDR1.
  2803. #define BM_ENET_GAUR_GADDR1 (0xFFFFFFFFU) //!< Bit mask for ENET_GAUR_GADDR1.
  2804. #define BS_ENET_GAUR_GADDR1 (32U) //!< Bit field size in bits for ENET_GAUR_GADDR1.
  2805. #ifndef __LANGUAGE_ASM__
  2806. //! @brief Read current value of the ENET_GAUR_GADDR1 field.
  2807. #define BR_ENET_GAUR_GADDR1(x) (HW_ENET_GAUR(x).U)
  2808. #endif
  2809. //! @brief Format value for bitfield ENET_GAUR_GADDR1.
  2810. #define BF_ENET_GAUR_GADDR1(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_GAUR_GADDR1), uint32_t) & BM_ENET_GAUR_GADDR1)
  2811. #ifndef __LANGUAGE_ASM__
  2812. //! @brief Set the GADDR1 field to a new value.
  2813. #define BW_ENET_GAUR_GADDR1(x, v) (HW_ENET_GAUR_WR(x, v))
  2814. #endif
  2815. //@}
  2816. //-------------------------------------------------------------------------------------------
  2817. // HW_ENET_GALR - Descriptor Group Lower Address Register
  2818. //-------------------------------------------------------------------------------------------
  2819. #ifndef __LANGUAGE_ASM__
  2820. /*!
  2821. * @brief HW_ENET_GALR - Descriptor Group Lower Address Register (RW)
  2822. *
  2823. * Reset value: 0x00000000U
  2824. *
  2825. * GALR contains the lower 32 bits of the 64-bit hash table used in the address
  2826. * recognition process for receive frames with a multicast address. You must
  2827. * initialize this register.
  2828. */
  2829. typedef union _hw_enet_galr
  2830. {
  2831. uint32_t U;
  2832. struct _hw_enet_galr_bitfields
  2833. {
  2834. uint32_t GADDR2 : 32; //!< [31:0]
  2835. } B;
  2836. } hw_enet_galr_t;
  2837. #endif
  2838. /*!
  2839. * @name Constants and macros for entire ENET_GALR register
  2840. */
  2841. //@{
  2842. #define HW_ENET_GALR_ADDR(x) (REGS_ENET_BASE(x) + 0x124U)
  2843. #ifndef __LANGUAGE_ASM__
  2844. #define HW_ENET_GALR(x) (*(__IO hw_enet_galr_t *) HW_ENET_GALR_ADDR(x))
  2845. #define HW_ENET_GALR_RD(x) (HW_ENET_GALR(x).U)
  2846. #define HW_ENET_GALR_WR(x, v) (HW_ENET_GALR(x).U = (v))
  2847. #define HW_ENET_GALR_SET(x, v) (HW_ENET_GALR_WR(x, HW_ENET_GALR_RD(x) | (v)))
  2848. #define HW_ENET_GALR_CLR(x, v) (HW_ENET_GALR_WR(x, HW_ENET_GALR_RD(x) & ~(v)))
  2849. #define HW_ENET_GALR_TOG(x, v) (HW_ENET_GALR_WR(x, HW_ENET_GALR_RD(x) ^ (v)))
  2850. #endif
  2851. //@}
  2852. /*
  2853. * Constants & macros for individual ENET_GALR bitfields
  2854. */
  2855. /*!
  2856. * @name Register ENET_GALR, field GADDR2[31:0] (RW)
  2857. *
  2858. * Contains the lower 32 bits of the 64-bit hash table used in the address
  2859. * recognition process for receive frames with a multicast address. Bit 31 of GADDR2
  2860. * contains hash index bit 31. Bit 0 of GADDR2 contains hash index bit 0.
  2861. */
  2862. //@{
  2863. #define BP_ENET_GALR_GADDR2 (0U) //!< Bit position for ENET_GALR_GADDR2.
  2864. #define BM_ENET_GALR_GADDR2 (0xFFFFFFFFU) //!< Bit mask for ENET_GALR_GADDR2.
  2865. #define BS_ENET_GALR_GADDR2 (32U) //!< Bit field size in bits for ENET_GALR_GADDR2.
  2866. #ifndef __LANGUAGE_ASM__
  2867. //! @brief Read current value of the ENET_GALR_GADDR2 field.
  2868. #define BR_ENET_GALR_GADDR2(x) (HW_ENET_GALR(x).U)
  2869. #endif
  2870. //! @brief Format value for bitfield ENET_GALR_GADDR2.
  2871. #define BF_ENET_GALR_GADDR2(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_GALR_GADDR2), uint32_t) & BM_ENET_GALR_GADDR2)
  2872. #ifndef __LANGUAGE_ASM__
  2873. //! @brief Set the GADDR2 field to a new value.
  2874. #define BW_ENET_GALR_GADDR2(x, v) (HW_ENET_GALR_WR(x, v))
  2875. #endif
  2876. //@}
  2877. //-------------------------------------------------------------------------------------------
  2878. // HW_ENET_TFWR - Transmit FIFO Watermark Register
  2879. //-------------------------------------------------------------------------------------------
  2880. #ifndef __LANGUAGE_ASM__
  2881. /*!
  2882. * @brief HW_ENET_TFWR - Transmit FIFO Watermark Register (RW)
  2883. *
  2884. * Reset value: 0x00000000U
  2885. *
  2886. * If TFWR[STRFWD] is cleared, TFWR[TFWR] controls the amount of data required
  2887. * in the transmit FIFO before transmission of a frame can begin. This allows you
  2888. * to minimize transmit latency (TFWR = 00 or 01) or allow for larger bus access
  2889. * latency (TFWR = 11) due to contention for the system bus. Setting the
  2890. * watermark to a high value minimizes the risk of transmit FIFO underrun due to
  2891. * contention for the system bus. The byte counts associated with the TFWR field may need
  2892. * to be modified to match a given system requirement. For example, worst case
  2893. * bus access latency by the transmit data DMA channel. When the FIFO level
  2894. * reaches the value the TFWR field and when the STR_FWD is set to '0', the MAC
  2895. * transmit control logic starts frame transmission even before the end-of-frame is
  2896. * available in the FIFO (cut-through operation). If a complete frame has a size
  2897. * smaller than the threshold programmed with TFWR, the MAC also transmits the Frame
  2898. * to the line. To enable store and forward on the Transmit path, set STR_FWD to
  2899. * '1'. In this case, the MAC starts to transmit data only when a complete frame
  2900. * is stored in the Transmit FIFO.
  2901. */
  2902. typedef union _hw_enet_tfwr
  2903. {
  2904. uint32_t U;
  2905. struct _hw_enet_tfwr_bitfields
  2906. {
  2907. uint32_t TFWR : 6; //!< [5:0] Transmit FIFO Write
  2908. uint32_t RESERVED0 : 2; //!< [7:6]
  2909. uint32_t STRFWD : 1; //!< [8] Store And Forward Enable
  2910. uint32_t RESERVED1 : 23; //!< [31:9]
  2911. } B;
  2912. } hw_enet_tfwr_t;
  2913. #endif
  2914. /*!
  2915. * @name Constants and macros for entire ENET_TFWR register
  2916. */
  2917. //@{
  2918. #define HW_ENET_TFWR_ADDR(x) (REGS_ENET_BASE(x) + 0x144U)
  2919. #ifndef __LANGUAGE_ASM__
  2920. #define HW_ENET_TFWR(x) (*(__IO hw_enet_tfwr_t *) HW_ENET_TFWR_ADDR(x))
  2921. #define HW_ENET_TFWR_RD(x) (HW_ENET_TFWR(x).U)
  2922. #define HW_ENET_TFWR_WR(x, v) (HW_ENET_TFWR(x).U = (v))
  2923. #define HW_ENET_TFWR_SET(x, v) (HW_ENET_TFWR_WR(x, HW_ENET_TFWR_RD(x) | (v)))
  2924. #define HW_ENET_TFWR_CLR(x, v) (HW_ENET_TFWR_WR(x, HW_ENET_TFWR_RD(x) & ~(v)))
  2925. #define HW_ENET_TFWR_TOG(x, v) (HW_ENET_TFWR_WR(x, HW_ENET_TFWR_RD(x) ^ (v)))
  2926. #endif
  2927. //@}
  2928. /*
  2929. * Constants & macros for individual ENET_TFWR bitfields
  2930. */
  2931. /*!
  2932. * @name Register ENET_TFWR, field TFWR[5:0] (RW)
  2933. *
  2934. * If TFWR[STRFWD] is cleared, this field indicates the number of bytes, in
  2935. * steps of 64 bytes, written to the transmit FIFO before transmission of a frame
  2936. * begins. If a frame with less than the threshold is written, it is still sent
  2937. * independently of this threshold setting. The threshold is relevant only if the
  2938. * frame is larger than the threshold given. This chip may not support the maximum
  2939. * number of bytes written shown below. See the chip-specific information for the
  2940. * ENET module for this value.
  2941. *
  2942. * Values:
  2943. * - 000000 - 64 bytes written.
  2944. * - 000001 - 64 bytes written.
  2945. * - 000010 - 128 bytes written.
  2946. * - 000011 - 192 bytes written.
  2947. * - 111110 - 3968 bytes written.
  2948. * - 111111 - 4032 bytes written.
  2949. */
  2950. //@{
  2951. #define BP_ENET_TFWR_TFWR (0U) //!< Bit position for ENET_TFWR_TFWR.
  2952. #define BM_ENET_TFWR_TFWR (0x0000003FU) //!< Bit mask for ENET_TFWR_TFWR.
  2953. #define BS_ENET_TFWR_TFWR (6U) //!< Bit field size in bits for ENET_TFWR_TFWR.
  2954. #ifndef __LANGUAGE_ASM__
  2955. //! @brief Read current value of the ENET_TFWR_TFWR field.
  2956. #define BR_ENET_TFWR_TFWR(x) (HW_ENET_TFWR(x).B.TFWR)
  2957. #endif
  2958. //! @brief Format value for bitfield ENET_TFWR_TFWR.
  2959. #define BF_ENET_TFWR_TFWR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TFWR_TFWR), uint32_t) & BM_ENET_TFWR_TFWR)
  2960. #ifndef __LANGUAGE_ASM__
  2961. //! @brief Set the TFWR field to a new value.
  2962. #define BW_ENET_TFWR_TFWR(x, v) (HW_ENET_TFWR_WR(x, (HW_ENET_TFWR_RD(x) & ~BM_ENET_TFWR_TFWR) | BF_ENET_TFWR_TFWR(v)))
  2963. #endif
  2964. //@}
  2965. /*!
  2966. * @name Register ENET_TFWR, field STRFWD[8] (RW)
  2967. *
  2968. * Values:
  2969. * - 0 - Reset. The transmission start threshold is programmed in TFWR[TFWR].
  2970. * - 1 - Enabled.
  2971. */
  2972. //@{
  2973. #define BP_ENET_TFWR_STRFWD (8U) //!< Bit position for ENET_TFWR_STRFWD.
  2974. #define BM_ENET_TFWR_STRFWD (0x00000100U) //!< Bit mask for ENET_TFWR_STRFWD.
  2975. #define BS_ENET_TFWR_STRFWD (1U) //!< Bit field size in bits for ENET_TFWR_STRFWD.
  2976. #ifndef __LANGUAGE_ASM__
  2977. //! @brief Read current value of the ENET_TFWR_STRFWD field.
  2978. #define BR_ENET_TFWR_STRFWD(x) (BITBAND_ACCESS32(HW_ENET_TFWR_ADDR(x), BP_ENET_TFWR_STRFWD))
  2979. #endif
  2980. //! @brief Format value for bitfield ENET_TFWR_STRFWD.
  2981. #define BF_ENET_TFWR_STRFWD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TFWR_STRFWD), uint32_t) & BM_ENET_TFWR_STRFWD)
  2982. #ifndef __LANGUAGE_ASM__
  2983. //! @brief Set the STRFWD field to a new value.
  2984. #define BW_ENET_TFWR_STRFWD(x, v) (BITBAND_ACCESS32(HW_ENET_TFWR_ADDR(x), BP_ENET_TFWR_STRFWD) = (v))
  2985. #endif
  2986. //@}
  2987. //-------------------------------------------------------------------------------------------
  2988. // HW_ENET_RDSR - Receive Descriptor Ring Start Register
  2989. //-------------------------------------------------------------------------------------------
  2990. #ifndef __LANGUAGE_ASM__
  2991. /*!
  2992. * @brief HW_ENET_RDSR - Receive Descriptor Ring Start Register (RW)
  2993. *
  2994. * Reset value: 0x00000000U
  2995. *
  2996. * RDSR points to the beginning of the circular receive buffer descriptor queue
  2997. * in external memory. This pointer must be 64-bit aligned (bits 2-0 must be
  2998. * zero); however, it is recommended to be 128-bit aligned, that is, evenly divisible
  2999. * by 16. This register must be initialized prior to operation
  3000. */
  3001. typedef union _hw_enet_rdsr
  3002. {
  3003. uint32_t U;
  3004. struct _hw_enet_rdsr_bitfields
  3005. {
  3006. uint32_t RESERVED0 : 3; //!< [2:0]
  3007. uint32_t R_DES_START : 29; //!< [31:3]
  3008. } B;
  3009. } hw_enet_rdsr_t;
  3010. #endif
  3011. /*!
  3012. * @name Constants and macros for entire ENET_RDSR register
  3013. */
  3014. //@{
  3015. #define HW_ENET_RDSR_ADDR(x) (REGS_ENET_BASE(x) + 0x180U)
  3016. #ifndef __LANGUAGE_ASM__
  3017. #define HW_ENET_RDSR(x) (*(__IO hw_enet_rdsr_t *) HW_ENET_RDSR_ADDR(x))
  3018. #define HW_ENET_RDSR_RD(x) (HW_ENET_RDSR(x).U)
  3019. #define HW_ENET_RDSR_WR(x, v) (HW_ENET_RDSR(x).U = (v))
  3020. #define HW_ENET_RDSR_SET(x, v) (HW_ENET_RDSR_WR(x, HW_ENET_RDSR_RD(x) | (v)))
  3021. #define HW_ENET_RDSR_CLR(x, v) (HW_ENET_RDSR_WR(x, HW_ENET_RDSR_RD(x) & ~(v)))
  3022. #define HW_ENET_RDSR_TOG(x, v) (HW_ENET_RDSR_WR(x, HW_ENET_RDSR_RD(x) ^ (v)))
  3023. #endif
  3024. //@}
  3025. /*
  3026. * Constants & macros for individual ENET_RDSR bitfields
  3027. */
  3028. /*!
  3029. * @name Register ENET_RDSR, field R_DES_START[31:3] (RW)
  3030. *
  3031. * Pointer to the beginning of the receive buffer descriptor queue.
  3032. */
  3033. //@{
  3034. #define BP_ENET_RDSR_R_DES_START (3U) //!< Bit position for ENET_RDSR_R_DES_START.
  3035. #define BM_ENET_RDSR_R_DES_START (0xFFFFFFF8U) //!< Bit mask for ENET_RDSR_R_DES_START.
  3036. #define BS_ENET_RDSR_R_DES_START (29U) //!< Bit field size in bits for ENET_RDSR_R_DES_START.
  3037. #ifndef __LANGUAGE_ASM__
  3038. //! @brief Read current value of the ENET_RDSR_R_DES_START field.
  3039. #define BR_ENET_RDSR_R_DES_START(x) (HW_ENET_RDSR(x).B.R_DES_START)
  3040. #endif
  3041. //! @brief Format value for bitfield ENET_RDSR_R_DES_START.
  3042. #define BF_ENET_RDSR_R_DES_START(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RDSR_R_DES_START), uint32_t) & BM_ENET_RDSR_R_DES_START)
  3043. #ifndef __LANGUAGE_ASM__
  3044. //! @brief Set the R_DES_START field to a new value.
  3045. #define BW_ENET_RDSR_R_DES_START(x, v) (HW_ENET_RDSR_WR(x, (HW_ENET_RDSR_RD(x) & ~BM_ENET_RDSR_R_DES_START) | BF_ENET_RDSR_R_DES_START(v)))
  3046. #endif
  3047. //@}
  3048. //-------------------------------------------------------------------------------------------
  3049. // HW_ENET_TDSR - Transmit Buffer Descriptor Ring Start Register
  3050. //-------------------------------------------------------------------------------------------
  3051. #ifndef __LANGUAGE_ASM__
  3052. /*!
  3053. * @brief HW_ENET_TDSR - Transmit Buffer Descriptor Ring Start Register (RW)
  3054. *
  3055. * Reset value: 0x00000000U
  3056. *
  3057. * TDSR provides a pointer to the beginning of the circular transmit buffer
  3058. * descriptor queue in external memory. This pointer must be 64-bit aligned (bits 2-0
  3059. * must be zero); however, it is recommended to be 128-bit aligned, that is,
  3060. * evenly divisible by 16. This register must be initialized prior to operation.
  3061. */
  3062. typedef union _hw_enet_tdsr
  3063. {
  3064. uint32_t U;
  3065. struct _hw_enet_tdsr_bitfields
  3066. {
  3067. uint32_t RESERVED0 : 3; //!< [2:0]
  3068. uint32_t X_DES_START : 29; //!< [31:3]
  3069. } B;
  3070. } hw_enet_tdsr_t;
  3071. #endif
  3072. /*!
  3073. * @name Constants and macros for entire ENET_TDSR register
  3074. */
  3075. //@{
  3076. #define HW_ENET_TDSR_ADDR(x) (REGS_ENET_BASE(x) + 0x184U)
  3077. #ifndef __LANGUAGE_ASM__
  3078. #define HW_ENET_TDSR(x) (*(__IO hw_enet_tdsr_t *) HW_ENET_TDSR_ADDR(x))
  3079. #define HW_ENET_TDSR_RD(x) (HW_ENET_TDSR(x).U)
  3080. #define HW_ENET_TDSR_WR(x, v) (HW_ENET_TDSR(x).U = (v))
  3081. #define HW_ENET_TDSR_SET(x, v) (HW_ENET_TDSR_WR(x, HW_ENET_TDSR_RD(x) | (v)))
  3082. #define HW_ENET_TDSR_CLR(x, v) (HW_ENET_TDSR_WR(x, HW_ENET_TDSR_RD(x) & ~(v)))
  3083. #define HW_ENET_TDSR_TOG(x, v) (HW_ENET_TDSR_WR(x, HW_ENET_TDSR_RD(x) ^ (v)))
  3084. #endif
  3085. //@}
  3086. /*
  3087. * Constants & macros for individual ENET_TDSR bitfields
  3088. */
  3089. /*!
  3090. * @name Register ENET_TDSR, field X_DES_START[31:3] (RW)
  3091. *
  3092. * Pointer to the beginning of the transmit buffer descriptor queue.
  3093. */
  3094. //@{
  3095. #define BP_ENET_TDSR_X_DES_START (3U) //!< Bit position for ENET_TDSR_X_DES_START.
  3096. #define BM_ENET_TDSR_X_DES_START (0xFFFFFFF8U) //!< Bit mask for ENET_TDSR_X_DES_START.
  3097. #define BS_ENET_TDSR_X_DES_START (29U) //!< Bit field size in bits for ENET_TDSR_X_DES_START.
  3098. #ifndef __LANGUAGE_ASM__
  3099. //! @brief Read current value of the ENET_TDSR_X_DES_START field.
  3100. #define BR_ENET_TDSR_X_DES_START(x) (HW_ENET_TDSR(x).B.X_DES_START)
  3101. #endif
  3102. //! @brief Format value for bitfield ENET_TDSR_X_DES_START.
  3103. #define BF_ENET_TDSR_X_DES_START(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TDSR_X_DES_START), uint32_t) & BM_ENET_TDSR_X_DES_START)
  3104. #ifndef __LANGUAGE_ASM__
  3105. //! @brief Set the X_DES_START field to a new value.
  3106. #define BW_ENET_TDSR_X_DES_START(x, v) (HW_ENET_TDSR_WR(x, (HW_ENET_TDSR_RD(x) & ~BM_ENET_TDSR_X_DES_START) | BF_ENET_TDSR_X_DES_START(v)))
  3107. #endif
  3108. //@}
  3109. //-------------------------------------------------------------------------------------------
  3110. // HW_ENET_MRBR - Maximum Receive Buffer Size Register
  3111. //-------------------------------------------------------------------------------------------
  3112. #ifndef __LANGUAGE_ASM__
  3113. /*!
  3114. * @brief HW_ENET_MRBR - Maximum Receive Buffer Size Register (RW)
  3115. *
  3116. * Reset value: 0x00000000U
  3117. *
  3118. * The MRBR is a user-programmable register that dictates the maximum size of
  3119. * all receive buffers. This value should take into consideration that the receive
  3120. * CRC is always written into the last receive buffer. To allow one maximum size
  3121. * frame per buffer, MRBR must be set to RCR[MAX_FL] or larger. To properly align
  3122. * the buffer, MRBR must be evenly divisible by 16. To ensure this, bits 3-0 are
  3123. * set to zero by the device. To minimize bus usage (descriptor fetches), set
  3124. * MRBR greater than or equal to 256 bytes. This register must be initialized
  3125. * before operation.
  3126. */
  3127. typedef union _hw_enet_mrbr
  3128. {
  3129. uint32_t U;
  3130. struct _hw_enet_mrbr_bitfields
  3131. {
  3132. uint32_t RESERVED0 : 4; //!< [3:0]
  3133. uint32_t R_BUF_SIZE : 10; //!< [13:4]
  3134. uint32_t RESERVED1 : 18; //!< [31:14]
  3135. } B;
  3136. } hw_enet_mrbr_t;
  3137. #endif
  3138. /*!
  3139. * @name Constants and macros for entire ENET_MRBR register
  3140. */
  3141. //@{
  3142. #define HW_ENET_MRBR_ADDR(x) (REGS_ENET_BASE(x) + 0x188U)
  3143. #ifndef __LANGUAGE_ASM__
  3144. #define HW_ENET_MRBR(x) (*(__IO hw_enet_mrbr_t *) HW_ENET_MRBR_ADDR(x))
  3145. #define HW_ENET_MRBR_RD(x) (HW_ENET_MRBR(x).U)
  3146. #define HW_ENET_MRBR_WR(x, v) (HW_ENET_MRBR(x).U = (v))
  3147. #define HW_ENET_MRBR_SET(x, v) (HW_ENET_MRBR_WR(x, HW_ENET_MRBR_RD(x) | (v)))
  3148. #define HW_ENET_MRBR_CLR(x, v) (HW_ENET_MRBR_WR(x, HW_ENET_MRBR_RD(x) & ~(v)))
  3149. #define HW_ENET_MRBR_TOG(x, v) (HW_ENET_MRBR_WR(x, HW_ENET_MRBR_RD(x) ^ (v)))
  3150. #endif
  3151. //@}
  3152. /*
  3153. * Constants & macros for individual ENET_MRBR bitfields
  3154. */
  3155. /*!
  3156. * @name Register ENET_MRBR, field R_BUF_SIZE[13:4] (RW)
  3157. *
  3158. * Receive buffer size in bytes.
  3159. */
  3160. //@{
  3161. #define BP_ENET_MRBR_R_BUF_SIZE (4U) //!< Bit position for ENET_MRBR_R_BUF_SIZE.
  3162. #define BM_ENET_MRBR_R_BUF_SIZE (0x00003FF0U) //!< Bit mask for ENET_MRBR_R_BUF_SIZE.
  3163. #define BS_ENET_MRBR_R_BUF_SIZE (10U) //!< Bit field size in bits for ENET_MRBR_R_BUF_SIZE.
  3164. #ifndef __LANGUAGE_ASM__
  3165. //! @brief Read current value of the ENET_MRBR_R_BUF_SIZE field.
  3166. #define BR_ENET_MRBR_R_BUF_SIZE(x) (HW_ENET_MRBR(x).B.R_BUF_SIZE)
  3167. #endif
  3168. //! @brief Format value for bitfield ENET_MRBR_R_BUF_SIZE.
  3169. #define BF_ENET_MRBR_R_BUF_SIZE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_MRBR_R_BUF_SIZE), uint32_t) & BM_ENET_MRBR_R_BUF_SIZE)
  3170. #ifndef __LANGUAGE_ASM__
  3171. //! @brief Set the R_BUF_SIZE field to a new value.
  3172. #define BW_ENET_MRBR_R_BUF_SIZE(x, v) (HW_ENET_MRBR_WR(x, (HW_ENET_MRBR_RD(x) & ~BM_ENET_MRBR_R_BUF_SIZE) | BF_ENET_MRBR_R_BUF_SIZE(v)))
  3173. #endif
  3174. //@}
  3175. //-------------------------------------------------------------------------------------------
  3176. // HW_ENET_RSFL - Receive FIFO Section Full Threshold
  3177. //-------------------------------------------------------------------------------------------
  3178. #ifndef __LANGUAGE_ASM__
  3179. /*!
  3180. * @brief HW_ENET_RSFL - Receive FIFO Section Full Threshold (RW)
  3181. *
  3182. * Reset value: 0x00000000U
  3183. */
  3184. typedef union _hw_enet_rsfl
  3185. {
  3186. uint32_t U;
  3187. struct _hw_enet_rsfl_bitfields
  3188. {
  3189. uint32_t RX_SECTION_FULL : 8; //!< [7:0] Value Of Receive FIFO
  3190. //! Section Full Threshold
  3191. uint32_t RESERVED0 : 24; //!< [31:8]
  3192. } B;
  3193. } hw_enet_rsfl_t;
  3194. #endif
  3195. /*!
  3196. * @name Constants and macros for entire ENET_RSFL register
  3197. */
  3198. //@{
  3199. #define HW_ENET_RSFL_ADDR(x) (REGS_ENET_BASE(x) + 0x190U)
  3200. #ifndef __LANGUAGE_ASM__
  3201. #define HW_ENET_RSFL(x) (*(__IO hw_enet_rsfl_t *) HW_ENET_RSFL_ADDR(x))
  3202. #define HW_ENET_RSFL_RD(x) (HW_ENET_RSFL(x).U)
  3203. #define HW_ENET_RSFL_WR(x, v) (HW_ENET_RSFL(x).U = (v))
  3204. #define HW_ENET_RSFL_SET(x, v) (HW_ENET_RSFL_WR(x, HW_ENET_RSFL_RD(x) | (v)))
  3205. #define HW_ENET_RSFL_CLR(x, v) (HW_ENET_RSFL_WR(x, HW_ENET_RSFL_RD(x) & ~(v)))
  3206. #define HW_ENET_RSFL_TOG(x, v) (HW_ENET_RSFL_WR(x, HW_ENET_RSFL_RD(x) ^ (v)))
  3207. #endif
  3208. //@}
  3209. /*
  3210. * Constants & macros for individual ENET_RSFL bitfields
  3211. */
  3212. /*!
  3213. * @name Register ENET_RSFL, field RX_SECTION_FULL[7:0] (RW)
  3214. *
  3215. * Value, in 64-bit words, of the receive FIFO section full threshold. Clear
  3216. * this field to enable store and forward on the RX FIFO. When programming a value
  3217. * greater than 0 (cut-through operation), it must be greater than
  3218. * RAEM[RX_ALMOST_EMPTY]. When the FIFO level reaches the value in this field, data is available
  3219. * in the Receive FIFO (cut-through operation).
  3220. */
  3221. //@{
  3222. #define BP_ENET_RSFL_RX_SECTION_FULL (0U) //!< Bit position for ENET_RSFL_RX_SECTION_FULL.
  3223. #define BM_ENET_RSFL_RX_SECTION_FULL (0x000000FFU) //!< Bit mask for ENET_RSFL_RX_SECTION_FULL.
  3224. #define BS_ENET_RSFL_RX_SECTION_FULL (8U) //!< Bit field size in bits for ENET_RSFL_RX_SECTION_FULL.
  3225. #ifndef __LANGUAGE_ASM__
  3226. //! @brief Read current value of the ENET_RSFL_RX_SECTION_FULL field.
  3227. #define BR_ENET_RSFL_RX_SECTION_FULL(x) (HW_ENET_RSFL(x).B.RX_SECTION_FULL)
  3228. #endif
  3229. //! @brief Format value for bitfield ENET_RSFL_RX_SECTION_FULL.
  3230. #define BF_ENET_RSFL_RX_SECTION_FULL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RSFL_RX_SECTION_FULL), uint32_t) & BM_ENET_RSFL_RX_SECTION_FULL)
  3231. #ifndef __LANGUAGE_ASM__
  3232. //! @brief Set the RX_SECTION_FULL field to a new value.
  3233. #define BW_ENET_RSFL_RX_SECTION_FULL(x, v) (HW_ENET_RSFL_WR(x, (HW_ENET_RSFL_RD(x) & ~BM_ENET_RSFL_RX_SECTION_FULL) | BF_ENET_RSFL_RX_SECTION_FULL(v)))
  3234. #endif
  3235. //@}
  3236. //-------------------------------------------------------------------------------------------
  3237. // HW_ENET_RSEM - Receive FIFO Section Empty Threshold
  3238. //-------------------------------------------------------------------------------------------
  3239. #ifndef __LANGUAGE_ASM__
  3240. /*!
  3241. * @brief HW_ENET_RSEM - Receive FIFO Section Empty Threshold (RW)
  3242. *
  3243. * Reset value: 0x00000000U
  3244. */
  3245. typedef union _hw_enet_rsem
  3246. {
  3247. uint32_t U;
  3248. struct _hw_enet_rsem_bitfields
  3249. {
  3250. uint32_t RX_SECTION_EMPTY : 8; //!< [7:0] Value Of The Receive FIFO
  3251. //! Section Empty Threshold
  3252. uint32_t RESERVED0 : 8; //!< [15:8]
  3253. uint32_t STAT_SECTION_EMPTY : 5; //!< [20:16] RX Status FIFO Section
  3254. //! Empty Threshold
  3255. uint32_t RESERVED1 : 11; //!< [31:21]
  3256. } B;
  3257. } hw_enet_rsem_t;
  3258. #endif
  3259. /*!
  3260. * @name Constants and macros for entire ENET_RSEM register
  3261. */
  3262. //@{
  3263. #define HW_ENET_RSEM_ADDR(x) (REGS_ENET_BASE(x) + 0x194U)
  3264. #ifndef __LANGUAGE_ASM__
  3265. #define HW_ENET_RSEM(x) (*(__IO hw_enet_rsem_t *) HW_ENET_RSEM_ADDR(x))
  3266. #define HW_ENET_RSEM_RD(x) (HW_ENET_RSEM(x).U)
  3267. #define HW_ENET_RSEM_WR(x, v) (HW_ENET_RSEM(x).U = (v))
  3268. #define HW_ENET_RSEM_SET(x, v) (HW_ENET_RSEM_WR(x, HW_ENET_RSEM_RD(x) | (v)))
  3269. #define HW_ENET_RSEM_CLR(x, v) (HW_ENET_RSEM_WR(x, HW_ENET_RSEM_RD(x) & ~(v)))
  3270. #define HW_ENET_RSEM_TOG(x, v) (HW_ENET_RSEM_WR(x, HW_ENET_RSEM_RD(x) ^ (v)))
  3271. #endif
  3272. //@}
  3273. /*
  3274. * Constants & macros for individual ENET_RSEM bitfields
  3275. */
  3276. /*!
  3277. * @name Register ENET_RSEM, field RX_SECTION_EMPTY[7:0] (RW)
  3278. *
  3279. * Value, in 64-bit words, of the receive FIFO section empty threshold. When the
  3280. * FIFO has reached this level, a pause frame will be issued. A value of 0
  3281. * disables automatic pause frame generation. When the FIFO level goes below the value
  3282. * programmed in this field, an XON pause frame is issued to indicate the FIFO
  3283. * congestion is cleared to the remote Ethernet client. The section-empty
  3284. * threshold indications from both FIFOs are OR'ed to cause XOFF pause frame generation.
  3285. */
  3286. //@{
  3287. #define BP_ENET_RSEM_RX_SECTION_EMPTY (0U) //!< Bit position for ENET_RSEM_RX_SECTION_EMPTY.
  3288. #define BM_ENET_RSEM_RX_SECTION_EMPTY (0x000000FFU) //!< Bit mask for ENET_RSEM_RX_SECTION_EMPTY.
  3289. #define BS_ENET_RSEM_RX_SECTION_EMPTY (8U) //!< Bit field size in bits for ENET_RSEM_RX_SECTION_EMPTY.
  3290. #ifndef __LANGUAGE_ASM__
  3291. //! @brief Read current value of the ENET_RSEM_RX_SECTION_EMPTY field.
  3292. #define BR_ENET_RSEM_RX_SECTION_EMPTY(x) (HW_ENET_RSEM(x).B.RX_SECTION_EMPTY)
  3293. #endif
  3294. //! @brief Format value for bitfield ENET_RSEM_RX_SECTION_EMPTY.
  3295. #define BF_ENET_RSEM_RX_SECTION_EMPTY(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RSEM_RX_SECTION_EMPTY), uint32_t) & BM_ENET_RSEM_RX_SECTION_EMPTY)
  3296. #ifndef __LANGUAGE_ASM__
  3297. //! @brief Set the RX_SECTION_EMPTY field to a new value.
  3298. #define BW_ENET_RSEM_RX_SECTION_EMPTY(x, v) (HW_ENET_RSEM_WR(x, (HW_ENET_RSEM_RD(x) & ~BM_ENET_RSEM_RX_SECTION_EMPTY) | BF_ENET_RSEM_RX_SECTION_EMPTY(v)))
  3299. #endif
  3300. //@}
  3301. /*!
  3302. * @name Register ENET_RSEM, field STAT_SECTION_EMPTY[20:16] (RW)
  3303. *
  3304. * Defines number of frames in the receive FIFO, independent of its size, that
  3305. * can be accepted. If the limit is reached, reception will continue normally,
  3306. * however a pause frame will be triggered to indicate a possible congestion to the
  3307. * remote device to avoid FIFO overflow. A value of 0 disables automatic pause
  3308. * frame generation
  3309. */
  3310. //@{
  3311. #define BP_ENET_RSEM_STAT_SECTION_EMPTY (16U) //!< Bit position for ENET_RSEM_STAT_SECTION_EMPTY.
  3312. #define BM_ENET_RSEM_STAT_SECTION_EMPTY (0x001F0000U) //!< Bit mask for ENET_RSEM_STAT_SECTION_EMPTY.
  3313. #define BS_ENET_RSEM_STAT_SECTION_EMPTY (5U) //!< Bit field size in bits for ENET_RSEM_STAT_SECTION_EMPTY.
  3314. #ifndef __LANGUAGE_ASM__
  3315. //! @brief Read current value of the ENET_RSEM_STAT_SECTION_EMPTY field.
  3316. #define BR_ENET_RSEM_STAT_SECTION_EMPTY(x) (HW_ENET_RSEM(x).B.STAT_SECTION_EMPTY)
  3317. #endif
  3318. //! @brief Format value for bitfield ENET_RSEM_STAT_SECTION_EMPTY.
  3319. #define BF_ENET_RSEM_STAT_SECTION_EMPTY(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RSEM_STAT_SECTION_EMPTY), uint32_t) & BM_ENET_RSEM_STAT_SECTION_EMPTY)
  3320. #ifndef __LANGUAGE_ASM__
  3321. //! @brief Set the STAT_SECTION_EMPTY field to a new value.
  3322. #define BW_ENET_RSEM_STAT_SECTION_EMPTY(x, v) (HW_ENET_RSEM_WR(x, (HW_ENET_RSEM_RD(x) & ~BM_ENET_RSEM_STAT_SECTION_EMPTY) | BF_ENET_RSEM_STAT_SECTION_EMPTY(v)))
  3323. #endif
  3324. //@}
  3325. //-------------------------------------------------------------------------------------------
  3326. // HW_ENET_RAEM - Receive FIFO Almost Empty Threshold
  3327. //-------------------------------------------------------------------------------------------
  3328. #ifndef __LANGUAGE_ASM__
  3329. /*!
  3330. * @brief HW_ENET_RAEM - Receive FIFO Almost Empty Threshold (RW)
  3331. *
  3332. * Reset value: 0x00000004U
  3333. */
  3334. typedef union _hw_enet_raem
  3335. {
  3336. uint32_t U;
  3337. struct _hw_enet_raem_bitfields
  3338. {
  3339. uint32_t RX_ALMOST_EMPTY : 8; //!< [7:0] Value Of The Receive FIFO
  3340. //! Almost Empty Threshold
  3341. uint32_t RESERVED0 : 24; //!< [31:8]
  3342. } B;
  3343. } hw_enet_raem_t;
  3344. #endif
  3345. /*!
  3346. * @name Constants and macros for entire ENET_RAEM register
  3347. */
  3348. //@{
  3349. #define HW_ENET_RAEM_ADDR(x) (REGS_ENET_BASE(x) + 0x198U)
  3350. #ifndef __LANGUAGE_ASM__
  3351. #define HW_ENET_RAEM(x) (*(__IO hw_enet_raem_t *) HW_ENET_RAEM_ADDR(x))
  3352. #define HW_ENET_RAEM_RD(x) (HW_ENET_RAEM(x).U)
  3353. #define HW_ENET_RAEM_WR(x, v) (HW_ENET_RAEM(x).U = (v))
  3354. #define HW_ENET_RAEM_SET(x, v) (HW_ENET_RAEM_WR(x, HW_ENET_RAEM_RD(x) | (v)))
  3355. #define HW_ENET_RAEM_CLR(x, v) (HW_ENET_RAEM_WR(x, HW_ENET_RAEM_RD(x) & ~(v)))
  3356. #define HW_ENET_RAEM_TOG(x, v) (HW_ENET_RAEM_WR(x, HW_ENET_RAEM_RD(x) ^ (v)))
  3357. #endif
  3358. //@}
  3359. /*
  3360. * Constants & macros for individual ENET_RAEM bitfields
  3361. */
  3362. /*!
  3363. * @name Register ENET_RAEM, field RX_ALMOST_EMPTY[7:0] (RW)
  3364. *
  3365. * Value, in 64-bit words, of the receive FIFO almost empty threshold. When the
  3366. * FIFO level reaches the value programmed in this field and the end-of-frame has
  3367. * not been received for the frame yet, the core receive read control stops FIFO
  3368. * read (and subsequently stops transferring data to the MAC client
  3369. * application). It continues to deliver the frame, if again more data than the threshold or
  3370. * the end-of-frame is available in the FIFO. A minimum value of 4 should be set.
  3371. */
  3372. //@{
  3373. #define BP_ENET_RAEM_RX_ALMOST_EMPTY (0U) //!< Bit position for ENET_RAEM_RX_ALMOST_EMPTY.
  3374. #define BM_ENET_RAEM_RX_ALMOST_EMPTY (0x000000FFU) //!< Bit mask for ENET_RAEM_RX_ALMOST_EMPTY.
  3375. #define BS_ENET_RAEM_RX_ALMOST_EMPTY (8U) //!< Bit field size in bits for ENET_RAEM_RX_ALMOST_EMPTY.
  3376. #ifndef __LANGUAGE_ASM__
  3377. //! @brief Read current value of the ENET_RAEM_RX_ALMOST_EMPTY field.
  3378. #define BR_ENET_RAEM_RX_ALMOST_EMPTY(x) (HW_ENET_RAEM(x).B.RX_ALMOST_EMPTY)
  3379. #endif
  3380. //! @brief Format value for bitfield ENET_RAEM_RX_ALMOST_EMPTY.
  3381. #define BF_ENET_RAEM_RX_ALMOST_EMPTY(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RAEM_RX_ALMOST_EMPTY), uint32_t) & BM_ENET_RAEM_RX_ALMOST_EMPTY)
  3382. #ifndef __LANGUAGE_ASM__
  3383. //! @brief Set the RX_ALMOST_EMPTY field to a new value.
  3384. #define BW_ENET_RAEM_RX_ALMOST_EMPTY(x, v) (HW_ENET_RAEM_WR(x, (HW_ENET_RAEM_RD(x) & ~BM_ENET_RAEM_RX_ALMOST_EMPTY) | BF_ENET_RAEM_RX_ALMOST_EMPTY(v)))
  3385. #endif
  3386. //@}
  3387. //-------------------------------------------------------------------------------------------
  3388. // HW_ENET_RAFL - Receive FIFO Almost Full Threshold
  3389. //-------------------------------------------------------------------------------------------
  3390. #ifndef __LANGUAGE_ASM__
  3391. /*!
  3392. * @brief HW_ENET_RAFL - Receive FIFO Almost Full Threshold (RW)
  3393. *
  3394. * Reset value: 0x00000004U
  3395. */
  3396. typedef union _hw_enet_rafl
  3397. {
  3398. uint32_t U;
  3399. struct _hw_enet_rafl_bitfields
  3400. {
  3401. uint32_t RX_ALMOST_FULL : 8; //!< [7:0] Value Of The Receive FIFO
  3402. //! Almost Full Threshold
  3403. uint32_t RESERVED0 : 24; //!< [31:8]
  3404. } B;
  3405. } hw_enet_rafl_t;
  3406. #endif
  3407. /*!
  3408. * @name Constants and macros for entire ENET_RAFL register
  3409. */
  3410. //@{
  3411. #define HW_ENET_RAFL_ADDR(x) (REGS_ENET_BASE(x) + 0x19CU)
  3412. #ifndef __LANGUAGE_ASM__
  3413. #define HW_ENET_RAFL(x) (*(__IO hw_enet_rafl_t *) HW_ENET_RAFL_ADDR(x))
  3414. #define HW_ENET_RAFL_RD(x) (HW_ENET_RAFL(x).U)
  3415. #define HW_ENET_RAFL_WR(x, v) (HW_ENET_RAFL(x).U = (v))
  3416. #define HW_ENET_RAFL_SET(x, v) (HW_ENET_RAFL_WR(x, HW_ENET_RAFL_RD(x) | (v)))
  3417. #define HW_ENET_RAFL_CLR(x, v) (HW_ENET_RAFL_WR(x, HW_ENET_RAFL_RD(x) & ~(v)))
  3418. #define HW_ENET_RAFL_TOG(x, v) (HW_ENET_RAFL_WR(x, HW_ENET_RAFL_RD(x) ^ (v)))
  3419. #endif
  3420. //@}
  3421. /*
  3422. * Constants & macros for individual ENET_RAFL bitfields
  3423. */
  3424. /*!
  3425. * @name Register ENET_RAFL, field RX_ALMOST_FULL[7:0] (RW)
  3426. *
  3427. * Value, in 64-bit words, of the receive FIFO almost full threshold. When the
  3428. * FIFO level comes close to the maximum, so that there is no more space for at
  3429. * least RX_ALMOST_FULL number of words, the MAC stops writing data in the FIFO and
  3430. * truncates the received frame to avoid FIFO overflow. The corresponding error
  3431. * status will be set when the frame is delivered to the application. A minimum
  3432. * value of 4 should be set.
  3433. */
  3434. //@{
  3435. #define BP_ENET_RAFL_RX_ALMOST_FULL (0U) //!< Bit position for ENET_RAFL_RX_ALMOST_FULL.
  3436. #define BM_ENET_RAFL_RX_ALMOST_FULL (0x000000FFU) //!< Bit mask for ENET_RAFL_RX_ALMOST_FULL.
  3437. #define BS_ENET_RAFL_RX_ALMOST_FULL (8U) //!< Bit field size in bits for ENET_RAFL_RX_ALMOST_FULL.
  3438. #ifndef __LANGUAGE_ASM__
  3439. //! @brief Read current value of the ENET_RAFL_RX_ALMOST_FULL field.
  3440. #define BR_ENET_RAFL_RX_ALMOST_FULL(x) (HW_ENET_RAFL(x).B.RX_ALMOST_FULL)
  3441. #endif
  3442. //! @brief Format value for bitfield ENET_RAFL_RX_ALMOST_FULL.
  3443. #define BF_ENET_RAFL_RX_ALMOST_FULL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RAFL_RX_ALMOST_FULL), uint32_t) & BM_ENET_RAFL_RX_ALMOST_FULL)
  3444. #ifndef __LANGUAGE_ASM__
  3445. //! @brief Set the RX_ALMOST_FULL field to a new value.
  3446. #define BW_ENET_RAFL_RX_ALMOST_FULL(x, v) (HW_ENET_RAFL_WR(x, (HW_ENET_RAFL_RD(x) & ~BM_ENET_RAFL_RX_ALMOST_FULL) | BF_ENET_RAFL_RX_ALMOST_FULL(v)))
  3447. #endif
  3448. //@}
  3449. //-------------------------------------------------------------------------------------------
  3450. // HW_ENET_TSEM - Transmit FIFO Section Empty Threshold
  3451. //-------------------------------------------------------------------------------------------
  3452. #ifndef __LANGUAGE_ASM__
  3453. /*!
  3454. * @brief HW_ENET_TSEM - Transmit FIFO Section Empty Threshold (RW)
  3455. *
  3456. * Reset value: 0x00000000U
  3457. */
  3458. typedef union _hw_enet_tsem
  3459. {
  3460. uint32_t U;
  3461. struct _hw_enet_tsem_bitfields
  3462. {
  3463. uint32_t TX_SECTION_EMPTY : 8; //!< [7:0] Value Of The Transmit FIFO
  3464. //! Section Empty Threshold
  3465. uint32_t RESERVED0 : 24; //!< [31:8]
  3466. } B;
  3467. } hw_enet_tsem_t;
  3468. #endif
  3469. /*!
  3470. * @name Constants and macros for entire ENET_TSEM register
  3471. */
  3472. //@{
  3473. #define HW_ENET_TSEM_ADDR(x) (REGS_ENET_BASE(x) + 0x1A0U)
  3474. #ifndef __LANGUAGE_ASM__
  3475. #define HW_ENET_TSEM(x) (*(__IO hw_enet_tsem_t *) HW_ENET_TSEM_ADDR(x))
  3476. #define HW_ENET_TSEM_RD(x) (HW_ENET_TSEM(x).U)
  3477. #define HW_ENET_TSEM_WR(x, v) (HW_ENET_TSEM(x).U = (v))
  3478. #define HW_ENET_TSEM_SET(x, v) (HW_ENET_TSEM_WR(x, HW_ENET_TSEM_RD(x) | (v)))
  3479. #define HW_ENET_TSEM_CLR(x, v) (HW_ENET_TSEM_WR(x, HW_ENET_TSEM_RD(x) & ~(v)))
  3480. #define HW_ENET_TSEM_TOG(x, v) (HW_ENET_TSEM_WR(x, HW_ENET_TSEM_RD(x) ^ (v)))
  3481. #endif
  3482. //@}
  3483. /*
  3484. * Constants & macros for individual ENET_TSEM bitfields
  3485. */
  3486. /*!
  3487. * @name Register ENET_TSEM, field TX_SECTION_EMPTY[7:0] (RW)
  3488. *
  3489. * Value, in 64-bit words, of the transmit FIFO section empty threshold. See
  3490. * Transmit FIFOFour programmable thresholds are available which control the core
  3491. * operation. for more information.
  3492. */
  3493. //@{
  3494. #define BP_ENET_TSEM_TX_SECTION_EMPTY (0U) //!< Bit position for ENET_TSEM_TX_SECTION_EMPTY.
  3495. #define BM_ENET_TSEM_TX_SECTION_EMPTY (0x000000FFU) //!< Bit mask for ENET_TSEM_TX_SECTION_EMPTY.
  3496. #define BS_ENET_TSEM_TX_SECTION_EMPTY (8U) //!< Bit field size in bits for ENET_TSEM_TX_SECTION_EMPTY.
  3497. #ifndef __LANGUAGE_ASM__
  3498. //! @brief Read current value of the ENET_TSEM_TX_SECTION_EMPTY field.
  3499. #define BR_ENET_TSEM_TX_SECTION_EMPTY(x) (HW_ENET_TSEM(x).B.TX_SECTION_EMPTY)
  3500. #endif
  3501. //! @brief Format value for bitfield ENET_TSEM_TX_SECTION_EMPTY.
  3502. #define BF_ENET_TSEM_TX_SECTION_EMPTY(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TSEM_TX_SECTION_EMPTY), uint32_t) & BM_ENET_TSEM_TX_SECTION_EMPTY)
  3503. #ifndef __LANGUAGE_ASM__
  3504. //! @brief Set the TX_SECTION_EMPTY field to a new value.
  3505. #define BW_ENET_TSEM_TX_SECTION_EMPTY(x, v) (HW_ENET_TSEM_WR(x, (HW_ENET_TSEM_RD(x) & ~BM_ENET_TSEM_TX_SECTION_EMPTY) | BF_ENET_TSEM_TX_SECTION_EMPTY(v)))
  3506. #endif
  3507. //@}
  3508. //-------------------------------------------------------------------------------------------
  3509. // HW_ENET_TAEM - Transmit FIFO Almost Empty Threshold
  3510. //-------------------------------------------------------------------------------------------
  3511. #ifndef __LANGUAGE_ASM__
  3512. /*!
  3513. * @brief HW_ENET_TAEM - Transmit FIFO Almost Empty Threshold (RW)
  3514. *
  3515. * Reset value: 0x00000004U
  3516. */
  3517. typedef union _hw_enet_taem
  3518. {
  3519. uint32_t U;
  3520. struct _hw_enet_taem_bitfields
  3521. {
  3522. uint32_t TX_ALMOST_EMPTY : 8; //!< [7:0] Value of Transmit FIFO
  3523. //! Almost Empty Threshold
  3524. uint32_t RESERVED0 : 24; //!< [31:8]
  3525. } B;
  3526. } hw_enet_taem_t;
  3527. #endif
  3528. /*!
  3529. * @name Constants and macros for entire ENET_TAEM register
  3530. */
  3531. //@{
  3532. #define HW_ENET_TAEM_ADDR(x) (REGS_ENET_BASE(x) + 0x1A4U)
  3533. #ifndef __LANGUAGE_ASM__
  3534. #define HW_ENET_TAEM(x) (*(__IO hw_enet_taem_t *) HW_ENET_TAEM_ADDR(x))
  3535. #define HW_ENET_TAEM_RD(x) (HW_ENET_TAEM(x).U)
  3536. #define HW_ENET_TAEM_WR(x, v) (HW_ENET_TAEM(x).U = (v))
  3537. #define HW_ENET_TAEM_SET(x, v) (HW_ENET_TAEM_WR(x, HW_ENET_TAEM_RD(x) | (v)))
  3538. #define HW_ENET_TAEM_CLR(x, v) (HW_ENET_TAEM_WR(x, HW_ENET_TAEM_RD(x) & ~(v)))
  3539. #define HW_ENET_TAEM_TOG(x, v) (HW_ENET_TAEM_WR(x, HW_ENET_TAEM_RD(x) ^ (v)))
  3540. #endif
  3541. //@}
  3542. /*
  3543. * Constants & macros for individual ENET_TAEM bitfields
  3544. */
  3545. /*!
  3546. * @name Register ENET_TAEM, field TX_ALMOST_EMPTY[7:0] (RW)
  3547. *
  3548. * Value, in 64-bit words, of the transmit FIFO almost empty threshold. When the
  3549. * FIFO level reaches the value programmed in this field, and no end-of-frame is
  3550. * available for the frame, the MAC transmit logic, to avoid FIFO underflow,
  3551. * stops reading the FIFO and transmits a frame with an MII error indication. See
  3552. * Transmit FIFOFour programmable thresholds are available which control the core
  3553. * operation. for more information. A minimum value of 4 should be set.
  3554. */
  3555. //@{
  3556. #define BP_ENET_TAEM_TX_ALMOST_EMPTY (0U) //!< Bit position for ENET_TAEM_TX_ALMOST_EMPTY.
  3557. #define BM_ENET_TAEM_TX_ALMOST_EMPTY (0x000000FFU) //!< Bit mask for ENET_TAEM_TX_ALMOST_EMPTY.
  3558. #define BS_ENET_TAEM_TX_ALMOST_EMPTY (8U) //!< Bit field size in bits for ENET_TAEM_TX_ALMOST_EMPTY.
  3559. #ifndef __LANGUAGE_ASM__
  3560. //! @brief Read current value of the ENET_TAEM_TX_ALMOST_EMPTY field.
  3561. #define BR_ENET_TAEM_TX_ALMOST_EMPTY(x) (HW_ENET_TAEM(x).B.TX_ALMOST_EMPTY)
  3562. #endif
  3563. //! @brief Format value for bitfield ENET_TAEM_TX_ALMOST_EMPTY.
  3564. #define BF_ENET_TAEM_TX_ALMOST_EMPTY(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TAEM_TX_ALMOST_EMPTY), uint32_t) & BM_ENET_TAEM_TX_ALMOST_EMPTY)
  3565. #ifndef __LANGUAGE_ASM__
  3566. //! @brief Set the TX_ALMOST_EMPTY field to a new value.
  3567. #define BW_ENET_TAEM_TX_ALMOST_EMPTY(x, v) (HW_ENET_TAEM_WR(x, (HW_ENET_TAEM_RD(x) & ~BM_ENET_TAEM_TX_ALMOST_EMPTY) | BF_ENET_TAEM_TX_ALMOST_EMPTY(v)))
  3568. #endif
  3569. //@}
  3570. //-------------------------------------------------------------------------------------------
  3571. // HW_ENET_TAFL - Transmit FIFO Almost Full Threshold
  3572. //-------------------------------------------------------------------------------------------
  3573. #ifndef __LANGUAGE_ASM__
  3574. /*!
  3575. * @brief HW_ENET_TAFL - Transmit FIFO Almost Full Threshold (RW)
  3576. *
  3577. * Reset value: 0x00000008U
  3578. */
  3579. typedef union _hw_enet_tafl
  3580. {
  3581. uint32_t U;
  3582. struct _hw_enet_tafl_bitfields
  3583. {
  3584. uint32_t TX_ALMOST_FULL : 8; //!< [7:0] Value Of The Transmit FIFO
  3585. //! Almost Full Threshold
  3586. uint32_t RESERVED0 : 24; //!< [31:8]
  3587. } B;
  3588. } hw_enet_tafl_t;
  3589. #endif
  3590. /*!
  3591. * @name Constants and macros for entire ENET_TAFL register
  3592. */
  3593. //@{
  3594. #define HW_ENET_TAFL_ADDR(x) (REGS_ENET_BASE(x) + 0x1A8U)
  3595. #ifndef __LANGUAGE_ASM__
  3596. #define HW_ENET_TAFL(x) (*(__IO hw_enet_tafl_t *) HW_ENET_TAFL_ADDR(x))
  3597. #define HW_ENET_TAFL_RD(x) (HW_ENET_TAFL(x).U)
  3598. #define HW_ENET_TAFL_WR(x, v) (HW_ENET_TAFL(x).U = (v))
  3599. #define HW_ENET_TAFL_SET(x, v) (HW_ENET_TAFL_WR(x, HW_ENET_TAFL_RD(x) | (v)))
  3600. #define HW_ENET_TAFL_CLR(x, v) (HW_ENET_TAFL_WR(x, HW_ENET_TAFL_RD(x) & ~(v)))
  3601. #define HW_ENET_TAFL_TOG(x, v) (HW_ENET_TAFL_WR(x, HW_ENET_TAFL_RD(x) ^ (v)))
  3602. #endif
  3603. //@}
  3604. /*
  3605. * Constants & macros for individual ENET_TAFL bitfields
  3606. */
  3607. /*!
  3608. * @name Register ENET_TAFL, field TX_ALMOST_FULL[7:0] (RW)
  3609. *
  3610. * Value, in 64-bit words, of the transmit FIFO almost full threshold. A minimum
  3611. * value of six is required . A recommended value of at least 8 should be set
  3612. * allowing a latency of two clock cycles to the application. If more latency is
  3613. * required the value can be increased as necessary (latency = TAFL - 5). When the
  3614. * FIFO level comes close to the maximum, so that there is no more space for at
  3615. * least TX_ALMOST_FULL number of words, the pin ff_tx_rdy is deasserted. If the
  3616. * application does not react on this signal, the FIFO write control logic, to
  3617. * avoid FIFO overflow, truncates the current frame and sets the error status. As a
  3618. * result, the frame will be transmitted with an GMII/MII error indication. See
  3619. * Transmit FIFOFour programmable thresholds are available which control the core
  3620. * operation. for more information. A FIFO overflow is a fatal error and requires
  3621. * a global reset on the transmit datapath or at least deassertion of ETHEREN.
  3622. */
  3623. //@{
  3624. #define BP_ENET_TAFL_TX_ALMOST_FULL (0U) //!< Bit position for ENET_TAFL_TX_ALMOST_FULL.
  3625. #define BM_ENET_TAFL_TX_ALMOST_FULL (0x000000FFU) //!< Bit mask for ENET_TAFL_TX_ALMOST_FULL.
  3626. #define BS_ENET_TAFL_TX_ALMOST_FULL (8U) //!< Bit field size in bits for ENET_TAFL_TX_ALMOST_FULL.
  3627. #ifndef __LANGUAGE_ASM__
  3628. //! @brief Read current value of the ENET_TAFL_TX_ALMOST_FULL field.
  3629. #define BR_ENET_TAFL_TX_ALMOST_FULL(x) (HW_ENET_TAFL(x).B.TX_ALMOST_FULL)
  3630. #endif
  3631. //! @brief Format value for bitfield ENET_TAFL_TX_ALMOST_FULL.
  3632. #define BF_ENET_TAFL_TX_ALMOST_FULL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TAFL_TX_ALMOST_FULL), uint32_t) & BM_ENET_TAFL_TX_ALMOST_FULL)
  3633. #ifndef __LANGUAGE_ASM__
  3634. //! @brief Set the TX_ALMOST_FULL field to a new value.
  3635. #define BW_ENET_TAFL_TX_ALMOST_FULL(x, v) (HW_ENET_TAFL_WR(x, (HW_ENET_TAFL_RD(x) & ~BM_ENET_TAFL_TX_ALMOST_FULL) | BF_ENET_TAFL_TX_ALMOST_FULL(v)))
  3636. #endif
  3637. //@}
  3638. //-------------------------------------------------------------------------------------------
  3639. // HW_ENET_TIPG - Transmit Inter-Packet Gap
  3640. //-------------------------------------------------------------------------------------------
  3641. #ifndef __LANGUAGE_ASM__
  3642. /*!
  3643. * @brief HW_ENET_TIPG - Transmit Inter-Packet Gap (RW)
  3644. *
  3645. * Reset value: 0x0000000CU
  3646. */
  3647. typedef union _hw_enet_tipg
  3648. {
  3649. uint32_t U;
  3650. struct _hw_enet_tipg_bitfields
  3651. {
  3652. uint32_t IPG : 5; //!< [4:0] Transmit Inter-Packet Gap
  3653. uint32_t RESERVED0 : 27; //!< [31:5]
  3654. } B;
  3655. } hw_enet_tipg_t;
  3656. #endif
  3657. /*!
  3658. * @name Constants and macros for entire ENET_TIPG register
  3659. */
  3660. //@{
  3661. #define HW_ENET_TIPG_ADDR(x) (REGS_ENET_BASE(x) + 0x1ACU)
  3662. #ifndef __LANGUAGE_ASM__
  3663. #define HW_ENET_TIPG(x) (*(__IO hw_enet_tipg_t *) HW_ENET_TIPG_ADDR(x))
  3664. #define HW_ENET_TIPG_RD(x) (HW_ENET_TIPG(x).U)
  3665. #define HW_ENET_TIPG_WR(x, v) (HW_ENET_TIPG(x).U = (v))
  3666. #define HW_ENET_TIPG_SET(x, v) (HW_ENET_TIPG_WR(x, HW_ENET_TIPG_RD(x) | (v)))
  3667. #define HW_ENET_TIPG_CLR(x, v) (HW_ENET_TIPG_WR(x, HW_ENET_TIPG_RD(x) & ~(v)))
  3668. #define HW_ENET_TIPG_TOG(x, v) (HW_ENET_TIPG_WR(x, HW_ENET_TIPG_RD(x) ^ (v)))
  3669. #endif
  3670. //@}
  3671. /*
  3672. * Constants & macros for individual ENET_TIPG bitfields
  3673. */
  3674. /*!
  3675. * @name Register ENET_TIPG, field IPG[4:0] (RW)
  3676. *
  3677. * Indicates the IPG, in bytes, between transmitted frames. Valid values range
  3678. * from 8 to 27. If value is less than 8, the IPG is 8. If value is greater than
  3679. * 27, the IPG is 27.
  3680. */
  3681. //@{
  3682. #define BP_ENET_TIPG_IPG (0U) //!< Bit position for ENET_TIPG_IPG.
  3683. #define BM_ENET_TIPG_IPG (0x0000001FU) //!< Bit mask for ENET_TIPG_IPG.
  3684. #define BS_ENET_TIPG_IPG (5U) //!< Bit field size in bits for ENET_TIPG_IPG.
  3685. #ifndef __LANGUAGE_ASM__
  3686. //! @brief Read current value of the ENET_TIPG_IPG field.
  3687. #define BR_ENET_TIPG_IPG(x) (HW_ENET_TIPG(x).B.IPG)
  3688. #endif
  3689. //! @brief Format value for bitfield ENET_TIPG_IPG.
  3690. #define BF_ENET_TIPG_IPG(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TIPG_IPG), uint32_t) & BM_ENET_TIPG_IPG)
  3691. #ifndef __LANGUAGE_ASM__
  3692. //! @brief Set the IPG field to a new value.
  3693. #define BW_ENET_TIPG_IPG(x, v) (HW_ENET_TIPG_WR(x, (HW_ENET_TIPG_RD(x) & ~BM_ENET_TIPG_IPG) | BF_ENET_TIPG_IPG(v)))
  3694. #endif
  3695. //@}
  3696. //-------------------------------------------------------------------------------------------
  3697. // HW_ENET_FTRL - Frame Truncation Length
  3698. //-------------------------------------------------------------------------------------------
  3699. #ifndef __LANGUAGE_ASM__
  3700. /*!
  3701. * @brief HW_ENET_FTRL - Frame Truncation Length (RW)
  3702. *
  3703. * Reset value: 0x000007FFU
  3704. */
  3705. typedef union _hw_enet_ftrl
  3706. {
  3707. uint32_t U;
  3708. struct _hw_enet_ftrl_bitfields
  3709. {
  3710. uint32_t TRUNC_FL : 14; //!< [13:0] Frame Truncation Length
  3711. uint32_t RESERVED0 : 18; //!< [31:14]
  3712. } B;
  3713. } hw_enet_ftrl_t;
  3714. #endif
  3715. /*!
  3716. * @name Constants and macros for entire ENET_FTRL register
  3717. */
  3718. //@{
  3719. #define HW_ENET_FTRL_ADDR(x) (REGS_ENET_BASE(x) + 0x1B0U)
  3720. #ifndef __LANGUAGE_ASM__
  3721. #define HW_ENET_FTRL(x) (*(__IO hw_enet_ftrl_t *) HW_ENET_FTRL_ADDR(x))
  3722. #define HW_ENET_FTRL_RD(x) (HW_ENET_FTRL(x).U)
  3723. #define HW_ENET_FTRL_WR(x, v) (HW_ENET_FTRL(x).U = (v))
  3724. #define HW_ENET_FTRL_SET(x, v) (HW_ENET_FTRL_WR(x, HW_ENET_FTRL_RD(x) | (v)))
  3725. #define HW_ENET_FTRL_CLR(x, v) (HW_ENET_FTRL_WR(x, HW_ENET_FTRL_RD(x) & ~(v)))
  3726. #define HW_ENET_FTRL_TOG(x, v) (HW_ENET_FTRL_WR(x, HW_ENET_FTRL_RD(x) ^ (v)))
  3727. #endif
  3728. //@}
  3729. /*
  3730. * Constants & macros for individual ENET_FTRL bitfields
  3731. */
  3732. /*!
  3733. * @name Register ENET_FTRL, field TRUNC_FL[13:0] (RW)
  3734. *
  3735. * Indicates the value a receive frame is truncated, if it is greater than this
  3736. * value. Must be greater than or equal to RCR[MAX_FL]. Truncation happens at
  3737. * TRUNC_FL. However, when truncation occurs, the application (FIFO) may receive
  3738. * less data, guaranteeing that it never receives more than the set limit.
  3739. */
  3740. //@{
  3741. #define BP_ENET_FTRL_TRUNC_FL (0U) //!< Bit position for ENET_FTRL_TRUNC_FL.
  3742. #define BM_ENET_FTRL_TRUNC_FL (0x00003FFFU) //!< Bit mask for ENET_FTRL_TRUNC_FL.
  3743. #define BS_ENET_FTRL_TRUNC_FL (14U) //!< Bit field size in bits for ENET_FTRL_TRUNC_FL.
  3744. #ifndef __LANGUAGE_ASM__
  3745. //! @brief Read current value of the ENET_FTRL_TRUNC_FL field.
  3746. #define BR_ENET_FTRL_TRUNC_FL(x) (HW_ENET_FTRL(x).B.TRUNC_FL)
  3747. #endif
  3748. //! @brief Format value for bitfield ENET_FTRL_TRUNC_FL.
  3749. #define BF_ENET_FTRL_TRUNC_FL(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_FTRL_TRUNC_FL), uint32_t) & BM_ENET_FTRL_TRUNC_FL)
  3750. #ifndef __LANGUAGE_ASM__
  3751. //! @brief Set the TRUNC_FL field to a new value.
  3752. #define BW_ENET_FTRL_TRUNC_FL(x, v) (HW_ENET_FTRL_WR(x, (HW_ENET_FTRL_RD(x) & ~BM_ENET_FTRL_TRUNC_FL) | BF_ENET_FTRL_TRUNC_FL(v)))
  3753. #endif
  3754. //@}
  3755. //-------------------------------------------------------------------------------------------
  3756. // HW_ENET_TACC - Transmit Accelerator Function Configuration
  3757. //-------------------------------------------------------------------------------------------
  3758. #ifndef __LANGUAGE_ASM__
  3759. /*!
  3760. * @brief HW_ENET_TACC - Transmit Accelerator Function Configuration (RW)
  3761. *
  3762. * Reset value: 0x00000000U
  3763. *
  3764. * TACC controls accelerator actions when sending frames. The register can be
  3765. * changed before or after each frame, but it must remain unmodified during frame
  3766. * writes into the transmit FIFO. The TFWR[STRFWD] field must be set to use the
  3767. * checksum feature.
  3768. */
  3769. typedef union _hw_enet_tacc
  3770. {
  3771. uint32_t U;
  3772. struct _hw_enet_tacc_bitfields
  3773. {
  3774. uint32_t SHIFT16 : 1; //!< [0] TX FIFO Shift-16
  3775. uint32_t RESERVED0 : 2; //!< [2:1]
  3776. uint32_t IPCHK : 1; //!< [3]
  3777. uint32_t PROCHK : 1; //!< [4]
  3778. uint32_t RESERVED1 : 27; //!< [31:5]
  3779. } B;
  3780. } hw_enet_tacc_t;
  3781. #endif
  3782. /*!
  3783. * @name Constants and macros for entire ENET_TACC register
  3784. */
  3785. //@{
  3786. #define HW_ENET_TACC_ADDR(x) (REGS_ENET_BASE(x) + 0x1C0U)
  3787. #ifndef __LANGUAGE_ASM__
  3788. #define HW_ENET_TACC(x) (*(__IO hw_enet_tacc_t *) HW_ENET_TACC_ADDR(x))
  3789. #define HW_ENET_TACC_RD(x) (HW_ENET_TACC(x).U)
  3790. #define HW_ENET_TACC_WR(x, v) (HW_ENET_TACC(x).U = (v))
  3791. #define HW_ENET_TACC_SET(x, v) (HW_ENET_TACC_WR(x, HW_ENET_TACC_RD(x) | (v)))
  3792. #define HW_ENET_TACC_CLR(x, v) (HW_ENET_TACC_WR(x, HW_ENET_TACC_RD(x) & ~(v)))
  3793. #define HW_ENET_TACC_TOG(x, v) (HW_ENET_TACC_WR(x, HW_ENET_TACC_RD(x) ^ (v)))
  3794. #endif
  3795. //@}
  3796. /*
  3797. * Constants & macros for individual ENET_TACC bitfields
  3798. */
  3799. /*!
  3800. * @name Register ENET_TACC, field SHIFT16[0] (RW)
  3801. *
  3802. * Values:
  3803. * - 0 - Disabled.
  3804. * - 1 - Indicates to the transmit data FIFO that the written frames contain two
  3805. * additional octets before the frame data. This means the actual frame
  3806. * begins at bit 16 of the first word written into the FIFO. This function allows
  3807. * putting the frame payload on a 32-bit boundary in memory, as the 14-byte
  3808. * Ethernet header is extended to a 16-byte header.
  3809. */
  3810. //@{
  3811. #define BP_ENET_TACC_SHIFT16 (0U) //!< Bit position for ENET_TACC_SHIFT16.
  3812. #define BM_ENET_TACC_SHIFT16 (0x00000001U) //!< Bit mask for ENET_TACC_SHIFT16.
  3813. #define BS_ENET_TACC_SHIFT16 (1U) //!< Bit field size in bits for ENET_TACC_SHIFT16.
  3814. #ifndef __LANGUAGE_ASM__
  3815. //! @brief Read current value of the ENET_TACC_SHIFT16 field.
  3816. #define BR_ENET_TACC_SHIFT16(x) (BITBAND_ACCESS32(HW_ENET_TACC_ADDR(x), BP_ENET_TACC_SHIFT16))
  3817. #endif
  3818. //! @brief Format value for bitfield ENET_TACC_SHIFT16.
  3819. #define BF_ENET_TACC_SHIFT16(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TACC_SHIFT16), uint32_t) & BM_ENET_TACC_SHIFT16)
  3820. #ifndef __LANGUAGE_ASM__
  3821. //! @brief Set the SHIFT16 field to a new value.
  3822. #define BW_ENET_TACC_SHIFT16(x, v) (BITBAND_ACCESS32(HW_ENET_TACC_ADDR(x), BP_ENET_TACC_SHIFT16) = (v))
  3823. #endif
  3824. //@}
  3825. /*!
  3826. * @name Register ENET_TACC, field IPCHK[3] (RW)
  3827. *
  3828. * Enables insertion of IP header checksum.
  3829. *
  3830. * Values:
  3831. * - 0 - Checksum is not inserted.
  3832. * - 1 - If an IP frame is transmitted, the checksum is inserted automatically.
  3833. * The IP header checksum field must be cleared. If a non-IP frame is
  3834. * transmitted the frame is not modified.
  3835. */
  3836. //@{
  3837. #define BP_ENET_TACC_IPCHK (3U) //!< Bit position for ENET_TACC_IPCHK.
  3838. #define BM_ENET_TACC_IPCHK (0x00000008U) //!< Bit mask for ENET_TACC_IPCHK.
  3839. #define BS_ENET_TACC_IPCHK (1U) //!< Bit field size in bits for ENET_TACC_IPCHK.
  3840. #ifndef __LANGUAGE_ASM__
  3841. //! @brief Read current value of the ENET_TACC_IPCHK field.
  3842. #define BR_ENET_TACC_IPCHK(x) (BITBAND_ACCESS32(HW_ENET_TACC_ADDR(x), BP_ENET_TACC_IPCHK))
  3843. #endif
  3844. //! @brief Format value for bitfield ENET_TACC_IPCHK.
  3845. #define BF_ENET_TACC_IPCHK(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TACC_IPCHK), uint32_t) & BM_ENET_TACC_IPCHK)
  3846. #ifndef __LANGUAGE_ASM__
  3847. //! @brief Set the IPCHK field to a new value.
  3848. #define BW_ENET_TACC_IPCHK(x, v) (BITBAND_ACCESS32(HW_ENET_TACC_ADDR(x), BP_ENET_TACC_IPCHK) = (v))
  3849. #endif
  3850. //@}
  3851. /*!
  3852. * @name Register ENET_TACC, field PROCHK[4] (RW)
  3853. *
  3854. * Enables insertion of protocol checksum.
  3855. *
  3856. * Values:
  3857. * - 0 - Checksum not inserted.
  3858. * - 1 - If an IP frame with a known protocol is transmitted, the checksum is
  3859. * inserted automatically into the frame. The checksum field must be cleared.
  3860. * The other frames are not modified.
  3861. */
  3862. //@{
  3863. #define BP_ENET_TACC_PROCHK (4U) //!< Bit position for ENET_TACC_PROCHK.
  3864. #define BM_ENET_TACC_PROCHK (0x00000010U) //!< Bit mask for ENET_TACC_PROCHK.
  3865. #define BS_ENET_TACC_PROCHK (1U) //!< Bit field size in bits for ENET_TACC_PROCHK.
  3866. #ifndef __LANGUAGE_ASM__
  3867. //! @brief Read current value of the ENET_TACC_PROCHK field.
  3868. #define BR_ENET_TACC_PROCHK(x) (BITBAND_ACCESS32(HW_ENET_TACC_ADDR(x), BP_ENET_TACC_PROCHK))
  3869. #endif
  3870. //! @brief Format value for bitfield ENET_TACC_PROCHK.
  3871. #define BF_ENET_TACC_PROCHK(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TACC_PROCHK), uint32_t) & BM_ENET_TACC_PROCHK)
  3872. #ifndef __LANGUAGE_ASM__
  3873. //! @brief Set the PROCHK field to a new value.
  3874. #define BW_ENET_TACC_PROCHK(x, v) (BITBAND_ACCESS32(HW_ENET_TACC_ADDR(x), BP_ENET_TACC_PROCHK) = (v))
  3875. #endif
  3876. //@}
  3877. //-------------------------------------------------------------------------------------------
  3878. // HW_ENET_RACC - Receive Accelerator Function Configuration
  3879. //-------------------------------------------------------------------------------------------
  3880. #ifndef __LANGUAGE_ASM__
  3881. /*!
  3882. * @brief HW_ENET_RACC - Receive Accelerator Function Configuration (RW)
  3883. *
  3884. * Reset value: 0x00000000U
  3885. */
  3886. typedef union _hw_enet_racc
  3887. {
  3888. uint32_t U;
  3889. struct _hw_enet_racc_bitfields
  3890. {
  3891. uint32_t PADREM : 1; //!< [0] Enable Padding Removal For Short IP
  3892. //! Frames
  3893. uint32_t IPDIS : 1; //!< [1] Enable Discard Of Frames With Wrong IPv4
  3894. //! Header Checksum
  3895. uint32_t PRODIS : 1; //!< [2] Enable Discard Of Frames With Wrong
  3896. //! Protocol Checksum
  3897. uint32_t RESERVED0 : 3; //!< [5:3]
  3898. uint32_t LINEDIS : 1; //!< [6] Enable Discard Of Frames With MAC
  3899. //! Layer Errors
  3900. uint32_t SHIFT16 : 1; //!< [7] RX FIFO Shift-16
  3901. uint32_t RESERVED1 : 24; //!< [31:8]
  3902. } B;
  3903. } hw_enet_racc_t;
  3904. #endif
  3905. /*!
  3906. * @name Constants and macros for entire ENET_RACC register
  3907. */
  3908. //@{
  3909. #define HW_ENET_RACC_ADDR(x) (REGS_ENET_BASE(x) + 0x1C4U)
  3910. #ifndef __LANGUAGE_ASM__
  3911. #define HW_ENET_RACC(x) (*(__IO hw_enet_racc_t *) HW_ENET_RACC_ADDR(x))
  3912. #define HW_ENET_RACC_RD(x) (HW_ENET_RACC(x).U)
  3913. #define HW_ENET_RACC_WR(x, v) (HW_ENET_RACC(x).U = (v))
  3914. #define HW_ENET_RACC_SET(x, v) (HW_ENET_RACC_WR(x, HW_ENET_RACC_RD(x) | (v)))
  3915. #define HW_ENET_RACC_CLR(x, v) (HW_ENET_RACC_WR(x, HW_ENET_RACC_RD(x) & ~(v)))
  3916. #define HW_ENET_RACC_TOG(x, v) (HW_ENET_RACC_WR(x, HW_ENET_RACC_RD(x) ^ (v)))
  3917. #endif
  3918. //@}
  3919. /*
  3920. * Constants & macros for individual ENET_RACC bitfields
  3921. */
  3922. /*!
  3923. * @name Register ENET_RACC, field PADREM[0] (RW)
  3924. *
  3925. * Values:
  3926. * - 0 - Padding not removed.
  3927. * - 1 - Any bytes following the IP payload section of the frame are removed
  3928. * from the frame.
  3929. */
  3930. //@{
  3931. #define BP_ENET_RACC_PADREM (0U) //!< Bit position for ENET_RACC_PADREM.
  3932. #define BM_ENET_RACC_PADREM (0x00000001U) //!< Bit mask for ENET_RACC_PADREM.
  3933. #define BS_ENET_RACC_PADREM (1U) //!< Bit field size in bits for ENET_RACC_PADREM.
  3934. #ifndef __LANGUAGE_ASM__
  3935. //! @brief Read current value of the ENET_RACC_PADREM field.
  3936. #define BR_ENET_RACC_PADREM(x) (BITBAND_ACCESS32(HW_ENET_RACC_ADDR(x), BP_ENET_RACC_PADREM))
  3937. #endif
  3938. //! @brief Format value for bitfield ENET_RACC_PADREM.
  3939. #define BF_ENET_RACC_PADREM(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RACC_PADREM), uint32_t) & BM_ENET_RACC_PADREM)
  3940. #ifndef __LANGUAGE_ASM__
  3941. //! @brief Set the PADREM field to a new value.
  3942. #define BW_ENET_RACC_PADREM(x, v) (BITBAND_ACCESS32(HW_ENET_RACC_ADDR(x), BP_ENET_RACC_PADREM) = (v))
  3943. #endif
  3944. //@}
  3945. /*!
  3946. * @name Register ENET_RACC, field IPDIS[1] (RW)
  3947. *
  3948. * Values:
  3949. * - 0 - Frames with wrong IPv4 header checksum are not discarded.
  3950. * - 1 - If an IPv4 frame is received with a mismatching header checksum, the
  3951. * frame is discarded. IPv6 has no header checksum and is not affected by this
  3952. * setting. Discarding is only available when the RX FIFO operates in store
  3953. * and forward mode (RSFL cleared).
  3954. */
  3955. //@{
  3956. #define BP_ENET_RACC_IPDIS (1U) //!< Bit position for ENET_RACC_IPDIS.
  3957. #define BM_ENET_RACC_IPDIS (0x00000002U) //!< Bit mask for ENET_RACC_IPDIS.
  3958. #define BS_ENET_RACC_IPDIS (1U) //!< Bit field size in bits for ENET_RACC_IPDIS.
  3959. #ifndef __LANGUAGE_ASM__
  3960. //! @brief Read current value of the ENET_RACC_IPDIS field.
  3961. #define BR_ENET_RACC_IPDIS(x) (BITBAND_ACCESS32(HW_ENET_RACC_ADDR(x), BP_ENET_RACC_IPDIS))
  3962. #endif
  3963. //! @brief Format value for bitfield ENET_RACC_IPDIS.
  3964. #define BF_ENET_RACC_IPDIS(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RACC_IPDIS), uint32_t) & BM_ENET_RACC_IPDIS)
  3965. #ifndef __LANGUAGE_ASM__
  3966. //! @brief Set the IPDIS field to a new value.
  3967. #define BW_ENET_RACC_IPDIS(x, v) (BITBAND_ACCESS32(HW_ENET_RACC_ADDR(x), BP_ENET_RACC_IPDIS) = (v))
  3968. #endif
  3969. //@}
  3970. /*!
  3971. * @name Register ENET_RACC, field PRODIS[2] (RW)
  3972. *
  3973. * Values:
  3974. * - 0 - Frames with wrong checksum are not discarded.
  3975. * - 1 - If a TCP/IP, UDP/IP, or ICMP/IP frame is received that has a wrong TCP,
  3976. * UDP, or ICMP checksum, the frame is discarded. Discarding is only
  3977. * available when the RX FIFO operates in store and forward mode (RSFL cleared).
  3978. */
  3979. //@{
  3980. #define BP_ENET_RACC_PRODIS (2U) //!< Bit position for ENET_RACC_PRODIS.
  3981. #define BM_ENET_RACC_PRODIS (0x00000004U) //!< Bit mask for ENET_RACC_PRODIS.
  3982. #define BS_ENET_RACC_PRODIS (1U) //!< Bit field size in bits for ENET_RACC_PRODIS.
  3983. #ifndef __LANGUAGE_ASM__
  3984. //! @brief Read current value of the ENET_RACC_PRODIS field.
  3985. #define BR_ENET_RACC_PRODIS(x) (BITBAND_ACCESS32(HW_ENET_RACC_ADDR(x), BP_ENET_RACC_PRODIS))
  3986. #endif
  3987. //! @brief Format value for bitfield ENET_RACC_PRODIS.
  3988. #define BF_ENET_RACC_PRODIS(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RACC_PRODIS), uint32_t) & BM_ENET_RACC_PRODIS)
  3989. #ifndef __LANGUAGE_ASM__
  3990. //! @brief Set the PRODIS field to a new value.
  3991. #define BW_ENET_RACC_PRODIS(x, v) (BITBAND_ACCESS32(HW_ENET_RACC_ADDR(x), BP_ENET_RACC_PRODIS) = (v))
  3992. #endif
  3993. //@}
  3994. /*!
  3995. * @name Register ENET_RACC, field LINEDIS[6] (RW)
  3996. *
  3997. * Values:
  3998. * - 0 - Frames with errors are not discarded.
  3999. * - 1 - Any frame received with a CRC, length, or PHY error is automatically
  4000. * discarded and not forwarded to the user application interface.
  4001. */
  4002. //@{
  4003. #define BP_ENET_RACC_LINEDIS (6U) //!< Bit position for ENET_RACC_LINEDIS.
  4004. #define BM_ENET_RACC_LINEDIS (0x00000040U) //!< Bit mask for ENET_RACC_LINEDIS.
  4005. #define BS_ENET_RACC_LINEDIS (1U) //!< Bit field size in bits for ENET_RACC_LINEDIS.
  4006. #ifndef __LANGUAGE_ASM__
  4007. //! @brief Read current value of the ENET_RACC_LINEDIS field.
  4008. #define BR_ENET_RACC_LINEDIS(x) (BITBAND_ACCESS32(HW_ENET_RACC_ADDR(x), BP_ENET_RACC_LINEDIS))
  4009. #endif
  4010. //! @brief Format value for bitfield ENET_RACC_LINEDIS.
  4011. #define BF_ENET_RACC_LINEDIS(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RACC_LINEDIS), uint32_t) & BM_ENET_RACC_LINEDIS)
  4012. #ifndef __LANGUAGE_ASM__
  4013. //! @brief Set the LINEDIS field to a new value.
  4014. #define BW_ENET_RACC_LINEDIS(x, v) (BITBAND_ACCESS32(HW_ENET_RACC_ADDR(x), BP_ENET_RACC_LINEDIS) = (v))
  4015. #endif
  4016. //@}
  4017. /*!
  4018. * @name Register ENET_RACC, field SHIFT16[7] (RW)
  4019. *
  4020. * When this field is set, the actual frame data starts at bit 16 of the first
  4021. * word read from the RX FIFO aligning the Ethernet payload on a 32-bit boundary.
  4022. * This function only affects the FIFO storage and has no influence on the
  4023. * statistics, which use the actual length of the frame received.
  4024. *
  4025. * Values:
  4026. * - 0 - Disabled.
  4027. * - 1 - Instructs the MAC to write two additional bytes in front of each frame
  4028. * received into the RX FIFO.
  4029. */
  4030. //@{
  4031. #define BP_ENET_RACC_SHIFT16 (7U) //!< Bit position for ENET_RACC_SHIFT16.
  4032. #define BM_ENET_RACC_SHIFT16 (0x00000080U) //!< Bit mask for ENET_RACC_SHIFT16.
  4033. #define BS_ENET_RACC_SHIFT16 (1U) //!< Bit field size in bits for ENET_RACC_SHIFT16.
  4034. #ifndef __LANGUAGE_ASM__
  4035. //! @brief Read current value of the ENET_RACC_SHIFT16 field.
  4036. #define BR_ENET_RACC_SHIFT16(x) (BITBAND_ACCESS32(HW_ENET_RACC_ADDR(x), BP_ENET_RACC_SHIFT16))
  4037. #endif
  4038. //! @brief Format value for bitfield ENET_RACC_SHIFT16.
  4039. #define BF_ENET_RACC_SHIFT16(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_RACC_SHIFT16), uint32_t) & BM_ENET_RACC_SHIFT16)
  4040. #ifndef __LANGUAGE_ASM__
  4041. //! @brief Set the SHIFT16 field to a new value.
  4042. #define BW_ENET_RACC_SHIFT16(x, v) (BITBAND_ACCESS32(HW_ENET_RACC_ADDR(x), BP_ENET_RACC_SHIFT16) = (v))
  4043. #endif
  4044. //@}
  4045. //-------------------------------------------------------------------------------------------
  4046. // HW_ENET_RMON_T_PACKETS - Tx Packet Count Statistic Register
  4047. //-------------------------------------------------------------------------------------------
  4048. #ifndef __LANGUAGE_ASM__
  4049. /*!
  4050. * @brief HW_ENET_RMON_T_PACKETS - Tx Packet Count Statistic Register (RO)
  4051. *
  4052. * Reset value: 0x00000000U
  4053. */
  4054. typedef union _hw_enet_rmon_t_packets
  4055. {
  4056. uint32_t U;
  4057. struct _hw_enet_rmon_t_packets_bitfields
  4058. {
  4059. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4060. uint32_t RESERVED0 : 16; //!< [31:16]
  4061. } B;
  4062. } hw_enet_rmon_t_packets_t;
  4063. #endif
  4064. /*!
  4065. * @name Constants and macros for entire ENET_RMON_T_PACKETS register
  4066. */
  4067. //@{
  4068. #define HW_ENET_RMON_T_PACKETS_ADDR(x) (REGS_ENET_BASE(x) + 0x204U)
  4069. #ifndef __LANGUAGE_ASM__
  4070. #define HW_ENET_RMON_T_PACKETS(x) (*(__I hw_enet_rmon_t_packets_t *) HW_ENET_RMON_T_PACKETS_ADDR(x))
  4071. #define HW_ENET_RMON_T_PACKETS_RD(x) (HW_ENET_RMON_T_PACKETS(x).U)
  4072. #endif
  4073. //@}
  4074. /*
  4075. * Constants & macros for individual ENET_RMON_T_PACKETS bitfields
  4076. */
  4077. /*!
  4078. * @name Register ENET_RMON_T_PACKETS, field TXPKTS[15:0] (RO)
  4079. */
  4080. //@{
  4081. #define BP_ENET_RMON_T_PACKETS_TXPKTS (0U) //!< Bit position for ENET_RMON_T_PACKETS_TXPKTS.
  4082. #define BM_ENET_RMON_T_PACKETS_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_PACKETS_TXPKTS.
  4083. #define BS_ENET_RMON_T_PACKETS_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_PACKETS_TXPKTS.
  4084. #ifndef __LANGUAGE_ASM__
  4085. //! @brief Read current value of the ENET_RMON_T_PACKETS_TXPKTS field.
  4086. #define BR_ENET_RMON_T_PACKETS_TXPKTS(x) (HW_ENET_RMON_T_PACKETS(x).B.TXPKTS)
  4087. #endif
  4088. //@}
  4089. //-------------------------------------------------------------------------------------------
  4090. // HW_ENET_RMON_T_BC_PKT - Tx Broadcast Packets Statistic Register
  4091. //-------------------------------------------------------------------------------------------
  4092. #ifndef __LANGUAGE_ASM__
  4093. /*!
  4094. * @brief HW_ENET_RMON_T_BC_PKT - Tx Broadcast Packets Statistic Register (RO)
  4095. *
  4096. * Reset value: 0x00000000U
  4097. *
  4098. * RMON Tx Broadcast Packets
  4099. */
  4100. typedef union _hw_enet_rmon_t_bc_pkt
  4101. {
  4102. uint32_t U;
  4103. struct _hw_enet_rmon_t_bc_pkt_bitfields
  4104. {
  4105. uint32_t TXPKTS : 16; //!< [15:0] Broadcast packets
  4106. uint32_t RESERVED0 : 16; //!< [31:16]
  4107. } B;
  4108. } hw_enet_rmon_t_bc_pkt_t;
  4109. #endif
  4110. /*!
  4111. * @name Constants and macros for entire ENET_RMON_T_BC_PKT register
  4112. */
  4113. //@{
  4114. #define HW_ENET_RMON_T_BC_PKT_ADDR(x) (REGS_ENET_BASE(x) + 0x208U)
  4115. #ifndef __LANGUAGE_ASM__
  4116. #define HW_ENET_RMON_T_BC_PKT(x) (*(__I hw_enet_rmon_t_bc_pkt_t *) HW_ENET_RMON_T_BC_PKT_ADDR(x))
  4117. #define HW_ENET_RMON_T_BC_PKT_RD(x) (HW_ENET_RMON_T_BC_PKT(x).U)
  4118. #endif
  4119. //@}
  4120. /*
  4121. * Constants & macros for individual ENET_RMON_T_BC_PKT bitfields
  4122. */
  4123. /*!
  4124. * @name Register ENET_RMON_T_BC_PKT, field TXPKTS[15:0] (RO)
  4125. */
  4126. //@{
  4127. #define BP_ENET_RMON_T_BC_PKT_TXPKTS (0U) //!< Bit position for ENET_RMON_T_BC_PKT_TXPKTS.
  4128. #define BM_ENET_RMON_T_BC_PKT_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_BC_PKT_TXPKTS.
  4129. #define BS_ENET_RMON_T_BC_PKT_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_BC_PKT_TXPKTS.
  4130. #ifndef __LANGUAGE_ASM__
  4131. //! @brief Read current value of the ENET_RMON_T_BC_PKT_TXPKTS field.
  4132. #define BR_ENET_RMON_T_BC_PKT_TXPKTS(x) (HW_ENET_RMON_T_BC_PKT(x).B.TXPKTS)
  4133. #endif
  4134. //@}
  4135. //-------------------------------------------------------------------------------------------
  4136. // HW_ENET_RMON_T_MC_PKT - Tx Multicast Packets Statistic Register
  4137. //-------------------------------------------------------------------------------------------
  4138. #ifndef __LANGUAGE_ASM__
  4139. /*!
  4140. * @brief HW_ENET_RMON_T_MC_PKT - Tx Multicast Packets Statistic Register (RO)
  4141. *
  4142. * Reset value: 0x00000000U
  4143. */
  4144. typedef union _hw_enet_rmon_t_mc_pkt
  4145. {
  4146. uint32_t U;
  4147. struct _hw_enet_rmon_t_mc_pkt_bitfields
  4148. {
  4149. uint32_t TXPKTS : 16; //!< [15:0] Multicast packets
  4150. uint32_t RESERVED0 : 16; //!< [31:16]
  4151. } B;
  4152. } hw_enet_rmon_t_mc_pkt_t;
  4153. #endif
  4154. /*!
  4155. * @name Constants and macros for entire ENET_RMON_T_MC_PKT register
  4156. */
  4157. //@{
  4158. #define HW_ENET_RMON_T_MC_PKT_ADDR(x) (REGS_ENET_BASE(x) + 0x20CU)
  4159. #ifndef __LANGUAGE_ASM__
  4160. #define HW_ENET_RMON_T_MC_PKT(x) (*(__I hw_enet_rmon_t_mc_pkt_t *) HW_ENET_RMON_T_MC_PKT_ADDR(x))
  4161. #define HW_ENET_RMON_T_MC_PKT_RD(x) (HW_ENET_RMON_T_MC_PKT(x).U)
  4162. #endif
  4163. //@}
  4164. /*
  4165. * Constants & macros for individual ENET_RMON_T_MC_PKT bitfields
  4166. */
  4167. /*!
  4168. * @name Register ENET_RMON_T_MC_PKT, field TXPKTS[15:0] (RO)
  4169. */
  4170. //@{
  4171. #define BP_ENET_RMON_T_MC_PKT_TXPKTS (0U) //!< Bit position for ENET_RMON_T_MC_PKT_TXPKTS.
  4172. #define BM_ENET_RMON_T_MC_PKT_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_MC_PKT_TXPKTS.
  4173. #define BS_ENET_RMON_T_MC_PKT_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_MC_PKT_TXPKTS.
  4174. #ifndef __LANGUAGE_ASM__
  4175. //! @brief Read current value of the ENET_RMON_T_MC_PKT_TXPKTS field.
  4176. #define BR_ENET_RMON_T_MC_PKT_TXPKTS(x) (HW_ENET_RMON_T_MC_PKT(x).B.TXPKTS)
  4177. #endif
  4178. //@}
  4179. //-------------------------------------------------------------------------------------------
  4180. // HW_ENET_RMON_T_CRC_ALIGN - Tx Packets with CRC/Align Error Statistic Register
  4181. //-------------------------------------------------------------------------------------------
  4182. #ifndef __LANGUAGE_ASM__
  4183. /*!
  4184. * @brief HW_ENET_RMON_T_CRC_ALIGN - Tx Packets with CRC/Align Error Statistic Register (RO)
  4185. *
  4186. * Reset value: 0x00000000U
  4187. */
  4188. typedef union _hw_enet_rmon_t_crc_align
  4189. {
  4190. uint32_t U;
  4191. struct _hw_enet_rmon_t_crc_align_bitfields
  4192. {
  4193. uint32_t TXPKTS : 16; //!< [15:0] Packets with CRC/align error
  4194. uint32_t RESERVED0 : 16; //!< [31:16]
  4195. } B;
  4196. } hw_enet_rmon_t_crc_align_t;
  4197. #endif
  4198. /*!
  4199. * @name Constants and macros for entire ENET_RMON_T_CRC_ALIGN register
  4200. */
  4201. //@{
  4202. #define HW_ENET_RMON_T_CRC_ALIGN_ADDR(x) (REGS_ENET_BASE(x) + 0x210U)
  4203. #ifndef __LANGUAGE_ASM__
  4204. #define HW_ENET_RMON_T_CRC_ALIGN(x) (*(__I hw_enet_rmon_t_crc_align_t *) HW_ENET_RMON_T_CRC_ALIGN_ADDR(x))
  4205. #define HW_ENET_RMON_T_CRC_ALIGN_RD(x) (HW_ENET_RMON_T_CRC_ALIGN(x).U)
  4206. #endif
  4207. //@}
  4208. /*
  4209. * Constants & macros for individual ENET_RMON_T_CRC_ALIGN bitfields
  4210. */
  4211. /*!
  4212. * @name Register ENET_RMON_T_CRC_ALIGN, field TXPKTS[15:0] (RO)
  4213. */
  4214. //@{
  4215. #define BP_ENET_RMON_T_CRC_ALIGN_TXPKTS (0U) //!< Bit position for ENET_RMON_T_CRC_ALIGN_TXPKTS.
  4216. #define BM_ENET_RMON_T_CRC_ALIGN_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_CRC_ALIGN_TXPKTS.
  4217. #define BS_ENET_RMON_T_CRC_ALIGN_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_CRC_ALIGN_TXPKTS.
  4218. #ifndef __LANGUAGE_ASM__
  4219. //! @brief Read current value of the ENET_RMON_T_CRC_ALIGN_TXPKTS field.
  4220. #define BR_ENET_RMON_T_CRC_ALIGN_TXPKTS(x) (HW_ENET_RMON_T_CRC_ALIGN(x).B.TXPKTS)
  4221. #endif
  4222. //@}
  4223. //-------------------------------------------------------------------------------------------
  4224. // HW_ENET_RMON_T_UNDERSIZE - Tx Packets Less Than Bytes and Good CRC Statistic Register
  4225. //-------------------------------------------------------------------------------------------
  4226. #ifndef __LANGUAGE_ASM__
  4227. /*!
  4228. * @brief HW_ENET_RMON_T_UNDERSIZE - Tx Packets Less Than Bytes and Good CRC Statistic Register (RO)
  4229. *
  4230. * Reset value: 0x00000000U
  4231. */
  4232. typedef union _hw_enet_rmon_t_undersize
  4233. {
  4234. uint32_t U;
  4235. struct _hw_enet_rmon_t_undersize_bitfields
  4236. {
  4237. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4238. uint32_t RESERVED0 : 16; //!< [31:16]
  4239. } B;
  4240. } hw_enet_rmon_t_undersize_t;
  4241. #endif
  4242. /*!
  4243. * @name Constants and macros for entire ENET_RMON_T_UNDERSIZE register
  4244. */
  4245. //@{
  4246. #define HW_ENET_RMON_T_UNDERSIZE_ADDR(x) (REGS_ENET_BASE(x) + 0x214U)
  4247. #ifndef __LANGUAGE_ASM__
  4248. #define HW_ENET_RMON_T_UNDERSIZE(x) (*(__I hw_enet_rmon_t_undersize_t *) HW_ENET_RMON_T_UNDERSIZE_ADDR(x))
  4249. #define HW_ENET_RMON_T_UNDERSIZE_RD(x) (HW_ENET_RMON_T_UNDERSIZE(x).U)
  4250. #endif
  4251. //@}
  4252. /*
  4253. * Constants & macros for individual ENET_RMON_T_UNDERSIZE bitfields
  4254. */
  4255. /*!
  4256. * @name Register ENET_RMON_T_UNDERSIZE, field TXPKTS[15:0] (RO)
  4257. */
  4258. //@{
  4259. #define BP_ENET_RMON_T_UNDERSIZE_TXPKTS (0U) //!< Bit position for ENET_RMON_T_UNDERSIZE_TXPKTS.
  4260. #define BM_ENET_RMON_T_UNDERSIZE_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_UNDERSIZE_TXPKTS.
  4261. #define BS_ENET_RMON_T_UNDERSIZE_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_UNDERSIZE_TXPKTS.
  4262. #ifndef __LANGUAGE_ASM__
  4263. //! @brief Read current value of the ENET_RMON_T_UNDERSIZE_TXPKTS field.
  4264. #define BR_ENET_RMON_T_UNDERSIZE_TXPKTS(x) (HW_ENET_RMON_T_UNDERSIZE(x).B.TXPKTS)
  4265. #endif
  4266. //@}
  4267. //-------------------------------------------------------------------------------------------
  4268. // HW_ENET_RMON_T_OVERSIZE - Tx Packets GT MAX_FL bytes and Good CRC Statistic Register
  4269. //-------------------------------------------------------------------------------------------
  4270. #ifndef __LANGUAGE_ASM__
  4271. /*!
  4272. * @brief HW_ENET_RMON_T_OVERSIZE - Tx Packets GT MAX_FL bytes and Good CRC Statistic Register (RO)
  4273. *
  4274. * Reset value: 0x00000000U
  4275. */
  4276. typedef union _hw_enet_rmon_t_oversize
  4277. {
  4278. uint32_t U;
  4279. struct _hw_enet_rmon_t_oversize_bitfields
  4280. {
  4281. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4282. uint32_t RESERVED0 : 16; //!< [31:16]
  4283. } B;
  4284. } hw_enet_rmon_t_oversize_t;
  4285. #endif
  4286. /*!
  4287. * @name Constants and macros for entire ENET_RMON_T_OVERSIZE register
  4288. */
  4289. //@{
  4290. #define HW_ENET_RMON_T_OVERSIZE_ADDR(x) (REGS_ENET_BASE(x) + 0x218U)
  4291. #ifndef __LANGUAGE_ASM__
  4292. #define HW_ENET_RMON_T_OVERSIZE(x) (*(__I hw_enet_rmon_t_oversize_t *) HW_ENET_RMON_T_OVERSIZE_ADDR(x))
  4293. #define HW_ENET_RMON_T_OVERSIZE_RD(x) (HW_ENET_RMON_T_OVERSIZE(x).U)
  4294. #endif
  4295. //@}
  4296. /*
  4297. * Constants & macros for individual ENET_RMON_T_OVERSIZE bitfields
  4298. */
  4299. /*!
  4300. * @name Register ENET_RMON_T_OVERSIZE, field TXPKTS[15:0] (RO)
  4301. */
  4302. //@{
  4303. #define BP_ENET_RMON_T_OVERSIZE_TXPKTS (0U) //!< Bit position for ENET_RMON_T_OVERSIZE_TXPKTS.
  4304. #define BM_ENET_RMON_T_OVERSIZE_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_OVERSIZE_TXPKTS.
  4305. #define BS_ENET_RMON_T_OVERSIZE_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_OVERSIZE_TXPKTS.
  4306. #ifndef __LANGUAGE_ASM__
  4307. //! @brief Read current value of the ENET_RMON_T_OVERSIZE_TXPKTS field.
  4308. #define BR_ENET_RMON_T_OVERSIZE_TXPKTS(x) (HW_ENET_RMON_T_OVERSIZE(x).B.TXPKTS)
  4309. #endif
  4310. //@}
  4311. //-------------------------------------------------------------------------------------------
  4312. // HW_ENET_RMON_T_FRAG - Tx Packets Less Than 64 Bytes and Bad CRC Statistic Register
  4313. //-------------------------------------------------------------------------------------------
  4314. #ifndef __LANGUAGE_ASM__
  4315. /*!
  4316. * @brief HW_ENET_RMON_T_FRAG - Tx Packets Less Than 64 Bytes and Bad CRC Statistic Register (RO)
  4317. *
  4318. * Reset value: 0x00000000U
  4319. *
  4320. * .
  4321. */
  4322. typedef union _hw_enet_rmon_t_frag
  4323. {
  4324. uint32_t U;
  4325. struct _hw_enet_rmon_t_frag_bitfields
  4326. {
  4327. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4328. uint32_t RESERVED0 : 16; //!< [31:16]
  4329. } B;
  4330. } hw_enet_rmon_t_frag_t;
  4331. #endif
  4332. /*!
  4333. * @name Constants and macros for entire ENET_RMON_T_FRAG register
  4334. */
  4335. //@{
  4336. #define HW_ENET_RMON_T_FRAG_ADDR(x) (REGS_ENET_BASE(x) + 0x21CU)
  4337. #ifndef __LANGUAGE_ASM__
  4338. #define HW_ENET_RMON_T_FRAG(x) (*(__I hw_enet_rmon_t_frag_t *) HW_ENET_RMON_T_FRAG_ADDR(x))
  4339. #define HW_ENET_RMON_T_FRAG_RD(x) (HW_ENET_RMON_T_FRAG(x).U)
  4340. #endif
  4341. //@}
  4342. /*
  4343. * Constants & macros for individual ENET_RMON_T_FRAG bitfields
  4344. */
  4345. /*!
  4346. * @name Register ENET_RMON_T_FRAG, field TXPKTS[15:0] (RO)
  4347. */
  4348. //@{
  4349. #define BP_ENET_RMON_T_FRAG_TXPKTS (0U) //!< Bit position for ENET_RMON_T_FRAG_TXPKTS.
  4350. #define BM_ENET_RMON_T_FRAG_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_FRAG_TXPKTS.
  4351. #define BS_ENET_RMON_T_FRAG_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_FRAG_TXPKTS.
  4352. #ifndef __LANGUAGE_ASM__
  4353. //! @brief Read current value of the ENET_RMON_T_FRAG_TXPKTS field.
  4354. #define BR_ENET_RMON_T_FRAG_TXPKTS(x) (HW_ENET_RMON_T_FRAG(x).B.TXPKTS)
  4355. #endif
  4356. //@}
  4357. //-------------------------------------------------------------------------------------------
  4358. // HW_ENET_RMON_T_JAB - Tx Packets Greater Than MAX_FL bytes and Bad CRC Statistic Register
  4359. //-------------------------------------------------------------------------------------------
  4360. #ifndef __LANGUAGE_ASM__
  4361. /*!
  4362. * @brief HW_ENET_RMON_T_JAB - Tx Packets Greater Than MAX_FL bytes and Bad CRC Statistic Register (RO)
  4363. *
  4364. * Reset value: 0x00000000U
  4365. */
  4366. typedef union _hw_enet_rmon_t_jab
  4367. {
  4368. uint32_t U;
  4369. struct _hw_enet_rmon_t_jab_bitfields
  4370. {
  4371. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4372. uint32_t RESERVED0 : 16; //!< [31:16]
  4373. } B;
  4374. } hw_enet_rmon_t_jab_t;
  4375. #endif
  4376. /*!
  4377. * @name Constants and macros for entire ENET_RMON_T_JAB register
  4378. */
  4379. //@{
  4380. #define HW_ENET_RMON_T_JAB_ADDR(x) (REGS_ENET_BASE(x) + 0x220U)
  4381. #ifndef __LANGUAGE_ASM__
  4382. #define HW_ENET_RMON_T_JAB(x) (*(__I hw_enet_rmon_t_jab_t *) HW_ENET_RMON_T_JAB_ADDR(x))
  4383. #define HW_ENET_RMON_T_JAB_RD(x) (HW_ENET_RMON_T_JAB(x).U)
  4384. #endif
  4385. //@}
  4386. /*
  4387. * Constants & macros for individual ENET_RMON_T_JAB bitfields
  4388. */
  4389. /*!
  4390. * @name Register ENET_RMON_T_JAB, field TXPKTS[15:0] (RO)
  4391. */
  4392. //@{
  4393. #define BP_ENET_RMON_T_JAB_TXPKTS (0U) //!< Bit position for ENET_RMON_T_JAB_TXPKTS.
  4394. #define BM_ENET_RMON_T_JAB_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_JAB_TXPKTS.
  4395. #define BS_ENET_RMON_T_JAB_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_JAB_TXPKTS.
  4396. #ifndef __LANGUAGE_ASM__
  4397. //! @brief Read current value of the ENET_RMON_T_JAB_TXPKTS field.
  4398. #define BR_ENET_RMON_T_JAB_TXPKTS(x) (HW_ENET_RMON_T_JAB(x).B.TXPKTS)
  4399. #endif
  4400. //@}
  4401. //-------------------------------------------------------------------------------------------
  4402. // HW_ENET_RMON_T_COL - Tx Collision Count Statistic Register
  4403. //-------------------------------------------------------------------------------------------
  4404. #ifndef __LANGUAGE_ASM__
  4405. /*!
  4406. * @brief HW_ENET_RMON_T_COL - Tx Collision Count Statistic Register (RO)
  4407. *
  4408. * Reset value: 0x00000000U
  4409. */
  4410. typedef union _hw_enet_rmon_t_col
  4411. {
  4412. uint32_t U;
  4413. struct _hw_enet_rmon_t_col_bitfields
  4414. {
  4415. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4416. uint32_t RESERVED0 : 16; //!< [31:16]
  4417. } B;
  4418. } hw_enet_rmon_t_col_t;
  4419. #endif
  4420. /*!
  4421. * @name Constants and macros for entire ENET_RMON_T_COL register
  4422. */
  4423. //@{
  4424. #define HW_ENET_RMON_T_COL_ADDR(x) (REGS_ENET_BASE(x) + 0x224U)
  4425. #ifndef __LANGUAGE_ASM__
  4426. #define HW_ENET_RMON_T_COL(x) (*(__I hw_enet_rmon_t_col_t *) HW_ENET_RMON_T_COL_ADDR(x))
  4427. #define HW_ENET_RMON_T_COL_RD(x) (HW_ENET_RMON_T_COL(x).U)
  4428. #endif
  4429. //@}
  4430. /*
  4431. * Constants & macros for individual ENET_RMON_T_COL bitfields
  4432. */
  4433. /*!
  4434. * @name Register ENET_RMON_T_COL, field TXPKTS[15:0] (RO)
  4435. */
  4436. //@{
  4437. #define BP_ENET_RMON_T_COL_TXPKTS (0U) //!< Bit position for ENET_RMON_T_COL_TXPKTS.
  4438. #define BM_ENET_RMON_T_COL_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_COL_TXPKTS.
  4439. #define BS_ENET_RMON_T_COL_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_COL_TXPKTS.
  4440. #ifndef __LANGUAGE_ASM__
  4441. //! @brief Read current value of the ENET_RMON_T_COL_TXPKTS field.
  4442. #define BR_ENET_RMON_T_COL_TXPKTS(x) (HW_ENET_RMON_T_COL(x).B.TXPKTS)
  4443. #endif
  4444. //@}
  4445. //-------------------------------------------------------------------------------------------
  4446. // HW_ENET_RMON_T_P64 - Tx 64-Byte Packets Statistic Register
  4447. //-------------------------------------------------------------------------------------------
  4448. #ifndef __LANGUAGE_ASM__
  4449. /*!
  4450. * @brief HW_ENET_RMON_T_P64 - Tx 64-Byte Packets Statistic Register (RO)
  4451. *
  4452. * Reset value: 0x00000000U
  4453. *
  4454. * .
  4455. */
  4456. typedef union _hw_enet_rmon_t_p64
  4457. {
  4458. uint32_t U;
  4459. struct _hw_enet_rmon_t_p64_bitfields
  4460. {
  4461. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4462. uint32_t RESERVED0 : 16; //!< [31:16]
  4463. } B;
  4464. } hw_enet_rmon_t_p64_t;
  4465. #endif
  4466. /*!
  4467. * @name Constants and macros for entire ENET_RMON_T_P64 register
  4468. */
  4469. //@{
  4470. #define HW_ENET_RMON_T_P64_ADDR(x) (REGS_ENET_BASE(x) + 0x228U)
  4471. #ifndef __LANGUAGE_ASM__
  4472. #define HW_ENET_RMON_T_P64(x) (*(__I hw_enet_rmon_t_p64_t *) HW_ENET_RMON_T_P64_ADDR(x))
  4473. #define HW_ENET_RMON_T_P64_RD(x) (HW_ENET_RMON_T_P64(x).U)
  4474. #endif
  4475. //@}
  4476. /*
  4477. * Constants & macros for individual ENET_RMON_T_P64 bitfields
  4478. */
  4479. /*!
  4480. * @name Register ENET_RMON_T_P64, field TXPKTS[15:0] (RO)
  4481. */
  4482. //@{
  4483. #define BP_ENET_RMON_T_P64_TXPKTS (0U) //!< Bit position for ENET_RMON_T_P64_TXPKTS.
  4484. #define BM_ENET_RMON_T_P64_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_P64_TXPKTS.
  4485. #define BS_ENET_RMON_T_P64_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_P64_TXPKTS.
  4486. #ifndef __LANGUAGE_ASM__
  4487. //! @brief Read current value of the ENET_RMON_T_P64_TXPKTS field.
  4488. #define BR_ENET_RMON_T_P64_TXPKTS(x) (HW_ENET_RMON_T_P64(x).B.TXPKTS)
  4489. #endif
  4490. //@}
  4491. //-------------------------------------------------------------------------------------------
  4492. // HW_ENET_RMON_T_P65TO127 - Tx 65- to 127-byte Packets Statistic Register
  4493. //-------------------------------------------------------------------------------------------
  4494. #ifndef __LANGUAGE_ASM__
  4495. /*!
  4496. * @brief HW_ENET_RMON_T_P65TO127 - Tx 65- to 127-byte Packets Statistic Register (RO)
  4497. *
  4498. * Reset value: 0x00000000U
  4499. */
  4500. typedef union _hw_enet_rmon_t_p65to127
  4501. {
  4502. uint32_t U;
  4503. struct _hw_enet_rmon_t_p65to127_bitfields
  4504. {
  4505. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4506. uint32_t RESERVED0 : 16; //!< [31:16]
  4507. } B;
  4508. } hw_enet_rmon_t_p65to127_t;
  4509. #endif
  4510. /*!
  4511. * @name Constants and macros for entire ENET_RMON_T_P65TO127 register
  4512. */
  4513. //@{
  4514. #define HW_ENET_RMON_T_P65TO127_ADDR(x) (REGS_ENET_BASE(x) + 0x22CU)
  4515. #ifndef __LANGUAGE_ASM__
  4516. #define HW_ENET_RMON_T_P65TO127(x) (*(__I hw_enet_rmon_t_p65to127_t *) HW_ENET_RMON_T_P65TO127_ADDR(x))
  4517. #define HW_ENET_RMON_T_P65TO127_RD(x) (HW_ENET_RMON_T_P65TO127(x).U)
  4518. #endif
  4519. //@}
  4520. /*
  4521. * Constants & macros for individual ENET_RMON_T_P65TO127 bitfields
  4522. */
  4523. /*!
  4524. * @name Register ENET_RMON_T_P65TO127, field TXPKTS[15:0] (RO)
  4525. */
  4526. //@{
  4527. #define BP_ENET_RMON_T_P65TO127_TXPKTS (0U) //!< Bit position for ENET_RMON_T_P65TO127_TXPKTS.
  4528. #define BM_ENET_RMON_T_P65TO127_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_P65TO127_TXPKTS.
  4529. #define BS_ENET_RMON_T_P65TO127_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_P65TO127_TXPKTS.
  4530. #ifndef __LANGUAGE_ASM__
  4531. //! @brief Read current value of the ENET_RMON_T_P65TO127_TXPKTS field.
  4532. #define BR_ENET_RMON_T_P65TO127_TXPKTS(x) (HW_ENET_RMON_T_P65TO127(x).B.TXPKTS)
  4533. #endif
  4534. //@}
  4535. //-------------------------------------------------------------------------------------------
  4536. // HW_ENET_RMON_T_P128TO255 - Tx 128- to 255-byte Packets Statistic Register
  4537. //-------------------------------------------------------------------------------------------
  4538. #ifndef __LANGUAGE_ASM__
  4539. /*!
  4540. * @brief HW_ENET_RMON_T_P128TO255 - Tx 128- to 255-byte Packets Statistic Register (RO)
  4541. *
  4542. * Reset value: 0x00000000U
  4543. */
  4544. typedef union _hw_enet_rmon_t_p128to255
  4545. {
  4546. uint32_t U;
  4547. struct _hw_enet_rmon_t_p128to255_bitfields
  4548. {
  4549. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4550. uint32_t RESERVED0 : 16; //!< [31:16]
  4551. } B;
  4552. } hw_enet_rmon_t_p128to255_t;
  4553. #endif
  4554. /*!
  4555. * @name Constants and macros for entire ENET_RMON_T_P128TO255 register
  4556. */
  4557. //@{
  4558. #define HW_ENET_RMON_T_P128TO255_ADDR(x) (REGS_ENET_BASE(x) + 0x230U)
  4559. #ifndef __LANGUAGE_ASM__
  4560. #define HW_ENET_RMON_T_P128TO255(x) (*(__I hw_enet_rmon_t_p128to255_t *) HW_ENET_RMON_T_P128TO255_ADDR(x))
  4561. #define HW_ENET_RMON_T_P128TO255_RD(x) (HW_ENET_RMON_T_P128TO255(x).U)
  4562. #endif
  4563. //@}
  4564. /*
  4565. * Constants & macros for individual ENET_RMON_T_P128TO255 bitfields
  4566. */
  4567. /*!
  4568. * @name Register ENET_RMON_T_P128TO255, field TXPKTS[15:0] (RO)
  4569. */
  4570. //@{
  4571. #define BP_ENET_RMON_T_P128TO255_TXPKTS (0U) //!< Bit position for ENET_RMON_T_P128TO255_TXPKTS.
  4572. #define BM_ENET_RMON_T_P128TO255_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_P128TO255_TXPKTS.
  4573. #define BS_ENET_RMON_T_P128TO255_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_P128TO255_TXPKTS.
  4574. #ifndef __LANGUAGE_ASM__
  4575. //! @brief Read current value of the ENET_RMON_T_P128TO255_TXPKTS field.
  4576. #define BR_ENET_RMON_T_P128TO255_TXPKTS(x) (HW_ENET_RMON_T_P128TO255(x).B.TXPKTS)
  4577. #endif
  4578. //@}
  4579. //-------------------------------------------------------------------------------------------
  4580. // HW_ENET_RMON_T_P256TO511 - Tx 256- to 511-byte Packets Statistic Register
  4581. //-------------------------------------------------------------------------------------------
  4582. #ifndef __LANGUAGE_ASM__
  4583. /*!
  4584. * @brief HW_ENET_RMON_T_P256TO511 - Tx 256- to 511-byte Packets Statistic Register (RO)
  4585. *
  4586. * Reset value: 0x00000000U
  4587. */
  4588. typedef union _hw_enet_rmon_t_p256to511
  4589. {
  4590. uint32_t U;
  4591. struct _hw_enet_rmon_t_p256to511_bitfields
  4592. {
  4593. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4594. uint32_t RESERVED0 : 16; //!< [31:16]
  4595. } B;
  4596. } hw_enet_rmon_t_p256to511_t;
  4597. #endif
  4598. /*!
  4599. * @name Constants and macros for entire ENET_RMON_T_P256TO511 register
  4600. */
  4601. //@{
  4602. #define HW_ENET_RMON_T_P256TO511_ADDR(x) (REGS_ENET_BASE(x) + 0x234U)
  4603. #ifndef __LANGUAGE_ASM__
  4604. #define HW_ENET_RMON_T_P256TO511(x) (*(__I hw_enet_rmon_t_p256to511_t *) HW_ENET_RMON_T_P256TO511_ADDR(x))
  4605. #define HW_ENET_RMON_T_P256TO511_RD(x) (HW_ENET_RMON_T_P256TO511(x).U)
  4606. #endif
  4607. //@}
  4608. /*
  4609. * Constants & macros for individual ENET_RMON_T_P256TO511 bitfields
  4610. */
  4611. /*!
  4612. * @name Register ENET_RMON_T_P256TO511, field TXPKTS[15:0] (RO)
  4613. */
  4614. //@{
  4615. #define BP_ENET_RMON_T_P256TO511_TXPKTS (0U) //!< Bit position for ENET_RMON_T_P256TO511_TXPKTS.
  4616. #define BM_ENET_RMON_T_P256TO511_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_P256TO511_TXPKTS.
  4617. #define BS_ENET_RMON_T_P256TO511_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_P256TO511_TXPKTS.
  4618. #ifndef __LANGUAGE_ASM__
  4619. //! @brief Read current value of the ENET_RMON_T_P256TO511_TXPKTS field.
  4620. #define BR_ENET_RMON_T_P256TO511_TXPKTS(x) (HW_ENET_RMON_T_P256TO511(x).B.TXPKTS)
  4621. #endif
  4622. //@}
  4623. //-------------------------------------------------------------------------------------------
  4624. // HW_ENET_RMON_T_P512TO1023 - Tx 512- to 1023-byte Packets Statistic Register
  4625. //-------------------------------------------------------------------------------------------
  4626. #ifndef __LANGUAGE_ASM__
  4627. /*!
  4628. * @brief HW_ENET_RMON_T_P512TO1023 - Tx 512- to 1023-byte Packets Statistic Register (RO)
  4629. *
  4630. * Reset value: 0x00000000U
  4631. *
  4632. * .
  4633. */
  4634. typedef union _hw_enet_rmon_t_p512to1023
  4635. {
  4636. uint32_t U;
  4637. struct _hw_enet_rmon_t_p512to1023_bitfields
  4638. {
  4639. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4640. uint32_t RESERVED0 : 16; //!< [31:16]
  4641. } B;
  4642. } hw_enet_rmon_t_p512to1023_t;
  4643. #endif
  4644. /*!
  4645. * @name Constants and macros for entire ENET_RMON_T_P512TO1023 register
  4646. */
  4647. //@{
  4648. #define HW_ENET_RMON_T_P512TO1023_ADDR(x) (REGS_ENET_BASE(x) + 0x238U)
  4649. #ifndef __LANGUAGE_ASM__
  4650. #define HW_ENET_RMON_T_P512TO1023(x) (*(__I hw_enet_rmon_t_p512to1023_t *) HW_ENET_RMON_T_P512TO1023_ADDR(x))
  4651. #define HW_ENET_RMON_T_P512TO1023_RD(x) (HW_ENET_RMON_T_P512TO1023(x).U)
  4652. #endif
  4653. //@}
  4654. /*
  4655. * Constants & macros for individual ENET_RMON_T_P512TO1023 bitfields
  4656. */
  4657. /*!
  4658. * @name Register ENET_RMON_T_P512TO1023, field TXPKTS[15:0] (RO)
  4659. */
  4660. //@{
  4661. #define BP_ENET_RMON_T_P512TO1023_TXPKTS (0U) //!< Bit position for ENET_RMON_T_P512TO1023_TXPKTS.
  4662. #define BM_ENET_RMON_T_P512TO1023_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_P512TO1023_TXPKTS.
  4663. #define BS_ENET_RMON_T_P512TO1023_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_P512TO1023_TXPKTS.
  4664. #ifndef __LANGUAGE_ASM__
  4665. //! @brief Read current value of the ENET_RMON_T_P512TO1023_TXPKTS field.
  4666. #define BR_ENET_RMON_T_P512TO1023_TXPKTS(x) (HW_ENET_RMON_T_P512TO1023(x).B.TXPKTS)
  4667. #endif
  4668. //@}
  4669. //-------------------------------------------------------------------------------------------
  4670. // HW_ENET_RMON_T_P1024TO2047 - Tx 1024- to 2047-byte Packets Statistic Register
  4671. //-------------------------------------------------------------------------------------------
  4672. #ifndef __LANGUAGE_ASM__
  4673. /*!
  4674. * @brief HW_ENET_RMON_T_P1024TO2047 - Tx 1024- to 2047-byte Packets Statistic Register (RO)
  4675. *
  4676. * Reset value: 0x00000000U
  4677. */
  4678. typedef union _hw_enet_rmon_t_p1024to2047
  4679. {
  4680. uint32_t U;
  4681. struct _hw_enet_rmon_t_p1024to2047_bitfields
  4682. {
  4683. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4684. uint32_t RESERVED0 : 16; //!< [31:16]
  4685. } B;
  4686. } hw_enet_rmon_t_p1024to2047_t;
  4687. #endif
  4688. /*!
  4689. * @name Constants and macros for entire ENET_RMON_T_P1024TO2047 register
  4690. */
  4691. //@{
  4692. #define HW_ENET_RMON_T_P1024TO2047_ADDR(x) (REGS_ENET_BASE(x) + 0x23CU)
  4693. #ifndef __LANGUAGE_ASM__
  4694. #define HW_ENET_RMON_T_P1024TO2047(x) (*(__I hw_enet_rmon_t_p1024to2047_t *) HW_ENET_RMON_T_P1024TO2047_ADDR(x))
  4695. #define HW_ENET_RMON_T_P1024TO2047_RD(x) (HW_ENET_RMON_T_P1024TO2047(x).U)
  4696. #endif
  4697. //@}
  4698. /*
  4699. * Constants & macros for individual ENET_RMON_T_P1024TO2047 bitfields
  4700. */
  4701. /*!
  4702. * @name Register ENET_RMON_T_P1024TO2047, field TXPKTS[15:0] (RO)
  4703. */
  4704. //@{
  4705. #define BP_ENET_RMON_T_P1024TO2047_TXPKTS (0U) //!< Bit position for ENET_RMON_T_P1024TO2047_TXPKTS.
  4706. #define BM_ENET_RMON_T_P1024TO2047_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_P1024TO2047_TXPKTS.
  4707. #define BS_ENET_RMON_T_P1024TO2047_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_P1024TO2047_TXPKTS.
  4708. #ifndef __LANGUAGE_ASM__
  4709. //! @brief Read current value of the ENET_RMON_T_P1024TO2047_TXPKTS field.
  4710. #define BR_ENET_RMON_T_P1024TO2047_TXPKTS(x) (HW_ENET_RMON_T_P1024TO2047(x).B.TXPKTS)
  4711. #endif
  4712. //@}
  4713. //-------------------------------------------------------------------------------------------
  4714. // HW_ENET_RMON_T_P_GTE2048 - Tx Packets Greater Than 2048 Bytes Statistic Register
  4715. //-------------------------------------------------------------------------------------------
  4716. #ifndef __LANGUAGE_ASM__
  4717. /*!
  4718. * @brief HW_ENET_RMON_T_P_GTE2048 - Tx Packets Greater Than 2048 Bytes Statistic Register (RO)
  4719. *
  4720. * Reset value: 0x00000000U
  4721. */
  4722. typedef union _hw_enet_rmon_t_p_gte2048
  4723. {
  4724. uint32_t U;
  4725. struct _hw_enet_rmon_t_p_gte2048_bitfields
  4726. {
  4727. uint32_t TXPKTS : 16; //!< [15:0] Packet count
  4728. uint32_t RESERVED0 : 16; //!< [31:16]
  4729. } B;
  4730. } hw_enet_rmon_t_p_gte2048_t;
  4731. #endif
  4732. /*!
  4733. * @name Constants and macros for entire ENET_RMON_T_P_GTE2048 register
  4734. */
  4735. //@{
  4736. #define HW_ENET_RMON_T_P_GTE2048_ADDR(x) (REGS_ENET_BASE(x) + 0x240U)
  4737. #ifndef __LANGUAGE_ASM__
  4738. #define HW_ENET_RMON_T_P_GTE2048(x) (*(__I hw_enet_rmon_t_p_gte2048_t *) HW_ENET_RMON_T_P_GTE2048_ADDR(x))
  4739. #define HW_ENET_RMON_T_P_GTE2048_RD(x) (HW_ENET_RMON_T_P_GTE2048(x).U)
  4740. #endif
  4741. //@}
  4742. /*
  4743. * Constants & macros for individual ENET_RMON_T_P_GTE2048 bitfields
  4744. */
  4745. /*!
  4746. * @name Register ENET_RMON_T_P_GTE2048, field TXPKTS[15:0] (RO)
  4747. */
  4748. //@{
  4749. #define BP_ENET_RMON_T_P_GTE2048_TXPKTS (0U) //!< Bit position for ENET_RMON_T_P_GTE2048_TXPKTS.
  4750. #define BM_ENET_RMON_T_P_GTE2048_TXPKTS (0x0000FFFFU) //!< Bit mask for ENET_RMON_T_P_GTE2048_TXPKTS.
  4751. #define BS_ENET_RMON_T_P_GTE2048_TXPKTS (16U) //!< Bit field size in bits for ENET_RMON_T_P_GTE2048_TXPKTS.
  4752. #ifndef __LANGUAGE_ASM__
  4753. //! @brief Read current value of the ENET_RMON_T_P_GTE2048_TXPKTS field.
  4754. #define BR_ENET_RMON_T_P_GTE2048_TXPKTS(x) (HW_ENET_RMON_T_P_GTE2048(x).B.TXPKTS)
  4755. #endif
  4756. //@}
  4757. //-------------------------------------------------------------------------------------------
  4758. // HW_ENET_RMON_T_OCTETS - Tx Octets Statistic Register
  4759. //-------------------------------------------------------------------------------------------
  4760. #ifndef __LANGUAGE_ASM__
  4761. /*!
  4762. * @brief HW_ENET_RMON_T_OCTETS - Tx Octets Statistic Register (RO)
  4763. *
  4764. * Reset value: 0x00000000U
  4765. */
  4766. typedef union _hw_enet_rmon_t_octets
  4767. {
  4768. uint32_t U;
  4769. struct _hw_enet_rmon_t_octets_bitfields
  4770. {
  4771. uint32_t TXOCTS : 32; //!< [31:0] Octet count
  4772. } B;
  4773. } hw_enet_rmon_t_octets_t;
  4774. #endif
  4775. /*!
  4776. * @name Constants and macros for entire ENET_RMON_T_OCTETS register
  4777. */
  4778. //@{
  4779. #define HW_ENET_RMON_T_OCTETS_ADDR(x) (REGS_ENET_BASE(x) + 0x244U)
  4780. #ifndef __LANGUAGE_ASM__
  4781. #define HW_ENET_RMON_T_OCTETS(x) (*(__I hw_enet_rmon_t_octets_t *) HW_ENET_RMON_T_OCTETS_ADDR(x))
  4782. #define HW_ENET_RMON_T_OCTETS_RD(x) (HW_ENET_RMON_T_OCTETS(x).U)
  4783. #endif
  4784. //@}
  4785. /*
  4786. * Constants & macros for individual ENET_RMON_T_OCTETS bitfields
  4787. */
  4788. /*!
  4789. * @name Register ENET_RMON_T_OCTETS, field TXOCTS[31:0] (RO)
  4790. */
  4791. //@{
  4792. #define BP_ENET_RMON_T_OCTETS_TXOCTS (0U) //!< Bit position for ENET_RMON_T_OCTETS_TXOCTS.
  4793. #define BM_ENET_RMON_T_OCTETS_TXOCTS (0xFFFFFFFFU) //!< Bit mask for ENET_RMON_T_OCTETS_TXOCTS.
  4794. #define BS_ENET_RMON_T_OCTETS_TXOCTS (32U) //!< Bit field size in bits for ENET_RMON_T_OCTETS_TXOCTS.
  4795. #ifndef __LANGUAGE_ASM__
  4796. //! @brief Read current value of the ENET_RMON_T_OCTETS_TXOCTS field.
  4797. #define BR_ENET_RMON_T_OCTETS_TXOCTS(x) (HW_ENET_RMON_T_OCTETS(x).U)
  4798. #endif
  4799. //@}
  4800. //-------------------------------------------------------------------------------------------
  4801. // HW_ENET_IEEE_T_FRAME_OK - Frames Transmitted OK Statistic Register
  4802. //-------------------------------------------------------------------------------------------
  4803. #ifndef __LANGUAGE_ASM__
  4804. /*!
  4805. * @brief HW_ENET_IEEE_T_FRAME_OK - Frames Transmitted OK Statistic Register (RO)
  4806. *
  4807. * Reset value: 0x00000000U
  4808. */
  4809. typedef union _hw_enet_ieee_t_frame_ok
  4810. {
  4811. uint32_t U;
  4812. struct _hw_enet_ieee_t_frame_ok_bitfields
  4813. {
  4814. uint32_t COUNT : 16; //!< [15:0] Frame count
  4815. uint32_t RESERVED0 : 16; //!< [31:16]
  4816. } B;
  4817. } hw_enet_ieee_t_frame_ok_t;
  4818. #endif
  4819. /*!
  4820. * @name Constants and macros for entire ENET_IEEE_T_FRAME_OK register
  4821. */
  4822. //@{
  4823. #define HW_ENET_IEEE_T_FRAME_OK_ADDR(x) (REGS_ENET_BASE(x) + 0x24CU)
  4824. #ifndef __LANGUAGE_ASM__
  4825. #define HW_ENET_IEEE_T_FRAME_OK(x) (*(__I hw_enet_ieee_t_frame_ok_t *) HW_ENET_IEEE_T_FRAME_OK_ADDR(x))
  4826. #define HW_ENET_IEEE_T_FRAME_OK_RD(x) (HW_ENET_IEEE_T_FRAME_OK(x).U)
  4827. #endif
  4828. //@}
  4829. /*
  4830. * Constants & macros for individual ENET_IEEE_T_FRAME_OK bitfields
  4831. */
  4832. /*!
  4833. * @name Register ENET_IEEE_T_FRAME_OK, field COUNT[15:0] (RO)
  4834. */
  4835. //@{
  4836. #define BP_ENET_IEEE_T_FRAME_OK_COUNT (0U) //!< Bit position for ENET_IEEE_T_FRAME_OK_COUNT.
  4837. #define BM_ENET_IEEE_T_FRAME_OK_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_T_FRAME_OK_COUNT.
  4838. #define BS_ENET_IEEE_T_FRAME_OK_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_T_FRAME_OK_COUNT.
  4839. #ifndef __LANGUAGE_ASM__
  4840. //! @brief Read current value of the ENET_IEEE_T_FRAME_OK_COUNT field.
  4841. #define BR_ENET_IEEE_T_FRAME_OK_COUNT(x) (HW_ENET_IEEE_T_FRAME_OK(x).B.COUNT)
  4842. #endif
  4843. //@}
  4844. //-------------------------------------------------------------------------------------------
  4845. // HW_ENET_IEEE_T_1COL - Frames Transmitted with Single Collision Statistic Register
  4846. //-------------------------------------------------------------------------------------------
  4847. #ifndef __LANGUAGE_ASM__
  4848. /*!
  4849. * @brief HW_ENET_IEEE_T_1COL - Frames Transmitted with Single Collision Statistic Register (RO)
  4850. *
  4851. * Reset value: 0x00000000U
  4852. */
  4853. typedef union _hw_enet_ieee_t_1col
  4854. {
  4855. uint32_t U;
  4856. struct _hw_enet_ieee_t_1col_bitfields
  4857. {
  4858. uint32_t COUNT : 16; //!< [15:0] Frame count
  4859. uint32_t RESERVED0 : 16; //!< [31:16]
  4860. } B;
  4861. } hw_enet_ieee_t_1col_t;
  4862. #endif
  4863. /*!
  4864. * @name Constants and macros for entire ENET_IEEE_T_1COL register
  4865. */
  4866. //@{
  4867. #define HW_ENET_IEEE_T_1COL_ADDR(x) (REGS_ENET_BASE(x) + 0x250U)
  4868. #ifndef __LANGUAGE_ASM__
  4869. #define HW_ENET_IEEE_T_1COL(x) (*(__I hw_enet_ieee_t_1col_t *) HW_ENET_IEEE_T_1COL_ADDR(x))
  4870. #define HW_ENET_IEEE_T_1COL_RD(x) (HW_ENET_IEEE_T_1COL(x).U)
  4871. #endif
  4872. //@}
  4873. /*
  4874. * Constants & macros for individual ENET_IEEE_T_1COL bitfields
  4875. */
  4876. /*!
  4877. * @name Register ENET_IEEE_T_1COL, field COUNT[15:0] (RO)
  4878. */
  4879. //@{
  4880. #define BP_ENET_IEEE_T_1COL_COUNT (0U) //!< Bit position for ENET_IEEE_T_1COL_COUNT.
  4881. #define BM_ENET_IEEE_T_1COL_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_T_1COL_COUNT.
  4882. #define BS_ENET_IEEE_T_1COL_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_T_1COL_COUNT.
  4883. #ifndef __LANGUAGE_ASM__
  4884. //! @brief Read current value of the ENET_IEEE_T_1COL_COUNT field.
  4885. #define BR_ENET_IEEE_T_1COL_COUNT(x) (HW_ENET_IEEE_T_1COL(x).B.COUNT)
  4886. #endif
  4887. //@}
  4888. //-------------------------------------------------------------------------------------------
  4889. // HW_ENET_IEEE_T_MCOL - Frames Transmitted with Multiple Collisions Statistic Register
  4890. //-------------------------------------------------------------------------------------------
  4891. #ifndef __LANGUAGE_ASM__
  4892. /*!
  4893. * @brief HW_ENET_IEEE_T_MCOL - Frames Transmitted with Multiple Collisions Statistic Register (RO)
  4894. *
  4895. * Reset value: 0x00000000U
  4896. */
  4897. typedef union _hw_enet_ieee_t_mcol
  4898. {
  4899. uint32_t U;
  4900. struct _hw_enet_ieee_t_mcol_bitfields
  4901. {
  4902. uint32_t COUNT : 16; //!< [15:0] Frame count
  4903. uint32_t RESERVED0 : 16; //!< [31:16]
  4904. } B;
  4905. } hw_enet_ieee_t_mcol_t;
  4906. #endif
  4907. /*!
  4908. * @name Constants and macros for entire ENET_IEEE_T_MCOL register
  4909. */
  4910. //@{
  4911. #define HW_ENET_IEEE_T_MCOL_ADDR(x) (REGS_ENET_BASE(x) + 0x254U)
  4912. #ifndef __LANGUAGE_ASM__
  4913. #define HW_ENET_IEEE_T_MCOL(x) (*(__I hw_enet_ieee_t_mcol_t *) HW_ENET_IEEE_T_MCOL_ADDR(x))
  4914. #define HW_ENET_IEEE_T_MCOL_RD(x) (HW_ENET_IEEE_T_MCOL(x).U)
  4915. #endif
  4916. //@}
  4917. /*
  4918. * Constants & macros for individual ENET_IEEE_T_MCOL bitfields
  4919. */
  4920. /*!
  4921. * @name Register ENET_IEEE_T_MCOL, field COUNT[15:0] (RO)
  4922. */
  4923. //@{
  4924. #define BP_ENET_IEEE_T_MCOL_COUNT (0U) //!< Bit position for ENET_IEEE_T_MCOL_COUNT.
  4925. #define BM_ENET_IEEE_T_MCOL_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_T_MCOL_COUNT.
  4926. #define BS_ENET_IEEE_T_MCOL_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_T_MCOL_COUNT.
  4927. #ifndef __LANGUAGE_ASM__
  4928. //! @brief Read current value of the ENET_IEEE_T_MCOL_COUNT field.
  4929. #define BR_ENET_IEEE_T_MCOL_COUNT(x) (HW_ENET_IEEE_T_MCOL(x).B.COUNT)
  4930. #endif
  4931. //@}
  4932. //-------------------------------------------------------------------------------------------
  4933. // HW_ENET_IEEE_T_DEF - Frames Transmitted after Deferral Delay Statistic Register
  4934. //-------------------------------------------------------------------------------------------
  4935. #ifndef __LANGUAGE_ASM__
  4936. /*!
  4937. * @brief HW_ENET_IEEE_T_DEF - Frames Transmitted after Deferral Delay Statistic Register (RO)
  4938. *
  4939. * Reset value: 0x00000000U
  4940. */
  4941. typedef union _hw_enet_ieee_t_def
  4942. {
  4943. uint32_t U;
  4944. struct _hw_enet_ieee_t_def_bitfields
  4945. {
  4946. uint32_t COUNT : 16; //!< [15:0] Frame count
  4947. uint32_t RESERVED0 : 16; //!< [31:16]
  4948. } B;
  4949. } hw_enet_ieee_t_def_t;
  4950. #endif
  4951. /*!
  4952. * @name Constants and macros for entire ENET_IEEE_T_DEF register
  4953. */
  4954. //@{
  4955. #define HW_ENET_IEEE_T_DEF_ADDR(x) (REGS_ENET_BASE(x) + 0x258U)
  4956. #ifndef __LANGUAGE_ASM__
  4957. #define HW_ENET_IEEE_T_DEF(x) (*(__I hw_enet_ieee_t_def_t *) HW_ENET_IEEE_T_DEF_ADDR(x))
  4958. #define HW_ENET_IEEE_T_DEF_RD(x) (HW_ENET_IEEE_T_DEF(x).U)
  4959. #endif
  4960. //@}
  4961. /*
  4962. * Constants & macros for individual ENET_IEEE_T_DEF bitfields
  4963. */
  4964. /*!
  4965. * @name Register ENET_IEEE_T_DEF, field COUNT[15:0] (RO)
  4966. */
  4967. //@{
  4968. #define BP_ENET_IEEE_T_DEF_COUNT (0U) //!< Bit position for ENET_IEEE_T_DEF_COUNT.
  4969. #define BM_ENET_IEEE_T_DEF_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_T_DEF_COUNT.
  4970. #define BS_ENET_IEEE_T_DEF_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_T_DEF_COUNT.
  4971. #ifndef __LANGUAGE_ASM__
  4972. //! @brief Read current value of the ENET_IEEE_T_DEF_COUNT field.
  4973. #define BR_ENET_IEEE_T_DEF_COUNT(x) (HW_ENET_IEEE_T_DEF(x).B.COUNT)
  4974. #endif
  4975. //@}
  4976. //-------------------------------------------------------------------------------------------
  4977. // HW_ENET_IEEE_T_LCOL - Frames Transmitted with Late Collision Statistic Register
  4978. //-------------------------------------------------------------------------------------------
  4979. #ifndef __LANGUAGE_ASM__
  4980. /*!
  4981. * @brief HW_ENET_IEEE_T_LCOL - Frames Transmitted with Late Collision Statistic Register (RO)
  4982. *
  4983. * Reset value: 0x00000000U
  4984. */
  4985. typedef union _hw_enet_ieee_t_lcol
  4986. {
  4987. uint32_t U;
  4988. struct _hw_enet_ieee_t_lcol_bitfields
  4989. {
  4990. uint32_t COUNT : 16; //!< [15:0] Frame count
  4991. uint32_t RESERVED0 : 16; //!< [31:16]
  4992. } B;
  4993. } hw_enet_ieee_t_lcol_t;
  4994. #endif
  4995. /*!
  4996. * @name Constants and macros for entire ENET_IEEE_T_LCOL register
  4997. */
  4998. //@{
  4999. #define HW_ENET_IEEE_T_LCOL_ADDR(x) (REGS_ENET_BASE(x) + 0x25CU)
  5000. #ifndef __LANGUAGE_ASM__
  5001. #define HW_ENET_IEEE_T_LCOL(x) (*(__I hw_enet_ieee_t_lcol_t *) HW_ENET_IEEE_T_LCOL_ADDR(x))
  5002. #define HW_ENET_IEEE_T_LCOL_RD(x) (HW_ENET_IEEE_T_LCOL(x).U)
  5003. #endif
  5004. //@}
  5005. /*
  5006. * Constants & macros for individual ENET_IEEE_T_LCOL bitfields
  5007. */
  5008. /*!
  5009. * @name Register ENET_IEEE_T_LCOL, field COUNT[15:0] (RO)
  5010. */
  5011. //@{
  5012. #define BP_ENET_IEEE_T_LCOL_COUNT (0U) //!< Bit position for ENET_IEEE_T_LCOL_COUNT.
  5013. #define BM_ENET_IEEE_T_LCOL_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_T_LCOL_COUNT.
  5014. #define BS_ENET_IEEE_T_LCOL_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_T_LCOL_COUNT.
  5015. #ifndef __LANGUAGE_ASM__
  5016. //! @brief Read current value of the ENET_IEEE_T_LCOL_COUNT field.
  5017. #define BR_ENET_IEEE_T_LCOL_COUNT(x) (HW_ENET_IEEE_T_LCOL(x).B.COUNT)
  5018. #endif
  5019. //@}
  5020. //-------------------------------------------------------------------------------------------
  5021. // HW_ENET_IEEE_T_EXCOL - Frames Transmitted with Excessive Collisions Statistic Register
  5022. //-------------------------------------------------------------------------------------------
  5023. #ifndef __LANGUAGE_ASM__
  5024. /*!
  5025. * @brief HW_ENET_IEEE_T_EXCOL - Frames Transmitted with Excessive Collisions Statistic Register (RO)
  5026. *
  5027. * Reset value: 0x00000000U
  5028. */
  5029. typedef union _hw_enet_ieee_t_excol
  5030. {
  5031. uint32_t U;
  5032. struct _hw_enet_ieee_t_excol_bitfields
  5033. {
  5034. uint32_t COUNT : 16; //!< [15:0] Frame count
  5035. uint32_t RESERVED0 : 16; //!< [31:16]
  5036. } B;
  5037. } hw_enet_ieee_t_excol_t;
  5038. #endif
  5039. /*!
  5040. * @name Constants and macros for entire ENET_IEEE_T_EXCOL register
  5041. */
  5042. //@{
  5043. #define HW_ENET_IEEE_T_EXCOL_ADDR(x) (REGS_ENET_BASE(x) + 0x260U)
  5044. #ifndef __LANGUAGE_ASM__
  5045. #define HW_ENET_IEEE_T_EXCOL(x) (*(__I hw_enet_ieee_t_excol_t *) HW_ENET_IEEE_T_EXCOL_ADDR(x))
  5046. #define HW_ENET_IEEE_T_EXCOL_RD(x) (HW_ENET_IEEE_T_EXCOL(x).U)
  5047. #endif
  5048. //@}
  5049. /*
  5050. * Constants & macros for individual ENET_IEEE_T_EXCOL bitfields
  5051. */
  5052. /*!
  5053. * @name Register ENET_IEEE_T_EXCOL, field COUNT[15:0] (RO)
  5054. */
  5055. //@{
  5056. #define BP_ENET_IEEE_T_EXCOL_COUNT (0U) //!< Bit position for ENET_IEEE_T_EXCOL_COUNT.
  5057. #define BM_ENET_IEEE_T_EXCOL_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_T_EXCOL_COUNT.
  5058. #define BS_ENET_IEEE_T_EXCOL_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_T_EXCOL_COUNT.
  5059. #ifndef __LANGUAGE_ASM__
  5060. //! @brief Read current value of the ENET_IEEE_T_EXCOL_COUNT field.
  5061. #define BR_ENET_IEEE_T_EXCOL_COUNT(x) (HW_ENET_IEEE_T_EXCOL(x).B.COUNT)
  5062. #endif
  5063. //@}
  5064. //-------------------------------------------------------------------------------------------
  5065. // HW_ENET_IEEE_T_MACERR - Frames Transmitted with Tx FIFO Underrun Statistic Register
  5066. //-------------------------------------------------------------------------------------------
  5067. #ifndef __LANGUAGE_ASM__
  5068. /*!
  5069. * @brief HW_ENET_IEEE_T_MACERR - Frames Transmitted with Tx FIFO Underrun Statistic Register (RO)
  5070. *
  5071. * Reset value: 0x00000000U
  5072. */
  5073. typedef union _hw_enet_ieee_t_macerr
  5074. {
  5075. uint32_t U;
  5076. struct _hw_enet_ieee_t_macerr_bitfields
  5077. {
  5078. uint32_t COUNT : 16; //!< [15:0] Frame count
  5079. uint32_t RESERVED0 : 16; //!< [31:16]
  5080. } B;
  5081. } hw_enet_ieee_t_macerr_t;
  5082. #endif
  5083. /*!
  5084. * @name Constants and macros for entire ENET_IEEE_T_MACERR register
  5085. */
  5086. //@{
  5087. #define HW_ENET_IEEE_T_MACERR_ADDR(x) (REGS_ENET_BASE(x) + 0x264U)
  5088. #ifndef __LANGUAGE_ASM__
  5089. #define HW_ENET_IEEE_T_MACERR(x) (*(__I hw_enet_ieee_t_macerr_t *) HW_ENET_IEEE_T_MACERR_ADDR(x))
  5090. #define HW_ENET_IEEE_T_MACERR_RD(x) (HW_ENET_IEEE_T_MACERR(x).U)
  5091. #endif
  5092. //@}
  5093. /*
  5094. * Constants & macros for individual ENET_IEEE_T_MACERR bitfields
  5095. */
  5096. /*!
  5097. * @name Register ENET_IEEE_T_MACERR, field COUNT[15:0] (RO)
  5098. */
  5099. //@{
  5100. #define BP_ENET_IEEE_T_MACERR_COUNT (0U) //!< Bit position for ENET_IEEE_T_MACERR_COUNT.
  5101. #define BM_ENET_IEEE_T_MACERR_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_T_MACERR_COUNT.
  5102. #define BS_ENET_IEEE_T_MACERR_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_T_MACERR_COUNT.
  5103. #ifndef __LANGUAGE_ASM__
  5104. //! @brief Read current value of the ENET_IEEE_T_MACERR_COUNT field.
  5105. #define BR_ENET_IEEE_T_MACERR_COUNT(x) (HW_ENET_IEEE_T_MACERR(x).B.COUNT)
  5106. #endif
  5107. //@}
  5108. //-------------------------------------------------------------------------------------------
  5109. // HW_ENET_IEEE_T_CSERR - Frames Transmitted with Carrier Sense Error Statistic Register
  5110. //-------------------------------------------------------------------------------------------
  5111. #ifndef __LANGUAGE_ASM__
  5112. /*!
  5113. * @brief HW_ENET_IEEE_T_CSERR - Frames Transmitted with Carrier Sense Error Statistic Register (RO)
  5114. *
  5115. * Reset value: 0x00000000U
  5116. */
  5117. typedef union _hw_enet_ieee_t_cserr
  5118. {
  5119. uint32_t U;
  5120. struct _hw_enet_ieee_t_cserr_bitfields
  5121. {
  5122. uint32_t COUNT : 16; //!< [15:0] Frame count
  5123. uint32_t RESERVED0 : 16; //!< [31:16]
  5124. } B;
  5125. } hw_enet_ieee_t_cserr_t;
  5126. #endif
  5127. /*!
  5128. * @name Constants and macros for entire ENET_IEEE_T_CSERR register
  5129. */
  5130. //@{
  5131. #define HW_ENET_IEEE_T_CSERR_ADDR(x) (REGS_ENET_BASE(x) + 0x268U)
  5132. #ifndef __LANGUAGE_ASM__
  5133. #define HW_ENET_IEEE_T_CSERR(x) (*(__I hw_enet_ieee_t_cserr_t *) HW_ENET_IEEE_T_CSERR_ADDR(x))
  5134. #define HW_ENET_IEEE_T_CSERR_RD(x) (HW_ENET_IEEE_T_CSERR(x).U)
  5135. #endif
  5136. //@}
  5137. /*
  5138. * Constants & macros for individual ENET_IEEE_T_CSERR bitfields
  5139. */
  5140. /*!
  5141. * @name Register ENET_IEEE_T_CSERR, field COUNT[15:0] (RO)
  5142. */
  5143. //@{
  5144. #define BP_ENET_IEEE_T_CSERR_COUNT (0U) //!< Bit position for ENET_IEEE_T_CSERR_COUNT.
  5145. #define BM_ENET_IEEE_T_CSERR_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_T_CSERR_COUNT.
  5146. #define BS_ENET_IEEE_T_CSERR_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_T_CSERR_COUNT.
  5147. #ifndef __LANGUAGE_ASM__
  5148. //! @brief Read current value of the ENET_IEEE_T_CSERR_COUNT field.
  5149. #define BR_ENET_IEEE_T_CSERR_COUNT(x) (HW_ENET_IEEE_T_CSERR(x).B.COUNT)
  5150. #endif
  5151. //@}
  5152. //-------------------------------------------------------------------------------------------
  5153. // HW_ENET_IEEE_T_FDXFC - Flow Control Pause Frames Transmitted Statistic Register
  5154. //-------------------------------------------------------------------------------------------
  5155. #ifndef __LANGUAGE_ASM__
  5156. /*!
  5157. * @brief HW_ENET_IEEE_T_FDXFC - Flow Control Pause Frames Transmitted Statistic Register (RO)
  5158. *
  5159. * Reset value: 0x00000000U
  5160. */
  5161. typedef union _hw_enet_ieee_t_fdxfc
  5162. {
  5163. uint32_t U;
  5164. struct _hw_enet_ieee_t_fdxfc_bitfields
  5165. {
  5166. uint32_t COUNT : 16; //!< [15:0] Frame count
  5167. uint32_t RESERVED0 : 16; //!< [31:16]
  5168. } B;
  5169. } hw_enet_ieee_t_fdxfc_t;
  5170. #endif
  5171. /*!
  5172. * @name Constants and macros for entire ENET_IEEE_T_FDXFC register
  5173. */
  5174. //@{
  5175. #define HW_ENET_IEEE_T_FDXFC_ADDR(x) (REGS_ENET_BASE(x) + 0x270U)
  5176. #ifndef __LANGUAGE_ASM__
  5177. #define HW_ENET_IEEE_T_FDXFC(x) (*(__I hw_enet_ieee_t_fdxfc_t *) HW_ENET_IEEE_T_FDXFC_ADDR(x))
  5178. #define HW_ENET_IEEE_T_FDXFC_RD(x) (HW_ENET_IEEE_T_FDXFC(x).U)
  5179. #endif
  5180. //@}
  5181. /*
  5182. * Constants & macros for individual ENET_IEEE_T_FDXFC bitfields
  5183. */
  5184. /*!
  5185. * @name Register ENET_IEEE_T_FDXFC, field COUNT[15:0] (RO)
  5186. */
  5187. //@{
  5188. #define BP_ENET_IEEE_T_FDXFC_COUNT (0U) //!< Bit position for ENET_IEEE_T_FDXFC_COUNT.
  5189. #define BM_ENET_IEEE_T_FDXFC_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_T_FDXFC_COUNT.
  5190. #define BS_ENET_IEEE_T_FDXFC_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_T_FDXFC_COUNT.
  5191. #ifndef __LANGUAGE_ASM__
  5192. //! @brief Read current value of the ENET_IEEE_T_FDXFC_COUNT field.
  5193. #define BR_ENET_IEEE_T_FDXFC_COUNT(x) (HW_ENET_IEEE_T_FDXFC(x).B.COUNT)
  5194. #endif
  5195. //@}
  5196. //-------------------------------------------------------------------------------------------
  5197. // HW_ENET_IEEE_T_OCTETS_OK - Octet Count for Frames Transmitted w/o Error Statistic Register
  5198. //-------------------------------------------------------------------------------------------
  5199. #ifndef __LANGUAGE_ASM__
  5200. /*!
  5201. * @brief HW_ENET_IEEE_T_OCTETS_OK - Octet Count for Frames Transmitted w/o Error Statistic Register (RO)
  5202. *
  5203. * Reset value: 0x00000000U
  5204. *
  5205. * Counts total octets (includes header and FCS fields).
  5206. */
  5207. typedef union _hw_enet_ieee_t_octets_ok
  5208. {
  5209. uint32_t U;
  5210. struct _hw_enet_ieee_t_octets_ok_bitfields
  5211. {
  5212. uint32_t COUNT : 32; //!< [31:0] Octet count
  5213. } B;
  5214. } hw_enet_ieee_t_octets_ok_t;
  5215. #endif
  5216. /*!
  5217. * @name Constants and macros for entire ENET_IEEE_T_OCTETS_OK register
  5218. */
  5219. //@{
  5220. #define HW_ENET_IEEE_T_OCTETS_OK_ADDR(x) (REGS_ENET_BASE(x) + 0x274U)
  5221. #ifndef __LANGUAGE_ASM__
  5222. #define HW_ENET_IEEE_T_OCTETS_OK(x) (*(__I hw_enet_ieee_t_octets_ok_t *) HW_ENET_IEEE_T_OCTETS_OK_ADDR(x))
  5223. #define HW_ENET_IEEE_T_OCTETS_OK_RD(x) (HW_ENET_IEEE_T_OCTETS_OK(x).U)
  5224. #endif
  5225. //@}
  5226. /*
  5227. * Constants & macros for individual ENET_IEEE_T_OCTETS_OK bitfields
  5228. */
  5229. /*!
  5230. * @name Register ENET_IEEE_T_OCTETS_OK, field COUNT[31:0] (RO)
  5231. */
  5232. //@{
  5233. #define BP_ENET_IEEE_T_OCTETS_OK_COUNT (0U) //!< Bit position for ENET_IEEE_T_OCTETS_OK_COUNT.
  5234. #define BM_ENET_IEEE_T_OCTETS_OK_COUNT (0xFFFFFFFFU) //!< Bit mask for ENET_IEEE_T_OCTETS_OK_COUNT.
  5235. #define BS_ENET_IEEE_T_OCTETS_OK_COUNT (32U) //!< Bit field size in bits for ENET_IEEE_T_OCTETS_OK_COUNT.
  5236. #ifndef __LANGUAGE_ASM__
  5237. //! @brief Read current value of the ENET_IEEE_T_OCTETS_OK_COUNT field.
  5238. #define BR_ENET_IEEE_T_OCTETS_OK_COUNT(x) (HW_ENET_IEEE_T_OCTETS_OK(x).U)
  5239. #endif
  5240. //@}
  5241. //-------------------------------------------------------------------------------------------
  5242. // HW_ENET_RMON_R_PACKETS - Rx Packet Count Statistic Register
  5243. //-------------------------------------------------------------------------------------------
  5244. #ifndef __LANGUAGE_ASM__
  5245. /*!
  5246. * @brief HW_ENET_RMON_R_PACKETS - Rx Packet Count Statistic Register (RO)
  5247. *
  5248. * Reset value: 0x00000000U
  5249. */
  5250. typedef union _hw_enet_rmon_r_packets
  5251. {
  5252. uint32_t U;
  5253. struct _hw_enet_rmon_r_packets_bitfields
  5254. {
  5255. uint32_t COUNT : 16; //!< [15:0] Packet count
  5256. uint32_t RESERVED0 : 16; //!< [31:16]
  5257. } B;
  5258. } hw_enet_rmon_r_packets_t;
  5259. #endif
  5260. /*!
  5261. * @name Constants and macros for entire ENET_RMON_R_PACKETS register
  5262. */
  5263. //@{
  5264. #define HW_ENET_RMON_R_PACKETS_ADDR(x) (REGS_ENET_BASE(x) + 0x284U)
  5265. #ifndef __LANGUAGE_ASM__
  5266. #define HW_ENET_RMON_R_PACKETS(x) (*(__I hw_enet_rmon_r_packets_t *) HW_ENET_RMON_R_PACKETS_ADDR(x))
  5267. #define HW_ENET_RMON_R_PACKETS_RD(x) (HW_ENET_RMON_R_PACKETS(x).U)
  5268. #endif
  5269. //@}
  5270. /*
  5271. * Constants & macros for individual ENET_RMON_R_PACKETS bitfields
  5272. */
  5273. /*!
  5274. * @name Register ENET_RMON_R_PACKETS, field COUNT[15:0] (RO)
  5275. */
  5276. //@{
  5277. #define BP_ENET_RMON_R_PACKETS_COUNT (0U) //!< Bit position for ENET_RMON_R_PACKETS_COUNT.
  5278. #define BM_ENET_RMON_R_PACKETS_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_PACKETS_COUNT.
  5279. #define BS_ENET_RMON_R_PACKETS_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_PACKETS_COUNT.
  5280. #ifndef __LANGUAGE_ASM__
  5281. //! @brief Read current value of the ENET_RMON_R_PACKETS_COUNT field.
  5282. #define BR_ENET_RMON_R_PACKETS_COUNT(x) (HW_ENET_RMON_R_PACKETS(x).B.COUNT)
  5283. #endif
  5284. //@}
  5285. //-------------------------------------------------------------------------------------------
  5286. // HW_ENET_RMON_R_BC_PKT - Rx Broadcast Packets Statistic Register
  5287. //-------------------------------------------------------------------------------------------
  5288. #ifndef __LANGUAGE_ASM__
  5289. /*!
  5290. * @brief HW_ENET_RMON_R_BC_PKT - Rx Broadcast Packets Statistic Register (RO)
  5291. *
  5292. * Reset value: 0x00000000U
  5293. */
  5294. typedef union _hw_enet_rmon_r_bc_pkt
  5295. {
  5296. uint32_t U;
  5297. struct _hw_enet_rmon_r_bc_pkt_bitfields
  5298. {
  5299. uint32_t COUNT : 16; //!< [15:0] Packet count
  5300. uint32_t RESERVED0 : 16; //!< [31:16]
  5301. } B;
  5302. } hw_enet_rmon_r_bc_pkt_t;
  5303. #endif
  5304. /*!
  5305. * @name Constants and macros for entire ENET_RMON_R_BC_PKT register
  5306. */
  5307. //@{
  5308. #define HW_ENET_RMON_R_BC_PKT_ADDR(x) (REGS_ENET_BASE(x) + 0x288U)
  5309. #ifndef __LANGUAGE_ASM__
  5310. #define HW_ENET_RMON_R_BC_PKT(x) (*(__I hw_enet_rmon_r_bc_pkt_t *) HW_ENET_RMON_R_BC_PKT_ADDR(x))
  5311. #define HW_ENET_RMON_R_BC_PKT_RD(x) (HW_ENET_RMON_R_BC_PKT(x).U)
  5312. #endif
  5313. //@}
  5314. /*
  5315. * Constants & macros for individual ENET_RMON_R_BC_PKT bitfields
  5316. */
  5317. /*!
  5318. * @name Register ENET_RMON_R_BC_PKT, field COUNT[15:0] (RO)
  5319. */
  5320. //@{
  5321. #define BP_ENET_RMON_R_BC_PKT_COUNT (0U) //!< Bit position for ENET_RMON_R_BC_PKT_COUNT.
  5322. #define BM_ENET_RMON_R_BC_PKT_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_BC_PKT_COUNT.
  5323. #define BS_ENET_RMON_R_BC_PKT_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_BC_PKT_COUNT.
  5324. #ifndef __LANGUAGE_ASM__
  5325. //! @brief Read current value of the ENET_RMON_R_BC_PKT_COUNT field.
  5326. #define BR_ENET_RMON_R_BC_PKT_COUNT(x) (HW_ENET_RMON_R_BC_PKT(x).B.COUNT)
  5327. #endif
  5328. //@}
  5329. //-------------------------------------------------------------------------------------------
  5330. // HW_ENET_RMON_R_MC_PKT - Rx Multicast Packets Statistic Register
  5331. //-------------------------------------------------------------------------------------------
  5332. #ifndef __LANGUAGE_ASM__
  5333. /*!
  5334. * @brief HW_ENET_RMON_R_MC_PKT - Rx Multicast Packets Statistic Register (RO)
  5335. *
  5336. * Reset value: 0x00000000U
  5337. */
  5338. typedef union _hw_enet_rmon_r_mc_pkt
  5339. {
  5340. uint32_t U;
  5341. struct _hw_enet_rmon_r_mc_pkt_bitfields
  5342. {
  5343. uint32_t COUNT : 16; //!< [15:0] Packet count
  5344. uint32_t RESERVED0 : 16; //!< [31:16]
  5345. } B;
  5346. } hw_enet_rmon_r_mc_pkt_t;
  5347. #endif
  5348. /*!
  5349. * @name Constants and macros for entire ENET_RMON_R_MC_PKT register
  5350. */
  5351. //@{
  5352. #define HW_ENET_RMON_R_MC_PKT_ADDR(x) (REGS_ENET_BASE(x) + 0x28CU)
  5353. #ifndef __LANGUAGE_ASM__
  5354. #define HW_ENET_RMON_R_MC_PKT(x) (*(__I hw_enet_rmon_r_mc_pkt_t *) HW_ENET_RMON_R_MC_PKT_ADDR(x))
  5355. #define HW_ENET_RMON_R_MC_PKT_RD(x) (HW_ENET_RMON_R_MC_PKT(x).U)
  5356. #endif
  5357. //@}
  5358. /*
  5359. * Constants & macros for individual ENET_RMON_R_MC_PKT bitfields
  5360. */
  5361. /*!
  5362. * @name Register ENET_RMON_R_MC_PKT, field COUNT[15:0] (RO)
  5363. */
  5364. //@{
  5365. #define BP_ENET_RMON_R_MC_PKT_COUNT (0U) //!< Bit position for ENET_RMON_R_MC_PKT_COUNT.
  5366. #define BM_ENET_RMON_R_MC_PKT_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_MC_PKT_COUNT.
  5367. #define BS_ENET_RMON_R_MC_PKT_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_MC_PKT_COUNT.
  5368. #ifndef __LANGUAGE_ASM__
  5369. //! @brief Read current value of the ENET_RMON_R_MC_PKT_COUNT field.
  5370. #define BR_ENET_RMON_R_MC_PKT_COUNT(x) (HW_ENET_RMON_R_MC_PKT(x).B.COUNT)
  5371. #endif
  5372. //@}
  5373. //-------------------------------------------------------------------------------------------
  5374. // HW_ENET_RMON_R_CRC_ALIGN - Rx Packets with CRC/Align Error Statistic Register
  5375. //-------------------------------------------------------------------------------------------
  5376. #ifndef __LANGUAGE_ASM__
  5377. /*!
  5378. * @brief HW_ENET_RMON_R_CRC_ALIGN - Rx Packets with CRC/Align Error Statistic Register (RO)
  5379. *
  5380. * Reset value: 0x00000000U
  5381. */
  5382. typedef union _hw_enet_rmon_r_crc_align
  5383. {
  5384. uint32_t U;
  5385. struct _hw_enet_rmon_r_crc_align_bitfields
  5386. {
  5387. uint32_t COUNT : 16; //!< [15:0] Packet count
  5388. uint32_t RESERVED0 : 16; //!< [31:16]
  5389. } B;
  5390. } hw_enet_rmon_r_crc_align_t;
  5391. #endif
  5392. /*!
  5393. * @name Constants and macros for entire ENET_RMON_R_CRC_ALIGN register
  5394. */
  5395. //@{
  5396. #define HW_ENET_RMON_R_CRC_ALIGN_ADDR(x) (REGS_ENET_BASE(x) + 0x290U)
  5397. #ifndef __LANGUAGE_ASM__
  5398. #define HW_ENET_RMON_R_CRC_ALIGN(x) (*(__I hw_enet_rmon_r_crc_align_t *) HW_ENET_RMON_R_CRC_ALIGN_ADDR(x))
  5399. #define HW_ENET_RMON_R_CRC_ALIGN_RD(x) (HW_ENET_RMON_R_CRC_ALIGN(x).U)
  5400. #endif
  5401. //@}
  5402. /*
  5403. * Constants & macros for individual ENET_RMON_R_CRC_ALIGN bitfields
  5404. */
  5405. /*!
  5406. * @name Register ENET_RMON_R_CRC_ALIGN, field COUNT[15:0] (RO)
  5407. */
  5408. //@{
  5409. #define BP_ENET_RMON_R_CRC_ALIGN_COUNT (0U) //!< Bit position for ENET_RMON_R_CRC_ALIGN_COUNT.
  5410. #define BM_ENET_RMON_R_CRC_ALIGN_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_CRC_ALIGN_COUNT.
  5411. #define BS_ENET_RMON_R_CRC_ALIGN_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_CRC_ALIGN_COUNT.
  5412. #ifndef __LANGUAGE_ASM__
  5413. //! @brief Read current value of the ENET_RMON_R_CRC_ALIGN_COUNT field.
  5414. #define BR_ENET_RMON_R_CRC_ALIGN_COUNT(x) (HW_ENET_RMON_R_CRC_ALIGN(x).B.COUNT)
  5415. #endif
  5416. //@}
  5417. //-------------------------------------------------------------------------------------------
  5418. // HW_ENET_RMON_R_UNDERSIZE - Rx Packets with Less Than 64 Bytes and Good CRC Statistic Register
  5419. //-------------------------------------------------------------------------------------------
  5420. #ifndef __LANGUAGE_ASM__
  5421. /*!
  5422. * @brief HW_ENET_RMON_R_UNDERSIZE - Rx Packets with Less Than 64 Bytes and Good CRC Statistic Register (RO)
  5423. *
  5424. * Reset value: 0x00000000U
  5425. */
  5426. typedef union _hw_enet_rmon_r_undersize
  5427. {
  5428. uint32_t U;
  5429. struct _hw_enet_rmon_r_undersize_bitfields
  5430. {
  5431. uint32_t COUNT : 16; //!< [15:0] Packet count
  5432. uint32_t RESERVED0 : 16; //!< [31:16]
  5433. } B;
  5434. } hw_enet_rmon_r_undersize_t;
  5435. #endif
  5436. /*!
  5437. * @name Constants and macros for entire ENET_RMON_R_UNDERSIZE register
  5438. */
  5439. //@{
  5440. #define HW_ENET_RMON_R_UNDERSIZE_ADDR(x) (REGS_ENET_BASE(x) + 0x294U)
  5441. #ifndef __LANGUAGE_ASM__
  5442. #define HW_ENET_RMON_R_UNDERSIZE(x) (*(__I hw_enet_rmon_r_undersize_t *) HW_ENET_RMON_R_UNDERSIZE_ADDR(x))
  5443. #define HW_ENET_RMON_R_UNDERSIZE_RD(x) (HW_ENET_RMON_R_UNDERSIZE(x).U)
  5444. #endif
  5445. //@}
  5446. /*
  5447. * Constants & macros for individual ENET_RMON_R_UNDERSIZE bitfields
  5448. */
  5449. /*!
  5450. * @name Register ENET_RMON_R_UNDERSIZE, field COUNT[15:0] (RO)
  5451. */
  5452. //@{
  5453. #define BP_ENET_RMON_R_UNDERSIZE_COUNT (0U) //!< Bit position for ENET_RMON_R_UNDERSIZE_COUNT.
  5454. #define BM_ENET_RMON_R_UNDERSIZE_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_UNDERSIZE_COUNT.
  5455. #define BS_ENET_RMON_R_UNDERSIZE_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_UNDERSIZE_COUNT.
  5456. #ifndef __LANGUAGE_ASM__
  5457. //! @brief Read current value of the ENET_RMON_R_UNDERSIZE_COUNT field.
  5458. #define BR_ENET_RMON_R_UNDERSIZE_COUNT(x) (HW_ENET_RMON_R_UNDERSIZE(x).B.COUNT)
  5459. #endif
  5460. //@}
  5461. //-------------------------------------------------------------------------------------------
  5462. // HW_ENET_RMON_R_OVERSIZE - Rx Packets Greater Than MAX_FL and Good CRC Statistic Register
  5463. //-------------------------------------------------------------------------------------------
  5464. #ifndef __LANGUAGE_ASM__
  5465. /*!
  5466. * @brief HW_ENET_RMON_R_OVERSIZE - Rx Packets Greater Than MAX_FL and Good CRC Statistic Register (RO)
  5467. *
  5468. * Reset value: 0x00000000U
  5469. */
  5470. typedef union _hw_enet_rmon_r_oversize
  5471. {
  5472. uint32_t U;
  5473. struct _hw_enet_rmon_r_oversize_bitfields
  5474. {
  5475. uint32_t COUNT : 16; //!< [15:0] Packet count
  5476. uint32_t RESERVED0 : 16; //!< [31:16]
  5477. } B;
  5478. } hw_enet_rmon_r_oversize_t;
  5479. #endif
  5480. /*!
  5481. * @name Constants and macros for entire ENET_RMON_R_OVERSIZE register
  5482. */
  5483. //@{
  5484. #define HW_ENET_RMON_R_OVERSIZE_ADDR(x) (REGS_ENET_BASE(x) + 0x298U)
  5485. #ifndef __LANGUAGE_ASM__
  5486. #define HW_ENET_RMON_R_OVERSIZE(x) (*(__I hw_enet_rmon_r_oversize_t *) HW_ENET_RMON_R_OVERSIZE_ADDR(x))
  5487. #define HW_ENET_RMON_R_OVERSIZE_RD(x) (HW_ENET_RMON_R_OVERSIZE(x).U)
  5488. #endif
  5489. //@}
  5490. /*
  5491. * Constants & macros for individual ENET_RMON_R_OVERSIZE bitfields
  5492. */
  5493. /*!
  5494. * @name Register ENET_RMON_R_OVERSIZE, field COUNT[15:0] (RO)
  5495. */
  5496. //@{
  5497. #define BP_ENET_RMON_R_OVERSIZE_COUNT (0U) //!< Bit position for ENET_RMON_R_OVERSIZE_COUNT.
  5498. #define BM_ENET_RMON_R_OVERSIZE_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_OVERSIZE_COUNT.
  5499. #define BS_ENET_RMON_R_OVERSIZE_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_OVERSIZE_COUNT.
  5500. #ifndef __LANGUAGE_ASM__
  5501. //! @brief Read current value of the ENET_RMON_R_OVERSIZE_COUNT field.
  5502. #define BR_ENET_RMON_R_OVERSIZE_COUNT(x) (HW_ENET_RMON_R_OVERSIZE(x).B.COUNT)
  5503. #endif
  5504. //@}
  5505. //-------------------------------------------------------------------------------------------
  5506. // HW_ENET_RMON_R_FRAG - Rx Packets Less Than 64 Bytes and Bad CRC Statistic Register
  5507. //-------------------------------------------------------------------------------------------
  5508. #ifndef __LANGUAGE_ASM__
  5509. /*!
  5510. * @brief HW_ENET_RMON_R_FRAG - Rx Packets Less Than 64 Bytes and Bad CRC Statistic Register (RO)
  5511. *
  5512. * Reset value: 0x00000000U
  5513. */
  5514. typedef union _hw_enet_rmon_r_frag
  5515. {
  5516. uint32_t U;
  5517. struct _hw_enet_rmon_r_frag_bitfields
  5518. {
  5519. uint32_t COUNT : 16; //!< [15:0] Packet count
  5520. uint32_t RESERVED0 : 16; //!< [31:16]
  5521. } B;
  5522. } hw_enet_rmon_r_frag_t;
  5523. #endif
  5524. /*!
  5525. * @name Constants and macros for entire ENET_RMON_R_FRAG register
  5526. */
  5527. //@{
  5528. #define HW_ENET_RMON_R_FRAG_ADDR(x) (REGS_ENET_BASE(x) + 0x29CU)
  5529. #ifndef __LANGUAGE_ASM__
  5530. #define HW_ENET_RMON_R_FRAG(x) (*(__I hw_enet_rmon_r_frag_t *) HW_ENET_RMON_R_FRAG_ADDR(x))
  5531. #define HW_ENET_RMON_R_FRAG_RD(x) (HW_ENET_RMON_R_FRAG(x).U)
  5532. #endif
  5533. //@}
  5534. /*
  5535. * Constants & macros for individual ENET_RMON_R_FRAG bitfields
  5536. */
  5537. /*!
  5538. * @name Register ENET_RMON_R_FRAG, field COUNT[15:0] (RO)
  5539. */
  5540. //@{
  5541. #define BP_ENET_RMON_R_FRAG_COUNT (0U) //!< Bit position for ENET_RMON_R_FRAG_COUNT.
  5542. #define BM_ENET_RMON_R_FRAG_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_FRAG_COUNT.
  5543. #define BS_ENET_RMON_R_FRAG_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_FRAG_COUNT.
  5544. #ifndef __LANGUAGE_ASM__
  5545. //! @brief Read current value of the ENET_RMON_R_FRAG_COUNT field.
  5546. #define BR_ENET_RMON_R_FRAG_COUNT(x) (HW_ENET_RMON_R_FRAG(x).B.COUNT)
  5547. #endif
  5548. //@}
  5549. //-------------------------------------------------------------------------------------------
  5550. // HW_ENET_RMON_R_JAB - Rx Packets Greater Than MAX_FL Bytes and Bad CRC Statistic Register
  5551. //-------------------------------------------------------------------------------------------
  5552. #ifndef __LANGUAGE_ASM__
  5553. /*!
  5554. * @brief HW_ENET_RMON_R_JAB - Rx Packets Greater Than MAX_FL Bytes and Bad CRC Statistic Register (RO)
  5555. *
  5556. * Reset value: 0x00000000U
  5557. */
  5558. typedef union _hw_enet_rmon_r_jab
  5559. {
  5560. uint32_t U;
  5561. struct _hw_enet_rmon_r_jab_bitfields
  5562. {
  5563. uint32_t COUNT : 16; //!< [15:0] Packet count
  5564. uint32_t RESERVED0 : 16; //!< [31:16]
  5565. } B;
  5566. } hw_enet_rmon_r_jab_t;
  5567. #endif
  5568. /*!
  5569. * @name Constants and macros for entire ENET_RMON_R_JAB register
  5570. */
  5571. //@{
  5572. #define HW_ENET_RMON_R_JAB_ADDR(x) (REGS_ENET_BASE(x) + 0x2A0U)
  5573. #ifndef __LANGUAGE_ASM__
  5574. #define HW_ENET_RMON_R_JAB(x) (*(__I hw_enet_rmon_r_jab_t *) HW_ENET_RMON_R_JAB_ADDR(x))
  5575. #define HW_ENET_RMON_R_JAB_RD(x) (HW_ENET_RMON_R_JAB(x).U)
  5576. #endif
  5577. //@}
  5578. /*
  5579. * Constants & macros for individual ENET_RMON_R_JAB bitfields
  5580. */
  5581. /*!
  5582. * @name Register ENET_RMON_R_JAB, field COUNT[15:0] (RO)
  5583. */
  5584. //@{
  5585. #define BP_ENET_RMON_R_JAB_COUNT (0U) //!< Bit position for ENET_RMON_R_JAB_COUNT.
  5586. #define BM_ENET_RMON_R_JAB_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_JAB_COUNT.
  5587. #define BS_ENET_RMON_R_JAB_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_JAB_COUNT.
  5588. #ifndef __LANGUAGE_ASM__
  5589. //! @brief Read current value of the ENET_RMON_R_JAB_COUNT field.
  5590. #define BR_ENET_RMON_R_JAB_COUNT(x) (HW_ENET_RMON_R_JAB(x).B.COUNT)
  5591. #endif
  5592. //@}
  5593. //-------------------------------------------------------------------------------------------
  5594. // HW_ENET_RMON_R_P64 - Rx 64-Byte Packets Statistic Register
  5595. //-------------------------------------------------------------------------------------------
  5596. #ifndef __LANGUAGE_ASM__
  5597. /*!
  5598. * @brief HW_ENET_RMON_R_P64 - Rx 64-Byte Packets Statistic Register (RO)
  5599. *
  5600. * Reset value: 0x00000000U
  5601. */
  5602. typedef union _hw_enet_rmon_r_p64
  5603. {
  5604. uint32_t U;
  5605. struct _hw_enet_rmon_r_p64_bitfields
  5606. {
  5607. uint32_t COUNT : 16; //!< [15:0] Packet count
  5608. uint32_t RESERVED0 : 16; //!< [31:16]
  5609. } B;
  5610. } hw_enet_rmon_r_p64_t;
  5611. #endif
  5612. /*!
  5613. * @name Constants and macros for entire ENET_RMON_R_P64 register
  5614. */
  5615. //@{
  5616. #define HW_ENET_RMON_R_P64_ADDR(x) (REGS_ENET_BASE(x) + 0x2A8U)
  5617. #ifndef __LANGUAGE_ASM__
  5618. #define HW_ENET_RMON_R_P64(x) (*(__I hw_enet_rmon_r_p64_t *) HW_ENET_RMON_R_P64_ADDR(x))
  5619. #define HW_ENET_RMON_R_P64_RD(x) (HW_ENET_RMON_R_P64(x).U)
  5620. #endif
  5621. //@}
  5622. /*
  5623. * Constants & macros for individual ENET_RMON_R_P64 bitfields
  5624. */
  5625. /*!
  5626. * @name Register ENET_RMON_R_P64, field COUNT[15:0] (RO)
  5627. */
  5628. //@{
  5629. #define BP_ENET_RMON_R_P64_COUNT (0U) //!< Bit position for ENET_RMON_R_P64_COUNT.
  5630. #define BM_ENET_RMON_R_P64_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_P64_COUNT.
  5631. #define BS_ENET_RMON_R_P64_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_P64_COUNT.
  5632. #ifndef __LANGUAGE_ASM__
  5633. //! @brief Read current value of the ENET_RMON_R_P64_COUNT field.
  5634. #define BR_ENET_RMON_R_P64_COUNT(x) (HW_ENET_RMON_R_P64(x).B.COUNT)
  5635. #endif
  5636. //@}
  5637. //-------------------------------------------------------------------------------------------
  5638. // HW_ENET_RMON_R_P65TO127 - Rx 65- to 127-Byte Packets Statistic Register
  5639. //-------------------------------------------------------------------------------------------
  5640. #ifndef __LANGUAGE_ASM__
  5641. /*!
  5642. * @brief HW_ENET_RMON_R_P65TO127 - Rx 65- to 127-Byte Packets Statistic Register (RO)
  5643. *
  5644. * Reset value: 0x00000000U
  5645. */
  5646. typedef union _hw_enet_rmon_r_p65to127
  5647. {
  5648. uint32_t U;
  5649. struct _hw_enet_rmon_r_p65to127_bitfields
  5650. {
  5651. uint32_t COUNT : 16; //!< [15:0] Packet count
  5652. uint32_t RESERVED0 : 16; //!< [31:16]
  5653. } B;
  5654. } hw_enet_rmon_r_p65to127_t;
  5655. #endif
  5656. /*!
  5657. * @name Constants and macros for entire ENET_RMON_R_P65TO127 register
  5658. */
  5659. //@{
  5660. #define HW_ENET_RMON_R_P65TO127_ADDR(x) (REGS_ENET_BASE(x) + 0x2ACU)
  5661. #ifndef __LANGUAGE_ASM__
  5662. #define HW_ENET_RMON_R_P65TO127(x) (*(__I hw_enet_rmon_r_p65to127_t *) HW_ENET_RMON_R_P65TO127_ADDR(x))
  5663. #define HW_ENET_RMON_R_P65TO127_RD(x) (HW_ENET_RMON_R_P65TO127(x).U)
  5664. #endif
  5665. //@}
  5666. /*
  5667. * Constants & macros for individual ENET_RMON_R_P65TO127 bitfields
  5668. */
  5669. /*!
  5670. * @name Register ENET_RMON_R_P65TO127, field COUNT[15:0] (RO)
  5671. */
  5672. //@{
  5673. #define BP_ENET_RMON_R_P65TO127_COUNT (0U) //!< Bit position for ENET_RMON_R_P65TO127_COUNT.
  5674. #define BM_ENET_RMON_R_P65TO127_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_P65TO127_COUNT.
  5675. #define BS_ENET_RMON_R_P65TO127_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_P65TO127_COUNT.
  5676. #ifndef __LANGUAGE_ASM__
  5677. //! @brief Read current value of the ENET_RMON_R_P65TO127_COUNT field.
  5678. #define BR_ENET_RMON_R_P65TO127_COUNT(x) (HW_ENET_RMON_R_P65TO127(x).B.COUNT)
  5679. #endif
  5680. //@}
  5681. //-------------------------------------------------------------------------------------------
  5682. // HW_ENET_RMON_R_P128TO255 - Rx 128- to 255-Byte Packets Statistic Register
  5683. //-------------------------------------------------------------------------------------------
  5684. #ifndef __LANGUAGE_ASM__
  5685. /*!
  5686. * @brief HW_ENET_RMON_R_P128TO255 - Rx 128- to 255-Byte Packets Statistic Register (RO)
  5687. *
  5688. * Reset value: 0x00000000U
  5689. */
  5690. typedef union _hw_enet_rmon_r_p128to255
  5691. {
  5692. uint32_t U;
  5693. struct _hw_enet_rmon_r_p128to255_bitfields
  5694. {
  5695. uint32_t COUNT : 16; //!< [15:0] Packet count
  5696. uint32_t RESERVED0 : 16; //!< [31:16]
  5697. } B;
  5698. } hw_enet_rmon_r_p128to255_t;
  5699. #endif
  5700. /*!
  5701. * @name Constants and macros for entire ENET_RMON_R_P128TO255 register
  5702. */
  5703. //@{
  5704. #define HW_ENET_RMON_R_P128TO255_ADDR(x) (REGS_ENET_BASE(x) + 0x2B0U)
  5705. #ifndef __LANGUAGE_ASM__
  5706. #define HW_ENET_RMON_R_P128TO255(x) (*(__I hw_enet_rmon_r_p128to255_t *) HW_ENET_RMON_R_P128TO255_ADDR(x))
  5707. #define HW_ENET_RMON_R_P128TO255_RD(x) (HW_ENET_RMON_R_P128TO255(x).U)
  5708. #endif
  5709. //@}
  5710. /*
  5711. * Constants & macros for individual ENET_RMON_R_P128TO255 bitfields
  5712. */
  5713. /*!
  5714. * @name Register ENET_RMON_R_P128TO255, field COUNT[15:0] (RO)
  5715. */
  5716. //@{
  5717. #define BP_ENET_RMON_R_P128TO255_COUNT (0U) //!< Bit position for ENET_RMON_R_P128TO255_COUNT.
  5718. #define BM_ENET_RMON_R_P128TO255_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_P128TO255_COUNT.
  5719. #define BS_ENET_RMON_R_P128TO255_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_P128TO255_COUNT.
  5720. #ifndef __LANGUAGE_ASM__
  5721. //! @brief Read current value of the ENET_RMON_R_P128TO255_COUNT field.
  5722. #define BR_ENET_RMON_R_P128TO255_COUNT(x) (HW_ENET_RMON_R_P128TO255(x).B.COUNT)
  5723. #endif
  5724. //@}
  5725. //-------------------------------------------------------------------------------------------
  5726. // HW_ENET_RMON_R_P256TO511 - Rx 256- to 511-Byte Packets Statistic Register
  5727. //-------------------------------------------------------------------------------------------
  5728. #ifndef __LANGUAGE_ASM__
  5729. /*!
  5730. * @brief HW_ENET_RMON_R_P256TO511 - Rx 256- to 511-Byte Packets Statistic Register (RO)
  5731. *
  5732. * Reset value: 0x00000000U
  5733. */
  5734. typedef union _hw_enet_rmon_r_p256to511
  5735. {
  5736. uint32_t U;
  5737. struct _hw_enet_rmon_r_p256to511_bitfields
  5738. {
  5739. uint32_t COUNT : 16; //!< [15:0] Packet count
  5740. uint32_t RESERVED0 : 16; //!< [31:16]
  5741. } B;
  5742. } hw_enet_rmon_r_p256to511_t;
  5743. #endif
  5744. /*!
  5745. * @name Constants and macros for entire ENET_RMON_R_P256TO511 register
  5746. */
  5747. //@{
  5748. #define HW_ENET_RMON_R_P256TO511_ADDR(x) (REGS_ENET_BASE(x) + 0x2B4U)
  5749. #ifndef __LANGUAGE_ASM__
  5750. #define HW_ENET_RMON_R_P256TO511(x) (*(__I hw_enet_rmon_r_p256to511_t *) HW_ENET_RMON_R_P256TO511_ADDR(x))
  5751. #define HW_ENET_RMON_R_P256TO511_RD(x) (HW_ENET_RMON_R_P256TO511(x).U)
  5752. #endif
  5753. //@}
  5754. /*
  5755. * Constants & macros for individual ENET_RMON_R_P256TO511 bitfields
  5756. */
  5757. /*!
  5758. * @name Register ENET_RMON_R_P256TO511, field COUNT[15:0] (RO)
  5759. */
  5760. //@{
  5761. #define BP_ENET_RMON_R_P256TO511_COUNT (0U) //!< Bit position for ENET_RMON_R_P256TO511_COUNT.
  5762. #define BM_ENET_RMON_R_P256TO511_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_P256TO511_COUNT.
  5763. #define BS_ENET_RMON_R_P256TO511_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_P256TO511_COUNT.
  5764. #ifndef __LANGUAGE_ASM__
  5765. //! @brief Read current value of the ENET_RMON_R_P256TO511_COUNT field.
  5766. #define BR_ENET_RMON_R_P256TO511_COUNT(x) (HW_ENET_RMON_R_P256TO511(x).B.COUNT)
  5767. #endif
  5768. //@}
  5769. //-------------------------------------------------------------------------------------------
  5770. // HW_ENET_RMON_R_P512TO1023 - Rx 512- to 1023-Byte Packets Statistic Register
  5771. //-------------------------------------------------------------------------------------------
  5772. #ifndef __LANGUAGE_ASM__
  5773. /*!
  5774. * @brief HW_ENET_RMON_R_P512TO1023 - Rx 512- to 1023-Byte Packets Statistic Register (RO)
  5775. *
  5776. * Reset value: 0x00000000U
  5777. */
  5778. typedef union _hw_enet_rmon_r_p512to1023
  5779. {
  5780. uint32_t U;
  5781. struct _hw_enet_rmon_r_p512to1023_bitfields
  5782. {
  5783. uint32_t COUNT : 16; //!< [15:0] Packet count
  5784. uint32_t RESERVED0 : 16; //!< [31:16]
  5785. } B;
  5786. } hw_enet_rmon_r_p512to1023_t;
  5787. #endif
  5788. /*!
  5789. * @name Constants and macros for entire ENET_RMON_R_P512TO1023 register
  5790. */
  5791. //@{
  5792. #define HW_ENET_RMON_R_P512TO1023_ADDR(x) (REGS_ENET_BASE(x) + 0x2B8U)
  5793. #ifndef __LANGUAGE_ASM__
  5794. #define HW_ENET_RMON_R_P512TO1023(x) (*(__I hw_enet_rmon_r_p512to1023_t *) HW_ENET_RMON_R_P512TO1023_ADDR(x))
  5795. #define HW_ENET_RMON_R_P512TO1023_RD(x) (HW_ENET_RMON_R_P512TO1023(x).U)
  5796. #endif
  5797. //@}
  5798. /*
  5799. * Constants & macros for individual ENET_RMON_R_P512TO1023 bitfields
  5800. */
  5801. /*!
  5802. * @name Register ENET_RMON_R_P512TO1023, field COUNT[15:0] (RO)
  5803. */
  5804. //@{
  5805. #define BP_ENET_RMON_R_P512TO1023_COUNT (0U) //!< Bit position for ENET_RMON_R_P512TO1023_COUNT.
  5806. #define BM_ENET_RMON_R_P512TO1023_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_P512TO1023_COUNT.
  5807. #define BS_ENET_RMON_R_P512TO1023_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_P512TO1023_COUNT.
  5808. #ifndef __LANGUAGE_ASM__
  5809. //! @brief Read current value of the ENET_RMON_R_P512TO1023_COUNT field.
  5810. #define BR_ENET_RMON_R_P512TO1023_COUNT(x) (HW_ENET_RMON_R_P512TO1023(x).B.COUNT)
  5811. #endif
  5812. //@}
  5813. //-------------------------------------------------------------------------------------------
  5814. // HW_ENET_RMON_R_P1024TO2047 - Rx 1024- to 2047-Byte Packets Statistic Register
  5815. //-------------------------------------------------------------------------------------------
  5816. #ifndef __LANGUAGE_ASM__
  5817. /*!
  5818. * @brief HW_ENET_RMON_R_P1024TO2047 - Rx 1024- to 2047-Byte Packets Statistic Register (RO)
  5819. *
  5820. * Reset value: 0x00000000U
  5821. */
  5822. typedef union _hw_enet_rmon_r_p1024to2047
  5823. {
  5824. uint32_t U;
  5825. struct _hw_enet_rmon_r_p1024to2047_bitfields
  5826. {
  5827. uint32_t COUNT : 16; //!< [15:0] Packet count
  5828. uint32_t RESERVED0 : 16; //!< [31:16]
  5829. } B;
  5830. } hw_enet_rmon_r_p1024to2047_t;
  5831. #endif
  5832. /*!
  5833. * @name Constants and macros for entire ENET_RMON_R_P1024TO2047 register
  5834. */
  5835. //@{
  5836. #define HW_ENET_RMON_R_P1024TO2047_ADDR(x) (REGS_ENET_BASE(x) + 0x2BCU)
  5837. #ifndef __LANGUAGE_ASM__
  5838. #define HW_ENET_RMON_R_P1024TO2047(x) (*(__I hw_enet_rmon_r_p1024to2047_t *) HW_ENET_RMON_R_P1024TO2047_ADDR(x))
  5839. #define HW_ENET_RMON_R_P1024TO2047_RD(x) (HW_ENET_RMON_R_P1024TO2047(x).U)
  5840. #endif
  5841. //@}
  5842. /*
  5843. * Constants & macros for individual ENET_RMON_R_P1024TO2047 bitfields
  5844. */
  5845. /*!
  5846. * @name Register ENET_RMON_R_P1024TO2047, field COUNT[15:0] (RO)
  5847. */
  5848. //@{
  5849. #define BP_ENET_RMON_R_P1024TO2047_COUNT (0U) //!< Bit position for ENET_RMON_R_P1024TO2047_COUNT.
  5850. #define BM_ENET_RMON_R_P1024TO2047_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_P1024TO2047_COUNT.
  5851. #define BS_ENET_RMON_R_P1024TO2047_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_P1024TO2047_COUNT.
  5852. #ifndef __LANGUAGE_ASM__
  5853. //! @brief Read current value of the ENET_RMON_R_P1024TO2047_COUNT field.
  5854. #define BR_ENET_RMON_R_P1024TO2047_COUNT(x) (HW_ENET_RMON_R_P1024TO2047(x).B.COUNT)
  5855. #endif
  5856. //@}
  5857. //-------------------------------------------------------------------------------------------
  5858. // HW_ENET_RMON_R_GTE2048 - Rx Packets Greater than 2048 Bytes Statistic Register
  5859. //-------------------------------------------------------------------------------------------
  5860. #ifndef __LANGUAGE_ASM__
  5861. /*!
  5862. * @brief HW_ENET_RMON_R_GTE2048 - Rx Packets Greater than 2048 Bytes Statistic Register (RO)
  5863. *
  5864. * Reset value: 0x00000000U
  5865. */
  5866. typedef union _hw_enet_rmon_r_gte2048
  5867. {
  5868. uint32_t U;
  5869. struct _hw_enet_rmon_r_gte2048_bitfields
  5870. {
  5871. uint32_t COUNT : 16; //!< [15:0] Packet count
  5872. uint32_t RESERVED0 : 16; //!< [31:16]
  5873. } B;
  5874. } hw_enet_rmon_r_gte2048_t;
  5875. #endif
  5876. /*!
  5877. * @name Constants and macros for entire ENET_RMON_R_GTE2048 register
  5878. */
  5879. //@{
  5880. #define HW_ENET_RMON_R_GTE2048_ADDR(x) (REGS_ENET_BASE(x) + 0x2C0U)
  5881. #ifndef __LANGUAGE_ASM__
  5882. #define HW_ENET_RMON_R_GTE2048(x) (*(__I hw_enet_rmon_r_gte2048_t *) HW_ENET_RMON_R_GTE2048_ADDR(x))
  5883. #define HW_ENET_RMON_R_GTE2048_RD(x) (HW_ENET_RMON_R_GTE2048(x).U)
  5884. #endif
  5885. //@}
  5886. /*
  5887. * Constants & macros for individual ENET_RMON_R_GTE2048 bitfields
  5888. */
  5889. /*!
  5890. * @name Register ENET_RMON_R_GTE2048, field COUNT[15:0] (RO)
  5891. */
  5892. //@{
  5893. #define BP_ENET_RMON_R_GTE2048_COUNT (0U) //!< Bit position for ENET_RMON_R_GTE2048_COUNT.
  5894. #define BM_ENET_RMON_R_GTE2048_COUNT (0x0000FFFFU) //!< Bit mask for ENET_RMON_R_GTE2048_COUNT.
  5895. #define BS_ENET_RMON_R_GTE2048_COUNT (16U) //!< Bit field size in bits for ENET_RMON_R_GTE2048_COUNT.
  5896. #ifndef __LANGUAGE_ASM__
  5897. //! @brief Read current value of the ENET_RMON_R_GTE2048_COUNT field.
  5898. #define BR_ENET_RMON_R_GTE2048_COUNT(x) (HW_ENET_RMON_R_GTE2048(x).B.COUNT)
  5899. #endif
  5900. //@}
  5901. //-------------------------------------------------------------------------------------------
  5902. // HW_ENET_RMON_R_OCTETS - Rx Octets Statistic Register
  5903. //-------------------------------------------------------------------------------------------
  5904. #ifndef __LANGUAGE_ASM__
  5905. /*!
  5906. * @brief HW_ENET_RMON_R_OCTETS - Rx Octets Statistic Register (RO)
  5907. *
  5908. * Reset value: 0x00000000U
  5909. */
  5910. typedef union _hw_enet_rmon_r_octets
  5911. {
  5912. uint32_t U;
  5913. struct _hw_enet_rmon_r_octets_bitfields
  5914. {
  5915. uint32_t COUNT : 32; //!< [31:0] Octet count
  5916. } B;
  5917. } hw_enet_rmon_r_octets_t;
  5918. #endif
  5919. /*!
  5920. * @name Constants and macros for entire ENET_RMON_R_OCTETS register
  5921. */
  5922. //@{
  5923. #define HW_ENET_RMON_R_OCTETS_ADDR(x) (REGS_ENET_BASE(x) + 0x2C4U)
  5924. #ifndef __LANGUAGE_ASM__
  5925. #define HW_ENET_RMON_R_OCTETS(x) (*(__I hw_enet_rmon_r_octets_t *) HW_ENET_RMON_R_OCTETS_ADDR(x))
  5926. #define HW_ENET_RMON_R_OCTETS_RD(x) (HW_ENET_RMON_R_OCTETS(x).U)
  5927. #endif
  5928. //@}
  5929. /*
  5930. * Constants & macros for individual ENET_RMON_R_OCTETS bitfields
  5931. */
  5932. /*!
  5933. * @name Register ENET_RMON_R_OCTETS, field COUNT[31:0] (RO)
  5934. */
  5935. //@{
  5936. #define BP_ENET_RMON_R_OCTETS_COUNT (0U) //!< Bit position for ENET_RMON_R_OCTETS_COUNT.
  5937. #define BM_ENET_RMON_R_OCTETS_COUNT (0xFFFFFFFFU) //!< Bit mask for ENET_RMON_R_OCTETS_COUNT.
  5938. #define BS_ENET_RMON_R_OCTETS_COUNT (32U) //!< Bit field size in bits for ENET_RMON_R_OCTETS_COUNT.
  5939. #ifndef __LANGUAGE_ASM__
  5940. //! @brief Read current value of the ENET_RMON_R_OCTETS_COUNT field.
  5941. #define BR_ENET_RMON_R_OCTETS_COUNT(x) (HW_ENET_RMON_R_OCTETS(x).U)
  5942. #endif
  5943. //@}
  5944. //-------------------------------------------------------------------------------------------
  5945. // HW_ENET_IEEE_R_DROP - Frames not Counted Correctly Statistic Register
  5946. //-------------------------------------------------------------------------------------------
  5947. #ifndef __LANGUAGE_ASM__
  5948. /*!
  5949. * @brief HW_ENET_IEEE_R_DROP - Frames not Counted Correctly Statistic Register (RO)
  5950. *
  5951. * Reset value: 0x00000000U
  5952. *
  5953. * Counter increments if a frame with invalid or missing SFD character is
  5954. * detected and has been dropped. None of the other counters increments if this counter
  5955. * increments.
  5956. */
  5957. typedef union _hw_enet_ieee_r_drop
  5958. {
  5959. uint32_t U;
  5960. struct _hw_enet_ieee_r_drop_bitfields
  5961. {
  5962. uint32_t COUNT : 16; //!< [15:0] Frame count
  5963. uint32_t RESERVED0 : 16; //!< [31:16]
  5964. } B;
  5965. } hw_enet_ieee_r_drop_t;
  5966. #endif
  5967. /*!
  5968. * @name Constants and macros for entire ENET_IEEE_R_DROP register
  5969. */
  5970. //@{
  5971. #define HW_ENET_IEEE_R_DROP_ADDR(x) (REGS_ENET_BASE(x) + 0x2C8U)
  5972. #ifndef __LANGUAGE_ASM__
  5973. #define HW_ENET_IEEE_R_DROP(x) (*(__I hw_enet_ieee_r_drop_t *) HW_ENET_IEEE_R_DROP_ADDR(x))
  5974. #define HW_ENET_IEEE_R_DROP_RD(x) (HW_ENET_IEEE_R_DROP(x).U)
  5975. #endif
  5976. //@}
  5977. /*
  5978. * Constants & macros for individual ENET_IEEE_R_DROP bitfields
  5979. */
  5980. /*!
  5981. * @name Register ENET_IEEE_R_DROP, field COUNT[15:0] (RO)
  5982. */
  5983. //@{
  5984. #define BP_ENET_IEEE_R_DROP_COUNT (0U) //!< Bit position for ENET_IEEE_R_DROP_COUNT.
  5985. #define BM_ENET_IEEE_R_DROP_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_R_DROP_COUNT.
  5986. #define BS_ENET_IEEE_R_DROP_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_R_DROP_COUNT.
  5987. #ifndef __LANGUAGE_ASM__
  5988. //! @brief Read current value of the ENET_IEEE_R_DROP_COUNT field.
  5989. #define BR_ENET_IEEE_R_DROP_COUNT(x) (HW_ENET_IEEE_R_DROP(x).B.COUNT)
  5990. #endif
  5991. //@}
  5992. //-------------------------------------------------------------------------------------------
  5993. // HW_ENET_IEEE_R_FRAME_OK - Frames Received OK Statistic Register
  5994. //-------------------------------------------------------------------------------------------
  5995. #ifndef __LANGUAGE_ASM__
  5996. /*!
  5997. * @brief HW_ENET_IEEE_R_FRAME_OK - Frames Received OK Statistic Register (RO)
  5998. *
  5999. * Reset value: 0x00000000U
  6000. */
  6001. typedef union _hw_enet_ieee_r_frame_ok
  6002. {
  6003. uint32_t U;
  6004. struct _hw_enet_ieee_r_frame_ok_bitfields
  6005. {
  6006. uint32_t COUNT : 16; //!< [15:0] Frame count
  6007. uint32_t RESERVED0 : 16; //!< [31:16]
  6008. } B;
  6009. } hw_enet_ieee_r_frame_ok_t;
  6010. #endif
  6011. /*!
  6012. * @name Constants and macros for entire ENET_IEEE_R_FRAME_OK register
  6013. */
  6014. //@{
  6015. #define HW_ENET_IEEE_R_FRAME_OK_ADDR(x) (REGS_ENET_BASE(x) + 0x2CCU)
  6016. #ifndef __LANGUAGE_ASM__
  6017. #define HW_ENET_IEEE_R_FRAME_OK(x) (*(__I hw_enet_ieee_r_frame_ok_t *) HW_ENET_IEEE_R_FRAME_OK_ADDR(x))
  6018. #define HW_ENET_IEEE_R_FRAME_OK_RD(x) (HW_ENET_IEEE_R_FRAME_OK(x).U)
  6019. #endif
  6020. //@}
  6021. /*
  6022. * Constants & macros for individual ENET_IEEE_R_FRAME_OK bitfields
  6023. */
  6024. /*!
  6025. * @name Register ENET_IEEE_R_FRAME_OK, field COUNT[15:0] (RO)
  6026. */
  6027. //@{
  6028. #define BP_ENET_IEEE_R_FRAME_OK_COUNT (0U) //!< Bit position for ENET_IEEE_R_FRAME_OK_COUNT.
  6029. #define BM_ENET_IEEE_R_FRAME_OK_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_R_FRAME_OK_COUNT.
  6030. #define BS_ENET_IEEE_R_FRAME_OK_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_R_FRAME_OK_COUNT.
  6031. #ifndef __LANGUAGE_ASM__
  6032. //! @brief Read current value of the ENET_IEEE_R_FRAME_OK_COUNT field.
  6033. #define BR_ENET_IEEE_R_FRAME_OK_COUNT(x) (HW_ENET_IEEE_R_FRAME_OK(x).B.COUNT)
  6034. #endif
  6035. //@}
  6036. //-------------------------------------------------------------------------------------------
  6037. // HW_ENET_IEEE_R_CRC - Frames Received with CRC Error Statistic Register
  6038. //-------------------------------------------------------------------------------------------
  6039. #ifndef __LANGUAGE_ASM__
  6040. /*!
  6041. * @brief HW_ENET_IEEE_R_CRC - Frames Received with CRC Error Statistic Register (RO)
  6042. *
  6043. * Reset value: 0x00000000U
  6044. */
  6045. typedef union _hw_enet_ieee_r_crc
  6046. {
  6047. uint32_t U;
  6048. struct _hw_enet_ieee_r_crc_bitfields
  6049. {
  6050. uint32_t COUNT : 16; //!< [15:0] Frame count
  6051. uint32_t RESERVED0 : 16; //!< [31:16]
  6052. } B;
  6053. } hw_enet_ieee_r_crc_t;
  6054. #endif
  6055. /*!
  6056. * @name Constants and macros for entire ENET_IEEE_R_CRC register
  6057. */
  6058. //@{
  6059. #define HW_ENET_IEEE_R_CRC_ADDR(x) (REGS_ENET_BASE(x) + 0x2D0U)
  6060. #ifndef __LANGUAGE_ASM__
  6061. #define HW_ENET_IEEE_R_CRC(x) (*(__I hw_enet_ieee_r_crc_t *) HW_ENET_IEEE_R_CRC_ADDR(x))
  6062. #define HW_ENET_IEEE_R_CRC_RD(x) (HW_ENET_IEEE_R_CRC(x).U)
  6063. #endif
  6064. //@}
  6065. /*
  6066. * Constants & macros for individual ENET_IEEE_R_CRC bitfields
  6067. */
  6068. /*!
  6069. * @name Register ENET_IEEE_R_CRC, field COUNT[15:0] (RO)
  6070. */
  6071. //@{
  6072. #define BP_ENET_IEEE_R_CRC_COUNT (0U) //!< Bit position for ENET_IEEE_R_CRC_COUNT.
  6073. #define BM_ENET_IEEE_R_CRC_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_R_CRC_COUNT.
  6074. #define BS_ENET_IEEE_R_CRC_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_R_CRC_COUNT.
  6075. #ifndef __LANGUAGE_ASM__
  6076. //! @brief Read current value of the ENET_IEEE_R_CRC_COUNT field.
  6077. #define BR_ENET_IEEE_R_CRC_COUNT(x) (HW_ENET_IEEE_R_CRC(x).B.COUNT)
  6078. #endif
  6079. //@}
  6080. //-------------------------------------------------------------------------------------------
  6081. // HW_ENET_IEEE_R_ALIGN - Frames Received with Alignment Error Statistic Register
  6082. //-------------------------------------------------------------------------------------------
  6083. #ifndef __LANGUAGE_ASM__
  6084. /*!
  6085. * @brief HW_ENET_IEEE_R_ALIGN - Frames Received with Alignment Error Statistic Register (RO)
  6086. *
  6087. * Reset value: 0x00000000U
  6088. */
  6089. typedef union _hw_enet_ieee_r_align
  6090. {
  6091. uint32_t U;
  6092. struct _hw_enet_ieee_r_align_bitfields
  6093. {
  6094. uint32_t COUNT : 16; //!< [15:0] Frame count
  6095. uint32_t RESERVED0 : 16; //!< [31:16]
  6096. } B;
  6097. } hw_enet_ieee_r_align_t;
  6098. #endif
  6099. /*!
  6100. * @name Constants and macros for entire ENET_IEEE_R_ALIGN register
  6101. */
  6102. //@{
  6103. #define HW_ENET_IEEE_R_ALIGN_ADDR(x) (REGS_ENET_BASE(x) + 0x2D4U)
  6104. #ifndef __LANGUAGE_ASM__
  6105. #define HW_ENET_IEEE_R_ALIGN(x) (*(__I hw_enet_ieee_r_align_t *) HW_ENET_IEEE_R_ALIGN_ADDR(x))
  6106. #define HW_ENET_IEEE_R_ALIGN_RD(x) (HW_ENET_IEEE_R_ALIGN(x).U)
  6107. #endif
  6108. //@}
  6109. /*
  6110. * Constants & macros for individual ENET_IEEE_R_ALIGN bitfields
  6111. */
  6112. /*!
  6113. * @name Register ENET_IEEE_R_ALIGN, field COUNT[15:0] (RO)
  6114. */
  6115. //@{
  6116. #define BP_ENET_IEEE_R_ALIGN_COUNT (0U) //!< Bit position for ENET_IEEE_R_ALIGN_COUNT.
  6117. #define BM_ENET_IEEE_R_ALIGN_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_R_ALIGN_COUNT.
  6118. #define BS_ENET_IEEE_R_ALIGN_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_R_ALIGN_COUNT.
  6119. #ifndef __LANGUAGE_ASM__
  6120. //! @brief Read current value of the ENET_IEEE_R_ALIGN_COUNT field.
  6121. #define BR_ENET_IEEE_R_ALIGN_COUNT(x) (HW_ENET_IEEE_R_ALIGN(x).B.COUNT)
  6122. #endif
  6123. //@}
  6124. //-------------------------------------------------------------------------------------------
  6125. // HW_ENET_IEEE_R_MACERR - Receive FIFO Overflow Count Statistic Register
  6126. //-------------------------------------------------------------------------------------------
  6127. #ifndef __LANGUAGE_ASM__
  6128. /*!
  6129. * @brief HW_ENET_IEEE_R_MACERR - Receive FIFO Overflow Count Statistic Register (RO)
  6130. *
  6131. * Reset value: 0x00000000U
  6132. */
  6133. typedef union _hw_enet_ieee_r_macerr
  6134. {
  6135. uint32_t U;
  6136. struct _hw_enet_ieee_r_macerr_bitfields
  6137. {
  6138. uint32_t COUNT : 16; //!< [15:0] Count
  6139. uint32_t RESERVED0 : 16; //!< [31:16]
  6140. } B;
  6141. } hw_enet_ieee_r_macerr_t;
  6142. #endif
  6143. /*!
  6144. * @name Constants and macros for entire ENET_IEEE_R_MACERR register
  6145. */
  6146. //@{
  6147. #define HW_ENET_IEEE_R_MACERR_ADDR(x) (REGS_ENET_BASE(x) + 0x2D8U)
  6148. #ifndef __LANGUAGE_ASM__
  6149. #define HW_ENET_IEEE_R_MACERR(x) (*(__I hw_enet_ieee_r_macerr_t *) HW_ENET_IEEE_R_MACERR_ADDR(x))
  6150. #define HW_ENET_IEEE_R_MACERR_RD(x) (HW_ENET_IEEE_R_MACERR(x).U)
  6151. #endif
  6152. //@}
  6153. /*
  6154. * Constants & macros for individual ENET_IEEE_R_MACERR bitfields
  6155. */
  6156. /*!
  6157. * @name Register ENET_IEEE_R_MACERR, field COUNT[15:0] (RO)
  6158. */
  6159. //@{
  6160. #define BP_ENET_IEEE_R_MACERR_COUNT (0U) //!< Bit position for ENET_IEEE_R_MACERR_COUNT.
  6161. #define BM_ENET_IEEE_R_MACERR_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_R_MACERR_COUNT.
  6162. #define BS_ENET_IEEE_R_MACERR_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_R_MACERR_COUNT.
  6163. #ifndef __LANGUAGE_ASM__
  6164. //! @brief Read current value of the ENET_IEEE_R_MACERR_COUNT field.
  6165. #define BR_ENET_IEEE_R_MACERR_COUNT(x) (HW_ENET_IEEE_R_MACERR(x).B.COUNT)
  6166. #endif
  6167. //@}
  6168. //-------------------------------------------------------------------------------------------
  6169. // HW_ENET_IEEE_R_FDXFC - Flow Control Pause Frames Received Statistic Register
  6170. //-------------------------------------------------------------------------------------------
  6171. #ifndef __LANGUAGE_ASM__
  6172. /*!
  6173. * @brief HW_ENET_IEEE_R_FDXFC - Flow Control Pause Frames Received Statistic Register (RO)
  6174. *
  6175. * Reset value: 0x00000000U
  6176. */
  6177. typedef union _hw_enet_ieee_r_fdxfc
  6178. {
  6179. uint32_t U;
  6180. struct _hw_enet_ieee_r_fdxfc_bitfields
  6181. {
  6182. uint32_t COUNT : 16; //!< [15:0] Pause frame count
  6183. uint32_t RESERVED0 : 16; //!< [31:16]
  6184. } B;
  6185. } hw_enet_ieee_r_fdxfc_t;
  6186. #endif
  6187. /*!
  6188. * @name Constants and macros for entire ENET_IEEE_R_FDXFC register
  6189. */
  6190. //@{
  6191. #define HW_ENET_IEEE_R_FDXFC_ADDR(x) (REGS_ENET_BASE(x) + 0x2DCU)
  6192. #ifndef __LANGUAGE_ASM__
  6193. #define HW_ENET_IEEE_R_FDXFC(x) (*(__I hw_enet_ieee_r_fdxfc_t *) HW_ENET_IEEE_R_FDXFC_ADDR(x))
  6194. #define HW_ENET_IEEE_R_FDXFC_RD(x) (HW_ENET_IEEE_R_FDXFC(x).U)
  6195. #endif
  6196. //@}
  6197. /*
  6198. * Constants & macros for individual ENET_IEEE_R_FDXFC bitfields
  6199. */
  6200. /*!
  6201. * @name Register ENET_IEEE_R_FDXFC, field COUNT[15:0] (RO)
  6202. */
  6203. //@{
  6204. #define BP_ENET_IEEE_R_FDXFC_COUNT (0U) //!< Bit position for ENET_IEEE_R_FDXFC_COUNT.
  6205. #define BM_ENET_IEEE_R_FDXFC_COUNT (0x0000FFFFU) //!< Bit mask for ENET_IEEE_R_FDXFC_COUNT.
  6206. #define BS_ENET_IEEE_R_FDXFC_COUNT (16U) //!< Bit field size in bits for ENET_IEEE_R_FDXFC_COUNT.
  6207. #ifndef __LANGUAGE_ASM__
  6208. //! @brief Read current value of the ENET_IEEE_R_FDXFC_COUNT field.
  6209. #define BR_ENET_IEEE_R_FDXFC_COUNT(x) (HW_ENET_IEEE_R_FDXFC(x).B.COUNT)
  6210. #endif
  6211. //@}
  6212. //-------------------------------------------------------------------------------------------
  6213. // HW_ENET_IEEE_R_OCTETS_OK - Octet Count for Frames Received without Error Statistic Register
  6214. //-------------------------------------------------------------------------------------------
  6215. #ifndef __LANGUAGE_ASM__
  6216. /*!
  6217. * @brief HW_ENET_IEEE_R_OCTETS_OK - Octet Count for Frames Received without Error Statistic Register (RO)
  6218. *
  6219. * Reset value: 0x00000000U
  6220. */
  6221. typedef union _hw_enet_ieee_r_octets_ok
  6222. {
  6223. uint32_t U;
  6224. struct _hw_enet_ieee_r_octets_ok_bitfields
  6225. {
  6226. uint32_t COUNT : 32; //!< [31:0] Octet count
  6227. } B;
  6228. } hw_enet_ieee_r_octets_ok_t;
  6229. #endif
  6230. /*!
  6231. * @name Constants and macros for entire ENET_IEEE_R_OCTETS_OK register
  6232. */
  6233. //@{
  6234. #define HW_ENET_IEEE_R_OCTETS_OK_ADDR(x) (REGS_ENET_BASE(x) + 0x2E0U)
  6235. #ifndef __LANGUAGE_ASM__
  6236. #define HW_ENET_IEEE_R_OCTETS_OK(x) (*(__I hw_enet_ieee_r_octets_ok_t *) HW_ENET_IEEE_R_OCTETS_OK_ADDR(x))
  6237. #define HW_ENET_IEEE_R_OCTETS_OK_RD(x) (HW_ENET_IEEE_R_OCTETS_OK(x).U)
  6238. #endif
  6239. //@}
  6240. /*
  6241. * Constants & macros for individual ENET_IEEE_R_OCTETS_OK bitfields
  6242. */
  6243. /*!
  6244. * @name Register ENET_IEEE_R_OCTETS_OK, field COUNT[31:0] (RO)
  6245. */
  6246. //@{
  6247. #define BP_ENET_IEEE_R_OCTETS_OK_COUNT (0U) //!< Bit position for ENET_IEEE_R_OCTETS_OK_COUNT.
  6248. #define BM_ENET_IEEE_R_OCTETS_OK_COUNT (0xFFFFFFFFU) //!< Bit mask for ENET_IEEE_R_OCTETS_OK_COUNT.
  6249. #define BS_ENET_IEEE_R_OCTETS_OK_COUNT (32U) //!< Bit field size in bits for ENET_IEEE_R_OCTETS_OK_COUNT.
  6250. #ifndef __LANGUAGE_ASM__
  6251. //! @brief Read current value of the ENET_IEEE_R_OCTETS_OK_COUNT field.
  6252. #define BR_ENET_IEEE_R_OCTETS_OK_COUNT(x) (HW_ENET_IEEE_R_OCTETS_OK(x).U)
  6253. #endif
  6254. //@}
  6255. //-------------------------------------------------------------------------------------------
  6256. // HW_ENET_ATCR - Adjustable Timer Control Register
  6257. //-------------------------------------------------------------------------------------------
  6258. #ifndef __LANGUAGE_ASM__
  6259. /*!
  6260. * @brief HW_ENET_ATCR - Adjustable Timer Control Register (RW)
  6261. *
  6262. * Reset value: 0x00000000U
  6263. *
  6264. * ATCR command fields can trigger the corresponding events directly. It is not
  6265. * necessary to preserve any of the configuration fields when a command field is
  6266. * set in the register, that is, no read-modify-write is required. The fields are
  6267. * automatically cleared after the command completes.
  6268. */
  6269. typedef union _hw_enet_atcr
  6270. {
  6271. uint32_t U;
  6272. struct _hw_enet_atcr_bitfields
  6273. {
  6274. uint32_t EN : 1; //!< [0] Enable Timer
  6275. uint32_t RESERVED0 : 1; //!< [1]
  6276. uint32_t OFFEN : 1; //!< [2] Enable One-Shot Offset Event
  6277. uint32_t OFFRST : 1; //!< [3] Reset Timer On Offset Event
  6278. uint32_t PEREN : 1; //!< [4] Enable Periodical Event
  6279. uint32_t RESERVED1 : 2; //!< [6:5]
  6280. uint32_t PINPER : 1; //!< [7]
  6281. uint32_t RESERVED2 : 1; //!< [8]
  6282. uint32_t RESTART : 1; //!< [9] Reset Timer
  6283. uint32_t RESERVED3 : 1; //!< [10]
  6284. uint32_t CAPTURE : 1; //!< [11] Capture Timer Value
  6285. uint32_t RESERVED4 : 1; //!< [12]
  6286. uint32_t SLAVE : 1; //!< [13] Enable Timer Slave Mode
  6287. uint32_t RESERVED5 : 18; //!< [31:14]
  6288. } B;
  6289. } hw_enet_atcr_t;
  6290. #endif
  6291. /*!
  6292. * @name Constants and macros for entire ENET_ATCR register
  6293. */
  6294. //@{
  6295. #define HW_ENET_ATCR_ADDR(x) (REGS_ENET_BASE(x) + 0x400U)
  6296. #ifndef __LANGUAGE_ASM__
  6297. #define HW_ENET_ATCR(x) (*(__IO hw_enet_atcr_t *) HW_ENET_ATCR_ADDR(x))
  6298. #define HW_ENET_ATCR_RD(x) (HW_ENET_ATCR(x).U)
  6299. #define HW_ENET_ATCR_WR(x, v) (HW_ENET_ATCR(x).U = (v))
  6300. #define HW_ENET_ATCR_SET(x, v) (HW_ENET_ATCR_WR(x, HW_ENET_ATCR_RD(x) | (v)))
  6301. #define HW_ENET_ATCR_CLR(x, v) (HW_ENET_ATCR_WR(x, HW_ENET_ATCR_RD(x) & ~(v)))
  6302. #define HW_ENET_ATCR_TOG(x, v) (HW_ENET_ATCR_WR(x, HW_ENET_ATCR_RD(x) ^ (v)))
  6303. #endif
  6304. //@}
  6305. /*
  6306. * Constants & macros for individual ENET_ATCR bitfields
  6307. */
  6308. /*!
  6309. * @name Register ENET_ATCR, field EN[0] (RW)
  6310. *
  6311. * Values:
  6312. * - 0 - The timer stops at the current value.
  6313. * - 1 - The timer starts incrementing.
  6314. */
  6315. //@{
  6316. #define BP_ENET_ATCR_EN (0U) //!< Bit position for ENET_ATCR_EN.
  6317. #define BM_ENET_ATCR_EN (0x00000001U) //!< Bit mask for ENET_ATCR_EN.
  6318. #define BS_ENET_ATCR_EN (1U) //!< Bit field size in bits for ENET_ATCR_EN.
  6319. #ifndef __LANGUAGE_ASM__
  6320. //! @brief Read current value of the ENET_ATCR_EN field.
  6321. #define BR_ENET_ATCR_EN(x) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_EN))
  6322. #endif
  6323. //! @brief Format value for bitfield ENET_ATCR_EN.
  6324. #define BF_ENET_ATCR_EN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATCR_EN), uint32_t) & BM_ENET_ATCR_EN)
  6325. #ifndef __LANGUAGE_ASM__
  6326. //! @brief Set the EN field to a new value.
  6327. #define BW_ENET_ATCR_EN(x, v) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_EN) = (v))
  6328. #endif
  6329. //@}
  6330. /*!
  6331. * @name Register ENET_ATCR, field OFFEN[2] (RW)
  6332. *
  6333. * Values:
  6334. * - 0 - Disable.
  6335. * - 1 - The timer can be reset to zero when the given offset time is reached
  6336. * (offset event). The field is cleared when the offset event is reached, so no
  6337. * further event occurs until the field is set again. The timer offset value
  6338. * must be set before setting this field.
  6339. */
  6340. //@{
  6341. #define BP_ENET_ATCR_OFFEN (2U) //!< Bit position for ENET_ATCR_OFFEN.
  6342. #define BM_ENET_ATCR_OFFEN (0x00000004U) //!< Bit mask for ENET_ATCR_OFFEN.
  6343. #define BS_ENET_ATCR_OFFEN (1U) //!< Bit field size in bits for ENET_ATCR_OFFEN.
  6344. #ifndef __LANGUAGE_ASM__
  6345. //! @brief Read current value of the ENET_ATCR_OFFEN field.
  6346. #define BR_ENET_ATCR_OFFEN(x) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_OFFEN))
  6347. #endif
  6348. //! @brief Format value for bitfield ENET_ATCR_OFFEN.
  6349. #define BF_ENET_ATCR_OFFEN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATCR_OFFEN), uint32_t) & BM_ENET_ATCR_OFFEN)
  6350. #ifndef __LANGUAGE_ASM__
  6351. //! @brief Set the OFFEN field to a new value.
  6352. #define BW_ENET_ATCR_OFFEN(x, v) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_OFFEN) = (v))
  6353. #endif
  6354. //@}
  6355. /*!
  6356. * @name Register ENET_ATCR, field OFFRST[3] (RW)
  6357. *
  6358. * Values:
  6359. * - 0 - The timer is not affected and no action occurs, besides clearing OFFEN,
  6360. * when the offset is reached.
  6361. * - 1 - If OFFEN is set, the timer resets to zero when the offset setting is
  6362. * reached. The offset event does not cause a timer interrupt.
  6363. */
  6364. //@{
  6365. #define BP_ENET_ATCR_OFFRST (3U) //!< Bit position for ENET_ATCR_OFFRST.
  6366. #define BM_ENET_ATCR_OFFRST (0x00000008U) //!< Bit mask for ENET_ATCR_OFFRST.
  6367. #define BS_ENET_ATCR_OFFRST (1U) //!< Bit field size in bits for ENET_ATCR_OFFRST.
  6368. #ifndef __LANGUAGE_ASM__
  6369. //! @brief Read current value of the ENET_ATCR_OFFRST field.
  6370. #define BR_ENET_ATCR_OFFRST(x) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_OFFRST))
  6371. #endif
  6372. //! @brief Format value for bitfield ENET_ATCR_OFFRST.
  6373. #define BF_ENET_ATCR_OFFRST(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATCR_OFFRST), uint32_t) & BM_ENET_ATCR_OFFRST)
  6374. #ifndef __LANGUAGE_ASM__
  6375. //! @brief Set the OFFRST field to a new value.
  6376. #define BW_ENET_ATCR_OFFRST(x, v) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_OFFRST) = (v))
  6377. #endif
  6378. //@}
  6379. /*!
  6380. * @name Register ENET_ATCR, field PEREN[4] (RW)
  6381. *
  6382. * Values:
  6383. * - 0 - Disable.
  6384. * - 1 - A period event interrupt can be generated (EIR[TS_TIMER]) and the event
  6385. * signal output is asserted when the timer wraps around according to the
  6386. * periodic setting ATPER. The timer period value must be set before setting
  6387. * this bit. Not all devices contain the event signal output. See the chip
  6388. * configuration details.
  6389. */
  6390. //@{
  6391. #define BP_ENET_ATCR_PEREN (4U) //!< Bit position for ENET_ATCR_PEREN.
  6392. #define BM_ENET_ATCR_PEREN (0x00000010U) //!< Bit mask for ENET_ATCR_PEREN.
  6393. #define BS_ENET_ATCR_PEREN (1U) //!< Bit field size in bits for ENET_ATCR_PEREN.
  6394. #ifndef __LANGUAGE_ASM__
  6395. //! @brief Read current value of the ENET_ATCR_PEREN field.
  6396. #define BR_ENET_ATCR_PEREN(x) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_PEREN))
  6397. #endif
  6398. //! @brief Format value for bitfield ENET_ATCR_PEREN.
  6399. #define BF_ENET_ATCR_PEREN(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATCR_PEREN), uint32_t) & BM_ENET_ATCR_PEREN)
  6400. #ifndef __LANGUAGE_ASM__
  6401. //! @brief Set the PEREN field to a new value.
  6402. #define BW_ENET_ATCR_PEREN(x, v) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_PEREN) = (v))
  6403. #endif
  6404. //@}
  6405. /*!
  6406. * @name Register ENET_ATCR, field PINPER[7] (RW)
  6407. *
  6408. * Enables event signal output assertion on period event. Not all devices
  6409. * contain the event signal output. See the chip configuration details.
  6410. *
  6411. * Values:
  6412. * - 0 - Disable.
  6413. * - 1 - Enable.
  6414. */
  6415. //@{
  6416. #define BP_ENET_ATCR_PINPER (7U) //!< Bit position for ENET_ATCR_PINPER.
  6417. #define BM_ENET_ATCR_PINPER (0x00000080U) //!< Bit mask for ENET_ATCR_PINPER.
  6418. #define BS_ENET_ATCR_PINPER (1U) //!< Bit field size in bits for ENET_ATCR_PINPER.
  6419. #ifndef __LANGUAGE_ASM__
  6420. //! @brief Read current value of the ENET_ATCR_PINPER field.
  6421. #define BR_ENET_ATCR_PINPER(x) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_PINPER))
  6422. #endif
  6423. //! @brief Format value for bitfield ENET_ATCR_PINPER.
  6424. #define BF_ENET_ATCR_PINPER(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATCR_PINPER), uint32_t) & BM_ENET_ATCR_PINPER)
  6425. #ifndef __LANGUAGE_ASM__
  6426. //! @brief Set the PINPER field to a new value.
  6427. #define BW_ENET_ATCR_PINPER(x, v) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_PINPER) = (v))
  6428. #endif
  6429. //@}
  6430. /*!
  6431. * @name Register ENET_ATCR, field RESTART[9] (RW)
  6432. *
  6433. * Resets the timer to zero. This has no effect on the counter enable. If the
  6434. * counter is enabled when this field is set, the timer is reset to zero and starts
  6435. * counting from there. When set, all other fields are ignored during a write.
  6436. */
  6437. //@{
  6438. #define BP_ENET_ATCR_RESTART (9U) //!< Bit position for ENET_ATCR_RESTART.
  6439. #define BM_ENET_ATCR_RESTART (0x00000200U) //!< Bit mask for ENET_ATCR_RESTART.
  6440. #define BS_ENET_ATCR_RESTART (1U) //!< Bit field size in bits for ENET_ATCR_RESTART.
  6441. #ifndef __LANGUAGE_ASM__
  6442. //! @brief Read current value of the ENET_ATCR_RESTART field.
  6443. #define BR_ENET_ATCR_RESTART(x) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_RESTART))
  6444. #endif
  6445. //! @brief Format value for bitfield ENET_ATCR_RESTART.
  6446. #define BF_ENET_ATCR_RESTART(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATCR_RESTART), uint32_t) & BM_ENET_ATCR_RESTART)
  6447. #ifndef __LANGUAGE_ASM__
  6448. //! @brief Set the RESTART field to a new value.
  6449. #define BW_ENET_ATCR_RESTART(x, v) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_RESTART) = (v))
  6450. #endif
  6451. //@}
  6452. /*!
  6453. * @name Register ENET_ATCR, field CAPTURE[11] (RW)
  6454. *
  6455. * Values:
  6456. * - 0 - No effect.
  6457. * - 1 - The current time is captured and can be read from the ATVR register.
  6458. */
  6459. //@{
  6460. #define BP_ENET_ATCR_CAPTURE (11U) //!< Bit position for ENET_ATCR_CAPTURE.
  6461. #define BM_ENET_ATCR_CAPTURE (0x00000800U) //!< Bit mask for ENET_ATCR_CAPTURE.
  6462. #define BS_ENET_ATCR_CAPTURE (1U) //!< Bit field size in bits for ENET_ATCR_CAPTURE.
  6463. #ifndef __LANGUAGE_ASM__
  6464. //! @brief Read current value of the ENET_ATCR_CAPTURE field.
  6465. #define BR_ENET_ATCR_CAPTURE(x) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_CAPTURE))
  6466. #endif
  6467. //! @brief Format value for bitfield ENET_ATCR_CAPTURE.
  6468. #define BF_ENET_ATCR_CAPTURE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATCR_CAPTURE), uint32_t) & BM_ENET_ATCR_CAPTURE)
  6469. #ifndef __LANGUAGE_ASM__
  6470. //! @brief Set the CAPTURE field to a new value.
  6471. #define BW_ENET_ATCR_CAPTURE(x, v) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_CAPTURE) = (v))
  6472. #endif
  6473. //@}
  6474. /*!
  6475. * @name Register ENET_ATCR, field SLAVE[13] (RW)
  6476. *
  6477. * Values:
  6478. * - 0 - The timer is active and all configuration fields in this register are
  6479. * relevant.
  6480. * - 1 - The internal timer is disabled and the externally provided timer value
  6481. * is used. All other fields, except CAPTURE, in this register have no
  6482. * effect. CAPTURE can still be used to capture the current timer value.
  6483. */
  6484. //@{
  6485. #define BP_ENET_ATCR_SLAVE (13U) //!< Bit position for ENET_ATCR_SLAVE.
  6486. #define BM_ENET_ATCR_SLAVE (0x00002000U) //!< Bit mask for ENET_ATCR_SLAVE.
  6487. #define BS_ENET_ATCR_SLAVE (1U) //!< Bit field size in bits for ENET_ATCR_SLAVE.
  6488. #ifndef __LANGUAGE_ASM__
  6489. //! @brief Read current value of the ENET_ATCR_SLAVE field.
  6490. #define BR_ENET_ATCR_SLAVE(x) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_SLAVE))
  6491. #endif
  6492. //! @brief Format value for bitfield ENET_ATCR_SLAVE.
  6493. #define BF_ENET_ATCR_SLAVE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATCR_SLAVE), uint32_t) & BM_ENET_ATCR_SLAVE)
  6494. #ifndef __LANGUAGE_ASM__
  6495. //! @brief Set the SLAVE field to a new value.
  6496. #define BW_ENET_ATCR_SLAVE(x, v) (BITBAND_ACCESS32(HW_ENET_ATCR_ADDR(x), BP_ENET_ATCR_SLAVE) = (v))
  6497. #endif
  6498. //@}
  6499. //-------------------------------------------------------------------------------------------
  6500. // HW_ENET_ATVR - Timer Value Register
  6501. //-------------------------------------------------------------------------------------------
  6502. #ifndef __LANGUAGE_ASM__
  6503. /*!
  6504. * @brief HW_ENET_ATVR - Timer Value Register (RW)
  6505. *
  6506. * Reset value: 0x00000000U
  6507. */
  6508. typedef union _hw_enet_atvr
  6509. {
  6510. uint32_t U;
  6511. struct _hw_enet_atvr_bitfields
  6512. {
  6513. uint32_t ATIME : 32; //!< [31:0]
  6514. } B;
  6515. } hw_enet_atvr_t;
  6516. #endif
  6517. /*!
  6518. * @name Constants and macros for entire ENET_ATVR register
  6519. */
  6520. //@{
  6521. #define HW_ENET_ATVR_ADDR(x) (REGS_ENET_BASE(x) + 0x404U)
  6522. #ifndef __LANGUAGE_ASM__
  6523. #define HW_ENET_ATVR(x) (*(__IO hw_enet_atvr_t *) HW_ENET_ATVR_ADDR(x))
  6524. #define HW_ENET_ATVR_RD(x) (HW_ENET_ATVR(x).U)
  6525. #define HW_ENET_ATVR_WR(x, v) (HW_ENET_ATVR(x).U = (v))
  6526. #define HW_ENET_ATVR_SET(x, v) (HW_ENET_ATVR_WR(x, HW_ENET_ATVR_RD(x) | (v)))
  6527. #define HW_ENET_ATVR_CLR(x, v) (HW_ENET_ATVR_WR(x, HW_ENET_ATVR_RD(x) & ~(v)))
  6528. #define HW_ENET_ATVR_TOG(x, v) (HW_ENET_ATVR_WR(x, HW_ENET_ATVR_RD(x) ^ (v)))
  6529. #endif
  6530. //@}
  6531. /*
  6532. * Constants & macros for individual ENET_ATVR bitfields
  6533. */
  6534. /*!
  6535. * @name Register ENET_ATVR, field ATIME[31:0] (RW)
  6536. *
  6537. * A write sets the timer. A read returns the last captured value. To read the
  6538. * current value, issue a capture command (set ATCR[CAPTURE]) prior to reading
  6539. * this register.
  6540. */
  6541. //@{
  6542. #define BP_ENET_ATVR_ATIME (0U) //!< Bit position for ENET_ATVR_ATIME.
  6543. #define BM_ENET_ATVR_ATIME (0xFFFFFFFFU) //!< Bit mask for ENET_ATVR_ATIME.
  6544. #define BS_ENET_ATVR_ATIME (32U) //!< Bit field size in bits for ENET_ATVR_ATIME.
  6545. #ifndef __LANGUAGE_ASM__
  6546. //! @brief Read current value of the ENET_ATVR_ATIME field.
  6547. #define BR_ENET_ATVR_ATIME(x) (HW_ENET_ATVR(x).U)
  6548. #endif
  6549. //! @brief Format value for bitfield ENET_ATVR_ATIME.
  6550. #define BF_ENET_ATVR_ATIME(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATVR_ATIME), uint32_t) & BM_ENET_ATVR_ATIME)
  6551. #ifndef __LANGUAGE_ASM__
  6552. //! @brief Set the ATIME field to a new value.
  6553. #define BW_ENET_ATVR_ATIME(x, v) (HW_ENET_ATVR_WR(x, v))
  6554. #endif
  6555. //@}
  6556. //-------------------------------------------------------------------------------------------
  6557. // HW_ENET_ATOFF - Timer Offset Register
  6558. //-------------------------------------------------------------------------------------------
  6559. #ifndef __LANGUAGE_ASM__
  6560. /*!
  6561. * @brief HW_ENET_ATOFF - Timer Offset Register (RW)
  6562. *
  6563. * Reset value: 0x00000000U
  6564. */
  6565. typedef union _hw_enet_atoff
  6566. {
  6567. uint32_t U;
  6568. struct _hw_enet_atoff_bitfields
  6569. {
  6570. uint32_t OFFSET : 32; //!< [31:0]
  6571. } B;
  6572. } hw_enet_atoff_t;
  6573. #endif
  6574. /*!
  6575. * @name Constants and macros for entire ENET_ATOFF register
  6576. */
  6577. //@{
  6578. #define HW_ENET_ATOFF_ADDR(x) (REGS_ENET_BASE(x) + 0x408U)
  6579. #ifndef __LANGUAGE_ASM__
  6580. #define HW_ENET_ATOFF(x) (*(__IO hw_enet_atoff_t *) HW_ENET_ATOFF_ADDR(x))
  6581. #define HW_ENET_ATOFF_RD(x) (HW_ENET_ATOFF(x).U)
  6582. #define HW_ENET_ATOFF_WR(x, v) (HW_ENET_ATOFF(x).U = (v))
  6583. #define HW_ENET_ATOFF_SET(x, v) (HW_ENET_ATOFF_WR(x, HW_ENET_ATOFF_RD(x) | (v)))
  6584. #define HW_ENET_ATOFF_CLR(x, v) (HW_ENET_ATOFF_WR(x, HW_ENET_ATOFF_RD(x) & ~(v)))
  6585. #define HW_ENET_ATOFF_TOG(x, v) (HW_ENET_ATOFF_WR(x, HW_ENET_ATOFF_RD(x) ^ (v)))
  6586. #endif
  6587. //@}
  6588. /*
  6589. * Constants & macros for individual ENET_ATOFF bitfields
  6590. */
  6591. /*!
  6592. * @name Register ENET_ATOFF, field OFFSET[31:0] (RW)
  6593. *
  6594. * Offset value for one-shot event generation. When the timer reaches the value,
  6595. * an event can be generated to reset the counter. If the increment value in
  6596. * ATINC is given in true nanoseconds, this value is also given in true nanoseconds.
  6597. */
  6598. //@{
  6599. #define BP_ENET_ATOFF_OFFSET (0U) //!< Bit position for ENET_ATOFF_OFFSET.
  6600. #define BM_ENET_ATOFF_OFFSET (0xFFFFFFFFU) //!< Bit mask for ENET_ATOFF_OFFSET.
  6601. #define BS_ENET_ATOFF_OFFSET (32U) //!< Bit field size in bits for ENET_ATOFF_OFFSET.
  6602. #ifndef __LANGUAGE_ASM__
  6603. //! @brief Read current value of the ENET_ATOFF_OFFSET field.
  6604. #define BR_ENET_ATOFF_OFFSET(x) (HW_ENET_ATOFF(x).U)
  6605. #endif
  6606. //! @brief Format value for bitfield ENET_ATOFF_OFFSET.
  6607. #define BF_ENET_ATOFF_OFFSET(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATOFF_OFFSET), uint32_t) & BM_ENET_ATOFF_OFFSET)
  6608. #ifndef __LANGUAGE_ASM__
  6609. //! @brief Set the OFFSET field to a new value.
  6610. #define BW_ENET_ATOFF_OFFSET(x, v) (HW_ENET_ATOFF_WR(x, v))
  6611. #endif
  6612. //@}
  6613. //-------------------------------------------------------------------------------------------
  6614. // HW_ENET_ATPER - Timer Period Register
  6615. //-------------------------------------------------------------------------------------------
  6616. #ifndef __LANGUAGE_ASM__
  6617. /*!
  6618. * @brief HW_ENET_ATPER - Timer Period Register (RW)
  6619. *
  6620. * Reset value: 0x3B9ACA00U
  6621. */
  6622. typedef union _hw_enet_atper
  6623. {
  6624. uint32_t U;
  6625. struct _hw_enet_atper_bitfields
  6626. {
  6627. uint32_t PERIOD : 32; //!< [31:0]
  6628. } B;
  6629. } hw_enet_atper_t;
  6630. #endif
  6631. /*!
  6632. * @name Constants and macros for entire ENET_ATPER register
  6633. */
  6634. //@{
  6635. #define HW_ENET_ATPER_ADDR(x) (REGS_ENET_BASE(x) + 0x40CU)
  6636. #ifndef __LANGUAGE_ASM__
  6637. #define HW_ENET_ATPER(x) (*(__IO hw_enet_atper_t *) HW_ENET_ATPER_ADDR(x))
  6638. #define HW_ENET_ATPER_RD(x) (HW_ENET_ATPER(x).U)
  6639. #define HW_ENET_ATPER_WR(x, v) (HW_ENET_ATPER(x).U = (v))
  6640. #define HW_ENET_ATPER_SET(x, v) (HW_ENET_ATPER_WR(x, HW_ENET_ATPER_RD(x) | (v)))
  6641. #define HW_ENET_ATPER_CLR(x, v) (HW_ENET_ATPER_WR(x, HW_ENET_ATPER_RD(x) & ~(v)))
  6642. #define HW_ENET_ATPER_TOG(x, v) (HW_ENET_ATPER_WR(x, HW_ENET_ATPER_RD(x) ^ (v)))
  6643. #endif
  6644. //@}
  6645. /*
  6646. * Constants & macros for individual ENET_ATPER bitfields
  6647. */
  6648. /*!
  6649. * @name Register ENET_ATPER, field PERIOD[31:0] (RW)
  6650. *
  6651. * Value for generating periodic events. Each instance the timer reaches this
  6652. * value, the period event occurs and the timer restarts. If the increment value in
  6653. * ATINC is given in true nanoseconds, this value is also given in true
  6654. * nanoseconds. The value should be initialized to 1,000,000,000 (1 x 10 9 ) to represent
  6655. * a timer wrap around of one second. The increment value set in ATINC should be
  6656. * set to the true nanoseconds of the period of clock ts_clk, hence implementing
  6657. * a true 1 second counter.
  6658. */
  6659. //@{
  6660. #define BP_ENET_ATPER_PERIOD (0U) //!< Bit position for ENET_ATPER_PERIOD.
  6661. #define BM_ENET_ATPER_PERIOD (0xFFFFFFFFU) //!< Bit mask for ENET_ATPER_PERIOD.
  6662. #define BS_ENET_ATPER_PERIOD (32U) //!< Bit field size in bits for ENET_ATPER_PERIOD.
  6663. #ifndef __LANGUAGE_ASM__
  6664. //! @brief Read current value of the ENET_ATPER_PERIOD field.
  6665. #define BR_ENET_ATPER_PERIOD(x) (HW_ENET_ATPER(x).U)
  6666. #endif
  6667. //! @brief Format value for bitfield ENET_ATPER_PERIOD.
  6668. #define BF_ENET_ATPER_PERIOD(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATPER_PERIOD), uint32_t) & BM_ENET_ATPER_PERIOD)
  6669. #ifndef __LANGUAGE_ASM__
  6670. //! @brief Set the PERIOD field to a new value.
  6671. #define BW_ENET_ATPER_PERIOD(x, v) (HW_ENET_ATPER_WR(x, v))
  6672. #endif
  6673. //@}
  6674. //-------------------------------------------------------------------------------------------
  6675. // HW_ENET_ATCOR - Timer Correction Register
  6676. //-------------------------------------------------------------------------------------------
  6677. #ifndef __LANGUAGE_ASM__
  6678. /*!
  6679. * @brief HW_ENET_ATCOR - Timer Correction Register (RW)
  6680. *
  6681. * Reset value: 0x00000000U
  6682. */
  6683. typedef union _hw_enet_atcor
  6684. {
  6685. uint32_t U;
  6686. struct _hw_enet_atcor_bitfields
  6687. {
  6688. uint32_t COR : 31; //!< [30:0] Correction Counter Wrap-Around Value
  6689. uint32_t RESERVED0 : 1; //!< [31]
  6690. } B;
  6691. } hw_enet_atcor_t;
  6692. #endif
  6693. /*!
  6694. * @name Constants and macros for entire ENET_ATCOR register
  6695. */
  6696. //@{
  6697. #define HW_ENET_ATCOR_ADDR(x) (REGS_ENET_BASE(x) + 0x410U)
  6698. #ifndef __LANGUAGE_ASM__
  6699. #define HW_ENET_ATCOR(x) (*(__IO hw_enet_atcor_t *) HW_ENET_ATCOR_ADDR(x))
  6700. #define HW_ENET_ATCOR_RD(x) (HW_ENET_ATCOR(x).U)
  6701. #define HW_ENET_ATCOR_WR(x, v) (HW_ENET_ATCOR(x).U = (v))
  6702. #define HW_ENET_ATCOR_SET(x, v) (HW_ENET_ATCOR_WR(x, HW_ENET_ATCOR_RD(x) | (v)))
  6703. #define HW_ENET_ATCOR_CLR(x, v) (HW_ENET_ATCOR_WR(x, HW_ENET_ATCOR_RD(x) & ~(v)))
  6704. #define HW_ENET_ATCOR_TOG(x, v) (HW_ENET_ATCOR_WR(x, HW_ENET_ATCOR_RD(x) ^ (v)))
  6705. #endif
  6706. //@}
  6707. /*
  6708. * Constants & macros for individual ENET_ATCOR bitfields
  6709. */
  6710. /*!
  6711. * @name Register ENET_ATCOR, field COR[30:0] (RW)
  6712. *
  6713. * Defines after how many timer clock cycles (ts_clk) the correction counter
  6714. * should be reset and trigger a correction increment on the timer. The amount of
  6715. * correction is defined in ATINC[INC_CORR]. A value of 0 disables the correction
  6716. * counter and no corrections occur. This value is given in clock cycles, not in
  6717. * nanoseconds as all other values.
  6718. */
  6719. //@{
  6720. #define BP_ENET_ATCOR_COR (0U) //!< Bit position for ENET_ATCOR_COR.
  6721. #define BM_ENET_ATCOR_COR (0x7FFFFFFFU) //!< Bit mask for ENET_ATCOR_COR.
  6722. #define BS_ENET_ATCOR_COR (31U) //!< Bit field size in bits for ENET_ATCOR_COR.
  6723. #ifndef __LANGUAGE_ASM__
  6724. //! @brief Read current value of the ENET_ATCOR_COR field.
  6725. #define BR_ENET_ATCOR_COR(x) (HW_ENET_ATCOR(x).B.COR)
  6726. #endif
  6727. //! @brief Format value for bitfield ENET_ATCOR_COR.
  6728. #define BF_ENET_ATCOR_COR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATCOR_COR), uint32_t) & BM_ENET_ATCOR_COR)
  6729. #ifndef __LANGUAGE_ASM__
  6730. //! @brief Set the COR field to a new value.
  6731. #define BW_ENET_ATCOR_COR(x, v) (HW_ENET_ATCOR_WR(x, (HW_ENET_ATCOR_RD(x) & ~BM_ENET_ATCOR_COR) | BF_ENET_ATCOR_COR(v)))
  6732. #endif
  6733. //@}
  6734. //-------------------------------------------------------------------------------------------
  6735. // HW_ENET_ATINC - Time-Stamping Clock Period Register
  6736. //-------------------------------------------------------------------------------------------
  6737. #ifndef __LANGUAGE_ASM__
  6738. /*!
  6739. * @brief HW_ENET_ATINC - Time-Stamping Clock Period Register (RW)
  6740. *
  6741. * Reset value: 0x00000000U
  6742. */
  6743. typedef union _hw_enet_atinc
  6744. {
  6745. uint32_t U;
  6746. struct _hw_enet_atinc_bitfields
  6747. {
  6748. uint32_t INC : 7; //!< [6:0] Clock Period Of The Timestamping Clock
  6749. //! (ts_clk) In Nanoseconds
  6750. uint32_t RESERVED0 : 1; //!< [7]
  6751. uint32_t INC_CORR : 7; //!< [14:8] Correction Increment Value
  6752. uint32_t RESERVED1 : 17; //!< [31:15]
  6753. } B;
  6754. } hw_enet_atinc_t;
  6755. #endif
  6756. /*!
  6757. * @name Constants and macros for entire ENET_ATINC register
  6758. */
  6759. //@{
  6760. #define HW_ENET_ATINC_ADDR(x) (REGS_ENET_BASE(x) + 0x414U)
  6761. #ifndef __LANGUAGE_ASM__
  6762. #define HW_ENET_ATINC(x) (*(__IO hw_enet_atinc_t *) HW_ENET_ATINC_ADDR(x))
  6763. #define HW_ENET_ATINC_RD(x) (HW_ENET_ATINC(x).U)
  6764. #define HW_ENET_ATINC_WR(x, v) (HW_ENET_ATINC(x).U = (v))
  6765. #define HW_ENET_ATINC_SET(x, v) (HW_ENET_ATINC_WR(x, HW_ENET_ATINC_RD(x) | (v)))
  6766. #define HW_ENET_ATINC_CLR(x, v) (HW_ENET_ATINC_WR(x, HW_ENET_ATINC_RD(x) & ~(v)))
  6767. #define HW_ENET_ATINC_TOG(x, v) (HW_ENET_ATINC_WR(x, HW_ENET_ATINC_RD(x) ^ (v)))
  6768. #endif
  6769. //@}
  6770. /*
  6771. * Constants & macros for individual ENET_ATINC bitfields
  6772. */
  6773. /*!
  6774. * @name Register ENET_ATINC, field INC[6:0] (RW)
  6775. *
  6776. * The timer increments by this amount each clock cycle. For example, set to 10
  6777. * for 100 MHz, 8 for 125 MHz, 5 for 200 MHz. For highest precision, use a value
  6778. * that is an integer fraction of the period set in ATPER.
  6779. */
  6780. //@{
  6781. #define BP_ENET_ATINC_INC (0U) //!< Bit position for ENET_ATINC_INC.
  6782. #define BM_ENET_ATINC_INC (0x0000007FU) //!< Bit mask for ENET_ATINC_INC.
  6783. #define BS_ENET_ATINC_INC (7U) //!< Bit field size in bits for ENET_ATINC_INC.
  6784. #ifndef __LANGUAGE_ASM__
  6785. //! @brief Read current value of the ENET_ATINC_INC field.
  6786. #define BR_ENET_ATINC_INC(x) (HW_ENET_ATINC(x).B.INC)
  6787. #endif
  6788. //! @brief Format value for bitfield ENET_ATINC_INC.
  6789. #define BF_ENET_ATINC_INC(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATINC_INC), uint32_t) & BM_ENET_ATINC_INC)
  6790. #ifndef __LANGUAGE_ASM__
  6791. //! @brief Set the INC field to a new value.
  6792. #define BW_ENET_ATINC_INC(x, v) (HW_ENET_ATINC_WR(x, (HW_ENET_ATINC_RD(x) & ~BM_ENET_ATINC_INC) | BF_ENET_ATINC_INC(v)))
  6793. #endif
  6794. //@}
  6795. /*!
  6796. * @name Register ENET_ATINC, field INC_CORR[14:8] (RW)
  6797. *
  6798. * This value is added every time the correction timer expires (every clock
  6799. * cycle given in ATCOR). A value less than INC slows down the timer. A value greater
  6800. * than INC speeds up the timer.
  6801. */
  6802. //@{
  6803. #define BP_ENET_ATINC_INC_CORR (8U) //!< Bit position for ENET_ATINC_INC_CORR.
  6804. #define BM_ENET_ATINC_INC_CORR (0x00007F00U) //!< Bit mask for ENET_ATINC_INC_CORR.
  6805. #define BS_ENET_ATINC_INC_CORR (7U) //!< Bit field size in bits for ENET_ATINC_INC_CORR.
  6806. #ifndef __LANGUAGE_ASM__
  6807. //! @brief Read current value of the ENET_ATINC_INC_CORR field.
  6808. #define BR_ENET_ATINC_INC_CORR(x) (HW_ENET_ATINC(x).B.INC_CORR)
  6809. #endif
  6810. //! @brief Format value for bitfield ENET_ATINC_INC_CORR.
  6811. #define BF_ENET_ATINC_INC_CORR(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_ATINC_INC_CORR), uint32_t) & BM_ENET_ATINC_INC_CORR)
  6812. #ifndef __LANGUAGE_ASM__
  6813. //! @brief Set the INC_CORR field to a new value.
  6814. #define BW_ENET_ATINC_INC_CORR(x, v) (HW_ENET_ATINC_WR(x, (HW_ENET_ATINC_RD(x) & ~BM_ENET_ATINC_INC_CORR) | BF_ENET_ATINC_INC_CORR(v)))
  6815. #endif
  6816. //@}
  6817. //-------------------------------------------------------------------------------------------
  6818. // HW_ENET_ATSTMP - Timestamp of Last Transmitted Frame
  6819. //-------------------------------------------------------------------------------------------
  6820. #ifndef __LANGUAGE_ASM__
  6821. /*!
  6822. * @brief HW_ENET_ATSTMP - Timestamp of Last Transmitted Frame (RO)
  6823. *
  6824. * Reset value: 0x00000000U
  6825. */
  6826. typedef union _hw_enet_atstmp
  6827. {
  6828. uint32_t U;
  6829. struct _hw_enet_atstmp_bitfields
  6830. {
  6831. uint32_t TIMESTAMP : 32; //!< [31:0]
  6832. } B;
  6833. } hw_enet_atstmp_t;
  6834. #endif
  6835. /*!
  6836. * @name Constants and macros for entire ENET_ATSTMP register
  6837. */
  6838. //@{
  6839. #define HW_ENET_ATSTMP_ADDR(x) (REGS_ENET_BASE(x) + 0x418U)
  6840. #ifndef __LANGUAGE_ASM__
  6841. #define HW_ENET_ATSTMP(x) (*(__I hw_enet_atstmp_t *) HW_ENET_ATSTMP_ADDR(x))
  6842. #define HW_ENET_ATSTMP_RD(x) (HW_ENET_ATSTMP(x).U)
  6843. #endif
  6844. //@}
  6845. /*
  6846. * Constants & macros for individual ENET_ATSTMP bitfields
  6847. */
  6848. /*!
  6849. * @name Register ENET_ATSTMP, field TIMESTAMP[31:0] (RO)
  6850. *
  6851. * Timestamp of the last frame transmitted by the core that had TxBD[TS] set .
  6852. * This register is only valid when EIR[TS_AVAIL] is set.
  6853. */
  6854. //@{
  6855. #define BP_ENET_ATSTMP_TIMESTAMP (0U) //!< Bit position for ENET_ATSTMP_TIMESTAMP.
  6856. #define BM_ENET_ATSTMP_TIMESTAMP (0xFFFFFFFFU) //!< Bit mask for ENET_ATSTMP_TIMESTAMP.
  6857. #define BS_ENET_ATSTMP_TIMESTAMP (32U) //!< Bit field size in bits for ENET_ATSTMP_TIMESTAMP.
  6858. #ifndef __LANGUAGE_ASM__
  6859. //! @brief Read current value of the ENET_ATSTMP_TIMESTAMP field.
  6860. #define BR_ENET_ATSTMP_TIMESTAMP(x) (HW_ENET_ATSTMP(x).U)
  6861. #endif
  6862. //@}
  6863. //-------------------------------------------------------------------------------------------
  6864. // HW_ENET_TGSR - Timer Global Status Register
  6865. //-------------------------------------------------------------------------------------------
  6866. #ifndef __LANGUAGE_ASM__
  6867. /*!
  6868. * @brief HW_ENET_TGSR - Timer Global Status Register (RW)
  6869. *
  6870. * Reset value: 0x00000000U
  6871. */
  6872. typedef union _hw_enet_tgsr
  6873. {
  6874. uint32_t U;
  6875. struct _hw_enet_tgsr_bitfields
  6876. {
  6877. uint32_t TF0 : 1; //!< [0] Copy Of Timer Flag For Channel 0
  6878. uint32_t TF1 : 1; //!< [1] Copy Of Timer Flag For Channel 1
  6879. uint32_t TF2 : 1; //!< [2] Copy Of Timer Flag For Channel 2
  6880. uint32_t TF3 : 1; //!< [3] Copy Of Timer Flag For Channel 3
  6881. uint32_t RESERVED0 : 28; //!< [31:4]
  6882. } B;
  6883. } hw_enet_tgsr_t;
  6884. #endif
  6885. /*!
  6886. * @name Constants and macros for entire ENET_TGSR register
  6887. */
  6888. //@{
  6889. #define HW_ENET_TGSR_ADDR(x) (REGS_ENET_BASE(x) + 0x604U)
  6890. #ifndef __LANGUAGE_ASM__
  6891. #define HW_ENET_TGSR(x) (*(__IO hw_enet_tgsr_t *) HW_ENET_TGSR_ADDR(x))
  6892. #define HW_ENET_TGSR_RD(x) (HW_ENET_TGSR(x).U)
  6893. #define HW_ENET_TGSR_WR(x, v) (HW_ENET_TGSR(x).U = (v))
  6894. #define HW_ENET_TGSR_SET(x, v) (HW_ENET_TGSR_WR(x, HW_ENET_TGSR_RD(x) | (v)))
  6895. #define HW_ENET_TGSR_CLR(x, v) (HW_ENET_TGSR_WR(x, HW_ENET_TGSR_RD(x) & ~(v)))
  6896. #define HW_ENET_TGSR_TOG(x, v) (HW_ENET_TGSR_WR(x, HW_ENET_TGSR_RD(x) ^ (v)))
  6897. #endif
  6898. //@}
  6899. /*
  6900. * Constants & macros for individual ENET_TGSR bitfields
  6901. */
  6902. /*!
  6903. * @name Register ENET_TGSR, field TF0[0] (W1C)
  6904. *
  6905. * Values:
  6906. * - 0 - Timer Flag for Channel 0 is clear
  6907. * - 1 - Timer Flag for Channel 0 is set
  6908. */
  6909. //@{
  6910. #define BP_ENET_TGSR_TF0 (0U) //!< Bit position for ENET_TGSR_TF0.
  6911. #define BM_ENET_TGSR_TF0 (0x00000001U) //!< Bit mask for ENET_TGSR_TF0.
  6912. #define BS_ENET_TGSR_TF0 (1U) //!< Bit field size in bits for ENET_TGSR_TF0.
  6913. #ifndef __LANGUAGE_ASM__
  6914. //! @brief Read current value of the ENET_TGSR_TF0 field.
  6915. #define BR_ENET_TGSR_TF0(x) (BITBAND_ACCESS32(HW_ENET_TGSR_ADDR(x), BP_ENET_TGSR_TF0))
  6916. #endif
  6917. //! @brief Format value for bitfield ENET_TGSR_TF0.
  6918. #define BF_ENET_TGSR_TF0(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TGSR_TF0), uint32_t) & BM_ENET_TGSR_TF0)
  6919. #ifndef __LANGUAGE_ASM__
  6920. //! @brief Set the TF0 field to a new value.
  6921. #define BW_ENET_TGSR_TF0(x, v) (BITBAND_ACCESS32(HW_ENET_TGSR_ADDR(x), BP_ENET_TGSR_TF0) = (v))
  6922. #endif
  6923. //@}
  6924. /*!
  6925. * @name Register ENET_TGSR, field TF1[1] (W1C)
  6926. *
  6927. * Values:
  6928. * - 0 - Timer Flag for Channel 1 is clear
  6929. * - 1 - Timer Flag for Channel 1 is set
  6930. */
  6931. //@{
  6932. #define BP_ENET_TGSR_TF1 (1U) //!< Bit position for ENET_TGSR_TF1.
  6933. #define BM_ENET_TGSR_TF1 (0x00000002U) //!< Bit mask for ENET_TGSR_TF1.
  6934. #define BS_ENET_TGSR_TF1 (1U) //!< Bit field size in bits for ENET_TGSR_TF1.
  6935. #ifndef __LANGUAGE_ASM__
  6936. //! @brief Read current value of the ENET_TGSR_TF1 field.
  6937. #define BR_ENET_TGSR_TF1(x) (BITBAND_ACCESS32(HW_ENET_TGSR_ADDR(x), BP_ENET_TGSR_TF1))
  6938. #endif
  6939. //! @brief Format value for bitfield ENET_TGSR_TF1.
  6940. #define BF_ENET_TGSR_TF1(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TGSR_TF1), uint32_t) & BM_ENET_TGSR_TF1)
  6941. #ifndef __LANGUAGE_ASM__
  6942. //! @brief Set the TF1 field to a new value.
  6943. #define BW_ENET_TGSR_TF1(x, v) (BITBAND_ACCESS32(HW_ENET_TGSR_ADDR(x), BP_ENET_TGSR_TF1) = (v))
  6944. #endif
  6945. //@}
  6946. /*!
  6947. * @name Register ENET_TGSR, field TF2[2] (W1C)
  6948. *
  6949. * Values:
  6950. * - 0 - Timer Flag for Channel 2 is clear
  6951. * - 1 - Timer Flag for Channel 2 is set
  6952. */
  6953. //@{
  6954. #define BP_ENET_TGSR_TF2 (2U) //!< Bit position for ENET_TGSR_TF2.
  6955. #define BM_ENET_TGSR_TF2 (0x00000004U) //!< Bit mask for ENET_TGSR_TF2.
  6956. #define BS_ENET_TGSR_TF2 (1U) //!< Bit field size in bits for ENET_TGSR_TF2.
  6957. #ifndef __LANGUAGE_ASM__
  6958. //! @brief Read current value of the ENET_TGSR_TF2 field.
  6959. #define BR_ENET_TGSR_TF2(x) (BITBAND_ACCESS32(HW_ENET_TGSR_ADDR(x), BP_ENET_TGSR_TF2))
  6960. #endif
  6961. //! @brief Format value for bitfield ENET_TGSR_TF2.
  6962. #define BF_ENET_TGSR_TF2(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TGSR_TF2), uint32_t) & BM_ENET_TGSR_TF2)
  6963. #ifndef __LANGUAGE_ASM__
  6964. //! @brief Set the TF2 field to a new value.
  6965. #define BW_ENET_TGSR_TF2(x, v) (BITBAND_ACCESS32(HW_ENET_TGSR_ADDR(x), BP_ENET_TGSR_TF2) = (v))
  6966. #endif
  6967. //@}
  6968. /*!
  6969. * @name Register ENET_TGSR, field TF3[3] (W1C)
  6970. *
  6971. * Values:
  6972. * - 0 - Timer Flag for Channel 3 is clear
  6973. * - 1 - Timer Flag for Channel 3 is set
  6974. */
  6975. //@{
  6976. #define BP_ENET_TGSR_TF3 (3U) //!< Bit position for ENET_TGSR_TF3.
  6977. #define BM_ENET_TGSR_TF3 (0x00000008U) //!< Bit mask for ENET_TGSR_TF3.
  6978. #define BS_ENET_TGSR_TF3 (1U) //!< Bit field size in bits for ENET_TGSR_TF3.
  6979. #ifndef __LANGUAGE_ASM__
  6980. //! @brief Read current value of the ENET_TGSR_TF3 field.
  6981. #define BR_ENET_TGSR_TF3(x) (BITBAND_ACCESS32(HW_ENET_TGSR_ADDR(x), BP_ENET_TGSR_TF3))
  6982. #endif
  6983. //! @brief Format value for bitfield ENET_TGSR_TF3.
  6984. #define BF_ENET_TGSR_TF3(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TGSR_TF3), uint32_t) & BM_ENET_TGSR_TF3)
  6985. #ifndef __LANGUAGE_ASM__
  6986. //! @brief Set the TF3 field to a new value.
  6987. #define BW_ENET_TGSR_TF3(x, v) (BITBAND_ACCESS32(HW_ENET_TGSR_ADDR(x), BP_ENET_TGSR_TF3) = (v))
  6988. #endif
  6989. //@}
  6990. //-------------------------------------------------------------------------------------------
  6991. // HW_ENET_TCSRn - Timer Control Status Register
  6992. //-------------------------------------------------------------------------------------------
  6993. #ifndef __LANGUAGE_ASM__
  6994. /*!
  6995. * @brief HW_ENET_TCSRn - Timer Control Status Register (RW)
  6996. *
  6997. * Reset value: 0x00000000U
  6998. */
  6999. typedef union _hw_enet_tcsrn
  7000. {
  7001. uint32_t U;
  7002. struct _hw_enet_tcsrn_bitfields
  7003. {
  7004. uint32_t TDRE : 1; //!< [0] Timer DMA Request Enable
  7005. uint32_t RESERVED0 : 1; //!< [1]
  7006. uint32_t TMODE : 4; //!< [5:2] Timer Mode
  7007. uint32_t TIE : 1; //!< [6] Timer Interrupt Enable
  7008. uint32_t TF : 1; //!< [7] Timer Flag
  7009. uint32_t RESERVED1 : 24; //!< [31:8]
  7010. } B;
  7011. } hw_enet_tcsrn_t;
  7012. #endif
  7013. /*!
  7014. * @name Constants and macros for entire ENET_TCSRn register
  7015. */
  7016. //@{
  7017. #define HW_ENET_TCSRn_COUNT (4U)
  7018. #define HW_ENET_TCSRn_ADDR(x, n) (REGS_ENET_BASE(x) + 0x608U + (0x8U * n))
  7019. #ifndef __LANGUAGE_ASM__
  7020. #define HW_ENET_TCSRn(x, n) (*(__IO hw_enet_tcsrn_t *) HW_ENET_TCSRn_ADDR(x, n))
  7021. #define HW_ENET_TCSRn_RD(x, n) (HW_ENET_TCSRn(x, n).U)
  7022. #define HW_ENET_TCSRn_WR(x, n, v) (HW_ENET_TCSRn(x, n).U = (v))
  7023. #define HW_ENET_TCSRn_SET(x, n, v) (HW_ENET_TCSRn_WR(x, n, HW_ENET_TCSRn_RD(x, n) | (v)))
  7024. #define HW_ENET_TCSRn_CLR(x, n, v) (HW_ENET_TCSRn_WR(x, n, HW_ENET_TCSRn_RD(x, n) & ~(v)))
  7025. #define HW_ENET_TCSRn_TOG(x, n, v) (HW_ENET_TCSRn_WR(x, n, HW_ENET_TCSRn_RD(x, n) ^ (v)))
  7026. #endif
  7027. //@}
  7028. /*
  7029. * Constants & macros for individual ENET_TCSRn bitfields
  7030. */
  7031. /*!
  7032. * @name Register ENET_TCSRn, field TDRE[0] (RW)
  7033. *
  7034. * Values:
  7035. * - 0 - DMA request is disabled
  7036. * - 1 - DMA request is enabled
  7037. */
  7038. //@{
  7039. #define BP_ENET_TCSRn_TDRE (0U) //!< Bit position for ENET_TCSRn_TDRE.
  7040. #define BM_ENET_TCSRn_TDRE (0x00000001U) //!< Bit mask for ENET_TCSRn_TDRE.
  7041. #define BS_ENET_TCSRn_TDRE (1U) //!< Bit field size in bits for ENET_TCSRn_TDRE.
  7042. #ifndef __LANGUAGE_ASM__
  7043. //! @brief Read current value of the ENET_TCSRn_TDRE field.
  7044. #define BR_ENET_TCSRn_TDRE(x, n) (BITBAND_ACCESS32(HW_ENET_TCSRn_ADDR(x, n), BP_ENET_TCSRn_TDRE))
  7045. #endif
  7046. //! @brief Format value for bitfield ENET_TCSRn_TDRE.
  7047. #define BF_ENET_TCSRn_TDRE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCSRn_TDRE), uint32_t) & BM_ENET_TCSRn_TDRE)
  7048. #ifndef __LANGUAGE_ASM__
  7049. //! @brief Set the TDRE field to a new value.
  7050. #define BW_ENET_TCSRn_TDRE(x, n, v) (BITBAND_ACCESS32(HW_ENET_TCSRn_ADDR(x, n), BP_ENET_TCSRn_TDRE) = (v))
  7051. #endif
  7052. //@}
  7053. /*!
  7054. * @name Register ENET_TCSRn, field TMODE[5:2] (RW)
  7055. *
  7056. * Updating the Timer Mode field takes a few cycles to register because it is
  7057. * synchronized to the 1588 clock. The version of Timer Mode returned on a read is
  7058. * from the 1588 clock domain. When changing Timer Mode, always disable the
  7059. * channel and read this register to verify the channel is disabled first.
  7060. *
  7061. * Values:
  7062. * - 0000 - Timer Channel is disabled.
  7063. * - 0001 - Timer Channel is configured for Input Capture on rising edge
  7064. * - 0010 - Timer Channel is configured for Input Capture on falling edge
  7065. * - 0011 - Timer Channel is configured for Input Capture on both edges
  7066. * - 0100 - Timer Channel is configured for Output Compare - software only
  7067. * - 0101 - Timer Channel is configured for Output Compare - toggle output on
  7068. * compare
  7069. * - 0110 - Timer Channel is configured for Output Compare - clear output on
  7070. * compare
  7071. * - 0111 - Timer Channel is configured for Output Compare - set output on
  7072. * compare
  7073. * - 1000 - Reserved
  7074. * - 1010 - Timer Channel is configured for Output Compare - clear output on
  7075. * compare, set output on overflow
  7076. * - 10x1 - Timer Channel is configured for Output Compare - set output on
  7077. * compare, clear output on overflow
  7078. * - 1100 - Reserved
  7079. * - 1110 - Timer Channel is configured for Output Compare - pulse output low on
  7080. * compare for one 1588 clock cycle
  7081. * - 1111 - Timer Channel is configured for Output Compare - pulse output high
  7082. * on compare for one 1588 clock cycle
  7083. */
  7084. //@{
  7085. #define BP_ENET_TCSRn_TMODE (2U) //!< Bit position for ENET_TCSRn_TMODE.
  7086. #define BM_ENET_TCSRn_TMODE (0x0000003CU) //!< Bit mask for ENET_TCSRn_TMODE.
  7087. #define BS_ENET_TCSRn_TMODE (4U) //!< Bit field size in bits for ENET_TCSRn_TMODE.
  7088. #ifndef __LANGUAGE_ASM__
  7089. //! @brief Read current value of the ENET_TCSRn_TMODE field.
  7090. #define BR_ENET_TCSRn_TMODE(x, n) (HW_ENET_TCSRn(x, n).B.TMODE)
  7091. #endif
  7092. //! @brief Format value for bitfield ENET_TCSRn_TMODE.
  7093. #define BF_ENET_TCSRn_TMODE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCSRn_TMODE), uint32_t) & BM_ENET_TCSRn_TMODE)
  7094. #ifndef __LANGUAGE_ASM__
  7095. //! @brief Set the TMODE field to a new value.
  7096. #define BW_ENET_TCSRn_TMODE(x, n, v) (HW_ENET_TCSRn_WR(x, n, (HW_ENET_TCSRn_RD(x, n) & ~BM_ENET_TCSRn_TMODE) | BF_ENET_TCSRn_TMODE(v)))
  7097. #endif
  7098. //@}
  7099. /*!
  7100. * @name Register ENET_TCSRn, field TIE[6] (RW)
  7101. *
  7102. * Values:
  7103. * - 0 - Interrupt is disabled
  7104. * - 1 - Interrupt is enabled
  7105. */
  7106. //@{
  7107. #define BP_ENET_TCSRn_TIE (6U) //!< Bit position for ENET_TCSRn_TIE.
  7108. #define BM_ENET_TCSRn_TIE (0x00000040U) //!< Bit mask for ENET_TCSRn_TIE.
  7109. #define BS_ENET_TCSRn_TIE (1U) //!< Bit field size in bits for ENET_TCSRn_TIE.
  7110. #ifndef __LANGUAGE_ASM__
  7111. //! @brief Read current value of the ENET_TCSRn_TIE field.
  7112. #define BR_ENET_TCSRn_TIE(x, n) (BITBAND_ACCESS32(HW_ENET_TCSRn_ADDR(x, n), BP_ENET_TCSRn_TIE))
  7113. #endif
  7114. //! @brief Format value for bitfield ENET_TCSRn_TIE.
  7115. #define BF_ENET_TCSRn_TIE(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCSRn_TIE), uint32_t) & BM_ENET_TCSRn_TIE)
  7116. #ifndef __LANGUAGE_ASM__
  7117. //! @brief Set the TIE field to a new value.
  7118. #define BW_ENET_TCSRn_TIE(x, n, v) (BITBAND_ACCESS32(HW_ENET_TCSRn_ADDR(x, n), BP_ENET_TCSRn_TIE) = (v))
  7119. #endif
  7120. //@}
  7121. /*!
  7122. * @name Register ENET_TCSRn, field TF[7] (W1C)
  7123. *
  7124. * Sets when input capture or output compare occurs. This flag is double
  7125. * buffered between the module clock and 1588 clock domains. When this field is 1, it
  7126. * can be cleared to 0 by writing 1 to it.
  7127. *
  7128. * Values:
  7129. * - 0 - Input Capture or Output Compare has not occurred
  7130. * - 1 - Input Capture or Output Compare has occurred
  7131. */
  7132. //@{
  7133. #define BP_ENET_TCSRn_TF (7U) //!< Bit position for ENET_TCSRn_TF.
  7134. #define BM_ENET_TCSRn_TF (0x00000080U) //!< Bit mask for ENET_TCSRn_TF.
  7135. #define BS_ENET_TCSRn_TF (1U) //!< Bit field size in bits for ENET_TCSRn_TF.
  7136. #ifndef __LANGUAGE_ASM__
  7137. //! @brief Read current value of the ENET_TCSRn_TF field.
  7138. #define BR_ENET_TCSRn_TF(x, n) (BITBAND_ACCESS32(HW_ENET_TCSRn_ADDR(x, n), BP_ENET_TCSRn_TF))
  7139. #endif
  7140. //! @brief Format value for bitfield ENET_TCSRn_TF.
  7141. #define BF_ENET_TCSRn_TF(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCSRn_TF), uint32_t) & BM_ENET_TCSRn_TF)
  7142. #ifndef __LANGUAGE_ASM__
  7143. //! @brief Set the TF field to a new value.
  7144. #define BW_ENET_TCSRn_TF(x, n, v) (BITBAND_ACCESS32(HW_ENET_TCSRn_ADDR(x, n), BP_ENET_TCSRn_TF) = (v))
  7145. #endif
  7146. //@}
  7147. //-------------------------------------------------------------------------------------------
  7148. // HW_ENET_TCCRn - Timer Compare Capture Register
  7149. //-------------------------------------------------------------------------------------------
  7150. #ifndef __LANGUAGE_ASM__
  7151. /*!
  7152. * @brief HW_ENET_TCCRn - Timer Compare Capture Register (RW)
  7153. *
  7154. * Reset value: 0x00000000U
  7155. */
  7156. typedef union _hw_enet_tccrn
  7157. {
  7158. uint32_t U;
  7159. struct _hw_enet_tccrn_bitfields
  7160. {
  7161. uint32_t TCC : 32; //!< [31:0] Timer Capture Compare
  7162. } B;
  7163. } hw_enet_tccrn_t;
  7164. #endif
  7165. /*!
  7166. * @name Constants and macros for entire ENET_TCCRn register
  7167. */
  7168. //@{
  7169. #define HW_ENET_TCCRn_COUNT (4U)
  7170. #define HW_ENET_TCCRn_ADDR(x, n) (REGS_ENET_BASE(x) + 0x60CU + (0x8U * n))
  7171. #ifndef __LANGUAGE_ASM__
  7172. #define HW_ENET_TCCRn(x, n) (*(__IO hw_enet_tccrn_t *) HW_ENET_TCCRn_ADDR(x, n))
  7173. #define HW_ENET_TCCRn_RD(x, n) (HW_ENET_TCCRn(x, n).U)
  7174. #define HW_ENET_TCCRn_WR(x, n, v) (HW_ENET_TCCRn(x, n).U = (v))
  7175. #define HW_ENET_TCCRn_SET(x, n, v) (HW_ENET_TCCRn_WR(x, n, HW_ENET_TCCRn_RD(x, n) | (v)))
  7176. #define HW_ENET_TCCRn_CLR(x, n, v) (HW_ENET_TCCRn_WR(x, n, HW_ENET_TCCRn_RD(x, n) & ~(v)))
  7177. #define HW_ENET_TCCRn_TOG(x, n, v) (HW_ENET_TCCRn_WR(x, n, HW_ENET_TCCRn_RD(x, n) ^ (v)))
  7178. #endif
  7179. //@}
  7180. /*
  7181. * Constants & macros for individual ENET_TCCRn bitfields
  7182. */
  7183. /*!
  7184. * @name Register ENET_TCCRn, field TCC[31:0] (RW)
  7185. *
  7186. * This register is double buffered between the module clock and 1588 clock
  7187. * domains. When configured for compare, the 1588 clock domain updates with the value
  7188. * in the module clock domain whenever the Timer Channel is first enabled and on
  7189. * each subsequent compare. Write to this register with the first compare value
  7190. * before enabling the Timer Channel. When the Timer Channel is enabled, write
  7191. * the second compare value either immediately, or at least before the first
  7192. * compare occurs. After each compare, write the next compare value before the previous
  7193. * compare occurs and before clearing the Timer Flag. The compare occurs one
  7194. * 1588 clock cycle after the IEEE 1588 Counter increments past the compare value in
  7195. * the 1588 clock domain. If the compare value is less than the value of the
  7196. * 1588 Counter when the Timer Channel is first enabled, then the compare does not
  7197. * occur until following the next overflow of the 1588 Counter. If the compare
  7198. * value is greater than the IEEE 1588 Counter when the 1588 Counter overflows, or
  7199. * the compare value is less than the value of the IEEE 1588 Counter after the
  7200. * overflow, then the compare occurs one 1588 clock cycle following the overflow.
  7201. * When configured for Capture, the value of the IEEE 1588 Counter is captured into
  7202. * the 1588 clock domain and then updated into the module clock domain, provided
  7203. * the Timer Flag is clear. Always read the capture value before clearing the
  7204. * Timer Flag.
  7205. */
  7206. //@{
  7207. #define BP_ENET_TCCRn_TCC (0U) //!< Bit position for ENET_TCCRn_TCC.
  7208. #define BM_ENET_TCCRn_TCC (0xFFFFFFFFU) //!< Bit mask for ENET_TCCRn_TCC.
  7209. #define BS_ENET_TCCRn_TCC (32U) //!< Bit field size in bits for ENET_TCCRn_TCC.
  7210. #ifndef __LANGUAGE_ASM__
  7211. //! @brief Read current value of the ENET_TCCRn_TCC field.
  7212. #define BR_ENET_TCCRn_TCC(x, n) (HW_ENET_TCCRn(x, n).U)
  7213. #endif
  7214. //! @brief Format value for bitfield ENET_TCCRn_TCC.
  7215. #define BF_ENET_TCCRn_TCC(v) (__REG_VALUE_TYPE((__REG_VALUE_TYPE((v), uint32_t) << BP_ENET_TCCRn_TCC), uint32_t) & BM_ENET_TCCRn_TCC)
  7216. #ifndef __LANGUAGE_ASM__
  7217. //! @brief Set the TCC field to a new value.
  7218. #define BW_ENET_TCCRn_TCC(x, n, v) (HW_ENET_TCCRn_WR(x, n, v))
  7219. #endif
  7220. //@}
  7221. //-------------------------------------------------------------------------------------------
  7222. // hw_enet_t - module struct
  7223. //-------------------------------------------------------------------------------------------
  7224. /*!
  7225. * @brief All ENET module registers.
  7226. */
  7227. #ifndef __LANGUAGE_ASM__
  7228. #pragma pack(1)
  7229. typedef struct _hw_enet
  7230. {
  7231. uint8_t _reserved0[4];
  7232. __IO hw_enet_eir_t EIR; //!< [0x4] Interrupt Event Register
  7233. __IO hw_enet_eimr_t EIMR; //!< [0x8] Interrupt Mask Register
  7234. uint8_t _reserved1[4];
  7235. __IO hw_enet_rdar_t RDAR; //!< [0x10] Receive Descriptor Active Register
  7236. __IO hw_enet_tdar_t TDAR; //!< [0x14] Transmit Descriptor Active Register
  7237. uint8_t _reserved2[12];
  7238. __IO hw_enet_ecr_t ECR; //!< [0x24] Ethernet Control Register
  7239. uint8_t _reserved3[24];
  7240. __IO hw_enet_mmfr_t MMFR; //!< [0x40] MII Management Frame Register
  7241. __IO hw_enet_mscr_t MSCR; //!< [0x44] MII Speed Control Register
  7242. uint8_t _reserved4[28];
  7243. __IO hw_enet_mibc_t MIBC; //!< [0x64] MIB Control Register
  7244. uint8_t _reserved5[28];
  7245. __IO hw_enet_rcr_t RCR; //!< [0x84] Receive Control Register
  7246. uint8_t _reserved6[60];
  7247. __IO hw_enet_tcr_t TCR; //!< [0xC4] Transmit Control Register
  7248. uint8_t _reserved7[28];
  7249. __IO hw_enet_palr_t PALR; //!< [0xE4] Physical Address Lower Register
  7250. __IO hw_enet_paur_t PAUR; //!< [0xE8] Physical Address Upper Register
  7251. __IO hw_enet_opd_t OPD; //!< [0xEC] Opcode/Pause Duration Register
  7252. uint8_t _reserved8[40];
  7253. __IO hw_enet_iaur_t IAUR; //!< [0x118] Descriptor Individual Upper Address Register
  7254. __IO hw_enet_ialr_t IALR; //!< [0x11C] Descriptor Individual Lower Address Register
  7255. __IO hw_enet_gaur_t GAUR; //!< [0x120] Descriptor Group Upper Address Register
  7256. __IO hw_enet_galr_t GALR; //!< [0x124] Descriptor Group Lower Address Register
  7257. uint8_t _reserved9[28];
  7258. __IO hw_enet_tfwr_t TFWR; //!< [0x144] Transmit FIFO Watermark Register
  7259. uint8_t _reserved10[56];
  7260. __IO hw_enet_rdsr_t RDSR; //!< [0x180] Receive Descriptor Ring Start Register
  7261. __IO hw_enet_tdsr_t TDSR; //!< [0x184] Transmit Buffer Descriptor Ring Start Register
  7262. __IO hw_enet_mrbr_t MRBR; //!< [0x188] Maximum Receive Buffer Size Register
  7263. uint8_t _reserved11[4];
  7264. __IO hw_enet_rsfl_t RSFL; //!< [0x190] Receive FIFO Section Full Threshold
  7265. __IO hw_enet_rsem_t RSEM; //!< [0x194] Receive FIFO Section Empty Threshold
  7266. __IO hw_enet_raem_t RAEM; //!< [0x198] Receive FIFO Almost Empty Threshold
  7267. __IO hw_enet_rafl_t RAFL; //!< [0x19C] Receive FIFO Almost Full Threshold
  7268. __IO hw_enet_tsem_t TSEM; //!< [0x1A0] Transmit FIFO Section Empty Threshold
  7269. __IO hw_enet_taem_t TAEM; //!< [0x1A4] Transmit FIFO Almost Empty Threshold
  7270. __IO hw_enet_tafl_t TAFL; //!< [0x1A8] Transmit FIFO Almost Full Threshold
  7271. __IO hw_enet_tipg_t TIPG; //!< [0x1AC] Transmit Inter-Packet Gap
  7272. __IO hw_enet_ftrl_t FTRL; //!< [0x1B0] Frame Truncation Length
  7273. uint8_t _reserved12[12];
  7274. __IO hw_enet_tacc_t TACC; //!< [0x1C0] Transmit Accelerator Function Configuration
  7275. __IO hw_enet_racc_t RACC; //!< [0x1C4] Receive Accelerator Function Configuration
  7276. uint8_t _reserved13[60];
  7277. __I hw_enet_rmon_t_packets_t RMON_T_PACKETS; //!< [0x204] Tx Packet Count Statistic Register
  7278. __I hw_enet_rmon_t_bc_pkt_t RMON_T_BC_PKT; //!< [0x208] Tx Broadcast Packets Statistic Register
  7279. __I hw_enet_rmon_t_mc_pkt_t RMON_T_MC_PKT; //!< [0x20C] Tx Multicast Packets Statistic Register
  7280. __I hw_enet_rmon_t_crc_align_t RMON_T_CRC_ALIGN; //!< [0x210] Tx Packets with CRC/Align Error Statistic Register
  7281. __I hw_enet_rmon_t_undersize_t RMON_T_UNDERSIZE; //!< [0x214] Tx Packets Less Than Bytes and Good CRC Statistic Register
  7282. __I hw_enet_rmon_t_oversize_t RMON_T_OVERSIZE; //!< [0x218] Tx Packets GT MAX_FL bytes and Good CRC Statistic Register
  7283. __I hw_enet_rmon_t_frag_t RMON_T_FRAG; //!< [0x21C] Tx Packets Less Than 64 Bytes and Bad CRC Statistic Register
  7284. __I hw_enet_rmon_t_jab_t RMON_T_JAB; //!< [0x220] Tx Packets Greater Than MAX_FL bytes and Bad CRC Statistic Register
  7285. __I hw_enet_rmon_t_col_t RMON_T_COL; //!< [0x224] Tx Collision Count Statistic Register
  7286. __I hw_enet_rmon_t_p64_t RMON_T_P64; //!< [0x228] Tx 64-Byte Packets Statistic Register
  7287. __I hw_enet_rmon_t_p65to127_t RMON_T_P65TO127; //!< [0x22C] Tx 65- to 127-byte Packets Statistic Register
  7288. __I hw_enet_rmon_t_p128to255_t RMON_T_P128TO255; //!< [0x230] Tx 128- to 255-byte Packets Statistic Register
  7289. __I hw_enet_rmon_t_p256to511_t RMON_T_P256TO511; //!< [0x234] Tx 256- to 511-byte Packets Statistic Register
  7290. __I hw_enet_rmon_t_p512to1023_t RMON_T_P512TO1023; //!< [0x238] Tx 512- to 1023-byte Packets Statistic Register
  7291. __I hw_enet_rmon_t_p1024to2047_t RMON_T_P1024TO2047; //!< [0x23C] Tx 1024- to 2047-byte Packets Statistic Register
  7292. __I hw_enet_rmon_t_p_gte2048_t RMON_T_P_GTE2048; //!< [0x240] Tx Packets Greater Than 2048 Bytes Statistic Register
  7293. __I hw_enet_rmon_t_octets_t RMON_T_OCTETS; //!< [0x244] Tx Octets Statistic Register
  7294. uint8_t _reserved14[4];
  7295. __I hw_enet_ieee_t_frame_ok_t IEEE_T_FRAME_OK; //!< [0x24C] Frames Transmitted OK Statistic Register
  7296. __I hw_enet_ieee_t_1col_t IEEE_T_1COL; //!< [0x250] Frames Transmitted with Single Collision Statistic Register
  7297. __I hw_enet_ieee_t_mcol_t IEEE_T_MCOL; //!< [0x254] Frames Transmitted with Multiple Collisions Statistic Register
  7298. __I hw_enet_ieee_t_def_t IEEE_T_DEF; //!< [0x258] Frames Transmitted after Deferral Delay Statistic Register
  7299. __I hw_enet_ieee_t_lcol_t IEEE_T_LCOL; //!< [0x25C] Frames Transmitted with Late Collision Statistic Register
  7300. __I hw_enet_ieee_t_excol_t IEEE_T_EXCOL; //!< [0x260] Frames Transmitted with Excessive Collisions Statistic Register
  7301. __I hw_enet_ieee_t_macerr_t IEEE_T_MACERR; //!< [0x264] Frames Transmitted with Tx FIFO Underrun Statistic Register
  7302. __I hw_enet_ieee_t_cserr_t IEEE_T_CSERR; //!< [0x268] Frames Transmitted with Carrier Sense Error Statistic Register
  7303. uint8_t _reserved15[4];
  7304. __I hw_enet_ieee_t_fdxfc_t IEEE_T_FDXFC; //!< [0x270] Flow Control Pause Frames Transmitted Statistic Register
  7305. __I hw_enet_ieee_t_octets_ok_t IEEE_T_OCTETS_OK; //!< [0x274] Octet Count for Frames Transmitted w/o Error Statistic Register
  7306. uint8_t _reserved16[12];
  7307. __I hw_enet_rmon_r_packets_t RMON_R_PACKETS; //!< [0x284] Rx Packet Count Statistic Register
  7308. __I hw_enet_rmon_r_bc_pkt_t RMON_R_BC_PKT; //!< [0x288] Rx Broadcast Packets Statistic Register
  7309. __I hw_enet_rmon_r_mc_pkt_t RMON_R_MC_PKT; //!< [0x28C] Rx Multicast Packets Statistic Register
  7310. __I hw_enet_rmon_r_crc_align_t RMON_R_CRC_ALIGN; //!< [0x290] Rx Packets with CRC/Align Error Statistic Register
  7311. __I hw_enet_rmon_r_undersize_t RMON_R_UNDERSIZE; //!< [0x294] Rx Packets with Less Than 64 Bytes and Good CRC Statistic Register
  7312. __I hw_enet_rmon_r_oversize_t RMON_R_OVERSIZE; //!< [0x298] Rx Packets Greater Than MAX_FL and Good CRC Statistic Register
  7313. __I hw_enet_rmon_r_frag_t RMON_R_FRAG; //!< [0x29C] Rx Packets Less Than 64 Bytes and Bad CRC Statistic Register
  7314. __I hw_enet_rmon_r_jab_t RMON_R_JAB; //!< [0x2A0] Rx Packets Greater Than MAX_FL Bytes and Bad CRC Statistic Register
  7315. uint8_t _reserved17[4];
  7316. __I hw_enet_rmon_r_p64_t RMON_R_P64; //!< [0x2A8] Rx 64-Byte Packets Statistic Register
  7317. __I hw_enet_rmon_r_p65to127_t RMON_R_P65TO127; //!< [0x2AC] Rx 65- to 127-Byte Packets Statistic Register
  7318. __I hw_enet_rmon_r_p128to255_t RMON_R_P128TO255; //!< [0x2B0] Rx 128- to 255-Byte Packets Statistic Register
  7319. __I hw_enet_rmon_r_p256to511_t RMON_R_P256TO511; //!< [0x2B4] Rx 256- to 511-Byte Packets Statistic Register
  7320. __I hw_enet_rmon_r_p512to1023_t RMON_R_P512TO1023; //!< [0x2B8] Rx 512- to 1023-Byte Packets Statistic Register
  7321. __I hw_enet_rmon_r_p1024to2047_t RMON_R_P1024TO2047; //!< [0x2BC] Rx 1024- to 2047-Byte Packets Statistic Register
  7322. __I hw_enet_rmon_r_gte2048_t RMON_R_GTE2048; //!< [0x2C0] Rx Packets Greater than 2048 Bytes Statistic Register
  7323. __I hw_enet_rmon_r_octets_t RMON_R_OCTETS; //!< [0x2C4] Rx Octets Statistic Register
  7324. __I hw_enet_ieee_r_drop_t IEEE_R_DROP; //!< [0x2C8] Frames not Counted Correctly Statistic Register
  7325. __I hw_enet_ieee_r_frame_ok_t IEEE_R_FRAME_OK; //!< [0x2CC] Frames Received OK Statistic Register
  7326. __I hw_enet_ieee_r_crc_t IEEE_R_CRC; //!< [0x2D0] Frames Received with CRC Error Statistic Register
  7327. __I hw_enet_ieee_r_align_t IEEE_R_ALIGN; //!< [0x2D4] Frames Received with Alignment Error Statistic Register
  7328. __I hw_enet_ieee_r_macerr_t IEEE_R_MACERR; //!< [0x2D8] Receive FIFO Overflow Count Statistic Register
  7329. __I hw_enet_ieee_r_fdxfc_t IEEE_R_FDXFC; //!< [0x2DC] Flow Control Pause Frames Received Statistic Register
  7330. __I hw_enet_ieee_r_octets_ok_t IEEE_R_OCTETS_OK; //!< [0x2E0] Octet Count for Frames Received without Error Statistic Register
  7331. uint8_t _reserved18[284];
  7332. __IO hw_enet_atcr_t ATCR; //!< [0x400] Adjustable Timer Control Register
  7333. __IO hw_enet_atvr_t ATVR; //!< [0x404] Timer Value Register
  7334. __IO hw_enet_atoff_t ATOFF; //!< [0x408] Timer Offset Register
  7335. __IO hw_enet_atper_t ATPER; //!< [0x40C] Timer Period Register
  7336. __IO hw_enet_atcor_t ATCOR; //!< [0x410] Timer Correction Register
  7337. __IO hw_enet_atinc_t ATINC; //!< [0x414] Time-Stamping Clock Period Register
  7338. __I hw_enet_atstmp_t ATSTMP; //!< [0x418] Timestamp of Last Transmitted Frame
  7339. uint8_t _reserved19[488];
  7340. __IO hw_enet_tgsr_t TGSR; //!< [0x604] Timer Global Status Register
  7341. struct {
  7342. __IO hw_enet_tcsrn_t TCSRn; //!< [0x608] Timer Control Status Register
  7343. __IO hw_enet_tccrn_t TCCRn; //!< [0x60C] Timer Compare Capture Register
  7344. } CHANNEL[4];
  7345. } hw_enet_t;
  7346. #pragma pack()
  7347. //! @brief Macro to access all ENET registers.
  7348. //! @param x ENET instance number.
  7349. //! @return Reference (not a pointer) to the registers struct. To get a pointer to the struct,
  7350. //! use the '&' operator, like <code>&HW_ENET(0)</code>.
  7351. #define HW_ENET(x) (*(hw_enet_t *) REGS_ENET_BASE(x))
  7352. #endif
  7353. #endif // __HW_ENET_REGISTERS_H__
  7354. // v22/130726/0.9
  7355. // EOF