stm32f091xc.h 465 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101
  1. /**
  2. ******************************************************************************
  3. * @file stm32f091xc.h
  4. * @author MCD Application Team
  5. * @version V2.2.3
  6. * @date 29-January-2016
  7. * @brief CMSIS Cortex-M0 Device Peripheral Access Layer Header File.
  8. * This file contains all the peripheral register's definitions, bits
  9. * definitions and memory mapping for STM32F0xx devices.
  10. *
  11. * This file contains:
  12. * - Data structures and the address mapping for all peripherals
  13. * - Peripheral's registers declarations and bits definition
  14. * - Macros to access peripheral’s registers hardware
  15. *
  16. ******************************************************************************
  17. * @attention
  18. *
  19. * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
  20. *
  21. * Redistribution and use in source and binary forms, with or without modification,
  22. * are permitted provided that the following conditions are met:
  23. * 1. Redistributions of source code must retain the above copyright notice,
  24. * this list of conditions and the following disclaimer.
  25. * 2. Redistributions in binary form must reproduce the above copyright notice,
  26. * this list of conditions and the following disclaimer in the documentation
  27. * and/or other materials provided with the distribution.
  28. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  29. * may be used to endorse or promote products derived from this software
  30. * without specific prior written permission.
  31. *
  32. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  33. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  34. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  35. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  36. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  37. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  38. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  39. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  40. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  41. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  42. *
  43. ******************************************************************************
  44. */
  45. /** @addtogroup CMSIS
  46. * @{
  47. */
  48. /** @addtogroup stm32f091xc
  49. * @{
  50. */
  51. #ifndef __STM32F091xC_H
  52. #define __STM32F091xC_H
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif /* __cplusplus */
  56. /** @addtogroup Configuration_section_for_CMSIS
  57. * @{
  58. */
  59. /**
  60. * @brief Configuration of the Cortex-M0 Processor and Core Peripherals
  61. */
  62. #define __CM0_REV 0 /*!< Core Revision r0p0 */
  63. #define __MPU_PRESENT 0 /*!< STM32F0xx do not provide MPU */
  64. #define __NVIC_PRIO_BITS 2 /*!< STM32F0xx uses 2 Bits for the Priority Levels */
  65. #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
  66. /**
  67. * @}
  68. */
  69. /** @addtogroup Peripheral_interrupt_number_definition
  70. * @{
  71. */
  72. /**
  73. * @brief STM32F0xx Interrupt Number Definition, according to the selected device
  74. * in @ref Library_configuration_section
  75. */
  76. /*!< Interrupt Number Definition */
  77. typedef enum
  78. {
  79. /****** Cortex-M0 Processor Exceptions Numbers **************************************************************/
  80. NonMaskableInt_IRQn = -14, /*!< 2 Non Maskable Interrupt */
  81. HardFault_IRQn = -13, /*!< 3 Cortex-M0 Hard Fault Interrupt */
  82. SVC_IRQn = -5, /*!< 11 Cortex-M0 SV Call Interrupt */
  83. PendSV_IRQn = -2, /*!< 14 Cortex-M0 Pend SV Interrupt */
  84. SysTick_IRQn = -1, /*!< 15 Cortex-M0 System Tick Interrupt */
  85. /****** STM32F0 specific Interrupt Numbers ******************************************************************/
  86. WWDG_IRQn = 0, /*!< Window WatchDog Interrupt */
  87. PVD_VDDIO2_IRQn = 1, /*!< PVD & VDDIO2 Interrupt through EXTI Lines 16 and 31 */
  88. RTC_IRQn = 2, /*!< RTC Interrupt through EXTI Lines 17, 19 and 20 */
  89. FLASH_IRQn = 3, /*!< FLASH global Interrupt */
  90. RCC_CRS_IRQn = 4, /*!< RCC & CRS global Interrupt */
  91. EXTI0_1_IRQn = 5, /*!< EXTI Line 0 and 1 Interrupt */
  92. EXTI2_3_IRQn = 6, /*!< EXTI Line 2 and 3 Interrupt */
  93. EXTI4_15_IRQn = 7, /*!< EXTI Line 4 to 15 Interrupt */
  94. TSC_IRQn = 8, /*!< Touch Sensing Controller Interrupts */
  95. DMA1_Ch1_IRQn = 9, /*!< DMA1 Channel 1 Interrupt */
  96. DMA1_Ch2_3_DMA2_Ch1_2_IRQn = 10, /*!< DMA1 Channel 2 and 3 & DMA2 Channel 1 and 2 Interrupts */
  97. DMA1_Ch4_7_DMA2_Ch3_5_IRQn = 11, /*!< DMA1 Channel 4 to 7 & DMA2 Channel 3 to 5 Interrupt */
  98. ADC1_COMP_IRQn = 12, /*!< ADC1 and COMP interrupts (ADC interrupt combined with EXTI Lines 21 and 22 */
  99. TIM1_BRK_UP_TRG_COM_IRQn = 13, /*!< TIM1 Break, Update, Trigger and Commutation Interrupt */
  100. TIM1_CC_IRQn = 14, /*!< TIM1 Capture Compare Interrupt */
  101. TIM2_IRQn = 15, /*!< TIM2 global Interrupt */
  102. TIM3_IRQn = 16, /*!< TIM3 global Interrupt */
  103. TIM6_DAC_IRQn = 17, /*!< TIM6 global and DAC channel underrun error Interrupt */
  104. TIM7_IRQn = 18, /*!< TIM7 global Interrupt */
  105. TIM14_IRQn = 19, /*!< TIM14 global Interrupt */
  106. TIM15_IRQn = 20, /*!< TIM15 global Interrupt */
  107. TIM16_IRQn = 21, /*!< TIM16 global Interrupt */
  108. TIM17_IRQn = 22, /*!< TIM17 global Interrupt */
  109. I2C1_IRQn = 23, /*!< I2C1 Event Interrupt & EXTI Line23 Interrupt (I2C1 wakeup) */
  110. I2C2_IRQn = 24, /*!< I2C2 Event Interrupt */
  111. SPI1_IRQn = 25, /*!< SPI1 global Interrupt */
  112. SPI2_IRQn = 26, /*!< SPI2 global Interrupt */
  113. USART1_IRQn = 27, /*!< USART1 global Interrupt & EXTI Line25 Interrupt (USART1 wakeup) */
  114. USART2_IRQn = 28, /*!< USART2 global Interrupt & EXTI Line26 Interrupt (USART2 wakeup) */
  115. USART3_8_IRQn = 29, /*!< USART3 to USART8 global Interrupt */
  116. CEC_CAN_IRQn = 30 /*!< CEC and CAN global Interrupts & EXTI Line27 Interrupt */
  117. } IRQn_Type;
  118. /**
  119. * @}
  120. */
  121. #include "core_cm0.h" /* Cortex-M0 processor and core peripherals */
  122. #include "system_stm32f0xx.h" /* STM32F0xx System Header */
  123. #include <stdint.h>
  124. /** @addtogroup Peripheral_registers_structures
  125. * @{
  126. */
  127. /**
  128. * @brief Analog to Digital Converter
  129. */
  130. typedef struct
  131. {
  132. __IO uint32_t ISR; /*!< ADC interrupt and status register, Address offset: 0x00 */
  133. __IO uint32_t IER; /*!< ADC interrupt enable register, Address offset: 0x04 */
  134. __IO uint32_t CR; /*!< ADC control register, Address offset: 0x08 */
  135. __IO uint32_t CFGR1; /*!< ADC configuration register 1, Address offset: 0x0C */
  136. __IO uint32_t CFGR2; /*!< ADC configuration register 2, Address offset: 0x10 */
  137. __IO uint32_t SMPR; /*!< ADC sampling time register, Address offset: 0x14 */
  138. uint32_t RESERVED1; /*!< Reserved, 0x18 */
  139. uint32_t RESERVED2; /*!< Reserved, 0x1C */
  140. __IO uint32_t TR; /*!< ADC analog watchdog 1 threshold register, Address offset: 0x20 */
  141. uint32_t RESERVED3; /*!< Reserved, 0x24 */
  142. __IO uint32_t CHSELR; /*!< ADC group regular sequencer register, Address offset: 0x28 */
  143. uint32_t RESERVED4[5]; /*!< Reserved, 0x2C */
  144. __IO uint32_t DR; /*!< ADC group regular data register, Address offset: 0x40 */
  145. } ADC_TypeDef;
  146. typedef struct
  147. {
  148. __IO uint32_t CCR; /*!< ADC common configuration register, Address offset: ADC1 base address + 0x308 */
  149. } ADC_Common_TypeDef;
  150. /**
  151. * @brief Controller Area Network TxMailBox
  152. */
  153. typedef struct
  154. {
  155. __IO uint32_t TIR; /*!< CAN TX mailbox identifier register */
  156. __IO uint32_t TDTR; /*!< CAN mailbox data length control and time stamp register */
  157. __IO uint32_t TDLR; /*!< CAN mailbox data low register */
  158. __IO uint32_t TDHR; /*!< CAN mailbox data high register */
  159. }CAN_TxMailBox_TypeDef;
  160. /**
  161. * @brief Controller Area Network FIFOMailBox
  162. */
  163. typedef struct
  164. {
  165. __IO uint32_t RIR; /*!< CAN receive FIFO mailbox identifier register */
  166. __IO uint32_t RDTR; /*!< CAN receive FIFO mailbox data length control and time stamp register */
  167. __IO uint32_t RDLR; /*!< CAN receive FIFO mailbox data low register */
  168. __IO uint32_t RDHR; /*!< CAN receive FIFO mailbox data high register */
  169. }CAN_FIFOMailBox_TypeDef;
  170. /**
  171. * @brief Controller Area Network FilterRegister
  172. */
  173. typedef struct
  174. {
  175. __IO uint32_t FR1; /*!< CAN Filter bank register 1 */
  176. __IO uint32_t FR2; /*!< CAN Filter bank register 1 */
  177. }CAN_FilterRegister_TypeDef;
  178. /**
  179. * @brief Controller Area Network
  180. */
  181. typedef struct
  182. {
  183. __IO uint32_t MCR; /*!< CAN master control register, Address offset: 0x00 */
  184. __IO uint32_t MSR; /*!< CAN master status register, Address offset: 0x04 */
  185. __IO uint32_t TSR; /*!< CAN transmit status register, Address offset: 0x08 */
  186. __IO uint32_t RF0R; /*!< CAN receive FIFO 0 register, Address offset: 0x0C */
  187. __IO uint32_t RF1R; /*!< CAN receive FIFO 1 register, Address offset: 0x10 */
  188. __IO uint32_t IER; /*!< CAN interrupt enable register, Address offset: 0x14 */
  189. __IO uint32_t ESR; /*!< CAN error status register, Address offset: 0x18 */
  190. __IO uint32_t BTR; /*!< CAN bit timing register, Address offset: 0x1C */
  191. uint32_t RESERVED0[88]; /*!< Reserved, 0x020 - 0x17F */
  192. CAN_TxMailBox_TypeDef sTxMailBox[3]; /*!< CAN Tx MailBox, Address offset: 0x180 - 0x1AC */
  193. CAN_FIFOMailBox_TypeDef sFIFOMailBox[2]; /*!< CAN FIFO MailBox, Address offset: 0x1B0 - 0x1CC */
  194. uint32_t RESERVED1[12]; /*!< Reserved, 0x1D0 - 0x1FF */
  195. __IO uint32_t FMR; /*!< CAN filter master register, Address offset: 0x200 */
  196. __IO uint32_t FM1R; /*!< CAN filter mode register, Address offset: 0x204 */
  197. uint32_t RESERVED2; /*!< Reserved, 0x208 */
  198. __IO uint32_t FS1R; /*!< CAN filter scale register, Address offset: 0x20C */
  199. uint32_t RESERVED3; /*!< Reserved, 0x210 */
  200. __IO uint32_t FFA1R; /*!< CAN filter FIFO assignment register, Address offset: 0x214 */
  201. uint32_t RESERVED4; /*!< Reserved, 0x218 */
  202. __IO uint32_t FA1R; /*!< CAN filter activation register, Address offset: 0x21C */
  203. uint32_t RESERVED5[8]; /*!< Reserved, 0x220-0x23F */
  204. CAN_FilterRegister_TypeDef sFilterRegister[28]; /*!< CAN Filter Register, Address offset: 0x240-0x31C */
  205. }CAN_TypeDef;
  206. /**
  207. * @brief HDMI-CEC
  208. */
  209. typedef struct
  210. {
  211. __IO uint32_t CR; /*!< CEC control register, Address offset:0x00 */
  212. __IO uint32_t CFGR; /*!< CEC configuration register, Address offset:0x04 */
  213. __IO uint32_t TXDR; /*!< CEC Tx data register , Address offset:0x08 */
  214. __IO uint32_t RXDR; /*!< CEC Rx Data Register, Address offset:0x0C */
  215. __IO uint32_t ISR; /*!< CEC Interrupt and Status Register, Address offset:0x10 */
  216. __IO uint32_t IER; /*!< CEC interrupt enable register, Address offset:0x14 */
  217. }CEC_TypeDef;
  218. /**
  219. * @brief Comparator
  220. */
  221. typedef struct
  222. {
  223. __IO uint16_t CSR; /*!< COMP control and status register, Address offset: 0x00 */
  224. } COMP_TypeDef;
  225. typedef struct
  226. {
  227. __IO uint32_t CSR; /*!< COMP control and status register, used for bits common to several COMP instances, Address offset: 0x00 */
  228. } COMP_Common_TypeDef;
  229. /* Legacy defines */
  230. typedef struct
  231. {
  232. __IO uint32_t CSR; /*!< Kept for legacy purpose. Use structure 'COMP_Common_TypeDef'. */
  233. }COMP1_2_TypeDef;
  234. /**
  235. * @brief CRC calculation unit
  236. */
  237. typedef struct
  238. {
  239. __IO uint32_t DR; /*!< CRC Data register, Address offset: 0x00 */
  240. __IO uint8_t IDR; /*!< CRC Independent data register, Address offset: 0x04 */
  241. uint8_t RESERVED0; /*!< Reserved, 0x05 */
  242. uint16_t RESERVED1; /*!< Reserved, 0x06 */
  243. __IO uint32_t CR; /*!< CRC Control register, Address offset: 0x08 */
  244. uint32_t RESERVED2; /*!< Reserved, 0x0C */
  245. __IO uint32_t INIT; /*!< Initial CRC value register, Address offset: 0x10 */
  246. __IO uint32_t POL; /*!< CRC polynomial register, Address offset: 0x14 */
  247. } CRC_TypeDef;
  248. /**
  249. * @brief Clock Recovery System
  250. */
  251. typedef struct
  252. {
  253. __IO uint32_t CR; /*!< CRS ccontrol register, Address offset: 0x00 */
  254. __IO uint32_t CFGR; /*!< CRS configuration register, Address offset: 0x04 */
  255. __IO uint32_t ISR; /*!< CRS interrupt and status register, Address offset: 0x08 */
  256. __IO uint32_t ICR; /*!< CRS interrupt flag clear register, Address offset: 0x0C */
  257. }CRS_TypeDef;
  258. /**
  259. * @brief Digital to Analog Converter
  260. */
  261. typedef struct
  262. {
  263. __IO uint32_t CR; /*!< DAC control register, Address offset: 0x00 */
  264. __IO uint32_t SWTRIGR; /*!< DAC software trigger register, Address offset: 0x04 */
  265. __IO uint32_t DHR12R1; /*!< DAC channel1 12-bit right-aligned data holding register, Address offset: 0x08 */
  266. __IO uint32_t DHR12L1; /*!< DAC channel1 12-bit left aligned data holding register, Address offset: 0x0C */
  267. __IO uint32_t DHR8R1; /*!< DAC channel1 8-bit right aligned data holding register, Address offset: 0x10 */
  268. __IO uint32_t DHR12R2; /*!< DAC channel2 12-bit right aligned data holding register, Address offset: 0x14 */
  269. __IO uint32_t DHR12L2; /*!< DAC channel2 12-bit left aligned data holding register, Address offset: 0x18 */
  270. __IO uint32_t DHR8R2; /*!< DAC channel2 8-bit right-aligned data holding register, Address offset: 0x1C */
  271. __IO uint32_t DHR12RD; /*!< Dual DAC 12-bit right-aligned data holding register, Address offset: 0x20 */
  272. __IO uint32_t DHR12LD; /*!< DUAL DAC 12-bit left aligned data holding register, Address offset: 0x24 */
  273. __IO uint32_t DHR8RD; /*!< DUAL DAC 8-bit right aligned data holding register, Address offset: 0x28 */
  274. __IO uint32_t DOR1; /*!< DAC channel1 data output register, Address offset: 0x2C */
  275. __IO uint32_t DOR2; /*!< DAC channel2 data output register, Address offset: 0x30 */
  276. __IO uint32_t SR; /*!< DAC status register, Address offset: 0x34 */
  277. } DAC_TypeDef;
  278. /**
  279. * @brief Debug MCU
  280. */
  281. typedef struct
  282. {
  283. __IO uint32_t IDCODE; /*!< MCU device ID code, Address offset: 0x00 */
  284. __IO uint32_t CR; /*!< Debug MCU configuration register, Address offset: 0x04 */
  285. __IO uint32_t APB1FZ; /*!< Debug MCU APB1 freeze register, Address offset: 0x08 */
  286. __IO uint32_t APB2FZ; /*!< Debug MCU APB2 freeze register, Address offset: 0x0C */
  287. }DBGMCU_TypeDef;
  288. /**
  289. * @brief DMA Controller
  290. */
  291. typedef struct
  292. {
  293. __IO uint32_t CCR; /*!< DMA channel x configuration register */
  294. __IO uint32_t CNDTR; /*!< DMA channel x number of data register */
  295. __IO uint32_t CPAR; /*!< DMA channel x peripheral address register */
  296. __IO uint32_t CMAR; /*!< DMA channel x memory address register */
  297. } DMA_Channel_TypeDef;
  298. typedef struct
  299. {
  300. __IO uint32_t ISR; /*!< DMA interrupt status register, Address offset: 0x00 */
  301. __IO uint32_t IFCR; /*!< DMA interrupt flag clear register, Address offset: 0x04 */
  302. uint32_t RESERVED0[40];/*!< Reserved as declared by channel typedef 0x08 - 0xA4 */
  303. __IO uint32_t CSELR; /*!< Channel selection register, Address offset: 0xA8 */
  304. } DMA_TypeDef;
  305. /**
  306. * @brief External Interrupt/Event Controller
  307. */
  308. typedef struct
  309. {
  310. __IO uint32_t IMR; /*!<EXTI Interrupt mask register, Address offset: 0x00 */
  311. __IO uint32_t EMR; /*!<EXTI Event mask register, Address offset: 0x04 */
  312. __IO uint32_t RTSR; /*!<EXTI Rising trigger selection register , Address offset: 0x08 */
  313. __IO uint32_t FTSR; /*!<EXTI Falling trigger selection register, Address offset: 0x0C */
  314. __IO uint32_t SWIER; /*!<EXTI Software interrupt event register, Address offset: 0x10 */
  315. __IO uint32_t PR; /*!<EXTI Pending register, Address offset: 0x14 */
  316. } EXTI_TypeDef;
  317. /**
  318. * @brief FLASH Registers
  319. */
  320. typedef struct
  321. {
  322. __IO uint32_t ACR; /*!<FLASH access control register, Address offset: 0x00 */
  323. __IO uint32_t KEYR; /*!<FLASH key register, Address offset: 0x04 */
  324. __IO uint32_t OPTKEYR; /*!<FLASH OPT key register, Address offset: 0x08 */
  325. __IO uint32_t SR; /*!<FLASH status register, Address offset: 0x0C */
  326. __IO uint32_t CR; /*!<FLASH control register, Address offset: 0x10 */
  327. __IO uint32_t AR; /*!<FLASH address register, Address offset: 0x14 */
  328. __IO uint32_t RESERVED; /*!< Reserved, 0x18 */
  329. __IO uint32_t OBR; /*!<FLASH option bytes register, Address offset: 0x1C */
  330. __IO uint32_t WRPR; /*!<FLASH option bytes register, Address offset: 0x20 */
  331. } FLASH_TypeDef;
  332. /**
  333. * @brief Option Bytes Registers
  334. */
  335. typedef struct
  336. {
  337. __IO uint16_t RDP; /*!< FLASH option byte Read protection, Address offset: 0x00 */
  338. __IO uint16_t USER; /*!< FLASH option byte user options, Address offset: 0x02 */
  339. __IO uint16_t DATA0; /*!< User data byte 0 (stored in FLASH_OBR[23:16]), Address offset: 0x04 */
  340. __IO uint16_t DATA1; /*!< User data byte 1 (stored in FLASH_OBR[31:24]), Address offset: 0x06 */
  341. __IO uint16_t WRP0; /*!< FLASH option byte write protection 0, Address offset: 0x08 */
  342. __IO uint16_t WRP1; /*!< FLASH option byte write protection 1, Address offset: 0x0A */
  343. __IO uint16_t WRP2; /*!< FLASH option byte write protection 2, Address offset: 0x0C */
  344. __IO uint16_t WRP3; /*!< FLASH option byte write protection 3, Address offset: 0x0E */
  345. } OB_TypeDef;
  346. /**
  347. * @brief General Purpose I/O
  348. */
  349. typedef struct
  350. {
  351. __IO uint32_t MODER; /*!< GPIO port mode register, Address offset: 0x00 */
  352. __IO uint32_t OTYPER; /*!< GPIO port output type register, Address offset: 0x04 */
  353. __IO uint32_t OSPEEDR; /*!< GPIO port output speed register, Address offset: 0x08 */
  354. __IO uint32_t PUPDR; /*!< GPIO port pull-up/pull-down register, Address offset: 0x0C */
  355. __IO uint32_t IDR; /*!< GPIO port input data register, Address offset: 0x10 */
  356. __IO uint32_t ODR; /*!< GPIO port output data register, Address offset: 0x14 */
  357. __IO uint32_t BSRR; /*!< GPIO port bit set/reset register, Address offset: 0x1A */
  358. __IO uint32_t LCKR; /*!< GPIO port configuration lock register, Address offset: 0x1C */
  359. __IO uint32_t AFR[2]; /*!< GPIO alternate function low register, Address offset: 0x20-0x24 */
  360. __IO uint32_t BRR; /*!< GPIO bit reset register, Address offset: 0x28 */
  361. } GPIO_TypeDef;
  362. /**
  363. * @brief SysTem Configuration
  364. */
  365. typedef struct
  366. {
  367. __IO uint32_t CFGR1; /*!< SYSCFG configuration register 1, Address offset: 0x00 */
  368. uint32_t RESERVED; /*!< Reserved, 0x04 */
  369. __IO uint32_t EXTICR[4]; /*!< SYSCFG external interrupt configuration register, Address offset: 0x14-0x08 */
  370. __IO uint32_t CFGR2; /*!< SYSCFG configuration register 2, Address offset: 0x18 */
  371. uint32_t RESERVED1[25]; /*!< Reserved + COMP, 0x1C */
  372. __IO uint32_t IT_LINE_SR[32]; /*!< SYSCFG configuration IT_LINE register, Address offset: 0x80 */
  373. } SYSCFG_TypeDef;
  374. /**
  375. * @brief Inter-integrated Circuit Interface
  376. */
  377. typedef struct
  378. {
  379. __IO uint32_t CR1; /*!< I2C Control register 1, Address offset: 0x00 */
  380. __IO uint32_t CR2; /*!< I2C Control register 2, Address offset: 0x04 */
  381. __IO uint32_t OAR1; /*!< I2C Own address 1 register, Address offset: 0x08 */
  382. __IO uint32_t OAR2; /*!< I2C Own address 2 register, Address offset: 0x0C */
  383. __IO uint32_t TIMINGR; /*!< I2C Timing register, Address offset: 0x10 */
  384. __IO uint32_t TIMEOUTR; /*!< I2C Timeout register, Address offset: 0x14 */
  385. __IO uint32_t ISR; /*!< I2C Interrupt and status register, Address offset: 0x18 */
  386. __IO uint32_t ICR; /*!< I2C Interrupt clear register, Address offset: 0x1C */
  387. __IO uint32_t PECR; /*!< I2C PEC register, Address offset: 0x20 */
  388. __IO uint32_t RXDR; /*!< I2C Receive data register, Address offset: 0x24 */
  389. __IO uint32_t TXDR; /*!< I2C Transmit data register, Address offset: 0x28 */
  390. } I2C_TypeDef;
  391. /**
  392. * @brief Independent WATCHDOG
  393. */
  394. typedef struct
  395. {
  396. __IO uint32_t KR; /*!< IWDG Key register, Address offset: 0x00 */
  397. __IO uint32_t PR; /*!< IWDG Prescaler register, Address offset: 0x04 */
  398. __IO uint32_t RLR; /*!< IWDG Reload register, Address offset: 0x08 */
  399. __IO uint32_t SR; /*!< IWDG Status register, Address offset: 0x0C */
  400. __IO uint32_t WINR; /*!< IWDG Window register, Address offset: 0x10 */
  401. } IWDG_TypeDef;
  402. /**
  403. * @brief Power Control
  404. */
  405. typedef struct
  406. {
  407. __IO uint32_t CR; /*!< PWR power control register, Address offset: 0x00 */
  408. __IO uint32_t CSR; /*!< PWR power control/status register, Address offset: 0x04 */
  409. } PWR_TypeDef;
  410. /**
  411. * @brief Reset and Clock Control
  412. */
  413. typedef struct
  414. {
  415. __IO uint32_t CR; /*!< RCC clock control register, Address offset: 0x00 */
  416. __IO uint32_t CFGR; /*!< RCC clock configuration register, Address offset: 0x04 */
  417. __IO uint32_t CIR; /*!< RCC clock interrupt register, Address offset: 0x08 */
  418. __IO uint32_t APB2RSTR; /*!< RCC APB2 peripheral reset register, Address offset: 0x0C */
  419. __IO uint32_t APB1RSTR; /*!< RCC APB1 peripheral reset register, Address offset: 0x10 */
  420. __IO uint32_t AHBENR; /*!< RCC AHB peripheral clock register, Address offset: 0x14 */
  421. __IO uint32_t APB2ENR; /*!< RCC APB2 peripheral clock enable register, Address offset: 0x18 */
  422. __IO uint32_t APB1ENR; /*!< RCC APB1 peripheral clock enable register, Address offset: 0x1C */
  423. __IO uint32_t BDCR; /*!< RCC Backup domain control register, Address offset: 0x20 */
  424. __IO uint32_t CSR; /*!< RCC clock control & status register, Address offset: 0x24 */
  425. __IO uint32_t AHBRSTR; /*!< RCC AHB peripheral reset register, Address offset: 0x28 */
  426. __IO uint32_t CFGR2; /*!< RCC clock configuration register 2, Address offset: 0x2C */
  427. __IO uint32_t CFGR3; /*!< RCC clock configuration register 3, Address offset: 0x30 */
  428. __IO uint32_t CR2; /*!< RCC clock control register 2, Address offset: 0x34 */
  429. } RCC_TypeDef;
  430. /**
  431. * @brief Real-Time Clock
  432. */
  433. typedef struct
  434. {
  435. __IO uint32_t TR; /*!< RTC time register, Address offset: 0x00 */
  436. __IO uint32_t DR; /*!< RTC date register, Address offset: 0x04 */
  437. __IO uint32_t CR; /*!< RTC control register, Address offset: 0x08 */
  438. __IO uint32_t ISR; /*!< RTC initialization and status register, Address offset: 0x0C */
  439. __IO uint32_t PRER; /*!< RTC prescaler register, Address offset: 0x10 */
  440. __IO uint32_t WUTR; /*!< RTC wakeup timer register, Address offset: 0x14 */
  441. uint32_t RESERVED1; /*!< Reserved, Address offset: 0x18 */
  442. __IO uint32_t ALRMAR; /*!< RTC alarm A register, Address offset: 0x1C */
  443. uint32_t RESERVED2; /*!< Reserved, Address offset: 0x20 */
  444. __IO uint32_t WPR; /*!< RTC write protection register, Address offset: 0x24 */
  445. __IO uint32_t SSR; /*!< RTC sub second register, Address offset: 0x28 */
  446. __IO uint32_t SHIFTR; /*!< RTC shift control register, Address offset: 0x2C */
  447. __IO uint32_t TSTR; /*!< RTC time stamp time register, Address offset: 0x30 */
  448. __IO uint32_t TSDR; /*!< RTC time stamp date register, Address offset: 0x34 */
  449. __IO uint32_t TSSSR; /*!< RTC time-stamp sub second register, Address offset: 0x38 */
  450. __IO uint32_t CALR; /*!< RTC calibration register, Address offset: 0x3C */
  451. __IO uint32_t TAFCR; /*!< RTC tamper and alternate function configuration register, Address offset: 0x40 */
  452. __IO uint32_t ALRMASSR; /*!< RTC alarm A sub second register, Address offset: 0x44 */
  453. uint32_t RESERVED3; /*!< Reserved, Address offset: 0x48 */
  454. uint32_t RESERVED4; /*!< Reserved, Address offset: 0x4C */
  455. __IO uint32_t BKP0R; /*!< RTC backup register 0, Address offset: 0x50 */
  456. __IO uint32_t BKP1R; /*!< RTC backup register 1, Address offset: 0x54 */
  457. __IO uint32_t BKP2R; /*!< RTC backup register 2, Address offset: 0x58 */
  458. __IO uint32_t BKP3R; /*!< RTC backup register 3, Address offset: 0x5C */
  459. __IO uint32_t BKP4R; /*!< RTC backup register 4, Address offset: 0x60 */
  460. } RTC_TypeDef;
  461. /**
  462. * @brief Serial Peripheral Interface
  463. */
  464. typedef struct
  465. {
  466. __IO uint32_t CR1; /*!< SPI Control register 1 (not used in I2S mode), Address offset: 0x00 */
  467. __IO uint32_t CR2; /*!< SPI Control register 2, Address offset: 0x04 */
  468. __IO uint32_t SR; /*!< SPI Status register, Address offset: 0x08 */
  469. __IO uint32_t DR; /*!< SPI data register, Address offset: 0x0C */
  470. __IO uint32_t CRCPR; /*!< SPI CRC polynomial register (not used in I2S mode), Address offset: 0x10 */
  471. __IO uint32_t RXCRCR; /*!< SPI Rx CRC register (not used in I2S mode), Address offset: 0x14 */
  472. __IO uint32_t TXCRCR; /*!< SPI Tx CRC register (not used in I2S mode), Address offset: 0x18 */
  473. __IO uint32_t I2SCFGR; /*!< SPI_I2S configuration register, Address offset: 0x1C */
  474. __IO uint32_t I2SPR; /*!< SPI_I2S prescaler register, Address offset: 0x20 */
  475. } SPI_TypeDef;
  476. /**
  477. * @brief TIM
  478. */
  479. typedef struct
  480. {
  481. __IO uint32_t CR1; /*!< TIM control register 1, Address offset: 0x00 */
  482. __IO uint32_t CR2; /*!< TIM control register 2, Address offset: 0x04 */
  483. __IO uint32_t SMCR; /*!< TIM slave Mode Control register, Address offset: 0x08 */
  484. __IO uint32_t DIER; /*!< TIM DMA/interrupt enable register, Address offset: 0x0C */
  485. __IO uint32_t SR; /*!< TIM status register, Address offset: 0x10 */
  486. __IO uint32_t EGR; /*!< TIM event generation register, Address offset: 0x14 */
  487. __IO uint32_t CCMR1; /*!< TIM capture/compare mode register 1, Address offset: 0x18 */
  488. __IO uint32_t CCMR2; /*!< TIM capture/compare mode register 2, Address offset: 0x1C */
  489. __IO uint32_t CCER; /*!< TIM capture/compare enable register, Address offset: 0x20 */
  490. __IO uint32_t CNT; /*!< TIM counter register, Address offset: 0x24 */
  491. __IO uint32_t PSC; /*!< TIM prescaler register, Address offset: 0x28 */
  492. __IO uint32_t ARR; /*!< TIM auto-reload register, Address offset: 0x2C */
  493. __IO uint32_t RCR; /*!< TIM repetition counter register, Address offset: 0x30 */
  494. __IO uint32_t CCR1; /*!< TIM capture/compare register 1, Address offset: 0x34 */
  495. __IO uint32_t CCR2; /*!< TIM capture/compare register 2, Address offset: 0x38 */
  496. __IO uint32_t CCR3; /*!< TIM capture/compare register 3, Address offset: 0x3C */
  497. __IO uint32_t CCR4; /*!< TIM capture/compare register 4, Address offset: 0x40 */
  498. __IO uint32_t BDTR; /*!< TIM break and dead-time register, Address offset: 0x44 */
  499. __IO uint32_t DCR; /*!< TIM DMA control register, Address offset: 0x48 */
  500. __IO uint32_t DMAR; /*!< TIM DMA address for full transfer register, Address offset: 0x4C */
  501. __IO uint32_t OR; /*!< TIM option register, Address offset: 0x50 */
  502. } TIM_TypeDef;
  503. /**
  504. * @brief Touch Sensing Controller (TSC)
  505. */
  506. typedef struct
  507. {
  508. __IO uint32_t CR; /*!< TSC control register, Address offset: 0x00 */
  509. __IO uint32_t IER; /*!< TSC interrupt enable register, Address offset: 0x04 */
  510. __IO uint32_t ICR; /*!< TSC interrupt clear register, Address offset: 0x08 */
  511. __IO uint32_t ISR; /*!< TSC interrupt status register, Address offset: 0x0C */
  512. __IO uint32_t IOHCR; /*!< TSC I/O hysteresis control register, Address offset: 0x10 */
  513. uint32_t RESERVED1; /*!< Reserved, Address offset: 0x14 */
  514. __IO uint32_t IOASCR; /*!< TSC I/O analog switch control register, Address offset: 0x18 */
  515. uint32_t RESERVED2; /*!< Reserved, Address offset: 0x1C */
  516. __IO uint32_t IOSCR; /*!< TSC I/O sampling control register, Address offset: 0x20 */
  517. uint32_t RESERVED3; /*!< Reserved, Address offset: 0x24 */
  518. __IO uint32_t IOCCR; /*!< TSC I/O channel control register, Address offset: 0x28 */
  519. uint32_t RESERVED4; /*!< Reserved, Address offset: 0x2C */
  520. __IO uint32_t IOGCSR; /*!< TSC I/O group control status register, Address offset: 0x30 */
  521. __IO uint32_t IOGXCR[8]; /*!< TSC I/O group x counter register, Address offset: 0x34-50 */
  522. }TSC_TypeDef;
  523. /**
  524. * @brief Universal Synchronous Asynchronous Receiver Transmitter
  525. */
  526. typedef struct
  527. {
  528. __IO uint32_t CR1; /*!< USART Control register 1, Address offset: 0x00 */
  529. __IO uint32_t CR2; /*!< USART Control register 2, Address offset: 0x04 */
  530. __IO uint32_t CR3; /*!< USART Control register 3, Address offset: 0x08 */
  531. __IO uint32_t BRR; /*!< USART Baud rate register, Address offset: 0x0C */
  532. __IO uint32_t GTPR; /*!< USART Guard time and prescaler register, Address offset: 0x10 */
  533. __IO uint32_t RTOR; /*!< USART Receiver Time Out register, Address offset: 0x14 */
  534. __IO uint32_t RQR; /*!< USART Request register, Address offset: 0x18 */
  535. __IO uint32_t ISR; /*!< USART Interrupt and status register, Address offset: 0x1C */
  536. __IO uint32_t ICR; /*!< USART Interrupt flag Clear register, Address offset: 0x20 */
  537. __IO uint16_t RDR; /*!< USART Receive Data register, Address offset: 0x24 */
  538. uint16_t RESERVED1; /*!< Reserved, 0x26 */
  539. __IO uint16_t TDR; /*!< USART Transmit Data register, Address offset: 0x28 */
  540. uint16_t RESERVED2; /*!< Reserved, 0x2A */
  541. } USART_TypeDef;
  542. /**
  543. * @brief Window WATCHDOG
  544. */
  545. typedef struct
  546. {
  547. __IO uint32_t CR; /*!< WWDG Control register, Address offset: 0x00 */
  548. __IO uint32_t CFR; /*!< WWDG Configuration register, Address offset: 0x04 */
  549. __IO uint32_t SR; /*!< WWDG Status register, Address offset: 0x08 */
  550. } WWDG_TypeDef;
  551. /**
  552. * @}
  553. */
  554. /** @addtogroup Peripheral_memory_map
  555. * @{
  556. */
  557. #define FLASH_BASE ((uint32_t)0x08000000U) /*!< FLASH base address in the alias region */
  558. #define FLASH_BANK1_END ((uint32_t)0x0803FFFFU) /*!< FLASH END address of bank1 */
  559. #define SRAM_BASE ((uint32_t)0x20000000U) /*!< SRAM base address in the alias region */
  560. #define PERIPH_BASE ((uint32_t)0x40000000U) /*!< Peripheral base address in the alias region */
  561. /*!< Peripheral memory map */
  562. #define APBPERIPH_BASE PERIPH_BASE
  563. #define AHBPERIPH_BASE (PERIPH_BASE + 0x00020000)
  564. #define AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000)
  565. /*!< APB peripherals */
  566. #define TIM2_BASE (APBPERIPH_BASE + 0x00000000)
  567. #define TIM3_BASE (APBPERIPH_BASE + 0x00000400)
  568. #define TIM6_BASE (APBPERIPH_BASE + 0x00001000)
  569. #define TIM7_BASE (APBPERIPH_BASE + 0x00001400)
  570. #define TIM14_BASE (APBPERIPH_BASE + 0x00002000)
  571. #define RTC_BASE (APBPERIPH_BASE + 0x00002800)
  572. #define WWDG_BASE (APBPERIPH_BASE + 0x00002C00)
  573. #define IWDG_BASE (APBPERIPH_BASE + 0x00003000)
  574. #define SPI2_BASE (APBPERIPH_BASE + 0x00003800)
  575. #define USART2_BASE (APBPERIPH_BASE + 0x00004400)
  576. #define USART3_BASE (APBPERIPH_BASE + 0x00004800)
  577. #define USART4_BASE (APBPERIPH_BASE + 0x00004C00)
  578. #define USART5_BASE (APBPERIPH_BASE + 0x00005000)
  579. #define I2C1_BASE (APBPERIPH_BASE + 0x00005400)
  580. #define I2C2_BASE (APBPERIPH_BASE + 0x00005800)
  581. #define CAN_BASE (APBPERIPH_BASE + 0x00006400)
  582. #define CRS_BASE (APBPERIPH_BASE + 0x00006C00)
  583. #define PWR_BASE (APBPERIPH_BASE + 0x00007000)
  584. #define DAC_BASE (APBPERIPH_BASE + 0x00007400)
  585. #define CEC_BASE (APBPERIPH_BASE + 0x00007800)
  586. #define SYSCFG_BASE (APBPERIPH_BASE + 0x00010000)
  587. #define COMP_BASE (APBPERIPH_BASE + 0x0001001C)
  588. #define EXTI_BASE (APBPERIPH_BASE + 0x00010400)
  589. #define USART6_BASE (APBPERIPH_BASE + 0x00011400)
  590. #define USART7_BASE (APBPERIPH_BASE + 0x00011800)
  591. #define USART8_BASE (APBPERIPH_BASE + 0x00011C00)
  592. #define ADC1_BASE (APBPERIPH_BASE + 0x00012400)
  593. #define ADC_BASE (APBPERIPH_BASE + 0x00012708)
  594. #define TIM1_BASE (APBPERIPH_BASE + 0x00012C00)
  595. #define SPI1_BASE (APBPERIPH_BASE + 0x00013000)
  596. #define USART1_BASE (APBPERIPH_BASE + 0x00013800)
  597. #define TIM15_BASE (APBPERIPH_BASE + 0x00014000)
  598. #define TIM16_BASE (APBPERIPH_BASE + 0x00014400)
  599. #define TIM17_BASE (APBPERIPH_BASE + 0x00014800)
  600. #define DBGMCU_BASE (APBPERIPH_BASE + 0x00015800)
  601. /*!< AHB peripherals */
  602. #define DMA1_BASE (AHBPERIPH_BASE + 0x00000000)
  603. #define DMA1_Channel1_BASE (DMA1_BASE + 0x00000008)
  604. #define DMA1_Channel2_BASE (DMA1_BASE + 0x0000001C)
  605. #define DMA1_Channel3_BASE (DMA1_BASE + 0x00000030)
  606. #define DMA1_Channel4_BASE (DMA1_BASE + 0x00000044)
  607. #define DMA1_Channel5_BASE (DMA1_BASE + 0x00000058)
  608. #define DMA1_Channel6_BASE (DMA1_BASE + 0x0000006C)
  609. #define DMA1_Channel7_BASE (DMA1_BASE + 0x00000080)
  610. #define DMA2_BASE (AHBPERIPH_BASE + 0x00000400)
  611. #define DMA2_Channel1_BASE (DMA2_BASE + 0x00000008)
  612. #define DMA2_Channel2_BASE (DMA2_BASE + 0x0000001C)
  613. #define DMA2_Channel3_BASE (DMA2_BASE + 0x00000030)
  614. #define DMA2_Channel4_BASE (DMA2_BASE + 0x00000044)
  615. #define DMA2_Channel5_BASE (DMA2_BASE + 0x00000058)
  616. #define RCC_BASE (AHBPERIPH_BASE + 0x00001000)
  617. #define FLASH_R_BASE (AHBPERIPH_BASE + 0x00002000) /*!< FLASH registers base address */
  618. #define OB_BASE ((uint32_t)0x1FFFF800U) /*!< FLASH Option Bytes base address */
  619. #define FLASHSIZE_BASE ((uint32_t)0x1FFFF7CCU) /*!< FLASH Size register base address */
  620. #define UID_BASE ((uint32_t)0x1FFFF7ACU) /*!< Unique device ID register base address */
  621. #define CRC_BASE (AHBPERIPH_BASE + 0x00003000)
  622. #define TSC_BASE (AHBPERIPH_BASE + 0x00004000)
  623. /*!< AHB2 peripherals */
  624. #define GPIOA_BASE (AHB2PERIPH_BASE + 0x00000000)
  625. #define GPIOB_BASE (AHB2PERIPH_BASE + 0x00000400)
  626. #define GPIOC_BASE (AHB2PERIPH_BASE + 0x00000800)
  627. #define GPIOD_BASE (AHB2PERIPH_BASE + 0x00000C00)
  628. #define GPIOE_BASE (AHB2PERIPH_BASE + 0x00001000)
  629. #define GPIOF_BASE (AHB2PERIPH_BASE + 0x00001400)
  630. /**
  631. * @}
  632. */
  633. /** @addtogroup Peripheral_declaration
  634. * @{
  635. */
  636. #define TIM2 ((TIM_TypeDef *) TIM2_BASE)
  637. #define TIM3 ((TIM_TypeDef *) TIM3_BASE)
  638. #define TIM6 ((TIM_TypeDef *) TIM6_BASE)
  639. #define TIM7 ((TIM_TypeDef *) TIM7_BASE)
  640. #define TIM14 ((TIM_TypeDef *) TIM14_BASE)
  641. #define RTC ((RTC_TypeDef *) RTC_BASE)
  642. #define WWDG ((WWDG_TypeDef *) WWDG_BASE)
  643. #define IWDG ((IWDG_TypeDef *) IWDG_BASE)
  644. #define USART2 ((USART_TypeDef *) USART2_BASE)
  645. #define USART3 ((USART_TypeDef *) USART3_BASE)
  646. #define USART4 ((USART_TypeDef *) USART4_BASE)
  647. #define USART5 ((USART_TypeDef *) USART5_BASE)
  648. #define I2C1 ((I2C_TypeDef *) I2C1_BASE)
  649. #define I2C2 ((I2C_TypeDef *) I2C2_BASE)
  650. #define CAN ((CAN_TypeDef *) CAN_BASE)
  651. #define CRS ((CRS_TypeDef *) CRS_BASE)
  652. #define PWR ((PWR_TypeDef *) PWR_BASE)
  653. #define DAC1 ((DAC_TypeDef *) DAC_BASE)
  654. #define DAC ((DAC_TypeDef *) DAC_BASE) /* Kept for legacy purpose */
  655. #define CEC ((CEC_TypeDef *) CEC_BASE)
  656. #define SYSCFG ((SYSCFG_TypeDef *) SYSCFG_BASE)
  657. #define COMP1 ((COMP_TypeDef *) COMP_BASE)
  658. #define COMP2 ((COMP_TypeDef *) (COMP_BASE + 0x00000002))
  659. #define COMP12_COMMON ((COMP_Common_TypeDef *) COMP_BASE)
  660. #define COMP ((COMP1_2_TypeDef *) COMP_BASE) /* Kept for legacy purpose */
  661. #define EXTI ((EXTI_TypeDef *) EXTI_BASE)
  662. #define USART6 ((USART_TypeDef *) USART6_BASE)
  663. #define USART7 ((USART_TypeDef *) USART7_BASE)
  664. #define USART8 ((USART_TypeDef *) USART8_BASE)
  665. #define ADC1 ((ADC_TypeDef *) ADC1_BASE)
  666. #define ADC1_COMMON ((ADC_Common_TypeDef *) ADC_BASE)
  667. #define ADC ((ADC_Common_TypeDef *) ADC_BASE) /* Kept for legacy purpose */
  668. #define TIM1 ((TIM_TypeDef *) TIM1_BASE)
  669. #define SPI1 ((SPI_TypeDef *) SPI1_BASE)
  670. #define SPI2 ((SPI_TypeDef *) SPI2_BASE)
  671. #define USART1 ((USART_TypeDef *) USART1_BASE)
  672. #define TIM15 ((TIM_TypeDef *) TIM15_BASE)
  673. #define TIM16 ((TIM_TypeDef *) TIM16_BASE)
  674. #define TIM17 ((TIM_TypeDef *) TIM17_BASE)
  675. #define DBGMCU ((DBGMCU_TypeDef *) DBGMCU_BASE)
  676. #define DMA1 ((DMA_TypeDef *) DMA1_BASE)
  677. #define DMA1_Channel1 ((DMA_Channel_TypeDef *) DMA1_Channel1_BASE)
  678. #define DMA1_Channel2 ((DMA_Channel_TypeDef *) DMA1_Channel2_BASE)
  679. #define DMA1_Channel3 ((DMA_Channel_TypeDef *) DMA1_Channel3_BASE)
  680. #define DMA1_Channel4 ((DMA_Channel_TypeDef *) DMA1_Channel4_BASE)
  681. #define DMA1_Channel5 ((DMA_Channel_TypeDef *) DMA1_Channel5_BASE)
  682. #define DMA1_Channel6 ((DMA_Channel_TypeDef *) DMA1_Channel6_BASE)
  683. #define DMA1_Channel7 ((DMA_Channel_TypeDef *) DMA1_Channel7_BASE)
  684. #define DMA2 ((DMA_TypeDef *) DMA2_BASE)
  685. #define DMA2_Channel1 ((DMA_Channel_TypeDef *) DMA2_Channel1_BASE)
  686. #define DMA2_Channel2 ((DMA_Channel_TypeDef *) DMA2_Channel2_BASE)
  687. #define DMA2_Channel3 ((DMA_Channel_TypeDef *) DMA2_Channel3_BASE)
  688. #define DMA2_Channel4 ((DMA_Channel_TypeDef *) DMA2_Channel4_BASE)
  689. #define DMA2_Channel5 ((DMA_Channel_TypeDef *) DMA2_Channel5_BASE)
  690. #define FLASH ((FLASH_TypeDef *) FLASH_R_BASE)
  691. #define OB ((OB_TypeDef *) OB_BASE)
  692. #define RCC ((RCC_TypeDef *) RCC_BASE)
  693. #define CRC ((CRC_TypeDef *) CRC_BASE)
  694. #define TSC ((TSC_TypeDef *) TSC_BASE)
  695. #define GPIOA ((GPIO_TypeDef *) GPIOA_BASE)
  696. #define GPIOB ((GPIO_TypeDef *) GPIOB_BASE)
  697. #define GPIOC ((GPIO_TypeDef *) GPIOC_BASE)
  698. #define GPIOD ((GPIO_TypeDef *) GPIOD_BASE)
  699. #define GPIOE ((GPIO_TypeDef *) GPIOE_BASE)
  700. #define GPIOF ((GPIO_TypeDef *) GPIOF_BASE)
  701. /**
  702. * @}
  703. */
  704. /** @addtogroup Exported_constants
  705. * @{
  706. */
  707. /** @addtogroup Peripheral_Registers_Bits_Definition
  708. * @{
  709. */
  710. /******************************************************************************/
  711. /* Peripheral Registers Bits Definition */
  712. /******************************************************************************/
  713. /******************************************************************************/
  714. /* */
  715. /* Analog to Digital Converter (ADC) */
  716. /* */
  717. /******************************************************************************/
  718. /*
  719. * @brief Specific device feature definitions (not present on all devices in the STM32F0 family)
  720. */
  721. #define ADC_CHANNEL_VBAT_SUPPORT /*!< ADC feature available only on specific devices: ADC internal channel Vbat */
  722. /******************** Bits definition for ADC_ISR register ******************/
  723. #define ADC_ISR_ADRDY ((uint32_t)0x00000001U) /*!< ADC ready flag */
  724. #define ADC_ISR_EOSMP ((uint32_t)0x00000002U) /*!< ADC group regular end of sampling flag */
  725. #define ADC_ISR_EOC ((uint32_t)0x00000004U) /*!< ADC group regular end of unitary conversion flag */
  726. #define ADC_ISR_EOS ((uint32_t)0x00000008U) /*!< ADC group regular end of sequence conversions flag */
  727. #define ADC_ISR_OVR ((uint32_t)0x00000010U) /*!< ADC group regular overrun flag */
  728. #define ADC_ISR_AWD1 ((uint32_t)0x00000080U) /*!< ADC analog watchdog 1 flag */
  729. /* Legacy defines */
  730. #define ADC_ISR_AWD (ADC_ISR_AWD1)
  731. #define ADC_ISR_EOSEQ (ADC_ISR_EOS)
  732. /******************** Bits definition for ADC_IER register ******************/
  733. #define ADC_IER_ADRDYIE ((uint32_t)0x00000001U) /*!< ADC ready interrupt */
  734. #define ADC_IER_EOSMPIE ((uint32_t)0x00000002U) /*!< ADC group regular end of sampling interrupt */
  735. #define ADC_IER_EOCIE ((uint32_t)0x00000004U) /*!< ADC group regular end of unitary conversion interrupt */
  736. #define ADC_IER_EOSIE ((uint32_t)0x00000008U) /*!< ADC group regular end of sequence conversions interrupt */
  737. #define ADC_IER_OVRIE ((uint32_t)0x00000010U) /*!< ADC group regular overrun interrupt */
  738. #define ADC_IER_AWD1IE ((uint32_t)0x00000080U) /*!< ADC analog watchdog 1 interrupt */
  739. /* Legacy defines */
  740. #define ADC_IER_AWDIE (ADC_IER_AWD1IE)
  741. #define ADC_IER_EOSEQIE (ADC_IER_EOSIE)
  742. /******************** Bits definition for ADC_CR register *******************/
  743. #define ADC_CR_ADEN ((uint32_t)0x00000001U) /*!< ADC enable */
  744. #define ADC_CR_ADDIS ((uint32_t)0x00000002U) /*!< ADC disable */
  745. #define ADC_CR_ADSTART ((uint32_t)0x00000004U) /*!< ADC group regular conversion start */
  746. #define ADC_CR_ADSTP ((uint32_t)0x00000010U) /*!< ADC group regular conversion stop */
  747. #define ADC_CR_ADCAL ((uint32_t)0x80000000U) /*!< ADC calibration */
  748. /******************* Bits definition for ADC_CFGR1 register *****************/
  749. #define ADC_CFGR1_DMAEN ((uint32_t)0x00000001U) /*!< ADC DMA transfer enable */
  750. #define ADC_CFGR1_DMACFG ((uint32_t)0x00000002U) /*!< ADC DMA transfer configuration */
  751. #define ADC_CFGR1_SCANDIR ((uint32_t)0x00000004U) /*!< ADC group regular sequencer scan direction */
  752. #define ADC_CFGR1_RES ((uint32_t)0x00000018U) /*!< ADC data resolution */
  753. #define ADC_CFGR1_RES_0 ((uint32_t)0x00000008U) /*!< bit 0 */
  754. #define ADC_CFGR1_RES_1 ((uint32_t)0x00000010U) /*!< bit 1 */
  755. #define ADC_CFGR1_ALIGN ((uint32_t)0x00000020U) /*!< ADC data alignement */
  756. #define ADC_CFGR1_EXTSEL ((uint32_t)0x000001C0U) /*!< ADC group regular external trigger source */
  757. #define ADC_CFGR1_EXTSEL_0 ((uint32_t)0x00000040U) /*!< bit 0 */
  758. #define ADC_CFGR1_EXTSEL_1 ((uint32_t)0x00000080U) /*!< bit 1 */
  759. #define ADC_CFGR1_EXTSEL_2 ((uint32_t)0x00000100U) /*!< bit 2 */
  760. #define ADC_CFGR1_EXTEN ((uint32_t)0x00000C00U) /*!< ADC group regular external trigger polarity */
  761. #define ADC_CFGR1_EXTEN_0 ((uint32_t)0x00000400U) /*!< bit 0 */
  762. #define ADC_CFGR1_EXTEN_1 ((uint32_t)0x00000800U) /*!< bit 1 */
  763. #define ADC_CFGR1_OVRMOD ((uint32_t)0x00001000U) /*!< ADC group regular overrun configuration */
  764. #define ADC_CFGR1_CONT ((uint32_t)0x00002000U) /*!< ADC group regular continuous conversion mode */
  765. #define ADC_CFGR1_WAIT ((uint32_t)0x00004000U) /*!< ADC low power auto wait */
  766. #define ADC_CFGR1_AUTOFF ((uint32_t)0x00008000U) /*!< ADC low power auto power off */
  767. #define ADC_CFGR1_DISCEN ((uint32_t)0x00010000U) /*!< ADC group regular sequencer discontinuous mode */
  768. #define ADC_CFGR1_AWD1SGL ((uint32_t)0x00400000U) /*!< ADC analog watchdog 1 monitoring a single channel or all channels */
  769. #define ADC_CFGR1_AWD1EN ((uint32_t)0x00800000U) /*!< ADC analog watchdog 1 enable on scope ADC group regular */
  770. #define ADC_CFGR1_AWD1CH ((uint32_t)0x7C000000U) /*!< ADC analog watchdog 1 monitored channel selection */
  771. #define ADC_CFGR1_AWD1CH_0 ((uint32_t)0x04000000U) /*!< bit 0 */
  772. #define ADC_CFGR1_AWD1CH_1 ((uint32_t)0x08000000U) /*!< bit 1 */
  773. #define ADC_CFGR1_AWD1CH_2 ((uint32_t)0x10000000U) /*!< bit 2 */
  774. #define ADC_CFGR1_AWD1CH_3 ((uint32_t)0x20000000U) /*!< bit 3 */
  775. #define ADC_CFGR1_AWD1CH_4 ((uint32_t)0x40000000U) /*!< bit 4 */
  776. /* Legacy defines */
  777. #define ADC_CFGR1_AUTDLY (ADC_CFGR1_WAIT)
  778. #define ADC_CFGR1_AWDSGL (ADC_CFGR1_AWD1SGL)
  779. #define ADC_CFGR1_AWDEN (ADC_CFGR1_AWD1EN)
  780. #define ADC_CFGR1_AWDCH (ADC_CFGR1_AWD1CH)
  781. #define ADC_CFGR1_AWDCH_0 (ADC_CFGR1_AWD1CH_0)
  782. #define ADC_CFGR1_AWDCH_1 (ADC_CFGR1_AWD1CH_1)
  783. #define ADC_CFGR1_AWDCH_2 (ADC_CFGR1_AWD1CH_2)
  784. #define ADC_CFGR1_AWDCH_3 (ADC_CFGR1_AWD1CH_3)
  785. #define ADC_CFGR1_AWDCH_4 (ADC_CFGR1_AWD1CH_4)
  786. /******************* Bits definition for ADC_CFGR2 register *****************/
  787. #define ADC_CFGR2_CKMODE ((uint32_t)0xC0000000U) /*!< ADC clock source and prescaler (prescaler only for clock source synchronous) */
  788. #define ADC_CFGR2_CKMODE_1 ((uint32_t)0x80000000U) /*!< bit 1 */
  789. #define ADC_CFGR2_CKMODE_0 ((uint32_t)0x40000000U) /*!< bit 0 */
  790. /* Legacy defines */
  791. #define ADC_CFGR2_JITOFFDIV4 (ADC_CFGR2_CKMODE_1) /*!< ADC clocked by PCLK div4 */
  792. #define ADC_CFGR2_JITOFFDIV2 (ADC_CFGR2_CKMODE_0) /*!< ADC clocked by PCLK div2 */
  793. /****************** Bit definition for ADC_SMPR register ********************/
  794. #define ADC_SMPR_SMP ((uint32_t)0x00000007U) /*!< ADC group of channels sampling time 2 */
  795. #define ADC_SMPR_SMP_0 ((uint32_t)0x00000001U) /*!< bit 0 */
  796. #define ADC_SMPR_SMP_1 ((uint32_t)0x00000002U) /*!< bit 1 */
  797. #define ADC_SMPR_SMP_2 ((uint32_t)0x00000004U) /*!< bit 2 */
  798. /* Legacy defines */
  799. #define ADC_SMPR1_SMPR (ADC_SMPR_SMP) /*!< SMP[2:0] bits (Sampling time selection) */
  800. #define ADC_SMPR1_SMPR_0 (ADC_SMPR_SMP_0) /*!< bit 0 */
  801. #define ADC_SMPR1_SMPR_1 (ADC_SMPR_SMP_1) /*!< bit 1 */
  802. #define ADC_SMPR1_SMPR_2 (ADC_SMPR_SMP_2) /*!< bit 2 */
  803. /******************* Bit definition for ADC_TR register ********************/
  804. #define ADC_TR1_LT1 ((uint32_t)0x00000FFFU) /*!< ADC analog watchdog 1 threshold low */
  805. #define ADC_TR1_LT1_0 ((uint32_t)0x00000001U) /*!< bit 0 */
  806. #define ADC_TR1_LT1_1 ((uint32_t)0x00000002U) /*!< bit 1 */
  807. #define ADC_TR1_LT1_2 ((uint32_t)0x00000004U) /*!< bit 2 */
  808. #define ADC_TR1_LT1_3 ((uint32_t)0x00000008U) /*!< bit 3 */
  809. #define ADC_TR1_LT1_4 ((uint32_t)0x00000010U) /*!< bit 4 */
  810. #define ADC_TR1_LT1_5 ((uint32_t)0x00000020U) /*!< bit 5 */
  811. #define ADC_TR1_LT1_6 ((uint32_t)0x00000040U) /*!< bit 6 */
  812. #define ADC_TR1_LT1_7 ((uint32_t)0x00000080U) /*!< bit 7 */
  813. #define ADC_TR1_LT1_8 ((uint32_t)0x00000100U) /*!< bit 8 */
  814. #define ADC_TR1_LT1_9 ((uint32_t)0x00000200U) /*!< bit 9 */
  815. #define ADC_TR1_LT1_10 ((uint32_t)0x00000400U) /*!< bit 10 */
  816. #define ADC_TR1_LT1_11 ((uint32_t)0x00000800U) /*!< bit 11 */
  817. #define ADC_TR1_HT1 ((uint32_t)0x0FFF0000U) /*!< ADC Analog watchdog 1 threshold high */
  818. #define ADC_TR1_HT1_0 ((uint32_t)0x00010000U) /*!< bit 0 */
  819. #define ADC_TR1_HT1_1 ((uint32_t)0x00020000U) /*!< bit 1 */
  820. #define ADC_TR1_HT1_2 ((uint32_t)0x00040000U) /*!< bit 2 */
  821. #define ADC_TR1_HT1_3 ((uint32_t)0x00080000U) /*!< bit 3 */
  822. #define ADC_TR1_HT1_4 ((uint32_t)0x00100000U) /*!< bit 4 */
  823. #define ADC_TR1_HT1_5 ((uint32_t)0x00200000U) /*!< bit 5 */
  824. #define ADC_TR1_HT1_6 ((uint32_t)0x00400000U) /*!< bit 6 */
  825. #define ADC_TR1_HT1_7 ((uint32_t)0x00800000U) /*!< bit 7 */
  826. #define ADC_TR1_HT1_8 ((uint32_t)0x01000000U) /*!< bit 8 */
  827. #define ADC_TR1_HT1_9 ((uint32_t)0x02000000U) /*!< bit 9 */
  828. #define ADC_TR1_HT1_10 ((uint32_t)0x04000000U) /*!< bit 10 */
  829. #define ADC_TR1_HT1_11 ((uint32_t)0x08000000U) /*!< bit 11 */
  830. /* Legacy defines */
  831. #define ADC_TR_HT (ADC_TR1_HT1)
  832. #define ADC_TR_LT (ADC_TR1_LT1)
  833. #define ADC_HTR_HT (ADC_TR1_HT1)
  834. #define ADC_LTR_LT (ADC_TR1_LT1)
  835. /****************** Bit definition for ADC_CHSELR register ******************/
  836. #define ADC_CHSELR_CHSEL ((uint32_t)0x0007FFFFU) /*!< ADC group regular sequencer channels, available when ADC_CFGR1_CHSELRMOD is reset */
  837. #define ADC_CHSELR_CHSEL18 ((uint32_t)0x00040000U) /*!< ADC group regular sequencer channel 18, available when ADC_CFGR1_CHSELRMOD is reset */
  838. #define ADC_CHSELR_CHSEL17 ((uint32_t)0x00020000U) /*!< ADC group regular sequencer channel 17, available when ADC_CFGR1_CHSELRMOD is reset */
  839. #define ADC_CHSELR_CHSEL16 ((uint32_t)0x00010000U) /*!< ADC group regular sequencer channel 16, available when ADC_CFGR1_CHSELRMOD is reset */
  840. #define ADC_CHSELR_CHSEL15 ((uint32_t)0x00008000U) /*!< ADC group regular sequencer channel 15, available when ADC_CFGR1_CHSELRMOD is reset */
  841. #define ADC_CHSELR_CHSEL14 ((uint32_t)0x00004000U) /*!< ADC group regular sequencer channel 14, available when ADC_CFGR1_CHSELRMOD is reset */
  842. #define ADC_CHSELR_CHSEL13 ((uint32_t)0x00002000U) /*!< ADC group regular sequencer channel 13, available when ADC_CFGR1_CHSELRMOD is reset */
  843. #define ADC_CHSELR_CHSEL12 ((uint32_t)0x00001000U) /*!< ADC group regular sequencer channel 12, available when ADC_CFGR1_CHSELRMOD is reset */
  844. #define ADC_CHSELR_CHSEL11 ((uint32_t)0x00000800U) /*!< ADC group regular sequencer channel 11, available when ADC_CFGR1_CHSELRMOD is reset */
  845. #define ADC_CHSELR_CHSEL10 ((uint32_t)0x00000400U) /*!< ADC group regular sequencer channel 10, available when ADC_CFGR1_CHSELRMOD is reset */
  846. #define ADC_CHSELR_CHSEL9 ((uint32_t)0x00000200U) /*!< ADC group regular sequencer channel 9, available when ADC_CFGR1_CHSELRMOD is reset */
  847. #define ADC_CHSELR_CHSEL8 ((uint32_t)0x00000100U) /*!< ADC group regular sequencer channel 8, available when ADC_CFGR1_CHSELRMOD is reset */
  848. #define ADC_CHSELR_CHSEL7 ((uint32_t)0x00000080U) /*!< ADC group regular sequencer channel 7, available when ADC_CFGR1_CHSELRMOD is reset */
  849. #define ADC_CHSELR_CHSEL6 ((uint32_t)0x00000040U) /*!< ADC group regular sequencer channel 6, available when ADC_CFGR1_CHSELRMOD is reset */
  850. #define ADC_CHSELR_CHSEL5 ((uint32_t)0x00000020U) /*!< ADC group regular sequencer channel 5, available when ADC_CFGR1_CHSELRMOD is reset */
  851. #define ADC_CHSELR_CHSEL4 ((uint32_t)0x00000010U) /*!< ADC group regular sequencer channel 4, available when ADC_CFGR1_CHSELRMOD is reset */
  852. #define ADC_CHSELR_CHSEL3 ((uint32_t)0x00000008U) /*!< ADC group regular sequencer channel 3, available when ADC_CFGR1_CHSELRMOD is reset */
  853. #define ADC_CHSELR_CHSEL2 ((uint32_t)0x00000004U) /*!< ADC group regular sequencer channel 2, available when ADC_CFGR1_CHSELRMOD is reset */
  854. #define ADC_CHSELR_CHSEL1 ((uint32_t)0x00000002U) /*!< ADC group regular sequencer channel 1, available when ADC_CFGR1_CHSELRMOD is reset */
  855. #define ADC_CHSELR_CHSEL0 ((uint32_t)0x00000001U) /*!< ADC group regular sequencer channel 0, available when ADC_CFGR1_CHSELRMOD is reset */
  856. /******************** Bit definition for ADC_DR register ********************/
  857. #define ADC_DR_DATA ((uint32_t)0x0000FFFFU) /*!< ADC group regular conversion data */
  858. #define ADC_DR_DATA_0 ((uint32_t)0x00000001U) /*!< bit 0 */
  859. #define ADC_DR_DATA_1 ((uint32_t)0x00000002U) /*!< bit 1 */
  860. #define ADC_DR_DATA_2 ((uint32_t)0x00000004U) /*!< bit 2 */
  861. #define ADC_DR_DATA_3 ((uint32_t)0x00000008U) /*!< bit 3 */
  862. #define ADC_DR_DATA_4 ((uint32_t)0x00000010U) /*!< bit 4 */
  863. #define ADC_DR_DATA_5 ((uint32_t)0x00000020U) /*!< bit 5 */
  864. #define ADC_DR_DATA_6 ((uint32_t)0x00000040U) /*!< bit 6 */
  865. #define ADC_DR_DATA_7 ((uint32_t)0x00000080U) /*!< bit 7 */
  866. #define ADC_DR_DATA_8 ((uint32_t)0x00000100U) /*!< bit 8 */
  867. #define ADC_DR_DATA_9 ((uint32_t)0x00000200U) /*!< bit 9 */
  868. #define ADC_DR_DATA_10 ((uint32_t)0x00000400U) /*!< bit 10 */
  869. #define ADC_DR_DATA_11 ((uint32_t)0x00000800U) /*!< bit 11 */
  870. #define ADC_DR_DATA_12 ((uint32_t)0x00001000U) /*!< bit 12 */
  871. #define ADC_DR_DATA_13 ((uint32_t)0x00002000U) /*!< bit 13 */
  872. #define ADC_DR_DATA_14 ((uint32_t)0x00004000U) /*!< bit 14 */
  873. #define ADC_DR_DATA_15 ((uint32_t)0x00008000U) /*!< bit 15 */
  874. /************************* ADC Common registers *****************************/
  875. /******************* Bit definition for ADC_CCR register ********************/
  876. #define ADC_CCR_VREFEN ((uint32_t)0x00400000U) /*!< ADC internal path to VrefInt enable */
  877. #define ADC_CCR_TSEN ((uint32_t)0x00800000U) /*!< ADC internal path to temperature sensor enable */
  878. #define ADC_CCR_VBATEN ((uint32_t)0x01000000U) /*!< ADC internal path to battery voltage enable */
  879. /******************************************************************************/
  880. /* */
  881. /* Controller Area Network (CAN ) */
  882. /* */
  883. /******************************************************************************/
  884. /*!<CAN control and status registers */
  885. /******************* Bit definition for CAN_MCR register ********************/
  886. #define CAN_MCR_INRQ ((uint32_t)0x00000001U) /*!<Initialization Request */
  887. #define CAN_MCR_SLEEP ((uint32_t)0x00000002U) /*!<Sleep Mode Request */
  888. #define CAN_MCR_TXFP ((uint32_t)0x00000004U) /*!<Transmit FIFO Priority */
  889. #define CAN_MCR_RFLM ((uint32_t)0x00000008U) /*!<Receive FIFO Locked Mode */
  890. #define CAN_MCR_NART ((uint32_t)0x00000010U) /*!<No Automatic Retransmission */
  891. #define CAN_MCR_AWUM ((uint32_t)0x00000020U) /*!<Automatic Wakeup Mode */
  892. #define CAN_MCR_ABOM ((uint32_t)0x00000040U) /*!<Automatic Bus-Off Management */
  893. #define CAN_MCR_TTCM ((uint32_t)0x00000080U) /*!<Time Triggered Communication Mode */
  894. #define CAN_MCR_RESET ((uint32_t)0x00008000U) /*!<bxCAN software master reset */
  895. /******************* Bit definition for CAN_MSR register ********************/
  896. #define CAN_MSR_INAK ((uint32_t)0x00000001U) /*!<Initialization Acknowledge */
  897. #define CAN_MSR_SLAK ((uint32_t)0x00000002U) /*!<Sleep Acknowledge */
  898. #define CAN_MSR_ERRI ((uint32_t)0x00000004U) /*!<Error Interrupt */
  899. #define CAN_MSR_WKUI ((uint32_t)0x00000008U) /*!<Wakeup Interrupt */
  900. #define CAN_MSR_SLAKI ((uint32_t)0x00000010U) /*!<Sleep Acknowledge Interrupt */
  901. #define CAN_MSR_TXM ((uint32_t)0x00000100U) /*!<Transmit Mode */
  902. #define CAN_MSR_RXM ((uint32_t)0x00000200U) /*!<Receive Mode */
  903. #define CAN_MSR_SAMP ((uint32_t)0x00000400U) /*!<Last Sample Point */
  904. #define CAN_MSR_RX ((uint32_t)0x00000800U) /*!<CAN Rx Signal */
  905. /******************* Bit definition for CAN_TSR register ********************/
  906. #define CAN_TSR_RQCP0 ((uint32_t)0x00000001U) /*!<Request Completed Mailbox0 */
  907. #define CAN_TSR_TXOK0 ((uint32_t)0x00000002U) /*!<Transmission OK of Mailbox0 */
  908. #define CAN_TSR_ALST0 ((uint32_t)0x00000004U) /*!<Arbitration Lost for Mailbox0 */
  909. #define CAN_TSR_TERR0 ((uint32_t)0x00000008U) /*!<Transmission Error of Mailbox0 */
  910. #define CAN_TSR_ABRQ0 ((uint32_t)0x00000080U) /*!<Abort Request for Mailbox0 */
  911. #define CAN_TSR_RQCP1 ((uint32_t)0x00000100U) /*!<Request Completed Mailbox1 */
  912. #define CAN_TSR_TXOK1 ((uint32_t)0x00000200U) /*!<Transmission OK of Mailbox1 */
  913. #define CAN_TSR_ALST1 ((uint32_t)0x00000400U) /*!<Arbitration Lost for Mailbox1 */
  914. #define CAN_TSR_TERR1 ((uint32_t)0x00000800U) /*!<Transmission Error of Mailbox1 */
  915. #define CAN_TSR_ABRQ1 ((uint32_t)0x00008000U) /*!<Abort Request for Mailbox 1 */
  916. #define CAN_TSR_RQCP2 ((uint32_t)0x00010000U) /*!<Request Completed Mailbox2 */
  917. #define CAN_TSR_TXOK2 ((uint32_t)0x00020000U) /*!<Transmission OK of Mailbox 2 */
  918. #define CAN_TSR_ALST2 ((uint32_t)0x00040000U) /*!<Arbitration Lost for mailbox 2 */
  919. #define CAN_TSR_TERR2 ((uint32_t)0x00080000U) /*!<Transmission Error of Mailbox 2 */
  920. #define CAN_TSR_ABRQ2 ((uint32_t)0x00800000U) /*!<Abort Request for Mailbox 2 */
  921. #define CAN_TSR_CODE ((uint32_t)0x03000000U) /*!<Mailbox Code */
  922. #define CAN_TSR_TME ((uint32_t)0x1C000000U) /*!<TME[2:0] bits */
  923. #define CAN_TSR_TME0 ((uint32_t)0x04000000U) /*!<Transmit Mailbox 0 Empty */
  924. #define CAN_TSR_TME1 ((uint32_t)0x08000000U) /*!<Transmit Mailbox 1 Empty */
  925. #define CAN_TSR_TME2 ((uint32_t)0x10000000U) /*!<Transmit Mailbox 2 Empty */
  926. #define CAN_TSR_LOW ((uint32_t)0xE0000000U) /*!<LOW[2:0] bits */
  927. #define CAN_TSR_LOW0 ((uint32_t)0x20000000U) /*!<Lowest Priority Flag for Mailbox 0 */
  928. #define CAN_TSR_LOW1 ((uint32_t)0x40000000U) /*!<Lowest Priority Flag for Mailbox 1 */
  929. #define CAN_TSR_LOW2 ((uint32_t)0x80000000U) /*!<Lowest Priority Flag for Mailbox 2 */
  930. /******************* Bit definition for CAN_RF0R register *******************/
  931. #define CAN_RF0R_FMP0 ((uint32_t)0x00000003U) /*!<FIFO 0 Message Pending */
  932. #define CAN_RF0R_FULL0 ((uint32_t)0x00000008U) /*!<FIFO 0 Full */
  933. #define CAN_RF0R_FOVR0 ((uint32_t)0x00000010U) /*!<FIFO 0 Overrun */
  934. #define CAN_RF0R_RFOM0 ((uint32_t)0x00000020U) /*!<Release FIFO 0 Output Mailbox */
  935. /******************* Bit definition for CAN_RF1R register *******************/
  936. #define CAN_RF1R_FMP1 ((uint32_t)0x00000003U) /*!<FIFO 1 Message Pending */
  937. #define CAN_RF1R_FULL1 ((uint32_t)0x00000008U) /*!<FIFO 1 Full */
  938. #define CAN_RF1R_FOVR1 ((uint32_t)0x00000010U) /*!<FIFO 1 Overrun */
  939. #define CAN_RF1R_RFOM1 ((uint32_t)0x00000020U) /*!<Release FIFO 1 Output Mailbox */
  940. /******************** Bit definition for CAN_IER register *******************/
  941. #define CAN_IER_TMEIE ((uint32_t)0x00000001U) /*!<Transmit Mailbox Empty Interrupt Enable */
  942. #define CAN_IER_FMPIE0 ((uint32_t)0x00000002U) /*!<FIFO Message Pending Interrupt Enable */
  943. #define CAN_IER_FFIE0 ((uint32_t)0x00000004U) /*!<FIFO Full Interrupt Enable */
  944. #define CAN_IER_FOVIE0 ((uint32_t)0x00000008U) /*!<FIFO Overrun Interrupt Enable */
  945. #define CAN_IER_FMPIE1 ((uint32_t)0x00000010U) /*!<FIFO Message Pending Interrupt Enable */
  946. #define CAN_IER_FFIE1 ((uint32_t)0x00000020U) /*!<FIFO Full Interrupt Enable */
  947. #define CAN_IER_FOVIE1 ((uint32_t)0x00000040U) /*!<FIFO Overrun Interrupt Enable */
  948. #define CAN_IER_EWGIE ((uint32_t)0x00000100U) /*!<Error Warning Interrupt Enable */
  949. #define CAN_IER_EPVIE ((uint32_t)0x00000200U) /*!<Error Passive Interrupt Enable */
  950. #define CAN_IER_BOFIE ((uint32_t)0x00000400U) /*!<Bus-Off Interrupt Enable */
  951. #define CAN_IER_LECIE ((uint32_t)0x00000800U) /*!<Last Error Code Interrupt Enable */
  952. #define CAN_IER_ERRIE ((uint32_t)0x00008000U) /*!<Error Interrupt Enable */
  953. #define CAN_IER_WKUIE ((uint32_t)0x00010000U) /*!<Wakeup Interrupt Enable */
  954. #define CAN_IER_SLKIE ((uint32_t)0x00020000U) /*!<Sleep Interrupt Enable */
  955. /******************** Bit definition for CAN_ESR register *******************/
  956. #define CAN_ESR_EWGF ((uint32_t)0x00000001U) /*!<Error Warning Flag */
  957. #define CAN_ESR_EPVF ((uint32_t)0x00000002U) /*!<Error Passive Flag */
  958. #define CAN_ESR_BOFF ((uint32_t)0x00000004U) /*!<Bus-Off Flag */
  959. #define CAN_ESR_LEC ((uint32_t)0x00000070U) /*!<LEC[2:0] bits (Last Error Code) */
  960. #define CAN_ESR_LEC_0 ((uint32_t)0x00000010U) /*!<Bit 0 */
  961. #define CAN_ESR_LEC_1 ((uint32_t)0x00000020U) /*!<Bit 1 */
  962. #define CAN_ESR_LEC_2 ((uint32_t)0x00000040U) /*!<Bit 2 */
  963. #define CAN_ESR_TEC ((uint32_t)0x00FF0000U) /*!<Least significant byte of the 9-bit Transmit Error Counter */
  964. #define CAN_ESR_REC ((uint32_t)0xFF000000U) /*!<Receive Error Counter */
  965. /******************* Bit definition for CAN_BTR register ********************/
  966. #define CAN_BTR_BRP ((uint32_t)0x000003FFU) /*!<Baud Rate Prescaler */
  967. #define CAN_BTR_TS1 ((uint32_t)0x000F0000U) /*!<Time Segment 1 */
  968. #define CAN_BTR_TS1_0 ((uint32_t)0x00010000U) /*!<Time Segment 1 (Bit 0) */
  969. #define CAN_BTR_TS1_1 ((uint32_t)0x00020000U) /*!<Time Segment 1 (Bit 1) */
  970. #define CAN_BTR_TS1_2 ((uint32_t)0x00040000U) /*!<Time Segment 1 (Bit 2) */
  971. #define CAN_BTR_TS1_3 ((uint32_t)0x00080000U) /*!<Time Segment 1 (Bit 3) */
  972. #define CAN_BTR_TS2 ((uint32_t)0x00700000U) /*!<Time Segment 2 */
  973. #define CAN_BTR_TS2_0 ((uint32_t)0x00100000U) /*!<Time Segment 2 (Bit 0) */
  974. #define CAN_BTR_TS2_1 ((uint32_t)0x00200000U) /*!<Time Segment 2 (Bit 1) */
  975. #define CAN_BTR_TS2_2 ((uint32_t)0x00400000U) /*!<Time Segment 2 (Bit 2) */
  976. #define CAN_BTR_SJW ((uint32_t)0x03000000U) /*!<Resynchronization Jump Width */
  977. #define CAN_BTR_SJW_0 ((uint32_t)0x01000000U) /*!<Resynchronization Jump Width (Bit 0) */
  978. #define CAN_BTR_SJW_1 ((uint32_t)0x02000000U) /*!<Resynchronization Jump Width (Bit 1) */
  979. #define CAN_BTR_LBKM ((uint32_t)0x40000000U) /*!<Loop Back Mode (Debug) */
  980. #define CAN_BTR_SILM ((uint32_t)0x80000000U) /*!<Silent Mode */
  981. /*!<Mailbox registers */
  982. /****************** Bit definition for CAN_TI0R register ********************/
  983. #define CAN_TI0R_TXRQ ((uint32_t)0x00000001U) /*!<Transmit Mailbox Request */
  984. #define CAN_TI0R_RTR ((uint32_t)0x00000002U) /*!<Remote Transmission Request */
  985. #define CAN_TI0R_IDE ((uint32_t)0x00000004U) /*!<Identifier Extension */
  986. #define CAN_TI0R_EXID ((uint32_t)0x001FFFF8U) /*!<Extended Identifier */
  987. #define CAN_TI0R_STID ((uint32_t)0xFFE00000U) /*!<Standard Identifier or Extended Identifier */
  988. /****************** Bit definition for CAN_TDT0R register *******************/
  989. #define CAN_TDT0R_DLC ((uint32_t)0x0000000FU) /*!<Data Length Code */
  990. #define CAN_TDT0R_TGT ((uint32_t)0x00000100U) /*!<Transmit Global Time */
  991. #define CAN_TDT0R_TIME ((uint32_t)0xFFFF0000U) /*!<Message Time Stamp */
  992. /****************** Bit definition for CAN_TDL0R register *******************/
  993. #define CAN_TDL0R_DATA0 ((uint32_t)0x000000FFU) /*!<Data byte 0 */
  994. #define CAN_TDL0R_DATA1 ((uint32_t)0x0000FF00U) /*!<Data byte 1 */
  995. #define CAN_TDL0R_DATA2 ((uint32_t)0x00FF0000U) /*!<Data byte 2 */
  996. #define CAN_TDL0R_DATA3 ((uint32_t)0xFF000000U) /*!<Data byte 3 */
  997. /****************** Bit definition for CAN_TDH0R register *******************/
  998. #define CAN_TDH0R_DATA4 ((uint32_t)0x000000FFU) /*!<Data byte 4 */
  999. #define CAN_TDH0R_DATA5 ((uint32_t)0x0000FF00U) /*!<Data byte 5 */
  1000. #define CAN_TDH0R_DATA6 ((uint32_t)0x00FF0000U) /*!<Data byte 6 */
  1001. #define CAN_TDH0R_DATA7 ((uint32_t)0xFF000000U) /*!<Data byte 7 */
  1002. /******************* Bit definition for CAN_TI1R register *******************/
  1003. #define CAN_TI1R_TXRQ ((uint32_t)0x00000001U) /*!<Transmit Mailbox Request */
  1004. #define CAN_TI1R_RTR ((uint32_t)0x00000002U) /*!<Remote Transmission Request */
  1005. #define CAN_TI1R_IDE ((uint32_t)0x00000004U) /*!<Identifier Extension */
  1006. #define CAN_TI1R_EXID ((uint32_t)0x001FFFF8U) /*!<Extended Identifier */
  1007. #define CAN_TI1R_STID ((uint32_t)0xFFE00000U) /*!<Standard Identifier or Extended Identifier */
  1008. /******************* Bit definition for CAN_TDT1R register ******************/
  1009. #define CAN_TDT1R_DLC ((uint32_t)0x0000000FU) /*!<Data Length Code */
  1010. #define CAN_TDT1R_TGT ((uint32_t)0x00000100U) /*!<Transmit Global Time */
  1011. #define CAN_TDT1R_TIME ((uint32_t)0xFFFF0000U) /*!<Message Time Stamp */
  1012. /******************* Bit definition for CAN_TDL1R register ******************/
  1013. #define CAN_TDL1R_DATA0 ((uint32_t)0x000000FFU) /*!<Data byte 0 */
  1014. #define CAN_TDL1R_DATA1 ((uint32_t)0x0000FF00U) /*!<Data byte 1 */
  1015. #define CAN_TDL1R_DATA2 ((uint32_t)0x00FF0000U) /*!<Data byte 2 */
  1016. #define CAN_TDL1R_DATA3 ((uint32_t)0xFF000000U) /*!<Data byte 3 */
  1017. /******************* Bit definition for CAN_TDH1R register ******************/
  1018. #define CAN_TDH1R_DATA4 ((uint32_t)0x000000FFU) /*!<Data byte 4 */
  1019. #define CAN_TDH1R_DATA5 ((uint32_t)0x0000FF00U) /*!<Data byte 5 */
  1020. #define CAN_TDH1R_DATA6 ((uint32_t)0x00FF0000U) /*!<Data byte 6 */
  1021. #define CAN_TDH1R_DATA7 ((uint32_t)0xFF000000U) /*!<Data byte 7 */
  1022. /******************* Bit definition for CAN_TI2R register *******************/
  1023. #define CAN_TI2R_TXRQ ((uint32_t)0x00000001U) /*!<Transmit Mailbox Request */
  1024. #define CAN_TI2R_RTR ((uint32_t)0x00000002U) /*!<Remote Transmission Request */
  1025. #define CAN_TI2R_IDE ((uint32_t)0x00000004U) /*!<Identifier Extension */
  1026. #define CAN_TI2R_EXID ((uint32_t)0x001FFFF8U) /*!<Extended identifier */
  1027. #define CAN_TI2R_STID ((uint32_t)0xFFE00000U) /*!<Standard Identifier or Extended Identifier */
  1028. /******************* Bit definition for CAN_TDT2R register ******************/
  1029. #define CAN_TDT2R_DLC ((uint32_t)0x0000000FU) /*!<Data Length Code */
  1030. #define CAN_TDT2R_TGT ((uint32_t)0x00000100U) /*!<Transmit Global Time */
  1031. #define CAN_TDT2R_TIME ((uint32_t)0xFFFF0000U) /*!<Message Time Stamp */
  1032. /******************* Bit definition for CAN_TDL2R register ******************/
  1033. #define CAN_TDL2R_DATA0 ((uint32_t)0x000000FFU) /*!<Data byte 0 */
  1034. #define CAN_TDL2R_DATA1 ((uint32_t)0x0000FF00U) /*!<Data byte 1 */
  1035. #define CAN_TDL2R_DATA2 ((uint32_t)0x00FF0000U) /*!<Data byte 2 */
  1036. #define CAN_TDL2R_DATA3 ((uint32_t)0xFF000000U) /*!<Data byte 3 */
  1037. /******************* Bit definition for CAN_TDH2R register ******************/
  1038. #define CAN_TDH2R_DATA4 ((uint32_t)0x000000FFU) /*!<Data byte 4 */
  1039. #define CAN_TDH2R_DATA5 ((uint32_t)0x0000FF00U) /*!<Data byte 5 */
  1040. #define CAN_TDH2R_DATA6 ((uint32_t)0x00FF0000U) /*!<Data byte 6 */
  1041. #define CAN_TDH2R_DATA7 ((uint32_t)0xFF000000U) /*!<Data byte 7 */
  1042. /******************* Bit definition for CAN_RI0R register *******************/
  1043. #define CAN_RI0R_RTR ((uint32_t)0x00000002U) /*!<Remote Transmission Request */
  1044. #define CAN_RI0R_IDE ((uint32_t)0x00000004U) /*!<Identifier Extension */
  1045. #define CAN_RI0R_EXID ((uint32_t)0x001FFFF8U) /*!<Extended Identifier */
  1046. #define CAN_RI0R_STID ((uint32_t)0xFFE00000U) /*!<Standard Identifier or Extended Identifier */
  1047. /******************* Bit definition for CAN_RDT0R register ******************/
  1048. #define CAN_RDT0R_DLC ((uint32_t)0x0000000FU) /*!<Data Length Code */
  1049. #define CAN_RDT0R_FMI ((uint32_t)0x0000FF00U) /*!<Filter Match Index */
  1050. #define CAN_RDT0R_TIME ((uint32_t)0xFFFF0000U) /*!<Message Time Stamp */
  1051. /******************* Bit definition for CAN_RDL0R register ******************/
  1052. #define CAN_RDL0R_DATA0 ((uint32_t)0x000000FFU) /*!<Data byte 0 */
  1053. #define CAN_RDL0R_DATA1 ((uint32_t)0x0000FF00U) /*!<Data byte 1 */
  1054. #define CAN_RDL0R_DATA2 ((uint32_t)0x00FF0000U) /*!<Data byte 2 */
  1055. #define CAN_RDL0R_DATA3 ((uint32_t)0xFF000000U) /*!<Data byte 3 */
  1056. /******************* Bit definition for CAN_RDH0R register ******************/
  1057. #define CAN_RDH0R_DATA4 ((uint32_t)0x000000FFU) /*!<Data byte 4 */
  1058. #define CAN_RDH0R_DATA5 ((uint32_t)0x0000FF00U) /*!<Data byte 5 */
  1059. #define CAN_RDH0R_DATA6 ((uint32_t)0x00FF0000U) /*!<Data byte 6 */
  1060. #define CAN_RDH0R_DATA7 ((uint32_t)0xFF000000U) /*!<Data byte 7 */
  1061. /******************* Bit definition for CAN_RI1R register *******************/
  1062. #define CAN_RI1R_RTR ((uint32_t)0x00000002U) /*!<Remote Transmission Request */
  1063. #define CAN_RI1R_IDE ((uint32_t)0x00000004U) /*!<Identifier Extension */
  1064. #define CAN_RI1R_EXID ((uint32_t)0x001FFFF8U) /*!<Extended identifier */
  1065. #define CAN_RI1R_STID ((uint32_t)0xFFE00000U) /*!<Standard Identifier or Extended Identifier */
  1066. /******************* Bit definition for CAN_RDT1R register ******************/
  1067. #define CAN_RDT1R_DLC ((uint32_t)0x0000000FU) /*!<Data Length Code */
  1068. #define CAN_RDT1R_FMI ((uint32_t)0x0000FF00U) /*!<Filter Match Index */
  1069. #define CAN_RDT1R_TIME ((uint32_t)0xFFFF0000U) /*!<Message Time Stamp */
  1070. /******************* Bit definition for CAN_RDL1R register ******************/
  1071. #define CAN_RDL1R_DATA0 ((uint32_t)0x000000FFU) /*!<Data byte 0 */
  1072. #define CAN_RDL1R_DATA1 ((uint32_t)0x0000FF00U) /*!<Data byte 1 */
  1073. #define CAN_RDL1R_DATA2 ((uint32_t)0x00FF0000U) /*!<Data byte 2 */
  1074. #define CAN_RDL1R_DATA3 ((uint32_t)0xFF000000U) /*!<Data byte 3 */
  1075. /******************* Bit definition for CAN_RDH1R register ******************/
  1076. #define CAN_RDH1R_DATA4 ((uint32_t)0x000000FFU) /*!<Data byte 4 */
  1077. #define CAN_RDH1R_DATA5 ((uint32_t)0x0000FF00U) /*!<Data byte 5 */
  1078. #define CAN_RDH1R_DATA6 ((uint32_t)0x00FF0000U) /*!<Data byte 6 */
  1079. #define CAN_RDH1R_DATA7 ((uint32_t)0xFF000000U) /*!<Data byte 7 */
  1080. /*!<CAN filter registers */
  1081. /******************* Bit definition for CAN_FMR register ********************/
  1082. #define CAN_FMR_FINIT ((uint32_t)0x00000001U) /*!<Filter Init Mode */
  1083. #define CAN_FMR_CAN2SB ((uint32_t)0x00003F00U) /*!<CAN2 start bank */
  1084. /******************* Bit definition for CAN_FM1R register *******************/
  1085. #define CAN_FM1R_FBM ((uint32_t)0x0FFFFFFFU) /*!<Filter Mode */
  1086. #define CAN_FM1R_FBM0 ((uint32_t)0x00000001U) /*!<Filter Init Mode bit 0 */
  1087. #define CAN_FM1R_FBM1 ((uint32_t)0x00000002U) /*!<Filter Init Mode bit 1 */
  1088. #define CAN_FM1R_FBM2 ((uint32_t)0x00000004U) /*!<Filter Init Mode bit 2 */
  1089. #define CAN_FM1R_FBM3 ((uint32_t)0x00000008U) /*!<Filter Init Mode bit 3 */
  1090. #define CAN_FM1R_FBM4 ((uint32_t)0x00000010U) /*!<Filter Init Mode bit 4 */
  1091. #define CAN_FM1R_FBM5 ((uint32_t)0x00000020U) /*!<Filter Init Mode bit 5 */
  1092. #define CAN_FM1R_FBM6 ((uint32_t)0x00000040U) /*!<Filter Init Mode bit 6 */
  1093. #define CAN_FM1R_FBM7 ((uint32_t)0x00000080U) /*!<Filter Init Mode bit 7 */
  1094. #define CAN_FM1R_FBM8 ((uint32_t)0x00000100U) /*!<Filter Init Mode bit 8 */
  1095. #define CAN_FM1R_FBM9 ((uint32_t)0x00000200U) /*!<Filter Init Mode bit 9 */
  1096. #define CAN_FM1R_FBM10 ((uint32_t)0x00000400U) /*!<Filter Init Mode bit 10 */
  1097. #define CAN_FM1R_FBM11 ((uint32_t)0x00000800U) /*!<Filter Init Mode bit 11 */
  1098. #define CAN_FM1R_FBM12 ((uint32_t)0x00001000U) /*!<Filter Init Mode bit 12 */
  1099. #define CAN_FM1R_FBM13 ((uint32_t)0x00002000U) /*!<Filter Init Mode bit 13 */
  1100. #define CAN_FM1R_FBM14 ((uint32_t)0x00004000U) /*!<Filter Init Mode bit 14 */
  1101. #define CAN_FM1R_FBM15 ((uint32_t)0x00008000U) /*!<Filter Init Mode bit 15 */
  1102. #define CAN_FM1R_FBM16 ((uint32_t)0x00010000U) /*!<Filter Init Mode bit 16 */
  1103. #define CAN_FM1R_FBM17 ((uint32_t)0x00020000U) /*!<Filter Init Mode bit 17 */
  1104. #define CAN_FM1R_FBM18 ((uint32_t)0x00040000U) /*!<Filter Init Mode bit 18 */
  1105. #define CAN_FM1R_FBM19 ((uint32_t)0x00080000U) /*!<Filter Init Mode bit 19 */
  1106. #define CAN_FM1R_FBM20 ((uint32_t)0x00100000U) /*!<Filter Init Mode bit 20 */
  1107. #define CAN_FM1R_FBM21 ((uint32_t)0x00200000U) /*!<Filter Init Mode bit 21 */
  1108. #define CAN_FM1R_FBM22 ((uint32_t)0x00400000U) /*!<Filter Init Mode bit 22 */
  1109. #define CAN_FM1R_FBM23 ((uint32_t)0x00800000U) /*!<Filter Init Mode bit 23 */
  1110. #define CAN_FM1R_FBM24 ((uint32_t)0x01000000U) /*!<Filter Init Mode bit 24 */
  1111. #define CAN_FM1R_FBM25 ((uint32_t)0x02000000U) /*!<Filter Init Mode bit 25 */
  1112. #define CAN_FM1R_FBM26 ((uint32_t)0x04000000U) /*!<Filter Init Mode bit 26 */
  1113. #define CAN_FM1R_FBM27 ((uint32_t)0x08000000U) /*!<Filter Init Mode bit 27 */
  1114. /******************* Bit definition for CAN_FS1R register *******************/
  1115. #define CAN_FS1R_FSC ((uint32_t)0x0FFFFFFFU) /*!<Filter Scale Configuration */
  1116. #define CAN_FS1R_FSC0 ((uint32_t)0x00000001U) /*!<Filter Scale Configuration bit 0 */
  1117. #define CAN_FS1R_FSC1 ((uint32_t)0x00000002U) /*!<Filter Scale Configuration bit 1 */
  1118. #define CAN_FS1R_FSC2 ((uint32_t)0x00000004U) /*!<Filter Scale Configuration bit 2 */
  1119. #define CAN_FS1R_FSC3 ((uint32_t)0x00000008U) /*!<Filter Scale Configuration bit 3 */
  1120. #define CAN_FS1R_FSC4 ((uint32_t)0x00000010U) /*!<Filter Scale Configuration bit 4 */
  1121. #define CAN_FS1R_FSC5 ((uint32_t)0x00000020U) /*!<Filter Scale Configuration bit 5 */
  1122. #define CAN_FS1R_FSC6 ((uint32_t)0x00000040U) /*!<Filter Scale Configuration bit 6 */
  1123. #define CAN_FS1R_FSC7 ((uint32_t)0x00000080U) /*!<Filter Scale Configuration bit 7 */
  1124. #define CAN_FS1R_FSC8 ((uint32_t)0x00000100U) /*!<Filter Scale Configuration bit 8 */
  1125. #define CAN_FS1R_FSC9 ((uint32_t)0x00000200U) /*!<Filter Scale Configuration bit 9 */
  1126. #define CAN_FS1R_FSC10 ((uint32_t)0x00000400U) /*!<Filter Scale Configuration bit 10 */
  1127. #define CAN_FS1R_FSC11 ((uint32_t)0x00000800U) /*!<Filter Scale Configuration bit 11 */
  1128. #define CAN_FS1R_FSC12 ((uint32_t)0x00001000U) /*!<Filter Scale Configuration bit 12 */
  1129. #define CAN_FS1R_FSC13 ((uint32_t)0x00002000U) /*!<Filter Scale Configuration bit 13 */
  1130. #define CAN_FS1R_FSC14 ((uint32_t)0x00004000U) /*!<Filter Scale Configuration bit 14 */
  1131. #define CAN_FS1R_FSC15 ((uint32_t)0x00008000U) /*!<Filter Scale Configuration bit 15 */
  1132. #define CAN_FS1R_FSC16 ((uint32_t)0x00010000U) /*!<Filter Scale Configuration bit 16 */
  1133. #define CAN_FS1R_FSC17 ((uint32_t)0x00020000U) /*!<Filter Scale Configuration bit 17 */
  1134. #define CAN_FS1R_FSC18 ((uint32_t)0x00040000U) /*!<Filter Scale Configuration bit 18 */
  1135. #define CAN_FS1R_FSC19 ((uint32_t)0x00080000U) /*!<Filter Scale Configuration bit 19 */
  1136. #define CAN_FS1R_FSC20 ((uint32_t)0x00100000U) /*!<Filter Scale Configuration bit 20 */
  1137. #define CAN_FS1R_FSC21 ((uint32_t)0x00200000U) /*!<Filter Scale Configuration bit 21 */
  1138. #define CAN_FS1R_FSC22 ((uint32_t)0x00400000U) /*!<Filter Scale Configuration bit 22 */
  1139. #define CAN_FS1R_FSC23 ((uint32_t)0x00800000U) /*!<Filter Scale Configuration bit 23 */
  1140. #define CAN_FS1R_FSC24 ((uint32_t)0x01000000U) /*!<Filter Scale Configuration bit 24 */
  1141. #define CAN_FS1R_FSC25 ((uint32_t)0x02000000U) /*!<Filter Scale Configuration bit 25 */
  1142. #define CAN_FS1R_FSC26 ((uint32_t)0x04000000U) /*!<Filter Scale Configuration bit 26 */
  1143. #define CAN_FS1R_FSC27 ((uint32_t)0x08000000U) /*!<Filter Scale Configuration bit 27 */
  1144. /****************** Bit definition for CAN_FFA1R register *******************/
  1145. #define CAN_FFA1R_FFA ((uint32_t)0x0FFFFFFFU) /*!<Filter FIFO Assignment */
  1146. #define CAN_FFA1R_FFA0 ((uint32_t)0x00000001U) /*!<Filter FIFO Assignment bit 0 */
  1147. #define CAN_FFA1R_FFA1 ((uint32_t)0x00000002U) /*!<Filter FIFO Assignment bit 1 */
  1148. #define CAN_FFA1R_FFA2 ((uint32_t)0x00000004U) /*!<Filter FIFO Assignment bit 2 */
  1149. #define CAN_FFA1R_FFA3 ((uint32_t)0x00000008U) /*!<Filter FIFO Assignment bit 3 */
  1150. #define CAN_FFA1R_FFA4 ((uint32_t)0x00000010U) /*!<Filter FIFO Assignment bit 4 */
  1151. #define CAN_FFA1R_FFA5 ((uint32_t)0x00000020U) /*!<Filter FIFO Assignment bit 5 */
  1152. #define CAN_FFA1R_FFA6 ((uint32_t)0x00000040U) /*!<Filter FIFO Assignment bit 6 */
  1153. #define CAN_FFA1R_FFA7 ((uint32_t)0x00000080U) /*!<Filter FIFO Assignment bit 7 */
  1154. #define CAN_FFA1R_FFA8 ((uint32_t)0x00000100U) /*!<Filter FIFO Assignment bit 8 */
  1155. #define CAN_FFA1R_FFA9 ((uint32_t)0x00000200U) /*!<Filter FIFO Assignment bit 9 */
  1156. #define CAN_FFA1R_FFA10 ((uint32_t)0x00000400U) /*!<Filter FIFO Assignment bit 10 */
  1157. #define CAN_FFA1R_FFA11 ((uint32_t)0x00000800U) /*!<Filter FIFO Assignment bit 11 */
  1158. #define CAN_FFA1R_FFA12 ((uint32_t)0x00001000U) /*!<Filter FIFO Assignment bit 12 */
  1159. #define CAN_FFA1R_FFA13 ((uint32_t)0x00002000U) /*!<Filter FIFO Assignment bit 13 */
  1160. #define CAN_FFA1R_FFA14 ((uint32_t)0x00004000U) /*!<Filter FIFO Assignment bit 14 */
  1161. #define CAN_FFA1R_FFA15 ((uint32_t)0x00008000U) /*!<Filter FIFO Assignment bit 15 */
  1162. #define CAN_FFA1R_FFA16 ((uint32_t)0x00010000U) /*!<Filter FIFO Assignment bit 16 */
  1163. #define CAN_FFA1R_FFA17 ((uint32_t)0x00020000U) /*!<Filter FIFO Assignment bit 17 */
  1164. #define CAN_FFA1R_FFA18 ((uint32_t)0x00040000U) /*!<Filter FIFO Assignment bit 18 */
  1165. #define CAN_FFA1R_FFA19 ((uint32_t)0x00080000U) /*!<Filter FIFO Assignment bit 19 */
  1166. #define CAN_FFA1R_FFA20 ((uint32_t)0x00100000U) /*!<Filter FIFO Assignment bit 20 */
  1167. #define CAN_FFA1R_FFA21 ((uint32_t)0x00200000U) /*!<Filter FIFO Assignment bit 21 */
  1168. #define CAN_FFA1R_FFA22 ((uint32_t)0x00400000U) /*!<Filter FIFO Assignment bit 22 */
  1169. #define CAN_FFA1R_FFA23 ((uint32_t)0x00800000U) /*!<Filter FIFO Assignment bit 23 */
  1170. #define CAN_FFA1R_FFA24 ((uint32_t)0x01000000U) /*!<Filter FIFO Assignment bit 24 */
  1171. #define CAN_FFA1R_FFA25 ((uint32_t)0x02000000U) /*!<Filter FIFO Assignment bit 25 */
  1172. #define CAN_FFA1R_FFA26 ((uint32_t)0x04000000U) /*!<Filter FIFO Assignment bit 26 */
  1173. #define CAN_FFA1R_FFA27 ((uint32_t)0x08000000U) /*!<Filter FIFO Assignment bit 27 */
  1174. /******************* Bit definition for CAN_FA1R register *******************/
  1175. #define CAN_FA1R_FACT ((uint32_t)0x0FFFFFFFU) /*!<Filter Active */
  1176. #define CAN_FA1R_FACT0 ((uint32_t)0x00000001U) /*!<Filter Active bit 0 */
  1177. #define CAN_FA1R_FACT1 ((uint32_t)0x00000002U) /*!<Filter Active bit 1 */
  1178. #define CAN_FA1R_FACT2 ((uint32_t)0x00000004U) /*!<Filter Active bit 2 */
  1179. #define CAN_FA1R_FACT3 ((uint32_t)0x00000008U) /*!<Filter Active bit 3 */
  1180. #define CAN_FA1R_FACT4 ((uint32_t)0x00000010U) /*!<Filter Active bit 4 */
  1181. #define CAN_FA1R_FACT5 ((uint32_t)0x00000020U) /*!<Filter Active bit 5 */
  1182. #define CAN_FA1R_FACT6 ((uint32_t)0x00000040U) /*!<Filter Active bit 6 */
  1183. #define CAN_FA1R_FACT7 ((uint32_t)0x00000080U) /*!<Filter Active bit 7 */
  1184. #define CAN_FA1R_FACT8 ((uint32_t)0x00000100U) /*!<Filter Active bit 8 */
  1185. #define CAN_FA1R_FACT9 ((uint32_t)0x00000200U) /*!<Filter Active bit 9 */
  1186. #define CAN_FA1R_FACT10 ((uint32_t)0x00000400U) /*!<Filter Active bit 10 */
  1187. #define CAN_FA1R_FACT11 ((uint32_t)0x00000800U) /*!<Filter Active bit 11 */
  1188. #define CAN_FA1R_FACT12 ((uint32_t)0x00001000U) /*!<Filter Active bit 12 */
  1189. #define CAN_FA1R_FACT13 ((uint32_t)0x00002000U) /*!<Filter Active bit 13 */
  1190. #define CAN_FA1R_FACT14 ((uint32_t)0x00004000U) /*!<Filter Active bit 14 */
  1191. #define CAN_FA1R_FACT15 ((uint32_t)0x00008000U) /*!<Filter Active bit 15 */
  1192. #define CAN_FA1R_FACT16 ((uint32_t)0x00010000U) /*!<Filter Active bit 16 */
  1193. #define CAN_FA1R_FACT17 ((uint32_t)0x00020000U) /*!<Filter Active bit 17 */
  1194. #define CAN_FA1R_FACT18 ((uint32_t)0x00040000U) /*!<Filter Active bit 18 */
  1195. #define CAN_FA1R_FACT19 ((uint32_t)0x00080000U) /*!<Filter Active bit 19 */
  1196. #define CAN_FA1R_FACT20 ((uint32_t)0x00100000U) /*!<Filter Active bit 20 */
  1197. #define CAN_FA1R_FACT21 ((uint32_t)0x00200000U) /*!<Filter Active bit 21 */
  1198. #define CAN_FA1R_FACT22 ((uint32_t)0x00400000U) /*!<Filter Active bit 22 */
  1199. #define CAN_FA1R_FACT23 ((uint32_t)0x00800000U) /*!<Filter Active bit 23 */
  1200. #define CAN_FA1R_FACT24 ((uint32_t)0x01000000U) /*!<Filter Active bit 24 */
  1201. #define CAN_FA1R_FACT25 ((uint32_t)0x02000000U) /*!<Filter Active bit 25 */
  1202. #define CAN_FA1R_FACT26 ((uint32_t)0x04000000U) /*!<Filter Active bit 26 */
  1203. #define CAN_FA1R_FACT27 ((uint32_t)0x08000000U) /*!<Filter Active bit 27 */
  1204. /******************* Bit definition for CAN_F0R1 register *******************/
  1205. #define CAN_F0R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1206. #define CAN_F0R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1207. #define CAN_F0R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1208. #define CAN_F0R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1209. #define CAN_F0R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1210. #define CAN_F0R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1211. #define CAN_F0R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1212. #define CAN_F0R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1213. #define CAN_F0R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1214. #define CAN_F0R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1215. #define CAN_F0R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1216. #define CAN_F0R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1217. #define CAN_F0R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1218. #define CAN_F0R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1219. #define CAN_F0R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1220. #define CAN_F0R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1221. #define CAN_F0R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1222. #define CAN_F0R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1223. #define CAN_F0R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1224. #define CAN_F0R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1225. #define CAN_F0R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1226. #define CAN_F0R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1227. #define CAN_F0R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1228. #define CAN_F0R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1229. #define CAN_F0R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1230. #define CAN_F0R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1231. #define CAN_F0R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1232. #define CAN_F0R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1233. #define CAN_F0R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1234. #define CAN_F0R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1235. #define CAN_F0R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1236. #define CAN_F0R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1237. /******************* Bit definition for CAN_F1R1 register *******************/
  1238. #define CAN_F1R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1239. #define CAN_F1R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1240. #define CAN_F1R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1241. #define CAN_F1R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1242. #define CAN_F1R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1243. #define CAN_F1R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1244. #define CAN_F1R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1245. #define CAN_F1R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1246. #define CAN_F1R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1247. #define CAN_F1R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1248. #define CAN_F1R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1249. #define CAN_F1R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1250. #define CAN_F1R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1251. #define CAN_F1R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1252. #define CAN_F1R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1253. #define CAN_F1R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1254. #define CAN_F1R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1255. #define CAN_F1R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1256. #define CAN_F1R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1257. #define CAN_F1R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1258. #define CAN_F1R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1259. #define CAN_F1R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1260. #define CAN_F1R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1261. #define CAN_F1R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1262. #define CAN_F1R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1263. #define CAN_F1R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1264. #define CAN_F1R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1265. #define CAN_F1R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1266. #define CAN_F1R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1267. #define CAN_F1R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1268. #define CAN_F1R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1269. #define CAN_F1R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1270. /******************* Bit definition for CAN_F2R1 register *******************/
  1271. #define CAN_F2R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1272. #define CAN_F2R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1273. #define CAN_F2R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1274. #define CAN_F2R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1275. #define CAN_F2R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1276. #define CAN_F2R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1277. #define CAN_F2R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1278. #define CAN_F2R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1279. #define CAN_F2R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1280. #define CAN_F2R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1281. #define CAN_F2R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1282. #define CAN_F2R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1283. #define CAN_F2R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1284. #define CAN_F2R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1285. #define CAN_F2R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1286. #define CAN_F2R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1287. #define CAN_F2R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1288. #define CAN_F2R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1289. #define CAN_F2R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1290. #define CAN_F2R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1291. #define CAN_F2R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1292. #define CAN_F2R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1293. #define CAN_F2R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1294. #define CAN_F2R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1295. #define CAN_F2R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1296. #define CAN_F2R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1297. #define CAN_F2R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1298. #define CAN_F2R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1299. #define CAN_F2R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1300. #define CAN_F2R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1301. #define CAN_F2R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1302. #define CAN_F2R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1303. /******************* Bit definition for CAN_F3R1 register *******************/
  1304. #define CAN_F3R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1305. #define CAN_F3R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1306. #define CAN_F3R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1307. #define CAN_F3R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1308. #define CAN_F3R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1309. #define CAN_F3R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1310. #define CAN_F3R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1311. #define CAN_F3R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1312. #define CAN_F3R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1313. #define CAN_F3R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1314. #define CAN_F3R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1315. #define CAN_F3R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1316. #define CAN_F3R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1317. #define CAN_F3R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1318. #define CAN_F3R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1319. #define CAN_F3R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1320. #define CAN_F3R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1321. #define CAN_F3R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1322. #define CAN_F3R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1323. #define CAN_F3R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1324. #define CAN_F3R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1325. #define CAN_F3R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1326. #define CAN_F3R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1327. #define CAN_F3R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1328. #define CAN_F3R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1329. #define CAN_F3R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1330. #define CAN_F3R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1331. #define CAN_F3R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1332. #define CAN_F3R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1333. #define CAN_F3R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1334. #define CAN_F3R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1335. #define CAN_F3R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1336. /******************* Bit definition for CAN_F4R1 register *******************/
  1337. #define CAN_F4R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1338. #define CAN_F4R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1339. #define CAN_F4R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1340. #define CAN_F4R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1341. #define CAN_F4R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1342. #define CAN_F4R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1343. #define CAN_F4R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1344. #define CAN_F4R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1345. #define CAN_F4R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1346. #define CAN_F4R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1347. #define CAN_F4R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1348. #define CAN_F4R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1349. #define CAN_F4R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1350. #define CAN_F4R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1351. #define CAN_F4R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1352. #define CAN_F4R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1353. #define CAN_F4R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1354. #define CAN_F4R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1355. #define CAN_F4R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1356. #define CAN_F4R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1357. #define CAN_F4R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1358. #define CAN_F4R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1359. #define CAN_F4R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1360. #define CAN_F4R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1361. #define CAN_F4R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1362. #define CAN_F4R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1363. #define CAN_F4R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1364. #define CAN_F4R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1365. #define CAN_F4R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1366. #define CAN_F4R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1367. #define CAN_F4R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1368. #define CAN_F4R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1369. /******************* Bit definition for CAN_F5R1 register *******************/
  1370. #define CAN_F5R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1371. #define CAN_F5R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1372. #define CAN_F5R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1373. #define CAN_F5R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1374. #define CAN_F5R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1375. #define CAN_F5R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1376. #define CAN_F5R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1377. #define CAN_F5R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1378. #define CAN_F5R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1379. #define CAN_F5R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1380. #define CAN_F5R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1381. #define CAN_F5R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1382. #define CAN_F5R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1383. #define CAN_F5R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1384. #define CAN_F5R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1385. #define CAN_F5R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1386. #define CAN_F5R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1387. #define CAN_F5R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1388. #define CAN_F5R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1389. #define CAN_F5R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1390. #define CAN_F5R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1391. #define CAN_F5R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1392. #define CAN_F5R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1393. #define CAN_F5R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1394. #define CAN_F5R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1395. #define CAN_F5R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1396. #define CAN_F5R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1397. #define CAN_F5R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1398. #define CAN_F5R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1399. #define CAN_F5R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1400. #define CAN_F5R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1401. #define CAN_F5R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1402. /******************* Bit definition for CAN_F6R1 register *******************/
  1403. #define CAN_F6R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1404. #define CAN_F6R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1405. #define CAN_F6R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1406. #define CAN_F6R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1407. #define CAN_F6R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1408. #define CAN_F6R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1409. #define CAN_F6R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1410. #define CAN_F6R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1411. #define CAN_F6R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1412. #define CAN_F6R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1413. #define CAN_F6R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1414. #define CAN_F6R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1415. #define CAN_F6R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1416. #define CAN_F6R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1417. #define CAN_F6R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1418. #define CAN_F6R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1419. #define CAN_F6R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1420. #define CAN_F6R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1421. #define CAN_F6R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1422. #define CAN_F6R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1423. #define CAN_F6R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1424. #define CAN_F6R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1425. #define CAN_F6R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1426. #define CAN_F6R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1427. #define CAN_F6R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1428. #define CAN_F6R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1429. #define CAN_F6R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1430. #define CAN_F6R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1431. #define CAN_F6R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1432. #define CAN_F6R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1433. #define CAN_F6R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1434. #define CAN_F6R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1435. /******************* Bit definition for CAN_F7R1 register *******************/
  1436. #define CAN_F7R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1437. #define CAN_F7R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1438. #define CAN_F7R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1439. #define CAN_F7R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1440. #define CAN_F7R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1441. #define CAN_F7R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1442. #define CAN_F7R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1443. #define CAN_F7R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1444. #define CAN_F7R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1445. #define CAN_F7R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1446. #define CAN_F7R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1447. #define CAN_F7R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1448. #define CAN_F7R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1449. #define CAN_F7R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1450. #define CAN_F7R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1451. #define CAN_F7R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1452. #define CAN_F7R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1453. #define CAN_F7R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1454. #define CAN_F7R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1455. #define CAN_F7R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1456. #define CAN_F7R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1457. #define CAN_F7R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1458. #define CAN_F7R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1459. #define CAN_F7R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1460. #define CAN_F7R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1461. #define CAN_F7R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1462. #define CAN_F7R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1463. #define CAN_F7R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1464. #define CAN_F7R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1465. #define CAN_F7R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1466. #define CAN_F7R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1467. #define CAN_F7R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1468. /******************* Bit definition for CAN_F8R1 register *******************/
  1469. #define CAN_F8R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1470. #define CAN_F8R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1471. #define CAN_F8R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1472. #define CAN_F8R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1473. #define CAN_F8R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1474. #define CAN_F8R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1475. #define CAN_F8R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1476. #define CAN_F8R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1477. #define CAN_F8R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1478. #define CAN_F8R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1479. #define CAN_F8R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1480. #define CAN_F8R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1481. #define CAN_F8R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1482. #define CAN_F8R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1483. #define CAN_F8R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1484. #define CAN_F8R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1485. #define CAN_F8R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1486. #define CAN_F8R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1487. #define CAN_F8R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1488. #define CAN_F8R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1489. #define CAN_F8R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1490. #define CAN_F8R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1491. #define CAN_F8R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1492. #define CAN_F8R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1493. #define CAN_F8R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1494. #define CAN_F8R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1495. #define CAN_F8R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1496. #define CAN_F8R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1497. #define CAN_F8R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1498. #define CAN_F8R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1499. #define CAN_F8R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1500. #define CAN_F8R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1501. /******************* Bit definition for CAN_F9R1 register *******************/
  1502. #define CAN_F9R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1503. #define CAN_F9R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1504. #define CAN_F9R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1505. #define CAN_F9R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1506. #define CAN_F9R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1507. #define CAN_F9R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1508. #define CAN_F9R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1509. #define CAN_F9R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1510. #define CAN_F9R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1511. #define CAN_F9R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1512. #define CAN_F9R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1513. #define CAN_F9R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1514. #define CAN_F9R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1515. #define CAN_F9R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1516. #define CAN_F9R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1517. #define CAN_F9R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1518. #define CAN_F9R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1519. #define CAN_F9R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1520. #define CAN_F9R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1521. #define CAN_F9R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1522. #define CAN_F9R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1523. #define CAN_F9R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1524. #define CAN_F9R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1525. #define CAN_F9R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1526. #define CAN_F9R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1527. #define CAN_F9R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1528. #define CAN_F9R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1529. #define CAN_F9R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1530. #define CAN_F9R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1531. #define CAN_F9R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1532. #define CAN_F9R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1533. #define CAN_F9R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1534. /******************* Bit definition for CAN_F10R1 register ******************/
  1535. #define CAN_F10R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1536. #define CAN_F10R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1537. #define CAN_F10R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1538. #define CAN_F10R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1539. #define CAN_F10R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1540. #define CAN_F10R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1541. #define CAN_F10R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1542. #define CAN_F10R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1543. #define CAN_F10R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1544. #define CAN_F10R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1545. #define CAN_F10R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1546. #define CAN_F10R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1547. #define CAN_F10R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1548. #define CAN_F10R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1549. #define CAN_F10R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1550. #define CAN_F10R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1551. #define CAN_F10R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1552. #define CAN_F10R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1553. #define CAN_F10R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1554. #define CAN_F10R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1555. #define CAN_F10R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1556. #define CAN_F10R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1557. #define CAN_F10R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1558. #define CAN_F10R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1559. #define CAN_F10R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1560. #define CAN_F10R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1561. #define CAN_F10R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1562. #define CAN_F10R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1563. #define CAN_F10R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1564. #define CAN_F10R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1565. #define CAN_F10R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1566. #define CAN_F10R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1567. /******************* Bit definition for CAN_F11R1 register ******************/
  1568. #define CAN_F11R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1569. #define CAN_F11R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1570. #define CAN_F11R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1571. #define CAN_F11R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1572. #define CAN_F11R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1573. #define CAN_F11R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1574. #define CAN_F11R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1575. #define CAN_F11R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1576. #define CAN_F11R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1577. #define CAN_F11R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1578. #define CAN_F11R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1579. #define CAN_F11R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1580. #define CAN_F11R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1581. #define CAN_F11R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1582. #define CAN_F11R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1583. #define CAN_F11R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1584. #define CAN_F11R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1585. #define CAN_F11R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1586. #define CAN_F11R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1587. #define CAN_F11R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1588. #define CAN_F11R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1589. #define CAN_F11R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1590. #define CAN_F11R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1591. #define CAN_F11R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1592. #define CAN_F11R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1593. #define CAN_F11R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1594. #define CAN_F11R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1595. #define CAN_F11R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1596. #define CAN_F11R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1597. #define CAN_F11R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1598. #define CAN_F11R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1599. #define CAN_F11R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1600. /******************* Bit definition for CAN_F12R1 register ******************/
  1601. #define CAN_F12R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1602. #define CAN_F12R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1603. #define CAN_F12R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1604. #define CAN_F12R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1605. #define CAN_F12R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1606. #define CAN_F12R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1607. #define CAN_F12R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1608. #define CAN_F12R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1609. #define CAN_F12R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1610. #define CAN_F12R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1611. #define CAN_F12R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1612. #define CAN_F12R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1613. #define CAN_F12R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1614. #define CAN_F12R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1615. #define CAN_F12R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1616. #define CAN_F12R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1617. #define CAN_F12R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1618. #define CAN_F12R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1619. #define CAN_F12R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1620. #define CAN_F12R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1621. #define CAN_F12R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1622. #define CAN_F12R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1623. #define CAN_F12R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1624. #define CAN_F12R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1625. #define CAN_F12R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1626. #define CAN_F12R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1627. #define CAN_F12R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1628. #define CAN_F12R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1629. #define CAN_F12R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1630. #define CAN_F12R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1631. #define CAN_F12R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1632. #define CAN_F12R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1633. /******************* Bit definition for CAN_F13R1 register ******************/
  1634. #define CAN_F13R1_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1635. #define CAN_F13R1_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1636. #define CAN_F13R1_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1637. #define CAN_F13R1_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1638. #define CAN_F13R1_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1639. #define CAN_F13R1_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1640. #define CAN_F13R1_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1641. #define CAN_F13R1_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1642. #define CAN_F13R1_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1643. #define CAN_F13R1_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1644. #define CAN_F13R1_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1645. #define CAN_F13R1_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1646. #define CAN_F13R1_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1647. #define CAN_F13R1_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1648. #define CAN_F13R1_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1649. #define CAN_F13R1_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1650. #define CAN_F13R1_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1651. #define CAN_F13R1_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1652. #define CAN_F13R1_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1653. #define CAN_F13R1_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1654. #define CAN_F13R1_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1655. #define CAN_F13R1_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1656. #define CAN_F13R1_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1657. #define CAN_F13R1_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1658. #define CAN_F13R1_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1659. #define CAN_F13R1_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1660. #define CAN_F13R1_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1661. #define CAN_F13R1_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1662. #define CAN_F13R1_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1663. #define CAN_F13R1_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1664. #define CAN_F13R1_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1665. #define CAN_F13R1_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1666. /******************* Bit definition for CAN_F0R2 register *******************/
  1667. #define CAN_F0R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1668. #define CAN_F0R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1669. #define CAN_F0R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1670. #define CAN_F0R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1671. #define CAN_F0R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1672. #define CAN_F0R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1673. #define CAN_F0R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1674. #define CAN_F0R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1675. #define CAN_F0R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1676. #define CAN_F0R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1677. #define CAN_F0R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1678. #define CAN_F0R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1679. #define CAN_F0R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1680. #define CAN_F0R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1681. #define CAN_F0R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1682. #define CAN_F0R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1683. #define CAN_F0R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1684. #define CAN_F0R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1685. #define CAN_F0R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1686. #define CAN_F0R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1687. #define CAN_F0R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1688. #define CAN_F0R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1689. #define CAN_F0R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1690. #define CAN_F0R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1691. #define CAN_F0R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1692. #define CAN_F0R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1693. #define CAN_F0R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1694. #define CAN_F0R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1695. #define CAN_F0R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1696. #define CAN_F0R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1697. #define CAN_F0R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1698. #define CAN_F0R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1699. /******************* Bit definition for CAN_F1R2 register *******************/
  1700. #define CAN_F1R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1701. #define CAN_F1R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1702. #define CAN_F1R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1703. #define CAN_F1R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1704. #define CAN_F1R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1705. #define CAN_F1R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1706. #define CAN_F1R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1707. #define CAN_F1R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1708. #define CAN_F1R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1709. #define CAN_F1R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1710. #define CAN_F1R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1711. #define CAN_F1R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1712. #define CAN_F1R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1713. #define CAN_F1R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1714. #define CAN_F1R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1715. #define CAN_F1R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1716. #define CAN_F1R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1717. #define CAN_F1R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1718. #define CAN_F1R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1719. #define CAN_F1R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1720. #define CAN_F1R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1721. #define CAN_F1R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1722. #define CAN_F1R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1723. #define CAN_F1R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1724. #define CAN_F1R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1725. #define CAN_F1R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1726. #define CAN_F1R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1727. #define CAN_F1R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1728. #define CAN_F1R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1729. #define CAN_F1R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1730. #define CAN_F1R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1731. #define CAN_F1R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1732. /******************* Bit definition for CAN_F2R2 register *******************/
  1733. #define CAN_F2R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1734. #define CAN_F2R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1735. #define CAN_F2R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1736. #define CAN_F2R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1737. #define CAN_F2R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1738. #define CAN_F2R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1739. #define CAN_F2R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1740. #define CAN_F2R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1741. #define CAN_F2R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1742. #define CAN_F2R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1743. #define CAN_F2R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1744. #define CAN_F2R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1745. #define CAN_F2R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1746. #define CAN_F2R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1747. #define CAN_F2R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1748. #define CAN_F2R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1749. #define CAN_F2R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1750. #define CAN_F2R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1751. #define CAN_F2R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1752. #define CAN_F2R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1753. #define CAN_F2R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1754. #define CAN_F2R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1755. #define CAN_F2R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1756. #define CAN_F2R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1757. #define CAN_F2R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1758. #define CAN_F2R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1759. #define CAN_F2R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1760. #define CAN_F2R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1761. #define CAN_F2R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1762. #define CAN_F2R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1763. #define CAN_F2R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1764. #define CAN_F2R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1765. /******************* Bit definition for CAN_F3R2 register *******************/
  1766. #define CAN_F3R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1767. #define CAN_F3R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1768. #define CAN_F3R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1769. #define CAN_F3R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1770. #define CAN_F3R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1771. #define CAN_F3R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1772. #define CAN_F3R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1773. #define CAN_F3R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1774. #define CAN_F3R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1775. #define CAN_F3R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1776. #define CAN_F3R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1777. #define CAN_F3R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1778. #define CAN_F3R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1779. #define CAN_F3R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1780. #define CAN_F3R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1781. #define CAN_F3R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1782. #define CAN_F3R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1783. #define CAN_F3R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1784. #define CAN_F3R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1785. #define CAN_F3R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1786. #define CAN_F3R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1787. #define CAN_F3R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1788. #define CAN_F3R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1789. #define CAN_F3R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1790. #define CAN_F3R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1791. #define CAN_F3R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1792. #define CAN_F3R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1793. #define CAN_F3R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1794. #define CAN_F3R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1795. #define CAN_F3R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1796. #define CAN_F3R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1797. #define CAN_F3R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1798. /******************* Bit definition for CAN_F4R2 register *******************/
  1799. #define CAN_F4R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1800. #define CAN_F4R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1801. #define CAN_F4R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1802. #define CAN_F4R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1803. #define CAN_F4R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1804. #define CAN_F4R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1805. #define CAN_F4R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1806. #define CAN_F4R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1807. #define CAN_F4R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1808. #define CAN_F4R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1809. #define CAN_F4R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1810. #define CAN_F4R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1811. #define CAN_F4R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1812. #define CAN_F4R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1813. #define CAN_F4R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1814. #define CAN_F4R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1815. #define CAN_F4R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1816. #define CAN_F4R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1817. #define CAN_F4R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1818. #define CAN_F4R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1819. #define CAN_F4R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1820. #define CAN_F4R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1821. #define CAN_F4R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1822. #define CAN_F4R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1823. #define CAN_F4R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1824. #define CAN_F4R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1825. #define CAN_F4R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1826. #define CAN_F4R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1827. #define CAN_F4R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1828. #define CAN_F4R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1829. #define CAN_F4R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1830. #define CAN_F4R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1831. /******************* Bit definition for CAN_F5R2 register *******************/
  1832. #define CAN_F5R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1833. #define CAN_F5R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1834. #define CAN_F5R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1835. #define CAN_F5R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1836. #define CAN_F5R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1837. #define CAN_F5R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1838. #define CAN_F5R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1839. #define CAN_F5R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1840. #define CAN_F5R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1841. #define CAN_F5R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1842. #define CAN_F5R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1843. #define CAN_F5R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1844. #define CAN_F5R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1845. #define CAN_F5R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1846. #define CAN_F5R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1847. #define CAN_F5R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1848. #define CAN_F5R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1849. #define CAN_F5R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1850. #define CAN_F5R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1851. #define CAN_F5R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1852. #define CAN_F5R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1853. #define CAN_F5R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1854. #define CAN_F5R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1855. #define CAN_F5R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1856. #define CAN_F5R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1857. #define CAN_F5R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1858. #define CAN_F5R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1859. #define CAN_F5R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1860. #define CAN_F5R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1861. #define CAN_F5R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1862. #define CAN_F5R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1863. #define CAN_F5R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1864. /******************* Bit definition for CAN_F6R2 register *******************/
  1865. #define CAN_F6R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1866. #define CAN_F6R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1867. #define CAN_F6R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1868. #define CAN_F6R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1869. #define CAN_F6R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1870. #define CAN_F6R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1871. #define CAN_F6R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1872. #define CAN_F6R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1873. #define CAN_F6R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1874. #define CAN_F6R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1875. #define CAN_F6R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1876. #define CAN_F6R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1877. #define CAN_F6R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1878. #define CAN_F6R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1879. #define CAN_F6R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1880. #define CAN_F6R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1881. #define CAN_F6R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1882. #define CAN_F6R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1883. #define CAN_F6R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1884. #define CAN_F6R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1885. #define CAN_F6R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1886. #define CAN_F6R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1887. #define CAN_F6R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1888. #define CAN_F6R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1889. #define CAN_F6R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1890. #define CAN_F6R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1891. #define CAN_F6R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1892. #define CAN_F6R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1893. #define CAN_F6R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1894. #define CAN_F6R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1895. #define CAN_F6R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1896. #define CAN_F6R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1897. /******************* Bit definition for CAN_F7R2 register *******************/
  1898. #define CAN_F7R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1899. #define CAN_F7R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1900. #define CAN_F7R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1901. #define CAN_F7R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1902. #define CAN_F7R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1903. #define CAN_F7R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1904. #define CAN_F7R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1905. #define CAN_F7R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1906. #define CAN_F7R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1907. #define CAN_F7R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1908. #define CAN_F7R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1909. #define CAN_F7R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1910. #define CAN_F7R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1911. #define CAN_F7R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1912. #define CAN_F7R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1913. #define CAN_F7R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1914. #define CAN_F7R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1915. #define CAN_F7R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1916. #define CAN_F7R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1917. #define CAN_F7R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1918. #define CAN_F7R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1919. #define CAN_F7R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1920. #define CAN_F7R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1921. #define CAN_F7R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1922. #define CAN_F7R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1923. #define CAN_F7R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1924. #define CAN_F7R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1925. #define CAN_F7R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1926. #define CAN_F7R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1927. #define CAN_F7R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1928. #define CAN_F7R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1929. #define CAN_F7R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1930. /******************* Bit definition for CAN_F8R2 register *******************/
  1931. #define CAN_F8R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1932. #define CAN_F8R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1933. #define CAN_F8R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1934. #define CAN_F8R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1935. #define CAN_F8R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1936. #define CAN_F8R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1937. #define CAN_F8R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1938. #define CAN_F8R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1939. #define CAN_F8R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1940. #define CAN_F8R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1941. #define CAN_F8R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1942. #define CAN_F8R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1943. #define CAN_F8R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1944. #define CAN_F8R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1945. #define CAN_F8R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1946. #define CAN_F8R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1947. #define CAN_F8R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1948. #define CAN_F8R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1949. #define CAN_F8R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1950. #define CAN_F8R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1951. #define CAN_F8R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1952. #define CAN_F8R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1953. #define CAN_F8R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1954. #define CAN_F8R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1955. #define CAN_F8R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1956. #define CAN_F8R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1957. #define CAN_F8R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1958. #define CAN_F8R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1959. #define CAN_F8R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1960. #define CAN_F8R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1961. #define CAN_F8R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1962. #define CAN_F8R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1963. /******************* Bit definition for CAN_F9R2 register *******************/
  1964. #define CAN_F9R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1965. #define CAN_F9R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1966. #define CAN_F9R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  1967. #define CAN_F9R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  1968. #define CAN_F9R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  1969. #define CAN_F9R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  1970. #define CAN_F9R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  1971. #define CAN_F9R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  1972. #define CAN_F9R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  1973. #define CAN_F9R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  1974. #define CAN_F9R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  1975. #define CAN_F9R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  1976. #define CAN_F9R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  1977. #define CAN_F9R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  1978. #define CAN_F9R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  1979. #define CAN_F9R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  1980. #define CAN_F9R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  1981. #define CAN_F9R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  1982. #define CAN_F9R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  1983. #define CAN_F9R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  1984. #define CAN_F9R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  1985. #define CAN_F9R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  1986. #define CAN_F9R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  1987. #define CAN_F9R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  1988. #define CAN_F9R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  1989. #define CAN_F9R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  1990. #define CAN_F9R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  1991. #define CAN_F9R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  1992. #define CAN_F9R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  1993. #define CAN_F9R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  1994. #define CAN_F9R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  1995. #define CAN_F9R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  1996. /******************* Bit definition for CAN_F10R2 register ******************/
  1997. #define CAN_F10R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  1998. #define CAN_F10R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  1999. #define CAN_F10R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  2000. #define CAN_F10R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  2001. #define CAN_F10R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  2002. #define CAN_F10R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  2003. #define CAN_F10R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  2004. #define CAN_F10R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  2005. #define CAN_F10R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  2006. #define CAN_F10R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  2007. #define CAN_F10R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  2008. #define CAN_F10R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  2009. #define CAN_F10R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  2010. #define CAN_F10R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  2011. #define CAN_F10R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  2012. #define CAN_F10R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  2013. #define CAN_F10R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  2014. #define CAN_F10R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  2015. #define CAN_F10R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  2016. #define CAN_F10R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  2017. #define CAN_F10R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  2018. #define CAN_F10R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  2019. #define CAN_F10R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  2020. #define CAN_F10R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  2021. #define CAN_F10R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  2022. #define CAN_F10R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  2023. #define CAN_F10R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  2024. #define CAN_F10R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  2025. #define CAN_F10R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  2026. #define CAN_F10R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  2027. #define CAN_F10R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  2028. #define CAN_F10R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  2029. /******************* Bit definition for CAN_F11R2 register ******************/
  2030. #define CAN_F11R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  2031. #define CAN_F11R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  2032. #define CAN_F11R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  2033. #define CAN_F11R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  2034. #define CAN_F11R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  2035. #define CAN_F11R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  2036. #define CAN_F11R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  2037. #define CAN_F11R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  2038. #define CAN_F11R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  2039. #define CAN_F11R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  2040. #define CAN_F11R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  2041. #define CAN_F11R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  2042. #define CAN_F11R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  2043. #define CAN_F11R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  2044. #define CAN_F11R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  2045. #define CAN_F11R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  2046. #define CAN_F11R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  2047. #define CAN_F11R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  2048. #define CAN_F11R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  2049. #define CAN_F11R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  2050. #define CAN_F11R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  2051. #define CAN_F11R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  2052. #define CAN_F11R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  2053. #define CAN_F11R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  2054. #define CAN_F11R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  2055. #define CAN_F11R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  2056. #define CAN_F11R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  2057. #define CAN_F11R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  2058. #define CAN_F11R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  2059. #define CAN_F11R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  2060. #define CAN_F11R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  2061. #define CAN_F11R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  2062. /******************* Bit definition for CAN_F12R2 register ******************/
  2063. #define CAN_F12R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  2064. #define CAN_F12R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  2065. #define CAN_F12R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  2066. #define CAN_F12R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  2067. #define CAN_F12R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  2068. #define CAN_F12R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  2069. #define CAN_F12R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  2070. #define CAN_F12R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  2071. #define CAN_F12R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  2072. #define CAN_F12R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  2073. #define CAN_F12R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  2074. #define CAN_F12R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  2075. #define CAN_F12R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  2076. #define CAN_F12R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  2077. #define CAN_F12R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  2078. #define CAN_F12R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  2079. #define CAN_F12R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  2080. #define CAN_F12R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  2081. #define CAN_F12R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  2082. #define CAN_F12R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  2083. #define CAN_F12R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  2084. #define CAN_F12R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  2085. #define CAN_F12R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  2086. #define CAN_F12R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  2087. #define CAN_F12R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  2088. #define CAN_F12R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  2089. #define CAN_F12R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  2090. #define CAN_F12R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  2091. #define CAN_F12R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  2092. #define CAN_F12R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  2093. #define CAN_F12R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  2094. #define CAN_F12R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  2095. /******************* Bit definition for CAN_F13R2 register ******************/
  2096. #define CAN_F13R2_FB0 ((uint32_t)0x00000001U) /*!<Filter bit 0 */
  2097. #define CAN_F13R2_FB1 ((uint32_t)0x00000002U) /*!<Filter bit 1 */
  2098. #define CAN_F13R2_FB2 ((uint32_t)0x00000004U) /*!<Filter bit 2 */
  2099. #define CAN_F13R2_FB3 ((uint32_t)0x00000008U) /*!<Filter bit 3 */
  2100. #define CAN_F13R2_FB4 ((uint32_t)0x00000010U) /*!<Filter bit 4 */
  2101. #define CAN_F13R2_FB5 ((uint32_t)0x00000020U) /*!<Filter bit 5 */
  2102. #define CAN_F13R2_FB6 ((uint32_t)0x00000040U) /*!<Filter bit 6 */
  2103. #define CAN_F13R2_FB7 ((uint32_t)0x00000080U) /*!<Filter bit 7 */
  2104. #define CAN_F13R2_FB8 ((uint32_t)0x00000100U) /*!<Filter bit 8 */
  2105. #define CAN_F13R2_FB9 ((uint32_t)0x00000200U) /*!<Filter bit 9 */
  2106. #define CAN_F13R2_FB10 ((uint32_t)0x00000400U) /*!<Filter bit 10 */
  2107. #define CAN_F13R2_FB11 ((uint32_t)0x00000800U) /*!<Filter bit 11 */
  2108. #define CAN_F13R2_FB12 ((uint32_t)0x00001000U) /*!<Filter bit 12 */
  2109. #define CAN_F13R2_FB13 ((uint32_t)0x00002000U) /*!<Filter bit 13 */
  2110. #define CAN_F13R2_FB14 ((uint32_t)0x00004000U) /*!<Filter bit 14 */
  2111. #define CAN_F13R2_FB15 ((uint32_t)0x00008000U) /*!<Filter bit 15 */
  2112. #define CAN_F13R2_FB16 ((uint32_t)0x00010000U) /*!<Filter bit 16 */
  2113. #define CAN_F13R2_FB17 ((uint32_t)0x00020000U) /*!<Filter bit 17 */
  2114. #define CAN_F13R2_FB18 ((uint32_t)0x00040000U) /*!<Filter bit 18 */
  2115. #define CAN_F13R2_FB19 ((uint32_t)0x00080000U) /*!<Filter bit 19 */
  2116. #define CAN_F13R2_FB20 ((uint32_t)0x00100000U) /*!<Filter bit 20 */
  2117. #define CAN_F13R2_FB21 ((uint32_t)0x00200000U) /*!<Filter bit 21 */
  2118. #define CAN_F13R2_FB22 ((uint32_t)0x00400000U) /*!<Filter bit 22 */
  2119. #define CAN_F13R2_FB23 ((uint32_t)0x00800000U) /*!<Filter bit 23 */
  2120. #define CAN_F13R2_FB24 ((uint32_t)0x01000000U) /*!<Filter bit 24 */
  2121. #define CAN_F13R2_FB25 ((uint32_t)0x02000000U) /*!<Filter bit 25 */
  2122. #define CAN_F13R2_FB26 ((uint32_t)0x04000000U) /*!<Filter bit 26 */
  2123. #define CAN_F13R2_FB27 ((uint32_t)0x08000000U) /*!<Filter bit 27 */
  2124. #define CAN_F13R2_FB28 ((uint32_t)0x10000000U) /*!<Filter bit 28 */
  2125. #define CAN_F13R2_FB29 ((uint32_t)0x20000000U) /*!<Filter bit 29 */
  2126. #define CAN_F13R2_FB30 ((uint32_t)0x40000000U) /*!<Filter bit 30 */
  2127. #define CAN_F13R2_FB31 ((uint32_t)0x80000000U) /*!<Filter bit 31 */
  2128. /******************************************************************************/
  2129. /* */
  2130. /* HDMI-CEC (CEC) */
  2131. /* */
  2132. /******************************************************************************/
  2133. /******************* Bit definition for CEC_CR register *********************/
  2134. #define CEC_CR_CECEN ((uint32_t)0x00000001U) /*!< CEC Enable */
  2135. #define CEC_CR_TXSOM ((uint32_t)0x00000002U) /*!< CEC Tx Start Of Message */
  2136. #define CEC_CR_TXEOM ((uint32_t)0x00000004U) /*!< CEC Tx End Of Message */
  2137. /******************* Bit definition for CEC_CFGR register *******************/
  2138. #define CEC_CFGR_SFT ((uint32_t)0x00000007U) /*!< CEC Signal Free Time */
  2139. #define CEC_CFGR_RXTOL ((uint32_t)0x00000008U) /*!< CEC Tolerance */
  2140. #define CEC_CFGR_BRESTP ((uint32_t)0x00000010U) /*!< CEC Rx Stop */
  2141. #define CEC_CFGR_BREGEN ((uint32_t)0x00000020U) /*!< CEC Bit Rising Error generation */
  2142. #define CEC_CFGR_LBPEGEN ((uint32_t)0x00000040U) /*!< CEC Long Bit Period Error gener. */
  2143. #define CEC_CFGR_BRDNOGEN ((uint32_t)0x00000080U) /*!< CEC Broadcast No Error generation */
  2144. #define CEC_CFGR_SFTOPT ((uint32_t)0x00000100U) /*!< CEC Signal Free Time optional */
  2145. #define CEC_CFGR_OAR ((uint32_t)0x7FFF0000U) /*!< CEC Own Address */
  2146. #define CEC_CFGR_LSTN ((uint32_t)0x80000000U) /*!< CEC Listen mode */
  2147. /******************* Bit definition for CEC_TXDR register *******************/
  2148. #define CEC_TXDR_TXD ((uint32_t)0x000000FFU) /*!< CEC Tx Data */
  2149. /******************* Bit definition for CEC_RXDR register *******************/
  2150. #define CEC_TXDR_RXD ((uint32_t)0x000000FFU) /*!< CEC Rx Data */
  2151. /******************* Bit definition for CEC_ISR register ********************/
  2152. #define CEC_ISR_RXBR ((uint32_t)0x00000001U) /*!< CEC Rx-Byte Received */
  2153. #define CEC_ISR_RXEND ((uint32_t)0x00000002U) /*!< CEC End Of Reception */
  2154. #define CEC_ISR_RXOVR ((uint32_t)0x00000004U) /*!< CEC Rx-Overrun */
  2155. #define CEC_ISR_BRE ((uint32_t)0x00000008U) /*!< CEC Rx Bit Rising Error */
  2156. #define CEC_ISR_SBPE ((uint32_t)0x00000010U) /*!< CEC Rx Short Bit period Error */
  2157. #define CEC_ISR_LBPE ((uint32_t)0x00000020U) /*!< CEC Rx Long Bit period Error */
  2158. #define CEC_ISR_RXACKE ((uint32_t)0x00000040U) /*!< CEC Rx Missing Acknowledge */
  2159. #define CEC_ISR_ARBLST ((uint32_t)0x00000080U) /*!< CEC Arbitration Lost */
  2160. #define CEC_ISR_TXBR ((uint32_t)0x00000100U) /*!< CEC Tx Byte Request */
  2161. #define CEC_ISR_TXEND ((uint32_t)0x00000200U) /*!< CEC End of Transmission */
  2162. #define CEC_ISR_TXUDR ((uint32_t)0x00000400U) /*!< CEC Tx-Buffer Underrun */
  2163. #define CEC_ISR_TXERR ((uint32_t)0x00000800U) /*!< CEC Tx-Error */
  2164. #define CEC_ISR_TXACKE ((uint32_t)0x00001000U) /*!< CEC Tx Missing Acknowledge */
  2165. /******************* Bit definition for CEC_IER register ********************/
  2166. #define CEC_IER_RXBRIE ((uint32_t)0x00000001U) /*!< CEC Rx-Byte Received IT Enable */
  2167. #define CEC_IER_RXENDIE ((uint32_t)0x00000002U) /*!< CEC End Of Reception IT Enable */
  2168. #define CEC_IER_RXOVRIE ((uint32_t)0x00000004U) /*!< CEC Rx-Overrun IT Enable */
  2169. #define CEC_IER_BREIE ((uint32_t)0x00000008U) /*!< CEC Rx Bit Rising Error IT Enable */
  2170. #define CEC_IER_SBPEIE ((uint32_t)0x00000010U) /*!< CEC Rx Short Bit period Error IT Enable*/
  2171. #define CEC_IER_LBPEIE ((uint32_t)0x00000020U) /*!< CEC Rx Long Bit period Error IT Enable */
  2172. #define CEC_IER_RXACKEIE ((uint32_t)0x00000040U) /*!< CEC Rx Missing Acknowledge IT Enable */
  2173. #define CEC_IER_ARBLSTIE ((uint32_t)0x00000080U) /*!< CEC Arbitration Lost IT Enable */
  2174. #define CEC_IER_TXBRIE ((uint32_t)0x00000100U) /*!< CEC Tx Byte Request IT Enable */
  2175. #define CEC_IER_TXENDIE ((uint32_t)0x00000200U) /*!< CEC End of Transmission IT Enable */
  2176. #define CEC_IER_TXUDRIE ((uint32_t)0x00000400U) /*!< CEC Tx-Buffer Underrun IT Enable */
  2177. #define CEC_IER_TXERRIE ((uint32_t)0x00000800U) /*!< CEC Tx-Error IT Enable */
  2178. #define CEC_IER_TXACKEIE ((uint32_t)0x00001000U) /*!< CEC Tx Missing Acknowledge IT Enable */
  2179. /******************************************************************************/
  2180. /* */
  2181. /* Analog Comparators (COMP) */
  2182. /* */
  2183. /******************************************************************************/
  2184. /*********************** Bit definition for COMP_CSR register ***************/
  2185. /* COMP1 bits definition */
  2186. #define COMP_CSR_COMP1EN ((uint32_t)0x00000001U) /*!< COMP1 enable */
  2187. #define COMP_CSR_COMP1SW1 ((uint32_t)0x00000002U) /*!< COMP1 SW1 switch control */
  2188. #define COMP_CSR_COMP1MODE ((uint32_t)0x0000000CU) /*!< COMP1 power mode */
  2189. #define COMP_CSR_COMP1MODE_0 ((uint32_t)0x00000004U) /*!< COMP1 power mode bit 0 */
  2190. #define COMP_CSR_COMP1MODE_1 ((uint32_t)0x00000008U) /*!< COMP1 power mode bit 1 */
  2191. #define COMP_CSR_COMP1INSEL ((uint32_t)0x00000070U) /*!< COMP1 inverting input select */
  2192. #define COMP_CSR_COMP1INSEL_0 ((uint32_t)0x00000010U) /*!< COMP1 inverting input select bit 0 */
  2193. #define COMP_CSR_COMP1INSEL_1 ((uint32_t)0x00000020U) /*!< COMP1 inverting input select bit 1 */
  2194. #define COMP_CSR_COMP1INSEL_2 ((uint32_t)0x00000040U) /*!< COMP1 inverting input select bit 2 */
  2195. #define COMP_CSR_COMP1OUTSEL ((uint32_t)0x00000700U) /*!< COMP1 output select */
  2196. #define COMP_CSR_COMP1OUTSEL_0 ((uint32_t)0x00000100U) /*!< COMP1 output select bit 0 */
  2197. #define COMP_CSR_COMP1OUTSEL_1 ((uint32_t)0x00000200U) /*!< COMP1 output select bit 1 */
  2198. #define COMP_CSR_COMP1OUTSEL_2 ((uint32_t)0x00000400U) /*!< COMP1 output select bit 2 */
  2199. #define COMP_CSR_COMP1POL ((uint32_t)0x00000800U) /*!< COMP1 output polarity */
  2200. #define COMP_CSR_COMP1HYST ((uint32_t)0x00003000U) /*!< COMP1 hysteresis */
  2201. #define COMP_CSR_COMP1HYST_0 ((uint32_t)0x00001000U) /*!< COMP1 hysteresis bit 0 */
  2202. #define COMP_CSR_COMP1HYST_1 ((uint32_t)0x00002000U) /*!< COMP1 hysteresis bit 1 */
  2203. #define COMP_CSR_COMP1OUT ((uint32_t)0x00004000U) /*!< COMP1 output level */
  2204. #define COMP_CSR_COMP1LOCK ((uint32_t)0x00008000U) /*!< COMP1 lock */
  2205. /* COMP2 bits definition */
  2206. #define COMP_CSR_COMP2EN ((uint32_t)0x00010000U) /*!< COMP2 enable */
  2207. #define COMP_CSR_COMP2MODE ((uint32_t)0x000C0000U) /*!< COMP2 power mode */
  2208. #define COMP_CSR_COMP2MODE_0 ((uint32_t)0x00040000U) /*!< COMP2 power mode bit 0 */
  2209. #define COMP_CSR_COMP2MODE_1 ((uint32_t)0x00080000U) /*!< COMP2 power mode bit 1 */
  2210. #define COMP_CSR_COMP2INSEL ((uint32_t)0x00700000U) /*!< COMP2 inverting input select */
  2211. #define COMP_CSR_COMP2INSEL_0 ((uint32_t)0x00100000U) /*!< COMP2 inverting input select bit 0 */
  2212. #define COMP_CSR_COMP2INSEL_1 ((uint32_t)0x00200000U) /*!< COMP2 inverting input select bit 1 */
  2213. #define COMP_CSR_COMP2INSEL_2 ((uint32_t)0x00400000U) /*!< COMP2 inverting input select bit 2 */
  2214. #define COMP_CSR_WNDWEN ((uint32_t)0x00800000U) /*!< COMPx window mode. Bit intended to be used with COMP common instance (COMP_Common_TypeDef) */
  2215. #define COMP_CSR_COMP2OUTSEL ((uint32_t)0x07000000U) /*!< COMP2 output select */
  2216. #define COMP_CSR_COMP2OUTSEL_0 ((uint32_t)0x01000000U) /*!< COMP2 output select bit 0 */
  2217. #define COMP_CSR_COMP2OUTSEL_1 ((uint32_t)0x02000000U) /*!< COMP2 output select bit 1 */
  2218. #define COMP_CSR_COMP2OUTSEL_2 ((uint32_t)0x04000000U) /*!< COMP2 output select bit 2 */
  2219. #define COMP_CSR_COMP2POL ((uint32_t)0x08000000U) /*!< COMP2 output polarity */
  2220. #define COMP_CSR_COMP2HYST ((uint32_t)0x30000000U) /*!< COMP2 hysteresis */
  2221. #define COMP_CSR_COMP2HYST_0 ((uint32_t)0x10000000U) /*!< COMP2 hysteresis bit 0 */
  2222. #define COMP_CSR_COMP2HYST_1 ((uint32_t)0x20000000U) /*!< COMP2 hysteresis bit 1 */
  2223. #define COMP_CSR_COMP2OUT ((uint32_t)0x40000000U) /*!< COMP2 output level */
  2224. #define COMP_CSR_COMP2LOCK ((uint32_t)0x80000000U) /*!< COMP2 lock */
  2225. /* COMPx bits definition */
  2226. #define COMP_CSR_COMPxEN ((uint32_t)0x00000001U) /*!< COMPx enable */
  2227. #define COMP_CSR_COMPxMODE ((uint32_t)0x0000000CU) /*!< COMPx power mode */
  2228. #define COMP_CSR_COMPxMODE_0 ((uint32_t)0x00000004U) /*!< COMPx power mode bit 0 */
  2229. #define COMP_CSR_COMPxMODE_1 ((uint32_t)0x00000008U) /*!< COMPx power mode bit 1 */
  2230. #define COMP_CSR_COMPxINSEL ((uint32_t)0x00000070U) /*!< COMPx inverting input select */
  2231. #define COMP_CSR_COMPxINSEL_0 ((uint32_t)0x00000010U) /*!< COMPx inverting input select bit 0 */
  2232. #define COMP_CSR_COMPxINSEL_1 ((uint32_t)0x00000020U) /*!< COMPx inverting input select bit 1 */
  2233. #define COMP_CSR_COMPxINSEL_2 ((uint32_t)0x00000040U) /*!< COMPx inverting input select bit 2 */
  2234. #define COMP_CSR_COMPxOUTSEL ((uint32_t)0x00000700U) /*!< COMPx output select */
  2235. #define COMP_CSR_COMPxOUTSEL_0 ((uint32_t)0x00000100U) /*!< COMPx output select bit 0 */
  2236. #define COMP_CSR_COMPxOUTSEL_1 ((uint32_t)0x00000200U) /*!< COMPx output select bit 1 */
  2237. #define COMP_CSR_COMPxOUTSEL_2 ((uint32_t)0x00000400U) /*!< COMPx output select bit 2 */
  2238. #define COMP_CSR_COMPxPOL ((uint32_t)0x00000800U) /*!< COMPx output polarity */
  2239. #define COMP_CSR_COMPxHYST ((uint32_t)0x00003000U) /*!< COMPx hysteresis */
  2240. #define COMP_CSR_COMPxHYST_0 ((uint32_t)0x00001000U) /*!< COMPx hysteresis bit 0 */
  2241. #define COMP_CSR_COMPxHYST_1 ((uint32_t)0x00002000U) /*!< COMPx hysteresis bit 1 */
  2242. #define COMP_CSR_COMPxOUT ((uint32_t)0x00004000U) /*!< COMPx output level */
  2243. #define COMP_CSR_COMPxLOCK ((uint32_t)0x00008000U) /*!< COMPx lock */
  2244. /******************************************************************************/
  2245. /* */
  2246. /* CRC calculation unit (CRC) */
  2247. /* */
  2248. /******************************************************************************/
  2249. /******************* Bit definition for CRC_DR register *********************/
  2250. #define CRC_DR_DR ((uint32_t)0xFFFFFFFFU) /*!< Data register bits */
  2251. /******************* Bit definition for CRC_IDR register ********************/
  2252. #define CRC_IDR_IDR ((uint8_t)0xFFU) /*!< General-purpose 8-bit data register bits */
  2253. /******************** Bit definition for CRC_CR register ********************/
  2254. #define CRC_CR_RESET ((uint32_t)0x00000001U) /*!< RESET the CRC computation unit bit */
  2255. #define CRC_CR_POLYSIZE ((uint32_t)0x00000018U) /*!< Polynomial size bits */
  2256. #define CRC_CR_POLYSIZE_0 ((uint32_t)0x00000008U) /*!< Polynomial size bit 0 */
  2257. #define CRC_CR_POLYSIZE_1 ((uint32_t)0x00000010U) /*!< Polynomial size bit 1 */
  2258. #define CRC_CR_REV_IN ((uint32_t)0x00000060U) /*!< REV_IN Reverse Input Data bits */
  2259. #define CRC_CR_REV_IN_0 ((uint32_t)0x00000020U) /*!< REV_IN Bit 0 */
  2260. #define CRC_CR_REV_IN_1 ((uint32_t)0x00000040U) /*!< REV_IN Bit 1 */
  2261. #define CRC_CR_REV_OUT ((uint32_t)0x00000080U) /*!< REV_OUT Reverse Output Data bits */
  2262. /******************* Bit definition for CRC_INIT register *******************/
  2263. #define CRC_INIT_INIT ((uint32_t)0xFFFFFFFFU) /*!< Initial CRC value bits */
  2264. /******************* Bit definition for CRC_POL register ********************/
  2265. #define CRC_POL_POL ((uint32_t)0xFFFFFFFFU) /*!< Coefficients of the polynomial */
  2266. /******************************************************************************/
  2267. /* */
  2268. /* CRS Clock Recovery System */
  2269. /******************************************************************************/
  2270. /******************* Bit definition for CRS_CR register *********************/
  2271. #define CRS_CR_SYNCOKIE ((uint32_t)0x00000001U) /* SYNC event OK interrupt enable */
  2272. #define CRS_CR_SYNCWARNIE ((uint32_t)0x00000002U) /* SYNC warning interrupt enable */
  2273. #define CRS_CR_ERRIE ((uint32_t)0x00000004U) /* SYNC error interrupt enable */
  2274. #define CRS_CR_ESYNCIE ((uint32_t)0x00000008U) /* Expected SYNC(ESYNCF) interrupt Enable*/
  2275. #define CRS_CR_CEN ((uint32_t)0x00000020U) /* Frequency error counter enable */
  2276. #define CRS_CR_AUTOTRIMEN ((uint32_t)0x00000040U) /* Automatic trimming enable */
  2277. #define CRS_CR_SWSYNC ((uint32_t)0x00000080U) /* A Software SYNC event is generated */
  2278. #define CRS_CR_TRIM ((uint32_t)0x00003F00U) /* HSI48 oscillator smooth trimming */
  2279. /******************* Bit definition for CRS_CFGR register *********************/
  2280. #define CRS_CFGR_RELOAD ((uint32_t)0x0000FFFFU) /* Counter reload value */
  2281. #define CRS_CFGR_FELIM ((uint32_t)0x00FF0000U) /* Frequency error limit */
  2282. #define CRS_CFGR_SYNCDIV ((uint32_t)0x07000000U) /* SYNC divider */
  2283. #define CRS_CFGR_SYNCDIV_0 ((uint32_t)0x01000000U) /* Bit 0 */
  2284. #define CRS_CFGR_SYNCDIV_1 ((uint32_t)0x02000000U) /* Bit 1 */
  2285. #define CRS_CFGR_SYNCDIV_2 ((uint32_t)0x04000000U) /* Bit 2 */
  2286. #define CRS_CFGR_SYNCSRC ((uint32_t)0x30000000U) /* SYNC signal source selection */
  2287. #define CRS_CFGR_SYNCSRC_0 ((uint32_t)0x10000000U) /* Bit 0 */
  2288. #define CRS_CFGR_SYNCSRC_1 ((uint32_t)0x20000000U) /* Bit 1 */
  2289. #define CRS_CFGR_SYNCPOL ((uint32_t)0x80000000U) /* SYNC polarity selection */
  2290. /******************* Bit definition for CRS_ISR register *********************/
  2291. #define CRS_ISR_SYNCOKF ((uint32_t)0x00000001U) /* SYNC event OK flag */
  2292. #define CRS_ISR_SYNCWARNF ((uint32_t)0x00000002U) /* SYNC warning */
  2293. #define CRS_ISR_ERRF ((uint32_t)0x00000004U) /* SYNC error flag */
  2294. #define CRS_ISR_ESYNCF ((uint32_t)0x00000008U) /* Expected SYNC flag */
  2295. #define CRS_ISR_SYNCERR ((uint32_t)0x00000100U) /* SYNC error */
  2296. #define CRS_ISR_SYNCMISS ((uint32_t)0x00000200U) /* SYNC missed */
  2297. #define CRS_ISR_TRIMOVF ((uint32_t)0x00000400U) /* Trimming overflow or underflow */
  2298. #define CRS_ISR_FEDIR ((uint32_t)0x00008000U) /* Frequency error direction */
  2299. #define CRS_ISR_FECAP ((uint32_t)0xFFFF0000U) /* Frequency error capture */
  2300. /******************* Bit definition for CRS_ICR register *********************/
  2301. #define CRS_ICR_SYNCOKC ((uint32_t)0x00000001U) /* SYNC event OK clear flag */
  2302. #define CRS_ICR_SYNCWARNC ((uint32_t)0x00000002U) /* SYNC warning clear flag */
  2303. #define CRS_ICR_ERRC ((uint32_t)0x00000004U) /* Error clear flag */
  2304. #define CRS_ICR_ESYNCC ((uint32_t)0x00000008U) /* Expected SYNC clear flag */
  2305. /******************************************************************************/
  2306. /* */
  2307. /* Digital to Analog Converter (DAC) */
  2308. /* */
  2309. /******************************************************************************/
  2310. /*
  2311. * @brief Specific device feature definitions (not present on all devices in the STM32F0 family)
  2312. */
  2313. #define DAC_CHANNEL2_SUPPORT /*!< DAC feature available only on specific devices: availability of DAC channel 2 */
  2314. /******************** Bit definition for DAC_CR register ********************/
  2315. #define DAC_CR_EN1 ((uint32_t)0x00000001U) /*!< DAC channel1 enable */
  2316. #define DAC_CR_BOFF1 ((uint32_t)0x00000002U) /*!< DAC channel1 output buffer disable */
  2317. #define DAC_CR_TEN1 ((uint32_t)0x00000004U) /*!< DAC channel1 Trigger enable */
  2318. #define DAC_CR_TSEL1 ((uint32_t)0x00000038U) /*!< TSEL1[2:0] (DAC channel1 Trigger selection) */
  2319. #define DAC_CR_TSEL1_0 ((uint32_t)0x00000008U) /*!< Bit 0 */
  2320. #define DAC_CR_TSEL1_1 ((uint32_t)0x00000010U) /*!< Bit 1 */
  2321. #define DAC_CR_TSEL1_2 ((uint32_t)0x00000020U) /*!< Bit 2 */
  2322. #define DAC_CR_WAVE1 ((uint32_t)0x000000C0U) /*!< WAVE1[1:0] (DAC channel1 noise/triangle wave generation enable) */
  2323. #define DAC_CR_WAVE1_0 ((uint32_t)0x00000040U) /*!< Bit 0 */
  2324. #define DAC_CR_WAVE1_1 ((uint32_t)0x00000080U) /*!< Bit 1 */
  2325. #define DAC_CR_MAMP1 ((uint32_t)0x00000F00U) /*!< MAMP1[3:0] (DAC channel1 Mask/Amplitude selector) */
  2326. #define DAC_CR_MAMP1_0 ((uint32_t)0x00000100U) /*!< Bit 0 */
  2327. #define DAC_CR_MAMP1_1 ((uint32_t)0x00000200U) /*!< Bit 1 */
  2328. #define DAC_CR_MAMP1_2 ((uint32_t)0x00000400U) /*!< Bit 2 */
  2329. #define DAC_CR_MAMP1_3 ((uint32_t)0x00000800U) /*!< Bit 3 */
  2330. #define DAC_CR_DMAEN1 ((uint32_t)0x00001000U) /*!< DAC channel1 DMA enable */
  2331. #define DAC_CR_DMAUDRIE1 ((uint32_t)0x00002000U) /*!< DAC channel1 DMA Underrun Interrupt enable */
  2332. #define DAC_CR_EN2 ((uint32_t)0x00010000U) /*!< DAC channel2 enable */
  2333. #define DAC_CR_BOFF2 ((uint32_t)0x00020000U) /*!< DAC channel2 output buffer disable */
  2334. #define DAC_CR_TEN2 ((uint32_t)0x00040000U) /*!< DAC channel2 Trigger enable */
  2335. #define DAC_CR_TSEL2 ((uint32_t)0x00380000U) /*!< TSEL2[2:0] (DAC channel2 Trigger selection) */
  2336. #define DAC_CR_TSEL2_0 ((uint32_t)0x00080000U) /*!< Bit 0 */
  2337. #define DAC_CR_TSEL2_1 ((uint32_t)0x00100000U) /*!< Bit 1 */
  2338. #define DAC_CR_TSEL2_2 ((uint32_t)0x00200000U) /*!< Bit 2 */
  2339. #define DAC_CR_WAVE2 ((uint32_t)0x00C00000U) /*!< WAVE2[1:0] (DAC channel2 noise/triangle wave generation enable) */
  2340. #define DAC_CR_WAVE2_0 ((uint32_t)0x00400000U) /*!< Bit 0 */
  2341. #define DAC_CR_WAVE2_1 ((uint32_t)0x00800000U) /*!< Bit 1 */
  2342. #define DAC_CR_MAMP2 ((uint32_t)0x0F000000U) /*!< MAMP2[3:0] (DAC channel2 Mask/Amplitude selector) */
  2343. #define DAC_CR_MAMP2_0 ((uint32_t)0x01000000U) /*!< Bit 0 */
  2344. #define DAC_CR_MAMP2_1 ((uint32_t)0x02000000U) /*!< Bit 1 */
  2345. #define DAC_CR_MAMP2_2 ((uint32_t)0x04000000U) /*!< Bit 2 */
  2346. #define DAC_CR_MAMP2_3 ((uint32_t)0x08000000U) /*!< Bit 3 */
  2347. #define DAC_CR_DMAEN2 ((uint32_t)0x10000000U) /*!< DAC channel2 DMA enabled */
  2348. #define DAC_CR_DMAUDRIE2 ((uint32_t)0x20000000U) /*!< DAC channel2 DMA Underrun Interrupt enable */
  2349. /***************** Bit definition for DAC_SWTRIGR register ******************/
  2350. #define DAC_SWTRIGR_SWTRIG1 ((uint32_t)0x00000001U) /*!< DAC channel1 software trigger */
  2351. #define DAC_SWTRIGR_SWTRIG2 ((uint32_t)0x00000002U) /*!< DAC channel2 software trigger */
  2352. /***************** Bit definition for DAC_DHR12R1 register ******************/
  2353. #define DAC_DHR12R1_DACC1DHR ((uint32_t)0x00000FFFU) /*!< DAC channel1 12-bit Right aligned data */
  2354. /***************** Bit definition for DAC_DHR12L1 register ******************/
  2355. #define DAC_DHR12L1_DACC1DHR ((uint32_t)0x0000FFF0U) /*!< DAC channel1 12-bit Left aligned data */
  2356. /****************** Bit definition for DAC_DHR8R1 register ******************/
  2357. #define DAC_DHR8R1_DACC1DHR ((uint32_t)0x000000FFU) /*!< DAC channel1 8-bit Right aligned data */
  2358. /***************** Bit definition for DAC_DHR12R2 register ******************/
  2359. #define DAC_DHR12R2_DACC2DHR ((uint32_t)0x00000FFFU) /*!< DAC channel2 12-bit Right aligned data */
  2360. /***************** Bit definition for DAC_DHR12L2 register ******************/
  2361. #define DAC_DHR12L2_DACC2DHR ((uint32_t)0x0000FFF0U) /*!< DAC channel2 12-bit Left aligned data */
  2362. /****************** Bit definition for DAC_DHR8R2 register ******************/
  2363. #define DAC_DHR8R2_DACC2DHR ((uint32_t)0x000000FFU) /*!< DAC channel2 8-bit Right aligned data */
  2364. /***************** Bit definition for DAC_DHR12RD register ******************/
  2365. #define DAC_DHR12RD_DACC1DHR ((uint32_t)0x00000FFFU) /*!< DAC channel1 12-bit Right aligned data */
  2366. #define DAC_DHR12RD_DACC2DHR ((uint32_t)0x0FFF0000U) /*!< DAC channel2 12-bit Right aligned data */
  2367. /***************** Bit definition for DAC_DHR12LD register ******************/
  2368. #define DAC_DHR12LD_DACC1DHR ((uint32_t)0x0000FFF0U) /*!< DAC channel1 12-bit Left aligned data */
  2369. #define DAC_DHR12LD_DACC2DHR ((uint32_t)0xFFF00000U) /*!< DAC channel2 12-bit Left aligned data */
  2370. /****************** Bit definition for DAC_DHR8RD register ******************/
  2371. #define DAC_DHR8RD_DACC1DHR ((uint32_t)0x000000FFU) /*!< DAC channel1 8-bit Right aligned data */
  2372. #define DAC_DHR8RD_DACC2DHR ((uint32_t)0x0000FF00U) /*!< DAC channel2 8-bit Right aligned data */
  2373. /******************* Bit definition for DAC_DOR1 register *******************/
  2374. #define DAC_DOR1_DACC1DOR ((uint32_t)0x00000FFFU) /*!< DAC channel1 data output */
  2375. /******************* Bit definition for DAC_DOR2 register *******************/
  2376. #define DAC_DOR2_DACC2DOR ((uint32_t)0x00000FFFU) /*!< DAC channel2 data output */
  2377. /******************** Bit definition for DAC_SR register ********************/
  2378. #define DAC_SR_DMAUDR1 ((uint32_t)0x00002000U) /*!< DAC channel1 DMA underrun flag */
  2379. #define DAC_SR_DMAUDR2 ((uint32_t)0x20000000U) /*!< DAC channel2 DMA underrun flag */
  2380. /******************************************************************************/
  2381. /* */
  2382. /* Debug MCU (DBGMCU) */
  2383. /* */
  2384. /******************************************************************************/
  2385. /**************** Bit definition for DBGMCU_IDCODE register *****************/
  2386. #define DBGMCU_IDCODE_DEV_ID ((uint32_t)0x00000FFFU) /*!< Device Identifier */
  2387. #define DBGMCU_IDCODE_REV_ID ((uint32_t)0xFFFF0000U) /*!< REV_ID[15:0] bits (Revision Identifier) */
  2388. #define DBGMCU_IDCODE_REV_ID_0 ((uint32_t)0x00010000U) /*!< Bit 0 */
  2389. #define DBGMCU_IDCODE_REV_ID_1 ((uint32_t)0x00020000U) /*!< Bit 1 */
  2390. #define DBGMCU_IDCODE_REV_ID_2 ((uint32_t)0x00040000U) /*!< Bit 2 */
  2391. #define DBGMCU_IDCODE_REV_ID_3 ((uint32_t)0x00080000U) /*!< Bit 3 */
  2392. #define DBGMCU_IDCODE_REV_ID_4 ((uint32_t)0x00100000U) /*!< Bit 4 */
  2393. #define DBGMCU_IDCODE_REV_ID_5 ((uint32_t)0x00200000U) /*!< Bit 5 */
  2394. #define DBGMCU_IDCODE_REV_ID_6 ((uint32_t)0x00400000U) /*!< Bit 6 */
  2395. #define DBGMCU_IDCODE_REV_ID_7 ((uint32_t)0x00800000U) /*!< Bit 7 */
  2396. #define DBGMCU_IDCODE_REV_ID_8 ((uint32_t)0x01000000U) /*!< Bit 8 */
  2397. #define DBGMCU_IDCODE_REV_ID_9 ((uint32_t)0x02000000U) /*!< Bit 9 */
  2398. #define DBGMCU_IDCODE_REV_ID_10 ((uint32_t)0x04000000U) /*!< Bit 10 */
  2399. #define DBGMCU_IDCODE_REV_ID_11 ((uint32_t)0x08000000U) /*!< Bit 11 */
  2400. #define DBGMCU_IDCODE_REV_ID_12 ((uint32_t)0x10000000U) /*!< Bit 12 */
  2401. #define DBGMCU_IDCODE_REV_ID_13 ((uint32_t)0x20000000U) /*!< Bit 13 */
  2402. #define DBGMCU_IDCODE_REV_ID_14 ((uint32_t)0x40000000U) /*!< Bit 14 */
  2403. #define DBGMCU_IDCODE_REV_ID_15 ((uint32_t)0x80000000U) /*!< Bit 15 */
  2404. /****************** Bit definition for DBGMCU_CR register *******************/
  2405. #define DBGMCU_CR_DBG_STOP ((uint32_t)0x00000002U) /*!< Debug Stop Mode */
  2406. #define DBGMCU_CR_DBG_STANDBY ((uint32_t)0x00000004U) /*!< Debug Standby mode */
  2407. /****************** Bit definition for DBGMCU_APB1_FZ register **************/
  2408. #define DBGMCU_APB1_FZ_DBG_TIM2_STOP ((uint32_t)0x00000001U) /*!< TIM2 counter stopped when core is halted */
  2409. #define DBGMCU_APB1_FZ_DBG_TIM3_STOP ((uint32_t)0x00000002U) /*!< TIM3 counter stopped when core is halted */
  2410. #define DBGMCU_APB1_FZ_DBG_TIM6_STOP ((uint32_t)0x00000010U) /*!< TIM6 counter stopped when core is halted */
  2411. #define DBGMCU_APB1_FZ_DBG_TIM7_STOP ((uint32_t)0x00000020U) /*!< TIM7 counter stopped when core is halted */
  2412. #define DBGMCU_APB1_FZ_DBG_TIM14_STOP ((uint32_t)0x00000100U) /*!< TIM14 counter stopped when core is halted */
  2413. #define DBGMCU_APB1_FZ_DBG_RTC_STOP ((uint32_t)0x00000400U) /*!< RTC Calendar frozen when core is halted */
  2414. #define DBGMCU_APB1_FZ_DBG_WWDG_STOP ((uint32_t)0x00000800U) /*!< Debug Window Watchdog stopped when Core is halted */
  2415. #define DBGMCU_APB1_FZ_DBG_IWDG_STOP ((uint32_t)0x00001000U) /*!< Debug Independent Watchdog stopped when Core is halted */
  2416. #define DBGMCU_APB1_FZ_DBG_I2C1_SMBUS_TIMEOUT ((uint32_t)0x00200000U) /*!< I2C1 SMBUS timeout mode stopped when Core is halted */
  2417. #define DBGMCU_APB1_FZ_DBG_CAN_STOP ((uint32_t)0x02000000U) /*!< CAN debug stopped when Core is halted */
  2418. /****************** Bit definition for DBGMCU_APB2_FZ register **************/
  2419. #define DBGMCU_APB2_FZ_DBG_TIM1_STOP ((uint32_t)0x00000800U) /*!< TIM1 counter stopped when core is halted */
  2420. #define DBGMCU_APB2_FZ_DBG_TIM15_STOP ((uint32_t)0x00010000U) /*!< TIM15 counter stopped when core is halted */
  2421. #define DBGMCU_APB2_FZ_DBG_TIM16_STOP ((uint32_t)0x00020000U) /*!< TIM16 counter stopped when core is halted */
  2422. #define DBGMCU_APB2_FZ_DBG_TIM17_STOP ((uint32_t)0x00040000U) /*!< TIM17 counter stopped when core is halted */
  2423. /******************************************************************************/
  2424. /* */
  2425. /* DMA Controller (DMA) */
  2426. /* */
  2427. /******************************************************************************/
  2428. /******************* Bit definition for DMA_ISR register ********************/
  2429. #define DMA_ISR_GIF1 ((uint32_t)0x00000001U) /*!< Channel 1 Global interrupt flag */
  2430. #define DMA_ISR_TCIF1 ((uint32_t)0x00000002U) /*!< Channel 1 Transfer Complete flag */
  2431. #define DMA_ISR_HTIF1 ((uint32_t)0x00000004U) /*!< Channel 1 Half Transfer flag */
  2432. #define DMA_ISR_TEIF1 ((uint32_t)0x00000008U) /*!< Channel 1 Transfer Error flag */
  2433. #define DMA_ISR_GIF2 ((uint32_t)0x00000010U) /*!< Channel 2 Global interrupt flag */
  2434. #define DMA_ISR_TCIF2 ((uint32_t)0x00000020U) /*!< Channel 2 Transfer Complete flag */
  2435. #define DMA_ISR_HTIF2 ((uint32_t)0x00000040U) /*!< Channel 2 Half Transfer flag */
  2436. #define DMA_ISR_TEIF2 ((uint32_t)0x00000080U) /*!< Channel 2 Transfer Error flag */
  2437. #define DMA_ISR_GIF3 ((uint32_t)0x00000100U) /*!< Channel 3 Global interrupt flag */
  2438. #define DMA_ISR_TCIF3 ((uint32_t)0x00000200U) /*!< Channel 3 Transfer Complete flag */
  2439. #define DMA_ISR_HTIF3 ((uint32_t)0x00000400U) /*!< Channel 3 Half Transfer flag */
  2440. #define DMA_ISR_TEIF3 ((uint32_t)0x00000800U) /*!< Channel 3 Transfer Error flag */
  2441. #define DMA_ISR_GIF4 ((uint32_t)0x00001000U) /*!< Channel 4 Global interrupt flag */
  2442. #define DMA_ISR_TCIF4 ((uint32_t)0x00002000U) /*!< Channel 4 Transfer Complete flag */
  2443. #define DMA_ISR_HTIF4 ((uint32_t)0x00004000U) /*!< Channel 4 Half Transfer flag */
  2444. #define DMA_ISR_TEIF4 ((uint32_t)0x00008000U) /*!< Channel 4 Transfer Error flag */
  2445. #define DMA_ISR_GIF5 ((uint32_t)0x00010000U) /*!< Channel 5 Global interrupt flag */
  2446. #define DMA_ISR_TCIF5 ((uint32_t)0x00020000U) /*!< Channel 5 Transfer Complete flag */
  2447. #define DMA_ISR_HTIF5 ((uint32_t)0x00040000U) /*!< Channel 5 Half Transfer flag */
  2448. #define DMA_ISR_TEIF5 ((uint32_t)0x00080000U) /*!< Channel 5 Transfer Error flag */
  2449. #define DMA_ISR_GIF6 ((uint32_t)0x00100000U) /*!< Channel 6 Global interrupt flag */
  2450. #define DMA_ISR_TCIF6 ((uint32_t)0x00200000U) /*!< Channel 6 Transfer Complete flag */
  2451. #define DMA_ISR_HTIF6 ((uint32_t)0x00400000U) /*!< Channel 6 Half Transfer flag */
  2452. #define DMA_ISR_TEIF6 ((uint32_t)0x00800000U) /*!< Channel 6 Transfer Error flag */
  2453. #define DMA_ISR_GIF7 ((uint32_t)0x01000000U) /*!< Channel 7 Global interrupt flag */
  2454. #define DMA_ISR_TCIF7 ((uint32_t)0x02000000U) /*!< Channel 7 Transfer Complete flag */
  2455. #define DMA_ISR_HTIF7 ((uint32_t)0x04000000U) /*!< Channel 7 Half Transfer flag */
  2456. #define DMA_ISR_TEIF7 ((uint32_t)0x08000000U) /*!< Channel 7 Transfer Error flag */
  2457. /******************* Bit definition for DMA_IFCR register *******************/
  2458. #define DMA_IFCR_CGIF1 ((uint32_t)0x00000001U) /*!< Channel 1 Global interrupt clear */
  2459. #define DMA_IFCR_CTCIF1 ((uint32_t)0x00000002U) /*!< Channel 1 Transfer Complete clear */
  2460. #define DMA_IFCR_CHTIF1 ((uint32_t)0x00000004U) /*!< Channel 1 Half Transfer clear */
  2461. #define DMA_IFCR_CTEIF1 ((uint32_t)0x00000008U) /*!< Channel 1 Transfer Error clear */
  2462. #define DMA_IFCR_CGIF2 ((uint32_t)0x00000010U) /*!< Channel 2 Global interrupt clear */
  2463. #define DMA_IFCR_CTCIF2 ((uint32_t)0x00000020U) /*!< Channel 2 Transfer Complete clear */
  2464. #define DMA_IFCR_CHTIF2 ((uint32_t)0x00000040U) /*!< Channel 2 Half Transfer clear */
  2465. #define DMA_IFCR_CTEIF2 ((uint32_t)0x00000080U) /*!< Channel 2 Transfer Error clear */
  2466. #define DMA_IFCR_CGIF3 ((uint32_t)0x00000100U) /*!< Channel 3 Global interrupt clear */
  2467. #define DMA_IFCR_CTCIF3 ((uint32_t)0x00000200U) /*!< Channel 3 Transfer Complete clear */
  2468. #define DMA_IFCR_CHTIF3 ((uint32_t)0x00000400U) /*!< Channel 3 Half Transfer clear */
  2469. #define DMA_IFCR_CTEIF3 ((uint32_t)0x00000800U) /*!< Channel 3 Transfer Error clear */
  2470. #define DMA_IFCR_CGIF4 ((uint32_t)0x00001000U) /*!< Channel 4 Global interrupt clear */
  2471. #define DMA_IFCR_CTCIF4 ((uint32_t)0x00002000U) /*!< Channel 4 Transfer Complete clear */
  2472. #define DMA_IFCR_CHTIF4 ((uint32_t)0x00004000U) /*!< Channel 4 Half Transfer clear */
  2473. #define DMA_IFCR_CTEIF4 ((uint32_t)0x00008000U) /*!< Channel 4 Transfer Error clear */
  2474. #define DMA_IFCR_CGIF5 ((uint32_t)0x00010000U) /*!< Channel 5 Global interrupt clear */
  2475. #define DMA_IFCR_CTCIF5 ((uint32_t)0x00020000U) /*!< Channel 5 Transfer Complete clear */
  2476. #define DMA_IFCR_CHTIF5 ((uint32_t)0x00040000U) /*!< Channel 5 Half Transfer clear */
  2477. #define DMA_IFCR_CTEIF5 ((uint32_t)0x00080000U) /*!< Channel 5 Transfer Error clear */
  2478. #define DMA_IFCR_CGIF6 ((uint32_t)0x00100000U) /*!< Channel 6 Global interrupt clear */
  2479. #define DMA_IFCR_CTCIF6 ((uint32_t)0x00200000U) /*!< Channel 6 Transfer Complete clear */
  2480. #define DMA_IFCR_CHTIF6 ((uint32_t)0x00400000U) /*!< Channel 6 Half Transfer clear */
  2481. #define DMA_IFCR_CTEIF6 ((uint32_t)0x00800000U) /*!< Channel 6 Transfer Error clear */
  2482. #define DMA_IFCR_CGIF7 ((uint32_t)0x01000000U) /*!< Channel 7 Global interrupt clear */
  2483. #define DMA_IFCR_CTCIF7 ((uint32_t)0x02000000U) /*!< Channel 7 Transfer Complete clear */
  2484. #define DMA_IFCR_CHTIF7 ((uint32_t)0x04000000U) /*!< Channel 7 Half Transfer clear */
  2485. #define DMA_IFCR_CTEIF7 ((uint32_t)0x08000000U) /*!< Channel 7 Transfer Error clear */
  2486. /******************* Bit definition for DMA_CCR register ********************/
  2487. #define DMA_CCR_EN ((uint32_t)0x00000001U) /*!< Channel enable */
  2488. #define DMA_CCR_TCIE ((uint32_t)0x00000002U) /*!< Transfer complete interrupt enable */
  2489. #define DMA_CCR_HTIE ((uint32_t)0x00000004U) /*!< Half Transfer interrupt enable */
  2490. #define DMA_CCR_TEIE ((uint32_t)0x00000008U) /*!< Transfer error interrupt enable */
  2491. #define DMA_CCR_DIR ((uint32_t)0x00000010U) /*!< Data transfer direction */
  2492. #define DMA_CCR_CIRC ((uint32_t)0x00000020U) /*!< Circular mode */
  2493. #define DMA_CCR_PINC ((uint32_t)0x00000040U) /*!< Peripheral increment mode */
  2494. #define DMA_CCR_MINC ((uint32_t)0x00000080U) /*!< Memory increment mode */
  2495. #define DMA_CCR_PSIZE ((uint32_t)0x00000300U) /*!< PSIZE[1:0] bits (Peripheral size) */
  2496. #define DMA_CCR_PSIZE_0 ((uint32_t)0x00000100U) /*!< Bit 0 */
  2497. #define DMA_CCR_PSIZE_1 ((uint32_t)0x00000200U) /*!< Bit 1 */
  2498. #define DMA_CCR_MSIZE ((uint32_t)0x00000C00U) /*!< MSIZE[1:0] bits (Memory size) */
  2499. #define DMA_CCR_MSIZE_0 ((uint32_t)0x00000400U) /*!< Bit 0 */
  2500. #define DMA_CCR_MSIZE_1 ((uint32_t)0x00000800U) /*!< Bit 1 */
  2501. #define DMA_CCR_PL ((uint32_t)0x00003000U) /*!< PL[1:0] bits(Channel Priority level)*/
  2502. #define DMA_CCR_PL_0 ((uint32_t)0x00001000U) /*!< Bit 0 */
  2503. #define DMA_CCR_PL_1 ((uint32_t)0x00002000U) /*!< Bit 1 */
  2504. #define DMA_CCR_MEM2MEM ((uint32_t)0x00004000U) /*!< Memory to memory mode */
  2505. /****************** Bit definition for DMA_CNDTR register *******************/
  2506. #define DMA_CNDTR_NDT ((uint32_t)0x0000FFFFU) /*!< Number of data to Transfer */
  2507. /****************** Bit definition for DMA_CPAR register ********************/
  2508. #define DMA_CPAR_PA ((uint32_t)0xFFFFFFFFU) /*!< Peripheral Address */
  2509. /****************** Bit definition for DMA_CMAR register ********************/
  2510. #define DMA_CMAR_MA ((uint32_t)0xFFFFFFFFU) /*!< Memory Address */
  2511. /****************** Bit definition for DMA1_CSELR register ********************/
  2512. #define DMA_CSELR_C1S ((uint32_t)0x0000000FU) /*!< Channel 1 Selection */
  2513. #define DMA_CSELR_C2S ((uint32_t)0x000000F0U) /*!< Channel 2 Selection */
  2514. #define DMA_CSELR_C3S ((uint32_t)0x00000F00U) /*!< Channel 3 Selection */
  2515. #define DMA_CSELR_C4S ((uint32_t)0x0000F000U) /*!< Channel 4 Selection */
  2516. #define DMA_CSELR_C5S ((uint32_t)0x000F0000U) /*!< Channel 5 Selection */
  2517. #define DMA_CSELR_C6S ((uint32_t)0x00F00000U) /*!< Channel 6 Selection */
  2518. #define DMA_CSELR_C7S ((uint32_t)0x0F000000U) /*!< Channel 7 Selection */
  2519. #define DMA1_CSELR_DEFAULT ((uint32_t)0x00000000U) /*!< Default remap position for DMA1 */
  2520. #define DMA1_CSELR_CH1_ADC ((uint32_t)0x00000001U) /*!< Remap ADC on DMA1 Channel 1*/
  2521. #define DMA1_CSELR_CH1_TIM17_CH1 ((uint32_t)0x00000007U) /*!< Remap TIM17 channel 1 on DMA1 channel 1 */
  2522. #define DMA1_CSELR_CH1_TIM17_UP ((uint32_t)0x00000007U) /*!< Remap TIM17 up on DMA1 channel 1 */
  2523. #define DMA1_CSELR_CH1_USART1_RX ((uint32_t)0x00000008U) /*!< Remap USART1 Rx on DMA1 channel 1 */
  2524. #define DMA1_CSELR_CH1_USART2_RX ((uint32_t)0x00000009U) /*!< Remap USART2 Rx on DMA1 channel 1 */
  2525. #define DMA1_CSELR_CH1_USART3_RX ((uint32_t)0x0000000AU) /*!< Remap USART3 Rx on DMA1 channel 1 */
  2526. #define DMA1_CSELR_CH1_USART4_RX ((uint32_t)0x0000000BU) /*!< Remap USART4 Rx on DMA1 channel 1 */
  2527. #define DMA1_CSELR_CH1_USART5_RX ((uint32_t)0x0000000CU) /*!< Remap USART5 Rx on DMA1 channel 1 */
  2528. #define DMA1_CSELR_CH1_USART6_RX ((uint32_t)0x0000000DU) /*!< Remap USART6 Rx on DMA1 channel 1 */
  2529. #define DMA1_CSELR_CH1_USART7_RX ((uint32_t)0x0000000EU) /*!< Remap USART7 Rx on DMA1 channel 1 */
  2530. #define DMA1_CSELR_CH1_USART8_RX ((uint32_t)0x0000000FU) /*!< Remap USART8 Rx on DMA1 channel 1 */
  2531. #define DMA1_CSELR_CH2_ADC ((uint32_t)0x00000010U) /*!< Remap ADC on DMA1 channel 2 */
  2532. #define DMA1_CSELR_CH2_I2C1_TX ((uint32_t)0x00000020U) /*!< Remap I2C1 Tx on DMA1 channel 2 */
  2533. #define DMA1_CSELR_CH2_SPI1_RX ((uint32_t)0x00000030U) /*!< Remap SPI1 Rx on DMA1 channel 2 */
  2534. #define DMA1_CSELR_CH2_TIM1_CH1 ((uint32_t)0x00000040U) /*!< Remap TIM1 channel 1 on DMA1 channel 2 */
  2535. #define DMA1_CSELR_CH2_TIM17_CH1 ((uint32_t)0x00000070U) /*!< Remap TIM17 channel 1 on DMA1 channel 2 */
  2536. #define DMA1_CSELR_CH2_TIM17_UP ((uint32_t)0x00000070U) /*!< Remap TIM17 up on DMA1 channel 2 */
  2537. #define DMA1_CSELR_CH2_USART1_TX ((uint32_t)0x00000080U) /*!< Remap USART1 Tx on DMA1 channel 2 */
  2538. #define DMA1_CSELR_CH2_USART2_TX ((uint32_t)0x00000090U) /*!< Remap USART2 Tx on DMA1 channel 2 */
  2539. #define DMA1_CSELR_CH2_USART3_TX ((uint32_t)0x000000A0U) /*!< Remap USART3 Tx on DMA1 channel 2 */
  2540. #define DMA1_CSELR_CH2_USART4_TX ((uint32_t)0x000000B0U) /*!< Remap USART4 Tx on DMA1 channel 2 */
  2541. #define DMA1_CSELR_CH2_USART5_TX ((uint32_t)0x000000C0U) /*!< Remap USART5 Tx on DMA1 channel 2 */
  2542. #define DMA1_CSELR_CH2_USART6_TX ((uint32_t)0x000000D0U) /*!< Remap USART6 Tx on DMA1 channel 2 */
  2543. #define DMA1_CSELR_CH2_USART7_TX ((uint32_t)0x000000E0U) /*!< Remap USART7 Tx on DMA1 channel 2 */
  2544. #define DMA1_CSELR_CH2_USART8_TX ((uint32_t)0x000000F0U) /*!< Remap USART8 Tx on DMA1 channel 2 */
  2545. #define DMA1_CSELR_CH3_TIM6_UP ((uint32_t)0x00000100U) /*!< Remap TIM6 up on DMA1 channel 3 */
  2546. #define DMA1_CSELR_CH3_DAC_CH1 ((uint32_t)0x00000100U) /*!< Remap DAC Channel 1on DMA1 channel 3 */
  2547. #define DMA1_CSELR_CH3_I2C1_RX ((uint32_t)0x00000200U) /*!< Remap I2C1 Rx on DMA1 channel 3 */
  2548. #define DMA1_CSELR_CH3_SPI1_TX ((uint32_t)0x00000300U) /*!< Remap SPI1 Tx on DMA1 channel 3 */
  2549. #define DMA1_CSELR_CH3_TIM1_CH2 ((uint32_t)0x00000400U) /*!< Remap TIM1 channel 2 on DMA1 channel 3 */
  2550. #define DMA1_CSELR_CH3_TIM2_CH2 ((uint32_t)0x00000500U) /*!< Remap TIM2 channel 2 on DMA1 channel 3 */
  2551. #define DMA1_CSELR_CH3_TIM16_CH1 ((uint32_t)0x00000700U) /*!< Remap TIM16 channel 1 on DMA1 channel 3 */
  2552. #define DMA1_CSELR_CH3_TIM16_UP ((uint32_t)0x00000700U) /*!< Remap TIM16 up on DMA1 channel 3 */
  2553. #define DMA1_CSELR_CH3_USART1_RX ((uint32_t)0x00000800U) /*!< Remap USART1 Rx on DMA1 channel 3 */
  2554. #define DMA1_CSELR_CH3_USART2_RX ((uint32_t)0x00000900U) /*!< Remap USART2 Rx on DMA1 channel 3 */
  2555. #define DMA1_CSELR_CH3_USART3_RX ((uint32_t)0x00000A00U) /*!< Remap USART3 Rx on DMA1 channel 3 */
  2556. #define DMA1_CSELR_CH3_USART4_RX ((uint32_t)0x00000B00U) /*!< Remap USART4 Rx on DMA1 channel 3 */
  2557. #define DMA1_CSELR_CH3_USART5_RX ((uint32_t)0x00000C00U) /*!< Remap USART5 Rx on DMA1 channel 3 */
  2558. #define DMA1_CSELR_CH3_USART6_RX ((uint32_t)0x00000D00U) /*!< Remap USART6 Rx on DMA1 channel 3 */
  2559. #define DMA1_CSELR_CH3_USART7_RX ((uint32_t)0x00000E00U) /*!< Remap USART7 Rx on DMA1 channel 3 */
  2560. #define DMA1_CSELR_CH3_USART8_RX ((uint32_t)0x00000F00U) /*!< Remap USART8 Rx on DMA1 channel 3 */
  2561. #define DMA1_CSELR_CH4_TIM7_UP ((uint32_t)0x00001000U) /*!< Remap TIM7 up on DMA1 channel 4 */
  2562. #define DMA1_CSELR_CH4_DAC_CH2 ((uint32_t)0x00001000U) /*!< Remap DAC Channel 2 on DMA1 channel 4 */
  2563. #define DMA1_CSELR_CH4_I2C2_TX ((uint32_t)0x00002000U) /*!< Remap I2C2 Tx on DMA1 channel 4 */
  2564. #define DMA1_CSELR_CH4_SPI2_RX ((uint32_t)0x00003000U) /*!< Remap SPI2 Rx on DMA1 channel 4 */
  2565. #define DMA1_CSELR_CH4_TIM2_CH4 ((uint32_t)0x00005000U) /*!< Remap TIM2 channel 4 on DMA1 channel 4 */
  2566. #define DMA1_CSELR_CH4_TIM3_CH1 ((uint32_t)0x00006000U) /*!< Remap TIM3 channel 1 on DMA1 channel 4 */
  2567. #define DMA1_CSELR_CH4_TIM3_TRIG ((uint32_t)0x00006000U) /*!< Remap TIM3 Trig on DMA1 channel 4 */
  2568. #define DMA1_CSELR_CH4_TIM16_CH1 ((uint32_t)0x00007000U) /*!< Remap TIM16 channel 1 on DMA1 channel 4 */
  2569. #define DMA1_CSELR_CH4_TIM16_UP ((uint32_t)0x00007000U) /*!< Remap TIM16 up on DMA1 channel 4 */
  2570. #define DMA1_CSELR_CH4_USART1_TX ((uint32_t)0x00008000U) /*!< Remap USART1 Tx on DMA1 channel 4 */
  2571. #define DMA1_CSELR_CH4_USART2_TX ((uint32_t)0x00009000U) /*!< Remap USART2 Tx on DMA1 channel 4 */
  2572. #define DMA1_CSELR_CH4_USART3_TX ((uint32_t)0x0000A000U) /*!< Remap USART3 Tx on DMA1 channel 4 */
  2573. #define DMA1_CSELR_CH4_USART4_TX ((uint32_t)0x0000B000U) /*!< Remap USART4 Tx on DMA1 channel 4 */
  2574. #define DMA1_CSELR_CH4_USART5_TX ((uint32_t)0x0000C000U) /*!< Remap USART5 Tx on DMA1 channel 4 */
  2575. #define DMA1_CSELR_CH4_USART6_TX ((uint32_t)0x0000D000U) /*!< Remap USART6 Tx on DMA1 channel 4 */
  2576. #define DMA1_CSELR_CH4_USART7_TX ((uint32_t)0x0000E000U) /*!< Remap USART7 Tx on DMA1 channel 4 */
  2577. #define DMA1_CSELR_CH4_USART8_TX ((uint32_t)0x0000F000U) /*!< Remap USART8 Tx on DMA1 channel 4 */
  2578. #define DMA1_CSELR_CH5_I2C2_RX ((uint32_t)0x00020000U) /*!< Remap I2C2 Rx on DMA1 channel 5 */
  2579. #define DMA1_CSELR_CH5_SPI2_TX ((uint32_t)0x00030000U) /*!< Remap SPI1 Tx on DMA1 channel 5 */
  2580. #define DMA1_CSELR_CH5_TIM1_CH3 ((uint32_t)0x00040000U) /*!< Remap TIM1 channel 3 on DMA1 channel 5 */
  2581. #define DMA1_CSELR_CH5_USART1_RX ((uint32_t)0x00080000U) /*!< Remap USART1 Rx on DMA1 channel 5 */
  2582. #define DMA1_CSELR_CH5_USART2_RX ((uint32_t)0x00090000U) /*!< Remap USART2 Rx on DMA1 channel 5 */
  2583. #define DMA1_CSELR_CH5_USART3_RX ((uint32_t)0x000A0000U) /*!< Remap USART3 Rx on DMA1 channel 5 */
  2584. #define DMA1_CSELR_CH5_USART4_RX ((uint32_t)0x000B0000U) /*!< Remap USART4 Rx on DMA1 channel 5 */
  2585. #define DMA1_CSELR_CH5_USART5_RX ((uint32_t)0x000C0000U) /*!< Remap USART5 Rx on DMA1 channel 5 */
  2586. #define DMA1_CSELR_CH5_USART6_RX ((uint32_t)0x000D0000U) /*!< Remap USART6 Rx on DMA1 channel 5 */
  2587. #define DMA1_CSELR_CH5_USART7_RX ((uint32_t)0x000E0000U) /*!< Remap USART7 Rx on DMA1 channel 5 */
  2588. #define DMA1_CSELR_CH5_USART8_RX ((uint32_t)0x000F0000U) /*!< Remap USART8 Rx on DMA1 channel 5 */
  2589. #define DMA1_CSELR_CH6_I2C1_TX ((uint32_t)0x00200000U) /*!< Remap I2C1 Tx on DMA1 channel 6 */
  2590. #define DMA1_CSELR_CH6_SPI2_RX ((uint32_t)0x00300000U) /*!< Remap SPI2 Rx on DMA1 channel 6 */
  2591. #define DMA1_CSELR_CH6_TIM1_CH1 ((uint32_t)0x00400000U) /*!< Remap TIM1 channel 1 on DMA1 channel 6 */
  2592. #define DMA1_CSELR_CH6_TIM1_CH2 ((uint32_t)0x00400000U) /*!< Remap TIM1 channel 2 on DMA1 channel 6 */
  2593. #define DMA1_CSELR_CH6_TIM1_CH3 ((uint32_t)0x00400000U) /*!< Remap TIM1 channel 3 on DMA1 channel 6 */
  2594. #define DMA1_CSELR_CH6_TIM3_CH1 ((uint32_t)0x00600000U) /*!< Remap TIM3 channel 1 on DMA1 channel 6 */
  2595. #define DMA1_CSELR_CH6_TIM3_TRIG ((uint32_t)0x00600000U) /*!< Remap TIM3 Trig on DMA1 channel 6 */
  2596. #define DMA1_CSELR_CH6_TIM16_CH1 ((uint32_t)0x00700000U) /*!< Remap TIM16 channel 1 on DMA1 channel 6 */
  2597. #define DMA1_CSELR_CH6_TIM16_UP ((uint32_t)0x00700000U) /*!< Remap TIM16 up on DMA1 channel 6 */
  2598. #define DMA1_CSELR_CH6_USART1_RX ((uint32_t)0x00800000U) /*!< Remap USART1 Rx on DMA1 channel 6 */
  2599. #define DMA1_CSELR_CH6_USART2_RX ((uint32_t)0x00900000U) /*!< Remap USART2 Rx on DMA1 channel 6 */
  2600. #define DMA1_CSELR_CH6_USART3_RX ((uint32_t)0x00A00000U) /*!< Remap USART3 Rx on DMA1 channel 6 */
  2601. #define DMA1_CSELR_CH6_USART4_RX ((uint32_t)0x00B00000U) /*!< Remap USART4 Rx on DMA1 channel 6 */
  2602. #define DMA1_CSELR_CH6_USART5_RX ((uint32_t)0x00C00000U) /*!< Remap USART5 Rx on DMA1 channel 6 */
  2603. #define DMA1_CSELR_CH6_USART6_RX ((uint32_t)0x00D00000U) /*!< Remap USART6 Rx on DMA1 channel 6 */
  2604. #define DMA1_CSELR_CH6_USART7_RX ((uint32_t)0x00E00000U) /*!< Remap USART7 Rx on DMA1 channel 6 */
  2605. #define DMA1_CSELR_CH6_USART8_RX ((uint32_t)0x00F00000U) /*!< Remap USART8 Rx on DMA1 channel 6 */
  2606. #define DMA1_CSELR_CH7_I2C1_RX ((uint32_t)0x02000000U) /*!< Remap I2C1 Rx on DMA1 channel 7 */
  2607. #define DMA1_CSELR_CH7_SPI2_TX ((uint32_t)0x03000000U) /*!< Remap SPI2 Tx on DMA1 channel 7 */
  2608. #define DMA1_CSELR_CH7_TIM2_CH2 ((uint32_t)0x05000000U) /*!< Remap TIM2 channel 2 on DMA1 channel 7 */
  2609. #define DMA1_CSELR_CH7_TIM2_CH4 ((uint32_t)0x05000000U) /*!< Remap TIM2 channel 4 on DMA1 channel 7 */
  2610. #define DMA1_CSELR_CH7_TIM17_CH1 ((uint32_t)0x07000000U) /*!< Remap TIM17 channel 1 on DMA1 channel 7 */
  2611. #define DMA1_CSELR_CH7_TIM17_UP ((uint32_t)0x07000000U) /*!< Remap TIM17 up on DMA1 channel 7 */
  2612. #define DMA1_CSELR_CH7_USART1_TX ((uint32_t)0x08000000U) /*!< Remap USART1 Tx on DMA1 channel 7 */
  2613. #define DMA1_CSELR_CH7_USART2_TX ((uint32_t)0x09000000U) /*!< Remap USART2 Tx on DMA1 channel 7 */
  2614. #define DMA1_CSELR_CH7_USART3_TX ((uint32_t)0x0A000000U) /*!< Remap USART3 Tx on DMA1 channel 7 */
  2615. #define DMA1_CSELR_CH7_USART4_TX ((uint32_t)0x0B000000U) /*!< Remap USART4 Tx on DMA1 channel 7 */
  2616. #define DMA1_CSELR_CH7_USART5_TX ((uint32_t)0x0C000000U) /*!< Remap USART5 Tx on DMA1 channel 7 */
  2617. #define DMA1_CSELR_CH7_USART6_TX ((uint32_t)0x0D000000U) /*!< Remap USART6 Tx on DMA1 channel 7 */
  2618. #define DMA1_CSELR_CH7_USART7_TX ((uint32_t)0x0E000000U) /*!< Remap USART7 Tx on DMA1 channel 7 */
  2619. #define DMA1_CSELR_CH7_USART8_TX ((uint32_t)0x0F000000U) /*!< Remap USART8 Tx on DMA1 channel 7 */
  2620. /****************** Bit definition for DMA2_CSELR register ********************/
  2621. #define DMA2_CSELR_DEFAULT ((uint32_t)0x00000000U) /*!< Default remap position for DMA2 */
  2622. #define DMA2_CSELR_CH1_I2C2_TX ((uint32_t)0x00000002U) /*!< Remap I2C2 TX on DMA2 channel 1 */
  2623. #define DMA2_CSELR_CH1_USART1_TX ((uint32_t)0x00000008U) /*!< Remap USART1 Tx on DMA2 channel 1 */
  2624. #define DMA2_CSELR_CH1_USART2_TX ((uint32_t)0x00000009U) /*!< Remap USART2 Tx on DMA2 channel 1 */
  2625. #define DMA2_CSELR_CH1_USART3_TX ((uint32_t)0x0000000AU) /*!< Remap USART3 Tx on DMA2 channel 1 */
  2626. #define DMA2_CSELR_CH1_USART4_TX ((uint32_t)0x0000000BU) /*!< Remap USART4 Tx on DMA2 channel 1 */
  2627. #define DMA2_CSELR_CH1_USART5_TX ((uint32_t)0x0000000CU) /*!< Remap USART5 Tx on DMA2 channel 1 */
  2628. #define DMA2_CSELR_CH1_USART6_TX ((uint32_t)0x0000000DU) /*!< Remap USART6 Tx on DMA2 channel 1 */
  2629. #define DMA2_CSELR_CH1_USART7_TX ((uint32_t)0x0000000EU) /*!< Remap USART7 Tx on DMA2 channel 1 */
  2630. #define DMA2_CSELR_CH1_USART8_TX ((uint32_t)0x0000000FU) /*!< Remap USART8 Tx on DMA2 channel 1 */
  2631. #define DMA2_CSELR_CH2_I2C2_RX ((uint32_t)0x00000020U) /*!< Remap I2C2 Rx on DMA2 channel 2 */
  2632. #define DMA2_CSELR_CH2_USART1_RX ((uint32_t)0x00000080U) /*!< Remap USART1 Rx on DMA2 channel 2 */
  2633. #define DMA2_CSELR_CH2_USART2_RX ((uint32_t)0x00000090U) /*!< Remap USART2 Rx on DMA2 channel 2 */
  2634. #define DMA2_CSELR_CH2_USART3_RX ((uint32_t)0x000000A0U) /*!< Remap USART3 Rx on DMA2 channel 2 */
  2635. #define DMA2_CSELR_CH2_USART4_RX ((uint32_t)0x000000B0U) /*!< Remap USART4 Rx on DMA2 channel 2 */
  2636. #define DMA2_CSELR_CH2_USART5_RX ((uint32_t)0x000000C0U) /*!< Remap USART5 Rx on DMA2 channel 2 */
  2637. #define DMA2_CSELR_CH2_USART6_RX ((uint32_t)0x000000D0U) /*!< Remap USART6 Rx on DMA2 channel 2 */
  2638. #define DMA2_CSELR_CH2_USART7_RX ((uint32_t)0x000000E0U) /*!< Remap USART7 Rx on DMA2 channel 2 */
  2639. #define DMA2_CSELR_CH2_USART8_RX ((uint32_t)0x000000F0U) /*!< Remap USART8 Rx on DMA2 channel 2 */
  2640. #define DMA2_CSELR_CH3_TIM6_UP ((uint32_t)0x00000100U) /*!< Remap TIM6 up on DMA2 channel 3 */
  2641. #define DMA2_CSELR_CH3_DAC_CH1 ((uint32_t)0x00000100U) /*!< Remap DAC channel 1 on DMA2 channel 3 */
  2642. #define DMA2_CSELR_CH3_SPI1_RX ((uint32_t)0x00000300U) /*!< Remap SPI1 Rx on DMA2 channel 3 */
  2643. #define DMA2_CSELR_CH3_USART1_RX ((uint32_t)0x00000800U) /*!< Remap USART1 Rx on DMA2 channel 3 */
  2644. #define DMA2_CSELR_CH3_USART2_RX ((uint32_t)0x00000900U) /*!< Remap USART2 Rx on DMA2 channel 3 */
  2645. #define DMA2_CSELR_CH3_USART3_RX ((uint32_t)0x00000A00U) /*!< Remap USART3 Rx on DMA2 channel 3 */
  2646. #define DMA2_CSELR_CH3_USART4_RX ((uint32_t)0x00000B00U) /*!< Remap USART4 Rx on DMA2 channel 3 */
  2647. #define DMA2_CSELR_CH3_USART5_RX ((uint32_t)0x00000C00U) /*!< Remap USART5 Rx on DMA2 channel 3 */
  2648. #define DMA2_CSELR_CH3_USART6_RX ((uint32_t)0x00000D00U) /*!< Remap USART6 Rx on DMA2 channel 3 */
  2649. #define DMA2_CSELR_CH3_USART7_RX ((uint32_t)0x00000E00U) /*!< Remap USART7 Rx on DMA2 channel 3 */
  2650. #define DMA2_CSELR_CH3_USART8_RX ((uint32_t)0x00000F00U) /*!< Remap USART8 Rx on DMA2 channel 3 */
  2651. #define DMA2_CSELR_CH4_TIM7_UP ((uint32_t)0x00001000U) /*!< Remap TIM7 up on DMA2 channel 4 */
  2652. #define DMA2_CSELR_CH4_DAC_CH2 ((uint32_t)0x00001000U) /*!< Remap DAC channel 2 on DMA2 channel 4 */
  2653. #define DMA2_CSELR_CH4_SPI1_TX ((uint32_t)0x00003000U) /*!< Remap SPI1 Tx on DMA2 channel 4 */
  2654. #define DMA2_CSELR_CH4_USART1_TX ((uint32_t)0x00008000U) /*!< Remap USART1 Tx on DMA2 channel 4 */
  2655. #define DMA2_CSELR_CH4_USART2_TX ((uint32_t)0x00009000U) /*!< Remap USART2 Tx on DMA2 channel 4 */
  2656. #define DMA2_CSELR_CH4_USART3_TX ((uint32_t)0x0000A000U) /*!< Remap USART3 Tx on DMA2 channel 4 */
  2657. #define DMA2_CSELR_CH4_USART4_TX ((uint32_t)0x0000B000U) /*!< Remap USART4 Tx on DMA2 channel 4 */
  2658. #define DMA2_CSELR_CH4_USART5_TX ((uint32_t)0x0000C000U) /*!< Remap USART5 Tx on DMA2 channel 4 */
  2659. #define DMA2_CSELR_CH4_USART6_TX ((uint32_t)0x0000D000U) /*!< Remap USART6 Tx on DMA2 channel 4 */
  2660. #define DMA2_CSELR_CH4_USART7_TX ((uint32_t)0x0000E000U) /*!< Remap USART7 Tx on DMA2 channel 4 */
  2661. #define DMA2_CSELR_CH4_USART8_TX ((uint32_t)0x0000F000U) /*!< Remap USART8 Tx on DMA2 channel 4 */
  2662. #define DMA2_CSELR_CH5_ADC ((uint32_t)0x00010000U) /*!< Remap ADC on DMA2 channel 5 */
  2663. #define DMA2_CSELR_CH5_USART1_TX ((uint32_t)0x00080000U) /*!< Remap USART1 Tx on DMA2 channel 5 */
  2664. #define DMA2_CSELR_CH5_USART2_TX ((uint32_t)0x00090000U) /*!< Remap USART2 Tx on DMA2 channel 5 */
  2665. #define DMA2_CSELR_CH5_USART3_TX ((uint32_t)0x000A0000U) /*!< Remap USART3 Tx on DMA2 channel 5 */
  2666. #define DMA2_CSELR_CH5_USART4_TX ((uint32_t)0x000B0000U) /*!< Remap USART4 Tx on DMA2 channel 5 */
  2667. #define DMA2_CSELR_CH5_USART5_TX ((uint32_t)0x000C0000U) /*!< Remap USART5 Tx on DMA2 channel 5 */
  2668. #define DMA2_CSELR_CH5_USART6_TX ((uint32_t)0x000D0000U) /*!< Remap USART6 Tx on DMA2 channel 5 */
  2669. #define DMA2_CSELR_CH5_USART7_TX ((uint32_t)0x000E0000U) /*!< Remap USART7 Tx on DMA2 channel 5 */
  2670. #define DMA2_CSELR_CH5_USART8_TX ((uint32_t)0x000F0000U) /*!< Remap USART8 Tx on DMA2 channel 5 */
  2671. /******************************************************************************/
  2672. /* */
  2673. /* External Interrupt/Event Controller (EXTI) */
  2674. /* */
  2675. /******************************************************************************/
  2676. /******************* Bit definition for EXTI_IMR register *******************/
  2677. #define EXTI_IMR_MR0 ((uint32_t)0x00000001U) /*!< Interrupt Mask on line 0 */
  2678. #define EXTI_IMR_MR1 ((uint32_t)0x00000002U) /*!< Interrupt Mask on line 1 */
  2679. #define EXTI_IMR_MR2 ((uint32_t)0x00000004U) /*!< Interrupt Mask on line 2 */
  2680. #define EXTI_IMR_MR3 ((uint32_t)0x00000008U) /*!< Interrupt Mask on line 3 */
  2681. #define EXTI_IMR_MR4 ((uint32_t)0x00000010U) /*!< Interrupt Mask on line 4 */
  2682. #define EXTI_IMR_MR5 ((uint32_t)0x00000020U) /*!< Interrupt Mask on line 5 */
  2683. #define EXTI_IMR_MR6 ((uint32_t)0x00000040U) /*!< Interrupt Mask on line 6 */
  2684. #define EXTI_IMR_MR7 ((uint32_t)0x00000080U) /*!< Interrupt Mask on line 7 */
  2685. #define EXTI_IMR_MR8 ((uint32_t)0x00000100U) /*!< Interrupt Mask on line 8 */
  2686. #define EXTI_IMR_MR9 ((uint32_t)0x00000200U) /*!< Interrupt Mask on line 9 */
  2687. #define EXTI_IMR_MR10 ((uint32_t)0x00000400U) /*!< Interrupt Mask on line 10 */
  2688. #define EXTI_IMR_MR11 ((uint32_t)0x00000800U) /*!< Interrupt Mask on line 11 */
  2689. #define EXTI_IMR_MR12 ((uint32_t)0x00001000U) /*!< Interrupt Mask on line 12 */
  2690. #define EXTI_IMR_MR13 ((uint32_t)0x00002000U) /*!< Interrupt Mask on line 13 */
  2691. #define EXTI_IMR_MR14 ((uint32_t)0x00004000U) /*!< Interrupt Mask on line 14 */
  2692. #define EXTI_IMR_MR15 ((uint32_t)0x00008000U) /*!< Interrupt Mask on line 15 */
  2693. #define EXTI_IMR_MR16 ((uint32_t)0x00010000U) /*!< Interrupt Mask on line 16 */
  2694. #define EXTI_IMR_MR17 ((uint32_t)0x00020000U) /*!< Interrupt Mask on line 17 */
  2695. #define EXTI_IMR_MR18 ((uint32_t)0x00040000U) /*!< Interrupt Mask on line 18 */
  2696. #define EXTI_IMR_MR19 ((uint32_t)0x00080000U) /*!< Interrupt Mask on line 19 */
  2697. #define EXTI_IMR_MR20 ((uint32_t)0x00100000U) /*!< Interrupt Mask on line 20 */
  2698. #define EXTI_IMR_MR21 ((uint32_t)0x00200000U) /*!< Interrupt Mask on line 21 */
  2699. #define EXTI_IMR_MR22 ((uint32_t)0x00400000U) /*!< Interrupt Mask on line 22 */
  2700. #define EXTI_IMR_MR23 ((uint32_t)0x00800000U) /*!< Interrupt Mask on line 23 */
  2701. #define EXTI_IMR_MR25 ((uint32_t)0x02000000U) /*!< Interrupt Mask on line 25 */
  2702. #define EXTI_IMR_MR26 ((uint32_t)0x04000000U) /*!< Interrupt Mask on line 26 */
  2703. #define EXTI_IMR_MR27 ((uint32_t)0x08000000U) /*!< Interrupt Mask on line 27 */
  2704. #define EXTI_IMR_MR28 ((uint32_t)0x10000000U) /*!< Interrupt Mask on line 28 */
  2705. #define EXTI_IMR_MR31 ((uint32_t)0x80000000U) /*!< Interrupt Mask on line 31 */
  2706. /* References Defines */
  2707. #define EXTI_IMR_IM0 EXTI_IMR_MR0
  2708. #define EXTI_IMR_IM1 EXTI_IMR_MR1
  2709. #define EXTI_IMR_IM2 EXTI_IMR_MR2
  2710. #define EXTI_IMR_IM3 EXTI_IMR_MR3
  2711. #define EXTI_IMR_IM4 EXTI_IMR_MR4
  2712. #define EXTI_IMR_IM5 EXTI_IMR_MR5
  2713. #define EXTI_IMR_IM6 EXTI_IMR_MR6
  2714. #define EXTI_IMR_IM7 EXTI_IMR_MR7
  2715. #define EXTI_IMR_IM8 EXTI_IMR_MR8
  2716. #define EXTI_IMR_IM9 EXTI_IMR_MR9
  2717. #define EXTI_IMR_IM10 EXTI_IMR_MR10
  2718. #define EXTI_IMR_IM11 EXTI_IMR_MR11
  2719. #define EXTI_IMR_IM12 EXTI_IMR_MR12
  2720. #define EXTI_IMR_IM13 EXTI_IMR_MR13
  2721. #define EXTI_IMR_IM14 EXTI_IMR_MR14
  2722. #define EXTI_IMR_IM15 EXTI_IMR_MR15
  2723. #define EXTI_IMR_IM16 EXTI_IMR_MR16
  2724. #define EXTI_IMR_IM17 EXTI_IMR_MR17
  2725. #define EXTI_IMR_IM18 EXTI_IMR_MR18
  2726. #define EXTI_IMR_IM19 EXTI_IMR_MR19
  2727. #define EXTI_IMR_IM20 EXTI_IMR_MR20
  2728. #define EXTI_IMR_IM21 EXTI_IMR_MR21
  2729. #define EXTI_IMR_IM22 EXTI_IMR_MR22
  2730. #define EXTI_IMR_IM23 EXTI_IMR_MR23
  2731. #define EXTI_IMR_IM25 EXTI_IMR_MR25
  2732. #define EXTI_IMR_IM26 EXTI_IMR_MR26
  2733. #define EXTI_IMR_IM27 EXTI_IMR_MR27
  2734. #define EXTI_IMR_IM28 EXTI_IMR_MR28
  2735. #define EXTI_IMR_IM31 EXTI_IMR_MR31
  2736. /****************** Bit definition for EXTI_EMR register ********************/
  2737. #define EXTI_EMR_MR0 ((uint32_t)0x00000001U) /*!< Event Mask on line 0 */
  2738. #define EXTI_EMR_MR1 ((uint32_t)0x00000002U) /*!< Event Mask on line 1 */
  2739. #define EXTI_EMR_MR2 ((uint32_t)0x00000004U) /*!< Event Mask on line 2 */
  2740. #define EXTI_EMR_MR3 ((uint32_t)0x00000008U) /*!< Event Mask on line 3 */
  2741. #define EXTI_EMR_MR4 ((uint32_t)0x00000010U) /*!< Event Mask on line 4 */
  2742. #define EXTI_EMR_MR5 ((uint32_t)0x00000020U) /*!< Event Mask on line 5 */
  2743. #define EXTI_EMR_MR6 ((uint32_t)0x00000040U) /*!< Event Mask on line 6 */
  2744. #define EXTI_EMR_MR7 ((uint32_t)0x00000080U) /*!< Event Mask on line 7 */
  2745. #define EXTI_EMR_MR8 ((uint32_t)0x00000100U) /*!< Event Mask on line 8 */
  2746. #define EXTI_EMR_MR9 ((uint32_t)0x00000200U) /*!< Event Mask on line 9 */
  2747. #define EXTI_EMR_MR10 ((uint32_t)0x00000400U) /*!< Event Mask on line 10 */
  2748. #define EXTI_EMR_MR11 ((uint32_t)0x00000800U) /*!< Event Mask on line 11 */
  2749. #define EXTI_EMR_MR12 ((uint32_t)0x00001000U) /*!< Event Mask on line 12 */
  2750. #define EXTI_EMR_MR13 ((uint32_t)0x00002000U) /*!< Event Mask on line 13 */
  2751. #define EXTI_EMR_MR14 ((uint32_t)0x00004000U) /*!< Event Mask on line 14 */
  2752. #define EXTI_EMR_MR15 ((uint32_t)0x00008000U) /*!< Event Mask on line 15 */
  2753. #define EXTI_EMR_MR16 ((uint32_t)0x00010000U) /*!< Event Mask on line 16 */
  2754. #define EXTI_EMR_MR17 ((uint32_t)0x00020000U) /*!< Event Mask on line 17 */
  2755. #define EXTI_EMR_MR18 ((uint32_t)0x00040000U) /*!< Event Mask on line 18 */
  2756. #define EXTI_EMR_MR19 ((uint32_t)0x00080000U) /*!< Event Mask on line 19 */
  2757. #define EXTI_EMR_MR20 ((uint32_t)0x00100000U) /*!< Event Mask on line 20 */
  2758. #define EXTI_EMR_MR21 ((uint32_t)0x00200000U) /*!< Event Mask on line 21 */
  2759. #define EXTI_EMR_MR22 ((uint32_t)0x00400000U) /*!< Event Mask on line 22 */
  2760. #define EXTI_EMR_MR23 ((uint32_t)0x00800000U) /*!< Event Mask on line 23 */
  2761. #define EXTI_EMR_MR25 ((uint32_t)0x02000000U) /*!< Event Mask on line 25 */
  2762. #define EXTI_EMR_MR26 ((uint32_t)0x04000000U) /*!< Event Mask on line 26 */
  2763. #define EXTI_EMR_MR27 ((uint32_t)0x08000000U) /*!< Event Mask on line 27 */
  2764. #define EXTI_EMR_MR28 ((uint32_t)0x10000000U) /*!< Event Mask on line 28 */
  2765. #define EXTI_EMR_MR31 ((uint32_t)0x80000000U) /*!< Event Mask on line 31 */
  2766. /* References Defines */
  2767. #define EXTI_EMR_EM0 EXTI_EMR_MR0
  2768. #define EXTI_EMR_EM1 EXTI_EMR_MR1
  2769. #define EXTI_EMR_EM2 EXTI_EMR_MR2
  2770. #define EXTI_EMR_EM3 EXTI_EMR_MR3
  2771. #define EXTI_EMR_EM4 EXTI_EMR_MR4
  2772. #define EXTI_EMR_EM5 EXTI_EMR_MR5
  2773. #define EXTI_EMR_EM6 EXTI_EMR_MR6
  2774. #define EXTI_EMR_EM7 EXTI_EMR_MR7
  2775. #define EXTI_EMR_EM8 EXTI_EMR_MR8
  2776. #define EXTI_EMR_EM9 EXTI_EMR_MR9
  2777. #define EXTI_EMR_EM10 EXTI_EMR_MR10
  2778. #define EXTI_EMR_EM11 EXTI_EMR_MR11
  2779. #define EXTI_EMR_EM12 EXTI_EMR_MR12
  2780. #define EXTI_EMR_EM13 EXTI_EMR_MR13
  2781. #define EXTI_EMR_EM14 EXTI_EMR_MR14
  2782. #define EXTI_EMR_EM15 EXTI_EMR_MR15
  2783. #define EXTI_EMR_EM16 EXTI_EMR_MR16
  2784. #define EXTI_EMR_EM17 EXTI_EMR_MR17
  2785. #define EXTI_EMR_EM18 EXTI_EMR_MR18
  2786. #define EXTI_EMR_EM19 EXTI_EMR_MR19
  2787. #define EXTI_EMR_EM20 EXTI_EMR_MR0
  2788. #define EXTI_EMR_EM21 EXTI_EMR_MR21
  2789. #define EXTI_EMR_EM22 EXTI_EMR_MR22
  2790. #define EXTI_EMR_EM23 EXTI_EMR_MR23
  2791. #define EXTI_EMR_EM25 EXTI_EMR_MR25
  2792. #define EXTI_EMR_EM26 EXTI_EMR_MR26
  2793. #define EXTI_EMR_EM27 EXTI_EMR_MR27
  2794. #define EXTI_EMR_EM28 EXTI_EMR_MR28
  2795. #define EXTI_EMR_EM31 EXTI_EMR_MR31
  2796. /******************* Bit definition for EXTI_RTSR register ******************/
  2797. #define EXTI_RTSR_TR0 ((uint32_t)0x00000001U) /*!< Rising trigger event configuration bit of line 0 */
  2798. #define EXTI_RTSR_TR1 ((uint32_t)0x00000002U) /*!< Rising trigger event configuration bit of line 1 */
  2799. #define EXTI_RTSR_TR2 ((uint32_t)0x00000004U) /*!< Rising trigger event configuration bit of line 2 */
  2800. #define EXTI_RTSR_TR3 ((uint32_t)0x00000008U) /*!< Rising trigger event configuration bit of line 3 */
  2801. #define EXTI_RTSR_TR4 ((uint32_t)0x00000010U) /*!< Rising trigger event configuration bit of line 4 */
  2802. #define EXTI_RTSR_TR5 ((uint32_t)0x00000020U) /*!< Rising trigger event configuration bit of line 5 */
  2803. #define EXTI_RTSR_TR6 ((uint32_t)0x00000040U) /*!< Rising trigger event configuration bit of line 6 */
  2804. #define EXTI_RTSR_TR7 ((uint32_t)0x00000080U) /*!< Rising trigger event configuration bit of line 7 */
  2805. #define EXTI_RTSR_TR8 ((uint32_t)0x00000100U) /*!< Rising trigger event configuration bit of line 8 */
  2806. #define EXTI_RTSR_TR9 ((uint32_t)0x00000200U) /*!< Rising trigger event configuration bit of line 9 */
  2807. #define EXTI_RTSR_TR10 ((uint32_t)0x00000400U) /*!< Rising trigger event configuration bit of line 10 */
  2808. #define EXTI_RTSR_TR11 ((uint32_t)0x00000800U) /*!< Rising trigger event configuration bit of line 11 */
  2809. #define EXTI_RTSR_TR12 ((uint32_t)0x00001000U) /*!< Rising trigger event configuration bit of line 12 */
  2810. #define EXTI_RTSR_TR13 ((uint32_t)0x00002000U) /*!< Rising trigger event configuration bit of line 13 */
  2811. #define EXTI_RTSR_TR14 ((uint32_t)0x00004000U) /*!< Rising trigger event configuration bit of line 14 */
  2812. #define EXTI_RTSR_TR15 ((uint32_t)0x00008000U) /*!< Rising trigger event configuration bit of line 15 */
  2813. #define EXTI_RTSR_TR16 ((uint32_t)0x00010000U) /*!< Rising trigger event configuration bit of line 16 */
  2814. #define EXTI_RTSR_TR17 ((uint32_t)0x00020000U) /*!< Rising trigger event configuration bit of line 17 */
  2815. #define EXTI_RTSR_TR19 ((uint32_t)0x00080000U) /*!< Rising trigger event configuration bit of line 19 */
  2816. #define EXTI_RTSR_TR20 ((uint32_t)0x00100000U) /*!< Rising trigger event configuration bit of line 20 */
  2817. #define EXTI_RTSR_TR21 ((uint32_t)0x00200000U) /*!< Rising trigger event configuration bit of line 21 */
  2818. #define EXTI_RTSR_TR22 ((uint32_t)0x00400000U) /*!< Rising trigger event configuration bit of line 22 */
  2819. /* References Defines */
  2820. #define EXTI_RTSR_RT0 EXTI_RTSR_TR0
  2821. #define EXTI_RTSR_RT1 EXTI_RTSR_TR1
  2822. #define EXTI_RTSR_RT2 EXTI_RTSR_TR2
  2823. #define EXTI_RTSR_RT3 EXTI_RTSR_TR3
  2824. #define EXTI_RTSR_RT4 EXTI_RTSR_TR4
  2825. #define EXTI_RTSR_RT5 EXTI_RTSR_TR5
  2826. #define EXTI_RTSR_RT6 EXTI_RTSR_TR6
  2827. #define EXTI_RTSR_RT7 EXTI_RTSR_TR7
  2828. #define EXTI_RTSR_RT8 EXTI_RTSR_TR8
  2829. #define EXTI_RTSR_RT9 EXTI_RTSR_TR9
  2830. #define EXTI_RTSR_RT10 EXTI_RTSR_TR10
  2831. #define EXTI_RTSR_RT11 EXTI_RTSR_TR11
  2832. #define EXTI_RTSR_RT12 EXTI_RTSR_TR12
  2833. #define EXTI_RTSR_RT13 EXTI_RTSR_TR13
  2834. #define EXTI_RTSR_RT14 EXTI_RTSR_TR14
  2835. #define EXTI_RTSR_RT15 EXTI_RTSR_TR15
  2836. #define EXTI_RTSR_RT16 EXTI_RTSR_TR16
  2837. #define EXTI_RTSR_RT17 EXTI_RTSR_TR17
  2838. #define EXTI_RTSR_RT19 EXTI_RTSR_TR19
  2839. #define EXTI_RTSR_RT20 EXTI_RTSR_TR20
  2840. #define EXTI_RTSR_RT21 EXTI_RTSR_TR21
  2841. #define EXTI_RTSR_RT22 EXTI_RTSR_TR22
  2842. /******************* Bit definition for EXTI_FTSR register *******************/
  2843. #define EXTI_FTSR_TR0 ((uint32_t)0x00000001U) /*!< Falling trigger event configuration bit of line 0 */
  2844. #define EXTI_FTSR_TR1 ((uint32_t)0x00000002U) /*!< Falling trigger event configuration bit of line 1 */
  2845. #define EXTI_FTSR_TR2 ((uint32_t)0x00000004U) /*!< Falling trigger event configuration bit of line 2 */
  2846. #define EXTI_FTSR_TR3 ((uint32_t)0x00000008U) /*!< Falling trigger event configuration bit of line 3 */
  2847. #define EXTI_FTSR_TR4 ((uint32_t)0x00000010U) /*!< Falling trigger event configuration bit of line 4 */
  2848. #define EXTI_FTSR_TR5 ((uint32_t)0x00000020U) /*!< Falling trigger event configuration bit of line 5 */
  2849. #define EXTI_FTSR_TR6 ((uint32_t)0x00000040U) /*!< Falling trigger event configuration bit of line 6 */
  2850. #define EXTI_FTSR_TR7 ((uint32_t)0x00000080U) /*!< Falling trigger event configuration bit of line 7 */
  2851. #define EXTI_FTSR_TR8 ((uint32_t)0x00000100U) /*!< Falling trigger event configuration bit of line 8 */
  2852. #define EXTI_FTSR_TR9 ((uint32_t)0x00000200U) /*!< Falling trigger event configuration bit of line 9 */
  2853. #define EXTI_FTSR_TR10 ((uint32_t)0x00000400U) /*!< Falling trigger event configuration bit of line 10 */
  2854. #define EXTI_FTSR_TR11 ((uint32_t)0x00000800U) /*!< Falling trigger event configuration bit of line 11 */
  2855. #define EXTI_FTSR_TR12 ((uint32_t)0x00001000U) /*!< Falling trigger event configuration bit of line 12 */
  2856. #define EXTI_FTSR_TR13 ((uint32_t)0x00002000U) /*!< Falling trigger event configuration bit of line 13 */
  2857. #define EXTI_FTSR_TR14 ((uint32_t)0x00004000U) /*!< Falling trigger event configuration bit of line 14 */
  2858. #define EXTI_FTSR_TR15 ((uint32_t)0x00008000U) /*!< Falling trigger event configuration bit of line 15 */
  2859. #define EXTI_FTSR_TR16 ((uint32_t)0x00010000U) /*!< Falling trigger event configuration bit of line 16 */
  2860. #define EXTI_FTSR_TR17 ((uint32_t)0x00020000U) /*!< Falling trigger event configuration bit of line 17 */
  2861. #define EXTI_FTSR_TR19 ((uint32_t)0x00080000U) /*!< Falling trigger event configuration bit of line 19 */
  2862. #define EXTI_FTSR_TR20 ((uint32_t)0x00100000U) /*!< Falling trigger event configuration bit of line 20 */
  2863. #define EXTI_FTSR_TR21 ((uint32_t)0x00200000U) /*!< Falling trigger event configuration bit of line 21 */
  2864. #define EXTI_FTSR_TR22 ((uint32_t)0x00400000U) /*!< Falling trigger event configuration bit of line 22 */
  2865. /* References Defines */
  2866. #define EXTI_FTSR_FT0 EXTI_FTSR_TR0
  2867. #define EXTI_FTSR_FT1 EXTI_FTSR_TR1
  2868. #define EXTI_FTSR_FT2 EXTI_FTSR_TR2
  2869. #define EXTI_FTSR_FT3 EXTI_FTSR_TR3
  2870. #define EXTI_FTSR_FT4 EXTI_FTSR_TR4
  2871. #define EXTI_FTSR_FT5 EXTI_FTSR_TR5
  2872. #define EXTI_FTSR_FT6 EXTI_FTSR_TR6
  2873. #define EXTI_FTSR_FT7 EXTI_FTSR_TR7
  2874. #define EXTI_FTSR_FT8 EXTI_FTSR_TR8
  2875. #define EXTI_FTSR_FT9 EXTI_FTSR_TR9
  2876. #define EXTI_FTSR_FT10 EXTI_FTSR_TR10
  2877. #define EXTI_FTSR_FT11 EXTI_FTSR_TR11
  2878. #define EXTI_FTSR_FT12 EXTI_FTSR_TR12
  2879. #define EXTI_FTSR_FT13 EXTI_FTSR_TR13
  2880. #define EXTI_FTSR_FT14 EXTI_FTSR_TR14
  2881. #define EXTI_FTSR_FT15 EXTI_FTSR_TR15
  2882. #define EXTI_FTSR_FT16 EXTI_FTSR_TR16
  2883. #define EXTI_FTSR_FT17 EXTI_FTSR_TR17
  2884. #define EXTI_FTSR_FT19 EXTI_FTSR_TR19
  2885. #define EXTI_FTSR_FT20 EXTI_FTSR_TR20
  2886. #define EXTI_FTSR_FT21 EXTI_FTSR_TR21
  2887. #define EXTI_FTSR_FT22 EXTI_FTSR_TR22
  2888. /******************* Bit definition for EXTI_SWIER register *******************/
  2889. #define EXTI_SWIER_SWIER0 ((uint32_t)0x00000001U) /*!< Software Interrupt on line 0 */
  2890. #define EXTI_SWIER_SWIER1 ((uint32_t)0x00000002U) /*!< Software Interrupt on line 1 */
  2891. #define EXTI_SWIER_SWIER2 ((uint32_t)0x00000004U) /*!< Software Interrupt on line 2 */
  2892. #define EXTI_SWIER_SWIER3 ((uint32_t)0x00000008U) /*!< Software Interrupt on line 3 */
  2893. #define EXTI_SWIER_SWIER4 ((uint32_t)0x00000010U) /*!< Software Interrupt on line 4 */
  2894. #define EXTI_SWIER_SWIER5 ((uint32_t)0x00000020U) /*!< Software Interrupt on line 5 */
  2895. #define EXTI_SWIER_SWIER6 ((uint32_t)0x00000040U) /*!< Software Interrupt on line 6 */
  2896. #define EXTI_SWIER_SWIER7 ((uint32_t)0x00000080U) /*!< Software Interrupt on line 7 */
  2897. #define EXTI_SWIER_SWIER8 ((uint32_t)0x00000100U) /*!< Software Interrupt on line 8 */
  2898. #define EXTI_SWIER_SWIER9 ((uint32_t)0x00000200U) /*!< Software Interrupt on line 9 */
  2899. #define EXTI_SWIER_SWIER10 ((uint32_t)0x00000400U) /*!< Software Interrupt on line 10 */
  2900. #define EXTI_SWIER_SWIER11 ((uint32_t)0x00000800U) /*!< Software Interrupt on line 11 */
  2901. #define EXTI_SWIER_SWIER12 ((uint32_t)0x00001000U) /*!< Software Interrupt on line 12 */
  2902. #define EXTI_SWIER_SWIER13 ((uint32_t)0x00002000U) /*!< Software Interrupt on line 13 */
  2903. #define EXTI_SWIER_SWIER14 ((uint32_t)0x00004000U) /*!< Software Interrupt on line 14 */
  2904. #define EXTI_SWIER_SWIER15 ((uint32_t)0x00008000U) /*!< Software Interrupt on line 15 */
  2905. #define EXTI_SWIER_SWIER16 ((uint32_t)0x00010000U) /*!< Software Interrupt on line 16 */
  2906. #define EXTI_SWIER_SWIER17 ((uint32_t)0x00020000U) /*!< Software Interrupt on line 17 */
  2907. #define EXTI_SWIER_SWIER19 ((uint32_t)0x00080000U) /*!< Software Interrupt on line 19 */
  2908. #define EXTI_SWIER_SWIER20 ((uint32_t)0x00100000U) /*!< Software Interrupt on line 20 */
  2909. #define EXTI_SWIER_SWIER21 ((uint32_t)0x00200000U) /*!< Software Interrupt on line 21 */
  2910. #define EXTI_SWIER_SWIER22 ((uint32_t)0x00400000U) /*!< Software Interrupt on line 22 */
  2911. /* References Defines */
  2912. #define EXTI_SWIER_SWI0 EXTI_SWIER_SWIER0
  2913. #define EXTI_SWIER_SWI1 EXTI_SWIER_SWIER1
  2914. #define EXTI_SWIER_SWI2 EXTI_SWIER_SWIER2
  2915. #define EXTI_SWIER_SWI3 EXTI_SWIER_SWIER3
  2916. #define EXTI_SWIER_SWI4 EXTI_SWIER_SWIER4
  2917. #define EXTI_SWIER_SWI5 EXTI_SWIER_SWIER5
  2918. #define EXTI_SWIER_SWI6 EXTI_SWIER_SWIER6
  2919. #define EXTI_SWIER_SWI7 EXTI_SWIER_SWIER7
  2920. #define EXTI_SWIER_SWI8 EXTI_SWIER_SWIER8
  2921. #define EXTI_SWIER_SWI9 EXTI_SWIER_SWIER9
  2922. #define EXTI_SWIER_SWI10 EXTI_SWIER_SWIER10
  2923. #define EXTI_SWIER_SWI11 EXTI_SWIER_SWIER11
  2924. #define EXTI_SWIER_SWI12 EXTI_SWIER_SWIER12
  2925. #define EXTI_SWIER_SWI13 EXTI_SWIER_SWIER13
  2926. #define EXTI_SWIER_SWI14 EXTI_SWIER_SWIER14
  2927. #define EXTI_SWIER_SWI15 EXTI_SWIER_SWIER15
  2928. #define EXTI_SWIER_SWI16 EXTI_SWIER_SWIER16
  2929. #define EXTI_SWIER_SWI17 EXTI_SWIER_SWIER17
  2930. #define EXTI_SWIER_SWI19 EXTI_SWIER_SWIER19
  2931. #define EXTI_SWIER_SWI20 EXTI_SWIER_SWIER20
  2932. #define EXTI_SWIER_SWI21 EXTI_SWIER_SWIER21
  2933. #define EXTI_SWIER_SWI22 EXTI_SWIER_SWIER22
  2934. /****************** Bit definition for EXTI_PR register *********************/
  2935. #define EXTI_PR_PR0 ((uint32_t)0x00000001U) /*!< Pending bit 0 */
  2936. #define EXTI_PR_PR1 ((uint32_t)0x00000002U) /*!< Pending bit 1 */
  2937. #define EXTI_PR_PR2 ((uint32_t)0x00000004U) /*!< Pending bit 2 */
  2938. #define EXTI_PR_PR3 ((uint32_t)0x00000008U) /*!< Pending bit 3 */
  2939. #define EXTI_PR_PR4 ((uint32_t)0x00000010U) /*!< Pending bit 4 */
  2940. #define EXTI_PR_PR5 ((uint32_t)0x00000020U) /*!< Pending bit 5 */
  2941. #define EXTI_PR_PR6 ((uint32_t)0x00000040U) /*!< Pending bit 6 */
  2942. #define EXTI_PR_PR7 ((uint32_t)0x00000080U) /*!< Pending bit 7 */
  2943. #define EXTI_PR_PR8 ((uint32_t)0x00000100U) /*!< Pending bit 8 */
  2944. #define EXTI_PR_PR9 ((uint32_t)0x00000200U) /*!< Pending bit 9 */
  2945. #define EXTI_PR_PR10 ((uint32_t)0x00000400U) /*!< Pending bit 10 */
  2946. #define EXTI_PR_PR11 ((uint32_t)0x00000800U) /*!< Pending bit 11 */
  2947. #define EXTI_PR_PR12 ((uint32_t)0x00001000U) /*!< Pending bit 12 */
  2948. #define EXTI_PR_PR13 ((uint32_t)0x00002000U) /*!< Pending bit 13 */
  2949. #define EXTI_PR_PR14 ((uint32_t)0x00004000U) /*!< Pending bit 14 */
  2950. #define EXTI_PR_PR15 ((uint32_t)0x00008000U) /*!< Pending bit 15 */
  2951. #define EXTI_PR_PR16 ((uint32_t)0x00010000U) /*!< Pending bit 16 */
  2952. #define EXTI_PR_PR17 ((uint32_t)0x00020000U) /*!< Pending bit 17 */
  2953. #define EXTI_PR_PR19 ((uint32_t)0x00080000U) /*!< Pending bit 19 */
  2954. #define EXTI_PR_PR20 ((uint32_t)0x00100000U) /*!< Pending bit 20 */
  2955. #define EXTI_PR_PR21 ((uint32_t)0x00200000U) /*!< Pending bit 21 */
  2956. #define EXTI_PR_PR22 ((uint32_t)0x00400000U) /*!< Pending bit 22 */
  2957. /* References Defines */
  2958. #define EXTI_PR_PIF0 EXTI_PR_PR0
  2959. #define EXTI_PR_PIF1 EXTI_PR_PR1
  2960. #define EXTI_PR_PIF2 EXTI_PR_PR2
  2961. #define EXTI_PR_PIF3 EXTI_PR_PR3
  2962. #define EXTI_PR_PIF4 EXTI_PR_PR4
  2963. #define EXTI_PR_PIF5 EXTI_PR_PR5
  2964. #define EXTI_PR_PIF6 EXTI_PR_PR6
  2965. #define EXTI_PR_PIF7 EXTI_PR_PR7
  2966. #define EXTI_PR_PIF8 EXTI_PR_PR8
  2967. #define EXTI_PR_PIF9 EXTI_PR_PR9
  2968. #define EXTI_PR_PIF10 EXTI_PR_PR10
  2969. #define EXTI_PR_PIF11 EXTI_PR_PR11
  2970. #define EXTI_PR_PIF12 EXTI_PR_PR12
  2971. #define EXTI_PR_PIF13 EXTI_PR_PR13
  2972. #define EXTI_PR_PIF14 EXTI_PR_PR14
  2973. #define EXTI_PR_PIF15 EXTI_PR_PR15
  2974. #define EXTI_PR_PIF16 EXTI_PR_PR16
  2975. #define EXTI_PR_PIF17 EXTI_PR_PR17
  2976. #define EXTI_PR_PIF19 EXTI_PR_PR19
  2977. #define EXTI_PR_PIF20 EXTI_PR_PR20
  2978. #define EXTI_PR_PIF21 EXTI_PR_PR21
  2979. #define EXTI_PR_PIF22 EXTI_PR_PR22
  2980. /******************************************************************************/
  2981. /* */
  2982. /* FLASH and Option Bytes Registers */
  2983. /* */
  2984. /******************************************************************************/
  2985. /******************* Bit definition for FLASH_ACR register ******************/
  2986. #define FLASH_ACR_LATENCY ((uint32_t)0x00000001U) /*!< LATENCY bit (Latency) */
  2987. #define FLASH_ACR_PRFTBE ((uint32_t)0x00000010U) /*!< Prefetch Buffer Enable */
  2988. #define FLASH_ACR_PRFTBS ((uint32_t)0x00000020U) /*!< Prefetch Buffer Status */
  2989. /****************** Bit definition for FLASH_KEYR register ******************/
  2990. #define FLASH_KEYR_FKEYR ((uint32_t)0xFFFFFFFFU) /*!< FPEC Key */
  2991. /***************** Bit definition for FLASH_OPTKEYR register ****************/
  2992. #define FLASH_OPTKEYR_OPTKEYR ((uint32_t)0xFFFFFFFFU) /*!< Option Byte Key */
  2993. /****************** FLASH Keys **********************************************/
  2994. #define FLASH_KEY1 ((uint32_t)0x45670123U) /*!< Flash program erase key1 */
  2995. #define FLASH_KEY2 ((uint32_t)0xCDEF89ABU) /*!< Flash program erase key2: used with FLASH_PEKEY1
  2996. to unlock the write access to the FPEC. */
  2997. #define FLASH_OPTKEY1 ((uint32_t)0x45670123U) /*!< Flash option key1 */
  2998. #define FLASH_OPTKEY2 ((uint32_t)0xCDEF89ABU) /*!< Flash option key2: used with FLASH_OPTKEY1 to
  2999. unlock the write access to the option byte block */
  3000. /****************** Bit definition for FLASH_SR register *******************/
  3001. #define FLASH_SR_BSY ((uint32_t)0x00000001U) /*!< Busy */
  3002. #define FLASH_SR_PGERR ((uint32_t)0x00000004U) /*!< Programming Error */
  3003. #define FLASH_SR_WRPRTERR ((uint32_t)0x00000010U) /*!< Write Protection Error */
  3004. #define FLASH_SR_EOP ((uint32_t)0x00000020U) /*!< End of operation */
  3005. #define FLASH_SR_WRPERR FLASH_SR_WRPRTERR /*!< Legacy of Write Protection Error */
  3006. /******************* Bit definition for FLASH_CR register *******************/
  3007. #define FLASH_CR_PG ((uint32_t)0x00000001U) /*!< Programming */
  3008. #define FLASH_CR_PER ((uint32_t)0x00000002U) /*!< Page Erase */
  3009. #define FLASH_CR_MER ((uint32_t)0x00000004U) /*!< Mass Erase */
  3010. #define FLASH_CR_OPTPG ((uint32_t)0x00000010U) /*!< Option Byte Programming */
  3011. #define FLASH_CR_OPTER ((uint32_t)0x00000020U) /*!< Option Byte Erase */
  3012. #define FLASH_CR_STRT ((uint32_t)0x00000040U) /*!< Start */
  3013. #define FLASH_CR_LOCK ((uint32_t)0x00000080U) /*!< Lock */
  3014. #define FLASH_CR_OPTWRE ((uint32_t)0x00000200U) /*!< Option Bytes Write Enable */
  3015. #define FLASH_CR_ERRIE ((uint32_t)0x00000400U) /*!< Error Interrupt Enable */
  3016. #define FLASH_CR_EOPIE ((uint32_t)0x00001000U) /*!< End of operation interrupt enable */
  3017. #define FLASH_CR_OBL_LAUNCH ((uint32_t)0x00002000U) /*!< Option Bytes Loader Launch */
  3018. /******************* Bit definition for FLASH_AR register *******************/
  3019. #define FLASH_AR_FAR ((uint32_t)0xFFFFFFFFU) /*!< Flash Address */
  3020. /****************** Bit definition for FLASH_OBR register *******************/
  3021. #define FLASH_OBR_OPTERR ((uint32_t)0x00000001U) /*!< Option Byte Error */
  3022. #define FLASH_OBR_RDPRT1 ((uint32_t)0x00000002U) /*!< Read protection Level 1 */
  3023. #define FLASH_OBR_RDPRT2 ((uint32_t)0x00000004U) /*!< Read protection Level 2 */
  3024. #define FLASH_OBR_USER ((uint32_t)0x0000FF00U) /*!< User Option Bytes */
  3025. #define FLASH_OBR_IWDG_SW ((uint32_t)0x00000100U) /*!< IWDG SW */
  3026. #define FLASH_OBR_nRST_STOP ((uint32_t)0x00000200U) /*!< nRST_STOP */
  3027. #define FLASH_OBR_nRST_STDBY ((uint32_t)0x00000400U) /*!< nRST_STDBY */
  3028. #define FLASH_OBR_nBOOT0 ((uint32_t)0x00000800U) /*!< nBOOT0 */
  3029. #define FLASH_OBR_nBOOT1 ((uint32_t)0x00001000U) /*!< nBOOT1 */
  3030. #define FLASH_OBR_VDDA_MONITOR ((uint32_t)0x00002000U) /*!< VDDA power supply supervisor */
  3031. #define FLASH_OBR_RAM_PARITY_CHECK ((uint32_t)0x00004000U) /*!< RAM parity check */
  3032. #define FLASH_OBR_BOOT_SEL ((uint32_t)0x00008000U) /*!< BOOT selection */
  3033. #define FLASH_OBR_DATA0 ((uint32_t)0x00FF0000U) /*!< Data0 */
  3034. #define FLASH_OBR_DATA1 ((uint32_t)0xFF000000U) /*!< Data1 */
  3035. /* Old BOOT1 bit definition, maintained for legacy purpose */
  3036. #define FLASH_OBR_BOOT1 FLASH_OBR_nBOOT1
  3037. /* Old OBR_VDDA bit definition, maintained for legacy purpose */
  3038. #define FLASH_OBR_VDDA_ANALOG FLASH_OBR_VDDA_MONITOR
  3039. /****************** Bit definition for FLASH_WRPR register ******************/
  3040. #define FLASH_WRPR_WRP ((uint32_t)0x0000FFFFU) /*!< Write Protect */
  3041. /*----------------------------------------------------------------------------*/
  3042. /****************** Bit definition for OB_RDP register **********************/
  3043. #define OB_RDP_RDP ((uint32_t)0x000000FFU) /*!< Read protection option byte */
  3044. #define OB_RDP_nRDP ((uint32_t)0x0000FF00U) /*!< Read protection complemented option byte */
  3045. /****************** Bit definition for OB_USER register *********************/
  3046. #define OB_USER_USER ((uint32_t)0x00FF0000U) /*!< User option byte */
  3047. #define OB_USER_nUSER ((uint32_t)0xFF000000U) /*!< User complemented option byte */
  3048. /****************** Bit definition for OB_WRP0 register *********************/
  3049. #define OB_WRP0_WRP0 ((uint32_t)0x000000FFU) /*!< Flash memory write protection option bytes */
  3050. #define OB_WRP0_nWRP0 ((uint32_t)0x0000FF00U) /*!< Flash memory write protection complemented option bytes */
  3051. /****************** Bit definition for OB_WRP1 register *********************/
  3052. #define OB_WRP1_WRP1 ((uint32_t)0x00FF0000U) /*!< Flash memory write protection option bytes */
  3053. #define OB_WRP1_nWRP1 ((uint32_t)0xFF000000U) /*!< Flash memory write protection complemented option bytes */
  3054. /****************** Bit definition for OB_WRP2 register *********************/
  3055. #define OB_WRP2_WRP2 ((uint32_t)0x000000FFU) /*!< Flash memory write protection option bytes */
  3056. #define OB_WRP2_nWRP2 ((uint32_t)0x0000FF00U) /*!< Flash memory write protection complemented option bytes */
  3057. /****************** Bit definition for OB_WRP3 register *********************/
  3058. #define OB_WRP3_WRP3 ((uint32_t)0x00FF0000U) /*!< Flash memory write protection option bytes */
  3059. #define OB_WRP3_nWRP3 ((uint32_t)0xFF000000U) /*!< Flash memory write protection complemented option bytes */
  3060. /******************************************************************************/
  3061. /* */
  3062. /* General Purpose IOs (GPIO) */
  3063. /* */
  3064. /******************************************************************************/
  3065. /******************* Bit definition for GPIO_MODER register *****************/
  3066. #define GPIO_MODER_MODER0 ((uint32_t)0x00000003U)
  3067. #define GPIO_MODER_MODER0_0 ((uint32_t)0x00000001U)
  3068. #define GPIO_MODER_MODER0_1 ((uint32_t)0x00000002U)
  3069. #define GPIO_MODER_MODER1 ((uint32_t)0x0000000CU)
  3070. #define GPIO_MODER_MODER1_0 ((uint32_t)0x00000004U)
  3071. #define GPIO_MODER_MODER1_1 ((uint32_t)0x00000008U)
  3072. #define GPIO_MODER_MODER2 ((uint32_t)0x00000030U)
  3073. #define GPIO_MODER_MODER2_0 ((uint32_t)0x00000010U)
  3074. #define GPIO_MODER_MODER2_1 ((uint32_t)0x00000020U)
  3075. #define GPIO_MODER_MODER3 ((uint32_t)0x000000C0U)
  3076. #define GPIO_MODER_MODER3_0 ((uint32_t)0x00000040U)
  3077. #define GPIO_MODER_MODER3_1 ((uint32_t)0x00000080U)
  3078. #define GPIO_MODER_MODER4 ((uint32_t)0x00000300U)
  3079. #define GPIO_MODER_MODER4_0 ((uint32_t)0x00000100U)
  3080. #define GPIO_MODER_MODER4_1 ((uint32_t)0x00000200U)
  3081. #define GPIO_MODER_MODER5 ((uint32_t)0x00000C00U)
  3082. #define GPIO_MODER_MODER5_0 ((uint32_t)0x00000400U)
  3083. #define GPIO_MODER_MODER5_1 ((uint32_t)0x00000800U)
  3084. #define GPIO_MODER_MODER6 ((uint32_t)0x00003000U)
  3085. #define GPIO_MODER_MODER6_0 ((uint32_t)0x00001000U)
  3086. #define GPIO_MODER_MODER6_1 ((uint32_t)0x00002000U)
  3087. #define GPIO_MODER_MODER7 ((uint32_t)0x0000C000U)
  3088. #define GPIO_MODER_MODER7_0 ((uint32_t)0x00004000U)
  3089. #define GPIO_MODER_MODER7_1 ((uint32_t)0x00008000U)
  3090. #define GPIO_MODER_MODER8 ((uint32_t)0x00030000U)
  3091. #define GPIO_MODER_MODER8_0 ((uint32_t)0x00010000U)
  3092. #define GPIO_MODER_MODER8_1 ((uint32_t)0x00020000U)
  3093. #define GPIO_MODER_MODER9 ((uint32_t)0x000C0000U)
  3094. #define GPIO_MODER_MODER9_0 ((uint32_t)0x00040000U)
  3095. #define GPIO_MODER_MODER9_1 ((uint32_t)0x00080000U)
  3096. #define GPIO_MODER_MODER10 ((uint32_t)0x00300000U)
  3097. #define GPIO_MODER_MODER10_0 ((uint32_t)0x00100000U)
  3098. #define GPIO_MODER_MODER10_1 ((uint32_t)0x00200000U)
  3099. #define GPIO_MODER_MODER11 ((uint32_t)0x00C00000U)
  3100. #define GPIO_MODER_MODER11_0 ((uint32_t)0x00400000U)
  3101. #define GPIO_MODER_MODER11_1 ((uint32_t)0x00800000U)
  3102. #define GPIO_MODER_MODER12 ((uint32_t)0x03000000U)
  3103. #define GPIO_MODER_MODER12_0 ((uint32_t)0x01000000U)
  3104. #define GPIO_MODER_MODER12_1 ((uint32_t)0x02000000U)
  3105. #define GPIO_MODER_MODER13 ((uint32_t)0x0C000000U)
  3106. #define GPIO_MODER_MODER13_0 ((uint32_t)0x04000000U)
  3107. #define GPIO_MODER_MODER13_1 ((uint32_t)0x08000000U)
  3108. #define GPIO_MODER_MODER14 ((uint32_t)0x30000000U)
  3109. #define GPIO_MODER_MODER14_0 ((uint32_t)0x10000000U)
  3110. #define GPIO_MODER_MODER14_1 ((uint32_t)0x20000000U)
  3111. #define GPIO_MODER_MODER15 ((uint32_t)0xC0000000U)
  3112. #define GPIO_MODER_MODER15_0 ((uint32_t)0x40000000U)
  3113. #define GPIO_MODER_MODER15_1 ((uint32_t)0x80000000U)
  3114. /****************** Bit definition for GPIO_OTYPER register *****************/
  3115. #define GPIO_OTYPER_OT_0 ((uint32_t)0x00000001U)
  3116. #define GPIO_OTYPER_OT_1 ((uint32_t)0x00000002U)
  3117. #define GPIO_OTYPER_OT_2 ((uint32_t)0x00000004U)
  3118. #define GPIO_OTYPER_OT_3 ((uint32_t)0x00000008U)
  3119. #define GPIO_OTYPER_OT_4 ((uint32_t)0x00000010U)
  3120. #define GPIO_OTYPER_OT_5 ((uint32_t)0x00000020U)
  3121. #define GPIO_OTYPER_OT_6 ((uint32_t)0x00000040U)
  3122. #define GPIO_OTYPER_OT_7 ((uint32_t)0x00000080U)
  3123. #define GPIO_OTYPER_OT_8 ((uint32_t)0x00000100U)
  3124. #define GPIO_OTYPER_OT_9 ((uint32_t)0x00000200U)
  3125. #define GPIO_OTYPER_OT_10 ((uint32_t)0x00000400U)
  3126. #define GPIO_OTYPER_OT_11 ((uint32_t)0x00000800U)
  3127. #define GPIO_OTYPER_OT_12 ((uint32_t)0x00001000U)
  3128. #define GPIO_OTYPER_OT_13 ((uint32_t)0x00002000U)
  3129. #define GPIO_OTYPER_OT_14 ((uint32_t)0x00004000U)
  3130. #define GPIO_OTYPER_OT_15 ((uint32_t)0x00008000U)
  3131. /**************** Bit definition for GPIO_OSPEEDR register ******************/
  3132. #define GPIO_OSPEEDR_OSPEEDR0 ((uint32_t)0x00000003U)
  3133. #define GPIO_OSPEEDR_OSPEEDR0_0 ((uint32_t)0x00000001U)
  3134. #define GPIO_OSPEEDR_OSPEEDR0_1 ((uint32_t)0x00000002U)
  3135. #define GPIO_OSPEEDR_OSPEEDR1 ((uint32_t)0x0000000CU)
  3136. #define GPIO_OSPEEDR_OSPEEDR1_0 ((uint32_t)0x00000004U)
  3137. #define GPIO_OSPEEDR_OSPEEDR1_1 ((uint32_t)0x00000008U)
  3138. #define GPIO_OSPEEDR_OSPEEDR2 ((uint32_t)0x00000030U)
  3139. #define GPIO_OSPEEDR_OSPEEDR2_0 ((uint32_t)0x00000010U)
  3140. #define GPIO_OSPEEDR_OSPEEDR2_1 ((uint32_t)0x00000020U)
  3141. #define GPIO_OSPEEDR_OSPEEDR3 ((uint32_t)0x000000C0U)
  3142. #define GPIO_OSPEEDR_OSPEEDR3_0 ((uint32_t)0x00000040U)
  3143. #define GPIO_OSPEEDR_OSPEEDR3_1 ((uint32_t)0x00000080U)
  3144. #define GPIO_OSPEEDR_OSPEEDR4 ((uint32_t)0x00000300U)
  3145. #define GPIO_OSPEEDR_OSPEEDR4_0 ((uint32_t)0x00000100U)
  3146. #define GPIO_OSPEEDR_OSPEEDR4_1 ((uint32_t)0x00000200U)
  3147. #define GPIO_OSPEEDR_OSPEEDR5 ((uint32_t)0x00000C00U)
  3148. #define GPIO_OSPEEDR_OSPEEDR5_0 ((uint32_t)0x00000400U)
  3149. #define GPIO_OSPEEDR_OSPEEDR5_1 ((uint32_t)0x00000800U)
  3150. #define GPIO_OSPEEDR_OSPEEDR6 ((uint32_t)0x00003000U)
  3151. #define GPIO_OSPEEDR_OSPEEDR6_0 ((uint32_t)0x00001000U)
  3152. #define GPIO_OSPEEDR_OSPEEDR6_1 ((uint32_t)0x00002000U)
  3153. #define GPIO_OSPEEDR_OSPEEDR7 ((uint32_t)0x0000C000U)
  3154. #define GPIO_OSPEEDR_OSPEEDR7_0 ((uint32_t)0x00004000U)
  3155. #define GPIO_OSPEEDR_OSPEEDR7_1 ((uint32_t)0x00008000U)
  3156. #define GPIO_OSPEEDR_OSPEEDR8 ((uint32_t)0x00030000U)
  3157. #define GPIO_OSPEEDR_OSPEEDR8_0 ((uint32_t)0x00010000U)
  3158. #define GPIO_OSPEEDR_OSPEEDR8_1 ((uint32_t)0x00020000U)
  3159. #define GPIO_OSPEEDR_OSPEEDR9 ((uint32_t)0x000C0000U)
  3160. #define GPIO_OSPEEDR_OSPEEDR9_0 ((uint32_t)0x00040000U)
  3161. #define GPIO_OSPEEDR_OSPEEDR9_1 ((uint32_t)0x00080000U)
  3162. #define GPIO_OSPEEDR_OSPEEDR10 ((uint32_t)0x00300000U)
  3163. #define GPIO_OSPEEDR_OSPEEDR10_0 ((uint32_t)0x00100000U)
  3164. #define GPIO_OSPEEDR_OSPEEDR10_1 ((uint32_t)0x00200000U)
  3165. #define GPIO_OSPEEDR_OSPEEDR11 ((uint32_t)0x00C00000U)
  3166. #define GPIO_OSPEEDR_OSPEEDR11_0 ((uint32_t)0x00400000U)
  3167. #define GPIO_OSPEEDR_OSPEEDR11_1 ((uint32_t)0x00800000U)
  3168. #define GPIO_OSPEEDR_OSPEEDR12 ((uint32_t)0x03000000U)
  3169. #define GPIO_OSPEEDR_OSPEEDR12_0 ((uint32_t)0x01000000U)
  3170. #define GPIO_OSPEEDR_OSPEEDR12_1 ((uint32_t)0x02000000U)
  3171. #define GPIO_OSPEEDR_OSPEEDR13 ((uint32_t)0x0C000000U)
  3172. #define GPIO_OSPEEDR_OSPEEDR13_0 ((uint32_t)0x04000000U)
  3173. #define GPIO_OSPEEDR_OSPEEDR13_1 ((uint32_t)0x08000000U)
  3174. #define GPIO_OSPEEDR_OSPEEDR14 ((uint32_t)0x30000000U)
  3175. #define GPIO_OSPEEDR_OSPEEDR14_0 ((uint32_t)0x10000000U)
  3176. #define GPIO_OSPEEDR_OSPEEDR14_1 ((uint32_t)0x20000000U)
  3177. #define GPIO_OSPEEDR_OSPEEDR15 ((uint32_t)0xC0000000U)
  3178. #define GPIO_OSPEEDR_OSPEEDR15_0 ((uint32_t)0x40000000U)
  3179. #define GPIO_OSPEEDR_OSPEEDR15_1 ((uint32_t)0x80000000U)
  3180. /* Old Bit definition for GPIO_OSPEEDR register maintained for legacy purpose */
  3181. #define GPIO_OSPEEDER_OSPEEDR0 GPIO_OSPEEDR_OSPEEDR0
  3182. #define GPIO_OSPEEDER_OSPEEDR0_0 GPIO_OSPEEDR_OSPEEDR0_0
  3183. #define GPIO_OSPEEDER_OSPEEDR0_1 GPIO_OSPEEDR_OSPEEDR0_1
  3184. #define GPIO_OSPEEDER_OSPEEDR1 GPIO_OSPEEDR_OSPEEDR1
  3185. #define GPIO_OSPEEDER_OSPEEDR1_0 GPIO_OSPEEDR_OSPEEDR1_0
  3186. #define GPIO_OSPEEDER_OSPEEDR1_1 GPIO_OSPEEDR_OSPEEDR1_1
  3187. #define GPIO_OSPEEDER_OSPEEDR2 GPIO_OSPEEDR_OSPEEDR2
  3188. #define GPIO_OSPEEDER_OSPEEDR2_0 GPIO_OSPEEDR_OSPEEDR2_0
  3189. #define GPIO_OSPEEDER_OSPEEDR2_1 GPIO_OSPEEDR_OSPEEDR2_1
  3190. #define GPIO_OSPEEDER_OSPEEDR3 GPIO_OSPEEDR_OSPEEDR3
  3191. #define GPIO_OSPEEDER_OSPEEDR3_0 GPIO_OSPEEDR_OSPEEDR3_0
  3192. #define GPIO_OSPEEDER_OSPEEDR3_1 GPIO_OSPEEDR_OSPEEDR3_1
  3193. #define GPIO_OSPEEDER_OSPEEDR4 GPIO_OSPEEDR_OSPEEDR4
  3194. #define GPIO_OSPEEDER_OSPEEDR4_0 GPIO_OSPEEDR_OSPEEDR4_0
  3195. #define GPIO_OSPEEDER_OSPEEDR4_1 GPIO_OSPEEDR_OSPEEDR4_1
  3196. #define GPIO_OSPEEDER_OSPEEDR5 GPIO_OSPEEDR_OSPEEDR5
  3197. #define GPIO_OSPEEDER_OSPEEDR5_0 GPIO_OSPEEDR_OSPEEDR5_0
  3198. #define GPIO_OSPEEDER_OSPEEDR5_1 GPIO_OSPEEDR_OSPEEDR5_1
  3199. #define GPIO_OSPEEDER_OSPEEDR6 GPIO_OSPEEDR_OSPEEDR6
  3200. #define GPIO_OSPEEDER_OSPEEDR6_0 GPIO_OSPEEDR_OSPEEDR6_0
  3201. #define GPIO_OSPEEDER_OSPEEDR6_1 GPIO_OSPEEDR_OSPEEDR6_1
  3202. #define GPIO_OSPEEDER_OSPEEDR7 GPIO_OSPEEDR_OSPEEDR7
  3203. #define GPIO_OSPEEDER_OSPEEDR7_0 GPIO_OSPEEDR_OSPEEDR7_0
  3204. #define GPIO_OSPEEDER_OSPEEDR7_1 GPIO_OSPEEDR_OSPEEDR7_1
  3205. #define GPIO_OSPEEDER_OSPEEDR8 GPIO_OSPEEDR_OSPEEDR8
  3206. #define GPIO_OSPEEDER_OSPEEDR8_0 GPIO_OSPEEDR_OSPEEDR8_0
  3207. #define GPIO_OSPEEDER_OSPEEDR8_1 GPIO_OSPEEDR_OSPEEDR8_1
  3208. #define GPIO_OSPEEDER_OSPEEDR9 GPIO_OSPEEDR_OSPEEDR9
  3209. #define GPIO_OSPEEDER_OSPEEDR9_0 GPIO_OSPEEDR_OSPEEDR9_0
  3210. #define GPIO_OSPEEDER_OSPEEDR9_1 GPIO_OSPEEDR_OSPEEDR9_1
  3211. #define GPIO_OSPEEDER_OSPEEDR10 GPIO_OSPEEDR_OSPEEDR10
  3212. #define GPIO_OSPEEDER_OSPEEDR10_0 GPIO_OSPEEDR_OSPEEDR10_0
  3213. #define GPIO_OSPEEDER_OSPEEDR10_1 GPIO_OSPEEDR_OSPEEDR10_1
  3214. #define GPIO_OSPEEDER_OSPEEDR11 GPIO_OSPEEDR_OSPEEDR11
  3215. #define GPIO_OSPEEDER_OSPEEDR11_0 GPIO_OSPEEDR_OSPEEDR11_0
  3216. #define GPIO_OSPEEDER_OSPEEDR11_1 GPIO_OSPEEDR_OSPEEDR11_1
  3217. #define GPIO_OSPEEDER_OSPEEDR12 GPIO_OSPEEDR_OSPEEDR12
  3218. #define GPIO_OSPEEDER_OSPEEDR12_0 GPIO_OSPEEDR_OSPEEDR12_0
  3219. #define GPIO_OSPEEDER_OSPEEDR12_1 GPIO_OSPEEDR_OSPEEDR12_1
  3220. #define GPIO_OSPEEDER_OSPEEDR13 GPIO_OSPEEDR_OSPEEDR13
  3221. #define GPIO_OSPEEDER_OSPEEDR13_0 GPIO_OSPEEDR_OSPEEDR13_0
  3222. #define GPIO_OSPEEDER_OSPEEDR13_1 GPIO_OSPEEDR_OSPEEDR13_1
  3223. #define GPIO_OSPEEDER_OSPEEDR14 GPIO_OSPEEDR_OSPEEDR14
  3224. #define GPIO_OSPEEDER_OSPEEDR14_0 GPIO_OSPEEDR_OSPEEDR14_0
  3225. #define GPIO_OSPEEDER_OSPEEDR14_1 GPIO_OSPEEDR_OSPEEDR14_1
  3226. #define GPIO_OSPEEDER_OSPEEDR15 GPIO_OSPEEDR_OSPEEDR15
  3227. #define GPIO_OSPEEDER_OSPEEDR15_0 GPIO_OSPEEDR_OSPEEDR15_0
  3228. #define GPIO_OSPEEDER_OSPEEDR15_1 GPIO_OSPEEDR_OSPEEDR15_1
  3229. /******************* Bit definition for GPIO_PUPDR register ******************/
  3230. #define GPIO_PUPDR_PUPDR0 ((uint32_t)0x00000003U)
  3231. #define GPIO_PUPDR_PUPDR0_0 ((uint32_t)0x00000001U)
  3232. #define GPIO_PUPDR_PUPDR0_1 ((uint32_t)0x00000002U)
  3233. #define GPIO_PUPDR_PUPDR1 ((uint32_t)0x0000000CU)
  3234. #define GPIO_PUPDR_PUPDR1_0 ((uint32_t)0x00000004U)
  3235. #define GPIO_PUPDR_PUPDR1_1 ((uint32_t)0x00000008U)
  3236. #define GPIO_PUPDR_PUPDR2 ((uint32_t)0x00000030U)
  3237. #define GPIO_PUPDR_PUPDR2_0 ((uint32_t)0x00000010U)
  3238. #define GPIO_PUPDR_PUPDR2_1 ((uint32_t)0x00000020U)
  3239. #define GPIO_PUPDR_PUPDR3 ((uint32_t)0x000000C0U)
  3240. #define GPIO_PUPDR_PUPDR3_0 ((uint32_t)0x00000040U)
  3241. #define GPIO_PUPDR_PUPDR3_1 ((uint32_t)0x00000080U)
  3242. #define GPIO_PUPDR_PUPDR4 ((uint32_t)0x00000300U)
  3243. #define GPIO_PUPDR_PUPDR4_0 ((uint32_t)0x00000100U)
  3244. #define GPIO_PUPDR_PUPDR4_1 ((uint32_t)0x00000200U)
  3245. #define GPIO_PUPDR_PUPDR5 ((uint32_t)0x00000C00U)
  3246. #define GPIO_PUPDR_PUPDR5_0 ((uint32_t)0x00000400U)
  3247. #define GPIO_PUPDR_PUPDR5_1 ((uint32_t)0x00000800U)
  3248. #define GPIO_PUPDR_PUPDR6 ((uint32_t)0x00003000U)
  3249. #define GPIO_PUPDR_PUPDR6_0 ((uint32_t)0x00001000U)
  3250. #define GPIO_PUPDR_PUPDR6_1 ((uint32_t)0x00002000U)
  3251. #define GPIO_PUPDR_PUPDR7 ((uint32_t)0x0000C000U)
  3252. #define GPIO_PUPDR_PUPDR7_0 ((uint32_t)0x00004000U)
  3253. #define GPIO_PUPDR_PUPDR7_1 ((uint32_t)0x00008000U)
  3254. #define GPIO_PUPDR_PUPDR8 ((uint32_t)0x00030000U)
  3255. #define GPIO_PUPDR_PUPDR8_0 ((uint32_t)0x00010000U)
  3256. #define GPIO_PUPDR_PUPDR8_1 ((uint32_t)0x00020000U)
  3257. #define GPIO_PUPDR_PUPDR9 ((uint32_t)0x000C0000U)
  3258. #define GPIO_PUPDR_PUPDR9_0 ((uint32_t)0x00040000U)
  3259. #define GPIO_PUPDR_PUPDR9_1 ((uint32_t)0x00080000U)
  3260. #define GPIO_PUPDR_PUPDR10 ((uint32_t)0x00300000U)
  3261. #define GPIO_PUPDR_PUPDR10_0 ((uint32_t)0x00100000U)
  3262. #define GPIO_PUPDR_PUPDR10_1 ((uint32_t)0x00200000U)
  3263. #define GPIO_PUPDR_PUPDR11 ((uint32_t)0x00C00000U)
  3264. #define GPIO_PUPDR_PUPDR11_0 ((uint32_t)0x00400000U)
  3265. #define GPIO_PUPDR_PUPDR11_1 ((uint32_t)0x00800000U)
  3266. #define GPIO_PUPDR_PUPDR12 ((uint32_t)0x03000000U)
  3267. #define GPIO_PUPDR_PUPDR12_0 ((uint32_t)0x01000000U)
  3268. #define GPIO_PUPDR_PUPDR12_1 ((uint32_t)0x02000000U)
  3269. #define GPIO_PUPDR_PUPDR13 ((uint32_t)0x0C000000U)
  3270. #define GPIO_PUPDR_PUPDR13_0 ((uint32_t)0x04000000U)
  3271. #define GPIO_PUPDR_PUPDR13_1 ((uint32_t)0x08000000U)
  3272. #define GPIO_PUPDR_PUPDR14 ((uint32_t)0x30000000U)
  3273. #define GPIO_PUPDR_PUPDR14_0 ((uint32_t)0x10000000U)
  3274. #define GPIO_PUPDR_PUPDR14_1 ((uint32_t)0x20000000U)
  3275. #define GPIO_PUPDR_PUPDR15 ((uint32_t)0xC0000000U)
  3276. #define GPIO_PUPDR_PUPDR15_0 ((uint32_t)0x40000000U)
  3277. #define GPIO_PUPDR_PUPDR15_1 ((uint32_t)0x80000000U)
  3278. /******************* Bit definition for GPIO_IDR register *******************/
  3279. #define GPIO_IDR_0 ((uint32_t)0x00000001U)
  3280. #define GPIO_IDR_1 ((uint32_t)0x00000002U)
  3281. #define GPIO_IDR_2 ((uint32_t)0x00000004U)
  3282. #define GPIO_IDR_3 ((uint32_t)0x00000008U)
  3283. #define GPIO_IDR_4 ((uint32_t)0x00000010U)
  3284. #define GPIO_IDR_5 ((uint32_t)0x00000020U)
  3285. #define GPIO_IDR_6 ((uint32_t)0x00000040U)
  3286. #define GPIO_IDR_7 ((uint32_t)0x00000080U)
  3287. #define GPIO_IDR_8 ((uint32_t)0x00000100U)
  3288. #define GPIO_IDR_9 ((uint32_t)0x00000200U)
  3289. #define GPIO_IDR_10 ((uint32_t)0x00000400U)
  3290. #define GPIO_IDR_11 ((uint32_t)0x00000800U)
  3291. #define GPIO_IDR_12 ((uint32_t)0x00001000U)
  3292. #define GPIO_IDR_13 ((uint32_t)0x00002000U)
  3293. #define GPIO_IDR_14 ((uint32_t)0x00004000U)
  3294. #define GPIO_IDR_15 ((uint32_t)0x00008000U)
  3295. /****************** Bit definition for GPIO_ODR register ********************/
  3296. #define GPIO_ODR_0 ((uint32_t)0x00000001U)
  3297. #define GPIO_ODR_1 ((uint32_t)0x00000002U)
  3298. #define GPIO_ODR_2 ((uint32_t)0x00000004U)
  3299. #define GPIO_ODR_3 ((uint32_t)0x00000008U)
  3300. #define GPIO_ODR_4 ((uint32_t)0x00000010U)
  3301. #define GPIO_ODR_5 ((uint32_t)0x00000020U)
  3302. #define GPIO_ODR_6 ((uint32_t)0x00000040U)
  3303. #define GPIO_ODR_7 ((uint32_t)0x00000080U)
  3304. #define GPIO_ODR_8 ((uint32_t)0x00000100U)
  3305. #define GPIO_ODR_9 ((uint32_t)0x00000200U)
  3306. #define GPIO_ODR_10 ((uint32_t)0x00000400U)
  3307. #define GPIO_ODR_11 ((uint32_t)0x00000800U)
  3308. #define GPIO_ODR_12 ((uint32_t)0x00001000U)
  3309. #define GPIO_ODR_13 ((uint32_t)0x00002000U)
  3310. #define GPIO_ODR_14 ((uint32_t)0x00004000U)
  3311. #define GPIO_ODR_15 ((uint32_t)0x00008000U)
  3312. /****************** Bit definition for GPIO_BSRR register ********************/
  3313. #define GPIO_BSRR_BS_0 ((uint32_t)0x00000001U)
  3314. #define GPIO_BSRR_BS_1 ((uint32_t)0x00000002U)
  3315. #define GPIO_BSRR_BS_2 ((uint32_t)0x00000004U)
  3316. #define GPIO_BSRR_BS_3 ((uint32_t)0x00000008U)
  3317. #define GPIO_BSRR_BS_4 ((uint32_t)0x00000010U)
  3318. #define GPIO_BSRR_BS_5 ((uint32_t)0x00000020U)
  3319. #define GPIO_BSRR_BS_6 ((uint32_t)0x00000040U)
  3320. #define GPIO_BSRR_BS_7 ((uint32_t)0x00000080U)
  3321. #define GPIO_BSRR_BS_8 ((uint32_t)0x00000100U)
  3322. #define GPIO_BSRR_BS_9 ((uint32_t)0x00000200U)
  3323. #define GPIO_BSRR_BS_10 ((uint32_t)0x00000400U)
  3324. #define GPIO_BSRR_BS_11 ((uint32_t)0x00000800U)
  3325. #define GPIO_BSRR_BS_12 ((uint32_t)0x00001000U)
  3326. #define GPIO_BSRR_BS_13 ((uint32_t)0x00002000U)
  3327. #define GPIO_BSRR_BS_14 ((uint32_t)0x00004000U)
  3328. #define GPIO_BSRR_BS_15 ((uint32_t)0x00008000U)
  3329. #define GPIO_BSRR_BR_0 ((uint32_t)0x00010000U)
  3330. #define GPIO_BSRR_BR_1 ((uint32_t)0x00020000U)
  3331. #define GPIO_BSRR_BR_2 ((uint32_t)0x00040000U)
  3332. #define GPIO_BSRR_BR_3 ((uint32_t)0x00080000U)
  3333. #define GPIO_BSRR_BR_4 ((uint32_t)0x00100000U)
  3334. #define GPIO_BSRR_BR_5 ((uint32_t)0x00200000U)
  3335. #define GPIO_BSRR_BR_6 ((uint32_t)0x00400000U)
  3336. #define GPIO_BSRR_BR_7 ((uint32_t)0x00800000U)
  3337. #define GPIO_BSRR_BR_8 ((uint32_t)0x01000000U)
  3338. #define GPIO_BSRR_BR_9 ((uint32_t)0x02000000U)
  3339. #define GPIO_BSRR_BR_10 ((uint32_t)0x04000000U)
  3340. #define GPIO_BSRR_BR_11 ((uint32_t)0x08000000U)
  3341. #define GPIO_BSRR_BR_12 ((uint32_t)0x10000000U)
  3342. #define GPIO_BSRR_BR_13 ((uint32_t)0x20000000U)
  3343. #define GPIO_BSRR_BR_14 ((uint32_t)0x40000000U)
  3344. #define GPIO_BSRR_BR_15 ((uint32_t)0x80000000U)
  3345. /****************** Bit definition for GPIO_LCKR register ********************/
  3346. #define GPIO_LCKR_LCK0 ((uint32_t)0x00000001U)
  3347. #define GPIO_LCKR_LCK1 ((uint32_t)0x00000002U)
  3348. #define GPIO_LCKR_LCK2 ((uint32_t)0x00000004U)
  3349. #define GPIO_LCKR_LCK3 ((uint32_t)0x00000008U)
  3350. #define GPIO_LCKR_LCK4 ((uint32_t)0x00000010U)
  3351. #define GPIO_LCKR_LCK5 ((uint32_t)0x00000020U)
  3352. #define GPIO_LCKR_LCK6 ((uint32_t)0x00000040U)
  3353. #define GPIO_LCKR_LCK7 ((uint32_t)0x00000080U)
  3354. #define GPIO_LCKR_LCK8 ((uint32_t)0x00000100U)
  3355. #define GPIO_LCKR_LCK9 ((uint32_t)0x00000200U)
  3356. #define GPIO_LCKR_LCK10 ((uint32_t)0x00000400U)
  3357. #define GPIO_LCKR_LCK11 ((uint32_t)0x00000800U)
  3358. #define GPIO_LCKR_LCK12 ((uint32_t)0x00001000U)
  3359. #define GPIO_LCKR_LCK13 ((uint32_t)0x00002000U)
  3360. #define GPIO_LCKR_LCK14 ((uint32_t)0x00004000U)
  3361. #define GPIO_LCKR_LCK15 ((uint32_t)0x00008000U)
  3362. #define GPIO_LCKR_LCKK ((uint32_t)0x00010000U)
  3363. /****************** Bit definition for GPIO_AFRL register ********************/
  3364. #define GPIO_AFRL_AFRL0 ((uint32_t)0x0000000FU)
  3365. #define GPIO_AFRL_AFRL1 ((uint32_t)0x000000F0U)
  3366. #define GPIO_AFRL_AFRL2 ((uint32_t)0x00000F00U)
  3367. #define GPIO_AFRL_AFRL3 ((uint32_t)0x0000F000U)
  3368. #define GPIO_AFRL_AFRL4 ((uint32_t)0x000F0000U)
  3369. #define GPIO_AFRL_AFRL5 ((uint32_t)0x00F00000U)
  3370. #define GPIO_AFRL_AFRL6 ((uint32_t)0x0F000000U)
  3371. #define GPIO_AFRL_AFRL7 ((uint32_t)0xF0000000U)
  3372. /****************** Bit definition for GPIO_AFRH register ********************/
  3373. #define GPIO_AFRH_AFRH0 ((uint32_t)0x0000000FU)
  3374. #define GPIO_AFRH_AFRH1 ((uint32_t)0x000000F0U)
  3375. #define GPIO_AFRH_AFRH2 ((uint32_t)0x00000F00U)
  3376. #define GPIO_AFRH_AFRH3 ((uint32_t)0x0000F000U)
  3377. #define GPIO_AFRH_AFRH4 ((uint32_t)0x000F0000U)
  3378. #define GPIO_AFRH_AFRH5 ((uint32_t)0x00F00000U)
  3379. #define GPIO_AFRH_AFRH6 ((uint32_t)0x0F000000U)
  3380. #define GPIO_AFRH_AFRH7 ((uint32_t)0xF0000000U)
  3381. /****************** Bit definition for GPIO_BRR register *********************/
  3382. #define GPIO_BRR_BR_0 ((uint32_t)0x00000001U)
  3383. #define GPIO_BRR_BR_1 ((uint32_t)0x00000002U)
  3384. #define GPIO_BRR_BR_2 ((uint32_t)0x00000004U)
  3385. #define GPIO_BRR_BR_3 ((uint32_t)0x00000008U)
  3386. #define GPIO_BRR_BR_4 ((uint32_t)0x00000010U)
  3387. #define GPIO_BRR_BR_5 ((uint32_t)0x00000020U)
  3388. #define GPIO_BRR_BR_6 ((uint32_t)0x00000040U)
  3389. #define GPIO_BRR_BR_7 ((uint32_t)0x00000080U)
  3390. #define GPIO_BRR_BR_8 ((uint32_t)0x00000100U)
  3391. #define GPIO_BRR_BR_9 ((uint32_t)0x00000200U)
  3392. #define GPIO_BRR_BR_10 ((uint32_t)0x00000400U)
  3393. #define GPIO_BRR_BR_11 ((uint32_t)0x00000800U)
  3394. #define GPIO_BRR_BR_12 ((uint32_t)0x00001000U)
  3395. #define GPIO_BRR_BR_13 ((uint32_t)0x00002000U)
  3396. #define GPIO_BRR_BR_14 ((uint32_t)0x00004000U)
  3397. #define GPIO_BRR_BR_15 ((uint32_t)0x00008000U)
  3398. /******************************************************************************/
  3399. /* */
  3400. /* Inter-integrated Circuit Interface (I2C) */
  3401. /* */
  3402. /******************************************************************************/
  3403. /******************* Bit definition for I2C_CR1 register *******************/
  3404. #define I2C_CR1_PE ((uint32_t)0x00000001U) /*!< Peripheral enable */
  3405. #define I2C_CR1_TXIE ((uint32_t)0x00000002U) /*!< TX interrupt enable */
  3406. #define I2C_CR1_RXIE ((uint32_t)0x00000004U) /*!< RX interrupt enable */
  3407. #define I2C_CR1_ADDRIE ((uint32_t)0x00000008U) /*!< Address match interrupt enable */
  3408. #define I2C_CR1_NACKIE ((uint32_t)0x00000010U) /*!< NACK received interrupt enable */
  3409. #define I2C_CR1_STOPIE ((uint32_t)0x00000020U) /*!< STOP detection interrupt enable */
  3410. #define I2C_CR1_TCIE ((uint32_t)0x00000040U) /*!< Transfer complete interrupt enable */
  3411. #define I2C_CR1_ERRIE ((uint32_t)0x00000080U) /*!< Errors interrupt enable */
  3412. #define I2C_CR1_DNF ((uint32_t)0x00000F00U) /*!< Digital noise filter */
  3413. #define I2C_CR1_ANFOFF ((uint32_t)0x00001000U) /*!< Analog noise filter OFF */
  3414. #define I2C_CR1_SWRST ((uint32_t)0x00002000U) /*!< Software reset */
  3415. #define I2C_CR1_TXDMAEN ((uint32_t)0x00004000U) /*!< DMA transmission requests enable */
  3416. #define I2C_CR1_RXDMAEN ((uint32_t)0x00008000U) /*!< DMA reception requests enable */
  3417. #define I2C_CR1_SBC ((uint32_t)0x00010000U) /*!< Slave byte control */
  3418. #define I2C_CR1_NOSTRETCH ((uint32_t)0x00020000U) /*!< Clock stretching disable */
  3419. #define I2C_CR1_WUPEN ((uint32_t)0x00040000U) /*!< Wakeup from STOP enable */
  3420. #define I2C_CR1_GCEN ((uint32_t)0x00080000U) /*!< General call enable */
  3421. #define I2C_CR1_SMBHEN ((uint32_t)0x00100000U) /*!< SMBus host address enable */
  3422. #define I2C_CR1_SMBDEN ((uint32_t)0x00200000U) /*!< SMBus device default address enable */
  3423. #define I2C_CR1_ALERTEN ((uint32_t)0x00400000U) /*!< SMBus alert enable */
  3424. #define I2C_CR1_PECEN ((uint32_t)0x00800000U) /*!< PEC enable */
  3425. /****************** Bit definition for I2C_CR2 register ********************/
  3426. #define I2C_CR2_SADD ((uint32_t)0x000003FFU) /*!< Slave address (master mode) */
  3427. #define I2C_CR2_RD_WRN ((uint32_t)0x00000400U) /*!< Transfer direction (master mode) */
  3428. #define I2C_CR2_ADD10 ((uint32_t)0x00000800U) /*!< 10-bit addressing mode (master mode) */
  3429. #define I2C_CR2_HEAD10R ((uint32_t)0x00001000U) /*!< 10-bit address header only read direction (master mode) */
  3430. #define I2C_CR2_START ((uint32_t)0x00002000U) /*!< START generation */
  3431. #define I2C_CR2_STOP ((uint32_t)0x00004000U) /*!< STOP generation (master mode) */
  3432. #define I2C_CR2_NACK ((uint32_t)0x00008000U) /*!< NACK generation (slave mode) */
  3433. #define I2C_CR2_NBYTES ((uint32_t)0x00FF0000U) /*!< Number of bytes */
  3434. #define I2C_CR2_RELOAD ((uint32_t)0x01000000U) /*!< NBYTES reload mode */
  3435. #define I2C_CR2_AUTOEND ((uint32_t)0x02000000U) /*!< Automatic end mode (master mode) */
  3436. #define I2C_CR2_PECBYTE ((uint32_t)0x04000000U) /*!< Packet error checking byte */
  3437. /******************* Bit definition for I2C_OAR1 register ******************/
  3438. #define I2C_OAR1_OA1 ((uint32_t)0x000003FFU) /*!< Interface own address 1 */
  3439. #define I2C_OAR1_OA1MODE ((uint32_t)0x00000400U) /*!< Own address 1 10-bit mode */
  3440. #define I2C_OAR1_OA1EN ((uint32_t)0x00008000U) /*!< Own address 1 enable */
  3441. /******************* Bit definition for I2C_OAR2 register ******************/
  3442. #define I2C_OAR2_OA2 ((uint32_t)0x000000FEU) /*!< Interface own address 2 */
  3443. #define I2C_OAR2_OA2MSK ((uint32_t)0x00000700U) /*!< Own address 2 masks */
  3444. #define I2C_OAR2_OA2NOMASK ((uint32_t)0x00000000U) /*!< No mask */
  3445. #define I2C_OAR2_OA2MASK01 ((uint32_t)0x00000100U) /*!< OA2[1] is masked, Only OA2[7:2] are compared */
  3446. #define I2C_OAR2_OA2MASK02 ((uint32_t)0x00000200U) /*!< OA2[2:1] is masked, Only OA2[7:3] are compared */
  3447. #define I2C_OAR2_OA2MASK03 ((uint32_t)0x00000300U) /*!< OA2[3:1] is masked, Only OA2[7:4] are compared */
  3448. #define I2C_OAR2_OA2MASK04 ((uint32_t)0x00000400U) /*!< OA2[4:1] is masked, Only OA2[7:5] are compared */
  3449. #define I2C_OAR2_OA2MASK05 ((uint32_t)0x00000500U) /*!< OA2[5:1] is masked, Only OA2[7:6] are compared */
  3450. #define I2C_OAR2_OA2MASK06 ((uint32_t)0x00000600U) /*!< OA2[6:1] is masked, Only OA2[7] are compared */
  3451. #define I2C_OAR2_OA2MASK07 ((uint32_t)0x00000700U) /*!< OA2[7:1] is masked, No comparison is done */
  3452. #define I2C_OAR2_OA2EN ((uint32_t)0x00008000U) /*!< Own address 2 enable */
  3453. /******************* Bit definition for I2C_TIMINGR register ****************/
  3454. #define I2C_TIMINGR_SCLL ((uint32_t)0x000000FFU) /*!< SCL low period (master mode) */
  3455. #define I2C_TIMINGR_SCLH ((uint32_t)0x0000FF00U) /*!< SCL high period (master mode) */
  3456. #define I2C_TIMINGR_SDADEL ((uint32_t)0x000F0000U) /*!< Data hold time */
  3457. #define I2C_TIMINGR_SCLDEL ((uint32_t)0x00F00000U) /*!< Data setup time */
  3458. #define I2C_TIMINGR_PRESC ((uint32_t)0xF0000000U) /*!< Timings prescaler */
  3459. /******************* Bit definition for I2C_TIMEOUTR register ****************/
  3460. #define I2C_TIMEOUTR_TIMEOUTA ((uint32_t)0x00000FFFU) /*!< Bus timeout A */
  3461. #define I2C_TIMEOUTR_TIDLE ((uint32_t)0x00001000U) /*!< Idle clock timeout detection */
  3462. #define I2C_TIMEOUTR_TIMOUTEN ((uint32_t)0x00008000U) /*!< Clock timeout enable */
  3463. #define I2C_TIMEOUTR_TIMEOUTB ((uint32_t)0x0FFF0000U) /*!< Bus timeout B*/
  3464. #define I2C_TIMEOUTR_TEXTEN ((uint32_t)0x80000000U) /*!< Extended clock timeout enable */
  3465. /****************** Bit definition for I2C_ISR register ********************/
  3466. #define I2C_ISR_TXE ((uint32_t)0x00000001U) /*!< Transmit data register empty */
  3467. #define I2C_ISR_TXIS ((uint32_t)0x00000002U) /*!< Transmit interrupt status */
  3468. #define I2C_ISR_RXNE ((uint32_t)0x00000004U) /*!< Receive data register not empty */
  3469. #define I2C_ISR_ADDR ((uint32_t)0x00000008U) /*!< Address matched (slave mode)*/
  3470. #define I2C_ISR_NACKF ((uint32_t)0x00000010U) /*!< NACK received flag */
  3471. #define I2C_ISR_STOPF ((uint32_t)0x00000020U) /*!< STOP detection flag */
  3472. #define I2C_ISR_TC ((uint32_t)0x00000040U) /*!< Transfer complete (master mode) */
  3473. #define I2C_ISR_TCR ((uint32_t)0x00000080U) /*!< Transfer complete reload */
  3474. #define I2C_ISR_BERR ((uint32_t)0x00000100U) /*!< Bus error */
  3475. #define I2C_ISR_ARLO ((uint32_t)0x00000200U) /*!< Arbitration lost */
  3476. #define I2C_ISR_OVR ((uint32_t)0x00000400U) /*!< Overrun/Underrun */
  3477. #define I2C_ISR_PECERR ((uint32_t)0x00000800U) /*!< PEC error in reception */
  3478. #define I2C_ISR_TIMEOUT ((uint32_t)0x00001000U) /*!< Timeout or Tlow detection flag */
  3479. #define I2C_ISR_ALERT ((uint32_t)0x00002000U) /*!< SMBus alert */
  3480. #define I2C_ISR_BUSY ((uint32_t)0x00008000U) /*!< Bus busy */
  3481. #define I2C_ISR_DIR ((uint32_t)0x00010000U) /*!< Transfer direction (slave mode) */
  3482. #define I2C_ISR_ADDCODE ((uint32_t)0x00FE0000U) /*!< Address match code (slave mode) */
  3483. /****************** Bit definition for I2C_ICR register ********************/
  3484. #define I2C_ICR_ADDRCF ((uint32_t)0x00000008U) /*!< Address matched clear flag */
  3485. #define I2C_ICR_NACKCF ((uint32_t)0x00000010U) /*!< NACK clear flag */
  3486. #define I2C_ICR_STOPCF ((uint32_t)0x00000020U) /*!< STOP detection clear flag */
  3487. #define I2C_ICR_BERRCF ((uint32_t)0x00000100U) /*!< Bus error clear flag */
  3488. #define I2C_ICR_ARLOCF ((uint32_t)0x00000200U) /*!< Arbitration lost clear flag */
  3489. #define I2C_ICR_OVRCF ((uint32_t)0x00000400U) /*!< Overrun/Underrun clear flag */
  3490. #define I2C_ICR_PECCF ((uint32_t)0x00000800U) /*!< PAC error clear flag */
  3491. #define I2C_ICR_TIMOUTCF ((uint32_t)0x00001000U) /*!< Timeout clear flag */
  3492. #define I2C_ICR_ALERTCF ((uint32_t)0x00002000U) /*!< Alert clear flag */
  3493. /****************** Bit definition for I2C_PECR register *******************/
  3494. #define I2C_PECR_PEC ((uint32_t)0x000000FFU) /*!< PEC register */
  3495. /****************** Bit definition for I2C_RXDR register *********************/
  3496. #define I2C_RXDR_RXDATA ((uint32_t)0x000000FFU) /*!< 8-bit receive data */
  3497. /****************** Bit definition for I2C_TXDR register *******************/
  3498. #define I2C_TXDR_TXDATA ((uint32_t)0x000000FFU) /*!< 8-bit transmit data */
  3499. /*****************************************************************************/
  3500. /* */
  3501. /* Independent WATCHDOG (IWDG) */
  3502. /* */
  3503. /*****************************************************************************/
  3504. /******************* Bit definition for IWDG_KR register *******************/
  3505. #define IWDG_KR_KEY ((uint32_t)0xFFFF) /*!< Key value (write only, read 0000h) */
  3506. /******************* Bit definition for IWDG_PR register *******************/
  3507. #define IWDG_PR_PR ((uint32_t)0x07) /*!< PR[2:0] (Prescaler divider) */
  3508. #define IWDG_PR_PR_0 ((uint32_t)0x01) /*!< Bit 0 */
  3509. #define IWDG_PR_PR_1 ((uint32_t)0x02) /*!< Bit 1 */
  3510. #define IWDG_PR_PR_2 ((uint32_t)0x04) /*!< Bit 2 */
  3511. /******************* Bit definition for IWDG_RLR register ******************/
  3512. #define IWDG_RLR_RL ((uint32_t)0x0FFF) /*!< Watchdog counter reload value */
  3513. /******************* Bit definition for IWDG_SR register *******************/
  3514. #define IWDG_SR_PVU ((uint32_t)0x01) /*!< Watchdog prescaler value update */
  3515. #define IWDG_SR_RVU ((uint32_t)0x02) /*!< Watchdog counter reload value update */
  3516. #define IWDG_SR_WVU ((uint32_t)0x04) /*!< Watchdog counter window value update */
  3517. /******************* Bit definition for IWDG_KR register *******************/
  3518. #define IWDG_WINR_WIN ((uint32_t)0x0FFF) /*!< Watchdog counter window value */
  3519. /*****************************************************************************/
  3520. /* */
  3521. /* Power Control (PWR) */
  3522. /* */
  3523. /*****************************************************************************/
  3524. #define PWR_PVD_SUPPORT /*!< PWR feature available only on specific devices: Power Voltage Detection feature */
  3525. /******************** Bit definition for PWR_CR register *******************/
  3526. #define PWR_CR_LPDS ((uint32_t)0x00000001U) /*!< Low-power Deepsleep */
  3527. #define PWR_CR_PDDS ((uint32_t)0x00000002U) /*!< Power Down Deepsleep */
  3528. #define PWR_CR_CWUF ((uint32_t)0x00000004U) /*!< Clear Wakeup Flag */
  3529. #define PWR_CR_CSBF ((uint32_t)0x00000008U) /*!< Clear Standby Flag */
  3530. #define PWR_CR_PVDE ((uint32_t)0x00000010U) /*!< Power Voltage Detector Enable */
  3531. #define PWR_CR_PLS ((uint32_t)0x000000E0U) /*!< PLS[2:0] bits (PVD Level Selection) */
  3532. #define PWR_CR_PLS_0 ((uint32_t)0x00000020U) /*!< Bit 0 */
  3533. #define PWR_CR_PLS_1 ((uint32_t)0x00000040U) /*!< Bit 1 */
  3534. #define PWR_CR_PLS_2 ((uint32_t)0x00000080U) /*!< Bit 2 */
  3535. /*!< PVD level configuration */
  3536. #define PWR_CR_PLS_LEV0 ((uint32_t)0x00000000U) /*!< PVD level 0 */
  3537. #define PWR_CR_PLS_LEV1 ((uint32_t)0x00000020U) /*!< PVD level 1 */
  3538. #define PWR_CR_PLS_LEV2 ((uint32_t)0x00000040U) /*!< PVD level 2 */
  3539. #define PWR_CR_PLS_LEV3 ((uint32_t)0x00000060U) /*!< PVD level 3 */
  3540. #define PWR_CR_PLS_LEV4 ((uint32_t)0x00000080U) /*!< PVD level 4 */
  3541. #define PWR_CR_PLS_LEV5 ((uint32_t)0x000000A0U) /*!< PVD level 5 */
  3542. #define PWR_CR_PLS_LEV6 ((uint32_t)0x000000C0U) /*!< PVD level 6 */
  3543. #define PWR_CR_PLS_LEV7 ((uint32_t)0x000000E0U) /*!< PVD level 7 */
  3544. #define PWR_CR_DBP ((uint32_t)0x00000100U) /*!< Disable Backup Domain write protection */
  3545. /******************* Bit definition for PWR_CSR register *******************/
  3546. #define PWR_CSR_WUF ((uint32_t)0x00000001U) /*!< Wakeup Flag */
  3547. #define PWR_CSR_SBF ((uint32_t)0x00000002U) /*!< Standby Flag */
  3548. #define PWR_CSR_PVDO ((uint32_t)0x00000004U) /*!< PVD Output */
  3549. #define PWR_CSR_VREFINTRDYF ((uint32_t)0x00000008U) /*!< Internal voltage reference (VREFINT) ready flag */
  3550. #define PWR_CSR_EWUP1 ((uint32_t)0x00000100U) /*!< Enable WKUP pin 1 */
  3551. #define PWR_CSR_EWUP2 ((uint32_t)0x00000200U) /*!< Enable WKUP pin 2 */
  3552. #define PWR_CSR_EWUP3 ((uint32_t)0x00000400U) /*!< Enable WKUP pin 3 */
  3553. #define PWR_CSR_EWUP4 ((uint32_t)0x00000800U) /*!< Enable WKUP pin 4 */
  3554. #define PWR_CSR_EWUP5 ((uint32_t)0x00001000U) /*!< Enable WKUP pin 5 */
  3555. #define PWR_CSR_EWUP6 ((uint32_t)0x00002000U) /*!< Enable WKUP pin 6 */
  3556. #define PWR_CSR_EWUP7 ((uint32_t)0x00004000U) /*!< Enable WKUP pin 7 */
  3557. #define PWR_CSR_EWUP8 ((uint32_t)0x00008000U) /*!< Enable WKUP pin 8 */
  3558. /*****************************************************************************/
  3559. /* */
  3560. /* Reset and Clock Control */
  3561. /* */
  3562. /*****************************************************************************/
  3563. /*
  3564. * @brief Specific device feature definitions (not present on all devices in the STM32F0 family)
  3565. */
  3566. #define RCC_HSI48_SUPPORT /*!< HSI48 feature support */
  3567. #define RCC_PLLSRC_PREDIV1_SUPPORT /*!< PREDIV support used as PLL source input */
  3568. /******************** Bit definition for RCC_CR register *******************/
  3569. #define RCC_CR_HSION ((uint32_t)0x00000001U) /*!< Internal High Speed clock enable */
  3570. #define RCC_CR_HSIRDY ((uint32_t)0x00000002U) /*!< Internal High Speed clock ready flag */
  3571. #define RCC_CR_HSITRIM ((uint32_t)0x000000F8U) /*!< Internal High Speed clock trimming */
  3572. #define RCC_CR_HSITRIM_0 ((uint32_t)0x00000008U) /*!<Bit 0 */
  3573. #define RCC_CR_HSITRIM_1 ((uint32_t)0x00000010U) /*!<Bit 1 */
  3574. #define RCC_CR_HSITRIM_2 ((uint32_t)0x00000020U) /*!<Bit 2 */
  3575. #define RCC_CR_HSITRIM_3 ((uint32_t)0x00000040U) /*!<Bit 3 */
  3576. #define RCC_CR_HSITRIM_4 ((uint32_t)0x00000080U) /*!<Bit 4 */
  3577. #define RCC_CR_HSICAL ((uint32_t)0x0000FF00U) /*!< Internal High Speed clock Calibration */
  3578. #define RCC_CR_HSICAL_0 ((uint32_t)0x00000100U) /*!<Bit 0 */
  3579. #define RCC_CR_HSICAL_1 ((uint32_t)0x00000200U) /*!<Bit 1 */
  3580. #define RCC_CR_HSICAL_2 ((uint32_t)0x00000400U) /*!<Bit 2 */
  3581. #define RCC_CR_HSICAL_3 ((uint32_t)0x00000800U) /*!<Bit 3 */
  3582. #define RCC_CR_HSICAL_4 ((uint32_t)0x00001000U) /*!<Bit 4 */
  3583. #define RCC_CR_HSICAL_5 ((uint32_t)0x00002000U) /*!<Bit 5 */
  3584. #define RCC_CR_HSICAL_6 ((uint32_t)0x00004000U) /*!<Bit 6 */
  3585. #define RCC_CR_HSICAL_7 ((uint32_t)0x00008000U) /*!<Bit 7 */
  3586. #define RCC_CR_HSEON ((uint32_t)0x00010000U) /*!< External High Speed clock enable */
  3587. #define RCC_CR_HSERDY ((uint32_t)0x00020000U) /*!< External High Speed clock ready flag */
  3588. #define RCC_CR_HSEBYP ((uint32_t)0x00040000U) /*!< External High Speed clock Bypass */
  3589. #define RCC_CR_CSSON ((uint32_t)0x00080000U) /*!< Clock Security System enable */
  3590. #define RCC_CR_PLLON ((uint32_t)0x01000000U) /*!< PLL enable */
  3591. #define RCC_CR_PLLRDY ((uint32_t)0x02000000U) /*!< PLL clock ready flag */
  3592. /******************** Bit definition for RCC_CFGR register *****************/
  3593. /*!< SW configuration */
  3594. #define RCC_CFGR_SW ((uint32_t)0x00000003U) /*!< SW[1:0] bits (System clock Switch) */
  3595. #define RCC_CFGR_SW_0 ((uint32_t)0x00000001U) /*!< Bit 0 */
  3596. #define RCC_CFGR_SW_1 ((uint32_t)0x00000002U) /*!< Bit 1 */
  3597. #define RCC_CFGR_SW_HSI ((uint32_t)0x00000000U) /*!< HSI selected as system clock */
  3598. #define RCC_CFGR_SW_HSE ((uint32_t)0x00000001U) /*!< HSE selected as system clock */
  3599. #define RCC_CFGR_SW_PLL ((uint32_t)0x00000002U) /*!< PLL selected as system clock */
  3600. #define RCC_CFGR_SW_HSI48 ((uint32_t)0x00000003U) /*!< HSI48 selected as system clock */
  3601. /*!< SWS configuration */
  3602. #define RCC_CFGR_SWS ((uint32_t)0x0000000CU) /*!< SWS[1:0] bits (System Clock Switch Status) */
  3603. #define RCC_CFGR_SWS_0 ((uint32_t)0x00000004U) /*!< Bit 0 */
  3604. #define RCC_CFGR_SWS_1 ((uint32_t)0x00000008U) /*!< Bit 1 */
  3605. #define RCC_CFGR_SWS_HSI ((uint32_t)0x00000000U) /*!< HSI oscillator used as system clock */
  3606. #define RCC_CFGR_SWS_HSE ((uint32_t)0x00000004U) /*!< HSE oscillator used as system clock */
  3607. #define RCC_CFGR_SWS_PLL ((uint32_t)0x00000008U) /*!< PLL used as system clock */
  3608. #define RCC_CFGR_SWS_HSI48 ((uint32_t)0x0000000CU) /*!< HSI48 oscillator used as system clock */
  3609. /*!< HPRE configuration */
  3610. #define RCC_CFGR_HPRE ((uint32_t)0x000000F0U) /*!< HPRE[3:0] bits (AHB prescaler) */
  3611. #define RCC_CFGR_HPRE_0 ((uint32_t)0x00000010U) /*!< Bit 0 */
  3612. #define RCC_CFGR_HPRE_1 ((uint32_t)0x00000020U) /*!< Bit 1 */
  3613. #define RCC_CFGR_HPRE_2 ((uint32_t)0x00000040U) /*!< Bit 2 */
  3614. #define RCC_CFGR_HPRE_3 ((uint32_t)0x00000080U) /*!< Bit 3 */
  3615. #define RCC_CFGR_HPRE_DIV1 ((uint32_t)0x00000000U) /*!< SYSCLK not divided */
  3616. #define RCC_CFGR_HPRE_DIV2 ((uint32_t)0x00000080U) /*!< SYSCLK divided by 2 */
  3617. #define RCC_CFGR_HPRE_DIV4 ((uint32_t)0x00000090U) /*!< SYSCLK divided by 4 */
  3618. #define RCC_CFGR_HPRE_DIV8 ((uint32_t)0x000000A0U) /*!< SYSCLK divided by 8 */
  3619. #define RCC_CFGR_HPRE_DIV16 ((uint32_t)0x000000B0U) /*!< SYSCLK divided by 16 */
  3620. #define RCC_CFGR_HPRE_DIV64 ((uint32_t)0x000000C0U) /*!< SYSCLK divided by 64 */
  3621. #define RCC_CFGR_HPRE_DIV128 ((uint32_t)0x000000D0U) /*!< SYSCLK divided by 128 */
  3622. #define RCC_CFGR_HPRE_DIV256 ((uint32_t)0x000000E0U) /*!< SYSCLK divided by 256 */
  3623. #define RCC_CFGR_HPRE_DIV512 ((uint32_t)0x000000F0U) /*!< SYSCLK divided by 512 */
  3624. /*!< PPRE configuration */
  3625. #define RCC_CFGR_PPRE ((uint32_t)0x00000700U) /*!< PRE[2:0] bits (APB prescaler) */
  3626. #define RCC_CFGR_PPRE_0 ((uint32_t)0x00000100U) /*!< Bit 0 */
  3627. #define RCC_CFGR_PPRE_1 ((uint32_t)0x00000200U) /*!< Bit 1 */
  3628. #define RCC_CFGR_PPRE_2 ((uint32_t)0x00000400U) /*!< Bit 2 */
  3629. #define RCC_CFGR_PPRE_DIV1 ((uint32_t)0x00000000U) /*!< HCLK not divided */
  3630. #define RCC_CFGR_PPRE_DIV2 ((uint32_t)0x00000400U) /*!< HCLK divided by 2 */
  3631. #define RCC_CFGR_PPRE_DIV4 ((uint32_t)0x00000500U) /*!< HCLK divided by 4 */
  3632. #define RCC_CFGR_PPRE_DIV8 ((uint32_t)0x00000600U) /*!< HCLK divided by 8 */
  3633. #define RCC_CFGR_PPRE_DIV16 ((uint32_t)0x00000700U) /*!< HCLK divided by 16 */
  3634. #define RCC_CFGR_PLLSRC ((uint32_t)0x00018000U) /*!< PLL entry clock source */
  3635. #define RCC_CFGR_PLLSRC_HSI_DIV2 ((uint32_t)0x00000000U) /*!< HSI clock divided by 2 selected as PLL entry clock source */
  3636. #define RCC_CFGR_PLLSRC_HSI_PREDIV ((uint32_t)0x00008000U) /*!< HSI/PREDIV clock selected as PLL entry clock source */
  3637. #define RCC_CFGR_PLLSRC_HSE_PREDIV ((uint32_t)0x00010000U) /*!< HSE/PREDIV clock selected as PLL entry clock source */
  3638. #define RCC_CFGR_PLLSRC_HSI48_PREDIV ((uint32_t)0x00018000U) /*!< HSI48/PREDIV clock selected as PLL entry clock source */
  3639. #define RCC_CFGR_PLLXTPRE ((uint32_t)0x00020000U) /*!< HSE divider for PLL entry */
  3640. #define RCC_CFGR_PLLXTPRE_HSE_PREDIV_DIV1 ((uint32_t)0x00000000U) /*!< HSE/PREDIV clock not divided for PLL entry */
  3641. #define RCC_CFGR_PLLXTPRE_HSE_PREDIV_DIV2 ((uint32_t)0x00020000U) /*!< HSE/PREDIV clock divided by 2 for PLL entry */
  3642. /*!< PLLMUL configuration */
  3643. #define RCC_CFGR_PLLMUL ((uint32_t)0x003C0000U) /*!< PLLMUL[3:0] bits (PLL multiplication factor) */
  3644. #define RCC_CFGR_PLLMUL_0 ((uint32_t)0x00040000U) /*!< Bit 0 */
  3645. #define RCC_CFGR_PLLMUL_1 ((uint32_t)0x00080000U) /*!< Bit 1 */
  3646. #define RCC_CFGR_PLLMUL_2 ((uint32_t)0x00100000U) /*!< Bit 2 */
  3647. #define RCC_CFGR_PLLMUL_3 ((uint32_t)0x00200000U) /*!< Bit 3 */
  3648. #define RCC_CFGR_PLLMUL2 ((uint32_t)0x00000000U) /*!< PLL input clock*2 */
  3649. #define RCC_CFGR_PLLMUL3 ((uint32_t)0x00040000U) /*!< PLL input clock*3 */
  3650. #define RCC_CFGR_PLLMUL4 ((uint32_t)0x00080000U) /*!< PLL input clock*4 */
  3651. #define RCC_CFGR_PLLMUL5 ((uint32_t)0x000C0000U) /*!< PLL input clock*5 */
  3652. #define RCC_CFGR_PLLMUL6 ((uint32_t)0x00100000U) /*!< PLL input clock*6 */
  3653. #define RCC_CFGR_PLLMUL7 ((uint32_t)0x00140000U) /*!< PLL input clock*7 */
  3654. #define RCC_CFGR_PLLMUL8 ((uint32_t)0x00180000U) /*!< PLL input clock*8 */
  3655. #define RCC_CFGR_PLLMUL9 ((uint32_t)0x001C0000U) /*!< PLL input clock*9 */
  3656. #define RCC_CFGR_PLLMUL10 ((uint32_t)0x00200000U) /*!< PLL input clock10 */
  3657. #define RCC_CFGR_PLLMUL11 ((uint32_t)0x00240000U) /*!< PLL input clock*11 */
  3658. #define RCC_CFGR_PLLMUL12 ((uint32_t)0x00280000U) /*!< PLL input clock*12 */
  3659. #define RCC_CFGR_PLLMUL13 ((uint32_t)0x002C0000U) /*!< PLL input clock*13 */
  3660. #define RCC_CFGR_PLLMUL14 ((uint32_t)0x00300000U) /*!< PLL input clock*14 */
  3661. #define RCC_CFGR_PLLMUL15 ((uint32_t)0x00340000U) /*!< PLL input clock*15 */
  3662. #define RCC_CFGR_PLLMUL16 ((uint32_t)0x00380000U) /*!< PLL input clock*16 */
  3663. /*!< MCO configuration */
  3664. #define RCC_CFGR_MCO ((uint32_t)0x0F000000U) /*!< MCO[3:0] bits (Microcontroller Clock Output) */
  3665. #define RCC_CFGR_MCO_0 ((uint32_t)0x01000000U) /*!< Bit 0 */
  3666. #define RCC_CFGR_MCO_1 ((uint32_t)0x02000000U) /*!< Bit 1 */
  3667. #define RCC_CFGR_MCO_2 ((uint32_t)0x04000000U) /*!< Bit 2 */
  3668. #define RCC_CFGR_MCO_3 ((uint32_t)0x08000000U) /*!< Bit 3 */
  3669. #define RCC_CFGR_MCO_NOCLOCK ((uint32_t)0x00000000U) /*!< No clock */
  3670. #define RCC_CFGR_MCO_HSI14 ((uint32_t)0x01000000U) /*!< HSI14 clock selected as MCO source */
  3671. #define RCC_CFGR_MCO_LSI ((uint32_t)0x02000000U) /*!< LSI clock selected as MCO source */
  3672. #define RCC_CFGR_MCO_LSE ((uint32_t)0x03000000U) /*!< LSE clock selected as MCO source */
  3673. #define RCC_CFGR_MCO_SYSCLK ((uint32_t)0x04000000U) /*!< System clock selected as MCO source */
  3674. #define RCC_CFGR_MCO_HSI ((uint32_t)0x05000000U) /*!< HSI clock selected as MCO source */
  3675. #define RCC_CFGR_MCO_HSE ((uint32_t)0x06000000U) /*!< HSE clock selected as MCO source */
  3676. #define RCC_CFGR_MCO_PLL ((uint32_t)0x07000000U) /*!< PLL clock divided by 2 selected as MCO source */
  3677. #define RCC_CFGR_MCO_HSI48 ((uint32_t)0x08000000U) /*!< HSI48 clock selected as MCO source */
  3678. #define RCC_CFGR_MCOPRE ((uint32_t)0x70000000U) /*!< MCO prescaler */
  3679. #define RCC_CFGR_MCOPRE_DIV1 ((uint32_t)0x00000000U) /*!< MCO is divided by 1 */
  3680. #define RCC_CFGR_MCOPRE_DIV2 ((uint32_t)0x10000000U) /*!< MCO is divided by 2 */
  3681. #define RCC_CFGR_MCOPRE_DIV4 ((uint32_t)0x20000000U) /*!< MCO is divided by 4 */
  3682. #define RCC_CFGR_MCOPRE_DIV8 ((uint32_t)0x30000000U) /*!< MCO is divided by 8 */
  3683. #define RCC_CFGR_MCOPRE_DIV16 ((uint32_t)0x40000000U) /*!< MCO is divided by 16 */
  3684. #define RCC_CFGR_MCOPRE_DIV32 ((uint32_t)0x50000000U) /*!< MCO is divided by 32 */
  3685. #define RCC_CFGR_MCOPRE_DIV64 ((uint32_t)0x60000000U) /*!< MCO is divided by 64 */
  3686. #define RCC_CFGR_MCOPRE_DIV128 ((uint32_t)0x70000000U) /*!< MCO is divided by 128 */
  3687. #define RCC_CFGR_PLLNODIV ((uint32_t)0x80000000U) /*!< PLL is not divided to MCO */
  3688. /* Reference defines */
  3689. #define RCC_CFGR_MCOSEL RCC_CFGR_MCO
  3690. #define RCC_CFGR_MCOSEL_0 RCC_CFGR_MCO_0
  3691. #define RCC_CFGR_MCOSEL_1 RCC_CFGR_MCO_1
  3692. #define RCC_CFGR_MCOSEL_2 RCC_CFGR_MCO_2
  3693. #define RCC_CFGR_MCOSEL_3 RCC_CFGR_MCO_3
  3694. #define RCC_CFGR_MCOSEL_NOCLOCK RCC_CFGR_MCO_NOCLOCK
  3695. #define RCC_CFGR_MCOSEL_HSI14 RCC_CFGR_MCO_HSI14
  3696. #define RCC_CFGR_MCOSEL_LSI RCC_CFGR_MCO_LSI
  3697. #define RCC_CFGR_MCOSEL_LSE RCC_CFGR_MCO_LSE
  3698. #define RCC_CFGR_MCOSEL_SYSCLK RCC_CFGR_MCO_SYSCLK
  3699. #define RCC_CFGR_MCOSEL_HSI RCC_CFGR_MCO_HSI
  3700. #define RCC_CFGR_MCOSEL_HSE RCC_CFGR_MCO_HSE
  3701. #define RCC_CFGR_MCOSEL_PLL_DIV2 RCC_CFGR_MCO_PLL
  3702. #define RCC_CFGR_MCOSEL_HSI48 RCC_CFGR_MCO_HSI48
  3703. /*!<****************** Bit definition for RCC_CIR register *****************/
  3704. #define RCC_CIR_LSIRDYF ((uint32_t)0x00000001U) /*!< LSI Ready Interrupt flag */
  3705. #define RCC_CIR_LSERDYF ((uint32_t)0x00000002U) /*!< LSE Ready Interrupt flag */
  3706. #define RCC_CIR_HSIRDYF ((uint32_t)0x00000004U) /*!< HSI Ready Interrupt flag */
  3707. #define RCC_CIR_HSERDYF ((uint32_t)0x00000008U) /*!< HSE Ready Interrupt flag */
  3708. #define RCC_CIR_PLLRDYF ((uint32_t)0x00000010U) /*!< PLL Ready Interrupt flag */
  3709. #define RCC_CIR_HSI14RDYF ((uint32_t)0x00000020U) /*!< HSI14 Ready Interrupt flag */
  3710. #define RCC_CIR_HSI48RDYF ((uint32_t)0x00000040U) /*!< HSI48 Ready Interrupt flag */
  3711. #define RCC_CIR_CSSF ((uint32_t)0x00000080U) /*!< Clock Security System Interrupt flag */
  3712. #define RCC_CIR_LSIRDYIE ((uint32_t)0x00000100U) /*!< LSI Ready Interrupt Enable */
  3713. #define RCC_CIR_LSERDYIE ((uint32_t)0x00000200U) /*!< LSE Ready Interrupt Enable */
  3714. #define RCC_CIR_HSIRDYIE ((uint32_t)0x00000400U) /*!< HSI Ready Interrupt Enable */
  3715. #define RCC_CIR_HSERDYIE ((uint32_t)0x00000800U) /*!< HSE Ready Interrupt Enable */
  3716. #define RCC_CIR_PLLRDYIE ((uint32_t)0x00001000U) /*!< PLL Ready Interrupt Enable */
  3717. #define RCC_CIR_HSI14RDYIE ((uint32_t)0x00002000U) /*!< HSI14 Ready Interrupt Enable */
  3718. #define RCC_CIR_HSI48RDYIE ((uint32_t)0x00004000U) /*!< HSI48 Ready Interrupt Enable */
  3719. #define RCC_CIR_LSIRDYC ((uint32_t)0x00010000U) /*!< LSI Ready Interrupt Clear */
  3720. #define RCC_CIR_LSERDYC ((uint32_t)0x00020000U) /*!< LSE Ready Interrupt Clear */
  3721. #define RCC_CIR_HSIRDYC ((uint32_t)0x00040000U) /*!< HSI Ready Interrupt Clear */
  3722. #define RCC_CIR_HSERDYC ((uint32_t)0x00080000U) /*!< HSE Ready Interrupt Clear */
  3723. #define RCC_CIR_PLLRDYC ((uint32_t)0x00100000U) /*!< PLL Ready Interrupt Clear */
  3724. #define RCC_CIR_HSI14RDYC ((uint32_t)0x00200000U) /*!< HSI14 Ready Interrupt Clear */
  3725. #define RCC_CIR_HSI48RDYC ((uint32_t)0x00400000U) /*!< HSI48 Ready Interrupt Clear */
  3726. #define RCC_CIR_CSSC ((uint32_t)0x00800000U) /*!< Clock Security System Interrupt Clear */
  3727. /***************** Bit definition for RCC_APB2RSTR register ****************/
  3728. #define RCC_APB2RSTR_SYSCFGRST ((uint32_t)0x00000001U) /*!< SYSCFG clock reset */
  3729. #define RCC_APB2RSTR_USART6RST ((uint32_t)0x00000020U) /*!< USART6 clock reset */
  3730. #define RCC_APB2RSTR_USART7RST ((uint32_t)0x00000040U) /*!< USART7 clock reset */
  3731. #define RCC_APB2RSTR_USART8RST ((uint32_t)0x00000080U) /*!< USART8 clock reset */
  3732. #define RCC_APB2RSTR_ADCRST ((uint32_t)0x00000200U) /*!< ADC clock reset */
  3733. #define RCC_APB2RSTR_TIM1RST ((uint32_t)0x00000800U) /*!< TIM1 clock reset */
  3734. #define RCC_APB2RSTR_SPI1RST ((uint32_t)0x00001000U) /*!< SPI1 clock reset */
  3735. #define RCC_APB2RSTR_USART1RST ((uint32_t)0x00004000U) /*!< USART1 clock reset */
  3736. #define RCC_APB2RSTR_TIM15RST ((uint32_t)0x00010000U) /*!< TIM15 clock reset */
  3737. #define RCC_APB2RSTR_TIM16RST ((uint32_t)0x00020000U) /*!< TIM16 clock reset */
  3738. #define RCC_APB2RSTR_TIM17RST ((uint32_t)0x00040000U) /*!< TIM17 clock reset */
  3739. #define RCC_APB2RSTR_DBGMCURST ((uint32_t)0x00400000U) /*!< DBGMCU clock reset */
  3740. /*!< Old ADC1 clock reset bit definition maintained for legacy purpose */
  3741. #define RCC_APB2RSTR_ADC1RST RCC_APB2RSTR_ADCRST
  3742. /***************** Bit definition for RCC_APB1RSTR register ****************/
  3743. #define RCC_APB1RSTR_TIM2RST ((uint32_t)0x00000001U) /*!< Timer 2 clock reset */
  3744. #define RCC_APB1RSTR_TIM3RST ((uint32_t)0x00000002U) /*!< Timer 3 clock reset */
  3745. #define RCC_APB1RSTR_TIM6RST ((uint32_t)0x00000010U) /*!< Timer 6 clock reset */
  3746. #define RCC_APB1RSTR_TIM7RST ((uint32_t)0x00000020U) /*!< Timer 7 clock reset */
  3747. #define RCC_APB1RSTR_TIM14RST ((uint32_t)0x00000100U) /*!< Timer 14 clock reset */
  3748. #define RCC_APB1RSTR_WWDGRST ((uint32_t)0x00000800U) /*!< Window Watchdog clock reset */
  3749. #define RCC_APB1RSTR_SPI2RST ((uint32_t)0x00004000U) /*!< SPI2 clock reset */
  3750. #define RCC_APB1RSTR_USART2RST ((uint32_t)0x00020000U) /*!< USART 2 clock reset */
  3751. #define RCC_APB1RSTR_USART3RST ((uint32_t)0x00040000U) /*!< USART 3 clock reset */
  3752. #define RCC_APB1RSTR_USART4RST ((uint32_t)0x00080000U) /*!< USART 4 clock reset */
  3753. #define RCC_APB1RSTR_USART5RST ((uint32_t)0x00100000U) /*!< USART 5 clock reset */
  3754. #define RCC_APB1RSTR_I2C1RST ((uint32_t)0x00200000U) /*!< I2C 1 clock reset */
  3755. #define RCC_APB1RSTR_I2C2RST ((uint32_t)0x00400000U) /*!< I2C 2 clock reset */
  3756. #define RCC_APB1RSTR_CANRST ((uint32_t)0x02000000U) /*!< CAN clock reset */
  3757. #define RCC_APB1RSTR_CRSRST ((uint32_t)0x08000000U) /*!< CRS clock reset */
  3758. #define RCC_APB1RSTR_PWRRST ((uint32_t)0x10000000U) /*!< PWR clock reset */
  3759. #define RCC_APB1RSTR_DACRST ((uint32_t)0x20000000U) /*!< DAC clock reset */
  3760. #define RCC_APB1RSTR_CECRST ((uint32_t)0x40000000U) /*!< CEC clock reset */
  3761. /****************** Bit definition for RCC_AHBENR register *****************/
  3762. #define RCC_AHBENR_DMAEN ((uint32_t)0x00000001U) /*!< DMA1 clock enable */
  3763. #define RCC_AHBENR_DMA2EN ((uint32_t)0x00000002U) /*!< DMA2 clock enable */
  3764. #define RCC_AHBENR_SRAMEN ((uint32_t)0x00000004U) /*!< SRAM interface clock enable */
  3765. #define RCC_AHBENR_FLITFEN ((uint32_t)0x00000010U) /*!< FLITF clock enable */
  3766. #define RCC_AHBENR_CRCEN ((uint32_t)0x00000040U) /*!< CRC clock enable */
  3767. #define RCC_AHBENR_GPIOAEN ((uint32_t)0x00020000U) /*!< GPIOA clock enable */
  3768. #define RCC_AHBENR_GPIOBEN ((uint32_t)0x00040000U) /*!< GPIOB clock enable */
  3769. #define RCC_AHBENR_GPIOCEN ((uint32_t)0x00080000U) /*!< GPIOC clock enable */
  3770. #define RCC_AHBENR_GPIODEN ((uint32_t)0x00100000U) /*!< GPIOD clock enable */
  3771. #define RCC_AHBENR_GPIOEEN ((uint32_t)0x00200000U) /*!< GPIOE clock enable */
  3772. #define RCC_AHBENR_GPIOFEN ((uint32_t)0x00400000U) /*!< GPIOF clock enable */
  3773. #define RCC_AHBENR_TSCEN ((uint32_t)0x01000000U) /*!< TS controller clock enable */
  3774. /* Old Bit definition maintained for legacy purpose */
  3775. #define RCC_AHBENR_DMA1EN RCC_AHBENR_DMAEN /*!< DMA1 clock enable */
  3776. #define RCC_AHBENR_TSEN RCC_AHBENR_TSCEN /*!< TS clock enable */
  3777. /***************** Bit definition for RCC_APB2ENR register *****************/
  3778. #define RCC_APB2ENR_SYSCFGCOMPEN ((uint32_t)0x00000001U) /*!< SYSCFG and comparator clock enable */
  3779. #define RCC_APB2ENR_USART6EN ((uint32_t)0x00000020U) /*!< USART6 clock enable */
  3780. #define RCC_APB2ENR_USART7EN ((uint32_t)0x00000040U) /*!< USART7 clock enable */
  3781. #define RCC_APB2ENR_USART8EN ((uint32_t)0x00000080U) /*!< USART8 clock enable */
  3782. #define RCC_APB2ENR_ADCEN ((uint32_t)0x00000200U) /*!< ADC1 clock enable */
  3783. #define RCC_APB2ENR_TIM1EN ((uint32_t)0x00000800U) /*!< TIM1 clock enable */
  3784. #define RCC_APB2ENR_SPI1EN ((uint32_t)0x00001000U) /*!< SPI1 clock enable */
  3785. #define RCC_APB2ENR_USART1EN ((uint32_t)0x00004000U) /*!< USART1 clock enable */
  3786. #define RCC_APB2ENR_TIM15EN ((uint32_t)0x00010000U) /*!< TIM15 clock enable */
  3787. #define RCC_APB2ENR_TIM16EN ((uint32_t)0x00020000U) /*!< TIM16 clock enable */
  3788. #define RCC_APB2ENR_TIM17EN ((uint32_t)0x00040000U) /*!< TIM17 clock enable */
  3789. #define RCC_APB2ENR_DBGMCUEN ((uint32_t)0x00400000U) /*!< DBGMCU clock enable */
  3790. /* Old Bit definition maintained for legacy purpose */
  3791. #define RCC_APB2ENR_SYSCFGEN RCC_APB2ENR_SYSCFGCOMPEN /*!< SYSCFG clock enable */
  3792. #define RCC_APB2ENR_ADC1EN RCC_APB2ENR_ADCEN /*!< ADC1 clock enable */
  3793. /***************** Bit definition for RCC_APB1ENR register *****************/
  3794. #define RCC_APB1ENR_TIM2EN ((uint32_t)0x00000001U) /*!< Timer 2 clock enable */
  3795. #define RCC_APB1ENR_TIM3EN ((uint32_t)0x00000002U) /*!< Timer 3 clock enable */
  3796. #define RCC_APB1ENR_TIM6EN ((uint32_t)0x00000010U) /*!< Timer 6 clock enable */
  3797. #define RCC_APB1ENR_TIM7EN ((uint32_t)0x00000020U) /*!< Timer 7 clock enable */
  3798. #define RCC_APB1ENR_TIM14EN ((uint32_t)0x00000100U) /*!< Timer 14 clock enable */
  3799. #define RCC_APB1ENR_WWDGEN ((uint32_t)0x00000800U) /*!< Window Watchdog clock enable */
  3800. #define RCC_APB1ENR_SPI2EN ((uint32_t)0x00004000U) /*!< SPI2 clock enable */
  3801. #define RCC_APB1ENR_USART2EN ((uint32_t)0x00020000U) /*!< USART2 clock enable */
  3802. #define RCC_APB1ENR_USART3EN ((uint32_t)0x00040000U) /*!< USART3 clock enable */
  3803. #define RCC_APB1ENR_USART4EN ((uint32_t)0x00080000U) /*!< USART4 clock enable */
  3804. #define RCC_APB1ENR_USART5EN ((uint32_t)0x00100000U) /*!< USART5 clock enable */
  3805. #define RCC_APB1ENR_I2C1EN ((uint32_t)0x00200000U) /*!< I2C1 clock enable */
  3806. #define RCC_APB1ENR_I2C2EN ((uint32_t)0x00400000U) /*!< I2C2 clock enable */
  3807. #define RCC_APB1ENR_CANEN ((uint32_t)0x02000000U) /*!< CAN clock enable */
  3808. #define RCC_APB1ENR_CRSEN ((uint32_t)0x08000000U) /*!< CRS clock enable */
  3809. #define RCC_APB1ENR_PWREN ((uint32_t)0x10000000U) /*!< PWR clock enable */
  3810. #define RCC_APB1ENR_DACEN ((uint32_t)0x20000000U) /*!< DAC clock enable */
  3811. #define RCC_APB1ENR_CECEN ((uint32_t)0x40000000U) /*!< CEC clock enable */
  3812. /******************* Bit definition for RCC_BDCR register ******************/
  3813. #define RCC_BDCR_LSEON ((uint32_t)0x00000001U) /*!< External Low Speed oscillator enable */
  3814. #define RCC_BDCR_LSERDY ((uint32_t)0x00000002U) /*!< External Low Speed oscillator Ready */
  3815. #define RCC_BDCR_LSEBYP ((uint32_t)0x00000004U) /*!< External Low Speed oscillator Bypass */
  3816. #define RCC_BDCR_LSEDRV ((uint32_t)0x00000018U) /*!< LSEDRV[1:0] bits (LSE Osc. drive capability) */
  3817. #define RCC_BDCR_LSEDRV_0 ((uint32_t)0x00000008U) /*!< Bit 0 */
  3818. #define RCC_BDCR_LSEDRV_1 ((uint32_t)0x00000010U) /*!< Bit 1 */
  3819. #define RCC_BDCR_RTCSEL ((uint32_t)0x00000300U) /*!< RTCSEL[1:0] bits (RTC clock source selection) */
  3820. #define RCC_BDCR_RTCSEL_0 ((uint32_t)0x00000100U) /*!< Bit 0 */
  3821. #define RCC_BDCR_RTCSEL_1 ((uint32_t)0x00000200U) /*!< Bit 1 */
  3822. /*!< RTC configuration */
  3823. #define RCC_BDCR_RTCSEL_NOCLOCK ((uint32_t)0x00000000U) /*!< No clock */
  3824. #define RCC_BDCR_RTCSEL_LSE ((uint32_t)0x00000100U) /*!< LSE oscillator clock used as RTC clock */
  3825. #define RCC_BDCR_RTCSEL_LSI ((uint32_t)0x00000200U) /*!< LSI oscillator clock used as RTC clock */
  3826. #define RCC_BDCR_RTCSEL_HSE ((uint32_t)0x00000300U) /*!< HSE oscillator clock divided by 128 used as RTC clock */
  3827. #define RCC_BDCR_RTCEN ((uint32_t)0x00008000U) /*!< RTC clock enable */
  3828. #define RCC_BDCR_BDRST ((uint32_t)0x00010000U) /*!< Backup domain software reset */
  3829. /******************* Bit definition for RCC_CSR register *******************/
  3830. #define RCC_CSR_LSION ((uint32_t)0x00000001U) /*!< Internal Low Speed oscillator enable */
  3831. #define RCC_CSR_LSIRDY ((uint32_t)0x00000002U) /*!< Internal Low Speed oscillator Ready */
  3832. #define RCC_CSR_V18PWRRSTF ((uint32_t)0x00800000U) /*!< V1.8 power domain reset flag */
  3833. #define RCC_CSR_RMVF ((uint32_t)0x01000000U) /*!< Remove reset flag */
  3834. #define RCC_CSR_OBLRSTF ((uint32_t)0x02000000U) /*!< OBL reset flag */
  3835. #define RCC_CSR_PINRSTF ((uint32_t)0x04000000U) /*!< PIN reset flag */
  3836. #define RCC_CSR_PORRSTF ((uint32_t)0x08000000U) /*!< POR/PDR reset flag */
  3837. #define RCC_CSR_SFTRSTF ((uint32_t)0x10000000U) /*!< Software Reset flag */
  3838. #define RCC_CSR_IWDGRSTF ((uint32_t)0x20000000U) /*!< Independent Watchdog reset flag */
  3839. #define RCC_CSR_WWDGRSTF ((uint32_t)0x40000000U) /*!< Window watchdog reset flag */
  3840. #define RCC_CSR_LPWRRSTF ((uint32_t)0x80000000U) /*!< Low-Power reset flag */
  3841. /* Old Bit definition maintained for legacy purpose */
  3842. #define RCC_CSR_OBL RCC_CSR_OBLRSTF /*!< OBL reset flag */
  3843. /******************* Bit definition for RCC_AHBRSTR register ***************/
  3844. #define RCC_AHBRSTR_GPIOARST ((uint32_t)0x00020000U) /*!< GPIOA clock reset */
  3845. #define RCC_AHBRSTR_GPIOBRST ((uint32_t)0x00040000U) /*!< GPIOB clock reset */
  3846. #define RCC_AHBRSTR_GPIOCRST ((uint32_t)0x00080000U) /*!< GPIOC clock reset */
  3847. #define RCC_AHBRSTR_GPIODRST ((uint32_t)0x00100000U) /*!< GPIOD clock reset */
  3848. #define RCC_AHBRSTR_GPIOERST ((uint32_t)0x00200000U) /*!< GPIOE clock reset */
  3849. #define RCC_AHBRSTR_GPIOFRST ((uint32_t)0x00400000U) /*!< GPIOF clock reset */
  3850. #define RCC_AHBRSTR_TSCRST ((uint32_t)0x01000000U) /*!< TS clock reset */
  3851. /* Old Bit definition maintained for legacy purpose */
  3852. #define RCC_AHBRSTR_TSRST RCC_AHBRSTR_TSCRST /*!< TS clock reset */
  3853. /******************* Bit definition for RCC_CFGR2 register *****************/
  3854. /*!< PREDIV configuration */
  3855. #define RCC_CFGR2_PREDIV ((uint32_t)0x0000000FU) /*!< PREDIV[3:0] bits */
  3856. #define RCC_CFGR2_PREDIV_0 ((uint32_t)0x00000001U) /*!< Bit 0 */
  3857. #define RCC_CFGR2_PREDIV_1 ((uint32_t)0x00000002U) /*!< Bit 1 */
  3858. #define RCC_CFGR2_PREDIV_2 ((uint32_t)0x00000004U) /*!< Bit 2 */
  3859. #define RCC_CFGR2_PREDIV_3 ((uint32_t)0x00000008U) /*!< Bit 3 */
  3860. #define RCC_CFGR2_PREDIV_DIV1 ((uint32_t)0x00000000U) /*!< PREDIV input clock not divided */
  3861. #define RCC_CFGR2_PREDIV_DIV2 ((uint32_t)0x00000001U) /*!< PREDIV input clock divided by 2 */
  3862. #define RCC_CFGR2_PREDIV_DIV3 ((uint32_t)0x00000002U) /*!< PREDIV input clock divided by 3 */
  3863. #define RCC_CFGR2_PREDIV_DIV4 ((uint32_t)0x00000003U) /*!< PREDIV input clock divided by 4 */
  3864. #define RCC_CFGR2_PREDIV_DIV5 ((uint32_t)0x00000004U) /*!< PREDIV input clock divided by 5 */
  3865. #define RCC_CFGR2_PREDIV_DIV6 ((uint32_t)0x00000005U) /*!< PREDIV input clock divided by 6 */
  3866. #define RCC_CFGR2_PREDIV_DIV7 ((uint32_t)0x00000006U) /*!< PREDIV input clock divided by 7 */
  3867. #define RCC_CFGR2_PREDIV_DIV8 ((uint32_t)0x00000007U) /*!< PREDIV input clock divided by 8 */
  3868. #define RCC_CFGR2_PREDIV_DIV9 ((uint32_t)0x00000008U) /*!< PREDIV input clock divided by 9 */
  3869. #define RCC_CFGR2_PREDIV_DIV10 ((uint32_t)0x00000009U) /*!< PREDIV input clock divided by 10 */
  3870. #define RCC_CFGR2_PREDIV_DIV11 ((uint32_t)0x0000000AU) /*!< PREDIV input clock divided by 11 */
  3871. #define RCC_CFGR2_PREDIV_DIV12 ((uint32_t)0x0000000BU) /*!< PREDIV input clock divided by 12 */
  3872. #define RCC_CFGR2_PREDIV_DIV13 ((uint32_t)0x0000000CU) /*!< PREDIV input clock divided by 13 */
  3873. #define RCC_CFGR2_PREDIV_DIV14 ((uint32_t)0x0000000DU) /*!< PREDIV input clock divided by 14 */
  3874. #define RCC_CFGR2_PREDIV_DIV15 ((uint32_t)0x0000000EU) /*!< PREDIV input clock divided by 15 */
  3875. #define RCC_CFGR2_PREDIV_DIV16 ((uint32_t)0x0000000FU) /*!< PREDIV input clock divided by 16 */
  3876. /******************* Bit definition for RCC_CFGR3 register *****************/
  3877. /*!< USART1 Clock source selection */
  3878. #define RCC_CFGR3_USART1SW ((uint32_t)0x00000003U) /*!< USART1SW[1:0] bits */
  3879. #define RCC_CFGR3_USART1SW_0 ((uint32_t)0x00000001U) /*!< Bit 0 */
  3880. #define RCC_CFGR3_USART1SW_1 ((uint32_t)0x00000002U) /*!< Bit 1 */
  3881. #define RCC_CFGR3_USART1SW_PCLK ((uint32_t)0x00000000U) /*!< PCLK clock used as USART1 clock source */
  3882. #define RCC_CFGR3_USART1SW_SYSCLK ((uint32_t)0x00000001U) /*!< System clock selected as USART1 clock source */
  3883. #define RCC_CFGR3_USART1SW_LSE ((uint32_t)0x00000002U) /*!< LSE oscillator clock used as USART1 clock source */
  3884. #define RCC_CFGR3_USART1SW_HSI ((uint32_t)0x00000003U) /*!< HSI oscillator clock used as USART1 clock source */
  3885. /*!< I2C1 Clock source selection */
  3886. #define RCC_CFGR3_I2C1SW ((uint32_t)0x00000010U) /*!< I2C1SW bits */
  3887. #define RCC_CFGR3_I2C1SW_HSI ((uint32_t)0x00000000U) /*!< HSI oscillator clock used as I2C1 clock source */
  3888. #define RCC_CFGR3_I2C1SW_SYSCLK ((uint32_t)0x00000010U) /*!< System clock selected as I2C1 clock source */
  3889. /*!< CEC Clock source selection */
  3890. #define RCC_CFGR3_CECSW ((uint32_t)0x00000040U) /*!< CECSW bits */
  3891. #define RCC_CFGR3_CECSW_HSI_DIV244 ((uint32_t)0x00000000U) /*!< HSI clock divided by 244 selected as HDMI CEC entry clock source */
  3892. #define RCC_CFGR3_CECSW_LSE ((uint32_t)0x00000040U) /*!< LSE clock selected as HDMI CEC entry clock source */
  3893. /*!< USART2 Clock source selection */
  3894. #define RCC_CFGR3_USART2SW ((uint32_t)0x00030000U) /*!< USART2SW[1:0] bits */
  3895. #define RCC_CFGR3_USART2SW_0 ((uint32_t)0x00010000U) /*!< Bit 0 */
  3896. #define RCC_CFGR3_USART2SW_1 ((uint32_t)0x00020000U) /*!< Bit 1 */
  3897. #define RCC_CFGR3_USART2SW_PCLK ((uint32_t)0x00000000U) /*!< PCLK clock used as USART2 clock source */
  3898. #define RCC_CFGR3_USART2SW_SYSCLK ((uint32_t)0x00010000U) /*!< System clock selected as USART2 clock source */
  3899. #define RCC_CFGR3_USART2SW_LSE ((uint32_t)0x00020000U) /*!< LSE oscillator clock used as USART2 clock source */
  3900. #define RCC_CFGR3_USART2SW_HSI ((uint32_t)0x00030000U) /*!< HSI oscillator clock used as USART2 clock source */
  3901. /*!< USART3 Clock source selection */
  3902. #define RCC_CFGR3_USART3SW ((uint32_t)0x000C0000U) /*!< USART3SW[1:0] bits */
  3903. #define RCC_CFGR3_USART3SW_0 ((uint32_t)0x00040000U) /*!< Bit 0 */
  3904. #define RCC_CFGR3_USART3SW_1 ((uint32_t)0x00080000U) /*!< Bit 1 */
  3905. #define RCC_CFGR3_USART3SW_PCLK ((uint32_t)0x00000000U) /*!< PCLK clock used as USART3 clock source */
  3906. #define RCC_CFGR3_USART3SW_SYSCLK ((uint32_t)0x00040000U) /*!< System clock selected as USART3 clock source */
  3907. #define RCC_CFGR3_USART3SW_LSE ((uint32_t)0x00080000U) /*!< LSE oscillator clock used as USART3 clock source */
  3908. #define RCC_CFGR3_USART3SW_HSI ((uint32_t)0x000C0000U) /*!< HSI oscillator clock used as USART3 clock source */
  3909. /******************* Bit definition for RCC_CR2 register *******************/
  3910. #define RCC_CR2_HSI14ON ((uint32_t)0x00000001U) /*!< Internal High Speed 14MHz clock enable */
  3911. #define RCC_CR2_HSI14RDY ((uint32_t)0x00000002U) /*!< Internal High Speed 14MHz clock ready flag */
  3912. #define RCC_CR2_HSI14DIS ((uint32_t)0x00000004U) /*!< Internal High Speed 14MHz clock disable */
  3913. #define RCC_CR2_HSI14TRIM ((uint32_t)0x000000F8U) /*!< Internal High Speed 14MHz clock trimming */
  3914. #define RCC_CR2_HSI14CAL ((uint32_t)0x0000FF00U) /*!< Internal High Speed 14MHz clock Calibration */
  3915. #define RCC_CR2_HSI48ON ((uint32_t)0x00010000U) /*!< Internal High Speed 48MHz clock enable */
  3916. #define RCC_CR2_HSI48RDY ((uint32_t)0x00020000U) /*!< Internal High Speed 48MHz clock ready flag */
  3917. #define RCC_CR2_HSI48CAL ((uint32_t)0xFF000000U) /*!< Internal High Speed 48MHz clock Calibration */
  3918. /*****************************************************************************/
  3919. /* */
  3920. /* Real-Time Clock (RTC) */
  3921. /* */
  3922. /*****************************************************************************/
  3923. /*
  3924. * @brief Specific device feature definitions (not present on all devices in the STM32F0 family)
  3925. */
  3926. #define RTC_TAMPER1_SUPPORT /*!< TAMPER 1 feature support */
  3927. #define RTC_TAMPER3_SUPPORT /*!< TAMPER 3 feature support */
  3928. #define RTC_BACKUP_SUPPORT /*!< BACKUP register feature support */
  3929. #define RTC_WAKEUP_SUPPORT /*!< WAKEUP feature support */
  3930. /******************** Bits definition for RTC_TR register ******************/
  3931. #define RTC_TR_PM ((uint32_t)0x00400000U)
  3932. #define RTC_TR_HT ((uint32_t)0x00300000U)
  3933. #define RTC_TR_HT_0 ((uint32_t)0x00100000U)
  3934. #define RTC_TR_HT_1 ((uint32_t)0x00200000U)
  3935. #define RTC_TR_HU ((uint32_t)0x000F0000U)
  3936. #define RTC_TR_HU_0 ((uint32_t)0x00010000U)
  3937. #define RTC_TR_HU_1 ((uint32_t)0x00020000U)
  3938. #define RTC_TR_HU_2 ((uint32_t)0x00040000U)
  3939. #define RTC_TR_HU_3 ((uint32_t)0x00080000U)
  3940. #define RTC_TR_MNT ((uint32_t)0x00007000U)
  3941. #define RTC_TR_MNT_0 ((uint32_t)0x00001000U)
  3942. #define RTC_TR_MNT_1 ((uint32_t)0x00002000U)
  3943. #define RTC_TR_MNT_2 ((uint32_t)0x00004000U)
  3944. #define RTC_TR_MNU ((uint32_t)0x00000F00U)
  3945. #define RTC_TR_MNU_0 ((uint32_t)0x00000100U)
  3946. #define RTC_TR_MNU_1 ((uint32_t)0x00000200U)
  3947. #define RTC_TR_MNU_2 ((uint32_t)0x00000400U)
  3948. #define RTC_TR_MNU_3 ((uint32_t)0x00000800U)
  3949. #define RTC_TR_ST ((uint32_t)0x00000070U)
  3950. #define RTC_TR_ST_0 ((uint32_t)0x00000010U)
  3951. #define RTC_TR_ST_1 ((uint32_t)0x00000020U)
  3952. #define RTC_TR_ST_2 ((uint32_t)0x00000040U)
  3953. #define RTC_TR_SU ((uint32_t)0x0000000FU)
  3954. #define RTC_TR_SU_0 ((uint32_t)0x00000001U)
  3955. #define RTC_TR_SU_1 ((uint32_t)0x00000002U)
  3956. #define RTC_TR_SU_2 ((uint32_t)0x00000004U)
  3957. #define RTC_TR_SU_3 ((uint32_t)0x00000008U)
  3958. /******************** Bits definition for RTC_DR register ******************/
  3959. #define RTC_DR_YT ((uint32_t)0x00F00000U)
  3960. #define RTC_DR_YT_0 ((uint32_t)0x00100000U)
  3961. #define RTC_DR_YT_1 ((uint32_t)0x00200000U)
  3962. #define RTC_DR_YT_2 ((uint32_t)0x00400000U)
  3963. #define RTC_DR_YT_3 ((uint32_t)0x00800000U)
  3964. #define RTC_DR_YU ((uint32_t)0x000F0000U)
  3965. #define RTC_DR_YU_0 ((uint32_t)0x00010000U)
  3966. #define RTC_DR_YU_1 ((uint32_t)0x00020000U)
  3967. #define RTC_DR_YU_2 ((uint32_t)0x00040000U)
  3968. #define RTC_DR_YU_3 ((uint32_t)0x00080000U)
  3969. #define RTC_DR_WDU ((uint32_t)0x0000E000U)
  3970. #define RTC_DR_WDU_0 ((uint32_t)0x00002000U)
  3971. #define RTC_DR_WDU_1 ((uint32_t)0x00004000U)
  3972. #define RTC_DR_WDU_2 ((uint32_t)0x00008000U)
  3973. #define RTC_DR_MT ((uint32_t)0x00001000U)
  3974. #define RTC_DR_MU ((uint32_t)0x00000F00U)
  3975. #define RTC_DR_MU_0 ((uint32_t)0x00000100U)
  3976. #define RTC_DR_MU_1 ((uint32_t)0x00000200U)
  3977. #define RTC_DR_MU_2 ((uint32_t)0x00000400U)
  3978. #define RTC_DR_MU_3 ((uint32_t)0x00000800U)
  3979. #define RTC_DR_DT ((uint32_t)0x00000030U)
  3980. #define RTC_DR_DT_0 ((uint32_t)0x00000010U)
  3981. #define RTC_DR_DT_1 ((uint32_t)0x00000020U)
  3982. #define RTC_DR_DU ((uint32_t)0x0000000FU)
  3983. #define RTC_DR_DU_0 ((uint32_t)0x00000001U)
  3984. #define RTC_DR_DU_1 ((uint32_t)0x00000002U)
  3985. #define RTC_DR_DU_2 ((uint32_t)0x00000004U)
  3986. #define RTC_DR_DU_3 ((uint32_t)0x00000008U)
  3987. /******************** Bits definition for RTC_CR register ******************/
  3988. #define RTC_CR_COE ((uint32_t)0x00800000U)
  3989. #define RTC_CR_OSEL ((uint32_t)0x00600000U)
  3990. #define RTC_CR_OSEL_0 ((uint32_t)0x00200000U)
  3991. #define RTC_CR_OSEL_1 ((uint32_t)0x00400000U)
  3992. #define RTC_CR_POL ((uint32_t)0x00100000U)
  3993. #define RTC_CR_COSEL ((uint32_t)0x00080000U)
  3994. #define RTC_CR_BCK ((uint32_t)0x00040000U)
  3995. #define RTC_CR_SUB1H ((uint32_t)0x00020000U)
  3996. #define RTC_CR_ADD1H ((uint32_t)0x00010000U)
  3997. #define RTC_CR_TSIE ((uint32_t)0x00008000U)
  3998. #define RTC_CR_WUTIE ((uint32_t)0x00004000U)
  3999. #define RTC_CR_ALRAIE ((uint32_t)0x00001000U)
  4000. #define RTC_CR_TSE ((uint32_t)0x00000800U)
  4001. #define RTC_CR_WUTE ((uint32_t)0x00000400U)
  4002. #define RTC_CR_ALRAE ((uint32_t)0x00000100U)
  4003. #define RTC_CR_FMT ((uint32_t)0x00000040U)
  4004. #define RTC_CR_BYPSHAD ((uint32_t)0x00000020U)
  4005. #define RTC_CR_REFCKON ((uint32_t)0x00000010U)
  4006. #define RTC_CR_TSEDGE ((uint32_t)0x00000008U)
  4007. #define RTC_CR_WUCKSEL ((uint32_t)0x00000007U)
  4008. #define RTC_CR_WUCKSEL_0 ((uint32_t)0x00000001U)
  4009. #define RTC_CR_WUCKSEL_1 ((uint32_t)0x00000002U)
  4010. #define RTC_CR_WUCKSEL_2 ((uint32_t)0x00000004U)
  4011. /******************** Bits definition for RTC_ISR register *****************/
  4012. #define RTC_ISR_RECALPF ((uint32_t)0x00010000U)
  4013. #define RTC_ISR_TAMP3F ((uint32_t)0x00008000U)
  4014. #define RTC_ISR_TAMP2F ((uint32_t)0x00004000U)
  4015. #define RTC_ISR_TAMP1F ((uint32_t)0x00002000U)
  4016. #define RTC_ISR_TSOVF ((uint32_t)0x00001000U)
  4017. #define RTC_ISR_TSF ((uint32_t)0x00000800U)
  4018. #define RTC_ISR_WUTF ((uint32_t)0x00000400U)
  4019. #define RTC_ISR_ALRAF ((uint32_t)0x00000100U)
  4020. #define RTC_ISR_INIT ((uint32_t)0x00000080U)
  4021. #define RTC_ISR_INITF ((uint32_t)0x00000040U)
  4022. #define RTC_ISR_RSF ((uint32_t)0x00000020U)
  4023. #define RTC_ISR_INITS ((uint32_t)0x00000010U)
  4024. #define RTC_ISR_SHPF ((uint32_t)0x00000008U)
  4025. #define RTC_ISR_WUTWF ((uint32_t)0x00000004U)
  4026. #define RTC_ISR_ALRAWF ((uint32_t)0x00000001U)
  4027. /******************** Bits definition for RTC_PRER register ****************/
  4028. #define RTC_PRER_PREDIV_A ((uint32_t)0x007F0000U)
  4029. #define RTC_PRER_PREDIV_S ((uint32_t)0x00007FFFU)
  4030. /******************** Bits definition for RTC_WUTR register ****************/
  4031. #define RTC_WUTR_WUT ((uint32_t)0x0000FFFFU)
  4032. /******************** Bits definition for RTC_ALRMAR register **************/
  4033. #define RTC_ALRMAR_MSK4 ((uint32_t)0x80000000U)
  4034. #define RTC_ALRMAR_WDSEL ((uint32_t)0x40000000U)
  4035. #define RTC_ALRMAR_DT ((uint32_t)0x30000000U)
  4036. #define RTC_ALRMAR_DT_0 ((uint32_t)0x10000000U)
  4037. #define RTC_ALRMAR_DT_1 ((uint32_t)0x20000000U)
  4038. #define RTC_ALRMAR_DU ((uint32_t)0x0F000000U)
  4039. #define RTC_ALRMAR_DU_0 ((uint32_t)0x01000000U)
  4040. #define RTC_ALRMAR_DU_1 ((uint32_t)0x02000000U)
  4041. #define RTC_ALRMAR_DU_2 ((uint32_t)0x04000000U)
  4042. #define RTC_ALRMAR_DU_3 ((uint32_t)0x08000000U)
  4043. #define RTC_ALRMAR_MSK3 ((uint32_t)0x00800000U)
  4044. #define RTC_ALRMAR_PM ((uint32_t)0x00400000U)
  4045. #define RTC_ALRMAR_HT ((uint32_t)0x00300000U)
  4046. #define RTC_ALRMAR_HT_0 ((uint32_t)0x00100000U)
  4047. #define RTC_ALRMAR_HT_1 ((uint32_t)0x00200000U)
  4048. #define RTC_ALRMAR_HU ((uint32_t)0x000F0000U)
  4049. #define RTC_ALRMAR_HU_0 ((uint32_t)0x00010000U)
  4050. #define RTC_ALRMAR_HU_1 ((uint32_t)0x00020000U)
  4051. #define RTC_ALRMAR_HU_2 ((uint32_t)0x00040000U)
  4052. #define RTC_ALRMAR_HU_3 ((uint32_t)0x00080000U)
  4053. #define RTC_ALRMAR_MSK2 ((uint32_t)0x00008000U)
  4054. #define RTC_ALRMAR_MNT ((uint32_t)0x00007000U)
  4055. #define RTC_ALRMAR_MNT_0 ((uint32_t)0x00001000U)
  4056. #define RTC_ALRMAR_MNT_1 ((uint32_t)0x00002000U)
  4057. #define RTC_ALRMAR_MNT_2 ((uint32_t)0x00004000U)
  4058. #define RTC_ALRMAR_MNU ((uint32_t)0x00000F00U)
  4059. #define RTC_ALRMAR_MNU_0 ((uint32_t)0x00000100U)
  4060. #define RTC_ALRMAR_MNU_1 ((uint32_t)0x00000200U)
  4061. #define RTC_ALRMAR_MNU_2 ((uint32_t)0x00000400U)
  4062. #define RTC_ALRMAR_MNU_3 ((uint32_t)0x00000800U)
  4063. #define RTC_ALRMAR_MSK1 ((uint32_t)0x00000080U)
  4064. #define RTC_ALRMAR_ST ((uint32_t)0x00000070U)
  4065. #define RTC_ALRMAR_ST_0 ((uint32_t)0x00000010U)
  4066. #define RTC_ALRMAR_ST_1 ((uint32_t)0x00000020U)
  4067. #define RTC_ALRMAR_ST_2 ((uint32_t)0x00000040U)
  4068. #define RTC_ALRMAR_SU ((uint32_t)0x0000000FU)
  4069. #define RTC_ALRMAR_SU_0 ((uint32_t)0x00000001U)
  4070. #define RTC_ALRMAR_SU_1 ((uint32_t)0x00000002U)
  4071. #define RTC_ALRMAR_SU_2 ((uint32_t)0x00000004U)
  4072. #define RTC_ALRMAR_SU_3 ((uint32_t)0x00000008U)
  4073. /******************** Bits definition for RTC_WPR register *****************/
  4074. #define RTC_WPR_KEY ((uint32_t)0x000000FFU)
  4075. /******************** Bits definition for RTC_SSR register *****************/
  4076. #define RTC_SSR_SS ((uint32_t)0x0000FFFFU)
  4077. /******************** Bits definition for RTC_SHIFTR register **************/
  4078. #define RTC_SHIFTR_SUBFS ((uint32_t)0x00007FFFU)
  4079. #define RTC_SHIFTR_ADD1S ((uint32_t)0x80000000U)
  4080. /******************** Bits definition for RTC_TSTR register ****************/
  4081. #define RTC_TSTR_PM ((uint32_t)0x00400000U)
  4082. #define RTC_TSTR_HT ((uint32_t)0x00300000U)
  4083. #define RTC_TSTR_HT_0 ((uint32_t)0x00100000U)
  4084. #define RTC_TSTR_HT_1 ((uint32_t)0x00200000U)
  4085. #define RTC_TSTR_HU ((uint32_t)0x000F0000U)
  4086. #define RTC_TSTR_HU_0 ((uint32_t)0x00010000U)
  4087. #define RTC_TSTR_HU_1 ((uint32_t)0x00020000U)
  4088. #define RTC_TSTR_HU_2 ((uint32_t)0x00040000U)
  4089. #define RTC_TSTR_HU_3 ((uint32_t)0x00080000U)
  4090. #define RTC_TSTR_MNT ((uint32_t)0x00007000U)
  4091. #define RTC_TSTR_MNT_0 ((uint32_t)0x00001000U)
  4092. #define RTC_TSTR_MNT_1 ((uint32_t)0x00002000U)
  4093. #define RTC_TSTR_MNT_2 ((uint32_t)0x00004000U)
  4094. #define RTC_TSTR_MNU ((uint32_t)0x00000F00U)
  4095. #define RTC_TSTR_MNU_0 ((uint32_t)0x00000100U)
  4096. #define RTC_TSTR_MNU_1 ((uint32_t)0x00000200U)
  4097. #define RTC_TSTR_MNU_2 ((uint32_t)0x00000400U)
  4098. #define RTC_TSTR_MNU_3 ((uint32_t)0x00000800U)
  4099. #define RTC_TSTR_ST ((uint32_t)0x00000070U)
  4100. #define RTC_TSTR_ST_0 ((uint32_t)0x00000010U)
  4101. #define RTC_TSTR_ST_1 ((uint32_t)0x00000020U)
  4102. #define RTC_TSTR_ST_2 ((uint32_t)0x00000040U)
  4103. #define RTC_TSTR_SU ((uint32_t)0x0000000FU)
  4104. #define RTC_TSTR_SU_0 ((uint32_t)0x00000001U)
  4105. #define RTC_TSTR_SU_1 ((uint32_t)0x00000002U)
  4106. #define RTC_TSTR_SU_2 ((uint32_t)0x00000004U)
  4107. #define RTC_TSTR_SU_3 ((uint32_t)0x00000008U)
  4108. /******************** Bits definition for RTC_TSDR register ****************/
  4109. #define RTC_TSDR_WDU ((uint32_t)0x0000E000U)
  4110. #define RTC_TSDR_WDU_0 ((uint32_t)0x00002000U)
  4111. #define RTC_TSDR_WDU_1 ((uint32_t)0x00004000U)
  4112. #define RTC_TSDR_WDU_2 ((uint32_t)0x00008000U)
  4113. #define RTC_TSDR_MT ((uint32_t)0x00001000U)
  4114. #define RTC_TSDR_MU ((uint32_t)0x00000F00U)
  4115. #define RTC_TSDR_MU_0 ((uint32_t)0x00000100U)
  4116. #define RTC_TSDR_MU_1 ((uint32_t)0x00000200U)
  4117. #define RTC_TSDR_MU_2 ((uint32_t)0x00000400U)
  4118. #define RTC_TSDR_MU_3 ((uint32_t)0x00000800U)
  4119. #define RTC_TSDR_DT ((uint32_t)0x00000030U)
  4120. #define RTC_TSDR_DT_0 ((uint32_t)0x00000010U)
  4121. #define RTC_TSDR_DT_1 ((uint32_t)0x00000020U)
  4122. #define RTC_TSDR_DU ((uint32_t)0x0000000FU)
  4123. #define RTC_TSDR_DU_0 ((uint32_t)0x00000001U)
  4124. #define RTC_TSDR_DU_1 ((uint32_t)0x00000002U)
  4125. #define RTC_TSDR_DU_2 ((uint32_t)0x00000004U)
  4126. #define RTC_TSDR_DU_3 ((uint32_t)0x00000008U)
  4127. /******************** Bits definition for RTC_TSSSR register ***************/
  4128. #define RTC_TSSSR_SS ((uint32_t)0x0000FFFFU)
  4129. /******************** Bits definition for RTC_CALR register ****************/
  4130. #define RTC_CALR_CALP ((uint32_t)0x00008000U)
  4131. #define RTC_CALR_CALW8 ((uint32_t)0x00004000U)
  4132. #define RTC_CALR_CALW16 ((uint32_t)0x00002000U)
  4133. #define RTC_CALR_CALM ((uint32_t)0x000001FFU)
  4134. #define RTC_CALR_CALM_0 ((uint32_t)0x00000001U)
  4135. #define RTC_CALR_CALM_1 ((uint32_t)0x00000002U)
  4136. #define RTC_CALR_CALM_2 ((uint32_t)0x00000004U)
  4137. #define RTC_CALR_CALM_3 ((uint32_t)0x00000008U)
  4138. #define RTC_CALR_CALM_4 ((uint32_t)0x00000010U)
  4139. #define RTC_CALR_CALM_5 ((uint32_t)0x00000020U)
  4140. #define RTC_CALR_CALM_6 ((uint32_t)0x00000040U)
  4141. #define RTC_CALR_CALM_7 ((uint32_t)0x00000080U)
  4142. #define RTC_CALR_CALM_8 ((uint32_t)0x00000100U)
  4143. /******************** Bits definition for RTC_TAFCR register ***************/
  4144. #define RTC_TAFCR_PC15MODE ((uint32_t)0x00800000U)
  4145. #define RTC_TAFCR_PC15VALUE ((uint32_t)0x00400000U)
  4146. #define RTC_TAFCR_PC14MODE ((uint32_t)0x00200000U)
  4147. #define RTC_TAFCR_PC14VALUE ((uint32_t)0x00100000U)
  4148. #define RTC_TAFCR_PC13MODE ((uint32_t)0x00080000U)
  4149. #define RTC_TAFCR_PC13VALUE ((uint32_t)0x00040000U)
  4150. #define RTC_TAFCR_TAMPPUDIS ((uint32_t)0x00008000U)
  4151. #define RTC_TAFCR_TAMPPRCH ((uint32_t)0x00006000U)
  4152. #define RTC_TAFCR_TAMPPRCH_0 ((uint32_t)0x00002000U)
  4153. #define RTC_TAFCR_TAMPPRCH_1 ((uint32_t)0x00004000U)
  4154. #define RTC_TAFCR_TAMPFLT ((uint32_t)0x00001800U)
  4155. #define RTC_TAFCR_TAMPFLT_0 ((uint32_t)0x00000800U)
  4156. #define RTC_TAFCR_TAMPFLT_1 ((uint32_t)0x00001000U)
  4157. #define RTC_TAFCR_TAMPFREQ ((uint32_t)0x00000700U)
  4158. #define RTC_TAFCR_TAMPFREQ_0 ((uint32_t)0x00000100U)
  4159. #define RTC_TAFCR_TAMPFREQ_1 ((uint32_t)0x00000200U)
  4160. #define RTC_TAFCR_TAMPFREQ_2 ((uint32_t)0x00000400U)
  4161. #define RTC_TAFCR_TAMPTS ((uint32_t)0x00000080U)
  4162. #define RTC_TAFCR_TAMP3TRG ((uint32_t)0x00000040U)
  4163. #define RTC_TAFCR_TAMP3E ((uint32_t)0x00000020U)
  4164. #define RTC_TAFCR_TAMP2TRG ((uint32_t)0x00000010U)
  4165. #define RTC_TAFCR_TAMP2E ((uint32_t)0x00000008U)
  4166. #define RTC_TAFCR_TAMPIE ((uint32_t)0x00000004U)
  4167. #define RTC_TAFCR_TAMP1TRG ((uint32_t)0x00000002U)
  4168. #define RTC_TAFCR_TAMP1E ((uint32_t)0x00000001U)
  4169. /* Reference defines */
  4170. #define RTC_TAFCR_ALARMOUTTYPE RTC_TAFCR_PC13VALUE
  4171. /******************** Bits definition for RTC_ALRMASSR register ************/
  4172. #define RTC_ALRMASSR_MASKSS ((uint32_t)0x0F000000U)
  4173. #define RTC_ALRMASSR_MASKSS_0 ((uint32_t)0x01000000U)
  4174. #define RTC_ALRMASSR_MASKSS_1 ((uint32_t)0x02000000U)
  4175. #define RTC_ALRMASSR_MASKSS_2 ((uint32_t)0x04000000U)
  4176. #define RTC_ALRMASSR_MASKSS_3 ((uint32_t)0x08000000U)
  4177. #define RTC_ALRMASSR_SS ((uint32_t)0x00007FFFU)
  4178. /******************** Bits definition for RTC_BKP0R register ***************/
  4179. #define RTC_BKP0R ((uint32_t)0xFFFFFFFFU)
  4180. /******************** Bits definition for RTC_BKP1R register ***************/
  4181. #define RTC_BKP1R ((uint32_t)0xFFFFFFFFU)
  4182. /******************** Bits definition for RTC_BKP2R register ***************/
  4183. #define RTC_BKP2R ((uint32_t)0xFFFFFFFFU)
  4184. /******************** Bits definition for RTC_BKP3R register ***************/
  4185. #define RTC_BKP3R ((uint32_t)0xFFFFFFFFU)
  4186. /******************** Bits definition for RTC_BKP4R register ***************/
  4187. #define RTC_BKP4R ((uint32_t)0xFFFFFFFFU)
  4188. /******************** Number of backup registers ******************************/
  4189. #define RTC_BKP_NUMBER ((uint32_t)0x00000005U)
  4190. /*****************************************************************************/
  4191. /* */
  4192. /* Serial Peripheral Interface (SPI) */
  4193. /* */
  4194. /*****************************************************************************/
  4195. /******************* Bit definition for SPI_CR1 register *******************/
  4196. #define SPI_CR1_CPHA ((uint32_t)0x00000001U) /*!< Clock Phase */
  4197. #define SPI_CR1_CPOL ((uint32_t)0x00000002U) /*!< Clock Polarity */
  4198. #define SPI_CR1_MSTR ((uint32_t)0x00000004U) /*!< Master Selection */
  4199. #define SPI_CR1_BR ((uint32_t)0x00000038U) /*!< BR[2:0] bits (Baud Rate Control) */
  4200. #define SPI_CR1_BR_0 ((uint32_t)0x00000008U) /*!< Bit 0 */
  4201. #define SPI_CR1_BR_1 ((uint32_t)0x00000010U) /*!< Bit 1 */
  4202. #define SPI_CR1_BR_2 ((uint32_t)0x00000020U) /*!< Bit 2 */
  4203. #define SPI_CR1_SPE ((uint32_t)0x00000040U) /*!< SPI Enable */
  4204. #define SPI_CR1_LSBFIRST ((uint32_t)0x00000080U) /*!< Frame Format */
  4205. #define SPI_CR1_SSI ((uint32_t)0x00000100U) /*!< Internal slave select */
  4206. #define SPI_CR1_SSM ((uint32_t)0x00000200U) /*!< Software slave management */
  4207. #define SPI_CR1_RXONLY ((uint32_t)0x00000400U) /*!< Receive only */
  4208. #define SPI_CR1_CRCL ((uint32_t)0x00000800U) /*!< CRC Length */
  4209. #define SPI_CR1_CRCNEXT ((uint32_t)0x00001000U) /*!< Transmit CRC next */
  4210. #define SPI_CR1_CRCEN ((uint32_t)0x00002000U) /*!< Hardware CRC calculation enable */
  4211. #define SPI_CR1_BIDIOE ((uint32_t)0x00004000U) /*!< Output enable in bidirectional mode */
  4212. #define SPI_CR1_BIDIMODE ((uint32_t)0x00008000U) /*!< Bidirectional data mode enable */
  4213. /******************* Bit definition for SPI_CR2 register *******************/
  4214. #define SPI_CR2_RXDMAEN ((uint32_t)0x00000001U) /*!< Rx Buffer DMA Enable */
  4215. #define SPI_CR2_TXDMAEN ((uint32_t)0x00000002U) /*!< Tx Buffer DMA Enable */
  4216. #define SPI_CR2_SSOE ((uint32_t)0x00000004U) /*!< SS Output Enable */
  4217. #define SPI_CR2_NSSP ((uint32_t)0x00000008U) /*!< NSS pulse management Enable */
  4218. #define SPI_CR2_FRF ((uint32_t)0x00000010U) /*!< Frame Format Enable */
  4219. #define SPI_CR2_ERRIE ((uint32_t)0x00000020U) /*!< Error Interrupt Enable */
  4220. #define SPI_CR2_RXNEIE ((uint32_t)0x00000040U) /*!< RX buffer Not Empty Interrupt Enable */
  4221. #define SPI_CR2_TXEIE ((uint32_t)0x00000080U) /*!< Tx buffer Empty Interrupt Enable */
  4222. #define SPI_CR2_DS ((uint32_t)0x00000F00U) /*!< DS[3:0] Data Size */
  4223. #define SPI_CR2_DS_0 ((uint32_t)0x00000100U) /*!< Bit 0 */
  4224. #define SPI_CR2_DS_1 ((uint32_t)0x00000200U) /*!< Bit 1 */
  4225. #define SPI_CR2_DS_2 ((uint32_t)0x00000400U) /*!< Bit 2 */
  4226. #define SPI_CR2_DS_3 ((uint32_t)0x00000800U) /*!< Bit 3 */
  4227. #define SPI_CR2_FRXTH ((uint32_t)0x00001000U) /*!< FIFO reception Threshold */
  4228. #define SPI_CR2_LDMARX ((uint32_t)0x00002000U) /*!< Last DMA transfer for reception */
  4229. #define SPI_CR2_LDMATX ((uint32_t)0x00004000U) /*!< Last DMA transfer for transmission */
  4230. /******************** Bit definition for SPI_SR register *******************/
  4231. #define SPI_SR_RXNE ((uint32_t)0x00000001U) /*!< Receive buffer Not Empty */
  4232. #define SPI_SR_TXE ((uint32_t)0x00000002U) /*!< Transmit buffer Empty */
  4233. #define SPI_SR_CHSIDE ((uint32_t)0x00000004U) /*!< Channel side */
  4234. #define SPI_SR_UDR ((uint32_t)0x00000008U) /*!< Underrun flag */
  4235. #define SPI_SR_CRCERR ((uint32_t)0x00000010U) /*!< CRC Error flag */
  4236. #define SPI_SR_MODF ((uint32_t)0x00000020U) /*!< Mode fault */
  4237. #define SPI_SR_OVR ((uint32_t)0x00000040U) /*!< Overrun flag */
  4238. #define SPI_SR_BSY ((uint32_t)0x00000080U) /*!< Busy flag */
  4239. #define SPI_SR_FRE ((uint32_t)0x00000100U) /*!< TI frame format error */
  4240. #define SPI_SR_FRLVL ((uint32_t)0x00000600U) /*!< FIFO Reception Level */
  4241. #define SPI_SR_FRLVL_0 ((uint32_t)0x00000200U) /*!< Bit 0 */
  4242. #define SPI_SR_FRLVL_1 ((uint32_t)0x00000400U) /*!< Bit 1 */
  4243. #define SPI_SR_FTLVL ((uint32_t)0x00001800U) /*!< FIFO Transmission Level */
  4244. #define SPI_SR_FTLVL_0 ((uint32_t)0x00000800U) /*!< Bit 0 */
  4245. #define SPI_SR_FTLVL_1 ((uint32_t)0x00001000U) /*!< Bit 1 */
  4246. /******************** Bit definition for SPI_DR register *******************/
  4247. #define SPI_DR_DR ((uint32_t)0xFFFFFFFFU) /*!< Data Register */
  4248. /******************* Bit definition for SPI_CRCPR register *****************/
  4249. #define SPI_CRCPR_CRCPOLY ((uint32_t)0xFFFFFFFFU) /*!< CRC polynomial register */
  4250. /****************** Bit definition for SPI_RXCRCR register *****************/
  4251. #define SPI_RXCRCR_RXCRC ((uint32_t)0xFFFFFFFFU) /*!< Rx CRC Register */
  4252. /****************** Bit definition for SPI_TXCRCR register *****************/
  4253. #define SPI_TXCRCR_TXCRC ((uint32_t)0xFFFFFFFFU) /*!< Tx CRC Register */
  4254. /****************** Bit definition for SPI_I2SCFGR register ****************/
  4255. #define SPI_I2SCFGR_CHLEN ((uint32_t)0x00000001U) /*!<Channel length (number of bits per audio channel) */
  4256. #define SPI_I2SCFGR_DATLEN ((uint32_t)0x00000006U) /*!<DATLEN[1:0] bits (Data length to be transferred) */
  4257. #define SPI_I2SCFGR_DATLEN_0 ((uint32_t)0x00000002U) /*!<Bit 0 */
  4258. #define SPI_I2SCFGR_DATLEN_1 ((uint32_t)0x00000004U) /*!<Bit 1 */
  4259. #define SPI_I2SCFGR_CKPOL ((uint32_t)0x00000008U) /*!<steady state clock polarity */
  4260. #define SPI_I2SCFGR_I2SSTD ((uint32_t)0x00000030U) /*!<I2SSTD[1:0] bits (I2S standard selection) */
  4261. #define SPI_I2SCFGR_I2SSTD_0 ((uint32_t)0x00000010U) /*!<Bit 0 */
  4262. #define SPI_I2SCFGR_I2SSTD_1 ((uint32_t)0x00000020U) /*!<Bit 1 */
  4263. #define SPI_I2SCFGR_PCMSYNC ((uint32_t)0x00000080U) /*!<PCM frame synchronization */
  4264. #define SPI_I2SCFGR_I2SCFG ((uint32_t)0x00000300U) /*!<I2SCFG[1:0] bits (I2S configuration mode) */
  4265. #define SPI_I2SCFGR_I2SCFG_0 ((uint32_t)0x00000100U) /*!<Bit 0 */
  4266. #define SPI_I2SCFGR_I2SCFG_1 ((uint32_t)0x00000200U) /*!<Bit 1 */
  4267. #define SPI_I2SCFGR_I2SE ((uint32_t)0x00000400U) /*!<I2S Enable */
  4268. #define SPI_I2SCFGR_I2SMOD ((uint32_t)0x00000800U) /*!<I2S mode selection */
  4269. /****************** Bit definition for SPI_I2SPR register ******************/
  4270. #define SPI_I2SPR_I2SDIV ((uint32_t)0x000000FFU) /*!<I2S Linear prescaler */
  4271. #define SPI_I2SPR_ODD ((uint32_t)0x00000100U) /*!<Odd factor for the prescaler */
  4272. #define SPI_I2SPR_MCKOE ((uint32_t)0x00000200U) /*!<Master Clock Output Enable */
  4273. /*****************************************************************************/
  4274. /* */
  4275. /* System Configuration (SYSCFG) */
  4276. /* */
  4277. /*****************************************************************************/
  4278. /***************** Bit definition for SYSCFG_CFGR1 register ****************/
  4279. #define SYSCFG_CFGR1_MEM_MODE ((uint32_t)0x00000003U) /*!< SYSCFG_Memory Remap Config */
  4280. #define SYSCFG_CFGR1_MEM_MODE_0 ((uint32_t)0x00000001U) /*!< SYSCFG_Memory Remap Config Bit 0 */
  4281. #define SYSCFG_CFGR1_MEM_MODE_1 ((uint32_t)0x00000002U) /*!< SYSCFG_Memory Remap Config Bit 1 */
  4282. #define SYSCFG_CFGR1_IRDA_ENV_SEL ((uint32_t)0x000000C0U) /*!< IRDA_SEL_ENV config */
  4283. #define SYSCFG_CFGR1_IRDA_ENV_SEL_0 ((uint32_t)0x00000040U) /*!< IRDA_SEL_ENV Bit 0 */
  4284. #define SYSCFG_CFGR1_IRDA_ENV_SEL_1 ((uint32_t)0x00000080U) /*!< IRDA_SEL_ENV Bit 1 */
  4285. #define SYSCFG_CFGR1_I2C_FMP_PB6 ((uint32_t)0x00010000U) /*!< I2C PB6 Fast mode plus */
  4286. #define SYSCFG_CFGR1_I2C_FMP_PB7 ((uint32_t)0x00020000U) /*!< I2C PB7 Fast mode plus */
  4287. #define SYSCFG_CFGR1_I2C_FMP_PB8 ((uint32_t)0x00040000U) /*!< I2C PB8 Fast mode plus */
  4288. #define SYSCFG_CFGR1_I2C_FMP_PB9 ((uint32_t)0x00080000U) /*!< I2C PB9 Fast mode plus */
  4289. #define SYSCFG_CFGR1_I2C_FMP_I2C1 ((uint32_t)0x00100000U) /*!< Enable Fast Mode Plus on PB10, PB11, PF6 and PF7 */
  4290. #define SYSCFG_CFGR1_I2C_FMP_I2C2 ((uint32_t)0x00200000U) /*!< Enable I2C2 Fast mode plus */
  4291. #define SYSCFG_CFGR1_I2C_FMP_PA9 ((uint32_t)0x00400000U) /*!< Enable Fast Mode Plus on PA9 */
  4292. #define SYSCFG_CFGR1_I2C_FMP_PA10 ((uint32_t)0x00800000U) /*!< Enable Fast Mode Plus on PA10 */
  4293. /***************** Bit definition for SYSCFG_EXTICR1 register **************/
  4294. #define SYSCFG_EXTICR1_EXTI0 ((uint32_t)0x0000000FU) /*!< EXTI 0 configuration */
  4295. #define SYSCFG_EXTICR1_EXTI1 ((uint32_t)0x000000F0U) /*!< EXTI 1 configuration */
  4296. #define SYSCFG_EXTICR1_EXTI2 ((uint32_t)0x00000F00U) /*!< EXTI 2 configuration */
  4297. #define SYSCFG_EXTICR1_EXTI3 ((uint32_t)0x0000F000U) /*!< EXTI 3 configuration */
  4298. /**
  4299. * @brief EXTI0 configuration
  4300. */
  4301. #define SYSCFG_EXTICR1_EXTI0_PA ((uint32_t)0x00000000U) /*!< PA[0] pin */
  4302. #define SYSCFG_EXTICR1_EXTI0_PB ((uint32_t)0x00000001U) /*!< PB[0] pin */
  4303. #define SYSCFG_EXTICR1_EXTI0_PC ((uint32_t)0x00000002U) /*!< PC[0] pin */
  4304. #define SYSCFG_EXTICR1_EXTI0_PD ((uint32_t)0x00000003U) /*!< PD[0] pin */
  4305. #define SYSCFG_EXTICR1_EXTI0_PE ((uint32_t)0x00000004U) /*!< PE[0] pin */
  4306. #define SYSCFG_EXTICR1_EXTI0_PF ((uint32_t)0x00000005U) /*!< PF[0] pin */
  4307. /**
  4308. * @brief EXTI1 configuration
  4309. */
  4310. #define SYSCFG_EXTICR1_EXTI1_PA ((uint32_t)0x00000000U) /*!< PA[1] pin */
  4311. #define SYSCFG_EXTICR1_EXTI1_PB ((uint32_t)0x00000010U) /*!< PB[1] pin */
  4312. #define SYSCFG_EXTICR1_EXTI1_PC ((uint32_t)0x00000020U) /*!< PC[1] pin */
  4313. #define SYSCFG_EXTICR1_EXTI1_PD ((uint32_t)0x00000030U) /*!< PD[1] pin */
  4314. #define SYSCFG_EXTICR1_EXTI1_PE ((uint32_t)0x00000040U) /*!< PE[1] pin */
  4315. #define SYSCFG_EXTICR1_EXTI1_PF ((uint32_t)0x00000050U) /*!< PF[1] pin */
  4316. /**
  4317. * @brief EXTI2 configuration
  4318. */
  4319. #define SYSCFG_EXTICR1_EXTI2_PA ((uint32_t)0x00000000U) /*!< PA[2] pin */
  4320. #define SYSCFG_EXTICR1_EXTI2_PB ((uint32_t)0x00000100U) /*!< PB[2] pin */
  4321. #define SYSCFG_EXTICR1_EXTI2_PC ((uint32_t)0x00000200U) /*!< PC[2] pin */
  4322. #define SYSCFG_EXTICR1_EXTI2_PD ((uint32_t)0x00000300U) /*!< PD[2] pin */
  4323. #define SYSCFG_EXTICR1_EXTI2_PE ((uint32_t)0x00000400U) /*!< PE[2] pin */
  4324. #define SYSCFG_EXTICR1_EXTI2_PF ((uint32_t)0x00000500U) /*!< PF[2] pin */
  4325. /**
  4326. * @brief EXTI3 configuration
  4327. */
  4328. #define SYSCFG_EXTICR1_EXTI3_PA ((uint32_t)0x00000000U) /*!< PA[3] pin */
  4329. #define SYSCFG_EXTICR1_EXTI3_PB ((uint32_t)0x00001000U) /*!< PB[3] pin */
  4330. #define SYSCFG_EXTICR1_EXTI3_PC ((uint32_t)0x00002000U) /*!< PC[3] pin */
  4331. #define SYSCFG_EXTICR1_EXTI3_PD ((uint32_t)0x00003000U) /*!< PD[3] pin */
  4332. #define SYSCFG_EXTICR1_EXTI3_PE ((uint32_t)0x00004000U) /*!< PE[3] pin */
  4333. #define SYSCFG_EXTICR1_EXTI3_PF ((uint32_t)0x00005000U) /*!< PF[3] pin */
  4334. /***************** Bit definition for SYSCFG_EXTICR2 register **************/
  4335. #define SYSCFG_EXTICR2_EXTI4 ((uint32_t)0x0000000FU) /*!< EXTI 4 configuration */
  4336. #define SYSCFG_EXTICR2_EXTI5 ((uint32_t)0x000000F0U) /*!< EXTI 5 configuration */
  4337. #define SYSCFG_EXTICR2_EXTI6 ((uint32_t)0x00000F00U) /*!< EXTI 6 configuration */
  4338. #define SYSCFG_EXTICR2_EXTI7 ((uint32_t)0x0000F000U) /*!< EXTI 7 configuration */
  4339. /**
  4340. * @brief EXTI4 configuration
  4341. */
  4342. #define SYSCFG_EXTICR2_EXTI4_PA ((uint32_t)0x00000000U) /*!< PA[4] pin */
  4343. #define SYSCFG_EXTICR2_EXTI4_PB ((uint32_t)0x00000001U) /*!< PB[4] pin */
  4344. #define SYSCFG_EXTICR2_EXTI4_PC ((uint32_t)0x00000002U) /*!< PC[4] pin */
  4345. #define SYSCFG_EXTICR2_EXTI4_PD ((uint32_t)0x00000003U) /*!< PD[4] pin */
  4346. #define SYSCFG_EXTICR2_EXTI4_PE ((uint32_t)0x00000004U) /*!< PE[4] pin */
  4347. #define SYSCFG_EXTICR2_EXTI4_PF ((uint32_t)0x00000005U) /*!< PF[4] pin */
  4348. /**
  4349. * @brief EXTI5 configuration
  4350. */
  4351. #define SYSCFG_EXTICR2_EXTI5_PA ((uint32_t)0x00000000U) /*!< PA[5] pin */
  4352. #define SYSCFG_EXTICR2_EXTI5_PB ((uint32_t)0x00000010U) /*!< PB[5] pin */
  4353. #define SYSCFG_EXTICR2_EXTI5_PC ((uint32_t)0x00000020U) /*!< PC[5] pin */
  4354. #define SYSCFG_EXTICR2_EXTI5_PD ((uint32_t)0x00000030U) /*!< PD[5] pin */
  4355. #define SYSCFG_EXTICR2_EXTI5_PE ((uint32_t)0x00000040U) /*!< PE[5] pin */
  4356. #define SYSCFG_EXTICR2_EXTI5_PF ((uint32_t)0x00000050U) /*!< PF[5] pin */
  4357. /**
  4358. * @brief EXTI6 configuration
  4359. */
  4360. #define SYSCFG_EXTICR2_EXTI6_PA ((uint32_t)0x00000000U) /*!< PA[6] pin */
  4361. #define SYSCFG_EXTICR2_EXTI6_PB ((uint32_t)0x00000100U) /*!< PB[6] pin */
  4362. #define SYSCFG_EXTICR2_EXTI6_PC ((uint32_t)0x00000200U) /*!< PC[6] pin */
  4363. #define SYSCFG_EXTICR2_EXTI6_PD ((uint32_t)0x00000300U) /*!< PD[6] pin */
  4364. #define SYSCFG_EXTICR2_EXTI6_PE ((uint32_t)0x00000400U) /*!< PE[6] pin */
  4365. #define SYSCFG_EXTICR2_EXTI6_PF ((uint32_t)0x00000500U) /*!< PF[6] pin */
  4366. /**
  4367. * @brief EXTI7 configuration
  4368. */
  4369. #define SYSCFG_EXTICR2_EXTI7_PA ((uint32_t)0x00000000U) /*!< PA[7] pin */
  4370. #define SYSCFG_EXTICR2_EXTI7_PB ((uint32_t)0x00001000U) /*!< PB[7] pin */
  4371. #define SYSCFG_EXTICR2_EXTI7_PC ((uint32_t)0x00002000U) /*!< PC[7] pin */
  4372. #define SYSCFG_EXTICR2_EXTI7_PD ((uint32_t)0x00003000U) /*!< PD[7] pin */
  4373. #define SYSCFG_EXTICR2_EXTI7_PE ((uint32_t)0x00004000U) /*!< PE[7] pin */
  4374. #define SYSCFG_EXTICR2_EXTI7_PF ((uint32_t)0x00005000U) /*!< PF[7] pin */
  4375. /***************** Bit definition for SYSCFG_EXTICR3 register **************/
  4376. #define SYSCFG_EXTICR3_EXTI8 ((uint32_t)0x0000000FU) /*!< EXTI 8 configuration */
  4377. #define SYSCFG_EXTICR3_EXTI9 ((uint32_t)0x000000F0U) /*!< EXTI 9 configuration */
  4378. #define SYSCFG_EXTICR3_EXTI10 ((uint32_t)0x00000F00U) /*!< EXTI 10 configuration */
  4379. #define SYSCFG_EXTICR3_EXTI11 ((uint32_t)0x0000F000U) /*!< EXTI 11 configuration */
  4380. /**
  4381. * @brief EXTI8 configuration
  4382. */
  4383. #define SYSCFG_EXTICR3_EXTI8_PA ((uint32_t)0x00000000U) /*!< PA[8] pin */
  4384. #define SYSCFG_EXTICR3_EXTI8_PB ((uint32_t)0x00000001U) /*!< PB[8] pin */
  4385. #define SYSCFG_EXTICR3_EXTI8_PC ((uint32_t)0x00000002U) /*!< PC[8] pin */
  4386. #define SYSCFG_EXTICR3_EXTI8_PD ((uint32_t)0x00000003U) /*!< PD[8] pin */
  4387. #define SYSCFG_EXTICR3_EXTI8_PE ((uint32_t)0x00000004U) /*!< PE[8] pin */
  4388. /**
  4389. * @brief EXTI9 configuration
  4390. */
  4391. #define SYSCFG_EXTICR3_EXTI9_PA ((uint32_t)0x00000000U) /*!< PA[9] pin */
  4392. #define SYSCFG_EXTICR3_EXTI9_PB ((uint32_t)0x00000010U) /*!< PB[9] pin */
  4393. #define SYSCFG_EXTICR3_EXTI9_PC ((uint32_t)0x00000020U) /*!< PC[9] pin */
  4394. #define SYSCFG_EXTICR3_EXTI9_PD ((uint32_t)0x00000030U) /*!< PD[9] pin */
  4395. #define SYSCFG_EXTICR3_EXTI9_PE ((uint32_t)0x00000040U) /*!< PE[9] pin */
  4396. #define SYSCFG_EXTICR3_EXTI9_PF ((uint32_t)0x00000050U) /*!< PF[9] pin */
  4397. /**
  4398. * @brief EXTI10 configuration
  4399. */
  4400. #define SYSCFG_EXTICR3_EXTI10_PA ((uint32_t)0x00000000U) /*!< PA[10] pin */
  4401. #define SYSCFG_EXTICR3_EXTI10_PB ((uint32_t)0x00000100U) /*!< PB[10] pin */
  4402. #define SYSCFG_EXTICR3_EXTI10_PC ((uint32_t)0x00000200U) /*!< PC[10] pin */
  4403. #define SYSCFG_EXTICR3_EXTI10_PD ((uint32_t)0x00000300U) /*!< PD[10] pin */
  4404. #define SYSCFG_EXTICR3_EXTI10_PE ((uint32_t)0x00000400U) /*!< PE[10] pin */
  4405. #define SYSCFG_EXTICR3_EXTI10_PF ((uint32_t)0x00000500U) /*!< PF[10] pin */
  4406. /**
  4407. * @brief EXTI11 configuration
  4408. */
  4409. #define SYSCFG_EXTICR3_EXTI11_PA ((uint32_t)0x00000000U) /*!< PA[11] pin */
  4410. #define SYSCFG_EXTICR3_EXTI11_PB ((uint32_t)0x00001000U) /*!< PB[11] pin */
  4411. #define SYSCFG_EXTICR3_EXTI11_PC ((uint32_t)0x00002000U) /*!< PC[11] pin */
  4412. #define SYSCFG_EXTICR3_EXTI11_PD ((uint32_t)0x00003000U) /*!< PD[11] pin */
  4413. #define SYSCFG_EXTICR3_EXTI11_PE ((uint32_t)0x00004000U) /*!< PE[11] pin */
  4414. /***************** Bit definition for SYSCFG_EXTICR4 register **************/
  4415. #define SYSCFG_EXTICR4_EXTI12 ((uint32_t)0x0000000FU) /*!< EXTI 12 configuration */
  4416. #define SYSCFG_EXTICR4_EXTI13 ((uint32_t)0x000000F0U) /*!< EXTI 13 configuration */
  4417. #define SYSCFG_EXTICR4_EXTI14 ((uint32_t)0x00000F00U) /*!< EXTI 14 configuration */
  4418. #define SYSCFG_EXTICR4_EXTI15 ((uint32_t)0x0000F000U) /*!< EXTI 15 configuration */
  4419. /**
  4420. * @brief EXTI12 configuration
  4421. */
  4422. #define SYSCFG_EXTICR4_EXTI12_PA ((uint32_t)0x00000000U) /*!< PA[12] pin */
  4423. #define SYSCFG_EXTICR4_EXTI12_PB ((uint32_t)0x00000001U) /*!< PB[12] pin */
  4424. #define SYSCFG_EXTICR4_EXTI12_PC ((uint32_t)0x00000002U) /*!< PC[12] pin */
  4425. #define SYSCFG_EXTICR4_EXTI12_PD ((uint32_t)0x00000003U) /*!< PD[12] pin */
  4426. #define SYSCFG_EXTICR4_EXTI12_PE ((uint32_t)0x00000004U) /*!< PE[12] pin */
  4427. /**
  4428. * @brief EXTI13 configuration
  4429. */
  4430. #define SYSCFG_EXTICR4_EXTI13_PA ((uint32_t)0x00000000U) /*!< PA[13] pin */
  4431. #define SYSCFG_EXTICR4_EXTI13_PB ((uint32_t)0x00000010U) /*!< PB[13] pin */
  4432. #define SYSCFG_EXTICR4_EXTI13_PC ((uint32_t)0x00000020U) /*!< PC[13] pin */
  4433. #define SYSCFG_EXTICR4_EXTI13_PD ((uint32_t)0x00000030U) /*!< PD[13] pin */
  4434. #define SYSCFG_EXTICR4_EXTI13_PE ((uint32_t)0x00000040U) /*!< PE[13] pin */
  4435. /**
  4436. * @brief EXTI14 configuration
  4437. */
  4438. #define SYSCFG_EXTICR4_EXTI14_PA ((uint32_t)0x00000000U) /*!< PA[14] pin */
  4439. #define SYSCFG_EXTICR4_EXTI14_PB ((uint32_t)0x00000100U) /*!< PB[14] pin */
  4440. #define SYSCFG_EXTICR4_EXTI14_PC ((uint32_t)0x00000200U) /*!< PC[14] pin */
  4441. #define SYSCFG_EXTICR4_EXTI14_PD ((uint32_t)0x00000300U) /*!< PD[14] pin */
  4442. #define SYSCFG_EXTICR4_EXTI14_PE ((uint32_t)0x00000400U) /*!< PE[14] pin */
  4443. /**
  4444. * @brief EXTI15 configuration
  4445. */
  4446. #define SYSCFG_EXTICR4_EXTI15_PA ((uint32_t)0x00000000U) /*!< PA[15] pin */
  4447. #define SYSCFG_EXTICR4_EXTI15_PB ((uint32_t)0x00001000U) /*!< PB[15] pin */
  4448. #define SYSCFG_EXTICR4_EXTI15_PC ((uint32_t)0x00002000U) /*!< PC[15] pin */
  4449. #define SYSCFG_EXTICR4_EXTI15_PD ((uint32_t)0x00003000U) /*!< PD[15] pin */
  4450. #define SYSCFG_EXTICR4_EXTI15_PE ((uint32_t)0x00004000U) /*!< PE[15] pin */
  4451. /***************** Bit definition for SYSCFG_CFGR2 register ****************/
  4452. #define SYSCFG_CFGR2_LOCKUP_LOCK ((uint32_t)0x00000001U) /*!< Enables and locks the LOCKUP (Hardfault) output of CortexM0 with Break Input of TIMER1 */
  4453. #define SYSCFG_CFGR2_SRAM_PARITY_LOCK ((uint32_t)0x00000002U) /*!< Enables and locks the SRAM_PARITY error signal with Break Input of TIMER1 */
  4454. #define SYSCFG_CFGR2_PVD_LOCK ((uint32_t)0x00000004U) /*!< Enables and locks the PVD connection with Timer1 Break Input and also the PVD_EN and PVDSEL[2:0] bits of the Power Control Interface */
  4455. #define SYSCFG_CFGR2_SRAM_PEF ((uint32_t)0x00000100U) /*!< SRAM Parity error flag */
  4456. #define SYSCFG_CFGR2_SRAM_PE SYSCFG_CFGR2_SRAM_PEF /*!< SRAM Parity error flag (define maintained for legacy purpose) */
  4457. /***************** Bit definition for SYSCFG_xxx ISR Wrapper register ****************/
  4458. #define SYSCFG_ITLINE0_SR_EWDG ((uint32_t)0x00000001U) /*!< EWDG interrupt */
  4459. #define SYSCFG_ITLINE1_SR_PVDOUT ((uint32_t)0x00000001U) /*!< Power voltage detection -> exti[31] Interrupt */
  4460. #define SYSCFG_ITLINE1_SR_VDDIO2 ((uint32_t)0x00000002U) /*!< VDDIO2 -> exti[16] Interrupt */
  4461. #define SYSCFG_ITLINE2_SR_RTC_ALRA ((uint32_t)0x00000001U) /*!< RTC Alarm -> exti[17] interrupt .... */
  4462. #define SYSCFG_ITLINE2_SR_RTC_TSTAMP ((uint32_t)0x00000002U) /*!< RTC Time Stamp -> exti[19] interrupt */
  4463. #define SYSCFG_ITLINE2_SR_RTC_WAKEUP ((uint32_t)0x00000004U) /*!< RTC WAKEUP -> exti[20] Interrupt */
  4464. #define SYSCFG_ITLINE3_SR_FLASH_ITF ((uint32_t)0x00000001U) /*!< Flash ITF Interrupt */
  4465. #define SYSCFG_ITLINE4_SR_CRS ((uint32_t)0x00000001U) /*!< CRS interrupt */
  4466. #define SYSCFG_ITLINE4_SR_CLK_CTRL ((uint32_t)0x00000002U) /*!< CLK CTRL interrupt */
  4467. #define SYSCFG_ITLINE5_SR_EXTI0 ((uint32_t)0x00000001U) /*!< External Interrupt 0 */
  4468. #define SYSCFG_ITLINE5_SR_EXTI1 ((uint32_t)0x00000002U) /*!< External Interrupt 1 */
  4469. #define SYSCFG_ITLINE6_SR_EXTI2 ((uint32_t)0x00000001U) /*!< External Interrupt 2 */
  4470. #define SYSCFG_ITLINE6_SR_EXTI3 ((uint32_t)0x00000002U) /*!< External Interrupt 3 */
  4471. #define SYSCFG_ITLINE7_SR_EXTI4 ((uint32_t)0x00000001U) /*!< External Interrupt 15 to 4 */
  4472. #define SYSCFG_ITLINE7_SR_EXTI5 ((uint32_t)0x00000002U) /*!< External Interrupt 15 to 4 */
  4473. #define SYSCFG_ITLINE7_SR_EXTI6 ((uint32_t)0x00000004U) /*!< External Interrupt 15 to 4 */
  4474. #define SYSCFG_ITLINE7_SR_EXTI7 ((uint32_t)0x00000008U) /*!< External Interrupt 15 to 4 */
  4475. #define SYSCFG_ITLINE7_SR_EXTI8 ((uint32_t)0x00000010U) /*!< External Interrupt 15 to 4 */
  4476. #define SYSCFG_ITLINE7_SR_EXTI9 ((uint32_t)0x00000020U) /*!< External Interrupt 15 to 4 */
  4477. #define SYSCFG_ITLINE7_SR_EXTI10 ((uint32_t)0x00000040U) /*!< External Interrupt 15 to 4 */
  4478. #define SYSCFG_ITLINE7_SR_EXTI11 ((uint32_t)0x00000080U) /*!< External Interrupt 15 to 4 */
  4479. #define SYSCFG_ITLINE7_SR_EXTI12 ((uint32_t)0x00000100U) /*!< External Interrupt 15 to 4 */
  4480. #define SYSCFG_ITLINE7_SR_EXTI13 ((uint32_t)0x00000200U) /*!< External Interrupt 15 to 4 */
  4481. #define SYSCFG_ITLINE7_SR_EXTI14 ((uint32_t)0x00000400U) /*!< External Interrupt 15 to 4 */
  4482. #define SYSCFG_ITLINE7_SR_EXTI15 ((uint32_t)0x00000800U) /*!< External Interrupt 15 to 4 */
  4483. #define SYSCFG_ITLINE8_SR_TSC_EOA ((uint32_t)0x00000001U) /*!< Touch control EOA Interrupt */
  4484. #define SYSCFG_ITLINE8_SR_TSC_MCE ((uint32_t)0x00000002U) /*!< Touch control MCE Interrupt */
  4485. #define SYSCFG_ITLINE9_SR_DMA1_CH1 ((uint32_t)0x00000001U) /*!< DMA1 Channel 1 Interrupt */
  4486. #define SYSCFG_ITLINE10_SR_DMA1_CH2 ((uint32_t)0x00000001U) /*!< DMA1 Channel 2 Interrupt */
  4487. #define SYSCFG_ITLINE10_SR_DMA1_CH3 ((uint32_t)0x00000002U) /*!< DMA2 Channel 3 Interrupt */
  4488. #define SYSCFG_ITLINE10_SR_DMA2_CH1 ((uint32_t)0x00000004U) /*!< DMA2 Channel 1 Interrupt */
  4489. #define SYSCFG_ITLINE10_SR_DMA2_CH2 ((uint32_t)0x00000008U) /*!< DMA2 Channel 2 Interrupt */
  4490. #define SYSCFG_ITLINE11_SR_DMA1_CH4 ((uint32_t)0x00000001U) /*!< DMA1 Channel 4 Interrupt */
  4491. #define SYSCFG_ITLINE11_SR_DMA1_CH5 ((uint32_t)0x00000002U) /*!< DMA1 Channel 5 Interrupt */
  4492. #define SYSCFG_ITLINE11_SR_DMA1_CH6 ((uint32_t)0x00000004U) /*!< DMA1 Channel 6 Interrupt */
  4493. #define SYSCFG_ITLINE11_SR_DMA1_CH7 ((uint32_t)0x00000008U) /*!< DMA1 Channel 7 Interrupt */
  4494. #define SYSCFG_ITLINE11_SR_DMA2_CH3 ((uint32_t)0x00000010U) /*!< DMA2 Channel 3 Interrupt */
  4495. #define SYSCFG_ITLINE11_SR_DMA2_CH4 ((uint32_t)0x00000020U) /*!< DMA2 Channel 4 Interrupt */
  4496. #define SYSCFG_ITLINE11_SR_DMA2_CH5 ((uint32_t)0x00000040U) /*!< DMA2 Channel 5 Interrupt */
  4497. #define SYSCFG_ITLINE12_SR_ADC ((uint32_t)0x00000001U) /*!< ADC Interrupt */
  4498. #define SYSCFG_ITLINE12_SR_COMP1 ((uint32_t)0x00000002U) /*!< COMP1 Interrupt -> exti[21] */
  4499. #define SYSCFG_ITLINE12_SR_COMP2 ((uint32_t)0x00000004U) /*!< COMP2 Interrupt -> exti[22] */
  4500. #define SYSCFG_ITLINE13_SR_TIM1_BRK ((uint32_t)0x00000001U) /*!< TIM1 BRK Interrupt */
  4501. #define SYSCFG_ITLINE13_SR_TIM1_UPD ((uint32_t)0x00000002U) /*!< TIM1 UPD Interrupt */
  4502. #define SYSCFG_ITLINE13_SR_TIM1_TRG ((uint32_t)0x00000004U) /*!< TIM1 TRG Interrupt */
  4503. #define SYSCFG_ITLINE13_SR_TIM1_CCU ((uint32_t)0x00000008U) /*!< TIM1 CCU Interrupt */
  4504. #define SYSCFG_ITLINE14_SR_TIM1_CC ((uint32_t)0x00000001U) /*!< TIM1 CC Interrupt */
  4505. #define SYSCFG_ITLINE15_SR_TIM2_GLB ((uint32_t)0x00000001U) /*!< TIM2 GLB Interrupt */
  4506. #define SYSCFG_ITLINE16_SR_TIM3_GLB ((uint32_t)0x00000001U) /*!< TIM3 GLB Interrupt */
  4507. #define SYSCFG_ITLINE17_SR_DAC ((uint32_t)0x00000001U) /*!< DAC Interrupt */
  4508. #define SYSCFG_ITLINE17_SR_TIM6_GLB ((uint32_t)0x00000002U) /*!< TIM6 GLB Interrupt */
  4509. #define SYSCFG_ITLINE18_SR_TIM7_GLB ((uint32_t)0x00000001U) /*!< TIM7 GLB Interrupt */
  4510. #define SYSCFG_ITLINE19_SR_TIM14_GLB ((uint32_t)0x00000001U) /*!< TIM14 GLB Interrupt */
  4511. #define SYSCFG_ITLINE20_SR_TIM15_GLB ((uint32_t)0x00000001U) /*!< TIM15 GLB Interrupt */
  4512. #define SYSCFG_ITLINE21_SR_TIM16_GLB ((uint32_t)0x00000001U) /*!< TIM16 GLB Interrupt */
  4513. #define SYSCFG_ITLINE22_SR_TIM17_GLB ((uint32_t)0x00000001U) /*!< TIM17 GLB Interrupt */
  4514. #define SYSCFG_ITLINE23_SR_I2C1_GLB ((uint32_t)0x00000001U) /*!< I2C1 GLB Interrupt -> exti[23] */
  4515. #define SYSCFG_ITLINE24_SR_I2C2_GLB ((uint32_t)0x00000001U) /*!< I2C2 GLB Interrupt */
  4516. #define SYSCFG_ITLINE25_SR_SPI1 ((uint32_t)0x00000001U) /*!< SPI1 Interrupt */
  4517. #define SYSCFG_ITLINE26_SR_SPI2 ((uint32_t)0x00000001U) /*!< SPI2 Interrupt */
  4518. #define SYSCFG_ITLINE27_SR_USART1_GLB ((uint32_t)0x00000001U) /*!< USART1 GLB Interrupt -> exti[25] */
  4519. #define SYSCFG_ITLINE28_SR_USART2_GLB ((uint32_t)0x00000001U) /*!< USART2 GLB Interrupt -> exti[26] */
  4520. #define SYSCFG_ITLINE29_SR_USART3_GLB ((uint32_t)0x00000001U) /*!< USART3 GLB Interrupt -> exti[28] */
  4521. #define SYSCFG_ITLINE29_SR_USART4_GLB ((uint32_t)0x00000002U) /*!< USART4 GLB Interrupt */
  4522. #define SYSCFG_ITLINE29_SR_USART5_GLB ((uint32_t)0x00000004U) /*!< USART5 GLB Interrupt */
  4523. #define SYSCFG_ITLINE29_SR_USART6_GLB ((uint32_t)0x00000008U) /*!< USART6 GLB Interrupt */
  4524. #define SYSCFG_ITLINE29_SR_USART7_GLB ((uint32_t)0x00000010U) /*!< USART7 GLB Interrupt */
  4525. #define SYSCFG_ITLINE29_SR_USART8_GLB ((uint32_t)0x00000020U) /*!< USART8 GLB Interrupt */
  4526. #define SYSCFG_ITLINE30_SR_CAN ((uint32_t)0x00000001U) /*!< CAN Interrupt */
  4527. #define SYSCFG_ITLINE30_SR_CEC ((uint32_t)0x00000002U) /*!< CEC Interrupt */
  4528. /*****************************************************************************/
  4529. /* */
  4530. /* Timers (TIM) */
  4531. /* */
  4532. /*****************************************************************************/
  4533. /******************* Bit definition for TIM_CR1 register *******************/
  4534. #define TIM_CR1_CEN ((uint32_t)0x00000001U) /*!<Counter enable */
  4535. #define TIM_CR1_UDIS ((uint32_t)0x00000002U) /*!<Update disable */
  4536. #define TIM_CR1_URS ((uint32_t)0x00000004U) /*!<Update request source */
  4537. #define TIM_CR1_OPM ((uint32_t)0x00000008U) /*!<One pulse mode */
  4538. #define TIM_CR1_DIR ((uint32_t)0x00000010U) /*!<Direction */
  4539. #define TIM_CR1_CMS ((uint32_t)0x00000060U) /*!<CMS[1:0] bits (Center-aligned mode selection) */
  4540. #define TIM_CR1_CMS_0 ((uint32_t)0x00000020U) /*!<Bit 0 */
  4541. #define TIM_CR1_CMS_1 ((uint32_t)0x00000040U) /*!<Bit 1 */
  4542. #define TIM_CR1_ARPE ((uint32_t)0x00000080U) /*!<Auto-reload preload enable */
  4543. #define TIM_CR1_CKD ((uint32_t)0x00000300U) /*!<CKD[1:0] bits (clock division) */
  4544. #define TIM_CR1_CKD_0 ((uint32_t)0x00000100U) /*!<Bit 0 */
  4545. #define TIM_CR1_CKD_1 ((uint32_t)0x00000200U) /*!<Bit 1 */
  4546. /******************* Bit definition for TIM_CR2 register *******************/
  4547. #define TIM_CR2_CCPC ((uint32_t)0x00000001U) /*!<Capture/Compare Preloaded Control */
  4548. #define TIM_CR2_CCUS ((uint32_t)0x00000004U) /*!<Capture/Compare Control Update Selection */
  4549. #define TIM_CR2_CCDS ((uint32_t)0x00000008U) /*!<Capture/Compare DMA Selection */
  4550. #define TIM_CR2_MMS ((uint32_t)0x00000070U) /*!<MMS[2:0] bits (Master Mode Selection) */
  4551. #define TIM_CR2_MMS_0 ((uint32_t)0x00000010U) /*!<Bit 0 */
  4552. #define TIM_CR2_MMS_1 ((uint32_t)0x00000020U) /*!<Bit 1 */
  4553. #define TIM_CR2_MMS_2 ((uint32_t)0x00000040U) /*!<Bit 2 */
  4554. #define TIM_CR2_TI1S ((uint32_t)0x00000080U) /*!<TI1 Selection */
  4555. #define TIM_CR2_OIS1 ((uint32_t)0x00000100U) /*!<Output Idle state 1 (OC1 output) */
  4556. #define TIM_CR2_OIS1N ((uint32_t)0x00000200U) /*!<Output Idle state 1 (OC1N output) */
  4557. #define TIM_CR2_OIS2 ((uint32_t)0x00000400U) /*!<Output Idle state 2 (OC2 output) */
  4558. #define TIM_CR2_OIS2N ((uint32_t)0x00000800U) /*!<Output Idle state 2 (OC2N output) */
  4559. #define TIM_CR2_OIS3 ((uint32_t)0x00001000U) /*!<Output Idle state 3 (OC3 output) */
  4560. #define TIM_CR2_OIS3N ((uint32_t)0x00002000U) /*!<Output Idle state 3 (OC3N output) */
  4561. #define TIM_CR2_OIS4 ((uint32_t)0x00004000U) /*!<Output Idle state 4 (OC4 output) */
  4562. /******************* Bit definition for TIM_SMCR register ******************/
  4563. #define TIM_SMCR_SMS ((uint32_t)0x00000007U) /*!<SMS[2:0] bits (Slave mode selection) */
  4564. #define TIM_SMCR_SMS_0 ((uint32_t)0x00000001U) /*!<Bit 0 */
  4565. #define TIM_SMCR_SMS_1 ((uint32_t)0x00000002U) /*!<Bit 1 */
  4566. #define TIM_SMCR_SMS_2 ((uint32_t)0x00000004U) /*!<Bit 2 */
  4567. #define TIM_SMCR_OCCS ((uint32_t)0x00000008U) /*!< OCREF clear selection */
  4568. #define TIM_SMCR_TS ((uint32_t)0x00000070U) /*!<TS[2:0] bits (Trigger selection) */
  4569. #define TIM_SMCR_TS_0 ((uint32_t)0x00000010U) /*!<Bit 0 */
  4570. #define TIM_SMCR_TS_1 ((uint32_t)0x00000020U) /*!<Bit 1 */
  4571. #define TIM_SMCR_TS_2 ((uint32_t)0x00000040U) /*!<Bit 2 */
  4572. #define TIM_SMCR_MSM ((uint32_t)0x00000080U) /*!<Master/slave mode */
  4573. #define TIM_SMCR_ETF ((uint32_t)0x00000F00U) /*!<ETF[3:0] bits (External trigger filter) */
  4574. #define TIM_SMCR_ETF_0 ((uint32_t)0x00000100U) /*!<Bit 0 */
  4575. #define TIM_SMCR_ETF_1 ((uint32_t)0x00000200U) /*!<Bit 1 */
  4576. #define TIM_SMCR_ETF_2 ((uint32_t)0x00000400U) /*!<Bit 2 */
  4577. #define TIM_SMCR_ETF_3 ((uint32_t)0x00000800U) /*!<Bit 3 */
  4578. #define TIM_SMCR_ETPS ((uint32_t)0x00003000U) /*!<ETPS[1:0] bits (External trigger prescaler) */
  4579. #define TIM_SMCR_ETPS_0 ((uint32_t)0x00001000U) /*!<Bit 0 */
  4580. #define TIM_SMCR_ETPS_1 ((uint32_t)0x00002000U) /*!<Bit 1 */
  4581. #define TIM_SMCR_ECE ((uint32_t)0x00004000U) /*!<External clock enable */
  4582. #define TIM_SMCR_ETP ((uint32_t)0x00008000U) /*!<External trigger polarity */
  4583. /******************* Bit definition for TIM_DIER register ******************/
  4584. #define TIM_DIER_UIE ((uint32_t)0x00000001U) /*!<Update interrupt enable */
  4585. #define TIM_DIER_CC1IE ((uint32_t)0x00000002U) /*!<Capture/Compare 1 interrupt enable */
  4586. #define TIM_DIER_CC2IE ((uint32_t)0x00000004U) /*!<Capture/Compare 2 interrupt enable */
  4587. #define TIM_DIER_CC3IE ((uint32_t)0x00000008U) /*!<Capture/Compare 3 interrupt enable */
  4588. #define TIM_DIER_CC4IE ((uint32_t)0x00000010U) /*!<Capture/Compare 4 interrupt enable */
  4589. #define TIM_DIER_COMIE ((uint32_t)0x00000020U) /*!<COM interrupt enable */
  4590. #define TIM_DIER_TIE ((uint32_t)0x00000040U) /*!<Trigger interrupt enable */
  4591. #define TIM_DIER_BIE ((uint32_t)0x00000080U) /*!<Break interrupt enable */
  4592. #define TIM_DIER_UDE ((uint32_t)0x00000100U) /*!<Update DMA request enable */
  4593. #define TIM_DIER_CC1DE ((uint32_t)0x00000200U) /*!<Capture/Compare 1 DMA request enable */
  4594. #define TIM_DIER_CC2DE ((uint32_t)0x00000400U) /*!<Capture/Compare 2 DMA request enable */
  4595. #define TIM_DIER_CC3DE ((uint32_t)0x00000800U) /*!<Capture/Compare 3 DMA request enable */
  4596. #define TIM_DIER_CC4DE ((uint32_t)0x00001000U) /*!<Capture/Compare 4 DMA request enable */
  4597. #define TIM_DIER_COMDE ((uint32_t)0x00002000U) /*!<COM DMA request enable */
  4598. #define TIM_DIER_TDE ((uint32_t)0x00004000U) /*!<Trigger DMA request enable */
  4599. /******************** Bit definition for TIM_SR register *******************/
  4600. #define TIM_SR_UIF ((uint32_t)0x00000001U) /*!<Update interrupt Flag */
  4601. #define TIM_SR_CC1IF ((uint32_t)0x00000002U) /*!<Capture/Compare 1 interrupt Flag */
  4602. #define TIM_SR_CC2IF ((uint32_t)0x00000004U) /*!<Capture/Compare 2 interrupt Flag */
  4603. #define TIM_SR_CC3IF ((uint32_t)0x00000008U) /*!<Capture/Compare 3 interrupt Flag */
  4604. #define TIM_SR_CC4IF ((uint32_t)0x00000010U) /*!<Capture/Compare 4 interrupt Flag */
  4605. #define TIM_SR_COMIF ((uint32_t)0x00000020U) /*!<COM interrupt Flag */
  4606. #define TIM_SR_TIF ((uint32_t)0x00000040U) /*!<Trigger interrupt Flag */
  4607. #define TIM_SR_BIF ((uint32_t)0x00000080U) /*!<Break interrupt Flag */
  4608. #define TIM_SR_CC1OF ((uint32_t)0x00000200U) /*!<Capture/Compare 1 Overcapture Flag */
  4609. #define TIM_SR_CC2OF ((uint32_t)0x00000400U) /*!<Capture/Compare 2 Overcapture Flag */
  4610. #define TIM_SR_CC3OF ((uint32_t)0x00000800U) /*!<Capture/Compare 3 Overcapture Flag */
  4611. #define TIM_SR_CC4OF ((uint32_t)0x00001000U) /*!<Capture/Compare 4 Overcapture Flag */
  4612. /******************* Bit definition for TIM_EGR register *******************/
  4613. #define TIM_EGR_UG ((uint32_t)0x00000001U) /*!<Update Generation */
  4614. #define TIM_EGR_CC1G ((uint32_t)0x00000002U) /*!<Capture/Compare 1 Generation */
  4615. #define TIM_EGR_CC2G ((uint32_t)0x00000004U) /*!<Capture/Compare 2 Generation */
  4616. #define TIM_EGR_CC3G ((uint32_t)0x00000008U) /*!<Capture/Compare 3 Generation */
  4617. #define TIM_EGR_CC4G ((uint32_t)0x00000010U) /*!<Capture/Compare 4 Generation */
  4618. #define TIM_EGR_COMG ((uint32_t)0x00000020U) /*!<Capture/Compare Control Update Generation */
  4619. #define TIM_EGR_TG ((uint32_t)0x00000040U) /*!<Trigger Generation */
  4620. #define TIM_EGR_BG ((uint32_t)0x00000080U) /*!<Break Generation */
  4621. /****************** Bit definition for TIM_CCMR1 register ******************/
  4622. #define TIM_CCMR1_CC1S ((uint32_t)0x00000003U) /*!<CC1S[1:0] bits (Capture/Compare 1 Selection) */
  4623. #define TIM_CCMR1_CC1S_0 ((uint32_t)0x00000001U) /*!<Bit 0 */
  4624. #define TIM_CCMR1_CC1S_1 ((uint32_t)0x00000002U) /*!<Bit 1 */
  4625. #define TIM_CCMR1_OC1FE ((uint32_t)0x00000004U) /*!<Output Compare 1 Fast enable */
  4626. #define TIM_CCMR1_OC1PE ((uint32_t)0x00000008U) /*!<Output Compare 1 Preload enable */
  4627. #define TIM_CCMR1_OC1M ((uint32_t)0x00000070U) /*!<OC1M[2:0] bits (Output Compare 1 Mode) */
  4628. #define TIM_CCMR1_OC1M_0 ((uint32_t)0x00000010U) /*!<Bit 0 */
  4629. #define TIM_CCMR1_OC1M_1 ((uint32_t)0x00000020U) /*!<Bit 1 */
  4630. #define TIM_CCMR1_OC1M_2 ((uint32_t)0x00000040U) /*!<Bit 2 */
  4631. #define TIM_CCMR1_OC1CE ((uint32_t)0x00000080U) /*!<Output Compare 1Clear Enable */
  4632. #define TIM_CCMR1_CC2S ((uint32_t)0x00000300U) /*!<CC2S[1:0] bits (Capture/Compare 2 Selection) */
  4633. #define TIM_CCMR1_CC2S_0 ((uint32_t)0x00000100U) /*!<Bit 0 */
  4634. #define TIM_CCMR1_CC2S_1 ((uint32_t)0x00000200U) /*!<Bit 1 */
  4635. #define TIM_CCMR1_OC2FE ((uint32_t)0x00000400U) /*!<Output Compare 2 Fast enable */
  4636. #define TIM_CCMR1_OC2PE ((uint32_t)0x00000800U) /*!<Output Compare 2 Preload enable */
  4637. #define TIM_CCMR1_OC2M ((uint32_t)0x00007000U) /*!<OC2M[2:0] bits (Output Compare 2 Mode) */
  4638. #define TIM_CCMR1_OC2M_0 ((uint32_t)0x00001000U) /*!<Bit 0 */
  4639. #define TIM_CCMR1_OC2M_1 ((uint32_t)0x00002000U) /*!<Bit 1 */
  4640. #define TIM_CCMR1_OC2M_2 ((uint32_t)0x00004000U) /*!<Bit 2 */
  4641. #define TIM_CCMR1_OC2CE ((uint32_t)0x00008000U) /*!<Output Compare 2 Clear Enable */
  4642. /*---------------------------------------------------------------------------*/
  4643. #define TIM_CCMR1_IC1PSC ((uint32_t)0x0000000CU) /*!<IC1PSC[1:0] bits (Input Capture 1 Prescaler) */
  4644. #define TIM_CCMR1_IC1PSC_0 ((uint32_t)0x00000004U) /*!<Bit 0 */
  4645. #define TIM_CCMR1_IC1PSC_1 ((uint32_t)0x00000008U) /*!<Bit 1 */
  4646. #define TIM_CCMR1_IC1F ((uint32_t)0x000000F0U) /*!<IC1F[3:0] bits (Input Capture 1 Filter) */
  4647. #define TIM_CCMR1_IC1F_0 ((uint32_t)0x00000010U) /*!<Bit 0 */
  4648. #define TIM_CCMR1_IC1F_1 ((uint32_t)0x00000020U) /*!<Bit 1 */
  4649. #define TIM_CCMR1_IC1F_2 ((uint32_t)0x00000040U) /*!<Bit 2 */
  4650. #define TIM_CCMR1_IC1F_3 ((uint32_t)0x00000080U) /*!<Bit 3 */
  4651. #define TIM_CCMR1_IC2PSC ((uint32_t)0x00000C00U) /*!<IC2PSC[1:0] bits (Input Capture 2 Prescaler) */
  4652. #define TIM_CCMR1_IC2PSC_0 ((uint32_t)0x00000400U) /*!<Bit 0 */
  4653. #define TIM_CCMR1_IC2PSC_1 ((uint32_t)0x00000800U) /*!<Bit 1 */
  4654. #define TIM_CCMR1_IC2F ((uint32_t)0x0000F000U) /*!<IC2F[3:0] bits (Input Capture 2 Filter) */
  4655. #define TIM_CCMR1_IC2F_0 ((uint32_t)0x00001000U) /*!<Bit 0 */
  4656. #define TIM_CCMR1_IC2F_1 ((uint32_t)0x00002000U) /*!<Bit 1 */
  4657. #define TIM_CCMR1_IC2F_2 ((uint32_t)0x00004000U) /*!<Bit 2 */
  4658. #define TIM_CCMR1_IC2F_3 ((uint32_t)0x00008000U) /*!<Bit 3 */
  4659. /****************** Bit definition for TIM_CCMR2 register ******************/
  4660. #define TIM_CCMR2_CC3S ((uint32_t)0x00000003U) /*!<CC3S[1:0] bits (Capture/Compare 3 Selection) */
  4661. #define TIM_CCMR2_CC3S_0 ((uint32_t)0x00000001U) /*!<Bit 0 */
  4662. #define TIM_CCMR2_CC3S_1 ((uint32_t)0x00000002U) /*!<Bit 1 */
  4663. #define TIM_CCMR2_OC3FE ((uint32_t)0x00000004U) /*!<Output Compare 3 Fast enable */
  4664. #define TIM_CCMR2_OC3PE ((uint32_t)0x00000008U) /*!<Output Compare 3 Preload enable */
  4665. #define TIM_CCMR2_OC3M ((uint32_t)0x00000070U) /*!<OC3M[2:0] bits (Output Compare 3 Mode) */
  4666. #define TIM_CCMR2_OC3M_0 ((uint32_t)0x00000010U) /*!<Bit 0 */
  4667. #define TIM_CCMR2_OC3M_1 ((uint32_t)0x00000020U) /*!<Bit 1 */
  4668. #define TIM_CCMR2_OC3M_2 ((uint32_t)0x00000040U) /*!<Bit 2 */
  4669. #define TIM_CCMR2_OC3CE ((uint32_t)0x00000080U) /*!<Output Compare 3 Clear Enable */
  4670. #define TIM_CCMR2_CC4S ((uint32_t)0x00000300U) /*!<CC4S[1:0] bits (Capture/Compare 4 Selection) */
  4671. #define TIM_CCMR2_CC4S_0 ((uint32_t)0x00000100U) /*!<Bit 0 */
  4672. #define TIM_CCMR2_CC4S_1 ((uint32_t)0x00000200U) /*!<Bit 1 */
  4673. #define TIM_CCMR2_OC4FE ((uint32_t)0x00000400U) /*!<Output Compare 4 Fast enable */
  4674. #define TIM_CCMR2_OC4PE ((uint32_t)0x00000800U) /*!<Output Compare 4 Preload enable */
  4675. #define TIM_CCMR2_OC4M ((uint32_t)0x00007000U) /*!<OC4M[2:0] bits (Output Compare 4 Mode) */
  4676. #define TIM_CCMR2_OC4M_0 ((uint32_t)0x00001000U) /*!<Bit 0 */
  4677. #define TIM_CCMR2_OC4M_1 ((uint32_t)0x00002000U) /*!<Bit 1 */
  4678. #define TIM_CCMR2_OC4M_2 ((uint32_t)0x00004000U) /*!<Bit 2 */
  4679. #define TIM_CCMR2_OC4CE ((uint32_t)0x00008000U) /*!<Output Compare 4 Clear Enable */
  4680. /*---------------------------------------------------------------------------*/
  4681. #define TIM_CCMR2_IC3PSC ((uint32_t)0x0000000CU) /*!<IC3PSC[1:0] bits (Input Capture 3 Prescaler) */
  4682. #define TIM_CCMR2_IC3PSC_0 ((uint32_t)0x00000004U) /*!<Bit 0 */
  4683. #define TIM_CCMR2_IC3PSC_1 ((uint32_t)0x00000008U) /*!<Bit 1 */
  4684. #define TIM_CCMR2_IC3F ((uint32_t)0x000000F0U) /*!<IC3F[3:0] bits (Input Capture 3 Filter) */
  4685. #define TIM_CCMR2_IC3F_0 ((uint32_t)0x00000010U) /*!<Bit 0 */
  4686. #define TIM_CCMR2_IC3F_1 ((uint32_t)0x00000020U) /*!<Bit 1 */
  4687. #define TIM_CCMR2_IC3F_2 ((uint32_t)0x00000040U) /*!<Bit 2 */
  4688. #define TIM_CCMR2_IC3F_3 ((uint32_t)0x00000080U) /*!<Bit 3 */
  4689. #define TIM_CCMR2_IC4PSC ((uint32_t)0x00000C00U) /*!<IC4PSC[1:0] bits (Input Capture 4 Prescaler) */
  4690. #define TIM_CCMR2_IC4PSC_0 ((uint32_t)0x00000400U) /*!<Bit 0 */
  4691. #define TIM_CCMR2_IC4PSC_1 ((uint32_t)0x00000800U) /*!<Bit 1 */
  4692. #define TIM_CCMR2_IC4F ((uint32_t)0x0000F000U) /*!<IC4F[3:0] bits (Input Capture 4 Filter) */
  4693. #define TIM_CCMR2_IC4F_0 ((uint32_t)0x00001000U) /*!<Bit 0 */
  4694. #define TIM_CCMR2_IC4F_1 ((uint32_t)0x00002000U) /*!<Bit 1 */
  4695. #define TIM_CCMR2_IC4F_2 ((uint32_t)0x00004000U) /*!<Bit 2 */
  4696. #define TIM_CCMR2_IC4F_3 ((uint32_t)0x00008000U) /*!<Bit 3 */
  4697. /******************* Bit definition for TIM_CCER register ******************/
  4698. #define TIM_CCER_CC1E ((uint32_t)0x00000001U) /*!<Capture/Compare 1 output enable */
  4699. #define TIM_CCER_CC1P ((uint32_t)0x00000002U) /*!<Capture/Compare 1 output Polarity */
  4700. #define TIM_CCER_CC1NE ((uint32_t)0x00000004U) /*!<Capture/Compare 1 Complementary output enable */
  4701. #define TIM_CCER_CC1NP ((uint32_t)0x00000008U) /*!<Capture/Compare 1 Complementary output Polarity */
  4702. #define TIM_CCER_CC2E ((uint32_t)0x00000010U) /*!<Capture/Compare 2 output enable */
  4703. #define TIM_CCER_CC2P ((uint32_t)0x00000020U) /*!<Capture/Compare 2 output Polarity */
  4704. #define TIM_CCER_CC2NE ((uint32_t)0x00000040U) /*!<Capture/Compare 2 Complementary output enable */
  4705. #define TIM_CCER_CC2NP ((uint32_t)0x00000080U) /*!<Capture/Compare 2 Complementary output Polarity */
  4706. #define TIM_CCER_CC3E ((uint32_t)0x00000100U) /*!<Capture/Compare 3 output enable */
  4707. #define TIM_CCER_CC3P ((uint32_t)0x00000200U) /*!<Capture/Compare 3 output Polarity */
  4708. #define TIM_CCER_CC3NE ((uint32_t)0x00000400U) /*!<Capture/Compare 3 Complementary output enable */
  4709. #define TIM_CCER_CC3NP ((uint32_t)0x00000800U) /*!<Capture/Compare 3 Complementary output Polarity */
  4710. #define TIM_CCER_CC4E ((uint32_t)0x00001000U) /*!<Capture/Compare 4 output enable */
  4711. #define TIM_CCER_CC4P ((uint32_t)0x00002000U) /*!<Capture/Compare 4 output Polarity */
  4712. #define TIM_CCER_CC4NP ((uint32_t)0x00008000U) /*!<Capture/Compare 4 Complementary output Polarity */
  4713. /******************* Bit definition for TIM_CNT register *******************/
  4714. #define TIM_CNT_CNT ((uint32_t)0xFFFFFFFFU) /*!<Counter Value */
  4715. /******************* Bit definition for TIM_PSC register *******************/
  4716. #define TIM_PSC_PSC ((uint32_t)0x0000FFFFU) /*!<Prescaler Value */
  4717. /******************* Bit definition for TIM_ARR register *******************/
  4718. #define TIM_ARR_ARR ((uint32_t)0xFFFFFFFFU) /*!<actual auto-reload Value */
  4719. /******************* Bit definition for TIM_RCR register *******************/
  4720. #define TIM_RCR_REP ((uint32_t)0x000000FFU) /*!<Repetition Counter Value */
  4721. /******************* Bit definition for TIM_CCR1 register ******************/
  4722. #define TIM_CCR1_CCR1 ((uint32_t)0x0000FFFFU) /*!<Capture/Compare 1 Value */
  4723. /******************* Bit definition for TIM_CCR2 register ******************/
  4724. #define TIM_CCR2_CCR2 ((uint32_t)0x0000FFFFU) /*!<Capture/Compare 2 Value */
  4725. /******************* Bit definition for TIM_CCR3 register ******************/
  4726. #define TIM_CCR3_CCR3 ((uint32_t)0x0000FFFFU) /*!<Capture/Compare 3 Value */
  4727. /******************* Bit definition for TIM_CCR4 register ******************/
  4728. #define TIM_CCR4_CCR4 ((uint32_t)0x0000FFFFU) /*!<Capture/Compare 4 Value */
  4729. /******************* Bit definition for TIM_BDTR register ******************/
  4730. #define TIM_BDTR_DTG ((uint32_t)0x000000FFU) /*!<DTG[0:7] bits (Dead-Time Generator set-up) */
  4731. #define TIM_BDTR_DTG_0 ((uint32_t)0x00000001U) /*!<Bit 0 */
  4732. #define TIM_BDTR_DTG_1 ((uint32_t)0x00000002U) /*!<Bit 1 */
  4733. #define TIM_BDTR_DTG_2 ((uint32_t)0x00000004U) /*!<Bit 2 */
  4734. #define TIM_BDTR_DTG_3 ((uint32_t)0x00000008U) /*!<Bit 3 */
  4735. #define TIM_BDTR_DTG_4 ((uint32_t)0x00000010U) /*!<Bit 4 */
  4736. #define TIM_BDTR_DTG_5 ((uint32_t)0x00000020U) /*!<Bit 5 */
  4737. #define TIM_BDTR_DTG_6 ((uint32_t)0x00000040U) /*!<Bit 6 */
  4738. #define TIM_BDTR_DTG_7 ((uint32_t)0x00000080U) /*!<Bit 7 */
  4739. #define TIM_BDTR_LOCK ((uint32_t)0x00000300U) /*!<LOCK[1:0] bits (Lock Configuration) */
  4740. #define TIM_BDTR_LOCK_0 ((uint32_t)0x00000100U) /*!<Bit 0 */
  4741. #define TIM_BDTR_LOCK_1 ((uint32_t)0x00000200U) /*!<Bit 1 */
  4742. #define TIM_BDTR_OSSI ((uint32_t)0x00000400U) /*!<Off-State Selection for Idle mode */
  4743. #define TIM_BDTR_OSSR ((uint32_t)0x00000800U) /*!<Off-State Selection for Run mode */
  4744. #define TIM_BDTR_BKE ((uint32_t)0x00001000U) /*!<Break enable */
  4745. #define TIM_BDTR_BKP ((uint32_t)0x00002000U) /*!<Break Polarity */
  4746. #define TIM_BDTR_AOE ((uint32_t)0x00004000U) /*!<Automatic Output enable */
  4747. #define TIM_BDTR_MOE ((uint32_t)0x00008000U) /*!<Main Output enable */
  4748. /******************* Bit definition for TIM_DCR register *******************/
  4749. #define TIM_DCR_DBA ((uint32_t)0x0000001FU) /*!<DBA[4:0] bits (DMA Base Address) */
  4750. #define TIM_DCR_DBA_0 ((uint32_t)0x00000001U) /*!<Bit 0 */
  4751. #define TIM_DCR_DBA_1 ((uint32_t)0x00000002U) /*!<Bit 1 */
  4752. #define TIM_DCR_DBA_2 ((uint32_t)0x00000004U) /*!<Bit 2 */
  4753. #define TIM_DCR_DBA_3 ((uint32_t)0x00000008U) /*!<Bit 3 */
  4754. #define TIM_DCR_DBA_4 ((uint32_t)0x00000010U) /*!<Bit 4 */
  4755. #define TIM_DCR_DBL ((uint32_t)0x00001F00U) /*!<DBL[4:0] bits (DMA Burst Length) */
  4756. #define TIM_DCR_DBL_0 ((uint32_t)0x00000100U) /*!<Bit 0 */
  4757. #define TIM_DCR_DBL_1 ((uint32_t)0x00000200U) /*!<Bit 1 */
  4758. #define TIM_DCR_DBL_2 ((uint32_t)0x00000400U) /*!<Bit 2 */
  4759. #define TIM_DCR_DBL_3 ((uint32_t)0x00000800U) /*!<Bit 3 */
  4760. #define TIM_DCR_DBL_4 ((uint32_t)0x00001000U) /*!<Bit 4 */
  4761. /******************* Bit definition for TIM_DMAR register ******************/
  4762. #define TIM_DMAR_DMAB ((uint32_t)0x0000FFFFU) /*!<DMA register for burst accesses */
  4763. /******************* Bit definition for TIM14_OR register ********************/
  4764. #define TIM14_OR_TI1_RMP ((uint32_t)0x00000003U) /*!<TI1_RMP[1:0] bits (TIM14 Input 4 remap) */
  4765. #define TIM14_OR_TI1_RMP_0 ((uint32_t)0x00000001U) /*!<Bit 0 */
  4766. #define TIM14_OR_TI1_RMP_1 ((uint32_t)0x00000002U) /*!<Bit 1 */
  4767. /******************************************************************************/
  4768. /* */
  4769. /* Touch Sensing Controller (TSC) */
  4770. /* */
  4771. /******************************************************************************/
  4772. /******************* Bit definition for TSC_CR register *********************/
  4773. #define TSC_CR_TSCE ((uint32_t)0x00000001U) /*!<Touch sensing controller enable */
  4774. #define TSC_CR_START ((uint32_t)0x00000002U) /*!<Start acquisition */
  4775. #define TSC_CR_AM ((uint32_t)0x00000004U) /*!<Acquisition mode */
  4776. #define TSC_CR_SYNCPOL ((uint32_t)0x00000008U) /*!<Synchronization pin polarity */
  4777. #define TSC_CR_IODEF ((uint32_t)0x00000010U) /*!<IO default mode */
  4778. #define TSC_CR_MCV ((uint32_t)0x000000E0U) /*!<MCV[2:0] bits (Max Count Value) */
  4779. #define TSC_CR_MCV_0 ((uint32_t)0x00000020U) /*!<Bit 0 */
  4780. #define TSC_CR_MCV_1 ((uint32_t)0x00000040U) /*!<Bit 1 */
  4781. #define TSC_CR_MCV_2 ((uint32_t)0x00000080U) /*!<Bit 2 */
  4782. #define TSC_CR_PGPSC ((uint32_t)0x00007000U) /*!<PGPSC[2:0] bits (Pulse Generator Prescaler) */
  4783. #define TSC_CR_PGPSC_0 ((uint32_t)0x00001000U) /*!<Bit 0 */
  4784. #define TSC_CR_PGPSC_1 ((uint32_t)0x00002000U) /*!<Bit 1 */
  4785. #define TSC_CR_PGPSC_2 ((uint32_t)0x00004000U) /*!<Bit 2 */
  4786. #define TSC_CR_SSPSC ((uint32_t)0x00008000U) /*!<Spread Spectrum Prescaler */
  4787. #define TSC_CR_SSE ((uint32_t)0x00010000U) /*!<Spread Spectrum Enable */
  4788. #define TSC_CR_SSD ((uint32_t)0x00FE0000U) /*!<SSD[6:0] bits (Spread Spectrum Deviation) */
  4789. #define TSC_CR_SSD_0 ((uint32_t)0x00020000U) /*!<Bit 0 */
  4790. #define TSC_CR_SSD_1 ((uint32_t)0x00040000U) /*!<Bit 1 */
  4791. #define TSC_CR_SSD_2 ((uint32_t)0x00080000U) /*!<Bit 2 */
  4792. #define TSC_CR_SSD_3 ((uint32_t)0x00100000U) /*!<Bit 3 */
  4793. #define TSC_CR_SSD_4 ((uint32_t)0x00200000U) /*!<Bit 4 */
  4794. #define TSC_CR_SSD_5 ((uint32_t)0x00400000U) /*!<Bit 5 */
  4795. #define TSC_CR_SSD_6 ((uint32_t)0x00800000U) /*!<Bit 6 */
  4796. #define TSC_CR_CTPL ((uint32_t)0x0F000000U) /*!<CTPL[3:0] bits (Charge Transfer pulse low) */
  4797. #define TSC_CR_CTPL_0 ((uint32_t)0x01000000U) /*!<Bit 0 */
  4798. #define TSC_CR_CTPL_1 ((uint32_t)0x02000000U) /*!<Bit 1 */
  4799. #define TSC_CR_CTPL_2 ((uint32_t)0x04000000U) /*!<Bit 2 */
  4800. #define TSC_CR_CTPL_3 ((uint32_t)0x08000000U) /*!<Bit 3 */
  4801. #define TSC_CR_CTPH ((uint32_t)0xF0000000U) /*!<CTPH[3:0] bits (Charge Transfer pulse high) */
  4802. #define TSC_CR_CTPH_0 ((uint32_t)0x10000000U) /*!<Bit 0 */
  4803. #define TSC_CR_CTPH_1 ((uint32_t)0x20000000U) /*!<Bit 1 */
  4804. #define TSC_CR_CTPH_2 ((uint32_t)0x40000000U) /*!<Bit 2 */
  4805. #define TSC_CR_CTPH_3 ((uint32_t)0x80000000U) /*!<Bit 3 */
  4806. /******************* Bit definition for TSC_IER register ********************/
  4807. #define TSC_IER_EOAIE ((uint32_t)0x00000001U) /*!<End of acquisition interrupt enable */
  4808. #define TSC_IER_MCEIE ((uint32_t)0x00000002U) /*!<Max count error interrupt enable */
  4809. /******************* Bit definition for TSC_ICR register ********************/
  4810. #define TSC_ICR_EOAIC ((uint32_t)0x00000001U) /*!<End of acquisition interrupt clear */
  4811. #define TSC_ICR_MCEIC ((uint32_t)0x00000002U) /*!<Max count error interrupt clear */
  4812. /******************* Bit definition for TSC_ISR register ********************/
  4813. #define TSC_ISR_EOAF ((uint32_t)0x00000001U) /*!<End of acquisition flag */
  4814. #define TSC_ISR_MCEF ((uint32_t)0x00000002U) /*!<Max count error flag */
  4815. /******************* Bit definition for TSC_IOHCR register ******************/
  4816. #define TSC_IOHCR_G1_IO1 ((uint32_t)0x00000001U) /*!<GROUP1_IO1 schmitt trigger hysteresis mode */
  4817. #define TSC_IOHCR_G1_IO2 ((uint32_t)0x00000002U) /*!<GROUP1_IO2 schmitt trigger hysteresis mode */
  4818. #define TSC_IOHCR_G1_IO3 ((uint32_t)0x00000004U) /*!<GROUP1_IO3 schmitt trigger hysteresis mode */
  4819. #define TSC_IOHCR_G1_IO4 ((uint32_t)0x00000008U) /*!<GROUP1_IO4 schmitt trigger hysteresis mode */
  4820. #define TSC_IOHCR_G2_IO1 ((uint32_t)0x00000010U) /*!<GROUP2_IO1 schmitt trigger hysteresis mode */
  4821. #define TSC_IOHCR_G2_IO2 ((uint32_t)0x00000020U) /*!<GROUP2_IO2 schmitt trigger hysteresis mode */
  4822. #define TSC_IOHCR_G2_IO3 ((uint32_t)0x00000040U) /*!<GROUP2_IO3 schmitt trigger hysteresis mode */
  4823. #define TSC_IOHCR_G2_IO4 ((uint32_t)0x00000080U) /*!<GROUP2_IO4 schmitt trigger hysteresis mode */
  4824. #define TSC_IOHCR_G3_IO1 ((uint32_t)0x00000100U) /*!<GROUP3_IO1 schmitt trigger hysteresis mode */
  4825. #define TSC_IOHCR_G3_IO2 ((uint32_t)0x00000200U) /*!<GROUP3_IO2 schmitt trigger hysteresis mode */
  4826. #define TSC_IOHCR_G3_IO3 ((uint32_t)0x00000400U) /*!<GROUP3_IO3 schmitt trigger hysteresis mode */
  4827. #define TSC_IOHCR_G3_IO4 ((uint32_t)0x00000800U) /*!<GROUP3_IO4 schmitt trigger hysteresis mode */
  4828. #define TSC_IOHCR_G4_IO1 ((uint32_t)0x00001000U) /*!<GROUP4_IO1 schmitt trigger hysteresis mode */
  4829. #define TSC_IOHCR_G4_IO2 ((uint32_t)0x00002000U) /*!<GROUP4_IO2 schmitt trigger hysteresis mode */
  4830. #define TSC_IOHCR_G4_IO3 ((uint32_t)0x00004000U) /*!<GROUP4_IO3 schmitt trigger hysteresis mode */
  4831. #define TSC_IOHCR_G4_IO4 ((uint32_t)0x00008000U) /*!<GROUP4_IO4 schmitt trigger hysteresis mode */
  4832. #define TSC_IOHCR_G5_IO1 ((uint32_t)0x00010000U) /*!<GROUP5_IO1 schmitt trigger hysteresis mode */
  4833. #define TSC_IOHCR_G5_IO2 ((uint32_t)0x00020000U) /*!<GROUP5_IO2 schmitt trigger hysteresis mode */
  4834. #define TSC_IOHCR_G5_IO3 ((uint32_t)0x00040000U) /*!<GROUP5_IO3 schmitt trigger hysteresis mode */
  4835. #define TSC_IOHCR_G5_IO4 ((uint32_t)0x00080000U) /*!<GROUP5_IO4 schmitt trigger hysteresis mode */
  4836. #define TSC_IOHCR_G6_IO1 ((uint32_t)0x00100000U) /*!<GROUP6_IO1 schmitt trigger hysteresis mode */
  4837. #define TSC_IOHCR_G6_IO2 ((uint32_t)0x00200000U) /*!<GROUP6_IO2 schmitt trigger hysteresis mode */
  4838. #define TSC_IOHCR_G6_IO3 ((uint32_t)0x00400000U) /*!<GROUP6_IO3 schmitt trigger hysteresis mode */
  4839. #define TSC_IOHCR_G6_IO4 ((uint32_t)0x00800000U) /*!<GROUP6_IO4 schmitt trigger hysteresis mode */
  4840. #define TSC_IOHCR_G7_IO1 ((uint32_t)0x01000000U) /*!<GROUP7_IO1 schmitt trigger hysteresis mode */
  4841. #define TSC_IOHCR_G7_IO2 ((uint32_t)0x02000000U) /*!<GROUP7_IO2 schmitt trigger hysteresis mode */
  4842. #define TSC_IOHCR_G7_IO3 ((uint32_t)0x04000000U) /*!<GROUP7_IO3 schmitt trigger hysteresis mode */
  4843. #define TSC_IOHCR_G7_IO4 ((uint32_t)0x08000000U) /*!<GROUP7_IO4 schmitt trigger hysteresis mode */
  4844. #define TSC_IOHCR_G8_IO1 ((uint32_t)0x10000000U) /*!<GROUP8_IO1 schmitt trigger hysteresis mode */
  4845. #define TSC_IOHCR_G8_IO2 ((uint32_t)0x20000000U) /*!<GROUP8_IO2 schmitt trigger hysteresis mode */
  4846. #define TSC_IOHCR_G8_IO3 ((uint32_t)0x40000000U) /*!<GROUP8_IO3 schmitt trigger hysteresis mode */
  4847. #define TSC_IOHCR_G8_IO4 ((uint32_t)0x80000000U) /*!<GROUP8_IO4 schmitt trigger hysteresis mode */
  4848. /******************* Bit definition for TSC_IOASCR register *****************/
  4849. #define TSC_IOASCR_G1_IO1 ((uint32_t)0x00000001U) /*!<GROUP1_IO1 analog switch enable */
  4850. #define TSC_IOASCR_G1_IO2 ((uint32_t)0x00000002U) /*!<GROUP1_IO2 analog switch enable */
  4851. #define TSC_IOASCR_G1_IO3 ((uint32_t)0x00000004U) /*!<GROUP1_IO3 analog switch enable */
  4852. #define TSC_IOASCR_G1_IO4 ((uint32_t)0x00000008U) /*!<GROUP1_IO4 analog switch enable */
  4853. #define TSC_IOASCR_G2_IO1 ((uint32_t)0x00000010U) /*!<GROUP2_IO1 analog switch enable */
  4854. #define TSC_IOASCR_G2_IO2 ((uint32_t)0x00000020U) /*!<GROUP2_IO2 analog switch enable */
  4855. #define TSC_IOASCR_G2_IO3 ((uint32_t)0x00000040U) /*!<GROUP2_IO3 analog switch enable */
  4856. #define TSC_IOASCR_G2_IO4 ((uint32_t)0x00000080U) /*!<GROUP2_IO4 analog switch enable */
  4857. #define TSC_IOASCR_G3_IO1 ((uint32_t)0x00000100U) /*!<GROUP3_IO1 analog switch enable */
  4858. #define TSC_IOASCR_G3_IO2 ((uint32_t)0x00000200U) /*!<GROUP3_IO2 analog switch enable */
  4859. #define TSC_IOASCR_G3_IO3 ((uint32_t)0x00000400U) /*!<GROUP3_IO3 analog switch enable */
  4860. #define TSC_IOASCR_G3_IO4 ((uint32_t)0x00000800U) /*!<GROUP3_IO4 analog switch enable */
  4861. #define TSC_IOASCR_G4_IO1 ((uint32_t)0x00001000U) /*!<GROUP4_IO1 analog switch enable */
  4862. #define TSC_IOASCR_G4_IO2 ((uint32_t)0x00002000U) /*!<GROUP4_IO2 analog switch enable */
  4863. #define TSC_IOASCR_G4_IO3 ((uint32_t)0x00004000U) /*!<GROUP4_IO3 analog switch enable */
  4864. #define TSC_IOASCR_G4_IO4 ((uint32_t)0x00008000U) /*!<GROUP4_IO4 analog switch enable */
  4865. #define TSC_IOASCR_G5_IO1 ((uint32_t)0x00010000U) /*!<GROUP5_IO1 analog switch enable */
  4866. #define TSC_IOASCR_G5_IO2 ((uint32_t)0x00020000U) /*!<GROUP5_IO2 analog switch enable */
  4867. #define TSC_IOASCR_G5_IO3 ((uint32_t)0x00040000U) /*!<GROUP5_IO3 analog switch enable */
  4868. #define TSC_IOASCR_G5_IO4 ((uint32_t)0x00080000U) /*!<GROUP5_IO4 analog switch enable */
  4869. #define TSC_IOASCR_G6_IO1 ((uint32_t)0x00100000U) /*!<GROUP6_IO1 analog switch enable */
  4870. #define TSC_IOASCR_G6_IO2 ((uint32_t)0x00200000U) /*!<GROUP6_IO2 analog switch enable */
  4871. #define TSC_IOASCR_G6_IO3 ((uint32_t)0x00400000U) /*!<GROUP6_IO3 analog switch enable */
  4872. #define TSC_IOASCR_G6_IO4 ((uint32_t)0x00800000U) /*!<GROUP6_IO4 analog switch enable */
  4873. #define TSC_IOASCR_G7_IO1 ((uint32_t)0x01000000U) /*!<GROUP7_IO1 analog switch enable */
  4874. #define TSC_IOASCR_G7_IO2 ((uint32_t)0x02000000U) /*!<GROUP7_IO2 analog switch enable */
  4875. #define TSC_IOASCR_G7_IO3 ((uint32_t)0x04000000U) /*!<GROUP7_IO3 analog switch enable */
  4876. #define TSC_IOASCR_G7_IO4 ((uint32_t)0x08000000U) /*!<GROUP7_IO4 analog switch enable */
  4877. #define TSC_IOASCR_G8_IO1 ((uint32_t)0x10000000U) /*!<GROUP8_IO1 analog switch enable */
  4878. #define TSC_IOASCR_G8_IO2 ((uint32_t)0x20000000U) /*!<GROUP8_IO2 analog switch enable */
  4879. #define TSC_IOASCR_G8_IO3 ((uint32_t)0x40000000U) /*!<GROUP8_IO3 analog switch enable */
  4880. #define TSC_IOASCR_G8_IO4 ((uint32_t)0x80000000U) /*!<GROUP8_IO4 analog switch enable */
  4881. /******************* Bit definition for TSC_IOSCR register ******************/
  4882. #define TSC_IOSCR_G1_IO1 ((uint32_t)0x00000001U) /*!<GROUP1_IO1 sampling mode */
  4883. #define TSC_IOSCR_G1_IO2 ((uint32_t)0x00000002U) /*!<GROUP1_IO2 sampling mode */
  4884. #define TSC_IOSCR_G1_IO3 ((uint32_t)0x00000004U) /*!<GROUP1_IO3 sampling mode */
  4885. #define TSC_IOSCR_G1_IO4 ((uint32_t)0x00000008U) /*!<GROUP1_IO4 sampling mode */
  4886. #define TSC_IOSCR_G2_IO1 ((uint32_t)0x00000010U) /*!<GROUP2_IO1 sampling mode */
  4887. #define TSC_IOSCR_G2_IO2 ((uint32_t)0x00000020U) /*!<GROUP2_IO2 sampling mode */
  4888. #define TSC_IOSCR_G2_IO3 ((uint32_t)0x00000040U) /*!<GROUP2_IO3 sampling mode */
  4889. #define TSC_IOSCR_G2_IO4 ((uint32_t)0x00000080U) /*!<GROUP2_IO4 sampling mode */
  4890. #define TSC_IOSCR_G3_IO1 ((uint32_t)0x00000100U) /*!<GROUP3_IO1 sampling mode */
  4891. #define TSC_IOSCR_G3_IO2 ((uint32_t)0x00000200U) /*!<GROUP3_IO2 sampling mode */
  4892. #define TSC_IOSCR_G3_IO3 ((uint32_t)0x00000400U) /*!<GROUP3_IO3 sampling mode */
  4893. #define TSC_IOSCR_G3_IO4 ((uint32_t)0x00000800U) /*!<GROUP3_IO4 sampling mode */
  4894. #define TSC_IOSCR_G4_IO1 ((uint32_t)0x00001000U) /*!<GROUP4_IO1 sampling mode */
  4895. #define TSC_IOSCR_G4_IO2 ((uint32_t)0x00002000U) /*!<GROUP4_IO2 sampling mode */
  4896. #define TSC_IOSCR_G4_IO3 ((uint32_t)0x00004000U) /*!<GROUP4_IO3 sampling mode */
  4897. #define TSC_IOSCR_G4_IO4 ((uint32_t)0x00008000U) /*!<GROUP4_IO4 sampling mode */
  4898. #define TSC_IOSCR_G5_IO1 ((uint32_t)0x00010000U) /*!<GROUP5_IO1 sampling mode */
  4899. #define TSC_IOSCR_G5_IO2 ((uint32_t)0x00020000U) /*!<GROUP5_IO2 sampling mode */
  4900. #define TSC_IOSCR_G5_IO3 ((uint32_t)0x00040000U) /*!<GROUP5_IO3 sampling mode */
  4901. #define TSC_IOSCR_G5_IO4 ((uint32_t)0x00080000U) /*!<GROUP5_IO4 sampling mode */
  4902. #define TSC_IOSCR_G6_IO1 ((uint32_t)0x00100000U) /*!<GROUP6_IO1 sampling mode */
  4903. #define TSC_IOSCR_G6_IO2 ((uint32_t)0x00200000U) /*!<GROUP6_IO2 sampling mode */
  4904. #define TSC_IOSCR_G6_IO3 ((uint32_t)0x00400000U) /*!<GROUP6_IO3 sampling mode */
  4905. #define TSC_IOSCR_G6_IO4 ((uint32_t)0x00800000U) /*!<GROUP6_IO4 sampling mode */
  4906. #define TSC_IOSCR_G7_IO1 ((uint32_t)0x01000000U) /*!<GROUP7_IO1 sampling mode */
  4907. #define TSC_IOSCR_G7_IO2 ((uint32_t)0x02000000U) /*!<GROUP7_IO2 sampling mode */
  4908. #define TSC_IOSCR_G7_IO3 ((uint32_t)0x04000000U) /*!<GROUP7_IO3 sampling mode */
  4909. #define TSC_IOSCR_G7_IO4 ((uint32_t)0x08000000U) /*!<GROUP7_IO4 sampling mode */
  4910. #define TSC_IOSCR_G8_IO1 ((uint32_t)0x10000000U) /*!<GROUP8_IO1 sampling mode */
  4911. #define TSC_IOSCR_G8_IO2 ((uint32_t)0x20000000U) /*!<GROUP8_IO2 sampling mode */
  4912. #define TSC_IOSCR_G8_IO3 ((uint32_t)0x40000000U) /*!<GROUP8_IO3 sampling mode */
  4913. #define TSC_IOSCR_G8_IO4 ((uint32_t)0x80000000U) /*!<GROUP8_IO4 sampling mode */
  4914. /******************* Bit definition for TSC_IOCCR register ******************/
  4915. #define TSC_IOCCR_G1_IO1 ((uint32_t)0x00000001U) /*!<GROUP1_IO1 channel mode */
  4916. #define TSC_IOCCR_G1_IO2 ((uint32_t)0x00000002U) /*!<GROUP1_IO2 channel mode */
  4917. #define TSC_IOCCR_G1_IO3 ((uint32_t)0x00000004U) /*!<GROUP1_IO3 channel mode */
  4918. #define TSC_IOCCR_G1_IO4 ((uint32_t)0x00000008U) /*!<GROUP1_IO4 channel mode */
  4919. #define TSC_IOCCR_G2_IO1 ((uint32_t)0x00000010U) /*!<GROUP2_IO1 channel mode */
  4920. #define TSC_IOCCR_G2_IO2 ((uint32_t)0x00000020U) /*!<GROUP2_IO2 channel mode */
  4921. #define TSC_IOCCR_G2_IO3 ((uint32_t)0x00000040U) /*!<GROUP2_IO3 channel mode */
  4922. #define TSC_IOCCR_G2_IO4 ((uint32_t)0x00000080U) /*!<GROUP2_IO4 channel mode */
  4923. #define TSC_IOCCR_G3_IO1 ((uint32_t)0x00000100U) /*!<GROUP3_IO1 channel mode */
  4924. #define TSC_IOCCR_G3_IO2 ((uint32_t)0x00000200U) /*!<GROUP3_IO2 channel mode */
  4925. #define TSC_IOCCR_G3_IO3 ((uint32_t)0x00000400U) /*!<GROUP3_IO3 channel mode */
  4926. #define TSC_IOCCR_G3_IO4 ((uint32_t)0x00000800U) /*!<GROUP3_IO4 channel mode */
  4927. #define TSC_IOCCR_G4_IO1 ((uint32_t)0x00001000U) /*!<GROUP4_IO1 channel mode */
  4928. #define TSC_IOCCR_G4_IO2 ((uint32_t)0x00002000U) /*!<GROUP4_IO2 channel mode */
  4929. #define TSC_IOCCR_G4_IO3 ((uint32_t)0x00004000U) /*!<GROUP4_IO3 channel mode */
  4930. #define TSC_IOCCR_G4_IO4 ((uint32_t)0x00008000U) /*!<GROUP4_IO4 channel mode */
  4931. #define TSC_IOCCR_G5_IO1 ((uint32_t)0x00010000U) /*!<GROUP5_IO1 channel mode */
  4932. #define TSC_IOCCR_G5_IO2 ((uint32_t)0x00020000U) /*!<GROUP5_IO2 channel mode */
  4933. #define TSC_IOCCR_G5_IO3 ((uint32_t)0x00040000U) /*!<GROUP5_IO3 channel mode */
  4934. #define TSC_IOCCR_G5_IO4 ((uint32_t)0x00080000U) /*!<GROUP5_IO4 channel mode */
  4935. #define TSC_IOCCR_G6_IO1 ((uint32_t)0x00100000U) /*!<GROUP6_IO1 channel mode */
  4936. #define TSC_IOCCR_G6_IO2 ((uint32_t)0x00200000U) /*!<GROUP6_IO2 channel mode */
  4937. #define TSC_IOCCR_G6_IO3 ((uint32_t)0x00400000U) /*!<GROUP6_IO3 channel mode */
  4938. #define TSC_IOCCR_G6_IO4 ((uint32_t)0x00800000U) /*!<GROUP6_IO4 channel mode */
  4939. #define TSC_IOCCR_G7_IO1 ((uint32_t)0x01000000U) /*!<GROUP7_IO1 channel mode */
  4940. #define TSC_IOCCR_G7_IO2 ((uint32_t)0x02000000U) /*!<GROUP7_IO2 channel mode */
  4941. #define TSC_IOCCR_G7_IO3 ((uint32_t)0x04000000U) /*!<GROUP7_IO3 channel mode */
  4942. #define TSC_IOCCR_G7_IO4 ((uint32_t)0x08000000U) /*!<GROUP7_IO4 channel mode */
  4943. #define TSC_IOCCR_G8_IO1 ((uint32_t)0x10000000U) /*!<GROUP8_IO1 channel mode */
  4944. #define TSC_IOCCR_G8_IO2 ((uint32_t)0x20000000U) /*!<GROUP8_IO2 channel mode */
  4945. #define TSC_IOCCR_G8_IO3 ((uint32_t)0x40000000U) /*!<GROUP8_IO3 channel mode */
  4946. #define TSC_IOCCR_G8_IO4 ((uint32_t)0x80000000U) /*!<GROUP8_IO4 channel mode */
  4947. /******************* Bit definition for TSC_IOGCSR register *****************/
  4948. #define TSC_IOGCSR_G1E ((uint32_t)0x00000001U) /*!<Analog IO GROUP1 enable */
  4949. #define TSC_IOGCSR_G2E ((uint32_t)0x00000002U) /*!<Analog IO GROUP2 enable */
  4950. #define TSC_IOGCSR_G3E ((uint32_t)0x00000004U) /*!<Analog IO GROUP3 enable */
  4951. #define TSC_IOGCSR_G4E ((uint32_t)0x00000008U) /*!<Analog IO GROUP4 enable */
  4952. #define TSC_IOGCSR_G5E ((uint32_t)0x00000010U) /*!<Analog IO GROUP5 enable */
  4953. #define TSC_IOGCSR_G6E ((uint32_t)0x00000020U) /*!<Analog IO GROUP6 enable */
  4954. #define TSC_IOGCSR_G7E ((uint32_t)0x00000040U) /*!<Analog IO GROUP7 enable */
  4955. #define TSC_IOGCSR_G8E ((uint32_t)0x00000080U) /*!<Analog IO GROUP8 enable */
  4956. #define TSC_IOGCSR_G1S ((uint32_t)0x00010000U) /*!<Analog IO GROUP1 status */
  4957. #define TSC_IOGCSR_G2S ((uint32_t)0x00020000U) /*!<Analog IO GROUP2 status */
  4958. #define TSC_IOGCSR_G3S ((uint32_t)0x00040000U) /*!<Analog IO GROUP3 status */
  4959. #define TSC_IOGCSR_G4S ((uint32_t)0x00080000U) /*!<Analog IO GROUP4 status */
  4960. #define TSC_IOGCSR_G5S ((uint32_t)0x00100000U) /*!<Analog IO GROUP5 status */
  4961. #define TSC_IOGCSR_G6S ((uint32_t)0x00200000U) /*!<Analog IO GROUP6 status */
  4962. #define TSC_IOGCSR_G7S ((uint32_t)0x00400000U) /*!<Analog IO GROUP7 status */
  4963. #define TSC_IOGCSR_G8S ((uint32_t)0x00800000U) /*!<Analog IO GROUP8 status */
  4964. /******************* Bit definition for TSC_IOGXCR register *****************/
  4965. #define TSC_IOGXCR_CNT ((uint32_t)0x00003FFFU) /*!<CNT[13:0] bits (Counter value) */
  4966. /******************************************************************************/
  4967. /* */
  4968. /* Universal Synchronous Asynchronous Receiver Transmitter (USART) */
  4969. /* */
  4970. /******************************************************************************/
  4971. /****************** Bit definition for USART_CR1 register *******************/
  4972. #define USART_CR1_UE ((uint32_t)0x00000001U) /*!< USART Enable */
  4973. #define USART_CR1_UESM ((uint32_t)0x00000002U) /*!< USART Enable in STOP Mode */
  4974. #define USART_CR1_RE ((uint32_t)0x00000004U) /*!< Receiver Enable */
  4975. #define USART_CR1_TE ((uint32_t)0x00000008U) /*!< Transmitter Enable */
  4976. #define USART_CR1_IDLEIE ((uint32_t)0x00000010U) /*!< IDLE Interrupt Enable */
  4977. #define USART_CR1_RXNEIE ((uint32_t)0x00000020U) /*!< RXNE Interrupt Enable */
  4978. #define USART_CR1_TCIE ((uint32_t)0x00000040U) /*!< Transmission Complete Interrupt Enable */
  4979. #define USART_CR1_TXEIE ((uint32_t)0x00000080U) /*!< TXE Interrupt Enable */
  4980. #define USART_CR1_PEIE ((uint32_t)0x00000100U) /*!< PE Interrupt Enable */
  4981. #define USART_CR1_PS ((uint32_t)0x00000200U) /*!< Parity Selection */
  4982. #define USART_CR1_PCE ((uint32_t)0x00000400U) /*!< Parity Control Enable */
  4983. #define USART_CR1_WAKE ((uint32_t)0x00000800U) /*!< Receiver Wakeup method */
  4984. #define USART_CR1_M0 ((uint32_t)0x00001000U) /*!< Word length bit 0 */
  4985. #define USART_CR1_MME ((uint32_t)0x00002000U) /*!< Mute Mode Enable */
  4986. #define USART_CR1_CMIE ((uint32_t)0x00004000U) /*!< Character match interrupt enable */
  4987. #define USART_CR1_OVER8 ((uint32_t)0x00008000U) /*!< Oversampling by 8-bit or 16-bit mode */
  4988. #define USART_CR1_DEDT ((uint32_t)0x001F0000U) /*!< DEDT[4:0] bits (Driver Enable Deassertion Time) */
  4989. #define USART_CR1_DEDT_0 ((uint32_t)0x00010000U) /*!< Bit 0 */
  4990. #define USART_CR1_DEDT_1 ((uint32_t)0x00020000U) /*!< Bit 1 */
  4991. #define USART_CR1_DEDT_2 ((uint32_t)0x00040000U) /*!< Bit 2 */
  4992. #define USART_CR1_DEDT_3 ((uint32_t)0x00080000U) /*!< Bit 3 */
  4993. #define USART_CR1_DEDT_4 ((uint32_t)0x00100000U) /*!< Bit 4 */
  4994. #define USART_CR1_DEAT ((uint32_t)0x03E00000U) /*!< DEAT[4:0] bits (Driver Enable Assertion Time) */
  4995. #define USART_CR1_DEAT_0 ((uint32_t)0x00200000U) /*!< Bit 0 */
  4996. #define USART_CR1_DEAT_1 ((uint32_t)0x00400000U) /*!< Bit 1 */
  4997. #define USART_CR1_DEAT_2 ((uint32_t)0x00800000U) /*!< Bit 2 */
  4998. #define USART_CR1_DEAT_3 ((uint32_t)0x01000000U) /*!< Bit 3 */
  4999. #define USART_CR1_DEAT_4 ((uint32_t)0x02000000U) /*!< Bit 4 */
  5000. #define USART_CR1_RTOIE ((uint32_t)0x04000000U) /*!< Receive Time Out interrupt enable */
  5001. #define USART_CR1_EOBIE ((uint32_t)0x08000000U) /*!< End of Block interrupt enable */
  5002. #define USART_CR1_M1 ((uint32_t)0x10000000U) /*!< Word length bit 1 */
  5003. #define USART_CR1_M ((uint32_t)0x10001000U) /*!< [M1:M0] Word length */
  5004. /****************** Bit definition for USART_CR2 register *******************/
  5005. #define USART_CR2_ADDM7 ((uint32_t)0x00000010U) /*!< 7-bit or 4-bit Address Detection */
  5006. #define USART_CR2_LBDL ((uint32_t)0x00000020U) /*!< LIN Break Detection Length */
  5007. #define USART_CR2_LBDIE ((uint32_t)0x00000040U) /*!< LIN Break Detection Interrupt Enable */
  5008. #define USART_CR2_LBCL ((uint32_t)0x00000100U) /*!< Last Bit Clock pulse */
  5009. #define USART_CR2_CPHA ((uint32_t)0x00000200U) /*!< Clock Phase */
  5010. #define USART_CR2_CPOL ((uint32_t)0x00000400U) /*!< Clock Polarity */
  5011. #define USART_CR2_CLKEN ((uint32_t)0x00000800U) /*!< Clock Enable */
  5012. #define USART_CR2_STOP ((uint32_t)0x00003000U) /*!< STOP[1:0] bits (STOP bits) */
  5013. #define USART_CR2_STOP_0 ((uint32_t)0x00001000U) /*!< Bit 0 */
  5014. #define USART_CR2_STOP_1 ((uint32_t)0x00002000U) /*!< Bit 1 */
  5015. #define USART_CR2_LINEN ((uint32_t)0x00004000U) /*!< LIN mode enable */
  5016. #define USART_CR2_SWAP ((uint32_t)0x00008000U) /*!< SWAP TX/RX pins */
  5017. #define USART_CR2_RXINV ((uint32_t)0x00010000U) /*!< RX pin active level inversion */
  5018. #define USART_CR2_TXINV ((uint32_t)0x00020000U) /*!< TX pin active level inversion */
  5019. #define USART_CR2_DATAINV ((uint32_t)0x00040000U) /*!< Binary data inversion */
  5020. #define USART_CR2_MSBFIRST ((uint32_t)0x00080000U) /*!< Most Significant Bit First */
  5021. #define USART_CR2_ABREN ((uint32_t)0x00100000U) /*!< Auto Baud-Rate Enable*/
  5022. #define USART_CR2_ABRMODE ((uint32_t)0x00600000U) /*!< ABRMOD[1:0] bits (Auto Baud-Rate Mode) */
  5023. #define USART_CR2_ABRMODE_0 ((uint32_t)0x00200000U) /*!< Bit 0 */
  5024. #define USART_CR2_ABRMODE_1 ((uint32_t)0x00400000U) /*!< Bit 1 */
  5025. #define USART_CR2_RTOEN ((uint32_t)0x00800000U) /*!< Receiver Time-Out enable */
  5026. #define USART_CR2_ADD ((uint32_t)0xFF000000U) /*!< Address of the USART node */
  5027. /****************** Bit definition for USART_CR3 register *******************/
  5028. #define USART_CR3_EIE ((uint32_t)0x00000001U) /*!< Error Interrupt Enable */
  5029. #define USART_CR3_IREN ((uint32_t)0x00000002U) /*!< IrDA mode Enable */
  5030. #define USART_CR3_IRLP ((uint32_t)0x00000004U) /*!< IrDA Low-Power */
  5031. #define USART_CR3_HDSEL ((uint32_t)0x00000008U) /*!< Half-Duplex Selection */
  5032. #define USART_CR3_NACK ((uint32_t)0x00000010U) /*!< SmartCard NACK enable */
  5033. #define USART_CR3_SCEN ((uint32_t)0x00000020U) /*!< SmartCard mode enable */
  5034. #define USART_CR3_DMAR ((uint32_t)0x00000040U) /*!< DMA Enable Receiver */
  5035. #define USART_CR3_DMAT ((uint32_t)0x00000080U) /*!< DMA Enable Transmitter */
  5036. #define USART_CR3_RTSE ((uint32_t)0x00000100U) /*!< RTS Enable */
  5037. #define USART_CR3_CTSE ((uint32_t)0x00000200U) /*!< CTS Enable */
  5038. #define USART_CR3_CTSIE ((uint32_t)0x00000400U) /*!< CTS Interrupt Enable */
  5039. #define USART_CR3_ONEBIT ((uint32_t)0x00000800U) /*!< One sample bit method enable */
  5040. #define USART_CR3_OVRDIS ((uint32_t)0x00001000U) /*!< Overrun Disable */
  5041. #define USART_CR3_DDRE ((uint32_t)0x00002000U) /*!< DMA Disable on Reception Error */
  5042. #define USART_CR3_DEM ((uint32_t)0x00004000U) /*!< Driver Enable Mode */
  5043. #define USART_CR3_DEP ((uint32_t)0x00008000U) /*!< Driver Enable Polarity Selection */
  5044. #define USART_CR3_SCARCNT ((uint32_t)0x000E0000U) /*!< SCARCNT[2:0] bits (SmartCard Auto-Retry Count) */
  5045. #define USART_CR3_SCARCNT_0 ((uint32_t)0x00020000U) /*!< Bit 0 */
  5046. #define USART_CR3_SCARCNT_1 ((uint32_t)0x00040000U) /*!< Bit 1 */
  5047. #define USART_CR3_SCARCNT_2 ((uint32_t)0x00080000U) /*!< Bit 2 */
  5048. #define USART_CR3_WUS ((uint32_t)0x00300000U) /*!< WUS[1:0] bits (Wake UP Interrupt Flag Selection) */
  5049. #define USART_CR3_WUS_0 ((uint32_t)0x00100000U) /*!< Bit 0 */
  5050. #define USART_CR3_WUS_1 ((uint32_t)0x00200000U) /*!< Bit 1 */
  5051. #define USART_CR3_WUFIE ((uint32_t)0x00400000U) /*!< Wake Up Interrupt Enable */
  5052. /****************** Bit definition for USART_BRR register *******************/
  5053. #define USART_BRR_DIV_FRACTION ((uint32_t)0x0000000FU) /*!< Fraction of USARTDIV */
  5054. #define USART_BRR_DIV_MANTISSA ((uint32_t)0x0000FFF0U) /*!< Mantissa of USARTDIV */
  5055. /****************** Bit definition for USART_GTPR register ******************/
  5056. #define USART_GTPR_PSC ((uint32_t)0x000000FFU) /*!< PSC[7:0] bits (Prescaler value) */
  5057. #define USART_GTPR_GT ((uint32_t)0x0000FF00U) /*!< GT[7:0] bits (Guard time value) */
  5058. /******************* Bit definition for USART_RTOR register *****************/
  5059. #define USART_RTOR_RTO ((uint32_t)0x00FFFFFFU) /*!< Receiver Time Out Value */
  5060. #define USART_RTOR_BLEN ((uint32_t)0xFF000000U) /*!< Block Length */
  5061. /******************* Bit definition for USART_RQR register ******************/
  5062. #define USART_RQR_ABRRQ ((uint32_t)0x00000001U) /*!< Auto-Baud Rate Request */
  5063. #define USART_RQR_SBKRQ ((uint32_t)0x00000002U) /*!< Send Break Request */
  5064. #define USART_RQR_MMRQ ((uint32_t)0x00000004U) /*!< Mute Mode Request */
  5065. #define USART_RQR_RXFRQ ((uint32_t)0x00000008U) /*!< Receive Data flush Request */
  5066. #define USART_RQR_TXFRQ ((uint32_t)0x00000010U) /*!< Transmit data flush Request */
  5067. /******************* Bit definition for USART_ISR register ******************/
  5068. #define USART_ISR_PE ((uint32_t)0x00000001U) /*!< Parity Error */
  5069. #define USART_ISR_FE ((uint32_t)0x00000002U) /*!< Framing Error */
  5070. #define USART_ISR_NE ((uint32_t)0x00000004U) /*!< Noise detected Flag */
  5071. #define USART_ISR_ORE ((uint32_t)0x00000008U) /*!< OverRun Error */
  5072. #define USART_ISR_IDLE ((uint32_t)0x00000010U) /*!< IDLE line detected */
  5073. #define USART_ISR_RXNE ((uint32_t)0x00000020U) /*!< Read Data Register Not Empty */
  5074. #define USART_ISR_TC ((uint32_t)0x00000040U) /*!< Transmission Complete */
  5075. #define USART_ISR_TXE ((uint32_t)0x00000080U) /*!< Transmit Data Register Empty */
  5076. #define USART_ISR_LBDF ((uint32_t)0x00000100U) /*!< LIN Break Detection Flag */
  5077. #define USART_ISR_CTSIF ((uint32_t)0x00000200U) /*!< CTS interrupt flag */
  5078. #define USART_ISR_CTS ((uint32_t)0x00000400U) /*!< CTS flag */
  5079. #define USART_ISR_RTOF ((uint32_t)0x00000800U) /*!< Receiver Time Out */
  5080. #define USART_ISR_EOBF ((uint32_t)0x00001000U) /*!< End Of Block Flag */
  5081. #define USART_ISR_ABRE ((uint32_t)0x00004000U) /*!< Auto-Baud Rate Error */
  5082. #define USART_ISR_ABRF ((uint32_t)0x00008000U) /*!< Auto-Baud Rate Flag */
  5083. #define USART_ISR_BUSY ((uint32_t)0x00010000U) /*!< Busy Flag */
  5084. #define USART_ISR_CMF ((uint32_t)0x00020000U) /*!< Character Match Flag */
  5085. #define USART_ISR_SBKF ((uint32_t)0x00040000U) /*!< Send Break Flag */
  5086. #define USART_ISR_RWU ((uint32_t)0x00080000U) /*!< Receive Wake Up from mute mode Flag */
  5087. #define USART_ISR_WUF ((uint32_t)0x00100000U) /*!< Wake Up from stop mode Flag */
  5088. #define USART_ISR_TEACK ((uint32_t)0x00200000U) /*!< Transmit Enable Acknowledge Flag */
  5089. #define USART_ISR_REACK ((uint32_t)0x00400000U) /*!< Receive Enable Acknowledge Flag */
  5090. /******************* Bit definition for USART_ICR register ******************/
  5091. #define USART_ICR_PECF ((uint32_t)0x00000001U) /*!< Parity Error Clear Flag */
  5092. #define USART_ICR_FECF ((uint32_t)0x00000002U) /*!< Framing Error Clear Flag */
  5093. #define USART_ICR_NCF ((uint32_t)0x00000004U) /*!< Noise detected Clear Flag */
  5094. #define USART_ICR_ORECF ((uint32_t)0x00000008U) /*!< OverRun Error Clear Flag */
  5095. #define USART_ICR_IDLECF ((uint32_t)0x00000010U) /*!< IDLE line detected Clear Flag */
  5096. #define USART_ICR_TCCF ((uint32_t)0x00000040U) /*!< Transmission Complete Clear Flag */
  5097. #define USART_ICR_LBDCF ((uint32_t)0x00000100U) /*!< LIN Break Detection Clear Flag */
  5098. #define USART_ICR_CTSCF ((uint32_t)0x00000200U) /*!< CTS Interrupt Clear Flag */
  5099. #define USART_ICR_RTOCF ((uint32_t)0x00000800U) /*!< Receiver Time Out Clear Flag */
  5100. #define USART_ICR_EOBCF ((uint32_t)0x00001000U) /*!< End Of Block Clear Flag */
  5101. #define USART_ICR_CMCF ((uint32_t)0x00020000U) /*!< Character Match Clear Flag */
  5102. #define USART_ICR_WUCF ((uint32_t)0x00100000U) /*!< Wake Up from stop mode Clear Flag */
  5103. /******************* Bit definition for USART_RDR register ******************/
  5104. #define USART_RDR_RDR ((uint16_t)0x01FFU) /*!< RDR[8:0] bits (Receive Data value) */
  5105. /******************* Bit definition for USART_TDR register ******************/
  5106. #define USART_TDR_TDR ((uint16_t)0x01FFU) /*!< TDR[8:0] bits (Transmit Data value) */
  5107. /******************************************************************************/
  5108. /* */
  5109. /* Window WATCHDOG (WWDG) */
  5110. /* */
  5111. /******************************************************************************/
  5112. /******************* Bit definition for WWDG_CR register ********************/
  5113. #define WWDG_CR_T ((uint32_t)0x0000007FU) /*!< T[6:0] bits (7-Bit counter (MSB to LSB)) */
  5114. #define WWDG_CR_T_0 ((uint32_t)0x00000001U) /*!< Bit 0 */
  5115. #define WWDG_CR_T_1 ((uint32_t)0x00000002U) /*!< Bit 1 */
  5116. #define WWDG_CR_T_2 ((uint32_t)0x00000004U) /*!< Bit 2 */
  5117. #define WWDG_CR_T_3 ((uint32_t)0x00000008U) /*!< Bit 3 */
  5118. #define WWDG_CR_T_4 ((uint32_t)0x00000010U) /*!< Bit 4 */
  5119. #define WWDG_CR_T_5 ((uint32_t)0x00000020U) /*!< Bit 5 */
  5120. #define WWDG_CR_T_6 ((uint32_t)0x00000040U) /*!< Bit 6 */
  5121. /* Legacy defines */
  5122. #define WWDG_CR_T0 WWDG_CR_T_0
  5123. #define WWDG_CR_T1 WWDG_CR_T_1
  5124. #define WWDG_CR_T2 WWDG_CR_T_2
  5125. #define WWDG_CR_T3 WWDG_CR_T_3
  5126. #define WWDG_CR_T4 WWDG_CR_T_4
  5127. #define WWDG_CR_T5 WWDG_CR_T_5
  5128. #define WWDG_CR_T6 WWDG_CR_T_6
  5129. #define WWDG_CR_WDGA ((uint32_t)0x00000080U) /*!< Activation bit */
  5130. /******************* Bit definition for WWDG_CFR register *******************/
  5131. #define WWDG_CFR_W ((uint32_t)0x0000007FU) /*!< W[6:0] bits (7-bit window value) */
  5132. #define WWDG_CFR_W_0 ((uint32_t)0x00000001U) /*!< Bit 0 */
  5133. #define WWDG_CFR_W_1 ((uint32_t)0x00000002U) /*!< Bit 1 */
  5134. #define WWDG_CFR_W_2 ((uint32_t)0x00000004U) /*!< Bit 2 */
  5135. #define WWDG_CFR_W_3 ((uint32_t)0x00000008U) /*!< Bit 3 */
  5136. #define WWDG_CFR_W_4 ((uint32_t)0x00000010U) /*!< Bit 4 */
  5137. #define WWDG_CFR_W_5 ((uint32_t)0x00000020U) /*!< Bit 5 */
  5138. #define WWDG_CFR_W_6 ((uint32_t)0x00000040U) /*!< Bit 6 */
  5139. /* Legacy defines */
  5140. #define WWDG_CFR_W0 WWDG_CFR_W_0
  5141. #define WWDG_CFR_W1 WWDG_CFR_W_1
  5142. #define WWDG_CFR_W2 WWDG_CFR_W_2
  5143. #define WWDG_CFR_W3 WWDG_CFR_W_3
  5144. #define WWDG_CFR_W4 WWDG_CFR_W_4
  5145. #define WWDG_CFR_W5 WWDG_CFR_W_5
  5146. #define WWDG_CFR_W6 WWDG_CFR_W_6
  5147. #define WWDG_CFR_WDGTB ((uint32_t)0x00000180U) /*!< WDGTB[1:0] bits (Timer Base) */
  5148. #define WWDG_CFR_WDGTB_0 ((uint32_t)0x00000080U) /*!< Bit 0 */
  5149. #define WWDG_CFR_WDGTB_1 ((uint32_t)0x00000100U) /*!< Bit 1 */
  5150. /* Legacy defines */
  5151. #define WWDG_CFR_WDGTB0 WWDG_CFR_WDGTB_0
  5152. #define WWDG_CFR_WDGTB1 WWDG_CFR_WDGTB_1
  5153. #define WWDG_CFR_EWI ((uint32_t)0x00000200U) /*!< Early Wakeup Interrupt */
  5154. /******************* Bit definition for WWDG_SR register ********************/
  5155. #define WWDG_SR_EWIF ((uint32_t)0x00000001U) /*!< Early Wakeup Interrupt Flag */
  5156. /**
  5157. * @}
  5158. */
  5159. /**
  5160. * @}
  5161. */
  5162. /** @addtogroup Exported_macro
  5163. * @{
  5164. */
  5165. /****************************** ADC Instances *********************************/
  5166. #define IS_ADC_ALL_INSTANCE(INSTANCE) ((INSTANCE) == ADC1)
  5167. #define IS_ADC_COMMON_INSTANCE(INSTANCE) ((INSTANCE) == ADC)
  5168. /******************************* CAN Instances ********************************/
  5169. #define IS_CAN_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CAN)
  5170. /****************************** COMP Instances *********************************/
  5171. #define IS_COMP_ALL_INSTANCE(INSTANCE) (((INSTANCE) == COMP1) || \
  5172. ((INSTANCE) == COMP2))
  5173. #define IS_COMP_COMMON_INSTANCE(INSTANCE) ((INSTANCE) == COMP12_COMMON)
  5174. #define IS_COMP_DAC1SWITCH_INSTANCE(INSTANCE) ((INSTANCE) == COMP1)
  5175. #define IS_COMP_WINDOWMODE_INSTANCE(INSTANCE) ((INSTANCE) == COMP2)
  5176. /****************************** CEC Instances *********************************/
  5177. #define IS_CEC_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CEC)
  5178. /****************************** CRC Instances *********************************/
  5179. #define IS_CRC_ALL_INSTANCE(INSTANCE) ((INSTANCE) == CRC)
  5180. /******************************* DAC Instances ********************************/
  5181. #define IS_DAC_ALL_INSTANCE(INSTANCE) ((INSTANCE) == DAC1)
  5182. /******************************* DMA Instances ********************************/
  5183. #define IS_DMA_ALL_INSTANCE(INSTANCE) (((INSTANCE) == DMA1_Channel1) || \
  5184. ((INSTANCE) == DMA1_Channel2) || \
  5185. ((INSTANCE) == DMA1_Channel3) || \
  5186. ((INSTANCE) == DMA1_Channel4) || \
  5187. ((INSTANCE) == DMA1_Channel5) || \
  5188. ((INSTANCE) == DMA1_Channel6) || \
  5189. ((INSTANCE) == DMA1_Channel7) || \
  5190. ((INSTANCE) == DMA2_Channel1) || \
  5191. ((INSTANCE) == DMA2_Channel2) || \
  5192. ((INSTANCE) == DMA2_Channel3) || \
  5193. ((INSTANCE) == DMA2_Channel4) || \
  5194. ((INSTANCE) == DMA2_Channel5))
  5195. /****************************** GPIO Instances ********************************/
  5196. #define IS_GPIO_ALL_INSTANCE(INSTANCE) (((INSTANCE) == GPIOA) || \
  5197. ((INSTANCE) == GPIOB) || \
  5198. ((INSTANCE) == GPIOC) || \
  5199. ((INSTANCE) == GPIOD) || \
  5200. ((INSTANCE) == GPIOE) || \
  5201. ((INSTANCE) == GPIOF))
  5202. /**************************** GPIO Alternate Function Instances ***************/
  5203. #define IS_GPIO_AF_INSTANCE(INSTANCE) (((INSTANCE) == GPIOA) || \
  5204. ((INSTANCE) == GPIOB) || \
  5205. ((INSTANCE) == GPIOC) || \
  5206. ((INSTANCE) == GPIOD) || \
  5207. ((INSTANCE) == GPIOE) || \
  5208. ((INSTANCE) == GPIOF))
  5209. /****************************** GPIO Lock Instances ***************************/
  5210. #define IS_GPIO_LOCK_INSTANCE(INSTANCE) (((INSTANCE) == GPIOA) || \
  5211. ((INSTANCE) == GPIOB))
  5212. /****************************** I2C Instances *********************************/
  5213. #define IS_I2C_ALL_INSTANCE(INSTANCE) (((INSTANCE) == I2C1) || \
  5214. ((INSTANCE) == I2C2))
  5215. /****************************** I2S Instances *********************************/
  5216. #define IS_I2S_ALL_INSTANCE(INSTANCE) (((INSTANCE) == SPI1) || \
  5217. ((INSTANCE) == SPI2))
  5218. /****************************** IWDG Instances ********************************/
  5219. #define IS_IWDG_ALL_INSTANCE(INSTANCE) ((INSTANCE) == IWDG)
  5220. /****************************** RTC Instances *********************************/
  5221. #define IS_RTC_ALL_INSTANCE(INSTANCE) ((INSTANCE) == RTC)
  5222. /****************************** SMBUS Instances *********************************/
  5223. #define IS_SMBUS_ALL_INSTANCE(INSTANCE) ((INSTANCE) == I2C1)
  5224. /****************************** SPI Instances *********************************/
  5225. #define IS_SPI_ALL_INSTANCE(INSTANCE) (((INSTANCE) == SPI1) || \
  5226. ((INSTANCE) == SPI2))
  5227. /****************************** TIM Instances *********************************/
  5228. #define IS_TIM_INSTANCE(INSTANCE)\
  5229. (((INSTANCE) == TIM1) || \
  5230. ((INSTANCE) == TIM2) || \
  5231. ((INSTANCE) == TIM3) || \
  5232. ((INSTANCE) == TIM6) || \
  5233. ((INSTANCE) == TIM7) || \
  5234. ((INSTANCE) == TIM14) || \
  5235. ((INSTANCE) == TIM15) || \
  5236. ((INSTANCE) == TIM16) || \
  5237. ((INSTANCE) == TIM17))
  5238. #define IS_TIM_CC1_INSTANCE(INSTANCE)\
  5239. (((INSTANCE) == TIM1) || \
  5240. ((INSTANCE) == TIM2) || \
  5241. ((INSTANCE) == TIM3) || \
  5242. ((INSTANCE) == TIM14) || \
  5243. ((INSTANCE) == TIM15) || \
  5244. ((INSTANCE) == TIM16) || \
  5245. ((INSTANCE) == TIM17))
  5246. #define IS_TIM_CC2_INSTANCE(INSTANCE)\
  5247. (((INSTANCE) == TIM1) || \
  5248. ((INSTANCE) == TIM2) || \
  5249. ((INSTANCE) == TIM3) || \
  5250. ((INSTANCE) == TIM15))
  5251. #define IS_TIM_CC3_INSTANCE(INSTANCE)\
  5252. (((INSTANCE) == TIM1) || \
  5253. ((INSTANCE) == TIM2) || \
  5254. ((INSTANCE) == TIM3))
  5255. #define IS_TIM_CC4_INSTANCE(INSTANCE)\
  5256. (((INSTANCE) == TIM1) || \
  5257. ((INSTANCE) == TIM2) || \
  5258. ((INSTANCE) == TIM3))
  5259. #define IS_TIM_CLOCKSOURCE_ETRMODE1_INSTANCE(INSTANCE)\
  5260. (((INSTANCE) == TIM1) || \
  5261. ((INSTANCE) == TIM2) || \
  5262. ((INSTANCE) == TIM3))
  5263. #define IS_TIM_CLOCKSOURCE_ETRMODE2_INSTANCE(INSTANCE)\
  5264. (((INSTANCE) == TIM1) || \
  5265. ((INSTANCE) == TIM2) || \
  5266. ((INSTANCE) == TIM3))
  5267. #define IS_TIM_CLOCKSOURCE_TIX_INSTANCE(INSTANCE)\
  5268. (((INSTANCE) == TIM1) || \
  5269. ((INSTANCE) == TIM2) || \
  5270. ((INSTANCE) == TIM3) || \
  5271. ((INSTANCE) == TIM15))
  5272. #define IS_TIM_CLOCKSOURCE_ITRX_INSTANCE(INSTANCE)\
  5273. (((INSTANCE) == TIM1) || \
  5274. ((INSTANCE) == TIM2) || \
  5275. ((INSTANCE) == TIM3) || \
  5276. ((INSTANCE) == TIM15))
  5277. #define IS_TIM_OCXREF_CLEAR_INSTANCE(INSTANCE)\
  5278. (((INSTANCE) == TIM1) || \
  5279. ((INSTANCE) == TIM2) || \
  5280. ((INSTANCE) == TIM3))
  5281. #define IS_TIM_ENCODER_INTERFACE_INSTANCE(INSTANCE)\
  5282. (((INSTANCE) == TIM1) || \
  5283. ((INSTANCE) == TIM2) || \
  5284. ((INSTANCE) == TIM3))
  5285. #define IS_TIM_HALL_INTERFACE_INSTANCE(INSTANCE)\
  5286. (((INSTANCE) == TIM1))
  5287. #define IS_TIM_XOR_INSTANCE(INSTANCE)\
  5288. (((INSTANCE) == TIM1) || \
  5289. ((INSTANCE) == TIM2) || \
  5290. ((INSTANCE) == TIM3))
  5291. #define IS_TIM_MASTER_INSTANCE(INSTANCE)\
  5292. (((INSTANCE) == TIM1) || \
  5293. ((INSTANCE) == TIM2) || \
  5294. ((INSTANCE) == TIM3) || \
  5295. ((INSTANCE) == TIM6) || \
  5296. ((INSTANCE) == TIM7) || \
  5297. ((INSTANCE) == TIM15))
  5298. #define IS_TIM_SLAVE_INSTANCE(INSTANCE)\
  5299. (((INSTANCE) == TIM1) || \
  5300. ((INSTANCE) == TIM2) || \
  5301. ((INSTANCE) == TIM3) || \
  5302. ((INSTANCE) == TIM15))
  5303. #define IS_TIM_32B_COUNTER_INSTANCE(INSTANCE)\
  5304. ((INSTANCE) == TIM2)
  5305. #define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
  5306. (((INSTANCE) == TIM1) || \
  5307. ((INSTANCE) == TIM2) || \
  5308. ((INSTANCE) == TIM3) || \
  5309. ((INSTANCE) == TIM15) || \
  5310. ((INSTANCE) == TIM16) || \
  5311. ((INSTANCE) == TIM17))
  5312. #define IS_TIM_BREAK_INSTANCE(INSTANCE)\
  5313. (((INSTANCE) == TIM1) || \
  5314. ((INSTANCE) == TIM15) || \
  5315. ((INSTANCE) == TIM16) || \
  5316. ((INSTANCE) == TIM17))
  5317. #define IS_TIM_CCX_INSTANCE(INSTANCE, CHANNEL) \
  5318. ((((INSTANCE) == TIM1) && \
  5319. (((CHANNEL) == TIM_CHANNEL_1) || \
  5320. ((CHANNEL) == TIM_CHANNEL_2) || \
  5321. ((CHANNEL) == TIM_CHANNEL_3) || \
  5322. ((CHANNEL) == TIM_CHANNEL_4))) \
  5323. || \
  5324. (((INSTANCE) == TIM2) && \
  5325. (((CHANNEL) == TIM_CHANNEL_1) || \
  5326. ((CHANNEL) == TIM_CHANNEL_2) || \
  5327. ((CHANNEL) == TIM_CHANNEL_3) || \
  5328. ((CHANNEL) == TIM_CHANNEL_4))) \
  5329. || \
  5330. (((INSTANCE) == TIM3) && \
  5331. (((CHANNEL) == TIM_CHANNEL_1) || \
  5332. ((CHANNEL) == TIM_CHANNEL_2) || \
  5333. ((CHANNEL) == TIM_CHANNEL_3) || \
  5334. ((CHANNEL) == TIM_CHANNEL_4))) \
  5335. || \
  5336. (((INSTANCE) == TIM14) && \
  5337. (((CHANNEL) == TIM_CHANNEL_1))) \
  5338. || \
  5339. (((INSTANCE) == TIM15) && \
  5340. (((CHANNEL) == TIM_CHANNEL_1) || \
  5341. ((CHANNEL) == TIM_CHANNEL_2))) \
  5342. || \
  5343. (((INSTANCE) == TIM16) && \
  5344. (((CHANNEL) == TIM_CHANNEL_1))) \
  5345. || \
  5346. (((INSTANCE) == TIM17) && \
  5347. (((CHANNEL) == TIM_CHANNEL_1))))
  5348. #define IS_TIM_CCXN_INSTANCE(INSTANCE, CHANNEL) \
  5349. ((((INSTANCE) == TIM1) && \
  5350. (((CHANNEL) == TIM_CHANNEL_1) || \
  5351. ((CHANNEL) == TIM_CHANNEL_2) || \
  5352. ((CHANNEL) == TIM_CHANNEL_3))) \
  5353. || \
  5354. (((INSTANCE) == TIM15) && \
  5355. ((CHANNEL) == TIM_CHANNEL_1)) \
  5356. || \
  5357. (((INSTANCE) == TIM16) && \
  5358. ((CHANNEL) == TIM_CHANNEL_1)) \
  5359. || \
  5360. (((INSTANCE) == TIM17) && \
  5361. ((CHANNEL) == TIM_CHANNEL_1)))
  5362. #define IS_TIM_COUNTER_MODE_SELECT_INSTANCE(INSTANCE)\
  5363. (((INSTANCE) == TIM1) || \
  5364. ((INSTANCE) == TIM2) || \
  5365. ((INSTANCE) == TIM3))
  5366. #define IS_TIM_REPETITION_COUNTER_INSTANCE(INSTANCE)\
  5367. (((INSTANCE) == TIM1) || \
  5368. ((INSTANCE) == TIM15) || \
  5369. ((INSTANCE) == TIM16) || \
  5370. ((INSTANCE) == TIM17))
  5371. #define IS_TIM_CLOCK_DIVISION_INSTANCE(INSTANCE)\
  5372. (((INSTANCE) == TIM1) || \
  5373. ((INSTANCE) == TIM2) || \
  5374. ((INSTANCE) == TIM3) || \
  5375. ((INSTANCE) == TIM14) || \
  5376. ((INSTANCE) == TIM15) || \
  5377. ((INSTANCE) == TIM16) || \
  5378. ((INSTANCE) == TIM17))
  5379. #define IS_TIM_DMA_INSTANCE(INSTANCE)\
  5380. (((INSTANCE) == TIM1) || \
  5381. ((INSTANCE) == TIM2) || \
  5382. ((INSTANCE) == TIM3) || \
  5383. ((INSTANCE) == TIM6) || \
  5384. ((INSTANCE) == TIM7) || \
  5385. ((INSTANCE) == TIM15) || \
  5386. ((INSTANCE) == TIM16) || \
  5387. ((INSTANCE) == TIM17))
  5388. #define IS_TIM_DMA_CC_INSTANCE(INSTANCE)\
  5389. (((INSTANCE) == TIM1) || \
  5390. ((INSTANCE) == TIM2) || \
  5391. ((INSTANCE) == TIM3) || \
  5392. ((INSTANCE) == TIM15) || \
  5393. ((INSTANCE) == TIM16) || \
  5394. ((INSTANCE) == TIM17))
  5395. #define IS_TIM_COMMUTATION_EVENT_INSTANCE(INSTANCE)\
  5396. (((INSTANCE) == TIM1) || \
  5397. ((INSTANCE) == TIM15) || \
  5398. ((INSTANCE) == TIM16) || \
  5399. ((INSTANCE) == TIM17))
  5400. #define IS_TIM_REMAP_INSTANCE(INSTANCE)\
  5401. ((INSTANCE) == TIM14)
  5402. /****************************** TSC Instances *********************************/
  5403. #define IS_TSC_ALL_INSTANCE(INSTANCE) ((INSTANCE) == TSC)
  5404. /*********************** UART Instances : IRDA mode ***************************/
  5405. #define IS_IRDA_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  5406. ((INSTANCE) == USART2) || \
  5407. ((INSTANCE) == USART3))
  5408. /********************* UART Instances : Smard card mode ***********************/
  5409. #define IS_SMARTCARD_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  5410. ((INSTANCE) == USART2) || \
  5411. ((INSTANCE) == USART3))
  5412. /******************** USART Instances : Synchronous mode **********************/
  5413. #define IS_USART_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  5414. ((INSTANCE) == USART2) || \
  5415. ((INSTANCE) == USART3) || \
  5416. ((INSTANCE) == USART4) || \
  5417. ((INSTANCE) == USART5) || \
  5418. ((INSTANCE) == USART6) || \
  5419. ((INSTANCE) == USART7) || \
  5420. ((INSTANCE) == USART8))
  5421. /******************** USART Instances : auto Baud rate detection **************/
  5422. #define IS_USART_AUTOBAUDRATE_DETECTION_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  5423. ((INSTANCE) == USART2) || \
  5424. ((INSTANCE) == USART3))
  5425. /******************** UART Instances : Asynchronous mode **********************/
  5426. #define IS_UART_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  5427. ((INSTANCE) == USART2) || \
  5428. ((INSTANCE) == USART3) || \
  5429. ((INSTANCE) == USART4) || \
  5430. ((INSTANCE) == USART5) || \
  5431. ((INSTANCE) == USART6) || \
  5432. ((INSTANCE) == USART7) || \
  5433. ((INSTANCE) == USART8))
  5434. /******************** UART Instances : Half-Duplex mode **********************/
  5435. #define IS_UART_HALFDUPLEX_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  5436. ((INSTANCE) == USART2) || \
  5437. ((INSTANCE) == USART3) || \
  5438. ((INSTANCE) == USART4) || \
  5439. ((INSTANCE) == USART5) || \
  5440. ((INSTANCE) == USART6) || \
  5441. ((INSTANCE) == USART7) || \
  5442. ((INSTANCE) == USART8))
  5443. /****************** UART Instances : Hardware Flow control ********************/
  5444. #define IS_UART_HWFLOW_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  5445. ((INSTANCE) == USART2) || \
  5446. ((INSTANCE) == USART3) || \
  5447. ((INSTANCE) == USART4))
  5448. /****************** UART Instances : LIN mode ********************/
  5449. #define IS_UART_LIN_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  5450. ((INSTANCE) == USART2) || \
  5451. ((INSTANCE) == USART3))
  5452. /****************** UART Instances : wakeup from stop mode ********************/
  5453. #define IS_UART_WAKEUP_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  5454. ((INSTANCE) == USART2) || \
  5455. ((INSTANCE) == USART3))
  5456. /****************** UART Instances : Driver enable detection ********************/
  5457. #define IS_UART_DRIVER_ENABLE_INSTANCE(INSTANCE) (((INSTANCE) == USART1) || \
  5458. ((INSTANCE) == USART2) || \
  5459. ((INSTANCE) == USART3) || \
  5460. ((INSTANCE) == USART4) || \
  5461. ((INSTANCE) == USART5) || \
  5462. ((INSTANCE) == USART6) || \
  5463. ((INSTANCE) == USART7) || \
  5464. ((INSTANCE) == USART8))
  5465. /****************************** WWDG Instances ********************************/
  5466. #define IS_WWDG_ALL_INSTANCE(INSTANCE) ((INSTANCE) == WWDG)
  5467. /**
  5468. * @}
  5469. */
  5470. /******************************************************************************/
  5471. /* For a painless codes migration between the STM32F0xx device product */
  5472. /* lines, the aliases defined below are put in place to overcome the */
  5473. /* differences in the interrupt handlers and IRQn definitions. */
  5474. /* No need to update developed interrupt code when moving across */
  5475. /* product lines within the same STM32F0 Family */
  5476. /******************************************************************************/
  5477. /* Aliases for __IRQn */
  5478. #define ADC1_IRQn ADC1_COMP_IRQn
  5479. #define DMA1_Channel1_IRQn DMA1_Ch1_IRQn
  5480. #define DMA1_Channel2_3_IRQn DMA1_Ch2_3_DMA2_Ch1_2_IRQn
  5481. #define DMA1_Channel4_5_6_7_IRQn DMA1_Ch4_7_DMA2_Ch3_5_IRQn
  5482. #define DMA1_Channel4_5_IRQn DMA1_Ch4_7_DMA2_Ch3_5_IRQn
  5483. #define PVD_IRQn PVD_VDDIO2_IRQn
  5484. #define VDDIO2_IRQn PVD_VDDIO2_IRQn
  5485. #define RCC_IRQn RCC_CRS_IRQn
  5486. #define TIM6_IRQn TIM6_DAC_IRQn
  5487. #define USART3_4_IRQn USART3_8_IRQn
  5488. #define USART3_6_IRQn USART3_8_IRQn
  5489. /* Aliases for __IRQHandler */
  5490. #define ADC1_IRQHandler ADC1_COMP_IRQHandler
  5491. #define DMA1_Channel1_IRQHandler DMA1_Ch1_IRQHandler
  5492. #define DMA1_Channel2_3_IRQHandler DMA1_Ch2_3_DMA2_Ch1_2_IRQHandler
  5493. #define DMA1_Channel4_5_6_7_IRQHandler DMA1_Ch4_7_DMA2_Ch3_5_IRQHandler
  5494. #define DMA1_Channel4_5_IRQHandler DMA1_Ch4_7_DMA2_Ch3_5_IRQHandler
  5495. #define PVD_IRQHandler PVD_VDDIO2_IRQHandler
  5496. #define VDDIO2_IRQHandler PVD_VDDIO2_IRQHandler
  5497. #define RCC_IRQHandler RCC_CRS_IRQHandler
  5498. #define TIM6_IRQHandler TIM6_DAC_IRQHandler
  5499. #define USART3_4_IRQHandler USART3_8_IRQHandler
  5500. #define USART3_6_IRQHandler USART3_8_IRQHandler
  5501. #ifdef __cplusplus
  5502. }
  5503. #endif /* __cplusplus */
  5504. #endif /* __STM32F091xC_H */
  5505. /**
  5506. * @}
  5507. */
  5508. /**
  5509. * @}
  5510. */
  5511. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/