stm32f411xe.h 702 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681
  1. /**
  2. ******************************************************************************
  3. * @file stm32f411xe.h
  4. * @author MCD Application Team
  5. * @version V2.6.1
  6. * @date 14-February-2017
  7. * @brief CMSIS STM32F411xE Device Peripheral Access Layer Header File.
  8. *
  9. * This file contains:
  10. * - Data structures and the address mapping for all peripherals
  11. * - peripherals registers declarations and bits definition
  12. * - Macros to access peripheral’s registers hardware
  13. *
  14. ******************************************************************************
  15. * @attention
  16. *
  17. * <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
  18. *
  19. * Redistribution and use in source and binary forms, with or without modification,
  20. * are permitted provided that the following conditions are met:
  21. * 1. Redistributions of source code must retain the above copyright notice,
  22. * this list of conditions and the following disclaimer.
  23. * 2. Redistributions in binary form must reproduce the above copyright notice,
  24. * this list of conditions and the following disclaimer in the documentation
  25. * and/or other materials provided with the distribution.
  26. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  27. * may be used to endorse or promote products derived from this software
  28. * without specific prior written permission.
  29. *
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  31. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  32. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  33. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  34. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  36. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  37. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  38. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  39. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  40. *
  41. ******************************************************************************
  42. */
  43. /** @addtogroup CMSIS_Device
  44. * @{
  45. */
  46. /** @addtogroup stm32f411xe
  47. * @{
  48. */
  49. #ifndef __STM32F411xE_H
  50. #define __STM32F411xE_H
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif /* __cplusplus */
  54. /** @addtogroup Configuration_section_for_CMSIS
  55. * @{
  56. */
  57. /**
  58. * @brief Configuration of the Cortex-M4 Processor and Core Peripherals
  59. */
  60. #define __CM4_REV 0x0001U /*!< Core revision r0p1 */
  61. #define __MPU_PRESENT 1U /*!< STM32F4XX provides an MPU */
  62. #define __NVIC_PRIO_BITS 4U /*!< STM32F4XX uses 4 Bits for the Priority Levels */
  63. #define __Vendor_SysTickConfig 0U /*!< Set to 1 if different SysTick Config is used */
  64. #define __FPU_PRESENT 1U /*!< FPU present */
  65. /**
  66. * @}
  67. */
  68. /** @addtogroup Peripheral_interrupt_number_definition
  69. * @{
  70. */
  71. /**
  72. * @brief STM32F4XX Interrupt Number Definition, according to the selected device
  73. * in @ref Library_configuration_section
  74. */
  75. typedef enum
  76. {
  77. /****** Cortex-M4 Processor Exceptions Numbers ****************************************************************/
  78. NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
  79. MemoryManagement_IRQn = -12, /*!< 4 Cortex-M4 Memory Management Interrupt */
  80. BusFault_IRQn = -11, /*!< 5 Cortex-M4 Bus Fault Interrupt */
  81. UsageFault_IRQn = -10, /*!< 6 Cortex-M4 Usage Fault Interrupt */
  82. SVCall_IRQn = -5, /*!< 11 Cortex-M4 SV Call Interrupt */
  83. DebugMonitor_IRQn = -4, /*!< 12 Cortex-M4 Debug Monitor Interrupt */
  84. PendSV_IRQn = -2, /*!< 14 Cortex-M4 Pend SV Interrupt */
  85. SysTick_IRQn = -1, /*!< 15 Cortex-M4 System Tick Interrupt */
  86. /****** STM32 specific Interrupt Numbers **********************************************************************/
  87. WWDG_IRQn = 0, /*!< Window WatchDog Interrupt */
  88. PVD_IRQn = 1, /*!< PVD through EXTI Line detection Interrupt */
  89. TAMP_STAMP_IRQn = 2, /*!< Tamper and TimeStamp interrupts through the EXTI line */
  90. RTC_WKUP_IRQn = 3, /*!< RTC Wakeup interrupt through the EXTI line */
  91. FLASH_IRQn = 4, /*!< FLASH global Interrupt */
  92. RCC_IRQn = 5, /*!< RCC global Interrupt */
  93. EXTI0_IRQn = 6, /*!< EXTI Line0 Interrupt */
  94. EXTI1_IRQn = 7, /*!< EXTI Line1 Interrupt */
  95. EXTI2_IRQn = 8, /*!< EXTI Line2 Interrupt */
  96. EXTI3_IRQn = 9, /*!< EXTI Line3 Interrupt */
  97. EXTI4_IRQn = 10, /*!< EXTI Line4 Interrupt */
  98. DMA1_Stream0_IRQn = 11, /*!< DMA1 Stream 0 global Interrupt */
  99. DMA1_Stream1_IRQn = 12, /*!< DMA1 Stream 1 global Interrupt */
  100. DMA1_Stream2_IRQn = 13, /*!< DMA1 Stream 2 global Interrupt */
  101. DMA1_Stream3_IRQn = 14, /*!< DMA1 Stream 3 global Interrupt */
  102. DMA1_Stream4_IRQn = 15, /*!< DMA1 Stream 4 global Interrupt */
  103. DMA1_Stream5_IRQn = 16, /*!< DMA1 Stream 5 global Interrupt */
  104. DMA1_Stream6_IRQn = 17, /*!< DMA1 Stream 6 global Interrupt */
  105. ADC_IRQn = 18, /*!< ADC1, ADC2 and ADC3 global Interrupts */
  106. EXTI9_5_IRQn = 23, /*!< External Line[9:5] Interrupts */
  107. TIM1_BRK_TIM9_IRQn = 24, /*!< TIM1 Break interrupt and TIM9 global interrupt */
  108. TIM1_UP_TIM10_IRQn = 25, /*!< TIM1 Update Interrupt and TIM10 global interrupt */
  109. TIM1_TRG_COM_TIM11_IRQn = 26, /*!< TIM1 Trigger and Commutation Interrupt and TIM11 global interrupt */
  110. TIM1_CC_IRQn = 27, /*!< TIM1 Capture Compare Interrupt */
  111. TIM2_IRQn = 28, /*!< TIM2 global Interrupt */
  112. TIM3_IRQn = 29, /*!< TIM3 global Interrupt */
  113. TIM4_IRQn = 30, /*!< TIM4 global Interrupt */
  114. I2C1_EV_IRQn = 31, /*!< I2C1 Event Interrupt */
  115. I2C1_ER_IRQn = 32, /*!< I2C1 Error Interrupt */
  116. I2C2_EV_IRQn = 33, /*!< I2C2 Event Interrupt */
  117. I2C2_ER_IRQn = 34, /*!< I2C2 Error Interrupt */
  118. SPI1_IRQn = 35, /*!< SPI1 global Interrupt */
  119. SPI2_IRQn = 36, /*!< SPI2 global Interrupt */
  120. USART1_IRQn = 37, /*!< USART1 global Interrupt */
  121. USART2_IRQn = 38, /*!< USART2 global Interrupt */
  122. EXTI15_10_IRQn = 40, /*!< External Line[15:10] Interrupts */
  123. RTC_Alarm_IRQn = 41, /*!< RTC Alarm (A and B) through EXTI Line Interrupt */
  124. OTG_FS_WKUP_IRQn = 42, /*!< USB OTG FS Wakeup through EXTI line interrupt */
  125. DMA1_Stream7_IRQn = 47, /*!< DMA1 Stream7 Interrupt */
  126. SDIO_IRQn = 49, /*!< SDIO global Interrupt */
  127. TIM5_IRQn = 50, /*!< TIM5 global Interrupt */
  128. SPI3_IRQn = 51, /*!< SPI3 global Interrupt */
  129. DMA2_Stream0_IRQn = 56, /*!< DMA2 Stream 0 global Interrupt */
  130. DMA2_Stream1_IRQn = 57, /*!< DMA2 Stream 1 global Interrupt */
  131. DMA2_Stream2_IRQn = 58, /*!< DMA2 Stream 2 global Interrupt */
  132. DMA2_Stream3_IRQn = 59, /*!< DMA2 Stream 3 global Interrupt */
  133. DMA2_Stream4_IRQn = 60, /*!< DMA2 Stream 4 global Interrupt */
  134. OTG_FS_IRQn = 67, /*!< USB OTG FS global Interrupt */
  135. DMA2_Stream5_IRQn = 68, /*!< DMA2 Stream 5 global interrupt */
  136. DMA2_Stream6_IRQn = 69, /*!< DMA2 Stream 6 global interrupt */
  137. DMA2_Stream7_IRQn = 70, /*!< DMA2 Stream 7 global interrupt */
  138. USART6_IRQn = 71, /*!< USART6 global interrupt */
  139. I2C3_EV_IRQn = 72, /*!< I2C3 event interrupt */
  140. I2C3_ER_IRQn = 73, /*!< I2C3 error interrupt */
  141. FPU_IRQn = 81, /*!< FPU global interrupt */
  142. SPI4_IRQn = 84, /*!< SPI4 global Interrupt */
  143. SPI5_IRQn = 85 /*!< SPI5 global Interrupt */
  144. } IRQn_Type;
  145. /**
  146. * @}
  147. */
  148. #include "core_cm4.h" /* Cortex-M4 processor and core peripherals */
  149. #include "system_stm32f4xx.h"
  150. #include <stdint.h>
  151. /** @addtogroup Peripheral_registers_structures
  152. * @{
  153. */
  154. /**
  155. * @brief Analog to Digital Converter
  156. */
  157. typedef struct
  158. {
  159. __IO uint32_t SR; /*!< ADC status register, Address offset: 0x00 */
  160. __IO uint32_t CR1; /*!< ADC control register 1, Address offset: 0x04 */
  161. __IO uint32_t CR2; /*!< ADC control register 2, Address offset: 0x08 */
  162. __IO uint32_t SMPR1; /*!< ADC sample time register 1, Address offset: 0x0C */
  163. __IO uint32_t SMPR2; /*!< ADC sample time register 2, Address offset: 0x10 */
  164. __IO uint32_t JOFR1; /*!< ADC injected channel data offset register 1, Address offset: 0x14 */
  165. __IO uint32_t JOFR2; /*!< ADC injected channel data offset register 2, Address offset: 0x18 */
  166. __IO uint32_t JOFR3; /*!< ADC injected channel data offset register 3, Address offset: 0x1C */
  167. __IO uint32_t JOFR4; /*!< ADC injected channel data offset register 4, Address offset: 0x20 */
  168. __IO uint32_t HTR; /*!< ADC watchdog higher threshold register, Address offset: 0x24 */
  169. __IO uint32_t LTR; /*!< ADC watchdog lower threshold register, Address offset: 0x28 */
  170. __IO uint32_t SQR1; /*!< ADC regular sequence register 1, Address offset: 0x2C */
  171. __IO uint32_t SQR2; /*!< ADC regular sequence register 2, Address offset: 0x30 */
  172. __IO uint32_t SQR3; /*!< ADC regular sequence register 3, Address offset: 0x34 */
  173. __IO uint32_t JSQR; /*!< ADC injected sequence register, Address offset: 0x38*/
  174. __IO uint32_t JDR1; /*!< ADC injected data register 1, Address offset: 0x3C */
  175. __IO uint32_t JDR2; /*!< ADC injected data register 2, Address offset: 0x40 */
  176. __IO uint32_t JDR3; /*!< ADC injected data register 3, Address offset: 0x44 */
  177. __IO uint32_t JDR4; /*!< ADC injected data register 4, Address offset: 0x48 */
  178. __IO uint32_t DR; /*!< ADC regular data register, Address offset: 0x4C */
  179. } ADC_TypeDef;
  180. typedef struct
  181. {
  182. __IO uint32_t CSR; /*!< ADC Common status register, Address offset: ADC1 base address + 0x300 */
  183. __IO uint32_t CCR; /*!< ADC common control register, Address offset: ADC1 base address + 0x304 */
  184. __IO uint32_t CDR; /*!< ADC common regular data register for dual
  185. AND triple modes, Address offset: ADC1 base address + 0x308 */
  186. } ADC_Common_TypeDef;
  187. /**
  188. * @brief CRC calculation unit
  189. */
  190. typedef struct
  191. {
  192. __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */
  193. __IO uint8_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */
  194. uint8_t RESERVED0; /*!< Reserved, 0x05 */
  195. uint16_t RESERVED1; /*!< Reserved, 0x06 */
  196. __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */
  197. } CRC_TypeDef;
  198. /**
  199. * @brief Debug MCU
  200. */
  201. typedef struct
  202. {
  203. __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */
  204. __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */
  205. __IO uint32_t APB1FZ; /*!< Debug MCU APB1 freeze register, Address offset: 0x08 */
  206. __IO uint32_t APB2FZ; /*!< Debug MCU APB2 freeze register, Address offset: 0x0C */
  207. }DBGMCU_TypeDef;
  208. /**
  209. * @brief DMA Controller
  210. */
  211. typedef struct
  212. {
  213. __IO uint32_t CR; /*!< DMA stream x configuration register */
  214. __IO uint32_t NDTR; /*!< DMA stream x number of data register */
  215. __IO uint32_t PAR; /*!< DMA stream x peripheral address register */
  216. __IO uint32_t M0AR; /*!< DMA stream x memory 0 address register */
  217. __IO uint32_t M1AR; /*!< DMA stream x memory 1 address register */
  218. __IO uint32_t FCR; /*!< DMA stream x FIFO control register */
  219. } DMA_Stream_TypeDef;
  220. typedef struct
  221. {
  222. __IO uint32_t LISR; /*!< DMA low interrupt status register, Address offset: 0x00 */
  223. __IO uint32_t HISR; /*!< DMA high interrupt status register, Address offset: 0x04 */
  224. __IO uint32_t LIFCR; /*!< DMA low interrupt flag clear register, Address offset: 0x08 */
  225. __IO uint32_t HIFCR; /*!< DMA high interrupt flag clear register, Address offset: 0x0C */
  226. } DMA_TypeDef;
  227. /**
  228. * @brief External Interrupt/Event Controller
  229. */
  230. typedef struct
  231. {
  232. __IO uint32_t IMR; /*!< EXTI Interrupt mask register, Address offset: 0x00 */
  233. __IO uint32_t EMR; /*!< EXTI Event mask register, Address offset: 0x04 */
  234. __IO uint32_t RTSR; /*!< EXTI Rising trigger selection register, Address offset: 0x08 */
  235. __IO uint32_t FTSR; /*!< EXTI Falling trigger selection register, Address offset: 0x0C */
  236. __IO uint32_t SWIER; /*!< EXTI Software interrupt event register, Address offset: 0x10 */
  237. __IO uint32_t PR; /*!< EXTI Pending register, Address offset: 0x14 */
  238. } EXTI_TypeDef;
  239. /**
  240. * @brief FLASH Registers
  241. */
  242. typedef struct
  243. {
  244. __IO uint32_t ACR; /*!< FLASH access control register, Address offset: 0x00 */
  245. __IO uint32_t KEYR; /*!< FLASH key register, Address offset: 0x04 */
  246. __IO uint32_t OPTKEYR; /*!< FLASH option key register, Address offset: 0x08 */
  247. __IO uint32_t SR; /*!< FLASH status register, Address offset: 0x0C */
  248. __IO uint32_t CR; /*!< FLASH control register, Address offset: 0x10 */
  249. __IO uint32_t OPTCR; /*!< FLASH option control register , Address offset: 0x14 */
  250. __IO uint32_t OPTCR1; /*!< FLASH option control register 1, Address offset: 0x18 */
  251. } FLASH_TypeDef;
  252. /**
  253. * @brief General Purpose I/O
  254. */
  255. typedef struct
  256. {
  257. __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */
  258. __IO uint32_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */
  259. __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */
  260. __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */
  261. __IO uint32_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */
  262. __IO uint32_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */
  263. __IO uint32_t BSRR; /*!< GPIO port bit set/reset register, Address offset: 0x18 */
  264. __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */
  265. __IO uint32_t AFR[2]; /*!< GPIO alternate function registers, Address offset: 0x20-0x24 */
  266. } GPIO_TypeDef;
  267. /**
  268. * @brief System configuration controller
  269. */
  270. typedef struct
  271. {
  272. __IO uint32_t MEMRMP; /*!< SYSCFG memory remap register, Address offset: 0x00 */
  273. __IO uint32_t PMC; /*!< SYSCFG peripheral mode configuration register, Address offset: 0x04 */
  274. __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration registers, Address offset: 0x08-0x14 */
  275. uint32_t RESERVED[2]; /*!< Reserved, 0x18-0x1C */
  276. __IO uint32_t CMPCR; /*!< SYSCFG Compensation cell control register, Address offset: 0x20 */
  277. } SYSCFG_TypeDef;
  278. /**
  279. * @brief Inter-integrated Circuit Interface
  280. */
  281. typedef struct
  282. {
  283. __IO uint32_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */
  284. __IO uint32_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */
  285. __IO uint32_t OAR1; /*!< I2C Own address register 1, Address offset: 0x08 */
  286. __IO uint32_t OAR2; /*!< I2C Own address register 2, Address offset: 0x0C */
  287. __IO uint32_t DR; /*!< I2C Data register, Address offset: 0x10 */
  288. __IO uint32_t SR1; /*!< I2C Status register 1, Address offset: 0x14 */
  289. __IO uint32_t SR2; /*!< I2C Status register 2, Address offset: 0x18 */
  290. __IO uint32_t CCR; /*!< I2C Clock control register, Address offset: 0x1C */
  291. __IO uint32_t TRISE; /*!< I2C TRISE register, Address offset: 0x20 */
  292. __IO uint32_t FLTR; /*!< I2C FLTR register, Address offset: 0x24 */
  293. } I2C_TypeDef;
  294. /**
  295. * @brief Independent WATCHDOG
  296. */
  297. typedef struct
  298. {
  299. __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */
  300. __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */
  301. __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */
  302. __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */
  303. } IWDG_TypeDef;
  304. /**
  305. * @brief Power Control
  306. */
  307. typedef struct
  308. {
  309. __IO uint32_t CR; /*!< PWR power control register, Address offset: 0x00 */
  310. __IO uint32_t CSR; /*!< PWR power control/status register, Address offset: 0x04 */
  311. } PWR_TypeDef;
  312. /**
  313. * @brief Reset and Clock Control
  314. */
  315. typedef struct
  316. {
  317. __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */
  318. __IO uint32_t PLLCFGR; /*!< RCC PLL configuration register, Address offset: 0x04 */
  319. __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x08 */
  320. __IO uint32_t CIR; /*!< RCC clock interrupt register, Address offset: 0x0C */
  321. __IO uint32_t AHB1RSTR; /*!< RCC AHB1 peripheral reset register, Address offset: 0x10 */
  322. __IO uint32_t AHB2RSTR; /*!< RCC AHB2 peripheral reset register, Address offset: 0x14 */
  323. __IO uint32_t AHB3RSTR; /*!< RCC AHB3 peripheral reset register, Address offset: 0x18 */
  324. uint32_t RESERVED0; /*!< Reserved, 0x1C */
  325. __IO uint32_t APB1RSTR; /*!< RCC APB1 peripheral reset register, Address offset: 0x20 */
  326. __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x24 */
  327. uint32_t RESERVED1[2]; /*!< Reserved, 0x28-0x2C */
  328. __IO uint32_t AHB1ENR; /*!< RCC AHB1 peripheral clock register, Address offset: 0x30 */
  329. __IO uint32_t AHB2ENR; /*!< RCC AHB2 peripheral clock register, Address offset: 0x34 */
  330. __IO uint32_t AHB3ENR; /*!< RCC AHB3 peripheral clock register, Address offset: 0x38 */
  331. uint32_t RESERVED2; /*!< Reserved, 0x3C */
  332. __IO uint32_t APB1ENR; /*!< RCC APB1 peripheral clock enable register, Address offset: 0x40 */
  333. __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock enable register, Address offset: 0x44 */
  334. uint32_t RESERVED3[2]; /*!< Reserved, 0x48-0x4C */
  335. __IO uint32_t AHB1LPENR; /*!< RCC AHB1 peripheral clock enable in low power mode register, Address offset: 0x50 */
  336. __IO uint32_t AHB2LPENR; /*!< RCC AHB2 peripheral clock enable in low power mode register, Address offset: 0x54 */
  337. __IO uint32_t AHB3LPENR; /*!< RCC AHB3 peripheral clock enable in low power mode register, Address offset: 0x58 */
  338. uint32_t RESERVED4; /*!< Reserved, 0x5C */
  339. __IO uint32_t APB1LPENR; /*!< RCC APB1 peripheral clock enable in low power mode register, Address offset: 0x60 */
  340. __IO uint32_t APB2LPENR; /*!< RCC APB2 peripheral clock enable in low power mode register, Address offset: 0x64 */
  341. uint32_t RESERVED5[2]; /*!< Reserved, 0x68-0x6C */
  342. __IO uint32_t BDCR; /*!< RCC Backup domain control register, Address offset: 0x70 */
  343. __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x74 */
  344. uint32_t RESERVED6[2]; /*!< Reserved, 0x78-0x7C */
  345. __IO uint32_t SSCGR; /*!< RCC spread spectrum clock generation register, Address offset: 0x80 */
  346. __IO uint32_t PLLI2SCFGR; /*!< RCC PLLI2S configuration register, Address offset: 0x84 */
  347. uint32_t RESERVED7[1]; /*!< Reserved, 0x88 */
  348. __IO uint32_t DCKCFGR; /*!< RCC Dedicated Clocks configuration register, Address offset: 0x8C */
  349. } RCC_TypeDef;
  350. /**
  351. * @brief Real-Time Clock
  352. */
  353. typedef struct
  354. {
  355. __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */
  356. __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */
  357. __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */
  358. __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */
  359. __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */
  360. __IO uint32_t WUTR; /*!< RTC wakeup timer register, Address offset: 0x14 */
  361. __IO uint32_t CALIBR; /*!< RTC calibration register, Address offset: 0x18 */
  362. __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */
  363. __IO uint32_t ALRMBR; /*!< RTC alarm B register, Address offset: 0x20 */
  364. __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */
  365. __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */
  366. __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */
  367. __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */
  368. __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */
  369. __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */
  370. __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */
  371. __IO uint32_t TAFCR; /*!< RTC tamper and alternate function configuration register, Address offset: 0x40 */
  372. __IO uint32_t ALRMASSR;/*!< RTC alarm A sub second register, Address offset: 0x44 */
  373. __IO uint32_t ALRMBSSR;/*!< RTC alarm B sub second register, Address offset: 0x48 */
  374. uint32_t RESERVED7; /*!< Reserved, 0x4C */
  375. __IO uint32_t BKP0R; /*!< RTC backup register 1, Address offset: 0x50 */
  376. __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */
  377. __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */
  378. __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */
  379. __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */
  380. __IO uint32_t BKP5R; /*!< RTC backup register 5, Address offset: 0x64 */
  381. __IO uint32_t BKP6R; /*!< RTC backup register 6, Address offset: 0x68 */
  382. __IO uint32_t BKP7R; /*!< RTC backup register 7, Address offset: 0x6C */
  383. __IO uint32_t BKP8R; /*!< RTC backup register 8, Address offset: 0x70 */
  384. __IO uint32_t BKP9R; /*!< RTC backup register 9, Address offset: 0x74 */
  385. __IO uint32_t BKP10R; /*!< RTC backup register 10, Address offset: 0x78 */
  386. __IO uint32_t BKP11R; /*!< RTC backup register 11, Address offset: 0x7C */
  387. __IO uint32_t BKP12R; /*!< RTC backup register 12, Address offset: 0x80 */
  388. __IO uint32_t BKP13R; /*!< RTC backup register 13, Address offset: 0x84 */
  389. __IO uint32_t BKP14R; /*!< RTC backup register 14, Address offset: 0x88 */
  390. __IO uint32_t BKP15R; /*!< RTC backup register 15, Address offset: 0x8C */
  391. __IO uint32_t BKP16R; /*!< RTC backup register 16, Address offset: 0x90 */
  392. __IO uint32_t BKP17R; /*!< RTC backup register 17, Address offset: 0x94 */
  393. __IO uint32_t BKP18R; /*!< RTC backup register 18, Address offset: 0x98 */
  394. __IO uint32_t BKP19R; /*!< RTC backup register 19, Address offset: 0x9C */
  395. } RTC_TypeDef;
  396. /**
  397. * @brief SD host Interface
  398. */
  399. typedef struct
  400. {
  401. __IO uint32_t POWER; /*!< SDIO power control register, Address offset: 0x00 */
  402. __IO uint32_t CLKCR; /*!< SDI clock control register, Address offset: 0x04 */
  403. __IO uint32_t ARG; /*!< SDIO argument register, Address offset: 0x08 */
  404. __IO uint32_t CMD; /*!< SDIO command register, Address offset: 0x0C */
  405. __IO const uint32_t RESPCMD; /*!< SDIO command response register, Address offset: 0x10 */
  406. __IO const uint32_t RESP1; /*!< SDIO response 1 register, Address offset: 0x14 */
  407. __IO const uint32_t RESP2; /*!< SDIO response 2 register, Address offset: 0x18 */
  408. __IO const uint32_t RESP3; /*!< SDIO response 3 register, Address offset: 0x1C */
  409. __IO const uint32_t RESP4; /*!< SDIO response 4 register, Address offset: 0x20 */
  410. __IO uint32_t DTIMER; /*!< SDIO data timer register, Address offset: 0x24 */
  411. __IO uint32_t DLEN; /*!< SDIO data length register, Address offset: 0x28 */
  412. __IO uint32_t DCTRL; /*!< SDIO data control register, Address offset: 0x2C */
  413. __IO const uint32_t DCOUNT; /*!< SDIO data counter register, Address offset: 0x30 */
  414. __IO const uint32_t STA; /*!< SDIO status register, Address offset: 0x34 */
  415. __IO uint32_t ICR; /*!< SDIO interrupt clear register, Address offset: 0x38 */
  416. __IO uint32_t MASK; /*!< SDIO mask register, Address offset: 0x3C */
  417. uint32_t RESERVED0[2]; /*!< Reserved, 0x40-0x44 */
  418. __IO const uint32_t FIFOCNT; /*!< SDIO FIFO counter register, Address offset: 0x48 */
  419. uint32_t RESERVED1[13]; /*!< Reserved, 0x4C-0x7C */
  420. __IO uint32_t FIFO; /*!< SDIO data FIFO register, Address offset: 0x80 */
  421. } SDIO_TypeDef;
  422. /**
  423. * @brief Serial Peripheral Interface
  424. */
  425. typedef struct
  426. {
  427. __IO uint32_t CR1; /*!< SPI control register 1 (not used in I2S mode), Address offset: 0x00 */
  428. __IO uint32_t CR2; /*!< SPI control register 2, Address offset: 0x04 */
  429. __IO uint32_t SR; /*!< SPI status register, Address offset: 0x08 */
  430. __IO uint32_t DR; /*!< SPI data register, Address offset: 0x0C */
  431. __IO uint32_t CRCPR; /*!< SPI CRC polynomial register (not used in I2S mode), Address offset: 0x10 */
  432. __IO uint32_t RXCRCR; /*!< SPI RX CRC register (not used in I2S mode), Address offset: 0x14 */
  433. __IO uint32_t TXCRCR; /*!< SPI TX CRC register (not used in I2S mode), Address offset: 0x18 */
  434. __IO uint32_t I2SCFGR; /*!< SPI_I2S configuration register, Address offset: 0x1C */
  435. __IO uint32_t I2SPR; /*!< SPI_I2S prescaler register, Address offset: 0x20 */
  436. } SPI_TypeDef;
  437. /**
  438. * @brief TIM
  439. */
  440. typedef struct
  441. {
  442. __IO uint32_t CR1; /*!< TIM control register 1, Address offset: 0x00 */
  443. __IO uint32_t CR2; /*!< TIM control register 2, Address offset: 0x04 */
  444. __IO uint32_t SMCR; /*!< TIM slave mode control register, Address offset: 0x08 */
  445. __IO uint32_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */
  446. __IO uint32_t SR; /*!< TIM status register, Address offset: 0x10 */
  447. __IO uint32_t EGR; /*!< TIM event generation register, Address offset: 0x14 */
  448. __IO uint32_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */
  449. __IO uint32_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */
  450. __IO uint32_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */
  451. __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */
  452. __IO uint32_t PSC; /*!< TIM prescaler, Address offset: 0x28 */
  453. __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */
  454. __IO uint32_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */
  455. __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */
  456. __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */
  457. __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */
  458. __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */
  459. __IO uint32_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */
  460. __IO uint32_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */
  461. __IO uint32_t DMAR; /*!< TIM DMA address for full transfer, Address offset: 0x4C */
  462. __IO uint32_t OR; /*!< TIM option register, Address offset: 0x50 */
  463. } TIM_TypeDef;
  464. /**
  465. * @brief Universal Synchronous Asynchronous Receiver Transmitter
  466. */
  467. typedef struct
  468. {
  469. __IO uint32_t SR; /*!< USART Status register, Address offset: 0x00 */
  470. __IO uint32_t DR; /*!< USART Data register, Address offset: 0x04 */
  471. __IO uint32_t BRR; /*!< USART Baud rate register, Address offset: 0x08 */
  472. __IO uint32_t CR1; /*!< USART Control register 1, Address offset: 0x0C */
  473. __IO uint32_t CR2; /*!< USART Control register 2, Address offset: 0x10 */
  474. __IO uint32_t CR3; /*!< USART Control register 3, Address offset: 0x14 */
  475. __IO uint32_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x18 */
  476. } USART_TypeDef;
  477. /**
  478. * @brief Window WATCHDOG
  479. */
  480. typedef struct
  481. {
  482. __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */
  483. __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */
  484. __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */
  485. } WWDG_TypeDef;
  486. /**
  487. * @brief USB_OTG_Core_Registers
  488. */
  489. typedef struct
  490. {
  491. __IO uint32_t GOTGCTL; /*!< USB_OTG Control and Status Register 000h */
  492. __IO uint32_t GOTGINT; /*!< USB_OTG Interrupt Register 004h */
  493. __IO uint32_t GAHBCFG; /*!< Core AHB Configuration Register 008h */
  494. __IO uint32_t GUSBCFG; /*!< Core USB Configuration Register 00Ch */
  495. __IO uint32_t GRSTCTL; /*!< Core Reset Register 010h */
  496. __IO uint32_t GINTSTS; /*!< Core Interrupt Register 014h */
  497. __IO uint32_t GINTMSK; /*!< Core Interrupt Mask Register 018h */
  498. __IO uint32_t GRXSTSR; /*!< Receive Sts Q Read Register 01Ch */
  499. __IO uint32_t GRXSTSP; /*!< Receive Sts Q Read & POP Register 020h */
  500. __IO uint32_t GRXFSIZ; /*!< Receive FIFO Size Register 024h */
  501. __IO uint32_t DIEPTXF0_HNPTXFSIZ; /*!< EP0 / Non Periodic Tx FIFO Size Register 028h */
  502. __IO uint32_t HNPTXSTS; /*!< Non Periodic Tx FIFO/Queue Sts reg 02Ch */
  503. uint32_t Reserved30[2]; /*!< Reserved 030h */
  504. __IO uint32_t GCCFG; /*!< General Purpose IO Register 038h */
  505. __IO uint32_t CID; /*!< User ID Register 03Ch */
  506. uint32_t Reserved40[48]; /*!< Reserved 0x40-0xFF */
  507. __IO uint32_t HPTXFSIZ; /*!< Host Periodic Tx FIFO Size Reg 100h */
  508. __IO uint32_t DIEPTXF[0x0F]; /*!< dev Periodic Transmit FIFO */
  509. } USB_OTG_GlobalTypeDef;
  510. /**
  511. * @brief USB_OTG_device_Registers
  512. */
  513. typedef struct
  514. {
  515. __IO uint32_t DCFG; /*!< dev Configuration Register 800h */
  516. __IO uint32_t DCTL; /*!< dev Control Register 804h */
  517. __IO uint32_t DSTS; /*!< dev Status Register (RO) 808h */
  518. uint32_t Reserved0C; /*!< Reserved 80Ch */
  519. __IO uint32_t DIEPMSK; /*!< dev IN Endpoint Mask 810h */
  520. __IO uint32_t DOEPMSK; /*!< dev OUT Endpoint Mask 814h */
  521. __IO uint32_t DAINT; /*!< dev All Endpoints Itr Reg 818h */
  522. __IO uint32_t DAINTMSK; /*!< dev All Endpoints Itr Mask 81Ch */
  523. uint32_t Reserved20; /*!< Reserved 820h */
  524. uint32_t Reserved9; /*!< Reserved 824h */
  525. __IO uint32_t DVBUSDIS; /*!< dev VBUS discharge Register 828h */
  526. __IO uint32_t DVBUSPULSE; /*!< dev VBUS Pulse Register 82Ch */
  527. __IO uint32_t DTHRCTL; /*!< dev threshold 830h */
  528. __IO uint32_t DIEPEMPMSK; /*!< dev empty msk 834h */
  529. __IO uint32_t DEACHINT; /*!< dedicated EP interrupt 838h */
  530. __IO uint32_t DEACHMSK; /*!< dedicated EP msk 83Ch */
  531. uint32_t Reserved40; /*!< dedicated EP mask 840h */
  532. __IO uint32_t DINEP1MSK; /*!< dedicated EP mask 844h */
  533. uint32_t Reserved44[15]; /*!< Reserved 844-87Ch */
  534. __IO uint32_t DOUTEP1MSK; /*!< dedicated EP msk 884h */
  535. } USB_OTG_DeviceTypeDef;
  536. /**
  537. * @brief USB_OTG_IN_Endpoint-Specific_Register
  538. */
  539. typedef struct
  540. {
  541. __IO uint32_t DIEPCTL; /*!< dev IN Endpoint Control Reg 900h + (ep_num * 20h) + 00h */
  542. uint32_t Reserved04; /*!< Reserved 900h + (ep_num * 20h) + 04h */
  543. __IO uint32_t DIEPINT; /*!< dev IN Endpoint Itr Reg 900h + (ep_num * 20h) + 08h */
  544. uint32_t Reserved0C; /*!< Reserved 900h + (ep_num * 20h) + 0Ch */
  545. __IO uint32_t DIEPTSIZ; /*!< IN Endpoint Txfer Size 900h + (ep_num * 20h) + 10h */
  546. __IO uint32_t DIEPDMA; /*!< IN Endpoint DMA Address Reg 900h + (ep_num * 20h) + 14h */
  547. __IO uint32_t DTXFSTS; /*!< IN Endpoint Tx FIFO Status Reg 900h + (ep_num * 20h) + 18h */
  548. uint32_t Reserved18; /*!< Reserved 900h+(ep_num*20h)+1Ch-900h+ (ep_num * 20h) + 1Ch */
  549. } USB_OTG_INEndpointTypeDef;
  550. /**
  551. * @brief USB_OTG_OUT_Endpoint-Specific_Registers
  552. */
  553. typedef struct
  554. {
  555. __IO uint32_t DOEPCTL; /*!< dev OUT Endpoint Control Reg B00h + (ep_num * 20h) + 00h */
  556. uint32_t Reserved04; /*!< Reserved B00h + (ep_num * 20h) + 04h */
  557. __IO uint32_t DOEPINT; /*!< dev OUT Endpoint Itr Reg B00h + (ep_num * 20h) + 08h */
  558. uint32_t Reserved0C; /*!< Reserved B00h + (ep_num * 20h) + 0Ch */
  559. __IO uint32_t DOEPTSIZ; /*!< dev OUT Endpoint Txfer Size B00h + (ep_num * 20h) + 10h */
  560. __IO uint32_t DOEPDMA; /*!< dev OUT Endpoint DMA Address B00h + (ep_num * 20h) + 14h */
  561. uint32_t Reserved18[2]; /*!< Reserved B00h + (ep_num * 20h) + 18h - B00h + (ep_num * 20h) + 1Ch */
  562. } USB_OTG_OUTEndpointTypeDef;
  563. /**
  564. * @brief USB_OTG_Host_Mode_Register_Structures
  565. */
  566. typedef struct
  567. {
  568. __IO uint32_t HCFG; /*!< Host Configuration Register 400h */
  569. __IO uint32_t HFIR; /*!< Host Frame Interval Register 404h */
  570. __IO uint32_t HFNUM; /*!< Host Frame Nbr/Frame Remaining 408h */
  571. uint32_t Reserved40C; /*!< Reserved 40Ch */
  572. __IO uint32_t HPTXSTS; /*!< Host Periodic Tx FIFO/ Queue Status 410h */
  573. __IO uint32_t HAINT; /*!< Host All Channels Interrupt Register 414h */
  574. __IO uint32_t HAINTMSK; /*!< Host All Channels Interrupt Mask 418h */
  575. } USB_OTG_HostTypeDef;
  576. /**
  577. * @brief USB_OTG_Host_Channel_Specific_Registers
  578. */
  579. typedef struct
  580. {
  581. __IO uint32_t HCCHAR; /*!< Host Channel Characteristics Register 500h */
  582. __IO uint32_t HCSPLT; /*!< Host Channel Split Control Register 504h */
  583. __IO uint32_t HCINT; /*!< Host Channel Interrupt Register 508h */
  584. __IO uint32_t HCINTMSK; /*!< Host Channel Interrupt Mask Register 50Ch */
  585. __IO uint32_t HCTSIZ; /*!< Host Channel Transfer Size Register 510h */
  586. __IO uint32_t HCDMA; /*!< Host Channel DMA Address Register 514h */
  587. uint32_t Reserved[2]; /*!< Reserved */
  588. } USB_OTG_HostChannelTypeDef;
  589. /**
  590. * @}
  591. */
  592. /** @addtogroup Peripheral_memory_map
  593. * @{
  594. */
  595. #define FLASH_BASE 0x08000000U /*!< FLASH(up to 1 MB) base address in the alias region */
  596. #define SRAM1_BASE 0x20000000U /*!< SRAM1(128 KB) base address in the alias region */
  597. #define PERIPH_BASE 0x40000000U /*!< Peripheral base address in the alias region */
  598. #define BKPSRAM_BASE 0x40024000U /*!< Backup SRAM(4 KB) base address in the alias region */
  599. #define SRAM1_BB_BASE 0x22000000U /*!< SRAM1(128 KB) base address in the bit-band region */
  600. #define PERIPH_BB_BASE 0x42000000U /*!< Peripheral base address in the bit-band region */
  601. #define BKPSRAM_BB_BASE 0x42480000U /*!< Backup SRAM(4 KB) base address in the bit-band region */
  602. #define FLASH_END 0x0807FFFFU /*!< FLASH end address */
  603. #define FLASH_OTP_BASE 0x1FFF7800U /*!< Base address of : (up to 528 Bytes) embedded FLASH OTP Area */
  604. #define FLASH_OTP_END 0x1FFF7A0FU /*!< End address of : (up to 528 Bytes) embedded FLASH OTP Area */
  605. /* Legacy defines */
  606. #define SRAM_BASE SRAM1_BASE
  607. #define SRAM_BB_BASE SRAM1_BB_BASE
  608. /*!< Peripheral memory map */
  609. #define APB1PERIPH_BASE PERIPH_BASE
  610. #define APB2PERIPH_BASE (PERIPH_BASE + 0x00010000U)
  611. #define AHB1PERIPH_BASE (PERIPH_BASE + 0x00020000U)
  612. #define AHB2PERIPH_BASE (PERIPH_BASE + 0x10000000U)
  613. /*!< APB1 peripherals */
  614. #define TIM2_BASE (APB1PERIPH_BASE + 0x0000U)
  615. #define TIM3_BASE (APB1PERIPH_BASE + 0x0400U)
  616. #define TIM4_BASE (APB1PERIPH_BASE + 0x0800U)
  617. #define TIM5_BASE (APB1PERIPH_BASE + 0x0C00U)
  618. #define RTC_BASE (APB1PERIPH_BASE + 0x2800U)
  619. #define WWDG_BASE (APB1PERIPH_BASE + 0x2C00U)
  620. #define IWDG_BASE (APB1PERIPH_BASE + 0x3000U)
  621. #define I2S2ext_BASE (APB1PERIPH_BASE + 0x3400U)
  622. #define SPI2_BASE (APB1PERIPH_BASE + 0x3800U)
  623. #define SPI3_BASE (APB1PERIPH_BASE + 0x3C00U)
  624. #define I2S3ext_BASE (APB1PERIPH_BASE + 0x4000U)
  625. #define USART2_BASE (APB1PERIPH_BASE + 0x4400U)
  626. #define I2C1_BASE (APB1PERIPH_BASE + 0x5400U)
  627. #define I2C2_BASE (APB1PERIPH_BASE + 0x5800U)
  628. #define I2C3_BASE (APB1PERIPH_BASE + 0x5C00U)
  629. #define PWR_BASE (APB1PERIPH_BASE + 0x7000U)
  630. /*!< APB2 peripherals */
  631. #define TIM1_BASE (APB2PERIPH_BASE + 0x0000U)
  632. #define USART1_BASE (APB2PERIPH_BASE + 0x1000U)
  633. #define USART6_BASE (APB2PERIPH_BASE + 0x1400U)
  634. #define ADC1_BASE (APB2PERIPH_BASE + 0x2000U)
  635. #define ADC1_COMMON_BASE (APB2PERIPH_BASE + 0x2300U)
  636. /* Legacy define */
  637. #define ADC_BASE ADC1_COMMON_BASE
  638. #define SDIO_BASE (APB2PERIPH_BASE + 0x2C00U)
  639. #define SPI1_BASE (APB2PERIPH_BASE + 0x3000U)
  640. #define SPI4_BASE (APB2PERIPH_BASE + 0x3400U)
  641. #define SYSCFG_BASE (APB2PERIPH_BASE + 0x3800U)
  642. #define EXTI_BASE (APB2PERIPH_BASE + 0x3C00U)
  643. #define TIM9_BASE (APB2PERIPH_BASE + 0x4000U)
  644. #define TIM10_BASE (APB2PERIPH_BASE + 0x4400U)
  645. #define TIM11_BASE (APB2PERIPH_BASE + 0x4800U)
  646. #define SPI5_BASE (APB2PERIPH_BASE + 0x5000U)
  647. /*!< AHB1 peripherals */
  648. #define GPIOA_BASE (AHB1PERIPH_BASE + 0x0000U)
  649. #define GPIOB_BASE (AHB1PERIPH_BASE + 0x0400U)
  650. #define GPIOC_BASE (AHB1PERIPH_BASE + 0x0800U)
  651. #define GPIOD_BASE (AHB1PERIPH_BASE + 0x0C00U)
  652. #define GPIOE_BASE (AHB1PERIPH_BASE + 0x1000U)
  653. #define GPIOH_BASE (AHB1PERIPH_BASE + 0x1C00U)
  654. #define CRC_BASE (AHB1PERIPH_BASE + 0x3000U)
  655. #define RCC_BASE (AHB1PERIPH_BASE + 0x3800U)
  656. #define FLASH_R_BASE (AHB1PERIPH_BASE + 0x3C00U)
  657. #define DMA1_BASE (AHB1PERIPH_BASE + 0x6000U)
  658. #define DMA1_Stream0_BASE (DMA1_BASE + 0x010U)
  659. #define DMA1_Stream1_BASE (DMA1_BASE + 0x028U)
  660. #define DMA1_Stream2_BASE (DMA1_BASE + 0x040U)
  661. #define DMA1_Stream3_BASE (DMA1_BASE + 0x058U)
  662. #define DMA1_Stream4_BASE (DMA1_BASE + 0x070U)
  663. #define DMA1_Stream5_BASE (DMA1_BASE + 0x088U)
  664. #define DMA1_Stream6_BASE (DMA1_BASE + 0x0A0U)
  665. #define DMA1_Stream7_BASE (DMA1_BASE + 0x0B8U)
  666. #define DMA2_BASE (AHB1PERIPH_BASE + 0x6400U)
  667. #define DMA2_Stream0_BASE (DMA2_BASE + 0x010U)
  668. #define DMA2_Stream1_BASE (DMA2_BASE + 0x028U)
  669. #define DMA2_Stream2_BASE (DMA2_BASE + 0x040U)
  670. #define DMA2_Stream3_BASE (DMA2_BASE + 0x058U)
  671. #define DMA2_Stream4_BASE (DMA2_BASE + 0x070U)
  672. #define DMA2_Stream5_BASE (DMA2_BASE + 0x088U)
  673. #define DMA2_Stream6_BASE (DMA2_BASE + 0x0A0U)
  674. #define DMA2_Stream7_BASE (DMA2_BASE + 0x0B8U)
  675. /*!< Debug MCU registers base address */
  676. #define DBGMCU_BASE 0xE0042000U
  677. /*!< USB registers base address */
  678. #define USB_OTG_FS_PERIPH_BASE 0x50000000U
  679. #define USB_OTG_GLOBAL_BASE 0x000U
  680. #define USB_OTG_DEVICE_BASE 0x800U
  681. #define USB_OTG_IN_ENDPOINT_BASE 0x900U
  682. #define USB_OTG_OUT_ENDPOINT_BASE 0xB00U
  683. #define USB_OTG_EP_REG_SIZE 0x20U
  684. #define USB_OTG_HOST_BASE 0x400U
  685. #define USB_OTG_HOST_PORT_BASE 0x440U
  686. #define USB_OTG_HOST_CHANNEL_BASE 0x500U
  687. #define USB_OTG_HOST_CHANNEL_SIZE 0x20U
  688. #define USB_OTG_PCGCCTL_BASE 0xE00U
  689. #define USB_OTG_FIFO_BASE 0x1000U
  690. #define USB_OTG_FIFO_SIZE 0x1000U
  691. #define UID_BASE 0x1FFF7A10U /*!< Unique device ID register base address */
  692. #define FLASHSIZE_BASE 0x1FFF7A22U /*!< FLASH Size register base address */
  693. #define PACKAGE_BASE 0x1FFF7BF0U /*!< Package size register base address */
  694. /**
  695. * @}
  696. */
  697. /** @addtogroup Peripheral_declaration
  698. * @{
  699. */
  700. #define TIM2 ((TIM_TypeDef *) TIM2_BASE)
  701. #define TIM3 ((TIM_TypeDef *) TIM3_BASE)
  702. #define TIM4 ((TIM_TypeDef *) TIM4_BASE)
  703. #define TIM5 ((TIM_TypeDef *) TIM5_BASE)
  704. #define RTC ((RTC_TypeDef *) RTC_BASE)
  705. #define WWDG ((WWDG_TypeDef *) WWDG_BASE)
  706. #define IWDG ((IWDG_TypeDef *) IWDG_BASE)
  707. #define I2S2ext ((SPI_TypeDef *) I2S2ext_BASE)
  708. #define SPI2 ((SPI_TypeDef *) SPI2_BASE)
  709. #define SPI3 ((SPI_TypeDef *) SPI3_BASE)
  710. #define I2S3ext ((SPI_TypeDef *) I2S3ext_BASE)
  711. #define USART2 ((USART_TypeDef *) USART2_BASE)
  712. #define I2C1 ((I2C_TypeDef *) I2C1_BASE)
  713. #define I2C2 ((I2C_TypeDef *) I2C2_BASE)
  714. #define I2C3 ((I2C_TypeDef *) I2C3_BASE)
  715. #define PWR ((PWR_TypeDef *) PWR_BASE)
  716. #define TIM1 ((TIM_TypeDef *) TIM1_BASE)
  717. #define USART1 ((USART_TypeDef *) USART1_BASE)
  718. #define USART6 ((USART_TypeDef *) USART6_BASE)
  719. #define ADC1 ((ADC_TypeDef *) ADC1_BASE)
  720. #define ADC1_COMMON ((ADC_Common_TypeDef *) ADC1_COMMON_BASE)
  721. /* Legacy define */
  722. #define ADC ADC1_COMMON
  723. #define SDIO ((SDIO_TypeDef *) SDIO_BASE)
  724. #define SPI1 ((SPI_TypeDef *) SPI1_BASE)
  725. #define SPI4 ((SPI_TypeDef *) SPI4_BASE)
  726. #define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE)
  727. #define EXTI ((EXTI_TypeDef *) EXTI_BASE)
  728. #define TIM9 ((TIM_TypeDef *) TIM9_BASE)
  729. #define TIM10 ((TIM_TypeDef *) TIM10_BASE)
  730. #define TIM11 ((TIM_TypeDef *) TIM11_BASE)
  731. #define SPI5 ((SPI_TypeDef *) SPI5_BASE)
  732. #define GPIOA ((GPIO_TypeDef *) GPIOA_BASE)
  733. #define GPIOB ((GPIO_TypeDef *) GPIOB_BASE)
  734. #define GPIOC ((GPIO_TypeDef *) GPIOC_BASE)
  735. #define GPIOD ((GPIO_TypeDef *) GPIOD_BASE)
  736. #define GPIOE ((GPIO_TypeDef *) GPIOE_BASE)
  737. #define GPIOH ((GPIO_TypeDef *) GPIOH_BASE)
  738. #define CRC ((CRC_TypeDef *) CRC_BASE)
  739. #define RCC ((RCC_TypeDef *) RCC_BASE)
  740. #define FLASH ((FLASH_TypeDef *) FLASH_R_BASE)
  741. #define DMA1 ((DMA_TypeDef *) DMA1_BASE)
  742. #define DMA1_Stream0 ((DMA_Stream_TypeDef *) DMA1_Stream0_BASE)
  743. #define DMA1_Stream1 ((DMA_Stream_TypeDef *) DMA1_Stream1_BASE)
  744. #define DMA1_Stream2 ((DMA_Stream_TypeDef *) DMA1_Stream2_BASE)
  745. #define DMA1_Stream3 ((DMA_Stream_TypeDef *) DMA1_Stream3_BASE)
  746. #define DMA1_Stream4 ((DMA_Stream_TypeDef *) DMA1_Stream4_BASE)
  747. #define DMA1_Stream5 ((DMA_Stream_TypeDef *) DMA1_Stream5_BASE)
  748. #define DMA1_Stream6 ((DMA_Stream_TypeDef *) DMA1_Stream6_BASE)
  749. #define DMA1_Stream7 ((DMA_Stream_TypeDef *) DMA1_Stream7_BASE)
  750. #define DMA2 ((DMA_TypeDef *) DMA2_BASE)
  751. #define DMA2_Stream0 ((DMA_Stream_TypeDef *) DMA2_Stream0_BASE)
  752. #define DMA2_Stream1 ((DMA_Stream_TypeDef *) DMA2_Stream1_BASE)
  753. #define DMA2_Stream2 ((DMA_Stream_TypeDef *) DMA2_Stream2_BASE)
  754. #define DMA2_Stream3 ((DMA_Stream_TypeDef *) DMA2_Stream3_BASE)
  755. #define DMA2_Stream4 ((DMA_Stream_TypeDef *) DMA2_Stream4_BASE)
  756. #define DMA2_Stream5 ((DMA_Stream_TypeDef *) DMA2_Stream5_BASE)
  757. #define DMA2_Stream6 ((DMA_Stream_TypeDef *) DMA2_Stream6_BASE)
  758. #define DMA2_Stream7 ((DMA_Stream_TypeDef *) DMA2_Stream7_BASE)
  759. #define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE)
  760. #define USB_OTG_FS ((USB_OTG_GlobalTypeDef *) USB_OTG_FS_PERIPH_BASE)
  761. /**
  762. * @}
  763. */
  764. /** @addtogroup Exported_constants
  765. * @{
  766. */
  767. /** @addtogroup Peripheral_Registers_Bits_Definition
  768. * @{
  769. */
  770. /******************************************************************************/
  771. /* Peripheral Registers_Bits_Definition */
  772. /******************************************************************************/
  773. /******************************************************************************/
  774. /* */
  775. /* Analog to Digital Converter */
  776. /* */
  777. /******************************************************************************/
  778. /******************** Bit definition for ADC_SR register ********************/
  779. #define ADC_SR_AWD_Pos (0U)
  780. #define ADC_SR_AWD_Msk (0x1U << ADC_SR_AWD_Pos) /*!< 0x00000001 */
  781. #define ADC_SR_AWD ADC_SR_AWD_Msk /*!<Analog watchdog flag */
  782. #define ADC_SR_EOC_Pos (1U)
  783. #define ADC_SR_EOC_Msk (0x1U << ADC_SR_EOC_Pos) /*!< 0x00000002 */
  784. #define ADC_SR_EOC ADC_SR_EOC_Msk /*!<End of conversion */
  785. #define ADC_SR_JEOC_Pos (2U)
  786. #define ADC_SR_JEOC_Msk (0x1U << ADC_SR_JEOC_Pos) /*!< 0x00000004 */
  787. #define ADC_SR_JEOC ADC_SR_JEOC_Msk /*!<Injected channel end of conversion */
  788. #define ADC_SR_JSTRT_Pos (3U)
  789. #define ADC_SR_JSTRT_Msk (0x1U << ADC_SR_JSTRT_Pos) /*!< 0x00000008 */
  790. #define ADC_SR_JSTRT ADC_SR_JSTRT_Msk /*!<Injected channel Start flag */
  791. #define ADC_SR_STRT_Pos (4U)
  792. #define ADC_SR_STRT_Msk (0x1U << ADC_SR_STRT_Pos) /*!< 0x00000010 */
  793. #define ADC_SR_STRT ADC_SR_STRT_Msk /*!<Regular channel Start flag */
  794. #define ADC_SR_OVR_Pos (5U)
  795. #define ADC_SR_OVR_Msk (0x1U << ADC_SR_OVR_Pos) /*!< 0x00000020 */
  796. #define ADC_SR_OVR ADC_SR_OVR_Msk /*!<Overrun flag */
  797. /******************* Bit definition for ADC_CR1 register ********************/
  798. #define ADC_CR1_AWDCH_Pos (0U)
  799. #define ADC_CR1_AWDCH_Msk (0x1FU << ADC_CR1_AWDCH_Pos) /*!< 0x0000001F */
  800. #define ADC_CR1_AWDCH ADC_CR1_AWDCH_Msk /*!<AWDCH[4:0] bits (Analog watchdog channel select bits) */
  801. #define ADC_CR1_AWDCH_0 (0x01U << ADC_CR1_AWDCH_Pos) /*!< 0x00000001 */
  802. #define ADC_CR1_AWDCH_1 (0x02U << ADC_CR1_AWDCH_Pos) /*!< 0x00000002 */
  803. #define ADC_CR1_AWDCH_2 (0x04U << ADC_CR1_AWDCH_Pos) /*!< 0x00000004 */
  804. #define ADC_CR1_AWDCH_3 (0x08U << ADC_CR1_AWDCH_Pos) /*!< 0x00000008 */
  805. #define ADC_CR1_AWDCH_4 (0x10U << ADC_CR1_AWDCH_Pos) /*!< 0x00000010 */
  806. #define ADC_CR1_EOCIE_Pos (5U)
  807. #define ADC_CR1_EOCIE_Msk (0x1U << ADC_CR1_EOCIE_Pos) /*!< 0x00000020 */
  808. #define ADC_CR1_EOCIE ADC_CR1_EOCIE_Msk /*!<Interrupt enable for EOC */
  809. #define ADC_CR1_AWDIE_Pos (6U)
  810. #define ADC_CR1_AWDIE_Msk (0x1U << ADC_CR1_AWDIE_Pos) /*!< 0x00000040 */
  811. #define ADC_CR1_AWDIE ADC_CR1_AWDIE_Msk /*!<AAnalog Watchdog interrupt enable */
  812. #define ADC_CR1_JEOCIE_Pos (7U)
  813. #define ADC_CR1_JEOCIE_Msk (0x1U << ADC_CR1_JEOCIE_Pos) /*!< 0x00000080 */
  814. #define ADC_CR1_JEOCIE ADC_CR1_JEOCIE_Msk /*!<Interrupt enable for injected channels */
  815. #define ADC_CR1_SCAN_Pos (8U)
  816. #define ADC_CR1_SCAN_Msk (0x1U << ADC_CR1_SCAN_Pos) /*!< 0x00000100 */
  817. #define ADC_CR1_SCAN ADC_CR1_SCAN_Msk /*!<Scan mode */
  818. #define ADC_CR1_AWDSGL_Pos (9U)
  819. #define ADC_CR1_AWDSGL_Msk (0x1U << ADC_CR1_AWDSGL_Pos) /*!< 0x00000200 */
  820. #define ADC_CR1_AWDSGL ADC_CR1_AWDSGL_Msk /*!<Enable the watchdog on a single channel in scan mode */
  821. #define ADC_CR1_JAUTO_Pos (10U)
  822. #define ADC_CR1_JAUTO_Msk (0x1U << ADC_CR1_JAUTO_Pos) /*!< 0x00000400 */
  823. #define ADC_CR1_JAUTO ADC_CR1_JAUTO_Msk /*!<Automatic injected group conversion */
  824. #define ADC_CR1_DISCEN_Pos (11U)
  825. #define ADC_CR1_DISCEN_Msk (0x1U << ADC_CR1_DISCEN_Pos) /*!< 0x00000800 */
  826. #define ADC_CR1_DISCEN ADC_CR1_DISCEN_Msk /*!<Discontinuous mode on regular channels */
  827. #define ADC_CR1_JDISCEN_Pos (12U)
  828. #define ADC_CR1_JDISCEN_Msk (0x1U << ADC_CR1_JDISCEN_Pos) /*!< 0x00001000 */
  829. #define ADC_CR1_JDISCEN ADC_CR1_JDISCEN_Msk /*!<Discontinuous mode on injected channels */
  830. #define ADC_CR1_DISCNUM_Pos (13U)
  831. #define ADC_CR1_DISCNUM_Msk (0x7U << ADC_CR1_DISCNUM_Pos) /*!< 0x0000E000 */
  832. #define ADC_CR1_DISCNUM ADC_CR1_DISCNUM_Msk /*!<DISCNUM[2:0] bits (Discontinuous mode channel count) */
  833. #define ADC_CR1_DISCNUM_0 (0x1U << ADC_CR1_DISCNUM_Pos) /*!< 0x00002000 */
  834. #define ADC_CR1_DISCNUM_1 (0x2U << ADC_CR1_DISCNUM_Pos) /*!< 0x00004000 */
  835. #define ADC_CR1_DISCNUM_2 (0x4U << ADC_CR1_DISCNUM_Pos) /*!< 0x00008000 */
  836. #define ADC_CR1_JAWDEN_Pos (22U)
  837. #define ADC_CR1_JAWDEN_Msk (0x1U << ADC_CR1_JAWDEN_Pos) /*!< 0x00400000 */
  838. #define ADC_CR1_JAWDEN ADC_CR1_JAWDEN_Msk /*!<Analog watchdog enable on injected channels */
  839. #define ADC_CR1_AWDEN_Pos (23U)
  840. #define ADC_CR1_AWDEN_Msk (0x1U << ADC_CR1_AWDEN_Pos) /*!< 0x00800000 */
  841. #define ADC_CR1_AWDEN ADC_CR1_AWDEN_Msk /*!<Analog watchdog enable on regular channels */
  842. #define ADC_CR1_RES_Pos (24U)
  843. #define ADC_CR1_RES_Msk (0x3U << ADC_CR1_RES_Pos) /*!< 0x03000000 */
  844. #define ADC_CR1_RES ADC_CR1_RES_Msk /*!<RES[2:0] bits (Resolution) */
  845. #define ADC_CR1_RES_0 (0x1U << ADC_CR1_RES_Pos) /*!< 0x01000000 */
  846. #define ADC_CR1_RES_1 (0x2U << ADC_CR1_RES_Pos) /*!< 0x02000000 */
  847. #define ADC_CR1_OVRIE_Pos (26U)
  848. #define ADC_CR1_OVRIE_Msk (0x1U << ADC_CR1_OVRIE_Pos) /*!< 0x04000000 */
  849. #define ADC_CR1_OVRIE ADC_CR1_OVRIE_Msk /*!<overrun interrupt enable */
  850. /******************* Bit definition for ADC_CR2 register ********************/
  851. #define ADC_CR2_ADON_Pos (0U)
  852. #define ADC_CR2_ADON_Msk (0x1U << ADC_CR2_ADON_Pos) /*!< 0x00000001 */
  853. #define ADC_CR2_ADON ADC_CR2_ADON_Msk /*!<A/D Converter ON / OFF */
  854. #define ADC_CR2_CONT_Pos (1U)
  855. #define ADC_CR2_CONT_Msk (0x1U << ADC_CR2_CONT_Pos) /*!< 0x00000002 */
  856. #define ADC_CR2_CONT ADC_CR2_CONT_Msk /*!<Continuous Conversion */
  857. #define ADC_CR2_DMA_Pos (8U)
  858. #define ADC_CR2_DMA_Msk (0x1U << ADC_CR2_DMA_Pos) /*!< 0x00000100 */
  859. #define ADC_CR2_DMA ADC_CR2_DMA_Msk /*!<Direct Memory access mode */
  860. #define ADC_CR2_DDS_Pos (9U)
  861. #define ADC_CR2_DDS_Msk (0x1U << ADC_CR2_DDS_Pos) /*!< 0x00000200 */
  862. #define ADC_CR2_DDS ADC_CR2_DDS_Msk /*!<DMA disable selection (Single ADC) */
  863. #define ADC_CR2_EOCS_Pos (10U)
  864. #define ADC_CR2_EOCS_Msk (0x1U << ADC_CR2_EOCS_Pos) /*!< 0x00000400 */
  865. #define ADC_CR2_EOCS ADC_CR2_EOCS_Msk /*!<End of conversion selection */
  866. #define ADC_CR2_ALIGN_Pos (11U)
  867. #define ADC_CR2_ALIGN_Msk (0x1U << ADC_CR2_ALIGN_Pos) /*!< 0x00000800 */
  868. #define ADC_CR2_ALIGN ADC_CR2_ALIGN_Msk /*!<Data Alignment */
  869. #define ADC_CR2_JEXTSEL_Pos (16U)
  870. #define ADC_CR2_JEXTSEL_Msk (0xFU << ADC_CR2_JEXTSEL_Pos) /*!< 0x000F0000 */
  871. #define ADC_CR2_JEXTSEL ADC_CR2_JEXTSEL_Msk /*!<JEXTSEL[3:0] bits (External event select for injected group) */
  872. #define ADC_CR2_JEXTSEL_0 (0x1U << ADC_CR2_JEXTSEL_Pos) /*!< 0x00010000 */
  873. #define ADC_CR2_JEXTSEL_1 (0x2U << ADC_CR2_JEXTSEL_Pos) /*!< 0x00020000 */
  874. #define ADC_CR2_JEXTSEL_2 (0x4U << ADC_CR2_JEXTSEL_Pos) /*!< 0x00040000 */
  875. #define ADC_CR2_JEXTSEL_3 (0x8U << ADC_CR2_JEXTSEL_Pos) /*!< 0x00080000 */
  876. #define ADC_CR2_JEXTEN_Pos (20U)
  877. #define ADC_CR2_JEXTEN_Msk (0x3U << ADC_CR2_JEXTEN_Pos) /*!< 0x00300000 */
  878. #define ADC_CR2_JEXTEN ADC_CR2_JEXTEN_Msk /*!<JEXTEN[1:0] bits (External Trigger Conversion mode for injected channelsp) */
  879. #define ADC_CR2_JEXTEN_0 (0x1U << ADC_CR2_JEXTEN_Pos) /*!< 0x00100000 */
  880. #define ADC_CR2_JEXTEN_1 (0x2U << ADC_CR2_JEXTEN_Pos) /*!< 0x00200000 */
  881. #define ADC_CR2_JSWSTART_Pos (22U)
  882. #define ADC_CR2_JSWSTART_Msk (0x1U << ADC_CR2_JSWSTART_Pos) /*!< 0x00400000 */
  883. #define ADC_CR2_JSWSTART ADC_CR2_JSWSTART_Msk /*!<Start Conversion of injected channels */
  884. #define ADC_CR2_EXTSEL_Pos (24U)
  885. #define ADC_CR2_EXTSEL_Msk (0xFU << ADC_CR2_EXTSEL_Pos) /*!< 0x0F000000 */
  886. #define ADC_CR2_EXTSEL ADC_CR2_EXTSEL_Msk /*!<EXTSEL[3:0] bits (External Event Select for regular group) */
  887. #define ADC_CR2_EXTSEL_0 (0x1U << ADC_CR2_EXTSEL_Pos) /*!< 0x01000000 */
  888. #define ADC_CR2_EXTSEL_1 (0x2U << ADC_CR2_EXTSEL_Pos) /*!< 0x02000000 */
  889. #define ADC_CR2_EXTSEL_2 (0x4U << ADC_CR2_EXTSEL_Pos) /*!< 0x04000000 */
  890. #define ADC_CR2_EXTSEL_3 (0x8U << ADC_CR2_EXTSEL_Pos) /*!< 0x08000000 */
  891. #define ADC_CR2_EXTEN_Pos (28U)
  892. #define ADC_CR2_EXTEN_Msk (0x3U << ADC_CR2_EXTEN_Pos) /*!< 0x30000000 */
  893. #define ADC_CR2_EXTEN ADC_CR2_EXTEN_Msk /*!<EXTEN[1:0] bits (External Trigger Conversion mode for regular channelsp) */
  894. #define ADC_CR2_EXTEN_0 (0x1U << ADC_CR2_EXTEN_Pos) /*!< 0x10000000 */
  895. #define ADC_CR2_EXTEN_1 (0x2U << ADC_CR2_EXTEN_Pos) /*!< 0x20000000 */
  896. #define ADC_CR2_SWSTART_Pos (30U)
  897. #define ADC_CR2_SWSTART_Msk (0x1U << ADC_CR2_SWSTART_Pos) /*!< 0x40000000 */
  898. #define ADC_CR2_SWSTART ADC_CR2_SWSTART_Msk /*!<Start Conversion of regular channels */
  899. /****************** Bit definition for ADC_SMPR1 register *******************/
  900. #define ADC_SMPR1_SMP10_Pos (0U)
  901. #define ADC_SMPR1_SMP10_Msk (0x7U << ADC_SMPR1_SMP10_Pos) /*!< 0x00000007 */
  902. #define ADC_SMPR1_SMP10 ADC_SMPR1_SMP10_Msk /*!<SMP10[2:0] bits (Channel 10 Sample time selection) */
  903. #define ADC_SMPR1_SMP10_0 (0x1U << ADC_SMPR1_SMP10_Pos) /*!< 0x00000001 */
  904. #define ADC_SMPR1_SMP10_1 (0x2U << ADC_SMPR1_SMP10_Pos) /*!< 0x00000002 */
  905. #define ADC_SMPR1_SMP10_2 (0x4U << ADC_SMPR1_SMP10_Pos) /*!< 0x00000004 */
  906. #define ADC_SMPR1_SMP11_Pos (3U)
  907. #define ADC_SMPR1_SMP11_Msk (0x7U << ADC_SMPR1_SMP11_Pos) /*!< 0x00000038 */
  908. #define ADC_SMPR1_SMP11 ADC_SMPR1_SMP11_Msk /*!<SMP11[2:0] bits (Channel 11 Sample time selection) */
  909. #define ADC_SMPR1_SMP11_0 (0x1U << ADC_SMPR1_SMP11_Pos) /*!< 0x00000008 */
  910. #define ADC_SMPR1_SMP11_1 (0x2U << ADC_SMPR1_SMP11_Pos) /*!< 0x00000010 */
  911. #define ADC_SMPR1_SMP11_2 (0x4U << ADC_SMPR1_SMP11_Pos) /*!< 0x00000020 */
  912. #define ADC_SMPR1_SMP12_Pos (6U)
  913. #define ADC_SMPR1_SMP12_Msk (0x7U << ADC_SMPR1_SMP12_Pos) /*!< 0x000001C0 */
  914. #define ADC_SMPR1_SMP12 ADC_SMPR1_SMP12_Msk /*!<SMP12[2:0] bits (Channel 12 Sample time selection) */
  915. #define ADC_SMPR1_SMP12_0 (0x1U << ADC_SMPR1_SMP12_Pos) /*!< 0x00000040 */
  916. #define ADC_SMPR1_SMP12_1 (0x2U << ADC_SMPR1_SMP12_Pos) /*!< 0x00000080 */
  917. #define ADC_SMPR1_SMP12_2 (0x4U << ADC_SMPR1_SMP12_Pos) /*!< 0x00000100 */
  918. #define ADC_SMPR1_SMP13_Pos (9U)
  919. #define ADC_SMPR1_SMP13_Msk (0x7U << ADC_SMPR1_SMP13_Pos) /*!< 0x00000E00 */
  920. #define ADC_SMPR1_SMP13 ADC_SMPR1_SMP13_Msk /*!<SMP13[2:0] bits (Channel 13 Sample time selection) */
  921. #define ADC_SMPR1_SMP13_0 (0x1U << ADC_SMPR1_SMP13_Pos) /*!< 0x00000200 */
  922. #define ADC_SMPR1_SMP13_1 (0x2U << ADC_SMPR1_SMP13_Pos) /*!< 0x00000400 */
  923. #define ADC_SMPR1_SMP13_2 (0x4U << ADC_SMPR1_SMP13_Pos) /*!< 0x00000800 */
  924. #define ADC_SMPR1_SMP14_Pos (12U)
  925. #define ADC_SMPR1_SMP14_Msk (0x7U << ADC_SMPR1_SMP14_Pos) /*!< 0x00007000 */
  926. #define ADC_SMPR1_SMP14 ADC_SMPR1_SMP14_Msk /*!<SMP14[2:0] bits (Channel 14 Sample time selection) */
  927. #define ADC_SMPR1_SMP14_0 (0x1U << ADC_SMPR1_SMP14_Pos) /*!< 0x00001000 */
  928. #define ADC_SMPR1_SMP14_1 (0x2U << ADC_SMPR1_SMP14_Pos) /*!< 0x00002000 */
  929. #define ADC_SMPR1_SMP14_2 (0x4U << ADC_SMPR1_SMP14_Pos) /*!< 0x00004000 */
  930. #define ADC_SMPR1_SMP15_Pos (15U)
  931. #define ADC_SMPR1_SMP15_Msk (0x7U << ADC_SMPR1_SMP15_Pos) /*!< 0x00038000 */
  932. #define ADC_SMPR1_SMP15 ADC_SMPR1_SMP15_Msk /*!<SMP15[2:0] bits (Channel 15 Sample time selection) */
  933. #define ADC_SMPR1_SMP15_0 (0x1U << ADC_SMPR1_SMP15_Pos) /*!< 0x00008000 */
  934. #define ADC_SMPR1_SMP15_1 (0x2U << ADC_SMPR1_SMP15_Pos) /*!< 0x00010000 */
  935. #define ADC_SMPR1_SMP15_2 (0x4U << ADC_SMPR1_SMP15_Pos) /*!< 0x00020000 */
  936. #define ADC_SMPR1_SMP16_Pos (18U)
  937. #define ADC_SMPR1_SMP16_Msk (0x7U << ADC_SMPR1_SMP16_Pos) /*!< 0x001C0000 */
  938. #define ADC_SMPR1_SMP16 ADC_SMPR1_SMP16_Msk /*!<SMP16[2:0] bits (Channel 16 Sample time selection) */
  939. #define ADC_SMPR1_SMP16_0 (0x1U << ADC_SMPR1_SMP16_Pos) /*!< 0x00040000 */
  940. #define ADC_SMPR1_SMP16_1 (0x2U << ADC_SMPR1_SMP16_Pos) /*!< 0x00080000 */
  941. #define ADC_SMPR1_SMP16_2 (0x4U << ADC_SMPR1_SMP16_Pos) /*!< 0x00100000 */
  942. #define ADC_SMPR1_SMP17_Pos (21U)
  943. #define ADC_SMPR1_SMP17_Msk (0x7U << ADC_SMPR1_SMP17_Pos) /*!< 0x00E00000 */
  944. #define ADC_SMPR1_SMP17 ADC_SMPR1_SMP17_Msk /*!<SMP17[2:0] bits (Channel 17 Sample time selection) */
  945. #define ADC_SMPR1_SMP17_0 (0x1U << ADC_SMPR1_SMP17_Pos) /*!< 0x00200000 */
  946. #define ADC_SMPR1_SMP17_1 (0x2U << ADC_SMPR1_SMP17_Pos) /*!< 0x00400000 */
  947. #define ADC_SMPR1_SMP17_2 (0x4U << ADC_SMPR1_SMP17_Pos) /*!< 0x00800000 */
  948. #define ADC_SMPR1_SMP18_Pos (24U)
  949. #define ADC_SMPR1_SMP18_Msk (0x7U << ADC_SMPR1_SMP18_Pos) /*!< 0x07000000 */
  950. #define ADC_SMPR1_SMP18 ADC_SMPR1_SMP18_Msk /*!<SMP18[2:0] bits (Channel 18 Sample time selection) */
  951. #define ADC_SMPR1_SMP18_0 (0x1U << ADC_SMPR1_SMP18_Pos) /*!< 0x01000000 */
  952. #define ADC_SMPR1_SMP18_1 (0x2U << ADC_SMPR1_SMP18_Pos) /*!< 0x02000000 */
  953. #define ADC_SMPR1_SMP18_2 (0x4U << ADC_SMPR1_SMP18_Pos) /*!< 0x04000000 */
  954. /****************** Bit definition for ADC_SMPR2 register *******************/
  955. #define ADC_SMPR2_SMP0_Pos (0U)
  956. #define ADC_SMPR2_SMP0_Msk (0x7U << ADC_SMPR2_SMP0_Pos) /*!< 0x00000007 */
  957. #define ADC_SMPR2_SMP0 ADC_SMPR2_SMP0_Msk /*!<SMP0[2:0] bits (Channel 0 Sample time selection) */
  958. #define ADC_SMPR2_SMP0_0 (0x1U << ADC_SMPR2_SMP0_Pos) /*!< 0x00000001 */
  959. #define ADC_SMPR2_SMP0_1 (0x2U << ADC_SMPR2_SMP0_Pos) /*!< 0x00000002 */
  960. #define ADC_SMPR2_SMP0_2 (0x4U << ADC_SMPR2_SMP0_Pos) /*!< 0x00000004 */
  961. #define ADC_SMPR2_SMP1_Pos (3U)
  962. #define ADC_SMPR2_SMP1_Msk (0x7U << ADC_SMPR2_SMP1_Pos) /*!< 0x00000038 */
  963. #define ADC_SMPR2_SMP1 ADC_SMPR2_SMP1_Msk /*!<SMP1[2:0] bits (Channel 1 Sample time selection) */
  964. #define ADC_SMPR2_SMP1_0 (0x1U << ADC_SMPR2_SMP1_Pos) /*!< 0x00000008 */
  965. #define ADC_SMPR2_SMP1_1 (0x2U << ADC_SMPR2_SMP1_Pos) /*!< 0x00000010 */
  966. #define ADC_SMPR2_SMP1_2 (0x4U << ADC_SMPR2_SMP1_Pos) /*!< 0x00000020 */
  967. #define ADC_SMPR2_SMP2_Pos (6U)
  968. #define ADC_SMPR2_SMP2_Msk (0x7U << ADC_SMPR2_SMP2_Pos) /*!< 0x000001C0 */
  969. #define ADC_SMPR2_SMP2 ADC_SMPR2_SMP2_Msk /*!<SMP2[2:0] bits (Channel 2 Sample time selection) */
  970. #define ADC_SMPR2_SMP2_0 (0x1U << ADC_SMPR2_SMP2_Pos) /*!< 0x00000040 */
  971. #define ADC_SMPR2_SMP2_1 (0x2U << ADC_SMPR2_SMP2_Pos) /*!< 0x00000080 */
  972. #define ADC_SMPR2_SMP2_2 (0x4U << ADC_SMPR2_SMP2_Pos) /*!< 0x00000100 */
  973. #define ADC_SMPR2_SMP3_Pos (9U)
  974. #define ADC_SMPR2_SMP3_Msk (0x7U << ADC_SMPR2_SMP3_Pos) /*!< 0x00000E00 */
  975. #define ADC_SMPR2_SMP3 ADC_SMPR2_SMP3_Msk /*!<SMP3[2:0] bits (Channel 3 Sample time selection) */
  976. #define ADC_SMPR2_SMP3_0 (0x1U << ADC_SMPR2_SMP3_Pos) /*!< 0x00000200 */
  977. #define ADC_SMPR2_SMP3_1 (0x2U << ADC_SMPR2_SMP3_Pos) /*!< 0x00000400 */
  978. #define ADC_SMPR2_SMP3_2 (0x4U << ADC_SMPR2_SMP3_Pos) /*!< 0x00000800 */
  979. #define ADC_SMPR2_SMP4_Pos (12U)
  980. #define ADC_SMPR2_SMP4_Msk (0x7U << ADC_SMPR2_SMP4_Pos) /*!< 0x00007000 */
  981. #define ADC_SMPR2_SMP4 ADC_SMPR2_SMP4_Msk /*!<SMP4[2:0] bits (Channel 4 Sample time selection) */
  982. #define ADC_SMPR2_SMP4_0 (0x1U << ADC_SMPR2_SMP4_Pos) /*!< 0x00001000 */
  983. #define ADC_SMPR2_SMP4_1 (0x2U << ADC_SMPR2_SMP4_Pos) /*!< 0x00002000 */
  984. #define ADC_SMPR2_SMP4_2 (0x4U << ADC_SMPR2_SMP4_Pos) /*!< 0x00004000 */
  985. #define ADC_SMPR2_SMP5_Pos (15U)
  986. #define ADC_SMPR2_SMP5_Msk (0x7U << ADC_SMPR2_SMP5_Pos) /*!< 0x00038000 */
  987. #define ADC_SMPR2_SMP5 ADC_SMPR2_SMP5_Msk /*!<SMP5[2:0] bits (Channel 5 Sample time selection) */
  988. #define ADC_SMPR2_SMP5_0 (0x1U << ADC_SMPR2_SMP5_Pos) /*!< 0x00008000 */
  989. #define ADC_SMPR2_SMP5_1 (0x2U << ADC_SMPR2_SMP5_Pos) /*!< 0x00010000 */
  990. #define ADC_SMPR2_SMP5_2 (0x4U << ADC_SMPR2_SMP5_Pos) /*!< 0x00020000 */
  991. #define ADC_SMPR2_SMP6_Pos (18U)
  992. #define ADC_SMPR2_SMP6_Msk (0x7U << ADC_SMPR2_SMP6_Pos) /*!< 0x001C0000 */
  993. #define ADC_SMPR2_SMP6 ADC_SMPR2_SMP6_Msk /*!<SMP6[2:0] bits (Channel 6 Sample time selection) */
  994. #define ADC_SMPR2_SMP6_0 (0x1U << ADC_SMPR2_SMP6_Pos) /*!< 0x00040000 */
  995. #define ADC_SMPR2_SMP6_1 (0x2U << ADC_SMPR2_SMP6_Pos) /*!< 0x00080000 */
  996. #define ADC_SMPR2_SMP6_2 (0x4U << ADC_SMPR2_SMP6_Pos) /*!< 0x00100000 */
  997. #define ADC_SMPR2_SMP7_Pos (21U)
  998. #define ADC_SMPR2_SMP7_Msk (0x7U << ADC_SMPR2_SMP7_Pos) /*!< 0x00E00000 */
  999. #define ADC_SMPR2_SMP7 ADC_SMPR2_SMP7_Msk /*!<SMP7[2:0] bits (Channel 7 Sample time selection) */
  1000. #define ADC_SMPR2_SMP7_0 (0x1U << ADC_SMPR2_SMP7_Pos) /*!< 0x00200000 */
  1001. #define ADC_SMPR2_SMP7_1 (0x2U << ADC_SMPR2_SMP7_Pos) /*!< 0x00400000 */
  1002. #define ADC_SMPR2_SMP7_2 (0x4U << ADC_SMPR2_SMP7_Pos) /*!< 0x00800000 */
  1003. #define ADC_SMPR2_SMP8_Pos (24U)
  1004. #define ADC_SMPR2_SMP8_Msk (0x7U << ADC_SMPR2_SMP8_Pos) /*!< 0x07000000 */
  1005. #define ADC_SMPR2_SMP8 ADC_SMPR2_SMP8_Msk /*!<SMP8[2:0] bits (Channel 8 Sample time selection) */
  1006. #define ADC_SMPR2_SMP8_0 (0x1U << ADC_SMPR2_SMP8_Pos) /*!< 0x01000000 */
  1007. #define ADC_SMPR2_SMP8_1 (0x2U << ADC_SMPR2_SMP8_Pos) /*!< 0x02000000 */
  1008. #define ADC_SMPR2_SMP8_2 (0x4U << ADC_SMPR2_SMP8_Pos) /*!< 0x04000000 */
  1009. #define ADC_SMPR2_SMP9_Pos (27U)
  1010. #define ADC_SMPR2_SMP9_Msk (0x7U << ADC_SMPR2_SMP9_Pos) /*!< 0x38000000 */
  1011. #define ADC_SMPR2_SMP9 ADC_SMPR2_SMP9_Msk /*!<SMP9[2:0] bits (Channel 9 Sample time selection) */
  1012. #define ADC_SMPR2_SMP9_0 (0x1U << ADC_SMPR2_SMP9_Pos) /*!< 0x08000000 */
  1013. #define ADC_SMPR2_SMP9_1 (0x2U << ADC_SMPR2_SMP9_Pos) /*!< 0x10000000 */
  1014. #define ADC_SMPR2_SMP9_2 (0x4U << ADC_SMPR2_SMP9_Pos) /*!< 0x20000000 */
  1015. /****************** Bit definition for ADC_JOFR1 register *******************/
  1016. #define ADC_JOFR1_JOFFSET1_Pos (0U)
  1017. #define ADC_JOFR1_JOFFSET1_Msk (0xFFFU << ADC_JOFR1_JOFFSET1_Pos) /*!< 0x00000FFF */
  1018. #define ADC_JOFR1_JOFFSET1 ADC_JOFR1_JOFFSET1_Msk /*!<Data offset for injected channel 1 */
  1019. /****************** Bit definition for ADC_JOFR2 register *******************/
  1020. #define ADC_JOFR2_JOFFSET2_Pos (0U)
  1021. #define ADC_JOFR2_JOFFSET2_Msk (0xFFFU << ADC_JOFR2_JOFFSET2_Pos) /*!< 0x00000FFF */
  1022. #define ADC_JOFR2_JOFFSET2 ADC_JOFR2_JOFFSET2_Msk /*!<Data offset for injected channel 2 */
  1023. /****************** Bit definition for ADC_JOFR3 register *******************/
  1024. #define ADC_JOFR3_JOFFSET3_Pos (0U)
  1025. #define ADC_JOFR3_JOFFSET3_Msk (0xFFFU << ADC_JOFR3_JOFFSET3_Pos) /*!< 0x00000FFF */
  1026. #define ADC_JOFR3_JOFFSET3 ADC_JOFR3_JOFFSET3_Msk /*!<Data offset for injected channel 3 */
  1027. /****************** Bit definition for ADC_JOFR4 register *******************/
  1028. #define ADC_JOFR4_JOFFSET4_Pos (0U)
  1029. #define ADC_JOFR4_JOFFSET4_Msk (0xFFFU << ADC_JOFR4_JOFFSET4_Pos) /*!< 0x00000FFF */
  1030. #define ADC_JOFR4_JOFFSET4 ADC_JOFR4_JOFFSET4_Msk /*!<Data offset for injected channel 4 */
  1031. /******************* Bit definition for ADC_HTR register ********************/
  1032. #define ADC_HTR_HT_Pos (0U)
  1033. #define ADC_HTR_HT_Msk (0xFFFU << ADC_HTR_HT_Pos) /*!< 0x00000FFF */
  1034. #define ADC_HTR_HT ADC_HTR_HT_Msk /*!<Analog watchdog high threshold */
  1035. /******************* Bit definition for ADC_LTR register ********************/
  1036. #define ADC_LTR_LT_Pos (0U)
  1037. #define ADC_LTR_LT_Msk (0xFFFU << ADC_LTR_LT_Pos) /*!< 0x00000FFF */
  1038. #define ADC_LTR_LT ADC_LTR_LT_Msk /*!<Analog watchdog low threshold */
  1039. /******************* Bit definition for ADC_SQR1 register *******************/
  1040. #define ADC_SQR1_SQ13_Pos (0U)
  1041. #define ADC_SQR1_SQ13_Msk (0x1FU << ADC_SQR1_SQ13_Pos) /*!< 0x0000001F */
  1042. #define ADC_SQR1_SQ13 ADC_SQR1_SQ13_Msk /*!<SQ13[4:0] bits (13th conversion in regular sequence) */
  1043. #define ADC_SQR1_SQ13_0 (0x01U << ADC_SQR1_SQ13_Pos) /*!< 0x00000001 */
  1044. #define ADC_SQR1_SQ13_1 (0x02U << ADC_SQR1_SQ13_Pos) /*!< 0x00000002 */
  1045. #define ADC_SQR1_SQ13_2 (0x04U << ADC_SQR1_SQ13_Pos) /*!< 0x00000004 */
  1046. #define ADC_SQR1_SQ13_3 (0x08U << ADC_SQR1_SQ13_Pos) /*!< 0x00000008 */
  1047. #define ADC_SQR1_SQ13_4 (0x10U << ADC_SQR1_SQ13_Pos) /*!< 0x00000010 */
  1048. #define ADC_SQR1_SQ14_Pos (5U)
  1049. #define ADC_SQR1_SQ14_Msk (0x1FU << ADC_SQR1_SQ14_Pos) /*!< 0x000003E0 */
  1050. #define ADC_SQR1_SQ14 ADC_SQR1_SQ14_Msk /*!<SQ14[4:0] bits (14th conversion in regular sequence) */
  1051. #define ADC_SQR1_SQ14_0 (0x01U << ADC_SQR1_SQ14_Pos) /*!< 0x00000020 */
  1052. #define ADC_SQR1_SQ14_1 (0x02U << ADC_SQR1_SQ14_Pos) /*!< 0x00000040 */
  1053. #define ADC_SQR1_SQ14_2 (0x04U << ADC_SQR1_SQ14_Pos) /*!< 0x00000080 */
  1054. #define ADC_SQR1_SQ14_3 (0x08U << ADC_SQR1_SQ14_Pos) /*!< 0x00000100 */
  1055. #define ADC_SQR1_SQ14_4 (0x10U << ADC_SQR1_SQ14_Pos) /*!< 0x00000200 */
  1056. #define ADC_SQR1_SQ15_Pos (10U)
  1057. #define ADC_SQR1_SQ15_Msk (0x1FU << ADC_SQR1_SQ15_Pos) /*!< 0x00007C00 */
  1058. #define ADC_SQR1_SQ15 ADC_SQR1_SQ15_Msk /*!<SQ15[4:0] bits (15th conversion in regular sequence) */
  1059. #define ADC_SQR1_SQ15_0 (0x01U << ADC_SQR1_SQ15_Pos) /*!< 0x00000400 */
  1060. #define ADC_SQR1_SQ15_1 (0x02U << ADC_SQR1_SQ15_Pos) /*!< 0x00000800 */
  1061. #define ADC_SQR1_SQ15_2 (0x04U << ADC_SQR1_SQ15_Pos) /*!< 0x00001000 */
  1062. #define ADC_SQR1_SQ15_3 (0x08U << ADC_SQR1_SQ15_Pos) /*!< 0x00002000 */
  1063. #define ADC_SQR1_SQ15_4 (0x10U << ADC_SQR1_SQ15_Pos) /*!< 0x00004000 */
  1064. #define ADC_SQR1_SQ16_Pos (15U)
  1065. #define ADC_SQR1_SQ16_Msk (0x1FU << ADC_SQR1_SQ16_Pos) /*!< 0x000F8000 */
  1066. #define ADC_SQR1_SQ16 ADC_SQR1_SQ16_Msk /*!<SQ16[4:0] bits (16th conversion in regular sequence) */
  1067. #define ADC_SQR1_SQ16_0 (0x01U << ADC_SQR1_SQ16_Pos) /*!< 0x00008000 */
  1068. #define ADC_SQR1_SQ16_1 (0x02U << ADC_SQR1_SQ16_Pos) /*!< 0x00010000 */
  1069. #define ADC_SQR1_SQ16_2 (0x04U << ADC_SQR1_SQ16_Pos) /*!< 0x00020000 */
  1070. #define ADC_SQR1_SQ16_3 (0x08U << ADC_SQR1_SQ16_Pos) /*!< 0x00040000 */
  1071. #define ADC_SQR1_SQ16_4 (0x10U << ADC_SQR1_SQ16_Pos) /*!< 0x00080000 */
  1072. #define ADC_SQR1_L_Pos (20U)
  1073. #define ADC_SQR1_L_Msk (0xFU << ADC_SQR1_L_Pos) /*!< 0x00F00000 */
  1074. #define ADC_SQR1_L ADC_SQR1_L_Msk /*!<L[3:0] bits (Regular channel sequence length) */
  1075. #define ADC_SQR1_L_0 (0x1U << ADC_SQR1_L_Pos) /*!< 0x00100000 */
  1076. #define ADC_SQR1_L_1 (0x2U << ADC_SQR1_L_Pos) /*!< 0x00200000 */
  1077. #define ADC_SQR1_L_2 (0x4U << ADC_SQR1_L_Pos) /*!< 0x00400000 */
  1078. #define ADC_SQR1_L_3 (0x8U << ADC_SQR1_L_Pos) /*!< 0x00800000 */
  1079. /******************* Bit definition for ADC_SQR2 register *******************/
  1080. #define ADC_SQR2_SQ7_Pos (0U)
  1081. #define ADC_SQR2_SQ7_Msk (0x1FU << ADC_SQR2_SQ7_Pos) /*!< 0x0000001F */
  1082. #define ADC_SQR2_SQ7 ADC_SQR2_SQ7_Msk /*!<SQ7[4:0] bits (7th conversion in regular sequence) */
  1083. #define ADC_SQR2_SQ7_0 (0x01U << ADC_SQR2_SQ7_Pos) /*!< 0x00000001 */
  1084. #define ADC_SQR2_SQ7_1 (0x02U << ADC_SQR2_SQ7_Pos) /*!< 0x00000002 */
  1085. #define ADC_SQR2_SQ7_2 (0x04U << ADC_SQR2_SQ7_Pos) /*!< 0x00000004 */
  1086. #define ADC_SQR2_SQ7_3 (0x08U << ADC_SQR2_SQ7_Pos) /*!< 0x00000008 */
  1087. #define ADC_SQR2_SQ7_4 (0x10U << ADC_SQR2_SQ7_Pos) /*!< 0x00000010 */
  1088. #define ADC_SQR2_SQ8_Pos (5U)
  1089. #define ADC_SQR2_SQ8_Msk (0x1FU << ADC_SQR2_SQ8_Pos) /*!< 0x000003E0 */
  1090. #define ADC_SQR2_SQ8 ADC_SQR2_SQ8_Msk /*!<SQ8[4:0] bits (8th conversion in regular sequence) */
  1091. #define ADC_SQR2_SQ8_0 (0x01U << ADC_SQR2_SQ8_Pos) /*!< 0x00000020 */
  1092. #define ADC_SQR2_SQ8_1 (0x02U << ADC_SQR2_SQ8_Pos) /*!< 0x00000040 */
  1093. #define ADC_SQR2_SQ8_2 (0x04U << ADC_SQR2_SQ8_Pos) /*!< 0x00000080 */
  1094. #define ADC_SQR2_SQ8_3 (0x08U << ADC_SQR2_SQ8_Pos) /*!< 0x00000100 */
  1095. #define ADC_SQR2_SQ8_4 (0x10U << ADC_SQR2_SQ8_Pos) /*!< 0x00000200 */
  1096. #define ADC_SQR2_SQ9_Pos (10U)
  1097. #define ADC_SQR2_SQ9_Msk (0x1FU << ADC_SQR2_SQ9_Pos) /*!< 0x00007C00 */
  1098. #define ADC_SQR2_SQ9 ADC_SQR2_SQ9_Msk /*!<SQ9[4:0] bits (9th conversion in regular sequence) */
  1099. #define ADC_SQR2_SQ9_0 (0x01U << ADC_SQR2_SQ9_Pos) /*!< 0x00000400 */
  1100. #define ADC_SQR2_SQ9_1 (0x02U << ADC_SQR2_SQ9_Pos) /*!< 0x00000800 */
  1101. #define ADC_SQR2_SQ9_2 (0x04U << ADC_SQR2_SQ9_Pos) /*!< 0x00001000 */
  1102. #define ADC_SQR2_SQ9_3 (0x08U << ADC_SQR2_SQ9_Pos) /*!< 0x00002000 */
  1103. #define ADC_SQR2_SQ9_4 (0x10U << ADC_SQR2_SQ9_Pos) /*!< 0x00004000 */
  1104. #define ADC_SQR2_SQ10_Pos (15U)
  1105. #define ADC_SQR2_SQ10_Msk (0x1FU << ADC_SQR2_SQ10_Pos) /*!< 0x000F8000 */
  1106. #define ADC_SQR2_SQ10 ADC_SQR2_SQ10_Msk /*!<SQ10[4:0] bits (10th conversion in regular sequence) */
  1107. #define ADC_SQR2_SQ10_0 (0x01U << ADC_SQR2_SQ10_Pos) /*!< 0x00008000 */
  1108. #define ADC_SQR2_SQ10_1 (0x02U << ADC_SQR2_SQ10_Pos) /*!< 0x00010000 */
  1109. #define ADC_SQR2_SQ10_2 (0x04U << ADC_SQR2_SQ10_Pos) /*!< 0x00020000 */
  1110. #define ADC_SQR2_SQ10_3 (0x08U << ADC_SQR2_SQ10_Pos) /*!< 0x00040000 */
  1111. #define ADC_SQR2_SQ10_4 (0x10U << ADC_SQR2_SQ10_Pos) /*!< 0x00080000 */
  1112. #define ADC_SQR2_SQ11_Pos (20U)
  1113. #define ADC_SQR2_SQ11_Msk (0x1FU << ADC_SQR2_SQ11_Pos) /*!< 0x01F00000 */
  1114. #define ADC_SQR2_SQ11 ADC_SQR2_SQ11_Msk /*!<SQ11[4:0] bits (11th conversion in regular sequence) */
  1115. #define ADC_SQR2_SQ11_0 (0x01U << ADC_SQR2_SQ11_Pos) /*!< 0x00100000 */
  1116. #define ADC_SQR2_SQ11_1 (0x02U << ADC_SQR2_SQ11_Pos) /*!< 0x00200000 */
  1117. #define ADC_SQR2_SQ11_2 (0x04U << ADC_SQR2_SQ11_Pos) /*!< 0x00400000 */
  1118. #define ADC_SQR2_SQ11_3 (0x08U << ADC_SQR2_SQ11_Pos) /*!< 0x00800000 */
  1119. #define ADC_SQR2_SQ11_4 (0x10U << ADC_SQR2_SQ11_Pos) /*!< 0x01000000 */
  1120. #define ADC_SQR2_SQ12_Pos (25U)
  1121. #define ADC_SQR2_SQ12_Msk (0x1FU << ADC_SQR2_SQ12_Pos) /*!< 0x3E000000 */
  1122. #define ADC_SQR2_SQ12 ADC_SQR2_SQ12_Msk /*!<SQ12[4:0] bits (12th conversion in regular sequence) */
  1123. #define ADC_SQR2_SQ12_0 (0x01U << ADC_SQR2_SQ12_Pos) /*!< 0x02000000 */
  1124. #define ADC_SQR2_SQ12_1 (0x02U << ADC_SQR2_SQ12_Pos) /*!< 0x04000000 */
  1125. #define ADC_SQR2_SQ12_2 (0x04U << ADC_SQR2_SQ12_Pos) /*!< 0x08000000 */
  1126. #define ADC_SQR2_SQ12_3 (0x08U << ADC_SQR2_SQ12_Pos) /*!< 0x10000000 */
  1127. #define ADC_SQR2_SQ12_4 (0x10U << ADC_SQR2_SQ12_Pos) /*!< 0x20000000 */
  1128. /******************* Bit definition for ADC_SQR3 register *******************/
  1129. #define ADC_SQR3_SQ1_Pos (0U)
  1130. #define ADC_SQR3_SQ1_Msk (0x1FU << ADC_SQR3_SQ1_Pos) /*!< 0x0000001F */
  1131. #define ADC_SQR3_SQ1 ADC_SQR3_SQ1_Msk /*!<SQ1[4:0] bits (1st conversion in regular sequence) */
  1132. #define ADC_SQR3_SQ1_0 (0x01U << ADC_SQR3_SQ1_Pos) /*!< 0x00000001 */
  1133. #define ADC_SQR3_SQ1_1 (0x02U << ADC_SQR3_SQ1_Pos) /*!< 0x00000002 */
  1134. #define ADC_SQR3_SQ1_2 (0x04U << ADC_SQR3_SQ1_Pos) /*!< 0x00000004 */
  1135. #define ADC_SQR3_SQ1_3 (0x08U << ADC_SQR3_SQ1_Pos) /*!< 0x00000008 */
  1136. #define ADC_SQR3_SQ1_4 (0x10U << ADC_SQR3_SQ1_Pos) /*!< 0x00000010 */
  1137. #define ADC_SQR3_SQ2_Pos (5U)
  1138. #define ADC_SQR3_SQ2_Msk (0x1FU << ADC_SQR3_SQ2_Pos) /*!< 0x000003E0 */
  1139. #define ADC_SQR3_SQ2 ADC_SQR3_SQ2_Msk /*!<SQ2[4:0] bits (2nd conversion in regular sequence) */
  1140. #define ADC_SQR3_SQ2_0 (0x01U << ADC_SQR3_SQ2_Pos) /*!< 0x00000020 */
  1141. #define ADC_SQR3_SQ2_1 (0x02U << ADC_SQR3_SQ2_Pos) /*!< 0x00000040 */
  1142. #define ADC_SQR3_SQ2_2 (0x04U << ADC_SQR3_SQ2_Pos) /*!< 0x00000080 */
  1143. #define ADC_SQR3_SQ2_3 (0x08U << ADC_SQR3_SQ2_Pos) /*!< 0x00000100 */
  1144. #define ADC_SQR3_SQ2_4 (0x10U << ADC_SQR3_SQ2_Pos) /*!< 0x00000200 */
  1145. #define ADC_SQR3_SQ3_Pos (10U)
  1146. #define ADC_SQR3_SQ3_Msk (0x1FU << ADC_SQR3_SQ3_Pos) /*!< 0x00007C00 */
  1147. #define ADC_SQR3_SQ3 ADC_SQR3_SQ3_Msk /*!<SQ3[4:0] bits (3rd conversion in regular sequence) */
  1148. #define ADC_SQR3_SQ3_0 (0x01U << ADC_SQR3_SQ3_Pos) /*!< 0x00000400 */
  1149. #define ADC_SQR3_SQ3_1 (0x02U << ADC_SQR3_SQ3_Pos) /*!< 0x00000800 */
  1150. #define ADC_SQR3_SQ3_2 (0x04U << ADC_SQR3_SQ3_Pos) /*!< 0x00001000 */
  1151. #define ADC_SQR3_SQ3_3 (0x08U << ADC_SQR3_SQ3_Pos) /*!< 0x00002000 */
  1152. #define ADC_SQR3_SQ3_4 (0x10U << ADC_SQR3_SQ3_Pos) /*!< 0x00004000 */
  1153. #define ADC_SQR3_SQ4_Pos (15U)
  1154. #define ADC_SQR3_SQ4_Msk (0x1FU << ADC_SQR3_SQ4_Pos) /*!< 0x000F8000 */
  1155. #define ADC_SQR3_SQ4 ADC_SQR3_SQ4_Msk /*!<SQ4[4:0] bits (4th conversion in regular sequence) */
  1156. #define ADC_SQR3_SQ4_0 (0x01U << ADC_SQR3_SQ4_Pos) /*!< 0x00008000 */
  1157. #define ADC_SQR3_SQ4_1 (0x02U << ADC_SQR3_SQ4_Pos) /*!< 0x00010000 */
  1158. #define ADC_SQR3_SQ4_2 (0x04U << ADC_SQR3_SQ4_Pos) /*!< 0x00020000 */
  1159. #define ADC_SQR3_SQ4_3 (0x08U << ADC_SQR3_SQ4_Pos) /*!< 0x00040000 */
  1160. #define ADC_SQR3_SQ4_4 (0x10U << ADC_SQR3_SQ4_Pos) /*!< 0x00080000 */
  1161. #define ADC_SQR3_SQ5_Pos (20U)
  1162. #define ADC_SQR3_SQ5_Msk (0x1FU << ADC_SQR3_SQ5_Pos) /*!< 0x01F00000 */
  1163. #define ADC_SQR3_SQ5 ADC_SQR3_SQ5_Msk /*!<SQ5[4:0] bits (5th conversion in regular sequence) */
  1164. #define ADC_SQR3_SQ5_0 (0x01U << ADC_SQR3_SQ5_Pos) /*!< 0x00100000 */
  1165. #define ADC_SQR3_SQ5_1 (0x02U << ADC_SQR3_SQ5_Pos) /*!< 0x00200000 */
  1166. #define ADC_SQR3_SQ5_2 (0x04U << ADC_SQR3_SQ5_Pos) /*!< 0x00400000 */
  1167. #define ADC_SQR3_SQ5_3 (0x08U << ADC_SQR3_SQ5_Pos) /*!< 0x00800000 */
  1168. #define ADC_SQR3_SQ5_4 (0x10U << ADC_SQR3_SQ5_Pos) /*!< 0x01000000 */
  1169. #define ADC_SQR3_SQ6_Pos (25U)
  1170. #define ADC_SQR3_SQ6_Msk (0x1FU << ADC_SQR3_SQ6_Pos) /*!< 0x3E000000 */
  1171. #define ADC_SQR3_SQ6 ADC_SQR3_SQ6_Msk /*!<SQ6[4:0] bits (6th conversion in regular sequence) */
  1172. #define ADC_SQR3_SQ6_0 (0x01U << ADC_SQR3_SQ6_Pos) /*!< 0x02000000 */
  1173. #define ADC_SQR3_SQ6_1 (0x02U << ADC_SQR3_SQ6_Pos) /*!< 0x04000000 */
  1174. #define ADC_SQR3_SQ6_2 (0x04U << ADC_SQR3_SQ6_Pos) /*!< 0x08000000 */
  1175. #define ADC_SQR3_SQ6_3 (0x08U << ADC_SQR3_SQ6_Pos) /*!< 0x10000000 */
  1176. #define ADC_SQR3_SQ6_4 (0x10U << ADC_SQR3_SQ6_Pos) /*!< 0x20000000 */
  1177. /******************* Bit definition for ADC_JSQR register *******************/
  1178. #define ADC_JSQR_JSQ1_Pos (0U)
  1179. #define ADC_JSQR_JSQ1_Msk (0x1FU << ADC_JSQR_JSQ1_Pos) /*!< 0x0000001F */
  1180. #define ADC_JSQR_JSQ1 ADC_JSQR_JSQ1_Msk /*!<JSQ1[4:0] bits (1st conversion in injected sequence) */
  1181. #define ADC_JSQR_JSQ1_0 (0x01U << ADC_JSQR_JSQ1_Pos) /*!< 0x00000001 */
  1182. #define ADC_JSQR_JSQ1_1 (0x02U << ADC_JSQR_JSQ1_Pos) /*!< 0x00000002 */
  1183. #define ADC_JSQR_JSQ1_2 (0x04U << ADC_JSQR_JSQ1_Pos) /*!< 0x00000004 */
  1184. #define ADC_JSQR_JSQ1_3 (0x08U << ADC_JSQR_JSQ1_Pos) /*!< 0x00000008 */
  1185. #define ADC_JSQR_JSQ1_4 (0x10U << ADC_JSQR_JSQ1_Pos) /*!< 0x00000010 */
  1186. #define ADC_JSQR_JSQ2_Pos (5U)
  1187. #define ADC_JSQR_JSQ2_Msk (0x1FU << ADC_JSQR_JSQ2_Pos) /*!< 0x000003E0 */
  1188. #define ADC_JSQR_JSQ2 ADC_JSQR_JSQ2_Msk /*!<JSQ2[4:0] bits (2nd conversion in injected sequence) */
  1189. #define ADC_JSQR_JSQ2_0 (0x01U << ADC_JSQR_JSQ2_Pos) /*!< 0x00000020 */
  1190. #define ADC_JSQR_JSQ2_1 (0x02U << ADC_JSQR_JSQ2_Pos) /*!< 0x00000040 */
  1191. #define ADC_JSQR_JSQ2_2 (0x04U << ADC_JSQR_JSQ2_Pos) /*!< 0x00000080 */
  1192. #define ADC_JSQR_JSQ2_3 (0x08U << ADC_JSQR_JSQ2_Pos) /*!< 0x00000100 */
  1193. #define ADC_JSQR_JSQ2_4 (0x10U << ADC_JSQR_JSQ2_Pos) /*!< 0x00000200 */
  1194. #define ADC_JSQR_JSQ3_Pos (10U)
  1195. #define ADC_JSQR_JSQ3_Msk (0x1FU << ADC_JSQR_JSQ3_Pos) /*!< 0x00007C00 */
  1196. #define ADC_JSQR_JSQ3 ADC_JSQR_JSQ3_Msk /*!<JSQ3[4:0] bits (3rd conversion in injected sequence) */
  1197. #define ADC_JSQR_JSQ3_0 (0x01U << ADC_JSQR_JSQ3_Pos) /*!< 0x00000400 */
  1198. #define ADC_JSQR_JSQ3_1 (0x02U << ADC_JSQR_JSQ3_Pos) /*!< 0x00000800 */
  1199. #define ADC_JSQR_JSQ3_2 (0x04U << ADC_JSQR_JSQ3_Pos) /*!< 0x00001000 */
  1200. #define ADC_JSQR_JSQ3_3 (0x08U << ADC_JSQR_JSQ3_Pos) /*!< 0x00002000 */
  1201. #define ADC_JSQR_JSQ3_4 (0x10U << ADC_JSQR_JSQ3_Pos) /*!< 0x00004000 */
  1202. #define ADC_JSQR_JSQ4_Pos (15U)
  1203. #define ADC_JSQR_JSQ4_Msk (0x1FU << ADC_JSQR_JSQ4_Pos) /*!< 0x000F8000 */
  1204. #define ADC_JSQR_JSQ4 ADC_JSQR_JSQ4_Msk /*!<JSQ4[4:0] bits (4th conversion in injected sequence) */
  1205. #define ADC_JSQR_JSQ4_0 (0x01U << ADC_JSQR_JSQ4_Pos) /*!< 0x00008000 */
  1206. #define ADC_JSQR_JSQ4_1 (0x02U << ADC_JSQR_JSQ4_Pos) /*!< 0x00010000 */
  1207. #define ADC_JSQR_JSQ4_2 (0x04U << ADC_JSQR_JSQ4_Pos) /*!< 0x00020000 */
  1208. #define ADC_JSQR_JSQ4_3 (0x08U << ADC_JSQR_JSQ4_Pos) /*!< 0x00040000 */
  1209. #define ADC_JSQR_JSQ4_4 (0x10U << ADC_JSQR_JSQ4_Pos) /*!< 0x00080000 */
  1210. #define ADC_JSQR_JL_Pos (20U)
  1211. #define ADC_JSQR_JL_Msk (0x3U << ADC_JSQR_JL_Pos) /*!< 0x00300000 */
  1212. #define ADC_JSQR_JL ADC_JSQR_JL_Msk /*!<JL[1:0] bits (Injected Sequence length) */
  1213. #define ADC_JSQR_JL_0 (0x1U << ADC_JSQR_JL_Pos) /*!< 0x00100000 */
  1214. #define ADC_JSQR_JL_1 (0x2U << ADC_JSQR_JL_Pos) /*!< 0x00200000 */
  1215. /******************* Bit definition for ADC_JDR1 register *******************/
  1216. #define ADC_JDR1_JDATA_Pos (0U)
  1217. #define ADC_JDR1_JDATA_Msk (0xFFFFU << ADC_JDR1_JDATA_Pos) /*!< 0x0000FFFF */
  1218. #define ADC_JDR1_JDATA ADC_JDR1_JDATA_Msk /*!<Injected data */
  1219. /******************* Bit definition for ADC_JDR2 register *******************/
  1220. #define ADC_JDR2_JDATA_Pos (0U)
  1221. #define ADC_JDR2_JDATA_Msk (0xFFFFU << ADC_JDR2_JDATA_Pos) /*!< 0x0000FFFF */
  1222. #define ADC_JDR2_JDATA ADC_JDR2_JDATA_Msk /*!<Injected data */
  1223. /******************* Bit definition for ADC_JDR3 register *******************/
  1224. #define ADC_JDR3_JDATA_Pos (0U)
  1225. #define ADC_JDR3_JDATA_Msk (0xFFFFU << ADC_JDR3_JDATA_Pos) /*!< 0x0000FFFF */
  1226. #define ADC_JDR3_JDATA ADC_JDR3_JDATA_Msk /*!<Injected data */
  1227. /******************* Bit definition for ADC_JDR4 register *******************/
  1228. #define ADC_JDR4_JDATA_Pos (0U)
  1229. #define ADC_JDR4_JDATA_Msk (0xFFFFU << ADC_JDR4_JDATA_Pos) /*!< 0x0000FFFF */
  1230. #define ADC_JDR4_JDATA ADC_JDR4_JDATA_Msk /*!<Injected data */
  1231. /******************** Bit definition for ADC_DR register ********************/
  1232. #define ADC_DR_DATA_Pos (0U)
  1233. #define ADC_DR_DATA_Msk (0xFFFFU << ADC_DR_DATA_Pos) /*!< 0x0000FFFF */
  1234. #define ADC_DR_DATA ADC_DR_DATA_Msk /*!<Regular data */
  1235. #define ADC_DR_ADC2DATA_Pos (16U)
  1236. #define ADC_DR_ADC2DATA_Msk (0xFFFFU << ADC_DR_ADC2DATA_Pos) /*!< 0xFFFF0000 */
  1237. #define ADC_DR_ADC2DATA ADC_DR_ADC2DATA_Msk /*!<ADC2 data */
  1238. /******************* Bit definition for ADC_CSR register ********************/
  1239. #define ADC_CSR_AWD1_Pos (0U)
  1240. #define ADC_CSR_AWD1_Msk (0x1U << ADC_CSR_AWD1_Pos) /*!< 0x00000001 */
  1241. #define ADC_CSR_AWD1 ADC_CSR_AWD1_Msk /*!<ADC1 Analog watchdog flag */
  1242. #define ADC_CSR_EOC1_Pos (1U)
  1243. #define ADC_CSR_EOC1_Msk (0x1U << ADC_CSR_EOC1_Pos) /*!< 0x00000002 */
  1244. #define ADC_CSR_EOC1 ADC_CSR_EOC1_Msk /*!<ADC1 End of conversion */
  1245. #define ADC_CSR_JEOC1_Pos (2U)
  1246. #define ADC_CSR_JEOC1_Msk (0x1U << ADC_CSR_JEOC1_Pos) /*!< 0x00000004 */
  1247. #define ADC_CSR_JEOC1 ADC_CSR_JEOC1_Msk /*!<ADC1 Injected channel end of conversion */
  1248. #define ADC_CSR_JSTRT1_Pos (3U)
  1249. #define ADC_CSR_JSTRT1_Msk (0x1U << ADC_CSR_JSTRT1_Pos) /*!< 0x00000008 */
  1250. #define ADC_CSR_JSTRT1 ADC_CSR_JSTRT1_Msk /*!<ADC1 Injected channel Start flag */
  1251. #define ADC_CSR_STRT1_Pos (4U)
  1252. #define ADC_CSR_STRT1_Msk (0x1U << ADC_CSR_STRT1_Pos) /*!< 0x00000010 */
  1253. #define ADC_CSR_STRT1 ADC_CSR_STRT1_Msk /*!<ADC1 Regular channel Start flag */
  1254. #define ADC_CSR_OVR1_Pos (5U)
  1255. #define ADC_CSR_OVR1_Msk (0x1U << ADC_CSR_OVR1_Pos) /*!< 0x00000020 */
  1256. #define ADC_CSR_OVR1 ADC_CSR_OVR1_Msk /*!<ADC1 DMA overrun flag */
  1257. /* Legacy defines */
  1258. #define ADC_CSR_DOVR1 ADC_CSR_OVR1
  1259. /******************* Bit definition for ADC_CCR register ********************/
  1260. #define ADC_CCR_MULTI_Pos (0U)
  1261. #define ADC_CCR_MULTI_Msk (0x1FU << ADC_CCR_MULTI_Pos) /*!< 0x0000001F */
  1262. #define ADC_CCR_MULTI ADC_CCR_MULTI_Msk /*!<MULTI[4:0] bits (Multi-ADC mode selection) */
  1263. #define ADC_CCR_MULTI_0 (0x01U << ADC_CCR_MULTI_Pos) /*!< 0x00000001 */
  1264. #define ADC_CCR_MULTI_1 (0x02U << ADC_CCR_MULTI_Pos) /*!< 0x00000002 */
  1265. #define ADC_CCR_MULTI_2 (0x04U << ADC_CCR_MULTI_Pos) /*!< 0x00000004 */
  1266. #define ADC_CCR_MULTI_3 (0x08U << ADC_CCR_MULTI_Pos) /*!< 0x00000008 */
  1267. #define ADC_CCR_MULTI_4 (0x10U << ADC_CCR_MULTI_Pos) /*!< 0x00000010 */
  1268. #define ADC_CCR_DELAY_Pos (8U)
  1269. #define ADC_CCR_DELAY_Msk (0xFU << ADC_CCR_DELAY_Pos) /*!< 0x00000F00 */
  1270. #define ADC_CCR_DELAY ADC_CCR_DELAY_Msk /*!<DELAY[3:0] bits (Delay between 2 sampling phases) */
  1271. #define ADC_CCR_DELAY_0 (0x1U << ADC_CCR_DELAY_Pos) /*!< 0x00000100 */
  1272. #define ADC_CCR_DELAY_1 (0x2U << ADC_CCR_DELAY_Pos) /*!< 0x00000200 */
  1273. #define ADC_CCR_DELAY_2 (0x4U << ADC_CCR_DELAY_Pos) /*!< 0x00000400 */
  1274. #define ADC_CCR_DELAY_3 (0x8U << ADC_CCR_DELAY_Pos) /*!< 0x00000800 */
  1275. #define ADC_CCR_DDS_Pos (13U)
  1276. #define ADC_CCR_DDS_Msk (0x1U << ADC_CCR_DDS_Pos) /*!< 0x00002000 */
  1277. #define ADC_CCR_DDS ADC_CCR_DDS_Msk /*!<DMA disable selection (Multi-ADC mode) */
  1278. #define ADC_CCR_DMA_Pos (14U)
  1279. #define ADC_CCR_DMA_Msk (0x3U << ADC_CCR_DMA_Pos) /*!< 0x0000C000 */
  1280. #define ADC_CCR_DMA ADC_CCR_DMA_Msk /*!<DMA[1:0] bits (Direct Memory Access mode for multimode) */
  1281. #define ADC_CCR_DMA_0 (0x1U << ADC_CCR_DMA_Pos) /*!< 0x00004000 */
  1282. #define ADC_CCR_DMA_1 (0x2U << ADC_CCR_DMA_Pos) /*!< 0x00008000 */
  1283. #define ADC_CCR_ADCPRE_Pos (16U)
  1284. #define ADC_CCR_ADCPRE_Msk (0x3U << ADC_CCR_ADCPRE_Pos) /*!< 0x00030000 */
  1285. #define ADC_CCR_ADCPRE ADC_CCR_ADCPRE_Msk /*!<ADCPRE[1:0] bits (ADC prescaler) */
  1286. #define ADC_CCR_ADCPRE_0 (0x1U << ADC_CCR_ADCPRE_Pos) /*!< 0x00010000 */
  1287. #define ADC_CCR_ADCPRE_1 (0x2U << ADC_CCR_ADCPRE_Pos) /*!< 0x00020000 */
  1288. #define ADC_CCR_VBATE_Pos (22U)
  1289. #define ADC_CCR_VBATE_Msk (0x1U << ADC_CCR_VBATE_Pos) /*!< 0x00400000 */
  1290. #define ADC_CCR_VBATE ADC_CCR_VBATE_Msk /*!<VBAT Enable */
  1291. #define ADC_CCR_TSVREFE_Pos (23U)
  1292. #define ADC_CCR_TSVREFE_Msk (0x1U << ADC_CCR_TSVREFE_Pos) /*!< 0x00800000 */
  1293. #define ADC_CCR_TSVREFE ADC_CCR_TSVREFE_Msk /*!<Temperature Sensor and VREFINT Enable */
  1294. /******************* Bit definition for ADC_CDR register ********************/
  1295. #define ADC_CDR_DATA1_Pos (0U)
  1296. #define ADC_CDR_DATA1_Msk (0xFFFFU << ADC_CDR_DATA1_Pos) /*!< 0x0000FFFF */
  1297. #define ADC_CDR_DATA1 ADC_CDR_DATA1_Msk /*!<1st data of a pair of regular conversions */
  1298. #define ADC_CDR_DATA2_Pos (16U)
  1299. #define ADC_CDR_DATA2_Msk (0xFFFFU << ADC_CDR_DATA2_Pos) /*!< 0xFFFF0000 */
  1300. #define ADC_CDR_DATA2 ADC_CDR_DATA2_Msk /*!<2nd data of a pair of regular conversions */
  1301. /* Legacy defines */
  1302. #define ADC_CDR_RDATA_MST ADC_CDR_DATA1
  1303. #define ADC_CDR_RDATA_SLV ADC_CDR_DATA2
  1304. /******************************************************************************/
  1305. /* */
  1306. /* CRC calculation unit */
  1307. /* */
  1308. /******************************************************************************/
  1309. /******************* Bit definition for CRC_DR register *********************/
  1310. #define CRC_DR_DR_Pos (0U)
  1311. #define CRC_DR_DR_Msk (0xFFFFFFFFU << CRC_DR_DR_Pos) /*!< 0xFFFFFFFF */
  1312. #define CRC_DR_DR CRC_DR_DR_Msk /*!< Data register bits */
  1313. /******************* Bit definition for CRC_IDR register ********************/
  1314. #define CRC_IDR_IDR_Pos (0U)
  1315. #define CRC_IDR_IDR_Msk (0xFFU << CRC_IDR_IDR_Pos) /*!< 0x000000FF */
  1316. #define CRC_IDR_IDR CRC_IDR_IDR_Msk /*!< General-purpose 8-bit data register bits */
  1317. /******************** Bit definition for CRC_CR register ********************/
  1318. #define CRC_CR_RESET_Pos (0U)
  1319. #define CRC_CR_RESET_Msk (0x1U << CRC_CR_RESET_Pos) /*!< 0x00000001 */
  1320. #define CRC_CR_RESET CRC_CR_RESET_Msk /*!< RESET bit */
  1321. /******************************************************************************/
  1322. /* */
  1323. /* DMA Controller */
  1324. /* */
  1325. /******************************************************************************/
  1326. /******************** Bits definition for DMA_SxCR register *****************/
  1327. #define DMA_SxCR_CHSEL_Pos (25U)
  1328. #define DMA_SxCR_CHSEL_Msk (0x7U << DMA_SxCR_CHSEL_Pos) /*!< 0x0E000000 */
  1329. #define DMA_SxCR_CHSEL DMA_SxCR_CHSEL_Msk
  1330. #define DMA_SxCR_CHSEL_0 0x02000000U
  1331. #define DMA_SxCR_CHSEL_1 0x04000000U
  1332. #define DMA_SxCR_CHSEL_2 0x08000000U
  1333. #define DMA_SxCR_MBURST_Pos (23U)
  1334. #define DMA_SxCR_MBURST_Msk (0x3U << DMA_SxCR_MBURST_Pos) /*!< 0x01800000 */
  1335. #define DMA_SxCR_MBURST DMA_SxCR_MBURST_Msk
  1336. #define DMA_SxCR_MBURST_0 (0x1U << DMA_SxCR_MBURST_Pos) /*!< 0x00800000 */
  1337. #define DMA_SxCR_MBURST_1 (0x2U << DMA_SxCR_MBURST_Pos) /*!< 0x01000000 */
  1338. #define DMA_SxCR_PBURST_Pos (21U)
  1339. #define DMA_SxCR_PBURST_Msk (0x3U << DMA_SxCR_PBURST_Pos) /*!< 0x00600000 */
  1340. #define DMA_SxCR_PBURST DMA_SxCR_PBURST_Msk
  1341. #define DMA_SxCR_PBURST_0 (0x1U << DMA_SxCR_PBURST_Pos) /*!< 0x00200000 */
  1342. #define DMA_SxCR_PBURST_1 (0x2U << DMA_SxCR_PBURST_Pos) /*!< 0x00400000 */
  1343. #define DMA_SxCR_CT_Pos (19U)
  1344. #define DMA_SxCR_CT_Msk (0x1U << DMA_SxCR_CT_Pos) /*!< 0x00080000 */
  1345. #define DMA_SxCR_CT DMA_SxCR_CT_Msk
  1346. #define DMA_SxCR_DBM_Pos (18U)
  1347. #define DMA_SxCR_DBM_Msk (0x1U << DMA_SxCR_DBM_Pos) /*!< 0x00040000 */
  1348. #define DMA_SxCR_DBM DMA_SxCR_DBM_Msk
  1349. #define DMA_SxCR_PL_Pos (16U)
  1350. #define DMA_SxCR_PL_Msk (0x3U << DMA_SxCR_PL_Pos) /*!< 0x00030000 */
  1351. #define DMA_SxCR_PL DMA_SxCR_PL_Msk
  1352. #define DMA_SxCR_PL_0 (0x1U << DMA_SxCR_PL_Pos) /*!< 0x00010000 */
  1353. #define DMA_SxCR_PL_1 (0x2U << DMA_SxCR_PL_Pos) /*!< 0x00020000 */
  1354. #define DMA_SxCR_PINCOS_Pos (15U)
  1355. #define DMA_SxCR_PINCOS_Msk (0x1U << DMA_SxCR_PINCOS_Pos) /*!< 0x00008000 */
  1356. #define DMA_SxCR_PINCOS DMA_SxCR_PINCOS_Msk
  1357. #define DMA_SxCR_MSIZE_Pos (13U)
  1358. #define DMA_SxCR_MSIZE_Msk (0x3U << DMA_SxCR_MSIZE_Pos) /*!< 0x00006000 */
  1359. #define DMA_SxCR_MSIZE DMA_SxCR_MSIZE_Msk
  1360. #define DMA_SxCR_MSIZE_0 (0x1U << DMA_SxCR_MSIZE_Pos) /*!< 0x00002000 */
  1361. #define DMA_SxCR_MSIZE_1 (0x2U << DMA_SxCR_MSIZE_Pos) /*!< 0x00004000 */
  1362. #define DMA_SxCR_PSIZE_Pos (11U)
  1363. #define DMA_SxCR_PSIZE_Msk (0x3U << DMA_SxCR_PSIZE_Pos) /*!< 0x00001800 */
  1364. #define DMA_SxCR_PSIZE DMA_SxCR_PSIZE_Msk
  1365. #define DMA_SxCR_PSIZE_0 (0x1U << DMA_SxCR_PSIZE_Pos) /*!< 0x00000800 */
  1366. #define DMA_SxCR_PSIZE_1 (0x2U << DMA_SxCR_PSIZE_Pos) /*!< 0x00001000 */
  1367. #define DMA_SxCR_MINC_Pos (10U)
  1368. #define DMA_SxCR_MINC_Msk (0x1U << DMA_SxCR_MINC_Pos) /*!< 0x00000400 */
  1369. #define DMA_SxCR_MINC DMA_SxCR_MINC_Msk
  1370. #define DMA_SxCR_PINC_Pos (9U)
  1371. #define DMA_SxCR_PINC_Msk (0x1U << DMA_SxCR_PINC_Pos) /*!< 0x00000200 */
  1372. #define DMA_SxCR_PINC DMA_SxCR_PINC_Msk
  1373. #define DMA_SxCR_CIRC_Pos (8U)
  1374. #define DMA_SxCR_CIRC_Msk (0x1U << DMA_SxCR_CIRC_Pos) /*!< 0x00000100 */
  1375. #define DMA_SxCR_CIRC DMA_SxCR_CIRC_Msk
  1376. #define DMA_SxCR_DIR_Pos (6U)
  1377. #define DMA_SxCR_DIR_Msk (0x3U << DMA_SxCR_DIR_Pos) /*!< 0x000000C0 */
  1378. #define DMA_SxCR_DIR DMA_SxCR_DIR_Msk
  1379. #define DMA_SxCR_DIR_0 (0x1U << DMA_SxCR_DIR_Pos) /*!< 0x00000040 */
  1380. #define DMA_SxCR_DIR_1 (0x2U << DMA_SxCR_DIR_Pos) /*!< 0x00000080 */
  1381. #define DMA_SxCR_PFCTRL_Pos (5U)
  1382. #define DMA_SxCR_PFCTRL_Msk (0x1U << DMA_SxCR_PFCTRL_Pos) /*!< 0x00000020 */
  1383. #define DMA_SxCR_PFCTRL DMA_SxCR_PFCTRL_Msk
  1384. #define DMA_SxCR_TCIE_Pos (4U)
  1385. #define DMA_SxCR_TCIE_Msk (0x1U << DMA_SxCR_TCIE_Pos) /*!< 0x00000010 */
  1386. #define DMA_SxCR_TCIE DMA_SxCR_TCIE_Msk
  1387. #define DMA_SxCR_HTIE_Pos (3U)
  1388. #define DMA_SxCR_HTIE_Msk (0x1U << DMA_SxCR_HTIE_Pos) /*!< 0x00000008 */
  1389. #define DMA_SxCR_HTIE DMA_SxCR_HTIE_Msk
  1390. #define DMA_SxCR_TEIE_Pos (2U)
  1391. #define DMA_SxCR_TEIE_Msk (0x1U << DMA_SxCR_TEIE_Pos) /*!< 0x00000004 */
  1392. #define DMA_SxCR_TEIE DMA_SxCR_TEIE_Msk
  1393. #define DMA_SxCR_DMEIE_Pos (1U)
  1394. #define DMA_SxCR_DMEIE_Msk (0x1U << DMA_SxCR_DMEIE_Pos) /*!< 0x00000002 */
  1395. #define DMA_SxCR_DMEIE DMA_SxCR_DMEIE_Msk
  1396. #define DMA_SxCR_EN_Pos (0U)
  1397. #define DMA_SxCR_EN_Msk (0x1U << DMA_SxCR_EN_Pos) /*!< 0x00000001 */
  1398. #define DMA_SxCR_EN DMA_SxCR_EN_Msk
  1399. /* Legacy defines */
  1400. #define DMA_SxCR_ACK_Pos (20U)
  1401. #define DMA_SxCR_ACK_Msk (0x1U << DMA_SxCR_ACK_Pos) /*!< 0x00100000 */
  1402. #define DMA_SxCR_ACK DMA_SxCR_ACK_Msk
  1403. /******************** Bits definition for DMA_SxCNDTR register **************/
  1404. #define DMA_SxNDT_Pos (0U)
  1405. #define DMA_SxNDT_Msk (0xFFFFU << DMA_SxNDT_Pos) /*!< 0x0000FFFF */
  1406. #define DMA_SxNDT DMA_SxNDT_Msk
  1407. #define DMA_SxNDT_0 (0x0001U << DMA_SxNDT_Pos) /*!< 0x00000001 */
  1408. #define DMA_SxNDT_1 (0x0002U << DMA_SxNDT_Pos) /*!< 0x00000002 */
  1409. #define DMA_SxNDT_2 (0x0004U << DMA_SxNDT_Pos) /*!< 0x00000004 */
  1410. #define DMA_SxNDT_3 (0x0008U << DMA_SxNDT_Pos) /*!< 0x00000008 */
  1411. #define DMA_SxNDT_4 (0x0010U << DMA_SxNDT_Pos) /*!< 0x00000010 */
  1412. #define DMA_SxNDT_5 (0x0020U << DMA_SxNDT_Pos) /*!< 0x00000020 */
  1413. #define DMA_SxNDT_6 (0x0040U << DMA_SxNDT_Pos) /*!< 0x00000040 */
  1414. #define DMA_SxNDT_7 (0x0080U << DMA_SxNDT_Pos) /*!< 0x00000080 */
  1415. #define DMA_SxNDT_8 (0x0100U << DMA_SxNDT_Pos) /*!< 0x00000100 */
  1416. #define DMA_SxNDT_9 (0x0200U << DMA_SxNDT_Pos) /*!< 0x00000200 */
  1417. #define DMA_SxNDT_10 (0x0400U << DMA_SxNDT_Pos) /*!< 0x00000400 */
  1418. #define DMA_SxNDT_11 (0x0800U << DMA_SxNDT_Pos) /*!< 0x00000800 */
  1419. #define DMA_SxNDT_12 (0x1000U << DMA_SxNDT_Pos) /*!< 0x00001000 */
  1420. #define DMA_SxNDT_13 (0x2000U << DMA_SxNDT_Pos) /*!< 0x00002000 */
  1421. #define DMA_SxNDT_14 (0x4000U << DMA_SxNDT_Pos) /*!< 0x00004000 */
  1422. #define DMA_SxNDT_15 (0x8000U << DMA_SxNDT_Pos) /*!< 0x00008000 */
  1423. /******************** Bits definition for DMA_SxFCR register ****************/
  1424. #define DMA_SxFCR_FEIE_Pos (7U)
  1425. #define DMA_SxFCR_FEIE_Msk (0x1U << DMA_SxFCR_FEIE_Pos) /*!< 0x00000080 */
  1426. #define DMA_SxFCR_FEIE DMA_SxFCR_FEIE_Msk
  1427. #define DMA_SxFCR_FS_Pos (3U)
  1428. #define DMA_SxFCR_FS_Msk (0x7U << DMA_SxFCR_FS_Pos) /*!< 0x00000038 */
  1429. #define DMA_SxFCR_FS DMA_SxFCR_FS_Msk
  1430. #define DMA_SxFCR_FS_0 (0x1U << DMA_SxFCR_FS_Pos) /*!< 0x00000008 */
  1431. #define DMA_SxFCR_FS_1 (0x2U << DMA_SxFCR_FS_Pos) /*!< 0x00000010 */
  1432. #define DMA_SxFCR_FS_2 (0x4U << DMA_SxFCR_FS_Pos) /*!< 0x00000020 */
  1433. #define DMA_SxFCR_DMDIS_Pos (2U)
  1434. #define DMA_SxFCR_DMDIS_Msk (0x1U << DMA_SxFCR_DMDIS_Pos) /*!< 0x00000004 */
  1435. #define DMA_SxFCR_DMDIS DMA_SxFCR_DMDIS_Msk
  1436. #define DMA_SxFCR_FTH_Pos (0U)
  1437. #define DMA_SxFCR_FTH_Msk (0x3U << DMA_SxFCR_FTH_Pos) /*!< 0x00000003 */
  1438. #define DMA_SxFCR_FTH DMA_SxFCR_FTH_Msk
  1439. #define DMA_SxFCR_FTH_0 (0x1U << DMA_SxFCR_FTH_Pos) /*!< 0x00000001 */
  1440. #define DMA_SxFCR_FTH_1 (0x2U << DMA_SxFCR_FTH_Pos) /*!< 0x00000002 */
  1441. /******************** Bits definition for DMA_LISR register *****************/
  1442. #define DMA_LISR_TCIF3_Pos (27U)
  1443. #define DMA_LISR_TCIF3_Msk (0x1U << DMA_LISR_TCIF3_Pos) /*!< 0x08000000 */
  1444. #define DMA_LISR_TCIF3 DMA_LISR_TCIF3_Msk
  1445. #define DMA_LISR_HTIF3_Pos (26U)
  1446. #define DMA_LISR_HTIF3_Msk (0x1U << DMA_LISR_HTIF3_Pos) /*!< 0x04000000 */
  1447. #define DMA_LISR_HTIF3 DMA_LISR_HTIF3_Msk
  1448. #define DMA_LISR_TEIF3_Pos (25U)
  1449. #define DMA_LISR_TEIF3_Msk (0x1U << DMA_LISR_TEIF3_Pos) /*!< 0x02000000 */
  1450. #define DMA_LISR_TEIF3 DMA_LISR_TEIF3_Msk
  1451. #define DMA_LISR_DMEIF3_Pos (24U)
  1452. #define DMA_LISR_DMEIF3_Msk (0x1U << DMA_LISR_DMEIF3_Pos) /*!< 0x01000000 */
  1453. #define DMA_LISR_DMEIF3 DMA_LISR_DMEIF3_Msk
  1454. #define DMA_LISR_FEIF3_Pos (22U)
  1455. #define DMA_LISR_FEIF3_Msk (0x1U << DMA_LISR_FEIF3_Pos) /*!< 0x00400000 */
  1456. #define DMA_LISR_FEIF3 DMA_LISR_FEIF3_Msk
  1457. #define DMA_LISR_TCIF2_Pos (21U)
  1458. #define DMA_LISR_TCIF2_Msk (0x1U << DMA_LISR_TCIF2_Pos) /*!< 0x00200000 */
  1459. #define DMA_LISR_TCIF2 DMA_LISR_TCIF2_Msk
  1460. #define DMA_LISR_HTIF2_Pos (20U)
  1461. #define DMA_LISR_HTIF2_Msk (0x1U << DMA_LISR_HTIF2_Pos) /*!< 0x00100000 */
  1462. #define DMA_LISR_HTIF2 DMA_LISR_HTIF2_Msk
  1463. #define DMA_LISR_TEIF2_Pos (19U)
  1464. #define DMA_LISR_TEIF2_Msk (0x1U << DMA_LISR_TEIF2_Pos) /*!< 0x00080000 */
  1465. #define DMA_LISR_TEIF2 DMA_LISR_TEIF2_Msk
  1466. #define DMA_LISR_DMEIF2_Pos (18U)
  1467. #define DMA_LISR_DMEIF2_Msk (0x1U << DMA_LISR_DMEIF2_Pos) /*!< 0x00040000 */
  1468. #define DMA_LISR_DMEIF2 DMA_LISR_DMEIF2_Msk
  1469. #define DMA_LISR_FEIF2_Pos (16U)
  1470. #define DMA_LISR_FEIF2_Msk (0x1U << DMA_LISR_FEIF2_Pos) /*!< 0x00010000 */
  1471. #define DMA_LISR_FEIF2 DMA_LISR_FEIF2_Msk
  1472. #define DMA_LISR_TCIF1_Pos (11U)
  1473. #define DMA_LISR_TCIF1_Msk (0x1U << DMA_LISR_TCIF1_Pos) /*!< 0x00000800 */
  1474. #define DMA_LISR_TCIF1 DMA_LISR_TCIF1_Msk
  1475. #define DMA_LISR_HTIF1_Pos (10U)
  1476. #define DMA_LISR_HTIF1_Msk (0x1U << DMA_LISR_HTIF1_Pos) /*!< 0x00000400 */
  1477. #define DMA_LISR_HTIF1 DMA_LISR_HTIF1_Msk
  1478. #define DMA_LISR_TEIF1_Pos (9U)
  1479. #define DMA_LISR_TEIF1_Msk (0x1U << DMA_LISR_TEIF1_Pos) /*!< 0x00000200 */
  1480. #define DMA_LISR_TEIF1 DMA_LISR_TEIF1_Msk
  1481. #define DMA_LISR_DMEIF1_Pos (8U)
  1482. #define DMA_LISR_DMEIF1_Msk (0x1U << DMA_LISR_DMEIF1_Pos) /*!< 0x00000100 */
  1483. #define DMA_LISR_DMEIF1 DMA_LISR_DMEIF1_Msk
  1484. #define DMA_LISR_FEIF1_Pos (6U)
  1485. #define DMA_LISR_FEIF1_Msk (0x1U << DMA_LISR_FEIF1_Pos) /*!< 0x00000040 */
  1486. #define DMA_LISR_FEIF1 DMA_LISR_FEIF1_Msk
  1487. #define DMA_LISR_TCIF0_Pos (5U)
  1488. #define DMA_LISR_TCIF0_Msk (0x1U << DMA_LISR_TCIF0_Pos) /*!< 0x00000020 */
  1489. #define DMA_LISR_TCIF0 DMA_LISR_TCIF0_Msk
  1490. #define DMA_LISR_HTIF0_Pos (4U)
  1491. #define DMA_LISR_HTIF0_Msk (0x1U << DMA_LISR_HTIF0_Pos) /*!< 0x00000010 */
  1492. #define DMA_LISR_HTIF0 DMA_LISR_HTIF0_Msk
  1493. #define DMA_LISR_TEIF0_Pos (3U)
  1494. #define DMA_LISR_TEIF0_Msk (0x1U << DMA_LISR_TEIF0_Pos) /*!< 0x00000008 */
  1495. #define DMA_LISR_TEIF0 DMA_LISR_TEIF0_Msk
  1496. #define DMA_LISR_DMEIF0_Pos (2U)
  1497. #define DMA_LISR_DMEIF0_Msk (0x1U << DMA_LISR_DMEIF0_Pos) /*!< 0x00000004 */
  1498. #define DMA_LISR_DMEIF0 DMA_LISR_DMEIF0_Msk
  1499. #define DMA_LISR_FEIF0_Pos (0U)
  1500. #define DMA_LISR_FEIF0_Msk (0x1U << DMA_LISR_FEIF0_Pos) /*!< 0x00000001 */
  1501. #define DMA_LISR_FEIF0 DMA_LISR_FEIF0_Msk
  1502. /******************** Bits definition for DMA_HISR register *****************/
  1503. #define DMA_HISR_TCIF7_Pos (27U)
  1504. #define DMA_HISR_TCIF7_Msk (0x1U << DMA_HISR_TCIF7_Pos) /*!< 0x08000000 */
  1505. #define DMA_HISR_TCIF7 DMA_HISR_TCIF7_Msk
  1506. #define DMA_HISR_HTIF7_Pos (26U)
  1507. #define DMA_HISR_HTIF7_Msk (0x1U << DMA_HISR_HTIF7_Pos) /*!< 0x04000000 */
  1508. #define DMA_HISR_HTIF7 DMA_HISR_HTIF7_Msk
  1509. #define DMA_HISR_TEIF7_Pos (25U)
  1510. #define DMA_HISR_TEIF7_Msk (0x1U << DMA_HISR_TEIF7_Pos) /*!< 0x02000000 */
  1511. #define DMA_HISR_TEIF7 DMA_HISR_TEIF7_Msk
  1512. #define DMA_HISR_DMEIF7_Pos (24U)
  1513. #define DMA_HISR_DMEIF7_Msk (0x1U << DMA_HISR_DMEIF7_Pos) /*!< 0x01000000 */
  1514. #define DMA_HISR_DMEIF7 DMA_HISR_DMEIF7_Msk
  1515. #define DMA_HISR_FEIF7_Pos (22U)
  1516. #define DMA_HISR_FEIF7_Msk (0x1U << DMA_HISR_FEIF7_Pos) /*!< 0x00400000 */
  1517. #define DMA_HISR_FEIF7 DMA_HISR_FEIF7_Msk
  1518. #define DMA_HISR_TCIF6_Pos (21U)
  1519. #define DMA_HISR_TCIF6_Msk (0x1U << DMA_HISR_TCIF6_Pos) /*!< 0x00200000 */
  1520. #define DMA_HISR_TCIF6 DMA_HISR_TCIF6_Msk
  1521. #define DMA_HISR_HTIF6_Pos (20U)
  1522. #define DMA_HISR_HTIF6_Msk (0x1U << DMA_HISR_HTIF6_Pos) /*!< 0x00100000 */
  1523. #define DMA_HISR_HTIF6 DMA_HISR_HTIF6_Msk
  1524. #define DMA_HISR_TEIF6_Pos (19U)
  1525. #define DMA_HISR_TEIF6_Msk (0x1U << DMA_HISR_TEIF6_Pos) /*!< 0x00080000 */
  1526. #define DMA_HISR_TEIF6 DMA_HISR_TEIF6_Msk
  1527. #define DMA_HISR_DMEIF6_Pos (18U)
  1528. #define DMA_HISR_DMEIF6_Msk (0x1U << DMA_HISR_DMEIF6_Pos) /*!< 0x00040000 */
  1529. #define DMA_HISR_DMEIF6 DMA_HISR_DMEIF6_Msk
  1530. #define DMA_HISR_FEIF6_Pos (16U)
  1531. #define DMA_HISR_FEIF6_Msk (0x1U << DMA_HISR_FEIF6_Pos) /*!< 0x00010000 */
  1532. #define DMA_HISR_FEIF6 DMA_HISR_FEIF6_Msk
  1533. #define DMA_HISR_TCIF5_Pos (11U)
  1534. #define DMA_HISR_TCIF5_Msk (0x1U << DMA_HISR_TCIF5_Pos) /*!< 0x00000800 */
  1535. #define DMA_HISR_TCIF5 DMA_HISR_TCIF5_Msk
  1536. #define DMA_HISR_HTIF5_Pos (10U)
  1537. #define DMA_HISR_HTIF5_Msk (0x1U << DMA_HISR_HTIF5_Pos) /*!< 0x00000400 */
  1538. #define DMA_HISR_HTIF5 DMA_HISR_HTIF5_Msk
  1539. #define DMA_HISR_TEIF5_Pos (9U)
  1540. #define DMA_HISR_TEIF5_Msk (0x1U << DMA_HISR_TEIF5_Pos) /*!< 0x00000200 */
  1541. #define DMA_HISR_TEIF5 DMA_HISR_TEIF5_Msk
  1542. #define DMA_HISR_DMEIF5_Pos (8U)
  1543. #define DMA_HISR_DMEIF5_Msk (0x1U << DMA_HISR_DMEIF5_Pos) /*!< 0x00000100 */
  1544. #define DMA_HISR_DMEIF5 DMA_HISR_DMEIF5_Msk
  1545. #define DMA_HISR_FEIF5_Pos (6U)
  1546. #define DMA_HISR_FEIF5_Msk (0x1U << DMA_HISR_FEIF5_Pos) /*!< 0x00000040 */
  1547. #define DMA_HISR_FEIF5 DMA_HISR_FEIF5_Msk
  1548. #define DMA_HISR_TCIF4_Pos (5U)
  1549. #define DMA_HISR_TCIF4_Msk (0x1U << DMA_HISR_TCIF4_Pos) /*!< 0x00000020 */
  1550. #define DMA_HISR_TCIF4 DMA_HISR_TCIF4_Msk
  1551. #define DMA_HISR_HTIF4_Pos (4U)
  1552. #define DMA_HISR_HTIF4_Msk (0x1U << DMA_HISR_HTIF4_Pos) /*!< 0x00000010 */
  1553. #define DMA_HISR_HTIF4 DMA_HISR_HTIF4_Msk
  1554. #define DMA_HISR_TEIF4_Pos (3U)
  1555. #define DMA_HISR_TEIF4_Msk (0x1U << DMA_HISR_TEIF4_Pos) /*!< 0x00000008 */
  1556. #define DMA_HISR_TEIF4 DMA_HISR_TEIF4_Msk
  1557. #define DMA_HISR_DMEIF4_Pos (2U)
  1558. #define DMA_HISR_DMEIF4_Msk (0x1U << DMA_HISR_DMEIF4_Pos) /*!< 0x00000004 */
  1559. #define DMA_HISR_DMEIF4 DMA_HISR_DMEIF4_Msk
  1560. #define DMA_HISR_FEIF4_Pos (0U)
  1561. #define DMA_HISR_FEIF4_Msk (0x1U << DMA_HISR_FEIF4_Pos) /*!< 0x00000001 */
  1562. #define DMA_HISR_FEIF4 DMA_HISR_FEIF4_Msk
  1563. /******************** Bits definition for DMA_LIFCR register ****************/
  1564. #define DMA_LIFCR_CTCIF3_Pos (27U)
  1565. #define DMA_LIFCR_CTCIF3_Msk (0x1U << DMA_LIFCR_CTCIF3_Pos) /*!< 0x08000000 */
  1566. #define DMA_LIFCR_CTCIF3 DMA_LIFCR_CTCIF3_Msk
  1567. #define DMA_LIFCR_CHTIF3_Pos (26U)
  1568. #define DMA_LIFCR_CHTIF3_Msk (0x1U << DMA_LIFCR_CHTIF3_Pos) /*!< 0x04000000 */
  1569. #define DMA_LIFCR_CHTIF3 DMA_LIFCR_CHTIF3_Msk
  1570. #define DMA_LIFCR_CTEIF3_Pos (25U)
  1571. #define DMA_LIFCR_CTEIF3_Msk (0x1U << DMA_LIFCR_CTEIF3_Pos) /*!< 0x02000000 */
  1572. #define DMA_LIFCR_CTEIF3 DMA_LIFCR_CTEIF3_Msk
  1573. #define DMA_LIFCR_CDMEIF3_Pos (24U)
  1574. #define DMA_LIFCR_CDMEIF3_Msk (0x1U << DMA_LIFCR_CDMEIF3_Pos) /*!< 0x01000000 */
  1575. #define DMA_LIFCR_CDMEIF3 DMA_LIFCR_CDMEIF3_Msk
  1576. #define DMA_LIFCR_CFEIF3_Pos (22U)
  1577. #define DMA_LIFCR_CFEIF3_Msk (0x1U << DMA_LIFCR_CFEIF3_Pos) /*!< 0x00400000 */
  1578. #define DMA_LIFCR_CFEIF3 DMA_LIFCR_CFEIF3_Msk
  1579. #define DMA_LIFCR_CTCIF2_Pos (21U)
  1580. #define DMA_LIFCR_CTCIF2_Msk (0x1U << DMA_LIFCR_CTCIF2_Pos) /*!< 0x00200000 */
  1581. #define DMA_LIFCR_CTCIF2 DMA_LIFCR_CTCIF2_Msk
  1582. #define DMA_LIFCR_CHTIF2_Pos (20U)
  1583. #define DMA_LIFCR_CHTIF2_Msk (0x1U << DMA_LIFCR_CHTIF2_Pos) /*!< 0x00100000 */
  1584. #define DMA_LIFCR_CHTIF2 DMA_LIFCR_CHTIF2_Msk
  1585. #define DMA_LIFCR_CTEIF2_Pos (19U)
  1586. #define DMA_LIFCR_CTEIF2_Msk (0x1U << DMA_LIFCR_CTEIF2_Pos) /*!< 0x00080000 */
  1587. #define DMA_LIFCR_CTEIF2 DMA_LIFCR_CTEIF2_Msk
  1588. #define DMA_LIFCR_CDMEIF2_Pos (18U)
  1589. #define DMA_LIFCR_CDMEIF2_Msk (0x1U << DMA_LIFCR_CDMEIF2_Pos) /*!< 0x00040000 */
  1590. #define DMA_LIFCR_CDMEIF2 DMA_LIFCR_CDMEIF2_Msk
  1591. #define DMA_LIFCR_CFEIF2_Pos (16U)
  1592. #define DMA_LIFCR_CFEIF2_Msk (0x1U << DMA_LIFCR_CFEIF2_Pos) /*!< 0x00010000 */
  1593. #define DMA_LIFCR_CFEIF2 DMA_LIFCR_CFEIF2_Msk
  1594. #define DMA_LIFCR_CTCIF1_Pos (11U)
  1595. #define DMA_LIFCR_CTCIF1_Msk (0x1U << DMA_LIFCR_CTCIF1_Pos) /*!< 0x00000800 */
  1596. #define DMA_LIFCR_CTCIF1 DMA_LIFCR_CTCIF1_Msk
  1597. #define DMA_LIFCR_CHTIF1_Pos (10U)
  1598. #define DMA_LIFCR_CHTIF1_Msk (0x1U << DMA_LIFCR_CHTIF1_Pos) /*!< 0x00000400 */
  1599. #define DMA_LIFCR_CHTIF1 DMA_LIFCR_CHTIF1_Msk
  1600. #define DMA_LIFCR_CTEIF1_Pos (9U)
  1601. #define DMA_LIFCR_CTEIF1_Msk (0x1U << DMA_LIFCR_CTEIF1_Pos) /*!< 0x00000200 */
  1602. #define DMA_LIFCR_CTEIF1 DMA_LIFCR_CTEIF1_Msk
  1603. #define DMA_LIFCR_CDMEIF1_Pos (8U)
  1604. #define DMA_LIFCR_CDMEIF1_Msk (0x1U << DMA_LIFCR_CDMEIF1_Pos) /*!< 0x00000100 */
  1605. #define DMA_LIFCR_CDMEIF1 DMA_LIFCR_CDMEIF1_Msk
  1606. #define DMA_LIFCR_CFEIF1_Pos (6U)
  1607. #define DMA_LIFCR_CFEIF1_Msk (0x1U << DMA_LIFCR_CFEIF1_Pos) /*!< 0x00000040 */
  1608. #define DMA_LIFCR_CFEIF1 DMA_LIFCR_CFEIF1_Msk
  1609. #define DMA_LIFCR_CTCIF0_Pos (5U)
  1610. #define DMA_LIFCR_CTCIF0_Msk (0x1U << DMA_LIFCR_CTCIF0_Pos) /*!< 0x00000020 */
  1611. #define DMA_LIFCR_CTCIF0 DMA_LIFCR_CTCIF0_Msk
  1612. #define DMA_LIFCR_CHTIF0_Pos (4U)
  1613. #define DMA_LIFCR_CHTIF0_Msk (0x1U << DMA_LIFCR_CHTIF0_Pos) /*!< 0x00000010 */
  1614. #define DMA_LIFCR_CHTIF0 DMA_LIFCR_CHTIF0_Msk
  1615. #define DMA_LIFCR_CTEIF0_Pos (3U)
  1616. #define DMA_LIFCR_CTEIF0_Msk (0x1U << DMA_LIFCR_CTEIF0_Pos) /*!< 0x00000008 */
  1617. #define DMA_LIFCR_CTEIF0 DMA_LIFCR_CTEIF0_Msk
  1618. #define DMA_LIFCR_CDMEIF0_Pos (2U)
  1619. #define DMA_LIFCR_CDMEIF0_Msk (0x1U << DMA_LIFCR_CDMEIF0_Pos) /*!< 0x00000004 */
  1620. #define DMA_LIFCR_CDMEIF0 DMA_LIFCR_CDMEIF0_Msk
  1621. #define DMA_LIFCR_CFEIF0_Pos (0U)
  1622. #define DMA_LIFCR_CFEIF0_Msk (0x1U << DMA_LIFCR_CFEIF0_Pos) /*!< 0x00000001 */
  1623. #define DMA_LIFCR_CFEIF0 DMA_LIFCR_CFEIF0_Msk
  1624. /******************** Bits definition for DMA_HIFCR register ****************/
  1625. #define DMA_HIFCR_CTCIF7_Pos (27U)
  1626. #define DMA_HIFCR_CTCIF7_Msk (0x1U << DMA_HIFCR_CTCIF7_Pos) /*!< 0x08000000 */
  1627. #define DMA_HIFCR_CTCIF7 DMA_HIFCR_CTCIF7_Msk
  1628. #define DMA_HIFCR_CHTIF7_Pos (26U)
  1629. #define DMA_HIFCR_CHTIF7_Msk (0x1U << DMA_HIFCR_CHTIF7_Pos) /*!< 0x04000000 */
  1630. #define DMA_HIFCR_CHTIF7 DMA_HIFCR_CHTIF7_Msk
  1631. #define DMA_HIFCR_CTEIF7_Pos (25U)
  1632. #define DMA_HIFCR_CTEIF7_Msk (0x1U << DMA_HIFCR_CTEIF7_Pos) /*!< 0x02000000 */
  1633. #define DMA_HIFCR_CTEIF7 DMA_HIFCR_CTEIF7_Msk
  1634. #define DMA_HIFCR_CDMEIF7_Pos (24U)
  1635. #define DMA_HIFCR_CDMEIF7_Msk (0x1U << DMA_HIFCR_CDMEIF7_Pos) /*!< 0x01000000 */
  1636. #define DMA_HIFCR_CDMEIF7 DMA_HIFCR_CDMEIF7_Msk
  1637. #define DMA_HIFCR_CFEIF7_Pos (22U)
  1638. #define DMA_HIFCR_CFEIF7_Msk (0x1U << DMA_HIFCR_CFEIF7_Pos) /*!< 0x00400000 */
  1639. #define DMA_HIFCR_CFEIF7 DMA_HIFCR_CFEIF7_Msk
  1640. #define DMA_HIFCR_CTCIF6_Pos (21U)
  1641. #define DMA_HIFCR_CTCIF6_Msk (0x1U << DMA_HIFCR_CTCIF6_Pos) /*!< 0x00200000 */
  1642. #define DMA_HIFCR_CTCIF6 DMA_HIFCR_CTCIF6_Msk
  1643. #define DMA_HIFCR_CHTIF6_Pos (20U)
  1644. #define DMA_HIFCR_CHTIF6_Msk (0x1U << DMA_HIFCR_CHTIF6_Pos) /*!< 0x00100000 */
  1645. #define DMA_HIFCR_CHTIF6 DMA_HIFCR_CHTIF6_Msk
  1646. #define DMA_HIFCR_CTEIF6_Pos (19U)
  1647. #define DMA_HIFCR_CTEIF6_Msk (0x1U << DMA_HIFCR_CTEIF6_Pos) /*!< 0x00080000 */
  1648. #define DMA_HIFCR_CTEIF6 DMA_HIFCR_CTEIF6_Msk
  1649. #define DMA_HIFCR_CDMEIF6_Pos (18U)
  1650. #define DMA_HIFCR_CDMEIF6_Msk (0x1U << DMA_HIFCR_CDMEIF6_Pos) /*!< 0x00040000 */
  1651. #define DMA_HIFCR_CDMEIF6 DMA_HIFCR_CDMEIF6_Msk
  1652. #define DMA_HIFCR_CFEIF6_Pos (16U)
  1653. #define DMA_HIFCR_CFEIF6_Msk (0x1U << DMA_HIFCR_CFEIF6_Pos) /*!< 0x00010000 */
  1654. #define DMA_HIFCR_CFEIF6 DMA_HIFCR_CFEIF6_Msk
  1655. #define DMA_HIFCR_CTCIF5_Pos (11U)
  1656. #define DMA_HIFCR_CTCIF5_Msk (0x1U << DMA_HIFCR_CTCIF5_Pos) /*!< 0x00000800 */
  1657. #define DMA_HIFCR_CTCIF5 DMA_HIFCR_CTCIF5_Msk
  1658. #define DMA_HIFCR_CHTIF5_Pos (10U)
  1659. #define DMA_HIFCR_CHTIF5_Msk (0x1U << DMA_HIFCR_CHTIF5_Pos) /*!< 0x00000400 */
  1660. #define DMA_HIFCR_CHTIF5 DMA_HIFCR_CHTIF5_Msk
  1661. #define DMA_HIFCR_CTEIF5_Pos (9U)
  1662. #define DMA_HIFCR_CTEIF5_Msk (0x1U << DMA_HIFCR_CTEIF5_Pos) /*!< 0x00000200 */
  1663. #define DMA_HIFCR_CTEIF5 DMA_HIFCR_CTEIF5_Msk
  1664. #define DMA_HIFCR_CDMEIF5_Pos (8U)
  1665. #define DMA_HIFCR_CDMEIF5_Msk (0x1U << DMA_HIFCR_CDMEIF5_Pos) /*!< 0x00000100 */
  1666. #define DMA_HIFCR_CDMEIF5 DMA_HIFCR_CDMEIF5_Msk
  1667. #define DMA_HIFCR_CFEIF5_Pos (6U)
  1668. #define DMA_HIFCR_CFEIF5_Msk (0x1U << DMA_HIFCR_CFEIF5_Pos) /*!< 0x00000040 */
  1669. #define DMA_HIFCR_CFEIF5 DMA_HIFCR_CFEIF5_Msk
  1670. #define DMA_HIFCR_CTCIF4_Pos (5U)
  1671. #define DMA_HIFCR_CTCIF4_Msk (0x1U << DMA_HIFCR_CTCIF4_Pos) /*!< 0x00000020 */
  1672. #define DMA_HIFCR_CTCIF4 DMA_HIFCR_CTCIF4_Msk
  1673. #define DMA_HIFCR_CHTIF4_Pos (4U)
  1674. #define DMA_HIFCR_CHTIF4_Msk (0x1U << DMA_HIFCR_CHTIF4_Pos) /*!< 0x00000010 */
  1675. #define DMA_HIFCR_CHTIF4 DMA_HIFCR_CHTIF4_Msk
  1676. #define DMA_HIFCR_CTEIF4_Pos (3U)
  1677. #define DMA_HIFCR_CTEIF4_Msk (0x1U << DMA_HIFCR_CTEIF4_Pos) /*!< 0x00000008 */
  1678. #define DMA_HIFCR_CTEIF4 DMA_HIFCR_CTEIF4_Msk
  1679. #define DMA_HIFCR_CDMEIF4_Pos (2U)
  1680. #define DMA_HIFCR_CDMEIF4_Msk (0x1U << DMA_HIFCR_CDMEIF4_Pos) /*!< 0x00000004 */
  1681. #define DMA_HIFCR_CDMEIF4 DMA_HIFCR_CDMEIF4_Msk
  1682. #define DMA_HIFCR_CFEIF4_Pos (0U)
  1683. #define DMA_HIFCR_CFEIF4_Msk (0x1U << DMA_HIFCR_CFEIF4_Pos) /*!< 0x00000001 */
  1684. #define DMA_HIFCR_CFEIF4 DMA_HIFCR_CFEIF4_Msk
  1685. /****************** Bit definition for DMA_SxPAR register ********************/
  1686. #define DMA_SxPAR_PA_Pos (0U)
  1687. #define DMA_SxPAR_PA_Msk (0xFFFFFFFFU << DMA_SxPAR_PA_Pos) /*!< 0xFFFFFFFF */
  1688. #define DMA_SxPAR_PA DMA_SxPAR_PA_Msk /*!< Peripheral Address */
  1689. /****************** Bit definition for DMA_SxM0AR register ********************/
  1690. #define DMA_SxM0AR_M0A_Pos (0U)
  1691. #define DMA_SxM0AR_M0A_Msk (0xFFFFFFFFU << DMA_SxM0AR_M0A_Pos) /*!< 0xFFFFFFFF */
  1692. #define DMA_SxM0AR_M0A DMA_SxM0AR_M0A_Msk /*!< Memory Address */
  1693. /****************** Bit definition for DMA_SxM1AR register ********************/
  1694. #define DMA_SxM1AR_M1A_Pos (0U)
  1695. #define DMA_SxM1AR_M1A_Msk (0xFFFFFFFFU << DMA_SxM1AR_M1A_Pos) /*!< 0xFFFFFFFF */
  1696. #define DMA_SxM1AR_M1A DMA_SxM1AR_M1A_Msk /*!< Memory Address */
  1697. /******************************************************************************/
  1698. /* */
  1699. /* External Interrupt/Event Controller */
  1700. /* */
  1701. /******************************************************************************/
  1702. /******************* Bit definition for EXTI_IMR register *******************/
  1703. #define EXTI_IMR_MR0_Pos (0U)
  1704. #define EXTI_IMR_MR0_Msk (0x1U << EXTI_IMR_MR0_Pos) /*!< 0x00000001 */
  1705. #define EXTI_IMR_MR0 EXTI_IMR_MR0_Msk /*!< Interrupt Mask on line 0 */
  1706. #define EXTI_IMR_MR1_Pos (1U)
  1707. #define EXTI_IMR_MR1_Msk (0x1U << EXTI_IMR_MR1_Pos) /*!< 0x00000002 */
  1708. #define EXTI_IMR_MR1 EXTI_IMR_MR1_Msk /*!< Interrupt Mask on line 1 */
  1709. #define EXTI_IMR_MR2_Pos (2U)
  1710. #define EXTI_IMR_MR2_Msk (0x1U << EXTI_IMR_MR2_Pos) /*!< 0x00000004 */
  1711. #define EXTI_IMR_MR2 EXTI_IMR_MR2_Msk /*!< Interrupt Mask on line 2 */
  1712. #define EXTI_IMR_MR3_Pos (3U)
  1713. #define EXTI_IMR_MR3_Msk (0x1U << EXTI_IMR_MR3_Pos) /*!< 0x00000008 */
  1714. #define EXTI_IMR_MR3 EXTI_IMR_MR3_Msk /*!< Interrupt Mask on line 3 */
  1715. #define EXTI_IMR_MR4_Pos (4U)
  1716. #define EXTI_IMR_MR4_Msk (0x1U << EXTI_IMR_MR4_Pos) /*!< 0x00000010 */
  1717. #define EXTI_IMR_MR4 EXTI_IMR_MR4_Msk /*!< Interrupt Mask on line 4 */
  1718. #define EXTI_IMR_MR5_Pos (5U)
  1719. #define EXTI_IMR_MR5_Msk (0x1U << EXTI_IMR_MR5_Pos) /*!< 0x00000020 */
  1720. #define EXTI_IMR_MR5 EXTI_IMR_MR5_Msk /*!< Interrupt Mask on line 5 */
  1721. #define EXTI_IMR_MR6_Pos (6U)
  1722. #define EXTI_IMR_MR6_Msk (0x1U << EXTI_IMR_MR6_Pos) /*!< 0x00000040 */
  1723. #define EXTI_IMR_MR6 EXTI_IMR_MR6_Msk /*!< Interrupt Mask on line 6 */
  1724. #define EXTI_IMR_MR7_Pos (7U)
  1725. #define EXTI_IMR_MR7_Msk (0x1U << EXTI_IMR_MR7_Pos) /*!< 0x00000080 */
  1726. #define EXTI_IMR_MR7 EXTI_IMR_MR7_Msk /*!< Interrupt Mask on line 7 */
  1727. #define EXTI_IMR_MR8_Pos (8U)
  1728. #define EXTI_IMR_MR8_Msk (0x1U << EXTI_IMR_MR8_Pos) /*!< 0x00000100 */
  1729. #define EXTI_IMR_MR8 EXTI_IMR_MR8_Msk /*!< Interrupt Mask on line 8 */
  1730. #define EXTI_IMR_MR9_Pos (9U)
  1731. #define EXTI_IMR_MR9_Msk (0x1U << EXTI_IMR_MR9_Pos) /*!< 0x00000200 */
  1732. #define EXTI_IMR_MR9 EXTI_IMR_MR9_Msk /*!< Interrupt Mask on line 9 */
  1733. #define EXTI_IMR_MR10_Pos (10U)
  1734. #define EXTI_IMR_MR10_Msk (0x1U << EXTI_IMR_MR10_Pos) /*!< 0x00000400 */
  1735. #define EXTI_IMR_MR10 EXTI_IMR_MR10_Msk /*!< Interrupt Mask on line 10 */
  1736. #define EXTI_IMR_MR11_Pos (11U)
  1737. #define EXTI_IMR_MR11_Msk (0x1U << EXTI_IMR_MR11_Pos) /*!< 0x00000800 */
  1738. #define EXTI_IMR_MR11 EXTI_IMR_MR11_Msk /*!< Interrupt Mask on line 11 */
  1739. #define EXTI_IMR_MR12_Pos (12U)
  1740. #define EXTI_IMR_MR12_Msk (0x1U << EXTI_IMR_MR12_Pos) /*!< 0x00001000 */
  1741. #define EXTI_IMR_MR12 EXTI_IMR_MR12_Msk /*!< Interrupt Mask on line 12 */
  1742. #define EXTI_IMR_MR13_Pos (13U)
  1743. #define EXTI_IMR_MR13_Msk (0x1U << EXTI_IMR_MR13_Pos) /*!< 0x00002000 */
  1744. #define EXTI_IMR_MR13 EXTI_IMR_MR13_Msk /*!< Interrupt Mask on line 13 */
  1745. #define EXTI_IMR_MR14_Pos (14U)
  1746. #define EXTI_IMR_MR14_Msk (0x1U << EXTI_IMR_MR14_Pos) /*!< 0x00004000 */
  1747. #define EXTI_IMR_MR14 EXTI_IMR_MR14_Msk /*!< Interrupt Mask on line 14 */
  1748. #define EXTI_IMR_MR15_Pos (15U)
  1749. #define EXTI_IMR_MR15_Msk (0x1U << EXTI_IMR_MR15_Pos) /*!< 0x00008000 */
  1750. #define EXTI_IMR_MR15 EXTI_IMR_MR15_Msk /*!< Interrupt Mask on line 15 */
  1751. #define EXTI_IMR_MR16_Pos (16U)
  1752. #define EXTI_IMR_MR16_Msk (0x1U << EXTI_IMR_MR16_Pos) /*!< 0x00010000 */
  1753. #define EXTI_IMR_MR16 EXTI_IMR_MR16_Msk /*!< Interrupt Mask on line 16 */
  1754. #define EXTI_IMR_MR17_Pos (17U)
  1755. #define EXTI_IMR_MR17_Msk (0x1U << EXTI_IMR_MR17_Pos) /*!< 0x00020000 */
  1756. #define EXTI_IMR_MR17 EXTI_IMR_MR17_Msk /*!< Interrupt Mask on line 17 */
  1757. #define EXTI_IMR_MR18_Pos (18U)
  1758. #define EXTI_IMR_MR18_Msk (0x1U << EXTI_IMR_MR18_Pos) /*!< 0x00040000 */
  1759. #define EXTI_IMR_MR18 EXTI_IMR_MR18_Msk /*!< Interrupt Mask on line 18 */
  1760. #define EXTI_IMR_MR19_Pos (19U)
  1761. #define EXTI_IMR_MR19_Msk (0x1U << EXTI_IMR_MR19_Pos) /*!< 0x00080000 */
  1762. #define EXTI_IMR_MR19 EXTI_IMR_MR19_Msk /*!< Interrupt Mask on line 19 */
  1763. #define EXTI_IMR_MR20_Pos (20U)
  1764. #define EXTI_IMR_MR20_Msk (0x1U << EXTI_IMR_MR20_Pos) /*!< 0x00100000 */
  1765. #define EXTI_IMR_MR20 EXTI_IMR_MR20_Msk /*!< Interrupt Mask on line 20 */
  1766. #define EXTI_IMR_MR21_Pos (21U)
  1767. #define EXTI_IMR_MR21_Msk (0x1U << EXTI_IMR_MR21_Pos) /*!< 0x00200000 */
  1768. #define EXTI_IMR_MR21 EXTI_IMR_MR21_Msk /*!< Interrupt Mask on line 21 */
  1769. #define EXTI_IMR_MR22_Pos (22U)
  1770. #define EXTI_IMR_MR22_Msk (0x1U << EXTI_IMR_MR22_Pos) /*!< 0x00400000 */
  1771. #define EXTI_IMR_MR22 EXTI_IMR_MR22_Msk /*!< Interrupt Mask on line 22 */
  1772. /* Reference Defines */
  1773. #define EXTI_IMR_IM0 EXTI_IMR_MR0
  1774. #define EXTI_IMR_IM1 EXTI_IMR_MR1
  1775. #define EXTI_IMR_IM2 EXTI_IMR_MR2
  1776. #define EXTI_IMR_IM3 EXTI_IMR_MR3
  1777. #define EXTI_IMR_IM4 EXTI_IMR_MR4
  1778. #define EXTI_IMR_IM5 EXTI_IMR_MR5
  1779. #define EXTI_IMR_IM6 EXTI_IMR_MR6
  1780. #define EXTI_IMR_IM7 EXTI_IMR_MR7
  1781. #define EXTI_IMR_IM8 EXTI_IMR_MR8
  1782. #define EXTI_IMR_IM9 EXTI_IMR_MR9
  1783. #define EXTI_IMR_IM10 EXTI_IMR_MR10
  1784. #define EXTI_IMR_IM11 EXTI_IMR_MR11
  1785. #define EXTI_IMR_IM12 EXTI_IMR_MR12
  1786. #define EXTI_IMR_IM13 EXTI_IMR_MR13
  1787. #define EXTI_IMR_IM14 EXTI_IMR_MR14
  1788. #define EXTI_IMR_IM15 EXTI_IMR_MR15
  1789. #define EXTI_IMR_IM16 EXTI_IMR_MR16
  1790. #define EXTI_IMR_IM17 EXTI_IMR_MR17
  1791. #define EXTI_IMR_IM18 EXTI_IMR_MR18
  1792. #define EXTI_IMR_IM19 EXTI_IMR_MR19
  1793. #define EXTI_IMR_IM20 EXTI_IMR_MR20
  1794. #define EXTI_IMR_IM21 EXTI_IMR_MR21
  1795. #define EXTI_IMR_IM22 EXTI_IMR_MR22
  1796. #define EXTI_IMR_IM_Pos (0U)
  1797. #define EXTI_IMR_IM_Msk (0x7FFFFFU << EXTI_IMR_IM_Pos) /*!< 0x007FFFFF */
  1798. #define EXTI_IMR_IM EXTI_IMR_IM_Msk /*!< Interrupt Mask All */
  1799. /******************* Bit definition for EXTI_EMR register *******************/
  1800. #define EXTI_EMR_MR0_Pos (0U)
  1801. #define EXTI_EMR_MR0_Msk (0x1U << EXTI_EMR_MR0_Pos) /*!< 0x00000001 */
  1802. #define EXTI_EMR_MR0 EXTI_EMR_MR0_Msk /*!< Event Mask on line 0 */
  1803. #define EXTI_EMR_MR1_Pos (1U)
  1804. #define EXTI_EMR_MR1_Msk (0x1U << EXTI_EMR_MR1_Pos) /*!< 0x00000002 */
  1805. #define EXTI_EMR_MR1 EXTI_EMR_MR1_Msk /*!< Event Mask on line 1 */
  1806. #define EXTI_EMR_MR2_Pos (2U)
  1807. #define EXTI_EMR_MR2_Msk (0x1U << EXTI_EMR_MR2_Pos) /*!< 0x00000004 */
  1808. #define EXTI_EMR_MR2 EXTI_EMR_MR2_Msk /*!< Event Mask on line 2 */
  1809. #define EXTI_EMR_MR3_Pos (3U)
  1810. #define EXTI_EMR_MR3_Msk (0x1U << EXTI_EMR_MR3_Pos) /*!< 0x00000008 */
  1811. #define EXTI_EMR_MR3 EXTI_EMR_MR3_Msk /*!< Event Mask on line 3 */
  1812. #define EXTI_EMR_MR4_Pos (4U)
  1813. #define EXTI_EMR_MR4_Msk (0x1U << EXTI_EMR_MR4_Pos) /*!< 0x00000010 */
  1814. #define EXTI_EMR_MR4 EXTI_EMR_MR4_Msk /*!< Event Mask on line 4 */
  1815. #define EXTI_EMR_MR5_Pos (5U)
  1816. #define EXTI_EMR_MR5_Msk (0x1U << EXTI_EMR_MR5_Pos) /*!< 0x00000020 */
  1817. #define EXTI_EMR_MR5 EXTI_EMR_MR5_Msk /*!< Event Mask on line 5 */
  1818. #define EXTI_EMR_MR6_Pos (6U)
  1819. #define EXTI_EMR_MR6_Msk (0x1U << EXTI_EMR_MR6_Pos) /*!< 0x00000040 */
  1820. #define EXTI_EMR_MR6 EXTI_EMR_MR6_Msk /*!< Event Mask on line 6 */
  1821. #define EXTI_EMR_MR7_Pos (7U)
  1822. #define EXTI_EMR_MR7_Msk (0x1U << EXTI_EMR_MR7_Pos) /*!< 0x00000080 */
  1823. #define EXTI_EMR_MR7 EXTI_EMR_MR7_Msk /*!< Event Mask on line 7 */
  1824. #define EXTI_EMR_MR8_Pos (8U)
  1825. #define EXTI_EMR_MR8_Msk (0x1U << EXTI_EMR_MR8_Pos) /*!< 0x00000100 */
  1826. #define EXTI_EMR_MR8 EXTI_EMR_MR8_Msk /*!< Event Mask on line 8 */
  1827. #define EXTI_EMR_MR9_Pos (9U)
  1828. #define EXTI_EMR_MR9_Msk (0x1U << EXTI_EMR_MR9_Pos) /*!< 0x00000200 */
  1829. #define EXTI_EMR_MR9 EXTI_EMR_MR9_Msk /*!< Event Mask on line 9 */
  1830. #define EXTI_EMR_MR10_Pos (10U)
  1831. #define EXTI_EMR_MR10_Msk (0x1U << EXTI_EMR_MR10_Pos) /*!< 0x00000400 */
  1832. #define EXTI_EMR_MR10 EXTI_EMR_MR10_Msk /*!< Event Mask on line 10 */
  1833. #define EXTI_EMR_MR11_Pos (11U)
  1834. #define EXTI_EMR_MR11_Msk (0x1U << EXTI_EMR_MR11_Pos) /*!< 0x00000800 */
  1835. #define EXTI_EMR_MR11 EXTI_EMR_MR11_Msk /*!< Event Mask on line 11 */
  1836. #define EXTI_EMR_MR12_Pos (12U)
  1837. #define EXTI_EMR_MR12_Msk (0x1U << EXTI_EMR_MR12_Pos) /*!< 0x00001000 */
  1838. #define EXTI_EMR_MR12 EXTI_EMR_MR12_Msk /*!< Event Mask on line 12 */
  1839. #define EXTI_EMR_MR13_Pos (13U)
  1840. #define EXTI_EMR_MR13_Msk (0x1U << EXTI_EMR_MR13_Pos) /*!< 0x00002000 */
  1841. #define EXTI_EMR_MR13 EXTI_EMR_MR13_Msk /*!< Event Mask on line 13 */
  1842. #define EXTI_EMR_MR14_Pos (14U)
  1843. #define EXTI_EMR_MR14_Msk (0x1U << EXTI_EMR_MR14_Pos) /*!< 0x00004000 */
  1844. #define EXTI_EMR_MR14 EXTI_EMR_MR14_Msk /*!< Event Mask on line 14 */
  1845. #define EXTI_EMR_MR15_Pos (15U)
  1846. #define EXTI_EMR_MR15_Msk (0x1U << EXTI_EMR_MR15_Pos) /*!< 0x00008000 */
  1847. #define EXTI_EMR_MR15 EXTI_EMR_MR15_Msk /*!< Event Mask on line 15 */
  1848. #define EXTI_EMR_MR16_Pos (16U)
  1849. #define EXTI_EMR_MR16_Msk (0x1U << EXTI_EMR_MR16_Pos) /*!< 0x00010000 */
  1850. #define EXTI_EMR_MR16 EXTI_EMR_MR16_Msk /*!< Event Mask on line 16 */
  1851. #define EXTI_EMR_MR17_Pos (17U)
  1852. #define EXTI_EMR_MR17_Msk (0x1U << EXTI_EMR_MR17_Pos) /*!< 0x00020000 */
  1853. #define EXTI_EMR_MR17 EXTI_EMR_MR17_Msk /*!< Event Mask on line 17 */
  1854. #define EXTI_EMR_MR18_Pos (18U)
  1855. #define EXTI_EMR_MR18_Msk (0x1U << EXTI_EMR_MR18_Pos) /*!< 0x00040000 */
  1856. #define EXTI_EMR_MR18 EXTI_EMR_MR18_Msk /*!< Event Mask on line 18 */
  1857. #define EXTI_EMR_MR19_Pos (19U)
  1858. #define EXTI_EMR_MR19_Msk (0x1U << EXTI_EMR_MR19_Pos) /*!< 0x00080000 */
  1859. #define EXTI_EMR_MR19 EXTI_EMR_MR19_Msk /*!< Event Mask on line 19 */
  1860. #define EXTI_EMR_MR20_Pos (20U)
  1861. #define EXTI_EMR_MR20_Msk (0x1U << EXTI_EMR_MR20_Pos) /*!< 0x00100000 */
  1862. #define EXTI_EMR_MR20 EXTI_EMR_MR20_Msk /*!< Event Mask on line 20 */
  1863. #define EXTI_EMR_MR21_Pos (21U)
  1864. #define EXTI_EMR_MR21_Msk (0x1U << EXTI_EMR_MR21_Pos) /*!< 0x00200000 */
  1865. #define EXTI_EMR_MR21 EXTI_EMR_MR21_Msk /*!< Event Mask on line 21 */
  1866. #define EXTI_EMR_MR22_Pos (22U)
  1867. #define EXTI_EMR_MR22_Msk (0x1U << EXTI_EMR_MR22_Pos) /*!< 0x00400000 */
  1868. #define EXTI_EMR_MR22 EXTI_EMR_MR22_Msk /*!< Event Mask on line 22 */
  1869. /* Reference Defines */
  1870. #define EXTI_EMR_EM0 EXTI_EMR_MR0
  1871. #define EXTI_EMR_EM1 EXTI_EMR_MR1
  1872. #define EXTI_EMR_EM2 EXTI_EMR_MR2
  1873. #define EXTI_EMR_EM3 EXTI_EMR_MR3
  1874. #define EXTI_EMR_EM4 EXTI_EMR_MR4
  1875. #define EXTI_EMR_EM5 EXTI_EMR_MR5
  1876. #define EXTI_EMR_EM6 EXTI_EMR_MR6
  1877. #define EXTI_EMR_EM7 EXTI_EMR_MR7
  1878. #define EXTI_EMR_EM8 EXTI_EMR_MR8
  1879. #define EXTI_EMR_EM9 EXTI_EMR_MR9
  1880. #define EXTI_EMR_EM10 EXTI_EMR_MR10
  1881. #define EXTI_EMR_EM11 EXTI_EMR_MR11
  1882. #define EXTI_EMR_EM12 EXTI_EMR_MR12
  1883. #define EXTI_EMR_EM13 EXTI_EMR_MR13
  1884. #define EXTI_EMR_EM14 EXTI_EMR_MR14
  1885. #define EXTI_EMR_EM15 EXTI_EMR_MR15
  1886. #define EXTI_EMR_EM16 EXTI_EMR_MR16
  1887. #define EXTI_EMR_EM17 EXTI_EMR_MR17
  1888. #define EXTI_EMR_EM18 EXTI_EMR_MR18
  1889. #define EXTI_EMR_EM19 EXTI_EMR_MR19
  1890. #define EXTI_EMR_EM20 EXTI_EMR_MR20
  1891. #define EXTI_EMR_EM21 EXTI_EMR_MR21
  1892. #define EXTI_EMR_EM22 EXTI_EMR_MR22
  1893. /****************** Bit definition for EXTI_RTSR register *******************/
  1894. #define EXTI_RTSR_TR0_Pos (0U)
  1895. #define EXTI_RTSR_TR0_Msk (0x1U << EXTI_RTSR_TR0_Pos) /*!< 0x00000001 */
  1896. #define EXTI_RTSR_TR0 EXTI_RTSR_TR0_Msk /*!< Rising trigger event configuration bit of line 0 */
  1897. #define EXTI_RTSR_TR1_Pos (1U)
  1898. #define EXTI_RTSR_TR1_Msk (0x1U << EXTI_RTSR_TR1_Pos) /*!< 0x00000002 */
  1899. #define EXTI_RTSR_TR1 EXTI_RTSR_TR1_Msk /*!< Rising trigger event configuration bit of line 1 */
  1900. #define EXTI_RTSR_TR2_Pos (2U)
  1901. #define EXTI_RTSR_TR2_Msk (0x1U << EXTI_RTSR_TR2_Pos) /*!< 0x00000004 */
  1902. #define EXTI_RTSR_TR2 EXTI_RTSR_TR2_Msk /*!< Rising trigger event configuration bit of line 2 */
  1903. #define EXTI_RTSR_TR3_Pos (3U)
  1904. #define EXTI_RTSR_TR3_Msk (0x1U << EXTI_RTSR_TR3_Pos) /*!< 0x00000008 */
  1905. #define EXTI_RTSR_TR3 EXTI_RTSR_TR3_Msk /*!< Rising trigger event configuration bit of line 3 */
  1906. #define EXTI_RTSR_TR4_Pos (4U)
  1907. #define EXTI_RTSR_TR4_Msk (0x1U << EXTI_RTSR_TR4_Pos) /*!< 0x00000010 */
  1908. #define EXTI_RTSR_TR4 EXTI_RTSR_TR4_Msk /*!< Rising trigger event configuration bit of line 4 */
  1909. #define EXTI_RTSR_TR5_Pos (5U)
  1910. #define EXTI_RTSR_TR5_Msk (0x1U << EXTI_RTSR_TR5_Pos) /*!< 0x00000020 */
  1911. #define EXTI_RTSR_TR5 EXTI_RTSR_TR5_Msk /*!< Rising trigger event configuration bit of line 5 */
  1912. #define EXTI_RTSR_TR6_Pos (6U)
  1913. #define EXTI_RTSR_TR6_Msk (0x1U << EXTI_RTSR_TR6_Pos) /*!< 0x00000040 */
  1914. #define EXTI_RTSR_TR6 EXTI_RTSR_TR6_Msk /*!< Rising trigger event configuration bit of line 6 */
  1915. #define EXTI_RTSR_TR7_Pos (7U)
  1916. #define EXTI_RTSR_TR7_Msk (0x1U << EXTI_RTSR_TR7_Pos) /*!< 0x00000080 */
  1917. #define EXTI_RTSR_TR7 EXTI_RTSR_TR7_Msk /*!< Rising trigger event configuration bit of line 7 */
  1918. #define EXTI_RTSR_TR8_Pos (8U)
  1919. #define EXTI_RTSR_TR8_Msk (0x1U << EXTI_RTSR_TR8_Pos) /*!< 0x00000100 */
  1920. #define EXTI_RTSR_TR8 EXTI_RTSR_TR8_Msk /*!< Rising trigger event configuration bit of line 8 */
  1921. #define EXTI_RTSR_TR9_Pos (9U)
  1922. #define EXTI_RTSR_TR9_Msk (0x1U << EXTI_RTSR_TR9_Pos) /*!< 0x00000200 */
  1923. #define EXTI_RTSR_TR9 EXTI_RTSR_TR9_Msk /*!< Rising trigger event configuration bit of line 9 */
  1924. #define EXTI_RTSR_TR10_Pos (10U)
  1925. #define EXTI_RTSR_TR10_Msk (0x1U << EXTI_RTSR_TR10_Pos) /*!< 0x00000400 */
  1926. #define EXTI_RTSR_TR10 EXTI_RTSR_TR10_Msk /*!< Rising trigger event configuration bit of line 10 */
  1927. #define EXTI_RTSR_TR11_Pos (11U)
  1928. #define EXTI_RTSR_TR11_Msk (0x1U << EXTI_RTSR_TR11_Pos) /*!< 0x00000800 */
  1929. #define EXTI_RTSR_TR11 EXTI_RTSR_TR11_Msk /*!< Rising trigger event configuration bit of line 11 */
  1930. #define EXTI_RTSR_TR12_Pos (12U)
  1931. #define EXTI_RTSR_TR12_Msk (0x1U << EXTI_RTSR_TR12_Pos) /*!< 0x00001000 */
  1932. #define EXTI_RTSR_TR12 EXTI_RTSR_TR12_Msk /*!< Rising trigger event configuration bit of line 12 */
  1933. #define EXTI_RTSR_TR13_Pos (13U)
  1934. #define EXTI_RTSR_TR13_Msk (0x1U << EXTI_RTSR_TR13_Pos) /*!< 0x00002000 */
  1935. #define EXTI_RTSR_TR13 EXTI_RTSR_TR13_Msk /*!< Rising trigger event configuration bit of line 13 */
  1936. #define EXTI_RTSR_TR14_Pos (14U)
  1937. #define EXTI_RTSR_TR14_Msk (0x1U << EXTI_RTSR_TR14_Pos) /*!< 0x00004000 */
  1938. #define EXTI_RTSR_TR14 EXTI_RTSR_TR14_Msk /*!< Rising trigger event configuration bit of line 14 */
  1939. #define EXTI_RTSR_TR15_Pos (15U)
  1940. #define EXTI_RTSR_TR15_Msk (0x1U << EXTI_RTSR_TR15_Pos) /*!< 0x00008000 */
  1941. #define EXTI_RTSR_TR15 EXTI_RTSR_TR15_Msk /*!< Rising trigger event configuration bit of line 15 */
  1942. #define EXTI_RTSR_TR16_Pos (16U)
  1943. #define EXTI_RTSR_TR16_Msk (0x1U << EXTI_RTSR_TR16_Pos) /*!< 0x00010000 */
  1944. #define EXTI_RTSR_TR16 EXTI_RTSR_TR16_Msk /*!< Rising trigger event configuration bit of line 16 */
  1945. #define EXTI_RTSR_TR17_Pos (17U)
  1946. #define EXTI_RTSR_TR17_Msk (0x1U << EXTI_RTSR_TR17_Pos) /*!< 0x00020000 */
  1947. #define EXTI_RTSR_TR17 EXTI_RTSR_TR17_Msk /*!< Rising trigger event configuration bit of line 17 */
  1948. #define EXTI_RTSR_TR18_Pos (18U)
  1949. #define EXTI_RTSR_TR18_Msk (0x1U << EXTI_RTSR_TR18_Pos) /*!< 0x00040000 */
  1950. #define EXTI_RTSR_TR18 EXTI_RTSR_TR18_Msk /*!< Rising trigger event configuration bit of line 18 */
  1951. #define EXTI_RTSR_TR19_Pos (19U)
  1952. #define EXTI_RTSR_TR19_Msk (0x1U << EXTI_RTSR_TR19_Pos) /*!< 0x00080000 */
  1953. #define EXTI_RTSR_TR19 EXTI_RTSR_TR19_Msk /*!< Rising trigger event configuration bit of line 19 */
  1954. #define EXTI_RTSR_TR20_Pos (20U)
  1955. #define EXTI_RTSR_TR20_Msk (0x1U << EXTI_RTSR_TR20_Pos) /*!< 0x00100000 */
  1956. #define EXTI_RTSR_TR20 EXTI_RTSR_TR20_Msk /*!< Rising trigger event configuration bit of line 20 */
  1957. #define EXTI_RTSR_TR21_Pos (21U)
  1958. #define EXTI_RTSR_TR21_Msk (0x1U << EXTI_RTSR_TR21_Pos) /*!< 0x00200000 */
  1959. #define EXTI_RTSR_TR21 EXTI_RTSR_TR21_Msk /*!< Rising trigger event configuration bit of line 21 */
  1960. #define EXTI_RTSR_TR22_Pos (22U)
  1961. #define EXTI_RTSR_TR22_Msk (0x1U << EXTI_RTSR_TR22_Pos) /*!< 0x00400000 */
  1962. #define EXTI_RTSR_TR22 EXTI_RTSR_TR22_Msk /*!< Rising trigger event configuration bit of line 22 */
  1963. /****************** Bit definition for EXTI_FTSR register *******************/
  1964. #define EXTI_FTSR_TR0_Pos (0U)
  1965. #define EXTI_FTSR_TR0_Msk (0x1U << EXTI_FTSR_TR0_Pos) /*!< 0x00000001 */
  1966. #define EXTI_FTSR_TR0 EXTI_FTSR_TR0_Msk /*!< Falling trigger event configuration bit of line 0 */
  1967. #define EXTI_FTSR_TR1_Pos (1U)
  1968. #define EXTI_FTSR_TR1_Msk (0x1U << EXTI_FTSR_TR1_Pos) /*!< 0x00000002 */
  1969. #define EXTI_FTSR_TR1 EXTI_FTSR_TR1_Msk /*!< Falling trigger event configuration bit of line 1 */
  1970. #define EXTI_FTSR_TR2_Pos (2U)
  1971. #define EXTI_FTSR_TR2_Msk (0x1U << EXTI_FTSR_TR2_Pos) /*!< 0x00000004 */
  1972. #define EXTI_FTSR_TR2 EXTI_FTSR_TR2_Msk /*!< Falling trigger event configuration bit of line 2 */
  1973. #define EXTI_FTSR_TR3_Pos (3U)
  1974. #define EXTI_FTSR_TR3_Msk (0x1U << EXTI_FTSR_TR3_Pos) /*!< 0x00000008 */
  1975. #define EXTI_FTSR_TR3 EXTI_FTSR_TR3_Msk /*!< Falling trigger event configuration bit of line 3 */
  1976. #define EXTI_FTSR_TR4_Pos (4U)
  1977. #define EXTI_FTSR_TR4_Msk (0x1U << EXTI_FTSR_TR4_Pos) /*!< 0x00000010 */
  1978. #define EXTI_FTSR_TR4 EXTI_FTSR_TR4_Msk /*!< Falling trigger event configuration bit of line 4 */
  1979. #define EXTI_FTSR_TR5_Pos (5U)
  1980. #define EXTI_FTSR_TR5_Msk (0x1U << EXTI_FTSR_TR5_Pos) /*!< 0x00000020 */
  1981. #define EXTI_FTSR_TR5 EXTI_FTSR_TR5_Msk /*!< Falling trigger event configuration bit of line 5 */
  1982. #define EXTI_FTSR_TR6_Pos (6U)
  1983. #define EXTI_FTSR_TR6_Msk (0x1U << EXTI_FTSR_TR6_Pos) /*!< 0x00000040 */
  1984. #define EXTI_FTSR_TR6 EXTI_FTSR_TR6_Msk /*!< Falling trigger event configuration bit of line 6 */
  1985. #define EXTI_FTSR_TR7_Pos (7U)
  1986. #define EXTI_FTSR_TR7_Msk (0x1U << EXTI_FTSR_TR7_Pos) /*!< 0x00000080 */
  1987. #define EXTI_FTSR_TR7 EXTI_FTSR_TR7_Msk /*!< Falling trigger event configuration bit of line 7 */
  1988. #define EXTI_FTSR_TR8_Pos (8U)
  1989. #define EXTI_FTSR_TR8_Msk (0x1U << EXTI_FTSR_TR8_Pos) /*!< 0x00000100 */
  1990. #define EXTI_FTSR_TR8 EXTI_FTSR_TR8_Msk /*!< Falling trigger event configuration bit of line 8 */
  1991. #define EXTI_FTSR_TR9_Pos (9U)
  1992. #define EXTI_FTSR_TR9_Msk (0x1U << EXTI_FTSR_TR9_Pos) /*!< 0x00000200 */
  1993. #define EXTI_FTSR_TR9 EXTI_FTSR_TR9_Msk /*!< Falling trigger event configuration bit of line 9 */
  1994. #define EXTI_FTSR_TR10_Pos (10U)
  1995. #define EXTI_FTSR_TR10_Msk (0x1U << EXTI_FTSR_TR10_Pos) /*!< 0x00000400 */
  1996. #define EXTI_FTSR_TR10 EXTI_FTSR_TR10_Msk /*!< Falling trigger event configuration bit of line 10 */
  1997. #define EXTI_FTSR_TR11_Pos (11U)
  1998. #define EXTI_FTSR_TR11_Msk (0x1U << EXTI_FTSR_TR11_Pos) /*!< 0x00000800 */
  1999. #define EXTI_FTSR_TR11 EXTI_FTSR_TR11_Msk /*!< Falling trigger event configuration bit of line 11 */
  2000. #define EXTI_FTSR_TR12_Pos (12U)
  2001. #define EXTI_FTSR_TR12_Msk (0x1U << EXTI_FTSR_TR12_Pos) /*!< 0x00001000 */
  2002. #define EXTI_FTSR_TR12 EXTI_FTSR_TR12_Msk /*!< Falling trigger event configuration bit of line 12 */
  2003. #define EXTI_FTSR_TR13_Pos (13U)
  2004. #define EXTI_FTSR_TR13_Msk (0x1U << EXTI_FTSR_TR13_Pos) /*!< 0x00002000 */
  2005. #define EXTI_FTSR_TR13 EXTI_FTSR_TR13_Msk /*!< Falling trigger event configuration bit of line 13 */
  2006. #define EXTI_FTSR_TR14_Pos (14U)
  2007. #define EXTI_FTSR_TR14_Msk (0x1U << EXTI_FTSR_TR14_Pos) /*!< 0x00004000 */
  2008. #define EXTI_FTSR_TR14 EXTI_FTSR_TR14_Msk /*!< Falling trigger event configuration bit of line 14 */
  2009. #define EXTI_FTSR_TR15_Pos (15U)
  2010. #define EXTI_FTSR_TR15_Msk (0x1U << EXTI_FTSR_TR15_Pos) /*!< 0x00008000 */
  2011. #define EXTI_FTSR_TR15 EXTI_FTSR_TR15_Msk /*!< Falling trigger event configuration bit of line 15 */
  2012. #define EXTI_FTSR_TR16_Pos (16U)
  2013. #define EXTI_FTSR_TR16_Msk (0x1U << EXTI_FTSR_TR16_Pos) /*!< 0x00010000 */
  2014. #define EXTI_FTSR_TR16 EXTI_FTSR_TR16_Msk /*!< Falling trigger event configuration bit of line 16 */
  2015. #define EXTI_FTSR_TR17_Pos (17U)
  2016. #define EXTI_FTSR_TR17_Msk (0x1U << EXTI_FTSR_TR17_Pos) /*!< 0x00020000 */
  2017. #define EXTI_FTSR_TR17 EXTI_FTSR_TR17_Msk /*!< Falling trigger event configuration bit of line 17 */
  2018. #define EXTI_FTSR_TR18_Pos (18U)
  2019. #define EXTI_FTSR_TR18_Msk (0x1U << EXTI_FTSR_TR18_Pos) /*!< 0x00040000 */
  2020. #define EXTI_FTSR_TR18 EXTI_FTSR_TR18_Msk /*!< Falling trigger event configuration bit of line 18 */
  2021. #define EXTI_FTSR_TR19_Pos (19U)
  2022. #define EXTI_FTSR_TR19_Msk (0x1U << EXTI_FTSR_TR19_Pos) /*!< 0x00080000 */
  2023. #define EXTI_FTSR_TR19 EXTI_FTSR_TR19_Msk /*!< Falling trigger event configuration bit of line 19 */
  2024. #define EXTI_FTSR_TR20_Pos (20U)
  2025. #define EXTI_FTSR_TR20_Msk (0x1U << EXTI_FTSR_TR20_Pos) /*!< 0x00100000 */
  2026. #define EXTI_FTSR_TR20 EXTI_FTSR_TR20_Msk /*!< Falling trigger event configuration bit of line 20 */
  2027. #define EXTI_FTSR_TR21_Pos (21U)
  2028. #define EXTI_FTSR_TR21_Msk (0x1U << EXTI_FTSR_TR21_Pos) /*!< 0x00200000 */
  2029. #define EXTI_FTSR_TR21 EXTI_FTSR_TR21_Msk /*!< Falling trigger event configuration bit of line 21 */
  2030. #define EXTI_FTSR_TR22_Pos (22U)
  2031. #define EXTI_FTSR_TR22_Msk (0x1U << EXTI_FTSR_TR22_Pos) /*!< 0x00400000 */
  2032. #define EXTI_FTSR_TR22 EXTI_FTSR_TR22_Msk /*!< Falling trigger event configuration bit of line 22 */
  2033. /****************** Bit definition for EXTI_SWIER register ******************/
  2034. #define EXTI_SWIER_SWIER0_Pos (0U)
  2035. #define EXTI_SWIER_SWIER0_Msk (0x1U << EXTI_SWIER_SWIER0_Pos) /*!< 0x00000001 */
  2036. #define EXTI_SWIER_SWIER0 EXTI_SWIER_SWIER0_Msk /*!< Software Interrupt on line 0 */
  2037. #define EXTI_SWIER_SWIER1_Pos (1U)
  2038. #define EXTI_SWIER_SWIER1_Msk (0x1U << EXTI_SWIER_SWIER1_Pos) /*!< 0x00000002 */
  2039. #define EXTI_SWIER_SWIER1 EXTI_SWIER_SWIER1_Msk /*!< Software Interrupt on line 1 */
  2040. #define EXTI_SWIER_SWIER2_Pos (2U)
  2041. #define EXTI_SWIER_SWIER2_Msk (0x1U << EXTI_SWIER_SWIER2_Pos) /*!< 0x00000004 */
  2042. #define EXTI_SWIER_SWIER2 EXTI_SWIER_SWIER2_Msk /*!< Software Interrupt on line 2 */
  2043. #define EXTI_SWIER_SWIER3_Pos (3U)
  2044. #define EXTI_SWIER_SWIER3_Msk (0x1U << EXTI_SWIER_SWIER3_Pos) /*!< 0x00000008 */
  2045. #define EXTI_SWIER_SWIER3 EXTI_SWIER_SWIER3_Msk /*!< Software Interrupt on line 3 */
  2046. #define EXTI_SWIER_SWIER4_Pos (4U)
  2047. #define EXTI_SWIER_SWIER4_Msk (0x1U << EXTI_SWIER_SWIER4_Pos) /*!< 0x00000010 */
  2048. #define EXTI_SWIER_SWIER4 EXTI_SWIER_SWIER4_Msk /*!< Software Interrupt on line 4 */
  2049. #define EXTI_SWIER_SWIER5_Pos (5U)
  2050. #define EXTI_SWIER_SWIER5_Msk (0x1U << EXTI_SWIER_SWIER5_Pos) /*!< 0x00000020 */
  2051. #define EXTI_SWIER_SWIER5 EXTI_SWIER_SWIER5_Msk /*!< Software Interrupt on line 5 */
  2052. #define EXTI_SWIER_SWIER6_Pos (6U)
  2053. #define EXTI_SWIER_SWIER6_Msk (0x1U << EXTI_SWIER_SWIER6_Pos) /*!< 0x00000040 */
  2054. #define EXTI_SWIER_SWIER6 EXTI_SWIER_SWIER6_Msk /*!< Software Interrupt on line 6 */
  2055. #define EXTI_SWIER_SWIER7_Pos (7U)
  2056. #define EXTI_SWIER_SWIER7_Msk (0x1U << EXTI_SWIER_SWIER7_Pos) /*!< 0x00000080 */
  2057. #define EXTI_SWIER_SWIER7 EXTI_SWIER_SWIER7_Msk /*!< Software Interrupt on line 7 */
  2058. #define EXTI_SWIER_SWIER8_Pos (8U)
  2059. #define EXTI_SWIER_SWIER8_Msk (0x1U << EXTI_SWIER_SWIER8_Pos) /*!< 0x00000100 */
  2060. #define EXTI_SWIER_SWIER8 EXTI_SWIER_SWIER8_Msk /*!< Software Interrupt on line 8 */
  2061. #define EXTI_SWIER_SWIER9_Pos (9U)
  2062. #define EXTI_SWIER_SWIER9_Msk (0x1U << EXTI_SWIER_SWIER9_Pos) /*!< 0x00000200 */
  2063. #define EXTI_SWIER_SWIER9 EXTI_SWIER_SWIER9_Msk /*!< Software Interrupt on line 9 */
  2064. #define EXTI_SWIER_SWIER10_Pos (10U)
  2065. #define EXTI_SWIER_SWIER10_Msk (0x1U << EXTI_SWIER_SWIER10_Pos) /*!< 0x00000400 */
  2066. #define EXTI_SWIER_SWIER10 EXTI_SWIER_SWIER10_Msk /*!< Software Interrupt on line 10 */
  2067. #define EXTI_SWIER_SWIER11_Pos (11U)
  2068. #define EXTI_SWIER_SWIER11_Msk (0x1U << EXTI_SWIER_SWIER11_Pos) /*!< 0x00000800 */
  2069. #define EXTI_SWIER_SWIER11 EXTI_SWIER_SWIER11_Msk /*!< Software Interrupt on line 11 */
  2070. #define EXTI_SWIER_SWIER12_Pos (12U)
  2071. #define EXTI_SWIER_SWIER12_Msk (0x1U << EXTI_SWIER_SWIER12_Pos) /*!< 0x00001000 */
  2072. #define EXTI_SWIER_SWIER12 EXTI_SWIER_SWIER12_Msk /*!< Software Interrupt on line 12 */
  2073. #define EXTI_SWIER_SWIER13_Pos (13U)
  2074. #define EXTI_SWIER_SWIER13_Msk (0x1U << EXTI_SWIER_SWIER13_Pos) /*!< 0x00002000 */
  2075. #define EXTI_SWIER_SWIER13 EXTI_SWIER_SWIER13_Msk /*!< Software Interrupt on line 13 */
  2076. #define EXTI_SWIER_SWIER14_Pos (14U)
  2077. #define EXTI_SWIER_SWIER14_Msk (0x1U << EXTI_SWIER_SWIER14_Pos) /*!< 0x00004000 */
  2078. #define EXTI_SWIER_SWIER14 EXTI_SWIER_SWIER14_Msk /*!< Software Interrupt on line 14 */
  2079. #define EXTI_SWIER_SWIER15_Pos (15U)
  2080. #define EXTI_SWIER_SWIER15_Msk (0x1U << EXTI_SWIER_SWIER15_Pos) /*!< 0x00008000 */
  2081. #define EXTI_SWIER_SWIER15 EXTI_SWIER_SWIER15_Msk /*!< Software Interrupt on line 15 */
  2082. #define EXTI_SWIER_SWIER16_Pos (16U)
  2083. #define EXTI_SWIER_SWIER16_Msk (0x1U << EXTI_SWIER_SWIER16_Pos) /*!< 0x00010000 */
  2084. #define EXTI_SWIER_SWIER16 EXTI_SWIER_SWIER16_Msk /*!< Software Interrupt on line 16 */
  2085. #define EXTI_SWIER_SWIER17_Pos (17U)
  2086. #define EXTI_SWIER_SWIER17_Msk (0x1U << EXTI_SWIER_SWIER17_Pos) /*!< 0x00020000 */
  2087. #define EXTI_SWIER_SWIER17 EXTI_SWIER_SWIER17_Msk /*!< Software Interrupt on line 17 */
  2088. #define EXTI_SWIER_SWIER18_Pos (18U)
  2089. #define EXTI_SWIER_SWIER18_Msk (0x1U << EXTI_SWIER_SWIER18_Pos) /*!< 0x00040000 */
  2090. #define EXTI_SWIER_SWIER18 EXTI_SWIER_SWIER18_Msk /*!< Software Interrupt on line 18 */
  2091. #define EXTI_SWIER_SWIER19_Pos (19U)
  2092. #define EXTI_SWIER_SWIER19_Msk (0x1U << EXTI_SWIER_SWIER19_Pos) /*!< 0x00080000 */
  2093. #define EXTI_SWIER_SWIER19 EXTI_SWIER_SWIER19_Msk /*!< Software Interrupt on line 19 */
  2094. #define EXTI_SWIER_SWIER20_Pos (20U)
  2095. #define EXTI_SWIER_SWIER20_Msk (0x1U << EXTI_SWIER_SWIER20_Pos) /*!< 0x00100000 */
  2096. #define EXTI_SWIER_SWIER20 EXTI_SWIER_SWIER20_Msk /*!< Software Interrupt on line 20 */
  2097. #define EXTI_SWIER_SWIER21_Pos (21U)
  2098. #define EXTI_SWIER_SWIER21_Msk (0x1U << EXTI_SWIER_SWIER21_Pos) /*!< 0x00200000 */
  2099. #define EXTI_SWIER_SWIER21 EXTI_SWIER_SWIER21_Msk /*!< Software Interrupt on line 21 */
  2100. #define EXTI_SWIER_SWIER22_Pos (22U)
  2101. #define EXTI_SWIER_SWIER22_Msk (0x1U << EXTI_SWIER_SWIER22_Pos) /*!< 0x00400000 */
  2102. #define EXTI_SWIER_SWIER22 EXTI_SWIER_SWIER22_Msk /*!< Software Interrupt on line 22 */
  2103. /******************* Bit definition for EXTI_PR register ********************/
  2104. #define EXTI_PR_PR0_Pos (0U)
  2105. #define EXTI_PR_PR0_Msk (0x1U << EXTI_PR_PR0_Pos) /*!< 0x00000001 */
  2106. #define EXTI_PR_PR0 EXTI_PR_PR0_Msk /*!< Pending bit for line 0 */
  2107. #define EXTI_PR_PR1_Pos (1U)
  2108. #define EXTI_PR_PR1_Msk (0x1U << EXTI_PR_PR1_Pos) /*!< 0x00000002 */
  2109. #define EXTI_PR_PR1 EXTI_PR_PR1_Msk /*!< Pending bit for line 1 */
  2110. #define EXTI_PR_PR2_Pos (2U)
  2111. #define EXTI_PR_PR2_Msk (0x1U << EXTI_PR_PR2_Pos) /*!< 0x00000004 */
  2112. #define EXTI_PR_PR2 EXTI_PR_PR2_Msk /*!< Pending bit for line 2 */
  2113. #define EXTI_PR_PR3_Pos (3U)
  2114. #define EXTI_PR_PR3_Msk (0x1U << EXTI_PR_PR3_Pos) /*!< 0x00000008 */
  2115. #define EXTI_PR_PR3 EXTI_PR_PR3_Msk /*!< Pending bit for line 3 */
  2116. #define EXTI_PR_PR4_Pos (4U)
  2117. #define EXTI_PR_PR4_Msk (0x1U << EXTI_PR_PR4_Pos) /*!< 0x00000010 */
  2118. #define EXTI_PR_PR4 EXTI_PR_PR4_Msk /*!< Pending bit for line 4 */
  2119. #define EXTI_PR_PR5_Pos (5U)
  2120. #define EXTI_PR_PR5_Msk (0x1U << EXTI_PR_PR5_Pos) /*!< 0x00000020 */
  2121. #define EXTI_PR_PR5 EXTI_PR_PR5_Msk /*!< Pending bit for line 5 */
  2122. #define EXTI_PR_PR6_Pos (6U)
  2123. #define EXTI_PR_PR6_Msk (0x1U << EXTI_PR_PR6_Pos) /*!< 0x00000040 */
  2124. #define EXTI_PR_PR6 EXTI_PR_PR6_Msk /*!< Pending bit for line 6 */
  2125. #define EXTI_PR_PR7_Pos (7U)
  2126. #define EXTI_PR_PR7_Msk (0x1U << EXTI_PR_PR7_Pos) /*!< 0x00000080 */
  2127. #define EXTI_PR_PR7 EXTI_PR_PR7_Msk /*!< Pending bit for line 7 */
  2128. #define EXTI_PR_PR8_Pos (8U)
  2129. #define EXTI_PR_PR8_Msk (0x1U << EXTI_PR_PR8_Pos) /*!< 0x00000100 */
  2130. #define EXTI_PR_PR8 EXTI_PR_PR8_Msk /*!< Pending bit for line 8 */
  2131. #define EXTI_PR_PR9_Pos (9U)
  2132. #define EXTI_PR_PR9_Msk (0x1U << EXTI_PR_PR9_Pos) /*!< 0x00000200 */
  2133. #define EXTI_PR_PR9 EXTI_PR_PR9_Msk /*!< Pending bit for line 9 */
  2134. #define EXTI_PR_PR10_Pos (10U)
  2135. #define EXTI_PR_PR10_Msk (0x1U << EXTI_PR_PR10_Pos) /*!< 0x00000400 */
  2136. #define EXTI_PR_PR10 EXTI_PR_PR10_Msk /*!< Pending bit for line 10 */
  2137. #define EXTI_PR_PR11_Pos (11U)
  2138. #define EXTI_PR_PR11_Msk (0x1U << EXTI_PR_PR11_Pos) /*!< 0x00000800 */
  2139. #define EXTI_PR_PR11 EXTI_PR_PR11_Msk /*!< Pending bit for line 11 */
  2140. #define EXTI_PR_PR12_Pos (12U)
  2141. #define EXTI_PR_PR12_Msk (0x1U << EXTI_PR_PR12_Pos) /*!< 0x00001000 */
  2142. #define EXTI_PR_PR12 EXTI_PR_PR12_Msk /*!< Pending bit for line 12 */
  2143. #define EXTI_PR_PR13_Pos (13U)
  2144. #define EXTI_PR_PR13_Msk (0x1U << EXTI_PR_PR13_Pos) /*!< 0x00002000 */
  2145. #define EXTI_PR_PR13 EXTI_PR_PR13_Msk /*!< Pending bit for line 13 */
  2146. #define EXTI_PR_PR14_Pos (14U)
  2147. #define EXTI_PR_PR14_Msk (0x1U << EXTI_PR_PR14_Pos) /*!< 0x00004000 */
  2148. #define EXTI_PR_PR14 EXTI_PR_PR14_Msk /*!< Pending bit for line 14 */
  2149. #define EXTI_PR_PR15_Pos (15U)
  2150. #define EXTI_PR_PR15_Msk (0x1U << EXTI_PR_PR15_Pos) /*!< 0x00008000 */
  2151. #define EXTI_PR_PR15 EXTI_PR_PR15_Msk /*!< Pending bit for line 15 */
  2152. #define EXTI_PR_PR16_Pos (16U)
  2153. #define EXTI_PR_PR16_Msk (0x1U << EXTI_PR_PR16_Pos) /*!< 0x00010000 */
  2154. #define EXTI_PR_PR16 EXTI_PR_PR16_Msk /*!< Pending bit for line 16 */
  2155. #define EXTI_PR_PR17_Pos (17U)
  2156. #define EXTI_PR_PR17_Msk (0x1U << EXTI_PR_PR17_Pos) /*!< 0x00020000 */
  2157. #define EXTI_PR_PR17 EXTI_PR_PR17_Msk /*!< Pending bit for line 17 */
  2158. #define EXTI_PR_PR18_Pos (18U)
  2159. #define EXTI_PR_PR18_Msk (0x1U << EXTI_PR_PR18_Pos) /*!< 0x00040000 */
  2160. #define EXTI_PR_PR18 EXTI_PR_PR18_Msk /*!< Pending bit for line 18 */
  2161. #define EXTI_PR_PR19_Pos (19U)
  2162. #define EXTI_PR_PR19_Msk (0x1U << EXTI_PR_PR19_Pos) /*!< 0x00080000 */
  2163. #define EXTI_PR_PR19 EXTI_PR_PR19_Msk /*!< Pending bit for line 19 */
  2164. #define EXTI_PR_PR20_Pos (20U)
  2165. #define EXTI_PR_PR20_Msk (0x1U << EXTI_PR_PR20_Pos) /*!< 0x00100000 */
  2166. #define EXTI_PR_PR20 EXTI_PR_PR20_Msk /*!< Pending bit for line 20 */
  2167. #define EXTI_PR_PR21_Pos (21U)
  2168. #define EXTI_PR_PR21_Msk (0x1U << EXTI_PR_PR21_Pos) /*!< 0x00200000 */
  2169. #define EXTI_PR_PR21 EXTI_PR_PR21_Msk /*!< Pending bit for line 21 */
  2170. #define EXTI_PR_PR22_Pos (22U)
  2171. #define EXTI_PR_PR22_Msk (0x1U << EXTI_PR_PR22_Pos) /*!< 0x00400000 */
  2172. #define EXTI_PR_PR22 EXTI_PR_PR22_Msk /*!< Pending bit for line 22 */
  2173. /******************************************************************************/
  2174. /* */
  2175. /* FLASH */
  2176. /* */
  2177. /******************************************************************************/
  2178. /******************* Bits definition for FLASH_ACR register *****************/
  2179. #define FLASH_ACR_LATENCY_Pos (0U)
  2180. #define FLASH_ACR_LATENCY_Msk (0xFU << FLASH_ACR_LATENCY_Pos) /*!< 0x0000000F */
  2181. #define FLASH_ACR_LATENCY FLASH_ACR_LATENCY_Msk
  2182. #define FLASH_ACR_LATENCY_0WS 0x00000000U
  2183. #define FLASH_ACR_LATENCY_1WS 0x00000001U
  2184. #define FLASH_ACR_LATENCY_2WS 0x00000002U
  2185. #define FLASH_ACR_LATENCY_3WS 0x00000003U
  2186. #define FLASH_ACR_LATENCY_4WS 0x00000004U
  2187. #define FLASH_ACR_LATENCY_5WS 0x00000005U
  2188. #define FLASH_ACR_LATENCY_6WS 0x00000006U
  2189. #define FLASH_ACR_LATENCY_7WS 0x00000007U
  2190. #define FLASH_ACR_PRFTEN_Pos (8U)
  2191. #define FLASH_ACR_PRFTEN_Msk (0x1U << FLASH_ACR_PRFTEN_Pos) /*!< 0x00000100 */
  2192. #define FLASH_ACR_PRFTEN FLASH_ACR_PRFTEN_Msk
  2193. #define FLASH_ACR_ICEN_Pos (9U)
  2194. #define FLASH_ACR_ICEN_Msk (0x1U << FLASH_ACR_ICEN_Pos) /*!< 0x00000200 */
  2195. #define FLASH_ACR_ICEN FLASH_ACR_ICEN_Msk
  2196. #define FLASH_ACR_DCEN_Pos (10U)
  2197. #define FLASH_ACR_DCEN_Msk (0x1U << FLASH_ACR_DCEN_Pos) /*!< 0x00000400 */
  2198. #define FLASH_ACR_DCEN FLASH_ACR_DCEN_Msk
  2199. #define FLASH_ACR_ICRST_Pos (11U)
  2200. #define FLASH_ACR_ICRST_Msk (0x1U << FLASH_ACR_ICRST_Pos) /*!< 0x00000800 */
  2201. #define FLASH_ACR_ICRST FLASH_ACR_ICRST_Msk
  2202. #define FLASH_ACR_DCRST_Pos (12U)
  2203. #define FLASH_ACR_DCRST_Msk (0x1U << FLASH_ACR_DCRST_Pos) /*!< 0x00001000 */
  2204. #define FLASH_ACR_DCRST FLASH_ACR_DCRST_Msk
  2205. #define FLASH_ACR_BYTE0_ADDRESS_Pos (10U)
  2206. #define FLASH_ACR_BYTE0_ADDRESS_Msk (0x10008FU << FLASH_ACR_BYTE0_ADDRESS_Pos) /*!< 0x40023C00 */
  2207. #define FLASH_ACR_BYTE0_ADDRESS FLASH_ACR_BYTE0_ADDRESS_Msk
  2208. #define FLASH_ACR_BYTE2_ADDRESS_Pos (0U)
  2209. #define FLASH_ACR_BYTE2_ADDRESS_Msk (0x40023C03U << FLASH_ACR_BYTE2_ADDRESS_Pos) /*!< 0x40023C03 */
  2210. #define FLASH_ACR_BYTE2_ADDRESS FLASH_ACR_BYTE2_ADDRESS_Msk
  2211. /******************* Bits definition for FLASH_SR register ******************/
  2212. #define FLASH_SR_EOP_Pos (0U)
  2213. #define FLASH_SR_EOP_Msk (0x1U << FLASH_SR_EOP_Pos) /*!< 0x00000001 */
  2214. #define FLASH_SR_EOP FLASH_SR_EOP_Msk
  2215. #define FLASH_SR_SOP_Pos (1U)
  2216. #define FLASH_SR_SOP_Msk (0x1U << FLASH_SR_SOP_Pos) /*!< 0x00000002 */
  2217. #define FLASH_SR_SOP FLASH_SR_SOP_Msk
  2218. #define FLASH_SR_WRPERR_Pos (4U)
  2219. #define FLASH_SR_WRPERR_Msk (0x1U << FLASH_SR_WRPERR_Pos) /*!< 0x00000010 */
  2220. #define FLASH_SR_WRPERR FLASH_SR_WRPERR_Msk
  2221. #define FLASH_SR_PGAERR_Pos (5U)
  2222. #define FLASH_SR_PGAERR_Msk (0x1U << FLASH_SR_PGAERR_Pos) /*!< 0x00000020 */
  2223. #define FLASH_SR_PGAERR FLASH_SR_PGAERR_Msk
  2224. #define FLASH_SR_PGPERR_Pos (6U)
  2225. #define FLASH_SR_PGPERR_Msk (0x1U << FLASH_SR_PGPERR_Pos) /*!< 0x00000040 */
  2226. #define FLASH_SR_PGPERR FLASH_SR_PGPERR_Msk
  2227. #define FLASH_SR_PGSERR_Pos (7U)
  2228. #define FLASH_SR_PGSERR_Msk (0x1U << FLASH_SR_PGSERR_Pos) /*!< 0x00000080 */
  2229. #define FLASH_SR_PGSERR FLASH_SR_PGSERR_Msk
  2230. #define FLASH_SR_RDERR_Pos (8U)
  2231. #define FLASH_SR_RDERR_Msk (0x1U << FLASH_SR_RDERR_Pos) /*!< 0x00000100 */
  2232. #define FLASH_SR_RDERR FLASH_SR_RDERR_Msk
  2233. #define FLASH_SR_BSY_Pos (16U)
  2234. #define FLASH_SR_BSY_Msk (0x1U << FLASH_SR_BSY_Pos) /*!< 0x00010000 */
  2235. #define FLASH_SR_BSY FLASH_SR_BSY_Msk
  2236. /******************* Bits definition for FLASH_CR register ******************/
  2237. #define FLASH_CR_PG_Pos (0U)
  2238. #define FLASH_CR_PG_Msk (0x1U << FLASH_CR_PG_Pos) /*!< 0x00000001 */
  2239. #define FLASH_CR_PG FLASH_CR_PG_Msk
  2240. #define FLASH_CR_SER_Pos (1U)
  2241. #define FLASH_CR_SER_Msk (0x1U << FLASH_CR_SER_Pos) /*!< 0x00000002 */
  2242. #define FLASH_CR_SER FLASH_CR_SER_Msk
  2243. #define FLASH_CR_MER_Pos (2U)
  2244. #define FLASH_CR_MER_Msk (0x1U << FLASH_CR_MER_Pos) /*!< 0x00000004 */
  2245. #define FLASH_CR_MER FLASH_CR_MER_Msk
  2246. #define FLASH_CR_SNB_Pos (3U)
  2247. #define FLASH_CR_SNB_Msk (0x1FU << FLASH_CR_SNB_Pos) /*!< 0x000000F8 */
  2248. #define FLASH_CR_SNB FLASH_CR_SNB_Msk
  2249. #define FLASH_CR_SNB_0 (0x01U << FLASH_CR_SNB_Pos) /*!< 0x00000008 */
  2250. #define FLASH_CR_SNB_1 (0x02U << FLASH_CR_SNB_Pos) /*!< 0x00000010 */
  2251. #define FLASH_CR_SNB_2 (0x04U << FLASH_CR_SNB_Pos) /*!< 0x00000020 */
  2252. #define FLASH_CR_SNB_3 (0x08U << FLASH_CR_SNB_Pos) /*!< 0x00000040 */
  2253. #define FLASH_CR_SNB_4 (0x10U << FLASH_CR_SNB_Pos) /*!< 0x00000080 */
  2254. #define FLASH_CR_PSIZE_Pos (8U)
  2255. #define FLASH_CR_PSIZE_Msk (0x3U << FLASH_CR_PSIZE_Pos) /*!< 0x00000300 */
  2256. #define FLASH_CR_PSIZE FLASH_CR_PSIZE_Msk
  2257. #define FLASH_CR_PSIZE_0 (0x1U << FLASH_CR_PSIZE_Pos) /*!< 0x00000100 */
  2258. #define FLASH_CR_PSIZE_1 (0x2U << FLASH_CR_PSIZE_Pos) /*!< 0x00000200 */
  2259. #define FLASH_CR_STRT_Pos (16U)
  2260. #define FLASH_CR_STRT_Msk (0x1U << FLASH_CR_STRT_Pos) /*!< 0x00010000 */
  2261. #define FLASH_CR_STRT FLASH_CR_STRT_Msk
  2262. #define FLASH_CR_EOPIE_Pos (24U)
  2263. #define FLASH_CR_EOPIE_Msk (0x1U << FLASH_CR_EOPIE_Pos) /*!< 0x01000000 */
  2264. #define FLASH_CR_EOPIE FLASH_CR_EOPIE_Msk
  2265. #define FLASH_CR_LOCK_Pos (31U)
  2266. #define FLASH_CR_LOCK_Msk (0x1U << FLASH_CR_LOCK_Pos) /*!< 0x80000000 */
  2267. #define FLASH_CR_LOCK FLASH_CR_LOCK_Msk
  2268. /******************* Bits definition for FLASH_OPTCR register ***************/
  2269. #define FLASH_OPTCR_OPTLOCK_Pos (0U)
  2270. #define FLASH_OPTCR_OPTLOCK_Msk (0x1U << FLASH_OPTCR_OPTLOCK_Pos) /*!< 0x00000001 */
  2271. #define FLASH_OPTCR_OPTLOCK FLASH_OPTCR_OPTLOCK_Msk
  2272. #define FLASH_OPTCR_OPTSTRT_Pos (1U)
  2273. #define FLASH_OPTCR_OPTSTRT_Msk (0x1U << FLASH_OPTCR_OPTSTRT_Pos) /*!< 0x00000002 */
  2274. #define FLASH_OPTCR_OPTSTRT FLASH_OPTCR_OPTSTRT_Msk
  2275. #define FLASH_OPTCR_BOR_LEV_0 0x00000004U
  2276. #define FLASH_OPTCR_BOR_LEV_1 0x00000008U
  2277. #define FLASH_OPTCR_BOR_LEV_Pos (2U)
  2278. #define FLASH_OPTCR_BOR_LEV_Msk (0x3U << FLASH_OPTCR_BOR_LEV_Pos) /*!< 0x0000000C */
  2279. #define FLASH_OPTCR_BOR_LEV FLASH_OPTCR_BOR_LEV_Msk
  2280. #define FLASH_OPTCR_WDG_SW_Pos (5U)
  2281. #define FLASH_OPTCR_WDG_SW_Msk (0x1U << FLASH_OPTCR_WDG_SW_Pos) /*!< 0x00000020 */
  2282. #define FLASH_OPTCR_WDG_SW FLASH_OPTCR_WDG_SW_Msk
  2283. #define FLASH_OPTCR_nRST_STOP_Pos (6U)
  2284. #define FLASH_OPTCR_nRST_STOP_Msk (0x1U << FLASH_OPTCR_nRST_STOP_Pos) /*!< 0x00000040 */
  2285. #define FLASH_OPTCR_nRST_STOP FLASH_OPTCR_nRST_STOP_Msk
  2286. #define FLASH_OPTCR_nRST_STDBY_Pos (7U)
  2287. #define FLASH_OPTCR_nRST_STDBY_Msk (0x1U << FLASH_OPTCR_nRST_STDBY_Pos) /*!< 0x00000080 */
  2288. #define FLASH_OPTCR_nRST_STDBY FLASH_OPTCR_nRST_STDBY_Msk
  2289. #define FLASH_OPTCR_RDP_Pos (8U)
  2290. #define FLASH_OPTCR_RDP_Msk (0xFFU << FLASH_OPTCR_RDP_Pos) /*!< 0x0000FF00 */
  2291. #define FLASH_OPTCR_RDP FLASH_OPTCR_RDP_Msk
  2292. #define FLASH_OPTCR_RDP_0 (0x01U << FLASH_OPTCR_RDP_Pos) /*!< 0x00000100 */
  2293. #define FLASH_OPTCR_RDP_1 (0x02U << FLASH_OPTCR_RDP_Pos) /*!< 0x00000200 */
  2294. #define FLASH_OPTCR_RDP_2 (0x04U << FLASH_OPTCR_RDP_Pos) /*!< 0x00000400 */
  2295. #define FLASH_OPTCR_RDP_3 (0x08U << FLASH_OPTCR_RDP_Pos) /*!< 0x00000800 */
  2296. #define FLASH_OPTCR_RDP_4 (0x10U << FLASH_OPTCR_RDP_Pos) /*!< 0x00001000 */
  2297. #define FLASH_OPTCR_RDP_5 (0x20U << FLASH_OPTCR_RDP_Pos) /*!< 0x00002000 */
  2298. #define FLASH_OPTCR_RDP_6 (0x40U << FLASH_OPTCR_RDP_Pos) /*!< 0x00004000 */
  2299. #define FLASH_OPTCR_RDP_7 (0x80U << FLASH_OPTCR_RDP_Pos) /*!< 0x00008000 */
  2300. #define FLASH_OPTCR_nWRP_Pos (16U)
  2301. #define FLASH_OPTCR_nWRP_Msk (0xFFFU << FLASH_OPTCR_nWRP_Pos) /*!< 0x0FFF0000 */
  2302. #define FLASH_OPTCR_nWRP FLASH_OPTCR_nWRP_Msk
  2303. #define FLASH_OPTCR_nWRP_0 0x00010000U
  2304. #define FLASH_OPTCR_nWRP_1 0x00020000U
  2305. #define FLASH_OPTCR_nWRP_2 0x00040000U
  2306. #define FLASH_OPTCR_nWRP_3 0x00080000U
  2307. #define FLASH_OPTCR_nWRP_4 0x00100000U
  2308. #define FLASH_OPTCR_nWRP_5 0x00200000U
  2309. #define FLASH_OPTCR_nWRP_6 0x00400000U
  2310. #define FLASH_OPTCR_nWRP_7 0x00800000U
  2311. #define FLASH_OPTCR_nWRP_8 0x01000000U
  2312. #define FLASH_OPTCR_nWRP_9 0x02000000U
  2313. #define FLASH_OPTCR_nWRP_10 0x04000000U
  2314. #define FLASH_OPTCR_nWRP_11 0x08000000U
  2315. /****************** Bits definition for FLASH_OPTCR1 register ***************/
  2316. #define FLASH_OPTCR1_nWRP_Pos (16U)
  2317. #define FLASH_OPTCR1_nWRP_Msk (0xFFFU << FLASH_OPTCR1_nWRP_Pos) /*!< 0x0FFF0000 */
  2318. #define FLASH_OPTCR1_nWRP FLASH_OPTCR1_nWRP_Msk
  2319. #define FLASH_OPTCR1_nWRP_0 (0x001U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x00010000 */
  2320. #define FLASH_OPTCR1_nWRP_1 (0x002U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x00020000 */
  2321. #define FLASH_OPTCR1_nWRP_2 (0x004U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x00040000 */
  2322. #define FLASH_OPTCR1_nWRP_3 (0x008U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x00080000 */
  2323. #define FLASH_OPTCR1_nWRP_4 (0x010U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x00100000 */
  2324. #define FLASH_OPTCR1_nWRP_5 (0x020U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x00200000 */
  2325. #define FLASH_OPTCR1_nWRP_6 (0x040U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x00400000 */
  2326. #define FLASH_OPTCR1_nWRP_7 (0x080U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x00800000 */
  2327. #define FLASH_OPTCR1_nWRP_8 (0x100U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x01000000 */
  2328. #define FLASH_OPTCR1_nWRP_9 (0x200U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x02000000 */
  2329. #define FLASH_OPTCR1_nWRP_10 (0x400U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x04000000 */
  2330. #define FLASH_OPTCR1_nWRP_11 (0x800U << FLASH_OPTCR1_nWRP_Pos) /*!< 0x08000000 */
  2331. /******************************************************************************/
  2332. /* */
  2333. /* General Purpose I/O */
  2334. /* */
  2335. /******************************************************************************/
  2336. /****************** Bits definition for GPIO_MODER register *****************/
  2337. #define GPIO_MODER_MODE0_Pos (0U)
  2338. #define GPIO_MODER_MODE0_Msk (0x3U << GPIO_MODER_MODE0_Pos) /*!< 0x00000003 */
  2339. #define GPIO_MODER_MODE0 GPIO_MODER_MODE0_Msk
  2340. #define GPIO_MODER_MODE0_0 (0x1U << GPIO_MODER_MODE0_Pos) /*!< 0x00000001 */
  2341. #define GPIO_MODER_MODE0_1 (0x2U << GPIO_MODER_MODE0_Pos) /*!< 0x00000002 */
  2342. #define GPIO_MODER_MODE1_Pos (2U)
  2343. #define GPIO_MODER_MODE1_Msk (0x3U << GPIO_MODER_MODE1_Pos) /*!< 0x0000000C */
  2344. #define GPIO_MODER_MODE1 GPIO_MODER_MODE1_Msk
  2345. #define GPIO_MODER_MODE1_0 (0x1U << GPIO_MODER_MODE1_Pos) /*!< 0x00000004 */
  2346. #define GPIO_MODER_MODE1_1 (0x2U << GPIO_MODER_MODE1_Pos) /*!< 0x00000008 */
  2347. #define GPIO_MODER_MODE2_Pos (4U)
  2348. #define GPIO_MODER_MODE2_Msk (0x3U << GPIO_MODER_MODE2_Pos) /*!< 0x00000030 */
  2349. #define GPIO_MODER_MODE2 GPIO_MODER_MODE2_Msk
  2350. #define GPIO_MODER_MODE2_0 (0x1U << GPIO_MODER_MODE2_Pos) /*!< 0x00000010 */
  2351. #define GPIO_MODER_MODE2_1 (0x2U << GPIO_MODER_MODE2_Pos) /*!< 0x00000020 */
  2352. #define GPIO_MODER_MODE3_Pos (6U)
  2353. #define GPIO_MODER_MODE3_Msk (0x3U << GPIO_MODER_MODE3_Pos) /*!< 0x000000C0 */
  2354. #define GPIO_MODER_MODE3 GPIO_MODER_MODE3_Msk
  2355. #define GPIO_MODER_MODE3_0 (0x1U << GPIO_MODER_MODE3_Pos) /*!< 0x00000040 */
  2356. #define GPIO_MODER_MODE3_1 (0x2U << GPIO_MODER_MODE3_Pos) /*!< 0x00000080 */
  2357. #define GPIO_MODER_MODE4_Pos (8U)
  2358. #define GPIO_MODER_MODE4_Msk (0x3U << GPIO_MODER_MODE4_Pos) /*!< 0x00000300 */
  2359. #define GPIO_MODER_MODE4 GPIO_MODER_MODE4_Msk
  2360. #define GPIO_MODER_MODE4_0 (0x1U << GPIO_MODER_MODE4_Pos) /*!< 0x00000100 */
  2361. #define GPIO_MODER_MODE4_1 (0x2U << GPIO_MODER_MODE4_Pos) /*!< 0x00000200 */
  2362. #define GPIO_MODER_MODE5_Pos (10U)
  2363. #define GPIO_MODER_MODE5_Msk (0x3U << GPIO_MODER_MODE5_Pos) /*!< 0x00000C00 */
  2364. #define GPIO_MODER_MODE5 GPIO_MODER_MODE5_Msk
  2365. #define GPIO_MODER_MODE5_0 (0x1U << GPIO_MODER_MODE5_Pos) /*!< 0x00000400 */
  2366. #define GPIO_MODER_MODE5_1 (0x2U << GPIO_MODER_MODE5_Pos) /*!< 0x00000800 */
  2367. #define GPIO_MODER_MODE6_Pos (12U)
  2368. #define GPIO_MODER_MODE6_Msk (0x3U << GPIO_MODER_MODE6_Pos) /*!< 0x00003000 */
  2369. #define GPIO_MODER_MODE6 GPIO_MODER_MODE6_Msk
  2370. #define GPIO_MODER_MODE6_0 (0x1U << GPIO_MODER_MODE6_Pos) /*!< 0x00001000 */
  2371. #define GPIO_MODER_MODE6_1 (0x2U << GPIO_MODER_MODE6_Pos) /*!< 0x00002000 */
  2372. #define GPIO_MODER_MODE7_Pos (14U)
  2373. #define GPIO_MODER_MODE7_Msk (0x3U << GPIO_MODER_MODE7_Pos) /*!< 0x0000C000 */
  2374. #define GPIO_MODER_MODE7 GPIO_MODER_MODE7_Msk
  2375. #define GPIO_MODER_MODE7_0 (0x1U << GPIO_MODER_MODE7_Pos) /*!< 0x00004000 */
  2376. #define GPIO_MODER_MODE7_1 (0x2U << GPIO_MODER_MODE7_Pos) /*!< 0x00008000 */
  2377. #define GPIO_MODER_MODE8_Pos (16U)
  2378. #define GPIO_MODER_MODE8_Msk (0x3U << GPIO_MODER_MODE8_Pos) /*!< 0x00030000 */
  2379. #define GPIO_MODER_MODE8 GPIO_MODER_MODE8_Msk
  2380. #define GPIO_MODER_MODE8_0 (0x1U << GPIO_MODER_MODE8_Pos) /*!< 0x00010000 */
  2381. #define GPIO_MODER_MODE8_1 (0x2U << GPIO_MODER_MODE8_Pos) /*!< 0x00020000 */
  2382. #define GPIO_MODER_MODE9_Pos (18U)
  2383. #define GPIO_MODER_MODE9_Msk (0x3U << GPIO_MODER_MODE9_Pos) /*!< 0x000C0000 */
  2384. #define GPIO_MODER_MODE9 GPIO_MODER_MODE9_Msk
  2385. #define GPIO_MODER_MODE9_0 (0x1U << GPIO_MODER_MODE9_Pos) /*!< 0x00040000 */
  2386. #define GPIO_MODER_MODE9_1 (0x2U << GPIO_MODER_MODE9_Pos) /*!< 0x00080000 */
  2387. #define GPIO_MODER_MODE10_Pos (20U)
  2388. #define GPIO_MODER_MODE10_Msk (0x3U << GPIO_MODER_MODE10_Pos) /*!< 0x00300000 */
  2389. #define GPIO_MODER_MODE10 GPIO_MODER_MODE10_Msk
  2390. #define GPIO_MODER_MODE10_0 (0x1U << GPIO_MODER_MODE10_Pos) /*!< 0x00100000 */
  2391. #define GPIO_MODER_MODE10_1 (0x2U << GPIO_MODER_MODE10_Pos) /*!< 0x00200000 */
  2392. #define GPIO_MODER_MODE11_Pos (22U)
  2393. #define GPIO_MODER_MODE11_Msk (0x3U << GPIO_MODER_MODE11_Pos) /*!< 0x00C00000 */
  2394. #define GPIO_MODER_MODE11 GPIO_MODER_MODE11_Msk
  2395. #define GPIO_MODER_MODE11_0 (0x1U << GPIO_MODER_MODE11_Pos) /*!< 0x00400000 */
  2396. #define GPIO_MODER_MODE11_1 (0x2U << GPIO_MODER_MODE11_Pos) /*!< 0x00800000 */
  2397. #define GPIO_MODER_MODE12_Pos (24U)
  2398. #define GPIO_MODER_MODE12_Msk (0x3U << GPIO_MODER_MODE12_Pos) /*!< 0x03000000 */
  2399. #define GPIO_MODER_MODE12 GPIO_MODER_MODE12_Msk
  2400. #define GPIO_MODER_MODE12_0 (0x1U << GPIO_MODER_MODE12_Pos) /*!< 0x01000000 */
  2401. #define GPIO_MODER_MODE12_1 (0x2U << GPIO_MODER_MODE12_Pos) /*!< 0x02000000 */
  2402. #define GPIO_MODER_MODE13_Pos (26U)
  2403. #define GPIO_MODER_MODE13_Msk (0x3U << GPIO_MODER_MODE13_Pos) /*!< 0x0C000000 */
  2404. #define GPIO_MODER_MODE13 GPIO_MODER_MODE13_Msk
  2405. #define GPIO_MODER_MODE13_0 (0x1U << GPIO_MODER_MODE13_Pos) /*!< 0x04000000 */
  2406. #define GPIO_MODER_MODE13_1 (0x2U << GPIO_MODER_MODE13_Pos) /*!< 0x08000000 */
  2407. #define GPIO_MODER_MODE14_Pos (28U)
  2408. #define GPIO_MODER_MODE14_Msk (0x3U << GPIO_MODER_MODE14_Pos) /*!< 0x30000000 */
  2409. #define GPIO_MODER_MODE14 GPIO_MODER_MODE14_Msk
  2410. #define GPIO_MODER_MODE14_0 (0x1U << GPIO_MODER_MODE14_Pos) /*!< 0x10000000 */
  2411. #define GPIO_MODER_MODE14_1 (0x2U << GPIO_MODER_MODE14_Pos) /*!< 0x20000000 */
  2412. #define GPIO_MODER_MODE15_Pos (30U)
  2413. #define GPIO_MODER_MODE15_Msk (0x3U << GPIO_MODER_MODE15_Pos) /*!< 0xC0000000 */
  2414. #define GPIO_MODER_MODE15 GPIO_MODER_MODE15_Msk
  2415. #define GPIO_MODER_MODE15_0 (0x1U << GPIO_MODER_MODE15_Pos) /*!< 0x40000000 */
  2416. #define GPIO_MODER_MODE15_1 (0x2U << GPIO_MODER_MODE15_Pos) /*!< 0x80000000 */
  2417. /* Legacy defines */
  2418. #define GPIO_MODER_MODER0_Pos (0U)
  2419. #define GPIO_MODER_MODER0_Msk (0x3U << GPIO_MODER_MODER0_Pos) /*!< 0x00000003 */
  2420. #define GPIO_MODER_MODER0 GPIO_MODER_MODER0_Msk
  2421. #define GPIO_MODER_MODER0_0 (0x1U << GPIO_MODER_MODER0_Pos) /*!< 0x00000001 */
  2422. #define GPIO_MODER_MODER0_1 (0x2U << GPIO_MODER_MODER0_Pos) /*!< 0x00000002 */
  2423. #define GPIO_MODER_MODER1_Pos (2U)
  2424. #define GPIO_MODER_MODER1_Msk (0x3U << GPIO_MODER_MODER1_Pos) /*!< 0x0000000C */
  2425. #define GPIO_MODER_MODER1 GPIO_MODER_MODER1_Msk
  2426. #define GPIO_MODER_MODER1_0 (0x1U << GPIO_MODER_MODER1_Pos) /*!< 0x00000004 */
  2427. #define GPIO_MODER_MODER1_1 (0x2U << GPIO_MODER_MODER1_Pos) /*!< 0x00000008 */
  2428. #define GPIO_MODER_MODER2_Pos (4U)
  2429. #define GPIO_MODER_MODER2_Msk (0x3U << GPIO_MODER_MODER2_Pos) /*!< 0x00000030 */
  2430. #define GPIO_MODER_MODER2 GPIO_MODER_MODER2_Msk
  2431. #define GPIO_MODER_MODER2_0 (0x1U << GPIO_MODER_MODER2_Pos) /*!< 0x00000010 */
  2432. #define GPIO_MODER_MODER2_1 (0x2U << GPIO_MODER_MODER2_Pos) /*!< 0x00000020 */
  2433. #define GPIO_MODER_MODER3_Pos (6U)
  2434. #define GPIO_MODER_MODER3_Msk (0x3U << GPIO_MODER_MODER3_Pos) /*!< 0x000000C0 */
  2435. #define GPIO_MODER_MODER3 GPIO_MODER_MODER3_Msk
  2436. #define GPIO_MODER_MODER3_0 (0x1U << GPIO_MODER_MODER3_Pos) /*!< 0x00000040 */
  2437. #define GPIO_MODER_MODER3_1 (0x2U << GPIO_MODER_MODER3_Pos) /*!< 0x00000080 */
  2438. #define GPIO_MODER_MODER4_Pos (8U)
  2439. #define GPIO_MODER_MODER4_Msk (0x3U << GPIO_MODER_MODER4_Pos) /*!< 0x00000300 */
  2440. #define GPIO_MODER_MODER4 GPIO_MODER_MODER4_Msk
  2441. #define GPIO_MODER_MODER4_0 (0x1U << GPIO_MODER_MODER4_Pos) /*!< 0x00000100 */
  2442. #define GPIO_MODER_MODER4_1 (0x2U << GPIO_MODER_MODER4_Pos) /*!< 0x00000200 */
  2443. #define GPIO_MODER_MODER5_Pos (10U)
  2444. #define GPIO_MODER_MODER5_Msk (0x3U << GPIO_MODER_MODER5_Pos) /*!< 0x00000C00 */
  2445. #define GPIO_MODER_MODER5 GPIO_MODER_MODER5_Msk
  2446. #define GPIO_MODER_MODER5_0 (0x1U << GPIO_MODER_MODER5_Pos) /*!< 0x00000400 */
  2447. #define GPIO_MODER_MODER5_1 (0x2U << GPIO_MODER_MODER5_Pos) /*!< 0x00000800 */
  2448. #define GPIO_MODER_MODER6_Pos (12U)
  2449. #define GPIO_MODER_MODER6_Msk (0x3U << GPIO_MODER_MODER6_Pos) /*!< 0x00003000 */
  2450. #define GPIO_MODER_MODER6 GPIO_MODER_MODER6_Msk
  2451. #define GPIO_MODER_MODER6_0 (0x1U << GPIO_MODER_MODER6_Pos) /*!< 0x00001000 */
  2452. #define GPIO_MODER_MODER6_1 (0x2U << GPIO_MODER_MODER6_Pos) /*!< 0x00002000 */
  2453. #define GPIO_MODER_MODER7_Pos (14U)
  2454. #define GPIO_MODER_MODER7_Msk (0x3U << GPIO_MODER_MODER7_Pos) /*!< 0x0000C000 */
  2455. #define GPIO_MODER_MODER7 GPIO_MODER_MODER7_Msk
  2456. #define GPIO_MODER_MODER7_0 (0x1U << GPIO_MODER_MODER7_Pos) /*!< 0x00004000 */
  2457. #define GPIO_MODER_MODER7_1 (0x2U << GPIO_MODER_MODER7_Pos) /*!< 0x00008000 */
  2458. #define GPIO_MODER_MODER8_Pos (16U)
  2459. #define GPIO_MODER_MODER8_Msk (0x3U << GPIO_MODER_MODER8_Pos) /*!< 0x00030000 */
  2460. #define GPIO_MODER_MODER8 GPIO_MODER_MODER8_Msk
  2461. #define GPIO_MODER_MODER8_0 (0x1U << GPIO_MODER_MODER8_Pos) /*!< 0x00010000 */
  2462. #define GPIO_MODER_MODER8_1 (0x2U << GPIO_MODER_MODER8_Pos) /*!< 0x00020000 */
  2463. #define GPIO_MODER_MODER9_Pos (18U)
  2464. #define GPIO_MODER_MODER9_Msk (0x3U << GPIO_MODER_MODER9_Pos) /*!< 0x000C0000 */
  2465. #define GPIO_MODER_MODER9 GPIO_MODER_MODER9_Msk
  2466. #define GPIO_MODER_MODER9_0 (0x1U << GPIO_MODER_MODER9_Pos) /*!< 0x00040000 */
  2467. #define GPIO_MODER_MODER9_1 (0x2U << GPIO_MODER_MODER9_Pos) /*!< 0x00080000 */
  2468. #define GPIO_MODER_MODER10_Pos (20U)
  2469. #define GPIO_MODER_MODER10_Msk (0x3U << GPIO_MODER_MODER10_Pos) /*!< 0x00300000 */
  2470. #define GPIO_MODER_MODER10 GPIO_MODER_MODER10_Msk
  2471. #define GPIO_MODER_MODER10_0 (0x1U << GPIO_MODER_MODER10_Pos) /*!< 0x00100000 */
  2472. #define GPIO_MODER_MODER10_1 (0x2U << GPIO_MODER_MODER10_Pos) /*!< 0x00200000 */
  2473. #define GPIO_MODER_MODER11_Pos (22U)
  2474. #define GPIO_MODER_MODER11_Msk (0x3U << GPIO_MODER_MODER11_Pos) /*!< 0x00C00000 */
  2475. #define GPIO_MODER_MODER11 GPIO_MODER_MODER11_Msk
  2476. #define GPIO_MODER_MODER11_0 (0x1U << GPIO_MODER_MODER11_Pos) /*!< 0x00400000 */
  2477. #define GPIO_MODER_MODER11_1 (0x2U << GPIO_MODER_MODER11_Pos) /*!< 0x00800000 */
  2478. #define GPIO_MODER_MODER12_Pos (24U)
  2479. #define GPIO_MODER_MODER12_Msk (0x3U << GPIO_MODER_MODER12_Pos) /*!< 0x03000000 */
  2480. #define GPIO_MODER_MODER12 GPIO_MODER_MODER12_Msk
  2481. #define GPIO_MODER_MODER12_0 (0x1U << GPIO_MODER_MODER12_Pos) /*!< 0x01000000 */
  2482. #define GPIO_MODER_MODER12_1 (0x2U << GPIO_MODER_MODER12_Pos) /*!< 0x02000000 */
  2483. #define GPIO_MODER_MODER13_Pos (26U)
  2484. #define GPIO_MODER_MODER13_Msk (0x3U << GPIO_MODER_MODER13_Pos) /*!< 0x0C000000 */
  2485. #define GPIO_MODER_MODER13 GPIO_MODER_MODER13_Msk
  2486. #define GPIO_MODER_MODER13_0 (0x1U << GPIO_MODER_MODER13_Pos) /*!< 0x04000000 */
  2487. #define GPIO_MODER_MODER13_1 (0x2U << GPIO_MODER_MODER13_Pos) /*!< 0x08000000 */
  2488. #define GPIO_MODER_MODER14_Pos (28U)
  2489. #define GPIO_MODER_MODER14_Msk (0x3U << GPIO_MODER_MODER14_Pos) /*!< 0x30000000 */
  2490. #define GPIO_MODER_MODER14 GPIO_MODER_MODER14_Msk
  2491. #define GPIO_MODER_MODER14_0 (0x1U << GPIO_MODER_MODER14_Pos) /*!< 0x10000000 */
  2492. #define GPIO_MODER_MODER14_1 (0x2U << GPIO_MODER_MODER14_Pos) /*!< 0x20000000 */
  2493. #define GPIO_MODER_MODER15_Pos (30U)
  2494. #define GPIO_MODER_MODER15_Msk (0x3U << GPIO_MODER_MODER15_Pos) /*!< 0xC0000000 */
  2495. #define GPIO_MODER_MODER15 GPIO_MODER_MODER15_Msk
  2496. #define GPIO_MODER_MODER15_0 (0x1U << GPIO_MODER_MODER15_Pos) /*!< 0x40000000 */
  2497. #define GPIO_MODER_MODER15_1 (0x2U << GPIO_MODER_MODER15_Pos) /*!< 0x80000000 */
  2498. /****************** Bits definition for GPIO_OTYPER register ****************/
  2499. #define GPIO_OTYPER_OT0_Pos (0U)
  2500. #define GPIO_OTYPER_OT0_Msk (0x1U << GPIO_OTYPER_OT0_Pos) /*!< 0x00000001 */
  2501. #define GPIO_OTYPER_OT0 GPIO_OTYPER_OT0_Msk
  2502. #define GPIO_OTYPER_OT1_Pos (1U)
  2503. #define GPIO_OTYPER_OT1_Msk (0x1U << GPIO_OTYPER_OT1_Pos) /*!< 0x00000002 */
  2504. #define GPIO_OTYPER_OT1 GPIO_OTYPER_OT1_Msk
  2505. #define GPIO_OTYPER_OT2_Pos (2U)
  2506. #define GPIO_OTYPER_OT2_Msk (0x1U << GPIO_OTYPER_OT2_Pos) /*!< 0x00000004 */
  2507. #define GPIO_OTYPER_OT2 GPIO_OTYPER_OT2_Msk
  2508. #define GPIO_OTYPER_OT3_Pos (3U)
  2509. #define GPIO_OTYPER_OT3_Msk (0x1U << GPIO_OTYPER_OT3_Pos) /*!< 0x00000008 */
  2510. #define GPIO_OTYPER_OT3 GPIO_OTYPER_OT3_Msk
  2511. #define GPIO_OTYPER_OT4_Pos (4U)
  2512. #define GPIO_OTYPER_OT4_Msk (0x1U << GPIO_OTYPER_OT4_Pos) /*!< 0x00000010 */
  2513. #define GPIO_OTYPER_OT4 GPIO_OTYPER_OT4_Msk
  2514. #define GPIO_OTYPER_OT5_Pos (5U)
  2515. #define GPIO_OTYPER_OT5_Msk (0x1U << GPIO_OTYPER_OT5_Pos) /*!< 0x00000020 */
  2516. #define GPIO_OTYPER_OT5 GPIO_OTYPER_OT5_Msk
  2517. #define GPIO_OTYPER_OT6_Pos (6U)
  2518. #define GPIO_OTYPER_OT6_Msk (0x1U << GPIO_OTYPER_OT6_Pos) /*!< 0x00000040 */
  2519. #define GPIO_OTYPER_OT6 GPIO_OTYPER_OT6_Msk
  2520. #define GPIO_OTYPER_OT7_Pos (7U)
  2521. #define GPIO_OTYPER_OT7_Msk (0x1U << GPIO_OTYPER_OT7_Pos) /*!< 0x00000080 */
  2522. #define GPIO_OTYPER_OT7 GPIO_OTYPER_OT7_Msk
  2523. #define GPIO_OTYPER_OT8_Pos (8U)
  2524. #define GPIO_OTYPER_OT8_Msk (0x1U << GPIO_OTYPER_OT8_Pos) /*!< 0x00000100 */
  2525. #define GPIO_OTYPER_OT8 GPIO_OTYPER_OT8_Msk
  2526. #define GPIO_OTYPER_OT9_Pos (9U)
  2527. #define GPIO_OTYPER_OT9_Msk (0x1U << GPIO_OTYPER_OT9_Pos) /*!< 0x00000200 */
  2528. #define GPIO_OTYPER_OT9 GPIO_OTYPER_OT9_Msk
  2529. #define GPIO_OTYPER_OT10_Pos (10U)
  2530. #define GPIO_OTYPER_OT10_Msk (0x1U << GPIO_OTYPER_OT10_Pos) /*!< 0x00000400 */
  2531. #define GPIO_OTYPER_OT10 GPIO_OTYPER_OT10_Msk
  2532. #define GPIO_OTYPER_OT11_Pos (11U)
  2533. #define GPIO_OTYPER_OT11_Msk (0x1U << GPIO_OTYPER_OT11_Pos) /*!< 0x00000800 */
  2534. #define GPIO_OTYPER_OT11 GPIO_OTYPER_OT11_Msk
  2535. #define GPIO_OTYPER_OT12_Pos (12U)
  2536. #define GPIO_OTYPER_OT12_Msk (0x1U << GPIO_OTYPER_OT12_Pos) /*!< 0x00001000 */
  2537. #define GPIO_OTYPER_OT12 GPIO_OTYPER_OT12_Msk
  2538. #define GPIO_OTYPER_OT13_Pos (13U)
  2539. #define GPIO_OTYPER_OT13_Msk (0x1U << GPIO_OTYPER_OT13_Pos) /*!< 0x00002000 */
  2540. #define GPIO_OTYPER_OT13 GPIO_OTYPER_OT13_Msk
  2541. #define GPIO_OTYPER_OT14_Pos (14U)
  2542. #define GPIO_OTYPER_OT14_Msk (0x1U << GPIO_OTYPER_OT14_Pos) /*!< 0x00004000 */
  2543. #define GPIO_OTYPER_OT14 GPIO_OTYPER_OT14_Msk
  2544. #define GPIO_OTYPER_OT15_Pos (15U)
  2545. #define GPIO_OTYPER_OT15_Msk (0x1U << GPIO_OTYPER_OT15_Pos) /*!< 0x00008000 */
  2546. #define GPIO_OTYPER_OT15 GPIO_OTYPER_OT15_Msk
  2547. /* Legacy defines */
  2548. #define GPIO_OTYPER_OT_0 GPIO_OTYPER_OT0
  2549. #define GPIO_OTYPER_OT_1 GPIO_OTYPER_OT1
  2550. #define GPIO_OTYPER_OT_2 GPIO_OTYPER_OT2
  2551. #define GPIO_OTYPER_OT_3 GPIO_OTYPER_OT3
  2552. #define GPIO_OTYPER_OT_4 GPIO_OTYPER_OT4
  2553. #define GPIO_OTYPER_OT_5 GPIO_OTYPER_OT5
  2554. #define GPIO_OTYPER_OT_6 GPIO_OTYPER_OT6
  2555. #define GPIO_OTYPER_OT_7 GPIO_OTYPER_OT7
  2556. #define GPIO_OTYPER_OT_8 GPIO_OTYPER_OT8
  2557. #define GPIO_OTYPER_OT_9 GPIO_OTYPER_OT9
  2558. #define GPIO_OTYPER_OT_10 GPIO_OTYPER_OT10
  2559. #define GPIO_OTYPER_OT_11 GPIO_OTYPER_OT11
  2560. #define GPIO_OTYPER_OT_12 GPIO_OTYPER_OT12
  2561. #define GPIO_OTYPER_OT_13 GPIO_OTYPER_OT13
  2562. #define GPIO_OTYPER_OT_14 GPIO_OTYPER_OT14
  2563. #define GPIO_OTYPER_OT_15 GPIO_OTYPER_OT15
  2564. /****************** Bits definition for GPIO_OSPEEDR register ***************/
  2565. #define GPIO_OSPEEDR_OSPEED0_Pos (0U)
  2566. #define GPIO_OSPEEDR_OSPEED0_Msk (0x3U << GPIO_OSPEEDR_OSPEED0_Pos) /*!< 0x00000003 */
  2567. #define GPIO_OSPEEDR_OSPEED0 GPIO_OSPEEDR_OSPEED0_Msk
  2568. #define GPIO_OSPEEDR_OSPEED0_0 (0x1U << GPIO_OSPEEDR_OSPEED0_Pos) /*!< 0x00000001 */
  2569. #define GPIO_OSPEEDR_OSPEED0_1 (0x2U << GPIO_OSPEEDR_OSPEED0_Pos) /*!< 0x00000002 */
  2570. #define GPIO_OSPEEDR_OSPEED1_Pos (2U)
  2571. #define GPIO_OSPEEDR_OSPEED1_Msk (0x3U << GPIO_OSPEEDR_OSPEED1_Pos) /*!< 0x0000000C */
  2572. #define GPIO_OSPEEDR_OSPEED1 GPIO_OSPEEDR_OSPEED1_Msk
  2573. #define GPIO_OSPEEDR_OSPEED1_0 (0x1U << GPIO_OSPEEDR_OSPEED1_Pos) /*!< 0x00000004 */
  2574. #define GPIO_OSPEEDR_OSPEED1_1 (0x2U << GPIO_OSPEEDR_OSPEED1_Pos) /*!< 0x00000008 */
  2575. #define GPIO_OSPEEDR_OSPEED2_Pos (4U)
  2576. #define GPIO_OSPEEDR_OSPEED2_Msk (0x3U << GPIO_OSPEEDR_OSPEED2_Pos) /*!< 0x00000030 */
  2577. #define GPIO_OSPEEDR_OSPEED2 GPIO_OSPEEDR_OSPEED2_Msk
  2578. #define GPIO_OSPEEDR_OSPEED2_0 (0x1U << GPIO_OSPEEDR_OSPEED2_Pos) /*!< 0x00000010 */
  2579. #define GPIO_OSPEEDR_OSPEED2_1 (0x2U << GPIO_OSPEEDR_OSPEED2_Pos) /*!< 0x00000020 */
  2580. #define GPIO_OSPEEDR_OSPEED3_Pos (6U)
  2581. #define GPIO_OSPEEDR_OSPEED3_Msk (0x3U << GPIO_OSPEEDR_OSPEED3_Pos) /*!< 0x000000C0 */
  2582. #define GPIO_OSPEEDR_OSPEED3 GPIO_OSPEEDR_OSPEED3_Msk
  2583. #define GPIO_OSPEEDR_OSPEED3_0 (0x1U << GPIO_OSPEEDR_OSPEED3_Pos) /*!< 0x00000040 */
  2584. #define GPIO_OSPEEDR_OSPEED3_1 (0x2U << GPIO_OSPEEDR_OSPEED3_Pos) /*!< 0x00000080 */
  2585. #define GPIO_OSPEEDR_OSPEED4_Pos (8U)
  2586. #define GPIO_OSPEEDR_OSPEED4_Msk (0x3U << GPIO_OSPEEDR_OSPEED4_Pos) /*!< 0x00000300 */
  2587. #define GPIO_OSPEEDR_OSPEED4 GPIO_OSPEEDR_OSPEED4_Msk
  2588. #define GPIO_OSPEEDR_OSPEED4_0 (0x1U << GPIO_OSPEEDR_OSPEED4_Pos) /*!< 0x00000100 */
  2589. #define GPIO_OSPEEDR_OSPEED4_1 (0x2U << GPIO_OSPEEDR_OSPEED4_Pos) /*!< 0x00000200 */
  2590. #define GPIO_OSPEEDR_OSPEED5_Pos (10U)
  2591. #define GPIO_OSPEEDR_OSPEED5_Msk (0x3U << GPIO_OSPEEDR_OSPEED5_Pos) /*!< 0x00000C00 */
  2592. #define GPIO_OSPEEDR_OSPEED5 GPIO_OSPEEDR_OSPEED5_Msk
  2593. #define GPIO_OSPEEDR_OSPEED5_0 (0x1U << GPIO_OSPEEDR_OSPEED5_Pos) /*!< 0x00000400 */
  2594. #define GPIO_OSPEEDR_OSPEED5_1 (0x2U << GPIO_OSPEEDR_OSPEED5_Pos) /*!< 0x00000800 */
  2595. #define GPIO_OSPEEDR_OSPEED6_Pos (12U)
  2596. #define GPIO_OSPEEDR_OSPEED6_Msk (0x3U << GPIO_OSPEEDR_OSPEED6_Pos) /*!< 0x00003000 */
  2597. #define GPIO_OSPEEDR_OSPEED6 GPIO_OSPEEDR_OSPEED6_Msk
  2598. #define GPIO_OSPEEDR_OSPEED6_0 (0x1U << GPIO_OSPEEDR_OSPEED6_Pos) /*!< 0x00001000 */
  2599. #define GPIO_OSPEEDR_OSPEED6_1 (0x2U << GPIO_OSPEEDR_OSPEED6_Pos) /*!< 0x00002000 */
  2600. #define GPIO_OSPEEDR_OSPEED7_Pos (14U)
  2601. #define GPIO_OSPEEDR_OSPEED7_Msk (0x3U << GPIO_OSPEEDR_OSPEED7_Pos) /*!< 0x0000C000 */
  2602. #define GPIO_OSPEEDR_OSPEED7 GPIO_OSPEEDR_OSPEED7_Msk
  2603. #define GPIO_OSPEEDR_OSPEED7_0 (0x1U << GPIO_OSPEEDR_OSPEED7_Pos) /*!< 0x00004000 */
  2604. #define GPIO_OSPEEDR_OSPEED7_1 (0x2U << GPIO_OSPEEDR_OSPEED7_Pos) /*!< 0x00008000 */
  2605. #define GPIO_OSPEEDR_OSPEED8_Pos (16U)
  2606. #define GPIO_OSPEEDR_OSPEED8_Msk (0x3U << GPIO_OSPEEDR_OSPEED8_Pos) /*!< 0x00030000 */
  2607. #define GPIO_OSPEEDR_OSPEED8 GPIO_OSPEEDR_OSPEED8_Msk
  2608. #define GPIO_OSPEEDR_OSPEED8_0 (0x1U << GPIO_OSPEEDR_OSPEED8_Pos) /*!< 0x00010000 */
  2609. #define GPIO_OSPEEDR_OSPEED8_1 (0x2U << GPIO_OSPEEDR_OSPEED8_Pos) /*!< 0x00020000 */
  2610. #define GPIO_OSPEEDR_OSPEED9_Pos (18U)
  2611. #define GPIO_OSPEEDR_OSPEED9_Msk (0x3U << GPIO_OSPEEDR_OSPEED9_Pos) /*!< 0x000C0000 */
  2612. #define GPIO_OSPEEDR_OSPEED9 GPIO_OSPEEDR_OSPEED9_Msk
  2613. #define GPIO_OSPEEDR_OSPEED9_0 (0x1U << GPIO_OSPEEDR_OSPEED9_Pos) /*!< 0x00040000 */
  2614. #define GPIO_OSPEEDR_OSPEED9_1 (0x2U << GPIO_OSPEEDR_OSPEED9_Pos) /*!< 0x00080000 */
  2615. #define GPIO_OSPEEDR_OSPEED10_Pos (20U)
  2616. #define GPIO_OSPEEDR_OSPEED10_Msk (0x3U << GPIO_OSPEEDR_OSPEED10_Pos) /*!< 0x00300000 */
  2617. #define GPIO_OSPEEDR_OSPEED10 GPIO_OSPEEDR_OSPEED10_Msk
  2618. #define GPIO_OSPEEDR_OSPEED10_0 (0x1U << GPIO_OSPEEDR_OSPEED10_Pos) /*!< 0x00100000 */
  2619. #define GPIO_OSPEEDR_OSPEED10_1 (0x2U << GPIO_OSPEEDR_OSPEED10_Pos) /*!< 0x00200000 */
  2620. #define GPIO_OSPEEDR_OSPEED11_Pos (22U)
  2621. #define GPIO_OSPEEDR_OSPEED11_Msk (0x3U << GPIO_OSPEEDR_OSPEED11_Pos) /*!< 0x00C00000 */
  2622. #define GPIO_OSPEEDR_OSPEED11 GPIO_OSPEEDR_OSPEED11_Msk
  2623. #define GPIO_OSPEEDR_OSPEED11_0 (0x1U << GPIO_OSPEEDR_OSPEED11_Pos) /*!< 0x00400000 */
  2624. #define GPIO_OSPEEDR_OSPEED11_1 (0x2U << GPIO_OSPEEDR_OSPEED11_Pos) /*!< 0x00800000 */
  2625. #define GPIO_OSPEEDR_OSPEED12_Pos (24U)
  2626. #define GPIO_OSPEEDR_OSPEED12_Msk (0x3U << GPIO_OSPEEDR_OSPEED12_Pos) /*!< 0x03000000 */
  2627. #define GPIO_OSPEEDR_OSPEED12 GPIO_OSPEEDR_OSPEED12_Msk
  2628. #define GPIO_OSPEEDR_OSPEED12_0 (0x1U << GPIO_OSPEEDR_OSPEED12_Pos) /*!< 0x01000000 */
  2629. #define GPIO_OSPEEDR_OSPEED12_1 (0x2U << GPIO_OSPEEDR_OSPEED12_Pos) /*!< 0x02000000 */
  2630. #define GPIO_OSPEEDR_OSPEED13_Pos (26U)
  2631. #define GPIO_OSPEEDR_OSPEED13_Msk (0x3U << GPIO_OSPEEDR_OSPEED13_Pos) /*!< 0x0C000000 */
  2632. #define GPIO_OSPEEDR_OSPEED13 GPIO_OSPEEDR_OSPEED13_Msk
  2633. #define GPIO_OSPEEDR_OSPEED13_0 (0x1U << GPIO_OSPEEDR_OSPEED13_Pos) /*!< 0x04000000 */
  2634. #define GPIO_OSPEEDR_OSPEED13_1 (0x2U << GPIO_OSPEEDR_OSPEED13_Pos) /*!< 0x08000000 */
  2635. #define GPIO_OSPEEDR_OSPEED14_Pos (28U)
  2636. #define GPIO_OSPEEDR_OSPEED14_Msk (0x3U << GPIO_OSPEEDR_OSPEED14_Pos) /*!< 0x30000000 */
  2637. #define GPIO_OSPEEDR_OSPEED14 GPIO_OSPEEDR_OSPEED14_Msk
  2638. #define GPIO_OSPEEDR_OSPEED14_0 (0x1U << GPIO_OSPEEDR_OSPEED14_Pos) /*!< 0x10000000 */
  2639. #define GPIO_OSPEEDR_OSPEED14_1 (0x2U << GPIO_OSPEEDR_OSPEED14_Pos) /*!< 0x20000000 */
  2640. #define GPIO_OSPEEDR_OSPEED15_Pos (30U)
  2641. #define GPIO_OSPEEDR_OSPEED15_Msk (0x3U << GPIO_OSPEEDR_OSPEED15_Pos) /*!< 0xC0000000 */
  2642. #define GPIO_OSPEEDR_OSPEED15 GPIO_OSPEEDR_OSPEED15_Msk
  2643. #define GPIO_OSPEEDR_OSPEED15_0 (0x1U << GPIO_OSPEEDR_OSPEED15_Pos) /*!< 0x40000000 */
  2644. #define GPIO_OSPEEDR_OSPEED15_1 (0x2U << GPIO_OSPEEDR_OSPEED15_Pos) /*!< 0x80000000 */
  2645. /* Legacy defines */
  2646. #define GPIO_OSPEEDER_OSPEEDR0 GPIO_OSPEEDR_OSPEED0
  2647. #define GPIO_OSPEEDER_OSPEEDR0_0 GPIO_OSPEEDR_OSPEED0_0
  2648. #define GPIO_OSPEEDER_OSPEEDR0_1 GPIO_OSPEEDR_OSPEED0_1
  2649. #define GPIO_OSPEEDER_OSPEEDR1 GPIO_OSPEEDR_OSPEED1
  2650. #define GPIO_OSPEEDER_OSPEEDR1_0 GPIO_OSPEEDR_OSPEED1_0
  2651. #define GPIO_OSPEEDER_OSPEEDR1_1 GPIO_OSPEEDR_OSPEED1_1
  2652. #define GPIO_OSPEEDER_OSPEEDR2 GPIO_OSPEEDR_OSPEED2
  2653. #define GPIO_OSPEEDER_OSPEEDR2_0 GPIO_OSPEEDR_OSPEED2_0
  2654. #define GPIO_OSPEEDER_OSPEEDR2_1 GPIO_OSPEEDR_OSPEED2_1
  2655. #define GPIO_OSPEEDER_OSPEEDR3 GPIO_OSPEEDR_OSPEED3
  2656. #define GPIO_OSPEEDER_OSPEEDR3_0 GPIO_OSPEEDR_OSPEED3_0
  2657. #define GPIO_OSPEEDER_OSPEEDR3_1 GPIO_OSPEEDR_OSPEED3_1
  2658. #define GPIO_OSPEEDER_OSPEEDR4 GPIO_OSPEEDR_OSPEED4
  2659. #define GPIO_OSPEEDER_OSPEEDR4_0 GPIO_OSPEEDR_OSPEED4_0
  2660. #define GPIO_OSPEEDER_OSPEEDR4_1 GPIO_OSPEEDR_OSPEED4_1
  2661. #define GPIO_OSPEEDER_OSPEEDR5 GPIO_OSPEEDR_OSPEED5
  2662. #define GPIO_OSPEEDER_OSPEEDR5_0 GPIO_OSPEEDR_OSPEED5_0
  2663. #define GPIO_OSPEEDER_OSPEEDR5_1 GPIO_OSPEEDR_OSPEED5_1
  2664. #define GPIO_OSPEEDER_OSPEEDR6 GPIO_OSPEEDR_OSPEED6
  2665. #define GPIO_OSPEEDER_OSPEEDR6_0 GPIO_OSPEEDR_OSPEED6_0
  2666. #define GPIO_OSPEEDER_OSPEEDR6_1 GPIO_OSPEEDR_OSPEED6_1
  2667. #define GPIO_OSPEEDER_OSPEEDR7 GPIO_OSPEEDR_OSPEED7
  2668. #define GPIO_OSPEEDER_OSPEEDR7_0 GPIO_OSPEEDR_OSPEED7_0
  2669. #define GPIO_OSPEEDER_OSPEEDR7_1 GPIO_OSPEEDR_OSPEED7_1
  2670. #define GPIO_OSPEEDER_OSPEEDR8 GPIO_OSPEEDR_OSPEED8
  2671. #define GPIO_OSPEEDER_OSPEEDR8_0 GPIO_OSPEEDR_OSPEED8_0
  2672. #define GPIO_OSPEEDER_OSPEEDR8_1 GPIO_OSPEEDR_OSPEED8_1
  2673. #define GPIO_OSPEEDER_OSPEEDR9 GPIO_OSPEEDR_OSPEED9
  2674. #define GPIO_OSPEEDER_OSPEEDR9_0 GPIO_OSPEEDR_OSPEED9_0
  2675. #define GPIO_OSPEEDER_OSPEEDR9_1 GPIO_OSPEEDR_OSPEED9_1
  2676. #define GPIO_OSPEEDER_OSPEEDR10 GPIO_OSPEEDR_OSPEED10
  2677. #define GPIO_OSPEEDER_OSPEEDR10_0 GPIO_OSPEEDR_OSPEED10_0
  2678. #define GPIO_OSPEEDER_OSPEEDR10_1 GPIO_OSPEEDR_OSPEED10_1
  2679. #define GPIO_OSPEEDER_OSPEEDR11 GPIO_OSPEEDR_OSPEED11
  2680. #define GPIO_OSPEEDER_OSPEEDR11_0 GPIO_OSPEEDR_OSPEED11_0
  2681. #define GPIO_OSPEEDER_OSPEEDR11_1 GPIO_OSPEEDR_OSPEED11_1
  2682. #define GPIO_OSPEEDER_OSPEEDR12 GPIO_OSPEEDR_OSPEED12
  2683. #define GPIO_OSPEEDER_OSPEEDR12_0 GPIO_OSPEEDR_OSPEED12_0
  2684. #define GPIO_OSPEEDER_OSPEEDR12_1 GPIO_OSPEEDR_OSPEED12_1
  2685. #define GPIO_OSPEEDER_OSPEEDR13 GPIO_OSPEEDR_OSPEED13
  2686. #define GPIO_OSPEEDER_OSPEEDR13_0 GPIO_OSPEEDR_OSPEED13_0
  2687. #define GPIO_OSPEEDER_OSPEEDR13_1 GPIO_OSPEEDR_OSPEED13_1
  2688. #define GPIO_OSPEEDER_OSPEEDR14 GPIO_OSPEEDR_OSPEED14
  2689. #define GPIO_OSPEEDER_OSPEEDR14_0 GPIO_OSPEEDR_OSPEED14_0
  2690. #define GPIO_OSPEEDER_OSPEEDR14_1 GPIO_OSPEEDR_OSPEED14_1
  2691. #define GPIO_OSPEEDER_OSPEEDR15 GPIO_OSPEEDR_OSPEED15
  2692. #define GPIO_OSPEEDER_OSPEEDR15_0 GPIO_OSPEEDR_OSPEED15_0
  2693. #define GPIO_OSPEEDER_OSPEEDR15_1 GPIO_OSPEEDR_OSPEED15_1
  2694. /****************** Bits definition for GPIO_PUPDR register *****************/
  2695. #define GPIO_PUPDR_PUPD0_Pos (0U)
  2696. #define GPIO_PUPDR_PUPD0_Msk (0x3U << GPIO_PUPDR_PUPD0_Pos) /*!< 0x00000003 */
  2697. #define GPIO_PUPDR_PUPD0 GPIO_PUPDR_PUPD0_Msk
  2698. #define GPIO_PUPDR_PUPD0_0 (0x1U << GPIO_PUPDR_PUPD0_Pos) /*!< 0x00000001 */
  2699. #define GPIO_PUPDR_PUPD0_1 (0x2U << GPIO_PUPDR_PUPD0_Pos) /*!< 0x00000002 */
  2700. #define GPIO_PUPDR_PUPD1_Pos (2U)
  2701. #define GPIO_PUPDR_PUPD1_Msk (0x3U << GPIO_PUPDR_PUPD1_Pos) /*!< 0x0000000C */
  2702. #define GPIO_PUPDR_PUPD1 GPIO_PUPDR_PUPD1_Msk
  2703. #define GPIO_PUPDR_PUPD1_0 (0x1U << GPIO_PUPDR_PUPD1_Pos) /*!< 0x00000004 */
  2704. #define GPIO_PUPDR_PUPD1_1 (0x2U << GPIO_PUPDR_PUPD1_Pos) /*!< 0x00000008 */
  2705. #define GPIO_PUPDR_PUPD2_Pos (4U)
  2706. #define GPIO_PUPDR_PUPD2_Msk (0x3U << GPIO_PUPDR_PUPD2_Pos) /*!< 0x00000030 */
  2707. #define GPIO_PUPDR_PUPD2 GPIO_PUPDR_PUPD2_Msk
  2708. #define GPIO_PUPDR_PUPD2_0 (0x1U << GPIO_PUPDR_PUPD2_Pos) /*!< 0x00000010 */
  2709. #define GPIO_PUPDR_PUPD2_1 (0x2U << GPIO_PUPDR_PUPD2_Pos) /*!< 0x00000020 */
  2710. #define GPIO_PUPDR_PUPD3_Pos (6U)
  2711. #define GPIO_PUPDR_PUPD3_Msk (0x3U << GPIO_PUPDR_PUPD3_Pos) /*!< 0x000000C0 */
  2712. #define GPIO_PUPDR_PUPD3 GPIO_PUPDR_PUPD3_Msk
  2713. #define GPIO_PUPDR_PUPD3_0 (0x1U << GPIO_PUPDR_PUPD3_Pos) /*!< 0x00000040 */
  2714. #define GPIO_PUPDR_PUPD3_1 (0x2U << GPIO_PUPDR_PUPD3_Pos) /*!< 0x00000080 */
  2715. #define GPIO_PUPDR_PUPD4_Pos (8U)
  2716. #define GPIO_PUPDR_PUPD4_Msk (0x3U << GPIO_PUPDR_PUPD4_Pos) /*!< 0x00000300 */
  2717. #define GPIO_PUPDR_PUPD4 GPIO_PUPDR_PUPD4_Msk
  2718. #define GPIO_PUPDR_PUPD4_0 (0x1U << GPIO_PUPDR_PUPD4_Pos) /*!< 0x00000100 */
  2719. #define GPIO_PUPDR_PUPD4_1 (0x2U << GPIO_PUPDR_PUPD4_Pos) /*!< 0x00000200 */
  2720. #define GPIO_PUPDR_PUPD5_Pos (10U)
  2721. #define GPIO_PUPDR_PUPD5_Msk (0x3U << GPIO_PUPDR_PUPD5_Pos) /*!< 0x00000C00 */
  2722. #define GPIO_PUPDR_PUPD5 GPIO_PUPDR_PUPD5_Msk
  2723. #define GPIO_PUPDR_PUPD5_0 (0x1U << GPIO_PUPDR_PUPD5_Pos) /*!< 0x00000400 */
  2724. #define GPIO_PUPDR_PUPD5_1 (0x2U << GPIO_PUPDR_PUPD5_Pos) /*!< 0x00000800 */
  2725. #define GPIO_PUPDR_PUPD6_Pos (12U)
  2726. #define GPIO_PUPDR_PUPD6_Msk (0x3U << GPIO_PUPDR_PUPD6_Pos) /*!< 0x00003000 */
  2727. #define GPIO_PUPDR_PUPD6 GPIO_PUPDR_PUPD6_Msk
  2728. #define GPIO_PUPDR_PUPD6_0 (0x1U << GPIO_PUPDR_PUPD6_Pos) /*!< 0x00001000 */
  2729. #define GPIO_PUPDR_PUPD6_1 (0x2U << GPIO_PUPDR_PUPD6_Pos) /*!< 0x00002000 */
  2730. #define GPIO_PUPDR_PUPD7_Pos (14U)
  2731. #define GPIO_PUPDR_PUPD7_Msk (0x3U << GPIO_PUPDR_PUPD7_Pos) /*!< 0x0000C000 */
  2732. #define GPIO_PUPDR_PUPD7 GPIO_PUPDR_PUPD7_Msk
  2733. #define GPIO_PUPDR_PUPD7_0 (0x1U << GPIO_PUPDR_PUPD7_Pos) /*!< 0x00004000 */
  2734. #define GPIO_PUPDR_PUPD7_1 (0x2U << GPIO_PUPDR_PUPD7_Pos) /*!< 0x00008000 */
  2735. #define GPIO_PUPDR_PUPD8_Pos (16U)
  2736. #define GPIO_PUPDR_PUPD8_Msk (0x3U << GPIO_PUPDR_PUPD8_Pos) /*!< 0x00030000 */
  2737. #define GPIO_PUPDR_PUPD8 GPIO_PUPDR_PUPD8_Msk
  2738. #define GPIO_PUPDR_PUPD8_0 (0x1U << GPIO_PUPDR_PUPD8_Pos) /*!< 0x00010000 */
  2739. #define GPIO_PUPDR_PUPD8_1 (0x2U << GPIO_PUPDR_PUPD8_Pos) /*!< 0x00020000 */
  2740. #define GPIO_PUPDR_PUPD9_Pos (18U)
  2741. #define GPIO_PUPDR_PUPD9_Msk (0x3U << GPIO_PUPDR_PUPD9_Pos) /*!< 0x000C0000 */
  2742. #define GPIO_PUPDR_PUPD9 GPIO_PUPDR_PUPD9_Msk
  2743. #define GPIO_PUPDR_PUPD9_0 (0x1U << GPIO_PUPDR_PUPD9_Pos) /*!< 0x00040000 */
  2744. #define GPIO_PUPDR_PUPD9_1 (0x2U << GPIO_PUPDR_PUPD9_Pos) /*!< 0x00080000 */
  2745. #define GPIO_PUPDR_PUPD10_Pos (20U)
  2746. #define GPIO_PUPDR_PUPD10_Msk (0x3U << GPIO_PUPDR_PUPD10_Pos) /*!< 0x00300000 */
  2747. #define GPIO_PUPDR_PUPD10 GPIO_PUPDR_PUPD10_Msk
  2748. #define GPIO_PUPDR_PUPD10_0 (0x1U << GPIO_PUPDR_PUPD10_Pos) /*!< 0x00100000 */
  2749. #define GPIO_PUPDR_PUPD10_1 (0x2U << GPIO_PUPDR_PUPD10_Pos) /*!< 0x00200000 */
  2750. #define GPIO_PUPDR_PUPD11_Pos (22U)
  2751. #define GPIO_PUPDR_PUPD11_Msk (0x3U << GPIO_PUPDR_PUPD11_Pos) /*!< 0x00C00000 */
  2752. #define GPIO_PUPDR_PUPD11 GPIO_PUPDR_PUPD11_Msk
  2753. #define GPIO_PUPDR_PUPD11_0 (0x1U << GPIO_PUPDR_PUPD11_Pos) /*!< 0x00400000 */
  2754. #define GPIO_PUPDR_PUPD11_1 (0x2U << GPIO_PUPDR_PUPD11_Pos) /*!< 0x00800000 */
  2755. #define GPIO_PUPDR_PUPD12_Pos (24U)
  2756. #define GPIO_PUPDR_PUPD12_Msk (0x3U << GPIO_PUPDR_PUPD12_Pos) /*!< 0x03000000 */
  2757. #define GPIO_PUPDR_PUPD12 GPIO_PUPDR_PUPD12_Msk
  2758. #define GPIO_PUPDR_PUPD12_0 (0x1U << GPIO_PUPDR_PUPD12_Pos) /*!< 0x01000000 */
  2759. #define GPIO_PUPDR_PUPD12_1 (0x2U << GPIO_PUPDR_PUPD12_Pos) /*!< 0x02000000 */
  2760. #define GPIO_PUPDR_PUPD13_Pos (26U)
  2761. #define GPIO_PUPDR_PUPD13_Msk (0x3U << GPIO_PUPDR_PUPD13_Pos) /*!< 0x0C000000 */
  2762. #define GPIO_PUPDR_PUPD13 GPIO_PUPDR_PUPD13_Msk
  2763. #define GPIO_PUPDR_PUPD13_0 (0x1U << GPIO_PUPDR_PUPD13_Pos) /*!< 0x04000000 */
  2764. #define GPIO_PUPDR_PUPD13_1 (0x2U << GPIO_PUPDR_PUPD13_Pos) /*!< 0x08000000 */
  2765. #define GPIO_PUPDR_PUPD14_Pos (28U)
  2766. #define GPIO_PUPDR_PUPD14_Msk (0x3U << GPIO_PUPDR_PUPD14_Pos) /*!< 0x30000000 */
  2767. #define GPIO_PUPDR_PUPD14 GPIO_PUPDR_PUPD14_Msk
  2768. #define GPIO_PUPDR_PUPD14_0 (0x1U << GPIO_PUPDR_PUPD14_Pos) /*!< 0x10000000 */
  2769. #define GPIO_PUPDR_PUPD14_1 (0x2U << GPIO_PUPDR_PUPD14_Pos) /*!< 0x20000000 */
  2770. #define GPIO_PUPDR_PUPD15_Pos (30U)
  2771. #define GPIO_PUPDR_PUPD15_Msk (0x3U << GPIO_PUPDR_PUPD15_Pos) /*!< 0xC0000000 */
  2772. #define GPIO_PUPDR_PUPD15 GPIO_PUPDR_PUPD15_Msk
  2773. #define GPIO_PUPDR_PUPD15_0 (0x1U << GPIO_PUPDR_PUPD15_Pos) /*!< 0x40000000 */
  2774. #define GPIO_PUPDR_PUPD15_1 (0x2U << GPIO_PUPDR_PUPD15_Pos) /*!< 0x80000000 */
  2775. /* Legacy defines */
  2776. #define GPIO_PUPDR_PUPDR0 GPIO_PUPDR_PUPD0
  2777. #define GPIO_PUPDR_PUPDR0_0 GPIO_PUPDR_PUPD0_0
  2778. #define GPIO_PUPDR_PUPDR0_1 GPIO_PUPDR_PUPD0_1
  2779. #define GPIO_PUPDR_PUPDR1 GPIO_PUPDR_PUPD1
  2780. #define GPIO_PUPDR_PUPDR1_0 GPIO_PUPDR_PUPD1_0
  2781. #define GPIO_PUPDR_PUPDR1_1 GPIO_PUPDR_PUPD1_1
  2782. #define GPIO_PUPDR_PUPDR2 GPIO_PUPDR_PUPD2
  2783. #define GPIO_PUPDR_PUPDR2_0 GPIO_PUPDR_PUPD2_0
  2784. #define GPIO_PUPDR_PUPDR2_1 GPIO_PUPDR_PUPD2_1
  2785. #define GPIO_PUPDR_PUPDR3 GPIO_PUPDR_PUPD3
  2786. #define GPIO_PUPDR_PUPDR3_0 GPIO_PUPDR_PUPD3_0
  2787. #define GPIO_PUPDR_PUPDR3_1 GPIO_PUPDR_PUPD3_1
  2788. #define GPIO_PUPDR_PUPDR4 GPIO_PUPDR_PUPD4
  2789. #define GPIO_PUPDR_PUPDR4_0 GPIO_PUPDR_PUPD4_0
  2790. #define GPIO_PUPDR_PUPDR4_1 GPIO_PUPDR_PUPD4_1
  2791. #define GPIO_PUPDR_PUPDR5 GPIO_PUPDR_PUPD5
  2792. #define GPIO_PUPDR_PUPDR5_0 GPIO_PUPDR_PUPD5_0
  2793. #define GPIO_PUPDR_PUPDR5_1 GPIO_PUPDR_PUPD5_1
  2794. #define GPIO_PUPDR_PUPDR6 GPIO_PUPDR_PUPD6
  2795. #define GPIO_PUPDR_PUPDR6_0 GPIO_PUPDR_PUPD6_0
  2796. #define GPIO_PUPDR_PUPDR6_1 GPIO_PUPDR_PUPD6_1
  2797. #define GPIO_PUPDR_PUPDR7 GPIO_PUPDR_PUPD7
  2798. #define GPIO_PUPDR_PUPDR7_0 GPIO_PUPDR_PUPD7_0
  2799. #define GPIO_PUPDR_PUPDR7_1 GPIO_PUPDR_PUPD7_1
  2800. #define GPIO_PUPDR_PUPDR8 GPIO_PUPDR_PUPD8
  2801. #define GPIO_PUPDR_PUPDR8_0 GPIO_PUPDR_PUPD8_0
  2802. #define GPIO_PUPDR_PUPDR8_1 GPIO_PUPDR_PUPD8_1
  2803. #define GPIO_PUPDR_PUPDR9 GPIO_PUPDR_PUPD9
  2804. #define GPIO_PUPDR_PUPDR9_0 GPIO_PUPDR_PUPD9_0
  2805. #define GPIO_PUPDR_PUPDR9_1 GPIO_PUPDR_PUPD9_1
  2806. #define GPIO_PUPDR_PUPDR10 GPIO_PUPDR_PUPD10
  2807. #define GPIO_PUPDR_PUPDR10_0 GPIO_PUPDR_PUPD10_0
  2808. #define GPIO_PUPDR_PUPDR10_1 GPIO_PUPDR_PUPD10_1
  2809. #define GPIO_PUPDR_PUPDR11 GPIO_PUPDR_PUPD11
  2810. #define GPIO_PUPDR_PUPDR11_0 GPIO_PUPDR_PUPD11_0
  2811. #define GPIO_PUPDR_PUPDR11_1 GPIO_PUPDR_PUPD11_1
  2812. #define GPIO_PUPDR_PUPDR12 GPIO_PUPDR_PUPD12
  2813. #define GPIO_PUPDR_PUPDR12_0 GPIO_PUPDR_PUPD12_0
  2814. #define GPIO_PUPDR_PUPDR12_1 GPIO_PUPDR_PUPD12_1
  2815. #define GPIO_PUPDR_PUPDR13 GPIO_PUPDR_PUPD13
  2816. #define GPIO_PUPDR_PUPDR13_0 GPIO_PUPDR_PUPD13_0
  2817. #define GPIO_PUPDR_PUPDR13_1 GPIO_PUPDR_PUPD13_1
  2818. #define GPIO_PUPDR_PUPDR14 GPIO_PUPDR_PUPD14
  2819. #define GPIO_PUPDR_PUPDR14_0 GPIO_PUPDR_PUPD14_0
  2820. #define GPIO_PUPDR_PUPDR14_1 GPIO_PUPDR_PUPD14_1
  2821. #define GPIO_PUPDR_PUPDR15 GPIO_PUPDR_PUPD15
  2822. #define GPIO_PUPDR_PUPDR15_0 GPIO_PUPDR_PUPD15_0
  2823. #define GPIO_PUPDR_PUPDR15_1 GPIO_PUPDR_PUPD15_1
  2824. /****************** Bits definition for GPIO_IDR register *******************/
  2825. #define GPIO_IDR_ID0_Pos (0U)
  2826. #define GPIO_IDR_ID0_Msk (0x1U << GPIO_IDR_ID0_Pos) /*!< 0x00000001 */
  2827. #define GPIO_IDR_ID0 GPIO_IDR_ID0_Msk
  2828. #define GPIO_IDR_ID1_Pos (1U)
  2829. #define GPIO_IDR_ID1_Msk (0x1U << GPIO_IDR_ID1_Pos) /*!< 0x00000002 */
  2830. #define GPIO_IDR_ID1 GPIO_IDR_ID1_Msk
  2831. #define GPIO_IDR_ID2_Pos (2U)
  2832. #define GPIO_IDR_ID2_Msk (0x1U << GPIO_IDR_ID2_Pos) /*!< 0x00000004 */
  2833. #define GPIO_IDR_ID2 GPIO_IDR_ID2_Msk
  2834. #define GPIO_IDR_ID3_Pos (3U)
  2835. #define GPIO_IDR_ID3_Msk (0x1U << GPIO_IDR_ID3_Pos) /*!< 0x00000008 */
  2836. #define GPIO_IDR_ID3 GPIO_IDR_ID3_Msk
  2837. #define GPIO_IDR_ID4_Pos (4U)
  2838. #define GPIO_IDR_ID4_Msk (0x1U << GPIO_IDR_ID4_Pos) /*!< 0x00000010 */
  2839. #define GPIO_IDR_ID4 GPIO_IDR_ID4_Msk
  2840. #define GPIO_IDR_ID5_Pos (5U)
  2841. #define GPIO_IDR_ID5_Msk (0x1U << GPIO_IDR_ID5_Pos) /*!< 0x00000020 */
  2842. #define GPIO_IDR_ID5 GPIO_IDR_ID5_Msk
  2843. #define GPIO_IDR_ID6_Pos (6U)
  2844. #define GPIO_IDR_ID6_Msk (0x1U << GPIO_IDR_ID6_Pos) /*!< 0x00000040 */
  2845. #define GPIO_IDR_ID6 GPIO_IDR_ID6_Msk
  2846. #define GPIO_IDR_ID7_Pos (7U)
  2847. #define GPIO_IDR_ID7_Msk (0x1U << GPIO_IDR_ID7_Pos) /*!< 0x00000080 */
  2848. #define GPIO_IDR_ID7 GPIO_IDR_ID7_Msk
  2849. #define GPIO_IDR_ID8_Pos (8U)
  2850. #define GPIO_IDR_ID8_Msk (0x1U << GPIO_IDR_ID8_Pos) /*!< 0x00000100 */
  2851. #define GPIO_IDR_ID8 GPIO_IDR_ID8_Msk
  2852. #define GPIO_IDR_ID9_Pos (9U)
  2853. #define GPIO_IDR_ID9_Msk (0x1U << GPIO_IDR_ID9_Pos) /*!< 0x00000200 */
  2854. #define GPIO_IDR_ID9 GPIO_IDR_ID9_Msk
  2855. #define GPIO_IDR_ID10_Pos (10U)
  2856. #define GPIO_IDR_ID10_Msk (0x1U << GPIO_IDR_ID10_Pos) /*!< 0x00000400 */
  2857. #define GPIO_IDR_ID10 GPIO_IDR_ID10_Msk
  2858. #define GPIO_IDR_ID11_Pos (11U)
  2859. #define GPIO_IDR_ID11_Msk (0x1U << GPIO_IDR_ID11_Pos) /*!< 0x00000800 */
  2860. #define GPIO_IDR_ID11 GPIO_IDR_ID11_Msk
  2861. #define GPIO_IDR_ID12_Pos (12U)
  2862. #define GPIO_IDR_ID12_Msk (0x1U << GPIO_IDR_ID12_Pos) /*!< 0x00001000 */
  2863. #define GPIO_IDR_ID12 GPIO_IDR_ID12_Msk
  2864. #define GPIO_IDR_ID13_Pos (13U)
  2865. #define GPIO_IDR_ID13_Msk (0x1U << GPIO_IDR_ID13_Pos) /*!< 0x00002000 */
  2866. #define GPIO_IDR_ID13 GPIO_IDR_ID13_Msk
  2867. #define GPIO_IDR_ID14_Pos (14U)
  2868. #define GPIO_IDR_ID14_Msk (0x1U << GPIO_IDR_ID14_Pos) /*!< 0x00004000 */
  2869. #define GPIO_IDR_ID14 GPIO_IDR_ID14_Msk
  2870. #define GPIO_IDR_ID15_Pos (15U)
  2871. #define GPIO_IDR_ID15_Msk (0x1U << GPIO_IDR_ID15_Pos) /*!< 0x00008000 */
  2872. #define GPIO_IDR_ID15 GPIO_IDR_ID15_Msk
  2873. /* Legacy defines */
  2874. #define GPIO_IDR_IDR_0 GPIO_IDR_ID0
  2875. #define GPIO_IDR_IDR_1 GPIO_IDR_ID1
  2876. #define GPIO_IDR_IDR_2 GPIO_IDR_ID2
  2877. #define GPIO_IDR_IDR_3 GPIO_IDR_ID3
  2878. #define GPIO_IDR_IDR_4 GPIO_IDR_ID4
  2879. #define GPIO_IDR_IDR_5 GPIO_IDR_ID5
  2880. #define GPIO_IDR_IDR_6 GPIO_IDR_ID6
  2881. #define GPIO_IDR_IDR_7 GPIO_IDR_ID7
  2882. #define GPIO_IDR_IDR_8 GPIO_IDR_ID8
  2883. #define GPIO_IDR_IDR_9 GPIO_IDR_ID9
  2884. #define GPIO_IDR_IDR_10 GPIO_IDR_ID10
  2885. #define GPIO_IDR_IDR_11 GPIO_IDR_ID11
  2886. #define GPIO_IDR_IDR_12 GPIO_IDR_ID12
  2887. #define GPIO_IDR_IDR_13 GPIO_IDR_ID13
  2888. #define GPIO_IDR_IDR_14 GPIO_IDR_ID14
  2889. #define GPIO_IDR_IDR_15 GPIO_IDR_ID15
  2890. /****************** Bits definition for GPIO_ODR register *******************/
  2891. #define GPIO_ODR_OD0_Pos (0U)
  2892. #define GPIO_ODR_OD0_Msk (0x1U << GPIO_ODR_OD0_Pos) /*!< 0x00000001 */
  2893. #define GPIO_ODR_OD0 GPIO_ODR_OD0_Msk
  2894. #define GPIO_ODR_OD1_Pos (1U)
  2895. #define GPIO_ODR_OD1_Msk (0x1U << GPIO_ODR_OD1_Pos) /*!< 0x00000002 */
  2896. #define GPIO_ODR_OD1 GPIO_ODR_OD1_Msk
  2897. #define GPIO_ODR_OD2_Pos (2U)
  2898. #define GPIO_ODR_OD2_Msk (0x1U << GPIO_ODR_OD2_Pos) /*!< 0x00000004 */
  2899. #define GPIO_ODR_OD2 GPIO_ODR_OD2_Msk
  2900. #define GPIO_ODR_OD3_Pos (3U)
  2901. #define GPIO_ODR_OD3_Msk (0x1U << GPIO_ODR_OD3_Pos) /*!< 0x00000008 */
  2902. #define GPIO_ODR_OD3 GPIO_ODR_OD3_Msk
  2903. #define GPIO_ODR_OD4_Pos (4U)
  2904. #define GPIO_ODR_OD4_Msk (0x1U << GPIO_ODR_OD4_Pos) /*!< 0x00000010 */
  2905. #define GPIO_ODR_OD4 GPIO_ODR_OD4_Msk
  2906. #define GPIO_ODR_OD5_Pos (5U)
  2907. #define GPIO_ODR_OD5_Msk (0x1U << GPIO_ODR_OD5_Pos) /*!< 0x00000020 */
  2908. #define GPIO_ODR_OD5 GPIO_ODR_OD5_Msk
  2909. #define GPIO_ODR_OD6_Pos (6U)
  2910. #define GPIO_ODR_OD6_Msk (0x1U << GPIO_ODR_OD6_Pos) /*!< 0x00000040 */
  2911. #define GPIO_ODR_OD6 GPIO_ODR_OD6_Msk
  2912. #define GPIO_ODR_OD7_Pos (7U)
  2913. #define GPIO_ODR_OD7_Msk (0x1U << GPIO_ODR_OD7_Pos) /*!< 0x00000080 */
  2914. #define GPIO_ODR_OD7 GPIO_ODR_OD7_Msk
  2915. #define GPIO_ODR_OD8_Pos (8U)
  2916. #define GPIO_ODR_OD8_Msk (0x1U << GPIO_ODR_OD8_Pos) /*!< 0x00000100 */
  2917. #define GPIO_ODR_OD8 GPIO_ODR_OD8_Msk
  2918. #define GPIO_ODR_OD9_Pos (9U)
  2919. #define GPIO_ODR_OD9_Msk (0x1U << GPIO_ODR_OD9_Pos) /*!< 0x00000200 */
  2920. #define GPIO_ODR_OD9 GPIO_ODR_OD9_Msk
  2921. #define GPIO_ODR_OD10_Pos (10U)
  2922. #define GPIO_ODR_OD10_Msk (0x1U << GPIO_ODR_OD10_Pos) /*!< 0x00000400 */
  2923. #define GPIO_ODR_OD10 GPIO_ODR_OD10_Msk
  2924. #define GPIO_ODR_OD11_Pos (11U)
  2925. #define GPIO_ODR_OD11_Msk (0x1U << GPIO_ODR_OD11_Pos) /*!< 0x00000800 */
  2926. #define GPIO_ODR_OD11 GPIO_ODR_OD11_Msk
  2927. #define GPIO_ODR_OD12_Pos (12U)
  2928. #define GPIO_ODR_OD12_Msk (0x1U << GPIO_ODR_OD12_Pos) /*!< 0x00001000 */
  2929. #define GPIO_ODR_OD12 GPIO_ODR_OD12_Msk
  2930. #define GPIO_ODR_OD13_Pos (13U)
  2931. #define GPIO_ODR_OD13_Msk (0x1U << GPIO_ODR_OD13_Pos) /*!< 0x00002000 */
  2932. #define GPIO_ODR_OD13 GPIO_ODR_OD13_Msk
  2933. #define GPIO_ODR_OD14_Pos (14U)
  2934. #define GPIO_ODR_OD14_Msk (0x1U << GPIO_ODR_OD14_Pos) /*!< 0x00004000 */
  2935. #define GPIO_ODR_OD14 GPIO_ODR_OD14_Msk
  2936. #define GPIO_ODR_OD15_Pos (15U)
  2937. #define GPIO_ODR_OD15_Msk (0x1U << GPIO_ODR_OD15_Pos) /*!< 0x00008000 */
  2938. #define GPIO_ODR_OD15 GPIO_ODR_OD15_Msk
  2939. /* Legacy defines */
  2940. #define GPIO_ODR_ODR_0 GPIO_ODR_OD0
  2941. #define GPIO_ODR_ODR_1 GPIO_ODR_OD1
  2942. #define GPIO_ODR_ODR_2 GPIO_ODR_OD2
  2943. #define GPIO_ODR_ODR_3 GPIO_ODR_OD3
  2944. #define GPIO_ODR_ODR_4 GPIO_ODR_OD4
  2945. #define GPIO_ODR_ODR_5 GPIO_ODR_OD5
  2946. #define GPIO_ODR_ODR_6 GPIO_ODR_OD6
  2947. #define GPIO_ODR_ODR_7 GPIO_ODR_OD7
  2948. #define GPIO_ODR_ODR_8 GPIO_ODR_OD8
  2949. #define GPIO_ODR_ODR_9 GPIO_ODR_OD9
  2950. #define GPIO_ODR_ODR_10 GPIO_ODR_OD10
  2951. #define GPIO_ODR_ODR_11 GPIO_ODR_OD11
  2952. #define GPIO_ODR_ODR_12 GPIO_ODR_OD12
  2953. #define GPIO_ODR_ODR_13 GPIO_ODR_OD13
  2954. #define GPIO_ODR_ODR_14 GPIO_ODR_OD14
  2955. #define GPIO_ODR_ODR_15 GPIO_ODR_OD15
  2956. /****************** Bits definition for GPIO_BSRR register ******************/
  2957. #define GPIO_BSRR_BS0_Pos (0U)
  2958. #define GPIO_BSRR_BS0_Msk (0x1U << GPIO_BSRR_BS0_Pos) /*!< 0x00000001 */
  2959. #define GPIO_BSRR_BS0 GPIO_BSRR_BS0_Msk
  2960. #define GPIO_BSRR_BS1_Pos (1U)
  2961. #define GPIO_BSRR_BS1_Msk (0x1U << GPIO_BSRR_BS1_Pos) /*!< 0x00000002 */
  2962. #define GPIO_BSRR_BS1 GPIO_BSRR_BS1_Msk
  2963. #define GPIO_BSRR_BS2_Pos (2U)
  2964. #define GPIO_BSRR_BS2_Msk (0x1U << GPIO_BSRR_BS2_Pos) /*!< 0x00000004 */
  2965. #define GPIO_BSRR_BS2 GPIO_BSRR_BS2_Msk
  2966. #define GPIO_BSRR_BS3_Pos (3U)
  2967. #define GPIO_BSRR_BS3_Msk (0x1U << GPIO_BSRR_BS3_Pos) /*!< 0x00000008 */
  2968. #define GPIO_BSRR_BS3 GPIO_BSRR_BS3_Msk
  2969. #define GPIO_BSRR_BS4_Pos (4U)
  2970. #define GPIO_BSRR_BS4_Msk (0x1U << GPIO_BSRR_BS4_Pos) /*!< 0x00000010 */
  2971. #define GPIO_BSRR_BS4 GPIO_BSRR_BS4_Msk
  2972. #define GPIO_BSRR_BS5_Pos (5U)
  2973. #define GPIO_BSRR_BS5_Msk (0x1U << GPIO_BSRR_BS5_Pos) /*!< 0x00000020 */
  2974. #define GPIO_BSRR_BS5 GPIO_BSRR_BS5_Msk
  2975. #define GPIO_BSRR_BS6_Pos (6U)
  2976. #define GPIO_BSRR_BS6_Msk (0x1U << GPIO_BSRR_BS6_Pos) /*!< 0x00000040 */
  2977. #define GPIO_BSRR_BS6 GPIO_BSRR_BS6_Msk
  2978. #define GPIO_BSRR_BS7_Pos (7U)
  2979. #define GPIO_BSRR_BS7_Msk (0x1U << GPIO_BSRR_BS7_Pos) /*!< 0x00000080 */
  2980. #define GPIO_BSRR_BS7 GPIO_BSRR_BS7_Msk
  2981. #define GPIO_BSRR_BS8_Pos (8U)
  2982. #define GPIO_BSRR_BS8_Msk (0x1U << GPIO_BSRR_BS8_Pos) /*!< 0x00000100 */
  2983. #define GPIO_BSRR_BS8 GPIO_BSRR_BS8_Msk
  2984. #define GPIO_BSRR_BS9_Pos (9U)
  2985. #define GPIO_BSRR_BS9_Msk (0x1U << GPIO_BSRR_BS9_Pos) /*!< 0x00000200 */
  2986. #define GPIO_BSRR_BS9 GPIO_BSRR_BS9_Msk
  2987. #define GPIO_BSRR_BS10_Pos (10U)
  2988. #define GPIO_BSRR_BS10_Msk (0x1U << GPIO_BSRR_BS10_Pos) /*!< 0x00000400 */
  2989. #define GPIO_BSRR_BS10 GPIO_BSRR_BS10_Msk
  2990. #define GPIO_BSRR_BS11_Pos (11U)
  2991. #define GPIO_BSRR_BS11_Msk (0x1U << GPIO_BSRR_BS11_Pos) /*!< 0x00000800 */
  2992. #define GPIO_BSRR_BS11 GPIO_BSRR_BS11_Msk
  2993. #define GPIO_BSRR_BS12_Pos (12U)
  2994. #define GPIO_BSRR_BS12_Msk (0x1U << GPIO_BSRR_BS12_Pos) /*!< 0x00001000 */
  2995. #define GPIO_BSRR_BS12 GPIO_BSRR_BS12_Msk
  2996. #define GPIO_BSRR_BS13_Pos (13U)
  2997. #define GPIO_BSRR_BS13_Msk (0x1U << GPIO_BSRR_BS13_Pos) /*!< 0x00002000 */
  2998. #define GPIO_BSRR_BS13 GPIO_BSRR_BS13_Msk
  2999. #define GPIO_BSRR_BS14_Pos (14U)
  3000. #define GPIO_BSRR_BS14_Msk (0x1U << GPIO_BSRR_BS14_Pos) /*!< 0x00004000 */
  3001. #define GPIO_BSRR_BS14 GPIO_BSRR_BS14_Msk
  3002. #define GPIO_BSRR_BS15_Pos (15U)
  3003. #define GPIO_BSRR_BS15_Msk (0x1U << GPIO_BSRR_BS15_Pos) /*!< 0x00008000 */
  3004. #define GPIO_BSRR_BS15 GPIO_BSRR_BS15_Msk
  3005. #define GPIO_BSRR_BR0_Pos (16U)
  3006. #define GPIO_BSRR_BR0_Msk (0x1U << GPIO_BSRR_BR0_Pos) /*!< 0x00010000 */
  3007. #define GPIO_BSRR_BR0 GPIO_BSRR_BR0_Msk
  3008. #define GPIO_BSRR_BR1_Pos (17U)
  3009. #define GPIO_BSRR_BR1_Msk (0x1U << GPIO_BSRR_BR1_Pos) /*!< 0x00020000 */
  3010. #define GPIO_BSRR_BR1 GPIO_BSRR_BR1_Msk
  3011. #define GPIO_BSRR_BR2_Pos (18U)
  3012. #define GPIO_BSRR_BR2_Msk (0x1U << GPIO_BSRR_BR2_Pos) /*!< 0x00040000 */
  3013. #define GPIO_BSRR_BR2 GPIO_BSRR_BR2_Msk
  3014. #define GPIO_BSRR_BR3_Pos (19U)
  3015. #define GPIO_BSRR_BR3_Msk (0x1U << GPIO_BSRR_BR3_Pos) /*!< 0x00080000 */
  3016. #define GPIO_BSRR_BR3 GPIO_BSRR_BR3_Msk
  3017. #define GPIO_BSRR_BR4_Pos (20U)
  3018. #define GPIO_BSRR_BR4_Msk (0x1U << GPIO_BSRR_BR4_Pos) /*!< 0x00100000 */
  3019. #define GPIO_BSRR_BR4 GPIO_BSRR_BR4_Msk
  3020. #define GPIO_BSRR_BR5_Pos (21U)
  3021. #define GPIO_BSRR_BR5_Msk (0x1U << GPIO_BSRR_BR5_Pos) /*!< 0x00200000 */
  3022. #define GPIO_BSRR_BR5 GPIO_BSRR_BR5_Msk
  3023. #define GPIO_BSRR_BR6_Pos (22U)
  3024. #define GPIO_BSRR_BR6_Msk (0x1U << GPIO_BSRR_BR6_Pos) /*!< 0x00400000 */
  3025. #define GPIO_BSRR_BR6 GPIO_BSRR_BR6_Msk
  3026. #define GPIO_BSRR_BR7_Pos (23U)
  3027. #define GPIO_BSRR_BR7_Msk (0x1U << GPIO_BSRR_BR7_Pos) /*!< 0x00800000 */
  3028. #define GPIO_BSRR_BR7 GPIO_BSRR_BR7_Msk
  3029. #define GPIO_BSRR_BR8_Pos (24U)
  3030. #define GPIO_BSRR_BR8_Msk (0x1U << GPIO_BSRR_BR8_Pos) /*!< 0x01000000 */
  3031. #define GPIO_BSRR_BR8 GPIO_BSRR_BR8_Msk
  3032. #define GPIO_BSRR_BR9_Pos (25U)
  3033. #define GPIO_BSRR_BR9_Msk (0x1U << GPIO_BSRR_BR9_Pos) /*!< 0x02000000 */
  3034. #define GPIO_BSRR_BR9 GPIO_BSRR_BR9_Msk
  3035. #define GPIO_BSRR_BR10_Pos (26U)
  3036. #define GPIO_BSRR_BR10_Msk (0x1U << GPIO_BSRR_BR10_Pos) /*!< 0x04000000 */
  3037. #define GPIO_BSRR_BR10 GPIO_BSRR_BR10_Msk
  3038. #define GPIO_BSRR_BR11_Pos (27U)
  3039. #define GPIO_BSRR_BR11_Msk (0x1U << GPIO_BSRR_BR11_Pos) /*!< 0x08000000 */
  3040. #define GPIO_BSRR_BR11 GPIO_BSRR_BR11_Msk
  3041. #define GPIO_BSRR_BR12_Pos (28U)
  3042. #define GPIO_BSRR_BR12_Msk (0x1U << GPIO_BSRR_BR12_Pos) /*!< 0x10000000 */
  3043. #define GPIO_BSRR_BR12 GPIO_BSRR_BR12_Msk
  3044. #define GPIO_BSRR_BR13_Pos (29U)
  3045. #define GPIO_BSRR_BR13_Msk (0x1U << GPIO_BSRR_BR13_Pos) /*!< 0x20000000 */
  3046. #define GPIO_BSRR_BR13 GPIO_BSRR_BR13_Msk
  3047. #define GPIO_BSRR_BR14_Pos (30U)
  3048. #define GPIO_BSRR_BR14_Msk (0x1U << GPIO_BSRR_BR14_Pos) /*!< 0x40000000 */
  3049. #define GPIO_BSRR_BR14 GPIO_BSRR_BR14_Msk
  3050. #define GPIO_BSRR_BR15_Pos (31U)
  3051. #define GPIO_BSRR_BR15_Msk (0x1U << GPIO_BSRR_BR15_Pos) /*!< 0x80000000 */
  3052. #define GPIO_BSRR_BR15 GPIO_BSRR_BR15_Msk
  3053. /* Legacy defines */
  3054. #define GPIO_BSRR_BS_0 GPIO_BSRR_BS0
  3055. #define GPIO_BSRR_BS_1 GPIO_BSRR_BS1
  3056. #define GPIO_BSRR_BS_2 GPIO_BSRR_BS2
  3057. #define GPIO_BSRR_BS_3 GPIO_BSRR_BS3
  3058. #define GPIO_BSRR_BS_4 GPIO_BSRR_BS4
  3059. #define GPIO_BSRR_BS_5 GPIO_BSRR_BS5
  3060. #define GPIO_BSRR_BS_6 GPIO_BSRR_BS6
  3061. #define GPIO_BSRR_BS_7 GPIO_BSRR_BS7
  3062. #define GPIO_BSRR_BS_8 GPIO_BSRR_BS8
  3063. #define GPIO_BSRR_BS_9 GPIO_BSRR_BS9
  3064. #define GPIO_BSRR_BS_10 GPIO_BSRR_BS10
  3065. #define GPIO_BSRR_BS_11 GPIO_BSRR_BS11
  3066. #define GPIO_BSRR_BS_12 GPIO_BSRR_BS12
  3067. #define GPIO_BSRR_BS_13 GPIO_BSRR_BS13
  3068. #define GPIO_BSRR_BS_14 GPIO_BSRR_BS14
  3069. #define GPIO_BSRR_BS_15 GPIO_BSRR_BS15
  3070. #define GPIO_BSRR_BR_0 GPIO_BSRR_BR0
  3071. #define GPIO_BSRR_BR_1 GPIO_BSRR_BR1
  3072. #define GPIO_BSRR_BR_2 GPIO_BSRR_BR2
  3073. #define GPIO_BSRR_BR_3 GPIO_BSRR_BR3
  3074. #define GPIO_BSRR_BR_4 GPIO_BSRR_BR4
  3075. #define GPIO_BSRR_BR_5 GPIO_BSRR_BR5
  3076. #define GPIO_BSRR_BR_6 GPIO_BSRR_BR6
  3077. #define GPIO_BSRR_BR_7 GPIO_BSRR_BR7
  3078. #define GPIO_BSRR_BR_8 GPIO_BSRR_BR8
  3079. #define GPIO_BSRR_BR_9 GPIO_BSRR_BR9
  3080. #define GPIO_BSRR_BR_10 GPIO_BSRR_BR10
  3081. #define GPIO_BSRR_BR_11 GPIO_BSRR_BR11
  3082. #define GPIO_BSRR_BR_12 GPIO_BSRR_BR12
  3083. #define GPIO_BSRR_BR_13 GPIO_BSRR_BR13
  3084. #define GPIO_BSRR_BR_14 GPIO_BSRR_BR14
  3085. #define GPIO_BSRR_BR_15 GPIO_BSRR_BR15
  3086. /****************** Bit definition for GPIO_LCKR register *********************/
  3087. #define GPIO_LCKR_LCK0_Pos (0U)
  3088. #define GPIO_LCKR_LCK0_Msk (0x1U << GPIO_LCKR_LCK0_Pos) /*!< 0x00000001 */
  3089. #define GPIO_LCKR_LCK0 GPIO_LCKR_LCK0_Msk
  3090. #define GPIO_LCKR_LCK1_Pos (1U)
  3091. #define GPIO_LCKR_LCK1_Msk (0x1U << GPIO_LCKR_LCK1_Pos) /*!< 0x00000002 */
  3092. #define GPIO_LCKR_LCK1 GPIO_LCKR_LCK1_Msk
  3093. #define GPIO_LCKR_LCK2_Pos (2U)
  3094. #define GPIO_LCKR_LCK2_Msk (0x1U << GPIO_LCKR_LCK2_Pos) /*!< 0x00000004 */
  3095. #define GPIO_LCKR_LCK2 GPIO_LCKR_LCK2_Msk
  3096. #define GPIO_LCKR_LCK3_Pos (3U)
  3097. #define GPIO_LCKR_LCK3_Msk (0x1U << GPIO_LCKR_LCK3_Pos) /*!< 0x00000008 */
  3098. #define GPIO_LCKR_LCK3 GPIO_LCKR_LCK3_Msk
  3099. #define GPIO_LCKR_LCK4_Pos (4U)
  3100. #define GPIO_LCKR_LCK4_Msk (0x1U << GPIO_LCKR_LCK4_Pos) /*!< 0x00000010 */
  3101. #define GPIO_LCKR_LCK4 GPIO_LCKR_LCK4_Msk
  3102. #define GPIO_LCKR_LCK5_Pos (5U)
  3103. #define GPIO_LCKR_LCK5_Msk (0x1U << GPIO_LCKR_LCK5_Pos) /*!< 0x00000020 */
  3104. #define GPIO_LCKR_LCK5 GPIO_LCKR_LCK5_Msk
  3105. #define GPIO_LCKR_LCK6_Pos (6U)
  3106. #define GPIO_LCKR_LCK6_Msk (0x1U << GPIO_LCKR_LCK6_Pos) /*!< 0x00000040 */
  3107. #define GPIO_LCKR_LCK6 GPIO_LCKR_LCK6_Msk
  3108. #define GPIO_LCKR_LCK7_Pos (7U)
  3109. #define GPIO_LCKR_LCK7_Msk (0x1U << GPIO_LCKR_LCK7_Pos) /*!< 0x00000080 */
  3110. #define GPIO_LCKR_LCK7 GPIO_LCKR_LCK7_Msk
  3111. #define GPIO_LCKR_LCK8_Pos (8U)
  3112. #define GPIO_LCKR_LCK8_Msk (0x1U << GPIO_LCKR_LCK8_Pos) /*!< 0x00000100 */
  3113. #define GPIO_LCKR_LCK8 GPIO_LCKR_LCK8_Msk
  3114. #define GPIO_LCKR_LCK9_Pos (9U)
  3115. #define GPIO_LCKR_LCK9_Msk (0x1U << GPIO_LCKR_LCK9_Pos) /*!< 0x00000200 */
  3116. #define GPIO_LCKR_LCK9 GPIO_LCKR_LCK9_Msk
  3117. #define GPIO_LCKR_LCK10_Pos (10U)
  3118. #define GPIO_LCKR_LCK10_Msk (0x1U << GPIO_LCKR_LCK10_Pos) /*!< 0x00000400 */
  3119. #define GPIO_LCKR_LCK10 GPIO_LCKR_LCK10_Msk
  3120. #define GPIO_LCKR_LCK11_Pos (11U)
  3121. #define GPIO_LCKR_LCK11_Msk (0x1U << GPIO_LCKR_LCK11_Pos) /*!< 0x00000800 */
  3122. #define GPIO_LCKR_LCK11 GPIO_LCKR_LCK11_Msk
  3123. #define GPIO_LCKR_LCK12_Pos (12U)
  3124. #define GPIO_LCKR_LCK12_Msk (0x1U << GPIO_LCKR_LCK12_Pos) /*!< 0x00001000 */
  3125. #define GPIO_LCKR_LCK12 GPIO_LCKR_LCK12_Msk
  3126. #define GPIO_LCKR_LCK13_Pos (13U)
  3127. #define GPIO_LCKR_LCK13_Msk (0x1U << GPIO_LCKR_LCK13_Pos) /*!< 0x00002000 */
  3128. #define GPIO_LCKR_LCK13 GPIO_LCKR_LCK13_Msk
  3129. #define GPIO_LCKR_LCK14_Pos (14U)
  3130. #define GPIO_LCKR_LCK14_Msk (0x1U << GPIO_LCKR_LCK14_Pos) /*!< 0x00004000 */
  3131. #define GPIO_LCKR_LCK14 GPIO_LCKR_LCK14_Msk
  3132. #define GPIO_LCKR_LCK15_Pos (15U)
  3133. #define GPIO_LCKR_LCK15_Msk (0x1U << GPIO_LCKR_LCK15_Pos) /*!< 0x00008000 */
  3134. #define GPIO_LCKR_LCK15 GPIO_LCKR_LCK15_Msk
  3135. #define GPIO_LCKR_LCKK_Pos (16U)
  3136. #define GPIO_LCKR_LCKK_Msk (0x1U << GPIO_LCKR_LCKK_Pos) /*!< 0x00010000 */
  3137. #define GPIO_LCKR_LCKK GPIO_LCKR_LCKK_Msk
  3138. /****************** Bit definition for GPIO_AFRL register *********************/
  3139. #define GPIO_AFRL_AFSEL0_Pos (0U)
  3140. #define GPIO_AFRL_AFSEL0_Msk (0xFU << GPIO_AFRL_AFSEL0_Pos) /*!< 0x0000000F */
  3141. #define GPIO_AFRL_AFSEL0 GPIO_AFRL_AFSEL0_Msk
  3142. #define GPIO_AFRL_AFSEL0_0 (0x1U << GPIO_AFRL_AFSEL0_Pos) /*!< 0x00000001 */
  3143. #define GPIO_AFRL_AFSEL0_1 (0x2U << GPIO_AFRL_AFSEL0_Pos) /*!< 0x00000002 */
  3144. #define GPIO_AFRL_AFSEL0_2 (0x4U << GPIO_AFRL_AFSEL0_Pos) /*!< 0x00000004 */
  3145. #define GPIO_AFRL_AFSEL0_3 (0x8U << GPIO_AFRL_AFSEL0_Pos) /*!< 0x00000008 */
  3146. #define GPIO_AFRL_AFSEL1_Pos (4U)
  3147. #define GPIO_AFRL_AFSEL1_Msk (0xFU << GPIO_AFRL_AFSEL1_Pos) /*!< 0x000000F0 */
  3148. #define GPIO_AFRL_AFSEL1 GPIO_AFRL_AFSEL1_Msk
  3149. #define GPIO_AFRL_AFSEL1_0 (0x1U << GPIO_AFRL_AFSEL1_Pos) /*!< 0x00000010 */
  3150. #define GPIO_AFRL_AFSEL1_1 (0x2U << GPIO_AFRL_AFSEL1_Pos) /*!< 0x00000020 */
  3151. #define GPIO_AFRL_AFSEL1_2 (0x4U << GPIO_AFRL_AFSEL1_Pos) /*!< 0x00000040 */
  3152. #define GPIO_AFRL_AFSEL1_3 (0x8U << GPIO_AFRL_AFSEL1_Pos) /*!< 0x00000080 */
  3153. #define GPIO_AFRL_AFSEL2_Pos (8U)
  3154. #define GPIO_AFRL_AFSEL2_Msk (0xFU << GPIO_AFRL_AFSEL2_Pos) /*!< 0x00000F00 */
  3155. #define GPIO_AFRL_AFSEL2 GPIO_AFRL_AFSEL2_Msk
  3156. #define GPIO_AFRL_AFSEL2_0 (0x1U << GPIO_AFRL_AFSEL2_Pos) /*!< 0x00000100 */
  3157. #define GPIO_AFRL_AFSEL2_1 (0x2U << GPIO_AFRL_AFSEL2_Pos) /*!< 0x00000200 */
  3158. #define GPIO_AFRL_AFSEL2_2 (0x4U << GPIO_AFRL_AFSEL2_Pos) /*!< 0x00000400 */
  3159. #define GPIO_AFRL_AFSEL2_3 (0x8U << GPIO_AFRL_AFSEL2_Pos) /*!< 0x00000800 */
  3160. #define GPIO_AFRL_AFSEL3_Pos (12U)
  3161. #define GPIO_AFRL_AFSEL3_Msk (0xFU << GPIO_AFRL_AFSEL3_Pos) /*!< 0x0000F000 */
  3162. #define GPIO_AFRL_AFSEL3 GPIO_AFRL_AFSEL3_Msk
  3163. #define GPIO_AFRL_AFSEL3_0 (0x1U << GPIO_AFRL_AFSEL3_Pos) /*!< 0x00001000 */
  3164. #define GPIO_AFRL_AFSEL3_1 (0x2U << GPIO_AFRL_AFSEL3_Pos) /*!< 0x00002000 */
  3165. #define GPIO_AFRL_AFSEL3_2 (0x4U << GPIO_AFRL_AFSEL3_Pos) /*!< 0x00004000 */
  3166. #define GPIO_AFRL_AFSEL3_3 (0x8U << GPIO_AFRL_AFSEL3_Pos) /*!< 0x00008000 */
  3167. #define GPIO_AFRL_AFSEL4_Pos (16U)
  3168. #define GPIO_AFRL_AFSEL4_Msk (0xFU << GPIO_AFRL_AFSEL4_Pos) /*!< 0x000F0000 */
  3169. #define GPIO_AFRL_AFSEL4 GPIO_AFRL_AFSEL4_Msk
  3170. #define GPIO_AFRL_AFSEL4_0 (0x1U << GPIO_AFRL_AFSEL4_Pos) /*!< 0x00010000 */
  3171. #define GPIO_AFRL_AFSEL4_1 (0x2U << GPIO_AFRL_AFSEL4_Pos) /*!< 0x00020000 */
  3172. #define GPIO_AFRL_AFSEL4_2 (0x4U << GPIO_AFRL_AFSEL4_Pos) /*!< 0x00040000 */
  3173. #define GPIO_AFRL_AFSEL4_3 (0x8U << GPIO_AFRL_AFSEL4_Pos) /*!< 0x00080000 */
  3174. #define GPIO_AFRL_AFSEL5_Pos (20U)
  3175. #define GPIO_AFRL_AFSEL5_Msk (0xFU << GPIO_AFRL_AFSEL5_Pos) /*!< 0x00F00000 */
  3176. #define GPIO_AFRL_AFSEL5 GPIO_AFRL_AFSEL5_Msk
  3177. #define GPIO_AFRL_AFSEL5_0 (0x1U << GPIO_AFRL_AFSEL5_Pos) /*!< 0x00100000 */
  3178. #define GPIO_AFRL_AFSEL5_1 (0x2U << GPIO_AFRL_AFSEL5_Pos) /*!< 0x00200000 */
  3179. #define GPIO_AFRL_AFSEL5_2 (0x4U << GPIO_AFRL_AFSEL5_Pos) /*!< 0x00400000 */
  3180. #define GPIO_AFRL_AFSEL5_3 (0x8U << GPIO_AFRL_AFSEL5_Pos) /*!< 0x00800000 */
  3181. #define GPIO_AFRL_AFSEL6_Pos (24U)
  3182. #define GPIO_AFRL_AFSEL6_Msk (0xFU << GPIO_AFRL_AFSEL6_Pos) /*!< 0x0F000000 */
  3183. #define GPIO_AFRL_AFSEL6 GPIO_AFRL_AFSEL6_Msk
  3184. #define GPIO_AFRL_AFSEL6_0 (0x1U << GPIO_AFRL_AFSEL6_Pos) /*!< 0x01000000 */
  3185. #define GPIO_AFRL_AFSEL6_1 (0x2U << GPIO_AFRL_AFSEL6_Pos) /*!< 0x02000000 */
  3186. #define GPIO_AFRL_AFSEL6_2 (0x4U << GPIO_AFRL_AFSEL6_Pos) /*!< 0x04000000 */
  3187. #define GPIO_AFRL_AFSEL6_3 (0x8U << GPIO_AFRL_AFSEL6_Pos) /*!< 0x08000000 */
  3188. #define GPIO_AFRL_AFSEL7_Pos (28U)
  3189. #define GPIO_AFRL_AFSEL7_Msk (0xFU << GPIO_AFRL_AFSEL7_Pos) /*!< 0xF0000000 */
  3190. #define GPIO_AFRL_AFSEL7 GPIO_AFRL_AFSEL7_Msk
  3191. #define GPIO_AFRL_AFSEL7_0 (0x1U << GPIO_AFRL_AFSEL7_Pos) /*!< 0x10000000 */
  3192. #define GPIO_AFRL_AFSEL7_1 (0x2U << GPIO_AFRL_AFSEL7_Pos) /*!< 0x20000000 */
  3193. #define GPIO_AFRL_AFSEL7_2 (0x4U << GPIO_AFRL_AFSEL7_Pos) /*!< 0x40000000 */
  3194. #define GPIO_AFRL_AFSEL7_3 (0x8U << GPIO_AFRL_AFSEL7_Pos) /*!< 0x80000000 */
  3195. /* Legacy defines */
  3196. #define GPIO_AFRL_AFRL0 GPIO_AFRL_AFSEL0
  3197. #define GPIO_AFRL_AFRL0_0 GPIO_AFRL_AFSEL0_0
  3198. #define GPIO_AFRL_AFRL0_1 GPIO_AFRL_AFSEL0_1
  3199. #define GPIO_AFRL_AFRL0_2 GPIO_AFRL_AFSEL0_2
  3200. #define GPIO_AFRL_AFRL0_3 GPIO_AFRL_AFSEL0_3
  3201. #define GPIO_AFRL_AFRL1 GPIO_AFRL_AFSEL1
  3202. #define GPIO_AFRL_AFRL1_0 GPIO_AFRL_AFSEL1_0
  3203. #define GPIO_AFRL_AFRL1_1 GPIO_AFRL_AFSEL1_1
  3204. #define GPIO_AFRL_AFRL1_2 GPIO_AFRL_AFSEL1_2
  3205. #define GPIO_AFRL_AFRL1_3 GPIO_AFRL_AFSEL1_3
  3206. #define GPIO_AFRL_AFRL2 GPIO_AFRL_AFSEL2
  3207. #define GPIO_AFRL_AFRL2_0 GPIO_AFRL_AFSEL2_0
  3208. #define GPIO_AFRL_AFRL2_1 GPIO_AFRL_AFSEL2_1
  3209. #define GPIO_AFRL_AFRL2_2 GPIO_AFRL_AFSEL2_2
  3210. #define GPIO_AFRL_AFRL2_3 GPIO_AFRL_AFSEL2_3
  3211. #define GPIO_AFRL_AFRL3 GPIO_AFRL_AFSEL3
  3212. #define GPIO_AFRL_AFRL3_0 GPIO_AFRL_AFSEL3_0
  3213. #define GPIO_AFRL_AFRL3_1 GPIO_AFRL_AFSEL3_1
  3214. #define GPIO_AFRL_AFRL3_2 GPIO_AFRL_AFSEL3_2
  3215. #define GPIO_AFRL_AFRL3_3 GPIO_AFRL_AFSEL3_3
  3216. #define GPIO_AFRL_AFRL4 GPIO_AFRL_AFSEL4
  3217. #define GPIO_AFRL_AFRL4_0 GPIO_AFRL_AFSEL4_0
  3218. #define GPIO_AFRL_AFRL4_1 GPIO_AFRL_AFSEL4_1
  3219. #define GPIO_AFRL_AFRL4_2 GPIO_AFRL_AFSEL4_2
  3220. #define GPIO_AFRL_AFRL4_3 GPIO_AFRL_AFSEL4_3
  3221. #define GPIO_AFRL_AFRL5 GPIO_AFRL_AFSEL5
  3222. #define GPIO_AFRL_AFRL5_0 GPIO_AFRL_AFSEL5_0
  3223. #define GPIO_AFRL_AFRL5_1 GPIO_AFRL_AFSEL5_1
  3224. #define GPIO_AFRL_AFRL5_2 GPIO_AFRL_AFSEL5_2
  3225. #define GPIO_AFRL_AFRL5_3 GPIO_AFRL_AFSEL5_3
  3226. #define GPIO_AFRL_AFRL6 GPIO_AFRL_AFSEL6
  3227. #define GPIO_AFRL_AFRL6_0 GPIO_AFRL_AFSEL6_0
  3228. #define GPIO_AFRL_AFRL6_1 GPIO_AFRL_AFSEL6_1
  3229. #define GPIO_AFRL_AFRL6_2 GPIO_AFRL_AFSEL6_2
  3230. #define GPIO_AFRL_AFRL6_3 GPIO_AFRL_AFSEL6_3
  3231. #define GPIO_AFRL_AFRL7 GPIO_AFRL_AFSEL7
  3232. #define GPIO_AFRL_AFRL7_0 GPIO_AFRL_AFSEL7_0
  3233. #define GPIO_AFRL_AFRL7_1 GPIO_AFRL_AFSEL7_1
  3234. #define GPIO_AFRL_AFRL7_2 GPIO_AFRL_AFSEL7_2
  3235. #define GPIO_AFRL_AFRL7_3 GPIO_AFRL_AFSEL7_3
  3236. /****************** Bit definition for GPIO_AFRH register *********************/
  3237. #define GPIO_AFRH_AFSEL8_Pos (0U)
  3238. #define GPIO_AFRH_AFSEL8_Msk (0xFU << GPIO_AFRH_AFSEL8_Pos) /*!< 0x0000000F */
  3239. #define GPIO_AFRH_AFSEL8 GPIO_AFRH_AFSEL8_Msk
  3240. #define GPIO_AFRH_AFSEL8_0 (0x1U << GPIO_AFRH_AFSEL8_Pos) /*!< 0x00000001 */
  3241. #define GPIO_AFRH_AFSEL8_1 (0x2U << GPIO_AFRH_AFSEL8_Pos) /*!< 0x00000002 */
  3242. #define GPIO_AFRH_AFSEL8_2 (0x4U << GPIO_AFRH_AFSEL8_Pos) /*!< 0x00000004 */
  3243. #define GPIO_AFRH_AFSEL8_3 (0x8U << GPIO_AFRH_AFSEL8_Pos) /*!< 0x00000008 */
  3244. #define GPIO_AFRH_AFSEL9_Pos (4U)
  3245. #define GPIO_AFRH_AFSEL9_Msk (0xFU << GPIO_AFRH_AFSEL9_Pos) /*!< 0x000000F0 */
  3246. #define GPIO_AFRH_AFSEL9 GPIO_AFRH_AFSEL9_Msk
  3247. #define GPIO_AFRH_AFSEL9_0 (0x1U << GPIO_AFRH_AFSEL9_Pos) /*!< 0x00000010 */
  3248. #define GPIO_AFRH_AFSEL9_1 (0x2U << GPIO_AFRH_AFSEL9_Pos) /*!< 0x00000020 */
  3249. #define GPIO_AFRH_AFSEL9_2 (0x4U << GPIO_AFRH_AFSEL9_Pos) /*!< 0x00000040 */
  3250. #define GPIO_AFRH_AFSEL9_3 (0x8U << GPIO_AFRH_AFSEL9_Pos) /*!< 0x00000080 */
  3251. #define GPIO_AFRH_AFSEL10_Pos (8U)
  3252. #define GPIO_AFRH_AFSEL10_Msk (0xFU << GPIO_AFRH_AFSEL10_Pos) /*!< 0x00000F00 */
  3253. #define GPIO_AFRH_AFSEL10 GPIO_AFRH_AFSEL10_Msk
  3254. #define GPIO_AFRH_AFSEL10_0 (0x1U << GPIO_AFRH_AFSEL10_Pos) /*!< 0x00000100 */
  3255. #define GPIO_AFRH_AFSEL10_1 (0x2U << GPIO_AFRH_AFSEL10_Pos) /*!< 0x00000200 */
  3256. #define GPIO_AFRH_AFSEL10_2 (0x4U << GPIO_AFRH_AFSEL10_Pos) /*!< 0x00000400 */
  3257. #define GPIO_AFRH_AFSEL10_3 (0x8U << GPIO_AFRH_AFSEL10_Pos) /*!< 0x00000800 */
  3258. #define GPIO_AFRH_AFSEL11_Pos (12U)
  3259. #define GPIO_AFRH_AFSEL11_Msk (0xFU << GPIO_AFRH_AFSEL11_Pos) /*!< 0x0000F000 */
  3260. #define GPIO_AFRH_AFSEL11 GPIO_AFRH_AFSEL11_Msk
  3261. #define GPIO_AFRH_AFSEL11_0 (0x1U << GPIO_AFRH_AFSEL11_Pos) /*!< 0x00001000 */
  3262. #define GPIO_AFRH_AFSEL11_1 (0x2U << GPIO_AFRH_AFSEL11_Pos) /*!< 0x00002000 */
  3263. #define GPIO_AFRH_AFSEL11_2 (0x4U << GPIO_AFRH_AFSEL11_Pos) /*!< 0x00004000 */
  3264. #define GPIO_AFRH_AFSEL11_3 (0x8U << GPIO_AFRH_AFSEL11_Pos) /*!< 0x00008000 */
  3265. #define GPIO_AFRH_AFSEL12_Pos (16U)
  3266. #define GPIO_AFRH_AFSEL12_Msk (0xFU << GPIO_AFRH_AFSEL12_Pos) /*!< 0x000F0000 */
  3267. #define GPIO_AFRH_AFSEL12 GPIO_AFRH_AFSEL12_Msk
  3268. #define GPIO_AFRH_AFSEL12_0 (0x1U << GPIO_AFRH_AFSEL12_Pos) /*!< 0x00010000 */
  3269. #define GPIO_AFRH_AFSEL12_1 (0x2U << GPIO_AFRH_AFSEL12_Pos) /*!< 0x00020000 */
  3270. #define GPIO_AFRH_AFSEL12_2 (0x4U << GPIO_AFRH_AFSEL12_Pos) /*!< 0x00040000 */
  3271. #define GPIO_AFRH_AFSEL12_3 (0x8U << GPIO_AFRH_AFSEL12_Pos) /*!< 0x00080000 */
  3272. #define GPIO_AFRH_AFSEL13_Pos (20U)
  3273. #define GPIO_AFRH_AFSEL13_Msk (0xFU << GPIO_AFRH_AFSEL13_Pos) /*!< 0x00F00000 */
  3274. #define GPIO_AFRH_AFSEL13 GPIO_AFRH_AFSEL13_Msk
  3275. #define GPIO_AFRH_AFSEL13_0 (0x1U << GPIO_AFRH_AFSEL13_Pos) /*!< 0x00100000 */
  3276. #define GPIO_AFRH_AFSEL13_1 (0x2U << GPIO_AFRH_AFSEL13_Pos) /*!< 0x00200000 */
  3277. #define GPIO_AFRH_AFSEL13_2 (0x4U << GPIO_AFRH_AFSEL13_Pos) /*!< 0x00400000 */
  3278. #define GPIO_AFRH_AFSEL13_3 (0x8U << GPIO_AFRH_AFSEL13_Pos) /*!< 0x00800000 */
  3279. #define GPIO_AFRH_AFSEL14_Pos (24U)
  3280. #define GPIO_AFRH_AFSEL14_Msk (0xFU << GPIO_AFRH_AFSEL14_Pos) /*!< 0x0F000000 */
  3281. #define GPIO_AFRH_AFSEL14 GPIO_AFRH_AFSEL14_Msk
  3282. #define GPIO_AFRH_AFSEL14_0 (0x1U << GPIO_AFRH_AFSEL14_Pos) /*!< 0x01000000 */
  3283. #define GPIO_AFRH_AFSEL14_1 (0x2U << GPIO_AFRH_AFSEL14_Pos) /*!< 0x02000000 */
  3284. #define GPIO_AFRH_AFSEL14_2 (0x4U << GPIO_AFRH_AFSEL14_Pos) /*!< 0x04000000 */
  3285. #define GPIO_AFRH_AFSEL14_3 (0x8U << GPIO_AFRH_AFSEL14_Pos) /*!< 0x08000000 */
  3286. #define GPIO_AFRH_AFSEL15_Pos (28U)
  3287. #define GPIO_AFRH_AFSEL15_Msk (0xFU << GPIO_AFRH_AFSEL15_Pos) /*!< 0xF0000000 */
  3288. #define GPIO_AFRH_AFSEL15 GPIO_AFRH_AFSEL15_Msk
  3289. #define GPIO_AFRH_AFSEL15_0 (0x1U << GPIO_AFRH_AFSEL15_Pos) /*!< 0x10000000 */
  3290. #define GPIO_AFRH_AFSEL15_1 (0x2U << GPIO_AFRH_AFSEL15_Pos) /*!< 0x20000000 */
  3291. #define GPIO_AFRH_AFSEL15_2 (0x4U << GPIO_AFRH_AFSEL15_Pos) /*!< 0x40000000 */
  3292. #define GPIO_AFRH_AFSEL15_3 (0x8U << GPIO_AFRH_AFSEL15_Pos) /*!< 0x80000000 */
  3293. /* Legacy defines */
  3294. #define GPIO_AFRH_AFRH0 GPIO_AFRH_AFSEL8
  3295. #define GPIO_AFRH_AFRH0_0 GPIO_AFRH_AFSEL8_0
  3296. #define GPIO_AFRH_AFRH0_1 GPIO_AFRH_AFSEL8_1
  3297. #define GPIO_AFRH_AFRH0_2 GPIO_AFRH_AFSEL8_2
  3298. #define GPIO_AFRH_AFRH0_3 GPIO_AFRH_AFSEL8_3
  3299. #define GPIO_AFRH_AFRH1 GPIO_AFRH_AFSEL9
  3300. #define GPIO_AFRH_AFRH1_0 GPIO_AFRH_AFSEL9_0
  3301. #define GPIO_AFRH_AFRH1_1 GPIO_AFRH_AFSEL9_1
  3302. #define GPIO_AFRH_AFRH1_2 GPIO_AFRH_AFSEL9_2
  3303. #define GPIO_AFRH_AFRH1_3 GPIO_AFRH_AFSEL9_3
  3304. #define GPIO_AFRH_AFRH2 GPIO_AFRH_AFSEL10
  3305. #define GPIO_AFRH_AFRH2_0 GPIO_AFRH_AFSEL10_0
  3306. #define GPIO_AFRH_AFRH2_1 GPIO_AFRH_AFSEL10_1
  3307. #define GPIO_AFRH_AFRH2_2 GPIO_AFRH_AFSEL10_2
  3308. #define GPIO_AFRH_AFRH2_3 GPIO_AFRH_AFSEL10_3
  3309. #define GPIO_AFRH_AFRH3 GPIO_AFRH_AFSEL11
  3310. #define GPIO_AFRH_AFRH3_0 GPIO_AFRH_AFSEL11_0
  3311. #define GPIO_AFRH_AFRH3_1 GPIO_AFRH_AFSEL11_1
  3312. #define GPIO_AFRH_AFRH3_2 GPIO_AFRH_AFSEL11_2
  3313. #define GPIO_AFRH_AFRH3_3 GPIO_AFRH_AFSEL11_3
  3314. #define GPIO_AFRH_AFRH4 GPIO_AFRH_AFSEL12
  3315. #define GPIO_AFRH_AFRH4_0 GPIO_AFRH_AFSEL12_0
  3316. #define GPIO_AFRH_AFRH4_1 GPIO_AFRH_AFSEL12_1
  3317. #define GPIO_AFRH_AFRH4_2 GPIO_AFRH_AFSEL12_2
  3318. #define GPIO_AFRH_AFRH4_3 GPIO_AFRH_AFSEL12_3
  3319. #define GPIO_AFRH_AFRH5 GPIO_AFRH_AFSEL13
  3320. #define GPIO_AFRH_AFRH5_0 GPIO_AFRH_AFSEL13_0
  3321. #define GPIO_AFRH_AFRH5_1 GPIO_AFRH_AFSEL13_1
  3322. #define GPIO_AFRH_AFRH5_2 GPIO_AFRH_AFSEL13_2
  3323. #define GPIO_AFRH_AFRH5_3 GPIO_AFRH_AFSEL13_3
  3324. #define GPIO_AFRH_AFRH6 GPIO_AFRH_AFSEL14
  3325. #define GPIO_AFRH_AFRH6_0 GPIO_AFRH_AFSEL14_0
  3326. #define GPIO_AFRH_AFRH6_1 GPIO_AFRH_AFSEL14_1
  3327. #define GPIO_AFRH_AFRH6_2 GPIO_AFRH_AFSEL14_2
  3328. #define GPIO_AFRH_AFRH6_3 GPIO_AFRH_AFSEL14_3
  3329. #define GPIO_AFRH_AFRH7 GPIO_AFRH_AFSEL15
  3330. #define GPIO_AFRH_AFRH7_0 GPIO_AFRH_AFSEL15_0
  3331. #define GPIO_AFRH_AFRH7_1 GPIO_AFRH_AFSEL15_1
  3332. #define GPIO_AFRH_AFRH7_2 GPIO_AFRH_AFSEL15_2
  3333. #define GPIO_AFRH_AFRH7_3 GPIO_AFRH_AFSEL15_3
  3334. /****************** Bits definition for GPIO_BRR register ******************/
  3335. #define GPIO_BRR_BR0_Pos (0U)
  3336. #define GPIO_BRR_BR0_Msk (0x1U << GPIO_BRR_BR0_Pos) /*!< 0x00000001 */
  3337. #define GPIO_BRR_BR0 GPIO_BRR_BR0_Msk
  3338. #define GPIO_BRR_BR1_Pos (1U)
  3339. #define GPIO_BRR_BR1_Msk (0x1U << GPIO_BRR_BR1_Pos) /*!< 0x00000002 */
  3340. #define GPIO_BRR_BR1 GPIO_BRR_BR1_Msk
  3341. #define GPIO_BRR_BR2_Pos (2U)
  3342. #define GPIO_BRR_BR2_Msk (0x1U << GPIO_BRR_BR2_Pos) /*!< 0x00000004 */
  3343. #define GPIO_BRR_BR2 GPIO_BRR_BR2_Msk
  3344. #define GPIO_BRR_BR3_Pos (3U)
  3345. #define GPIO_BRR_BR3_Msk (0x1U << GPIO_BRR_BR3_Pos) /*!< 0x00000008 */
  3346. #define GPIO_BRR_BR3 GPIO_BRR_BR3_Msk
  3347. #define GPIO_BRR_BR4_Pos (4U)
  3348. #define GPIO_BRR_BR4_Msk (0x1U << GPIO_BRR_BR4_Pos) /*!< 0x00000010 */
  3349. #define GPIO_BRR_BR4 GPIO_BRR_BR4_Msk
  3350. #define GPIO_BRR_BR5_Pos (5U)
  3351. #define GPIO_BRR_BR5_Msk (0x1U << GPIO_BRR_BR5_Pos) /*!< 0x00000020 */
  3352. #define GPIO_BRR_BR5 GPIO_BRR_BR5_Msk
  3353. #define GPIO_BRR_BR6_Pos (6U)
  3354. #define GPIO_BRR_BR6_Msk (0x1U << GPIO_BRR_BR6_Pos) /*!< 0x00000040 */
  3355. #define GPIO_BRR_BR6 GPIO_BRR_BR6_Msk
  3356. #define GPIO_BRR_BR7_Pos (7U)
  3357. #define GPIO_BRR_BR7_Msk (0x1U << GPIO_BRR_BR7_Pos) /*!< 0x00000080 */
  3358. #define GPIO_BRR_BR7 GPIO_BRR_BR7_Msk
  3359. #define GPIO_BRR_BR8_Pos (8U)
  3360. #define GPIO_BRR_BR8_Msk (0x1U << GPIO_BRR_BR8_Pos) /*!< 0x00000100 */
  3361. #define GPIO_BRR_BR8 GPIO_BRR_BR8_Msk
  3362. #define GPIO_BRR_BR9_Pos (9U)
  3363. #define GPIO_BRR_BR9_Msk (0x1U << GPIO_BRR_BR9_Pos) /*!< 0x00000200 */
  3364. #define GPIO_BRR_BR9 GPIO_BRR_BR9_Msk
  3365. #define GPIO_BRR_BR10_Pos (10U)
  3366. #define GPIO_BRR_BR10_Msk (0x1U << GPIO_BRR_BR10_Pos) /*!< 0x00000400 */
  3367. #define GPIO_BRR_BR10 GPIO_BRR_BR10_Msk
  3368. #define GPIO_BRR_BR11_Pos (11U)
  3369. #define GPIO_BRR_BR11_Msk (0x1U << GPIO_BRR_BR11_Pos) /*!< 0x00000800 */
  3370. #define GPIO_BRR_BR11 GPIO_BRR_BR11_Msk
  3371. #define GPIO_BRR_BR12_Pos (12U)
  3372. #define GPIO_BRR_BR12_Msk (0x1U << GPIO_BRR_BR12_Pos) /*!< 0x00001000 */
  3373. #define GPIO_BRR_BR12 GPIO_BRR_BR12_Msk
  3374. #define GPIO_BRR_BR13_Pos (13U)
  3375. #define GPIO_BRR_BR13_Msk (0x1U << GPIO_BRR_BR13_Pos) /*!< 0x00002000 */
  3376. #define GPIO_BRR_BR13 GPIO_BRR_BR13_Msk
  3377. #define GPIO_BRR_BR14_Pos (14U)
  3378. #define GPIO_BRR_BR14_Msk (0x1U << GPIO_BRR_BR14_Pos) /*!< 0x00004000 */
  3379. #define GPIO_BRR_BR14 GPIO_BRR_BR14_Msk
  3380. #define GPIO_BRR_BR15_Pos (15U)
  3381. #define GPIO_BRR_BR15_Msk (0x1U << GPIO_BRR_BR15_Pos) /*!< 0x00008000 */
  3382. #define GPIO_BRR_BR15 GPIO_BRR_BR15_Msk
  3383. /******************************************************************************/
  3384. /* */
  3385. /* Inter-integrated Circuit Interface */
  3386. /* */
  3387. /******************************************************************************/
  3388. /******************* Bit definition for I2C_CR1 register ********************/
  3389. #define I2C_CR1_PE_Pos (0U)
  3390. #define I2C_CR1_PE_Msk (0x1U << I2C_CR1_PE_Pos) /*!< 0x00000001 */
  3391. #define I2C_CR1_PE I2C_CR1_PE_Msk /*!<Peripheral Enable */
  3392. #define I2C_CR1_SMBUS_Pos (1U)
  3393. #define I2C_CR1_SMBUS_Msk (0x1U << I2C_CR1_SMBUS_Pos) /*!< 0x00000002 */
  3394. #define I2C_CR1_SMBUS I2C_CR1_SMBUS_Msk /*!<SMBus Mode */
  3395. #define I2C_CR1_SMBTYPE_Pos (3U)
  3396. #define I2C_CR1_SMBTYPE_Msk (0x1U << I2C_CR1_SMBTYPE_Pos) /*!< 0x00000008 */
  3397. #define I2C_CR1_SMBTYPE I2C_CR1_SMBTYPE_Msk /*!<SMBus Type */
  3398. #define I2C_CR1_ENARP_Pos (4U)
  3399. #define I2C_CR1_ENARP_Msk (0x1U << I2C_CR1_ENARP_Pos) /*!< 0x00000010 */
  3400. #define I2C_CR1_ENARP I2C_CR1_ENARP_Msk /*!<ARP Enable */
  3401. #define I2C_CR1_ENPEC_Pos (5U)
  3402. #define I2C_CR1_ENPEC_Msk (0x1U << I2C_CR1_ENPEC_Pos) /*!< 0x00000020 */
  3403. #define I2C_CR1_ENPEC I2C_CR1_ENPEC_Msk /*!<PEC Enable */
  3404. #define I2C_CR1_ENGC_Pos (6U)
  3405. #define I2C_CR1_ENGC_Msk (0x1U << I2C_CR1_ENGC_Pos) /*!< 0x00000040 */
  3406. #define I2C_CR1_ENGC I2C_CR1_ENGC_Msk /*!<General Call Enable */
  3407. #define I2C_CR1_NOSTRETCH_Pos (7U)
  3408. #define I2C_CR1_NOSTRETCH_Msk (0x1U << I2C_CR1_NOSTRETCH_Pos) /*!< 0x00000080 */
  3409. #define I2C_CR1_NOSTRETCH I2C_CR1_NOSTRETCH_Msk /*!<Clock Stretching Disable (Slave mode) */
  3410. #define I2C_CR1_START_Pos (8U)
  3411. #define I2C_CR1_START_Msk (0x1U << I2C_CR1_START_Pos) /*!< 0x00000100 */
  3412. #define I2C_CR1_START I2C_CR1_START_Msk /*!<Start Generation */
  3413. #define I2C_CR1_STOP_Pos (9U)
  3414. #define I2C_CR1_STOP_Msk (0x1U << I2C_CR1_STOP_Pos) /*!< 0x00000200 */
  3415. #define I2C_CR1_STOP I2C_CR1_STOP_Msk /*!<Stop Generation */
  3416. #define I2C_CR1_ACK_Pos (10U)
  3417. #define I2C_CR1_ACK_Msk (0x1U << I2C_CR1_ACK_Pos) /*!< 0x00000400 */
  3418. #define I2C_CR1_ACK I2C_CR1_ACK_Msk /*!<Acknowledge Enable */
  3419. #define I2C_CR1_POS_Pos (11U)
  3420. #define I2C_CR1_POS_Msk (0x1U << I2C_CR1_POS_Pos) /*!< 0x00000800 */
  3421. #define I2C_CR1_POS I2C_CR1_POS_Msk /*!<Acknowledge/PEC Position (for data reception) */
  3422. #define I2C_CR1_PEC_Pos (12U)
  3423. #define I2C_CR1_PEC_Msk (0x1U << I2C_CR1_PEC_Pos) /*!< 0x00001000 */
  3424. #define I2C_CR1_PEC I2C_CR1_PEC_Msk /*!<Packet Error Checking */
  3425. #define I2C_CR1_ALERT_Pos (13U)
  3426. #define I2C_CR1_ALERT_Msk (0x1U << I2C_CR1_ALERT_Pos) /*!< 0x00002000 */
  3427. #define I2C_CR1_ALERT I2C_CR1_ALERT_Msk /*!<SMBus Alert */
  3428. #define I2C_CR1_SWRST_Pos (15U)
  3429. #define I2C_CR1_SWRST_Msk (0x1U << I2C_CR1_SWRST_Pos) /*!< 0x00008000 */
  3430. #define I2C_CR1_SWRST I2C_CR1_SWRST_Msk /*!<Software Reset */
  3431. /******************* Bit definition for I2C_CR2 register ********************/
  3432. #define I2C_CR2_FREQ_Pos (0U)
  3433. #define I2C_CR2_FREQ_Msk (0x3FU << I2C_CR2_FREQ_Pos) /*!< 0x0000003F */
  3434. #define I2C_CR2_FREQ I2C_CR2_FREQ_Msk /*!<FREQ[5:0] bits (Peripheral Clock Frequency) */
  3435. #define I2C_CR2_FREQ_0 (0x01U << I2C_CR2_FREQ_Pos) /*!< 0x00000001 */
  3436. #define I2C_CR2_FREQ_1 (0x02U << I2C_CR2_FREQ_Pos) /*!< 0x00000002 */
  3437. #define I2C_CR2_FREQ_2 (0x04U << I2C_CR2_FREQ_Pos) /*!< 0x00000004 */
  3438. #define I2C_CR2_FREQ_3 (0x08U << I2C_CR2_FREQ_Pos) /*!< 0x00000008 */
  3439. #define I2C_CR2_FREQ_4 (0x10U << I2C_CR2_FREQ_Pos) /*!< 0x00000010 */
  3440. #define I2C_CR2_FREQ_5 (0x20U << I2C_CR2_FREQ_Pos) /*!< 0x00000020 */
  3441. #define I2C_CR2_ITERREN_Pos (8U)
  3442. #define I2C_CR2_ITERREN_Msk (0x1U << I2C_CR2_ITERREN_Pos) /*!< 0x00000100 */
  3443. #define I2C_CR2_ITERREN I2C_CR2_ITERREN_Msk /*!<Error Interrupt Enable */
  3444. #define I2C_CR2_ITEVTEN_Pos (9U)
  3445. #define I2C_CR2_ITEVTEN_Msk (0x1U << I2C_CR2_ITEVTEN_Pos) /*!< 0x00000200 */
  3446. #define I2C_CR2_ITEVTEN I2C_CR2_ITEVTEN_Msk /*!<Event Interrupt Enable */
  3447. #define I2C_CR2_ITBUFEN_Pos (10U)
  3448. #define I2C_CR2_ITBUFEN_Msk (0x1U << I2C_CR2_ITBUFEN_Pos) /*!< 0x00000400 */
  3449. #define I2C_CR2_ITBUFEN I2C_CR2_ITBUFEN_Msk /*!<Buffer Interrupt Enable */
  3450. #define I2C_CR2_DMAEN_Pos (11U)
  3451. #define I2C_CR2_DMAEN_Msk (0x1U << I2C_CR2_DMAEN_Pos) /*!< 0x00000800 */
  3452. #define I2C_CR2_DMAEN I2C_CR2_DMAEN_Msk /*!<DMA Requests Enable */
  3453. #define I2C_CR2_LAST_Pos (12U)
  3454. #define I2C_CR2_LAST_Msk (0x1U << I2C_CR2_LAST_Pos) /*!< 0x00001000 */
  3455. #define I2C_CR2_LAST I2C_CR2_LAST_Msk /*!<DMA Last Transfer */
  3456. /******************* Bit definition for I2C_OAR1 register *******************/
  3457. #define I2C_OAR1_ADD1_7 0x000000FEU /*!<Interface Address */
  3458. #define I2C_OAR1_ADD8_9 0x00000300U /*!<Interface Address */
  3459. #define I2C_OAR1_ADD0_Pos (0U)
  3460. #define I2C_OAR1_ADD0_Msk (0x1U << I2C_OAR1_ADD0_Pos) /*!< 0x00000001 */
  3461. #define I2C_OAR1_ADD0 I2C_OAR1_ADD0_Msk /*!<Bit 0 */
  3462. #define I2C_OAR1_ADD1_Pos (1U)
  3463. #define I2C_OAR1_ADD1_Msk (0x1U << I2C_OAR1_ADD1_Pos) /*!< 0x00000002 */
  3464. #define I2C_OAR1_ADD1 I2C_OAR1_ADD1_Msk /*!<Bit 1 */
  3465. #define I2C_OAR1_ADD2_Pos (2U)
  3466. #define I2C_OAR1_ADD2_Msk (0x1U << I2C_OAR1_ADD2_Pos) /*!< 0x00000004 */
  3467. #define I2C_OAR1_ADD2 I2C_OAR1_ADD2_Msk /*!<Bit 2 */
  3468. #define I2C_OAR1_ADD3_Pos (3U)
  3469. #define I2C_OAR1_ADD3_Msk (0x1U << I2C_OAR1_ADD3_Pos) /*!< 0x00000008 */
  3470. #define I2C_OAR1_ADD3 I2C_OAR1_ADD3_Msk /*!<Bit 3 */
  3471. #define I2C_OAR1_ADD4_Pos (4U)
  3472. #define I2C_OAR1_ADD4_Msk (0x1U << I2C_OAR1_ADD4_Pos) /*!< 0x00000010 */
  3473. #define I2C_OAR1_ADD4 I2C_OAR1_ADD4_Msk /*!<Bit 4 */
  3474. #define I2C_OAR1_ADD5_Pos (5U)
  3475. #define I2C_OAR1_ADD5_Msk (0x1U << I2C_OAR1_ADD5_Pos) /*!< 0x00000020 */
  3476. #define I2C_OAR1_ADD5 I2C_OAR1_ADD5_Msk /*!<Bit 5 */
  3477. #define I2C_OAR1_ADD6_Pos (6U)
  3478. #define I2C_OAR1_ADD6_Msk (0x1U << I2C_OAR1_ADD6_Pos) /*!< 0x00000040 */
  3479. #define I2C_OAR1_ADD6 I2C_OAR1_ADD6_Msk /*!<Bit 6 */
  3480. #define I2C_OAR1_ADD7_Pos (7U)
  3481. #define I2C_OAR1_ADD7_Msk (0x1U << I2C_OAR1_ADD7_Pos) /*!< 0x00000080 */
  3482. #define I2C_OAR1_ADD7 I2C_OAR1_ADD7_Msk /*!<Bit 7 */
  3483. #define I2C_OAR1_ADD8_Pos (8U)
  3484. #define I2C_OAR1_ADD8_Msk (0x1U << I2C_OAR1_ADD8_Pos) /*!< 0x00000100 */
  3485. #define I2C_OAR1_ADD8 I2C_OAR1_ADD8_Msk /*!<Bit 8 */
  3486. #define I2C_OAR1_ADD9_Pos (9U)
  3487. #define I2C_OAR1_ADD9_Msk (0x1U << I2C_OAR1_ADD9_Pos) /*!< 0x00000200 */
  3488. #define I2C_OAR1_ADD9 I2C_OAR1_ADD9_Msk /*!<Bit 9 */
  3489. #define I2C_OAR1_ADDMODE_Pos (15U)
  3490. #define I2C_OAR1_ADDMODE_Msk (0x1U << I2C_OAR1_ADDMODE_Pos) /*!< 0x00008000 */
  3491. #define I2C_OAR1_ADDMODE I2C_OAR1_ADDMODE_Msk /*!<Addressing Mode (Slave mode) */
  3492. /******************* Bit definition for I2C_OAR2 register *******************/
  3493. #define I2C_OAR2_ENDUAL_Pos (0U)
  3494. #define I2C_OAR2_ENDUAL_Msk (0x1U << I2C_OAR2_ENDUAL_Pos) /*!< 0x00000001 */
  3495. #define I2C_OAR2_ENDUAL I2C_OAR2_ENDUAL_Msk /*!<Dual addressing mode enable */
  3496. #define I2C_OAR2_ADD2_Pos (1U)
  3497. #define I2C_OAR2_ADD2_Msk (0x7FU << I2C_OAR2_ADD2_Pos) /*!< 0x000000FE */
  3498. #define I2C_OAR2_ADD2 I2C_OAR2_ADD2_Msk /*!<Interface address */
  3499. /******************** Bit definition for I2C_DR register ********************/
  3500. #define I2C_DR_DR_Pos (0U)
  3501. #define I2C_DR_DR_Msk (0xFFU << I2C_DR_DR_Pos) /*!< 0x000000FF */
  3502. #define I2C_DR_DR I2C_DR_DR_Msk /*!<8-bit Data Register */
  3503. /******************* Bit definition for I2C_SR1 register ********************/
  3504. #define I2C_SR1_SB_Pos (0U)
  3505. #define I2C_SR1_SB_Msk (0x1U << I2C_SR1_SB_Pos) /*!< 0x00000001 */
  3506. #define I2C_SR1_SB I2C_SR1_SB_Msk /*!<Start Bit (Master mode) */
  3507. #define I2C_SR1_ADDR_Pos (1U)
  3508. #define I2C_SR1_ADDR_Msk (0x1U << I2C_SR1_ADDR_Pos) /*!< 0x00000002 */
  3509. #define I2C_SR1_ADDR I2C_SR1_ADDR_Msk /*!<Address sent (master mode)/matched (slave mode) */
  3510. #define I2C_SR1_BTF_Pos (2U)
  3511. #define I2C_SR1_BTF_Msk (0x1U << I2C_SR1_BTF_Pos) /*!< 0x00000004 */
  3512. #define I2C_SR1_BTF I2C_SR1_BTF_Msk /*!<Byte Transfer Finished */
  3513. #define I2C_SR1_ADD10_Pos (3U)
  3514. #define I2C_SR1_ADD10_Msk (0x1U << I2C_SR1_ADD10_Pos) /*!< 0x00000008 */
  3515. #define I2C_SR1_ADD10 I2C_SR1_ADD10_Msk /*!<10-bit header sent (Master mode) */
  3516. #define I2C_SR1_STOPF_Pos (4U)
  3517. #define I2C_SR1_STOPF_Msk (0x1U << I2C_SR1_STOPF_Pos) /*!< 0x00000010 */
  3518. #define I2C_SR1_STOPF I2C_SR1_STOPF_Msk /*!<Stop detection (Slave mode) */
  3519. #define I2C_SR1_RXNE_Pos (6U)
  3520. #define I2C_SR1_RXNE_Msk (0x1U << I2C_SR1_RXNE_Pos) /*!< 0x00000040 */
  3521. #define I2C_SR1_RXNE I2C_SR1_RXNE_Msk /*!<Data Register not Empty (receivers) */
  3522. #define I2C_SR1_TXE_Pos (7U)
  3523. #define I2C_SR1_TXE_Msk (0x1U << I2C_SR1_TXE_Pos) /*!< 0x00000080 */
  3524. #define I2C_SR1_TXE I2C_SR1_TXE_Msk /*!<Data Register Empty (transmitters) */
  3525. #define I2C_SR1_BERR_Pos (8U)
  3526. #define I2C_SR1_BERR_Msk (0x1U << I2C_SR1_BERR_Pos) /*!< 0x00000100 */
  3527. #define I2C_SR1_BERR I2C_SR1_BERR_Msk /*!<Bus Error */
  3528. #define I2C_SR1_ARLO_Pos (9U)
  3529. #define I2C_SR1_ARLO_Msk (0x1U << I2C_SR1_ARLO_Pos) /*!< 0x00000200 */
  3530. #define I2C_SR1_ARLO I2C_SR1_ARLO_Msk /*!<Arbitration Lost (master mode) */
  3531. #define I2C_SR1_AF_Pos (10U)
  3532. #define I2C_SR1_AF_Msk (0x1U << I2C_SR1_AF_Pos) /*!< 0x00000400 */
  3533. #define I2C_SR1_AF I2C_SR1_AF_Msk /*!<Acknowledge Failure */
  3534. #define I2C_SR1_OVR_Pos (11U)
  3535. #define I2C_SR1_OVR_Msk (0x1U << I2C_SR1_OVR_Pos) /*!< 0x00000800 */
  3536. #define I2C_SR1_OVR I2C_SR1_OVR_Msk /*!<Overrun/Underrun */
  3537. #define I2C_SR1_PECERR_Pos (12U)
  3538. #define I2C_SR1_PECERR_Msk (0x1U << I2C_SR1_PECERR_Pos) /*!< 0x00001000 */
  3539. #define I2C_SR1_PECERR I2C_SR1_PECERR_Msk /*!<PEC Error in reception */
  3540. #define I2C_SR1_TIMEOUT_Pos (14U)
  3541. #define I2C_SR1_TIMEOUT_Msk (0x1U << I2C_SR1_TIMEOUT_Pos) /*!< 0x00004000 */
  3542. #define I2C_SR1_TIMEOUT I2C_SR1_TIMEOUT_Msk /*!<Timeout or Tlow Error */
  3543. #define I2C_SR1_SMBALERT_Pos (15U)
  3544. #define I2C_SR1_SMBALERT_Msk (0x1U << I2C_SR1_SMBALERT_Pos) /*!< 0x00008000 */
  3545. #define I2C_SR1_SMBALERT I2C_SR1_SMBALERT_Msk /*!<SMBus Alert */
  3546. /******************* Bit definition for I2C_SR2 register ********************/
  3547. #define I2C_SR2_MSL_Pos (0U)
  3548. #define I2C_SR2_MSL_Msk (0x1U << I2C_SR2_MSL_Pos) /*!< 0x00000001 */
  3549. #define I2C_SR2_MSL I2C_SR2_MSL_Msk /*!<Master/Slave */
  3550. #define I2C_SR2_BUSY_Pos (1U)
  3551. #define I2C_SR2_BUSY_Msk (0x1U << I2C_SR2_BUSY_Pos) /*!< 0x00000002 */
  3552. #define I2C_SR2_BUSY I2C_SR2_BUSY_Msk /*!<Bus Busy */
  3553. #define I2C_SR2_TRA_Pos (2U)
  3554. #define I2C_SR2_TRA_Msk (0x1U << I2C_SR2_TRA_Pos) /*!< 0x00000004 */
  3555. #define I2C_SR2_TRA I2C_SR2_TRA_Msk /*!<Transmitter/Receiver */
  3556. #define I2C_SR2_GENCALL_Pos (4U)
  3557. #define I2C_SR2_GENCALL_Msk (0x1U << I2C_SR2_GENCALL_Pos) /*!< 0x00000010 */
  3558. #define I2C_SR2_GENCALL I2C_SR2_GENCALL_Msk /*!<General Call Address (Slave mode) */
  3559. #define I2C_SR2_SMBDEFAULT_Pos (5U)
  3560. #define I2C_SR2_SMBDEFAULT_Msk (0x1U << I2C_SR2_SMBDEFAULT_Pos) /*!< 0x00000020 */
  3561. #define I2C_SR2_SMBDEFAULT I2C_SR2_SMBDEFAULT_Msk /*!<SMBus Device Default Address (Slave mode) */
  3562. #define I2C_SR2_SMBHOST_Pos (6U)
  3563. #define I2C_SR2_SMBHOST_Msk (0x1U << I2C_SR2_SMBHOST_Pos) /*!< 0x00000040 */
  3564. #define I2C_SR2_SMBHOST I2C_SR2_SMBHOST_Msk /*!<SMBus Host Header (Slave mode) */
  3565. #define I2C_SR2_DUALF_Pos (7U)
  3566. #define I2C_SR2_DUALF_Msk (0x1U << I2C_SR2_DUALF_Pos) /*!< 0x00000080 */
  3567. #define I2C_SR2_DUALF I2C_SR2_DUALF_Msk /*!<Dual Flag (Slave mode) */
  3568. #define I2C_SR2_PEC_Pos (8U)
  3569. #define I2C_SR2_PEC_Msk (0xFFU << I2C_SR2_PEC_Pos) /*!< 0x0000FF00 */
  3570. #define I2C_SR2_PEC I2C_SR2_PEC_Msk /*!<Packet Error Checking Register */
  3571. /******************* Bit definition for I2C_CCR register ********************/
  3572. #define I2C_CCR_CCR_Pos (0U)
  3573. #define I2C_CCR_CCR_Msk (0xFFFU << I2C_CCR_CCR_Pos) /*!< 0x00000FFF */
  3574. #define I2C_CCR_CCR I2C_CCR_CCR_Msk /*!<Clock Control Register in Fast/Standard mode (Master mode) */
  3575. #define I2C_CCR_DUTY_Pos (14U)
  3576. #define I2C_CCR_DUTY_Msk (0x1U << I2C_CCR_DUTY_Pos) /*!< 0x00004000 */
  3577. #define I2C_CCR_DUTY I2C_CCR_DUTY_Msk /*!<Fast Mode Duty Cycle */
  3578. #define I2C_CCR_FS_Pos (15U)
  3579. #define I2C_CCR_FS_Msk (0x1U << I2C_CCR_FS_Pos) /*!< 0x00008000 */
  3580. #define I2C_CCR_FS I2C_CCR_FS_Msk /*!<I2C Master Mode Selection */
  3581. /****************** Bit definition for I2C_TRISE register *******************/
  3582. #define I2C_TRISE_TRISE_Pos (0U)
  3583. #define I2C_TRISE_TRISE_Msk (0x3FU << I2C_TRISE_TRISE_Pos) /*!< 0x0000003F */
  3584. #define I2C_TRISE_TRISE I2C_TRISE_TRISE_Msk /*!<Maximum Rise Time in Fast/Standard mode (Master mode) */
  3585. /****************** Bit definition for I2C_FLTR register *******************/
  3586. #define I2C_FLTR_DNF_Pos (0U)
  3587. #define I2C_FLTR_DNF_Msk (0xFU << I2C_FLTR_DNF_Pos) /*!< 0x0000000F */
  3588. #define I2C_FLTR_DNF I2C_FLTR_DNF_Msk /*!<Digital Noise Filter */
  3589. #define I2C_FLTR_ANOFF_Pos (4U)
  3590. #define I2C_FLTR_ANOFF_Msk (0x1U << I2C_FLTR_ANOFF_Pos) /*!< 0x00000010 */
  3591. #define I2C_FLTR_ANOFF I2C_FLTR_ANOFF_Msk /*!<Analog Noise Filter OFF */
  3592. /******************************************************************************/
  3593. /* */
  3594. /* Independent WATCHDOG */
  3595. /* */
  3596. /******************************************************************************/
  3597. /******************* Bit definition for IWDG_KR register ********************/
  3598. #define IWDG_KR_KEY_Pos (0U)
  3599. #define IWDG_KR_KEY_Msk (0xFFFFU << IWDG_KR_KEY_Pos) /*!< 0x0000FFFF */
  3600. #define IWDG_KR_KEY IWDG_KR_KEY_Msk /*!<Key value (write only, read 0000h) */
  3601. /******************* Bit definition for IWDG_PR register ********************/
  3602. #define IWDG_PR_PR_Pos (0U)
  3603. #define IWDG_PR_PR_Msk (0x7U << IWDG_PR_PR_Pos) /*!< 0x00000007 */
  3604. #define IWDG_PR_PR IWDG_PR_PR_Msk /*!<PR[2:0] (Prescaler divider) */
  3605. #define IWDG_PR_PR_0 (0x1U << IWDG_PR_PR_Pos) /*!< 0x01 */
  3606. #define IWDG_PR_PR_1 (0x2U << IWDG_PR_PR_Pos) /*!< 0x02 */
  3607. #define IWDG_PR_PR_2 (0x4U << IWDG_PR_PR_Pos) /*!< 0x04 */
  3608. /******************* Bit definition for IWDG_RLR register *******************/
  3609. #define IWDG_RLR_RL_Pos (0U)
  3610. #define IWDG_RLR_RL_Msk (0xFFFU << IWDG_RLR_RL_Pos) /*!< 0x00000FFF */
  3611. #define IWDG_RLR_RL IWDG_RLR_RL_Msk /*!<Watchdog counter reload value */
  3612. /******************* Bit definition for IWDG_SR register ********************/
  3613. #define IWDG_SR_PVU_Pos (0U)
  3614. #define IWDG_SR_PVU_Msk (0x1U << IWDG_SR_PVU_Pos) /*!< 0x00000001 */
  3615. #define IWDG_SR_PVU IWDG_SR_PVU_Msk /*!<Watchdog prescaler value update */
  3616. #define IWDG_SR_RVU_Pos (1U)
  3617. #define IWDG_SR_RVU_Msk (0x1U << IWDG_SR_RVU_Pos) /*!< 0x00000002 */
  3618. #define IWDG_SR_RVU IWDG_SR_RVU_Msk /*!<Watchdog counter reload value update */
  3619. /******************************************************************************/
  3620. /* */
  3621. /* Power Control */
  3622. /* */
  3623. /******************************************************************************/
  3624. /******************** Bit definition for PWR_CR register ********************/
  3625. #define PWR_CR_LPDS_Pos (0U)
  3626. #define PWR_CR_LPDS_Msk (0x1U << PWR_CR_LPDS_Pos) /*!< 0x00000001 */
  3627. #define PWR_CR_LPDS PWR_CR_LPDS_Msk /*!< Low-Power Deepsleep */
  3628. #define PWR_CR_PDDS_Pos (1U)
  3629. #define PWR_CR_PDDS_Msk (0x1U << PWR_CR_PDDS_Pos) /*!< 0x00000002 */
  3630. #define PWR_CR_PDDS PWR_CR_PDDS_Msk /*!< Power Down Deepsleep */
  3631. #define PWR_CR_CWUF_Pos (2U)
  3632. #define PWR_CR_CWUF_Msk (0x1U << PWR_CR_CWUF_Pos) /*!< 0x00000004 */
  3633. #define PWR_CR_CWUF PWR_CR_CWUF_Msk /*!< Clear Wakeup Flag */
  3634. #define PWR_CR_CSBF_Pos (3U)
  3635. #define PWR_CR_CSBF_Msk (0x1U << PWR_CR_CSBF_Pos) /*!< 0x00000008 */
  3636. #define PWR_CR_CSBF PWR_CR_CSBF_Msk /*!< Clear Standby Flag */
  3637. #define PWR_CR_PVDE_Pos (4U)
  3638. #define PWR_CR_PVDE_Msk (0x1U << PWR_CR_PVDE_Pos) /*!< 0x00000010 */
  3639. #define PWR_CR_PVDE PWR_CR_PVDE_Msk /*!< Power Voltage Detector Enable */
  3640. #define PWR_CR_PLS_Pos (5U)
  3641. #define PWR_CR_PLS_Msk (0x7U << PWR_CR_PLS_Pos) /*!< 0x000000E0 */
  3642. #define PWR_CR_PLS PWR_CR_PLS_Msk /*!< PLS[2:0] bits (PVD Level Selection) */
  3643. #define PWR_CR_PLS_0 (0x1U << PWR_CR_PLS_Pos) /*!< 0x00000020 */
  3644. #define PWR_CR_PLS_1 (0x2U << PWR_CR_PLS_Pos) /*!< 0x00000040 */
  3645. #define PWR_CR_PLS_2 (0x4U << PWR_CR_PLS_Pos) /*!< 0x00000080 */
  3646. /*!< PVD level configuration */
  3647. #define PWR_CR_PLS_LEV0 0x00000000U /*!< PVD level 0 */
  3648. #define PWR_CR_PLS_LEV1 0x00000020U /*!< PVD level 1 */
  3649. #define PWR_CR_PLS_LEV2 0x00000040U /*!< PVD level 2 */
  3650. #define PWR_CR_PLS_LEV3 0x00000060U /*!< PVD level 3 */
  3651. #define PWR_CR_PLS_LEV4 0x00000080U /*!< PVD level 4 */
  3652. #define PWR_CR_PLS_LEV5 0x000000A0U /*!< PVD level 5 */
  3653. #define PWR_CR_PLS_LEV6 0x000000C0U /*!< PVD level 6 */
  3654. #define PWR_CR_PLS_LEV7 0x000000E0U /*!< PVD level 7 */
  3655. #define PWR_CR_DBP_Pos (8U)
  3656. #define PWR_CR_DBP_Msk (0x1U << PWR_CR_DBP_Pos) /*!< 0x00000100 */
  3657. #define PWR_CR_DBP PWR_CR_DBP_Msk /*!< Disable Backup Domain write protection */
  3658. #define PWR_CR_FPDS_Pos (9U)
  3659. #define PWR_CR_FPDS_Msk (0x1U << PWR_CR_FPDS_Pos) /*!< 0x00000200 */
  3660. #define PWR_CR_FPDS PWR_CR_FPDS_Msk /*!< Flash power down in Stop mode */
  3661. #define PWR_CR_LPLVDS_Pos (10U)
  3662. #define PWR_CR_LPLVDS_Msk (0x1U << PWR_CR_LPLVDS_Pos) /*!< 0x00000400 */
  3663. #define PWR_CR_LPLVDS PWR_CR_LPLVDS_Msk /*!< Low Power Regulator Low Voltage in Deep Sleep mode */
  3664. #define PWR_CR_MRLVDS_Pos (11U)
  3665. #define PWR_CR_MRLVDS_Msk (0x1U << PWR_CR_MRLVDS_Pos) /*!< 0x00000800 */
  3666. #define PWR_CR_MRLVDS PWR_CR_MRLVDS_Msk /*!< Main Regulator Low Voltage in Deep Sleep mode */
  3667. #define PWR_CR_ADCDC1_Pos (13U)
  3668. #define PWR_CR_ADCDC1_Msk (0x1U << PWR_CR_ADCDC1_Pos) /*!< 0x00002000 */
  3669. #define PWR_CR_ADCDC1 PWR_CR_ADCDC1_Msk /*!< Refer to AN4073 on how to use this bit */
  3670. #define PWR_CR_VOS_Pos (14U)
  3671. #define PWR_CR_VOS_Msk (0x3U << PWR_CR_VOS_Pos) /*!< 0x0000C000 */
  3672. #define PWR_CR_VOS PWR_CR_VOS_Msk /*!< VOS[1:0] bits (Regulator voltage scaling output selection) */
  3673. #define PWR_CR_VOS_0 0x00004000U /*!< Bit 0 */
  3674. #define PWR_CR_VOS_1 0x00008000U /*!< Bit 1 */
  3675. #define PWR_CR_FMSSR_Pos (20U)
  3676. #define PWR_CR_FMSSR_Msk (0x1U << PWR_CR_FMSSR_Pos) /*!< 0x00100000 */
  3677. #define PWR_CR_FMSSR PWR_CR_FMSSR_Msk /*!< Flash Memory Sleep System Run */
  3678. #define PWR_CR_FISSR_Pos (21U)
  3679. #define PWR_CR_FISSR_Msk (0x1U << PWR_CR_FISSR_Pos) /*!< 0x00200000 */
  3680. #define PWR_CR_FISSR PWR_CR_FISSR_Msk /*!< Flash Interface Stop while System Run */
  3681. /* Legacy define */
  3682. #define PWR_CR_PMODE PWR_CR_VOS
  3683. /******************* Bit definition for PWR_CSR register ********************/
  3684. #define PWR_CSR_WUF_Pos (0U)
  3685. #define PWR_CSR_WUF_Msk (0x1U << PWR_CSR_WUF_Pos) /*!< 0x00000001 */
  3686. #define PWR_CSR_WUF PWR_CSR_WUF_Msk /*!< Wakeup Flag */
  3687. #define PWR_CSR_SBF_Pos (1U)
  3688. #define PWR_CSR_SBF_Msk (0x1U << PWR_CSR_SBF_Pos) /*!< 0x00000002 */
  3689. #define PWR_CSR_SBF PWR_CSR_SBF_Msk /*!< Standby Flag */
  3690. #define PWR_CSR_PVDO_Pos (2U)
  3691. #define PWR_CSR_PVDO_Msk (0x1U << PWR_CSR_PVDO_Pos) /*!< 0x00000004 */
  3692. #define PWR_CSR_PVDO PWR_CSR_PVDO_Msk /*!< PVD Output */
  3693. #define PWR_CSR_BRR_Pos (3U)
  3694. #define PWR_CSR_BRR_Msk (0x1U << PWR_CSR_BRR_Pos) /*!< 0x00000008 */
  3695. #define PWR_CSR_BRR PWR_CSR_BRR_Msk /*!< Backup regulator ready */
  3696. #define PWR_CSR_EWUP_Pos (8U)
  3697. #define PWR_CSR_EWUP_Msk (0x1U << PWR_CSR_EWUP_Pos) /*!< 0x00000100 */
  3698. #define PWR_CSR_EWUP PWR_CSR_EWUP_Msk /*!< Enable WKUP pin */
  3699. #define PWR_CSR_BRE_Pos (9U)
  3700. #define PWR_CSR_BRE_Msk (0x1U << PWR_CSR_BRE_Pos) /*!< 0x00000200 */
  3701. #define PWR_CSR_BRE PWR_CSR_BRE_Msk /*!< Backup regulator enable */
  3702. #define PWR_CSR_VOSRDY_Pos (14U)
  3703. #define PWR_CSR_VOSRDY_Msk (0x1U << PWR_CSR_VOSRDY_Pos) /*!< 0x00004000 */
  3704. #define PWR_CSR_VOSRDY PWR_CSR_VOSRDY_Msk /*!< Regulator voltage scaling output selection ready */
  3705. /* Legacy define */
  3706. #define PWR_CSR_REGRDY PWR_CSR_VOSRDY
  3707. /******************************************************************************/
  3708. /* */
  3709. /* Reset and Clock Control */
  3710. /* */
  3711. /******************************************************************************/
  3712. /******************** Bit definition for RCC_CR register ********************/
  3713. #define RCC_CR_HSION_Pos (0U)
  3714. #define RCC_CR_HSION_Msk (0x1U << RCC_CR_HSION_Pos) /*!< 0x00000001 */
  3715. #define RCC_CR_HSION RCC_CR_HSION_Msk
  3716. #define RCC_CR_HSIRDY_Pos (1U)
  3717. #define RCC_CR_HSIRDY_Msk (0x1U << RCC_CR_HSIRDY_Pos) /*!< 0x00000002 */
  3718. #define RCC_CR_HSIRDY RCC_CR_HSIRDY_Msk
  3719. #define RCC_CR_HSITRIM_Pos (3U)
  3720. #define RCC_CR_HSITRIM_Msk (0x1FU << RCC_CR_HSITRIM_Pos) /*!< 0x000000F8 */
  3721. #define RCC_CR_HSITRIM RCC_CR_HSITRIM_Msk
  3722. #define RCC_CR_HSITRIM_0 (0x01U << RCC_CR_HSITRIM_Pos) /*!< 0x00000008 */
  3723. #define RCC_CR_HSITRIM_1 (0x02U << RCC_CR_HSITRIM_Pos) /*!< 0x00000010 */
  3724. #define RCC_CR_HSITRIM_2 (0x04U << RCC_CR_HSITRIM_Pos) /*!< 0x00000020 */
  3725. #define RCC_CR_HSITRIM_3 (0x08U << RCC_CR_HSITRIM_Pos) /*!< 0x00000040 */
  3726. #define RCC_CR_HSITRIM_4 (0x10U << RCC_CR_HSITRIM_Pos) /*!< 0x00000080 */
  3727. #define RCC_CR_HSICAL_Pos (8U)
  3728. #define RCC_CR_HSICAL_Msk (0xFFU << RCC_CR_HSICAL_Pos) /*!< 0x0000FF00 */
  3729. #define RCC_CR_HSICAL RCC_CR_HSICAL_Msk
  3730. #define RCC_CR_HSICAL_0 (0x01U << RCC_CR_HSICAL_Pos) /*!< 0x00000100 */
  3731. #define RCC_CR_HSICAL_1 (0x02U << RCC_CR_HSICAL_Pos) /*!< 0x00000200 */
  3732. #define RCC_CR_HSICAL_2 (0x04U << RCC_CR_HSICAL_Pos) /*!< 0x00000400 */
  3733. #define RCC_CR_HSICAL_3 (0x08U << RCC_CR_HSICAL_Pos) /*!< 0x00000800 */
  3734. #define RCC_CR_HSICAL_4 (0x10U << RCC_CR_HSICAL_Pos) /*!< 0x00001000 */
  3735. #define RCC_CR_HSICAL_5 (0x20U << RCC_CR_HSICAL_Pos) /*!< 0x00002000 */
  3736. #define RCC_CR_HSICAL_6 (0x40U << RCC_CR_HSICAL_Pos) /*!< 0x00004000 */
  3737. #define RCC_CR_HSICAL_7 (0x80U << RCC_CR_HSICAL_Pos) /*!< 0x00008000 */
  3738. #define RCC_CR_HSEON_Pos (16U)
  3739. #define RCC_CR_HSEON_Msk (0x1U << RCC_CR_HSEON_Pos) /*!< 0x00010000 */
  3740. #define RCC_CR_HSEON RCC_CR_HSEON_Msk
  3741. #define RCC_CR_HSERDY_Pos (17U)
  3742. #define RCC_CR_HSERDY_Msk (0x1U << RCC_CR_HSERDY_Pos) /*!< 0x00020000 */
  3743. #define RCC_CR_HSERDY RCC_CR_HSERDY_Msk
  3744. #define RCC_CR_HSEBYP_Pos (18U)
  3745. #define RCC_CR_HSEBYP_Msk (0x1U << RCC_CR_HSEBYP_Pos) /*!< 0x00040000 */
  3746. #define RCC_CR_HSEBYP RCC_CR_HSEBYP_Msk
  3747. #define RCC_CR_CSSON_Pos (19U)
  3748. #define RCC_CR_CSSON_Msk (0x1U << RCC_CR_CSSON_Pos) /*!< 0x00080000 */
  3749. #define RCC_CR_CSSON RCC_CR_CSSON_Msk
  3750. #define RCC_CR_PLLON_Pos (24U)
  3751. #define RCC_CR_PLLON_Msk (0x1U << RCC_CR_PLLON_Pos) /*!< 0x01000000 */
  3752. #define RCC_CR_PLLON RCC_CR_PLLON_Msk
  3753. #define RCC_CR_PLLRDY_Pos (25U)
  3754. #define RCC_CR_PLLRDY_Msk (0x1U << RCC_CR_PLLRDY_Pos) /*!< 0x02000000 */
  3755. #define RCC_CR_PLLRDY RCC_CR_PLLRDY_Msk
  3756. /*
  3757. * @brief Specific device feature definitions (not present on all devices in the STM32F4 serie)
  3758. */
  3759. #define RCC_PLLI2S_SUPPORT /*!< Support PLLI2S oscillator */
  3760. #define RCC_CR_PLLI2SON_Pos (26U)
  3761. #define RCC_CR_PLLI2SON_Msk (0x1U << RCC_CR_PLLI2SON_Pos) /*!< 0x04000000 */
  3762. #define RCC_CR_PLLI2SON RCC_CR_PLLI2SON_Msk
  3763. #define RCC_CR_PLLI2SRDY_Pos (27U)
  3764. #define RCC_CR_PLLI2SRDY_Msk (0x1U << RCC_CR_PLLI2SRDY_Pos) /*!< 0x08000000 */
  3765. #define RCC_CR_PLLI2SRDY RCC_CR_PLLI2SRDY_Msk
  3766. /******************** Bit definition for RCC_PLLCFGR register ***************/
  3767. #define RCC_PLLCFGR_PLLM_Pos (0U)
  3768. #define RCC_PLLCFGR_PLLM_Msk (0x3FU << RCC_PLLCFGR_PLLM_Pos) /*!< 0x0000003F */
  3769. #define RCC_PLLCFGR_PLLM RCC_PLLCFGR_PLLM_Msk
  3770. #define RCC_PLLCFGR_PLLM_0 (0x01U << RCC_PLLCFGR_PLLM_Pos) /*!< 0x00000001 */
  3771. #define RCC_PLLCFGR_PLLM_1 (0x02U << RCC_PLLCFGR_PLLM_Pos) /*!< 0x00000002 */
  3772. #define RCC_PLLCFGR_PLLM_2 (0x04U << RCC_PLLCFGR_PLLM_Pos) /*!< 0x00000004 */
  3773. #define RCC_PLLCFGR_PLLM_3 (0x08U << RCC_PLLCFGR_PLLM_Pos) /*!< 0x00000008 */
  3774. #define RCC_PLLCFGR_PLLM_4 (0x10U << RCC_PLLCFGR_PLLM_Pos) /*!< 0x00000010 */
  3775. #define RCC_PLLCFGR_PLLM_5 (0x20U << RCC_PLLCFGR_PLLM_Pos) /*!< 0x00000020 */
  3776. #define RCC_PLLCFGR_PLLN_Pos (6U)
  3777. #define RCC_PLLCFGR_PLLN_Msk (0x1FFU << RCC_PLLCFGR_PLLN_Pos) /*!< 0x00007FC0 */
  3778. #define RCC_PLLCFGR_PLLN RCC_PLLCFGR_PLLN_Msk
  3779. #define RCC_PLLCFGR_PLLN_0 (0x001U << RCC_PLLCFGR_PLLN_Pos) /*!< 0x00000040 */
  3780. #define RCC_PLLCFGR_PLLN_1 (0x002U << RCC_PLLCFGR_PLLN_Pos) /*!< 0x00000080 */
  3781. #define RCC_PLLCFGR_PLLN_2 (0x004U << RCC_PLLCFGR_PLLN_Pos) /*!< 0x00000100 */
  3782. #define RCC_PLLCFGR_PLLN_3 (0x008U << RCC_PLLCFGR_PLLN_Pos) /*!< 0x00000200 */
  3783. #define RCC_PLLCFGR_PLLN_4 (0x010U << RCC_PLLCFGR_PLLN_Pos) /*!< 0x00000400 */
  3784. #define RCC_PLLCFGR_PLLN_5 (0x020U << RCC_PLLCFGR_PLLN_Pos) /*!< 0x00000800 */
  3785. #define RCC_PLLCFGR_PLLN_6 (0x040U << RCC_PLLCFGR_PLLN_Pos) /*!< 0x00001000 */
  3786. #define RCC_PLLCFGR_PLLN_7 (0x080U << RCC_PLLCFGR_PLLN_Pos) /*!< 0x00002000 */
  3787. #define RCC_PLLCFGR_PLLN_8 (0x100U << RCC_PLLCFGR_PLLN_Pos) /*!< 0x00004000 */
  3788. #define RCC_PLLCFGR_PLLP_Pos (16U)
  3789. #define RCC_PLLCFGR_PLLP_Msk (0x3U << RCC_PLLCFGR_PLLP_Pos) /*!< 0x00030000 */
  3790. #define RCC_PLLCFGR_PLLP RCC_PLLCFGR_PLLP_Msk
  3791. #define RCC_PLLCFGR_PLLP_0 (0x1U << RCC_PLLCFGR_PLLP_Pos) /*!< 0x00010000 */
  3792. #define RCC_PLLCFGR_PLLP_1 (0x2U << RCC_PLLCFGR_PLLP_Pos) /*!< 0x00020000 */
  3793. #define RCC_PLLCFGR_PLLSRC_Pos (22U)
  3794. #define RCC_PLLCFGR_PLLSRC_Msk (0x1U << RCC_PLLCFGR_PLLSRC_Pos) /*!< 0x00400000 */
  3795. #define RCC_PLLCFGR_PLLSRC RCC_PLLCFGR_PLLSRC_Msk
  3796. #define RCC_PLLCFGR_PLLSRC_HSE_Pos (22U)
  3797. #define RCC_PLLCFGR_PLLSRC_HSE_Msk (0x1U << RCC_PLLCFGR_PLLSRC_HSE_Pos) /*!< 0x00400000 */
  3798. #define RCC_PLLCFGR_PLLSRC_HSE RCC_PLLCFGR_PLLSRC_HSE_Msk
  3799. #define RCC_PLLCFGR_PLLSRC_HSI 0x00000000U
  3800. #define RCC_PLLCFGR_PLLQ_Pos (24U)
  3801. #define RCC_PLLCFGR_PLLQ_Msk (0xFU << RCC_PLLCFGR_PLLQ_Pos) /*!< 0x0F000000 */
  3802. #define RCC_PLLCFGR_PLLQ RCC_PLLCFGR_PLLQ_Msk
  3803. #define RCC_PLLCFGR_PLLQ_0 (0x1U << RCC_PLLCFGR_PLLQ_Pos) /*!< 0x01000000 */
  3804. #define RCC_PLLCFGR_PLLQ_1 (0x2U << RCC_PLLCFGR_PLLQ_Pos) /*!< 0x02000000 */
  3805. #define RCC_PLLCFGR_PLLQ_2 (0x4U << RCC_PLLCFGR_PLLQ_Pos) /*!< 0x04000000 */
  3806. #define RCC_PLLCFGR_PLLQ_3 (0x8U << RCC_PLLCFGR_PLLQ_Pos) /*!< 0x08000000 */
  3807. /******************** Bit definition for RCC_CFGR register ******************/
  3808. /*!< SW configuration */
  3809. #define RCC_CFGR_SW_Pos (0U)
  3810. #define RCC_CFGR_SW_Msk (0x3U << RCC_CFGR_SW_Pos) /*!< 0x00000003 */
  3811. #define RCC_CFGR_SW RCC_CFGR_SW_Msk /*!< SW[1:0] bits (System clock Switch) */
  3812. #define RCC_CFGR_SW_0 (0x1U << RCC_CFGR_SW_Pos) /*!< 0x00000001 */
  3813. #define RCC_CFGR_SW_1 (0x2U << RCC_CFGR_SW_Pos) /*!< 0x00000002 */
  3814. #define RCC_CFGR_SW_HSI 0x00000000U /*!< HSI selected as system clock */
  3815. #define RCC_CFGR_SW_HSE 0x00000001U /*!< HSE selected as system clock */
  3816. #define RCC_CFGR_SW_PLL 0x00000002U /*!< PLL selected as system clock */
  3817. /*!< SWS configuration */
  3818. #define RCC_CFGR_SWS_Pos (2U)
  3819. #define RCC_CFGR_SWS_Msk (0x3U << RCC_CFGR_SWS_Pos) /*!< 0x0000000C */
  3820. #define RCC_CFGR_SWS RCC_CFGR_SWS_Msk /*!< SWS[1:0] bits (System Clock Switch Status) */
  3821. #define RCC_CFGR_SWS_0 (0x1U << RCC_CFGR_SWS_Pos) /*!< 0x00000004 */
  3822. #define RCC_CFGR_SWS_1 (0x2U << RCC_CFGR_SWS_Pos) /*!< 0x00000008 */
  3823. #define RCC_CFGR_SWS_HSI 0x00000000U /*!< HSI oscillator used as system clock */
  3824. #define RCC_CFGR_SWS_HSE 0x00000004U /*!< HSE oscillator used as system clock */
  3825. #define RCC_CFGR_SWS_PLL 0x00000008U /*!< PLL used as system clock */
  3826. /*!< HPRE configuration */
  3827. #define RCC_CFGR_HPRE_Pos (4U)
  3828. #define RCC_CFGR_HPRE_Msk (0xFU << RCC_CFGR_HPRE_Pos) /*!< 0x000000F0 */
  3829. #define RCC_CFGR_HPRE RCC_CFGR_HPRE_Msk /*!< HPRE[3:0] bits (AHB prescaler) */
  3830. #define RCC_CFGR_HPRE_0 (0x1U << RCC_CFGR_HPRE_Pos) /*!< 0x00000010 */
  3831. #define RCC_CFGR_HPRE_1 (0x2U << RCC_CFGR_HPRE_Pos) /*!< 0x00000020 */
  3832. #define RCC_CFGR_HPRE_2 (0x4U << RCC_CFGR_HPRE_Pos) /*!< 0x00000040 */
  3833. #define RCC_CFGR_HPRE_3 (0x8U << RCC_CFGR_HPRE_Pos) /*!< 0x00000080 */
  3834. #define RCC_CFGR_HPRE_DIV1 0x00000000U /*!< SYSCLK not divided */
  3835. #define RCC_CFGR_HPRE_DIV2 0x00000080U /*!< SYSCLK divided by 2 */
  3836. #define RCC_CFGR_HPRE_DIV4 0x00000090U /*!< SYSCLK divided by 4 */
  3837. #define RCC_CFGR_HPRE_DIV8 0x000000A0U /*!< SYSCLK divided by 8 */
  3838. #define RCC_CFGR_HPRE_DIV16 0x000000B0U /*!< SYSCLK divided by 16 */
  3839. #define RCC_CFGR_HPRE_DIV64 0x000000C0U /*!< SYSCLK divided by 64 */
  3840. #define RCC_CFGR_HPRE_DIV128 0x000000D0U /*!< SYSCLK divided by 128 */
  3841. #define RCC_CFGR_HPRE_DIV256 0x000000E0U /*!< SYSCLK divided by 256 */
  3842. #define RCC_CFGR_HPRE_DIV512 0x000000F0U /*!< SYSCLK divided by 512 */
  3843. /*!< PPRE1 configuration */
  3844. #define RCC_CFGR_PPRE1_Pos (10U)
  3845. #define RCC_CFGR_PPRE1_Msk (0x7U << RCC_CFGR_PPRE1_Pos) /*!< 0x00001C00 */
  3846. #define RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_Msk /*!< PRE1[2:0] bits (APB1 prescaler) */
  3847. #define RCC_CFGR_PPRE1_0 (0x1U << RCC_CFGR_PPRE1_Pos) /*!< 0x00000400 */
  3848. #define RCC_CFGR_PPRE1_1 (0x2U << RCC_CFGR_PPRE1_Pos) /*!< 0x00000800 */
  3849. #define RCC_CFGR_PPRE1_2 (0x4U << RCC_CFGR_PPRE1_Pos) /*!< 0x00001000 */
  3850. #define RCC_CFGR_PPRE1_DIV1 0x00000000U /*!< HCLK not divided */
  3851. #define RCC_CFGR_PPRE1_DIV2 0x00001000U /*!< HCLK divided by 2 */
  3852. #define RCC_CFGR_PPRE1_DIV4 0x00001400U /*!< HCLK divided by 4 */
  3853. #define RCC_CFGR_PPRE1_DIV8 0x00001800U /*!< HCLK divided by 8 */
  3854. #define RCC_CFGR_PPRE1_DIV16 0x00001C00U /*!< HCLK divided by 16 */
  3855. /*!< PPRE2 configuration */
  3856. #define RCC_CFGR_PPRE2_Pos (13U)
  3857. #define RCC_CFGR_PPRE2_Msk (0x7U << RCC_CFGR_PPRE2_Pos) /*!< 0x0000E000 */
  3858. #define RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_Msk /*!< PRE2[2:0] bits (APB2 prescaler) */
  3859. #define RCC_CFGR_PPRE2_0 (0x1U << RCC_CFGR_PPRE2_Pos) /*!< 0x00002000 */
  3860. #define RCC_CFGR_PPRE2_1 (0x2U << RCC_CFGR_PPRE2_Pos) /*!< 0x00004000 */
  3861. #define RCC_CFGR_PPRE2_2 (0x4U << RCC_CFGR_PPRE2_Pos) /*!< 0x00008000 */
  3862. #define RCC_CFGR_PPRE2_DIV1 0x00000000U /*!< HCLK not divided */
  3863. #define RCC_CFGR_PPRE2_DIV2 0x00008000U /*!< HCLK divided by 2 */
  3864. #define RCC_CFGR_PPRE2_DIV4 0x0000A000U /*!< HCLK divided by 4 */
  3865. #define RCC_CFGR_PPRE2_DIV8 0x0000C000U /*!< HCLK divided by 8 */
  3866. #define RCC_CFGR_PPRE2_DIV16 0x0000E000U /*!< HCLK divided by 16 */
  3867. /*!< RTCPRE configuration */
  3868. #define RCC_CFGR_RTCPRE_Pos (16U)
  3869. #define RCC_CFGR_RTCPRE_Msk (0x1FU << RCC_CFGR_RTCPRE_Pos) /*!< 0x001F0000 */
  3870. #define RCC_CFGR_RTCPRE RCC_CFGR_RTCPRE_Msk
  3871. #define RCC_CFGR_RTCPRE_0 (0x01U << RCC_CFGR_RTCPRE_Pos) /*!< 0x00010000 */
  3872. #define RCC_CFGR_RTCPRE_1 (0x02U << RCC_CFGR_RTCPRE_Pos) /*!< 0x00020000 */
  3873. #define RCC_CFGR_RTCPRE_2 (0x04U << RCC_CFGR_RTCPRE_Pos) /*!< 0x00040000 */
  3874. #define RCC_CFGR_RTCPRE_3 (0x08U << RCC_CFGR_RTCPRE_Pos) /*!< 0x00080000 */
  3875. #define RCC_CFGR_RTCPRE_4 (0x10U << RCC_CFGR_RTCPRE_Pos) /*!< 0x00100000 */
  3876. /*!< MCO1 configuration */
  3877. #define RCC_CFGR_MCO1_Pos (21U)
  3878. #define RCC_CFGR_MCO1_Msk (0x3U << RCC_CFGR_MCO1_Pos) /*!< 0x00600000 */
  3879. #define RCC_CFGR_MCO1 RCC_CFGR_MCO1_Msk
  3880. #define RCC_CFGR_MCO1_0 (0x1U << RCC_CFGR_MCO1_Pos) /*!< 0x00200000 */
  3881. #define RCC_CFGR_MCO1_1 (0x2U << RCC_CFGR_MCO1_Pos) /*!< 0x00400000 */
  3882. #define RCC_CFGR_I2SSRC_Pos (23U)
  3883. #define RCC_CFGR_I2SSRC_Msk (0x1U << RCC_CFGR_I2SSRC_Pos) /*!< 0x00800000 */
  3884. #define RCC_CFGR_I2SSRC RCC_CFGR_I2SSRC_Msk
  3885. #define RCC_CFGR_MCO1PRE_Pos (24U)
  3886. #define RCC_CFGR_MCO1PRE_Msk (0x7U << RCC_CFGR_MCO1PRE_Pos) /*!< 0x07000000 */
  3887. #define RCC_CFGR_MCO1PRE RCC_CFGR_MCO1PRE_Msk
  3888. #define RCC_CFGR_MCO1PRE_0 (0x1U << RCC_CFGR_MCO1PRE_Pos) /*!< 0x01000000 */
  3889. #define RCC_CFGR_MCO1PRE_1 (0x2U << RCC_CFGR_MCO1PRE_Pos) /*!< 0x02000000 */
  3890. #define RCC_CFGR_MCO1PRE_2 (0x4U << RCC_CFGR_MCO1PRE_Pos) /*!< 0x04000000 */
  3891. #define RCC_CFGR_MCO2PRE_Pos (27U)
  3892. #define RCC_CFGR_MCO2PRE_Msk (0x7U << RCC_CFGR_MCO2PRE_Pos) /*!< 0x38000000 */
  3893. #define RCC_CFGR_MCO2PRE RCC_CFGR_MCO2PRE_Msk
  3894. #define RCC_CFGR_MCO2PRE_0 (0x1U << RCC_CFGR_MCO2PRE_Pos) /*!< 0x08000000 */
  3895. #define RCC_CFGR_MCO2PRE_1 (0x2U << RCC_CFGR_MCO2PRE_Pos) /*!< 0x10000000 */
  3896. #define RCC_CFGR_MCO2PRE_2 (0x4U << RCC_CFGR_MCO2PRE_Pos) /*!< 0x20000000 */
  3897. #define RCC_CFGR_MCO2_Pos (30U)
  3898. #define RCC_CFGR_MCO2_Msk (0x3U << RCC_CFGR_MCO2_Pos) /*!< 0xC0000000 */
  3899. #define RCC_CFGR_MCO2 RCC_CFGR_MCO2_Msk
  3900. #define RCC_CFGR_MCO2_0 (0x1U << RCC_CFGR_MCO2_Pos) /*!< 0x40000000 */
  3901. #define RCC_CFGR_MCO2_1 (0x2U << RCC_CFGR_MCO2_Pos) /*!< 0x80000000 */
  3902. /******************** Bit definition for RCC_CIR register *******************/
  3903. #define RCC_CIR_LSIRDYF_Pos (0U)
  3904. #define RCC_CIR_LSIRDYF_Msk (0x1U << RCC_CIR_LSIRDYF_Pos) /*!< 0x00000001 */
  3905. #define RCC_CIR_LSIRDYF RCC_CIR_LSIRDYF_Msk
  3906. #define RCC_CIR_LSERDYF_Pos (1U)
  3907. #define RCC_CIR_LSERDYF_Msk (0x1U << RCC_CIR_LSERDYF_Pos) /*!< 0x00000002 */
  3908. #define RCC_CIR_LSERDYF RCC_CIR_LSERDYF_Msk
  3909. #define RCC_CIR_HSIRDYF_Pos (2U)
  3910. #define RCC_CIR_HSIRDYF_Msk (0x1U << RCC_CIR_HSIRDYF_Pos) /*!< 0x00000004 */
  3911. #define RCC_CIR_HSIRDYF RCC_CIR_HSIRDYF_Msk
  3912. #define RCC_CIR_HSERDYF_Pos (3U)
  3913. #define RCC_CIR_HSERDYF_Msk (0x1U << RCC_CIR_HSERDYF_Pos) /*!< 0x00000008 */
  3914. #define RCC_CIR_HSERDYF RCC_CIR_HSERDYF_Msk
  3915. #define RCC_CIR_PLLRDYF_Pos (4U)
  3916. #define RCC_CIR_PLLRDYF_Msk (0x1U << RCC_CIR_PLLRDYF_Pos) /*!< 0x00000010 */
  3917. #define RCC_CIR_PLLRDYF RCC_CIR_PLLRDYF_Msk
  3918. #define RCC_CIR_PLLI2SRDYF_Pos (5U)
  3919. #define RCC_CIR_PLLI2SRDYF_Msk (0x1U << RCC_CIR_PLLI2SRDYF_Pos) /*!< 0x00000020 */
  3920. #define RCC_CIR_PLLI2SRDYF RCC_CIR_PLLI2SRDYF_Msk
  3921. #define RCC_CIR_CSSF_Pos (7U)
  3922. #define RCC_CIR_CSSF_Msk (0x1U << RCC_CIR_CSSF_Pos) /*!< 0x00000080 */
  3923. #define RCC_CIR_CSSF RCC_CIR_CSSF_Msk
  3924. #define RCC_CIR_LSIRDYIE_Pos (8U)
  3925. #define RCC_CIR_LSIRDYIE_Msk (0x1U << RCC_CIR_LSIRDYIE_Pos) /*!< 0x00000100 */
  3926. #define RCC_CIR_LSIRDYIE RCC_CIR_LSIRDYIE_Msk
  3927. #define RCC_CIR_LSERDYIE_Pos (9U)
  3928. #define RCC_CIR_LSERDYIE_Msk (0x1U << RCC_CIR_LSERDYIE_Pos) /*!< 0x00000200 */
  3929. #define RCC_CIR_LSERDYIE RCC_CIR_LSERDYIE_Msk
  3930. #define RCC_CIR_HSIRDYIE_Pos (10U)
  3931. #define RCC_CIR_HSIRDYIE_Msk (0x1U << RCC_CIR_HSIRDYIE_Pos) /*!< 0x00000400 */
  3932. #define RCC_CIR_HSIRDYIE RCC_CIR_HSIRDYIE_Msk
  3933. #define RCC_CIR_HSERDYIE_Pos (11U)
  3934. #define RCC_CIR_HSERDYIE_Msk (0x1U << RCC_CIR_HSERDYIE_Pos) /*!< 0x00000800 */
  3935. #define RCC_CIR_HSERDYIE RCC_CIR_HSERDYIE_Msk
  3936. #define RCC_CIR_PLLRDYIE_Pos (12U)
  3937. #define RCC_CIR_PLLRDYIE_Msk (0x1U << RCC_CIR_PLLRDYIE_Pos) /*!< 0x00001000 */
  3938. #define RCC_CIR_PLLRDYIE RCC_CIR_PLLRDYIE_Msk
  3939. #define RCC_CIR_PLLI2SRDYIE_Pos (13U)
  3940. #define RCC_CIR_PLLI2SRDYIE_Msk (0x1U << RCC_CIR_PLLI2SRDYIE_Pos) /*!< 0x00002000 */
  3941. #define RCC_CIR_PLLI2SRDYIE RCC_CIR_PLLI2SRDYIE_Msk
  3942. #define RCC_CIR_LSIRDYC_Pos (16U)
  3943. #define RCC_CIR_LSIRDYC_Msk (0x1U << RCC_CIR_LSIRDYC_Pos) /*!< 0x00010000 */
  3944. #define RCC_CIR_LSIRDYC RCC_CIR_LSIRDYC_Msk
  3945. #define RCC_CIR_LSERDYC_Pos (17U)
  3946. #define RCC_CIR_LSERDYC_Msk (0x1U << RCC_CIR_LSERDYC_Pos) /*!< 0x00020000 */
  3947. #define RCC_CIR_LSERDYC RCC_CIR_LSERDYC_Msk
  3948. #define RCC_CIR_HSIRDYC_Pos (18U)
  3949. #define RCC_CIR_HSIRDYC_Msk (0x1U << RCC_CIR_HSIRDYC_Pos) /*!< 0x00040000 */
  3950. #define RCC_CIR_HSIRDYC RCC_CIR_HSIRDYC_Msk
  3951. #define RCC_CIR_HSERDYC_Pos (19U)
  3952. #define RCC_CIR_HSERDYC_Msk (0x1U << RCC_CIR_HSERDYC_Pos) /*!< 0x00080000 */
  3953. #define RCC_CIR_HSERDYC RCC_CIR_HSERDYC_Msk
  3954. #define RCC_CIR_PLLRDYC_Pos (20U)
  3955. #define RCC_CIR_PLLRDYC_Msk (0x1U << RCC_CIR_PLLRDYC_Pos) /*!< 0x00100000 */
  3956. #define RCC_CIR_PLLRDYC RCC_CIR_PLLRDYC_Msk
  3957. #define RCC_CIR_PLLI2SRDYC_Pos (21U)
  3958. #define RCC_CIR_PLLI2SRDYC_Msk (0x1U << RCC_CIR_PLLI2SRDYC_Pos) /*!< 0x00200000 */
  3959. #define RCC_CIR_PLLI2SRDYC RCC_CIR_PLLI2SRDYC_Msk
  3960. #define RCC_CIR_CSSC_Pos (23U)
  3961. #define RCC_CIR_CSSC_Msk (0x1U << RCC_CIR_CSSC_Pos) /*!< 0x00800000 */
  3962. #define RCC_CIR_CSSC RCC_CIR_CSSC_Msk
  3963. /******************** Bit definition for RCC_AHB1RSTR register **************/
  3964. #define RCC_AHB1RSTR_GPIOARST_Pos (0U)
  3965. #define RCC_AHB1RSTR_GPIOARST_Msk (0x1U << RCC_AHB1RSTR_GPIOARST_Pos) /*!< 0x00000001 */
  3966. #define RCC_AHB1RSTR_GPIOARST RCC_AHB1RSTR_GPIOARST_Msk
  3967. #define RCC_AHB1RSTR_GPIOBRST_Pos (1U)
  3968. #define RCC_AHB1RSTR_GPIOBRST_Msk (0x1U << RCC_AHB1RSTR_GPIOBRST_Pos) /*!< 0x00000002 */
  3969. #define RCC_AHB1RSTR_GPIOBRST RCC_AHB1RSTR_GPIOBRST_Msk
  3970. #define RCC_AHB1RSTR_GPIOCRST_Pos (2U)
  3971. #define RCC_AHB1RSTR_GPIOCRST_Msk (0x1U << RCC_AHB1RSTR_GPIOCRST_Pos) /*!< 0x00000004 */
  3972. #define RCC_AHB1RSTR_GPIOCRST RCC_AHB1RSTR_GPIOCRST_Msk
  3973. #define RCC_AHB1RSTR_GPIODRST_Pos (3U)
  3974. #define RCC_AHB1RSTR_GPIODRST_Msk (0x1U << RCC_AHB1RSTR_GPIODRST_Pos) /*!< 0x00000008 */
  3975. #define RCC_AHB1RSTR_GPIODRST RCC_AHB1RSTR_GPIODRST_Msk
  3976. #define RCC_AHB1RSTR_GPIOERST_Pos (4U)
  3977. #define RCC_AHB1RSTR_GPIOERST_Msk (0x1U << RCC_AHB1RSTR_GPIOERST_Pos) /*!< 0x00000010 */
  3978. #define RCC_AHB1RSTR_GPIOERST RCC_AHB1RSTR_GPIOERST_Msk
  3979. #define RCC_AHB1RSTR_GPIOHRST_Pos (7U)
  3980. #define RCC_AHB1RSTR_GPIOHRST_Msk (0x1U << RCC_AHB1RSTR_GPIOHRST_Pos) /*!< 0x00000080 */
  3981. #define RCC_AHB1RSTR_GPIOHRST RCC_AHB1RSTR_GPIOHRST_Msk
  3982. #define RCC_AHB1RSTR_CRCRST_Pos (12U)
  3983. #define RCC_AHB1RSTR_CRCRST_Msk (0x1U << RCC_AHB1RSTR_CRCRST_Pos) /*!< 0x00001000 */
  3984. #define RCC_AHB1RSTR_CRCRST RCC_AHB1RSTR_CRCRST_Msk
  3985. #define RCC_AHB1RSTR_DMA1RST_Pos (21U)
  3986. #define RCC_AHB1RSTR_DMA1RST_Msk (0x1U << RCC_AHB1RSTR_DMA1RST_Pos) /*!< 0x00200000 */
  3987. #define RCC_AHB1RSTR_DMA1RST RCC_AHB1RSTR_DMA1RST_Msk
  3988. #define RCC_AHB1RSTR_DMA2RST_Pos (22U)
  3989. #define RCC_AHB1RSTR_DMA2RST_Msk (0x1U << RCC_AHB1RSTR_DMA2RST_Pos) /*!< 0x00400000 */
  3990. #define RCC_AHB1RSTR_DMA2RST RCC_AHB1RSTR_DMA2RST_Msk
  3991. /******************** Bit definition for RCC_AHB2RSTR register **************/
  3992. #define RCC_AHB2RSTR_OTGFSRST_Pos (7U)
  3993. #define RCC_AHB2RSTR_OTGFSRST_Msk (0x1U << RCC_AHB2RSTR_OTGFSRST_Pos) /*!< 0x00000080 */
  3994. #define RCC_AHB2RSTR_OTGFSRST RCC_AHB2RSTR_OTGFSRST_Msk
  3995. /******************** Bit definition for RCC_AHB3RSTR register **************/
  3996. /******************** Bit definition for RCC_APB1RSTR register **************/
  3997. #define RCC_APB1RSTR_TIM2RST_Pos (0U)
  3998. #define RCC_APB1RSTR_TIM2RST_Msk (0x1U << RCC_APB1RSTR_TIM2RST_Pos) /*!< 0x00000001 */
  3999. #define RCC_APB1RSTR_TIM2RST RCC_APB1RSTR_TIM2RST_Msk
  4000. #define RCC_APB1RSTR_TIM3RST_Pos (1U)
  4001. #define RCC_APB1RSTR_TIM3RST_Msk (0x1U << RCC_APB1RSTR_TIM3RST_Pos) /*!< 0x00000002 */
  4002. #define RCC_APB1RSTR_TIM3RST RCC_APB1RSTR_TIM3RST_Msk
  4003. #define RCC_APB1RSTR_TIM4RST_Pos (2U)
  4004. #define RCC_APB1RSTR_TIM4RST_Msk (0x1U << RCC_APB1RSTR_TIM4RST_Pos) /*!< 0x00000004 */
  4005. #define RCC_APB1RSTR_TIM4RST RCC_APB1RSTR_TIM4RST_Msk
  4006. #define RCC_APB1RSTR_TIM5RST_Pos (3U)
  4007. #define RCC_APB1RSTR_TIM5RST_Msk (0x1U << RCC_APB1RSTR_TIM5RST_Pos) /*!< 0x00000008 */
  4008. #define RCC_APB1RSTR_TIM5RST RCC_APB1RSTR_TIM5RST_Msk
  4009. #define RCC_APB1RSTR_WWDGRST_Pos (11U)
  4010. #define RCC_APB1RSTR_WWDGRST_Msk (0x1U << RCC_APB1RSTR_WWDGRST_Pos) /*!< 0x00000800 */
  4011. #define RCC_APB1RSTR_WWDGRST RCC_APB1RSTR_WWDGRST_Msk
  4012. #define RCC_APB1RSTR_SPI2RST_Pos (14U)
  4013. #define RCC_APB1RSTR_SPI2RST_Msk (0x1U << RCC_APB1RSTR_SPI2RST_Pos) /*!< 0x00004000 */
  4014. #define RCC_APB1RSTR_SPI2RST RCC_APB1RSTR_SPI2RST_Msk
  4015. #define RCC_APB1RSTR_SPI3RST_Pos (15U)
  4016. #define RCC_APB1RSTR_SPI3RST_Msk (0x1U << RCC_APB1RSTR_SPI3RST_Pos) /*!< 0x00008000 */
  4017. #define RCC_APB1RSTR_SPI3RST RCC_APB1RSTR_SPI3RST_Msk
  4018. #define RCC_APB1RSTR_USART2RST_Pos (17U)
  4019. #define RCC_APB1RSTR_USART2RST_Msk (0x1U << RCC_APB1RSTR_USART2RST_Pos) /*!< 0x00020000 */
  4020. #define RCC_APB1RSTR_USART2RST RCC_APB1RSTR_USART2RST_Msk
  4021. #define RCC_APB1RSTR_I2C1RST_Pos (21U)
  4022. #define RCC_APB1RSTR_I2C1RST_Msk (0x1U << RCC_APB1RSTR_I2C1RST_Pos) /*!< 0x00200000 */
  4023. #define RCC_APB1RSTR_I2C1RST RCC_APB1RSTR_I2C1RST_Msk
  4024. #define RCC_APB1RSTR_I2C2RST_Pos (22U)
  4025. #define RCC_APB1RSTR_I2C2RST_Msk (0x1U << RCC_APB1RSTR_I2C2RST_Pos) /*!< 0x00400000 */
  4026. #define RCC_APB1RSTR_I2C2RST RCC_APB1RSTR_I2C2RST_Msk
  4027. #define RCC_APB1RSTR_I2C3RST_Pos (23U)
  4028. #define RCC_APB1RSTR_I2C3RST_Msk (0x1U << RCC_APB1RSTR_I2C3RST_Pos) /*!< 0x00800000 */
  4029. #define RCC_APB1RSTR_I2C3RST RCC_APB1RSTR_I2C3RST_Msk
  4030. #define RCC_APB1RSTR_PWRRST_Pos (28U)
  4031. #define RCC_APB1RSTR_PWRRST_Msk (0x1U << RCC_APB1RSTR_PWRRST_Pos) /*!< 0x10000000 */
  4032. #define RCC_APB1RSTR_PWRRST RCC_APB1RSTR_PWRRST_Msk
  4033. /******************** Bit definition for RCC_APB2RSTR register **************/
  4034. #define RCC_APB2RSTR_TIM1RST_Pos (0U)
  4035. #define RCC_APB2RSTR_TIM1RST_Msk (0x1U << RCC_APB2RSTR_TIM1RST_Pos) /*!< 0x00000001 */
  4036. #define RCC_APB2RSTR_TIM1RST RCC_APB2RSTR_TIM1RST_Msk
  4037. #define RCC_APB2RSTR_USART1RST_Pos (4U)
  4038. #define RCC_APB2RSTR_USART1RST_Msk (0x1U << RCC_APB2RSTR_USART1RST_Pos) /*!< 0x00000010 */
  4039. #define RCC_APB2RSTR_USART1RST RCC_APB2RSTR_USART1RST_Msk
  4040. #define RCC_APB2RSTR_USART6RST_Pos (5U)
  4041. #define RCC_APB2RSTR_USART6RST_Msk (0x1U << RCC_APB2RSTR_USART6RST_Pos) /*!< 0x00000020 */
  4042. #define RCC_APB2RSTR_USART6RST RCC_APB2RSTR_USART6RST_Msk
  4043. #define RCC_APB2RSTR_ADCRST_Pos (8U)
  4044. #define RCC_APB2RSTR_ADCRST_Msk (0x1U << RCC_APB2RSTR_ADCRST_Pos) /*!< 0x00000100 */
  4045. #define RCC_APB2RSTR_ADCRST RCC_APB2RSTR_ADCRST_Msk
  4046. #define RCC_APB2RSTR_SDIORST_Pos (11U)
  4047. #define RCC_APB2RSTR_SDIORST_Msk (0x1U << RCC_APB2RSTR_SDIORST_Pos) /*!< 0x00000800 */
  4048. #define RCC_APB2RSTR_SDIORST RCC_APB2RSTR_SDIORST_Msk
  4049. #define RCC_APB2RSTR_SPI1RST_Pos (12U)
  4050. #define RCC_APB2RSTR_SPI1RST_Msk (0x1U << RCC_APB2RSTR_SPI1RST_Pos) /*!< 0x00001000 */
  4051. #define RCC_APB2RSTR_SPI1RST RCC_APB2RSTR_SPI1RST_Msk
  4052. #define RCC_APB2RSTR_SPI4RST_Pos (13U)
  4053. #define RCC_APB2RSTR_SPI4RST_Msk (0x1U << RCC_APB2RSTR_SPI4RST_Pos) /*!< 0x00002000 */
  4054. #define RCC_APB2RSTR_SPI4RST RCC_APB2RSTR_SPI4RST_Msk
  4055. #define RCC_APB2RSTR_SYSCFGRST_Pos (14U)
  4056. #define RCC_APB2RSTR_SYSCFGRST_Msk (0x1U << RCC_APB2RSTR_SYSCFGRST_Pos) /*!< 0x00004000 */
  4057. #define RCC_APB2RSTR_SYSCFGRST RCC_APB2RSTR_SYSCFGRST_Msk
  4058. #define RCC_APB2RSTR_TIM9RST_Pos (16U)
  4059. #define RCC_APB2RSTR_TIM9RST_Msk (0x1U << RCC_APB2RSTR_TIM9RST_Pos) /*!< 0x00010000 */
  4060. #define RCC_APB2RSTR_TIM9RST RCC_APB2RSTR_TIM9RST_Msk
  4061. #define RCC_APB2RSTR_TIM10RST_Pos (17U)
  4062. #define RCC_APB2RSTR_TIM10RST_Msk (0x1U << RCC_APB2RSTR_TIM10RST_Pos) /*!< 0x00020000 */
  4063. #define RCC_APB2RSTR_TIM10RST RCC_APB2RSTR_TIM10RST_Msk
  4064. #define RCC_APB2RSTR_TIM11RST_Pos (18U)
  4065. #define RCC_APB2RSTR_TIM11RST_Msk (0x1U << RCC_APB2RSTR_TIM11RST_Pos) /*!< 0x00040000 */
  4066. #define RCC_APB2RSTR_TIM11RST RCC_APB2RSTR_TIM11RST_Msk
  4067. #define RCC_APB2RSTR_SPI5RST_Pos (20U)
  4068. #define RCC_APB2RSTR_SPI5RST_Msk (0x1U << RCC_APB2RSTR_SPI5RST_Pos) /*!< 0x00100000 */
  4069. #define RCC_APB2RSTR_SPI5RST RCC_APB2RSTR_SPI5RST_Msk
  4070. /* Old SPI1RST bit definition, maintained for legacy purpose */
  4071. #define RCC_APB2RSTR_SPI1 RCC_APB2RSTR_SPI1RST
  4072. /******************** Bit definition for RCC_AHB1ENR register ***************/
  4073. #define RCC_AHB1ENR_GPIOAEN_Pos (0U)
  4074. #define RCC_AHB1ENR_GPIOAEN_Msk (0x1U << RCC_AHB1ENR_GPIOAEN_Pos) /*!< 0x00000001 */
  4075. #define RCC_AHB1ENR_GPIOAEN RCC_AHB1ENR_GPIOAEN_Msk
  4076. #define RCC_AHB1ENR_GPIOBEN_Pos (1U)
  4077. #define RCC_AHB1ENR_GPIOBEN_Msk (0x1U << RCC_AHB1ENR_GPIOBEN_Pos) /*!< 0x00000002 */
  4078. #define RCC_AHB1ENR_GPIOBEN RCC_AHB1ENR_GPIOBEN_Msk
  4079. #define RCC_AHB1ENR_GPIOCEN_Pos (2U)
  4080. #define RCC_AHB1ENR_GPIOCEN_Msk (0x1U << RCC_AHB1ENR_GPIOCEN_Pos) /*!< 0x00000004 */
  4081. #define RCC_AHB1ENR_GPIOCEN RCC_AHB1ENR_GPIOCEN_Msk
  4082. #define RCC_AHB1ENR_GPIODEN_Pos (3U)
  4083. #define RCC_AHB1ENR_GPIODEN_Msk (0x1U << RCC_AHB1ENR_GPIODEN_Pos) /*!< 0x00000008 */
  4084. #define RCC_AHB1ENR_GPIODEN RCC_AHB1ENR_GPIODEN_Msk
  4085. #define RCC_AHB1ENR_GPIOEEN_Pos (4U)
  4086. #define RCC_AHB1ENR_GPIOEEN_Msk (0x1U << RCC_AHB1ENR_GPIOEEN_Pos) /*!< 0x00000010 */
  4087. #define RCC_AHB1ENR_GPIOEEN RCC_AHB1ENR_GPIOEEN_Msk
  4088. #define RCC_AHB1ENR_GPIOHEN_Pos (7U)
  4089. #define RCC_AHB1ENR_GPIOHEN_Msk (0x1U << RCC_AHB1ENR_GPIOHEN_Pos) /*!< 0x00000080 */
  4090. #define RCC_AHB1ENR_GPIOHEN RCC_AHB1ENR_GPIOHEN_Msk
  4091. #define RCC_AHB1ENR_CRCEN_Pos (12U)
  4092. #define RCC_AHB1ENR_CRCEN_Msk (0x1U << RCC_AHB1ENR_CRCEN_Pos) /*!< 0x00001000 */
  4093. #define RCC_AHB1ENR_CRCEN RCC_AHB1ENR_CRCEN_Msk
  4094. #define RCC_AHB1ENR_DMA1EN_Pos (21U)
  4095. #define RCC_AHB1ENR_DMA1EN_Msk (0x1U << RCC_AHB1ENR_DMA1EN_Pos) /*!< 0x00200000 */
  4096. #define RCC_AHB1ENR_DMA1EN RCC_AHB1ENR_DMA1EN_Msk
  4097. #define RCC_AHB1ENR_DMA2EN_Pos (22U)
  4098. #define RCC_AHB1ENR_DMA2EN_Msk (0x1U << RCC_AHB1ENR_DMA2EN_Pos) /*!< 0x00400000 */
  4099. #define RCC_AHB1ENR_DMA2EN RCC_AHB1ENR_DMA2EN_Msk
  4100. /******************** Bit definition for RCC_AHB2ENR register ***************/
  4101. /*
  4102. * @brief Specific device feature definitions (not present on all devices in the STM32F4 serie)
  4103. */
  4104. #define RCC_AHB2_SUPPORT /*!< AHB2 Bus is supported */
  4105. #define RCC_AHB2ENR_OTGFSEN_Pos (7U)
  4106. #define RCC_AHB2ENR_OTGFSEN_Msk (0x1U << RCC_AHB2ENR_OTGFSEN_Pos) /*!< 0x00000080 */
  4107. #define RCC_AHB2ENR_OTGFSEN RCC_AHB2ENR_OTGFSEN_Msk
  4108. /******************** Bit definition for RCC_APB1ENR register ***************/
  4109. #define RCC_APB1ENR_TIM2EN_Pos (0U)
  4110. #define RCC_APB1ENR_TIM2EN_Msk (0x1U << RCC_APB1ENR_TIM2EN_Pos) /*!< 0x00000001 */
  4111. #define RCC_APB1ENR_TIM2EN RCC_APB1ENR_TIM2EN_Msk
  4112. #define RCC_APB1ENR_TIM3EN_Pos (1U)
  4113. #define RCC_APB1ENR_TIM3EN_Msk (0x1U << RCC_APB1ENR_TIM3EN_Pos) /*!< 0x00000002 */
  4114. #define RCC_APB1ENR_TIM3EN RCC_APB1ENR_TIM3EN_Msk
  4115. #define RCC_APB1ENR_TIM4EN_Pos (2U)
  4116. #define RCC_APB1ENR_TIM4EN_Msk (0x1U << RCC_APB1ENR_TIM4EN_Pos) /*!< 0x00000004 */
  4117. #define RCC_APB1ENR_TIM4EN RCC_APB1ENR_TIM4EN_Msk
  4118. #define RCC_APB1ENR_TIM5EN_Pos (3U)
  4119. #define RCC_APB1ENR_TIM5EN_Msk (0x1U << RCC_APB1ENR_TIM5EN_Pos) /*!< 0x00000008 */
  4120. #define RCC_APB1ENR_TIM5EN RCC_APB1ENR_TIM5EN_Msk
  4121. #define RCC_APB1ENR_WWDGEN_Pos (11U)
  4122. #define RCC_APB1ENR_WWDGEN_Msk (0x1U << RCC_APB1ENR_WWDGEN_Pos) /*!< 0x00000800 */
  4123. #define RCC_APB1ENR_WWDGEN RCC_APB1ENR_WWDGEN_Msk
  4124. #define RCC_APB1ENR_SPI2EN_Pos (14U)
  4125. #define RCC_APB1ENR_SPI2EN_Msk (0x1U << RCC_APB1ENR_SPI2EN_Pos) /*!< 0x00004000 */
  4126. #define RCC_APB1ENR_SPI2EN RCC_APB1ENR_SPI2EN_Msk
  4127. #define RCC_APB1ENR_SPI3EN_Pos (15U)
  4128. #define RCC_APB1ENR_SPI3EN_Msk (0x1U << RCC_APB1ENR_SPI3EN_Pos) /*!< 0x00008000 */
  4129. #define RCC_APB1ENR_SPI3EN RCC_APB1ENR_SPI3EN_Msk
  4130. #define RCC_APB1ENR_USART2EN_Pos (17U)
  4131. #define RCC_APB1ENR_USART2EN_Msk (0x1U << RCC_APB1ENR_USART2EN_Pos) /*!< 0x00020000 */
  4132. #define RCC_APB1ENR_USART2EN RCC_APB1ENR_USART2EN_Msk
  4133. #define RCC_APB1ENR_I2C1EN_Pos (21U)
  4134. #define RCC_APB1ENR_I2C1EN_Msk (0x1U << RCC_APB1ENR_I2C1EN_Pos) /*!< 0x00200000 */
  4135. #define RCC_APB1ENR_I2C1EN RCC_APB1ENR_I2C1EN_Msk
  4136. #define RCC_APB1ENR_I2C2EN_Pos (22U)
  4137. #define RCC_APB1ENR_I2C2EN_Msk (0x1U << RCC_APB1ENR_I2C2EN_Pos) /*!< 0x00400000 */
  4138. #define RCC_APB1ENR_I2C2EN RCC_APB1ENR_I2C2EN_Msk
  4139. #define RCC_APB1ENR_I2C3EN_Pos (23U)
  4140. #define RCC_APB1ENR_I2C3EN_Msk (0x1U << RCC_APB1ENR_I2C3EN_Pos) /*!< 0x00800000 */
  4141. #define RCC_APB1ENR_I2C3EN RCC_APB1ENR_I2C3EN_Msk
  4142. #define RCC_APB1ENR_PWREN_Pos (28U)
  4143. #define RCC_APB1ENR_PWREN_Msk (0x1U << RCC_APB1ENR_PWREN_Pos) /*!< 0x10000000 */
  4144. #define RCC_APB1ENR_PWREN RCC_APB1ENR_PWREN_Msk
  4145. /******************** Bit definition for RCC_APB2ENR register ***************/
  4146. #define RCC_APB2ENR_TIM1EN_Pos (0U)
  4147. #define RCC_APB2ENR_TIM1EN_Msk (0x1U << RCC_APB2ENR_TIM1EN_Pos) /*!< 0x00000001 */
  4148. #define RCC_APB2ENR_TIM1EN RCC_APB2ENR_TIM1EN_Msk
  4149. #define RCC_APB2ENR_USART1EN_Pos (4U)
  4150. #define RCC_APB2ENR_USART1EN_Msk (0x1U << RCC_APB2ENR_USART1EN_Pos) /*!< 0x00000010 */
  4151. #define RCC_APB2ENR_USART1EN RCC_APB2ENR_USART1EN_Msk
  4152. #define RCC_APB2ENR_USART6EN_Pos (5U)
  4153. #define RCC_APB2ENR_USART6EN_Msk (0x1U << RCC_APB2ENR_USART6EN_Pos) /*!< 0x00000020 */
  4154. #define RCC_APB2ENR_USART6EN RCC_APB2ENR_USART6EN_Msk
  4155. #define RCC_APB2ENR_ADC1EN_Pos (8U)
  4156. #define RCC_APB2ENR_ADC1EN_Msk (0x1U << RCC_APB2ENR_ADC1EN_Pos) /*!< 0x00000100 */
  4157. #define RCC_APB2ENR_ADC1EN RCC_APB2ENR_ADC1EN_Msk
  4158. #define RCC_APB2ENR_SDIOEN_Pos (11U)
  4159. #define RCC_APB2ENR_SDIOEN_Msk (0x1U << RCC_APB2ENR_SDIOEN_Pos) /*!< 0x00000800 */
  4160. #define RCC_APB2ENR_SDIOEN RCC_APB2ENR_SDIOEN_Msk
  4161. #define RCC_APB2ENR_SPI1EN_Pos (12U)
  4162. #define RCC_APB2ENR_SPI1EN_Msk (0x1U << RCC_APB2ENR_SPI1EN_Pos) /*!< 0x00001000 */
  4163. #define RCC_APB2ENR_SPI1EN RCC_APB2ENR_SPI1EN_Msk
  4164. #define RCC_APB2ENR_SPI4EN_Pos (13U)
  4165. #define RCC_APB2ENR_SPI4EN_Msk (0x1U << RCC_APB2ENR_SPI4EN_Pos) /*!< 0x00002000 */
  4166. #define RCC_APB2ENR_SPI4EN RCC_APB2ENR_SPI4EN_Msk
  4167. #define RCC_APB2ENR_SYSCFGEN_Pos (14U)
  4168. #define RCC_APB2ENR_SYSCFGEN_Msk (0x1U << RCC_APB2ENR_SYSCFGEN_Pos) /*!< 0x00004000 */
  4169. #define RCC_APB2ENR_SYSCFGEN RCC_APB2ENR_SYSCFGEN_Msk
  4170. #define RCC_APB2ENR_TIM9EN_Pos (16U)
  4171. #define RCC_APB2ENR_TIM9EN_Msk (0x1U << RCC_APB2ENR_TIM9EN_Pos) /*!< 0x00010000 */
  4172. #define RCC_APB2ENR_TIM9EN RCC_APB2ENR_TIM9EN_Msk
  4173. #define RCC_APB2ENR_TIM10EN_Pos (17U)
  4174. #define RCC_APB2ENR_TIM10EN_Msk (0x1U << RCC_APB2ENR_TIM10EN_Pos) /*!< 0x00020000 */
  4175. #define RCC_APB2ENR_TIM10EN RCC_APB2ENR_TIM10EN_Msk
  4176. #define RCC_APB2ENR_TIM11EN_Pos (18U)
  4177. #define RCC_APB2ENR_TIM11EN_Msk (0x1U << RCC_APB2ENR_TIM11EN_Pos) /*!< 0x00040000 */
  4178. #define RCC_APB2ENR_TIM11EN RCC_APB2ENR_TIM11EN_Msk
  4179. #define RCC_APB2ENR_SPI5EN_Pos (20U)
  4180. #define RCC_APB2ENR_SPI5EN_Msk (0x1U << RCC_APB2ENR_SPI5EN_Pos) /*!< 0x00100000 */
  4181. #define RCC_APB2ENR_SPI5EN RCC_APB2ENR_SPI5EN_Msk
  4182. /******************** Bit definition for RCC_AHB1LPENR register *************/
  4183. #define RCC_AHB1LPENR_GPIOALPEN_Pos (0U)
  4184. #define RCC_AHB1LPENR_GPIOALPEN_Msk (0x1U << RCC_AHB1LPENR_GPIOALPEN_Pos) /*!< 0x00000001 */
  4185. #define RCC_AHB1LPENR_GPIOALPEN RCC_AHB1LPENR_GPIOALPEN_Msk
  4186. #define RCC_AHB1LPENR_GPIOBLPEN_Pos (1U)
  4187. #define RCC_AHB1LPENR_GPIOBLPEN_Msk (0x1U << RCC_AHB1LPENR_GPIOBLPEN_Pos) /*!< 0x00000002 */
  4188. #define RCC_AHB1LPENR_GPIOBLPEN RCC_AHB1LPENR_GPIOBLPEN_Msk
  4189. #define RCC_AHB1LPENR_GPIOCLPEN_Pos (2U)
  4190. #define RCC_AHB1LPENR_GPIOCLPEN_Msk (0x1U << RCC_AHB1LPENR_GPIOCLPEN_Pos) /*!< 0x00000004 */
  4191. #define RCC_AHB1LPENR_GPIOCLPEN RCC_AHB1LPENR_GPIOCLPEN_Msk
  4192. #define RCC_AHB1LPENR_GPIODLPEN_Pos (3U)
  4193. #define RCC_AHB1LPENR_GPIODLPEN_Msk (0x1U << RCC_AHB1LPENR_GPIODLPEN_Pos) /*!< 0x00000008 */
  4194. #define RCC_AHB1LPENR_GPIODLPEN RCC_AHB1LPENR_GPIODLPEN_Msk
  4195. #define RCC_AHB1LPENR_GPIOELPEN_Pos (4U)
  4196. #define RCC_AHB1LPENR_GPIOELPEN_Msk (0x1U << RCC_AHB1LPENR_GPIOELPEN_Pos) /*!< 0x00000010 */
  4197. #define RCC_AHB1LPENR_GPIOELPEN RCC_AHB1LPENR_GPIOELPEN_Msk
  4198. #define RCC_AHB1LPENR_GPIOHLPEN_Pos (7U)
  4199. #define RCC_AHB1LPENR_GPIOHLPEN_Msk (0x1U << RCC_AHB1LPENR_GPIOHLPEN_Pos) /*!< 0x00000080 */
  4200. #define RCC_AHB1LPENR_GPIOHLPEN RCC_AHB1LPENR_GPIOHLPEN_Msk
  4201. #define RCC_AHB1LPENR_CRCLPEN_Pos (12U)
  4202. #define RCC_AHB1LPENR_CRCLPEN_Msk (0x1U << RCC_AHB1LPENR_CRCLPEN_Pos) /*!< 0x00001000 */
  4203. #define RCC_AHB1LPENR_CRCLPEN RCC_AHB1LPENR_CRCLPEN_Msk
  4204. #define RCC_AHB1LPENR_FLITFLPEN_Pos (15U)
  4205. #define RCC_AHB1LPENR_FLITFLPEN_Msk (0x1U << RCC_AHB1LPENR_FLITFLPEN_Pos) /*!< 0x00008000 */
  4206. #define RCC_AHB1LPENR_FLITFLPEN RCC_AHB1LPENR_FLITFLPEN_Msk
  4207. #define RCC_AHB1LPENR_SRAM1LPEN_Pos (16U)
  4208. #define RCC_AHB1LPENR_SRAM1LPEN_Msk (0x1U << RCC_AHB1LPENR_SRAM1LPEN_Pos) /*!< 0x00010000 */
  4209. #define RCC_AHB1LPENR_SRAM1LPEN RCC_AHB1LPENR_SRAM1LPEN_Msk
  4210. #define RCC_AHB1LPENR_DMA1LPEN_Pos (21U)
  4211. #define RCC_AHB1LPENR_DMA1LPEN_Msk (0x1U << RCC_AHB1LPENR_DMA1LPEN_Pos) /*!< 0x00200000 */
  4212. #define RCC_AHB1LPENR_DMA1LPEN RCC_AHB1LPENR_DMA1LPEN_Msk
  4213. #define RCC_AHB1LPENR_DMA2LPEN_Pos (22U)
  4214. #define RCC_AHB1LPENR_DMA2LPEN_Msk (0x1U << RCC_AHB1LPENR_DMA2LPEN_Pos) /*!< 0x00400000 */
  4215. #define RCC_AHB1LPENR_DMA2LPEN RCC_AHB1LPENR_DMA2LPEN_Msk
  4216. /******************** Bit definition for RCC_AHB2LPENR register *************/
  4217. #define RCC_AHB2LPENR_OTGFSLPEN_Pos (7U)
  4218. #define RCC_AHB2LPENR_OTGFSLPEN_Msk (0x1U << RCC_AHB2LPENR_OTGFSLPEN_Pos) /*!< 0x00000080 */
  4219. #define RCC_AHB2LPENR_OTGFSLPEN RCC_AHB2LPENR_OTGFSLPEN_Msk
  4220. /******************** Bit definition for RCC_AHB3LPENR register *************/
  4221. /******************** Bit definition for RCC_APB1LPENR register *************/
  4222. #define RCC_APB1LPENR_TIM2LPEN_Pos (0U)
  4223. #define RCC_APB1LPENR_TIM2LPEN_Msk (0x1U << RCC_APB1LPENR_TIM2LPEN_Pos) /*!< 0x00000001 */
  4224. #define RCC_APB1LPENR_TIM2LPEN RCC_APB1LPENR_TIM2LPEN_Msk
  4225. #define RCC_APB1LPENR_TIM3LPEN_Pos (1U)
  4226. #define RCC_APB1LPENR_TIM3LPEN_Msk (0x1U << RCC_APB1LPENR_TIM3LPEN_Pos) /*!< 0x00000002 */
  4227. #define RCC_APB1LPENR_TIM3LPEN RCC_APB1LPENR_TIM3LPEN_Msk
  4228. #define RCC_APB1LPENR_TIM4LPEN_Pos (2U)
  4229. #define RCC_APB1LPENR_TIM4LPEN_Msk (0x1U << RCC_APB1LPENR_TIM4LPEN_Pos) /*!< 0x00000004 */
  4230. #define RCC_APB1LPENR_TIM4LPEN RCC_APB1LPENR_TIM4LPEN_Msk
  4231. #define RCC_APB1LPENR_TIM5LPEN_Pos (3U)
  4232. #define RCC_APB1LPENR_TIM5LPEN_Msk (0x1U << RCC_APB1LPENR_TIM5LPEN_Pos) /*!< 0x00000008 */
  4233. #define RCC_APB1LPENR_TIM5LPEN RCC_APB1LPENR_TIM5LPEN_Msk
  4234. #define RCC_APB1LPENR_WWDGLPEN_Pos (11U)
  4235. #define RCC_APB1LPENR_WWDGLPEN_Msk (0x1U << RCC_APB1LPENR_WWDGLPEN_Pos) /*!< 0x00000800 */
  4236. #define RCC_APB1LPENR_WWDGLPEN RCC_APB1LPENR_WWDGLPEN_Msk
  4237. #define RCC_APB1LPENR_SPI2LPEN_Pos (14U)
  4238. #define RCC_APB1LPENR_SPI2LPEN_Msk (0x1U << RCC_APB1LPENR_SPI2LPEN_Pos) /*!< 0x00004000 */
  4239. #define RCC_APB1LPENR_SPI2LPEN RCC_APB1LPENR_SPI2LPEN_Msk
  4240. #define RCC_APB1LPENR_SPI3LPEN_Pos (15U)
  4241. #define RCC_APB1LPENR_SPI3LPEN_Msk (0x1U << RCC_APB1LPENR_SPI3LPEN_Pos) /*!< 0x00008000 */
  4242. #define RCC_APB1LPENR_SPI3LPEN RCC_APB1LPENR_SPI3LPEN_Msk
  4243. #define RCC_APB1LPENR_USART2LPEN_Pos (17U)
  4244. #define RCC_APB1LPENR_USART2LPEN_Msk (0x1U << RCC_APB1LPENR_USART2LPEN_Pos) /*!< 0x00020000 */
  4245. #define RCC_APB1LPENR_USART2LPEN RCC_APB1LPENR_USART2LPEN_Msk
  4246. #define RCC_APB1LPENR_I2C1LPEN_Pos (21U)
  4247. #define RCC_APB1LPENR_I2C1LPEN_Msk (0x1U << RCC_APB1LPENR_I2C1LPEN_Pos) /*!< 0x00200000 */
  4248. #define RCC_APB1LPENR_I2C1LPEN RCC_APB1LPENR_I2C1LPEN_Msk
  4249. #define RCC_APB1LPENR_I2C2LPEN_Pos (22U)
  4250. #define RCC_APB1LPENR_I2C2LPEN_Msk (0x1U << RCC_APB1LPENR_I2C2LPEN_Pos) /*!< 0x00400000 */
  4251. #define RCC_APB1LPENR_I2C2LPEN RCC_APB1LPENR_I2C2LPEN_Msk
  4252. #define RCC_APB1LPENR_I2C3LPEN_Pos (23U)
  4253. #define RCC_APB1LPENR_I2C3LPEN_Msk (0x1U << RCC_APB1LPENR_I2C3LPEN_Pos) /*!< 0x00800000 */
  4254. #define RCC_APB1LPENR_I2C3LPEN RCC_APB1LPENR_I2C3LPEN_Msk
  4255. #define RCC_APB1LPENR_PWRLPEN_Pos (28U)
  4256. #define RCC_APB1LPENR_PWRLPEN_Msk (0x1U << RCC_APB1LPENR_PWRLPEN_Pos) /*!< 0x10000000 */
  4257. #define RCC_APB1LPENR_PWRLPEN RCC_APB1LPENR_PWRLPEN_Msk
  4258. /******************** Bit definition for RCC_APB2LPENR register *************/
  4259. #define RCC_APB2LPENR_TIM1LPEN_Pos (0U)
  4260. #define RCC_APB2LPENR_TIM1LPEN_Msk (0x1U << RCC_APB2LPENR_TIM1LPEN_Pos) /*!< 0x00000001 */
  4261. #define RCC_APB2LPENR_TIM1LPEN RCC_APB2LPENR_TIM1LPEN_Msk
  4262. #define RCC_APB2LPENR_USART1LPEN_Pos (4U)
  4263. #define RCC_APB2LPENR_USART1LPEN_Msk (0x1U << RCC_APB2LPENR_USART1LPEN_Pos) /*!< 0x00000010 */
  4264. #define RCC_APB2LPENR_USART1LPEN RCC_APB2LPENR_USART1LPEN_Msk
  4265. #define RCC_APB2LPENR_USART6LPEN_Pos (5U)
  4266. #define RCC_APB2LPENR_USART6LPEN_Msk (0x1U << RCC_APB2LPENR_USART6LPEN_Pos) /*!< 0x00000020 */
  4267. #define RCC_APB2LPENR_USART6LPEN RCC_APB2LPENR_USART6LPEN_Msk
  4268. #define RCC_APB2LPENR_ADC1LPEN_Pos (8U)
  4269. #define RCC_APB2LPENR_ADC1LPEN_Msk (0x1U << RCC_APB2LPENR_ADC1LPEN_Pos) /*!< 0x00000100 */
  4270. #define RCC_APB2LPENR_ADC1LPEN RCC_APB2LPENR_ADC1LPEN_Msk
  4271. #define RCC_APB2LPENR_SDIOLPEN_Pos (11U)
  4272. #define RCC_APB2LPENR_SDIOLPEN_Msk (0x1U << RCC_APB2LPENR_SDIOLPEN_Pos) /*!< 0x00000800 */
  4273. #define RCC_APB2LPENR_SDIOLPEN RCC_APB2LPENR_SDIOLPEN_Msk
  4274. #define RCC_APB2LPENR_SPI1LPEN_Pos (12U)
  4275. #define RCC_APB2LPENR_SPI1LPEN_Msk (0x1U << RCC_APB2LPENR_SPI1LPEN_Pos) /*!< 0x00001000 */
  4276. #define RCC_APB2LPENR_SPI1LPEN RCC_APB2LPENR_SPI1LPEN_Msk
  4277. #define RCC_APB2LPENR_SPI4LPEN_Pos (13U)
  4278. #define RCC_APB2LPENR_SPI4LPEN_Msk (0x1U << RCC_APB2LPENR_SPI4LPEN_Pos) /*!< 0x00002000 */
  4279. #define RCC_APB2LPENR_SPI4LPEN RCC_APB2LPENR_SPI4LPEN_Msk
  4280. #define RCC_APB2LPENR_SYSCFGLPEN_Pos (14U)
  4281. #define RCC_APB2LPENR_SYSCFGLPEN_Msk (0x1U << RCC_APB2LPENR_SYSCFGLPEN_Pos) /*!< 0x00004000 */
  4282. #define RCC_APB2LPENR_SYSCFGLPEN RCC_APB2LPENR_SYSCFGLPEN_Msk
  4283. #define RCC_APB2LPENR_TIM9LPEN_Pos (16U)
  4284. #define RCC_APB2LPENR_TIM9LPEN_Msk (0x1U << RCC_APB2LPENR_TIM9LPEN_Pos) /*!< 0x00010000 */
  4285. #define RCC_APB2LPENR_TIM9LPEN RCC_APB2LPENR_TIM9LPEN_Msk
  4286. #define RCC_APB2LPENR_TIM10LPEN_Pos (17U)
  4287. #define RCC_APB2LPENR_TIM10LPEN_Msk (0x1U << RCC_APB2LPENR_TIM10LPEN_Pos) /*!< 0x00020000 */
  4288. #define RCC_APB2LPENR_TIM10LPEN RCC_APB2LPENR_TIM10LPEN_Msk
  4289. #define RCC_APB2LPENR_TIM11LPEN_Pos (18U)
  4290. #define RCC_APB2LPENR_TIM11LPEN_Msk (0x1U << RCC_APB2LPENR_TIM11LPEN_Pos) /*!< 0x00040000 */
  4291. #define RCC_APB2LPENR_TIM11LPEN RCC_APB2LPENR_TIM11LPEN_Msk
  4292. #define RCC_APB2LPENR_SPI5LPEN_Pos (20U)
  4293. #define RCC_APB2LPENR_SPI5LPEN_Msk (0x1U << RCC_APB2LPENR_SPI5LPEN_Pos) /*!< 0x00100000 */
  4294. #define RCC_APB2LPENR_SPI5LPEN RCC_APB2LPENR_SPI5LPEN_Msk
  4295. /******************** Bit definition for RCC_BDCR register ******************/
  4296. #define RCC_BDCR_LSEON_Pos (0U)
  4297. #define RCC_BDCR_LSEON_Msk (0x1U << RCC_BDCR_LSEON_Pos) /*!< 0x00000001 */
  4298. #define RCC_BDCR_LSEON RCC_BDCR_LSEON_Msk
  4299. #define RCC_BDCR_LSERDY_Pos (1U)
  4300. #define RCC_BDCR_LSERDY_Msk (0x1U << RCC_BDCR_LSERDY_Pos) /*!< 0x00000002 */
  4301. #define RCC_BDCR_LSERDY RCC_BDCR_LSERDY_Msk
  4302. #define RCC_BDCR_LSEBYP_Pos (2U)
  4303. #define RCC_BDCR_LSEBYP_Msk (0x1U << RCC_BDCR_LSEBYP_Pos) /*!< 0x00000004 */
  4304. #define RCC_BDCR_LSEBYP RCC_BDCR_LSEBYP_Msk
  4305. #define RCC_BDCR_LSEMOD_Pos (3U)
  4306. #define RCC_BDCR_LSEMOD_Msk (0x1U << RCC_BDCR_LSEMOD_Pos) /*!< 0x00000008 */
  4307. #define RCC_BDCR_LSEMOD RCC_BDCR_LSEMOD_Msk
  4308. #define RCC_BDCR_RTCSEL_Pos (8U)
  4309. #define RCC_BDCR_RTCSEL_Msk (0x3U << RCC_BDCR_RTCSEL_Pos) /*!< 0x00000300 */
  4310. #define RCC_BDCR_RTCSEL RCC_BDCR_RTCSEL_Msk
  4311. #define RCC_BDCR_RTCSEL_0 (0x1U << RCC_BDCR_RTCSEL_Pos) /*!< 0x00000100 */
  4312. #define RCC_BDCR_RTCSEL_1 (0x2U << RCC_BDCR_RTCSEL_Pos) /*!< 0x00000200 */
  4313. #define RCC_BDCR_RTCEN_Pos (15U)
  4314. #define RCC_BDCR_RTCEN_Msk (0x1U << RCC_BDCR_RTCEN_Pos) /*!< 0x00008000 */
  4315. #define RCC_BDCR_RTCEN RCC_BDCR_RTCEN_Msk
  4316. #define RCC_BDCR_BDRST_Pos (16U)
  4317. #define RCC_BDCR_BDRST_Msk (0x1U << RCC_BDCR_BDRST_Pos) /*!< 0x00010000 */
  4318. #define RCC_BDCR_BDRST RCC_BDCR_BDRST_Msk
  4319. /******************** Bit definition for RCC_CSR register *******************/
  4320. #define RCC_CSR_LSION_Pos (0U)
  4321. #define RCC_CSR_LSION_Msk (0x1U << RCC_CSR_LSION_Pos) /*!< 0x00000001 */
  4322. #define RCC_CSR_LSION RCC_CSR_LSION_Msk
  4323. #define RCC_CSR_LSIRDY_Pos (1U)
  4324. #define RCC_CSR_LSIRDY_Msk (0x1U << RCC_CSR_LSIRDY_Pos) /*!< 0x00000002 */
  4325. #define RCC_CSR_LSIRDY RCC_CSR_LSIRDY_Msk
  4326. #define RCC_CSR_RMVF_Pos (24U)
  4327. #define RCC_CSR_RMVF_Msk (0x1U << RCC_CSR_RMVF_Pos) /*!< 0x01000000 */
  4328. #define RCC_CSR_RMVF RCC_CSR_RMVF_Msk
  4329. #define RCC_CSR_BORRSTF_Pos (25U)
  4330. #define RCC_CSR_BORRSTF_Msk (0x1U << RCC_CSR_BORRSTF_Pos) /*!< 0x02000000 */
  4331. #define RCC_CSR_BORRSTF RCC_CSR_BORRSTF_Msk
  4332. #define RCC_CSR_PINRSTF_Pos (26U)
  4333. #define RCC_CSR_PINRSTF_Msk (0x1U << RCC_CSR_PINRSTF_Pos) /*!< 0x04000000 */
  4334. #define RCC_CSR_PINRSTF RCC_CSR_PINRSTF_Msk
  4335. #define RCC_CSR_PORRSTF_Pos (27U)
  4336. #define RCC_CSR_PORRSTF_Msk (0x1U << RCC_CSR_PORRSTF_Pos) /*!< 0x08000000 */
  4337. #define RCC_CSR_PORRSTF RCC_CSR_PORRSTF_Msk
  4338. #define RCC_CSR_SFTRSTF_Pos (28U)
  4339. #define RCC_CSR_SFTRSTF_Msk (0x1U << RCC_CSR_SFTRSTF_Pos) /*!< 0x10000000 */
  4340. #define RCC_CSR_SFTRSTF RCC_CSR_SFTRSTF_Msk
  4341. #define RCC_CSR_IWDGRSTF_Pos (29U)
  4342. #define RCC_CSR_IWDGRSTF_Msk (0x1U << RCC_CSR_IWDGRSTF_Pos) /*!< 0x20000000 */
  4343. #define RCC_CSR_IWDGRSTF RCC_CSR_IWDGRSTF_Msk
  4344. #define RCC_CSR_WWDGRSTF_Pos (30U)
  4345. #define RCC_CSR_WWDGRSTF_Msk (0x1U << RCC_CSR_WWDGRSTF_Pos) /*!< 0x40000000 */
  4346. #define RCC_CSR_WWDGRSTF RCC_CSR_WWDGRSTF_Msk
  4347. #define RCC_CSR_LPWRRSTF_Pos (31U)
  4348. #define RCC_CSR_LPWRRSTF_Msk (0x1U << RCC_CSR_LPWRRSTF_Pos) /*!< 0x80000000 */
  4349. #define RCC_CSR_LPWRRSTF RCC_CSR_LPWRRSTF_Msk
  4350. /* Legacy defines */
  4351. #define RCC_CSR_PADRSTF RCC_CSR_PINRSTF
  4352. #define RCC_CSR_WDGRSTF RCC_CSR_IWDGRSTF
  4353. /******************** Bit definition for RCC_SSCGR register *****************/
  4354. #define RCC_SSCGR_MODPER_Pos (0U)
  4355. #define RCC_SSCGR_MODPER_Msk (0x1FFFU << RCC_SSCGR_MODPER_Pos) /*!< 0x00001FFF */
  4356. #define RCC_SSCGR_MODPER RCC_SSCGR_MODPER_Msk
  4357. #define RCC_SSCGR_INCSTEP_Pos (13U)
  4358. #define RCC_SSCGR_INCSTEP_Msk (0x7FFFU << RCC_SSCGR_INCSTEP_Pos) /*!< 0x0FFFE000 */
  4359. #define RCC_SSCGR_INCSTEP RCC_SSCGR_INCSTEP_Msk
  4360. #define RCC_SSCGR_SPREADSEL_Pos (30U)
  4361. #define RCC_SSCGR_SPREADSEL_Msk (0x1U << RCC_SSCGR_SPREADSEL_Pos) /*!< 0x40000000 */
  4362. #define RCC_SSCGR_SPREADSEL RCC_SSCGR_SPREADSEL_Msk
  4363. #define RCC_SSCGR_SSCGEN_Pos (31U)
  4364. #define RCC_SSCGR_SSCGEN_Msk (0x1U << RCC_SSCGR_SSCGEN_Pos) /*!< 0x80000000 */
  4365. #define RCC_SSCGR_SSCGEN RCC_SSCGR_SSCGEN_Msk
  4366. /******************** Bit definition for RCC_PLLI2SCFGR register ************/
  4367. #define RCC_PLLI2SCFGR_PLLI2SM_Pos (0U)
  4368. #define RCC_PLLI2SCFGR_PLLI2SM_Msk (0x3FU << RCC_PLLI2SCFGR_PLLI2SM_Pos) /*!< 0x0000003F */
  4369. #define RCC_PLLI2SCFGR_PLLI2SM RCC_PLLI2SCFGR_PLLI2SM_Msk
  4370. #define RCC_PLLI2SCFGR_PLLI2SM_0 (0x01U << RCC_PLLI2SCFGR_PLLI2SM_Pos) /*!< 0x00000001 */
  4371. #define RCC_PLLI2SCFGR_PLLI2SM_1 (0x02U << RCC_PLLI2SCFGR_PLLI2SM_Pos) /*!< 0x00000002 */
  4372. #define RCC_PLLI2SCFGR_PLLI2SM_2 (0x04U << RCC_PLLI2SCFGR_PLLI2SM_Pos) /*!< 0x00000004 */
  4373. #define RCC_PLLI2SCFGR_PLLI2SM_3 (0x08U << RCC_PLLI2SCFGR_PLLI2SM_Pos) /*!< 0x00000008 */
  4374. #define RCC_PLLI2SCFGR_PLLI2SM_4 (0x10U << RCC_PLLI2SCFGR_PLLI2SM_Pos) /*!< 0x00000010 */
  4375. #define RCC_PLLI2SCFGR_PLLI2SM_5 (0x20U << RCC_PLLI2SCFGR_PLLI2SM_Pos) /*!< 0x00000020 */
  4376. #define RCC_PLLI2SCFGR_PLLI2SN_Pos (6U)
  4377. #define RCC_PLLI2SCFGR_PLLI2SN_Msk (0x1FFU << RCC_PLLI2SCFGR_PLLI2SN_Pos) /*!< 0x00007FC0 */
  4378. #define RCC_PLLI2SCFGR_PLLI2SN RCC_PLLI2SCFGR_PLLI2SN_Msk
  4379. #define RCC_PLLI2SCFGR_PLLI2SN_0 (0x001U << RCC_PLLI2SCFGR_PLLI2SN_Pos) /*!< 0x00000040 */
  4380. #define RCC_PLLI2SCFGR_PLLI2SN_1 (0x002U << RCC_PLLI2SCFGR_PLLI2SN_Pos) /*!< 0x00000080 */
  4381. #define RCC_PLLI2SCFGR_PLLI2SN_2 (0x004U << RCC_PLLI2SCFGR_PLLI2SN_Pos) /*!< 0x00000100 */
  4382. #define RCC_PLLI2SCFGR_PLLI2SN_3 (0x008U << RCC_PLLI2SCFGR_PLLI2SN_Pos) /*!< 0x00000200 */
  4383. #define RCC_PLLI2SCFGR_PLLI2SN_4 (0x010U << RCC_PLLI2SCFGR_PLLI2SN_Pos) /*!< 0x00000400 */
  4384. #define RCC_PLLI2SCFGR_PLLI2SN_5 (0x020U << RCC_PLLI2SCFGR_PLLI2SN_Pos) /*!< 0x00000800 */
  4385. #define RCC_PLLI2SCFGR_PLLI2SN_6 (0x040U << RCC_PLLI2SCFGR_PLLI2SN_Pos) /*!< 0x00001000 */
  4386. #define RCC_PLLI2SCFGR_PLLI2SN_7 (0x080U << RCC_PLLI2SCFGR_PLLI2SN_Pos) /*!< 0x00002000 */
  4387. #define RCC_PLLI2SCFGR_PLLI2SN_8 (0x100U << RCC_PLLI2SCFGR_PLLI2SN_Pos) /*!< 0x00004000 */
  4388. #define RCC_PLLI2SCFGR_PLLI2SR_Pos (28U)
  4389. #define RCC_PLLI2SCFGR_PLLI2SR_Msk (0x7U << RCC_PLLI2SCFGR_PLLI2SR_Pos) /*!< 0x70000000 */
  4390. #define RCC_PLLI2SCFGR_PLLI2SR RCC_PLLI2SCFGR_PLLI2SR_Msk
  4391. #define RCC_PLLI2SCFGR_PLLI2SR_0 (0x1U << RCC_PLLI2SCFGR_PLLI2SR_Pos) /*!< 0x10000000 */
  4392. #define RCC_PLLI2SCFGR_PLLI2SR_1 (0x2U << RCC_PLLI2SCFGR_PLLI2SR_Pos) /*!< 0x20000000 */
  4393. #define RCC_PLLI2SCFGR_PLLI2SR_2 (0x4U << RCC_PLLI2SCFGR_PLLI2SR_Pos) /*!< 0x40000000 */
  4394. /******************** Bit definition for RCC_DCKCFGR register ***************/
  4395. #define RCC_DCKCFGR_TIMPRE_Pos (24U)
  4396. #define RCC_DCKCFGR_TIMPRE_Msk (0x1U << RCC_DCKCFGR_TIMPRE_Pos) /*!< 0x01000000 */
  4397. #define RCC_DCKCFGR_TIMPRE RCC_DCKCFGR_TIMPRE_Msk
  4398. /******************************************************************************/
  4399. /* */
  4400. /* Real-Time Clock (RTC) */
  4401. /* */
  4402. /******************************************************************************/
  4403. /******************** Bits definition for RTC_TR register *******************/
  4404. #define RTC_TR_PM_Pos (22U)
  4405. #define RTC_TR_PM_Msk (0x1U << RTC_TR_PM_Pos) /*!< 0x00400000 */
  4406. #define RTC_TR_PM RTC_TR_PM_Msk
  4407. #define RTC_TR_HT_Pos (20U)
  4408. #define RTC_TR_HT_Msk (0x3U << RTC_TR_HT_Pos) /*!< 0x00300000 */
  4409. #define RTC_TR_HT RTC_TR_HT_Msk
  4410. #define RTC_TR_HT_0 (0x1U << RTC_TR_HT_Pos) /*!< 0x00100000 */
  4411. #define RTC_TR_HT_1 (0x2U << RTC_TR_HT_Pos) /*!< 0x00200000 */
  4412. #define RTC_TR_HU_Pos (16U)
  4413. #define RTC_TR_HU_Msk (0xFU << RTC_TR_HU_Pos) /*!< 0x000F0000 */
  4414. #define RTC_TR_HU RTC_TR_HU_Msk
  4415. #define RTC_TR_HU_0 (0x1U << RTC_TR_HU_Pos) /*!< 0x00010000 */
  4416. #define RTC_TR_HU_1 (0x2U << RTC_TR_HU_Pos) /*!< 0x00020000 */
  4417. #define RTC_TR_HU_2 (0x4U << RTC_TR_HU_Pos) /*!< 0x00040000 */
  4418. #define RTC_TR_HU_3 (0x8U << RTC_TR_HU_Pos) /*!< 0x00080000 */
  4419. #define RTC_TR_MNT_Pos (12U)
  4420. #define RTC_TR_MNT_Msk (0x7U << RTC_TR_MNT_Pos) /*!< 0x00007000 */
  4421. #define RTC_TR_MNT RTC_TR_MNT_Msk
  4422. #define RTC_TR_MNT_0 (0x1U << RTC_TR_MNT_Pos) /*!< 0x00001000 */
  4423. #define RTC_TR_MNT_1 (0x2U << RTC_TR_MNT_Pos) /*!< 0x00002000 */
  4424. #define RTC_TR_MNT_2 (0x4U << RTC_TR_MNT_Pos) /*!< 0x00004000 */
  4425. #define RTC_TR_MNU_Pos (8U)
  4426. #define RTC_TR_MNU_Msk (0xFU << RTC_TR_MNU_Pos) /*!< 0x00000F00 */
  4427. #define RTC_TR_MNU RTC_TR_MNU_Msk
  4428. #define RTC_TR_MNU_0 (0x1U << RTC_TR_MNU_Pos) /*!< 0x00000100 */
  4429. #define RTC_TR_MNU_1 (0x2U << RTC_TR_MNU_Pos) /*!< 0x00000200 */
  4430. #define RTC_TR_MNU_2 (0x4U << RTC_TR_MNU_Pos) /*!< 0x00000400 */
  4431. #define RTC_TR_MNU_3 (0x8U << RTC_TR_MNU_Pos) /*!< 0x00000800 */
  4432. #define RTC_TR_ST_Pos (4U)
  4433. #define RTC_TR_ST_Msk (0x7U << RTC_TR_ST_Pos) /*!< 0x00000070 */
  4434. #define RTC_TR_ST RTC_TR_ST_Msk
  4435. #define RTC_TR_ST_0 (0x1U << RTC_TR_ST_Pos) /*!< 0x00000010 */
  4436. #define RTC_TR_ST_1 (0x2U << RTC_TR_ST_Pos) /*!< 0x00000020 */
  4437. #define RTC_TR_ST_2 (0x4U << RTC_TR_ST_Pos) /*!< 0x00000040 */
  4438. #define RTC_TR_SU_Pos (0U)
  4439. #define RTC_TR_SU_Msk (0xFU << RTC_TR_SU_Pos) /*!< 0x0000000F */
  4440. #define RTC_TR_SU RTC_TR_SU_Msk
  4441. #define RTC_TR_SU_0 (0x1U << RTC_TR_SU_Pos) /*!< 0x00000001 */
  4442. #define RTC_TR_SU_1 (0x2U << RTC_TR_SU_Pos) /*!< 0x00000002 */
  4443. #define RTC_TR_SU_2 (0x4U << RTC_TR_SU_Pos) /*!< 0x00000004 */
  4444. #define RTC_TR_SU_3 (0x8U << RTC_TR_SU_Pos) /*!< 0x00000008 */
  4445. /******************** Bits definition for RTC_DR register *******************/
  4446. #define RTC_DR_YT_Pos (20U)
  4447. #define RTC_DR_YT_Msk (0xFU << RTC_DR_YT_Pos) /*!< 0x00F00000 */
  4448. #define RTC_DR_YT RTC_DR_YT_Msk
  4449. #define RTC_DR_YT_0 (0x1U << RTC_DR_YT_Pos) /*!< 0x00100000 */
  4450. #define RTC_DR_YT_1 (0x2U << RTC_DR_YT_Pos) /*!< 0x00200000 */
  4451. #define RTC_DR_YT_2 (0x4U << RTC_DR_YT_Pos) /*!< 0x00400000 */
  4452. #define RTC_DR_YT_3 (0x8U << RTC_DR_YT_Pos) /*!< 0x00800000 */
  4453. #define RTC_DR_YU_Pos (16U)
  4454. #define RTC_DR_YU_Msk (0xFU << RTC_DR_YU_Pos) /*!< 0x000F0000 */
  4455. #define RTC_DR_YU RTC_DR_YU_Msk
  4456. #define RTC_DR_YU_0 (0x1U << RTC_DR_YU_Pos) /*!< 0x00010000 */
  4457. #define RTC_DR_YU_1 (0x2U << RTC_DR_YU_Pos) /*!< 0x00020000 */
  4458. #define RTC_DR_YU_2 (0x4U << RTC_DR_YU_Pos) /*!< 0x00040000 */
  4459. #define RTC_DR_YU_3 (0x8U << RTC_DR_YU_Pos) /*!< 0x00080000 */
  4460. #define RTC_DR_WDU_Pos (13U)
  4461. #define RTC_DR_WDU_Msk (0x7U << RTC_DR_WDU_Pos) /*!< 0x0000E000 */
  4462. #define RTC_DR_WDU RTC_DR_WDU_Msk
  4463. #define RTC_DR_WDU_0 (0x1U << RTC_DR_WDU_Pos) /*!< 0x00002000 */
  4464. #define RTC_DR_WDU_1 (0x2U << RTC_DR_WDU_Pos) /*!< 0x00004000 */
  4465. #define RTC_DR_WDU_2 (0x4U << RTC_DR_WDU_Pos) /*!< 0x00008000 */
  4466. #define RTC_DR_MT_Pos (12U)
  4467. #define RTC_DR_MT_Msk (0x1U << RTC_DR_MT_Pos) /*!< 0x00001000 */
  4468. #define RTC_DR_MT RTC_DR_MT_Msk
  4469. #define RTC_DR_MU_Pos (8U)
  4470. #define RTC_DR_MU_Msk (0xFU << RTC_DR_MU_Pos) /*!< 0x00000F00 */
  4471. #define RTC_DR_MU RTC_DR_MU_Msk
  4472. #define RTC_DR_MU_0 (0x1U << RTC_DR_MU_Pos) /*!< 0x00000100 */
  4473. #define RTC_DR_MU_1 (0x2U << RTC_DR_MU_Pos) /*!< 0x00000200 */
  4474. #define RTC_DR_MU_2 (0x4U << RTC_DR_MU_Pos) /*!< 0x00000400 */
  4475. #define RTC_DR_MU_3 (0x8U << RTC_DR_MU_Pos) /*!< 0x00000800 */
  4476. #define RTC_DR_DT_Pos (4U)
  4477. #define RTC_DR_DT_Msk (0x3U << RTC_DR_DT_Pos) /*!< 0x00000030 */
  4478. #define RTC_DR_DT RTC_DR_DT_Msk
  4479. #define RTC_DR_DT_0 (0x1U << RTC_DR_DT_Pos) /*!< 0x00000010 */
  4480. #define RTC_DR_DT_1 (0x2U << RTC_DR_DT_Pos) /*!< 0x00000020 */
  4481. #define RTC_DR_DU_Pos (0U)
  4482. #define RTC_DR_DU_Msk (0xFU << RTC_DR_DU_Pos) /*!< 0x0000000F */
  4483. #define RTC_DR_DU RTC_DR_DU_Msk
  4484. #define RTC_DR_DU_0 (0x1U << RTC_DR_DU_Pos) /*!< 0x00000001 */
  4485. #define RTC_DR_DU_1 (0x2U << RTC_DR_DU_Pos) /*!< 0x00000002 */
  4486. #define RTC_DR_DU_2 (0x4U << RTC_DR_DU_Pos) /*!< 0x00000004 */
  4487. #define RTC_DR_DU_3 (0x8U << RTC_DR_DU_Pos) /*!< 0x00000008 */
  4488. /******************** Bits definition for RTC_CR register *******************/
  4489. #define RTC_CR_COE_Pos (23U)
  4490. #define RTC_CR_COE_Msk (0x1U << RTC_CR_COE_Pos) /*!< 0x00800000 */
  4491. #define RTC_CR_COE RTC_CR_COE_Msk
  4492. #define RTC_CR_OSEL_Pos (21U)
  4493. #define RTC_CR_OSEL_Msk (0x3U << RTC_CR_OSEL_Pos) /*!< 0x00600000 */
  4494. #define RTC_CR_OSEL RTC_CR_OSEL_Msk
  4495. #define RTC_CR_OSEL_0 (0x1U << RTC_CR_OSEL_Pos) /*!< 0x00200000 */
  4496. #define RTC_CR_OSEL_1 (0x2U << RTC_CR_OSEL_Pos) /*!< 0x00400000 */
  4497. #define RTC_CR_POL_Pos (20U)
  4498. #define RTC_CR_POL_Msk (0x1U << RTC_CR_POL_Pos) /*!< 0x00100000 */
  4499. #define RTC_CR_POL RTC_CR_POL_Msk
  4500. #define RTC_CR_COSEL_Pos (19U)
  4501. #define RTC_CR_COSEL_Msk (0x1U << RTC_CR_COSEL_Pos) /*!< 0x00080000 */
  4502. #define RTC_CR_COSEL RTC_CR_COSEL_Msk
  4503. #define RTC_CR_BKP_Pos (18U)
  4504. #define RTC_CR_BKP_Msk (0x1U << RTC_CR_BKP_Pos) /*!< 0x00040000 */
  4505. #define RTC_CR_BKP RTC_CR_BKP_Msk
  4506. #define RTC_CR_SUB1H_Pos (17U)
  4507. #define RTC_CR_SUB1H_Msk (0x1U << RTC_CR_SUB1H_Pos) /*!< 0x00020000 */
  4508. #define RTC_CR_SUB1H RTC_CR_SUB1H_Msk
  4509. #define RTC_CR_ADD1H_Pos (16U)
  4510. #define RTC_CR_ADD1H_Msk (0x1U << RTC_CR_ADD1H_Pos) /*!< 0x00010000 */
  4511. #define RTC_CR_ADD1H RTC_CR_ADD1H_Msk
  4512. #define RTC_CR_TSIE_Pos (15U)
  4513. #define RTC_CR_TSIE_Msk (0x1U << RTC_CR_TSIE_Pos) /*!< 0x00008000 */
  4514. #define RTC_CR_TSIE RTC_CR_TSIE_Msk
  4515. #define RTC_CR_WUTIE_Pos (14U)
  4516. #define RTC_CR_WUTIE_Msk (0x1U << RTC_CR_WUTIE_Pos) /*!< 0x00004000 */
  4517. #define RTC_CR_WUTIE RTC_CR_WUTIE_Msk
  4518. #define RTC_CR_ALRBIE_Pos (13U)
  4519. #define RTC_CR_ALRBIE_Msk (0x1U << RTC_CR_ALRBIE_Pos) /*!< 0x00002000 */
  4520. #define RTC_CR_ALRBIE RTC_CR_ALRBIE_Msk
  4521. #define RTC_CR_ALRAIE_Pos (12U)
  4522. #define RTC_CR_ALRAIE_Msk (0x1U << RTC_CR_ALRAIE_Pos) /*!< 0x00001000 */
  4523. #define RTC_CR_ALRAIE RTC_CR_ALRAIE_Msk
  4524. #define RTC_CR_TSE_Pos (11U)
  4525. #define RTC_CR_TSE_Msk (0x1U << RTC_CR_TSE_Pos) /*!< 0x00000800 */
  4526. #define RTC_CR_TSE RTC_CR_TSE_Msk
  4527. #define RTC_CR_WUTE_Pos (10U)
  4528. #define RTC_CR_WUTE_Msk (0x1U << RTC_CR_WUTE_Pos) /*!< 0x00000400 */
  4529. #define RTC_CR_WUTE RTC_CR_WUTE_Msk
  4530. #define RTC_CR_ALRBE_Pos (9U)
  4531. #define RTC_CR_ALRBE_Msk (0x1U << RTC_CR_ALRBE_Pos) /*!< 0x00000200 */
  4532. #define RTC_CR_ALRBE RTC_CR_ALRBE_Msk
  4533. #define RTC_CR_ALRAE_Pos (8U)
  4534. #define RTC_CR_ALRAE_Msk (0x1U << RTC_CR_ALRAE_Pos) /*!< 0x00000100 */
  4535. #define RTC_CR_ALRAE RTC_CR_ALRAE_Msk
  4536. #define RTC_CR_DCE_Pos (7U)
  4537. #define RTC_CR_DCE_Msk (0x1U << RTC_CR_DCE_Pos) /*!< 0x00000080 */
  4538. #define RTC_CR_DCE RTC_CR_DCE_Msk
  4539. #define RTC_CR_FMT_Pos (6U)
  4540. #define RTC_CR_FMT_Msk (0x1U << RTC_CR_FMT_Pos) /*!< 0x00000040 */
  4541. #define RTC_CR_FMT RTC_CR_FMT_Msk
  4542. #define RTC_CR_BYPSHAD_Pos (5U)
  4543. #define RTC_CR_BYPSHAD_Msk (0x1U << RTC_CR_BYPSHAD_Pos) /*!< 0x00000020 */
  4544. #define RTC_CR_BYPSHAD RTC_CR_BYPSHAD_Msk
  4545. #define RTC_CR_REFCKON_Pos (4U)
  4546. #define RTC_CR_REFCKON_Msk (0x1U << RTC_CR_REFCKON_Pos) /*!< 0x00000010 */
  4547. #define RTC_CR_REFCKON RTC_CR_REFCKON_Msk
  4548. #define RTC_CR_TSEDGE_Pos (3U)
  4549. #define RTC_CR_TSEDGE_Msk (0x1U << RTC_CR_TSEDGE_Pos) /*!< 0x00000008 */
  4550. #define RTC_CR_TSEDGE RTC_CR_TSEDGE_Msk
  4551. #define RTC_CR_WUCKSEL_Pos (0U)
  4552. #define RTC_CR_WUCKSEL_Msk (0x7U << RTC_CR_WUCKSEL_Pos) /*!< 0x00000007 */
  4553. #define RTC_CR_WUCKSEL RTC_CR_WUCKSEL_Msk
  4554. #define RTC_CR_WUCKSEL_0 (0x1U << RTC_CR_WUCKSEL_Pos) /*!< 0x00000001 */
  4555. #define RTC_CR_WUCKSEL_1 (0x2U << RTC_CR_WUCKSEL_Pos) /*!< 0x00000002 */
  4556. #define RTC_CR_WUCKSEL_2 (0x4U << RTC_CR_WUCKSEL_Pos) /*!< 0x00000004 */
  4557. /* Legacy defines */
  4558. #define RTC_CR_BCK RTC_CR_BKP
  4559. /******************** Bits definition for RTC_ISR register ******************/
  4560. #define RTC_ISR_RECALPF_Pos (16U)
  4561. #define RTC_ISR_RECALPF_Msk (0x1U << RTC_ISR_RECALPF_Pos) /*!< 0x00010000 */
  4562. #define RTC_ISR_RECALPF RTC_ISR_RECALPF_Msk
  4563. #define RTC_ISR_TAMP1F_Pos (13U)
  4564. #define RTC_ISR_TAMP1F_Msk (0x1U << RTC_ISR_TAMP1F_Pos) /*!< 0x00002000 */
  4565. #define RTC_ISR_TAMP1F RTC_ISR_TAMP1F_Msk
  4566. #define RTC_ISR_TAMP2F_Pos (14U)
  4567. #define RTC_ISR_TAMP2F_Msk (0x1U << RTC_ISR_TAMP2F_Pos) /*!< 0x00004000 */
  4568. #define RTC_ISR_TAMP2F RTC_ISR_TAMP2F_Msk
  4569. #define RTC_ISR_TSOVF_Pos (12U)
  4570. #define RTC_ISR_TSOVF_Msk (0x1U << RTC_ISR_TSOVF_Pos) /*!< 0x00001000 */
  4571. #define RTC_ISR_TSOVF RTC_ISR_TSOVF_Msk
  4572. #define RTC_ISR_TSF_Pos (11U)
  4573. #define RTC_ISR_TSF_Msk (0x1U << RTC_ISR_TSF_Pos) /*!< 0x00000800 */
  4574. #define RTC_ISR_TSF RTC_ISR_TSF_Msk
  4575. #define RTC_ISR_WUTF_Pos (10U)
  4576. #define RTC_ISR_WUTF_Msk (0x1U << RTC_ISR_WUTF_Pos) /*!< 0x00000400 */
  4577. #define RTC_ISR_WUTF RTC_ISR_WUTF_Msk
  4578. #define RTC_ISR_ALRBF_Pos (9U)
  4579. #define RTC_ISR_ALRBF_Msk (0x1U << RTC_ISR_ALRBF_Pos) /*!< 0x00000200 */
  4580. #define RTC_ISR_ALRBF RTC_ISR_ALRBF_Msk
  4581. #define RTC_ISR_ALRAF_Pos (8U)
  4582. #define RTC_ISR_ALRAF_Msk (0x1U << RTC_ISR_ALRAF_Pos) /*!< 0x00000100 */
  4583. #define RTC_ISR_ALRAF RTC_ISR_ALRAF_Msk
  4584. #define RTC_ISR_INIT_Pos (7U)
  4585. #define RTC_ISR_INIT_Msk (0x1U << RTC_ISR_INIT_Pos) /*!< 0x00000080 */
  4586. #define RTC_ISR_INIT RTC_ISR_INIT_Msk
  4587. #define RTC_ISR_INITF_Pos (6U)
  4588. #define RTC_ISR_INITF_Msk (0x1U << RTC_ISR_INITF_Pos) /*!< 0x00000040 */
  4589. #define RTC_ISR_INITF RTC_ISR_INITF_Msk
  4590. #define RTC_ISR_RSF_Pos (5U)
  4591. #define RTC_ISR_RSF_Msk (0x1U << RTC_ISR_RSF_Pos) /*!< 0x00000020 */
  4592. #define RTC_ISR_RSF RTC_ISR_RSF_Msk
  4593. #define RTC_ISR_INITS_Pos (4U)
  4594. #define RTC_ISR_INITS_Msk (0x1U << RTC_ISR_INITS_Pos) /*!< 0x00000010 */
  4595. #define RTC_ISR_INITS RTC_ISR_INITS_Msk
  4596. #define RTC_ISR_SHPF_Pos (3U)
  4597. #define RTC_ISR_SHPF_Msk (0x1U << RTC_ISR_SHPF_Pos) /*!< 0x00000008 */
  4598. #define RTC_ISR_SHPF RTC_ISR_SHPF_Msk
  4599. #define RTC_ISR_WUTWF_Pos (2U)
  4600. #define RTC_ISR_WUTWF_Msk (0x1U << RTC_ISR_WUTWF_Pos) /*!< 0x00000004 */
  4601. #define RTC_ISR_WUTWF RTC_ISR_WUTWF_Msk
  4602. #define RTC_ISR_ALRBWF_Pos (1U)
  4603. #define RTC_ISR_ALRBWF_Msk (0x1U << RTC_ISR_ALRBWF_Pos) /*!< 0x00000002 */
  4604. #define RTC_ISR_ALRBWF RTC_ISR_ALRBWF_Msk
  4605. #define RTC_ISR_ALRAWF_Pos (0U)
  4606. #define RTC_ISR_ALRAWF_Msk (0x1U << RTC_ISR_ALRAWF_Pos) /*!< 0x00000001 */
  4607. #define RTC_ISR_ALRAWF RTC_ISR_ALRAWF_Msk
  4608. /******************** Bits definition for RTC_PRER register *****************/
  4609. #define RTC_PRER_PREDIV_A_Pos (16U)
  4610. #define RTC_PRER_PREDIV_A_Msk (0x7FU << RTC_PRER_PREDIV_A_Pos) /*!< 0x007F0000 */
  4611. #define RTC_PRER_PREDIV_A RTC_PRER_PREDIV_A_Msk
  4612. #define RTC_PRER_PREDIV_S_Pos (0U)
  4613. #define RTC_PRER_PREDIV_S_Msk (0x7FFFU << RTC_PRER_PREDIV_S_Pos) /*!< 0x00007FFF */
  4614. #define RTC_PRER_PREDIV_S RTC_PRER_PREDIV_S_Msk
  4615. /******************** Bits definition for RTC_WUTR register *****************/
  4616. #define RTC_WUTR_WUT_Pos (0U)
  4617. #define RTC_WUTR_WUT_Msk (0xFFFFU << RTC_WUTR_WUT_Pos) /*!< 0x0000FFFF */
  4618. #define RTC_WUTR_WUT RTC_WUTR_WUT_Msk
  4619. /******************** Bits definition for RTC_CALIBR register ***************/
  4620. #define RTC_CALIBR_DCS_Pos (7U)
  4621. #define RTC_CALIBR_DCS_Msk (0x1U << RTC_CALIBR_DCS_Pos) /*!< 0x00000080 */
  4622. #define RTC_CALIBR_DCS RTC_CALIBR_DCS_Msk
  4623. #define RTC_CALIBR_DC_Pos (0U)
  4624. #define RTC_CALIBR_DC_Msk (0x1FU << RTC_CALIBR_DC_Pos) /*!< 0x0000001F */
  4625. #define RTC_CALIBR_DC RTC_CALIBR_DC_Msk
  4626. /******************** Bits definition for RTC_ALRMAR register ***************/
  4627. #define RTC_ALRMAR_MSK4_Pos (31U)
  4628. #define RTC_ALRMAR_MSK4_Msk (0x1U << RTC_ALRMAR_MSK4_Pos) /*!< 0x80000000 */
  4629. #define RTC_ALRMAR_MSK4 RTC_ALRMAR_MSK4_Msk
  4630. #define RTC_ALRMAR_WDSEL_Pos (30U)
  4631. #define RTC_ALRMAR_WDSEL_Msk (0x1U << RTC_ALRMAR_WDSEL_Pos) /*!< 0x40000000 */
  4632. #define RTC_ALRMAR_WDSEL RTC_ALRMAR_WDSEL_Msk
  4633. #define RTC_ALRMAR_DT_Pos (28U)
  4634. #define RTC_ALRMAR_DT_Msk (0x3U << RTC_ALRMAR_DT_Pos) /*!< 0x30000000 */
  4635. #define RTC_ALRMAR_DT RTC_ALRMAR_DT_Msk
  4636. #define RTC_ALRMAR_DT_0 (0x1U << RTC_ALRMAR_DT_Pos) /*!< 0x10000000 */
  4637. #define RTC_ALRMAR_DT_1 (0x2U << RTC_ALRMAR_DT_Pos) /*!< 0x20000000 */
  4638. #define RTC_ALRMAR_DU_Pos (24U)
  4639. #define RTC_ALRMAR_DU_Msk (0xFU << RTC_ALRMAR_DU_Pos) /*!< 0x0F000000 */
  4640. #define RTC_ALRMAR_DU RTC_ALRMAR_DU_Msk
  4641. #define RTC_ALRMAR_DU_0 (0x1U << RTC_ALRMAR_DU_Pos) /*!< 0x01000000 */
  4642. #define RTC_ALRMAR_DU_1 (0x2U << RTC_ALRMAR_DU_Pos) /*!< 0x02000000 */
  4643. #define RTC_ALRMAR_DU_2 (0x4U << RTC_ALRMAR_DU_Pos) /*!< 0x04000000 */
  4644. #define RTC_ALRMAR_DU_3 (0x8U << RTC_ALRMAR_DU_Pos) /*!< 0x08000000 */
  4645. #define RTC_ALRMAR_MSK3_Pos (23U)
  4646. #define RTC_ALRMAR_MSK3_Msk (0x1U << RTC_ALRMAR_MSK3_Pos) /*!< 0x00800000 */
  4647. #define RTC_ALRMAR_MSK3 RTC_ALRMAR_MSK3_Msk
  4648. #define RTC_ALRMAR_PM_Pos (22U)
  4649. #define RTC_ALRMAR_PM_Msk (0x1U << RTC_ALRMAR_PM_Pos) /*!< 0x00400000 */
  4650. #define RTC_ALRMAR_PM RTC_ALRMAR_PM_Msk
  4651. #define RTC_ALRMAR_HT_Pos (20U)
  4652. #define RTC_ALRMAR_HT_Msk (0x3U << RTC_ALRMAR_HT_Pos) /*!< 0x00300000 */
  4653. #define RTC_ALRMAR_HT RTC_ALRMAR_HT_Msk
  4654. #define RTC_ALRMAR_HT_0 (0x1U << RTC_ALRMAR_HT_Pos) /*!< 0x00100000 */
  4655. #define RTC_ALRMAR_HT_1 (0x2U << RTC_ALRMAR_HT_Pos) /*!< 0x00200000 */
  4656. #define RTC_ALRMAR_HU_Pos (16U)
  4657. #define RTC_ALRMAR_HU_Msk (0xFU << RTC_ALRMAR_HU_Pos) /*!< 0x000F0000 */
  4658. #define RTC_ALRMAR_HU RTC_ALRMAR_HU_Msk
  4659. #define RTC_ALRMAR_HU_0 (0x1U << RTC_ALRMAR_HU_Pos) /*!< 0x00010000 */
  4660. #define RTC_ALRMAR_HU_1 (0x2U << RTC_ALRMAR_HU_Pos) /*!< 0x00020000 */
  4661. #define RTC_ALRMAR_HU_2 (0x4U << RTC_ALRMAR_HU_Pos) /*!< 0x00040000 */
  4662. #define RTC_ALRMAR_HU_3 (0x8U << RTC_ALRMAR_HU_Pos) /*!< 0x00080000 */
  4663. #define RTC_ALRMAR_MSK2_Pos (15U)
  4664. #define RTC_ALRMAR_MSK2_Msk (0x1U << RTC_ALRMAR_MSK2_Pos) /*!< 0x00008000 */
  4665. #define RTC_ALRMAR_MSK2 RTC_ALRMAR_MSK2_Msk
  4666. #define RTC_ALRMAR_MNT_Pos (12U)
  4667. #define RTC_ALRMAR_MNT_Msk (0x7U << RTC_ALRMAR_MNT_Pos) /*!< 0x00007000 */
  4668. #define RTC_ALRMAR_MNT RTC_ALRMAR_MNT_Msk
  4669. #define RTC_ALRMAR_MNT_0 (0x1U << RTC_ALRMAR_MNT_Pos) /*!< 0x00001000 */
  4670. #define RTC_ALRMAR_MNT_1 (0x2U << RTC_ALRMAR_MNT_Pos) /*!< 0x00002000 */
  4671. #define RTC_ALRMAR_MNT_2 (0x4U << RTC_ALRMAR_MNT_Pos) /*!< 0x00004000 */
  4672. #define RTC_ALRMAR_MNU_Pos (8U)
  4673. #define RTC_ALRMAR_MNU_Msk (0xFU << RTC_ALRMAR_MNU_Pos) /*!< 0x00000F00 */
  4674. #define RTC_ALRMAR_MNU RTC_ALRMAR_MNU_Msk
  4675. #define RTC_ALRMAR_MNU_0 (0x1U << RTC_ALRMAR_MNU_Pos) /*!< 0x00000100 */
  4676. #define RTC_ALRMAR_MNU_1 (0x2U << RTC_ALRMAR_MNU_Pos) /*!< 0x00000200 */
  4677. #define RTC_ALRMAR_MNU_2 (0x4U << RTC_ALRMAR_MNU_Pos) /*!< 0x00000400 */
  4678. #define RTC_ALRMAR_MNU_3 (0x8U << RTC_ALRMAR_MNU_Pos) /*!< 0x00000800 */
  4679. #define RTC_ALRMAR_MSK1_Pos (7U)
  4680. #define RTC_ALRMAR_MSK1_Msk (0x1U << RTC_ALRMAR_MSK1_Pos) /*!< 0x00000080 */
  4681. #define RTC_ALRMAR_MSK1 RTC_ALRMAR_MSK1_Msk
  4682. #define RTC_ALRMAR_ST_Pos (4U)
  4683. #define RTC_ALRMAR_ST_Msk (0x7U << RTC_ALRMAR_ST_Pos) /*!< 0x00000070 */
  4684. #define RTC_ALRMAR_ST RTC_ALRMAR_ST_Msk
  4685. #define RTC_ALRMAR_ST_0 (0x1U << RTC_ALRMAR_ST_Pos) /*!< 0x00000010 */
  4686. #define RTC_ALRMAR_ST_1 (0x2U << RTC_ALRMAR_ST_Pos) /*!< 0x00000020 */
  4687. #define RTC_ALRMAR_ST_2 (0x4U << RTC_ALRMAR_ST_Pos) /*!< 0x00000040 */
  4688. #define RTC_ALRMAR_SU_Pos (0U)
  4689. #define RTC_ALRMAR_SU_Msk (0xFU << RTC_ALRMAR_SU_Pos) /*!< 0x0000000F */
  4690. #define RTC_ALRMAR_SU RTC_ALRMAR_SU_Msk
  4691. #define RTC_ALRMAR_SU_0 (0x1U << RTC_ALRMAR_SU_Pos) /*!< 0x00000001 */
  4692. #define RTC_ALRMAR_SU_1 (0x2U << RTC_ALRMAR_SU_Pos) /*!< 0x00000002 */
  4693. #define RTC_ALRMAR_SU_2 (0x4U << RTC_ALRMAR_SU_Pos) /*!< 0x00000004 */
  4694. #define RTC_ALRMAR_SU_3 (0x8U << RTC_ALRMAR_SU_Pos) /*!< 0x00000008 */
  4695. /******************** Bits definition for RTC_ALRMBR register ***************/
  4696. #define RTC_ALRMBR_MSK4_Pos (31U)
  4697. #define RTC_ALRMBR_MSK4_Msk (0x1U << RTC_ALRMBR_MSK4_Pos) /*!< 0x80000000 */
  4698. #define RTC_ALRMBR_MSK4 RTC_ALRMBR_MSK4_Msk
  4699. #define RTC_ALRMBR_WDSEL_Pos (30U)
  4700. #define RTC_ALRMBR_WDSEL_Msk (0x1U << RTC_ALRMBR_WDSEL_Pos) /*!< 0x40000000 */
  4701. #define RTC_ALRMBR_WDSEL RTC_ALRMBR_WDSEL_Msk
  4702. #define RTC_ALRMBR_DT_Pos (28U)
  4703. #define RTC_ALRMBR_DT_Msk (0x3U << RTC_ALRMBR_DT_Pos) /*!< 0x30000000 */
  4704. #define RTC_ALRMBR_DT RTC_ALRMBR_DT_Msk
  4705. #define RTC_ALRMBR_DT_0 (0x1U << RTC_ALRMBR_DT_Pos) /*!< 0x10000000 */
  4706. #define RTC_ALRMBR_DT_1 (0x2U << RTC_ALRMBR_DT_Pos) /*!< 0x20000000 */
  4707. #define RTC_ALRMBR_DU_Pos (24U)
  4708. #define RTC_ALRMBR_DU_Msk (0xFU << RTC_ALRMBR_DU_Pos) /*!< 0x0F000000 */
  4709. #define RTC_ALRMBR_DU RTC_ALRMBR_DU_Msk
  4710. #define RTC_ALRMBR_DU_0 (0x1U << RTC_ALRMBR_DU_Pos) /*!< 0x01000000 */
  4711. #define RTC_ALRMBR_DU_1 (0x2U << RTC_ALRMBR_DU_Pos) /*!< 0x02000000 */
  4712. #define RTC_ALRMBR_DU_2 (0x4U << RTC_ALRMBR_DU_Pos) /*!< 0x04000000 */
  4713. #define RTC_ALRMBR_DU_3 (0x8U << RTC_ALRMBR_DU_Pos) /*!< 0x08000000 */
  4714. #define RTC_ALRMBR_MSK3_Pos (23U)
  4715. #define RTC_ALRMBR_MSK3_Msk (0x1U << RTC_ALRMBR_MSK3_Pos) /*!< 0x00800000 */
  4716. #define RTC_ALRMBR_MSK3 RTC_ALRMBR_MSK3_Msk
  4717. #define RTC_ALRMBR_PM_Pos (22U)
  4718. #define RTC_ALRMBR_PM_Msk (0x1U << RTC_ALRMBR_PM_Pos) /*!< 0x00400000 */
  4719. #define RTC_ALRMBR_PM RTC_ALRMBR_PM_Msk
  4720. #define RTC_ALRMBR_HT_Pos (20U)
  4721. #define RTC_ALRMBR_HT_Msk (0x3U << RTC_ALRMBR_HT_Pos) /*!< 0x00300000 */
  4722. #define RTC_ALRMBR_HT RTC_ALRMBR_HT_Msk
  4723. #define RTC_ALRMBR_HT_0 (0x1U << RTC_ALRMBR_HT_Pos) /*!< 0x00100000 */
  4724. #define RTC_ALRMBR_HT_1 (0x2U << RTC_ALRMBR_HT_Pos) /*!< 0x00200000 */
  4725. #define RTC_ALRMBR_HU_Pos (16U)
  4726. #define RTC_ALRMBR_HU_Msk (0xFU << RTC_ALRMBR_HU_Pos) /*!< 0x000F0000 */
  4727. #define RTC_ALRMBR_HU RTC_ALRMBR_HU_Msk
  4728. #define RTC_ALRMBR_HU_0 (0x1U << RTC_ALRMBR_HU_Pos) /*!< 0x00010000 */
  4729. #define RTC_ALRMBR_HU_1 (0x2U << RTC_ALRMBR_HU_Pos) /*!< 0x00020000 */
  4730. #define RTC_ALRMBR_HU_2 (0x4U << RTC_ALRMBR_HU_Pos) /*!< 0x00040000 */
  4731. #define RTC_ALRMBR_HU_3 (0x8U << RTC_ALRMBR_HU_Pos) /*!< 0x00080000 */
  4732. #define RTC_ALRMBR_MSK2_Pos (15U)
  4733. #define RTC_ALRMBR_MSK2_Msk (0x1U << RTC_ALRMBR_MSK2_Pos) /*!< 0x00008000 */
  4734. #define RTC_ALRMBR_MSK2 RTC_ALRMBR_MSK2_Msk
  4735. #define RTC_ALRMBR_MNT_Pos (12U)
  4736. #define RTC_ALRMBR_MNT_Msk (0x7U << RTC_ALRMBR_MNT_Pos) /*!< 0x00007000 */
  4737. #define RTC_ALRMBR_MNT RTC_ALRMBR_MNT_Msk
  4738. #define RTC_ALRMBR_MNT_0 (0x1U << RTC_ALRMBR_MNT_Pos) /*!< 0x00001000 */
  4739. #define RTC_ALRMBR_MNT_1 (0x2U << RTC_ALRMBR_MNT_Pos) /*!< 0x00002000 */
  4740. #define RTC_ALRMBR_MNT_2 (0x4U << RTC_ALRMBR_MNT_Pos) /*!< 0x00004000 */
  4741. #define RTC_ALRMBR_MNU_Pos (8U)
  4742. #define RTC_ALRMBR_MNU_Msk (0xFU << RTC_ALRMBR_MNU_Pos) /*!< 0x00000F00 */
  4743. #define RTC_ALRMBR_MNU RTC_ALRMBR_MNU_Msk
  4744. #define RTC_ALRMBR_MNU_0 (0x1U << RTC_ALRMBR_MNU_Pos) /*!< 0x00000100 */
  4745. #define RTC_ALRMBR_MNU_1 (0x2U << RTC_ALRMBR_MNU_Pos) /*!< 0x00000200 */
  4746. #define RTC_ALRMBR_MNU_2 (0x4U << RTC_ALRMBR_MNU_Pos) /*!< 0x00000400 */
  4747. #define RTC_ALRMBR_MNU_3 (0x8U << RTC_ALRMBR_MNU_Pos) /*!< 0x00000800 */
  4748. #define RTC_ALRMBR_MSK1_Pos (7U)
  4749. #define RTC_ALRMBR_MSK1_Msk (0x1U << RTC_ALRMBR_MSK1_Pos) /*!< 0x00000080 */
  4750. #define RTC_ALRMBR_MSK1 RTC_ALRMBR_MSK1_Msk
  4751. #define RTC_ALRMBR_ST_Pos (4U)
  4752. #define RTC_ALRMBR_ST_Msk (0x7U << RTC_ALRMBR_ST_Pos) /*!< 0x00000070 */
  4753. #define RTC_ALRMBR_ST RTC_ALRMBR_ST_Msk
  4754. #define RTC_ALRMBR_ST_0 (0x1U << RTC_ALRMBR_ST_Pos) /*!< 0x00000010 */
  4755. #define RTC_ALRMBR_ST_1 (0x2U << RTC_ALRMBR_ST_Pos) /*!< 0x00000020 */
  4756. #define RTC_ALRMBR_ST_2 (0x4U << RTC_ALRMBR_ST_Pos) /*!< 0x00000040 */
  4757. #define RTC_ALRMBR_SU_Pos (0U)
  4758. #define RTC_ALRMBR_SU_Msk (0xFU << RTC_ALRMBR_SU_Pos) /*!< 0x0000000F */
  4759. #define RTC_ALRMBR_SU RTC_ALRMBR_SU_Msk
  4760. #define RTC_ALRMBR_SU_0 (0x1U << RTC_ALRMBR_SU_Pos) /*!< 0x00000001 */
  4761. #define RTC_ALRMBR_SU_1 (0x2U << RTC_ALRMBR_SU_Pos) /*!< 0x00000002 */
  4762. #define RTC_ALRMBR_SU_2 (0x4U << RTC_ALRMBR_SU_Pos) /*!< 0x00000004 */
  4763. #define RTC_ALRMBR_SU_3 (0x8U << RTC_ALRMBR_SU_Pos) /*!< 0x00000008 */
  4764. /******************** Bits definition for RTC_WPR register ******************/
  4765. #define RTC_WPR_KEY_Pos (0U)
  4766. #define RTC_WPR_KEY_Msk (0xFFU << RTC_WPR_KEY_Pos) /*!< 0x000000FF */
  4767. #define RTC_WPR_KEY RTC_WPR_KEY_Msk
  4768. /******************** Bits definition for RTC_SSR register ******************/
  4769. #define RTC_SSR_SS_Pos (0U)
  4770. #define RTC_SSR_SS_Msk (0xFFFFU << RTC_SSR_SS_Pos) /*!< 0x0000FFFF */
  4771. #define RTC_SSR_SS RTC_SSR_SS_Msk
  4772. /******************** Bits definition for RTC_SHIFTR register ***************/
  4773. #define RTC_SHIFTR_SUBFS_Pos (0U)
  4774. #define RTC_SHIFTR_SUBFS_Msk (0x7FFFU << RTC_SHIFTR_SUBFS_Pos) /*!< 0x00007FFF */
  4775. #define RTC_SHIFTR_SUBFS RTC_SHIFTR_SUBFS_Msk
  4776. #define RTC_SHIFTR_ADD1S_Pos (31U)
  4777. #define RTC_SHIFTR_ADD1S_Msk (0x1U << RTC_SHIFTR_ADD1S_Pos) /*!< 0x80000000 */
  4778. #define RTC_SHIFTR_ADD1S RTC_SHIFTR_ADD1S_Msk
  4779. /******************** Bits definition for RTC_TSTR register *****************/
  4780. #define RTC_TSTR_PM_Pos (22U)
  4781. #define RTC_TSTR_PM_Msk (0x1U << RTC_TSTR_PM_Pos) /*!< 0x00400000 */
  4782. #define RTC_TSTR_PM RTC_TSTR_PM_Msk
  4783. #define RTC_TSTR_HT_Pos (20U)
  4784. #define RTC_TSTR_HT_Msk (0x3U << RTC_TSTR_HT_Pos) /*!< 0x00300000 */
  4785. #define RTC_TSTR_HT RTC_TSTR_HT_Msk
  4786. #define RTC_TSTR_HT_0 (0x1U << RTC_TSTR_HT_Pos) /*!< 0x00100000 */
  4787. #define RTC_TSTR_HT_1 (0x2U << RTC_TSTR_HT_Pos) /*!< 0x00200000 */
  4788. #define RTC_TSTR_HU_Pos (16U)
  4789. #define RTC_TSTR_HU_Msk (0xFU << RTC_TSTR_HU_Pos) /*!< 0x000F0000 */
  4790. #define RTC_TSTR_HU RTC_TSTR_HU_Msk
  4791. #define RTC_TSTR_HU_0 (0x1U << RTC_TSTR_HU_Pos) /*!< 0x00010000 */
  4792. #define RTC_TSTR_HU_1 (0x2U << RTC_TSTR_HU_Pos) /*!< 0x00020000 */
  4793. #define RTC_TSTR_HU_2 (0x4U << RTC_TSTR_HU_Pos) /*!< 0x00040000 */
  4794. #define RTC_TSTR_HU_3 (0x8U << RTC_TSTR_HU_Pos) /*!< 0x00080000 */
  4795. #define RTC_TSTR_MNT_Pos (12U)
  4796. #define RTC_TSTR_MNT_Msk (0x7U << RTC_TSTR_MNT_Pos) /*!< 0x00007000 */
  4797. #define RTC_TSTR_MNT RTC_TSTR_MNT_Msk
  4798. #define RTC_TSTR_MNT_0 (0x1U << RTC_TSTR_MNT_Pos) /*!< 0x00001000 */
  4799. #define RTC_TSTR_MNT_1 (0x2U << RTC_TSTR_MNT_Pos) /*!< 0x00002000 */
  4800. #define RTC_TSTR_MNT_2 (0x4U << RTC_TSTR_MNT_Pos) /*!< 0x00004000 */
  4801. #define RTC_TSTR_MNU_Pos (8U)
  4802. #define RTC_TSTR_MNU_Msk (0xFU << RTC_TSTR_MNU_Pos) /*!< 0x00000F00 */
  4803. #define RTC_TSTR_MNU RTC_TSTR_MNU_Msk
  4804. #define RTC_TSTR_MNU_0 (0x1U << RTC_TSTR_MNU_Pos) /*!< 0x00000100 */
  4805. #define RTC_TSTR_MNU_1 (0x2U << RTC_TSTR_MNU_Pos) /*!< 0x00000200 */
  4806. #define RTC_TSTR_MNU_2 (0x4U << RTC_TSTR_MNU_Pos) /*!< 0x00000400 */
  4807. #define RTC_TSTR_MNU_3 (0x8U << RTC_TSTR_MNU_Pos) /*!< 0x00000800 */
  4808. #define RTC_TSTR_ST_Pos (4U)
  4809. #define RTC_TSTR_ST_Msk (0x7U << RTC_TSTR_ST_Pos) /*!< 0x00000070 */
  4810. #define RTC_TSTR_ST RTC_TSTR_ST_Msk
  4811. #define RTC_TSTR_ST_0 (0x1U << RTC_TSTR_ST_Pos) /*!< 0x00000010 */
  4812. #define RTC_TSTR_ST_1 (0x2U << RTC_TSTR_ST_Pos) /*!< 0x00000020 */
  4813. #define RTC_TSTR_ST_2 (0x4U << RTC_TSTR_ST_Pos) /*!< 0x00000040 */
  4814. #define RTC_TSTR_SU_Pos (0U)
  4815. #define RTC_TSTR_SU_Msk (0xFU << RTC_TSTR_SU_Pos) /*!< 0x0000000F */
  4816. #define RTC_TSTR_SU RTC_TSTR_SU_Msk
  4817. #define RTC_TSTR_SU_0 (0x1U << RTC_TSTR_SU_Pos) /*!< 0x00000001 */
  4818. #define RTC_TSTR_SU_1 (0x2U << RTC_TSTR_SU_Pos) /*!< 0x00000002 */
  4819. #define RTC_TSTR_SU_2 (0x4U << RTC_TSTR_SU_Pos) /*!< 0x00000004 */
  4820. #define RTC_TSTR_SU_3 (0x8U << RTC_TSTR_SU_Pos) /*!< 0x00000008 */
  4821. /******************** Bits definition for RTC_TSDR register *****************/
  4822. #define RTC_TSDR_WDU_Pos (13U)
  4823. #define RTC_TSDR_WDU_Msk (0x7U << RTC_TSDR_WDU_Pos) /*!< 0x0000E000 */
  4824. #define RTC_TSDR_WDU RTC_TSDR_WDU_Msk
  4825. #define RTC_TSDR_WDU_0 (0x1U << RTC_TSDR_WDU_Pos) /*!< 0x00002000 */
  4826. #define RTC_TSDR_WDU_1 (0x2U << RTC_TSDR_WDU_Pos) /*!< 0x00004000 */
  4827. #define RTC_TSDR_WDU_2 (0x4U << RTC_TSDR_WDU_Pos) /*!< 0x00008000 */
  4828. #define RTC_TSDR_MT_Pos (12U)
  4829. #define RTC_TSDR_MT_Msk (0x1U << RTC_TSDR_MT_Pos) /*!< 0x00001000 */
  4830. #define RTC_TSDR_MT RTC_TSDR_MT_Msk
  4831. #define RTC_TSDR_MU_Pos (8U)
  4832. #define RTC_TSDR_MU_Msk (0xFU << RTC_TSDR_MU_Pos) /*!< 0x00000F00 */
  4833. #define RTC_TSDR_MU RTC_TSDR_MU_Msk
  4834. #define RTC_TSDR_MU_0 (0x1U << RTC_TSDR_MU_Pos) /*!< 0x00000100 */
  4835. #define RTC_TSDR_MU_1 (0x2U << RTC_TSDR_MU_Pos) /*!< 0x00000200 */
  4836. #define RTC_TSDR_MU_2 (0x4U << RTC_TSDR_MU_Pos) /*!< 0x00000400 */
  4837. #define RTC_TSDR_MU_3 (0x8U << RTC_TSDR_MU_Pos) /*!< 0x00000800 */
  4838. #define RTC_TSDR_DT_Pos (4U)
  4839. #define RTC_TSDR_DT_Msk (0x3U << RTC_TSDR_DT_Pos) /*!< 0x00000030 */
  4840. #define RTC_TSDR_DT RTC_TSDR_DT_Msk
  4841. #define RTC_TSDR_DT_0 (0x1U << RTC_TSDR_DT_Pos) /*!< 0x00000010 */
  4842. #define RTC_TSDR_DT_1 (0x2U << RTC_TSDR_DT_Pos) /*!< 0x00000020 */
  4843. #define RTC_TSDR_DU_Pos (0U)
  4844. #define RTC_TSDR_DU_Msk (0xFU << RTC_TSDR_DU_Pos) /*!< 0x0000000F */
  4845. #define RTC_TSDR_DU RTC_TSDR_DU_Msk
  4846. #define RTC_TSDR_DU_0 (0x1U << RTC_TSDR_DU_Pos) /*!< 0x00000001 */
  4847. #define RTC_TSDR_DU_1 (0x2U << RTC_TSDR_DU_Pos) /*!< 0x00000002 */
  4848. #define RTC_TSDR_DU_2 (0x4U << RTC_TSDR_DU_Pos) /*!< 0x00000004 */
  4849. #define RTC_TSDR_DU_3 (0x8U << RTC_TSDR_DU_Pos) /*!< 0x00000008 */
  4850. /******************** Bits definition for RTC_TSSSR register ****************/
  4851. #define RTC_TSSSR_SS_Pos (0U)
  4852. #define RTC_TSSSR_SS_Msk (0xFFFFU << RTC_TSSSR_SS_Pos) /*!< 0x0000FFFF */
  4853. #define RTC_TSSSR_SS RTC_TSSSR_SS_Msk
  4854. /******************** Bits definition for RTC_CAL register *****************/
  4855. #define RTC_CALR_CALP_Pos (15U)
  4856. #define RTC_CALR_CALP_Msk (0x1U << RTC_CALR_CALP_Pos) /*!< 0x00008000 */
  4857. #define RTC_CALR_CALP RTC_CALR_CALP_Msk
  4858. #define RTC_CALR_CALW8_Pos (14U)
  4859. #define RTC_CALR_CALW8_Msk (0x1U << RTC_CALR_CALW8_Pos) /*!< 0x00004000 */
  4860. #define RTC_CALR_CALW8 RTC_CALR_CALW8_Msk
  4861. #define RTC_CALR_CALW16_Pos (13U)
  4862. #define RTC_CALR_CALW16_Msk (0x1U << RTC_CALR_CALW16_Pos) /*!< 0x00002000 */
  4863. #define RTC_CALR_CALW16 RTC_CALR_CALW16_Msk
  4864. #define RTC_CALR_CALM_Pos (0U)
  4865. #define RTC_CALR_CALM_Msk (0x1FFU << RTC_CALR_CALM_Pos) /*!< 0x000001FF */
  4866. #define RTC_CALR_CALM RTC_CALR_CALM_Msk
  4867. #define RTC_CALR_CALM_0 (0x001U << RTC_CALR_CALM_Pos) /*!< 0x00000001 */
  4868. #define RTC_CALR_CALM_1 (0x002U << RTC_CALR_CALM_Pos) /*!< 0x00000002 */
  4869. #define RTC_CALR_CALM_2 (0x004U << RTC_CALR_CALM_Pos) /*!< 0x00000004 */
  4870. #define RTC_CALR_CALM_3 (0x008U << RTC_CALR_CALM_Pos) /*!< 0x00000008 */
  4871. #define RTC_CALR_CALM_4 (0x010U << RTC_CALR_CALM_Pos) /*!< 0x00000010 */
  4872. #define RTC_CALR_CALM_5 (0x020U << RTC_CALR_CALM_Pos) /*!< 0x00000020 */
  4873. #define RTC_CALR_CALM_6 (0x040U << RTC_CALR_CALM_Pos) /*!< 0x00000040 */
  4874. #define RTC_CALR_CALM_7 (0x080U << RTC_CALR_CALM_Pos) /*!< 0x00000080 */
  4875. #define RTC_CALR_CALM_8 (0x100U << RTC_CALR_CALM_Pos) /*!< 0x00000100 */
  4876. /******************** Bits definition for RTC_TAFCR register ****************/
  4877. #define RTC_TAFCR_ALARMOUTTYPE_Pos (18U)
  4878. #define RTC_TAFCR_ALARMOUTTYPE_Msk (0x1U << RTC_TAFCR_ALARMOUTTYPE_Pos) /*!< 0x00040000 */
  4879. #define RTC_TAFCR_ALARMOUTTYPE RTC_TAFCR_ALARMOUTTYPE_Msk
  4880. #define RTC_TAFCR_TSINSEL_Pos (17U)
  4881. #define RTC_TAFCR_TSINSEL_Msk (0x1U << RTC_TAFCR_TSINSEL_Pos) /*!< 0x00020000 */
  4882. #define RTC_TAFCR_TSINSEL RTC_TAFCR_TSINSEL_Msk
  4883. #define RTC_TAFCR_TAMP1INSEL_Pos (16U)
  4884. #define RTC_TAFCR_TAMP1INSEL_Msk (0x1U << RTC_TAFCR_TAMP1INSEL_Pos) /*!< 0x00010000 */
  4885. #define RTC_TAFCR_TAMP1INSEL RTC_TAFCR_TAMP1INSEL_Msk
  4886. #define RTC_TAFCR_TAMPPUDIS_Pos (15U)
  4887. #define RTC_TAFCR_TAMPPUDIS_Msk (0x1U << RTC_TAFCR_TAMPPUDIS_Pos) /*!< 0x00008000 */
  4888. #define RTC_TAFCR_TAMPPUDIS RTC_TAFCR_TAMPPUDIS_Msk
  4889. #define RTC_TAFCR_TAMPPRCH_Pos (13U)
  4890. #define RTC_TAFCR_TAMPPRCH_Msk (0x3U << RTC_TAFCR_TAMPPRCH_Pos) /*!< 0x00006000 */
  4891. #define RTC_TAFCR_TAMPPRCH RTC_TAFCR_TAMPPRCH_Msk
  4892. #define RTC_TAFCR_TAMPPRCH_0 (0x1U << RTC_TAFCR_TAMPPRCH_Pos) /*!< 0x00002000 */
  4893. #define RTC_TAFCR_TAMPPRCH_1 (0x2U << RTC_TAFCR_TAMPPRCH_Pos) /*!< 0x00004000 */
  4894. #define RTC_TAFCR_TAMPFLT_Pos (11U)
  4895. #define RTC_TAFCR_TAMPFLT_Msk (0x3U << RTC_TAFCR_TAMPFLT_Pos) /*!< 0x00001800 */
  4896. #define RTC_TAFCR_TAMPFLT RTC_TAFCR_TAMPFLT_Msk
  4897. #define RTC_TAFCR_TAMPFLT_0 (0x1U << RTC_TAFCR_TAMPFLT_Pos) /*!< 0x00000800 */
  4898. #define RTC_TAFCR_TAMPFLT_1 (0x2U << RTC_TAFCR_TAMPFLT_Pos) /*!< 0x00001000 */
  4899. #define RTC_TAFCR_TAMPFREQ_Pos (8U)
  4900. #define RTC_TAFCR_TAMPFREQ_Msk (0x7U << RTC_TAFCR_TAMPFREQ_Pos) /*!< 0x00000700 */
  4901. #define RTC_TAFCR_TAMPFREQ RTC_TAFCR_TAMPFREQ_Msk
  4902. #define RTC_TAFCR_TAMPFREQ_0 (0x1U << RTC_TAFCR_TAMPFREQ_Pos) /*!< 0x00000100 */
  4903. #define RTC_TAFCR_TAMPFREQ_1 (0x2U << RTC_TAFCR_TAMPFREQ_Pos) /*!< 0x00000200 */
  4904. #define RTC_TAFCR_TAMPFREQ_2 (0x4U << RTC_TAFCR_TAMPFREQ_Pos) /*!< 0x00000400 */
  4905. #define RTC_TAFCR_TAMPTS_Pos (7U)
  4906. #define RTC_TAFCR_TAMPTS_Msk (0x1U << RTC_TAFCR_TAMPTS_Pos) /*!< 0x00000080 */
  4907. #define RTC_TAFCR_TAMPTS RTC_TAFCR_TAMPTS_Msk
  4908. #define RTC_TAFCR_TAMP2TRG_Pos (4U)
  4909. #define RTC_TAFCR_TAMP2TRG_Msk (0x1U << RTC_TAFCR_TAMP2TRG_Pos) /*!< 0x00000010 */
  4910. #define RTC_TAFCR_TAMP2TRG RTC_TAFCR_TAMP2TRG_Msk
  4911. #define RTC_TAFCR_TAMP2E_Pos (3U)
  4912. #define RTC_TAFCR_TAMP2E_Msk (0x1U << RTC_TAFCR_TAMP2E_Pos) /*!< 0x00000008 */
  4913. #define RTC_TAFCR_TAMP2E RTC_TAFCR_TAMP2E_Msk
  4914. #define RTC_TAFCR_TAMPIE_Pos (2U)
  4915. #define RTC_TAFCR_TAMPIE_Msk (0x1U << RTC_TAFCR_TAMPIE_Pos) /*!< 0x00000004 */
  4916. #define RTC_TAFCR_TAMPIE RTC_TAFCR_TAMPIE_Msk
  4917. #define RTC_TAFCR_TAMP1TRG_Pos (1U)
  4918. #define RTC_TAFCR_TAMP1TRG_Msk (0x1U << RTC_TAFCR_TAMP1TRG_Pos) /*!< 0x00000002 */
  4919. #define RTC_TAFCR_TAMP1TRG RTC_TAFCR_TAMP1TRG_Msk
  4920. #define RTC_TAFCR_TAMP1E_Pos (0U)
  4921. #define RTC_TAFCR_TAMP1E_Msk (0x1U << RTC_TAFCR_TAMP1E_Pos) /*!< 0x00000001 */
  4922. #define RTC_TAFCR_TAMP1E RTC_TAFCR_TAMP1E_Msk
  4923. /* Legacy defines */
  4924. #define RTC_TAFCR_TAMPINSEL RTC_TAFCR_TAMP1INSEL
  4925. /******************** Bits definition for RTC_ALRMASSR register *************/
  4926. #define RTC_ALRMASSR_MASKSS_Pos (24U)
  4927. #define RTC_ALRMASSR_MASKSS_Msk (0xFU << RTC_ALRMASSR_MASKSS_Pos) /*!< 0x0F000000 */
  4928. #define RTC_ALRMASSR_MASKSS RTC_ALRMASSR_MASKSS_Msk
  4929. #define RTC_ALRMASSR_MASKSS_0 (0x1U << RTC_ALRMASSR_MASKSS_Pos) /*!< 0x01000000 */
  4930. #define RTC_ALRMASSR_MASKSS_1 (0x2U << RTC_ALRMASSR_MASKSS_Pos) /*!< 0x02000000 */
  4931. #define RTC_ALRMASSR_MASKSS_2 (0x4U << RTC_ALRMASSR_MASKSS_Pos) /*!< 0x04000000 */
  4932. #define RTC_ALRMASSR_MASKSS_3 (0x8U << RTC_ALRMASSR_MASKSS_Pos) /*!< 0x08000000 */
  4933. #define RTC_ALRMASSR_SS_Pos (0U)
  4934. #define RTC_ALRMASSR_SS_Msk (0x7FFFU << RTC_ALRMASSR_SS_Pos) /*!< 0x00007FFF */
  4935. #define RTC_ALRMASSR_SS RTC_ALRMASSR_SS_Msk
  4936. /******************** Bits definition for RTC_ALRMBSSR register *************/
  4937. #define RTC_ALRMBSSR_MASKSS_Pos (24U)
  4938. #define RTC_ALRMBSSR_MASKSS_Msk (0xFU << RTC_ALRMBSSR_MASKSS_Pos) /*!< 0x0F000000 */
  4939. #define RTC_ALRMBSSR_MASKSS RTC_ALRMBSSR_MASKSS_Msk
  4940. #define RTC_ALRMBSSR_MASKSS_0 (0x1U << RTC_ALRMBSSR_MASKSS_Pos) /*!< 0x01000000 */
  4941. #define RTC_ALRMBSSR_MASKSS_1 (0x2U << RTC_ALRMBSSR_MASKSS_Pos) /*!< 0x02000000 */
  4942. #define RTC_ALRMBSSR_MASKSS_2 (0x4U << RTC_ALRMBSSR_MASKSS_Pos) /*!< 0x04000000 */
  4943. #define RTC_ALRMBSSR_MASKSS_3 (0x8U << RTC_ALRMBSSR_MASKSS_Pos) /*!< 0x08000000 */
  4944. #define RTC_ALRMBSSR_SS_Pos (0U)
  4945. #define RTC_ALRMBSSR_SS_Msk (0x7FFFU << RTC_ALRMBSSR_SS_Pos) /*!< 0x00007FFF */
  4946. #define RTC_ALRMBSSR_SS RTC_ALRMBSSR_SS_Msk
  4947. /******************** Bits definition for RTC_BKP0R register ****************/
  4948. #define RTC_BKP0R_Pos (0U)
  4949. #define RTC_BKP0R_Msk (0xFFFFFFFFU << RTC_BKP0R_Pos) /*!< 0xFFFFFFFF */
  4950. #define RTC_BKP0R RTC_BKP0R_Msk
  4951. /******************** Bits definition for RTC_BKP1R register ****************/
  4952. #define RTC_BKP1R_Pos (0U)
  4953. #define RTC_BKP1R_Msk (0xFFFFFFFFU << RTC_BKP1R_Pos) /*!< 0xFFFFFFFF */
  4954. #define RTC_BKP1R RTC_BKP1R_Msk
  4955. /******************** Bits definition for RTC_BKP2R register ****************/
  4956. #define RTC_BKP2R_Pos (0U)
  4957. #define RTC_BKP2R_Msk (0xFFFFFFFFU << RTC_BKP2R_Pos) /*!< 0xFFFFFFFF */
  4958. #define RTC_BKP2R RTC_BKP2R_Msk
  4959. /******************** Bits definition for RTC_BKP3R register ****************/
  4960. #define RTC_BKP3R_Pos (0U)
  4961. #define RTC_BKP3R_Msk (0xFFFFFFFFU << RTC_BKP3R_Pos) /*!< 0xFFFFFFFF */
  4962. #define RTC_BKP3R RTC_BKP3R_Msk
  4963. /******************** Bits definition for RTC_BKP4R register ****************/
  4964. #define RTC_BKP4R_Pos (0U)
  4965. #define RTC_BKP4R_Msk (0xFFFFFFFFU << RTC_BKP4R_Pos) /*!< 0xFFFFFFFF */
  4966. #define RTC_BKP4R RTC_BKP4R_Msk
  4967. /******************** Bits definition for RTC_BKP5R register ****************/
  4968. #define RTC_BKP5R_Pos (0U)
  4969. #define RTC_BKP5R_Msk (0xFFFFFFFFU << RTC_BKP5R_Pos) /*!< 0xFFFFFFFF */
  4970. #define RTC_BKP5R RTC_BKP5R_Msk
  4971. /******************** Bits definition for RTC_BKP6R register ****************/
  4972. #define RTC_BKP6R_Pos (0U)
  4973. #define RTC_BKP6R_Msk (0xFFFFFFFFU << RTC_BKP6R_Pos) /*!< 0xFFFFFFFF */
  4974. #define RTC_BKP6R RTC_BKP6R_Msk
  4975. /******************** Bits definition for RTC_BKP7R register ****************/
  4976. #define RTC_BKP7R_Pos (0U)
  4977. #define RTC_BKP7R_Msk (0xFFFFFFFFU << RTC_BKP7R_Pos) /*!< 0xFFFFFFFF */
  4978. #define RTC_BKP7R RTC_BKP7R_Msk
  4979. /******************** Bits definition for RTC_BKP8R register ****************/
  4980. #define RTC_BKP8R_Pos (0U)
  4981. #define RTC_BKP8R_Msk (0xFFFFFFFFU << RTC_BKP8R_Pos) /*!< 0xFFFFFFFF */
  4982. #define RTC_BKP8R RTC_BKP8R_Msk
  4983. /******************** Bits definition for RTC_BKP9R register ****************/
  4984. #define RTC_BKP9R_Pos (0U)
  4985. #define RTC_BKP9R_Msk (0xFFFFFFFFU << RTC_BKP9R_Pos) /*!< 0xFFFFFFFF */
  4986. #define RTC_BKP9R RTC_BKP9R_Msk
  4987. /******************** Bits definition for RTC_BKP10R register ***************/
  4988. #define RTC_BKP10R_Pos (0U)
  4989. #define RTC_BKP10R_Msk (0xFFFFFFFFU << RTC_BKP10R_Pos) /*!< 0xFFFFFFFF */
  4990. #define RTC_BKP10R RTC_BKP10R_Msk
  4991. /******************** Bits definition for RTC_BKP11R register ***************/
  4992. #define RTC_BKP11R_Pos (0U)
  4993. #define RTC_BKP11R_Msk (0xFFFFFFFFU << RTC_BKP11R_Pos) /*!< 0xFFFFFFFF */
  4994. #define RTC_BKP11R RTC_BKP11R_Msk
  4995. /******************** Bits definition for RTC_BKP12R register ***************/
  4996. #define RTC_BKP12R_Pos (0U)
  4997. #define RTC_BKP12R_Msk (0xFFFFFFFFU << RTC_BKP12R_Pos) /*!< 0xFFFFFFFF */
  4998. #define RTC_BKP12R RTC_BKP12R_Msk
  4999. /******************** Bits definition for RTC_BKP13R register ***************/
  5000. #define RTC_BKP13R_Pos (0U)
  5001. #define RTC_BKP13R_Msk (0xFFFFFFFFU << RTC_BKP13R_Pos) /*!< 0xFFFFFFFF */
  5002. #define RTC_BKP13R RTC_BKP13R_Msk
  5003. /******************** Bits definition for RTC_BKP14R register ***************/
  5004. #define RTC_BKP14R_Pos (0U)
  5005. #define RTC_BKP14R_Msk (0xFFFFFFFFU << RTC_BKP14R_Pos) /*!< 0xFFFFFFFF */
  5006. #define RTC_BKP14R RTC_BKP14R_Msk
  5007. /******************** Bits definition for RTC_BKP15R register ***************/
  5008. #define RTC_BKP15R_Pos (0U)
  5009. #define RTC_BKP15R_Msk (0xFFFFFFFFU << RTC_BKP15R_Pos) /*!< 0xFFFFFFFF */
  5010. #define RTC_BKP15R RTC_BKP15R_Msk
  5011. /******************** Bits definition for RTC_BKP16R register ***************/
  5012. #define RTC_BKP16R_Pos (0U)
  5013. #define RTC_BKP16R_Msk (0xFFFFFFFFU << RTC_BKP16R_Pos) /*!< 0xFFFFFFFF */
  5014. #define RTC_BKP16R RTC_BKP16R_Msk
  5015. /******************** Bits definition for RTC_BKP17R register ***************/
  5016. #define RTC_BKP17R_Pos (0U)
  5017. #define RTC_BKP17R_Msk (0xFFFFFFFFU << RTC_BKP17R_Pos) /*!< 0xFFFFFFFF */
  5018. #define RTC_BKP17R RTC_BKP17R_Msk
  5019. /******************** Bits definition for RTC_BKP18R register ***************/
  5020. #define RTC_BKP18R_Pos (0U)
  5021. #define RTC_BKP18R_Msk (0xFFFFFFFFU << RTC_BKP18R_Pos) /*!< 0xFFFFFFFF */
  5022. #define RTC_BKP18R RTC_BKP18R_Msk
  5023. /******************** Bits definition for RTC_BKP19R register ***************/
  5024. #define RTC_BKP19R_Pos (0U)
  5025. #define RTC_BKP19R_Msk (0xFFFFFFFFU << RTC_BKP19R_Pos) /*!< 0xFFFFFFFF */
  5026. #define RTC_BKP19R RTC_BKP19R_Msk
  5027. /******************** Number of backup registers ******************************/
  5028. #define RTC_BKP_NUMBER 0x000000014U
  5029. /******************************************************************************/
  5030. /* */
  5031. /* SD host Interface */
  5032. /* */
  5033. /******************************************************************************/
  5034. /****************** Bit definition for SDIO_POWER register ******************/
  5035. #define SDIO_POWER_PWRCTRL_Pos (0U)
  5036. #define SDIO_POWER_PWRCTRL_Msk (0x3U << SDIO_POWER_PWRCTRL_Pos) /*!< 0x00000003 */
  5037. #define SDIO_POWER_PWRCTRL SDIO_POWER_PWRCTRL_Msk /*!<PWRCTRL[1:0] bits (Power supply control bits) */
  5038. #define SDIO_POWER_PWRCTRL_0 (0x1U << SDIO_POWER_PWRCTRL_Pos) /*!< 0x01 */
  5039. #define SDIO_POWER_PWRCTRL_1 (0x2U << SDIO_POWER_PWRCTRL_Pos) /*!< 0x02 */
  5040. /****************** Bit definition for SDIO_CLKCR register ******************/
  5041. #define SDIO_CLKCR_CLKDIV_Pos (0U)
  5042. #define SDIO_CLKCR_CLKDIV_Msk (0xFFU << SDIO_CLKCR_CLKDIV_Pos) /*!< 0x000000FF */
  5043. #define SDIO_CLKCR_CLKDIV SDIO_CLKCR_CLKDIV_Msk /*!<Clock divide factor */
  5044. #define SDIO_CLKCR_CLKEN_Pos (8U)
  5045. #define SDIO_CLKCR_CLKEN_Msk (0x1U << SDIO_CLKCR_CLKEN_Pos) /*!< 0x00000100 */
  5046. #define SDIO_CLKCR_CLKEN SDIO_CLKCR_CLKEN_Msk /*!<Clock enable bit */
  5047. #define SDIO_CLKCR_PWRSAV_Pos (9U)
  5048. #define SDIO_CLKCR_PWRSAV_Msk (0x1U << SDIO_CLKCR_PWRSAV_Pos) /*!< 0x00000200 */
  5049. #define SDIO_CLKCR_PWRSAV SDIO_CLKCR_PWRSAV_Msk /*!<Power saving configuration bit */
  5050. #define SDIO_CLKCR_BYPASS_Pos (10U)
  5051. #define SDIO_CLKCR_BYPASS_Msk (0x1U << SDIO_CLKCR_BYPASS_Pos) /*!< 0x00000400 */
  5052. #define SDIO_CLKCR_BYPASS SDIO_CLKCR_BYPASS_Msk /*!<Clock divider bypass enable bit */
  5053. #define SDIO_CLKCR_WIDBUS_Pos (11U)
  5054. #define SDIO_CLKCR_WIDBUS_Msk (0x3U << SDIO_CLKCR_WIDBUS_Pos) /*!< 0x00001800 */
  5055. #define SDIO_CLKCR_WIDBUS SDIO_CLKCR_WIDBUS_Msk /*!<WIDBUS[1:0] bits (Wide bus mode enable bit) */
  5056. #define SDIO_CLKCR_WIDBUS_0 (0x1U << SDIO_CLKCR_WIDBUS_Pos) /*!< 0x0800 */
  5057. #define SDIO_CLKCR_WIDBUS_1 (0x2U << SDIO_CLKCR_WIDBUS_Pos) /*!< 0x1000 */
  5058. #define SDIO_CLKCR_NEGEDGE_Pos (13U)
  5059. #define SDIO_CLKCR_NEGEDGE_Msk (0x1U << SDIO_CLKCR_NEGEDGE_Pos) /*!< 0x00002000 */
  5060. #define SDIO_CLKCR_NEGEDGE SDIO_CLKCR_NEGEDGE_Msk /*!<SDIO_CK dephasing selection bit */
  5061. #define SDIO_CLKCR_HWFC_EN_Pos (14U)
  5062. #define SDIO_CLKCR_HWFC_EN_Msk (0x1U << SDIO_CLKCR_HWFC_EN_Pos) /*!< 0x00004000 */
  5063. #define SDIO_CLKCR_HWFC_EN SDIO_CLKCR_HWFC_EN_Msk /*!<HW Flow Control enable */
  5064. /******************* Bit definition for SDIO_ARG register *******************/
  5065. #define SDIO_ARG_CMDARG_Pos (0U)
  5066. #define SDIO_ARG_CMDARG_Msk (0xFFFFFFFFU << SDIO_ARG_CMDARG_Pos) /*!< 0xFFFFFFFF */
  5067. #define SDIO_ARG_CMDARG SDIO_ARG_CMDARG_Msk /*!<Command argument */
  5068. /******************* Bit definition for SDIO_CMD register *******************/
  5069. #define SDIO_CMD_CMDINDEX_Pos (0U)
  5070. #define SDIO_CMD_CMDINDEX_Msk (0x3FU << SDIO_CMD_CMDINDEX_Pos) /*!< 0x0000003F */
  5071. #define SDIO_CMD_CMDINDEX SDIO_CMD_CMDINDEX_Msk /*!<Command Index */
  5072. #define SDIO_CMD_WAITRESP_Pos (6U)
  5073. #define SDIO_CMD_WAITRESP_Msk (0x3U << SDIO_CMD_WAITRESP_Pos) /*!< 0x000000C0 */
  5074. #define SDIO_CMD_WAITRESP SDIO_CMD_WAITRESP_Msk /*!<WAITRESP[1:0] bits (Wait for response bits) */
  5075. #define SDIO_CMD_WAITRESP_0 (0x1U << SDIO_CMD_WAITRESP_Pos) /*!< 0x0040 */
  5076. #define SDIO_CMD_WAITRESP_1 (0x2U << SDIO_CMD_WAITRESP_Pos) /*!< 0x0080 */
  5077. #define SDIO_CMD_WAITINT_Pos (8U)
  5078. #define SDIO_CMD_WAITINT_Msk (0x1U << SDIO_CMD_WAITINT_Pos) /*!< 0x00000100 */
  5079. #define SDIO_CMD_WAITINT SDIO_CMD_WAITINT_Msk /*!<CPSM Waits for Interrupt Request */
  5080. #define SDIO_CMD_WAITPEND_Pos (9U)
  5081. #define SDIO_CMD_WAITPEND_Msk (0x1U << SDIO_CMD_WAITPEND_Pos) /*!< 0x00000200 */
  5082. #define SDIO_CMD_WAITPEND SDIO_CMD_WAITPEND_Msk /*!<CPSM Waits for ends of data transfer (CmdPend internal signal) */
  5083. #define SDIO_CMD_CPSMEN_Pos (10U)
  5084. #define SDIO_CMD_CPSMEN_Msk (0x1U << SDIO_CMD_CPSMEN_Pos) /*!< 0x00000400 */
  5085. #define SDIO_CMD_CPSMEN SDIO_CMD_CPSMEN_Msk /*!<Command path state machine (CPSM) Enable bit */
  5086. #define SDIO_CMD_SDIOSUSPEND_Pos (11U)
  5087. #define SDIO_CMD_SDIOSUSPEND_Msk (0x1U << SDIO_CMD_SDIOSUSPEND_Pos) /*!< 0x00000800 */
  5088. #define SDIO_CMD_SDIOSUSPEND SDIO_CMD_SDIOSUSPEND_Msk /*!<SD I/O suspend command */
  5089. #define SDIO_CMD_ENCMDCOMPL_Pos (12U)
  5090. #define SDIO_CMD_ENCMDCOMPL_Msk (0x1U << SDIO_CMD_ENCMDCOMPL_Pos) /*!< 0x00001000 */
  5091. #define SDIO_CMD_ENCMDCOMPL SDIO_CMD_ENCMDCOMPL_Msk /*!<Enable CMD completion */
  5092. #define SDIO_CMD_NIEN_Pos (13U)
  5093. #define SDIO_CMD_NIEN_Msk (0x1U << SDIO_CMD_NIEN_Pos) /*!< 0x00002000 */
  5094. #define SDIO_CMD_NIEN SDIO_CMD_NIEN_Msk /*!<Not Interrupt Enable */
  5095. #define SDIO_CMD_CEATACMD_Pos (14U)
  5096. #define SDIO_CMD_CEATACMD_Msk (0x1U << SDIO_CMD_CEATACMD_Pos) /*!< 0x00004000 */
  5097. #define SDIO_CMD_CEATACMD SDIO_CMD_CEATACMD_Msk /*!<CE-ATA command */
  5098. /***************** Bit definition for SDIO_RESPCMD register *****************/
  5099. #define SDIO_RESPCMD_RESPCMD_Pos (0U)
  5100. #define SDIO_RESPCMD_RESPCMD_Msk (0x3FU << SDIO_RESPCMD_RESPCMD_Pos) /*!< 0x0000003F */
  5101. #define SDIO_RESPCMD_RESPCMD SDIO_RESPCMD_RESPCMD_Msk /*!<Response command index */
  5102. /****************** Bit definition for SDIO_RESP0 register ******************/
  5103. #define SDIO_RESP0_CARDSTATUS0_Pos (0U)
  5104. #define SDIO_RESP0_CARDSTATUS0_Msk (0xFFFFFFFFU << SDIO_RESP0_CARDSTATUS0_Pos) /*!< 0xFFFFFFFF */
  5105. #define SDIO_RESP0_CARDSTATUS0 SDIO_RESP0_CARDSTATUS0_Msk /*!<Card Status */
  5106. /****************** Bit definition for SDIO_RESP1 register ******************/
  5107. #define SDIO_RESP1_CARDSTATUS1_Pos (0U)
  5108. #define SDIO_RESP1_CARDSTATUS1_Msk (0xFFFFFFFFU << SDIO_RESP1_CARDSTATUS1_Pos) /*!< 0xFFFFFFFF */
  5109. #define SDIO_RESP1_CARDSTATUS1 SDIO_RESP1_CARDSTATUS1_Msk /*!<Card Status */
  5110. /****************** Bit definition for SDIO_RESP2 register ******************/
  5111. #define SDIO_RESP2_CARDSTATUS2_Pos (0U)
  5112. #define SDIO_RESP2_CARDSTATUS2_Msk (0xFFFFFFFFU << SDIO_RESP2_CARDSTATUS2_Pos) /*!< 0xFFFFFFFF */
  5113. #define SDIO_RESP2_CARDSTATUS2 SDIO_RESP2_CARDSTATUS2_Msk /*!<Card Status */
  5114. /****************** Bit definition for SDIO_RESP3 register ******************/
  5115. #define SDIO_RESP3_CARDSTATUS3_Pos (0U)
  5116. #define SDIO_RESP3_CARDSTATUS3_Msk (0xFFFFFFFFU << SDIO_RESP3_CARDSTATUS3_Pos) /*!< 0xFFFFFFFF */
  5117. #define SDIO_RESP3_CARDSTATUS3 SDIO_RESP3_CARDSTATUS3_Msk /*!<Card Status */
  5118. /****************** Bit definition for SDIO_RESP4 register ******************/
  5119. #define SDIO_RESP4_CARDSTATUS4_Pos (0U)
  5120. #define SDIO_RESP4_CARDSTATUS4_Msk (0xFFFFFFFFU << SDIO_RESP4_CARDSTATUS4_Pos) /*!< 0xFFFFFFFF */
  5121. #define SDIO_RESP4_CARDSTATUS4 SDIO_RESP4_CARDSTATUS4_Msk /*!<Card Status */
  5122. /****************** Bit definition for SDIO_DTIMER register *****************/
  5123. #define SDIO_DTIMER_DATATIME_Pos (0U)
  5124. #define SDIO_DTIMER_DATATIME_Msk (0xFFFFFFFFU << SDIO_DTIMER_DATATIME_Pos) /*!< 0xFFFFFFFF */
  5125. #define SDIO_DTIMER_DATATIME SDIO_DTIMER_DATATIME_Msk /*!<Data timeout period. */
  5126. /****************** Bit definition for SDIO_DLEN register *******************/
  5127. #define SDIO_DLEN_DATALENGTH_Pos (0U)
  5128. #define SDIO_DLEN_DATALENGTH_Msk (0x1FFFFFFU << SDIO_DLEN_DATALENGTH_Pos) /*!< 0x01FFFFFF */
  5129. #define SDIO_DLEN_DATALENGTH SDIO_DLEN_DATALENGTH_Msk /*!<Data length value */
  5130. /****************** Bit definition for SDIO_DCTRL register ******************/
  5131. #define SDIO_DCTRL_DTEN_Pos (0U)
  5132. #define SDIO_DCTRL_DTEN_Msk (0x1U << SDIO_DCTRL_DTEN_Pos) /*!< 0x00000001 */
  5133. #define SDIO_DCTRL_DTEN SDIO_DCTRL_DTEN_Msk /*!<Data transfer enabled bit */
  5134. #define SDIO_DCTRL_DTDIR_Pos (1U)
  5135. #define SDIO_DCTRL_DTDIR_Msk (0x1U << SDIO_DCTRL_DTDIR_Pos) /*!< 0x00000002 */
  5136. #define SDIO_DCTRL_DTDIR SDIO_DCTRL_DTDIR_Msk /*!<Data transfer direction selection */
  5137. #define SDIO_DCTRL_DTMODE_Pos (2U)
  5138. #define SDIO_DCTRL_DTMODE_Msk (0x1U << SDIO_DCTRL_DTMODE_Pos) /*!< 0x00000004 */
  5139. #define SDIO_DCTRL_DTMODE SDIO_DCTRL_DTMODE_Msk /*!<Data transfer mode selection */
  5140. #define SDIO_DCTRL_DMAEN_Pos (3U)
  5141. #define SDIO_DCTRL_DMAEN_Msk (0x1U << SDIO_DCTRL_DMAEN_Pos) /*!< 0x00000008 */
  5142. #define SDIO_DCTRL_DMAEN SDIO_DCTRL_DMAEN_Msk /*!<DMA enabled bit */
  5143. #define SDIO_DCTRL_DBLOCKSIZE_Pos (4U)
  5144. #define SDIO_DCTRL_DBLOCKSIZE_Msk (0xFU << SDIO_DCTRL_DBLOCKSIZE_Pos) /*!< 0x000000F0 */
  5145. #define SDIO_DCTRL_DBLOCKSIZE SDIO_DCTRL_DBLOCKSIZE_Msk /*!<DBLOCKSIZE[3:0] bits (Data block size) */
  5146. #define SDIO_DCTRL_DBLOCKSIZE_0 (0x1U << SDIO_DCTRL_DBLOCKSIZE_Pos) /*!< 0x0010 */
  5147. #define SDIO_DCTRL_DBLOCKSIZE_1 (0x2U << SDIO_DCTRL_DBLOCKSIZE_Pos) /*!< 0x0020 */
  5148. #define SDIO_DCTRL_DBLOCKSIZE_2 (0x4U << SDIO_DCTRL_DBLOCKSIZE_Pos) /*!< 0x0040 */
  5149. #define SDIO_DCTRL_DBLOCKSIZE_3 (0x8U << SDIO_DCTRL_DBLOCKSIZE_Pos) /*!< 0x0080 */
  5150. #define SDIO_DCTRL_RWSTART_Pos (8U)
  5151. #define SDIO_DCTRL_RWSTART_Msk (0x1U << SDIO_DCTRL_RWSTART_Pos) /*!< 0x00000100 */
  5152. #define SDIO_DCTRL_RWSTART SDIO_DCTRL_RWSTART_Msk /*!<Read wait start */
  5153. #define SDIO_DCTRL_RWSTOP_Pos (9U)
  5154. #define SDIO_DCTRL_RWSTOP_Msk (0x1U << SDIO_DCTRL_RWSTOP_Pos) /*!< 0x00000200 */
  5155. #define SDIO_DCTRL_RWSTOP SDIO_DCTRL_RWSTOP_Msk /*!<Read wait stop */
  5156. #define SDIO_DCTRL_RWMOD_Pos (10U)
  5157. #define SDIO_DCTRL_RWMOD_Msk (0x1U << SDIO_DCTRL_RWMOD_Pos) /*!< 0x00000400 */
  5158. #define SDIO_DCTRL_RWMOD SDIO_DCTRL_RWMOD_Msk /*!<Read wait mode */
  5159. #define SDIO_DCTRL_SDIOEN_Pos (11U)
  5160. #define SDIO_DCTRL_SDIOEN_Msk (0x1U << SDIO_DCTRL_SDIOEN_Pos) /*!< 0x00000800 */
  5161. #define SDIO_DCTRL_SDIOEN SDIO_DCTRL_SDIOEN_Msk /*!<SD I/O enable functions */
  5162. /****************** Bit definition for SDIO_DCOUNT register *****************/
  5163. #define SDIO_DCOUNT_DATACOUNT_Pos (0U)
  5164. #define SDIO_DCOUNT_DATACOUNT_Msk (0x1FFFFFFU << SDIO_DCOUNT_DATACOUNT_Pos) /*!< 0x01FFFFFF */
  5165. #define SDIO_DCOUNT_DATACOUNT SDIO_DCOUNT_DATACOUNT_Msk /*!<Data count value */
  5166. /****************** Bit definition for SDIO_STA register ********************/
  5167. #define SDIO_STA_CCRCFAIL_Pos (0U)
  5168. #define SDIO_STA_CCRCFAIL_Msk (0x1U << SDIO_STA_CCRCFAIL_Pos) /*!< 0x00000001 */
  5169. #define SDIO_STA_CCRCFAIL SDIO_STA_CCRCFAIL_Msk /*!<Command response received (CRC check failed) */
  5170. #define SDIO_STA_DCRCFAIL_Pos (1U)
  5171. #define SDIO_STA_DCRCFAIL_Msk (0x1U << SDIO_STA_DCRCFAIL_Pos) /*!< 0x00000002 */
  5172. #define SDIO_STA_DCRCFAIL SDIO_STA_DCRCFAIL_Msk /*!<Data block sent/received (CRC check failed) */
  5173. #define SDIO_STA_CTIMEOUT_Pos (2U)
  5174. #define SDIO_STA_CTIMEOUT_Msk (0x1U << SDIO_STA_CTIMEOUT_Pos) /*!< 0x00000004 */
  5175. #define SDIO_STA_CTIMEOUT SDIO_STA_CTIMEOUT_Msk /*!<Command response timeout */
  5176. #define SDIO_STA_DTIMEOUT_Pos (3U)
  5177. #define SDIO_STA_DTIMEOUT_Msk (0x1U << SDIO_STA_DTIMEOUT_Pos) /*!< 0x00000008 */
  5178. #define SDIO_STA_DTIMEOUT SDIO_STA_DTIMEOUT_Msk /*!<Data timeout */
  5179. #define SDIO_STA_TXUNDERR_Pos (4U)
  5180. #define SDIO_STA_TXUNDERR_Msk (0x1U << SDIO_STA_TXUNDERR_Pos) /*!< 0x00000010 */
  5181. #define SDIO_STA_TXUNDERR SDIO_STA_TXUNDERR_Msk /*!<Transmit FIFO underrun error */
  5182. #define SDIO_STA_RXOVERR_Pos (5U)
  5183. #define SDIO_STA_RXOVERR_Msk (0x1U << SDIO_STA_RXOVERR_Pos) /*!< 0x00000020 */
  5184. #define SDIO_STA_RXOVERR SDIO_STA_RXOVERR_Msk /*!<Received FIFO overrun error */
  5185. #define SDIO_STA_CMDREND_Pos (6U)
  5186. #define SDIO_STA_CMDREND_Msk (0x1U << SDIO_STA_CMDREND_Pos) /*!< 0x00000040 */
  5187. #define SDIO_STA_CMDREND SDIO_STA_CMDREND_Msk /*!<Command response received (CRC check passed) */
  5188. #define SDIO_STA_CMDSENT_Pos (7U)
  5189. #define SDIO_STA_CMDSENT_Msk (0x1U << SDIO_STA_CMDSENT_Pos) /*!< 0x00000080 */
  5190. #define SDIO_STA_CMDSENT SDIO_STA_CMDSENT_Msk /*!<Command sent (no response required) */
  5191. #define SDIO_STA_DATAEND_Pos (8U)
  5192. #define SDIO_STA_DATAEND_Msk (0x1U << SDIO_STA_DATAEND_Pos) /*!< 0x00000100 */
  5193. #define SDIO_STA_DATAEND SDIO_STA_DATAEND_Msk /*!<Data end (data counter, SDIDCOUNT, is zero) */
  5194. #define SDIO_STA_STBITERR_Pos (9U)
  5195. #define SDIO_STA_STBITERR_Msk (0x1U << SDIO_STA_STBITERR_Pos) /*!< 0x00000200 */
  5196. #define SDIO_STA_STBITERR SDIO_STA_STBITERR_Msk /*!<Start bit not detected on all data signals in wide bus mode */
  5197. #define SDIO_STA_DBCKEND_Pos (10U)
  5198. #define SDIO_STA_DBCKEND_Msk (0x1U << SDIO_STA_DBCKEND_Pos) /*!< 0x00000400 */
  5199. #define SDIO_STA_DBCKEND SDIO_STA_DBCKEND_Msk /*!<Data block sent/received (CRC check passed) */
  5200. #define SDIO_STA_CMDACT_Pos (11U)
  5201. #define SDIO_STA_CMDACT_Msk (0x1U << SDIO_STA_CMDACT_Pos) /*!< 0x00000800 */
  5202. #define SDIO_STA_CMDACT SDIO_STA_CMDACT_Msk /*!<Command transfer in progress */
  5203. #define SDIO_STA_TXACT_Pos (12U)
  5204. #define SDIO_STA_TXACT_Msk (0x1U << SDIO_STA_TXACT_Pos) /*!< 0x00001000 */
  5205. #define SDIO_STA_TXACT SDIO_STA_TXACT_Msk /*!<Data transmit in progress */
  5206. #define SDIO_STA_RXACT_Pos (13U)
  5207. #define SDIO_STA_RXACT_Msk (0x1U << SDIO_STA_RXACT_Pos) /*!< 0x00002000 */
  5208. #define SDIO_STA_RXACT SDIO_STA_RXACT_Msk /*!<Data receive in progress */
  5209. #define SDIO_STA_TXFIFOHE_Pos (14U)
  5210. #define SDIO_STA_TXFIFOHE_Msk (0x1U << SDIO_STA_TXFIFOHE_Pos) /*!< 0x00004000 */
  5211. #define SDIO_STA_TXFIFOHE SDIO_STA_TXFIFOHE_Msk /*!<Transmit FIFO Half Empty: at least 8 words can be written into the FIFO */
  5212. #define SDIO_STA_RXFIFOHF_Pos (15U)
  5213. #define SDIO_STA_RXFIFOHF_Msk (0x1U << SDIO_STA_RXFIFOHF_Pos) /*!< 0x00008000 */
  5214. #define SDIO_STA_RXFIFOHF SDIO_STA_RXFIFOHF_Msk /*!<Receive FIFO Half Full: there are at least 8 words in the FIFO */
  5215. #define SDIO_STA_TXFIFOF_Pos (16U)
  5216. #define SDIO_STA_TXFIFOF_Msk (0x1U << SDIO_STA_TXFIFOF_Pos) /*!< 0x00010000 */
  5217. #define SDIO_STA_TXFIFOF SDIO_STA_TXFIFOF_Msk /*!<Transmit FIFO full */
  5218. #define SDIO_STA_RXFIFOF_Pos (17U)
  5219. #define SDIO_STA_RXFIFOF_Msk (0x1U << SDIO_STA_RXFIFOF_Pos) /*!< 0x00020000 */
  5220. #define SDIO_STA_RXFIFOF SDIO_STA_RXFIFOF_Msk /*!<Receive FIFO full */
  5221. #define SDIO_STA_TXFIFOE_Pos (18U)
  5222. #define SDIO_STA_TXFIFOE_Msk (0x1U << SDIO_STA_TXFIFOE_Pos) /*!< 0x00040000 */
  5223. #define SDIO_STA_TXFIFOE SDIO_STA_TXFIFOE_Msk /*!<Transmit FIFO empty */
  5224. #define SDIO_STA_RXFIFOE_Pos (19U)
  5225. #define SDIO_STA_RXFIFOE_Msk (0x1U << SDIO_STA_RXFIFOE_Pos) /*!< 0x00080000 */
  5226. #define SDIO_STA_RXFIFOE SDIO_STA_RXFIFOE_Msk /*!<Receive FIFO empty */
  5227. #define SDIO_STA_TXDAVL_Pos (20U)
  5228. #define SDIO_STA_TXDAVL_Msk (0x1U << SDIO_STA_TXDAVL_Pos) /*!< 0x00100000 */
  5229. #define SDIO_STA_TXDAVL SDIO_STA_TXDAVL_Msk /*!<Data available in transmit FIFO */
  5230. #define SDIO_STA_RXDAVL_Pos (21U)
  5231. #define SDIO_STA_RXDAVL_Msk (0x1U << SDIO_STA_RXDAVL_Pos) /*!< 0x00200000 */
  5232. #define SDIO_STA_RXDAVL SDIO_STA_RXDAVL_Msk /*!<Data available in receive FIFO */
  5233. #define SDIO_STA_SDIOIT_Pos (22U)
  5234. #define SDIO_STA_SDIOIT_Msk (0x1U << SDIO_STA_SDIOIT_Pos) /*!< 0x00400000 */
  5235. #define SDIO_STA_SDIOIT SDIO_STA_SDIOIT_Msk /*!<SDIO interrupt received */
  5236. #define SDIO_STA_CEATAEND_Pos (23U)
  5237. #define SDIO_STA_CEATAEND_Msk (0x1U << SDIO_STA_CEATAEND_Pos) /*!< 0x00800000 */
  5238. #define SDIO_STA_CEATAEND SDIO_STA_CEATAEND_Msk /*!<CE-ATA command completion signal received for CMD61 */
  5239. /******************* Bit definition for SDIO_ICR register *******************/
  5240. #define SDIO_ICR_CCRCFAILC_Pos (0U)
  5241. #define SDIO_ICR_CCRCFAILC_Msk (0x1U << SDIO_ICR_CCRCFAILC_Pos) /*!< 0x00000001 */
  5242. #define SDIO_ICR_CCRCFAILC SDIO_ICR_CCRCFAILC_Msk /*!<CCRCFAIL flag clear bit */
  5243. #define SDIO_ICR_DCRCFAILC_Pos (1U)
  5244. #define SDIO_ICR_DCRCFAILC_Msk (0x1U << SDIO_ICR_DCRCFAILC_Pos) /*!< 0x00000002 */
  5245. #define SDIO_ICR_DCRCFAILC SDIO_ICR_DCRCFAILC_Msk /*!<DCRCFAIL flag clear bit */
  5246. #define SDIO_ICR_CTIMEOUTC_Pos (2U)
  5247. #define SDIO_ICR_CTIMEOUTC_Msk (0x1U << SDIO_ICR_CTIMEOUTC_Pos) /*!< 0x00000004 */
  5248. #define SDIO_ICR_CTIMEOUTC SDIO_ICR_CTIMEOUTC_Msk /*!<CTIMEOUT flag clear bit */
  5249. #define SDIO_ICR_DTIMEOUTC_Pos (3U)
  5250. #define SDIO_ICR_DTIMEOUTC_Msk (0x1U << SDIO_ICR_DTIMEOUTC_Pos) /*!< 0x00000008 */
  5251. #define SDIO_ICR_DTIMEOUTC SDIO_ICR_DTIMEOUTC_Msk /*!<DTIMEOUT flag clear bit */
  5252. #define SDIO_ICR_TXUNDERRC_Pos (4U)
  5253. #define SDIO_ICR_TXUNDERRC_Msk (0x1U << SDIO_ICR_TXUNDERRC_Pos) /*!< 0x00000010 */
  5254. #define SDIO_ICR_TXUNDERRC SDIO_ICR_TXUNDERRC_Msk /*!<TXUNDERR flag clear bit */
  5255. #define SDIO_ICR_RXOVERRC_Pos (5U)
  5256. #define SDIO_ICR_RXOVERRC_Msk (0x1U << SDIO_ICR_RXOVERRC_Pos) /*!< 0x00000020 */
  5257. #define SDIO_ICR_RXOVERRC SDIO_ICR_RXOVERRC_Msk /*!<RXOVERR flag clear bit */
  5258. #define SDIO_ICR_CMDRENDC_Pos (6U)
  5259. #define SDIO_ICR_CMDRENDC_Msk (0x1U << SDIO_ICR_CMDRENDC_Pos) /*!< 0x00000040 */
  5260. #define SDIO_ICR_CMDRENDC SDIO_ICR_CMDRENDC_Msk /*!<CMDREND flag clear bit */
  5261. #define SDIO_ICR_CMDSENTC_Pos (7U)
  5262. #define SDIO_ICR_CMDSENTC_Msk (0x1U << SDIO_ICR_CMDSENTC_Pos) /*!< 0x00000080 */
  5263. #define SDIO_ICR_CMDSENTC SDIO_ICR_CMDSENTC_Msk /*!<CMDSENT flag clear bit */
  5264. #define SDIO_ICR_DATAENDC_Pos (8U)
  5265. #define SDIO_ICR_DATAENDC_Msk (0x1U << SDIO_ICR_DATAENDC_Pos) /*!< 0x00000100 */
  5266. #define SDIO_ICR_DATAENDC SDIO_ICR_DATAENDC_Msk /*!<DATAEND flag clear bit */
  5267. #define SDIO_ICR_STBITERRC_Pos (9U)
  5268. #define SDIO_ICR_STBITERRC_Msk (0x1U << SDIO_ICR_STBITERRC_Pos) /*!< 0x00000200 */
  5269. #define SDIO_ICR_STBITERRC SDIO_ICR_STBITERRC_Msk /*!<STBITERR flag clear bit */
  5270. #define SDIO_ICR_DBCKENDC_Pos (10U)
  5271. #define SDIO_ICR_DBCKENDC_Msk (0x1U << SDIO_ICR_DBCKENDC_Pos) /*!< 0x00000400 */
  5272. #define SDIO_ICR_DBCKENDC SDIO_ICR_DBCKENDC_Msk /*!<DBCKEND flag clear bit */
  5273. #define SDIO_ICR_SDIOITC_Pos (22U)
  5274. #define SDIO_ICR_SDIOITC_Msk (0x1U << SDIO_ICR_SDIOITC_Pos) /*!< 0x00400000 */
  5275. #define SDIO_ICR_SDIOITC SDIO_ICR_SDIOITC_Msk /*!<SDIOIT flag clear bit */
  5276. #define SDIO_ICR_CEATAENDC_Pos (23U)
  5277. #define SDIO_ICR_CEATAENDC_Msk (0x1U << SDIO_ICR_CEATAENDC_Pos) /*!< 0x00800000 */
  5278. #define SDIO_ICR_CEATAENDC SDIO_ICR_CEATAENDC_Msk /*!<CEATAEND flag clear bit */
  5279. /****************** Bit definition for SDIO_MASK register *******************/
  5280. #define SDIO_MASK_CCRCFAILIE_Pos (0U)
  5281. #define SDIO_MASK_CCRCFAILIE_Msk (0x1U << SDIO_MASK_CCRCFAILIE_Pos) /*!< 0x00000001 */
  5282. #define SDIO_MASK_CCRCFAILIE SDIO_MASK_CCRCFAILIE_Msk /*!<Command CRC Fail Interrupt Enable */
  5283. #define SDIO_MASK_DCRCFAILIE_Pos (1U)
  5284. #define SDIO_MASK_DCRCFAILIE_Msk (0x1U << SDIO_MASK_DCRCFAILIE_Pos) /*!< 0x00000002 */
  5285. #define SDIO_MASK_DCRCFAILIE SDIO_MASK_DCRCFAILIE_Msk /*!<Data CRC Fail Interrupt Enable */
  5286. #define SDIO_MASK_CTIMEOUTIE_Pos (2U)
  5287. #define SDIO_MASK_CTIMEOUTIE_Msk (0x1U << SDIO_MASK_CTIMEOUTIE_Pos) /*!< 0x00000004 */
  5288. #define SDIO_MASK_CTIMEOUTIE SDIO_MASK_CTIMEOUTIE_Msk /*!<Command TimeOut Interrupt Enable */
  5289. #define SDIO_MASK_DTIMEOUTIE_Pos (3U)
  5290. #define SDIO_MASK_DTIMEOUTIE_Msk (0x1U << SDIO_MASK_DTIMEOUTIE_Pos) /*!< 0x00000008 */
  5291. #define SDIO_MASK_DTIMEOUTIE SDIO_MASK_DTIMEOUTIE_Msk /*!<Data TimeOut Interrupt Enable */
  5292. #define SDIO_MASK_TXUNDERRIE_Pos (4U)
  5293. #define SDIO_MASK_TXUNDERRIE_Msk (0x1U << SDIO_MASK_TXUNDERRIE_Pos) /*!< 0x00000010 */
  5294. #define SDIO_MASK_TXUNDERRIE SDIO_MASK_TXUNDERRIE_Msk /*!<Tx FIFO UnderRun Error Interrupt Enable */
  5295. #define SDIO_MASK_RXOVERRIE_Pos (5U)
  5296. #define SDIO_MASK_RXOVERRIE_Msk (0x1U << SDIO_MASK_RXOVERRIE_Pos) /*!< 0x00000020 */
  5297. #define SDIO_MASK_RXOVERRIE SDIO_MASK_RXOVERRIE_Msk /*!<Rx FIFO OverRun Error Interrupt Enable */
  5298. #define SDIO_MASK_CMDRENDIE_Pos (6U)
  5299. #define SDIO_MASK_CMDRENDIE_Msk (0x1U << SDIO_MASK_CMDRENDIE_Pos) /*!< 0x00000040 */
  5300. #define SDIO_MASK_CMDRENDIE SDIO_MASK_CMDRENDIE_Msk /*!<Command Response Received Interrupt Enable */
  5301. #define SDIO_MASK_CMDSENTIE_Pos (7U)
  5302. #define SDIO_MASK_CMDSENTIE_Msk (0x1U << SDIO_MASK_CMDSENTIE_Pos) /*!< 0x00000080 */
  5303. #define SDIO_MASK_CMDSENTIE SDIO_MASK_CMDSENTIE_Msk /*!<Command Sent Interrupt Enable */
  5304. #define SDIO_MASK_DATAENDIE_Pos (8U)
  5305. #define SDIO_MASK_DATAENDIE_Msk (0x1U << SDIO_MASK_DATAENDIE_Pos) /*!< 0x00000100 */
  5306. #define SDIO_MASK_DATAENDIE SDIO_MASK_DATAENDIE_Msk /*!<Data End Interrupt Enable */
  5307. #define SDIO_MASK_STBITERRIE_Pos (9U)
  5308. #define SDIO_MASK_STBITERRIE_Msk (0x1U << SDIO_MASK_STBITERRIE_Pos) /*!< 0x00000200 */
  5309. #define SDIO_MASK_STBITERRIE SDIO_MASK_STBITERRIE_Msk /*!<Start Bit Error Interrupt Enable */
  5310. #define SDIO_MASK_DBCKENDIE_Pos (10U)
  5311. #define SDIO_MASK_DBCKENDIE_Msk (0x1U << SDIO_MASK_DBCKENDIE_Pos) /*!< 0x00000400 */
  5312. #define SDIO_MASK_DBCKENDIE SDIO_MASK_DBCKENDIE_Msk /*!<Data Block End Interrupt Enable */
  5313. #define SDIO_MASK_CMDACTIE_Pos (11U)
  5314. #define SDIO_MASK_CMDACTIE_Msk (0x1U << SDIO_MASK_CMDACTIE_Pos) /*!< 0x00000800 */
  5315. #define SDIO_MASK_CMDACTIE SDIO_MASK_CMDACTIE_Msk /*!<CCommand Acting Interrupt Enable */
  5316. #define SDIO_MASK_TXACTIE_Pos (12U)
  5317. #define SDIO_MASK_TXACTIE_Msk (0x1U << SDIO_MASK_TXACTIE_Pos) /*!< 0x00001000 */
  5318. #define SDIO_MASK_TXACTIE SDIO_MASK_TXACTIE_Msk /*!<Data Transmit Acting Interrupt Enable */
  5319. #define SDIO_MASK_RXACTIE_Pos (13U)
  5320. #define SDIO_MASK_RXACTIE_Msk (0x1U << SDIO_MASK_RXACTIE_Pos) /*!< 0x00002000 */
  5321. #define SDIO_MASK_RXACTIE SDIO_MASK_RXACTIE_Msk /*!<Data receive acting interrupt enabled */
  5322. #define SDIO_MASK_TXFIFOHEIE_Pos (14U)
  5323. #define SDIO_MASK_TXFIFOHEIE_Msk (0x1U << SDIO_MASK_TXFIFOHEIE_Pos) /*!< 0x00004000 */
  5324. #define SDIO_MASK_TXFIFOHEIE SDIO_MASK_TXFIFOHEIE_Msk /*!<Tx FIFO Half Empty interrupt Enable */
  5325. #define SDIO_MASK_RXFIFOHFIE_Pos (15U)
  5326. #define SDIO_MASK_RXFIFOHFIE_Msk (0x1U << SDIO_MASK_RXFIFOHFIE_Pos) /*!< 0x00008000 */
  5327. #define SDIO_MASK_RXFIFOHFIE SDIO_MASK_RXFIFOHFIE_Msk /*!<Rx FIFO Half Full interrupt Enable */
  5328. #define SDIO_MASK_TXFIFOFIE_Pos (16U)
  5329. #define SDIO_MASK_TXFIFOFIE_Msk (0x1U << SDIO_MASK_TXFIFOFIE_Pos) /*!< 0x00010000 */
  5330. #define SDIO_MASK_TXFIFOFIE SDIO_MASK_TXFIFOFIE_Msk /*!<Tx FIFO Full interrupt Enable */
  5331. #define SDIO_MASK_RXFIFOFIE_Pos (17U)
  5332. #define SDIO_MASK_RXFIFOFIE_Msk (0x1U << SDIO_MASK_RXFIFOFIE_Pos) /*!< 0x00020000 */
  5333. #define SDIO_MASK_RXFIFOFIE SDIO_MASK_RXFIFOFIE_Msk /*!<Rx FIFO Full interrupt Enable */
  5334. #define SDIO_MASK_TXFIFOEIE_Pos (18U)
  5335. #define SDIO_MASK_TXFIFOEIE_Msk (0x1U << SDIO_MASK_TXFIFOEIE_Pos) /*!< 0x00040000 */
  5336. #define SDIO_MASK_TXFIFOEIE SDIO_MASK_TXFIFOEIE_Msk /*!<Tx FIFO Empty interrupt Enable */
  5337. #define SDIO_MASK_RXFIFOEIE_Pos (19U)
  5338. #define SDIO_MASK_RXFIFOEIE_Msk (0x1U << SDIO_MASK_RXFIFOEIE_Pos) /*!< 0x00080000 */
  5339. #define SDIO_MASK_RXFIFOEIE SDIO_MASK_RXFIFOEIE_Msk /*!<Rx FIFO Empty interrupt Enable */
  5340. #define SDIO_MASK_TXDAVLIE_Pos (20U)
  5341. #define SDIO_MASK_TXDAVLIE_Msk (0x1U << SDIO_MASK_TXDAVLIE_Pos) /*!< 0x00100000 */
  5342. #define SDIO_MASK_TXDAVLIE SDIO_MASK_TXDAVLIE_Msk /*!<Data available in Tx FIFO interrupt Enable */
  5343. #define SDIO_MASK_RXDAVLIE_Pos (21U)
  5344. #define SDIO_MASK_RXDAVLIE_Msk (0x1U << SDIO_MASK_RXDAVLIE_Pos) /*!< 0x00200000 */
  5345. #define SDIO_MASK_RXDAVLIE SDIO_MASK_RXDAVLIE_Msk /*!<Data available in Rx FIFO interrupt Enable */
  5346. #define SDIO_MASK_SDIOITIE_Pos (22U)
  5347. #define SDIO_MASK_SDIOITIE_Msk (0x1U << SDIO_MASK_SDIOITIE_Pos) /*!< 0x00400000 */
  5348. #define SDIO_MASK_SDIOITIE SDIO_MASK_SDIOITIE_Msk /*!<SDIO Mode Interrupt Received interrupt Enable */
  5349. #define SDIO_MASK_CEATAENDIE_Pos (23U)
  5350. #define SDIO_MASK_CEATAENDIE_Msk (0x1U << SDIO_MASK_CEATAENDIE_Pos) /*!< 0x00800000 */
  5351. #define SDIO_MASK_CEATAENDIE SDIO_MASK_CEATAENDIE_Msk /*!<CE-ATA command completion signal received Interrupt Enable */
  5352. /***************** Bit definition for SDIO_FIFOCNT register *****************/
  5353. #define SDIO_FIFOCNT_FIFOCOUNT_Pos (0U)
  5354. #define SDIO_FIFOCNT_FIFOCOUNT_Msk (0xFFFFFFU << SDIO_FIFOCNT_FIFOCOUNT_Pos) /*!< 0x00FFFFFF */
  5355. #define SDIO_FIFOCNT_FIFOCOUNT SDIO_FIFOCNT_FIFOCOUNT_Msk /*!<Remaining number of words to be written to or read from the FIFO */
  5356. /****************** Bit definition for SDIO_FIFO register *******************/
  5357. #define SDIO_FIFO_FIFODATA_Pos (0U)
  5358. #define SDIO_FIFO_FIFODATA_Msk (0xFFFFFFFFU << SDIO_FIFO_FIFODATA_Pos) /*!< 0xFFFFFFFF */
  5359. #define SDIO_FIFO_FIFODATA SDIO_FIFO_FIFODATA_Msk /*!<Receive and transmit FIFO data */
  5360. /******************************************************************************/
  5361. /* */
  5362. /* Serial Peripheral Interface */
  5363. /* */
  5364. /******************************************************************************/
  5365. #define SPI_I2S_FULLDUPLEX_SUPPORT /*!< I2S Full-Duplex support */
  5366. /******************* Bit definition for SPI_CR1 register ********************/
  5367. #define SPI_CR1_CPHA_Pos (0U)
  5368. #define SPI_CR1_CPHA_Msk (0x1U << SPI_CR1_CPHA_Pos) /*!< 0x00000001 */
  5369. #define SPI_CR1_CPHA SPI_CR1_CPHA_Msk /*!<Clock Phase */
  5370. #define SPI_CR1_CPOL_Pos (1U)
  5371. #define SPI_CR1_CPOL_Msk (0x1U << SPI_CR1_CPOL_Pos) /*!< 0x00000002 */
  5372. #define SPI_CR1_CPOL SPI_CR1_CPOL_Msk /*!<Clock Polarity */
  5373. #define SPI_CR1_MSTR_Pos (2U)
  5374. #define SPI_CR1_MSTR_Msk (0x1U << SPI_CR1_MSTR_Pos) /*!< 0x00000004 */
  5375. #define SPI_CR1_MSTR SPI_CR1_MSTR_Msk /*!<Master Selection */
  5376. #define SPI_CR1_BR_Pos (3U)
  5377. #define SPI_CR1_BR_Msk (0x7U << SPI_CR1_BR_Pos) /*!< 0x00000038 */
  5378. #define SPI_CR1_BR SPI_CR1_BR_Msk /*!<BR[2:0] bits (Baud Rate Control) */
  5379. #define SPI_CR1_BR_0 (0x1U << SPI_CR1_BR_Pos) /*!< 0x00000008 */
  5380. #define SPI_CR1_BR_1 (0x2U << SPI_CR1_BR_Pos) /*!< 0x00000010 */
  5381. #define SPI_CR1_BR_2 (0x4U << SPI_CR1_BR_Pos) /*!< 0x00000020 */
  5382. #define SPI_CR1_SPE_Pos (6U)
  5383. #define SPI_CR1_SPE_Msk (0x1U << SPI_CR1_SPE_Pos) /*!< 0x00000040 */
  5384. #define SPI_CR1_SPE SPI_CR1_SPE_Msk /*!<SPI Enable */
  5385. #define SPI_CR1_LSBFIRST_Pos (7U)
  5386. #define SPI_CR1_LSBFIRST_Msk (0x1U << SPI_CR1_LSBFIRST_Pos) /*!< 0x00000080 */
  5387. #define SPI_CR1_LSBFIRST SPI_CR1_LSBFIRST_Msk /*!<Frame Format */
  5388. #define SPI_CR1_SSI_Pos (8U)
  5389. #define SPI_CR1_SSI_Msk (0x1U << SPI_CR1_SSI_Pos) /*!< 0x00000100 */
  5390. #define SPI_CR1_SSI SPI_CR1_SSI_Msk /*!<Internal slave select */
  5391. #define SPI_CR1_SSM_Pos (9U)
  5392. #define SPI_CR1_SSM_Msk (0x1U << SPI_CR1_SSM_Pos) /*!< 0x00000200 */
  5393. #define SPI_CR1_SSM SPI_CR1_SSM_Msk /*!<Software slave management */
  5394. #define SPI_CR1_RXONLY_Pos (10U)
  5395. #define SPI_CR1_RXONLY_Msk (0x1U << SPI_CR1_RXONLY_Pos) /*!< 0x00000400 */
  5396. #define SPI_CR1_RXONLY SPI_CR1_RXONLY_Msk /*!<Receive only */
  5397. #define SPI_CR1_DFF_Pos (11U)
  5398. #define SPI_CR1_DFF_Msk (0x1U << SPI_CR1_DFF_Pos) /*!< 0x00000800 */
  5399. #define SPI_CR1_DFF SPI_CR1_DFF_Msk /*!<Data Frame Format */
  5400. #define SPI_CR1_CRCNEXT_Pos (12U)
  5401. #define SPI_CR1_CRCNEXT_Msk (0x1U << SPI_CR1_CRCNEXT_Pos) /*!< 0x00001000 */
  5402. #define SPI_CR1_CRCNEXT SPI_CR1_CRCNEXT_Msk /*!<Transmit CRC next */
  5403. #define SPI_CR1_CRCEN_Pos (13U)
  5404. #define SPI_CR1_CRCEN_Msk (0x1U << SPI_CR1_CRCEN_Pos) /*!< 0x00002000 */
  5405. #define SPI_CR1_CRCEN SPI_CR1_CRCEN_Msk /*!<Hardware CRC calculation enable */
  5406. #define SPI_CR1_BIDIOE_Pos (14U)
  5407. #define SPI_CR1_BIDIOE_Msk (0x1U << SPI_CR1_BIDIOE_Pos) /*!< 0x00004000 */
  5408. #define SPI_CR1_BIDIOE SPI_CR1_BIDIOE_Msk /*!<Output enable in bidirectional mode */
  5409. #define SPI_CR1_BIDIMODE_Pos (15U)
  5410. #define SPI_CR1_BIDIMODE_Msk (0x1U << SPI_CR1_BIDIMODE_Pos) /*!< 0x00008000 */
  5411. #define SPI_CR1_BIDIMODE SPI_CR1_BIDIMODE_Msk /*!<Bidirectional data mode enable */
  5412. /******************* Bit definition for SPI_CR2 register ********************/
  5413. #define SPI_CR2_RXDMAEN_Pos (0U)
  5414. #define SPI_CR2_RXDMAEN_Msk (0x1U << SPI_CR2_RXDMAEN_Pos) /*!< 0x00000001 */
  5415. #define SPI_CR2_RXDMAEN SPI_CR2_RXDMAEN_Msk /*!<Rx Buffer DMA Enable */
  5416. #define SPI_CR2_TXDMAEN_Pos (1U)
  5417. #define SPI_CR2_TXDMAEN_Msk (0x1U << SPI_CR2_TXDMAEN_Pos) /*!< 0x00000002 */
  5418. #define SPI_CR2_TXDMAEN SPI_CR2_TXDMAEN_Msk /*!<Tx Buffer DMA Enable */
  5419. #define SPI_CR2_SSOE_Pos (2U)
  5420. #define SPI_CR2_SSOE_Msk (0x1U << SPI_CR2_SSOE_Pos) /*!< 0x00000004 */
  5421. #define SPI_CR2_SSOE SPI_CR2_SSOE_Msk /*!<SS Output Enable */
  5422. #define SPI_CR2_FRF_Pos (4U)
  5423. #define SPI_CR2_FRF_Msk (0x1U << SPI_CR2_FRF_Pos) /*!< 0x00000010 */
  5424. #define SPI_CR2_FRF SPI_CR2_FRF_Msk /*!<Frame Format */
  5425. #define SPI_CR2_ERRIE_Pos (5U)
  5426. #define SPI_CR2_ERRIE_Msk (0x1U << SPI_CR2_ERRIE_Pos) /*!< 0x00000020 */
  5427. #define SPI_CR2_ERRIE SPI_CR2_ERRIE_Msk /*!<Error Interrupt Enable */
  5428. #define SPI_CR2_RXNEIE_Pos (6U)
  5429. #define SPI_CR2_RXNEIE_Msk (0x1U << SPI_CR2_RXNEIE_Pos) /*!< 0x00000040 */
  5430. #define SPI_CR2_RXNEIE SPI_CR2_RXNEIE_Msk /*!<RX buffer Not Empty Interrupt Enable */
  5431. #define SPI_CR2_TXEIE_Pos (7U)
  5432. #define SPI_CR2_TXEIE_Msk (0x1U << SPI_CR2_TXEIE_Pos) /*!< 0x00000080 */
  5433. #define SPI_CR2_TXEIE SPI_CR2_TXEIE_Msk /*!<Tx buffer Empty Interrupt Enable */
  5434. /******************** Bit definition for SPI_SR register ********************/
  5435. #define SPI_SR_RXNE_Pos (0U)
  5436. #define SPI_SR_RXNE_Msk (0x1U << SPI_SR_RXNE_Pos) /*!< 0x00000001 */
  5437. #define SPI_SR_RXNE SPI_SR_RXNE_Msk /*!<Receive buffer Not Empty */
  5438. #define SPI_SR_TXE_Pos (1U)
  5439. #define SPI_SR_TXE_Msk (0x1U << SPI_SR_TXE_Pos) /*!< 0x00000002 */
  5440. #define SPI_SR_TXE SPI_SR_TXE_Msk /*!<Transmit buffer Empty */
  5441. #define SPI_SR_CHSIDE_Pos (2U)
  5442. #define SPI_SR_CHSIDE_Msk (0x1U << SPI_SR_CHSIDE_Pos) /*!< 0x00000004 */
  5443. #define SPI_SR_CHSIDE SPI_SR_CHSIDE_Msk /*!<Channel side */
  5444. #define SPI_SR_UDR_Pos (3U)
  5445. #define SPI_SR_UDR_Msk (0x1U << SPI_SR_UDR_Pos) /*!< 0x00000008 */
  5446. #define SPI_SR_UDR SPI_SR_UDR_Msk /*!<Underrun flag */
  5447. #define SPI_SR_CRCERR_Pos (4U)
  5448. #define SPI_SR_CRCERR_Msk (0x1U << SPI_SR_CRCERR_Pos) /*!< 0x00000010 */
  5449. #define SPI_SR_CRCERR SPI_SR_CRCERR_Msk /*!<CRC Error flag */
  5450. #define SPI_SR_MODF_Pos (5U)
  5451. #define SPI_SR_MODF_Msk (0x1U << SPI_SR_MODF_Pos) /*!< 0x00000020 */
  5452. #define SPI_SR_MODF SPI_SR_MODF_Msk /*!<Mode fault */
  5453. #define SPI_SR_OVR_Pos (6U)
  5454. #define SPI_SR_OVR_Msk (0x1U << SPI_SR_OVR_Pos) /*!< 0x00000040 */
  5455. #define SPI_SR_OVR SPI_SR_OVR_Msk /*!<Overrun flag */
  5456. #define SPI_SR_BSY_Pos (7U)
  5457. #define SPI_SR_BSY_Msk (0x1U << SPI_SR_BSY_Pos) /*!< 0x00000080 */
  5458. #define SPI_SR_BSY SPI_SR_BSY_Msk /*!<Busy flag */
  5459. #define SPI_SR_FRE_Pos (8U)
  5460. #define SPI_SR_FRE_Msk (0x1U << SPI_SR_FRE_Pos) /*!< 0x00000100 */
  5461. #define SPI_SR_FRE SPI_SR_FRE_Msk /*!<Frame format error flag */
  5462. /******************** Bit definition for SPI_DR register ********************/
  5463. #define SPI_DR_DR_Pos (0U)
  5464. #define SPI_DR_DR_Msk (0xFFFFU << SPI_DR_DR_Pos) /*!< 0x0000FFFF */
  5465. #define SPI_DR_DR SPI_DR_DR_Msk /*!<Data Register */
  5466. /******************* Bit definition for SPI_CRCPR register ******************/
  5467. #define SPI_CRCPR_CRCPOLY_Pos (0U)
  5468. #define SPI_CRCPR_CRCPOLY_Msk (0xFFFFU << SPI_CRCPR_CRCPOLY_Pos) /*!< 0x0000FFFF */
  5469. #define SPI_CRCPR_CRCPOLY SPI_CRCPR_CRCPOLY_Msk /*!<CRC polynomial register */
  5470. /****************** Bit definition for SPI_RXCRCR register ******************/
  5471. #define SPI_RXCRCR_RXCRC_Pos (0U)
  5472. #define SPI_RXCRCR_RXCRC_Msk (0xFFFFU << SPI_RXCRCR_RXCRC_Pos) /*!< 0x0000FFFF */
  5473. #define SPI_RXCRCR_RXCRC SPI_RXCRCR_RXCRC_Msk /*!<Rx CRC Register */
  5474. /****************** Bit definition for SPI_TXCRCR register ******************/
  5475. #define SPI_TXCRCR_TXCRC_Pos (0U)
  5476. #define SPI_TXCRCR_TXCRC_Msk (0xFFFFU << SPI_TXCRCR_TXCRC_Pos) /*!< 0x0000FFFF */
  5477. #define SPI_TXCRCR_TXCRC SPI_TXCRCR_TXCRC_Msk /*!<Tx CRC Register */
  5478. /****************** Bit definition for SPI_I2SCFGR register *****************/
  5479. #define SPI_I2SCFGR_CHLEN_Pos (0U)
  5480. #define SPI_I2SCFGR_CHLEN_Msk (0x1U << SPI_I2SCFGR_CHLEN_Pos) /*!< 0x00000001 */
  5481. #define SPI_I2SCFGR_CHLEN SPI_I2SCFGR_CHLEN_Msk /*!<Channel length (number of bits per audio channel) */
  5482. #define SPI_I2SCFGR_DATLEN_Pos (1U)
  5483. #define SPI_I2SCFGR_DATLEN_Msk (0x3U << SPI_I2SCFGR_DATLEN_Pos) /*!< 0x00000006 */
  5484. #define SPI_I2SCFGR_DATLEN SPI_I2SCFGR_DATLEN_Msk /*!<DATLEN[1:0] bits (Data length to be transferred) */
  5485. #define SPI_I2SCFGR_DATLEN_0 (0x1U << SPI_I2SCFGR_DATLEN_Pos) /*!< 0x00000002 */
  5486. #define SPI_I2SCFGR_DATLEN_1 (0x2U << SPI_I2SCFGR_DATLEN_Pos) /*!< 0x00000004 */
  5487. #define SPI_I2SCFGR_CKPOL_Pos (3U)
  5488. #define SPI_I2SCFGR_CKPOL_Msk (0x1U << SPI_I2SCFGR_CKPOL_Pos) /*!< 0x00000008 */
  5489. #define SPI_I2SCFGR_CKPOL SPI_I2SCFGR_CKPOL_Msk /*!<steady state clock polarity */
  5490. #define SPI_I2SCFGR_I2SSTD_Pos (4U)
  5491. #define SPI_I2SCFGR_I2SSTD_Msk (0x3U << SPI_I2SCFGR_I2SSTD_Pos) /*!< 0x00000030 */
  5492. #define SPI_I2SCFGR_I2SSTD SPI_I2SCFGR_I2SSTD_Msk /*!<I2SSTD[1:0] bits (I2S standard selection) */
  5493. #define SPI_I2SCFGR_I2SSTD_0 (0x1U << SPI_I2SCFGR_I2SSTD_Pos) /*!< 0x00000010 */
  5494. #define SPI_I2SCFGR_I2SSTD_1 (0x2U << SPI_I2SCFGR_I2SSTD_Pos) /*!< 0x00000020 */
  5495. #define SPI_I2SCFGR_PCMSYNC_Pos (7U)
  5496. #define SPI_I2SCFGR_PCMSYNC_Msk (0x1U << SPI_I2SCFGR_PCMSYNC_Pos) /*!< 0x00000080 */
  5497. #define SPI_I2SCFGR_PCMSYNC SPI_I2SCFGR_PCMSYNC_Msk /*!<PCM frame synchronization */
  5498. #define SPI_I2SCFGR_I2SCFG_Pos (8U)
  5499. #define SPI_I2SCFGR_I2SCFG_Msk (0x3U << SPI_I2SCFGR_I2SCFG_Pos) /*!< 0x00000300 */
  5500. #define SPI_I2SCFGR_I2SCFG SPI_I2SCFGR_I2SCFG_Msk /*!<I2SCFG[1:0] bits (I2S configuration mode) */
  5501. #define SPI_I2SCFGR_I2SCFG_0 (0x1U << SPI_I2SCFGR_I2SCFG_Pos) /*!< 0x00000100 */
  5502. #define SPI_I2SCFGR_I2SCFG_1 (0x2U << SPI_I2SCFGR_I2SCFG_Pos) /*!< 0x00000200 */
  5503. #define SPI_I2SCFGR_I2SE_Pos (10U)
  5504. #define SPI_I2SCFGR_I2SE_Msk (0x1U << SPI_I2SCFGR_I2SE_Pos) /*!< 0x00000400 */
  5505. #define SPI_I2SCFGR_I2SE SPI_I2SCFGR_I2SE_Msk /*!<I2S Enable */
  5506. #define SPI_I2SCFGR_I2SMOD_Pos (11U)
  5507. #define SPI_I2SCFGR_I2SMOD_Msk (0x1U << SPI_I2SCFGR_I2SMOD_Pos) /*!< 0x00000800 */
  5508. #define SPI_I2SCFGR_I2SMOD SPI_I2SCFGR_I2SMOD_Msk /*!<I2S mode selection */
  5509. /****************** Bit definition for SPI_I2SPR register *******************/
  5510. #define SPI_I2SPR_I2SDIV_Pos (0U)
  5511. #define SPI_I2SPR_I2SDIV_Msk (0xFFU << SPI_I2SPR_I2SDIV_Pos) /*!< 0x000000FF */
  5512. #define SPI_I2SPR_I2SDIV SPI_I2SPR_I2SDIV_Msk /*!<I2S Linear prescaler */
  5513. #define SPI_I2SPR_ODD_Pos (8U)
  5514. #define SPI_I2SPR_ODD_Msk (0x1U << SPI_I2SPR_ODD_Pos) /*!< 0x00000100 */
  5515. #define SPI_I2SPR_ODD SPI_I2SPR_ODD_Msk /*!<Odd factor for the prescaler */
  5516. #define SPI_I2SPR_MCKOE_Pos (9U)
  5517. #define SPI_I2SPR_MCKOE_Msk (0x1U << SPI_I2SPR_MCKOE_Pos) /*!< 0x00000200 */
  5518. #define SPI_I2SPR_MCKOE SPI_I2SPR_MCKOE_Msk /*!<Master Clock Output Enable */
  5519. /******************************************************************************/
  5520. /* */
  5521. /* SYSCFG */
  5522. /* */
  5523. /******************************************************************************/
  5524. /****************** Bit definition for SYSCFG_MEMRMP register ***************/
  5525. #define SYSCFG_MEMRMP_MEM_MODE_Pos (0U)
  5526. #define SYSCFG_MEMRMP_MEM_MODE_Msk (0x3U << SYSCFG_MEMRMP_MEM_MODE_Pos) /*!< 0x00000003 */
  5527. #define SYSCFG_MEMRMP_MEM_MODE SYSCFG_MEMRMP_MEM_MODE_Msk /*!< SYSCFG_Memory Remap Config */
  5528. #define SYSCFG_MEMRMP_MEM_MODE_0 (0x1U << SYSCFG_MEMRMP_MEM_MODE_Pos) /*!< 0x00000001 */
  5529. #define SYSCFG_MEMRMP_MEM_MODE_1 (0x2U << SYSCFG_MEMRMP_MEM_MODE_Pos) /*!< 0x00000002 */
  5530. /****************** Bit definition for SYSCFG_PMC register ******************/
  5531. #define SYSCFG_PMC_ADC1DC2_Pos (16U)
  5532. #define SYSCFG_PMC_ADC1DC2_Msk (0x1U << SYSCFG_PMC_ADC1DC2_Pos) /*!< 0x00010000 */
  5533. #define SYSCFG_PMC_ADC1DC2 SYSCFG_PMC_ADC1DC2_Msk /*!< Refer to AN4073 on how to use this bit */
  5534. /***************** Bit definition for SYSCFG_EXTICR1 register ***************/
  5535. #define SYSCFG_EXTICR1_EXTI0_Pos (0U)
  5536. #define SYSCFG_EXTICR1_EXTI0_Msk (0xFU << SYSCFG_EXTICR1_EXTI0_Pos) /*!< 0x0000000F */
  5537. #define SYSCFG_EXTICR1_EXTI0 SYSCFG_EXTICR1_EXTI0_Msk /*!<EXTI 0 configuration */
  5538. #define SYSCFG_EXTICR1_EXTI1_Pos (4U)
  5539. #define SYSCFG_EXTICR1_EXTI1_Msk (0xFU << SYSCFG_EXTICR1_EXTI1_Pos) /*!< 0x000000F0 */
  5540. #define SYSCFG_EXTICR1_EXTI1 SYSCFG_EXTICR1_EXTI1_Msk /*!<EXTI 1 configuration */
  5541. #define SYSCFG_EXTICR1_EXTI2_Pos (8U)
  5542. #define SYSCFG_EXTICR1_EXTI2_Msk (0xFU << SYSCFG_EXTICR1_EXTI2_Pos) /*!< 0x00000F00 */
  5543. #define SYSCFG_EXTICR1_EXTI2 SYSCFG_EXTICR1_EXTI2_Msk /*!<EXTI 2 configuration */
  5544. #define SYSCFG_EXTICR1_EXTI3_Pos (12U)
  5545. #define SYSCFG_EXTICR1_EXTI3_Msk (0xFU << SYSCFG_EXTICR1_EXTI3_Pos) /*!< 0x0000F000 */
  5546. #define SYSCFG_EXTICR1_EXTI3 SYSCFG_EXTICR1_EXTI3_Msk /*!<EXTI 3 configuration */
  5547. /**
  5548. * @brief EXTI0 configuration
  5549. */
  5550. #define SYSCFG_EXTICR1_EXTI0_PA 0x0000U /*!<PA[0] pin */
  5551. #define SYSCFG_EXTICR1_EXTI0_PB 0x0001U /*!<PB[0] pin */
  5552. #define SYSCFG_EXTICR1_EXTI0_PC 0x0002U /*!<PC[0] pin */
  5553. #define SYSCFG_EXTICR1_EXTI0_PD 0x0003U /*!<PD[0] pin */
  5554. #define SYSCFG_EXTICR1_EXTI0_PE 0x0004U /*!<PE[0] pin */
  5555. #define SYSCFG_EXTICR1_EXTI0_PH 0x0007U /*!<PH[0] pin */
  5556. /**
  5557. * @brief EXTI1 configuration
  5558. */
  5559. #define SYSCFG_EXTICR1_EXTI1_PA 0x0000U /*!<PA[1] pin */
  5560. #define SYSCFG_EXTICR1_EXTI1_PB 0x0010U /*!<PB[1] pin */
  5561. #define SYSCFG_EXTICR1_EXTI1_PC 0x0020U /*!<PC[1] pin */
  5562. #define SYSCFG_EXTICR1_EXTI1_PD 0x0030U /*!<PD[1] pin */
  5563. #define SYSCFG_EXTICR1_EXTI1_PE 0x0040U /*!<PE[1] pin */
  5564. #define SYSCFG_EXTICR1_EXTI1_PH 0x0070U /*!<PH[1] pin */
  5565. /**
  5566. * @brief EXTI2 configuration
  5567. */
  5568. #define SYSCFG_EXTICR1_EXTI2_PA 0x0000U /*!<PA[2] pin */
  5569. #define SYSCFG_EXTICR1_EXTI2_PB 0x0100U /*!<PB[2] pin */
  5570. #define SYSCFG_EXTICR1_EXTI2_PC 0x0200U /*!<PC[2] pin */
  5571. #define SYSCFG_EXTICR1_EXTI2_PD 0x0300U /*!<PD[2] pin */
  5572. #define SYSCFG_EXTICR1_EXTI2_PE 0x0400U /*!<PE[2] pin */
  5573. #define SYSCFG_EXTICR1_EXTI2_PH 0x0700U /*!<PH[2] pin */
  5574. /**
  5575. * @brief EXTI3 configuration
  5576. */
  5577. #define SYSCFG_EXTICR1_EXTI3_PA 0x0000U /*!<PA[3] pin */
  5578. #define SYSCFG_EXTICR1_EXTI3_PB 0x1000U /*!<PB[3] pin */
  5579. #define SYSCFG_EXTICR1_EXTI3_PC 0x2000U /*!<PC[3] pin */
  5580. #define SYSCFG_EXTICR1_EXTI3_PD 0x3000U /*!<PD[3] pin */
  5581. #define SYSCFG_EXTICR1_EXTI3_PE 0x4000U /*!<PE[3] pin */
  5582. #define SYSCFG_EXTICR1_EXTI3_PH 0x7000U /*!<PH[3] pin */
  5583. /***************** Bit definition for SYSCFG_EXTICR2 register ***************/
  5584. #define SYSCFG_EXTICR2_EXTI4_Pos (0U)
  5585. #define SYSCFG_EXTICR2_EXTI4_Msk (0xFU << SYSCFG_EXTICR2_EXTI4_Pos) /*!< 0x0000000F */
  5586. #define SYSCFG_EXTICR2_EXTI4 SYSCFG_EXTICR2_EXTI4_Msk /*!<EXTI 4 configuration */
  5587. #define SYSCFG_EXTICR2_EXTI5_Pos (4U)
  5588. #define SYSCFG_EXTICR2_EXTI5_Msk (0xFU << SYSCFG_EXTICR2_EXTI5_Pos) /*!< 0x000000F0 */
  5589. #define SYSCFG_EXTICR2_EXTI5 SYSCFG_EXTICR2_EXTI5_Msk /*!<EXTI 5 configuration */
  5590. #define SYSCFG_EXTICR2_EXTI6_Pos (8U)
  5591. #define SYSCFG_EXTICR2_EXTI6_Msk (0xFU << SYSCFG_EXTICR2_EXTI6_Pos) /*!< 0x00000F00 */
  5592. #define SYSCFG_EXTICR2_EXTI6 SYSCFG_EXTICR2_EXTI6_Msk /*!<EXTI 6 configuration */
  5593. #define SYSCFG_EXTICR2_EXTI7_Pos (12U)
  5594. #define SYSCFG_EXTICR2_EXTI7_Msk (0xFU << SYSCFG_EXTICR2_EXTI7_Pos) /*!< 0x0000F000 */
  5595. #define SYSCFG_EXTICR2_EXTI7 SYSCFG_EXTICR2_EXTI7_Msk /*!<EXTI 7 configuration */
  5596. /**
  5597. * @brief EXTI4 configuration
  5598. */
  5599. #define SYSCFG_EXTICR2_EXTI4_PA 0x0000U /*!<PA[4] pin */
  5600. #define SYSCFG_EXTICR2_EXTI4_PB 0x0001U /*!<PB[4] pin */
  5601. #define SYSCFG_EXTICR2_EXTI4_PC 0x0002U /*!<PC[4] pin */
  5602. #define SYSCFG_EXTICR2_EXTI4_PD 0x0003U /*!<PD[4] pin */
  5603. #define SYSCFG_EXTICR2_EXTI4_PE 0x0004U /*!<PE[4] pin */
  5604. #define SYSCFG_EXTICR2_EXTI4_PH 0x0007U /*!<PH[4] pin */
  5605. /**
  5606. * @brief EXTI5 configuration
  5607. */
  5608. #define SYSCFG_EXTICR2_EXTI5_PA 0x0000U /*!<PA[5] pin */
  5609. #define SYSCFG_EXTICR2_EXTI5_PB 0x0010U /*!<PB[5] pin */
  5610. #define SYSCFG_EXTICR2_EXTI5_PC 0x0020U /*!<PC[5] pin */
  5611. #define SYSCFG_EXTICR2_EXTI5_PD 0x0030U /*!<PD[5] pin */
  5612. #define SYSCFG_EXTICR2_EXTI5_PE 0x0040U /*!<PE[5] pin */
  5613. #define SYSCFG_EXTICR2_EXTI5_PH 0x0070U /*!<PH[5] pin */
  5614. /**
  5615. * @brief EXTI6 configuration
  5616. */
  5617. #define SYSCFG_EXTICR2_EXTI6_PA 0x0000U /*!<PA[6] pin */
  5618. #define SYSCFG_EXTICR2_EXTI6_PB 0x0100U /*!<PB[6] pin */
  5619. #define SYSCFG_EXTICR2_EXTI6_PC 0x0200U /*!<PC[6] pin */
  5620. #define SYSCFG_EXTICR2_EXTI6_PD 0x0300U /*!<PD[6] pin */
  5621. #define SYSCFG_EXTICR2_EXTI6_PE 0x0400U /*!<PE[6] pin */
  5622. #define SYSCFG_EXTICR2_EXTI6_PH 0x0700U /*!<PH[6] pin */
  5623. /**
  5624. * @brief EXTI7 configuration
  5625. */
  5626. #define SYSCFG_EXTICR2_EXTI7_PA 0x0000U /*!<PA[7] pin */
  5627. #define SYSCFG_EXTICR2_EXTI7_PB 0x1000U /*!<PB[7] pin */
  5628. #define SYSCFG_EXTICR2_EXTI7_PC 0x2000U /*!<PC[7] pin */
  5629. #define SYSCFG_EXTICR2_EXTI7_PD 0x3000U /*!<PD[7] pin */
  5630. #define SYSCFG_EXTICR2_EXTI7_PE 0x4000U /*!<PE[7] pin */
  5631. #define SYSCFG_EXTICR2_EXTI7_PH 0x7000U /*!<PH[7] pin */
  5632. /***************** Bit definition for SYSCFG_EXTICR3 register ***************/
  5633. #define SYSCFG_EXTICR3_EXTI8_Pos (0U)
  5634. #define SYSCFG_EXTICR3_EXTI8_Msk (0xFU << SYSCFG_EXTICR3_EXTI8_Pos) /*!< 0x0000000F */
  5635. #define SYSCFG_EXTICR3_EXTI8 SYSCFG_EXTICR3_EXTI8_Msk /*!<EXTI 8 configuration */
  5636. #define SYSCFG_EXTICR3_EXTI9_Pos (4U)
  5637. #define SYSCFG_EXTICR3_EXTI9_Msk (0xFU << SYSCFG_EXTICR3_EXTI9_Pos) /*!< 0x000000F0 */
  5638. #define SYSCFG_EXTICR3_EXTI9 SYSCFG_EXTICR3_EXTI9_Msk /*!<EXTI 9 configuration */
  5639. #define SYSCFG_EXTICR3_EXTI10_Pos (8U)
  5640. #define SYSCFG_EXTICR3_EXTI10_Msk (0xFU << SYSCFG_EXTICR3_EXTI10_Pos) /*!< 0x00000F00 */
  5641. #define SYSCFG_EXTICR3_EXTI10 SYSCFG_EXTICR3_EXTI10_Msk /*!<EXTI 10 configuration */
  5642. #define SYSCFG_EXTICR3_EXTI11_Pos (12U)
  5643. #define SYSCFG_EXTICR3_EXTI11_Msk (0xFU << SYSCFG_EXTICR3_EXTI11_Pos) /*!< 0x0000F000 */
  5644. #define SYSCFG_EXTICR3_EXTI11 SYSCFG_EXTICR3_EXTI11_Msk /*!<EXTI 11 configuration */
  5645. /**
  5646. * @brief EXTI8 configuration
  5647. */
  5648. #define SYSCFG_EXTICR3_EXTI8_PA 0x0000U /*!<PA[8] pin */
  5649. #define SYSCFG_EXTICR3_EXTI8_PB 0x0001U /*!<PB[8] pin */
  5650. #define SYSCFG_EXTICR3_EXTI8_PC 0x0002U /*!<PC[8] pin */
  5651. #define SYSCFG_EXTICR3_EXTI8_PD 0x0003U /*!<PD[8] pin */
  5652. #define SYSCFG_EXTICR3_EXTI8_PE 0x0004U /*!<PE[8] pin */
  5653. #define SYSCFG_EXTICR3_EXTI8_PH 0x0007U /*!<PH[8] pin */
  5654. /**
  5655. * @brief EXTI9 configuration
  5656. */
  5657. #define SYSCFG_EXTICR3_EXTI9_PA 0x0000U /*!<PA[9] pin */
  5658. #define SYSCFG_EXTICR3_EXTI9_PB 0x0010U /*!<PB[9] pin */
  5659. #define SYSCFG_EXTICR3_EXTI9_PC 0x0020U /*!<PC[9] pin */
  5660. #define SYSCFG_EXTICR3_EXTI9_PD 0x0030U /*!<PD[9] pin */
  5661. #define SYSCFG_EXTICR3_EXTI9_PE 0x0040U /*!<PE[9] pin */
  5662. #define SYSCFG_EXTICR3_EXTI9_PH 0x0070U /*!<PH[9] pin */
  5663. /**
  5664. * @brief EXTI10 configuration
  5665. */
  5666. #define SYSCFG_EXTICR3_EXTI10_PA 0x0000U /*!<PA[10] pin */
  5667. #define SYSCFG_EXTICR3_EXTI10_PB 0x0100U /*!<PB[10] pin */
  5668. #define SYSCFG_EXTICR3_EXTI10_PC 0x0200U /*!<PC[10] pin */
  5669. #define SYSCFG_EXTICR3_EXTI10_PD 0x0300U /*!<PD[10] pin */
  5670. #define SYSCFG_EXTICR3_EXTI10_PE 0x0400U /*!<PE[10] pin */
  5671. #define SYSCFG_EXTICR3_EXTI10_PH 0x0700U /*!<PH[10] pin */
  5672. /**
  5673. * @brief EXTI11 configuration
  5674. */
  5675. #define SYSCFG_EXTICR3_EXTI11_PA 0x0000U /*!<PA[11] pin */
  5676. #define SYSCFG_EXTICR3_EXTI11_PB 0x1000U /*!<PB[11] pin */
  5677. #define SYSCFG_EXTICR3_EXTI11_PC 0x2000U /*!<PC[11] pin */
  5678. #define SYSCFG_EXTICR3_EXTI11_PD 0x3000U /*!<PD[11] pin */
  5679. #define SYSCFG_EXTICR3_EXTI11_PE 0x4000U /*!<PE[11] pin */
  5680. #define SYSCFG_EXTICR3_EXTI11_PH 0x7000U /*!<PH[11] pin */
  5681. /***************** Bit definition for SYSCFG_EXTICR4 register ***************/
  5682. #define SYSCFG_EXTICR4_EXTI12_Pos (0U)
  5683. #define SYSCFG_EXTICR4_EXTI12_Msk (0xFU << SYSCFG_EXTICR4_EXTI12_Pos) /*!< 0x0000000F */
  5684. #define SYSCFG_EXTICR4_EXTI12 SYSCFG_EXTICR4_EXTI12_Msk /*!<EXTI 12 configuration */
  5685. #define SYSCFG_EXTICR4_EXTI13_Pos (4U)
  5686. #define SYSCFG_EXTICR4_EXTI13_Msk (0xFU << SYSCFG_EXTICR4_EXTI13_Pos) /*!< 0x000000F0 */
  5687. #define SYSCFG_EXTICR4_EXTI13 SYSCFG_EXTICR4_EXTI13_Msk /*!<EXTI 13 configuration */
  5688. #define SYSCFG_EXTICR4_EXTI14_Pos (8U)
  5689. #define SYSCFG_EXTICR4_EXTI14_Msk (0xFU << SYSCFG_EXTICR4_EXTI14_Pos) /*!< 0x00000F00 */
  5690. #define SYSCFG_EXTICR4_EXTI14 SYSCFG_EXTICR4_EXTI14_Msk /*!<EXTI 14 configuration */
  5691. #define SYSCFG_EXTICR4_EXTI15_Pos (12U)
  5692. #define SYSCFG_EXTICR4_EXTI15_Msk (0xFU << SYSCFG_EXTICR4_EXTI15_Pos) /*!< 0x0000F000 */
  5693. #define SYSCFG_EXTICR4_EXTI15 SYSCFG_EXTICR4_EXTI15_Msk /*!<EXTI 15 configuration */
  5694. /**
  5695. * @brief EXTI12 configuration
  5696. */
  5697. #define SYSCFG_EXTICR4_EXTI12_PA 0x0000U /*!<PA[12] pin */
  5698. #define SYSCFG_EXTICR4_EXTI12_PB 0x0001U /*!<PB[12] pin */
  5699. #define SYSCFG_EXTICR4_EXTI12_PC 0x0002U /*!<PC[12] pin */
  5700. #define SYSCFG_EXTICR4_EXTI12_PD 0x0003U /*!<PD[12] pin */
  5701. #define SYSCFG_EXTICR4_EXTI12_PE 0x0004U /*!<PE[12] pin */
  5702. #define SYSCFG_EXTICR4_EXTI12_PH 0x0007U /*!<PH[12] pin */
  5703. /**
  5704. * @brief EXTI13 configuration
  5705. */
  5706. #define SYSCFG_EXTICR4_EXTI13_PA 0x0000U /*!<PA[13] pin */
  5707. #define SYSCFG_EXTICR4_EXTI13_PB 0x0010U /*!<PB[13] pin */
  5708. #define SYSCFG_EXTICR4_EXTI13_PC 0x0020U /*!<PC[13] pin */
  5709. #define SYSCFG_EXTICR4_EXTI13_PD 0x0030U /*!<PD[13] pin */
  5710. #define SYSCFG_EXTICR4_EXTI13_PE 0x0040U /*!<PE[13] pin */
  5711. #define SYSCFG_EXTICR4_EXTI13_PH 0x0070U /*!<PH[13] pin */
  5712. /**
  5713. * @brief EXTI14 configuration
  5714. */
  5715. #define SYSCFG_EXTICR4_EXTI14_PA 0x0000U /*!<PA[14] pin */
  5716. #define SYSCFG_EXTICR4_EXTI14_PB 0x0100U /*!<PB[14] pin */
  5717. #define SYSCFG_EXTICR4_EXTI14_PC 0x0200U /*!<PC[14] pin */
  5718. #define SYSCFG_EXTICR4_EXTI14_PD 0x0300U /*!<PD[14] pin */
  5719. #define SYSCFG_EXTICR4_EXTI14_PE 0x0400U /*!<PE[14] pin */
  5720. #define SYSCFG_EXTICR4_EXTI14_PH 0x0700U /*!<PH[14] pin */
  5721. /**
  5722. * @brief EXTI15 configuration
  5723. */
  5724. #define SYSCFG_EXTICR4_EXTI15_PA 0x0000U /*!<PA[15] pin */
  5725. #define SYSCFG_EXTICR4_EXTI15_PB 0x1000U /*!<PB[15] pin */
  5726. #define SYSCFG_EXTICR4_EXTI15_PC 0x2000U /*!<PC[15] pin */
  5727. #define SYSCFG_EXTICR4_EXTI15_PD 0x3000U /*!<PD[15] pin */
  5728. #define SYSCFG_EXTICR4_EXTI15_PE 0x4000U /*!<PE[15] pin */
  5729. #define SYSCFG_EXTICR4_EXTI15_PH 0x7000U /*!<PH[15] pin */
  5730. /****************** Bit definition for SYSCFG_CMPCR register ****************/
  5731. #define SYSCFG_CMPCR_CMP_PD_Pos (0U)
  5732. #define SYSCFG_CMPCR_CMP_PD_Msk (0x1U << SYSCFG_CMPCR_CMP_PD_Pos) /*!< 0x00000001 */
  5733. #define SYSCFG_CMPCR_CMP_PD SYSCFG_CMPCR_CMP_PD_Msk /*!<Compensation cell ready flag */
  5734. #define SYSCFG_CMPCR_READY_Pos (8U)
  5735. #define SYSCFG_CMPCR_READY_Msk (0x1U << SYSCFG_CMPCR_READY_Pos) /*!< 0x00000100 */
  5736. #define SYSCFG_CMPCR_READY SYSCFG_CMPCR_READY_Msk /*!<Compensation cell power-down */
  5737. /******************************************************************************/
  5738. /* */
  5739. /* TIM */
  5740. /* */
  5741. /******************************************************************************/
  5742. /******************* Bit definition for TIM_CR1 register ********************/
  5743. #define TIM_CR1_CEN_Pos (0U)
  5744. #define TIM_CR1_CEN_Msk (0x1U << TIM_CR1_CEN_Pos) /*!< 0x00000001 */
  5745. #define TIM_CR1_CEN TIM_CR1_CEN_Msk /*!<Counter enable */
  5746. #define TIM_CR1_UDIS_Pos (1U)
  5747. #define TIM_CR1_UDIS_Msk (0x1U << TIM_CR1_UDIS_Pos) /*!< 0x00000002 */
  5748. #define TIM_CR1_UDIS TIM_CR1_UDIS_Msk /*!<Update disable */
  5749. #define TIM_CR1_URS_Pos (2U)
  5750. #define TIM_CR1_URS_Msk (0x1U << TIM_CR1_URS_Pos) /*!< 0x00000004 */
  5751. #define TIM_CR1_URS TIM_CR1_URS_Msk /*!<Update request source */
  5752. #define TIM_CR1_OPM_Pos (3U)
  5753. #define TIM_CR1_OPM_Msk (0x1U << TIM_CR1_OPM_Pos) /*!< 0x00000008 */
  5754. #define TIM_CR1_OPM TIM_CR1_OPM_Msk /*!<One pulse mode */
  5755. #define TIM_CR1_DIR_Pos (4U)
  5756. #define TIM_CR1_DIR_Msk (0x1U << TIM_CR1_DIR_Pos) /*!< 0x00000010 */
  5757. #define TIM_CR1_DIR TIM_CR1_DIR_Msk /*!<Direction */
  5758. #define TIM_CR1_CMS_Pos (5U)
  5759. #define TIM_CR1_CMS_Msk (0x3U << TIM_CR1_CMS_Pos) /*!< 0x00000060 */
  5760. #define TIM_CR1_CMS TIM_CR1_CMS_Msk /*!<CMS[1:0] bits (Center-aligned mode selection) */
  5761. #define TIM_CR1_CMS_0 (0x1U << TIM_CR1_CMS_Pos) /*!< 0x0020 */
  5762. #define TIM_CR1_CMS_1 (0x2U << TIM_CR1_CMS_Pos) /*!< 0x0040 */
  5763. #define TIM_CR1_ARPE_Pos (7U)
  5764. #define TIM_CR1_ARPE_Msk (0x1U << TIM_CR1_ARPE_Pos) /*!< 0x00000080 */
  5765. #define TIM_CR1_ARPE TIM_CR1_ARPE_Msk /*!<Auto-reload preload enable */
  5766. #define TIM_CR1_CKD_Pos (8U)
  5767. #define TIM_CR1_CKD_Msk (0x3U << TIM_CR1_CKD_Pos) /*!< 0x00000300 */
  5768. #define TIM_CR1_CKD TIM_CR1_CKD_Msk /*!<CKD[1:0] bits (clock division) */
  5769. #define TIM_CR1_CKD_0 (0x1U << TIM_CR1_CKD_Pos) /*!< 0x0100 */
  5770. #define TIM_CR1_CKD_1 (0x2U << TIM_CR1_CKD_Pos) /*!< 0x0200 */
  5771. /******************* Bit definition for TIM_CR2 register ********************/
  5772. #define TIM_CR2_CCPC_Pos (0U)
  5773. #define TIM_CR2_CCPC_Msk (0x1U << TIM_CR2_CCPC_Pos) /*!< 0x00000001 */
  5774. #define TIM_CR2_CCPC TIM_CR2_CCPC_Msk /*!<Capture/Compare Preloaded Control */
  5775. #define TIM_CR2_CCUS_Pos (2U)
  5776. #define TIM_CR2_CCUS_Msk (0x1U << TIM_CR2_CCUS_Pos) /*!< 0x00000004 */
  5777. #define TIM_CR2_CCUS TIM_CR2_CCUS_Msk /*!<Capture/Compare Control Update Selection */
  5778. #define TIM_CR2_CCDS_Pos (3U)
  5779. #define TIM_CR2_CCDS_Msk (0x1U << TIM_CR2_CCDS_Pos) /*!< 0x00000008 */
  5780. #define TIM_CR2_CCDS TIM_CR2_CCDS_Msk /*!<Capture/Compare DMA Selection */
  5781. #define TIM_CR2_MMS_Pos (4U)
  5782. #define TIM_CR2_MMS_Msk (0x7U << TIM_CR2_MMS_Pos) /*!< 0x00000070 */
  5783. #define TIM_CR2_MMS TIM_CR2_MMS_Msk /*!<MMS[2:0] bits (Master Mode Selection) */
  5784. #define TIM_CR2_MMS_0 (0x1U << TIM_CR2_MMS_Pos) /*!< 0x0010 */
  5785. #define TIM_CR2_MMS_1 (0x2U << TIM_CR2_MMS_Pos) /*!< 0x0020 */
  5786. #define TIM_CR2_MMS_2 (0x4U << TIM_CR2_MMS_Pos) /*!< 0x0040 */
  5787. #define TIM_CR2_TI1S_Pos (7U)
  5788. #define TIM_CR2_TI1S_Msk (0x1U << TIM_CR2_TI1S_Pos) /*!< 0x00000080 */
  5789. #define TIM_CR2_TI1S TIM_CR2_TI1S_Msk /*!<TI1 Selection */
  5790. #define TIM_CR2_OIS1_Pos (8U)
  5791. #define TIM_CR2_OIS1_Msk (0x1U << TIM_CR2_OIS1_Pos) /*!< 0x00000100 */
  5792. #define TIM_CR2_OIS1 TIM_CR2_OIS1_Msk /*!<Output Idle state 1 (OC1 output) */
  5793. #define TIM_CR2_OIS1N_Pos (9U)
  5794. #define TIM_CR2_OIS1N_Msk (0x1U << TIM_CR2_OIS1N_Pos) /*!< 0x00000200 */
  5795. #define TIM_CR2_OIS1N TIM_CR2_OIS1N_Msk /*!<Output Idle state 1 (OC1N output) */
  5796. #define TIM_CR2_OIS2_Pos (10U)
  5797. #define TIM_CR2_OIS2_Msk (0x1U << TIM_CR2_OIS2_Pos) /*!< 0x00000400 */
  5798. #define TIM_CR2_OIS2 TIM_CR2_OIS2_Msk /*!<Output Idle state 2 (OC2 output) */
  5799. #define TIM_CR2_OIS2N_Pos (11U)
  5800. #define TIM_CR2_OIS2N_Msk (0x1U << TIM_CR2_OIS2N_Pos) /*!< 0x00000800 */
  5801. #define TIM_CR2_OIS2N TIM_CR2_OIS2N_Msk /*!<Output Idle state 2 (OC2N output) */
  5802. #define TIM_CR2_OIS3_Pos (12U)
  5803. #define TIM_CR2_OIS3_Msk (0x1U << TIM_CR2_OIS3_Pos) /*!< 0x00001000 */
  5804. #define TIM_CR2_OIS3 TIM_CR2_OIS3_Msk /*!<Output Idle state 3 (OC3 output) */
  5805. #define TIM_CR2_OIS3N_Pos (13U)
  5806. #define TIM_CR2_OIS3N_Msk (0x1U << TIM_CR2_OIS3N_Pos) /*!< 0x00002000 */
  5807. #define TIM_CR2_OIS3N TIM_CR2_OIS3N_Msk /*!<Output Idle state 3 (OC3N output) */
  5808. #define TIM_CR2_OIS4_Pos (14U)
  5809. #define TIM_CR2_OIS4_Msk (0x1U << TIM_CR2_OIS4_Pos) /*!< 0x00004000 */
  5810. #define TIM_CR2_OIS4 TIM_CR2_OIS4_Msk /*!<Output Idle state 4 (OC4 output) */
  5811. /******************* Bit definition for TIM_SMCR register *******************/
  5812. #define TIM_SMCR_SMS_Pos (0U)
  5813. #define TIM_SMCR_SMS_Msk (0x7U << TIM_SMCR_SMS_Pos) /*!< 0x00000007 */
  5814. #define TIM_SMCR_SMS TIM_SMCR_SMS_Msk /*!<SMS[2:0] bits (Slave mode selection) */
  5815. #define TIM_SMCR_SMS_0 (0x1U << TIM_SMCR_SMS_Pos) /*!< 0x0001 */
  5816. #define TIM_SMCR_SMS_1 (0x2U << TIM_SMCR_SMS_Pos) /*!< 0x0002 */
  5817. #define TIM_SMCR_SMS_2 (0x4U << TIM_SMCR_SMS_Pos) /*!< 0x0004 */
  5818. #define TIM_SMCR_TS_Pos (4U)
  5819. #define TIM_SMCR_TS_Msk (0x7U << TIM_SMCR_TS_Pos) /*!< 0x00000070 */
  5820. #define TIM_SMCR_TS TIM_SMCR_TS_Msk /*!<TS[2:0] bits (Trigger selection) */
  5821. #define TIM_SMCR_TS_0 (0x1U << TIM_SMCR_TS_Pos) /*!< 0x0010 */
  5822. #define TIM_SMCR_TS_1 (0x2U << TIM_SMCR_TS_Pos) /*!< 0x0020 */
  5823. #define TIM_SMCR_TS_2 (0x4U << TIM_SMCR_TS_Pos) /*!< 0x0040 */
  5824. #define TIM_SMCR_MSM_Pos (7U)
  5825. #define TIM_SMCR_MSM_Msk (0x1U << TIM_SMCR_MSM_Pos) /*!< 0x00000080 */
  5826. #define TIM_SMCR_MSM TIM_SMCR_MSM_Msk /*!<Master/slave mode */
  5827. #define TIM_SMCR_ETF_Pos (8U)
  5828. #define TIM_SMCR_ETF_Msk (0xFU << TIM_SMCR_ETF_Pos) /*!< 0x00000F00 */
  5829. #define TIM_SMCR_ETF TIM_SMCR_ETF_Msk /*!<ETF[3:0] bits (External trigger filter) */
  5830. #define TIM_SMCR_ETF_0 (0x1U << TIM_SMCR_ETF_Pos) /*!< 0x0100 */
  5831. #define TIM_SMCR_ETF_1 (0x2U << TIM_SMCR_ETF_Pos) /*!< 0x0200 */
  5832. #define TIM_SMCR_ETF_2 (0x4U << TIM_SMCR_ETF_Pos) /*!< 0x0400 */
  5833. #define TIM_SMCR_ETF_3 (0x8U << TIM_SMCR_ETF_Pos) /*!< 0x0800 */
  5834. #define TIM_SMCR_ETPS_Pos (12U)
  5835. #define TIM_SMCR_ETPS_Msk (0x3U << TIM_SMCR_ETPS_Pos) /*!< 0x00003000 */
  5836. #define TIM_SMCR_ETPS TIM_SMCR_ETPS_Msk /*!<ETPS[1:0] bits (External trigger prescaler) */
  5837. #define TIM_SMCR_ETPS_0 (0x1U << TIM_SMCR_ETPS_Pos) /*!< 0x1000 */
  5838. #define TIM_SMCR_ETPS_1 (0x2U << TIM_SMCR_ETPS_Pos) /*!< 0x2000 */
  5839. #define TIM_SMCR_ECE_Pos (14U)
  5840. #define TIM_SMCR_ECE_Msk (0x1U << TIM_SMCR_ECE_Pos) /*!< 0x00004000 */
  5841. #define TIM_SMCR_ECE TIM_SMCR_ECE_Msk /*!<External clock enable */
  5842. #define TIM_SMCR_ETP_Pos (15U)
  5843. #define TIM_SMCR_ETP_Msk (0x1U << TIM_SMCR_ETP_Pos) /*!< 0x00008000 */
  5844. #define TIM_SMCR_ETP TIM_SMCR_ETP_Msk /*!<External trigger polarity */
  5845. /******************* Bit definition for TIM_DIER register *******************/
  5846. #define TIM_DIER_UIE_Pos (0U)
  5847. #define TIM_DIER_UIE_Msk (0x1U << TIM_DIER_UIE_Pos) /*!< 0x00000001 */
  5848. #define TIM_DIER_UIE TIM_DIER_UIE_Msk /*!<Update interrupt enable */
  5849. #define TIM_DIER_CC1IE_Pos (1U)
  5850. #define TIM_DIER_CC1IE_Msk (0x1U << TIM_DIER_CC1IE_Pos) /*!< 0x00000002 */
  5851. #define TIM_DIER_CC1IE TIM_DIER_CC1IE_Msk /*!<Capture/Compare 1 interrupt enable */
  5852. #define TIM_DIER_CC2IE_Pos (2U)
  5853. #define TIM_DIER_CC2IE_Msk (0x1U << TIM_DIER_CC2IE_Pos) /*!< 0x00000004 */
  5854. #define TIM_DIER_CC2IE TIM_DIER_CC2IE_Msk /*!<Capture/Compare 2 interrupt enable */
  5855. #define TIM_DIER_CC3IE_Pos (3U)
  5856. #define TIM_DIER_CC3IE_Msk (0x1U << TIM_DIER_CC3IE_Pos) /*!< 0x00000008 */
  5857. #define TIM_DIER_CC3IE TIM_DIER_CC3IE_Msk /*!<Capture/Compare 3 interrupt enable */
  5858. #define TIM_DIER_CC4IE_Pos (4U)
  5859. #define TIM_DIER_CC4IE_Msk (0x1U << TIM_DIER_CC4IE_Pos) /*!< 0x00000010 */
  5860. #define TIM_DIER_CC4IE TIM_DIER_CC4IE_Msk /*!<Capture/Compare 4 interrupt enable */
  5861. #define TIM_DIER_COMIE_Pos (5U)
  5862. #define TIM_DIER_COMIE_Msk (0x1U << TIM_DIER_COMIE_Pos) /*!< 0x00000020 */
  5863. #define TIM_DIER_COMIE TIM_DIER_COMIE_Msk /*!<COM interrupt enable */
  5864. #define TIM_DIER_TIE_Pos (6U)
  5865. #define TIM_DIER_TIE_Msk (0x1U << TIM_DIER_TIE_Pos) /*!< 0x00000040 */
  5866. #define TIM_DIER_TIE TIM_DIER_TIE_Msk /*!<Trigger interrupt enable */
  5867. #define TIM_DIER_BIE_Pos (7U)
  5868. #define TIM_DIER_BIE_Msk (0x1U << TIM_DIER_BIE_Pos) /*!< 0x00000080 */
  5869. #define TIM_DIER_BIE TIM_DIER_BIE_Msk /*!<Break interrupt enable */
  5870. #define TIM_DIER_UDE_Pos (8U)
  5871. #define TIM_DIER_UDE_Msk (0x1U << TIM_DIER_UDE_Pos) /*!< 0x00000100 */
  5872. #define TIM_DIER_UDE TIM_DIER_UDE_Msk /*!<Update DMA request enable */
  5873. #define TIM_DIER_CC1DE_Pos (9U)
  5874. #define TIM_DIER_CC1DE_Msk (0x1U << TIM_DIER_CC1DE_Pos) /*!< 0x00000200 */
  5875. #define TIM_DIER_CC1DE TIM_DIER_CC1DE_Msk /*!<Capture/Compare 1 DMA request enable */
  5876. #define TIM_DIER_CC2DE_Pos (10U)
  5877. #define TIM_DIER_CC2DE_Msk (0x1U << TIM_DIER_CC2DE_Pos) /*!< 0x00000400 */
  5878. #define TIM_DIER_CC2DE TIM_DIER_CC2DE_Msk /*!<Capture/Compare 2 DMA request enable */
  5879. #define TIM_DIER_CC3DE_Pos (11U)
  5880. #define TIM_DIER_CC3DE_Msk (0x1U << TIM_DIER_CC3DE_Pos) /*!< 0x00000800 */
  5881. #define TIM_DIER_CC3DE TIM_DIER_CC3DE_Msk /*!<Capture/Compare 3 DMA request enable */
  5882. #define TIM_DIER_CC4DE_Pos (12U)
  5883. #define TIM_DIER_CC4DE_Msk (0x1U << TIM_DIER_CC4DE_Pos) /*!< 0x00001000 */
  5884. #define TIM_DIER_CC4DE TIM_DIER_CC4DE_Msk /*!<Capture/Compare 4 DMA request enable */
  5885. #define TIM_DIER_COMDE_Pos (13U)
  5886. #define TIM_DIER_COMDE_Msk (0x1U << TIM_DIER_COMDE_Pos) /*!< 0x00002000 */
  5887. #define TIM_DIER_COMDE TIM_DIER_COMDE_Msk /*!<COM DMA request enable */
  5888. #define TIM_DIER_TDE_Pos (14U)
  5889. #define TIM_DIER_TDE_Msk (0x1U << TIM_DIER_TDE_Pos) /*!< 0x00004000 */
  5890. #define TIM_DIER_TDE TIM_DIER_TDE_Msk /*!<Trigger DMA request enable */
  5891. /******************** Bit definition for TIM_SR register ********************/
  5892. #define TIM_SR_UIF_Pos (0U)
  5893. #define TIM_SR_UIF_Msk (0x1U << TIM_SR_UIF_Pos) /*!< 0x00000001 */
  5894. #define TIM_SR_UIF TIM_SR_UIF_Msk /*!<Update interrupt Flag */
  5895. #define TIM_SR_CC1IF_Pos (1U)
  5896. #define TIM_SR_CC1IF_Msk (0x1U << TIM_SR_CC1IF_Pos) /*!< 0x00000002 */
  5897. #define TIM_SR_CC1IF TIM_SR_CC1IF_Msk /*!<Capture/Compare 1 interrupt Flag */
  5898. #define TIM_SR_CC2IF_Pos (2U)
  5899. #define TIM_SR_CC2IF_Msk (0x1U << TIM_SR_CC2IF_Pos) /*!< 0x00000004 */
  5900. #define TIM_SR_CC2IF TIM_SR_CC2IF_Msk /*!<Capture/Compare 2 interrupt Flag */
  5901. #define TIM_SR_CC3IF_Pos (3U)
  5902. #define TIM_SR_CC3IF_Msk (0x1U << TIM_SR_CC3IF_Pos) /*!< 0x00000008 */
  5903. #define TIM_SR_CC3IF TIM_SR_CC3IF_Msk /*!<Capture/Compare 3 interrupt Flag */
  5904. #define TIM_SR_CC4IF_Pos (4U)
  5905. #define TIM_SR_CC4IF_Msk (0x1U << TIM_SR_CC4IF_Pos) /*!< 0x00000010 */
  5906. #define TIM_SR_CC4IF TIM_SR_CC4IF_Msk /*!<Capture/Compare 4 interrupt Flag */
  5907. #define TIM_SR_COMIF_Pos (5U)
  5908. #define TIM_SR_COMIF_Msk (0x1U << TIM_SR_COMIF_Pos) /*!< 0x00000020 */
  5909. #define TIM_SR_COMIF TIM_SR_COMIF_Msk /*!<COM interrupt Flag */
  5910. #define TIM_SR_TIF_Pos (6U)
  5911. #define TIM_SR_TIF_Msk (0x1U << TIM_SR_TIF_Pos) /*!< 0x00000040 */
  5912. #define TIM_SR_TIF TIM_SR_TIF_Msk /*!<Trigger interrupt Flag */
  5913. #define TIM_SR_BIF_Pos (7U)
  5914. #define TIM_SR_BIF_Msk (0x1U << TIM_SR_BIF_Pos) /*!< 0x00000080 */
  5915. #define TIM_SR_BIF TIM_SR_BIF_Msk /*!<Break interrupt Flag */
  5916. #define TIM_SR_CC1OF_Pos (9U)
  5917. #define TIM_SR_CC1OF_Msk (0x1U << TIM_SR_CC1OF_Pos) /*!< 0x00000200 */
  5918. #define TIM_SR_CC1OF TIM_SR_CC1OF_Msk /*!<Capture/Compare 1 Overcapture Flag */
  5919. #define TIM_SR_CC2OF_Pos (10U)
  5920. #define TIM_SR_CC2OF_Msk (0x1U << TIM_SR_CC2OF_Pos) /*!< 0x00000400 */
  5921. #define TIM_SR_CC2OF TIM_SR_CC2OF_Msk /*!<Capture/Compare 2 Overcapture Flag */
  5922. #define TIM_SR_CC3OF_Pos (11U)
  5923. #define TIM_SR_CC3OF_Msk (0x1U << TIM_SR_CC3OF_Pos) /*!< 0x00000800 */
  5924. #define TIM_SR_CC3OF TIM_SR_CC3OF_Msk /*!<Capture/Compare 3 Overcapture Flag */
  5925. #define TIM_SR_CC4OF_Pos (12U)
  5926. #define TIM_SR_CC4OF_Msk (0x1U << TIM_SR_CC4OF_Pos) /*!< 0x00001000 */
  5927. #define TIM_SR_CC4OF TIM_SR_CC4OF_Msk /*!<Capture/Compare 4 Overcapture Flag */
  5928. /******************* Bit definition for TIM_EGR register ********************/
  5929. #define TIM_EGR_UG_Pos (0U)
  5930. #define TIM_EGR_UG_Msk (0x1U << TIM_EGR_UG_Pos) /*!< 0x00000001 */
  5931. #define TIM_EGR_UG TIM_EGR_UG_Msk /*!<Update Generation */
  5932. #define TIM_EGR_CC1G_Pos (1U)
  5933. #define TIM_EGR_CC1G_Msk (0x1U << TIM_EGR_CC1G_Pos) /*!< 0x00000002 */
  5934. #define TIM_EGR_CC1G TIM_EGR_CC1G_Msk /*!<Capture/Compare 1 Generation */
  5935. #define TIM_EGR_CC2G_Pos (2U)
  5936. #define TIM_EGR_CC2G_Msk (0x1U << TIM_EGR_CC2G_Pos) /*!< 0x00000004 */
  5937. #define TIM_EGR_CC2G TIM_EGR_CC2G_Msk /*!<Capture/Compare 2 Generation */
  5938. #define TIM_EGR_CC3G_Pos (3U)
  5939. #define TIM_EGR_CC3G_Msk (0x1U << TIM_EGR_CC3G_Pos) /*!< 0x00000008 */
  5940. #define TIM_EGR_CC3G TIM_EGR_CC3G_Msk /*!<Capture/Compare 3 Generation */
  5941. #define TIM_EGR_CC4G_Pos (4U)
  5942. #define TIM_EGR_CC4G_Msk (0x1U << TIM_EGR_CC4G_Pos) /*!< 0x00000010 */
  5943. #define TIM_EGR_CC4G TIM_EGR_CC4G_Msk /*!<Capture/Compare 4 Generation */
  5944. #define TIM_EGR_COMG_Pos (5U)
  5945. #define TIM_EGR_COMG_Msk (0x1U << TIM_EGR_COMG_Pos) /*!< 0x00000020 */
  5946. #define TIM_EGR_COMG TIM_EGR_COMG_Msk /*!<Capture/Compare Control Update Generation */
  5947. #define TIM_EGR_TG_Pos (6U)
  5948. #define TIM_EGR_TG_Msk (0x1U << TIM_EGR_TG_Pos) /*!< 0x00000040 */
  5949. #define TIM_EGR_TG TIM_EGR_TG_Msk /*!<Trigger Generation */
  5950. #define TIM_EGR_BG_Pos (7U)
  5951. #define TIM_EGR_BG_Msk (0x1U << TIM_EGR_BG_Pos) /*!< 0x00000080 */
  5952. #define TIM_EGR_BG TIM_EGR_BG_Msk /*!<Break Generation */
  5953. /****************** Bit definition for TIM_CCMR1 register *******************/
  5954. #define TIM_CCMR1_CC1S_Pos (0U)
  5955. #define TIM_CCMR1_CC1S_Msk (0x3U << TIM_CCMR1_CC1S_Pos) /*!< 0x00000003 */
  5956. #define TIM_CCMR1_CC1S TIM_CCMR1_CC1S_Msk /*!<CC1S[1:0] bits (Capture/Compare 1 Selection) */
  5957. #define TIM_CCMR1_CC1S_0 (0x1U << TIM_CCMR1_CC1S_Pos) /*!< 0x0001 */
  5958. #define TIM_CCMR1_CC1S_1 (0x2U << TIM_CCMR1_CC1S_Pos) /*!< 0x0002 */
  5959. #define TIM_CCMR1_OC1FE_Pos (2U)
  5960. #define TIM_CCMR1_OC1FE_Msk (0x1U << TIM_CCMR1_OC1FE_Pos) /*!< 0x00000004 */
  5961. #define TIM_CCMR1_OC1FE TIM_CCMR1_OC1FE_Msk /*!<Output Compare 1 Fast enable */
  5962. #define TIM_CCMR1_OC1PE_Pos (3U)
  5963. #define TIM_CCMR1_OC1PE_Msk (0x1U << TIM_CCMR1_OC1PE_Pos) /*!< 0x00000008 */
  5964. #define TIM_CCMR1_OC1PE TIM_CCMR1_OC1PE_Msk /*!<Output Compare 1 Preload enable */
  5965. #define TIM_CCMR1_OC1M_Pos (4U)
  5966. #define TIM_CCMR1_OC1M_Msk (0x7U << TIM_CCMR1_OC1M_Pos) /*!< 0x00000070 */
  5967. #define TIM_CCMR1_OC1M TIM_CCMR1_OC1M_Msk /*!<OC1M[2:0] bits (Output Compare 1 Mode) */
  5968. #define TIM_CCMR1_OC1M_0 (0x1U << TIM_CCMR1_OC1M_Pos) /*!< 0x0010 */
  5969. #define TIM_CCMR1_OC1M_1 (0x2U << TIM_CCMR1_OC1M_Pos) /*!< 0x0020 */
  5970. #define TIM_CCMR1_OC1M_2 (0x4U << TIM_CCMR1_OC1M_Pos) /*!< 0x0040 */
  5971. #define TIM_CCMR1_OC1CE_Pos (7U)
  5972. #define TIM_CCMR1_OC1CE_Msk (0x1U << TIM_CCMR1_OC1CE_Pos) /*!< 0x00000080 */
  5973. #define TIM_CCMR1_OC1CE TIM_CCMR1_OC1CE_Msk /*!<Output Compare 1Clear Enable */
  5974. #define TIM_CCMR1_CC2S_Pos (8U)
  5975. #define TIM_CCMR1_CC2S_Msk (0x3U << TIM_CCMR1_CC2S_Pos) /*!< 0x00000300 */
  5976. #define TIM_CCMR1_CC2S TIM_CCMR1_CC2S_Msk /*!<CC2S[1:0] bits (Capture/Compare 2 Selection) */
  5977. #define TIM_CCMR1_CC2S_0 (0x1U << TIM_CCMR1_CC2S_Pos) /*!< 0x0100 */
  5978. #define TIM_CCMR1_CC2S_1 (0x2U << TIM_CCMR1_CC2S_Pos) /*!< 0x0200 */
  5979. #define TIM_CCMR1_OC2FE_Pos (10U)
  5980. #define TIM_CCMR1_OC2FE_Msk (0x1U << TIM_CCMR1_OC2FE_Pos) /*!< 0x00000400 */
  5981. #define TIM_CCMR1_OC2FE TIM_CCMR1_OC2FE_Msk /*!<Output Compare 2 Fast enable */
  5982. #define TIM_CCMR1_OC2PE_Pos (11U)
  5983. #define TIM_CCMR1_OC2PE_Msk (0x1U << TIM_CCMR1_OC2PE_Pos) /*!< 0x00000800 */
  5984. #define TIM_CCMR1_OC2PE TIM_CCMR1_OC2PE_Msk /*!<Output Compare 2 Preload enable */
  5985. #define TIM_CCMR1_OC2M_Pos (12U)
  5986. #define TIM_CCMR1_OC2M_Msk (0x7U << TIM_CCMR1_OC2M_Pos) /*!< 0x00007000 */
  5987. #define TIM_CCMR1_OC2M TIM_CCMR1_OC2M_Msk /*!<OC2M[2:0] bits (Output Compare 2 Mode) */
  5988. #define TIM_CCMR1_OC2M_0 (0x1U << TIM_CCMR1_OC2M_Pos) /*!< 0x1000 */
  5989. #define TIM_CCMR1_OC2M_1 (0x2U << TIM_CCMR1_OC2M_Pos) /*!< 0x2000 */
  5990. #define TIM_CCMR1_OC2M_2 (0x4U << TIM_CCMR1_OC2M_Pos) /*!< 0x4000 */
  5991. #define TIM_CCMR1_OC2CE_Pos (15U)
  5992. #define TIM_CCMR1_OC2CE_Msk (0x1U << TIM_CCMR1_OC2CE_Pos) /*!< 0x00008000 */
  5993. #define TIM_CCMR1_OC2CE TIM_CCMR1_OC2CE_Msk /*!<Output Compare 2 Clear Enable */
  5994. /*----------------------------------------------------------------------------*/
  5995. #define TIM_CCMR1_IC1PSC_Pos (2U)
  5996. #define TIM_CCMR1_IC1PSC_Msk (0x3U << TIM_CCMR1_IC1PSC_Pos) /*!< 0x0000000C */
  5997. #define TIM_CCMR1_IC1PSC TIM_CCMR1_IC1PSC_Msk /*!<IC1PSC[1:0] bits (Input Capture 1 Prescaler) */
  5998. #define TIM_CCMR1_IC1PSC_0 (0x1U << TIM_CCMR1_IC1PSC_Pos) /*!< 0x0004 */
  5999. #define TIM_CCMR1_IC1PSC_1 (0x2U << TIM_CCMR1_IC1PSC_Pos) /*!< 0x0008 */
  6000. #define TIM_CCMR1_IC1F_Pos (4U)
  6001. #define TIM_CCMR1_IC1F_Msk (0xFU << TIM_CCMR1_IC1F_Pos) /*!< 0x000000F0 */
  6002. #define TIM_CCMR1_IC1F TIM_CCMR1_IC1F_Msk /*!<IC1F[3:0] bits (Input Capture 1 Filter) */
  6003. #define TIM_CCMR1_IC1F_0 (0x1U << TIM_CCMR1_IC1F_Pos) /*!< 0x0010 */
  6004. #define TIM_CCMR1_IC1F_1 (0x2U << TIM_CCMR1_IC1F_Pos) /*!< 0x0020 */
  6005. #define TIM_CCMR1_IC1F_2 (0x4U << TIM_CCMR1_IC1F_Pos) /*!< 0x0040 */
  6006. #define TIM_CCMR1_IC1F_3 (0x8U << TIM_CCMR1_IC1F_Pos) /*!< 0x0080 */
  6007. #define TIM_CCMR1_IC2PSC_Pos (10U)
  6008. #define TIM_CCMR1_IC2PSC_Msk (0x3U << TIM_CCMR1_IC2PSC_Pos) /*!< 0x00000C00 */
  6009. #define TIM_CCMR1_IC2PSC TIM_CCMR1_IC2PSC_Msk /*!<IC2PSC[1:0] bits (Input Capture 2 Prescaler) */
  6010. #define TIM_CCMR1_IC2PSC_0 (0x1U << TIM_CCMR1_IC2PSC_Pos) /*!< 0x0400 */
  6011. #define TIM_CCMR1_IC2PSC_1 (0x2U << TIM_CCMR1_IC2PSC_Pos) /*!< 0x0800 */
  6012. #define TIM_CCMR1_IC2F_Pos (12U)
  6013. #define TIM_CCMR1_IC2F_Msk (0xFU << TIM_CCMR1_IC2F_Pos) /*!< 0x0000F000 */
  6014. #define TIM_CCMR1_IC2F TIM_CCMR1_IC2F_Msk /*!<IC2F[3:0] bits (Input Capture 2 Filter) */
  6015. #define TIM_CCMR1_IC2F_0 (0x1U << TIM_CCMR1_IC2F_Pos) /*!< 0x1000 */
  6016. #define TIM_CCMR1_IC2F_1 (0x2U << TIM_CCMR1_IC2F_Pos) /*!< 0x2000 */
  6017. #define TIM_CCMR1_IC2F_2 (0x4U << TIM_CCMR1_IC2F_Pos) /*!< 0x4000 */
  6018. #define TIM_CCMR1_IC2F_3 (0x8U << TIM_CCMR1_IC2F_Pos) /*!< 0x8000 */
  6019. /****************** Bit definition for TIM_CCMR2 register *******************/
  6020. #define TIM_CCMR2_CC3S_Pos (0U)
  6021. #define TIM_CCMR2_CC3S_Msk (0x3U << TIM_CCMR2_CC3S_Pos) /*!< 0x00000003 */
  6022. #define TIM_CCMR2_CC3S TIM_CCMR2_CC3S_Msk /*!<CC3S[1:0] bits (Capture/Compare 3 Selection) */
  6023. #define TIM_CCMR2_CC3S_0 (0x1U << TIM_CCMR2_CC3S_Pos) /*!< 0x0001 */
  6024. #define TIM_CCMR2_CC3S_1 (0x2U << TIM_CCMR2_CC3S_Pos) /*!< 0x0002 */
  6025. #define TIM_CCMR2_OC3FE_Pos (2U)
  6026. #define TIM_CCMR2_OC3FE_Msk (0x1U << TIM_CCMR2_OC3FE_Pos) /*!< 0x00000004 */
  6027. #define TIM_CCMR2_OC3FE TIM_CCMR2_OC3FE_Msk /*!<Output Compare 3 Fast enable */
  6028. #define TIM_CCMR2_OC3PE_Pos (3U)
  6029. #define TIM_CCMR2_OC3PE_Msk (0x1U << TIM_CCMR2_OC3PE_Pos) /*!< 0x00000008 */
  6030. #define TIM_CCMR2_OC3PE TIM_CCMR2_OC3PE_Msk /*!<Output Compare 3 Preload enable */
  6031. #define TIM_CCMR2_OC3M_Pos (4U)
  6032. #define TIM_CCMR2_OC3M_Msk (0x7U << TIM_CCMR2_OC3M_Pos) /*!< 0x00000070 */
  6033. #define TIM_CCMR2_OC3M TIM_CCMR2_OC3M_Msk /*!<OC3M[2:0] bits (Output Compare 3 Mode) */
  6034. #define TIM_CCMR2_OC3M_0 (0x1U << TIM_CCMR2_OC3M_Pos) /*!< 0x0010 */
  6035. #define TIM_CCMR2_OC3M_1 (0x2U << TIM_CCMR2_OC3M_Pos) /*!< 0x0020 */
  6036. #define TIM_CCMR2_OC3M_2 (0x4U << TIM_CCMR2_OC3M_Pos) /*!< 0x0040 */
  6037. #define TIM_CCMR2_OC3CE_Pos (7U)
  6038. #define TIM_CCMR2_OC3CE_Msk (0x1U << TIM_CCMR2_OC3CE_Pos) /*!< 0x00000080 */
  6039. #define TIM_CCMR2_OC3CE TIM_CCMR2_OC3CE_Msk /*!<Output Compare 3 Clear Enable */
  6040. #define TIM_CCMR2_CC4S_Pos (8U)
  6041. #define TIM_CCMR2_CC4S_Msk (0x3U << TIM_CCMR2_CC4S_Pos) /*!< 0x00000300 */
  6042. #define TIM_CCMR2_CC4S TIM_CCMR2_CC4S_Msk /*!<CC4S[1:0] bits (Capture/Compare 4 Selection) */
  6043. #define TIM_CCMR2_CC4S_0 (0x1U << TIM_CCMR2_CC4S_Pos) /*!< 0x0100 */
  6044. #define TIM_CCMR2_CC4S_1 (0x2U << TIM_CCMR2_CC4S_Pos) /*!< 0x0200 */
  6045. #define TIM_CCMR2_OC4FE_Pos (10U)
  6046. #define TIM_CCMR2_OC4FE_Msk (0x1U << TIM_CCMR2_OC4FE_Pos) /*!< 0x00000400 */
  6047. #define TIM_CCMR2_OC4FE TIM_CCMR2_OC4FE_Msk /*!<Output Compare 4 Fast enable */
  6048. #define TIM_CCMR2_OC4PE_Pos (11U)
  6049. #define TIM_CCMR2_OC4PE_Msk (0x1U << TIM_CCMR2_OC4PE_Pos) /*!< 0x00000800 */
  6050. #define TIM_CCMR2_OC4PE TIM_CCMR2_OC4PE_Msk /*!<Output Compare 4 Preload enable */
  6051. #define TIM_CCMR2_OC4M_Pos (12U)
  6052. #define TIM_CCMR2_OC4M_Msk (0x7U << TIM_CCMR2_OC4M_Pos) /*!< 0x00007000 */
  6053. #define TIM_CCMR2_OC4M TIM_CCMR2_OC4M_Msk /*!<OC4M[2:0] bits (Output Compare 4 Mode) */
  6054. #define TIM_CCMR2_OC4M_0 (0x1U << TIM_CCMR2_OC4M_Pos) /*!< 0x1000 */
  6055. #define TIM_CCMR2_OC4M_1 (0x2U << TIM_CCMR2_OC4M_Pos) /*!< 0x2000 */
  6056. #define TIM_CCMR2_OC4M_2 (0x4U << TIM_CCMR2_OC4M_Pos) /*!< 0x4000 */
  6057. #define TIM_CCMR2_OC4CE_Pos (15U)
  6058. #define TIM_CCMR2_OC4CE_Msk (0x1U << TIM_CCMR2_OC4CE_Pos) /*!< 0x00008000 */
  6059. #define TIM_CCMR2_OC4CE TIM_CCMR2_OC4CE_Msk /*!<Output Compare 4 Clear Enable */
  6060. /*----------------------------------------------------------------------------*/
  6061. #define TIM_CCMR2_IC3PSC_Pos (2U)
  6062. #define TIM_CCMR2_IC3PSC_Msk (0x3U << TIM_CCMR2_IC3PSC_Pos) /*!< 0x0000000C */
  6063. #define TIM_CCMR2_IC3PSC TIM_CCMR2_IC3PSC_Msk /*!<IC3PSC[1:0] bits (Input Capture 3 Prescaler) */
  6064. #define TIM_CCMR2_IC3PSC_0 (0x1U << TIM_CCMR2_IC3PSC_Pos) /*!< 0x0004 */
  6065. #define TIM_CCMR2_IC3PSC_1 (0x2U << TIM_CCMR2_IC3PSC_Pos) /*!< 0x0008 */
  6066. #define TIM_CCMR2_IC3F_Pos (4U)
  6067. #define TIM_CCMR2_IC3F_Msk (0xFU << TIM_CCMR2_IC3F_Pos) /*!< 0x000000F0 */
  6068. #define TIM_CCMR2_IC3F TIM_CCMR2_IC3F_Msk /*!<IC3F[3:0] bits (Input Capture 3 Filter) */
  6069. #define TIM_CCMR2_IC3F_0 (0x1U << TIM_CCMR2_IC3F_Pos) /*!< 0x0010 */
  6070. #define TIM_CCMR2_IC3F_1 (0x2U << TIM_CCMR2_IC3F_Pos) /*!< 0x0020 */
  6071. #define TIM_CCMR2_IC3F_2 (0x4U << TIM_CCMR2_IC3F_Pos) /*!< 0x0040 */
  6072. #define TIM_CCMR2_IC3F_3 (0x8U << TIM_CCMR2_IC3F_Pos) /*!< 0x0080 */
  6073. #define TIM_CCMR2_IC4PSC_Pos (10U)
  6074. #define TIM_CCMR2_IC4PSC_Msk (0x3U << TIM_CCMR2_IC4PSC_Pos) /*!< 0x00000C00 */
  6075. #define TIM_CCMR2_IC4PSC TIM_CCMR2_IC4PSC_Msk /*!<IC4PSC[1:0] bits (Input Capture 4 Prescaler) */
  6076. #define TIM_CCMR2_IC4PSC_0 (0x1U << TIM_CCMR2_IC4PSC_Pos) /*!< 0x0400 */
  6077. #define TIM_CCMR2_IC4PSC_1 (0x2U << TIM_CCMR2_IC4PSC_Pos) /*!< 0x0800 */
  6078. #define TIM_CCMR2_IC4F_Pos (12U)
  6079. #define TIM_CCMR2_IC4F_Msk (0xFU << TIM_CCMR2_IC4F_Pos) /*!< 0x0000F000 */
  6080. #define TIM_CCMR2_IC4F TIM_CCMR2_IC4F_Msk /*!<IC4F[3:0] bits (Input Capture 4 Filter) */
  6081. #define TIM_CCMR2_IC4F_0 (0x1U << TIM_CCMR2_IC4F_Pos) /*!< 0x1000 */
  6082. #define TIM_CCMR2_IC4F_1 (0x2U << TIM_CCMR2_IC4F_Pos) /*!< 0x2000 */
  6083. #define TIM_CCMR2_IC4F_2 (0x4U << TIM_CCMR2_IC4F_Pos) /*!< 0x4000 */
  6084. #define TIM_CCMR2_IC4F_3 (0x8U << TIM_CCMR2_IC4F_Pos) /*!< 0x8000 */
  6085. /******************* Bit definition for TIM_CCER register *******************/
  6086. #define TIM_CCER_CC1E_Pos (0U)
  6087. #define TIM_CCER_CC1E_Msk (0x1U << TIM_CCER_CC1E_Pos) /*!< 0x00000001 */
  6088. #define TIM_CCER_CC1E TIM_CCER_CC1E_Msk /*!<Capture/Compare 1 output enable */
  6089. #define TIM_CCER_CC1P_Pos (1U)
  6090. #define TIM_CCER_CC1P_Msk (0x1U << TIM_CCER_CC1P_Pos) /*!< 0x00000002 */
  6091. #define TIM_CCER_CC1P TIM_CCER_CC1P_Msk /*!<Capture/Compare 1 output Polarity */
  6092. #define TIM_CCER_CC1NE_Pos (2U)
  6093. #define TIM_CCER_CC1NE_Msk (0x1U << TIM_CCER_CC1NE_Pos) /*!< 0x00000004 */
  6094. #define TIM_CCER_CC1NE TIM_CCER_CC1NE_Msk /*!<Capture/Compare 1 Complementary output enable */
  6095. #define TIM_CCER_CC1NP_Pos (3U)
  6096. #define TIM_CCER_CC1NP_Msk (0x1U << TIM_CCER_CC1NP_Pos) /*!< 0x00000008 */
  6097. #define TIM_CCER_CC1NP TIM_CCER_CC1NP_Msk /*!<Capture/Compare 1 Complementary output Polarity */
  6098. #define TIM_CCER_CC2E_Pos (4U)
  6099. #define TIM_CCER_CC2E_Msk (0x1U << TIM_CCER_CC2E_Pos) /*!< 0x00000010 */
  6100. #define TIM_CCER_CC2E TIM_CCER_CC2E_Msk /*!<Capture/Compare 2 output enable */
  6101. #define TIM_CCER_CC2P_Pos (5U)
  6102. #define TIM_CCER_CC2P_Msk (0x1U << TIM_CCER_CC2P_Pos) /*!< 0x00000020 */
  6103. #define TIM_CCER_CC2P TIM_CCER_CC2P_Msk /*!<Capture/Compare 2 output Polarity */
  6104. #define TIM_CCER_CC2NE_Pos (6U)
  6105. #define TIM_CCER_CC2NE_Msk (0x1U << TIM_CCER_CC2NE_Pos) /*!< 0x00000040 */
  6106. #define TIM_CCER_CC2NE TIM_CCER_CC2NE_Msk /*!<Capture/Compare 2 Complementary output enable */
  6107. #define TIM_CCER_CC2NP_Pos (7U)
  6108. #define TIM_CCER_CC2NP_Msk (0x1U << TIM_CCER_CC2NP_Pos) /*!< 0x00000080 */
  6109. #define TIM_CCER_CC2NP TIM_CCER_CC2NP_Msk /*!<Capture/Compare 2 Complementary output Polarity */
  6110. #define TIM_CCER_CC3E_Pos (8U)
  6111. #define TIM_CCER_CC3E_Msk (0x1U << TIM_CCER_CC3E_Pos) /*!< 0x00000100 */
  6112. #define TIM_CCER_CC3E TIM_CCER_CC3E_Msk /*!<Capture/Compare 3 output enable */
  6113. #define TIM_CCER_CC3P_Pos (9U)
  6114. #define TIM_CCER_CC3P_Msk (0x1U << TIM_CCER_CC3P_Pos) /*!< 0x00000200 */
  6115. #define TIM_CCER_CC3P TIM_CCER_CC3P_Msk /*!<Capture/Compare 3 output Polarity */
  6116. #define TIM_CCER_CC3NE_Pos (10U)
  6117. #define TIM_CCER_CC3NE_Msk (0x1U << TIM_CCER_CC3NE_Pos) /*!< 0x00000400 */
  6118. #define TIM_CCER_CC3NE TIM_CCER_CC3NE_Msk /*!<Capture/Compare 3 Complementary output enable */
  6119. #define TIM_CCER_CC3NP_Pos (11U)
  6120. #define TIM_CCER_CC3NP_Msk (0x1U << TIM_CCER_CC3NP_Pos) /*!< 0x00000800 */
  6121. #define TIM_CCER_CC3NP TIM_CCER_CC3NP_Msk /*!<Capture/Compare 3 Complementary output Polarity */
  6122. #define TIM_CCER_CC4E_Pos (12U)
  6123. #define TIM_CCER_CC4E_Msk (0x1U << TIM_CCER_CC4E_Pos) /*!< 0x00001000 */
  6124. #define TIM_CCER_CC4E TIM_CCER_CC4E_Msk /*!<Capture/Compare 4 output enable */
  6125. #define TIM_CCER_CC4P_Pos (13U)
  6126. #define TIM_CCER_CC4P_Msk (0x1U << TIM_CCER_CC4P_Pos) /*!< 0x00002000 */
  6127. #define TIM_CCER_CC4P TIM_CCER_CC4P_Msk /*!<Capture/Compare 4 output Polarity */
  6128. #define TIM_CCER_CC4NP_Pos (15U)
  6129. #define TIM_CCER_CC4NP_Msk (0x1U << TIM_CCER_CC4NP_Pos) /*!< 0x00008000 */
  6130. #define TIM_CCER_CC4NP TIM_CCER_CC4NP_Msk /*!<Capture/Compare 4 Complementary output Polarity */
  6131. /******************* Bit definition for TIM_CNT register ********************/
  6132. #define TIM_CNT_CNT_Pos (0U)
  6133. #define TIM_CNT_CNT_Msk (0xFFFFFFFFU << TIM_CNT_CNT_Pos) /*!< 0xFFFFFFFF */
  6134. #define TIM_CNT_CNT TIM_CNT_CNT_Msk /*!<Counter Value */
  6135. /******************* Bit definition for TIM_PSC register ********************/
  6136. #define TIM_PSC_PSC_Pos (0U)
  6137. #define TIM_PSC_PSC_Msk (0xFFFFU << TIM_PSC_PSC_Pos) /*!< 0x0000FFFF */
  6138. #define TIM_PSC_PSC TIM_PSC_PSC_Msk /*!<Prescaler Value */
  6139. /******************* Bit definition for TIM_ARR register ********************/
  6140. #define TIM_ARR_ARR_Pos (0U)
  6141. #define TIM_ARR_ARR_Msk (0xFFFFFFFFU << TIM_ARR_ARR_Pos) /*!< 0xFFFFFFFF */
  6142. #define TIM_ARR_ARR TIM_ARR_ARR_Msk /*!<actual auto-reload Value */
  6143. /******************* Bit definition for TIM_RCR register ********************/
  6144. #define TIM_RCR_REP_Pos (0U)
  6145. #define TIM_RCR_REP_Msk (0xFFU << TIM_RCR_REP_Pos) /*!< 0x000000FF */
  6146. #define TIM_RCR_REP TIM_RCR_REP_Msk /*!<Repetition Counter Value */
  6147. /******************* Bit definition for TIM_CCR1 register *******************/
  6148. #define TIM_CCR1_CCR1_Pos (0U)
  6149. #define TIM_CCR1_CCR1_Msk (0xFFFFU << TIM_CCR1_CCR1_Pos) /*!< 0x0000FFFF */
  6150. #define TIM_CCR1_CCR1 TIM_CCR1_CCR1_Msk /*!<Capture/Compare 1 Value */
  6151. /******************* Bit definition for TIM_CCR2 register *******************/
  6152. #define TIM_CCR2_CCR2_Pos (0U)
  6153. #define TIM_CCR2_CCR2_Msk (0xFFFFU << TIM_CCR2_CCR2_Pos) /*!< 0x0000FFFF */
  6154. #define TIM_CCR2_CCR2 TIM_CCR2_CCR2_Msk /*!<Capture/Compare 2 Value */
  6155. /******************* Bit definition for TIM_CCR3 register *******************/
  6156. #define TIM_CCR3_CCR3_Pos (0U)
  6157. #define TIM_CCR3_CCR3_Msk (0xFFFFU << TIM_CCR3_CCR3_Pos) /*!< 0x0000FFFF */
  6158. #define TIM_CCR3_CCR3 TIM_CCR3_CCR3_Msk /*!<Capture/Compare 3 Value */
  6159. /******************* Bit definition for TIM_CCR4 register *******************/
  6160. #define TIM_CCR4_CCR4_Pos (0U)
  6161. #define TIM_CCR4_CCR4_Msk (0xFFFFU << TIM_CCR4_CCR4_Pos) /*!< 0x0000FFFF */
  6162. #define TIM_CCR4_CCR4 TIM_CCR4_CCR4_Msk /*!<Capture/Compare 4 Value */
  6163. /******************* Bit definition for TIM_BDTR register *******************/
  6164. #define TIM_BDTR_DTG_Pos (0U)
  6165. #define TIM_BDTR_DTG_Msk (0xFFU << TIM_BDTR_DTG_Pos) /*!< 0x000000FF */
  6166. #define TIM_BDTR_DTG TIM_BDTR_DTG_Msk /*!<DTG[0:7] bits (Dead-Time Generator set-up) */
  6167. #define TIM_BDTR_DTG_0 (0x01U << TIM_BDTR_DTG_Pos) /*!< 0x0001 */
  6168. #define TIM_BDTR_DTG_1 (0x02U << TIM_BDTR_DTG_Pos) /*!< 0x0002 */
  6169. #define TIM_BDTR_DTG_2 (0x04U << TIM_BDTR_DTG_Pos) /*!< 0x0004 */
  6170. #define TIM_BDTR_DTG_3 (0x08U << TIM_BDTR_DTG_Pos) /*!< 0x0008 */
  6171. #define TIM_BDTR_DTG_4 (0x10U << TIM_BDTR_DTG_Pos) /*!< 0x0010 */
  6172. #define TIM_BDTR_DTG_5 (0x20U << TIM_BDTR_DTG_Pos) /*!< 0x0020 */
  6173. #define TIM_BDTR_DTG_6 (0x40U << TIM_BDTR_DTG_Pos) /*!< 0x0040 */
  6174. #define TIM_BDTR_DTG_7 (0x80U << TIM_BDTR_DTG_Pos) /*!< 0x0080 */
  6175. #define TIM_BDTR_LOCK_Pos (8U)
  6176. #define TIM_BDTR_LOCK_Msk (0x3U << TIM_BDTR_LOCK_Pos) /*!< 0x00000300 */
  6177. #define TIM_BDTR_LOCK TIM_BDTR_LOCK_Msk /*!<LOCK[1:0] bits (Lock Configuration) */
  6178. #define TIM_BDTR_LOCK_0 (0x1U << TIM_BDTR_LOCK_Pos) /*!< 0x0100 */
  6179. #define TIM_BDTR_LOCK_1 (0x2U << TIM_BDTR_LOCK_Pos) /*!< 0x0200 */
  6180. #define TIM_BDTR_OSSI_Pos (10U)
  6181. #define TIM_BDTR_OSSI_Msk (0x1U << TIM_BDTR_OSSI_Pos) /*!< 0x00000400 */
  6182. #define TIM_BDTR_OSSI TIM_BDTR_OSSI_Msk /*!<Off-State Selection for Idle mode */
  6183. #define TIM_BDTR_OSSR_Pos (11U)
  6184. #define TIM_BDTR_OSSR_Msk (0x1U << TIM_BDTR_OSSR_Pos) /*!< 0x00000800 */
  6185. #define TIM_BDTR_OSSR TIM_BDTR_OSSR_Msk /*!<Off-State Selection for Run mode */
  6186. #define TIM_BDTR_BKE_Pos (12U)
  6187. #define TIM_BDTR_BKE_Msk (0x1U << TIM_BDTR_BKE_Pos) /*!< 0x00001000 */
  6188. #define TIM_BDTR_BKE TIM_BDTR_BKE_Msk /*!<Break enable */
  6189. #define TIM_BDTR_BKP_Pos (13U)
  6190. #define TIM_BDTR_BKP_Msk (0x1U << TIM_BDTR_BKP_Pos) /*!< 0x00002000 */
  6191. #define TIM_BDTR_BKP TIM_BDTR_BKP_Msk /*!<Break Polarity */
  6192. #define TIM_BDTR_AOE_Pos (14U)
  6193. #define TIM_BDTR_AOE_Msk (0x1U << TIM_BDTR_AOE_Pos) /*!< 0x00004000 */
  6194. #define TIM_BDTR_AOE TIM_BDTR_AOE_Msk /*!<Automatic Output enable */
  6195. #define TIM_BDTR_MOE_Pos (15U)
  6196. #define TIM_BDTR_MOE_Msk (0x1U << TIM_BDTR_MOE_Pos) /*!< 0x00008000 */
  6197. #define TIM_BDTR_MOE TIM_BDTR_MOE_Msk /*!<Main Output enable */
  6198. /******************* Bit definition for TIM_DCR register ********************/
  6199. #define TIM_DCR_DBA_Pos (0U)
  6200. #define TIM_DCR_DBA_Msk (0x1FU << TIM_DCR_DBA_Pos) /*!< 0x0000001F */
  6201. #define TIM_DCR_DBA TIM_DCR_DBA_Msk /*!<DBA[4:0] bits (DMA Base Address) */
  6202. #define TIM_DCR_DBA_0 (0x01U << TIM_DCR_DBA_Pos) /*!< 0x0001 */
  6203. #define TIM_DCR_DBA_1 (0x02U << TIM_DCR_DBA_Pos) /*!< 0x0002 */
  6204. #define TIM_DCR_DBA_2 (0x04U << TIM_DCR_DBA_Pos) /*!< 0x0004 */
  6205. #define TIM_DCR_DBA_3 (0x08U << TIM_DCR_DBA_Pos) /*!< 0x0008 */
  6206. #define TIM_DCR_DBA_4 (0x10U << TIM_DCR_DBA_Pos) /*!< 0x0010 */
  6207. #define TIM_DCR_DBL_Pos (8U)
  6208. #define TIM_DCR_DBL_Msk (0x1FU << TIM_DCR_DBL_Pos) /*!< 0x00001F00 */
  6209. #define TIM_DCR_DBL TIM_DCR_DBL_Msk /*!<DBL[4:0] bits (DMA Burst Length) */
  6210. #define TIM_DCR_DBL_0 (0x01U << TIM_DCR_DBL_Pos) /*!< 0x0100 */
  6211. #define TIM_DCR_DBL_1 (0x02U << TIM_DCR_DBL_Pos) /*!< 0x0200 */
  6212. #define TIM_DCR_DBL_2 (0x04U << TIM_DCR_DBL_Pos) /*!< 0x0400 */
  6213. #define TIM_DCR_DBL_3 (0x08U << TIM_DCR_DBL_Pos) /*!< 0x0800 */
  6214. #define TIM_DCR_DBL_4 (0x10U << TIM_DCR_DBL_Pos) /*!< 0x1000 */
  6215. /******************* Bit definition for TIM_DMAR register *******************/
  6216. #define TIM_DMAR_DMAB_Pos (0U)
  6217. #define TIM_DMAR_DMAB_Msk (0xFFFFU << TIM_DMAR_DMAB_Pos) /*!< 0x0000FFFF */
  6218. #define TIM_DMAR_DMAB TIM_DMAR_DMAB_Msk /*!<DMA register for burst accesses */
  6219. /******************* Bit definition for TIM_OR register *********************/
  6220. #define TIM_OR_TI1_RMP_Pos (0U)
  6221. #define TIM_OR_TI1_RMP_Msk (0x3U << TIM_OR_TI1_RMP_Pos) /*!< 0x00000003 */
  6222. #define TIM_OR_TI1_RMP TIM_OR_TI1_RMP_Msk /*!< TI1_RMP[1:0] bits (TIM11 Input Capture 1 remap) */
  6223. #define TIM_OR_TI1_RMP_0 (0x1U << TIM_OR_TI1_RMP_Pos) /*!< 0x00000001 */
  6224. #define TIM_OR_TI1_RMP_1 (0x2U << TIM_OR_TI1_RMP_Pos) /*!< 0x00000002 */
  6225. #define TIM_OR_TI4_RMP_Pos (6U)
  6226. #define TIM_OR_TI4_RMP_Msk (0x3U << TIM_OR_TI4_RMP_Pos) /*!< 0x000000C0 */
  6227. #define TIM_OR_TI4_RMP TIM_OR_TI4_RMP_Msk /*!<TI4_RMP[1:0] bits (TIM5 Input 4 remap) */
  6228. #define TIM_OR_TI4_RMP_0 (0x1U << TIM_OR_TI4_RMP_Pos) /*!< 0x0040 */
  6229. #define TIM_OR_TI4_RMP_1 (0x2U << TIM_OR_TI4_RMP_Pos) /*!< 0x0080 */
  6230. #define TIM_OR_ITR1_RMP_Pos (10U)
  6231. #define TIM_OR_ITR1_RMP_Msk (0x3U << TIM_OR_ITR1_RMP_Pos) /*!< 0x00000C00 */
  6232. #define TIM_OR_ITR1_RMP TIM_OR_ITR1_RMP_Msk /*!<ITR1_RMP[1:0] bits (TIM2 Internal trigger 1 remap) */
  6233. #define TIM_OR_ITR1_RMP_0 (0x1U << TIM_OR_ITR1_RMP_Pos) /*!< 0x0400 */
  6234. #define TIM_OR_ITR1_RMP_1 (0x2U << TIM_OR_ITR1_RMP_Pos) /*!< 0x0800 */
  6235. /******************************************************************************/
  6236. /* */
  6237. /* Universal Synchronous Asynchronous Receiver Transmitter */
  6238. /* */
  6239. /******************************************************************************/
  6240. /******************* Bit definition for USART_SR register *******************/
  6241. #define USART_SR_PE_Pos (0U)
  6242. #define USART_SR_PE_Msk (0x1U << USART_SR_PE_Pos) /*!< 0x00000001 */
  6243. #define USART_SR_PE USART_SR_PE_Msk /*!<Parity Error */
  6244. #define USART_SR_FE_Pos (1U)
  6245. #define USART_SR_FE_Msk (0x1U << USART_SR_FE_Pos) /*!< 0x00000002 */
  6246. #define USART_SR_FE USART_SR_FE_Msk /*!<Framing Error */
  6247. #define USART_SR_NE_Pos (2U)
  6248. #define USART_SR_NE_Msk (0x1U << USART_SR_NE_Pos) /*!< 0x00000004 */
  6249. #define USART_SR_NE USART_SR_NE_Msk /*!<Noise Error Flag */
  6250. #define USART_SR_ORE_Pos (3U)
  6251. #define USART_SR_ORE_Msk (0x1U << USART_SR_ORE_Pos) /*!< 0x00000008 */
  6252. #define USART_SR_ORE USART_SR_ORE_Msk /*!<OverRun Error */
  6253. #define USART_SR_IDLE_Pos (4U)
  6254. #define USART_SR_IDLE_Msk (0x1U << USART_SR_IDLE_Pos) /*!< 0x00000010 */
  6255. #define USART_SR_IDLE USART_SR_IDLE_Msk /*!<IDLE line detected */
  6256. #define USART_SR_RXNE_Pos (5U)
  6257. #define USART_SR_RXNE_Msk (0x1U << USART_SR_RXNE_Pos) /*!< 0x00000020 */
  6258. #define USART_SR_RXNE USART_SR_RXNE_Msk /*!<Read Data Register Not Empty */
  6259. #define USART_SR_TC_Pos (6U)
  6260. #define USART_SR_TC_Msk (0x1U << USART_SR_TC_Pos) /*!< 0x00000040 */
  6261. #define USART_SR_TC USART_SR_TC_Msk /*!<Transmission Complete */
  6262. #define USART_SR_TXE_Pos (7U)
  6263. #define USART_SR_TXE_Msk (0x1U << USART_SR_TXE_Pos) /*!< 0x00000080 */
  6264. #define USART_SR_TXE USART_SR_TXE_Msk /*!<Transmit Data Register Empty */
  6265. #define USART_SR_LBD_Pos (8U)
  6266. #define USART_SR_LBD_Msk (0x1U << USART_SR_LBD_Pos) /*!< 0x00000100 */
  6267. #define USART_SR_LBD USART_SR_LBD_Msk /*!<LIN Break Detection Flag */
  6268. #define USART_SR_CTS_Pos (9U)
  6269. #define USART_SR_CTS_Msk (0x1U << USART_SR_CTS_Pos) /*!< 0x00000200 */
  6270. #define USART_SR_CTS USART_SR_CTS_Msk /*!<CTS Flag */
  6271. /******************* Bit definition for USART_DR register *******************/
  6272. #define USART_DR_DR_Pos (0U)
  6273. #define USART_DR_DR_Msk (0x1FFU << USART_DR_DR_Pos) /*!< 0x000001FF */
  6274. #define USART_DR_DR USART_DR_DR_Msk /*!<Data value */
  6275. /****************** Bit definition for USART_BRR register *******************/
  6276. #define USART_BRR_DIV_Fraction_Pos (0U)
  6277. #define USART_BRR_DIV_Fraction_Msk (0xFU << USART_BRR_DIV_Fraction_Pos) /*!< 0x0000000F */
  6278. #define USART_BRR_DIV_Fraction USART_BRR_DIV_Fraction_Msk /*!<Fraction of USARTDIV */
  6279. #define USART_BRR_DIV_Mantissa_Pos (4U)
  6280. #define USART_BRR_DIV_Mantissa_Msk (0xFFFU << USART_BRR_DIV_Mantissa_Pos) /*!< 0x0000FFF0 */
  6281. #define USART_BRR_DIV_Mantissa USART_BRR_DIV_Mantissa_Msk /*!<Mantissa of USARTDIV */
  6282. /****************** Bit definition for USART_CR1 register *******************/
  6283. #define USART_CR1_SBK_Pos (0U)
  6284. #define USART_CR1_SBK_Msk (0x1U << USART_CR1_SBK_Pos) /*!< 0x00000001 */
  6285. #define USART_CR1_SBK USART_CR1_SBK_Msk /*!<Send Break */
  6286. #define USART_CR1_RWU_Pos (1U)
  6287. #define USART_CR1_RWU_Msk (0x1U << USART_CR1_RWU_Pos) /*!< 0x00000002 */
  6288. #define USART_CR1_RWU USART_CR1_RWU_Msk /*!<Receiver wakeup */
  6289. #define USART_CR1_RE_Pos (2U)
  6290. #define USART_CR1_RE_Msk (0x1U << USART_CR1_RE_Pos) /*!< 0x00000004 */
  6291. #define USART_CR1_RE USART_CR1_RE_Msk /*!<Receiver Enable */
  6292. #define USART_CR1_TE_Pos (3U)
  6293. #define USART_CR1_TE_Msk (0x1U << USART_CR1_TE_Pos) /*!< 0x00000008 */
  6294. #define USART_CR1_TE USART_CR1_TE_Msk /*!<Transmitter Enable */
  6295. #define USART_CR1_IDLEIE_Pos (4U)
  6296. #define USART_CR1_IDLEIE_Msk (0x1U << USART_CR1_IDLEIE_Pos) /*!< 0x00000010 */
  6297. #define USART_CR1_IDLEIE USART_CR1_IDLEIE_Msk /*!<IDLE Interrupt Enable */
  6298. #define USART_CR1_RXNEIE_Pos (5U)
  6299. #define USART_CR1_RXNEIE_Msk (0x1U << USART_CR1_RXNEIE_Pos) /*!< 0x00000020 */
  6300. #define USART_CR1_RXNEIE USART_CR1_RXNEIE_Msk /*!<RXNE Interrupt Enable */
  6301. #define USART_CR1_TCIE_Pos (6U)
  6302. #define USART_CR1_TCIE_Msk (0x1U << USART_CR1_TCIE_Pos) /*!< 0x00000040 */
  6303. #define USART_CR1_TCIE USART_CR1_TCIE_Msk /*!<Transmission Complete Interrupt Enable */
  6304. #define USART_CR1_TXEIE_Pos (7U)
  6305. #define USART_CR1_TXEIE_Msk (0x1U << USART_CR1_TXEIE_Pos) /*!< 0x00000080 */
  6306. #define USART_CR1_TXEIE USART_CR1_TXEIE_Msk /*!<PE Interrupt Enable */
  6307. #define USART_CR1_PEIE_Pos (8U)
  6308. #define USART_CR1_PEIE_Msk (0x1U << USART_CR1_PEIE_Pos) /*!< 0x00000100 */
  6309. #define USART_CR1_PEIE USART_CR1_PEIE_Msk /*!<PE Interrupt Enable */
  6310. #define USART_CR1_PS_Pos (9U)
  6311. #define USART_CR1_PS_Msk (0x1U << USART_CR1_PS_Pos) /*!< 0x00000200 */
  6312. #define USART_CR1_PS USART_CR1_PS_Msk /*!<Parity Selection */
  6313. #define USART_CR1_PCE_Pos (10U)
  6314. #define USART_CR1_PCE_Msk (0x1U << USART_CR1_PCE_Pos) /*!< 0x00000400 */
  6315. #define USART_CR1_PCE USART_CR1_PCE_Msk /*!<Parity Control Enable */
  6316. #define USART_CR1_WAKE_Pos (11U)
  6317. #define USART_CR1_WAKE_Msk (0x1U << USART_CR1_WAKE_Pos) /*!< 0x00000800 */
  6318. #define USART_CR1_WAKE USART_CR1_WAKE_Msk /*!<Wakeup method */
  6319. #define USART_CR1_M_Pos (12U)
  6320. #define USART_CR1_M_Msk (0x1U << USART_CR1_M_Pos) /*!< 0x00001000 */
  6321. #define USART_CR1_M USART_CR1_M_Msk /*!<Word length */
  6322. #define USART_CR1_UE_Pos (13U)
  6323. #define USART_CR1_UE_Msk (0x1U << USART_CR1_UE_Pos) /*!< 0x00002000 */
  6324. #define USART_CR1_UE USART_CR1_UE_Msk /*!<USART Enable */
  6325. #define USART_CR1_OVER8_Pos (15U)
  6326. #define USART_CR1_OVER8_Msk (0x1U << USART_CR1_OVER8_Pos) /*!< 0x00008000 */
  6327. #define USART_CR1_OVER8 USART_CR1_OVER8_Msk /*!<USART Oversampling by 8 enable */
  6328. /****************** Bit definition for USART_CR2 register *******************/
  6329. #define USART_CR2_ADD_Pos (0U)
  6330. #define USART_CR2_ADD_Msk (0xFU << USART_CR2_ADD_Pos) /*!< 0x0000000F */
  6331. #define USART_CR2_ADD USART_CR2_ADD_Msk /*!<Address of the USART node */
  6332. #define USART_CR2_LBDL_Pos (5U)
  6333. #define USART_CR2_LBDL_Msk (0x1U << USART_CR2_LBDL_Pos) /*!< 0x00000020 */
  6334. #define USART_CR2_LBDL USART_CR2_LBDL_Msk /*!<LIN Break Detection Length */
  6335. #define USART_CR2_LBDIE_Pos (6U)
  6336. #define USART_CR2_LBDIE_Msk (0x1U << USART_CR2_LBDIE_Pos) /*!< 0x00000040 */
  6337. #define USART_CR2_LBDIE USART_CR2_LBDIE_Msk /*!<LIN Break Detection Interrupt Enable */
  6338. #define USART_CR2_LBCL_Pos (8U)
  6339. #define USART_CR2_LBCL_Msk (0x1U << USART_CR2_LBCL_Pos) /*!< 0x00000100 */
  6340. #define USART_CR2_LBCL USART_CR2_LBCL_Msk /*!<Last Bit Clock pulse */
  6341. #define USART_CR2_CPHA_Pos (9U)
  6342. #define USART_CR2_CPHA_Msk (0x1U << USART_CR2_CPHA_Pos) /*!< 0x00000200 */
  6343. #define USART_CR2_CPHA USART_CR2_CPHA_Msk /*!<Clock Phase */
  6344. #define USART_CR2_CPOL_Pos (10U)
  6345. #define USART_CR2_CPOL_Msk (0x1U << USART_CR2_CPOL_Pos) /*!< 0x00000400 */
  6346. #define USART_CR2_CPOL USART_CR2_CPOL_Msk /*!<Clock Polarity */
  6347. #define USART_CR2_CLKEN_Pos (11U)
  6348. #define USART_CR2_CLKEN_Msk (0x1U << USART_CR2_CLKEN_Pos) /*!< 0x00000800 */
  6349. #define USART_CR2_CLKEN USART_CR2_CLKEN_Msk /*!<Clock Enable */
  6350. #define USART_CR2_STOP_Pos (12U)
  6351. #define USART_CR2_STOP_Msk (0x3U << USART_CR2_STOP_Pos) /*!< 0x00003000 */
  6352. #define USART_CR2_STOP USART_CR2_STOP_Msk /*!<STOP[1:0] bits (STOP bits) */
  6353. #define USART_CR2_STOP_0 (0x1U << USART_CR2_STOP_Pos) /*!< 0x1000 */
  6354. #define USART_CR2_STOP_1 (0x2U << USART_CR2_STOP_Pos) /*!< 0x2000 */
  6355. #define USART_CR2_LINEN_Pos (14U)
  6356. #define USART_CR2_LINEN_Msk (0x1U << USART_CR2_LINEN_Pos) /*!< 0x00004000 */
  6357. #define USART_CR2_LINEN USART_CR2_LINEN_Msk /*!<LIN mode enable */
  6358. /****************** Bit definition for USART_CR3 register *******************/
  6359. #define USART_CR3_EIE_Pos (0U)
  6360. #define USART_CR3_EIE_Msk (0x1U << USART_CR3_EIE_Pos) /*!< 0x00000001 */
  6361. #define USART_CR3_EIE USART_CR3_EIE_Msk /*!<Error Interrupt Enable */
  6362. #define USART_CR3_IREN_Pos (1U)
  6363. #define USART_CR3_IREN_Msk (0x1U << USART_CR3_IREN_Pos) /*!< 0x00000002 */
  6364. #define USART_CR3_IREN USART_CR3_IREN_Msk /*!<IrDA mode Enable */
  6365. #define USART_CR3_IRLP_Pos (2U)
  6366. #define USART_CR3_IRLP_Msk (0x1U << USART_CR3_IRLP_Pos) /*!< 0x00000004 */
  6367. #define USART_CR3_IRLP USART_CR3_IRLP_Msk /*!<IrDA Low-Power */
  6368. #define USART_CR3_HDSEL_Pos (3U)
  6369. #define USART_CR3_HDSEL_Msk (0x1U << USART_CR3_HDSEL_Pos) /*!< 0x00000008 */
  6370. #define USART_CR3_HDSEL USART_CR3_HDSEL_Msk /*!<Half-Duplex Selection */
  6371. #define USART_CR3_NACK_Pos (4U)
  6372. #define USART_CR3_NACK_Msk (0x1U << USART_CR3_NACK_Pos) /*!< 0x00000010 */
  6373. #define USART_CR3_NACK USART_CR3_NACK_Msk /*!<Smartcard NACK enable */
  6374. #define USART_CR3_SCEN_Pos (5U)
  6375. #define USART_CR3_SCEN_Msk (0x1U << USART_CR3_SCEN_Pos) /*!< 0x00000020 */
  6376. #define USART_CR3_SCEN USART_CR3_SCEN_Msk /*!<Smartcard mode enable */
  6377. #define USART_CR3_DMAR_Pos (6U)
  6378. #define USART_CR3_DMAR_Msk (0x1U << USART_CR3_DMAR_Pos) /*!< 0x00000040 */
  6379. #define USART_CR3_DMAR USART_CR3_DMAR_Msk /*!<DMA Enable Receiver */
  6380. #define USART_CR3_DMAT_Pos (7U)
  6381. #define USART_CR3_DMAT_Msk (0x1U << USART_CR3_DMAT_Pos) /*!< 0x00000080 */
  6382. #define USART_CR3_DMAT USART_CR3_DMAT_Msk /*!<DMA Enable Transmitter */
  6383. #define USART_CR3_RTSE_Pos (8U)
  6384. #define USART_CR3_RTSE_Msk (0x1U << USART_CR3_RTSE_Pos) /*!< 0x00000100 */
  6385. #define USART_CR3_RTSE USART_CR3_RTSE_Msk /*!<RTS Enable */
  6386. #define USART_CR3_CTSE_Pos (9U)
  6387. #define USART_CR3_CTSE_Msk (0x1U << USART_CR3_CTSE_Pos) /*!< 0x00000200 */
  6388. #define USART_CR3_CTSE USART_CR3_CTSE_Msk /*!<CTS Enable */
  6389. #define USART_CR3_CTSIE_Pos (10U)
  6390. #define USART_CR3_CTSIE_Msk (0x1U << USART_CR3_CTSIE_Pos) /*!< 0x00000400 */
  6391. #define USART_CR3_CTSIE USART_CR3_CTSIE_Msk /*!<CTS Interrupt Enable */
  6392. #define USART_CR3_ONEBIT_Pos (11U)
  6393. #define USART_CR3_ONEBIT_Msk (0x1U << USART_CR3_ONEBIT_Pos) /*!< 0x00000800 */
  6394. #define USART_CR3_ONEBIT USART_CR3_ONEBIT_Msk /*!<USART One bit method enable */
  6395. /****************** Bit definition for USART_GTPR register ******************/
  6396. #define USART_GTPR_PSC_Pos (0U)
  6397. #define USART_GTPR_PSC_Msk (0xFFU << USART_GTPR_PSC_Pos) /*!< 0x000000FF */
  6398. #define USART_GTPR_PSC USART_GTPR_PSC_Msk /*!<PSC[7:0] bits (Prescaler value) */
  6399. #define USART_GTPR_PSC_0 (0x01U << USART_GTPR_PSC_Pos) /*!< 0x0001 */
  6400. #define USART_GTPR_PSC_1 (0x02U << USART_GTPR_PSC_Pos) /*!< 0x0002 */
  6401. #define USART_GTPR_PSC_2 (0x04U << USART_GTPR_PSC_Pos) /*!< 0x0004 */
  6402. #define USART_GTPR_PSC_3 (0x08U << USART_GTPR_PSC_Pos) /*!< 0x0008 */
  6403. #define USART_GTPR_PSC_4 (0x10U << USART_GTPR_PSC_Pos) /*!< 0x0010 */
  6404. #define USART_GTPR_PSC_5 (0x20U << USART_GTPR_PSC_Pos) /*!< 0x0020 */
  6405. #define USART_GTPR_PSC_6 (0x40U << USART_GTPR_PSC_Pos) /*!< 0x0040 */
  6406. #define USART_GTPR_PSC_7 (0x80U << USART_GTPR_PSC_Pos) /*!< 0x0080 */
  6407. #define USART_GTPR_GT_Pos (8U)
  6408. #define USART_GTPR_GT_Msk (0xFFU << USART_GTPR_GT_Pos) /*!< 0x0000FF00 */
  6409. #define USART_GTPR_GT USART_GTPR_GT_Msk /*!<Guard time value */
  6410. /******************************************************************************/
  6411. /* */
  6412. /* Window WATCHDOG */
  6413. /* */
  6414. /******************************************************************************/
  6415. /******************* Bit definition for WWDG_CR register ********************/
  6416. #define WWDG_CR_T_Pos (0U)
  6417. #define WWDG_CR_T_Msk (0x7FU << WWDG_CR_T_Pos) /*!< 0x0000007F */
  6418. #define WWDG_CR_T WWDG_CR_T_Msk /*!<T[6:0] bits (7-Bit counter (MSB to LSB)) */
  6419. #define WWDG_CR_T_0 (0x01U << WWDG_CR_T_Pos) /*!< 0x01 */
  6420. #define WWDG_CR_T_1 (0x02U << WWDG_CR_T_Pos) /*!< 0x02 */
  6421. #define WWDG_CR_T_2 (0x04U << WWDG_CR_T_Pos) /*!< 0x04 */
  6422. #define WWDG_CR_T_3 (0x08U << WWDG_CR_T_Pos) /*!< 0x08 */
  6423. #define WWDG_CR_T_4 (0x10U << WWDG_CR_T_Pos) /*!< 0x10 */
  6424. #define WWDG_CR_T_5 (0x20U << WWDG_CR_T_Pos) /*!< 0x20 */
  6425. #define WWDG_CR_T_6 (0x40U << WWDG_CR_T_Pos) /*!< 0x40 */
  6426. /* Legacy defines */
  6427. #define WWDG_CR_T0 WWDG_CR_T_0
  6428. #define WWDG_CR_T1 WWDG_CR_T_1
  6429. #define WWDG_CR_T2 WWDG_CR_T_2
  6430. #define WWDG_CR_T3 WWDG_CR_T_3
  6431. #define WWDG_CR_T4 WWDG_CR_T_4
  6432. #define WWDG_CR_T5 WWDG_CR_T_5
  6433. #define WWDG_CR_T6 WWDG_CR_T_6
  6434. #define WWDG_CR_WDGA_Pos (7U)
  6435. #define WWDG_CR_WDGA_Msk (0x1U << WWDG_CR_WDGA_Pos) /*!< 0x00000080 */
  6436. #define WWDG_CR_WDGA WWDG_CR_WDGA_Msk /*!<Activation bit */
  6437. /******************* Bit definition for WWDG_CFR register *******************/
  6438. #define WWDG_CFR_W_Pos (0U)
  6439. #define WWDG_CFR_W_Msk (0x7FU << WWDG_CFR_W_Pos) /*!< 0x0000007F */
  6440. #define WWDG_CFR_W WWDG_CFR_W_Msk /*!<W[6:0] bits (7-bit window value) */
  6441. #define WWDG_CFR_W_0 (0x01U << WWDG_CFR_W_Pos) /*!< 0x0001 */
  6442. #define WWDG_CFR_W_1 (0x02U << WWDG_CFR_W_Pos) /*!< 0x0002 */
  6443. #define WWDG_CFR_W_2 (0x04U << WWDG_CFR_W_Pos) /*!< 0x0004 */
  6444. #define WWDG_CFR_W_3 (0x08U << WWDG_CFR_W_Pos) /*!< 0x0008 */
  6445. #define WWDG_CFR_W_4 (0x10U << WWDG_CFR_W_Pos) /*!< 0x0010 */
  6446. #define WWDG_CFR_W_5 (0x20U << WWDG_CFR_W_Pos) /*!< 0x0020 */
  6447. #define WWDG_CFR_W_6 (0x40U << WWDG_CFR_W_Pos) /*!< 0x0040 */
  6448. /* Legacy defines */
  6449. #define WWDG_CFR_W0 WWDG_CFR_W_0
  6450. #define WWDG_CFR_W1 WWDG_CFR_W_1
  6451. #define WWDG_CFR_W2 WWDG_CFR_W_2
  6452. #define WWDG_CFR_W3 WWDG_CFR_W_3
  6453. #define WWDG_CFR_W4 WWDG_CFR_W_4
  6454. #define WWDG_CFR_W5 WWDG_CFR_W_5
  6455. #define WWDG_CFR_W6 WWDG_CFR_W_6
  6456. #define WWDG_CFR_WDGTB_Pos (7U)
  6457. #define WWDG_CFR_WDGTB_Msk (0x3U << WWDG_CFR_WDGTB_Pos) /*!< 0x00000180 */
  6458. #define WWDG_CFR_WDGTB WWDG_CFR_WDGTB_Msk /*!<WDGTB[1:0] bits (Timer Base) */
  6459. #define WWDG_CFR_WDGTB_0 (0x1U << WWDG_CFR_WDGTB_Pos) /*!< 0x0080 */
  6460. #define WWDG_CFR_WDGTB_1 (0x2U << WWDG_CFR_WDGTB_Pos) /*!< 0x0100 */
  6461. /* Legacy defines */
  6462. #define WWDG_CFR_WDGTB0 WWDG_CFR_WDGTB_0
  6463. #define WWDG_CFR_WDGTB1 WWDG_CFR_WDGTB_1
  6464. #define WWDG_CFR_EWI_Pos (9U)
  6465. #define WWDG_CFR_EWI_Msk (0x1U << WWDG_CFR_EWI_Pos) /*!< 0x00000200 */
  6466. #define WWDG_CFR_EWI WWDG_CFR_EWI_Msk /*!<Early Wakeup Interrupt */
  6467. /******************* Bit definition for WWDG_SR register ********************/
  6468. #define WWDG_SR_EWIF_Pos (0U)
  6469. #define WWDG_SR_EWIF_Msk (0x1U << WWDG_SR_EWIF_Pos) /*!< 0x00000001 */
  6470. #define WWDG_SR_EWIF WWDG_SR_EWIF_Msk /*!<Early Wakeup Interrupt Flag */
  6471. /******************************************************************************/
  6472. /* */
  6473. /* DBG */
  6474. /* */
  6475. /******************************************************************************/
  6476. /******************** Bit definition for DBGMCU_IDCODE register *************/
  6477. #define DBGMCU_IDCODE_DEV_ID_Pos (0U)
  6478. #define DBGMCU_IDCODE_DEV_ID_Msk (0xFFFU << DBGMCU_IDCODE_DEV_ID_Pos) /*!< 0x00000FFF */
  6479. #define DBGMCU_IDCODE_DEV_ID DBGMCU_IDCODE_DEV_ID_Msk
  6480. #define DBGMCU_IDCODE_REV_ID_Pos (16U)
  6481. #define DBGMCU_IDCODE_REV_ID_Msk (0xFFFFU << DBGMCU_IDCODE_REV_ID_Pos) /*!< 0xFFFF0000 */
  6482. #define DBGMCU_IDCODE_REV_ID DBGMCU_IDCODE_REV_ID_Msk
  6483. /******************** Bit definition for DBGMCU_CR register *****************/
  6484. #define DBGMCU_CR_DBG_SLEEP_Pos (0U)
  6485. #define DBGMCU_CR_DBG_SLEEP_Msk (0x1U << DBGMCU_CR_DBG_SLEEP_Pos) /*!< 0x00000001 */
  6486. #define DBGMCU_CR_DBG_SLEEP DBGMCU_CR_DBG_SLEEP_Msk
  6487. #define DBGMCU_CR_DBG_STOP_Pos (1U)
  6488. #define DBGMCU_CR_DBG_STOP_Msk (0x1U << DBGMCU_CR_DBG_STOP_Pos) /*!< 0x00000002 */
  6489. #define DBGMCU_CR_DBG_STOP DBGMCU_CR_DBG_STOP_Msk
  6490. #define DBGMCU_CR_DBG_STANDBY_Pos (2U)
  6491. #define DBGMCU_CR_DBG_STANDBY_Msk (0x1U << DBGMCU_CR_DBG_STANDBY_Pos) /*!< 0x00000004 */
  6492. #define DBGMCU_CR_DBG_STANDBY DBGMCU_CR_DBG_STANDBY_Msk
  6493. #define DBGMCU_CR_TRACE_IOEN_Pos (5U)
  6494. #define DBGMCU_CR_TRACE_IOEN_Msk (0x1U << DBGMCU_CR_TRACE_IOEN_Pos) /*!< 0x00000020 */
  6495. #define DBGMCU_CR_TRACE_IOEN DBGMCU_CR_TRACE_IOEN_Msk
  6496. #define DBGMCU_CR_TRACE_MODE_Pos (6U)
  6497. #define DBGMCU_CR_TRACE_MODE_Msk (0x3U << DBGMCU_CR_TRACE_MODE_Pos) /*!< 0x000000C0 */
  6498. #define DBGMCU_CR_TRACE_MODE DBGMCU_CR_TRACE_MODE_Msk
  6499. #define DBGMCU_CR_TRACE_MODE_0 (0x1U << DBGMCU_CR_TRACE_MODE_Pos) /*!< 0x00000040 */
  6500. #define DBGMCU_CR_TRACE_MODE_1 (0x2U << DBGMCU_CR_TRACE_MODE_Pos) /*!< 0x00000080 */
  6501. /******************** Bit definition for DBGMCU_APB1_FZ register ************/
  6502. #define DBGMCU_APB1_FZ_DBG_TIM2_STOP_Pos (0U)
  6503. #define DBGMCU_APB1_FZ_DBG_TIM2_STOP_Msk (0x1U << DBGMCU_APB1_FZ_DBG_TIM2_STOP_Pos) /*!< 0x00000001 */
  6504. #define DBGMCU_APB1_FZ_DBG_TIM2_STOP DBGMCU_APB1_FZ_DBG_TIM2_STOP_Msk
  6505. #define DBGMCU_APB1_FZ_DBG_TIM3_STOP_Pos (1U)
  6506. #define DBGMCU_APB1_FZ_DBG_TIM3_STOP_Msk (0x1U << DBGMCU_APB1_FZ_DBG_TIM3_STOP_Pos) /*!< 0x00000002 */
  6507. #define DBGMCU_APB1_FZ_DBG_TIM3_STOP DBGMCU_APB1_FZ_DBG_TIM3_STOP_Msk
  6508. #define DBGMCU_APB1_FZ_DBG_TIM4_STOP_Pos (2U)
  6509. #define DBGMCU_APB1_FZ_DBG_TIM4_STOP_Msk (0x1U << DBGMCU_APB1_FZ_DBG_TIM4_STOP_Pos) /*!< 0x00000004 */
  6510. #define DBGMCU_APB1_FZ_DBG_TIM4_STOP DBGMCU_APB1_FZ_DBG_TIM4_STOP_Msk
  6511. #define DBGMCU_APB1_FZ_DBG_TIM5_STOP_Pos (3U)
  6512. #define DBGMCU_APB1_FZ_DBG_TIM5_STOP_Msk (0x1U << DBGMCU_APB1_FZ_DBG_TIM5_STOP_Pos) /*!< 0x00000008 */
  6513. #define DBGMCU_APB1_FZ_DBG_TIM5_STOP DBGMCU_APB1_FZ_DBG_TIM5_STOP_Msk
  6514. #define DBGMCU_APB1_FZ_DBG_RTC_STOP_Pos (10U)
  6515. #define DBGMCU_APB1_FZ_DBG_RTC_STOP_Msk (0x1U << DBGMCU_APB1_FZ_DBG_RTC_STOP_Pos) /*!< 0x00000400 */
  6516. #define DBGMCU_APB1_FZ_DBG_RTC_STOP DBGMCU_APB1_FZ_DBG_RTC_STOP_Msk
  6517. #define DBGMCU_APB1_FZ_DBG_WWDG_STOP_Pos (11U)
  6518. #define DBGMCU_APB1_FZ_DBG_WWDG_STOP_Msk (0x1U << DBGMCU_APB1_FZ_DBG_WWDG_STOP_Pos) /*!< 0x00000800 */
  6519. #define DBGMCU_APB1_FZ_DBG_WWDG_STOP DBGMCU_APB1_FZ_DBG_WWDG_STOP_Msk
  6520. #define DBGMCU_APB1_FZ_DBG_IWDG_STOP_Pos (12U)
  6521. #define DBGMCU_APB1_FZ_DBG_IWDG_STOP_Msk (0x1U << DBGMCU_APB1_FZ_DBG_IWDG_STOP_Pos) /*!< 0x00001000 */
  6522. #define DBGMCU_APB1_FZ_DBG_IWDG_STOP DBGMCU_APB1_FZ_DBG_IWDG_STOP_Msk
  6523. #define DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT_Pos (21U)
  6524. #define DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT_Msk (0x1U << DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT_Pos) /*!< 0x00200000 */
  6525. #define DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT_Msk
  6526. #define DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT_Pos (22U)
  6527. #define DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT_Msk (0x1U << DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT_Pos) /*!< 0x00400000 */
  6528. #define DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT DBGMCU_APB1_FZ_DBG_I2C2_SMBUS_TIMEOUT_Msk
  6529. #define DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT_Pos (23U)
  6530. #define DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT_Msk (0x1U << DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT_Pos) /*!< 0x00800000 */
  6531. #define DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT DBGMCU_APB1_FZ_DBG_I2C3_SMBUS_TIMEOUT_Msk
  6532. /* Old IWDGSTOP bit definition, maintained for legacy purpose */
  6533. #define DBGMCU_APB1_FZ_DBG_IWDEG_STOP DBGMCU_APB1_FZ_DBG_IWDG_STOP
  6534. /******************** Bit definition for DBGMCU_APB2_FZ register ************/
  6535. #define DBGMCU_APB2_FZ_DBG_TIM1_STOP_Pos (0U)
  6536. #define DBGMCU_APB2_FZ_DBG_TIM1_STOP_Msk (0x1U << DBGMCU_APB2_FZ_DBG_TIM1_STOP_Pos) /*!< 0x00000001 */
  6537. #define DBGMCU_APB2_FZ_DBG_TIM1_STOP DBGMCU_APB2_FZ_DBG_TIM1_STOP_Msk
  6538. #define DBGMCU_APB2_FZ_DBG_TIM9_STOP_Pos (16U)
  6539. #define DBGMCU_APB2_FZ_DBG_TIM9_STOP_Msk (0x1U << DBGMCU_APB2_FZ_DBG_TIM9_STOP_Pos) /*!< 0x00010000 */
  6540. #define DBGMCU_APB2_FZ_DBG_TIM9_STOP DBGMCU_APB2_FZ_DBG_TIM9_STOP_Msk
  6541. #define DBGMCU_APB2_FZ_DBG_TIM10_STOP_Pos (17U)
  6542. #define DBGMCU_APB2_FZ_DBG_TIM10_STOP_Msk (0x1U << DBGMCU_APB2_FZ_DBG_TIM10_STOP_Pos) /*!< 0x00020000 */
  6543. #define DBGMCU_APB2_FZ_DBG_TIM10_STOP DBGMCU_APB2_FZ_DBG_TIM10_STOP_Msk
  6544. #define DBGMCU_APB2_FZ_DBG_TIM11_STOP_Pos (18U)
  6545. #define DBGMCU_APB2_FZ_DBG_TIM11_STOP_Msk (0x1U << DBGMCU_APB2_FZ_DBG_TIM11_STOP_Pos) /*!< 0x00040000 */
  6546. #define DBGMCU_APB2_FZ_DBG_TIM11_STOP DBGMCU_APB2_FZ_DBG_TIM11_STOP_Msk
  6547. /******************************************************************************/
  6548. /* */
  6549. /* USB_OTG */
  6550. /* */
  6551. /******************************************************************************/
  6552. /******************** Bit definition for USB_OTG_GOTGCTL register ***********/
  6553. #define USB_OTG_GOTGCTL_SRQSCS_Pos (0U)
  6554. #define USB_OTG_GOTGCTL_SRQSCS_Msk (0x1U << USB_OTG_GOTGCTL_SRQSCS_Pos) /*!< 0x00000001 */
  6555. #define USB_OTG_GOTGCTL_SRQSCS USB_OTG_GOTGCTL_SRQSCS_Msk /*!< Session request success */
  6556. #define USB_OTG_GOTGCTL_SRQ_Pos (1U)
  6557. #define USB_OTG_GOTGCTL_SRQ_Msk (0x1U << USB_OTG_GOTGCTL_SRQ_Pos) /*!< 0x00000002 */
  6558. #define USB_OTG_GOTGCTL_SRQ USB_OTG_GOTGCTL_SRQ_Msk /*!< Session request */
  6559. #define USB_OTG_GOTGCTL_HNGSCS_Pos (8U)
  6560. #define USB_OTG_GOTGCTL_HNGSCS_Msk (0x1U << USB_OTG_GOTGCTL_HNGSCS_Pos) /*!< 0x00000100 */
  6561. #define USB_OTG_GOTGCTL_HNGSCS USB_OTG_GOTGCTL_HNGSCS_Msk /*!< Host set HNP enable */
  6562. #define USB_OTG_GOTGCTL_HNPRQ_Pos (9U)
  6563. #define USB_OTG_GOTGCTL_HNPRQ_Msk (0x1U << USB_OTG_GOTGCTL_HNPRQ_Pos) /*!< 0x00000200 */
  6564. #define USB_OTG_GOTGCTL_HNPRQ USB_OTG_GOTGCTL_HNPRQ_Msk /*!< HNP request */
  6565. #define USB_OTG_GOTGCTL_HSHNPEN_Pos (10U)
  6566. #define USB_OTG_GOTGCTL_HSHNPEN_Msk (0x1U << USB_OTG_GOTGCTL_HSHNPEN_Pos) /*!< 0x00000400 */
  6567. #define USB_OTG_GOTGCTL_HSHNPEN USB_OTG_GOTGCTL_HSHNPEN_Msk /*!< Host set HNP enable */
  6568. #define USB_OTG_GOTGCTL_DHNPEN_Pos (11U)
  6569. #define USB_OTG_GOTGCTL_DHNPEN_Msk (0x1U << USB_OTG_GOTGCTL_DHNPEN_Pos) /*!< 0x00000800 */
  6570. #define USB_OTG_GOTGCTL_DHNPEN USB_OTG_GOTGCTL_DHNPEN_Msk /*!< Device HNP enabled */
  6571. #define USB_OTG_GOTGCTL_CIDSTS_Pos (16U)
  6572. #define USB_OTG_GOTGCTL_CIDSTS_Msk (0x1U << USB_OTG_GOTGCTL_CIDSTS_Pos) /*!< 0x00010000 */
  6573. #define USB_OTG_GOTGCTL_CIDSTS USB_OTG_GOTGCTL_CIDSTS_Msk /*!< Connector ID status */
  6574. #define USB_OTG_GOTGCTL_DBCT_Pos (17U)
  6575. #define USB_OTG_GOTGCTL_DBCT_Msk (0x1U << USB_OTG_GOTGCTL_DBCT_Pos) /*!< 0x00020000 */
  6576. #define USB_OTG_GOTGCTL_DBCT USB_OTG_GOTGCTL_DBCT_Msk /*!< Long/short debounce time */
  6577. #define USB_OTG_GOTGCTL_ASVLD_Pos (18U)
  6578. #define USB_OTG_GOTGCTL_ASVLD_Msk (0x1U << USB_OTG_GOTGCTL_ASVLD_Pos) /*!< 0x00040000 */
  6579. #define USB_OTG_GOTGCTL_ASVLD USB_OTG_GOTGCTL_ASVLD_Msk /*!< A-session valid */
  6580. #define USB_OTG_GOTGCTL_BSVLD_Pos (19U)
  6581. #define USB_OTG_GOTGCTL_BSVLD_Msk (0x1U << USB_OTG_GOTGCTL_BSVLD_Pos) /*!< 0x00080000 */
  6582. #define USB_OTG_GOTGCTL_BSVLD USB_OTG_GOTGCTL_BSVLD_Msk /*!< B-session valid */
  6583. /******************** Bit definition forUSB_OTG_HCFG register ********************/
  6584. #define USB_OTG_HCFG_FSLSPCS_Pos (0U)
  6585. #define USB_OTG_HCFG_FSLSPCS_Msk (0x3U << USB_OTG_HCFG_FSLSPCS_Pos) /*!< 0x00000003 */
  6586. #define USB_OTG_HCFG_FSLSPCS USB_OTG_HCFG_FSLSPCS_Msk /*!< FS/LS PHY clock select */
  6587. #define USB_OTG_HCFG_FSLSPCS_0 (0x1U << USB_OTG_HCFG_FSLSPCS_Pos) /*!< 0x00000001 */
  6588. #define USB_OTG_HCFG_FSLSPCS_1 (0x2U << USB_OTG_HCFG_FSLSPCS_Pos) /*!< 0x00000002 */
  6589. #define USB_OTG_HCFG_FSLSS_Pos (2U)
  6590. #define USB_OTG_HCFG_FSLSS_Msk (0x1U << USB_OTG_HCFG_FSLSS_Pos) /*!< 0x00000004 */
  6591. #define USB_OTG_HCFG_FSLSS USB_OTG_HCFG_FSLSS_Msk /*!< FS- and LS-only support */
  6592. /******************** Bit definition for USB_OTG_DCFG register ********************/
  6593. #define USB_OTG_DCFG_DSPD_Pos (0U)
  6594. #define USB_OTG_DCFG_DSPD_Msk (0x3U << USB_OTG_DCFG_DSPD_Pos) /*!< 0x00000003 */
  6595. #define USB_OTG_DCFG_DSPD USB_OTG_DCFG_DSPD_Msk /*!< Device speed */
  6596. #define USB_OTG_DCFG_DSPD_0 (0x1U << USB_OTG_DCFG_DSPD_Pos) /*!< 0x00000001 */
  6597. #define USB_OTG_DCFG_DSPD_1 (0x2U << USB_OTG_DCFG_DSPD_Pos) /*!< 0x00000002 */
  6598. #define USB_OTG_DCFG_NZLSOHSK_Pos (2U)
  6599. #define USB_OTG_DCFG_NZLSOHSK_Msk (0x1U << USB_OTG_DCFG_NZLSOHSK_Pos) /*!< 0x00000004 */
  6600. #define USB_OTG_DCFG_NZLSOHSK USB_OTG_DCFG_NZLSOHSK_Msk /*!< Nonzero-length status OUT handshake */
  6601. #define USB_OTG_DCFG_DAD_Pos (4U)
  6602. #define USB_OTG_DCFG_DAD_Msk (0x7FU << USB_OTG_DCFG_DAD_Pos) /*!< 0x000007F0 */
  6603. #define USB_OTG_DCFG_DAD USB_OTG_DCFG_DAD_Msk /*!< Device address */
  6604. #define USB_OTG_DCFG_DAD_0 (0x01U << USB_OTG_DCFG_DAD_Pos) /*!< 0x00000010 */
  6605. #define USB_OTG_DCFG_DAD_1 (0x02U << USB_OTG_DCFG_DAD_Pos) /*!< 0x00000020 */
  6606. #define USB_OTG_DCFG_DAD_2 (0x04U << USB_OTG_DCFG_DAD_Pos) /*!< 0x00000040 */
  6607. #define USB_OTG_DCFG_DAD_3 (0x08U << USB_OTG_DCFG_DAD_Pos) /*!< 0x00000080 */
  6608. #define USB_OTG_DCFG_DAD_4 (0x10U << USB_OTG_DCFG_DAD_Pos) /*!< 0x00000100 */
  6609. #define USB_OTG_DCFG_DAD_5 (0x20U << USB_OTG_DCFG_DAD_Pos) /*!< 0x00000200 */
  6610. #define USB_OTG_DCFG_DAD_6 (0x40U << USB_OTG_DCFG_DAD_Pos) /*!< 0x00000400 */
  6611. #define USB_OTG_DCFG_PFIVL_Pos (11U)
  6612. #define USB_OTG_DCFG_PFIVL_Msk (0x3U << USB_OTG_DCFG_PFIVL_Pos) /*!< 0x00001800 */
  6613. #define USB_OTG_DCFG_PFIVL USB_OTG_DCFG_PFIVL_Msk /*!< Periodic (micro)frame interval */
  6614. #define USB_OTG_DCFG_PFIVL_0 (0x1U << USB_OTG_DCFG_PFIVL_Pos) /*!< 0x00000800 */
  6615. #define USB_OTG_DCFG_PFIVL_1 (0x2U << USB_OTG_DCFG_PFIVL_Pos) /*!< 0x00001000 */
  6616. #define USB_OTG_DCFG_PERSCHIVL_Pos (24U)
  6617. #define USB_OTG_DCFG_PERSCHIVL_Msk (0x3U << USB_OTG_DCFG_PERSCHIVL_Pos) /*!< 0x03000000 */
  6618. #define USB_OTG_DCFG_PERSCHIVL USB_OTG_DCFG_PERSCHIVL_Msk /*!< Periodic scheduling interval */
  6619. #define USB_OTG_DCFG_PERSCHIVL_0 (0x1U << USB_OTG_DCFG_PERSCHIVL_Pos) /*!< 0x01000000 */
  6620. #define USB_OTG_DCFG_PERSCHIVL_1 (0x2U << USB_OTG_DCFG_PERSCHIVL_Pos) /*!< 0x02000000 */
  6621. /******************** Bit definition for USB_OTG_PCGCR register ********************/
  6622. #define USB_OTG_PCGCR_STPPCLK_Pos (0U)
  6623. #define USB_OTG_PCGCR_STPPCLK_Msk (0x1U << USB_OTG_PCGCR_STPPCLK_Pos) /*!< 0x00000001 */
  6624. #define USB_OTG_PCGCR_STPPCLK USB_OTG_PCGCR_STPPCLK_Msk /*!< Stop PHY clock */
  6625. #define USB_OTG_PCGCR_GATEHCLK_Pos (1U)
  6626. #define USB_OTG_PCGCR_GATEHCLK_Msk (0x1U << USB_OTG_PCGCR_GATEHCLK_Pos) /*!< 0x00000002 */
  6627. #define USB_OTG_PCGCR_GATEHCLK USB_OTG_PCGCR_GATEHCLK_Msk /*!< Gate HCLK */
  6628. #define USB_OTG_PCGCR_PHYSUSP_Pos (4U)
  6629. #define USB_OTG_PCGCR_PHYSUSP_Msk (0x1U << USB_OTG_PCGCR_PHYSUSP_Pos) /*!< 0x00000010 */
  6630. #define USB_OTG_PCGCR_PHYSUSP USB_OTG_PCGCR_PHYSUSP_Msk /*!< PHY suspended */
  6631. /******************** Bit definition for USB_OTG_GOTGINT register ********************/
  6632. #define USB_OTG_GOTGINT_SEDET_Pos (2U)
  6633. #define USB_OTG_GOTGINT_SEDET_Msk (0x1U << USB_OTG_GOTGINT_SEDET_Pos) /*!< 0x00000004 */
  6634. #define USB_OTG_GOTGINT_SEDET USB_OTG_GOTGINT_SEDET_Msk /*!< Session end detected */
  6635. #define USB_OTG_GOTGINT_SRSSCHG_Pos (8U)
  6636. #define USB_OTG_GOTGINT_SRSSCHG_Msk (0x1U << USB_OTG_GOTGINT_SRSSCHG_Pos) /*!< 0x00000100 */
  6637. #define USB_OTG_GOTGINT_SRSSCHG USB_OTG_GOTGINT_SRSSCHG_Msk /*!< Session request success status change */
  6638. #define USB_OTG_GOTGINT_HNSSCHG_Pos (9U)
  6639. #define USB_OTG_GOTGINT_HNSSCHG_Msk (0x1U << USB_OTG_GOTGINT_HNSSCHG_Pos) /*!< 0x00000200 */
  6640. #define USB_OTG_GOTGINT_HNSSCHG USB_OTG_GOTGINT_HNSSCHG_Msk /*!< Host negotiation success status change */
  6641. #define USB_OTG_GOTGINT_HNGDET_Pos (17U)
  6642. #define USB_OTG_GOTGINT_HNGDET_Msk (0x1U << USB_OTG_GOTGINT_HNGDET_Pos) /*!< 0x00020000 */
  6643. #define USB_OTG_GOTGINT_HNGDET USB_OTG_GOTGINT_HNGDET_Msk /*!< Host negotiation detected */
  6644. #define USB_OTG_GOTGINT_ADTOCHG_Pos (18U)
  6645. #define USB_OTG_GOTGINT_ADTOCHG_Msk (0x1U << USB_OTG_GOTGINT_ADTOCHG_Pos) /*!< 0x00040000 */
  6646. #define USB_OTG_GOTGINT_ADTOCHG USB_OTG_GOTGINT_ADTOCHG_Msk /*!< A-device timeout change */
  6647. #define USB_OTG_GOTGINT_DBCDNE_Pos (19U)
  6648. #define USB_OTG_GOTGINT_DBCDNE_Msk (0x1U << USB_OTG_GOTGINT_DBCDNE_Pos) /*!< 0x00080000 */
  6649. #define USB_OTG_GOTGINT_DBCDNE USB_OTG_GOTGINT_DBCDNE_Msk /*!< Debounce done */
  6650. /******************** Bit definition for USB_OTG_DCTL register ********************/
  6651. #define USB_OTG_DCTL_RWUSIG_Pos (0U)
  6652. #define USB_OTG_DCTL_RWUSIG_Msk (0x1U << USB_OTG_DCTL_RWUSIG_Pos) /*!< 0x00000001 */
  6653. #define USB_OTG_DCTL_RWUSIG USB_OTG_DCTL_RWUSIG_Msk /*!< Remote wakeup signaling */
  6654. #define USB_OTG_DCTL_SDIS_Pos (1U)
  6655. #define USB_OTG_DCTL_SDIS_Msk (0x1U << USB_OTG_DCTL_SDIS_Pos) /*!< 0x00000002 */
  6656. #define USB_OTG_DCTL_SDIS USB_OTG_DCTL_SDIS_Msk /*!< Soft disconnect */
  6657. #define USB_OTG_DCTL_GINSTS_Pos (2U)
  6658. #define USB_OTG_DCTL_GINSTS_Msk (0x1U << USB_OTG_DCTL_GINSTS_Pos) /*!< 0x00000004 */
  6659. #define USB_OTG_DCTL_GINSTS USB_OTG_DCTL_GINSTS_Msk /*!< Global IN NAK status */
  6660. #define USB_OTG_DCTL_GONSTS_Pos (3U)
  6661. #define USB_OTG_DCTL_GONSTS_Msk (0x1U << USB_OTG_DCTL_GONSTS_Pos) /*!< 0x00000008 */
  6662. #define USB_OTG_DCTL_GONSTS USB_OTG_DCTL_GONSTS_Msk /*!< Global OUT NAK status */
  6663. #define USB_OTG_DCTL_TCTL_Pos (4U)
  6664. #define USB_OTG_DCTL_TCTL_Msk (0x7U << USB_OTG_DCTL_TCTL_Pos) /*!< 0x00000070 */
  6665. #define USB_OTG_DCTL_TCTL USB_OTG_DCTL_TCTL_Msk /*!< Test control */
  6666. #define USB_OTG_DCTL_TCTL_0 (0x1U << USB_OTG_DCTL_TCTL_Pos) /*!< 0x00000010 */
  6667. #define USB_OTG_DCTL_TCTL_1 (0x2U << USB_OTG_DCTL_TCTL_Pos) /*!< 0x00000020 */
  6668. #define USB_OTG_DCTL_TCTL_2 (0x4U << USB_OTG_DCTL_TCTL_Pos) /*!< 0x00000040 */
  6669. #define USB_OTG_DCTL_SGINAK_Pos (7U)
  6670. #define USB_OTG_DCTL_SGINAK_Msk (0x1U << USB_OTG_DCTL_SGINAK_Pos) /*!< 0x00000080 */
  6671. #define USB_OTG_DCTL_SGINAK USB_OTG_DCTL_SGINAK_Msk /*!< Set global IN NAK */
  6672. #define USB_OTG_DCTL_CGINAK_Pos (8U)
  6673. #define USB_OTG_DCTL_CGINAK_Msk (0x1U << USB_OTG_DCTL_CGINAK_Pos) /*!< 0x00000100 */
  6674. #define USB_OTG_DCTL_CGINAK USB_OTG_DCTL_CGINAK_Msk /*!< Clear global IN NAK */
  6675. #define USB_OTG_DCTL_SGONAK_Pos (9U)
  6676. #define USB_OTG_DCTL_SGONAK_Msk (0x1U << USB_OTG_DCTL_SGONAK_Pos) /*!< 0x00000200 */
  6677. #define USB_OTG_DCTL_SGONAK USB_OTG_DCTL_SGONAK_Msk /*!< Set global OUT NAK */
  6678. #define USB_OTG_DCTL_CGONAK_Pos (10U)
  6679. #define USB_OTG_DCTL_CGONAK_Msk (0x1U << USB_OTG_DCTL_CGONAK_Pos) /*!< 0x00000400 */
  6680. #define USB_OTG_DCTL_CGONAK USB_OTG_DCTL_CGONAK_Msk /*!< Clear global OUT NAK */
  6681. #define USB_OTG_DCTL_POPRGDNE_Pos (11U)
  6682. #define USB_OTG_DCTL_POPRGDNE_Msk (0x1U << USB_OTG_DCTL_POPRGDNE_Pos) /*!< 0x00000800 */
  6683. #define USB_OTG_DCTL_POPRGDNE USB_OTG_DCTL_POPRGDNE_Msk /*!< Power-on programming done */
  6684. /******************** Bit definition for USB_OTG_HFIR register ********************/
  6685. #define USB_OTG_HFIR_FRIVL_Pos (0U)
  6686. #define USB_OTG_HFIR_FRIVL_Msk (0xFFFFU << USB_OTG_HFIR_FRIVL_Pos) /*!< 0x0000FFFF */
  6687. #define USB_OTG_HFIR_FRIVL USB_OTG_HFIR_FRIVL_Msk /*!< Frame interval */
  6688. /******************** Bit definition for USB_OTG_HFNUM register ********************/
  6689. #define USB_OTG_HFNUM_FRNUM_Pos (0U)
  6690. #define USB_OTG_HFNUM_FRNUM_Msk (0xFFFFU << USB_OTG_HFNUM_FRNUM_Pos) /*!< 0x0000FFFF */
  6691. #define USB_OTG_HFNUM_FRNUM USB_OTG_HFNUM_FRNUM_Msk /*!< Frame number */
  6692. #define USB_OTG_HFNUM_FTREM_Pos (16U)
  6693. #define USB_OTG_HFNUM_FTREM_Msk (0xFFFFU << USB_OTG_HFNUM_FTREM_Pos) /*!< 0xFFFF0000 */
  6694. #define USB_OTG_HFNUM_FTREM USB_OTG_HFNUM_FTREM_Msk /*!< Frame time remaining */
  6695. /******************** Bit definition for USB_OTG_DSTS register ********************/
  6696. #define USB_OTG_DSTS_SUSPSTS_Pos (0U)
  6697. #define USB_OTG_DSTS_SUSPSTS_Msk (0x1U << USB_OTG_DSTS_SUSPSTS_Pos) /*!< 0x00000001 */
  6698. #define USB_OTG_DSTS_SUSPSTS USB_OTG_DSTS_SUSPSTS_Msk /*!< Suspend status */
  6699. #define USB_OTG_DSTS_ENUMSPD_Pos (1U)
  6700. #define USB_OTG_DSTS_ENUMSPD_Msk (0x3U << USB_OTG_DSTS_ENUMSPD_Pos) /*!< 0x00000006 */
  6701. #define USB_OTG_DSTS_ENUMSPD USB_OTG_DSTS_ENUMSPD_Msk /*!< Enumerated speed */
  6702. #define USB_OTG_DSTS_ENUMSPD_0 (0x1U << USB_OTG_DSTS_ENUMSPD_Pos) /*!< 0x00000002 */
  6703. #define USB_OTG_DSTS_ENUMSPD_1 (0x2U << USB_OTG_DSTS_ENUMSPD_Pos) /*!< 0x00000004 */
  6704. #define USB_OTG_DSTS_EERR_Pos (3U)
  6705. #define USB_OTG_DSTS_EERR_Msk (0x1U << USB_OTG_DSTS_EERR_Pos) /*!< 0x00000008 */
  6706. #define USB_OTG_DSTS_EERR USB_OTG_DSTS_EERR_Msk /*!< Erratic error */
  6707. #define USB_OTG_DSTS_FNSOF_Pos (8U)
  6708. #define USB_OTG_DSTS_FNSOF_Msk (0x3FFFU << USB_OTG_DSTS_FNSOF_Pos) /*!< 0x003FFF00 */
  6709. #define USB_OTG_DSTS_FNSOF USB_OTG_DSTS_FNSOF_Msk /*!< Frame number of the received SOF */
  6710. /******************** Bit definition for USB_OTG_GAHBCFG register ********************/
  6711. #define USB_OTG_GAHBCFG_GINT_Pos (0U)
  6712. #define USB_OTG_GAHBCFG_GINT_Msk (0x1U << USB_OTG_GAHBCFG_GINT_Pos) /*!< 0x00000001 */
  6713. #define USB_OTG_GAHBCFG_GINT USB_OTG_GAHBCFG_GINT_Msk /*!< Global interrupt mask */
  6714. #define USB_OTG_GAHBCFG_HBSTLEN_Pos (1U)
  6715. #define USB_OTG_GAHBCFG_HBSTLEN_Msk (0xFU << USB_OTG_GAHBCFG_HBSTLEN_Pos) /*!< 0x0000001E */
  6716. #define USB_OTG_GAHBCFG_HBSTLEN USB_OTG_GAHBCFG_HBSTLEN_Msk /*!< Burst length/type */
  6717. #define USB_OTG_GAHBCFG_HBSTLEN_0 (0x0U << USB_OTG_GAHBCFG_HBSTLEN_Pos) /*!< Single */
  6718. #define USB_OTG_GAHBCFG_HBSTLEN_1 (0x1U << USB_OTG_GAHBCFG_HBSTLEN_Pos) /*!< INCR */
  6719. #define USB_OTG_GAHBCFG_HBSTLEN_2 (0x3U << USB_OTG_GAHBCFG_HBSTLEN_Pos) /*!< INCR4 */
  6720. #define USB_OTG_GAHBCFG_HBSTLEN_3 (0x5U << USB_OTG_GAHBCFG_HBSTLEN_Pos) /*!< INCR8 */
  6721. #define USB_OTG_GAHBCFG_HBSTLEN_4 (0x7U << USB_OTG_GAHBCFG_HBSTLEN_Pos) /*!< INCR16 */
  6722. #define USB_OTG_GAHBCFG_DMAEN_Pos (5U)
  6723. #define USB_OTG_GAHBCFG_DMAEN_Msk (0x1U << USB_OTG_GAHBCFG_DMAEN_Pos) /*!< 0x00000020 */
  6724. #define USB_OTG_GAHBCFG_DMAEN USB_OTG_GAHBCFG_DMAEN_Msk /*!< DMA enable */
  6725. #define USB_OTG_GAHBCFG_TXFELVL_Pos (7U)
  6726. #define USB_OTG_GAHBCFG_TXFELVL_Msk (0x1U << USB_OTG_GAHBCFG_TXFELVL_Pos) /*!< 0x00000080 */
  6727. #define USB_OTG_GAHBCFG_TXFELVL USB_OTG_GAHBCFG_TXFELVL_Msk /*!< TxFIFO empty level */
  6728. #define USB_OTG_GAHBCFG_PTXFELVL_Pos (8U)
  6729. #define USB_OTG_GAHBCFG_PTXFELVL_Msk (0x1U << USB_OTG_GAHBCFG_PTXFELVL_Pos) /*!< 0x00000100 */
  6730. #define USB_OTG_GAHBCFG_PTXFELVL USB_OTG_GAHBCFG_PTXFELVL_Msk /*!< Periodic TxFIFO empty level */
  6731. /******************** Bit definition for USB_OTG_GUSBCFG register ********************/
  6732. #define USB_OTG_GUSBCFG_TOCAL_Pos (0U)
  6733. #define USB_OTG_GUSBCFG_TOCAL_Msk (0x7U << USB_OTG_GUSBCFG_TOCAL_Pos) /*!< 0x00000007 */
  6734. #define USB_OTG_GUSBCFG_TOCAL USB_OTG_GUSBCFG_TOCAL_Msk /*!< FS timeout calibration */
  6735. #define USB_OTG_GUSBCFG_TOCAL_0 (0x1U << USB_OTG_GUSBCFG_TOCAL_Pos) /*!< 0x00000001 */
  6736. #define USB_OTG_GUSBCFG_TOCAL_1 (0x2U << USB_OTG_GUSBCFG_TOCAL_Pos) /*!< 0x00000002 */
  6737. #define USB_OTG_GUSBCFG_TOCAL_2 (0x4U << USB_OTG_GUSBCFG_TOCAL_Pos) /*!< 0x00000004 */
  6738. #define USB_OTG_GUSBCFG_PHYSEL_Pos (6U)
  6739. #define USB_OTG_GUSBCFG_PHYSEL_Msk (0x1U << USB_OTG_GUSBCFG_PHYSEL_Pos) /*!< 0x00000040 */
  6740. #define USB_OTG_GUSBCFG_PHYSEL USB_OTG_GUSBCFG_PHYSEL_Msk /*!< USB 2.0 high-speed ULPI PHY or USB 1.1 full-speed serial transceiver select */
  6741. #define USB_OTG_GUSBCFG_SRPCAP_Pos (8U)
  6742. #define USB_OTG_GUSBCFG_SRPCAP_Msk (0x1U << USB_OTG_GUSBCFG_SRPCAP_Pos) /*!< 0x00000100 */
  6743. #define USB_OTG_GUSBCFG_SRPCAP USB_OTG_GUSBCFG_SRPCAP_Msk /*!< SRP-capable */
  6744. #define USB_OTG_GUSBCFG_HNPCAP_Pos (9U)
  6745. #define USB_OTG_GUSBCFG_HNPCAP_Msk (0x1U << USB_OTG_GUSBCFG_HNPCAP_Pos) /*!< 0x00000200 */
  6746. #define USB_OTG_GUSBCFG_HNPCAP USB_OTG_GUSBCFG_HNPCAP_Msk /*!< HNP-capable */
  6747. #define USB_OTG_GUSBCFG_TRDT_Pos (10U)
  6748. #define USB_OTG_GUSBCFG_TRDT_Msk (0xFU << USB_OTG_GUSBCFG_TRDT_Pos) /*!< 0x00003C00 */
  6749. #define USB_OTG_GUSBCFG_TRDT USB_OTG_GUSBCFG_TRDT_Msk /*!< USB turnaround time */
  6750. #define USB_OTG_GUSBCFG_TRDT_0 (0x1U << USB_OTG_GUSBCFG_TRDT_Pos) /*!< 0x00000400 */
  6751. #define USB_OTG_GUSBCFG_TRDT_1 (0x2U << USB_OTG_GUSBCFG_TRDT_Pos) /*!< 0x00000800 */
  6752. #define USB_OTG_GUSBCFG_TRDT_2 (0x4U << USB_OTG_GUSBCFG_TRDT_Pos) /*!< 0x00001000 */
  6753. #define USB_OTG_GUSBCFG_TRDT_3 (0x8U << USB_OTG_GUSBCFG_TRDT_Pos) /*!< 0x00002000 */
  6754. #define USB_OTG_GUSBCFG_PHYLPCS_Pos (15U)
  6755. #define USB_OTG_GUSBCFG_PHYLPCS_Msk (0x1U << USB_OTG_GUSBCFG_PHYLPCS_Pos) /*!< 0x00008000 */
  6756. #define USB_OTG_GUSBCFG_PHYLPCS USB_OTG_GUSBCFG_PHYLPCS_Msk /*!< PHY Low-power clock select */
  6757. #define USB_OTG_GUSBCFG_ULPIFSLS_Pos (17U)
  6758. #define USB_OTG_GUSBCFG_ULPIFSLS_Msk (0x1U << USB_OTG_GUSBCFG_ULPIFSLS_Pos) /*!< 0x00020000 */
  6759. #define USB_OTG_GUSBCFG_ULPIFSLS USB_OTG_GUSBCFG_ULPIFSLS_Msk /*!< ULPI FS/LS select */
  6760. #define USB_OTG_GUSBCFG_ULPIAR_Pos (18U)
  6761. #define USB_OTG_GUSBCFG_ULPIAR_Msk (0x1U << USB_OTG_GUSBCFG_ULPIAR_Pos) /*!< 0x00040000 */
  6762. #define USB_OTG_GUSBCFG_ULPIAR USB_OTG_GUSBCFG_ULPIAR_Msk /*!< ULPI Auto-resume */
  6763. #define USB_OTG_GUSBCFG_ULPICSM_Pos (19U)
  6764. #define USB_OTG_GUSBCFG_ULPICSM_Msk (0x1U << USB_OTG_GUSBCFG_ULPICSM_Pos) /*!< 0x00080000 */
  6765. #define USB_OTG_GUSBCFG_ULPICSM USB_OTG_GUSBCFG_ULPICSM_Msk /*!< ULPI Clock SuspendM */
  6766. #define USB_OTG_GUSBCFG_ULPIEVBUSD_Pos (20U)
  6767. #define USB_OTG_GUSBCFG_ULPIEVBUSD_Msk (0x1U << USB_OTG_GUSBCFG_ULPIEVBUSD_Pos) /*!< 0x00100000 */
  6768. #define USB_OTG_GUSBCFG_ULPIEVBUSD USB_OTG_GUSBCFG_ULPIEVBUSD_Msk /*!< ULPI External VBUS Drive */
  6769. #define USB_OTG_GUSBCFG_ULPIEVBUSI_Pos (21U)
  6770. #define USB_OTG_GUSBCFG_ULPIEVBUSI_Msk (0x1U << USB_OTG_GUSBCFG_ULPIEVBUSI_Pos) /*!< 0x00200000 */
  6771. #define USB_OTG_GUSBCFG_ULPIEVBUSI USB_OTG_GUSBCFG_ULPIEVBUSI_Msk /*!< ULPI external VBUS indicator */
  6772. #define USB_OTG_GUSBCFG_TSDPS_Pos (22U)
  6773. #define USB_OTG_GUSBCFG_TSDPS_Msk (0x1U << USB_OTG_GUSBCFG_TSDPS_Pos) /*!< 0x00400000 */
  6774. #define USB_OTG_GUSBCFG_TSDPS USB_OTG_GUSBCFG_TSDPS_Msk /*!< TermSel DLine pulsing selection */
  6775. #define USB_OTG_GUSBCFG_PCCI_Pos (23U)
  6776. #define USB_OTG_GUSBCFG_PCCI_Msk (0x1U << USB_OTG_GUSBCFG_PCCI_Pos) /*!< 0x00800000 */
  6777. #define USB_OTG_GUSBCFG_PCCI USB_OTG_GUSBCFG_PCCI_Msk /*!< Indicator complement */
  6778. #define USB_OTG_GUSBCFG_PTCI_Pos (24U)
  6779. #define USB_OTG_GUSBCFG_PTCI_Msk (0x1U << USB_OTG_GUSBCFG_PTCI_Pos) /*!< 0x01000000 */
  6780. #define USB_OTG_GUSBCFG_PTCI USB_OTG_GUSBCFG_PTCI_Msk /*!< Indicator pass through */
  6781. #define USB_OTG_GUSBCFG_ULPIIPD_Pos (25U)
  6782. #define USB_OTG_GUSBCFG_ULPIIPD_Msk (0x1U << USB_OTG_GUSBCFG_ULPIIPD_Pos) /*!< 0x02000000 */
  6783. #define USB_OTG_GUSBCFG_ULPIIPD USB_OTG_GUSBCFG_ULPIIPD_Msk /*!< ULPI interface protect disable */
  6784. #define USB_OTG_GUSBCFG_FHMOD_Pos (29U)
  6785. #define USB_OTG_GUSBCFG_FHMOD_Msk (0x1U << USB_OTG_GUSBCFG_FHMOD_Pos) /*!< 0x20000000 */
  6786. #define USB_OTG_GUSBCFG_FHMOD USB_OTG_GUSBCFG_FHMOD_Msk /*!< Forced host mode */
  6787. #define USB_OTG_GUSBCFG_FDMOD_Pos (30U)
  6788. #define USB_OTG_GUSBCFG_FDMOD_Msk (0x1U << USB_OTG_GUSBCFG_FDMOD_Pos) /*!< 0x40000000 */
  6789. #define USB_OTG_GUSBCFG_FDMOD USB_OTG_GUSBCFG_FDMOD_Msk /*!< Forced peripheral mode */
  6790. #define USB_OTG_GUSBCFG_CTXPKT_Pos (31U)
  6791. #define USB_OTG_GUSBCFG_CTXPKT_Msk (0x1U << USB_OTG_GUSBCFG_CTXPKT_Pos) /*!< 0x80000000 */
  6792. #define USB_OTG_GUSBCFG_CTXPKT USB_OTG_GUSBCFG_CTXPKT_Msk /*!< Corrupt Tx packet */
  6793. /******************** Bit definition for USB_OTG_GRSTCTL register ********************/
  6794. #define USB_OTG_GRSTCTL_CSRST_Pos (0U)
  6795. #define USB_OTG_GRSTCTL_CSRST_Msk (0x1U << USB_OTG_GRSTCTL_CSRST_Pos) /*!< 0x00000001 */
  6796. #define USB_OTG_GRSTCTL_CSRST USB_OTG_GRSTCTL_CSRST_Msk /*!< Core soft reset */
  6797. #define USB_OTG_GRSTCTL_HSRST_Pos (1U)
  6798. #define USB_OTG_GRSTCTL_HSRST_Msk (0x1U << USB_OTG_GRSTCTL_HSRST_Pos) /*!< 0x00000002 */
  6799. #define USB_OTG_GRSTCTL_HSRST USB_OTG_GRSTCTL_HSRST_Msk /*!< HCLK soft reset */
  6800. #define USB_OTG_GRSTCTL_FCRST_Pos (2U)
  6801. #define USB_OTG_GRSTCTL_FCRST_Msk (0x1U << USB_OTG_GRSTCTL_FCRST_Pos) /*!< 0x00000004 */
  6802. #define USB_OTG_GRSTCTL_FCRST USB_OTG_GRSTCTL_FCRST_Msk /*!< Host frame counter reset */
  6803. #define USB_OTG_GRSTCTL_RXFFLSH_Pos (4U)
  6804. #define USB_OTG_GRSTCTL_RXFFLSH_Msk (0x1U << USB_OTG_GRSTCTL_RXFFLSH_Pos) /*!< 0x00000010 */
  6805. #define USB_OTG_GRSTCTL_RXFFLSH USB_OTG_GRSTCTL_RXFFLSH_Msk /*!< RxFIFO flush */
  6806. #define USB_OTG_GRSTCTL_TXFFLSH_Pos (5U)
  6807. #define USB_OTG_GRSTCTL_TXFFLSH_Msk (0x1U << USB_OTG_GRSTCTL_TXFFLSH_Pos) /*!< 0x00000020 */
  6808. #define USB_OTG_GRSTCTL_TXFFLSH USB_OTG_GRSTCTL_TXFFLSH_Msk /*!< TxFIFO flush */
  6809. #define USB_OTG_GRSTCTL_TXFNUM_Pos (6U)
  6810. #define USB_OTG_GRSTCTL_TXFNUM_Msk (0x1FU << USB_OTG_GRSTCTL_TXFNUM_Pos) /*!< 0x000007C0 */
  6811. #define USB_OTG_GRSTCTL_TXFNUM USB_OTG_GRSTCTL_TXFNUM_Msk /*!< TxFIFO number */
  6812. #define USB_OTG_GRSTCTL_TXFNUM_0 (0x01U << USB_OTG_GRSTCTL_TXFNUM_Pos) /*!< 0x00000040 */
  6813. #define USB_OTG_GRSTCTL_TXFNUM_1 (0x02U << USB_OTG_GRSTCTL_TXFNUM_Pos) /*!< 0x00000080 */
  6814. #define USB_OTG_GRSTCTL_TXFNUM_2 (0x04U << USB_OTG_GRSTCTL_TXFNUM_Pos) /*!< 0x00000100 */
  6815. #define USB_OTG_GRSTCTL_TXFNUM_3 (0x08U << USB_OTG_GRSTCTL_TXFNUM_Pos) /*!< 0x00000200 */
  6816. #define USB_OTG_GRSTCTL_TXFNUM_4 (0x10U << USB_OTG_GRSTCTL_TXFNUM_Pos) /*!< 0x00000400 */
  6817. #define USB_OTG_GRSTCTL_DMAREQ_Pos (30U)
  6818. #define USB_OTG_GRSTCTL_DMAREQ_Msk (0x1U << USB_OTG_GRSTCTL_DMAREQ_Pos) /*!< 0x40000000 */
  6819. #define USB_OTG_GRSTCTL_DMAREQ USB_OTG_GRSTCTL_DMAREQ_Msk /*!< DMA request signal */
  6820. #define USB_OTG_GRSTCTL_AHBIDL_Pos (31U)
  6821. #define USB_OTG_GRSTCTL_AHBIDL_Msk (0x1U << USB_OTG_GRSTCTL_AHBIDL_Pos) /*!< 0x80000000 */
  6822. #define USB_OTG_GRSTCTL_AHBIDL USB_OTG_GRSTCTL_AHBIDL_Msk /*!< AHB master idle */
  6823. /******************** Bit definition for USB_OTG_DIEPMSK register ********************/
  6824. #define USB_OTG_DIEPMSK_XFRCM_Pos (0U)
  6825. #define USB_OTG_DIEPMSK_XFRCM_Msk (0x1U << USB_OTG_DIEPMSK_XFRCM_Pos) /*!< 0x00000001 */
  6826. #define USB_OTG_DIEPMSK_XFRCM USB_OTG_DIEPMSK_XFRCM_Msk /*!< Transfer completed interrupt mask */
  6827. #define USB_OTG_DIEPMSK_EPDM_Pos (1U)
  6828. #define USB_OTG_DIEPMSK_EPDM_Msk (0x1U << USB_OTG_DIEPMSK_EPDM_Pos) /*!< 0x00000002 */
  6829. #define USB_OTG_DIEPMSK_EPDM USB_OTG_DIEPMSK_EPDM_Msk /*!< Endpoint disabled interrupt mask */
  6830. #define USB_OTG_DIEPMSK_TOM_Pos (3U)
  6831. #define USB_OTG_DIEPMSK_TOM_Msk (0x1U << USB_OTG_DIEPMSK_TOM_Pos) /*!< 0x00000008 */
  6832. #define USB_OTG_DIEPMSK_TOM USB_OTG_DIEPMSK_TOM_Msk /*!< Timeout condition mask (nonisochronous endpoints) */
  6833. #define USB_OTG_DIEPMSK_ITTXFEMSK_Pos (4U)
  6834. #define USB_OTG_DIEPMSK_ITTXFEMSK_Msk (0x1U << USB_OTG_DIEPMSK_ITTXFEMSK_Pos) /*!< 0x00000010 */
  6835. #define USB_OTG_DIEPMSK_ITTXFEMSK USB_OTG_DIEPMSK_ITTXFEMSK_Msk /*!< IN token received when TxFIFO empty mask */
  6836. #define USB_OTG_DIEPMSK_INEPNMM_Pos (5U)
  6837. #define USB_OTG_DIEPMSK_INEPNMM_Msk (0x1U << USB_OTG_DIEPMSK_INEPNMM_Pos) /*!< 0x00000020 */
  6838. #define USB_OTG_DIEPMSK_INEPNMM USB_OTG_DIEPMSK_INEPNMM_Msk /*!< IN token received with EP mismatch mask */
  6839. #define USB_OTG_DIEPMSK_INEPNEM_Pos (6U)
  6840. #define USB_OTG_DIEPMSK_INEPNEM_Msk (0x1U << USB_OTG_DIEPMSK_INEPNEM_Pos) /*!< 0x00000040 */
  6841. #define USB_OTG_DIEPMSK_INEPNEM USB_OTG_DIEPMSK_INEPNEM_Msk /*!< IN endpoint NAK effective mask */
  6842. #define USB_OTG_DIEPMSK_TXFURM_Pos (8U)
  6843. #define USB_OTG_DIEPMSK_TXFURM_Msk (0x1U << USB_OTG_DIEPMSK_TXFURM_Pos) /*!< 0x00000100 */
  6844. #define USB_OTG_DIEPMSK_TXFURM USB_OTG_DIEPMSK_TXFURM_Msk /*!< FIFO underrun mask */
  6845. #define USB_OTG_DIEPMSK_BIM_Pos (9U)
  6846. #define USB_OTG_DIEPMSK_BIM_Msk (0x1U << USB_OTG_DIEPMSK_BIM_Pos) /*!< 0x00000200 */
  6847. #define USB_OTG_DIEPMSK_BIM USB_OTG_DIEPMSK_BIM_Msk /*!< BNA interrupt mask */
  6848. /******************** Bit definition for USB_OTG_HPTXSTS register ********************/
  6849. #define USB_OTG_HPTXSTS_PTXFSAVL_Pos (0U)
  6850. #define USB_OTG_HPTXSTS_PTXFSAVL_Msk (0xFFFFU << USB_OTG_HPTXSTS_PTXFSAVL_Pos) /*!< 0x0000FFFF */
  6851. #define USB_OTG_HPTXSTS_PTXFSAVL USB_OTG_HPTXSTS_PTXFSAVL_Msk /*!< Periodic transmit data FIFO space available */
  6852. #define USB_OTG_HPTXSTS_PTXQSAV_Pos (16U)
  6853. #define USB_OTG_HPTXSTS_PTXQSAV_Msk (0xFFU << USB_OTG_HPTXSTS_PTXQSAV_Pos) /*!< 0x00FF0000 */
  6854. #define USB_OTG_HPTXSTS_PTXQSAV USB_OTG_HPTXSTS_PTXQSAV_Msk /*!< Periodic transmit request queue space available */
  6855. #define USB_OTG_HPTXSTS_PTXQSAV_0 (0x01U << USB_OTG_HPTXSTS_PTXQSAV_Pos) /*!< 0x00010000 */
  6856. #define USB_OTG_HPTXSTS_PTXQSAV_1 (0x02U << USB_OTG_HPTXSTS_PTXQSAV_Pos) /*!< 0x00020000 */
  6857. #define USB_OTG_HPTXSTS_PTXQSAV_2 (0x04U << USB_OTG_HPTXSTS_PTXQSAV_Pos) /*!< 0x00040000 */
  6858. #define USB_OTG_HPTXSTS_PTXQSAV_3 (0x08U << USB_OTG_HPTXSTS_PTXQSAV_Pos) /*!< 0x00080000 */
  6859. #define USB_OTG_HPTXSTS_PTXQSAV_4 (0x10U << USB_OTG_HPTXSTS_PTXQSAV_Pos) /*!< 0x00100000 */
  6860. #define USB_OTG_HPTXSTS_PTXQSAV_5 (0x20U << USB_OTG_HPTXSTS_PTXQSAV_Pos) /*!< 0x00200000 */
  6861. #define USB_OTG_HPTXSTS_PTXQSAV_6 (0x40U << USB_OTG_HPTXSTS_PTXQSAV_Pos) /*!< 0x00400000 */
  6862. #define USB_OTG_HPTXSTS_PTXQSAV_7 (0x80U << USB_OTG_HPTXSTS_PTXQSAV_Pos) /*!< 0x00800000 */
  6863. #define USB_OTG_HPTXSTS_PTXQTOP_Pos (24U)
  6864. #define USB_OTG_HPTXSTS_PTXQTOP_Msk (0xFFU << USB_OTG_HPTXSTS_PTXQTOP_Pos) /*!< 0xFF000000 */
  6865. #define USB_OTG_HPTXSTS_PTXQTOP USB_OTG_HPTXSTS_PTXQTOP_Msk /*!< Top of the periodic transmit request queue */
  6866. #define USB_OTG_HPTXSTS_PTXQTOP_0 (0x01U << USB_OTG_HPTXSTS_PTXQTOP_Pos) /*!< 0x01000000 */
  6867. #define USB_OTG_HPTXSTS_PTXQTOP_1 (0x02U << USB_OTG_HPTXSTS_PTXQTOP_Pos) /*!< 0x02000000 */
  6868. #define USB_OTG_HPTXSTS_PTXQTOP_2 (0x04U << USB_OTG_HPTXSTS_PTXQTOP_Pos) /*!< 0x04000000 */
  6869. #define USB_OTG_HPTXSTS_PTXQTOP_3 (0x08U << USB_OTG_HPTXSTS_PTXQTOP_Pos) /*!< 0x08000000 */
  6870. #define USB_OTG_HPTXSTS_PTXQTOP_4 (0x10U << USB_OTG_HPTXSTS_PTXQTOP_Pos) /*!< 0x10000000 */
  6871. #define USB_OTG_HPTXSTS_PTXQTOP_5 (0x20U << USB_OTG_HPTXSTS_PTXQTOP_Pos) /*!< 0x20000000 */
  6872. #define USB_OTG_HPTXSTS_PTXQTOP_6 (0x40U << USB_OTG_HPTXSTS_PTXQTOP_Pos) /*!< 0x40000000 */
  6873. #define USB_OTG_HPTXSTS_PTXQTOP_7 (0x80U << USB_OTG_HPTXSTS_PTXQTOP_Pos) /*!< 0x80000000 */
  6874. /******************** Bit definition for USB_OTG_HAINT register ********************/
  6875. #define USB_OTG_HAINT_HAINT_Pos (0U)
  6876. #define USB_OTG_HAINT_HAINT_Msk (0xFFFFU << USB_OTG_HAINT_HAINT_Pos) /*!< 0x0000FFFF */
  6877. #define USB_OTG_HAINT_HAINT USB_OTG_HAINT_HAINT_Msk /*!< Channel interrupts */
  6878. /******************** Bit definition for USB_OTG_DOEPMSK register ********************/
  6879. #define USB_OTG_DOEPMSK_XFRCM_Pos (0U)
  6880. #define USB_OTG_DOEPMSK_XFRCM_Msk (0x1U << USB_OTG_DOEPMSK_XFRCM_Pos) /*!< 0x00000001 */
  6881. #define USB_OTG_DOEPMSK_XFRCM USB_OTG_DOEPMSK_XFRCM_Msk /*!< Transfer completed interrupt mask */
  6882. #define USB_OTG_DOEPMSK_EPDM_Pos (1U)
  6883. #define USB_OTG_DOEPMSK_EPDM_Msk (0x1U << USB_OTG_DOEPMSK_EPDM_Pos) /*!< 0x00000002 */
  6884. #define USB_OTG_DOEPMSK_EPDM USB_OTG_DOEPMSK_EPDM_Msk /*!< Endpoint disabled interrupt mask */
  6885. #define USB_OTG_DOEPMSK_STUPM_Pos (3U)
  6886. #define USB_OTG_DOEPMSK_STUPM_Msk (0x1U << USB_OTG_DOEPMSK_STUPM_Pos) /*!< 0x00000008 */
  6887. #define USB_OTG_DOEPMSK_STUPM USB_OTG_DOEPMSK_STUPM_Msk /*!< SETUP phase done mask */
  6888. #define USB_OTG_DOEPMSK_OTEPDM_Pos (4U)
  6889. #define USB_OTG_DOEPMSK_OTEPDM_Msk (0x1U << USB_OTG_DOEPMSK_OTEPDM_Pos) /*!< 0x00000010 */
  6890. #define USB_OTG_DOEPMSK_OTEPDM USB_OTG_DOEPMSK_OTEPDM_Msk /*!< OUT token received when endpoint disabled mask */
  6891. #define USB_OTG_DOEPMSK_B2BSTUP_Pos (6U)
  6892. #define USB_OTG_DOEPMSK_B2BSTUP_Msk (0x1U << USB_OTG_DOEPMSK_B2BSTUP_Pos) /*!< 0x00000040 */
  6893. #define USB_OTG_DOEPMSK_B2BSTUP USB_OTG_DOEPMSK_B2BSTUP_Msk /*!< Back-to-back SETUP packets received mask */
  6894. #define USB_OTG_DOEPMSK_OPEM_Pos (8U)
  6895. #define USB_OTG_DOEPMSK_OPEM_Msk (0x1U << USB_OTG_DOEPMSK_OPEM_Pos) /*!< 0x00000100 */
  6896. #define USB_OTG_DOEPMSK_OPEM USB_OTG_DOEPMSK_OPEM_Msk /*!< OUT packet error mask */
  6897. #define USB_OTG_DOEPMSK_BOIM_Pos (9U)
  6898. #define USB_OTG_DOEPMSK_BOIM_Msk (0x1U << USB_OTG_DOEPMSK_BOIM_Pos) /*!< 0x00000200 */
  6899. #define USB_OTG_DOEPMSK_BOIM USB_OTG_DOEPMSK_BOIM_Msk /*!< BNA interrupt mask */
  6900. /******************** Bit definition for USB_OTG_GINTSTS register ********************/
  6901. #define USB_OTG_GINTSTS_CMOD_Pos (0U)
  6902. #define USB_OTG_GINTSTS_CMOD_Msk (0x1U << USB_OTG_GINTSTS_CMOD_Pos) /*!< 0x00000001 */
  6903. #define USB_OTG_GINTSTS_CMOD USB_OTG_GINTSTS_CMOD_Msk /*!< Current mode of operation */
  6904. #define USB_OTG_GINTSTS_MMIS_Pos (1U)
  6905. #define USB_OTG_GINTSTS_MMIS_Msk (0x1U << USB_OTG_GINTSTS_MMIS_Pos) /*!< 0x00000002 */
  6906. #define USB_OTG_GINTSTS_MMIS USB_OTG_GINTSTS_MMIS_Msk /*!< Mode mismatch interrupt */
  6907. #define USB_OTG_GINTSTS_OTGINT_Pos (2U)
  6908. #define USB_OTG_GINTSTS_OTGINT_Msk (0x1U << USB_OTG_GINTSTS_OTGINT_Pos) /*!< 0x00000004 */
  6909. #define USB_OTG_GINTSTS_OTGINT USB_OTG_GINTSTS_OTGINT_Msk /*!< OTG interrupt */
  6910. #define USB_OTG_GINTSTS_SOF_Pos (3U)
  6911. #define USB_OTG_GINTSTS_SOF_Msk (0x1U << USB_OTG_GINTSTS_SOF_Pos) /*!< 0x00000008 */
  6912. #define USB_OTG_GINTSTS_SOF USB_OTG_GINTSTS_SOF_Msk /*!< Start of frame */
  6913. #define USB_OTG_GINTSTS_RXFLVL_Pos (4U)
  6914. #define USB_OTG_GINTSTS_RXFLVL_Msk (0x1U << USB_OTG_GINTSTS_RXFLVL_Pos) /*!< 0x00000010 */
  6915. #define USB_OTG_GINTSTS_RXFLVL USB_OTG_GINTSTS_RXFLVL_Msk /*!< RxFIFO nonempty */
  6916. #define USB_OTG_GINTSTS_NPTXFE_Pos (5U)
  6917. #define USB_OTG_GINTSTS_NPTXFE_Msk (0x1U << USB_OTG_GINTSTS_NPTXFE_Pos) /*!< 0x00000020 */
  6918. #define USB_OTG_GINTSTS_NPTXFE USB_OTG_GINTSTS_NPTXFE_Msk /*!< Nonperiodic TxFIFO empty */
  6919. #define USB_OTG_GINTSTS_GINAKEFF_Pos (6U)
  6920. #define USB_OTG_GINTSTS_GINAKEFF_Msk (0x1U << USB_OTG_GINTSTS_GINAKEFF_Pos) /*!< 0x00000040 */
  6921. #define USB_OTG_GINTSTS_GINAKEFF USB_OTG_GINTSTS_GINAKEFF_Msk /*!< Global IN nonperiodic NAK effective */
  6922. #define USB_OTG_GINTSTS_BOUTNAKEFF_Pos (7U)
  6923. #define USB_OTG_GINTSTS_BOUTNAKEFF_Msk (0x1U << USB_OTG_GINTSTS_BOUTNAKEFF_Pos) /*!< 0x00000080 */
  6924. #define USB_OTG_GINTSTS_BOUTNAKEFF USB_OTG_GINTSTS_BOUTNAKEFF_Msk /*!< Global OUT NAK effective */
  6925. #define USB_OTG_GINTSTS_ESUSP_Pos (10U)
  6926. #define USB_OTG_GINTSTS_ESUSP_Msk (0x1U << USB_OTG_GINTSTS_ESUSP_Pos) /*!< 0x00000400 */
  6927. #define USB_OTG_GINTSTS_ESUSP USB_OTG_GINTSTS_ESUSP_Msk /*!< Early suspend */
  6928. #define USB_OTG_GINTSTS_USBSUSP_Pos (11U)
  6929. #define USB_OTG_GINTSTS_USBSUSP_Msk (0x1U << USB_OTG_GINTSTS_USBSUSP_Pos) /*!< 0x00000800 */
  6930. #define USB_OTG_GINTSTS_USBSUSP USB_OTG_GINTSTS_USBSUSP_Msk /*!< USB suspend */
  6931. #define USB_OTG_GINTSTS_USBRST_Pos (12U)
  6932. #define USB_OTG_GINTSTS_USBRST_Msk (0x1U << USB_OTG_GINTSTS_USBRST_Pos) /*!< 0x00001000 */
  6933. #define USB_OTG_GINTSTS_USBRST USB_OTG_GINTSTS_USBRST_Msk /*!< USB reset */
  6934. #define USB_OTG_GINTSTS_ENUMDNE_Pos (13U)
  6935. #define USB_OTG_GINTSTS_ENUMDNE_Msk (0x1U << USB_OTG_GINTSTS_ENUMDNE_Pos) /*!< 0x00002000 */
  6936. #define USB_OTG_GINTSTS_ENUMDNE USB_OTG_GINTSTS_ENUMDNE_Msk /*!< Enumeration done */
  6937. #define USB_OTG_GINTSTS_ISOODRP_Pos (14U)
  6938. #define USB_OTG_GINTSTS_ISOODRP_Msk (0x1U << USB_OTG_GINTSTS_ISOODRP_Pos) /*!< 0x00004000 */
  6939. #define USB_OTG_GINTSTS_ISOODRP USB_OTG_GINTSTS_ISOODRP_Msk /*!< Isochronous OUT packet dropped interrupt */
  6940. #define USB_OTG_GINTSTS_EOPF_Pos (15U)
  6941. #define USB_OTG_GINTSTS_EOPF_Msk (0x1U << USB_OTG_GINTSTS_EOPF_Pos) /*!< 0x00008000 */
  6942. #define USB_OTG_GINTSTS_EOPF USB_OTG_GINTSTS_EOPF_Msk /*!< End of periodic frame interrupt */
  6943. #define USB_OTG_GINTSTS_IEPINT_Pos (18U)
  6944. #define USB_OTG_GINTSTS_IEPINT_Msk (0x1U << USB_OTG_GINTSTS_IEPINT_Pos) /*!< 0x00040000 */
  6945. #define USB_OTG_GINTSTS_IEPINT USB_OTG_GINTSTS_IEPINT_Msk /*!< IN endpoint interrupt */
  6946. #define USB_OTG_GINTSTS_OEPINT_Pos (19U)
  6947. #define USB_OTG_GINTSTS_OEPINT_Msk (0x1U << USB_OTG_GINTSTS_OEPINT_Pos) /*!< 0x00080000 */
  6948. #define USB_OTG_GINTSTS_OEPINT USB_OTG_GINTSTS_OEPINT_Msk /*!< OUT endpoint interrupt */
  6949. #define USB_OTG_GINTSTS_IISOIXFR_Pos (20U)
  6950. #define USB_OTG_GINTSTS_IISOIXFR_Msk (0x1U << USB_OTG_GINTSTS_IISOIXFR_Pos) /*!< 0x00100000 */
  6951. #define USB_OTG_GINTSTS_IISOIXFR USB_OTG_GINTSTS_IISOIXFR_Msk /*!< Incomplete isochronous IN transfer */
  6952. #define USB_OTG_GINTSTS_PXFR_INCOMPISOOUT_Pos (21U)
  6953. #define USB_OTG_GINTSTS_PXFR_INCOMPISOOUT_Msk (0x1U << USB_OTG_GINTSTS_PXFR_INCOMPISOOUT_Pos) /*!< 0x00200000 */
  6954. #define USB_OTG_GINTSTS_PXFR_INCOMPISOOUT USB_OTG_GINTSTS_PXFR_INCOMPISOOUT_Msk /*!< Incomplete periodic transfer */
  6955. #define USB_OTG_GINTSTS_DATAFSUSP_Pos (22U)
  6956. #define USB_OTG_GINTSTS_DATAFSUSP_Msk (0x1U << USB_OTG_GINTSTS_DATAFSUSP_Pos) /*!< 0x00400000 */
  6957. #define USB_OTG_GINTSTS_DATAFSUSP USB_OTG_GINTSTS_DATAFSUSP_Msk /*!< Data fetch suspended */
  6958. #define USB_OTG_GINTSTS_HPRTINT_Pos (24U)
  6959. #define USB_OTG_GINTSTS_HPRTINT_Msk (0x1U << USB_OTG_GINTSTS_HPRTINT_Pos) /*!< 0x01000000 */
  6960. #define USB_OTG_GINTSTS_HPRTINT USB_OTG_GINTSTS_HPRTINT_Msk /*!< Host port interrupt */
  6961. #define USB_OTG_GINTSTS_HCINT_Pos (25U)
  6962. #define USB_OTG_GINTSTS_HCINT_Msk (0x1U << USB_OTG_GINTSTS_HCINT_Pos) /*!< 0x02000000 */
  6963. #define USB_OTG_GINTSTS_HCINT USB_OTG_GINTSTS_HCINT_Msk /*!< Host channels interrupt */
  6964. #define USB_OTG_GINTSTS_PTXFE_Pos (26U)
  6965. #define USB_OTG_GINTSTS_PTXFE_Msk (0x1U << USB_OTG_GINTSTS_PTXFE_Pos) /*!< 0x04000000 */
  6966. #define USB_OTG_GINTSTS_PTXFE USB_OTG_GINTSTS_PTXFE_Msk /*!< Periodic TxFIFO empty */
  6967. #define USB_OTG_GINTSTS_CIDSCHG_Pos (28U)
  6968. #define USB_OTG_GINTSTS_CIDSCHG_Msk (0x1U << USB_OTG_GINTSTS_CIDSCHG_Pos) /*!< 0x10000000 */
  6969. #define USB_OTG_GINTSTS_CIDSCHG USB_OTG_GINTSTS_CIDSCHG_Msk /*!< Connector ID status change */
  6970. #define USB_OTG_GINTSTS_DISCINT_Pos (29U)
  6971. #define USB_OTG_GINTSTS_DISCINT_Msk (0x1U << USB_OTG_GINTSTS_DISCINT_Pos) /*!< 0x20000000 */
  6972. #define USB_OTG_GINTSTS_DISCINT USB_OTG_GINTSTS_DISCINT_Msk /*!< Disconnect detected interrupt */
  6973. #define USB_OTG_GINTSTS_SRQINT_Pos (30U)
  6974. #define USB_OTG_GINTSTS_SRQINT_Msk (0x1U << USB_OTG_GINTSTS_SRQINT_Pos) /*!< 0x40000000 */
  6975. #define USB_OTG_GINTSTS_SRQINT USB_OTG_GINTSTS_SRQINT_Msk /*!< Session request/new session detected interrupt */
  6976. #define USB_OTG_GINTSTS_WKUINT_Pos (31U)
  6977. #define USB_OTG_GINTSTS_WKUINT_Msk (0x1U << USB_OTG_GINTSTS_WKUINT_Pos) /*!< 0x80000000 */
  6978. #define USB_OTG_GINTSTS_WKUINT USB_OTG_GINTSTS_WKUINT_Msk /*!< Resume/remote wakeup detected interrupt */
  6979. /******************** Bit definition for USB_OTG_GINTMSK register ********************/
  6980. #define USB_OTG_GINTMSK_MMISM_Pos (1U)
  6981. #define USB_OTG_GINTMSK_MMISM_Msk (0x1U << USB_OTG_GINTMSK_MMISM_Pos) /*!< 0x00000002 */
  6982. #define USB_OTG_GINTMSK_MMISM USB_OTG_GINTMSK_MMISM_Msk /*!< Mode mismatch interrupt mask */
  6983. #define USB_OTG_GINTMSK_OTGINT_Pos (2U)
  6984. #define USB_OTG_GINTMSK_OTGINT_Msk (0x1U << USB_OTG_GINTMSK_OTGINT_Pos) /*!< 0x00000004 */
  6985. #define USB_OTG_GINTMSK_OTGINT USB_OTG_GINTMSK_OTGINT_Msk /*!< OTG interrupt mask */
  6986. #define USB_OTG_GINTMSK_SOFM_Pos (3U)
  6987. #define USB_OTG_GINTMSK_SOFM_Msk (0x1U << USB_OTG_GINTMSK_SOFM_Pos) /*!< 0x00000008 */
  6988. #define USB_OTG_GINTMSK_SOFM USB_OTG_GINTMSK_SOFM_Msk /*!< Start of frame mask */
  6989. #define USB_OTG_GINTMSK_RXFLVLM_Pos (4U)
  6990. #define USB_OTG_GINTMSK_RXFLVLM_Msk (0x1U << USB_OTG_GINTMSK_RXFLVLM_Pos) /*!< 0x00000010 */
  6991. #define USB_OTG_GINTMSK_RXFLVLM USB_OTG_GINTMSK_RXFLVLM_Msk /*!< Receive FIFO nonempty mask */
  6992. #define USB_OTG_GINTMSK_NPTXFEM_Pos (5U)
  6993. #define USB_OTG_GINTMSK_NPTXFEM_Msk (0x1U << USB_OTG_GINTMSK_NPTXFEM_Pos) /*!< 0x00000020 */
  6994. #define USB_OTG_GINTMSK_NPTXFEM USB_OTG_GINTMSK_NPTXFEM_Msk /*!< Nonperiodic TxFIFO empty mask */
  6995. #define USB_OTG_GINTMSK_GINAKEFFM_Pos (6U)
  6996. #define USB_OTG_GINTMSK_GINAKEFFM_Msk (0x1U << USB_OTG_GINTMSK_GINAKEFFM_Pos) /*!< 0x00000040 */
  6997. #define USB_OTG_GINTMSK_GINAKEFFM USB_OTG_GINTMSK_GINAKEFFM_Msk /*!< Global nonperiodic IN NAK effective mask */
  6998. #define USB_OTG_GINTMSK_GONAKEFFM_Pos (7U)
  6999. #define USB_OTG_GINTMSK_GONAKEFFM_Msk (0x1U << USB_OTG_GINTMSK_GONAKEFFM_Pos) /*!< 0x00000080 */
  7000. #define USB_OTG_GINTMSK_GONAKEFFM USB_OTG_GINTMSK_GONAKEFFM_Msk /*!< Global OUT NAK effective mask */
  7001. #define USB_OTG_GINTMSK_ESUSPM_Pos (10U)
  7002. #define USB_OTG_GINTMSK_ESUSPM_Msk (0x1U << USB_OTG_GINTMSK_ESUSPM_Pos) /*!< 0x00000400 */
  7003. #define USB_OTG_GINTMSK_ESUSPM USB_OTG_GINTMSK_ESUSPM_Msk /*!< Early suspend mask */
  7004. #define USB_OTG_GINTMSK_USBSUSPM_Pos (11U)
  7005. #define USB_OTG_GINTMSK_USBSUSPM_Msk (0x1U << USB_OTG_GINTMSK_USBSUSPM_Pos) /*!< 0x00000800 */
  7006. #define USB_OTG_GINTMSK_USBSUSPM USB_OTG_GINTMSK_USBSUSPM_Msk /*!< USB suspend mask */
  7007. #define USB_OTG_GINTMSK_USBRST_Pos (12U)
  7008. #define USB_OTG_GINTMSK_USBRST_Msk (0x1U << USB_OTG_GINTMSK_USBRST_Pos) /*!< 0x00001000 */
  7009. #define USB_OTG_GINTMSK_USBRST USB_OTG_GINTMSK_USBRST_Msk /*!< USB reset mask */
  7010. #define USB_OTG_GINTMSK_ENUMDNEM_Pos (13U)
  7011. #define USB_OTG_GINTMSK_ENUMDNEM_Msk (0x1U << USB_OTG_GINTMSK_ENUMDNEM_Pos) /*!< 0x00002000 */
  7012. #define USB_OTG_GINTMSK_ENUMDNEM USB_OTG_GINTMSK_ENUMDNEM_Msk /*!< Enumeration done mask */
  7013. #define USB_OTG_GINTMSK_ISOODRPM_Pos (14U)
  7014. #define USB_OTG_GINTMSK_ISOODRPM_Msk (0x1U << USB_OTG_GINTMSK_ISOODRPM_Pos) /*!< 0x00004000 */
  7015. #define USB_OTG_GINTMSK_ISOODRPM USB_OTG_GINTMSK_ISOODRPM_Msk /*!< Isochronous OUT packet dropped interrupt mask */
  7016. #define USB_OTG_GINTMSK_EOPFM_Pos (15U)
  7017. #define USB_OTG_GINTMSK_EOPFM_Msk (0x1U << USB_OTG_GINTMSK_EOPFM_Pos) /*!< 0x00008000 */
  7018. #define USB_OTG_GINTMSK_EOPFM USB_OTG_GINTMSK_EOPFM_Msk /*!< End of periodic frame interrupt mask */
  7019. #define USB_OTG_GINTMSK_EPMISM_Pos (17U)
  7020. #define USB_OTG_GINTMSK_EPMISM_Msk (0x1U << USB_OTG_GINTMSK_EPMISM_Pos) /*!< 0x00020000 */
  7021. #define USB_OTG_GINTMSK_EPMISM USB_OTG_GINTMSK_EPMISM_Msk /*!< Endpoint mismatch interrupt mask */
  7022. #define USB_OTG_GINTMSK_IEPINT_Pos (18U)
  7023. #define USB_OTG_GINTMSK_IEPINT_Msk (0x1U << USB_OTG_GINTMSK_IEPINT_Pos) /*!< 0x00040000 */
  7024. #define USB_OTG_GINTMSK_IEPINT USB_OTG_GINTMSK_IEPINT_Msk /*!< IN endpoints interrupt mask */
  7025. #define USB_OTG_GINTMSK_OEPINT_Pos (19U)
  7026. #define USB_OTG_GINTMSK_OEPINT_Msk (0x1U << USB_OTG_GINTMSK_OEPINT_Pos) /*!< 0x00080000 */
  7027. #define USB_OTG_GINTMSK_OEPINT USB_OTG_GINTMSK_OEPINT_Msk /*!< OUT endpoints interrupt mask */
  7028. #define USB_OTG_GINTMSK_IISOIXFRM_Pos (20U)
  7029. #define USB_OTG_GINTMSK_IISOIXFRM_Msk (0x1U << USB_OTG_GINTMSK_IISOIXFRM_Pos) /*!< 0x00100000 */
  7030. #define USB_OTG_GINTMSK_IISOIXFRM USB_OTG_GINTMSK_IISOIXFRM_Msk /*!< Incomplete isochronous IN transfer mask */
  7031. #define USB_OTG_GINTMSK_PXFRM_IISOOXFRM_Pos (21U)
  7032. #define USB_OTG_GINTMSK_PXFRM_IISOOXFRM_Msk (0x1U << USB_OTG_GINTMSK_PXFRM_IISOOXFRM_Pos) /*!< 0x00200000 */
  7033. #define USB_OTG_GINTMSK_PXFRM_IISOOXFRM USB_OTG_GINTMSK_PXFRM_IISOOXFRM_Msk /*!< Incomplete periodic transfer mask */
  7034. #define USB_OTG_GINTMSK_FSUSPM_Pos (22U)
  7035. #define USB_OTG_GINTMSK_FSUSPM_Msk (0x1U << USB_OTG_GINTMSK_FSUSPM_Pos) /*!< 0x00400000 */
  7036. #define USB_OTG_GINTMSK_FSUSPM USB_OTG_GINTMSK_FSUSPM_Msk /*!< Data fetch suspended mask */
  7037. #define USB_OTG_GINTMSK_PRTIM_Pos (24U)
  7038. #define USB_OTG_GINTMSK_PRTIM_Msk (0x1U << USB_OTG_GINTMSK_PRTIM_Pos) /*!< 0x01000000 */
  7039. #define USB_OTG_GINTMSK_PRTIM USB_OTG_GINTMSK_PRTIM_Msk /*!< Host port interrupt mask */
  7040. #define USB_OTG_GINTMSK_HCIM_Pos (25U)
  7041. #define USB_OTG_GINTMSK_HCIM_Msk (0x1U << USB_OTG_GINTMSK_HCIM_Pos) /*!< 0x02000000 */
  7042. #define USB_OTG_GINTMSK_HCIM USB_OTG_GINTMSK_HCIM_Msk /*!< Host channels interrupt mask */
  7043. #define USB_OTG_GINTMSK_PTXFEM_Pos (26U)
  7044. #define USB_OTG_GINTMSK_PTXFEM_Msk (0x1U << USB_OTG_GINTMSK_PTXFEM_Pos) /*!< 0x04000000 */
  7045. #define USB_OTG_GINTMSK_PTXFEM USB_OTG_GINTMSK_PTXFEM_Msk /*!< Periodic TxFIFO empty mask */
  7046. #define USB_OTG_GINTMSK_CIDSCHGM_Pos (28U)
  7047. #define USB_OTG_GINTMSK_CIDSCHGM_Msk (0x1U << USB_OTG_GINTMSK_CIDSCHGM_Pos) /*!< 0x10000000 */
  7048. #define USB_OTG_GINTMSK_CIDSCHGM USB_OTG_GINTMSK_CIDSCHGM_Msk /*!< Connector ID status change mask */
  7049. #define USB_OTG_GINTMSK_DISCINT_Pos (29U)
  7050. #define USB_OTG_GINTMSK_DISCINT_Msk (0x1U << USB_OTG_GINTMSK_DISCINT_Pos) /*!< 0x20000000 */
  7051. #define USB_OTG_GINTMSK_DISCINT USB_OTG_GINTMSK_DISCINT_Msk /*!< Disconnect detected interrupt mask */
  7052. #define USB_OTG_GINTMSK_SRQIM_Pos (30U)
  7053. #define USB_OTG_GINTMSK_SRQIM_Msk (0x1U << USB_OTG_GINTMSK_SRQIM_Pos) /*!< 0x40000000 */
  7054. #define USB_OTG_GINTMSK_SRQIM USB_OTG_GINTMSK_SRQIM_Msk /*!< Session request/new session detected interrupt mask */
  7055. #define USB_OTG_GINTMSK_WUIM_Pos (31U)
  7056. #define USB_OTG_GINTMSK_WUIM_Msk (0x1U << USB_OTG_GINTMSK_WUIM_Pos) /*!< 0x80000000 */
  7057. #define USB_OTG_GINTMSK_WUIM USB_OTG_GINTMSK_WUIM_Msk /*!< Resume/remote wakeup detected interrupt mask */
  7058. /******************** Bit definition for USB_OTG_DAINT register ********************/
  7059. #define USB_OTG_DAINT_IEPINT_Pos (0U)
  7060. #define USB_OTG_DAINT_IEPINT_Msk (0xFFFFU << USB_OTG_DAINT_IEPINT_Pos) /*!< 0x0000FFFF */
  7061. #define USB_OTG_DAINT_IEPINT USB_OTG_DAINT_IEPINT_Msk /*!< IN endpoint interrupt bits */
  7062. #define USB_OTG_DAINT_OEPINT_Pos (16U)
  7063. #define USB_OTG_DAINT_OEPINT_Msk (0xFFFFU << USB_OTG_DAINT_OEPINT_Pos) /*!< 0xFFFF0000 */
  7064. #define USB_OTG_DAINT_OEPINT USB_OTG_DAINT_OEPINT_Msk /*!< OUT endpoint interrupt bits */
  7065. /******************** Bit definition for USB_OTG_HAINTMSK register ********************/
  7066. #define USB_OTG_HAINTMSK_HAINTM_Pos (0U)
  7067. #define USB_OTG_HAINTMSK_HAINTM_Msk (0xFFFFU << USB_OTG_HAINTMSK_HAINTM_Pos) /*!< 0x0000FFFF */
  7068. #define USB_OTG_HAINTMSK_HAINTM USB_OTG_HAINTMSK_HAINTM_Msk /*!< Channel interrupt mask */
  7069. /******************** Bit definition for USB_OTG_GRXSTSP register ********************/
  7070. #define USB_OTG_GRXSTSP_EPNUM_Pos (0U)
  7071. #define USB_OTG_GRXSTSP_EPNUM_Msk (0xFU << USB_OTG_GRXSTSP_EPNUM_Pos) /*!< 0x0000000F */
  7072. #define USB_OTG_GRXSTSP_EPNUM USB_OTG_GRXSTSP_EPNUM_Msk /*!< IN EP interrupt mask bits */
  7073. #define USB_OTG_GRXSTSP_BCNT_Pos (4U)
  7074. #define USB_OTG_GRXSTSP_BCNT_Msk (0x7FFU << USB_OTG_GRXSTSP_BCNT_Pos) /*!< 0x00007FF0 */
  7075. #define USB_OTG_GRXSTSP_BCNT USB_OTG_GRXSTSP_BCNT_Msk /*!< OUT EP interrupt mask bits */
  7076. #define USB_OTG_GRXSTSP_DPID_Pos (15U)
  7077. #define USB_OTG_GRXSTSP_DPID_Msk (0x3U << USB_OTG_GRXSTSP_DPID_Pos) /*!< 0x00018000 */
  7078. #define USB_OTG_GRXSTSP_DPID USB_OTG_GRXSTSP_DPID_Msk /*!< OUT EP interrupt mask bits */
  7079. #define USB_OTG_GRXSTSP_PKTSTS_Pos (17U)
  7080. #define USB_OTG_GRXSTSP_PKTSTS_Msk (0xFU << USB_OTG_GRXSTSP_PKTSTS_Pos) /*!< 0x001E0000 */
  7081. #define USB_OTG_GRXSTSP_PKTSTS USB_OTG_GRXSTSP_PKTSTS_Msk /*!< OUT EP interrupt mask bits */
  7082. /******************** Bit definition for USB_OTG_DAINTMSK register ********************/
  7083. #define USB_OTG_DAINTMSK_IEPM_Pos (0U)
  7084. #define USB_OTG_DAINTMSK_IEPM_Msk (0xFFFFU << USB_OTG_DAINTMSK_IEPM_Pos) /*!< 0x0000FFFF */
  7085. #define USB_OTG_DAINTMSK_IEPM USB_OTG_DAINTMSK_IEPM_Msk /*!< IN EP interrupt mask bits */
  7086. #define USB_OTG_DAINTMSK_OEPM_Pos (16U)
  7087. #define USB_OTG_DAINTMSK_OEPM_Msk (0xFFFFU << USB_OTG_DAINTMSK_OEPM_Pos) /*!< 0xFFFF0000 */
  7088. #define USB_OTG_DAINTMSK_OEPM USB_OTG_DAINTMSK_OEPM_Msk /*!< OUT EP interrupt mask bits */
  7089. /******************** Bit definition for OTG register ********************/
  7090. #define USB_OTG_CHNUM_Pos (0U)
  7091. #define USB_OTG_CHNUM_Msk (0xFU << USB_OTG_CHNUM_Pos) /*!< 0x0000000F */
  7092. #define USB_OTG_CHNUM USB_OTG_CHNUM_Msk /*!< Channel number */
  7093. #define USB_OTG_CHNUM_0 (0x1U << USB_OTG_CHNUM_Pos) /*!< 0x00000001 */
  7094. #define USB_OTG_CHNUM_1 (0x2U << USB_OTG_CHNUM_Pos) /*!< 0x00000002 */
  7095. #define USB_OTG_CHNUM_2 (0x4U << USB_OTG_CHNUM_Pos) /*!< 0x00000004 */
  7096. #define USB_OTG_CHNUM_3 (0x8U << USB_OTG_CHNUM_Pos) /*!< 0x00000008 */
  7097. #define USB_OTG_BCNT_Pos (4U)
  7098. #define USB_OTG_BCNT_Msk (0x7FFU << USB_OTG_BCNT_Pos) /*!< 0x00007FF0 */
  7099. #define USB_OTG_BCNT USB_OTG_BCNT_Msk /*!< Byte count */
  7100. #define USB_OTG_DPID_Pos (15U)
  7101. #define USB_OTG_DPID_Msk (0x3U << USB_OTG_DPID_Pos) /*!< 0x00018000 */
  7102. #define USB_OTG_DPID USB_OTG_DPID_Msk /*!< Data PID */
  7103. #define USB_OTG_DPID_0 (0x1U << USB_OTG_DPID_Pos) /*!< 0x00008000 */
  7104. #define USB_OTG_DPID_1 (0x2U << USB_OTG_DPID_Pos) /*!< 0x00010000 */
  7105. #define USB_OTG_PKTSTS_Pos (17U)
  7106. #define USB_OTG_PKTSTS_Msk (0xFU << USB_OTG_PKTSTS_Pos) /*!< 0x001E0000 */
  7107. #define USB_OTG_PKTSTS USB_OTG_PKTSTS_Msk /*!< Packet status */
  7108. #define USB_OTG_PKTSTS_0 (0x1U << USB_OTG_PKTSTS_Pos) /*!< 0x00020000 */
  7109. #define USB_OTG_PKTSTS_1 (0x2U << USB_OTG_PKTSTS_Pos) /*!< 0x00040000 */
  7110. #define USB_OTG_PKTSTS_2 (0x4U << USB_OTG_PKTSTS_Pos) /*!< 0x00080000 */
  7111. #define USB_OTG_PKTSTS_3 (0x8U << USB_OTG_PKTSTS_Pos) /*!< 0x00100000 */
  7112. #define USB_OTG_EPNUM_Pos (0U)
  7113. #define USB_OTG_EPNUM_Msk (0xFU << USB_OTG_EPNUM_Pos) /*!< 0x0000000F */
  7114. #define USB_OTG_EPNUM USB_OTG_EPNUM_Msk /*!< Endpoint number */
  7115. #define USB_OTG_EPNUM_0 (0x1U << USB_OTG_EPNUM_Pos) /*!< 0x00000001 */
  7116. #define USB_OTG_EPNUM_1 (0x2U << USB_OTG_EPNUM_Pos) /*!< 0x00000002 */
  7117. #define USB_OTG_EPNUM_2 (0x4U << USB_OTG_EPNUM_Pos) /*!< 0x00000004 */
  7118. #define USB_OTG_EPNUM_3 (0x8U << USB_OTG_EPNUM_Pos) /*!< 0x00000008 */
  7119. #define USB_OTG_FRMNUM_Pos (21U)
  7120. #define USB_OTG_FRMNUM_Msk (0xFU << USB_OTG_FRMNUM_Pos) /*!< 0x01E00000 */
  7121. #define USB_OTG_FRMNUM USB_OTG_FRMNUM_Msk /*!< Frame number */
  7122. #define USB_OTG_FRMNUM_0 (0x1U << USB_OTG_FRMNUM_Pos) /*!< 0x00200000 */
  7123. #define USB_OTG_FRMNUM_1 (0x2U << USB_OTG_FRMNUM_Pos) /*!< 0x00400000 */
  7124. #define USB_OTG_FRMNUM_2 (0x4U << USB_OTG_FRMNUM_Pos) /*!< 0x00800000 */
  7125. #define USB_OTG_FRMNUM_3 (0x8U << USB_OTG_FRMNUM_Pos) /*!< 0x01000000 */
  7126. /******************** Bit definition for OTG register ********************/
  7127. #define USB_OTG_CHNUM_Pos (0U)
  7128. #define USB_OTG_CHNUM_Msk (0xFU << USB_OTG_CHNUM_Pos) /*!< 0x0000000F */
  7129. #define USB_OTG_CHNUM USB_OTG_CHNUM_Msk /*!< Channel number */
  7130. #define USB_OTG_CHNUM_0 (0x1U << USB_OTG_CHNUM_Pos) /*!< 0x00000001 */
  7131. #define USB_OTG_CHNUM_1 (0x2U << USB_OTG_CHNUM_Pos) /*!< 0x00000002 */
  7132. #define USB_OTG_CHNUM_2 (0x4U << USB_OTG_CHNUM_Pos) /*!< 0x00000004 */
  7133. #define USB_OTG_CHNUM_3 (0x8U << USB_OTG_CHNUM_Pos) /*!< 0x00000008 */
  7134. #define USB_OTG_BCNT_Pos (4U)
  7135. #define USB_OTG_BCNT_Msk (0x7FFU << USB_OTG_BCNT_Pos) /*!< 0x00007FF0 */
  7136. #define USB_OTG_BCNT USB_OTG_BCNT_Msk /*!< Byte count */
  7137. #define USB_OTG_DPID_Pos (15U)
  7138. #define USB_OTG_DPID_Msk (0x3U << USB_OTG_DPID_Pos) /*!< 0x00018000 */
  7139. #define USB_OTG_DPID USB_OTG_DPID_Msk /*!< Data PID */
  7140. #define USB_OTG_DPID_0 (0x1U << USB_OTG_DPID_Pos) /*!< 0x00008000 */
  7141. #define USB_OTG_DPID_1 (0x2U << USB_OTG_DPID_Pos) /*!< 0x00010000 */
  7142. #define USB_OTG_PKTSTS_Pos (17U)
  7143. #define USB_OTG_PKTSTS_Msk (0xFU << USB_OTG_PKTSTS_Pos) /*!< 0x001E0000 */
  7144. #define USB_OTG_PKTSTS USB_OTG_PKTSTS_Msk /*!< Packet status */
  7145. #define USB_OTG_PKTSTS_0 (0x1U << USB_OTG_PKTSTS_Pos) /*!< 0x00020000 */
  7146. #define USB_OTG_PKTSTS_1 (0x2U << USB_OTG_PKTSTS_Pos) /*!< 0x00040000 */
  7147. #define USB_OTG_PKTSTS_2 (0x4U << USB_OTG_PKTSTS_Pos) /*!< 0x00080000 */
  7148. #define USB_OTG_PKTSTS_3 (0x8U << USB_OTG_PKTSTS_Pos) /*!< 0x00100000 */
  7149. #define USB_OTG_EPNUM_Pos (0U)
  7150. #define USB_OTG_EPNUM_Msk (0xFU << USB_OTG_EPNUM_Pos) /*!< 0x0000000F */
  7151. #define USB_OTG_EPNUM USB_OTG_EPNUM_Msk /*!< Endpoint number */
  7152. #define USB_OTG_EPNUM_0 (0x1U << USB_OTG_EPNUM_Pos) /*!< 0x00000001 */
  7153. #define USB_OTG_EPNUM_1 (0x2U << USB_OTG_EPNUM_Pos) /*!< 0x00000002 */
  7154. #define USB_OTG_EPNUM_2 (0x4U << USB_OTG_EPNUM_Pos) /*!< 0x00000004 */
  7155. #define USB_OTG_EPNUM_3 (0x8U << USB_OTG_EPNUM_Pos) /*!< 0x00000008 */
  7156. #define USB_OTG_FRMNUM_Pos (21U)
  7157. #define USB_OTG_FRMNUM_Msk (0xFU << USB_OTG_FRMNUM_Pos) /*!< 0x01E00000 */
  7158. #define USB_OTG_FRMNUM USB_OTG_FRMNUM_Msk /*!< Frame number */
  7159. #define USB_OTG_FRMNUM_0 (0x1U << USB_OTG_FRMNUM_Pos) /*!< 0x00200000 */
  7160. #define USB_OTG_FRMNUM_1 (0x2U << USB_OTG_FRMNUM_Pos) /*!< 0x00400000 */
  7161. #define USB_OTG_FRMNUM_2 (0x4U << USB_OTG_FRMNUM_Pos) /*!< 0x00800000 */
  7162. #define USB_OTG_FRMNUM_3 (0x8U << USB_OTG_FRMNUM_Pos) /*!< 0x01000000 */
  7163. /******************** Bit definition for USB_OTG_GRXFSIZ register ********************/
  7164. #define USB_OTG_GRXFSIZ_RXFD_Pos (0U)
  7165. #define USB_OTG_GRXFSIZ_RXFD_Msk (0xFFFFU << USB_OTG_GRXFSIZ_RXFD_Pos) /*!< 0x0000FFFF */
  7166. #define USB_OTG_GRXFSIZ_RXFD USB_OTG_GRXFSIZ_RXFD_Msk /*!< RxFIFO depth */
  7167. /******************** Bit definition for USB_OTG_DVBUSDIS register ********************/
  7168. #define USB_OTG_DVBUSDIS_VBUSDT_Pos (0U)
  7169. #define USB_OTG_DVBUSDIS_VBUSDT_Msk (0xFFFFU << USB_OTG_DVBUSDIS_VBUSDT_Pos) /*!< 0x0000FFFF */
  7170. #define USB_OTG_DVBUSDIS_VBUSDT USB_OTG_DVBUSDIS_VBUSDT_Msk /*!< Device VBUS discharge time */
  7171. /******************** Bit definition for OTG register ********************/
  7172. #define USB_OTG_NPTXFSA_Pos (0U)
  7173. #define USB_OTG_NPTXFSA_Msk (0xFFFFU << USB_OTG_NPTXFSA_Pos) /*!< 0x0000FFFF */
  7174. #define USB_OTG_NPTXFSA USB_OTG_NPTXFSA_Msk /*!< Nonperiodic transmit RAM start address */
  7175. #define USB_OTG_NPTXFD_Pos (16U)
  7176. #define USB_OTG_NPTXFD_Msk (0xFFFFU << USB_OTG_NPTXFD_Pos) /*!< 0xFFFF0000 */
  7177. #define USB_OTG_NPTXFD USB_OTG_NPTXFD_Msk /*!< Nonperiodic TxFIFO depth */
  7178. #define USB_OTG_TX0FSA_Pos (0U)
  7179. #define USB_OTG_TX0FSA_Msk (0xFFFFU << USB_OTG_TX0FSA_Pos) /*!< 0x0000FFFF */
  7180. #define USB_OTG_TX0FSA USB_OTG_TX0FSA_Msk /*!< Endpoint 0 transmit RAM start address */
  7181. #define USB_OTG_TX0FD_Pos (16U)
  7182. #define USB_OTG_TX0FD_Msk (0xFFFFU << USB_OTG_TX0FD_Pos) /*!< 0xFFFF0000 */
  7183. #define USB_OTG_TX0FD USB_OTG_TX0FD_Msk /*!< Endpoint 0 TxFIFO depth */
  7184. /******************** Bit definition forUSB_OTG_DVBUSPULSE register ********************/
  7185. #define USB_OTG_DVBUSPULSE_DVBUSP_Pos (0U)
  7186. #define USB_OTG_DVBUSPULSE_DVBUSP_Msk (0xFFFU << USB_OTG_DVBUSPULSE_DVBUSP_Pos) /*!< 0x00000FFF */
  7187. #define USB_OTG_DVBUSPULSE_DVBUSP USB_OTG_DVBUSPULSE_DVBUSP_Msk /*!< Device VBUS pulsing time */
  7188. /******************** Bit definition for USB_OTG_GNPTXSTS register ********************/
  7189. #define USB_OTG_GNPTXSTS_NPTXFSAV_Pos (0U)
  7190. #define USB_OTG_GNPTXSTS_NPTXFSAV_Msk (0xFFFFU << USB_OTG_GNPTXSTS_NPTXFSAV_Pos) /*!< 0x0000FFFF */
  7191. #define USB_OTG_GNPTXSTS_NPTXFSAV USB_OTG_GNPTXSTS_NPTXFSAV_Msk /*!< Nonperiodic TxFIFO space available */
  7192. #define USB_OTG_GNPTXSTS_NPTQXSAV_Pos (16U)
  7193. #define USB_OTG_GNPTXSTS_NPTQXSAV_Msk (0xFFU << USB_OTG_GNPTXSTS_NPTQXSAV_Pos) /*!< 0x00FF0000 */
  7194. #define USB_OTG_GNPTXSTS_NPTQXSAV USB_OTG_GNPTXSTS_NPTQXSAV_Msk /*!< Nonperiodic transmit request queue space available */
  7195. #define USB_OTG_GNPTXSTS_NPTQXSAV_0 (0x01U << USB_OTG_GNPTXSTS_NPTQXSAV_Pos) /*!< 0x00010000 */
  7196. #define USB_OTG_GNPTXSTS_NPTQXSAV_1 (0x02U << USB_OTG_GNPTXSTS_NPTQXSAV_Pos) /*!< 0x00020000 */
  7197. #define USB_OTG_GNPTXSTS_NPTQXSAV_2 (0x04U << USB_OTG_GNPTXSTS_NPTQXSAV_Pos) /*!< 0x00040000 */
  7198. #define USB_OTG_GNPTXSTS_NPTQXSAV_3 (0x08U << USB_OTG_GNPTXSTS_NPTQXSAV_Pos) /*!< 0x00080000 */
  7199. #define USB_OTG_GNPTXSTS_NPTQXSAV_4 (0x10U << USB_OTG_GNPTXSTS_NPTQXSAV_Pos) /*!< 0x00100000 */
  7200. #define USB_OTG_GNPTXSTS_NPTQXSAV_5 (0x20U << USB_OTG_GNPTXSTS_NPTQXSAV_Pos) /*!< 0x00200000 */
  7201. #define USB_OTG_GNPTXSTS_NPTQXSAV_6 (0x40U << USB_OTG_GNPTXSTS_NPTQXSAV_Pos) /*!< 0x00400000 */
  7202. #define USB_OTG_GNPTXSTS_NPTQXSAV_7 (0x80U << USB_OTG_GNPTXSTS_NPTQXSAV_Pos) /*!< 0x00800000 */
  7203. #define USB_OTG_GNPTXSTS_NPTXQTOP_Pos (24U)
  7204. #define USB_OTG_GNPTXSTS_NPTXQTOP_Msk (0x7FU << USB_OTG_GNPTXSTS_NPTXQTOP_Pos) /*!< 0x7F000000 */
  7205. #define USB_OTG_GNPTXSTS_NPTXQTOP USB_OTG_GNPTXSTS_NPTXQTOP_Msk /*!< Top of the nonperiodic transmit request queue */
  7206. #define USB_OTG_GNPTXSTS_NPTXQTOP_0 (0x01U << USB_OTG_GNPTXSTS_NPTXQTOP_Pos) /*!< 0x01000000 */
  7207. #define USB_OTG_GNPTXSTS_NPTXQTOP_1 (0x02U << USB_OTG_GNPTXSTS_NPTXQTOP_Pos) /*!< 0x02000000 */
  7208. #define USB_OTG_GNPTXSTS_NPTXQTOP_2 (0x04U << USB_OTG_GNPTXSTS_NPTXQTOP_Pos) /*!< 0x04000000 */
  7209. #define USB_OTG_GNPTXSTS_NPTXQTOP_3 (0x08U << USB_OTG_GNPTXSTS_NPTXQTOP_Pos) /*!< 0x08000000 */
  7210. #define USB_OTG_GNPTXSTS_NPTXQTOP_4 (0x10U << USB_OTG_GNPTXSTS_NPTXQTOP_Pos) /*!< 0x10000000 */
  7211. #define USB_OTG_GNPTXSTS_NPTXQTOP_5 (0x20U << USB_OTG_GNPTXSTS_NPTXQTOP_Pos) /*!< 0x20000000 */
  7212. #define USB_OTG_GNPTXSTS_NPTXQTOP_6 (0x40U << USB_OTG_GNPTXSTS_NPTXQTOP_Pos) /*!< 0x40000000 */
  7213. /******************** Bit definition for USB_OTG_DTHRCTL register ********************/
  7214. #define USB_OTG_DTHRCTL_NONISOTHREN_Pos (0U)
  7215. #define USB_OTG_DTHRCTL_NONISOTHREN_Msk (0x1U << USB_OTG_DTHRCTL_NONISOTHREN_Pos) /*!< 0x00000001 */
  7216. #define USB_OTG_DTHRCTL_NONISOTHREN USB_OTG_DTHRCTL_NONISOTHREN_Msk /*!< Nonisochronous IN endpoints threshold enable */
  7217. #define USB_OTG_DTHRCTL_ISOTHREN_Pos (1U)
  7218. #define USB_OTG_DTHRCTL_ISOTHREN_Msk (0x1U << USB_OTG_DTHRCTL_ISOTHREN_Pos) /*!< 0x00000002 */
  7219. #define USB_OTG_DTHRCTL_ISOTHREN USB_OTG_DTHRCTL_ISOTHREN_Msk /*!< ISO IN endpoint threshold enable */
  7220. #define USB_OTG_DTHRCTL_TXTHRLEN_Pos (2U)
  7221. #define USB_OTG_DTHRCTL_TXTHRLEN_Msk (0x1FFU << USB_OTG_DTHRCTL_TXTHRLEN_Pos) /*!< 0x000007FC */
  7222. #define USB_OTG_DTHRCTL_TXTHRLEN USB_OTG_DTHRCTL_TXTHRLEN_Msk /*!< Transmit threshold length */
  7223. #define USB_OTG_DTHRCTL_TXTHRLEN_0 (0x001U << USB_OTG_DTHRCTL_TXTHRLEN_Pos) /*!< 0x00000004 */
  7224. #define USB_OTG_DTHRCTL_TXTHRLEN_1 (0x002U << USB_OTG_DTHRCTL_TXTHRLEN_Pos) /*!< 0x00000008 */
  7225. #define USB_OTG_DTHRCTL_TXTHRLEN_2 (0x004U << USB_OTG_DTHRCTL_TXTHRLEN_Pos) /*!< 0x00000010 */
  7226. #define USB_OTG_DTHRCTL_TXTHRLEN_3 (0x008U << USB_OTG_DTHRCTL_TXTHRLEN_Pos) /*!< 0x00000020 */
  7227. #define USB_OTG_DTHRCTL_TXTHRLEN_4 (0x010U << USB_OTG_DTHRCTL_TXTHRLEN_Pos) /*!< 0x00000040 */
  7228. #define USB_OTG_DTHRCTL_TXTHRLEN_5 (0x020U << USB_OTG_DTHRCTL_TXTHRLEN_Pos) /*!< 0x00000080 */
  7229. #define USB_OTG_DTHRCTL_TXTHRLEN_6 (0x040U << USB_OTG_DTHRCTL_TXTHRLEN_Pos) /*!< 0x00000100 */
  7230. #define USB_OTG_DTHRCTL_TXTHRLEN_7 (0x080U << USB_OTG_DTHRCTL_TXTHRLEN_Pos) /*!< 0x00000200 */
  7231. #define USB_OTG_DTHRCTL_TXTHRLEN_8 (0x100U << USB_OTG_DTHRCTL_TXTHRLEN_Pos) /*!< 0x00000400 */
  7232. #define USB_OTG_DTHRCTL_RXTHREN_Pos (16U)
  7233. #define USB_OTG_DTHRCTL_RXTHREN_Msk (0x1U << USB_OTG_DTHRCTL_RXTHREN_Pos) /*!< 0x00010000 */
  7234. #define USB_OTG_DTHRCTL_RXTHREN USB_OTG_DTHRCTL_RXTHREN_Msk /*!< Receive threshold enable */
  7235. #define USB_OTG_DTHRCTL_RXTHRLEN_Pos (17U)
  7236. #define USB_OTG_DTHRCTL_RXTHRLEN_Msk (0x1FFU << USB_OTG_DTHRCTL_RXTHRLEN_Pos) /*!< 0x03FE0000 */
  7237. #define USB_OTG_DTHRCTL_RXTHRLEN USB_OTG_DTHRCTL_RXTHRLEN_Msk /*!< Receive threshold length */
  7238. #define USB_OTG_DTHRCTL_RXTHRLEN_0 (0x001U << USB_OTG_DTHRCTL_RXTHRLEN_Pos) /*!< 0x00020000 */
  7239. #define USB_OTG_DTHRCTL_RXTHRLEN_1 (0x002U << USB_OTG_DTHRCTL_RXTHRLEN_Pos) /*!< 0x00040000 */
  7240. #define USB_OTG_DTHRCTL_RXTHRLEN_2 (0x004U << USB_OTG_DTHRCTL_RXTHRLEN_Pos) /*!< 0x00080000 */
  7241. #define USB_OTG_DTHRCTL_RXTHRLEN_3 (0x008U << USB_OTG_DTHRCTL_RXTHRLEN_Pos) /*!< 0x00100000 */
  7242. #define USB_OTG_DTHRCTL_RXTHRLEN_4 (0x010U << USB_OTG_DTHRCTL_RXTHRLEN_Pos) /*!< 0x00200000 */
  7243. #define USB_OTG_DTHRCTL_RXTHRLEN_5 (0x020U << USB_OTG_DTHRCTL_RXTHRLEN_Pos) /*!< 0x00400000 */
  7244. #define USB_OTG_DTHRCTL_RXTHRLEN_6 (0x040U << USB_OTG_DTHRCTL_RXTHRLEN_Pos) /*!< 0x00800000 */
  7245. #define USB_OTG_DTHRCTL_RXTHRLEN_7 (0x080U << USB_OTG_DTHRCTL_RXTHRLEN_Pos) /*!< 0x01000000 */
  7246. #define USB_OTG_DTHRCTL_RXTHRLEN_8 (0x100U << USB_OTG_DTHRCTL_RXTHRLEN_Pos) /*!< 0x02000000 */
  7247. #define USB_OTG_DTHRCTL_ARPEN_Pos (27U)
  7248. #define USB_OTG_DTHRCTL_ARPEN_Msk (0x1U << USB_OTG_DTHRCTL_ARPEN_Pos) /*!< 0x08000000 */
  7249. #define USB_OTG_DTHRCTL_ARPEN USB_OTG_DTHRCTL_ARPEN_Msk /*!< Arbiter parking enable */
  7250. /******************** Bit definition for USB_OTG_DIEPEMPMSK register ********************/
  7251. #define USB_OTG_DIEPEMPMSK_INEPTXFEM_Pos (0U)
  7252. #define USB_OTG_DIEPEMPMSK_INEPTXFEM_Msk (0xFFFFU << USB_OTG_DIEPEMPMSK_INEPTXFEM_Pos) /*!< 0x0000FFFF */
  7253. #define USB_OTG_DIEPEMPMSK_INEPTXFEM USB_OTG_DIEPEMPMSK_INEPTXFEM_Msk /*!< IN EP Tx FIFO empty interrupt mask bits */
  7254. /******************** Bit definition for USB_OTG_DEACHINT register ********************/
  7255. #define USB_OTG_DEACHINT_IEP1INT_Pos (1U)
  7256. #define USB_OTG_DEACHINT_IEP1INT_Msk (0x1U << USB_OTG_DEACHINT_IEP1INT_Pos) /*!< 0x00000002 */
  7257. #define USB_OTG_DEACHINT_IEP1INT USB_OTG_DEACHINT_IEP1INT_Msk /*!< IN endpoint 1interrupt bit */
  7258. #define USB_OTG_DEACHINT_OEP1INT_Pos (17U)
  7259. #define USB_OTG_DEACHINT_OEP1INT_Msk (0x1U << USB_OTG_DEACHINT_OEP1INT_Pos) /*!< 0x00020000 */
  7260. #define USB_OTG_DEACHINT_OEP1INT USB_OTG_DEACHINT_OEP1INT_Msk /*!< OUT endpoint 1 interrupt bit */
  7261. /******************** Bit definition for USB_OTG_GCCFG register ********************/
  7262. #define USB_OTG_GCCFG_PWRDWN_Pos (16U)
  7263. #define USB_OTG_GCCFG_PWRDWN_Msk (0x1U << USB_OTG_GCCFG_PWRDWN_Pos) /*!< 0x00010000 */
  7264. #define USB_OTG_GCCFG_PWRDWN USB_OTG_GCCFG_PWRDWN_Msk /*!< Power down */
  7265. #define USB_OTG_GCCFG_I2CPADEN_Pos (17U)
  7266. #define USB_OTG_GCCFG_I2CPADEN_Msk (0x1U << USB_OTG_GCCFG_I2CPADEN_Pos) /*!< 0x00020000 */
  7267. #define USB_OTG_GCCFG_I2CPADEN USB_OTG_GCCFG_I2CPADEN_Msk /*!< Enable I2C bus connection for the external I2C PHY interface*/
  7268. #define USB_OTG_GCCFG_VBUSASEN_Pos (18U)
  7269. #define USB_OTG_GCCFG_VBUSASEN_Msk (0x1U << USB_OTG_GCCFG_VBUSASEN_Pos) /*!< 0x00040000 */
  7270. #define USB_OTG_GCCFG_VBUSASEN USB_OTG_GCCFG_VBUSASEN_Msk /*!< Enable the VBUS sensing device */
  7271. #define USB_OTG_GCCFG_VBUSBSEN_Pos (19U)
  7272. #define USB_OTG_GCCFG_VBUSBSEN_Msk (0x1U << USB_OTG_GCCFG_VBUSBSEN_Pos) /*!< 0x00080000 */
  7273. #define USB_OTG_GCCFG_VBUSBSEN USB_OTG_GCCFG_VBUSBSEN_Msk /*!< Enable the VBUS sensing device */
  7274. #define USB_OTG_GCCFG_SOFOUTEN_Pos (20U)
  7275. #define USB_OTG_GCCFG_SOFOUTEN_Msk (0x1U << USB_OTG_GCCFG_SOFOUTEN_Pos) /*!< 0x00100000 */
  7276. #define USB_OTG_GCCFG_SOFOUTEN USB_OTG_GCCFG_SOFOUTEN_Msk /*!< SOF output enable */
  7277. #define USB_OTG_GCCFG_NOVBUSSENS_Pos (21U)
  7278. #define USB_OTG_GCCFG_NOVBUSSENS_Msk (0x1U << USB_OTG_GCCFG_NOVBUSSENS_Pos) /*!< 0x00200000 */
  7279. #define USB_OTG_GCCFG_NOVBUSSENS USB_OTG_GCCFG_NOVBUSSENS_Msk /*!< VBUS sensing disable option*/
  7280. /******************** Bit definition forUSB_OTG_DEACHINTMSK register ********************/
  7281. #define USB_OTG_DEACHINTMSK_IEP1INTM_Pos (1U)
  7282. #define USB_OTG_DEACHINTMSK_IEP1INTM_Msk (0x1U << USB_OTG_DEACHINTMSK_IEP1INTM_Pos) /*!< 0x00000002 */
  7283. #define USB_OTG_DEACHINTMSK_IEP1INTM USB_OTG_DEACHINTMSK_IEP1INTM_Msk /*!< IN Endpoint 1 interrupt mask bit */
  7284. #define USB_OTG_DEACHINTMSK_OEP1INTM_Pos (17U)
  7285. #define USB_OTG_DEACHINTMSK_OEP1INTM_Msk (0x1U << USB_OTG_DEACHINTMSK_OEP1INTM_Pos) /*!< 0x00020000 */
  7286. #define USB_OTG_DEACHINTMSK_OEP1INTM USB_OTG_DEACHINTMSK_OEP1INTM_Msk /*!< OUT Endpoint 1 interrupt mask bit */
  7287. /******************** Bit definition for USB_OTG_CID register ********************/
  7288. #define USB_OTG_CID_PRODUCT_ID_Pos (0U)
  7289. #define USB_OTG_CID_PRODUCT_ID_Msk (0xFFFFFFFFU << USB_OTG_CID_PRODUCT_ID_Pos) /*!< 0xFFFFFFFF */
  7290. #define USB_OTG_CID_PRODUCT_ID USB_OTG_CID_PRODUCT_ID_Msk /*!< Product ID field */
  7291. /******************** Bit definition for USB_OTG_DIEPEACHMSK1 register ********************/
  7292. #define USB_OTG_DIEPEACHMSK1_XFRCM_Pos (0U)
  7293. #define USB_OTG_DIEPEACHMSK1_XFRCM_Msk (0x1U << USB_OTG_DIEPEACHMSK1_XFRCM_Pos) /*!< 0x00000001 */
  7294. #define USB_OTG_DIEPEACHMSK1_XFRCM USB_OTG_DIEPEACHMSK1_XFRCM_Msk /*!< Transfer completed interrupt mask */
  7295. #define USB_OTG_DIEPEACHMSK1_EPDM_Pos (1U)
  7296. #define USB_OTG_DIEPEACHMSK1_EPDM_Msk (0x1U << USB_OTG_DIEPEACHMSK1_EPDM_Pos) /*!< 0x00000002 */
  7297. #define USB_OTG_DIEPEACHMSK1_EPDM USB_OTG_DIEPEACHMSK1_EPDM_Msk /*!< Endpoint disabled interrupt mask */
  7298. #define USB_OTG_DIEPEACHMSK1_TOM_Pos (3U)
  7299. #define USB_OTG_DIEPEACHMSK1_TOM_Msk (0x1U << USB_OTG_DIEPEACHMSK1_TOM_Pos) /*!< 0x00000008 */
  7300. #define USB_OTG_DIEPEACHMSK1_TOM USB_OTG_DIEPEACHMSK1_TOM_Msk /*!< Timeout condition mask (nonisochronous endpoints) */
  7301. #define USB_OTG_DIEPEACHMSK1_ITTXFEMSK_Pos (4U)
  7302. #define USB_OTG_DIEPEACHMSK1_ITTXFEMSK_Msk (0x1U << USB_OTG_DIEPEACHMSK1_ITTXFEMSK_Pos) /*!< 0x00000010 */
  7303. #define USB_OTG_DIEPEACHMSK1_ITTXFEMSK USB_OTG_DIEPEACHMSK1_ITTXFEMSK_Msk /*!< IN token received when TxFIFO empty mask */
  7304. #define USB_OTG_DIEPEACHMSK1_INEPNMM_Pos (5U)
  7305. #define USB_OTG_DIEPEACHMSK1_INEPNMM_Msk (0x1U << USB_OTG_DIEPEACHMSK1_INEPNMM_Pos) /*!< 0x00000020 */
  7306. #define USB_OTG_DIEPEACHMSK1_INEPNMM USB_OTG_DIEPEACHMSK1_INEPNMM_Msk /*!< IN token received with EP mismatch mask */
  7307. #define USB_OTG_DIEPEACHMSK1_INEPNEM_Pos (6U)
  7308. #define USB_OTG_DIEPEACHMSK1_INEPNEM_Msk (0x1U << USB_OTG_DIEPEACHMSK1_INEPNEM_Pos) /*!< 0x00000040 */
  7309. #define USB_OTG_DIEPEACHMSK1_INEPNEM USB_OTG_DIEPEACHMSK1_INEPNEM_Msk /*!< IN endpoint NAK effective mask */
  7310. #define USB_OTG_DIEPEACHMSK1_TXFURM_Pos (8U)
  7311. #define USB_OTG_DIEPEACHMSK1_TXFURM_Msk (0x1U << USB_OTG_DIEPEACHMSK1_TXFURM_Pos) /*!< 0x00000100 */
  7312. #define USB_OTG_DIEPEACHMSK1_TXFURM USB_OTG_DIEPEACHMSK1_TXFURM_Msk /*!< FIFO underrun mask */
  7313. #define USB_OTG_DIEPEACHMSK1_BIM_Pos (9U)
  7314. #define USB_OTG_DIEPEACHMSK1_BIM_Msk (0x1U << USB_OTG_DIEPEACHMSK1_BIM_Pos) /*!< 0x00000200 */
  7315. #define USB_OTG_DIEPEACHMSK1_BIM USB_OTG_DIEPEACHMSK1_BIM_Msk /*!< BNA interrupt mask */
  7316. #define USB_OTG_DIEPEACHMSK1_NAKM_Pos (13U)
  7317. #define USB_OTG_DIEPEACHMSK1_NAKM_Msk (0x1U << USB_OTG_DIEPEACHMSK1_NAKM_Pos) /*!< 0x00002000 */
  7318. #define USB_OTG_DIEPEACHMSK1_NAKM USB_OTG_DIEPEACHMSK1_NAKM_Msk /*!< NAK interrupt mask */
  7319. /******************** Bit definition for USB_OTG_HPRT register ********************/
  7320. #define USB_OTG_HPRT_PCSTS_Pos (0U)
  7321. #define USB_OTG_HPRT_PCSTS_Msk (0x1U << USB_OTG_HPRT_PCSTS_Pos) /*!< 0x00000001 */
  7322. #define USB_OTG_HPRT_PCSTS USB_OTG_HPRT_PCSTS_Msk /*!< Port connect status */
  7323. #define USB_OTG_HPRT_PCDET_Pos (1U)
  7324. #define USB_OTG_HPRT_PCDET_Msk (0x1U << USB_OTG_HPRT_PCDET_Pos) /*!< 0x00000002 */
  7325. #define USB_OTG_HPRT_PCDET USB_OTG_HPRT_PCDET_Msk /*!< Port connect detected */
  7326. #define USB_OTG_HPRT_PENA_Pos (2U)
  7327. #define USB_OTG_HPRT_PENA_Msk (0x1U << USB_OTG_HPRT_PENA_Pos) /*!< 0x00000004 */
  7328. #define USB_OTG_HPRT_PENA USB_OTG_HPRT_PENA_Msk /*!< Port enable */
  7329. #define USB_OTG_HPRT_PENCHNG_Pos (3U)
  7330. #define USB_OTG_HPRT_PENCHNG_Msk (0x1U << USB_OTG_HPRT_PENCHNG_Pos) /*!< 0x00000008 */
  7331. #define USB_OTG_HPRT_PENCHNG USB_OTG_HPRT_PENCHNG_Msk /*!< Port enable/disable change */
  7332. #define USB_OTG_HPRT_POCA_Pos (4U)
  7333. #define USB_OTG_HPRT_POCA_Msk (0x1U << USB_OTG_HPRT_POCA_Pos) /*!< 0x00000010 */
  7334. #define USB_OTG_HPRT_POCA USB_OTG_HPRT_POCA_Msk /*!< Port overcurrent active */
  7335. #define USB_OTG_HPRT_POCCHNG_Pos (5U)
  7336. #define USB_OTG_HPRT_POCCHNG_Msk (0x1U << USB_OTG_HPRT_POCCHNG_Pos) /*!< 0x00000020 */
  7337. #define USB_OTG_HPRT_POCCHNG USB_OTG_HPRT_POCCHNG_Msk /*!< Port overcurrent change */
  7338. #define USB_OTG_HPRT_PRES_Pos (6U)
  7339. #define USB_OTG_HPRT_PRES_Msk (0x1U << USB_OTG_HPRT_PRES_Pos) /*!< 0x00000040 */
  7340. #define USB_OTG_HPRT_PRES USB_OTG_HPRT_PRES_Msk /*!< Port resume */
  7341. #define USB_OTG_HPRT_PSUSP_Pos (7U)
  7342. #define USB_OTG_HPRT_PSUSP_Msk (0x1U << USB_OTG_HPRT_PSUSP_Pos) /*!< 0x00000080 */
  7343. #define USB_OTG_HPRT_PSUSP USB_OTG_HPRT_PSUSP_Msk /*!< Port suspend */
  7344. #define USB_OTG_HPRT_PRST_Pos (8U)
  7345. #define USB_OTG_HPRT_PRST_Msk (0x1U << USB_OTG_HPRT_PRST_Pos) /*!< 0x00000100 */
  7346. #define USB_OTG_HPRT_PRST USB_OTG_HPRT_PRST_Msk /*!< Port reset */
  7347. #define USB_OTG_HPRT_PLSTS_Pos (10U)
  7348. #define USB_OTG_HPRT_PLSTS_Msk (0x3U << USB_OTG_HPRT_PLSTS_Pos) /*!< 0x00000C00 */
  7349. #define USB_OTG_HPRT_PLSTS USB_OTG_HPRT_PLSTS_Msk /*!< Port line status */
  7350. #define USB_OTG_HPRT_PLSTS_0 (0x1U << USB_OTG_HPRT_PLSTS_Pos) /*!< 0x00000400 */
  7351. #define USB_OTG_HPRT_PLSTS_1 (0x2U << USB_OTG_HPRT_PLSTS_Pos) /*!< 0x00000800 */
  7352. #define USB_OTG_HPRT_PPWR_Pos (12U)
  7353. #define USB_OTG_HPRT_PPWR_Msk (0x1U << USB_OTG_HPRT_PPWR_Pos) /*!< 0x00001000 */
  7354. #define USB_OTG_HPRT_PPWR USB_OTG_HPRT_PPWR_Msk /*!< Port power */
  7355. #define USB_OTG_HPRT_PTCTL_Pos (13U)
  7356. #define USB_OTG_HPRT_PTCTL_Msk (0xFU << USB_OTG_HPRT_PTCTL_Pos) /*!< 0x0001E000 */
  7357. #define USB_OTG_HPRT_PTCTL USB_OTG_HPRT_PTCTL_Msk /*!< Port test control */
  7358. #define USB_OTG_HPRT_PTCTL_0 (0x1U << USB_OTG_HPRT_PTCTL_Pos) /*!< 0x00002000 */
  7359. #define USB_OTG_HPRT_PTCTL_1 (0x2U << USB_OTG_HPRT_PTCTL_Pos) /*!< 0x00004000 */
  7360. #define USB_OTG_HPRT_PTCTL_2 (0x4U << USB_OTG_HPRT_PTCTL_Pos) /*!< 0x00008000 */
  7361. #define USB_OTG_HPRT_PTCTL_3 (0x8U << USB_OTG_HPRT_PTCTL_Pos) /*!< 0x00010000 */
  7362. #define USB_OTG_HPRT_PSPD_Pos (17U)
  7363. #define USB_OTG_HPRT_PSPD_Msk (0x3U << USB_OTG_HPRT_PSPD_Pos) /*!< 0x00060000 */
  7364. #define USB_OTG_HPRT_PSPD USB_OTG_HPRT_PSPD_Msk /*!< Port speed */
  7365. #define USB_OTG_HPRT_PSPD_0 (0x1U << USB_OTG_HPRT_PSPD_Pos) /*!< 0x00020000 */
  7366. #define USB_OTG_HPRT_PSPD_1 (0x2U << USB_OTG_HPRT_PSPD_Pos) /*!< 0x00040000 */
  7367. /******************** Bit definition for USB_OTG_DOEPEACHMSK1 register ********************/
  7368. #define USB_OTG_DOEPEACHMSK1_XFRCM_Pos (0U)
  7369. #define USB_OTG_DOEPEACHMSK1_XFRCM_Msk (0x1U << USB_OTG_DOEPEACHMSK1_XFRCM_Pos) /*!< 0x00000001 */
  7370. #define USB_OTG_DOEPEACHMSK1_XFRCM USB_OTG_DOEPEACHMSK1_XFRCM_Msk /*!< Transfer completed interrupt mask */
  7371. #define USB_OTG_DOEPEACHMSK1_EPDM_Pos (1U)
  7372. #define USB_OTG_DOEPEACHMSK1_EPDM_Msk (0x1U << USB_OTG_DOEPEACHMSK1_EPDM_Pos) /*!< 0x00000002 */
  7373. #define USB_OTG_DOEPEACHMSK1_EPDM USB_OTG_DOEPEACHMSK1_EPDM_Msk /*!< Endpoint disabled interrupt mask */
  7374. #define USB_OTG_DOEPEACHMSK1_TOM_Pos (3U)
  7375. #define USB_OTG_DOEPEACHMSK1_TOM_Msk (0x1U << USB_OTG_DOEPEACHMSK1_TOM_Pos) /*!< 0x00000008 */
  7376. #define USB_OTG_DOEPEACHMSK1_TOM USB_OTG_DOEPEACHMSK1_TOM_Msk /*!< Timeout condition mask */
  7377. #define USB_OTG_DOEPEACHMSK1_ITTXFEMSK_Pos (4U)
  7378. #define USB_OTG_DOEPEACHMSK1_ITTXFEMSK_Msk (0x1U << USB_OTG_DOEPEACHMSK1_ITTXFEMSK_Pos) /*!< 0x00000010 */
  7379. #define USB_OTG_DOEPEACHMSK1_ITTXFEMSK USB_OTG_DOEPEACHMSK1_ITTXFEMSK_Msk /*!< IN token received when TxFIFO empty mask */
  7380. #define USB_OTG_DOEPEACHMSK1_INEPNMM_Pos (5U)
  7381. #define USB_OTG_DOEPEACHMSK1_INEPNMM_Msk (0x1U << USB_OTG_DOEPEACHMSK1_INEPNMM_Pos) /*!< 0x00000020 */
  7382. #define USB_OTG_DOEPEACHMSK1_INEPNMM USB_OTG_DOEPEACHMSK1_INEPNMM_Msk /*!< IN token received with EP mismatch mask */
  7383. #define USB_OTG_DOEPEACHMSK1_INEPNEM_Pos (6U)
  7384. #define USB_OTG_DOEPEACHMSK1_INEPNEM_Msk (0x1U << USB_OTG_DOEPEACHMSK1_INEPNEM_Pos) /*!< 0x00000040 */
  7385. #define USB_OTG_DOEPEACHMSK1_INEPNEM USB_OTG_DOEPEACHMSK1_INEPNEM_Msk /*!< IN endpoint NAK effective mask */
  7386. #define USB_OTG_DOEPEACHMSK1_TXFURM_Pos (8U)
  7387. #define USB_OTG_DOEPEACHMSK1_TXFURM_Msk (0x1U << USB_OTG_DOEPEACHMSK1_TXFURM_Pos) /*!< 0x00000100 */
  7388. #define USB_OTG_DOEPEACHMSK1_TXFURM USB_OTG_DOEPEACHMSK1_TXFURM_Msk /*!< OUT packet error mask */
  7389. #define USB_OTG_DOEPEACHMSK1_BIM_Pos (9U)
  7390. #define USB_OTG_DOEPEACHMSK1_BIM_Msk (0x1U << USB_OTG_DOEPEACHMSK1_BIM_Pos) /*!< 0x00000200 */
  7391. #define USB_OTG_DOEPEACHMSK1_BIM USB_OTG_DOEPEACHMSK1_BIM_Msk /*!< BNA interrupt mask */
  7392. #define USB_OTG_DOEPEACHMSK1_BERRM_Pos (12U)
  7393. #define USB_OTG_DOEPEACHMSK1_BERRM_Msk (0x1U << USB_OTG_DOEPEACHMSK1_BERRM_Pos) /*!< 0x00001000 */
  7394. #define USB_OTG_DOEPEACHMSK1_BERRM USB_OTG_DOEPEACHMSK1_BERRM_Msk /*!< Bubble error interrupt mask */
  7395. #define USB_OTG_DOEPEACHMSK1_NAKM_Pos (13U)
  7396. #define USB_OTG_DOEPEACHMSK1_NAKM_Msk (0x1U << USB_OTG_DOEPEACHMSK1_NAKM_Pos) /*!< 0x00002000 */
  7397. #define USB_OTG_DOEPEACHMSK1_NAKM USB_OTG_DOEPEACHMSK1_NAKM_Msk /*!< NAK interrupt mask */
  7398. #define USB_OTG_DOEPEACHMSK1_NYETM_Pos (14U)
  7399. #define USB_OTG_DOEPEACHMSK1_NYETM_Msk (0x1U << USB_OTG_DOEPEACHMSK1_NYETM_Pos) /*!< 0x00004000 */
  7400. #define USB_OTG_DOEPEACHMSK1_NYETM USB_OTG_DOEPEACHMSK1_NYETM_Msk /*!< NYET interrupt mask */
  7401. /******************** Bit definition for USB_OTG_HPTXFSIZ register ********************/
  7402. #define USB_OTG_HPTXFSIZ_PTXSA_Pos (0U)
  7403. #define USB_OTG_HPTXFSIZ_PTXSA_Msk (0xFFFFU << USB_OTG_HPTXFSIZ_PTXSA_Pos) /*!< 0x0000FFFF */
  7404. #define USB_OTG_HPTXFSIZ_PTXSA USB_OTG_HPTXFSIZ_PTXSA_Msk /*!< Host periodic TxFIFO start address */
  7405. #define USB_OTG_HPTXFSIZ_PTXFD_Pos (16U)
  7406. #define USB_OTG_HPTXFSIZ_PTXFD_Msk (0xFFFFU << USB_OTG_HPTXFSIZ_PTXFD_Pos) /*!< 0xFFFF0000 */
  7407. #define USB_OTG_HPTXFSIZ_PTXFD USB_OTG_HPTXFSIZ_PTXFD_Msk /*!< Host periodic TxFIFO depth */
  7408. /******************** Bit definition for USB_OTG_DIEPCTL register ********************/
  7409. #define USB_OTG_DIEPCTL_MPSIZ_Pos (0U)
  7410. #define USB_OTG_DIEPCTL_MPSIZ_Msk (0x7FFU << USB_OTG_DIEPCTL_MPSIZ_Pos) /*!< 0x000007FF */
  7411. #define USB_OTG_DIEPCTL_MPSIZ USB_OTG_DIEPCTL_MPSIZ_Msk /*!< Maximum packet size */
  7412. #define USB_OTG_DIEPCTL_USBAEP_Pos (15U)
  7413. #define USB_OTG_DIEPCTL_USBAEP_Msk (0x1U << USB_OTG_DIEPCTL_USBAEP_Pos) /*!< 0x00008000 */
  7414. #define USB_OTG_DIEPCTL_USBAEP USB_OTG_DIEPCTL_USBAEP_Msk /*!< USB active endpoint */
  7415. #define USB_OTG_DIEPCTL_EONUM_DPID_Pos (16U)
  7416. #define USB_OTG_DIEPCTL_EONUM_DPID_Msk (0x1U << USB_OTG_DIEPCTL_EONUM_DPID_Pos) /*!< 0x00010000 */
  7417. #define USB_OTG_DIEPCTL_EONUM_DPID USB_OTG_DIEPCTL_EONUM_DPID_Msk /*!< Even/odd frame */
  7418. #define USB_OTG_DIEPCTL_NAKSTS_Pos (17U)
  7419. #define USB_OTG_DIEPCTL_NAKSTS_Msk (0x1U << USB_OTG_DIEPCTL_NAKSTS_Pos) /*!< 0x00020000 */
  7420. #define USB_OTG_DIEPCTL_NAKSTS USB_OTG_DIEPCTL_NAKSTS_Msk /*!< NAK status */
  7421. #define USB_OTG_DIEPCTL_EPTYP_Pos (18U)
  7422. #define USB_OTG_DIEPCTL_EPTYP_Msk (0x3U << USB_OTG_DIEPCTL_EPTYP_Pos) /*!< 0x000C0000 */
  7423. #define USB_OTG_DIEPCTL_EPTYP USB_OTG_DIEPCTL_EPTYP_Msk /*!< Endpoint type */
  7424. #define USB_OTG_DIEPCTL_EPTYP_0 (0x1U << USB_OTG_DIEPCTL_EPTYP_Pos) /*!< 0x00040000 */
  7425. #define USB_OTG_DIEPCTL_EPTYP_1 (0x2U << USB_OTG_DIEPCTL_EPTYP_Pos) /*!< 0x00080000 */
  7426. #define USB_OTG_DIEPCTL_STALL_Pos (21U)
  7427. #define USB_OTG_DIEPCTL_STALL_Msk (0x1U << USB_OTG_DIEPCTL_STALL_Pos) /*!< 0x00200000 */
  7428. #define USB_OTG_DIEPCTL_STALL USB_OTG_DIEPCTL_STALL_Msk /*!< STALL handshake */
  7429. #define USB_OTG_DIEPCTL_TXFNUM_Pos (22U)
  7430. #define USB_OTG_DIEPCTL_TXFNUM_Msk (0xFU << USB_OTG_DIEPCTL_TXFNUM_Pos) /*!< 0x03C00000 */
  7431. #define USB_OTG_DIEPCTL_TXFNUM USB_OTG_DIEPCTL_TXFNUM_Msk /*!< TxFIFO number */
  7432. #define USB_OTG_DIEPCTL_TXFNUM_0 (0x1U << USB_OTG_DIEPCTL_TXFNUM_Pos) /*!< 0x00400000 */
  7433. #define USB_OTG_DIEPCTL_TXFNUM_1 (0x2U << USB_OTG_DIEPCTL_TXFNUM_Pos) /*!< 0x00800000 */
  7434. #define USB_OTG_DIEPCTL_TXFNUM_2 (0x4U << USB_OTG_DIEPCTL_TXFNUM_Pos) /*!< 0x01000000 */
  7435. #define USB_OTG_DIEPCTL_TXFNUM_3 (0x8U << USB_OTG_DIEPCTL_TXFNUM_Pos) /*!< 0x02000000 */
  7436. #define USB_OTG_DIEPCTL_CNAK_Pos (26U)
  7437. #define USB_OTG_DIEPCTL_CNAK_Msk (0x1U << USB_OTG_DIEPCTL_CNAK_Pos) /*!< 0x04000000 */
  7438. #define USB_OTG_DIEPCTL_CNAK USB_OTG_DIEPCTL_CNAK_Msk /*!< Clear NAK */
  7439. #define USB_OTG_DIEPCTL_SNAK_Pos (27U)
  7440. #define USB_OTG_DIEPCTL_SNAK_Msk (0x1U << USB_OTG_DIEPCTL_SNAK_Pos) /*!< 0x08000000 */
  7441. #define USB_OTG_DIEPCTL_SNAK USB_OTG_DIEPCTL_SNAK_Msk /*!< Set NAK */
  7442. #define USB_OTG_DIEPCTL_SD0PID_SEVNFRM_Pos (28U)
  7443. #define USB_OTG_DIEPCTL_SD0PID_SEVNFRM_Msk (0x1U << USB_OTG_DIEPCTL_SD0PID_SEVNFRM_Pos) /*!< 0x10000000 */
  7444. #define USB_OTG_DIEPCTL_SD0PID_SEVNFRM USB_OTG_DIEPCTL_SD0PID_SEVNFRM_Msk /*!< Set DATA0 PID */
  7445. #define USB_OTG_DIEPCTL_SODDFRM_Pos (29U)
  7446. #define USB_OTG_DIEPCTL_SODDFRM_Msk (0x1U << USB_OTG_DIEPCTL_SODDFRM_Pos) /*!< 0x20000000 */
  7447. #define USB_OTG_DIEPCTL_SODDFRM USB_OTG_DIEPCTL_SODDFRM_Msk /*!< Set odd frame */
  7448. #define USB_OTG_DIEPCTL_EPDIS_Pos (30U)
  7449. #define USB_OTG_DIEPCTL_EPDIS_Msk (0x1U << USB_OTG_DIEPCTL_EPDIS_Pos) /*!< 0x40000000 */
  7450. #define USB_OTG_DIEPCTL_EPDIS USB_OTG_DIEPCTL_EPDIS_Msk /*!< Endpoint disable */
  7451. #define USB_OTG_DIEPCTL_EPENA_Pos (31U)
  7452. #define USB_OTG_DIEPCTL_EPENA_Msk (0x1U << USB_OTG_DIEPCTL_EPENA_Pos) /*!< 0x80000000 */
  7453. #define USB_OTG_DIEPCTL_EPENA USB_OTG_DIEPCTL_EPENA_Msk /*!< Endpoint enable */
  7454. /******************** Bit definition for USB_OTG_HCCHAR register ********************/
  7455. #define USB_OTG_HCCHAR_MPSIZ_Pos (0U)
  7456. #define USB_OTG_HCCHAR_MPSIZ_Msk (0x7FFU << USB_OTG_HCCHAR_MPSIZ_Pos) /*!< 0x000007FF */
  7457. #define USB_OTG_HCCHAR_MPSIZ USB_OTG_HCCHAR_MPSIZ_Msk /*!< Maximum packet size */
  7458. #define USB_OTG_HCCHAR_EPNUM_Pos (11U)
  7459. #define USB_OTG_HCCHAR_EPNUM_Msk (0xFU << USB_OTG_HCCHAR_EPNUM_Pos) /*!< 0x00007800 */
  7460. #define USB_OTG_HCCHAR_EPNUM USB_OTG_HCCHAR_EPNUM_Msk /*!< Endpoint number */
  7461. #define USB_OTG_HCCHAR_EPNUM_0 (0x1U << USB_OTG_HCCHAR_EPNUM_Pos) /*!< 0x00000800 */
  7462. #define USB_OTG_HCCHAR_EPNUM_1 (0x2U << USB_OTG_HCCHAR_EPNUM_Pos) /*!< 0x00001000 */
  7463. #define USB_OTG_HCCHAR_EPNUM_2 (0x4U << USB_OTG_HCCHAR_EPNUM_Pos) /*!< 0x00002000 */
  7464. #define USB_OTG_HCCHAR_EPNUM_3 (0x8U << USB_OTG_HCCHAR_EPNUM_Pos) /*!< 0x00004000 */
  7465. #define USB_OTG_HCCHAR_EPDIR_Pos (15U)
  7466. #define USB_OTG_HCCHAR_EPDIR_Msk (0x1U << USB_OTG_HCCHAR_EPDIR_Pos) /*!< 0x00008000 */
  7467. #define USB_OTG_HCCHAR_EPDIR USB_OTG_HCCHAR_EPDIR_Msk /*!< Endpoint direction */
  7468. #define USB_OTG_HCCHAR_LSDEV_Pos (17U)
  7469. #define USB_OTG_HCCHAR_LSDEV_Msk (0x1U << USB_OTG_HCCHAR_LSDEV_Pos) /*!< 0x00020000 */
  7470. #define USB_OTG_HCCHAR_LSDEV USB_OTG_HCCHAR_LSDEV_Msk /*!< Low-speed device */
  7471. #define USB_OTG_HCCHAR_EPTYP_Pos (18U)
  7472. #define USB_OTG_HCCHAR_EPTYP_Msk (0x3U << USB_OTG_HCCHAR_EPTYP_Pos) /*!< 0x000C0000 */
  7473. #define USB_OTG_HCCHAR_EPTYP USB_OTG_HCCHAR_EPTYP_Msk /*!< Endpoint type */
  7474. #define USB_OTG_HCCHAR_EPTYP_0 (0x1U << USB_OTG_HCCHAR_EPTYP_Pos) /*!< 0x00040000 */
  7475. #define USB_OTG_HCCHAR_EPTYP_1 (0x2U << USB_OTG_HCCHAR_EPTYP_Pos) /*!< 0x00080000 */
  7476. #define USB_OTG_HCCHAR_MC_Pos (20U)
  7477. #define USB_OTG_HCCHAR_MC_Msk (0x3U << USB_OTG_HCCHAR_MC_Pos) /*!< 0x00300000 */
  7478. #define USB_OTG_HCCHAR_MC USB_OTG_HCCHAR_MC_Msk /*!< Multi Count (MC) / Error Count (EC) */
  7479. #define USB_OTG_HCCHAR_MC_0 (0x1U << USB_OTG_HCCHAR_MC_Pos) /*!< 0x00100000 */
  7480. #define USB_OTG_HCCHAR_MC_1 (0x2U << USB_OTG_HCCHAR_MC_Pos) /*!< 0x00200000 */
  7481. #define USB_OTG_HCCHAR_DAD_Pos (22U)
  7482. #define USB_OTG_HCCHAR_DAD_Msk (0x7FU << USB_OTG_HCCHAR_DAD_Pos) /*!< 0x1FC00000 */
  7483. #define USB_OTG_HCCHAR_DAD USB_OTG_HCCHAR_DAD_Msk /*!< Device address */
  7484. #define USB_OTG_HCCHAR_DAD_0 (0x01U << USB_OTG_HCCHAR_DAD_Pos) /*!< 0x00400000 */
  7485. #define USB_OTG_HCCHAR_DAD_1 (0x02U << USB_OTG_HCCHAR_DAD_Pos) /*!< 0x00800000 */
  7486. #define USB_OTG_HCCHAR_DAD_2 (0x04U << USB_OTG_HCCHAR_DAD_Pos) /*!< 0x01000000 */
  7487. #define USB_OTG_HCCHAR_DAD_3 (0x08U << USB_OTG_HCCHAR_DAD_Pos) /*!< 0x02000000 */
  7488. #define USB_OTG_HCCHAR_DAD_4 (0x10U << USB_OTG_HCCHAR_DAD_Pos) /*!< 0x04000000 */
  7489. #define USB_OTG_HCCHAR_DAD_5 (0x20U << USB_OTG_HCCHAR_DAD_Pos) /*!< 0x08000000 */
  7490. #define USB_OTG_HCCHAR_DAD_6 (0x40U << USB_OTG_HCCHAR_DAD_Pos) /*!< 0x10000000 */
  7491. #define USB_OTG_HCCHAR_ODDFRM_Pos (29U)
  7492. #define USB_OTG_HCCHAR_ODDFRM_Msk (0x1U << USB_OTG_HCCHAR_ODDFRM_Pos) /*!< 0x20000000 */
  7493. #define USB_OTG_HCCHAR_ODDFRM USB_OTG_HCCHAR_ODDFRM_Msk /*!< Odd frame */
  7494. #define USB_OTG_HCCHAR_CHDIS_Pos (30U)
  7495. #define USB_OTG_HCCHAR_CHDIS_Msk (0x1U << USB_OTG_HCCHAR_CHDIS_Pos) /*!< 0x40000000 */
  7496. #define USB_OTG_HCCHAR_CHDIS USB_OTG_HCCHAR_CHDIS_Msk /*!< Channel disable */
  7497. #define USB_OTG_HCCHAR_CHENA_Pos (31U)
  7498. #define USB_OTG_HCCHAR_CHENA_Msk (0x1U << USB_OTG_HCCHAR_CHENA_Pos) /*!< 0x80000000 */
  7499. #define USB_OTG_HCCHAR_CHENA USB_OTG_HCCHAR_CHENA_Msk /*!< Channel enable */
  7500. /******************** Bit definition for USB_OTG_HCSPLT register ********************/
  7501. #define USB_OTG_HCSPLT_PRTADDR_Pos (0U)
  7502. #define USB_OTG_HCSPLT_PRTADDR_Msk (0x7FU << USB_OTG_HCSPLT_PRTADDR_Pos) /*!< 0x0000007F */
  7503. #define USB_OTG_HCSPLT_PRTADDR USB_OTG_HCSPLT_PRTADDR_Msk /*!< Port address */
  7504. #define USB_OTG_HCSPLT_PRTADDR_0 (0x01U << USB_OTG_HCSPLT_PRTADDR_Pos) /*!< 0x00000001 */
  7505. #define USB_OTG_HCSPLT_PRTADDR_1 (0x02U << USB_OTG_HCSPLT_PRTADDR_Pos) /*!< 0x00000002 */
  7506. #define USB_OTG_HCSPLT_PRTADDR_2 (0x04U << USB_OTG_HCSPLT_PRTADDR_Pos) /*!< 0x00000004 */
  7507. #define USB_OTG_HCSPLT_PRTADDR_3 (0x08U << USB_OTG_HCSPLT_PRTADDR_Pos) /*!< 0x00000008 */
  7508. #define USB_OTG_HCSPLT_PRTADDR_4 (0x10U << USB_OTG_HCSPLT_PRTADDR_Pos) /*!< 0x00000010 */
  7509. #define USB_OTG_HCSPLT_PRTADDR_5 (0x20U << USB_OTG_HCSPLT_PRTADDR_Pos) /*!< 0x00000020 */
  7510. #define USB_OTG_HCSPLT_PRTADDR_6 (0x40U << USB_OTG_HCSPLT_PRTADDR_Pos) /*!< 0x00000040 */
  7511. #define USB_OTG_HCSPLT_HUBADDR_Pos (7U)
  7512. #define USB_OTG_HCSPLT_HUBADDR_Msk (0x7FU << USB_OTG_HCSPLT_HUBADDR_Pos) /*!< 0x00003F80 */
  7513. #define USB_OTG_HCSPLT_HUBADDR USB_OTG_HCSPLT_HUBADDR_Msk /*!< Hub address */
  7514. #define USB_OTG_HCSPLT_HUBADDR_0 (0x01U << USB_OTG_HCSPLT_HUBADDR_Pos) /*!< 0x00000080 */
  7515. #define USB_OTG_HCSPLT_HUBADDR_1 (0x02U << USB_OTG_HCSPLT_HUBADDR_Pos) /*!< 0x00000100 */
  7516. #define USB_OTG_HCSPLT_HUBADDR_2 (0x04U << USB_OTG_HCSPLT_HUBADDR_Pos) /*!< 0x00000200 */
  7517. #define USB_OTG_HCSPLT_HUBADDR_3 (0x08U << USB_OTG_HCSPLT_HUBADDR_Pos) /*!< 0x00000400 */
  7518. #define USB_OTG_HCSPLT_HUBADDR_4 (0x10U << USB_OTG_HCSPLT_HUBADDR_Pos) /*!< 0x00000800 */
  7519. #define USB_OTG_HCSPLT_HUBADDR_5 (0x20U << USB_OTG_HCSPLT_HUBADDR_Pos) /*!< 0x00001000 */
  7520. #define USB_OTG_HCSPLT_HUBADDR_6 (0x40U << USB_OTG_HCSPLT_HUBADDR_Pos) /*!< 0x00002000 */
  7521. #define USB_OTG_HCSPLT_XACTPOS_Pos (14U)
  7522. #define USB_OTG_HCSPLT_XACTPOS_Msk (0x3U << USB_OTG_HCSPLT_XACTPOS_Pos) /*!< 0x0000C000 */
  7523. #define USB_OTG_HCSPLT_XACTPOS USB_OTG_HCSPLT_XACTPOS_Msk /*!< XACTPOS */
  7524. #define USB_OTG_HCSPLT_XACTPOS_0 (0x1U << USB_OTG_HCSPLT_XACTPOS_Pos) /*!< 0x00004000 */
  7525. #define USB_OTG_HCSPLT_XACTPOS_1 (0x2U << USB_OTG_HCSPLT_XACTPOS_Pos) /*!< 0x00008000 */
  7526. #define USB_OTG_HCSPLT_COMPLSPLT_Pos (16U)
  7527. #define USB_OTG_HCSPLT_COMPLSPLT_Msk (0x1U << USB_OTG_HCSPLT_COMPLSPLT_Pos) /*!< 0x00010000 */
  7528. #define USB_OTG_HCSPLT_COMPLSPLT USB_OTG_HCSPLT_COMPLSPLT_Msk /*!< Do complete split */
  7529. #define USB_OTG_HCSPLT_SPLITEN_Pos (31U)
  7530. #define USB_OTG_HCSPLT_SPLITEN_Msk (0x1U << USB_OTG_HCSPLT_SPLITEN_Pos) /*!< 0x80000000 */
  7531. #define USB_OTG_HCSPLT_SPLITEN USB_OTG_HCSPLT_SPLITEN_Msk /*!< Split enable */
  7532. /******************** Bit definition for USB_OTG_HCINT register ********************/
  7533. #define USB_OTG_HCINT_XFRC_Pos (0U)
  7534. #define USB_OTG_HCINT_XFRC_Msk (0x1U << USB_OTG_HCINT_XFRC_Pos) /*!< 0x00000001 */
  7535. #define USB_OTG_HCINT_XFRC USB_OTG_HCINT_XFRC_Msk /*!< Transfer completed */
  7536. #define USB_OTG_HCINT_CHH_Pos (1U)
  7537. #define USB_OTG_HCINT_CHH_Msk (0x1U << USB_OTG_HCINT_CHH_Pos) /*!< 0x00000002 */
  7538. #define USB_OTG_HCINT_CHH USB_OTG_HCINT_CHH_Msk /*!< Channel halted */
  7539. #define USB_OTG_HCINT_AHBERR_Pos (2U)
  7540. #define USB_OTG_HCINT_AHBERR_Msk (0x1U << USB_OTG_HCINT_AHBERR_Pos) /*!< 0x00000004 */
  7541. #define USB_OTG_HCINT_AHBERR USB_OTG_HCINT_AHBERR_Msk /*!< AHB error */
  7542. #define USB_OTG_HCINT_STALL_Pos (3U)
  7543. #define USB_OTG_HCINT_STALL_Msk (0x1U << USB_OTG_HCINT_STALL_Pos) /*!< 0x00000008 */
  7544. #define USB_OTG_HCINT_STALL USB_OTG_HCINT_STALL_Msk /*!< STALL response received interrupt */
  7545. #define USB_OTG_HCINT_NAK_Pos (4U)
  7546. #define USB_OTG_HCINT_NAK_Msk (0x1U << USB_OTG_HCINT_NAK_Pos) /*!< 0x00000010 */
  7547. #define USB_OTG_HCINT_NAK USB_OTG_HCINT_NAK_Msk /*!< NAK response received interrupt */
  7548. #define USB_OTG_HCINT_ACK_Pos (5U)
  7549. #define USB_OTG_HCINT_ACK_Msk (0x1U << USB_OTG_HCINT_ACK_Pos) /*!< 0x00000020 */
  7550. #define USB_OTG_HCINT_ACK USB_OTG_HCINT_ACK_Msk /*!< ACK response received/transmitted interrupt */
  7551. #define USB_OTG_HCINT_NYET_Pos (6U)
  7552. #define USB_OTG_HCINT_NYET_Msk (0x1U << USB_OTG_HCINT_NYET_Pos) /*!< 0x00000040 */
  7553. #define USB_OTG_HCINT_NYET USB_OTG_HCINT_NYET_Msk /*!< Response received interrupt */
  7554. #define USB_OTG_HCINT_TXERR_Pos (7U)
  7555. #define USB_OTG_HCINT_TXERR_Msk (0x1U << USB_OTG_HCINT_TXERR_Pos) /*!< 0x00000080 */
  7556. #define USB_OTG_HCINT_TXERR USB_OTG_HCINT_TXERR_Msk /*!< Transaction error */
  7557. #define USB_OTG_HCINT_BBERR_Pos (8U)
  7558. #define USB_OTG_HCINT_BBERR_Msk (0x1U << USB_OTG_HCINT_BBERR_Pos) /*!< 0x00000100 */
  7559. #define USB_OTG_HCINT_BBERR USB_OTG_HCINT_BBERR_Msk /*!< Babble error */
  7560. #define USB_OTG_HCINT_FRMOR_Pos (9U)
  7561. #define USB_OTG_HCINT_FRMOR_Msk (0x1U << USB_OTG_HCINT_FRMOR_Pos) /*!< 0x00000200 */
  7562. #define USB_OTG_HCINT_FRMOR USB_OTG_HCINT_FRMOR_Msk /*!< Frame overrun */
  7563. #define USB_OTG_HCINT_DTERR_Pos (10U)
  7564. #define USB_OTG_HCINT_DTERR_Msk (0x1U << USB_OTG_HCINT_DTERR_Pos) /*!< 0x00000400 */
  7565. #define USB_OTG_HCINT_DTERR USB_OTG_HCINT_DTERR_Msk /*!< Data toggle error */
  7566. /******************** Bit definition for USB_OTG_DIEPINT register ********************/
  7567. #define USB_OTG_DIEPINT_XFRC_Pos (0U)
  7568. #define USB_OTG_DIEPINT_XFRC_Msk (0x1U << USB_OTG_DIEPINT_XFRC_Pos) /*!< 0x00000001 */
  7569. #define USB_OTG_DIEPINT_XFRC USB_OTG_DIEPINT_XFRC_Msk /*!< Transfer completed interrupt */
  7570. #define USB_OTG_DIEPINT_EPDISD_Pos (1U)
  7571. #define USB_OTG_DIEPINT_EPDISD_Msk (0x1U << USB_OTG_DIEPINT_EPDISD_Pos) /*!< 0x00000002 */
  7572. #define USB_OTG_DIEPINT_EPDISD USB_OTG_DIEPINT_EPDISD_Msk /*!< Endpoint disabled interrupt */
  7573. #define USB_OTG_DIEPINT_TOC_Pos (3U)
  7574. #define USB_OTG_DIEPINT_TOC_Msk (0x1U << USB_OTG_DIEPINT_TOC_Pos) /*!< 0x00000008 */
  7575. #define USB_OTG_DIEPINT_TOC USB_OTG_DIEPINT_TOC_Msk /*!< Timeout condition */
  7576. #define USB_OTG_DIEPINT_ITTXFE_Pos (4U)
  7577. #define USB_OTG_DIEPINT_ITTXFE_Msk (0x1U << USB_OTG_DIEPINT_ITTXFE_Pos) /*!< 0x00000010 */
  7578. #define USB_OTG_DIEPINT_ITTXFE USB_OTG_DIEPINT_ITTXFE_Msk /*!< IN token received when TxFIFO is empty */
  7579. #define USB_OTG_DIEPINT_INEPNE_Pos (6U)
  7580. #define USB_OTG_DIEPINT_INEPNE_Msk (0x1U << USB_OTG_DIEPINT_INEPNE_Pos) /*!< 0x00000040 */
  7581. #define USB_OTG_DIEPINT_INEPNE USB_OTG_DIEPINT_INEPNE_Msk /*!< IN endpoint NAK effective */
  7582. #define USB_OTG_DIEPINT_TXFE_Pos (7U)
  7583. #define USB_OTG_DIEPINT_TXFE_Msk (0x1U << USB_OTG_DIEPINT_TXFE_Pos) /*!< 0x00000080 */
  7584. #define USB_OTG_DIEPINT_TXFE USB_OTG_DIEPINT_TXFE_Msk /*!< Transmit FIFO empty */
  7585. #define USB_OTG_DIEPINT_TXFIFOUDRN_Pos (8U)
  7586. #define USB_OTG_DIEPINT_TXFIFOUDRN_Msk (0x1U << USB_OTG_DIEPINT_TXFIFOUDRN_Pos) /*!< 0x00000100 */
  7587. #define USB_OTG_DIEPINT_TXFIFOUDRN USB_OTG_DIEPINT_TXFIFOUDRN_Msk /*!< Transmit Fifo Underrun */
  7588. #define USB_OTG_DIEPINT_BNA_Pos (9U)
  7589. #define USB_OTG_DIEPINT_BNA_Msk (0x1U << USB_OTG_DIEPINT_BNA_Pos) /*!< 0x00000200 */
  7590. #define USB_OTG_DIEPINT_BNA USB_OTG_DIEPINT_BNA_Msk /*!< Buffer not available interrupt */
  7591. #define USB_OTG_DIEPINT_PKTDRPSTS_Pos (11U)
  7592. #define USB_OTG_DIEPINT_PKTDRPSTS_Msk (0x1U << USB_OTG_DIEPINT_PKTDRPSTS_Pos) /*!< 0x00000800 */
  7593. #define USB_OTG_DIEPINT_PKTDRPSTS USB_OTG_DIEPINT_PKTDRPSTS_Msk /*!< Packet dropped status */
  7594. #define USB_OTG_DIEPINT_BERR_Pos (12U)
  7595. #define USB_OTG_DIEPINT_BERR_Msk (0x1U << USB_OTG_DIEPINT_BERR_Pos) /*!< 0x00001000 */
  7596. #define USB_OTG_DIEPINT_BERR USB_OTG_DIEPINT_BERR_Msk /*!< Babble error interrupt */
  7597. #define USB_OTG_DIEPINT_NAK_Pos (13U)
  7598. #define USB_OTG_DIEPINT_NAK_Msk (0x1U << USB_OTG_DIEPINT_NAK_Pos) /*!< 0x00002000 */
  7599. #define USB_OTG_DIEPINT_NAK USB_OTG_DIEPINT_NAK_Msk /*!< NAK interrupt */
  7600. /******************** Bit definition forUSB_OTG_HCINTMSK register ********************/
  7601. #define USB_OTG_HCINTMSK_XFRCM_Pos (0U)
  7602. #define USB_OTG_HCINTMSK_XFRCM_Msk (0x1U << USB_OTG_HCINTMSK_XFRCM_Pos) /*!< 0x00000001 */
  7603. #define USB_OTG_HCINTMSK_XFRCM USB_OTG_HCINTMSK_XFRCM_Msk /*!< Transfer completed mask */
  7604. #define USB_OTG_HCINTMSK_CHHM_Pos (1U)
  7605. #define USB_OTG_HCINTMSK_CHHM_Msk (0x1U << USB_OTG_HCINTMSK_CHHM_Pos) /*!< 0x00000002 */
  7606. #define USB_OTG_HCINTMSK_CHHM USB_OTG_HCINTMSK_CHHM_Msk /*!< Channel halted mask */
  7607. #define USB_OTG_HCINTMSK_AHBERR_Pos (2U)
  7608. #define USB_OTG_HCINTMSK_AHBERR_Msk (0x1U << USB_OTG_HCINTMSK_AHBERR_Pos) /*!< 0x00000004 */
  7609. #define USB_OTG_HCINTMSK_AHBERR USB_OTG_HCINTMSK_AHBERR_Msk /*!< AHB error */
  7610. #define USB_OTG_HCINTMSK_STALLM_Pos (3U)
  7611. #define USB_OTG_HCINTMSK_STALLM_Msk (0x1U << USB_OTG_HCINTMSK_STALLM_Pos) /*!< 0x00000008 */
  7612. #define USB_OTG_HCINTMSK_STALLM USB_OTG_HCINTMSK_STALLM_Msk /*!< STALL response received interrupt mask */
  7613. #define USB_OTG_HCINTMSK_NAKM_Pos (4U)
  7614. #define USB_OTG_HCINTMSK_NAKM_Msk (0x1U << USB_OTG_HCINTMSK_NAKM_Pos) /*!< 0x00000010 */
  7615. #define USB_OTG_HCINTMSK_NAKM USB_OTG_HCINTMSK_NAKM_Msk /*!< NAK response received interrupt mask */
  7616. #define USB_OTG_HCINTMSK_ACKM_Pos (5U)
  7617. #define USB_OTG_HCINTMSK_ACKM_Msk (0x1U << USB_OTG_HCINTMSK_ACKM_Pos) /*!< 0x00000020 */
  7618. #define USB_OTG_HCINTMSK_ACKM USB_OTG_HCINTMSK_ACKM_Msk /*!< ACK response received/transmitted interrupt mask */
  7619. #define USB_OTG_HCINTMSK_NYET_Pos (6U)
  7620. #define USB_OTG_HCINTMSK_NYET_Msk (0x1U << USB_OTG_HCINTMSK_NYET_Pos) /*!< 0x00000040 */
  7621. #define USB_OTG_HCINTMSK_NYET USB_OTG_HCINTMSK_NYET_Msk /*!< response received interrupt mask */
  7622. #define USB_OTG_HCINTMSK_TXERRM_Pos (7U)
  7623. #define USB_OTG_HCINTMSK_TXERRM_Msk (0x1U << USB_OTG_HCINTMSK_TXERRM_Pos) /*!< 0x00000080 */
  7624. #define USB_OTG_HCINTMSK_TXERRM USB_OTG_HCINTMSK_TXERRM_Msk /*!< Transaction error mask */
  7625. #define USB_OTG_HCINTMSK_BBERRM_Pos (8U)
  7626. #define USB_OTG_HCINTMSK_BBERRM_Msk (0x1U << USB_OTG_HCINTMSK_BBERRM_Pos) /*!< 0x00000100 */
  7627. #define USB_OTG_HCINTMSK_BBERRM USB_OTG_HCINTMSK_BBERRM_Msk /*!< Babble error mask */
  7628. #define USB_OTG_HCINTMSK_FRMORM_Pos (9U)
  7629. #define USB_OTG_HCINTMSK_FRMORM_Msk (0x1U << USB_OTG_HCINTMSK_FRMORM_Pos) /*!< 0x00000200 */
  7630. #define USB_OTG_HCINTMSK_FRMORM USB_OTG_HCINTMSK_FRMORM_Msk /*!< Frame overrun mask */
  7631. #define USB_OTG_HCINTMSK_DTERRM_Pos (10U)
  7632. #define USB_OTG_HCINTMSK_DTERRM_Msk (0x1U << USB_OTG_HCINTMSK_DTERRM_Pos) /*!< 0x00000400 */
  7633. #define USB_OTG_HCINTMSK_DTERRM USB_OTG_HCINTMSK_DTERRM_Msk /*!< Data toggle error mask */
  7634. /******************** Bit definition for USB_OTG_DIEPTSIZ register ********************/
  7635. #define USB_OTG_DIEPTSIZ_XFRSIZ_Pos (0U)
  7636. #define USB_OTG_DIEPTSIZ_XFRSIZ_Msk (0x7FFFFU << USB_OTG_DIEPTSIZ_XFRSIZ_Pos) /*!< 0x0007FFFF */
  7637. #define USB_OTG_DIEPTSIZ_XFRSIZ USB_OTG_DIEPTSIZ_XFRSIZ_Msk /*!< Transfer size */
  7638. #define USB_OTG_DIEPTSIZ_PKTCNT_Pos (19U)
  7639. #define USB_OTG_DIEPTSIZ_PKTCNT_Msk (0x3FFU << USB_OTG_DIEPTSIZ_PKTCNT_Pos) /*!< 0x1FF80000 */
  7640. #define USB_OTG_DIEPTSIZ_PKTCNT USB_OTG_DIEPTSIZ_PKTCNT_Msk /*!< Packet count */
  7641. #define USB_OTG_DIEPTSIZ_MULCNT_Pos (29U)
  7642. #define USB_OTG_DIEPTSIZ_MULCNT_Msk (0x3U << USB_OTG_DIEPTSIZ_MULCNT_Pos) /*!< 0x60000000 */
  7643. #define USB_OTG_DIEPTSIZ_MULCNT USB_OTG_DIEPTSIZ_MULCNT_Msk /*!< Packet count */
  7644. /******************** Bit definition for USB_OTG_HCTSIZ register ********************/
  7645. #define USB_OTG_HCTSIZ_XFRSIZ_Pos (0U)
  7646. #define USB_OTG_HCTSIZ_XFRSIZ_Msk (0x7FFFFU << USB_OTG_HCTSIZ_XFRSIZ_Pos) /*!< 0x0007FFFF */
  7647. #define USB_OTG_HCTSIZ_XFRSIZ USB_OTG_HCTSIZ_XFRSIZ_Msk /*!< Transfer size */
  7648. #define USB_OTG_HCTSIZ_PKTCNT_Pos (19U)
  7649. #define USB_OTG_HCTSIZ_PKTCNT_Msk (0x3FFU << USB_OTG_HCTSIZ_PKTCNT_Pos) /*!< 0x1FF80000 */
  7650. #define USB_OTG_HCTSIZ_PKTCNT USB_OTG_HCTSIZ_PKTCNT_Msk /*!< Packet count */
  7651. #define USB_OTG_HCTSIZ_DOPING_Pos (31U)
  7652. #define USB_OTG_HCTSIZ_DOPING_Msk (0x1U << USB_OTG_HCTSIZ_DOPING_Pos) /*!< 0x80000000 */
  7653. #define USB_OTG_HCTSIZ_DOPING USB_OTG_HCTSIZ_DOPING_Msk /*!< Do PING */
  7654. #define USB_OTG_HCTSIZ_DPID_Pos (29U)
  7655. #define USB_OTG_HCTSIZ_DPID_Msk (0x3U << USB_OTG_HCTSIZ_DPID_Pos) /*!< 0x60000000 */
  7656. #define USB_OTG_HCTSIZ_DPID USB_OTG_HCTSIZ_DPID_Msk /*!< Data PID */
  7657. #define USB_OTG_HCTSIZ_DPID_0 (0x1U << USB_OTG_HCTSIZ_DPID_Pos) /*!< 0x20000000 */
  7658. #define USB_OTG_HCTSIZ_DPID_1 (0x2U << USB_OTG_HCTSIZ_DPID_Pos) /*!< 0x40000000 */
  7659. /******************** Bit definition for USB_OTG_DIEPDMA register ********************/
  7660. #define USB_OTG_DIEPDMA_DMAADDR_Pos (0U)
  7661. #define USB_OTG_DIEPDMA_DMAADDR_Msk (0xFFFFFFFFU << USB_OTG_DIEPDMA_DMAADDR_Pos) /*!< 0xFFFFFFFF */
  7662. #define USB_OTG_DIEPDMA_DMAADDR USB_OTG_DIEPDMA_DMAADDR_Msk /*!< DMA address */
  7663. /******************** Bit definition for USB_OTG_HCDMA register ********************/
  7664. #define USB_OTG_HCDMA_DMAADDR_Pos (0U)
  7665. #define USB_OTG_HCDMA_DMAADDR_Msk (0xFFFFFFFFU << USB_OTG_HCDMA_DMAADDR_Pos) /*!< 0xFFFFFFFF */
  7666. #define USB_OTG_HCDMA_DMAADDR USB_OTG_HCDMA_DMAADDR_Msk /*!< DMA address */
  7667. /******************** Bit definition for USB_OTG_DTXFSTS register ********************/
  7668. #define USB_OTG_DTXFSTS_INEPTFSAV_Pos (0U)
  7669. #define USB_OTG_DTXFSTS_INEPTFSAV_Msk (0xFFFFU << USB_OTG_DTXFSTS_INEPTFSAV_Pos) /*!< 0x0000FFFF */
  7670. #define USB_OTG_DTXFSTS_INEPTFSAV USB_OTG_DTXFSTS_INEPTFSAV_Msk /*!< IN endpoint TxFIFO space available */
  7671. /******************** Bit definition for USB_OTG_DIEPTXF register ********************/
  7672. #define USB_OTG_DIEPTXF_INEPTXSA_Pos (0U)
  7673. #define USB_OTG_DIEPTXF_INEPTXSA_Msk (0xFFFFU << USB_OTG_DIEPTXF_INEPTXSA_Pos) /*!< 0x0000FFFF */
  7674. #define USB_OTG_DIEPTXF_INEPTXSA USB_OTG_DIEPTXF_INEPTXSA_Msk /*!< IN endpoint FIFOx transmit RAM start address */
  7675. #define USB_OTG_DIEPTXF_INEPTXFD_Pos (16U)
  7676. #define USB_OTG_DIEPTXF_INEPTXFD_Msk (0xFFFFU << USB_OTG_DIEPTXF_INEPTXFD_Pos) /*!< 0xFFFF0000 */
  7677. #define USB_OTG_DIEPTXF_INEPTXFD USB_OTG_DIEPTXF_INEPTXFD_Msk /*!< IN endpoint TxFIFO depth */
  7678. /******************** Bit definition for USB_OTG_DOEPCTL register ********************/
  7679. #define USB_OTG_DOEPCTL_MPSIZ_Pos (0U)
  7680. #define USB_OTG_DOEPCTL_MPSIZ_Msk (0x7FFU << USB_OTG_DOEPCTL_MPSIZ_Pos) /*!< 0x000007FF */
  7681. #define USB_OTG_DOEPCTL_MPSIZ USB_OTG_DOEPCTL_MPSIZ_Msk /*!< Maximum packet size */ /*!<Bit 1 */
  7682. #define USB_OTG_DOEPCTL_USBAEP_Pos (15U)
  7683. #define USB_OTG_DOEPCTL_USBAEP_Msk (0x1U << USB_OTG_DOEPCTL_USBAEP_Pos) /*!< 0x00008000 */
  7684. #define USB_OTG_DOEPCTL_USBAEP USB_OTG_DOEPCTL_USBAEP_Msk /*!< USB active endpoint */
  7685. #define USB_OTG_DOEPCTL_NAKSTS_Pos (17U)
  7686. #define USB_OTG_DOEPCTL_NAKSTS_Msk (0x1U << USB_OTG_DOEPCTL_NAKSTS_Pos) /*!< 0x00020000 */
  7687. #define USB_OTG_DOEPCTL_NAKSTS USB_OTG_DOEPCTL_NAKSTS_Msk /*!< NAK status */
  7688. #define USB_OTG_DOEPCTL_SD0PID_SEVNFRM_Pos (28U)
  7689. #define USB_OTG_DOEPCTL_SD0PID_SEVNFRM_Msk (0x1U << USB_OTG_DOEPCTL_SD0PID_SEVNFRM_Pos) /*!< 0x10000000 */
  7690. #define USB_OTG_DOEPCTL_SD0PID_SEVNFRM USB_OTG_DOEPCTL_SD0PID_SEVNFRM_Msk /*!< Set DATA0 PID */
  7691. #define USB_OTG_DOEPCTL_SODDFRM_Pos (29U)
  7692. #define USB_OTG_DOEPCTL_SODDFRM_Msk (0x1U << USB_OTG_DOEPCTL_SODDFRM_Pos) /*!< 0x20000000 */
  7693. #define USB_OTG_DOEPCTL_SODDFRM USB_OTG_DOEPCTL_SODDFRM_Msk /*!< Set odd frame */
  7694. #define USB_OTG_DOEPCTL_EPTYP_Pos (18U)
  7695. #define USB_OTG_DOEPCTL_EPTYP_Msk (0x3U << USB_OTG_DOEPCTL_EPTYP_Pos) /*!< 0x000C0000 */
  7696. #define USB_OTG_DOEPCTL_EPTYP USB_OTG_DOEPCTL_EPTYP_Msk /*!< Endpoint type */
  7697. #define USB_OTG_DOEPCTL_EPTYP_0 (0x1U << USB_OTG_DOEPCTL_EPTYP_Pos) /*!< 0x00040000 */
  7698. #define USB_OTG_DOEPCTL_EPTYP_1 (0x2U << USB_OTG_DOEPCTL_EPTYP_Pos) /*!< 0x00080000 */
  7699. #define USB_OTG_DOEPCTL_SNPM_Pos (20U)
  7700. #define USB_OTG_DOEPCTL_SNPM_Msk (0x1U << USB_OTG_DOEPCTL_SNPM_Pos) /*!< 0x00100000 */
  7701. #define USB_OTG_DOEPCTL_SNPM USB_OTG_DOEPCTL_SNPM_Msk /*!< Snoop mode */
  7702. #define USB_OTG_DOEPCTL_STALL_Pos (21U)
  7703. #define USB_OTG_DOEPCTL_STALL_Msk (0x1U << USB_OTG_DOEPCTL_STALL_Pos) /*!< 0x00200000 */
  7704. #define USB_OTG_DOEPCTL_STALL USB_OTG_DOEPCTL_STALL_Msk /*!< STALL handshake */
  7705. #define USB_OTG_DOEPCTL_CNAK_Pos (26U)
  7706. #define USB_OTG_DOEPCTL_CNAK_Msk (0x1U << USB_OTG_DOEPCTL_CNAK_Pos) /*!< 0x04000000 */
  7707. #define USB_OTG_DOEPCTL_CNAK USB_OTG_DOEPCTL_CNAK_Msk /*!< Clear NAK */
  7708. #define USB_OTG_DOEPCTL_SNAK_Pos (27U)
  7709. #define USB_OTG_DOEPCTL_SNAK_Msk (0x1U << USB_OTG_DOEPCTL_SNAK_Pos) /*!< 0x08000000 */
  7710. #define USB_OTG_DOEPCTL_SNAK USB_OTG_DOEPCTL_SNAK_Msk /*!< Set NAK */
  7711. #define USB_OTG_DOEPCTL_EPDIS_Pos (30U)
  7712. #define USB_OTG_DOEPCTL_EPDIS_Msk (0x1U << USB_OTG_DOEPCTL_EPDIS_Pos) /*!< 0x40000000 */
  7713. #define USB_OTG_DOEPCTL_EPDIS USB_OTG_DOEPCTL_EPDIS_Msk /*!< Endpoint disable */
  7714. #define USB_OTG_DOEPCTL_EPENA_Pos (31U)
  7715. #define USB_OTG_DOEPCTL_EPENA_Msk (0x1U << USB_OTG_DOEPCTL_EPENA_Pos) /*!< 0x80000000 */
  7716. #define USB_OTG_DOEPCTL_EPENA USB_OTG_DOEPCTL_EPENA_Msk /*!< Endpoint enable */
  7717. /******************** Bit definition for USB_OTG_DOEPINT register ********************/
  7718. #define USB_OTG_DOEPINT_XFRC_Pos (0U)
  7719. #define USB_OTG_DOEPINT_XFRC_Msk (0x1U << USB_OTG_DOEPINT_XFRC_Pos) /*!< 0x00000001 */
  7720. #define USB_OTG_DOEPINT_XFRC USB_OTG_DOEPINT_XFRC_Msk /*!< Transfer completed interrupt */
  7721. #define USB_OTG_DOEPINT_EPDISD_Pos (1U)
  7722. #define USB_OTG_DOEPINT_EPDISD_Msk (0x1U << USB_OTG_DOEPINT_EPDISD_Pos) /*!< 0x00000002 */
  7723. #define USB_OTG_DOEPINT_EPDISD USB_OTG_DOEPINT_EPDISD_Msk /*!< Endpoint disabled interrupt */
  7724. #define USB_OTG_DOEPINT_STUP_Pos (3U)
  7725. #define USB_OTG_DOEPINT_STUP_Msk (0x1U << USB_OTG_DOEPINT_STUP_Pos) /*!< 0x00000008 */
  7726. #define USB_OTG_DOEPINT_STUP USB_OTG_DOEPINT_STUP_Msk /*!< SETUP phase done */
  7727. #define USB_OTG_DOEPINT_OTEPDIS_Pos (4U)
  7728. #define USB_OTG_DOEPINT_OTEPDIS_Msk (0x1U << USB_OTG_DOEPINT_OTEPDIS_Pos) /*!< 0x00000010 */
  7729. #define USB_OTG_DOEPINT_OTEPDIS USB_OTG_DOEPINT_OTEPDIS_Msk /*!< OUT token received when endpoint disabled */
  7730. #define USB_OTG_DOEPINT_B2BSTUP_Pos (6U)
  7731. #define USB_OTG_DOEPINT_B2BSTUP_Msk (0x1U << USB_OTG_DOEPINT_B2BSTUP_Pos) /*!< 0x00000040 */
  7732. #define USB_OTG_DOEPINT_B2BSTUP USB_OTG_DOEPINT_B2BSTUP_Msk /*!< Back-to-back SETUP packets received */
  7733. #define USB_OTG_DOEPINT_NYET_Pos (14U)
  7734. #define USB_OTG_DOEPINT_NYET_Msk (0x1U << USB_OTG_DOEPINT_NYET_Pos) /*!< 0x00004000 */
  7735. #define USB_OTG_DOEPINT_NYET USB_OTG_DOEPINT_NYET_Msk /*!< NYET interrupt */
  7736. /******************** Bit definition for USB_OTG_DOEPTSIZ register ********************/
  7737. #define USB_OTG_DOEPTSIZ_XFRSIZ_Pos (0U)
  7738. #define USB_OTG_DOEPTSIZ_XFRSIZ_Msk (0x7FFFFU << USB_OTG_DOEPTSIZ_XFRSIZ_Pos) /*!< 0x0007FFFF */
  7739. #define USB_OTG_DOEPTSIZ_XFRSIZ USB_OTG_DOEPTSIZ_XFRSIZ_Msk /*!< Transfer size */
  7740. #define USB_OTG_DOEPTSIZ_PKTCNT_Pos (19U)
  7741. #define USB_OTG_DOEPTSIZ_PKTCNT_Msk (0x3FFU << USB_OTG_DOEPTSIZ_PKTCNT_Pos) /*!< 0x1FF80000 */
  7742. #define USB_OTG_DOEPTSIZ_PKTCNT USB_OTG_DOEPTSIZ_PKTCNT_Msk /*!< Packet count */
  7743. #define USB_OTG_DOEPTSIZ_STUPCNT_Pos (29U)
  7744. #define USB_OTG_DOEPTSIZ_STUPCNT_Msk (0x3U << USB_OTG_DOEPTSIZ_STUPCNT_Pos) /*!< 0x60000000 */
  7745. #define USB_OTG_DOEPTSIZ_STUPCNT USB_OTG_DOEPTSIZ_STUPCNT_Msk /*!< SETUP packet count */
  7746. #define USB_OTG_DOEPTSIZ_STUPCNT_0 (0x1U << USB_OTG_DOEPTSIZ_STUPCNT_Pos) /*!< 0x20000000 */
  7747. #define USB_OTG_DOEPTSIZ_STUPCNT_1 (0x2U << USB_OTG_DOEPTSIZ_STUPCNT_Pos) /*!< 0x40000000 */
  7748. /******************** Bit definition for PCGCCTL register ********************/
  7749. #define USB_OTG_PCGCCTL_STOPCLK_Pos (0U)
  7750. #define USB_OTG_PCGCCTL_STOPCLK_Msk (0x1U << USB_OTG_PCGCCTL_STOPCLK_Pos) /*!< 0x00000001 */
  7751. #define USB_OTG_PCGCCTL_STOPCLK USB_OTG_PCGCCTL_STOPCLK_Msk /*!< SETUP packet count */
  7752. #define USB_OTG_PCGCCTL_GATECLK_Pos (1U)
  7753. #define USB_OTG_PCGCCTL_GATECLK_Msk (0x1U << USB_OTG_PCGCCTL_GATECLK_Pos) /*!< 0x00000002 */
  7754. #define USB_OTG_PCGCCTL_GATECLK USB_OTG_PCGCCTL_GATECLK_Msk /*!<Bit 0 */
  7755. #define USB_OTG_PCGCCTL_PHYSUSP_Pos (4U)
  7756. #define USB_OTG_PCGCCTL_PHYSUSP_Msk (0x1U << USB_OTG_PCGCCTL_PHYSUSP_Pos) /*!< 0x00000010 */
  7757. #define USB_OTG_PCGCCTL_PHYSUSP USB_OTG_PCGCCTL_PHYSUSP_Msk /*!<Bit 1 */
  7758. /**
  7759. * @}
  7760. */
  7761. /**
  7762. * @}
  7763. */
  7764. /** @addtogroup Exported_macros
  7765. * @{
  7766. */
  7767. /******************************* ADC Instances ********************************/
  7768. #define IS_ADC_ALL_INSTANCE(INSTANCE) ((INSTANCE) == ADC1)
  7769. #define IS_ADC_COMMON_INSTANCE(INSTANCE) ((INSTANCE) == ADC1_COMMON)
  7770. /******************************* CRC Instances ********************************/
  7771. #define IS_CRC_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CRC)
  7772. /******************************** DMA Instances *******************************/
  7773. #define IS_DMA_STREAM_ALL_INSTANCE(INSTANCE) (((INSTANCE) == DMA1_Stream0) || \
  7774. ((INSTANCE) == DMA1_Stream1) || \
  7775. ((INSTANCE) == DMA1_Stream2) || \
  7776. ((INSTANCE) == DMA1_Stream3) || \
  7777. ((INSTANCE) == DMA1_Stream4) || \
  7778. ((INSTANCE) == DMA1_Stream5) || \
  7779. ((INSTANCE) == DMA1_Stream6) || \
  7780. ((INSTANCE) == DMA1_Stream7) || \
  7781. ((INSTANCE) == DMA2_Stream0) || \
  7782. ((INSTANCE) == DMA2_Stream1) || \
  7783. ((INSTANCE) == DMA2_Stream2) || \
  7784. ((INSTANCE) == DMA2_Stream3) || \
  7785. ((INSTANCE) == DMA2_Stream4) || \
  7786. ((INSTANCE) == DMA2_Stream5) || \
  7787. ((INSTANCE) == DMA2_Stream6) || \
  7788. ((INSTANCE) == DMA2_Stream7))
  7789. /******************************* GPIO Instances *******************************/
  7790. #define IS_GPIO_ALL_INSTANCE(INSTANCE) (((INSTANCE) == GPIOA) || \
  7791. ((INSTANCE) == GPIOB) || \
  7792. ((INSTANCE) == GPIOC) || \
  7793. ((INSTANCE) == GPIOD) || \
  7794. ((INSTANCE) == GPIOE) || \
  7795. ((INSTANCE) == GPIOH))
  7796. /******************************** I2C Instances *******************************/
  7797. #define IS_I2C_ALL_INSTANCE(INSTANCE) (((INSTANCE) == I2C1) || \
  7798. ((INSTANCE) == I2C2) || \
  7799. ((INSTANCE) == I2C3))
  7800. /******************************* SMBUS Instances ******************************/
  7801. #define IS_SMBUS_ALL_INSTANCE IS_I2C_ALL_INSTANCE
  7802. /******************************** I2S Instances *******************************/
  7803. #define IS_I2S_ALL_INSTANCE(INSTANCE) (((INSTANCE) == SPI1) || \
  7804. ((INSTANCE) == SPI2) || \
  7805. ((INSTANCE) == SPI3) || \
  7806. ((INSTANCE) == SPI4) || \
  7807. ((INSTANCE) == SPI5))
  7808. /*************************** I2S Extended Instances ***************************/
  7809. #define IS_I2S_EXT_ALL_INSTANCE(INSTANCE) (((INSTANCE) == I2S2ext)|| \
  7810. ((INSTANCE) == I2S3ext))
  7811. /* Legacy Defines */
  7812. #define IS_I2S_ALL_INSTANCE_EXT IS_I2S_EXT_ALL_INSTANCE
  7813. /****************************** RTC Instances *********************************/
  7814. #define IS_RTC_ALL_INSTANCE(INSTANCE) ((INSTANCE) == RTC)
  7815. /******************************** SPI Instances *******************************/
  7816. #define IS_SPI_ALL_INSTANCE(INSTANCE) (((INSTANCE) == SPI1) || \
  7817. ((INSTANCE) == SPI2) || \
  7818. ((INSTANCE) == SPI3) || \
  7819. ((INSTANCE) == SPI4) || \
  7820. ((INSTANCE) == SPI5))
  7821. /****************** TIM Instances : All supported instances *******************/
  7822. #define IS_TIM_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7823. ((INSTANCE) == TIM2) || \
  7824. ((INSTANCE) == TIM3) || \
  7825. ((INSTANCE) == TIM4) || \
  7826. ((INSTANCE) == TIM5) || \
  7827. ((INSTANCE) == TIM9) || \
  7828. ((INSTANCE) == TIM10) || \
  7829. ((INSTANCE) == TIM11))
  7830. /************* TIM Instances : at least 1 capture/compare channel *************/
  7831. #define IS_TIM_CC1_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7832. ((INSTANCE) == TIM2) || \
  7833. ((INSTANCE) == TIM3) || \
  7834. ((INSTANCE) == TIM4) || \
  7835. ((INSTANCE) == TIM5) || \
  7836. ((INSTANCE) == TIM9) || \
  7837. ((INSTANCE) == TIM10) || \
  7838. ((INSTANCE) == TIM11))
  7839. /************ TIM Instances : at least 2 capture/compare channels *************/
  7840. #define IS_TIM_CC2_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7841. ((INSTANCE) == TIM2) || \
  7842. ((INSTANCE) == TIM3) || \
  7843. ((INSTANCE) == TIM4) || \
  7844. ((INSTANCE) == TIM5) || \
  7845. ((INSTANCE) == TIM9))
  7846. /************ TIM Instances : at least 3 capture/compare channels *************/
  7847. #define IS_TIM_CC3_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7848. ((INSTANCE) == TIM2) || \
  7849. ((INSTANCE) == TIM3) || \
  7850. ((INSTANCE) == TIM4) || \
  7851. ((INSTANCE) == TIM5))
  7852. /************ TIM Instances : at least 4 capture/compare channels *************/
  7853. #define IS_TIM_CC4_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7854. ((INSTANCE) == TIM2) || \
  7855. ((INSTANCE) == TIM3) || \
  7856. ((INSTANCE) == TIM4) || \
  7857. ((INSTANCE) == TIM5))
  7858. /******************** TIM Instances : Advanced-control timers *****************/
  7859. #define IS_TIM_ADVANCED_INSTANCE(INSTANCE) ((INSTANCE) == TIM1)
  7860. /******************* TIM Instances : Timer input XOR function *****************/
  7861. #define IS_TIM_XOR_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7862. ((INSTANCE) == TIM2) || \
  7863. ((INSTANCE) == TIM3) || \
  7864. ((INSTANCE) == TIM4) || \
  7865. ((INSTANCE) == TIM5))
  7866. /****************** TIM Instances : DMA requests generation (UDE) *************/
  7867. #define IS_TIM_DMA_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7868. ((INSTANCE) == TIM2) || \
  7869. ((INSTANCE) == TIM3) || \
  7870. ((INSTANCE) == TIM4) || \
  7871. ((INSTANCE) == TIM5))
  7872. /************ TIM Instances : DMA requests generation (CCxDE) *****************/
  7873. #define IS_TIM_DMA_CC_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7874. ((INSTANCE) == TIM2) || \
  7875. ((INSTANCE) == TIM3) || \
  7876. ((INSTANCE) == TIM4) || \
  7877. ((INSTANCE) == TIM5))
  7878. /************ TIM Instances : DMA requests generation (COMDE) *****************/
  7879. #define IS_TIM_CCDMA_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7880. ((INSTANCE) == TIM2) || \
  7881. ((INSTANCE) == TIM3) || \
  7882. ((INSTANCE) == TIM4) || \
  7883. ((INSTANCE) == TIM5))
  7884. /******************** TIM Instances : DMA burst feature ***********************/
  7885. #define IS_TIM_DMABURST_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7886. ((INSTANCE) == TIM2) || \
  7887. ((INSTANCE) == TIM3) || \
  7888. ((INSTANCE) == TIM4) || \
  7889. ((INSTANCE) == TIM5))
  7890. /****** TIM Instances : master mode available (TIMx_CR2.MMS available )********/
  7891. #define IS_TIM_MASTER_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7892. ((INSTANCE) == TIM2) || \
  7893. ((INSTANCE) == TIM3) || \
  7894. ((INSTANCE) == TIM4) || \
  7895. ((INSTANCE) == TIM5))
  7896. /*********** TIM Instances : Slave mode available (TIMx_SMCR available )*******/
  7897. #define IS_TIM_SLAVE_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7898. ((INSTANCE) == TIM2) || \
  7899. ((INSTANCE) == TIM3) || \
  7900. ((INSTANCE) == TIM4) || \
  7901. ((INSTANCE) == TIM5) || \
  7902. ((INSTANCE) == TIM9))
  7903. /********************** TIM Instances : 32 bit Counter ************************/
  7904. #define IS_TIM_32B_COUNTER_INSTANCE(INSTANCE)(((INSTANCE) == TIM2) || \
  7905. ((INSTANCE) == TIM5))
  7906. /***************** TIM Instances : external trigger input availabe ************/
  7907. #define IS_TIM_ETR_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7908. ((INSTANCE) == TIM2) || \
  7909. ((INSTANCE) == TIM3) || \
  7910. ((INSTANCE) == TIM4) || \
  7911. ((INSTANCE) == TIM5))
  7912. /****************** TIM Instances : remapping capability **********************/
  7913. #define IS_TIM_REMAP_INSTANCE(INSTANCE) (((INSTANCE) == TIM2) || \
  7914. ((INSTANCE) == TIM5) || \
  7915. ((INSTANCE) == TIM11))
  7916. /******************* TIM Instances : output(s) available **********************/
  7917. #define IS_TIM_CCX_INSTANCE(INSTANCE, CHANNEL) \
  7918. ((((INSTANCE) == TIM1) && \
  7919. (((CHANNEL) == TIM_CHANNEL_1) || \
  7920. ((CHANNEL) == TIM_CHANNEL_2) || \
  7921. ((CHANNEL) == TIM_CHANNEL_3) || \
  7922. ((CHANNEL) == TIM_CHANNEL_4))) \
  7923. || \
  7924. (((INSTANCE) == TIM2) && \
  7925. (((CHANNEL) == TIM_CHANNEL_1) || \
  7926. ((CHANNEL) == TIM_CHANNEL_2) || \
  7927. ((CHANNEL) == TIM_CHANNEL_3) || \
  7928. ((CHANNEL) == TIM_CHANNEL_4))) \
  7929. || \
  7930. (((INSTANCE) == TIM3) && \
  7931. (((CHANNEL) == TIM_CHANNEL_1) || \
  7932. ((CHANNEL) == TIM_CHANNEL_2) || \
  7933. ((CHANNEL) == TIM_CHANNEL_3) || \
  7934. ((CHANNEL) == TIM_CHANNEL_4))) \
  7935. || \
  7936. (((INSTANCE) == TIM4) && \
  7937. (((CHANNEL) == TIM_CHANNEL_1) || \
  7938. ((CHANNEL) == TIM_CHANNEL_2) || \
  7939. ((CHANNEL) == TIM_CHANNEL_3) || \
  7940. ((CHANNEL) == TIM_CHANNEL_4))) \
  7941. || \
  7942. (((INSTANCE) == TIM5) && \
  7943. (((CHANNEL) == TIM_CHANNEL_1) || \
  7944. ((CHANNEL) == TIM_CHANNEL_2) || \
  7945. ((CHANNEL) == TIM_CHANNEL_3) || \
  7946. ((CHANNEL) == TIM_CHANNEL_4))) \
  7947. || \
  7948. (((INSTANCE) == TIM9) && \
  7949. (((CHANNEL) == TIM_CHANNEL_1) || \
  7950. ((CHANNEL) == TIM_CHANNEL_2))) \
  7951. || \
  7952. (((INSTANCE) == TIM10) && \
  7953. (((CHANNEL) == TIM_CHANNEL_1))) \
  7954. || \
  7955. (((INSTANCE) == TIM11) && \
  7956. (((CHANNEL) == TIM_CHANNEL_1))))
  7957. /************ TIM Instances : complementary output(s) available ***************/
  7958. #define IS_TIM_CCXN_INSTANCE(INSTANCE, CHANNEL) \
  7959. ((((INSTANCE) == TIM1) && \
  7960. (((CHANNEL) == TIM_CHANNEL_1) || \
  7961. ((CHANNEL) == TIM_CHANNEL_2) || \
  7962. ((CHANNEL) == TIM_CHANNEL_3))))
  7963. /****************** TIM Instances : supporting counting mode selection ********/
  7964. #define IS_TIM_COUNTER_MODE_SELECT_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7965. ((INSTANCE) == TIM2) || \
  7966. ((INSTANCE) == TIM3) || \
  7967. ((INSTANCE) == TIM4) || \
  7968. ((INSTANCE) == TIM5))
  7969. /****************** TIM Instances : supporting clock division *****************/
  7970. #define IS_TIM_CLOCK_DIVISION_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7971. ((INSTANCE) == TIM2) || \
  7972. ((INSTANCE) == TIM3) || \
  7973. ((INSTANCE) == TIM4) || \
  7974. ((INSTANCE) == TIM5) || \
  7975. ((INSTANCE) == TIM9) || \
  7976. ((INSTANCE) == TIM10) || \
  7977. ((INSTANCE) == TIM11))
  7978. /****************** TIM Instances : supporting commutation event generation ***/
  7979. #define IS_TIM_COMMUTATION_EVENT_INSTANCE(INSTANCE) ((INSTANCE) == TIM1)
  7980. /****************** TIM Instances : supporting OCxREF clear *******************/
  7981. #define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7982. ((INSTANCE) == TIM2) || \
  7983. ((INSTANCE) == TIM3) || \
  7984. ((INSTANCE) == TIM4) || \
  7985. ((INSTANCE) == TIM5))
  7986. /****** TIM Instances : supporting external clock mode 1 for ETRF input *******/
  7987. #define IS_TIM_CLOCKSOURCE_ETRMODE1_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  7988. ((INSTANCE) == TIM2) || \
  7989. ((INSTANCE) == TIM3) || \
  7990. ((INSTANCE) == TIM4) || \
  7991. ((INSTANCE) == TIM5) || \
  7992. ((INSTANCE) == TIM9))
  7993. /****** TIM Instances : supporting external clock mode 2 for ETRF input *******/
  7994. #define IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(INSTANCE) (((INSTANCE) == TIM1)|| \
  7995. ((INSTANCE) == TIM2) || \
  7996. ((INSTANCE) == TIM3) || \
  7997. ((INSTANCE) == TIM4) || \
  7998. ((INSTANCE) == TIM5))
  7999. /****************** TIM Instances : supporting repetition counter *************/
  8000. #define IS_TIM_REPETITION_COUNTER_INSTANCE(INSTANCE) (((INSTANCE) == TIM1))
  8001. /****************** TIM Instances : supporting encoder interface **************/
  8002. #define IS_TIM_ENCODER_INTERFACE_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  8003. ((INSTANCE) == TIM2) || \
  8004. ((INSTANCE) == TIM3) || \
  8005. ((INSTANCE) == TIM4) || \
  8006. ((INSTANCE) == TIM5) || \
  8007. ((INSTANCE) == TIM9))
  8008. /****************** TIM Instances : supporting Hall sensor interface **********/
  8009. #define IS_TIM_HALL_SENSOR_INTERFACE_INSTANCE(INSTANCE) (((INSTANCE) == TIM1) || \
  8010. ((INSTANCE) == TIM2) || \
  8011. ((INSTANCE) == TIM3) || \
  8012. ((INSTANCE) == TIM4) || \
  8013. ((INSTANCE) == TIM5))
  8014. /****************** TIM Instances : supporting the break function *************/
  8015. #define IS_TIM_BREAK_INSTANCE(INSTANCE) (((INSTANCE) == TIM1))
  8016. /******************** USART Instances : Synchronous mode **********************/
  8017. #define IS_USART_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  8018. ((INSTANCE) == USART2) || \
  8019. ((INSTANCE) == USART6))
  8020. /******************** UART Instances : Half-Duplex mode **********************/
  8021. #define IS_UART_HALFDUPLEX_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  8022. ((INSTANCE) == USART2) || \
  8023. ((INSTANCE) == USART6))
  8024. /* Legacy defines */
  8025. #define IS_UART_INSTANCE IS_UART_HALFDUPLEX_INSTANCE
  8026. /****************** UART Instances : Hardware Flow control ********************/
  8027. #define IS_UART_HWFLOW_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  8028. ((INSTANCE) == USART2) || \
  8029. ((INSTANCE) == USART6))
  8030. /******************** UART Instances : LIN mode **********************/
  8031. #define IS_UART_LIN_INSTANCE IS_UART_HALFDUPLEX_INSTANCE
  8032. /********************* UART Instances : Smart card mode ***********************/
  8033. #define IS_SMARTCARD_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  8034. ((INSTANCE) == USART2) || \
  8035. ((INSTANCE) == USART6))
  8036. /*********************** UART Instances : IRDA mode ***************************/
  8037. #define IS_IRDA_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  8038. ((INSTANCE) == USART2) || \
  8039. ((INSTANCE) == USART6))
  8040. /*********************** PCD Instances ****************************************/
  8041. #define IS_PCD_ALL_INSTANCE(INSTANCE) (((INSTANCE) == USB_OTG_FS))
  8042. /*********************** HCD Instances ****************************************/
  8043. #define IS_HCD_ALL_INSTANCE(INSTANCE) (((INSTANCE) == USB_OTG_FS))
  8044. /****************************** SDIO Instances ********************************/
  8045. #define IS_SDIO_ALL_INSTANCE(INSTANCE) ((INSTANCE) == SDIO)
  8046. /****************************** IWDG Instances ********************************/
  8047. #define IS_IWDG_ALL_INSTANCE(INSTANCE) ((INSTANCE) == IWDG)
  8048. /****************************** WWDG Instances ********************************/
  8049. #define IS_WWDG_ALL_INSTANCE(INSTANCE) ((INSTANCE) == WWDG)
  8050. /****************************** USB Exported Constants ************************/
  8051. #define USB_OTG_FS_HOST_MAX_CHANNEL_NBR 8U
  8052. #define USB_OTG_FS_MAX_IN_ENDPOINTS 4U /* Including EP0 */
  8053. #define USB_OTG_FS_MAX_OUT_ENDPOINTS 4U /* Including EP0 */
  8054. #define USB_OTG_FS_TOTAL_FIFO_SIZE 1280U /* in Bytes */
  8055. /*
  8056. * @brief Specific devices reset values definitions
  8057. */
  8058. #define RCC_PLLCFGR_RST_VALUE 0x24003010U
  8059. #define RCC_PLLI2SCFGR_RST_VALUE 0x20003010U
  8060. #define RCC_MAX_FREQUENCY 100000000U /*!< Max frequency of family in Hz*/
  8061. #define RCC_MAX_FREQUENCY_SCALE1 RCC_MAX_FREQUENCY /*!< Maximum frequency for system clock at power scale1, in Hz */
  8062. #define RCC_MAX_FREQUENCY_SCALE2 84000000U /*!< Maximum frequency for system clock at power scale2, in Hz */
  8063. #define RCC_MAX_FREQUENCY_SCALE3 64000000U /*!< Maximum frequency for system clock at power scale3, in Hz */
  8064. #define RCC_PLLVCO_OUTPUT_MIN 100000000U /*!< Frequency min for PLLVCO output, in Hz */
  8065. #define RCC_PLLVCO_INPUT_MIN 950000U /*!< Frequency min for PLLVCO input, in Hz */
  8066. #define RCC_PLLVCO_INPUT_MAX 2100000U /*!< Frequency max for PLLVCO input, in Hz */
  8067. #define RCC_PLLVCO_OUTPUT_MAX 432000000U /*!< Frequency max for PLLVCO output, in Hz */
  8068. #define RCC_PLLN_MIN_VALUE 50U
  8069. #define RCC_PLLN_MAX_VALUE 432U
  8070. #define FLASH_SCALE1_LATENCY1_FREQ 30000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 1 */
  8071. #define FLASH_SCALE1_LATENCY2_FREQ 64000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 1 */
  8072. #define FLASH_SCALE1_LATENCY3_FREQ 90000000U /*!< HCLK frequency to set FLASH latency 3 in power scale 1 */
  8073. #define FLASH_SCALE2_LATENCY1_FREQ 30000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 2 */
  8074. #define FLASH_SCALE2_LATENCY2_FREQ 64000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 2 */
  8075. #define FLASH_SCALE3_LATENCY1_FREQ 30000000U /*!< HCLK frequency to set FLASH latency 1 in power scale 3 */
  8076. #define FLASH_SCALE3_LATENCY2_FREQ 64000000U /*!< HCLK frequency to set FLASH latency 2 in power scale 3 */
  8077. /**
  8078. * @}
  8079. */
  8080. /**
  8081. * @}
  8082. */
  8083. /**
  8084. * @}
  8085. */
  8086. #ifdef __cplusplus
  8087. }
  8088. #endif /* __cplusplus */
  8089. #endif /* __STM32F411xE_H */
  8090. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/