main.lst 273 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806
  1. build/main.elf: file format elf32-littlearm
  2. Disassembly of section .text:
  3. 080000c8 <SystemInit>:
  4. * SystemCoreClock variable.
  5. * @param None
  6. * @retval None
  7. */
  8. void SystemInit (void)
  9. {
  10. 80000c8: b580 push {r7, lr}
  11. 80000ca: af00 add r7, sp, #0
  12. /* Set HSION bit */
  13. RCC->CR |= (uint32_t)0x00000001;
  14. 80000cc: 4b1b ldr r3, [pc, #108] ; (800013c <SystemInit+0x74>)
  15. 80000ce: 4a1b ldr r2, [pc, #108] ; (800013c <SystemInit+0x74>)
  16. 80000d0: 6812 ldr r2, [r2, #0]
  17. 80000d2: 2101 movs r1, #1
  18. 80000d4: 430a orrs r2, r1
  19. 80000d6: 601a str r2, [r3, #0]
  20. #if defined(STM32F051)
  21. /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE and MCOSEL[2:0] bits */
  22. RCC->CFGR &= (uint32_t)0xF8FFB80C;
  23. #else
  24. /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE, MCOSEL[2:0], MCOPRE[2:0] and PLLNODIV bits */
  25. RCC->CFGR &= (uint32_t)0x08FFB80C;
  26. 80000d8: 4b18 ldr r3, [pc, #96] ; (800013c <SystemInit+0x74>)
  27. 80000da: 4a18 ldr r2, [pc, #96] ; (800013c <SystemInit+0x74>)
  28. 80000dc: 6852 ldr r2, [r2, #4]
  29. 80000de: 4918 ldr r1, [pc, #96] ; (8000140 <SystemInit+0x78>)
  30. 80000e0: 400a ands r2, r1
  31. 80000e2: 605a str r2, [r3, #4]
  32. #endif /* STM32F051 */
  33. /* Reset HSEON, CSSON and PLLON bits */
  34. RCC->CR &= (uint32_t)0xFEF6FFFF;
  35. 80000e4: 4b15 ldr r3, [pc, #84] ; (800013c <SystemInit+0x74>)
  36. 80000e6: 4a15 ldr r2, [pc, #84] ; (800013c <SystemInit+0x74>)
  37. 80000e8: 6812 ldr r2, [r2, #0]
  38. 80000ea: 4916 ldr r1, [pc, #88] ; (8000144 <SystemInit+0x7c>)
  39. 80000ec: 400a ands r2, r1
  40. 80000ee: 601a str r2, [r3, #0]
  41. /* Reset HSEBYP bit */
  42. RCC->CR &= (uint32_t)0xFFFBFFFF;
  43. 80000f0: 4b12 ldr r3, [pc, #72] ; (800013c <SystemInit+0x74>)
  44. 80000f2: 4a12 ldr r2, [pc, #72] ; (800013c <SystemInit+0x74>)
  45. 80000f4: 6812 ldr r2, [r2, #0]
  46. 80000f6: 4914 ldr r1, [pc, #80] ; (8000148 <SystemInit+0x80>)
  47. 80000f8: 400a ands r2, r1
  48. 80000fa: 601a str r2, [r3, #0]
  49. /* Reset PLLSRC, PLLXTPRE and PLLMUL[3:0] bits */
  50. RCC->CFGR &= (uint32_t)0xFFC0FFFF;
  51. 80000fc: 4b0f ldr r3, [pc, #60] ; (800013c <SystemInit+0x74>)
  52. 80000fe: 4a0f ldr r2, [pc, #60] ; (800013c <SystemInit+0x74>)
  53. 8000100: 6852 ldr r2, [r2, #4]
  54. 8000102: 4912 ldr r1, [pc, #72] ; (800014c <SystemInit+0x84>)
  55. 8000104: 400a ands r2, r1
  56. 8000106: 605a str r2, [r3, #4]
  57. /* Reset PREDIV1[3:0] bits */
  58. RCC->CFGR2 &= (uint32_t)0xFFFFFFF0;
  59. 8000108: 4b0c ldr r3, [pc, #48] ; (800013c <SystemInit+0x74>)
  60. 800010a: 4a0c ldr r2, [pc, #48] ; (800013c <SystemInit+0x74>)
  61. 800010c: 6ad2 ldr r2, [r2, #44] ; 0x2c
  62. 800010e: 210f movs r1, #15
  63. 8000110: 438a bics r2, r1
  64. 8000112: 62da str r2, [r3, #44] ; 0x2c
  65. /* Reset USARTSW[1:0], I2CSW, CECSW and ADCSW bits */
  66. RCC->CFGR3 &= (uint32_t)0xFFFFFEAC;
  67. 8000114: 4b09 ldr r3, [pc, #36] ; (800013c <SystemInit+0x74>)
  68. 8000116: 4a09 ldr r2, [pc, #36] ; (800013c <SystemInit+0x74>)
  69. 8000118: 6b12 ldr r2, [r2, #48] ; 0x30
  70. 800011a: 490d ldr r1, [pc, #52] ; (8000150 <SystemInit+0x88>)
  71. 800011c: 400a ands r2, r1
  72. 800011e: 631a str r2, [r3, #48] ; 0x30
  73. /* Reset HSI14 bit */
  74. RCC->CR2 &= (uint32_t)0xFFFFFFFE;
  75. 8000120: 4b06 ldr r3, [pc, #24] ; (800013c <SystemInit+0x74>)
  76. 8000122: 4a06 ldr r2, [pc, #24] ; (800013c <SystemInit+0x74>)
  77. 8000124: 6b52 ldr r2, [r2, #52] ; 0x34
  78. 8000126: 2101 movs r1, #1
  79. 8000128: 438a bics r2, r1
  80. 800012a: 635a str r2, [r3, #52] ; 0x34
  81. /* Disable all interrupts */
  82. RCC->CIR = 0x00000000;
  83. 800012c: 4b03 ldr r3, [pc, #12] ; (800013c <SystemInit+0x74>)
  84. 800012e: 2200 movs r2, #0
  85. 8000130: 609a str r2, [r3, #8]
  86. /* Configure the System clock frequency, AHB/APBx prescalers and Flash settings */
  87. SetSysClock();
  88. 8000132: f000 f879 bl 8000228 <SetSysClock>
  89. }
  90. 8000136: 46bd mov sp, r7
  91. 8000138: bd80 pop {r7, pc}
  92. 800013a: 46c0 nop ; (mov r8, r8)
  93. 800013c: 40021000 .word 0x40021000
  94. 8000140: 08ffb80c .word 0x08ffb80c
  95. 8000144: fef6ffff .word 0xfef6ffff
  96. 8000148: fffbffff .word 0xfffbffff
  97. 800014c: ffc0ffff .word 0xffc0ffff
  98. 8000150: fffffeac .word 0xfffffeac
  99. 08000154 <SystemCoreClockUpdate>:
  100. * value for HSE crystal.
  101. * @param None
  102. * @retval None
  103. */
  104. void SystemCoreClockUpdate (void)
  105. {
  106. 8000154: b580 push {r7, lr}
  107. 8000156: b084 sub sp, #16
  108. 8000158: af00 add r7, sp, #0
  109. uint32_t tmp = 0, pllmull = 0, pllsource = 0, prediv1factor = 0;
  110. 800015a: 2300 movs r3, #0
  111. 800015c: 60fb str r3, [r7, #12]
  112. 800015e: 2300 movs r3, #0
  113. 8000160: 60bb str r3, [r7, #8]
  114. 8000162: 2300 movs r3, #0
  115. 8000164: 607b str r3, [r7, #4]
  116. 8000166: 2300 movs r3, #0
  117. 8000168: 603b str r3, [r7, #0]
  118. /* Get SYSCLK source -------------------------------------------------------*/
  119. tmp = RCC->CFGR & RCC_CFGR_SWS;
  120. 800016a: 4b2a ldr r3, [pc, #168] ; (8000214 <SystemCoreClockUpdate+0xc0>)
  121. 800016c: 685b ldr r3, [r3, #4]
  122. 800016e: 220c movs r2, #12
  123. 8000170: 4013 ands r3, r2
  124. 8000172: 60fb str r3, [r7, #12]
  125. switch (tmp)
  126. 8000174: 68fb ldr r3, [r7, #12]
  127. 8000176: 2b04 cmp r3, #4
  128. 8000178: d007 beq.n 800018a <SystemCoreClockUpdate+0x36>
  129. 800017a: 2b08 cmp r3, #8
  130. 800017c: d009 beq.n 8000192 <SystemCoreClockUpdate+0x3e>
  131. 800017e: 2b00 cmp r3, #0
  132. 8000180: d131 bne.n 80001e6 <SystemCoreClockUpdate+0x92>
  133. {
  134. case 0x00: /* HSI used as system clock */
  135. SystemCoreClock = HSI_VALUE;
  136. 8000182: 4b25 ldr r3, [pc, #148] ; (8000218 <SystemCoreClockUpdate+0xc4>)
  137. 8000184: 4a25 ldr r2, [pc, #148] ; (800021c <SystemCoreClockUpdate+0xc8>)
  138. 8000186: 601a str r2, [r3, #0]
  139. break;
  140. 8000188: e031 b.n 80001ee <SystemCoreClockUpdate+0x9a>
  141. case 0x04: /* HSE used as system clock */
  142. SystemCoreClock = HSE_VALUE;
  143. 800018a: 4b23 ldr r3, [pc, #140] ; (8000218 <SystemCoreClockUpdate+0xc4>)
  144. 800018c: 4a23 ldr r2, [pc, #140] ; (800021c <SystemCoreClockUpdate+0xc8>)
  145. 800018e: 601a str r2, [r3, #0]
  146. break;
  147. 8000190: e02d b.n 80001ee <SystemCoreClockUpdate+0x9a>
  148. case 0x08: /* PLL used as system clock */
  149. /* Get PLL clock source and multiplication factor ----------------------*/
  150. pllmull = RCC->CFGR & RCC_CFGR_PLLMULL;
  151. 8000192: 4b20 ldr r3, [pc, #128] ; (8000214 <SystemCoreClockUpdate+0xc0>)
  152. 8000194: 685a ldr r2, [r3, #4]
  153. 8000196: 23f0 movs r3, #240 ; 0xf0
  154. 8000198: 039b lsls r3, r3, #14
  155. 800019a: 4013 ands r3, r2
  156. 800019c: 60bb str r3, [r7, #8]
  157. pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
  158. 800019e: 4b1d ldr r3, [pc, #116] ; (8000214 <SystemCoreClockUpdate+0xc0>)
  159. 80001a0: 685a ldr r2, [r3, #4]
  160. 80001a2: 23c0 movs r3, #192 ; 0xc0
  161. 80001a4: 025b lsls r3, r3, #9
  162. 80001a6: 4013 ands r3, r2
  163. 80001a8: 607b str r3, [r7, #4]
  164. pllmull = ( pllmull >> 18) + 2;
  165. 80001aa: 68bb ldr r3, [r7, #8]
  166. 80001ac: 0c9b lsrs r3, r3, #18
  167. 80001ae: 3302 adds r3, #2
  168. 80001b0: 60bb str r3, [r7, #8]
  169. if (pllsource == 0x00)
  170. 80001b2: 687b ldr r3, [r7, #4]
  171. 80001b4: 2b00 cmp r3, #0
  172. 80001b6: d105 bne.n 80001c4 <SystemCoreClockUpdate+0x70>
  173. {
  174. /* HSI oscillator clock divided by 2 selected as PLL clock entry */
  175. SystemCoreClock = (HSI_VALUE >> 1) * pllmull;
  176. 80001b8: 68bb ldr r3, [r7, #8]
  177. 80001ba: 4a19 ldr r2, [pc, #100] ; (8000220 <SystemCoreClockUpdate+0xcc>)
  178. 80001bc: 435a muls r2, r3
  179. 80001be: 4b16 ldr r3, [pc, #88] ; (8000218 <SystemCoreClockUpdate+0xc4>)
  180. 80001c0: 601a str r2, [r3, #0]
  181. {
  182. prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1;
  183. /* HSE oscillator clock selected as PREDIV1 clock entry */
  184. SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
  185. }
  186. break;
  187. 80001c2: e014 b.n 80001ee <SystemCoreClockUpdate+0x9a>
  188. /* HSI oscillator clock divided by 2 selected as PLL clock entry */
  189. SystemCoreClock = (HSI_VALUE >> 1) * pllmull;
  190. }
  191. else
  192. {
  193. prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1;
  194. 80001c4: 4b13 ldr r3, [pc, #76] ; (8000214 <SystemCoreClockUpdate+0xc0>)
  195. 80001c6: 6adb ldr r3, [r3, #44] ; 0x2c
  196. 80001c8: 220f movs r2, #15
  197. 80001ca: 4013 ands r3, r2
  198. 80001cc: 3301 adds r3, #1
  199. 80001ce: 603b str r3, [r7, #0]
  200. /* HSE oscillator clock selected as PREDIV1 clock entry */
  201. SystemCoreClock = (HSE_VALUE / prediv1factor) * pllmull;
  202. 80001d0: 4812 ldr r0, [pc, #72] ; (800021c <SystemCoreClockUpdate+0xc8>)
  203. 80001d2: 6839 ldr r1, [r7, #0]
  204. 80001d4: f002 faa8 bl 8002728 <____aeabi_uidiv_from_thumb>
  205. 80001d8: 1c03 adds r3, r0, #0
  206. 80001da: 1c1a adds r2, r3, #0
  207. 80001dc: 68bb ldr r3, [r7, #8]
  208. 80001de: 435a muls r2, r3
  209. 80001e0: 4b0d ldr r3, [pc, #52] ; (8000218 <SystemCoreClockUpdate+0xc4>)
  210. 80001e2: 601a str r2, [r3, #0]
  211. }
  212. break;
  213. 80001e4: e003 b.n 80001ee <SystemCoreClockUpdate+0x9a>
  214. default: /* HSI used as system clock */
  215. SystemCoreClock = HSI_VALUE;
  216. 80001e6: 4b0c ldr r3, [pc, #48] ; (8000218 <SystemCoreClockUpdate+0xc4>)
  217. 80001e8: 4a0c ldr r2, [pc, #48] ; (800021c <SystemCoreClockUpdate+0xc8>)
  218. 80001ea: 601a str r2, [r3, #0]
  219. break;
  220. 80001ec: 46c0 nop ; (mov r8, r8)
  221. }
  222. /* Compute HCLK clock frequency ----------------*/
  223. /* Get HCLK prescaler */
  224. tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
  225. 80001ee: 4b09 ldr r3, [pc, #36] ; (8000214 <SystemCoreClockUpdate+0xc0>)
  226. 80001f0: 685b ldr r3, [r3, #4]
  227. 80001f2: 22f0 movs r2, #240 ; 0xf0
  228. 80001f4: 4013 ands r3, r2
  229. 80001f6: 091b lsrs r3, r3, #4
  230. 80001f8: 4a0a ldr r2, [pc, #40] ; (8000224 <SystemCoreClockUpdate+0xd0>)
  231. 80001fa: 5cd3 ldrb r3, [r2, r3]
  232. 80001fc: b2db uxtb r3, r3
  233. 80001fe: 60fb str r3, [r7, #12]
  234. /* HCLK clock frequency */
  235. SystemCoreClock >>= tmp;
  236. 8000200: 4b05 ldr r3, [pc, #20] ; (8000218 <SystemCoreClockUpdate+0xc4>)
  237. 8000202: 681a ldr r2, [r3, #0]
  238. 8000204: 68fb ldr r3, [r7, #12]
  239. 8000206: 40da lsrs r2, r3
  240. 8000208: 4b03 ldr r3, [pc, #12] ; (8000218 <SystemCoreClockUpdate+0xc4>)
  241. 800020a: 601a str r2, [r3, #0]
  242. }
  243. 800020c: 46bd mov sp, r7
  244. 800020e: b004 add sp, #16
  245. 8000210: bd80 pop {r7, pc}
  246. 8000212: 46c0 nop ; (mov r8, r8)
  247. 8000214: 40021000 .word 0x40021000
  248. 8000218: 20000000 .word 0x20000000
  249. 800021c: 007a1200 .word 0x007a1200
  250. 8000220: 003d0900 .word 0x003d0900
  251. 8000224: 20000004 .word 0x20000004
  252. 08000228 <SetSysClock>:
  253. * is reset to the default reset state (done in SystemInit() function).
  254. * @param None
  255. * @retval None
  256. */
  257. static void SetSysClock(void)
  258. {
  259. 8000228: b580 push {r7, lr}
  260. 800022a: b082 sub sp, #8
  261. 800022c: af00 add r7, sp, #0
  262. __IO uint32_t StartUpCounter = 0, HSEStatus = 0;
  263. 800022e: 2300 movs r3, #0
  264. 8000230: 607b str r3, [r7, #4]
  265. 8000232: 2300 movs r3, #0
  266. 8000234: 603b str r3, [r7, #0]
  267. /* PLL (clocked by HSE) used as System clock source */
  268. /******************************************************************************/
  269. /* SYSCLK, HCLK, PCLK configuration ----------------------------------------*/
  270. /* Enable HSE */
  271. RCC->CR |= ((uint32_t)RCC_CR_HSEON);
  272. 8000236: 4b31 ldr r3, [pc, #196] ; (80002fc <SetSysClock+0xd4>)
  273. 8000238: 4a30 ldr r2, [pc, #192] ; (80002fc <SetSysClock+0xd4>)
  274. 800023a: 6812 ldr r2, [r2, #0]
  275. 800023c: 2180 movs r1, #128 ; 0x80
  276. 800023e: 0249 lsls r1, r1, #9
  277. 8000240: 430a orrs r2, r1
  278. 8000242: 601a str r2, [r3, #0]
  279. /* Wait till HSE is ready and if Time out is reached exit */
  280. do
  281. {
  282. HSEStatus = RCC->CR & RCC_CR_HSERDY;
  283. 8000244: 4b2d ldr r3, [pc, #180] ; (80002fc <SetSysClock+0xd4>)
  284. 8000246: 681a ldr r2, [r3, #0]
  285. 8000248: 2380 movs r3, #128 ; 0x80
  286. 800024a: 029b lsls r3, r3, #10
  287. 800024c: 4013 ands r3, r2
  288. 800024e: 603b str r3, [r7, #0]
  289. StartUpCounter++;
  290. 8000250: 687b ldr r3, [r7, #4]
  291. 8000252: 3301 adds r3, #1
  292. 8000254: 607b str r3, [r7, #4]
  293. } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT));
  294. 8000256: 683b ldr r3, [r7, #0]
  295. 8000258: 2b00 cmp r3, #0
  296. 800025a: d104 bne.n 8000266 <SetSysClock+0x3e>
  297. 800025c: 687a ldr r2, [r7, #4]
  298. 800025e: 23a0 movs r3, #160 ; 0xa0
  299. 8000260: 01db lsls r3, r3, #7
  300. 8000262: 429a cmp r2, r3
  301. 8000264: d1ee bne.n 8000244 <SetSysClock+0x1c>
  302. if ((RCC->CR & RCC_CR_HSERDY) != RESET)
  303. 8000266: 4b25 ldr r3, [pc, #148] ; (80002fc <SetSysClock+0xd4>)
  304. 8000268: 681a ldr r2, [r3, #0]
  305. 800026a: 2380 movs r3, #128 ; 0x80
  306. 800026c: 029b lsls r3, r3, #10
  307. 800026e: 4013 ands r3, r2
  308. 8000270: d002 beq.n 8000278 <SetSysClock+0x50>
  309. {
  310. HSEStatus = (uint32_t)0x01;
  311. 8000272: 2301 movs r3, #1
  312. 8000274: 603b str r3, [r7, #0]
  313. 8000276: e001 b.n 800027c <SetSysClock+0x54>
  314. }
  315. else
  316. {
  317. HSEStatus = (uint32_t)0x00;
  318. 8000278: 2300 movs r3, #0
  319. 800027a: 603b str r3, [r7, #0]
  320. }
  321. if (HSEStatus == (uint32_t)0x01)
  322. 800027c: 683b ldr r3, [r7, #0]
  323. 800027e: 2b01 cmp r3, #1
  324. 8000280: d138 bne.n 80002f4 <SetSysClock+0xcc>
  325. {
  326. /* Enable Prefetch Buffer and set Flash Latency */
  327. FLASH->ACR = FLASH_ACR_PRFTBE | FLASH_ACR_LATENCY;
  328. 8000282: 4b1f ldr r3, [pc, #124] ; (8000300 <SetSysClock+0xd8>)
  329. 8000284: 2211 movs r2, #17
  330. 8000286: 601a str r2, [r3, #0]
  331. /* HCLK = SYSCLK */
  332. RCC->CFGR |= (uint32_t)RCC_CFGR_HPRE_DIV1;
  333. 8000288: 4b1c ldr r3, [pc, #112] ; (80002fc <SetSysClock+0xd4>)
  334. 800028a: 4a1c ldr r2, [pc, #112] ; (80002fc <SetSysClock+0xd4>)
  335. 800028c: 6852 ldr r2, [r2, #4]
  336. 800028e: 605a str r2, [r3, #4]
  337. /* PCLK = HCLK */
  338. RCC->CFGR |= (uint32_t)RCC_CFGR_PPRE_DIV1;
  339. 8000290: 4b1a ldr r3, [pc, #104] ; (80002fc <SetSysClock+0xd4>)
  340. 8000292: 4a1a ldr r2, [pc, #104] ; (80002fc <SetSysClock+0xd4>)
  341. 8000294: 6852 ldr r2, [r2, #4]
  342. 8000296: 605a str r2, [r3, #4]
  343. /* PLL configuration */
  344. RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLXTPRE | RCC_CFGR_PLLMULL));
  345. 8000298: 4b18 ldr r3, [pc, #96] ; (80002fc <SetSysClock+0xd4>)
  346. 800029a: 4a18 ldr r2, [pc, #96] ; (80002fc <SetSysClock+0xd4>)
  347. 800029c: 6852 ldr r2, [r2, #4]
  348. 800029e: 4919 ldr r1, [pc, #100] ; (8000304 <SetSysClock+0xdc>)
  349. 80002a0: 400a ands r2, r1
  350. 80002a2: 605a str r2, [r3, #4]
  351. RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_PREDIV1 | RCC_CFGR_PLLXTPRE_PREDIV1 | RCC_CFGR_PLLMULL6);
  352. 80002a4: 4b15 ldr r3, [pc, #84] ; (80002fc <SetSysClock+0xd4>)
  353. 80002a6: 4a15 ldr r2, [pc, #84] ; (80002fc <SetSysClock+0xd4>)
  354. 80002a8: 6852 ldr r2, [r2, #4]
  355. 80002aa: 2188 movs r1, #136 ; 0x88
  356. 80002ac: 0349 lsls r1, r1, #13
  357. 80002ae: 430a orrs r2, r1
  358. 80002b0: 605a str r2, [r3, #4]
  359. /* Enable PLL */
  360. RCC->CR |= RCC_CR_PLLON;
  361. 80002b2: 4b12 ldr r3, [pc, #72] ; (80002fc <SetSysClock+0xd4>)
  362. 80002b4: 4a11 ldr r2, [pc, #68] ; (80002fc <SetSysClock+0xd4>)
  363. 80002b6: 6812 ldr r2, [r2, #0]
  364. 80002b8: 2180 movs r1, #128 ; 0x80
  365. 80002ba: 0449 lsls r1, r1, #17
  366. 80002bc: 430a orrs r2, r1
  367. 80002be: 601a str r2, [r3, #0]
  368. /* Wait till PLL is ready */
  369. while((RCC->CR & RCC_CR_PLLRDY) == 0)
  370. 80002c0: 46c0 nop ; (mov r8, r8)
  371. 80002c2: 4b0e ldr r3, [pc, #56] ; (80002fc <SetSysClock+0xd4>)
  372. 80002c4: 681a ldr r2, [r3, #0]
  373. 80002c6: 2380 movs r3, #128 ; 0x80
  374. 80002c8: 049b lsls r3, r3, #18
  375. 80002ca: 4013 ands r3, r2
  376. 80002cc: d0f9 beq.n 80002c2 <SetSysClock+0x9a>
  377. {
  378. }
  379. /* Select PLL as system clock source */
  380. RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
  381. 80002ce: 4b0b ldr r3, [pc, #44] ; (80002fc <SetSysClock+0xd4>)
  382. 80002d0: 4a0a ldr r2, [pc, #40] ; (80002fc <SetSysClock+0xd4>)
  383. 80002d2: 6852 ldr r2, [r2, #4]
  384. 80002d4: 2103 movs r1, #3
  385. 80002d6: 438a bics r2, r1
  386. 80002d8: 605a str r2, [r3, #4]
  387. RCC->CFGR |= (uint32_t)RCC_CFGR_SW_PLL;
  388. 80002da: 4b08 ldr r3, [pc, #32] ; (80002fc <SetSysClock+0xd4>)
  389. 80002dc: 4a07 ldr r2, [pc, #28] ; (80002fc <SetSysClock+0xd4>)
  390. 80002de: 6852 ldr r2, [r2, #4]
  391. 80002e0: 2102 movs r1, #2
  392. 80002e2: 430a orrs r2, r1
  393. 80002e4: 605a str r2, [r3, #4]
  394. /* Wait till PLL is used as system clock source */
  395. while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)RCC_CFGR_SWS_PLL)
  396. 80002e6: 46c0 nop ; (mov r8, r8)
  397. 80002e8: 4b04 ldr r3, [pc, #16] ; (80002fc <SetSysClock+0xd4>)
  398. 80002ea: 685b ldr r3, [r3, #4]
  399. 80002ec: 220c movs r2, #12
  400. 80002ee: 4013 ands r3, r2
  401. 80002f0: 2b08 cmp r3, #8
  402. 80002f2: d1f9 bne.n 80002e8 <SetSysClock+0xc0>
  403. }
  404. else
  405. { /* If HSE fails to start-up, the application will have wrong clock
  406. configuration. User can add here some code to deal with this error */
  407. }
  408. }
  409. 80002f4: 46bd mov sp, r7
  410. 80002f6: b002 add sp, #8
  411. 80002f8: bd80 pop {r7, pc}
  412. 80002fa: 46c0 nop ; (mov r8, r8)
  413. 80002fc: 40021000 .word 0x40021000
  414. 8000300: 40022000 .word 0x40022000
  415. 8000304: ffc07fff .word 0xffc07fff
  416. 08000308 <RCC_DeInit>:
  417. * @note LSI, LSE and RTC clocks
  418. * @param None
  419. * @retval None
  420. */
  421. void RCC_DeInit(void)
  422. {
  423. 8000308: b580 push {r7, lr}
  424. 800030a: af00 add r7, sp, #0
  425. /* Set HSION bit */
  426. RCC->CR |= (uint32_t)0x00000001;
  427. 800030c: 4b1a ldr r3, [pc, #104] ; (8000378 <RCC_DeInit+0x70>)
  428. 800030e: 4a1a ldr r2, [pc, #104] ; (8000378 <RCC_DeInit+0x70>)
  429. 8000310: 6812 ldr r2, [r2, #0]
  430. 8000312: 2101 movs r1, #1
  431. 8000314: 430a orrs r2, r1
  432. 8000316: 601a str r2, [r3, #0]
  433. #if defined (STM32F051)
  434. /* Reset SW[1:0], HPRE[3:0], PPRE[2:0] and MCOSEL[2:0] bits */
  435. RCC->CFGR &= (uint32_t)0xF8FFB80C;
  436. #else
  437. /* Reset SW[1:0], HPRE[3:0], PPRE[2:0], ADCPRE, MCOSEL[2:0], MCOPRE[2:0] and PLLNODIV bits */
  438. RCC->CFGR &= (uint32_t)0x08FFB80C;
  439. 8000318: 4b17 ldr r3, [pc, #92] ; (8000378 <RCC_DeInit+0x70>)
  440. 800031a: 4a17 ldr r2, [pc, #92] ; (8000378 <RCC_DeInit+0x70>)
  441. 800031c: 6852 ldr r2, [r2, #4]
  442. 800031e: 4917 ldr r1, [pc, #92] ; (800037c <RCC_DeInit+0x74>)
  443. 8000320: 400a ands r2, r1
  444. 8000322: 605a str r2, [r3, #4]
  445. #endif /* STM32F051 */
  446. /* Reset HSEON, CSSON and PLLON bits */
  447. RCC->CR &= (uint32_t)0xFEF6FFFF;
  448. 8000324: 4b14 ldr r3, [pc, #80] ; (8000378 <RCC_DeInit+0x70>)
  449. 8000326: 4a14 ldr r2, [pc, #80] ; (8000378 <RCC_DeInit+0x70>)
  450. 8000328: 6812 ldr r2, [r2, #0]
  451. 800032a: 4915 ldr r1, [pc, #84] ; (8000380 <RCC_DeInit+0x78>)
  452. 800032c: 400a ands r2, r1
  453. 800032e: 601a str r2, [r3, #0]
  454. /* Reset HSEBYP bit */
  455. RCC->CR &= (uint32_t)0xFFFBFFFF;
  456. 8000330: 4b11 ldr r3, [pc, #68] ; (8000378 <RCC_DeInit+0x70>)
  457. 8000332: 4a11 ldr r2, [pc, #68] ; (8000378 <RCC_DeInit+0x70>)
  458. 8000334: 6812 ldr r2, [r2, #0]
  459. 8000336: 4913 ldr r1, [pc, #76] ; (8000384 <RCC_DeInit+0x7c>)
  460. 8000338: 400a ands r2, r1
  461. 800033a: 601a str r2, [r3, #0]
  462. /* Reset PLLSRC, PLLXTPRE and PLLMUL[3:0] bits */
  463. RCC->CFGR &= (uint32_t)0xFFC0FFFF;
  464. 800033c: 4b0e ldr r3, [pc, #56] ; (8000378 <RCC_DeInit+0x70>)
  465. 800033e: 4a0e ldr r2, [pc, #56] ; (8000378 <RCC_DeInit+0x70>)
  466. 8000340: 6852 ldr r2, [r2, #4]
  467. 8000342: 4911 ldr r1, [pc, #68] ; (8000388 <RCC_DeInit+0x80>)
  468. 8000344: 400a ands r2, r1
  469. 8000346: 605a str r2, [r3, #4]
  470. /* Reset PREDIV1[3:0] bits */
  471. RCC->CFGR2 &= (uint32_t)0xFFFFFFF0;
  472. 8000348: 4b0b ldr r3, [pc, #44] ; (8000378 <RCC_DeInit+0x70>)
  473. 800034a: 4a0b ldr r2, [pc, #44] ; (8000378 <RCC_DeInit+0x70>)
  474. 800034c: 6ad2 ldr r2, [r2, #44] ; 0x2c
  475. 800034e: 210f movs r1, #15
  476. 8000350: 438a bics r2, r1
  477. 8000352: 62da str r2, [r3, #44] ; 0x2c
  478. /* Reset USARTSW[1:0], I2CSW, CECSW and ADCSW bits */
  479. RCC->CFGR3 &= (uint32_t)0xFFF0FEAC;
  480. 8000354: 4b08 ldr r3, [pc, #32] ; (8000378 <RCC_DeInit+0x70>)
  481. 8000356: 4a08 ldr r2, [pc, #32] ; (8000378 <RCC_DeInit+0x70>)
  482. 8000358: 6b12 ldr r2, [r2, #48] ; 0x30
  483. 800035a: 490c ldr r1, [pc, #48] ; (800038c <RCC_DeInit+0x84>)
  484. 800035c: 400a ands r2, r1
  485. 800035e: 631a str r2, [r3, #48] ; 0x30
  486. /* Reset HSI14 bit */
  487. RCC->CR2 &= (uint32_t)0xFFFFFFFE;
  488. 8000360: 4b05 ldr r3, [pc, #20] ; (8000378 <RCC_DeInit+0x70>)
  489. 8000362: 4a05 ldr r2, [pc, #20] ; (8000378 <RCC_DeInit+0x70>)
  490. 8000364: 6b52 ldr r2, [r2, #52] ; 0x34
  491. 8000366: 2101 movs r1, #1
  492. 8000368: 438a bics r2, r1
  493. 800036a: 635a str r2, [r3, #52] ; 0x34
  494. /* Disable all interrupts */
  495. RCC->CIR = 0x00000000;
  496. 800036c: 4b02 ldr r3, [pc, #8] ; (8000378 <RCC_DeInit+0x70>)
  497. 800036e: 2200 movs r2, #0
  498. 8000370: 609a str r2, [r3, #8]
  499. }
  500. 8000372: 46bd mov sp, r7
  501. 8000374: bd80 pop {r7, pc}
  502. 8000376: 46c0 nop ; (mov r8, r8)
  503. 8000378: 40021000 .word 0x40021000
  504. 800037c: 08ffb80c .word 0x08ffb80c
  505. 8000380: fef6ffff .word 0xfef6ffff
  506. 8000384: fffbffff .word 0xfffbffff
  507. 8000388: ffc0ffff .word 0xffc0ffff
  508. 800038c: fff0feac .word 0xfff0feac
  509. 08000390 <RCC_HSEConfig>:
  510. * @arg RCC_HSE_ON: turn ON the HSE oscillator
  511. * @arg RCC_HSE_Bypass: HSE oscillator bypassed with external clock
  512. * @retval None
  513. */
  514. void RCC_HSEConfig(uint8_t RCC_HSE)
  515. {
  516. 8000390: b580 push {r7, lr}
  517. 8000392: b082 sub sp, #8
  518. 8000394: af00 add r7, sp, #0
  519. 8000396: 1c02 adds r2, r0, #0
  520. 8000398: 1dfb adds r3, r7, #7
  521. 800039a: 701a strb r2, [r3, #0]
  522. /* Check the parameters */
  523. assert_param(IS_RCC_HSE(RCC_HSE));
  524. /* Reset HSEON and HSEBYP bits before configuring the HSE ------------------*/
  525. *(__IO uint8_t *) CR_BYTE2_ADDRESS = RCC_HSE_OFF;
  526. 800039c: 4b04 ldr r3, [pc, #16] ; (80003b0 <RCC_HSEConfig+0x20>)
  527. 800039e: 2200 movs r2, #0
  528. 80003a0: 701a strb r2, [r3, #0]
  529. /* Set the new HSE configuration -------------------------------------------*/
  530. *(__IO uint8_t *) CR_BYTE2_ADDRESS = RCC_HSE;
  531. 80003a2: 4a03 ldr r2, [pc, #12] ; (80003b0 <RCC_HSEConfig+0x20>)
  532. 80003a4: 1dfb adds r3, r7, #7
  533. 80003a6: 781b ldrb r3, [r3, #0]
  534. 80003a8: 7013 strb r3, [r2, #0]
  535. }
  536. 80003aa: 46bd mov sp, r7
  537. 80003ac: b002 add sp, #8
  538. 80003ae: bd80 pop {r7, pc}
  539. 80003b0: 40021002 .word 0x40021002
  540. 080003b4 <RCC_WaitForHSEStartUp>:
  541. * @retval An ErrorStatus enumeration value:
  542. * - SUCCESS: HSE oscillator is stable and ready to use
  543. * - ERROR: HSE oscillator not yet ready
  544. */
  545. ErrorStatus RCC_WaitForHSEStartUp(void)
  546. {
  547. 80003b4: b590 push {r4, r7, lr}
  548. 80003b6: b083 sub sp, #12
  549. 80003b8: af00 add r7, sp, #0
  550. __IO uint32_t StartUpCounter = 0;
  551. 80003ba: 2300 movs r3, #0
  552. 80003bc: 603b str r3, [r7, #0]
  553. ErrorStatus status = ERROR;
  554. 80003be: 1dfb adds r3, r7, #7
  555. 80003c0: 2200 movs r2, #0
  556. 80003c2: 701a strb r2, [r3, #0]
  557. FlagStatus HSEStatus = RESET;
  558. 80003c4: 1dbb adds r3, r7, #6
  559. 80003c6: 2200 movs r2, #0
  560. 80003c8: 701a strb r2, [r3, #0]
  561. /* Wait till HSE is ready and if timeout is reached exit */
  562. do
  563. {
  564. HSEStatus = RCC_GetFlagStatus(RCC_FLAG_HSERDY);
  565. 80003ca: 1dbc adds r4, r7, #6
  566. 80003cc: 2011 movs r0, #17
  567. 80003ce: f000 fd3f bl 8000e50 <RCC_GetFlagStatus>
  568. 80003d2: 1c03 adds r3, r0, #0
  569. 80003d4: 7023 strb r3, [r4, #0]
  570. StartUpCounter++;
  571. 80003d6: 683b ldr r3, [r7, #0]
  572. 80003d8: 3301 adds r3, #1
  573. 80003da: 603b str r3, [r7, #0]
  574. } while((StartUpCounter != HSE_STARTUP_TIMEOUT) && (HSEStatus == RESET));
  575. 80003dc: 683a ldr r2, [r7, #0]
  576. 80003de: 23a0 movs r3, #160 ; 0xa0
  577. 80003e0: 01db lsls r3, r3, #7
  578. 80003e2: 429a cmp r2, r3
  579. 80003e4: d003 beq.n 80003ee <RCC_WaitForHSEStartUp+0x3a>
  580. 80003e6: 1dbb adds r3, r7, #6
  581. 80003e8: 781b ldrb r3, [r3, #0]
  582. 80003ea: 2b00 cmp r3, #0
  583. 80003ec: d0ed beq.n 80003ca <RCC_WaitForHSEStartUp+0x16>
  584. if (RCC_GetFlagStatus(RCC_FLAG_HSERDY) != RESET)
  585. 80003ee: 2011 movs r0, #17
  586. 80003f0: f000 fd2e bl 8000e50 <RCC_GetFlagStatus>
  587. 80003f4: 1e03 subs r3, r0, #0
  588. 80003f6: d003 beq.n 8000400 <RCC_WaitForHSEStartUp+0x4c>
  589. {
  590. status = SUCCESS;
  591. 80003f8: 1dfb adds r3, r7, #7
  592. 80003fa: 2201 movs r2, #1
  593. 80003fc: 701a strb r2, [r3, #0]
  594. 80003fe: e002 b.n 8000406 <RCC_WaitForHSEStartUp+0x52>
  595. }
  596. else
  597. {
  598. status = ERROR;
  599. 8000400: 1dfb adds r3, r7, #7
  600. 8000402: 2200 movs r2, #0
  601. 8000404: 701a strb r2, [r3, #0]
  602. }
  603. return (status);
  604. 8000406: 1dfb adds r3, r7, #7
  605. 8000408: 781b ldrb r3, [r3, #0]
  606. }
  607. 800040a: 1c18 adds r0, r3, #0
  608. 800040c: 46bd mov sp, r7
  609. 800040e: b003 add sp, #12
  610. 8000410: bd90 pop {r4, r7, pc}
  611. 8000412: 46c0 nop ; (mov r8, r8)
  612. 08000414 <RCC_AdjustHSICalibrationValue>:
  613. * @param HSICalibrationValue: specifies the HSI calibration trimming value.
  614. * This parameter must be a number between 0 and 0x1F.
  615. * @retval None
  616. */
  617. void RCC_AdjustHSICalibrationValue(uint8_t HSICalibrationValue)
  618. {
  619. 8000414: b580 push {r7, lr}
  620. 8000416: b084 sub sp, #16
  621. 8000418: af00 add r7, sp, #0
  622. 800041a: 1c02 adds r2, r0, #0
  623. 800041c: 1dfb adds r3, r7, #7
  624. 800041e: 701a strb r2, [r3, #0]
  625. uint32_t tmpreg = 0;
  626. 8000420: 2300 movs r3, #0
  627. 8000422: 60fb str r3, [r7, #12]
  628. /* Check the parameters */
  629. assert_param(IS_RCC_HSI_CALIBRATION_VALUE(HSICalibrationValue));
  630. tmpreg = RCC->CR;
  631. 8000424: 4b09 ldr r3, [pc, #36] ; (800044c <RCC_AdjustHSICalibrationValue+0x38>)
  632. 8000426: 681b ldr r3, [r3, #0]
  633. 8000428: 60fb str r3, [r7, #12]
  634. /* Clear HSITRIM[4:0] bits */
  635. tmpreg &= ~RCC_CR_HSITRIM;
  636. 800042a: 68fb ldr r3, [r7, #12]
  637. 800042c: 22f8 movs r2, #248 ; 0xf8
  638. 800042e: 4393 bics r3, r2
  639. 8000430: 60fb str r3, [r7, #12]
  640. /* Set the HSITRIM[4:0] bits according to HSICalibrationValue value */
  641. tmpreg |= (uint32_t)HSICalibrationValue << 3;
  642. 8000432: 1dfb adds r3, r7, #7
  643. 8000434: 781b ldrb r3, [r3, #0]
  644. 8000436: 00db lsls r3, r3, #3
  645. 8000438: 68fa ldr r2, [r7, #12]
  646. 800043a: 4313 orrs r3, r2
  647. 800043c: 60fb str r3, [r7, #12]
  648. /* Store the new value */
  649. RCC->CR = tmpreg;
  650. 800043e: 4b03 ldr r3, [pc, #12] ; (800044c <RCC_AdjustHSICalibrationValue+0x38>)
  651. 8000440: 68fa ldr r2, [r7, #12]
  652. 8000442: 601a str r2, [r3, #0]
  653. }
  654. 8000444: 46bd mov sp, r7
  655. 8000446: b004 add sp, #16
  656. 8000448: bd80 pop {r7, pc}
  657. 800044a: 46c0 nop ; (mov r8, r8)
  658. 800044c: 40021000 .word 0x40021000
  659. 08000450 <RCC_HSICmd>:
  660. * @note When the HSI is stopped, HSIRDY flag goes low after 6 HSI oscillator
  661. * clock cycles.
  662. * @retval None
  663. */
  664. void RCC_HSICmd(FunctionalState NewState)
  665. {
  666. 8000450: b580 push {r7, lr}
  667. 8000452: b082 sub sp, #8
  668. 8000454: af00 add r7, sp, #0
  669. 8000456: 1c02 adds r2, r0, #0
  670. 8000458: 1dfb adds r3, r7, #7
  671. 800045a: 701a strb r2, [r3, #0]
  672. /* Check the parameters */
  673. assert_param(IS_FUNCTIONAL_STATE(NewState));
  674. if (NewState != DISABLE)
  675. 800045c: 1dfb adds r3, r7, #7
  676. 800045e: 781b ldrb r3, [r3, #0]
  677. 8000460: 2b00 cmp r3, #0
  678. 8000462: d006 beq.n 8000472 <RCC_HSICmd+0x22>
  679. {
  680. RCC->CR |= RCC_CR_HSION;
  681. 8000464: 4b07 ldr r3, [pc, #28] ; (8000484 <RCC_HSICmd+0x34>)
  682. 8000466: 4a07 ldr r2, [pc, #28] ; (8000484 <RCC_HSICmd+0x34>)
  683. 8000468: 6812 ldr r2, [r2, #0]
  684. 800046a: 2101 movs r1, #1
  685. 800046c: 430a orrs r2, r1
  686. 800046e: 601a str r2, [r3, #0]
  687. 8000470: e005 b.n 800047e <RCC_HSICmd+0x2e>
  688. }
  689. else
  690. {
  691. RCC->CR &= ~RCC_CR_HSION;
  692. 8000472: 4b04 ldr r3, [pc, #16] ; (8000484 <RCC_HSICmd+0x34>)
  693. 8000474: 4a03 ldr r2, [pc, #12] ; (8000484 <RCC_HSICmd+0x34>)
  694. 8000476: 6812 ldr r2, [r2, #0]
  695. 8000478: 2101 movs r1, #1
  696. 800047a: 438a bics r2, r1
  697. 800047c: 601a str r2, [r3, #0]
  698. }
  699. }
  700. 800047e: 46bd mov sp, r7
  701. 8000480: b002 add sp, #8
  702. 8000482: bd80 pop {r7, pc}
  703. 8000484: 40021000 .word 0x40021000
  704. 08000488 <RCC_AdjustHSI14CalibrationValue>:
  705. * @param HSI14CalibrationValue: specifies the HSI14 calibration trimming value.
  706. * This parameter must be a number between 0 and 0x1F.
  707. * @retval None
  708. */
  709. void RCC_AdjustHSI14CalibrationValue(uint8_t HSI14CalibrationValue)
  710. {
  711. 8000488: b580 push {r7, lr}
  712. 800048a: b084 sub sp, #16
  713. 800048c: af00 add r7, sp, #0
  714. 800048e: 1c02 adds r2, r0, #0
  715. 8000490: 1dfb adds r3, r7, #7
  716. 8000492: 701a strb r2, [r3, #0]
  717. uint32_t tmpreg = 0;
  718. 8000494: 2300 movs r3, #0
  719. 8000496: 60fb str r3, [r7, #12]
  720. /* Check the parameters */
  721. assert_param(IS_RCC_HSI14_CALIBRATION_VALUE(HSI14CalibrationValue));
  722. tmpreg = RCC->CR2;
  723. 8000498: 4b09 ldr r3, [pc, #36] ; (80004c0 <RCC_AdjustHSI14CalibrationValue+0x38>)
  724. 800049a: 6b5b ldr r3, [r3, #52] ; 0x34
  725. 800049c: 60fb str r3, [r7, #12]
  726. /* Clear HSI14TRIM[4:0] bits */
  727. tmpreg &= ~RCC_CR2_HSI14TRIM;
  728. 800049e: 68fb ldr r3, [r7, #12]
  729. 80004a0: 22f8 movs r2, #248 ; 0xf8
  730. 80004a2: 4393 bics r3, r2
  731. 80004a4: 60fb str r3, [r7, #12]
  732. /* Set the HSITRIM14[4:0] bits according to HSI14CalibrationValue value */
  733. tmpreg |= (uint32_t)HSI14CalibrationValue << 3;
  734. 80004a6: 1dfb adds r3, r7, #7
  735. 80004a8: 781b ldrb r3, [r3, #0]
  736. 80004aa: 00db lsls r3, r3, #3
  737. 80004ac: 68fa ldr r2, [r7, #12]
  738. 80004ae: 4313 orrs r3, r2
  739. 80004b0: 60fb str r3, [r7, #12]
  740. /* Store the new value */
  741. RCC->CR2 = tmpreg;
  742. 80004b2: 4b03 ldr r3, [pc, #12] ; (80004c0 <RCC_AdjustHSI14CalibrationValue+0x38>)
  743. 80004b4: 68fa ldr r2, [r7, #12]
  744. 80004b6: 635a str r2, [r3, #52] ; 0x34
  745. }
  746. 80004b8: 46bd mov sp, r7
  747. 80004ba: b004 add sp, #16
  748. 80004bc: bd80 pop {r7, pc}
  749. 80004be: 46c0 nop ; (mov r8, r8)
  750. 80004c0: 40021000 .word 0x40021000
  751. 080004c4 <RCC_HSI14Cmd>:
  752. * @note When the HSI14 is stopped, HSI14RDY flag goes low after 6 HSI14 oscillator
  753. * clock cycles.
  754. * @retval None
  755. */
  756. void RCC_HSI14Cmd(FunctionalState NewState)
  757. {
  758. 80004c4: b580 push {r7, lr}
  759. 80004c6: b082 sub sp, #8
  760. 80004c8: af00 add r7, sp, #0
  761. 80004ca: 1c02 adds r2, r0, #0
  762. 80004cc: 1dfb adds r3, r7, #7
  763. 80004ce: 701a strb r2, [r3, #0]
  764. /* Check the parameters */
  765. assert_param(IS_FUNCTIONAL_STATE(NewState));
  766. if (NewState != DISABLE)
  767. 80004d0: 1dfb adds r3, r7, #7
  768. 80004d2: 781b ldrb r3, [r3, #0]
  769. 80004d4: 2b00 cmp r3, #0
  770. 80004d6: d006 beq.n 80004e6 <RCC_HSI14Cmd+0x22>
  771. {
  772. RCC->CR2 |= RCC_CR2_HSI14ON;
  773. 80004d8: 4b07 ldr r3, [pc, #28] ; (80004f8 <RCC_HSI14Cmd+0x34>)
  774. 80004da: 4a07 ldr r2, [pc, #28] ; (80004f8 <RCC_HSI14Cmd+0x34>)
  775. 80004dc: 6b52 ldr r2, [r2, #52] ; 0x34
  776. 80004de: 2101 movs r1, #1
  777. 80004e0: 430a orrs r2, r1
  778. 80004e2: 635a str r2, [r3, #52] ; 0x34
  779. 80004e4: e005 b.n 80004f2 <RCC_HSI14Cmd+0x2e>
  780. }
  781. else
  782. {
  783. RCC->CR2 &= ~RCC_CR2_HSI14ON;
  784. 80004e6: 4b04 ldr r3, [pc, #16] ; (80004f8 <RCC_HSI14Cmd+0x34>)
  785. 80004e8: 4a03 ldr r2, [pc, #12] ; (80004f8 <RCC_HSI14Cmd+0x34>)
  786. 80004ea: 6b52 ldr r2, [r2, #52] ; 0x34
  787. 80004ec: 2101 movs r1, #1
  788. 80004ee: 438a bics r2, r1
  789. 80004f0: 635a str r2, [r3, #52] ; 0x34
  790. }
  791. }
  792. 80004f2: 46bd mov sp, r7
  793. 80004f4: b002 add sp, #8
  794. 80004f6: bd80 pop {r7, pc}
  795. 80004f8: 40021000 .word 0x40021000
  796. 080004fc <RCC_HSI14ADCRequestCmd>:
  797. * @param NewState: new state of the HSI14 ADC request.
  798. * This parameter can be: ENABLE or DISABLE.
  799. * @retval None
  800. */
  801. void RCC_HSI14ADCRequestCmd(FunctionalState NewState)
  802. {
  803. 80004fc: b580 push {r7, lr}
  804. 80004fe: b082 sub sp, #8
  805. 8000500: af00 add r7, sp, #0
  806. 8000502: 1c02 adds r2, r0, #0
  807. 8000504: 1dfb adds r3, r7, #7
  808. 8000506: 701a strb r2, [r3, #0]
  809. /* Check the parameters */
  810. assert_param(IS_FUNCTIONAL_STATE(NewState));
  811. if (NewState != DISABLE)
  812. 8000508: 1dfb adds r3, r7, #7
  813. 800050a: 781b ldrb r3, [r3, #0]
  814. 800050c: 2b00 cmp r3, #0
  815. 800050e: d006 beq.n 800051e <RCC_HSI14ADCRequestCmd+0x22>
  816. {
  817. RCC->CR2 &= ~RCC_CR2_HSI14DIS;
  818. 8000510: 4b07 ldr r3, [pc, #28] ; (8000530 <RCC_HSI14ADCRequestCmd+0x34>)
  819. 8000512: 4a07 ldr r2, [pc, #28] ; (8000530 <RCC_HSI14ADCRequestCmd+0x34>)
  820. 8000514: 6b52 ldr r2, [r2, #52] ; 0x34
  821. 8000516: 2104 movs r1, #4
  822. 8000518: 438a bics r2, r1
  823. 800051a: 635a str r2, [r3, #52] ; 0x34
  824. 800051c: e005 b.n 800052a <RCC_HSI14ADCRequestCmd+0x2e>
  825. }
  826. else
  827. {
  828. RCC->CR2 |= RCC_CR2_HSI14DIS;
  829. 800051e: 4b04 ldr r3, [pc, #16] ; (8000530 <RCC_HSI14ADCRequestCmd+0x34>)
  830. 8000520: 4a03 ldr r2, [pc, #12] ; (8000530 <RCC_HSI14ADCRequestCmd+0x34>)
  831. 8000522: 6b52 ldr r2, [r2, #52] ; 0x34
  832. 8000524: 2104 movs r1, #4
  833. 8000526: 430a orrs r2, r1
  834. 8000528: 635a str r2, [r3, #52] ; 0x34
  835. }
  836. }
  837. 800052a: 46bd mov sp, r7
  838. 800052c: b002 add sp, #8
  839. 800052e: bd80 pop {r7, pc}
  840. 8000530: 40021000 .word 0x40021000
  841. 08000534 <RCC_LSEConfig>:
  842. * @arg RCC_LSE_ON: turn ON the LSE oscillator
  843. * @arg RCC_LSE_Bypass: LSE oscillator bypassed with external clock
  844. * @retval None
  845. */
  846. void RCC_LSEConfig(uint32_t RCC_LSE)
  847. {
  848. 8000534: b580 push {r7, lr}
  849. 8000536: b082 sub sp, #8
  850. 8000538: af00 add r7, sp, #0
  851. 800053a: 6078 str r0, [r7, #4]
  852. /* Check the parameters */
  853. assert_param(IS_RCC_LSE(RCC_LSE));
  854. /* Reset LSEON and LSEBYP bits before configuring the LSE ------------------*/
  855. /* Reset LSEON bit */
  856. RCC->BDCR &= ~(RCC_BDCR_LSEON);
  857. 800053c: 4b0a ldr r3, [pc, #40] ; (8000568 <RCC_LSEConfig+0x34>)
  858. 800053e: 4a0a ldr r2, [pc, #40] ; (8000568 <RCC_LSEConfig+0x34>)
  859. 8000540: 6a12 ldr r2, [r2, #32]
  860. 8000542: 2101 movs r1, #1
  861. 8000544: 438a bics r2, r1
  862. 8000546: 621a str r2, [r3, #32]
  863. /* Reset LSEBYP bit */
  864. RCC->BDCR &= ~(RCC_BDCR_LSEBYP);
  865. 8000548: 4b07 ldr r3, [pc, #28] ; (8000568 <RCC_LSEConfig+0x34>)
  866. 800054a: 4a07 ldr r2, [pc, #28] ; (8000568 <RCC_LSEConfig+0x34>)
  867. 800054c: 6a12 ldr r2, [r2, #32]
  868. 800054e: 2104 movs r1, #4
  869. 8000550: 438a bics r2, r1
  870. 8000552: 621a str r2, [r3, #32]
  871. /* Configure LSE */
  872. RCC->BDCR |= RCC_LSE;
  873. 8000554: 4b04 ldr r3, [pc, #16] ; (8000568 <RCC_LSEConfig+0x34>)
  874. 8000556: 4a04 ldr r2, [pc, #16] ; (8000568 <RCC_LSEConfig+0x34>)
  875. 8000558: 6a11 ldr r1, [r2, #32]
  876. 800055a: 687a ldr r2, [r7, #4]
  877. 800055c: 430a orrs r2, r1
  878. 800055e: 621a str r2, [r3, #32]
  879. }
  880. 8000560: 46bd mov sp, r7
  881. 8000562: b002 add sp, #8
  882. 8000564: bd80 pop {r7, pc}
  883. 8000566: 46c0 nop ; (mov r8, r8)
  884. 8000568: 40021000 .word 0x40021000
  885. 0800056c <RCC_LSEDriveConfig>:
  886. * @arg RCC_LSEDrive_MediumHigh: LSE oscillator medium high drive capability.
  887. * @arg RCC_LSEDrive_High: LSE oscillator high drive capability.
  888. * @retval None
  889. */
  890. void RCC_LSEDriveConfig(uint32_t RCC_LSEDrive)
  891. {
  892. 800056c: b580 push {r7, lr}
  893. 800056e: b082 sub sp, #8
  894. 8000570: af00 add r7, sp, #0
  895. 8000572: 6078 str r0, [r7, #4]
  896. /* Check the parameters */
  897. assert_param(IS_RCC_LSE_DRIVE(RCC_LSEDrive));
  898. /* Clear LSEDRV[1:0] bits */
  899. RCC->BDCR &= ~(RCC_BDCR_LSEDRV);
  900. 8000574: 4b07 ldr r3, [pc, #28] ; (8000594 <RCC_LSEDriveConfig+0x28>)
  901. 8000576: 4a07 ldr r2, [pc, #28] ; (8000594 <RCC_LSEDriveConfig+0x28>)
  902. 8000578: 6a12 ldr r2, [r2, #32]
  903. 800057a: 2118 movs r1, #24
  904. 800057c: 438a bics r2, r1
  905. 800057e: 621a str r2, [r3, #32]
  906. /* Set the LSE Drive */
  907. RCC->BDCR |= RCC_LSEDrive;
  908. 8000580: 4b04 ldr r3, [pc, #16] ; (8000594 <RCC_LSEDriveConfig+0x28>)
  909. 8000582: 4a04 ldr r2, [pc, #16] ; (8000594 <RCC_LSEDriveConfig+0x28>)
  910. 8000584: 6a11 ldr r1, [r2, #32]
  911. 8000586: 687a ldr r2, [r7, #4]
  912. 8000588: 430a orrs r2, r1
  913. 800058a: 621a str r2, [r3, #32]
  914. }
  915. 800058c: 46bd mov sp, r7
  916. 800058e: b002 add sp, #8
  917. 8000590: bd80 pop {r7, pc}
  918. 8000592: 46c0 nop ; (mov r8, r8)
  919. 8000594: 40021000 .word 0x40021000
  920. 08000598 <RCC_LSICmd>:
  921. * @note When the LSI is stopped, LSIRDY flag goes low after 6 LSI oscillator
  922. * clock cycles.
  923. * @retval None
  924. */
  925. void RCC_LSICmd(FunctionalState NewState)
  926. {
  927. 8000598: b580 push {r7, lr}
  928. 800059a: b082 sub sp, #8
  929. 800059c: af00 add r7, sp, #0
  930. 800059e: 1c02 adds r2, r0, #0
  931. 80005a0: 1dfb adds r3, r7, #7
  932. 80005a2: 701a strb r2, [r3, #0]
  933. /* Check the parameters */
  934. assert_param(IS_FUNCTIONAL_STATE(NewState));
  935. if (NewState != DISABLE)
  936. 80005a4: 1dfb adds r3, r7, #7
  937. 80005a6: 781b ldrb r3, [r3, #0]
  938. 80005a8: 2b00 cmp r3, #0
  939. 80005aa: d006 beq.n 80005ba <RCC_LSICmd+0x22>
  940. {
  941. RCC->CSR |= RCC_CSR_LSION;
  942. 80005ac: 4b07 ldr r3, [pc, #28] ; (80005cc <RCC_LSICmd+0x34>)
  943. 80005ae: 4a07 ldr r2, [pc, #28] ; (80005cc <RCC_LSICmd+0x34>)
  944. 80005b0: 6a52 ldr r2, [r2, #36] ; 0x24
  945. 80005b2: 2101 movs r1, #1
  946. 80005b4: 430a orrs r2, r1
  947. 80005b6: 625a str r2, [r3, #36] ; 0x24
  948. 80005b8: e005 b.n 80005c6 <RCC_LSICmd+0x2e>
  949. }
  950. else
  951. {
  952. RCC->CSR &= ~RCC_CSR_LSION;
  953. 80005ba: 4b04 ldr r3, [pc, #16] ; (80005cc <RCC_LSICmd+0x34>)
  954. 80005bc: 4a03 ldr r2, [pc, #12] ; (80005cc <RCC_LSICmd+0x34>)
  955. 80005be: 6a52 ldr r2, [r2, #36] ; 0x24
  956. 80005c0: 2101 movs r1, #1
  957. 80005c2: 438a bics r2, r1
  958. 80005c4: 625a str r2, [r3, #36] ; 0x24
  959. }
  960. }
  961. 80005c6: 46bd mov sp, r7
  962. 80005c8: b002 add sp, #8
  963. 80005ca: bd80 pop {r7, pc}
  964. 80005cc: 40021000 .word 0x40021000
  965. 080005d0 <RCC_PLLConfig>:
  966. * This parameter can be RCC_PLLMul_x where x:[2,16]
  967. *
  968. * @retval None
  969. */
  970. void RCC_PLLConfig(uint32_t RCC_PLLSource, uint32_t RCC_PLLMul)
  971. {
  972. 80005d0: b580 push {r7, lr}
  973. 80005d2: b082 sub sp, #8
  974. 80005d4: af00 add r7, sp, #0
  975. 80005d6: 6078 str r0, [r7, #4]
  976. 80005d8: 6039 str r1, [r7, #0]
  977. /* Check the parameters */
  978. assert_param(IS_RCC_PLL_SOURCE(RCC_PLLSource));
  979. assert_param(IS_RCC_PLL_MUL(RCC_PLLMul));
  980. /* Clear PLL Source [16] and Multiplier [21:18] bits */
  981. RCC->CFGR &= ~(RCC_CFGR_PLLMULL | RCC_CFGR_PLLSRC);
  982. 80005da: 4b08 ldr r3, [pc, #32] ; (80005fc <RCC_PLLConfig+0x2c>)
  983. 80005dc: 4a07 ldr r2, [pc, #28] ; (80005fc <RCC_PLLConfig+0x2c>)
  984. 80005de: 6852 ldr r2, [r2, #4]
  985. 80005e0: 4907 ldr r1, [pc, #28] ; (8000600 <RCC_PLLConfig+0x30>)
  986. 80005e2: 400a ands r2, r1
  987. 80005e4: 605a str r2, [r3, #4]
  988. /* Set the PLL Source and Multiplier */
  989. RCC->CFGR |= (uint32_t)(RCC_PLLSource | RCC_PLLMul);
  990. 80005e6: 4b05 ldr r3, [pc, #20] ; (80005fc <RCC_PLLConfig+0x2c>)
  991. 80005e8: 4a04 ldr r2, [pc, #16] ; (80005fc <RCC_PLLConfig+0x2c>)
  992. 80005ea: 6851 ldr r1, [r2, #4]
  993. 80005ec: 6878 ldr r0, [r7, #4]
  994. 80005ee: 683a ldr r2, [r7, #0]
  995. 80005f0: 4302 orrs r2, r0
  996. 80005f2: 430a orrs r2, r1
  997. 80005f4: 605a str r2, [r3, #4]
  998. }
  999. 80005f6: 46bd mov sp, r7
  1000. 80005f8: b002 add sp, #8
  1001. 80005fa: bd80 pop {r7, pc}
  1002. 80005fc: 40021000 .word 0x40021000
  1003. 8000600: ffc27fff .word 0xffc27fff
  1004. 08000604 <RCC_PLLCmd>:
  1005. * @param NewState: new state of the PLL.
  1006. * This parameter can be: ENABLE or DISABLE.
  1007. * @retval None
  1008. */
  1009. void RCC_PLLCmd(FunctionalState NewState)
  1010. {
  1011. 8000604: b580 push {r7, lr}
  1012. 8000606: b082 sub sp, #8
  1013. 8000608: af00 add r7, sp, #0
  1014. 800060a: 1c02 adds r2, r0, #0
  1015. 800060c: 1dfb adds r3, r7, #7
  1016. 800060e: 701a strb r2, [r3, #0]
  1017. /* Check the parameters */
  1018. assert_param(IS_FUNCTIONAL_STATE(NewState));
  1019. if (NewState != DISABLE)
  1020. 8000610: 1dfb adds r3, r7, #7
  1021. 8000612: 781b ldrb r3, [r3, #0]
  1022. 8000614: 2b00 cmp r3, #0
  1023. 8000616: d007 beq.n 8000628 <RCC_PLLCmd+0x24>
  1024. {
  1025. RCC->CR |= RCC_CR_PLLON;
  1026. 8000618: 4b08 ldr r3, [pc, #32] ; (800063c <RCC_PLLCmd+0x38>)
  1027. 800061a: 4a08 ldr r2, [pc, #32] ; (800063c <RCC_PLLCmd+0x38>)
  1028. 800061c: 6812 ldr r2, [r2, #0]
  1029. 800061e: 2180 movs r1, #128 ; 0x80
  1030. 8000620: 0449 lsls r1, r1, #17
  1031. 8000622: 430a orrs r2, r1
  1032. 8000624: 601a str r2, [r3, #0]
  1033. 8000626: e005 b.n 8000634 <RCC_PLLCmd+0x30>
  1034. }
  1035. else
  1036. {
  1037. RCC->CR &= ~RCC_CR_PLLON;
  1038. 8000628: 4b04 ldr r3, [pc, #16] ; (800063c <RCC_PLLCmd+0x38>)
  1039. 800062a: 4a04 ldr r2, [pc, #16] ; (800063c <RCC_PLLCmd+0x38>)
  1040. 800062c: 6812 ldr r2, [r2, #0]
  1041. 800062e: 4904 ldr r1, [pc, #16] ; (8000640 <RCC_PLLCmd+0x3c>)
  1042. 8000630: 400a ands r2, r1
  1043. 8000632: 601a str r2, [r3, #0]
  1044. }
  1045. }
  1046. 8000634: 46bd mov sp, r7
  1047. 8000636: b002 add sp, #8
  1048. 8000638: bd80 pop {r7, pc}
  1049. 800063a: 46c0 nop ; (mov r8, r8)
  1050. 800063c: 40021000 .word 0x40021000
  1051. 8000640: feffffff .word 0xfeffffff
  1052. 08000644 <RCC_HSI48Cmd>:
  1053. * @param NewState: new state of the HSI48.
  1054. * This parameter can be: ENABLE or DISABLE.
  1055. * @retval None
  1056. */
  1057. void RCC_HSI48Cmd(FunctionalState NewState)
  1058. {
  1059. 8000644: b580 push {r7, lr}
  1060. 8000646: b082 sub sp, #8
  1061. 8000648: af00 add r7, sp, #0
  1062. 800064a: 1c02 adds r2, r0, #0
  1063. 800064c: 1dfb adds r3, r7, #7
  1064. 800064e: 701a strb r2, [r3, #0]
  1065. /* Check the parameters */
  1066. assert_param(IS_FUNCTIONAL_STATE(NewState));
  1067. if (NewState != DISABLE)
  1068. 8000650: 1dfb adds r3, r7, #7
  1069. 8000652: 781b ldrb r3, [r3, #0]
  1070. 8000654: 2b00 cmp r3, #0
  1071. 8000656: d007 beq.n 8000668 <RCC_HSI48Cmd+0x24>
  1072. {
  1073. RCC->CR2 |= RCC_CR2_HSI48ON;
  1074. 8000658: 4b08 ldr r3, [pc, #32] ; (800067c <RCC_HSI48Cmd+0x38>)
  1075. 800065a: 4a08 ldr r2, [pc, #32] ; (800067c <RCC_HSI48Cmd+0x38>)
  1076. 800065c: 6b52 ldr r2, [r2, #52] ; 0x34
  1077. 800065e: 2180 movs r1, #128 ; 0x80
  1078. 8000660: 0249 lsls r1, r1, #9
  1079. 8000662: 430a orrs r2, r1
  1080. 8000664: 635a str r2, [r3, #52] ; 0x34
  1081. 8000666: e005 b.n 8000674 <RCC_HSI48Cmd+0x30>
  1082. }
  1083. else
  1084. {
  1085. RCC->CR2 &= ~RCC_CR2_HSI48ON;
  1086. 8000668: 4b04 ldr r3, [pc, #16] ; (800067c <RCC_HSI48Cmd+0x38>)
  1087. 800066a: 4a04 ldr r2, [pc, #16] ; (800067c <RCC_HSI48Cmd+0x38>)
  1088. 800066c: 6b52 ldr r2, [r2, #52] ; 0x34
  1089. 800066e: 4904 ldr r1, [pc, #16] ; (8000680 <RCC_HSI48Cmd+0x3c>)
  1090. 8000670: 400a ands r2, r1
  1091. 8000672: 635a str r2, [r3, #52] ; 0x34
  1092. }
  1093. }
  1094. 8000674: 46bd mov sp, r7
  1095. 8000676: b002 add sp, #8
  1096. 8000678: bd80 pop {r7, pc}
  1097. 800067a: 46c0 nop ; (mov r8, r8)
  1098. 800067c: 40021000 .word 0x40021000
  1099. 8000680: fffeffff .word 0xfffeffff
  1100. 08000684 <RCC_PREDIV1Config>:
  1101. * @param RCC_PREDIV1_Div: specifies the PREDIV1 clock division factor.
  1102. * This parameter can be RCC_PREDIV1_Divx where x:[1,16]
  1103. * @retval None
  1104. */
  1105. void RCC_PREDIV1Config(uint32_t RCC_PREDIV1_Div)
  1106. {
  1107. 8000684: b580 push {r7, lr}
  1108. 8000686: b084 sub sp, #16
  1109. 8000688: af00 add r7, sp, #0
  1110. 800068a: 6078 str r0, [r7, #4]
  1111. uint32_t tmpreg = 0;
  1112. 800068c: 2300 movs r3, #0
  1113. 800068e: 60fb str r3, [r7, #12]
  1114. /* Check the parameters */
  1115. assert_param(IS_RCC_PREDIV1(RCC_PREDIV1_Div));
  1116. tmpreg = RCC->CFGR2;
  1117. 8000690: 4b08 ldr r3, [pc, #32] ; (80006b4 <RCC_PREDIV1Config+0x30>)
  1118. 8000692: 6adb ldr r3, [r3, #44] ; 0x2c
  1119. 8000694: 60fb str r3, [r7, #12]
  1120. /* Clear PREDIV1[3:0] bits */
  1121. tmpreg &= ~(RCC_CFGR2_PREDIV1);
  1122. 8000696: 68fb ldr r3, [r7, #12]
  1123. 8000698: 220f movs r2, #15
  1124. 800069a: 4393 bics r3, r2
  1125. 800069c: 60fb str r3, [r7, #12]
  1126. /* Set the PREDIV1 division factor */
  1127. tmpreg |= RCC_PREDIV1_Div;
  1128. 800069e: 68fa ldr r2, [r7, #12]
  1129. 80006a0: 687b ldr r3, [r7, #4]
  1130. 80006a2: 4313 orrs r3, r2
  1131. 80006a4: 60fb str r3, [r7, #12]
  1132. /* Store the new value */
  1133. RCC->CFGR2 = tmpreg;
  1134. 80006a6: 4b03 ldr r3, [pc, #12] ; (80006b4 <RCC_PREDIV1Config+0x30>)
  1135. 80006a8: 68fa ldr r2, [r7, #12]
  1136. 80006aa: 62da str r2, [r3, #44] ; 0x2c
  1137. }
  1138. 80006ac: 46bd mov sp, r7
  1139. 80006ae: b004 add sp, #16
  1140. 80006b0: bd80 pop {r7, pc}
  1141. 80006b2: 46c0 nop ; (mov r8, r8)
  1142. 80006b4: 40021000 .word 0x40021000
  1143. 080006b8 <RCC_ClockSecuritySystemCmd>:
  1144. * @param NewState: new state of the Clock Security System.
  1145. * This parameter can be: ENABLE or DISABLE.
  1146. * @retval None
  1147. */
  1148. void RCC_ClockSecuritySystemCmd(FunctionalState NewState)
  1149. {
  1150. 80006b8: b580 push {r7, lr}
  1151. 80006ba: b082 sub sp, #8
  1152. 80006bc: af00 add r7, sp, #0
  1153. 80006be: 1c02 adds r2, r0, #0
  1154. 80006c0: 1dfb adds r3, r7, #7
  1155. 80006c2: 701a strb r2, [r3, #0]
  1156. /* Check the parameters */
  1157. assert_param(IS_FUNCTIONAL_STATE(NewState));
  1158. if (NewState != DISABLE)
  1159. 80006c4: 1dfb adds r3, r7, #7
  1160. 80006c6: 781b ldrb r3, [r3, #0]
  1161. 80006c8: 2b00 cmp r3, #0
  1162. 80006ca: d007 beq.n 80006dc <RCC_ClockSecuritySystemCmd+0x24>
  1163. {
  1164. RCC->CR |= RCC_CR_CSSON;
  1165. 80006cc: 4b08 ldr r3, [pc, #32] ; (80006f0 <RCC_ClockSecuritySystemCmd+0x38>)
  1166. 80006ce: 4a08 ldr r2, [pc, #32] ; (80006f0 <RCC_ClockSecuritySystemCmd+0x38>)
  1167. 80006d0: 6812 ldr r2, [r2, #0]
  1168. 80006d2: 2180 movs r1, #128 ; 0x80
  1169. 80006d4: 0309 lsls r1, r1, #12
  1170. 80006d6: 430a orrs r2, r1
  1171. 80006d8: 601a str r2, [r3, #0]
  1172. 80006da: e005 b.n 80006e8 <RCC_ClockSecuritySystemCmd+0x30>
  1173. }
  1174. else
  1175. {
  1176. RCC->CR &= ~RCC_CR_CSSON;
  1177. 80006dc: 4b04 ldr r3, [pc, #16] ; (80006f0 <RCC_ClockSecuritySystemCmd+0x38>)
  1178. 80006de: 4a04 ldr r2, [pc, #16] ; (80006f0 <RCC_ClockSecuritySystemCmd+0x38>)
  1179. 80006e0: 6812 ldr r2, [r2, #0]
  1180. 80006e2: 4904 ldr r1, [pc, #16] ; (80006f4 <RCC_ClockSecuritySystemCmd+0x3c>)
  1181. 80006e4: 400a ands r2, r1
  1182. 80006e6: 601a str r2, [r3, #0]
  1183. }
  1184. }
  1185. 80006e8: 46bd mov sp, r7
  1186. 80006ea: b002 add sp, #8
  1187. 80006ec: bd80 pop {r7, pc}
  1188. 80006ee: 46c0 nop ; (mov r8, r8)
  1189. 80006f0: 40021000 .word 0x40021000
  1190. 80006f4: fff7ffff .word 0xfff7ffff
  1191. 080006f8 <RCC_MCOConfig>:
  1192. * @arg RCC_MCOPrescaler_64: MCO clock is divided by 64.
  1193. * @arg RCC_MCOPrescaler_128: MCO clock is divided by 128.
  1194. * @retval None
  1195. */
  1196. void RCC_MCOConfig(uint8_t RCC_MCOSource, uint32_t RCC_MCOPrescaler)
  1197. {
  1198. 80006f8: b580 push {r7, lr}
  1199. 80006fa: b084 sub sp, #16
  1200. 80006fc: af00 add r7, sp, #0
  1201. 80006fe: 1c02 adds r2, r0, #0
  1202. 8000700: 6039 str r1, [r7, #0]
  1203. 8000702: 1dfb adds r3, r7, #7
  1204. 8000704: 701a strb r2, [r3, #0]
  1205. uint32_t tmpreg = 0;
  1206. 8000706: 2300 movs r3, #0
  1207. 8000708: 60fb str r3, [r7, #12]
  1208. /* Check the parameters */
  1209. assert_param(IS_RCC_MCO_SOURCE(RCC_MCOSource));
  1210. assert_param(IS_RCC_MCO_PRESCALER(RCC_MCOPrescaler));
  1211. /* Get CFGR value */
  1212. tmpreg = RCC->CFGR;
  1213. 800070a: 4b0a ldr r3, [pc, #40] ; (8000734 <RCC_MCOConfig+0x3c>)
  1214. 800070c: 685b ldr r3, [r3, #4]
  1215. 800070e: 60fb str r3, [r7, #12]
  1216. /* Clear MCOPRE[2:0] bits */
  1217. tmpreg &= ~(RCC_CFGR_MCO_PRE | RCC_CFGR_MCO | RCC_CFGR_PLLNODIV);
  1218. 8000710: 68fb ldr r3, [r7, #12]
  1219. 8000712: 021b lsls r3, r3, #8
  1220. 8000714: 0a1b lsrs r3, r3, #8
  1221. 8000716: 60fb str r3, [r7, #12]
  1222. /* Set the RCC_MCOSource and RCC_MCOPrescaler */
  1223. tmpreg |= (RCC_MCOPrescaler | ((uint32_t)RCC_MCOSource<<24));
  1224. 8000718: 1dfb adds r3, r7, #7
  1225. 800071a: 781b ldrb r3, [r3, #0]
  1226. 800071c: 061a lsls r2, r3, #24
  1227. 800071e: 683b ldr r3, [r7, #0]
  1228. 8000720: 4313 orrs r3, r2
  1229. 8000722: 68fa ldr r2, [r7, #12]
  1230. 8000724: 4313 orrs r3, r2
  1231. 8000726: 60fb str r3, [r7, #12]
  1232. /* Store the new value */
  1233. RCC->CFGR = tmpreg;
  1234. 8000728: 4b02 ldr r3, [pc, #8] ; (8000734 <RCC_MCOConfig+0x3c>)
  1235. 800072a: 68fa ldr r2, [r7, #12]
  1236. 800072c: 605a str r2, [r3, #4]
  1237. }
  1238. 800072e: 46bd mov sp, r7
  1239. 8000730: b004 add sp, #16
  1240. 8000732: bd80 pop {r7, pc}
  1241. 8000734: 40021000 .word 0x40021000
  1242. 08000738 <RCC_SYSCLKConfig>:
  1243. * @arg RCC_SYSCLKSource_PLLCLK: PLL selected as system clock source
  1244. * @arg RCC_SYSCLKSource_HSI48: HSI48 selected as system clock source, applicable only for STM32F072 devices
  1245. * @retval None
  1246. */
  1247. void RCC_SYSCLKConfig(uint32_t RCC_SYSCLKSource)
  1248. {
  1249. 8000738: b580 push {r7, lr}
  1250. 800073a: b084 sub sp, #16
  1251. 800073c: af00 add r7, sp, #0
  1252. 800073e: 6078 str r0, [r7, #4]
  1253. uint32_t tmpreg = 0;
  1254. 8000740: 2300 movs r3, #0
  1255. 8000742: 60fb str r3, [r7, #12]
  1256. /* Check the parameters */
  1257. assert_param(IS_RCC_SYSCLK_SOURCE(RCC_SYSCLKSource));
  1258. tmpreg = RCC->CFGR;
  1259. 8000744: 4b08 ldr r3, [pc, #32] ; (8000768 <RCC_SYSCLKConfig+0x30>)
  1260. 8000746: 685b ldr r3, [r3, #4]
  1261. 8000748: 60fb str r3, [r7, #12]
  1262. /* Clear SW[1:0] bits */
  1263. tmpreg &= ~RCC_CFGR_SW;
  1264. 800074a: 68fb ldr r3, [r7, #12]
  1265. 800074c: 2203 movs r2, #3
  1266. 800074e: 4393 bics r3, r2
  1267. 8000750: 60fb str r3, [r7, #12]
  1268. /* Set SW[1:0] bits according to RCC_SYSCLKSource value */
  1269. tmpreg |= RCC_SYSCLKSource;
  1270. 8000752: 68fa ldr r2, [r7, #12]
  1271. 8000754: 687b ldr r3, [r7, #4]
  1272. 8000756: 4313 orrs r3, r2
  1273. 8000758: 60fb str r3, [r7, #12]
  1274. /* Store the new value */
  1275. RCC->CFGR = tmpreg;
  1276. 800075a: 4b03 ldr r3, [pc, #12] ; (8000768 <RCC_SYSCLKConfig+0x30>)
  1277. 800075c: 68fa ldr r2, [r7, #12]
  1278. 800075e: 605a str r2, [r3, #4]
  1279. }
  1280. 8000760: 46bd mov sp, r7
  1281. 8000762: b004 add sp, #16
  1282. 8000764: bd80 pop {r7, pc}
  1283. 8000766: 46c0 nop ; (mov r8, r8)
  1284. 8000768: 40021000 .word 0x40021000
  1285. 0800076c <RCC_GetSYSCLKSource>:
  1286. * - 0x04: HSE used as system clock
  1287. * - 0x08: PLL used as system clock
  1288. * - 0x0C: HSI48 used as system clock, applicable only for STM32F072 devices
  1289. */
  1290. uint8_t RCC_GetSYSCLKSource(void)
  1291. {
  1292. 800076c: b580 push {r7, lr}
  1293. 800076e: af00 add r7, sp, #0
  1294. return ((uint8_t)(RCC->CFGR & RCC_CFGR_SWS));
  1295. 8000770: 4b04 ldr r3, [pc, #16] ; (8000784 <RCC_GetSYSCLKSource+0x18>)
  1296. 8000772: 685b ldr r3, [r3, #4]
  1297. 8000774: b2db uxtb r3, r3
  1298. 8000776: 220c movs r2, #12
  1299. 8000778: 4013 ands r3, r2
  1300. 800077a: b2db uxtb r3, r3
  1301. }
  1302. 800077c: 1c18 adds r0, r3, #0
  1303. 800077e: 46bd mov sp, r7
  1304. 8000780: bd80 pop {r7, pc}
  1305. 8000782: 46c0 nop ; (mov r8, r8)
  1306. 8000784: 40021000 .word 0x40021000
  1307. 08000788 <RCC_HCLKConfig>:
  1308. * @arg RCC_SYSCLK_Div256: AHB clock = SYSCLK/256
  1309. * @arg RCC_SYSCLK_Div512: AHB clock = SYSCLK/512
  1310. * @retval None
  1311. */
  1312. void RCC_HCLKConfig(uint32_t RCC_SYSCLK)
  1313. {
  1314. 8000788: b580 push {r7, lr}
  1315. 800078a: b084 sub sp, #16
  1316. 800078c: af00 add r7, sp, #0
  1317. 800078e: 6078 str r0, [r7, #4]
  1318. uint32_t tmpreg = 0;
  1319. 8000790: 2300 movs r3, #0
  1320. 8000792: 60fb str r3, [r7, #12]
  1321. /* Check the parameters */
  1322. assert_param(IS_RCC_HCLK(RCC_SYSCLK));
  1323. tmpreg = RCC->CFGR;
  1324. 8000794: 4b08 ldr r3, [pc, #32] ; (80007b8 <RCC_HCLKConfig+0x30>)
  1325. 8000796: 685b ldr r3, [r3, #4]
  1326. 8000798: 60fb str r3, [r7, #12]
  1327. /* Clear HPRE[3:0] bits */
  1328. tmpreg &= ~RCC_CFGR_HPRE;
  1329. 800079a: 68fb ldr r3, [r7, #12]
  1330. 800079c: 22f0 movs r2, #240 ; 0xf0
  1331. 800079e: 4393 bics r3, r2
  1332. 80007a0: 60fb str r3, [r7, #12]
  1333. /* Set HPRE[3:0] bits according to RCC_SYSCLK value */
  1334. tmpreg |= RCC_SYSCLK;
  1335. 80007a2: 68fa ldr r2, [r7, #12]
  1336. 80007a4: 687b ldr r3, [r7, #4]
  1337. 80007a6: 4313 orrs r3, r2
  1338. 80007a8: 60fb str r3, [r7, #12]
  1339. /* Store the new value */
  1340. RCC->CFGR = tmpreg;
  1341. 80007aa: 4b03 ldr r3, [pc, #12] ; (80007b8 <RCC_HCLKConfig+0x30>)
  1342. 80007ac: 68fa ldr r2, [r7, #12]
  1343. 80007ae: 605a str r2, [r3, #4]
  1344. }
  1345. 80007b0: 46bd mov sp, r7
  1346. 80007b2: b004 add sp, #16
  1347. 80007b4: bd80 pop {r7, pc}
  1348. 80007b6: 46c0 nop ; (mov r8, r8)
  1349. 80007b8: 40021000 .word 0x40021000
  1350. 080007bc <RCC_PCLKConfig>:
  1351. * @arg RCC_HCLK_Div8: APB clock = HCLK/8
  1352. * @arg RCC_HCLK_Div16: APB clock = HCLK/16
  1353. * @retval None
  1354. */
  1355. void RCC_PCLKConfig(uint32_t RCC_HCLK)
  1356. {
  1357. 80007bc: b580 push {r7, lr}
  1358. 80007be: b084 sub sp, #16
  1359. 80007c0: af00 add r7, sp, #0
  1360. 80007c2: 6078 str r0, [r7, #4]
  1361. uint32_t tmpreg = 0;
  1362. 80007c4: 2300 movs r3, #0
  1363. 80007c6: 60fb str r3, [r7, #12]
  1364. /* Check the parameters */
  1365. assert_param(IS_RCC_PCLK(RCC_HCLK));
  1366. tmpreg = RCC->CFGR;
  1367. 80007c8: 4b08 ldr r3, [pc, #32] ; (80007ec <RCC_PCLKConfig+0x30>)
  1368. 80007ca: 685b ldr r3, [r3, #4]
  1369. 80007cc: 60fb str r3, [r7, #12]
  1370. /* Clear PPRE[2:0] bits */
  1371. tmpreg &= ~RCC_CFGR_PPRE;
  1372. 80007ce: 68fb ldr r3, [r7, #12]
  1373. 80007d0: 4a07 ldr r2, [pc, #28] ; (80007f0 <RCC_PCLKConfig+0x34>)
  1374. 80007d2: 4013 ands r3, r2
  1375. 80007d4: 60fb str r3, [r7, #12]
  1376. /* Set PPRE[2:0] bits according to RCC_HCLK value */
  1377. tmpreg |= RCC_HCLK;
  1378. 80007d6: 68fa ldr r2, [r7, #12]
  1379. 80007d8: 687b ldr r3, [r7, #4]
  1380. 80007da: 4313 orrs r3, r2
  1381. 80007dc: 60fb str r3, [r7, #12]
  1382. /* Store the new value */
  1383. RCC->CFGR = tmpreg;
  1384. 80007de: 4b03 ldr r3, [pc, #12] ; (80007ec <RCC_PCLKConfig+0x30>)
  1385. 80007e0: 68fa ldr r2, [r7, #12]
  1386. 80007e2: 605a str r2, [r3, #4]
  1387. }
  1388. 80007e4: 46bd mov sp, r7
  1389. 80007e6: b004 add sp, #16
  1390. 80007e8: bd80 pop {r7, pc}
  1391. 80007ea: 46c0 nop ; (mov r8, r8)
  1392. 80007ec: 40021000 .word 0x40021000
  1393. 80007f0: fffff8ff .word 0xfffff8ff
  1394. 080007f4 <RCC_ADCCLKConfig>:
  1395. * @arg RCC_ADCCLK_PCLK_Div2: ADC clock = PCLK/2
  1396. * @arg RCC_ADCCLK_PCLK_Div4: ADC clock = PCLK/4
  1397. * @retval None
  1398. */
  1399. void RCC_ADCCLKConfig(uint32_t RCC_ADCCLK)
  1400. {
  1401. 80007f4: b580 push {r7, lr}
  1402. 80007f6: b082 sub sp, #8
  1403. 80007f8: af00 add r7, sp, #0
  1404. 80007fa: 6078 str r0, [r7, #4]
  1405. /* Check the parameters */
  1406. assert_param(IS_RCC_ADCCLK(RCC_ADCCLK));
  1407. /* Clear ADCPRE bit */
  1408. RCC->CFGR &= ~RCC_CFGR_ADCPRE;
  1409. 80007fc: 4b0e ldr r3, [pc, #56] ; (8000838 <RCC_ADCCLKConfig+0x44>)
  1410. 80007fe: 4a0e ldr r2, [pc, #56] ; (8000838 <RCC_ADCCLKConfig+0x44>)
  1411. 8000800: 6852 ldr r2, [r2, #4]
  1412. 8000802: 490e ldr r1, [pc, #56] ; (800083c <RCC_ADCCLKConfig+0x48>)
  1413. 8000804: 400a ands r2, r1
  1414. 8000806: 605a str r2, [r3, #4]
  1415. /* Set ADCPRE bits according to RCC_PCLK value */
  1416. RCC->CFGR |= RCC_ADCCLK & 0xFFFF;
  1417. 8000808: 4b0b ldr r3, [pc, #44] ; (8000838 <RCC_ADCCLKConfig+0x44>)
  1418. 800080a: 4a0b ldr r2, [pc, #44] ; (8000838 <RCC_ADCCLKConfig+0x44>)
  1419. 800080c: 6851 ldr r1, [r2, #4]
  1420. 800080e: 687a ldr r2, [r7, #4]
  1421. 8000810: 0412 lsls r2, r2, #16
  1422. 8000812: 0c12 lsrs r2, r2, #16
  1423. 8000814: 430a orrs r2, r1
  1424. 8000816: 605a str r2, [r3, #4]
  1425. /* Clear ADCSW bit */
  1426. RCC->CFGR3 &= ~RCC_CFGR3_ADCSW;
  1427. 8000818: 4b07 ldr r3, [pc, #28] ; (8000838 <RCC_ADCCLKConfig+0x44>)
  1428. 800081a: 4a07 ldr r2, [pc, #28] ; (8000838 <RCC_ADCCLKConfig+0x44>)
  1429. 800081c: 6b12 ldr r2, [r2, #48] ; 0x30
  1430. 800081e: 4908 ldr r1, [pc, #32] ; (8000840 <RCC_ADCCLKConfig+0x4c>)
  1431. 8000820: 400a ands r2, r1
  1432. 8000822: 631a str r2, [r3, #48] ; 0x30
  1433. /* Set ADCSW bits according to RCC_ADCCLK value */
  1434. RCC->CFGR3 |= RCC_ADCCLK >> 16;
  1435. 8000824: 4b04 ldr r3, [pc, #16] ; (8000838 <RCC_ADCCLKConfig+0x44>)
  1436. 8000826: 4a04 ldr r2, [pc, #16] ; (8000838 <RCC_ADCCLKConfig+0x44>)
  1437. 8000828: 6b11 ldr r1, [r2, #48] ; 0x30
  1438. 800082a: 687a ldr r2, [r7, #4]
  1439. 800082c: 0c12 lsrs r2, r2, #16
  1440. 800082e: 430a orrs r2, r1
  1441. 8000830: 631a str r2, [r3, #48] ; 0x30
  1442. }
  1443. 8000832: 46bd mov sp, r7
  1444. 8000834: b002 add sp, #8
  1445. 8000836: bd80 pop {r7, pc}
  1446. 8000838: 40021000 .word 0x40021000
  1447. 800083c: ffffbfff .word 0xffffbfff
  1448. 8000840: fffffeff .word 0xfffffeff
  1449. 08000844 <RCC_CECCLKConfig>:
  1450. * @arg RCC_CECCLK_HSI_Div244: CEC clock = HSI/244 (32768Hz)
  1451. * @arg RCC_CECCLK_LSE: CEC clock = LSE
  1452. * @retval None
  1453. */
  1454. void RCC_CECCLKConfig(uint32_t RCC_CECCLK)
  1455. {
  1456. 8000844: b580 push {r7, lr}
  1457. 8000846: b082 sub sp, #8
  1458. 8000848: af00 add r7, sp, #0
  1459. 800084a: 6078 str r0, [r7, #4]
  1460. /* Check the parameters */
  1461. assert_param(IS_RCC_CECCLK(RCC_CECCLK));
  1462. /* Clear CECSW bit */
  1463. RCC->CFGR3 &= ~RCC_CFGR3_CECSW;
  1464. 800084c: 4b07 ldr r3, [pc, #28] ; (800086c <RCC_CECCLKConfig+0x28>)
  1465. 800084e: 4a07 ldr r2, [pc, #28] ; (800086c <RCC_CECCLKConfig+0x28>)
  1466. 8000850: 6b12 ldr r2, [r2, #48] ; 0x30
  1467. 8000852: 2140 movs r1, #64 ; 0x40
  1468. 8000854: 438a bics r2, r1
  1469. 8000856: 631a str r2, [r3, #48] ; 0x30
  1470. /* Set CECSW bits according to RCC_CECCLK value */
  1471. RCC->CFGR3 |= RCC_CECCLK;
  1472. 8000858: 4b04 ldr r3, [pc, #16] ; (800086c <RCC_CECCLKConfig+0x28>)
  1473. 800085a: 4a04 ldr r2, [pc, #16] ; (800086c <RCC_CECCLKConfig+0x28>)
  1474. 800085c: 6b11 ldr r1, [r2, #48] ; 0x30
  1475. 800085e: 687a ldr r2, [r7, #4]
  1476. 8000860: 430a orrs r2, r1
  1477. 8000862: 631a str r2, [r3, #48] ; 0x30
  1478. }
  1479. 8000864: 46bd mov sp, r7
  1480. 8000866: b002 add sp, #8
  1481. 8000868: bd80 pop {r7, pc}
  1482. 800086a: 46c0 nop ; (mov r8, r8)
  1483. 800086c: 40021000 .word 0x40021000
  1484. 08000870 <RCC_I2CCLKConfig>:
  1485. * @arg RCC_I2C1CLK_HSI: I2C1 clock = HSI
  1486. * @arg RCC_I2C1CLK_SYSCLK: I2C1 clock = System Clock
  1487. * @retval None
  1488. */
  1489. void RCC_I2CCLKConfig(uint32_t RCC_I2CCLK)
  1490. {
  1491. 8000870: b580 push {r7, lr}
  1492. 8000872: b082 sub sp, #8
  1493. 8000874: af00 add r7, sp, #0
  1494. 8000876: 6078 str r0, [r7, #4]
  1495. /* Check the parameters */
  1496. assert_param(IS_RCC_I2CCLK(RCC_I2CCLK));
  1497. /* Clear I2CSW bit */
  1498. RCC->CFGR3 &= ~RCC_CFGR3_I2C1SW;
  1499. 8000878: 4b07 ldr r3, [pc, #28] ; (8000898 <RCC_I2CCLKConfig+0x28>)
  1500. 800087a: 4a07 ldr r2, [pc, #28] ; (8000898 <RCC_I2CCLKConfig+0x28>)
  1501. 800087c: 6b12 ldr r2, [r2, #48] ; 0x30
  1502. 800087e: 2110 movs r1, #16
  1503. 8000880: 438a bics r2, r1
  1504. 8000882: 631a str r2, [r3, #48] ; 0x30
  1505. /* Set I2CSW bits according to RCC_I2CCLK value */
  1506. RCC->CFGR3 |= RCC_I2CCLK;
  1507. 8000884: 4b04 ldr r3, [pc, #16] ; (8000898 <RCC_I2CCLKConfig+0x28>)
  1508. 8000886: 4a04 ldr r2, [pc, #16] ; (8000898 <RCC_I2CCLKConfig+0x28>)
  1509. 8000888: 6b11 ldr r1, [r2, #48] ; 0x30
  1510. 800088a: 687a ldr r2, [r7, #4]
  1511. 800088c: 430a orrs r2, r1
  1512. 800088e: 631a str r2, [r3, #48] ; 0x30
  1513. }
  1514. 8000890: 46bd mov sp, r7
  1515. 8000892: b002 add sp, #8
  1516. 8000894: bd80 pop {r7, pc}
  1517. 8000896: 46c0 nop ; (mov r8, r8)
  1518. 8000898: 40021000 .word 0x40021000
  1519. 0800089c <RCC_USARTCLKConfig>:
  1520. * @arg RCC_USART3CLK_LSE: USART3 clock = LSE Clock, applicable only for STM32F091 devices
  1521. * @arg RCC_USART3CLK_HSI: USART3 clock = HSI Clock, applicable only for STM32F091 devices
  1522. * @retval None
  1523. */
  1524. void RCC_USARTCLKConfig(uint32_t RCC_USARTCLK)
  1525. {
  1526. 800089c: b580 push {r7, lr}
  1527. 800089e: b084 sub sp, #16
  1528. 80008a0: af00 add r7, sp, #0
  1529. 80008a2: 6078 str r0, [r7, #4]
  1530. uint32_t tmp = 0;
  1531. 80008a4: 2300 movs r3, #0
  1532. 80008a6: 60fb str r3, [r7, #12]
  1533. /* Check the parameters */
  1534. assert_param(IS_RCC_USARTCLK(RCC_USARTCLK));
  1535. /* Get USART index */
  1536. tmp = (RCC_USARTCLK >> 28);
  1537. 80008a8: 687b ldr r3, [r7, #4]
  1538. 80008aa: 0f1b lsrs r3, r3, #28
  1539. 80008ac: 60fb str r3, [r7, #12]
  1540. /* Clear USARTSW[1:0] bit */
  1541. if (tmp == (uint32_t)0x00000001)
  1542. 80008ae: 68fb ldr r3, [r7, #12]
  1543. 80008b0: 2b01 cmp r3, #1
  1544. 80008b2: d106 bne.n 80008c2 <RCC_USARTCLKConfig+0x26>
  1545. {
  1546. /* Clear USART1SW[1:0] bit */
  1547. RCC->CFGR3 &= ~RCC_CFGR3_USART1SW;
  1548. 80008b4: 4b0f ldr r3, [pc, #60] ; (80008f4 <RCC_USARTCLKConfig+0x58>)
  1549. 80008b6: 4a0f ldr r2, [pc, #60] ; (80008f4 <RCC_USARTCLKConfig+0x58>)
  1550. 80008b8: 6b12 ldr r2, [r2, #48] ; 0x30
  1551. 80008ba: 2103 movs r1, #3
  1552. 80008bc: 438a bics r2, r1
  1553. 80008be: 631a str r2, [r3, #48] ; 0x30
  1554. 80008c0: e00f b.n 80008e2 <RCC_USARTCLKConfig+0x46>
  1555. }
  1556. else if (tmp == (uint32_t)0x00000002)
  1557. 80008c2: 68fb ldr r3, [r7, #12]
  1558. 80008c4: 2b02 cmp r3, #2
  1559. 80008c6: d106 bne.n 80008d6 <RCC_USARTCLKConfig+0x3a>
  1560. {
  1561. /* Clear USART2SW[1:0] bit */
  1562. RCC->CFGR3 &= ~RCC_CFGR3_USART2SW;
  1563. 80008c8: 4b0a ldr r3, [pc, #40] ; (80008f4 <RCC_USARTCLKConfig+0x58>)
  1564. 80008ca: 4a0a ldr r2, [pc, #40] ; (80008f4 <RCC_USARTCLKConfig+0x58>)
  1565. 80008cc: 6b12 ldr r2, [r2, #48] ; 0x30
  1566. 80008ce: 490a ldr r1, [pc, #40] ; (80008f8 <RCC_USARTCLKConfig+0x5c>)
  1567. 80008d0: 400a ands r2, r1
  1568. 80008d2: 631a str r2, [r3, #48] ; 0x30
  1569. 80008d4: e005 b.n 80008e2 <RCC_USARTCLKConfig+0x46>
  1570. }
  1571. else
  1572. {
  1573. /* Clear USART3SW[1:0] bit */
  1574. RCC->CFGR3 &= ~RCC_CFGR3_USART3SW;
  1575. 80008d6: 4b07 ldr r3, [pc, #28] ; (80008f4 <RCC_USARTCLKConfig+0x58>)
  1576. 80008d8: 4a06 ldr r2, [pc, #24] ; (80008f4 <RCC_USARTCLKConfig+0x58>)
  1577. 80008da: 6b12 ldr r2, [r2, #48] ; 0x30
  1578. 80008dc: 4907 ldr r1, [pc, #28] ; (80008fc <RCC_USARTCLKConfig+0x60>)
  1579. 80008de: 400a ands r2, r1
  1580. 80008e0: 631a str r2, [r3, #48] ; 0x30
  1581. }
  1582. /* Set USARTxSW bits according to RCC_USARTCLK value */
  1583. RCC->CFGR3 |= RCC_USARTCLK;
  1584. 80008e2: 4b04 ldr r3, [pc, #16] ; (80008f4 <RCC_USARTCLKConfig+0x58>)
  1585. 80008e4: 4a03 ldr r2, [pc, #12] ; (80008f4 <RCC_USARTCLKConfig+0x58>)
  1586. 80008e6: 6b11 ldr r1, [r2, #48] ; 0x30
  1587. 80008e8: 687a ldr r2, [r7, #4]
  1588. 80008ea: 430a orrs r2, r1
  1589. 80008ec: 631a str r2, [r3, #48] ; 0x30
  1590. }
  1591. 80008ee: 46bd mov sp, r7
  1592. 80008f0: b004 add sp, #16
  1593. 80008f2: bd80 pop {r7, pc}
  1594. 80008f4: 40021000 .word 0x40021000
  1595. 80008f8: fffcffff .word 0xfffcffff
  1596. 80008fc: fff3ffff .word 0xfff3ffff
  1597. 08000900 <RCC_USBCLKConfig>:
  1598. * @arg RCC_USBCLK_HSI48: USB clock = HSI48
  1599. * @arg RCC_USBCLK_PLLCLK: USB clock = PLL clock
  1600. * @retval None
  1601. */
  1602. void RCC_USBCLKConfig(uint32_t RCC_USBCLK)
  1603. {
  1604. 8000900: b580 push {r7, lr}
  1605. 8000902: b082 sub sp, #8
  1606. 8000904: af00 add r7, sp, #0
  1607. 8000906: 6078 str r0, [r7, #4]
  1608. /* Check the parameters */
  1609. assert_param(IS_RCC_USBCLK(RCC_USBCLK));
  1610. /* Clear USBSW bit */
  1611. RCC->CFGR3 &= ~RCC_CFGR3_USBSW;
  1612. 8000908: 4b07 ldr r3, [pc, #28] ; (8000928 <RCC_USBCLKConfig+0x28>)
  1613. 800090a: 4a07 ldr r2, [pc, #28] ; (8000928 <RCC_USBCLKConfig+0x28>)
  1614. 800090c: 6b12 ldr r2, [r2, #48] ; 0x30
  1615. 800090e: 2180 movs r1, #128 ; 0x80
  1616. 8000910: 438a bics r2, r1
  1617. 8000912: 631a str r2, [r3, #48] ; 0x30
  1618. /* Set USBSW bits according to RCC_USBCLK value */
  1619. RCC->CFGR3 |= RCC_USBCLK;
  1620. 8000914: 4b04 ldr r3, [pc, #16] ; (8000928 <RCC_USBCLKConfig+0x28>)
  1621. 8000916: 4a04 ldr r2, [pc, #16] ; (8000928 <RCC_USBCLKConfig+0x28>)
  1622. 8000918: 6b11 ldr r1, [r2, #48] ; 0x30
  1623. 800091a: 687a ldr r2, [r7, #4]
  1624. 800091c: 430a orrs r2, r1
  1625. 800091e: 631a str r2, [r3, #48] ; 0x30
  1626. }
  1627. 8000920: 46bd mov sp, r7
  1628. 8000922: b002 add sp, #8
  1629. 8000924: bd80 pop {r7, pc}
  1630. 8000926: 46c0 nop ; (mov r8, r8)
  1631. 8000928: 40021000 .word 0x40021000
  1632. 0800092c <RCC_GetClocksFreq>:
  1633. * configuration based on this function will be incorrect.
  1634. *
  1635. * @retval None
  1636. */
  1637. void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks)
  1638. {
  1639. 800092c: b580 push {r7, lr}
  1640. 800092e: b088 sub sp, #32
  1641. 8000930: af00 add r7, sp, #0
  1642. 8000932: 6078 str r0, [r7, #4]
  1643. uint32_t tmp = 0, pllmull = 0, pllsource = 0, prediv1factor = 0, presc = 0, pllclk = 0;
  1644. 8000934: 2300 movs r3, #0
  1645. 8000936: 61bb str r3, [r7, #24]
  1646. 8000938: 2300 movs r3, #0
  1647. 800093a: 617b str r3, [r7, #20]
  1648. 800093c: 2300 movs r3, #0
  1649. 800093e: 613b str r3, [r7, #16]
  1650. 8000940: 2300 movs r3, #0
  1651. 8000942: 60fb str r3, [r7, #12]
  1652. 8000944: 2300 movs r3, #0
  1653. 8000946: 60bb str r3, [r7, #8]
  1654. 8000948: 2300 movs r3, #0
  1655. 800094a: 61fb str r3, [r7, #28]
  1656. /* Get SYSCLK source -------------------------------------------------------*/
  1657. tmp = RCC->CFGR & RCC_CFGR_SWS;
  1658. 800094c: 4ba3 ldr r3, [pc, #652] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1659. 800094e: 685b ldr r3, [r3, #4]
  1660. 8000950: 220c movs r2, #12
  1661. 8000952: 4013 ands r3, r2
  1662. 8000954: 61bb str r3, [r7, #24]
  1663. switch (tmp)
  1664. 8000956: 69bb ldr r3, [r7, #24]
  1665. 8000958: 2b04 cmp r3, #4
  1666. 800095a: d00c beq.n 8000976 <RCC_GetClocksFreq+0x4a>
  1667. 800095c: d802 bhi.n 8000964 <RCC_GetClocksFreq+0x38>
  1668. 800095e: 2b00 cmp r3, #0
  1669. 8000960: d005 beq.n 800096e <RCC_GetClocksFreq+0x42>
  1670. 8000962: e03b b.n 80009dc <RCC_GetClocksFreq+0xb0>
  1671. 8000964: 2b08 cmp r3, #8
  1672. 8000966: d00a beq.n 800097e <RCC_GetClocksFreq+0x52>
  1673. 8000968: 2b0c cmp r3, #12
  1674. 800096a: d033 beq.n 80009d4 <RCC_GetClocksFreq+0xa8>
  1675. 800096c: e036 b.n 80009dc <RCC_GetClocksFreq+0xb0>
  1676. {
  1677. case 0x00: /* HSI used as system clock */
  1678. RCC_Clocks->SYSCLK_Frequency = HSI_VALUE;
  1679. 800096e: 687b ldr r3, [r7, #4]
  1680. 8000970: 4a9b ldr r2, [pc, #620] ; (8000be0 <RCC_GetClocksFreq+0x2b4>)
  1681. 8000972: 601a str r2, [r3, #0]
  1682. break;
  1683. 8000974: e036 b.n 80009e4 <RCC_GetClocksFreq+0xb8>
  1684. case 0x04: /* HSE used as system clock */
  1685. RCC_Clocks->SYSCLK_Frequency = HSE_VALUE;
  1686. 8000976: 687b ldr r3, [r7, #4]
  1687. 8000978: 4a99 ldr r2, [pc, #612] ; (8000be0 <RCC_GetClocksFreq+0x2b4>)
  1688. 800097a: 601a str r2, [r3, #0]
  1689. break;
  1690. 800097c: e032 b.n 80009e4 <RCC_GetClocksFreq+0xb8>
  1691. case 0x08: /* PLL used as system clock */
  1692. /* Get PLL clock source and multiplication factor ----------------------*/
  1693. pllmull = RCC->CFGR & RCC_CFGR_PLLMULL;
  1694. 800097e: 4b97 ldr r3, [pc, #604] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1695. 8000980: 685a ldr r2, [r3, #4]
  1696. 8000982: 23f0 movs r3, #240 ; 0xf0
  1697. 8000984: 039b lsls r3, r3, #14
  1698. 8000986: 4013 ands r3, r2
  1699. 8000988: 617b str r3, [r7, #20]
  1700. pllsource = RCC->CFGR & RCC_CFGR_PLLSRC;
  1701. 800098a: 4b94 ldr r3, [pc, #592] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1702. 800098c: 685a ldr r2, [r3, #4]
  1703. 800098e: 23c0 movs r3, #192 ; 0xc0
  1704. 8000990: 025b lsls r3, r3, #9
  1705. 8000992: 4013 ands r3, r2
  1706. 8000994: 613b str r3, [r7, #16]
  1707. pllmull = ( pllmull >> 18) + 2;
  1708. 8000996: 697b ldr r3, [r7, #20]
  1709. 8000998: 0c9b lsrs r3, r3, #18
  1710. 800099a: 3302 adds r3, #2
  1711. 800099c: 617b str r3, [r7, #20]
  1712. if (pllsource == 0x00)
  1713. 800099e: 693b ldr r3, [r7, #16]
  1714. 80009a0: 2b00 cmp r3, #0
  1715. 80009a2: d104 bne.n 80009ae <RCC_GetClocksFreq+0x82>
  1716. {
  1717. /* HSI oscillator clock divided by 2 selected as PLL clock entry */
  1718. pllclk = (HSI_VALUE >> 1) * pllmull;
  1719. 80009a4: 697b ldr r3, [r7, #20]
  1720. 80009a6: 4a8f ldr r2, [pc, #572] ; (8000be4 <RCC_GetClocksFreq+0x2b8>)
  1721. 80009a8: 4353 muls r3, r2
  1722. 80009aa: 61fb str r3, [r7, #28]
  1723. 80009ac: e00e b.n 80009cc <RCC_GetClocksFreq+0xa0>
  1724. }
  1725. else
  1726. {
  1727. prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV1) + 1;
  1728. 80009ae: 4b8b ldr r3, [pc, #556] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1729. 80009b0: 6adb ldr r3, [r3, #44] ; 0x2c
  1730. 80009b2: 220f movs r2, #15
  1731. 80009b4: 4013 ands r3, r2
  1732. 80009b6: 3301 adds r3, #1
  1733. 80009b8: 60fb str r3, [r7, #12]
  1734. /* HSE oscillator clock selected as PREDIV1 clock entry */
  1735. pllclk = (HSE_VALUE / prediv1factor) * pllmull;
  1736. 80009ba: 4889 ldr r0, [pc, #548] ; (8000be0 <RCC_GetClocksFreq+0x2b4>)
  1737. 80009bc: 68f9 ldr r1, [r7, #12]
  1738. 80009be: f001 feb3 bl 8002728 <____aeabi_uidiv_from_thumb>
  1739. 80009c2: 1c03 adds r3, r0, #0
  1740. 80009c4: 1c1a adds r2, r3, #0
  1741. 80009c6: 697b ldr r3, [r7, #20]
  1742. 80009c8: 4353 muls r3, r2
  1743. 80009ca: 61fb str r3, [r7, #28]
  1744. }
  1745. RCC_Clocks->SYSCLK_Frequency = pllclk;
  1746. 80009cc: 687b ldr r3, [r7, #4]
  1747. 80009ce: 69fa ldr r2, [r7, #28]
  1748. 80009d0: 601a str r2, [r3, #0]
  1749. break;
  1750. 80009d2: e007 b.n 80009e4 <RCC_GetClocksFreq+0xb8>
  1751. case 0x0C: /* HSI48 used as system clock */
  1752. RCC_Clocks->SYSCLK_Frequency = HSI48_VALUE;
  1753. 80009d4: 687b ldr r3, [r7, #4]
  1754. 80009d6: 4a84 ldr r2, [pc, #528] ; (8000be8 <RCC_GetClocksFreq+0x2bc>)
  1755. 80009d8: 601a str r2, [r3, #0]
  1756. break;
  1757. 80009da: e003 b.n 80009e4 <RCC_GetClocksFreq+0xb8>
  1758. default: /* HSI used as system clock */
  1759. RCC_Clocks->SYSCLK_Frequency = HSI_VALUE;
  1760. 80009dc: 687b ldr r3, [r7, #4]
  1761. 80009de: 4a80 ldr r2, [pc, #512] ; (8000be0 <RCC_GetClocksFreq+0x2b4>)
  1762. 80009e0: 601a str r2, [r3, #0]
  1763. break;
  1764. 80009e2: 46c0 nop ; (mov r8, r8)
  1765. }
  1766. /* Compute HCLK, PCLK clocks frequencies -----------------------------------*/
  1767. /* Get HCLK prescaler */
  1768. tmp = RCC->CFGR & RCC_CFGR_HPRE;
  1769. 80009e4: 4b7d ldr r3, [pc, #500] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1770. 80009e6: 685b ldr r3, [r3, #4]
  1771. 80009e8: 22f0 movs r2, #240 ; 0xf0
  1772. 80009ea: 4013 ands r3, r2
  1773. 80009ec: 61bb str r3, [r7, #24]
  1774. tmp = tmp >> 4;
  1775. 80009ee: 69bb ldr r3, [r7, #24]
  1776. 80009f0: 091b lsrs r3, r3, #4
  1777. 80009f2: 61bb str r3, [r7, #24]
  1778. presc = APBAHBPrescTable[tmp];
  1779. 80009f4: 4a7d ldr r2, [pc, #500] ; (8000bec <RCC_GetClocksFreq+0x2c0>)
  1780. 80009f6: 69bb ldr r3, [r7, #24]
  1781. 80009f8: 18d3 adds r3, r2, r3
  1782. 80009fa: 781b ldrb r3, [r3, #0]
  1783. 80009fc: b2db uxtb r3, r3
  1784. 80009fe: 60bb str r3, [r7, #8]
  1785. /* HCLK clock frequency */
  1786. RCC_Clocks->HCLK_Frequency = RCC_Clocks->SYSCLK_Frequency >> presc;
  1787. 8000a00: 687b ldr r3, [r7, #4]
  1788. 8000a02: 681a ldr r2, [r3, #0]
  1789. 8000a04: 68bb ldr r3, [r7, #8]
  1790. 8000a06: 40da lsrs r2, r3
  1791. 8000a08: 687b ldr r3, [r7, #4]
  1792. 8000a0a: 605a str r2, [r3, #4]
  1793. /* Get PCLK prescaler */
  1794. tmp = RCC->CFGR & RCC_CFGR_PPRE;
  1795. 8000a0c: 4b73 ldr r3, [pc, #460] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1796. 8000a0e: 685a ldr r2, [r3, #4]
  1797. 8000a10: 23e0 movs r3, #224 ; 0xe0
  1798. 8000a12: 00db lsls r3, r3, #3
  1799. 8000a14: 4013 ands r3, r2
  1800. 8000a16: 61bb str r3, [r7, #24]
  1801. tmp = tmp >> 8;
  1802. 8000a18: 69bb ldr r3, [r7, #24]
  1803. 8000a1a: 0a1b lsrs r3, r3, #8
  1804. 8000a1c: 61bb str r3, [r7, #24]
  1805. presc = APBAHBPrescTable[tmp];
  1806. 8000a1e: 4a73 ldr r2, [pc, #460] ; (8000bec <RCC_GetClocksFreq+0x2c0>)
  1807. 8000a20: 69bb ldr r3, [r7, #24]
  1808. 8000a22: 18d3 adds r3, r2, r3
  1809. 8000a24: 781b ldrb r3, [r3, #0]
  1810. 8000a26: b2db uxtb r3, r3
  1811. 8000a28: 60bb str r3, [r7, #8]
  1812. /* PCLK clock frequency */
  1813. RCC_Clocks->PCLK_Frequency = RCC_Clocks->HCLK_Frequency >> presc;
  1814. 8000a2a: 687b ldr r3, [r7, #4]
  1815. 8000a2c: 685a ldr r2, [r3, #4]
  1816. 8000a2e: 68bb ldr r3, [r7, #8]
  1817. 8000a30: 40da lsrs r2, r3
  1818. 8000a32: 687b ldr r3, [r7, #4]
  1819. 8000a34: 609a str r2, [r3, #8]
  1820. /* ADCCLK clock frequency */
  1821. if((RCC->CFGR3 & RCC_CFGR3_ADCSW) != RCC_CFGR3_ADCSW)
  1822. 8000a36: 4b69 ldr r3, [pc, #420] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1823. 8000a38: 6b1a ldr r2, [r3, #48] ; 0x30
  1824. 8000a3a: 2380 movs r3, #128 ; 0x80
  1825. 8000a3c: 005b lsls r3, r3, #1
  1826. 8000a3e: 4013 ands r3, r2
  1827. 8000a40: d103 bne.n 8000a4a <RCC_GetClocksFreq+0x11e>
  1828. {
  1829. /* ADC Clock is HSI14 Osc. */
  1830. RCC_Clocks->ADCCLK_Frequency = HSI14_VALUE;
  1831. 8000a42: 687b ldr r3, [r7, #4]
  1832. 8000a44: 4a6a ldr r2, [pc, #424] ; (8000bf0 <RCC_GetClocksFreq+0x2c4>)
  1833. 8000a46: 60da str r2, [r3, #12]
  1834. 8000a48: e010 b.n 8000a6c <RCC_GetClocksFreq+0x140>
  1835. }
  1836. else
  1837. {
  1838. if((RCC->CFGR & RCC_CFGR_ADCPRE) != RCC_CFGR_ADCPRE)
  1839. 8000a4a: 4b64 ldr r3, [pc, #400] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1840. 8000a4c: 685a ldr r2, [r3, #4]
  1841. 8000a4e: 2380 movs r3, #128 ; 0x80
  1842. 8000a50: 01db lsls r3, r3, #7
  1843. 8000a52: 4013 ands r3, r2
  1844. 8000a54: d105 bne.n 8000a62 <RCC_GetClocksFreq+0x136>
  1845. {
  1846. /* ADC Clock is derived from PCLK/2 */
  1847. RCC_Clocks->ADCCLK_Frequency = RCC_Clocks->PCLK_Frequency >> 1;
  1848. 8000a56: 687b ldr r3, [r7, #4]
  1849. 8000a58: 689b ldr r3, [r3, #8]
  1850. 8000a5a: 085a lsrs r2, r3, #1
  1851. 8000a5c: 687b ldr r3, [r7, #4]
  1852. 8000a5e: 60da str r2, [r3, #12]
  1853. 8000a60: e004 b.n 8000a6c <RCC_GetClocksFreq+0x140>
  1854. }
  1855. else
  1856. {
  1857. /* ADC Clock is derived from PCLK/4 */
  1858. RCC_Clocks->ADCCLK_Frequency = RCC_Clocks->PCLK_Frequency >> 2;
  1859. 8000a62: 687b ldr r3, [r7, #4]
  1860. 8000a64: 689b ldr r3, [r3, #8]
  1861. 8000a66: 089a lsrs r2, r3, #2
  1862. 8000a68: 687b ldr r3, [r7, #4]
  1863. 8000a6a: 60da str r2, [r3, #12]
  1864. }
  1865. }
  1866. /* CECCLK clock frequency */
  1867. if((RCC->CFGR3 & RCC_CFGR3_CECSW) != RCC_CFGR3_CECSW)
  1868. 8000a6c: 4b5b ldr r3, [pc, #364] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1869. 8000a6e: 6b1b ldr r3, [r3, #48] ; 0x30
  1870. 8000a70: 2240 movs r2, #64 ; 0x40
  1871. 8000a72: 4013 ands r3, r2
  1872. 8000a74: d103 bne.n 8000a7e <RCC_GetClocksFreq+0x152>
  1873. {
  1874. /* CEC Clock is HSI/244 */
  1875. RCC_Clocks->CECCLK_Frequency = HSI_VALUE / 244;
  1876. 8000a76: 687b ldr r3, [r7, #4]
  1877. 8000a78: 4a5e ldr r2, [pc, #376] ; (8000bf4 <RCC_GetClocksFreq+0x2c8>)
  1878. 8000a7a: 611a str r2, [r3, #16]
  1879. 8000a7c: e003 b.n 8000a86 <RCC_GetClocksFreq+0x15a>
  1880. }
  1881. else
  1882. {
  1883. /* CECC Clock is LSE Osc. */
  1884. RCC_Clocks->CECCLK_Frequency = LSE_VALUE;
  1885. 8000a7e: 687b ldr r3, [r7, #4]
  1886. 8000a80: 2280 movs r2, #128 ; 0x80
  1887. 8000a82: 0212 lsls r2, r2, #8
  1888. 8000a84: 611a str r2, [r3, #16]
  1889. }
  1890. /* I2C1CLK clock frequency */
  1891. if((RCC->CFGR3 & RCC_CFGR3_I2C1SW) != RCC_CFGR3_I2C1SW)
  1892. 8000a86: 4b55 ldr r3, [pc, #340] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1893. 8000a88: 6b1b ldr r3, [r3, #48] ; 0x30
  1894. 8000a8a: 2210 movs r2, #16
  1895. 8000a8c: 4013 ands r3, r2
  1896. 8000a8e: d103 bne.n 8000a98 <RCC_GetClocksFreq+0x16c>
  1897. {
  1898. /* I2C1 Clock is HSI Osc. */
  1899. RCC_Clocks->I2C1CLK_Frequency = HSI_VALUE;
  1900. 8000a90: 687b ldr r3, [r7, #4]
  1901. 8000a92: 4a53 ldr r2, [pc, #332] ; (8000be0 <RCC_GetClocksFreq+0x2b4>)
  1902. 8000a94: 615a str r2, [r3, #20]
  1903. 8000a96: e003 b.n 8000aa0 <RCC_GetClocksFreq+0x174>
  1904. }
  1905. else
  1906. {
  1907. /* I2C1 Clock is System Clock */
  1908. RCC_Clocks->I2C1CLK_Frequency = RCC_Clocks->SYSCLK_Frequency;
  1909. 8000a98: 687b ldr r3, [r7, #4]
  1910. 8000a9a: 681a ldr r2, [r3, #0]
  1911. 8000a9c: 687b ldr r3, [r7, #4]
  1912. 8000a9e: 615a str r2, [r3, #20]
  1913. }
  1914. /* USART1CLK clock frequency */
  1915. if((RCC->CFGR3 & RCC_CFGR3_USART1SW) == 0x0)
  1916. 8000aa0: 4b4e ldr r3, [pc, #312] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1917. 8000aa2: 6b1b ldr r3, [r3, #48] ; 0x30
  1918. 8000aa4: 2203 movs r2, #3
  1919. 8000aa6: 4013 ands r3, r2
  1920. 8000aa8: d104 bne.n 8000ab4 <RCC_GetClocksFreq+0x188>
  1921. {
  1922. /* USART1 Clock is PCLK */
  1923. RCC_Clocks->USART1CLK_Frequency = RCC_Clocks->PCLK_Frequency;
  1924. 8000aaa: 687b ldr r3, [r7, #4]
  1925. 8000aac: 689a ldr r2, [r3, #8]
  1926. 8000aae: 687b ldr r3, [r7, #4]
  1927. 8000ab0: 619a str r2, [r3, #24]
  1928. 8000ab2: e01e b.n 8000af2 <RCC_GetClocksFreq+0x1c6>
  1929. }
  1930. else if((RCC->CFGR3 & RCC_CFGR3_USART1SW) == RCC_CFGR3_USART1SW_0)
  1931. 8000ab4: 4b49 ldr r3, [pc, #292] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1932. 8000ab6: 6b1b ldr r3, [r3, #48] ; 0x30
  1933. 8000ab8: 2203 movs r2, #3
  1934. 8000aba: 4013 ands r3, r2
  1935. 8000abc: 2b01 cmp r3, #1
  1936. 8000abe: d104 bne.n 8000aca <RCC_GetClocksFreq+0x19e>
  1937. {
  1938. /* USART1 Clock is System Clock */
  1939. RCC_Clocks->USART1CLK_Frequency = RCC_Clocks->SYSCLK_Frequency;
  1940. 8000ac0: 687b ldr r3, [r7, #4]
  1941. 8000ac2: 681a ldr r2, [r3, #0]
  1942. 8000ac4: 687b ldr r3, [r7, #4]
  1943. 8000ac6: 619a str r2, [r3, #24]
  1944. 8000ac8: e013 b.n 8000af2 <RCC_GetClocksFreq+0x1c6>
  1945. }
  1946. else if((RCC->CFGR3 & RCC_CFGR3_USART1SW) == RCC_CFGR3_USART1SW_1)
  1947. 8000aca: 4b44 ldr r3, [pc, #272] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1948. 8000acc: 6b1b ldr r3, [r3, #48] ; 0x30
  1949. 8000ace: 2203 movs r2, #3
  1950. 8000ad0: 4013 ands r3, r2
  1951. 8000ad2: 2b02 cmp r3, #2
  1952. 8000ad4: d104 bne.n 8000ae0 <RCC_GetClocksFreq+0x1b4>
  1953. {
  1954. /* USART1 Clock is LSE Osc. */
  1955. RCC_Clocks->USART1CLK_Frequency = LSE_VALUE;
  1956. 8000ad6: 687b ldr r3, [r7, #4]
  1957. 8000ad8: 2280 movs r2, #128 ; 0x80
  1958. 8000ada: 0212 lsls r2, r2, #8
  1959. 8000adc: 619a str r2, [r3, #24]
  1960. 8000ade: e008 b.n 8000af2 <RCC_GetClocksFreq+0x1c6>
  1961. }
  1962. else if((RCC->CFGR3 & RCC_CFGR3_USART1SW) == RCC_CFGR3_USART1SW)
  1963. 8000ae0: 4b3e ldr r3, [pc, #248] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1964. 8000ae2: 6b1b ldr r3, [r3, #48] ; 0x30
  1965. 8000ae4: 2203 movs r2, #3
  1966. 8000ae6: 4013 ands r3, r2
  1967. 8000ae8: 2b03 cmp r3, #3
  1968. 8000aea: d102 bne.n 8000af2 <RCC_GetClocksFreq+0x1c6>
  1969. {
  1970. /* USART1 Clock is HSI Osc. */
  1971. RCC_Clocks->USART1CLK_Frequency = HSI_VALUE;
  1972. 8000aec: 687b ldr r3, [r7, #4]
  1973. 8000aee: 4a3c ldr r2, [pc, #240] ; (8000be0 <RCC_GetClocksFreq+0x2b4>)
  1974. 8000af0: 619a str r2, [r3, #24]
  1975. }
  1976. /* USART2CLK clock frequency */
  1977. if((RCC->CFGR3 & RCC_CFGR3_USART2SW) == 0x0)
  1978. 8000af2: 4b3a ldr r3, [pc, #232] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1979. 8000af4: 6b1a ldr r2, [r3, #48] ; 0x30
  1980. 8000af6: 23c0 movs r3, #192 ; 0xc0
  1981. 8000af8: 029b lsls r3, r3, #10
  1982. 8000afa: 4013 ands r3, r2
  1983. 8000afc: d104 bne.n 8000b08 <RCC_GetClocksFreq+0x1dc>
  1984. {
  1985. /* USART Clock is PCLK */
  1986. RCC_Clocks->USART2CLK_Frequency = RCC_Clocks->PCLK_Frequency;
  1987. 8000afe: 687b ldr r3, [r7, #4]
  1988. 8000b00: 689a ldr r2, [r3, #8]
  1989. 8000b02: 687b ldr r3, [r7, #4]
  1990. 8000b04: 61da str r2, [r3, #28]
  1991. 8000b06: e027 b.n 8000b58 <RCC_GetClocksFreq+0x22c>
  1992. }
  1993. else if((RCC->CFGR3 & RCC_CFGR3_USART2SW) == RCC_CFGR3_USART2SW_0)
  1994. 8000b08: 4b34 ldr r3, [pc, #208] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  1995. 8000b0a: 6b1a ldr r2, [r3, #48] ; 0x30
  1996. 8000b0c: 23c0 movs r3, #192 ; 0xc0
  1997. 8000b0e: 029b lsls r3, r3, #10
  1998. 8000b10: 401a ands r2, r3
  1999. 8000b12: 2380 movs r3, #128 ; 0x80
  2000. 8000b14: 025b lsls r3, r3, #9
  2001. 8000b16: 429a cmp r2, r3
  2002. 8000b18: d104 bne.n 8000b24 <RCC_GetClocksFreq+0x1f8>
  2003. {
  2004. /* USART Clock is System Clock */
  2005. RCC_Clocks->USART2CLK_Frequency = RCC_Clocks->SYSCLK_Frequency;
  2006. 8000b1a: 687b ldr r3, [r7, #4]
  2007. 8000b1c: 681a ldr r2, [r3, #0]
  2008. 8000b1e: 687b ldr r3, [r7, #4]
  2009. 8000b20: 61da str r2, [r3, #28]
  2010. 8000b22: e019 b.n 8000b58 <RCC_GetClocksFreq+0x22c>
  2011. }
  2012. else if((RCC->CFGR3 & RCC_CFGR3_USART2SW) == RCC_CFGR3_USART2SW_1)
  2013. 8000b24: 4b2d ldr r3, [pc, #180] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  2014. 8000b26: 6b1a ldr r2, [r3, #48] ; 0x30
  2015. 8000b28: 23c0 movs r3, #192 ; 0xc0
  2016. 8000b2a: 029b lsls r3, r3, #10
  2017. 8000b2c: 401a ands r2, r3
  2018. 8000b2e: 2380 movs r3, #128 ; 0x80
  2019. 8000b30: 029b lsls r3, r3, #10
  2020. 8000b32: 429a cmp r2, r3
  2021. 8000b34: d104 bne.n 8000b40 <RCC_GetClocksFreq+0x214>
  2022. {
  2023. /* USART Clock is LSE Osc. */
  2024. RCC_Clocks->USART2CLK_Frequency = LSE_VALUE;
  2025. 8000b36: 687b ldr r3, [r7, #4]
  2026. 8000b38: 2280 movs r2, #128 ; 0x80
  2027. 8000b3a: 0212 lsls r2, r2, #8
  2028. 8000b3c: 61da str r2, [r3, #28]
  2029. 8000b3e: e00b b.n 8000b58 <RCC_GetClocksFreq+0x22c>
  2030. }
  2031. else if((RCC->CFGR3 & RCC_CFGR3_USART2SW) == RCC_CFGR3_USART2SW)
  2032. 8000b40: 4b26 ldr r3, [pc, #152] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  2033. 8000b42: 6b1a ldr r2, [r3, #48] ; 0x30
  2034. 8000b44: 23c0 movs r3, #192 ; 0xc0
  2035. 8000b46: 029b lsls r3, r3, #10
  2036. 8000b48: 401a ands r2, r3
  2037. 8000b4a: 23c0 movs r3, #192 ; 0xc0
  2038. 8000b4c: 029b lsls r3, r3, #10
  2039. 8000b4e: 429a cmp r2, r3
  2040. 8000b50: d102 bne.n 8000b58 <RCC_GetClocksFreq+0x22c>
  2041. {
  2042. /* USART Clock is HSI Osc. */
  2043. RCC_Clocks->USART2CLK_Frequency = HSI_VALUE;
  2044. 8000b52: 687b ldr r3, [r7, #4]
  2045. 8000b54: 4a22 ldr r2, [pc, #136] ; (8000be0 <RCC_GetClocksFreq+0x2b4>)
  2046. 8000b56: 61da str r2, [r3, #28]
  2047. }
  2048. /* USART3CLK clock frequency */
  2049. if((RCC->CFGR3 & RCC_CFGR3_USART3SW) == 0x0)
  2050. 8000b58: 4b20 ldr r3, [pc, #128] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  2051. 8000b5a: 6b1a ldr r2, [r3, #48] ; 0x30
  2052. 8000b5c: 23c0 movs r3, #192 ; 0xc0
  2053. 8000b5e: 031b lsls r3, r3, #12
  2054. 8000b60: 4013 ands r3, r2
  2055. 8000b62: d104 bne.n 8000b6e <RCC_GetClocksFreq+0x242>
  2056. {
  2057. /* USART Clock is PCLK */
  2058. RCC_Clocks->USART3CLK_Frequency = RCC_Clocks->PCLK_Frequency;
  2059. 8000b64: 687b ldr r3, [r7, #4]
  2060. 8000b66: 689a ldr r2, [r3, #8]
  2061. 8000b68: 687b ldr r3, [r7, #4]
  2062. 8000b6a: 621a str r2, [r3, #32]
  2063. 8000b6c: e027 b.n 8000bbe <RCC_GetClocksFreq+0x292>
  2064. }
  2065. else if((RCC->CFGR3 & RCC_CFGR3_USART3SW) == RCC_CFGR3_USART3SW_0)
  2066. 8000b6e: 4b1b ldr r3, [pc, #108] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  2067. 8000b70: 6b1a ldr r2, [r3, #48] ; 0x30
  2068. 8000b72: 23c0 movs r3, #192 ; 0xc0
  2069. 8000b74: 031b lsls r3, r3, #12
  2070. 8000b76: 401a ands r2, r3
  2071. 8000b78: 2380 movs r3, #128 ; 0x80
  2072. 8000b7a: 02db lsls r3, r3, #11
  2073. 8000b7c: 429a cmp r2, r3
  2074. 8000b7e: d104 bne.n 8000b8a <RCC_GetClocksFreq+0x25e>
  2075. {
  2076. /* USART Clock is System Clock */
  2077. RCC_Clocks->USART3CLK_Frequency = RCC_Clocks->SYSCLK_Frequency;
  2078. 8000b80: 687b ldr r3, [r7, #4]
  2079. 8000b82: 681a ldr r2, [r3, #0]
  2080. 8000b84: 687b ldr r3, [r7, #4]
  2081. 8000b86: 621a str r2, [r3, #32]
  2082. 8000b88: e019 b.n 8000bbe <RCC_GetClocksFreq+0x292>
  2083. }
  2084. else if((RCC->CFGR3 & RCC_CFGR3_USART3SW) == RCC_CFGR3_USART3SW_1)
  2085. 8000b8a: 4b14 ldr r3, [pc, #80] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  2086. 8000b8c: 6b1a ldr r2, [r3, #48] ; 0x30
  2087. 8000b8e: 23c0 movs r3, #192 ; 0xc0
  2088. 8000b90: 031b lsls r3, r3, #12
  2089. 8000b92: 401a ands r2, r3
  2090. 8000b94: 2380 movs r3, #128 ; 0x80
  2091. 8000b96: 031b lsls r3, r3, #12
  2092. 8000b98: 429a cmp r2, r3
  2093. 8000b9a: d104 bne.n 8000ba6 <RCC_GetClocksFreq+0x27a>
  2094. {
  2095. /* USART Clock is LSE Osc. */
  2096. RCC_Clocks->USART3CLK_Frequency = LSE_VALUE;
  2097. 8000b9c: 687b ldr r3, [r7, #4]
  2098. 8000b9e: 2280 movs r2, #128 ; 0x80
  2099. 8000ba0: 0212 lsls r2, r2, #8
  2100. 8000ba2: 621a str r2, [r3, #32]
  2101. 8000ba4: e00b b.n 8000bbe <RCC_GetClocksFreq+0x292>
  2102. }
  2103. else if((RCC->CFGR3 & RCC_CFGR3_USART3SW) == RCC_CFGR3_USART3SW)
  2104. 8000ba6: 4b0d ldr r3, [pc, #52] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  2105. 8000ba8: 6b1a ldr r2, [r3, #48] ; 0x30
  2106. 8000baa: 23c0 movs r3, #192 ; 0xc0
  2107. 8000bac: 031b lsls r3, r3, #12
  2108. 8000bae: 401a ands r2, r3
  2109. 8000bb0: 23c0 movs r3, #192 ; 0xc0
  2110. 8000bb2: 031b lsls r3, r3, #12
  2111. 8000bb4: 429a cmp r2, r3
  2112. 8000bb6: d102 bne.n 8000bbe <RCC_GetClocksFreq+0x292>
  2113. {
  2114. /* USART Clock is HSI Osc. */
  2115. RCC_Clocks->USART3CLK_Frequency = HSI_VALUE;
  2116. 8000bb8: 687b ldr r3, [r7, #4]
  2117. 8000bba: 4a09 ldr r2, [pc, #36] ; (8000be0 <RCC_GetClocksFreq+0x2b4>)
  2118. 8000bbc: 621a str r2, [r3, #32]
  2119. }
  2120. /* USBCLK clock frequency */
  2121. if((RCC->CFGR3 & RCC_CFGR3_USBSW) != RCC_CFGR3_USBSW)
  2122. 8000bbe: 4b07 ldr r3, [pc, #28] ; (8000bdc <RCC_GetClocksFreq+0x2b0>)
  2123. 8000bc0: 6b1b ldr r3, [r3, #48] ; 0x30
  2124. 8000bc2: 2280 movs r2, #128 ; 0x80
  2125. 8000bc4: 4013 ands r3, r2
  2126. 8000bc6: d103 bne.n 8000bd0 <RCC_GetClocksFreq+0x2a4>
  2127. {
  2128. /* USB Clock is HSI48 */
  2129. RCC_Clocks->USBCLK_Frequency = HSI48_VALUE;
  2130. 8000bc8: 687b ldr r3, [r7, #4]
  2131. 8000bca: 4a07 ldr r2, [pc, #28] ; (8000be8 <RCC_GetClocksFreq+0x2bc>)
  2132. 8000bcc: 625a str r2, [r3, #36] ; 0x24
  2133. 8000bce: e002 b.n 8000bd6 <RCC_GetClocksFreq+0x2aa>
  2134. }
  2135. else
  2136. {
  2137. /* USB Clock is PLL clock */
  2138. RCC_Clocks->USBCLK_Frequency = pllclk;
  2139. 8000bd0: 687b ldr r3, [r7, #4]
  2140. 8000bd2: 69fa ldr r2, [r7, #28]
  2141. 8000bd4: 625a str r2, [r3, #36] ; 0x24
  2142. }
  2143. }
  2144. 8000bd6: 46bd mov sp, r7
  2145. 8000bd8: b008 add sp, #32
  2146. 8000bda: bd80 pop {r7, pc}
  2147. 8000bdc: 40021000 .word 0x40021000
  2148. 8000be0: 007a1200 .word 0x007a1200
  2149. 8000be4: 003d0900 .word 0x003d0900
  2150. 8000be8: 02dc6c00 .word 0x02dc6c00
  2151. 8000bec: 20000014 .word 0x20000014
  2152. 8000bf0: 00d59f80 .word 0x00d59f80
  2153. 8000bf4: 00008012 .word 0x00008012
  2154. 08000bf8 <RCC_RTCCLKConfig>:
  2155. * RTC clock source).
  2156. *
  2157. * @retval None
  2158. */
  2159. void RCC_RTCCLKConfig(uint32_t RCC_RTCCLKSource)
  2160. {
  2161. 8000bf8: b580 push {r7, lr}
  2162. 8000bfa: b082 sub sp, #8
  2163. 8000bfc: af00 add r7, sp, #0
  2164. 8000bfe: 6078 str r0, [r7, #4]
  2165. /* Check the parameters */
  2166. assert_param(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource));
  2167. /* Select the RTC clock source */
  2168. RCC->BDCR |= RCC_RTCCLKSource;
  2169. 8000c00: 4b04 ldr r3, [pc, #16] ; (8000c14 <RCC_RTCCLKConfig+0x1c>)
  2170. 8000c02: 4a04 ldr r2, [pc, #16] ; (8000c14 <RCC_RTCCLKConfig+0x1c>)
  2171. 8000c04: 6a11 ldr r1, [r2, #32]
  2172. 8000c06: 687a ldr r2, [r7, #4]
  2173. 8000c08: 430a orrs r2, r1
  2174. 8000c0a: 621a str r2, [r3, #32]
  2175. }
  2176. 8000c0c: 46bd mov sp, r7
  2177. 8000c0e: b002 add sp, #8
  2178. 8000c10: bd80 pop {r7, pc}
  2179. 8000c12: 46c0 nop ; (mov r8, r8)
  2180. 8000c14: 40021000 .word 0x40021000
  2181. 08000c18 <RCC_RTCCLKCmd>:
  2182. * @param NewState: new state of the RTC clock.
  2183. * This parameter can be: ENABLE or DISABLE.
  2184. * @retval None
  2185. */
  2186. void RCC_RTCCLKCmd(FunctionalState NewState)
  2187. {
  2188. 8000c18: b580 push {r7, lr}
  2189. 8000c1a: b082 sub sp, #8
  2190. 8000c1c: af00 add r7, sp, #0
  2191. 8000c1e: 1c02 adds r2, r0, #0
  2192. 8000c20: 1dfb adds r3, r7, #7
  2193. 8000c22: 701a strb r2, [r3, #0]
  2194. /* Check the parameters */
  2195. assert_param(IS_FUNCTIONAL_STATE(NewState));
  2196. if (NewState != DISABLE)
  2197. 8000c24: 1dfb adds r3, r7, #7
  2198. 8000c26: 781b ldrb r3, [r3, #0]
  2199. 8000c28: 2b00 cmp r3, #0
  2200. 8000c2a: d007 beq.n 8000c3c <RCC_RTCCLKCmd+0x24>
  2201. {
  2202. RCC->BDCR |= RCC_BDCR_RTCEN;
  2203. 8000c2c: 4b08 ldr r3, [pc, #32] ; (8000c50 <RCC_RTCCLKCmd+0x38>)
  2204. 8000c2e: 4a08 ldr r2, [pc, #32] ; (8000c50 <RCC_RTCCLKCmd+0x38>)
  2205. 8000c30: 6a12 ldr r2, [r2, #32]
  2206. 8000c32: 2180 movs r1, #128 ; 0x80
  2207. 8000c34: 0209 lsls r1, r1, #8
  2208. 8000c36: 430a orrs r2, r1
  2209. 8000c38: 621a str r2, [r3, #32]
  2210. 8000c3a: e005 b.n 8000c48 <RCC_RTCCLKCmd+0x30>
  2211. }
  2212. else
  2213. {
  2214. RCC->BDCR &= ~RCC_BDCR_RTCEN;
  2215. 8000c3c: 4b04 ldr r3, [pc, #16] ; (8000c50 <RCC_RTCCLKCmd+0x38>)
  2216. 8000c3e: 4a04 ldr r2, [pc, #16] ; (8000c50 <RCC_RTCCLKCmd+0x38>)
  2217. 8000c40: 6a12 ldr r2, [r2, #32]
  2218. 8000c42: 4904 ldr r1, [pc, #16] ; (8000c54 <RCC_RTCCLKCmd+0x3c>)
  2219. 8000c44: 400a ands r2, r1
  2220. 8000c46: 621a str r2, [r3, #32]
  2221. }
  2222. }
  2223. 8000c48: 46bd mov sp, r7
  2224. 8000c4a: b002 add sp, #8
  2225. 8000c4c: bd80 pop {r7, pc}
  2226. 8000c4e: 46c0 nop ; (mov r8, r8)
  2227. 8000c50: 40021000 .word 0x40021000
  2228. 8000c54: ffff7fff .word 0xffff7fff
  2229. 08000c58 <RCC_BackupResetCmd>:
  2230. * @param NewState: new state of the Backup domain reset.
  2231. * This parameter can be: ENABLE or DISABLE.
  2232. * @retval None
  2233. */
  2234. void RCC_BackupResetCmd(FunctionalState NewState)
  2235. {
  2236. 8000c58: b580 push {r7, lr}
  2237. 8000c5a: b082 sub sp, #8
  2238. 8000c5c: af00 add r7, sp, #0
  2239. 8000c5e: 1c02 adds r2, r0, #0
  2240. 8000c60: 1dfb adds r3, r7, #7
  2241. 8000c62: 701a strb r2, [r3, #0]
  2242. /* Check the parameters */
  2243. assert_param(IS_FUNCTIONAL_STATE(NewState));
  2244. if (NewState != DISABLE)
  2245. 8000c64: 1dfb adds r3, r7, #7
  2246. 8000c66: 781b ldrb r3, [r3, #0]
  2247. 8000c68: 2b00 cmp r3, #0
  2248. 8000c6a: d007 beq.n 8000c7c <RCC_BackupResetCmd+0x24>
  2249. {
  2250. RCC->BDCR |= RCC_BDCR_BDRST;
  2251. 8000c6c: 4b08 ldr r3, [pc, #32] ; (8000c90 <RCC_BackupResetCmd+0x38>)
  2252. 8000c6e: 4a08 ldr r2, [pc, #32] ; (8000c90 <RCC_BackupResetCmd+0x38>)
  2253. 8000c70: 6a12 ldr r2, [r2, #32]
  2254. 8000c72: 2180 movs r1, #128 ; 0x80
  2255. 8000c74: 0249 lsls r1, r1, #9
  2256. 8000c76: 430a orrs r2, r1
  2257. 8000c78: 621a str r2, [r3, #32]
  2258. 8000c7a: e005 b.n 8000c88 <RCC_BackupResetCmd+0x30>
  2259. }
  2260. else
  2261. {
  2262. RCC->BDCR &= ~RCC_BDCR_BDRST;
  2263. 8000c7c: 4b04 ldr r3, [pc, #16] ; (8000c90 <RCC_BackupResetCmd+0x38>)
  2264. 8000c7e: 4a04 ldr r2, [pc, #16] ; (8000c90 <RCC_BackupResetCmd+0x38>)
  2265. 8000c80: 6a12 ldr r2, [r2, #32]
  2266. 8000c82: 4904 ldr r1, [pc, #16] ; (8000c94 <RCC_BackupResetCmd+0x3c>)
  2267. 8000c84: 400a ands r2, r1
  2268. 8000c86: 621a str r2, [r3, #32]
  2269. }
  2270. }
  2271. 8000c88: 46bd mov sp, r7
  2272. 8000c8a: b002 add sp, #8
  2273. 8000c8c: bd80 pop {r7, pc}
  2274. 8000c8e: 46c0 nop ; (mov r8, r8)
  2275. 8000c90: 40021000 .word 0x40021000
  2276. 8000c94: fffeffff .word 0xfffeffff
  2277. 08000c98 <RCC_AHBPeriphClockCmd>:
  2278. * @param NewState: new state of the specified peripheral clock.
  2279. * This parameter can be: ENABLE or DISABLE.
  2280. * @retval None
  2281. */
  2282. void RCC_AHBPeriphClockCmd(uint32_t RCC_AHBPeriph, FunctionalState NewState)
  2283. {
  2284. 8000c98: b580 push {r7, lr}
  2285. 8000c9a: b082 sub sp, #8
  2286. 8000c9c: af00 add r7, sp, #0
  2287. 8000c9e: 6078 str r0, [r7, #4]
  2288. 8000ca0: 1c0a adds r2, r1, #0
  2289. 8000ca2: 1cfb adds r3, r7, #3
  2290. 8000ca4: 701a strb r2, [r3, #0]
  2291. /* Check the parameters */
  2292. assert_param(IS_RCC_AHB_PERIPH(RCC_AHBPeriph));
  2293. assert_param(IS_FUNCTIONAL_STATE(NewState));
  2294. if (NewState != DISABLE)
  2295. 8000ca6: 1cfb adds r3, r7, #3
  2296. 8000ca8: 781b ldrb r3, [r3, #0]
  2297. 8000caa: 2b00 cmp r3, #0
  2298. 8000cac: d006 beq.n 8000cbc <RCC_AHBPeriphClockCmd+0x24>
  2299. {
  2300. RCC->AHBENR |= RCC_AHBPeriph;
  2301. 8000cae: 4b08 ldr r3, [pc, #32] ; (8000cd0 <RCC_AHBPeriphClockCmd+0x38>)
  2302. 8000cb0: 4a07 ldr r2, [pc, #28] ; (8000cd0 <RCC_AHBPeriphClockCmd+0x38>)
  2303. 8000cb2: 6951 ldr r1, [r2, #20]
  2304. 8000cb4: 687a ldr r2, [r7, #4]
  2305. 8000cb6: 430a orrs r2, r1
  2306. 8000cb8: 615a str r2, [r3, #20]
  2307. 8000cba: e006 b.n 8000cca <RCC_AHBPeriphClockCmd+0x32>
  2308. }
  2309. else
  2310. {
  2311. RCC->AHBENR &= ~RCC_AHBPeriph;
  2312. 8000cbc: 4b04 ldr r3, [pc, #16] ; (8000cd0 <RCC_AHBPeriphClockCmd+0x38>)
  2313. 8000cbe: 4a04 ldr r2, [pc, #16] ; (8000cd0 <RCC_AHBPeriphClockCmd+0x38>)
  2314. 8000cc0: 6952 ldr r2, [r2, #20]
  2315. 8000cc2: 6879 ldr r1, [r7, #4]
  2316. 8000cc4: 43c9 mvns r1, r1
  2317. 8000cc6: 400a ands r2, r1
  2318. 8000cc8: 615a str r2, [r3, #20]
  2319. }
  2320. }
  2321. 8000cca: 46bd mov sp, r7
  2322. 8000ccc: b002 add sp, #8
  2323. 8000cce: bd80 pop {r7, pc}
  2324. 8000cd0: 40021000 .word 0x40021000
  2325. 08000cd4 <RCC_APB2PeriphClockCmd>:
  2326. * @param NewState: new state of the specified peripheral clock.
  2327. * This parameter can be: ENABLE or DISABLE.
  2328. * @retval None
  2329. */
  2330. void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState)
  2331. {
  2332. 8000cd4: b580 push {r7, lr}
  2333. 8000cd6: b082 sub sp, #8
  2334. 8000cd8: af00 add r7, sp, #0
  2335. 8000cda: 6078 str r0, [r7, #4]
  2336. 8000cdc: 1c0a adds r2, r1, #0
  2337. 8000cde: 1cfb adds r3, r7, #3
  2338. 8000ce0: 701a strb r2, [r3, #0]
  2339. /* Check the parameters */
  2340. assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
  2341. assert_param(IS_FUNCTIONAL_STATE(NewState));
  2342. if (NewState != DISABLE)
  2343. 8000ce2: 1cfb adds r3, r7, #3
  2344. 8000ce4: 781b ldrb r3, [r3, #0]
  2345. 8000ce6: 2b00 cmp r3, #0
  2346. 8000ce8: d006 beq.n 8000cf8 <RCC_APB2PeriphClockCmd+0x24>
  2347. {
  2348. RCC->APB2ENR |= RCC_APB2Periph;
  2349. 8000cea: 4b08 ldr r3, [pc, #32] ; (8000d0c <RCC_APB2PeriphClockCmd+0x38>)
  2350. 8000cec: 4a07 ldr r2, [pc, #28] ; (8000d0c <RCC_APB2PeriphClockCmd+0x38>)
  2351. 8000cee: 6991 ldr r1, [r2, #24]
  2352. 8000cf0: 687a ldr r2, [r7, #4]
  2353. 8000cf2: 430a orrs r2, r1
  2354. 8000cf4: 619a str r2, [r3, #24]
  2355. 8000cf6: e006 b.n 8000d06 <RCC_APB2PeriphClockCmd+0x32>
  2356. }
  2357. else
  2358. {
  2359. RCC->APB2ENR &= ~RCC_APB2Periph;
  2360. 8000cf8: 4b04 ldr r3, [pc, #16] ; (8000d0c <RCC_APB2PeriphClockCmd+0x38>)
  2361. 8000cfa: 4a04 ldr r2, [pc, #16] ; (8000d0c <RCC_APB2PeriphClockCmd+0x38>)
  2362. 8000cfc: 6992 ldr r2, [r2, #24]
  2363. 8000cfe: 6879 ldr r1, [r7, #4]
  2364. 8000d00: 43c9 mvns r1, r1
  2365. 8000d02: 400a ands r2, r1
  2366. 8000d04: 619a str r2, [r3, #24]
  2367. }
  2368. }
  2369. 8000d06: 46bd mov sp, r7
  2370. 8000d08: b002 add sp, #8
  2371. 8000d0a: bd80 pop {r7, pc}
  2372. 8000d0c: 40021000 .word 0x40021000
  2373. 08000d10 <RCC_APB1PeriphClockCmd>:
  2374. * @param NewState: new state of the specified peripheral clock.
  2375. * This parameter can be: ENABLE or DISABLE.
  2376. * @retval None
  2377. */
  2378. void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState)
  2379. {
  2380. 8000d10: b580 push {r7, lr}
  2381. 8000d12: b082 sub sp, #8
  2382. 8000d14: af00 add r7, sp, #0
  2383. 8000d16: 6078 str r0, [r7, #4]
  2384. 8000d18: 1c0a adds r2, r1, #0
  2385. 8000d1a: 1cfb adds r3, r7, #3
  2386. 8000d1c: 701a strb r2, [r3, #0]
  2387. /* Check the parameters */
  2388. assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
  2389. assert_param(IS_FUNCTIONAL_STATE(NewState));
  2390. if (NewState != DISABLE)
  2391. 8000d1e: 1cfb adds r3, r7, #3
  2392. 8000d20: 781b ldrb r3, [r3, #0]
  2393. 8000d22: 2b00 cmp r3, #0
  2394. 8000d24: d006 beq.n 8000d34 <RCC_APB1PeriphClockCmd+0x24>
  2395. {
  2396. RCC->APB1ENR |= RCC_APB1Periph;
  2397. 8000d26: 4b08 ldr r3, [pc, #32] ; (8000d48 <RCC_APB1PeriphClockCmd+0x38>)
  2398. 8000d28: 4a07 ldr r2, [pc, #28] ; (8000d48 <RCC_APB1PeriphClockCmd+0x38>)
  2399. 8000d2a: 69d1 ldr r1, [r2, #28]
  2400. 8000d2c: 687a ldr r2, [r7, #4]
  2401. 8000d2e: 430a orrs r2, r1
  2402. 8000d30: 61da str r2, [r3, #28]
  2403. 8000d32: e006 b.n 8000d42 <RCC_APB1PeriphClockCmd+0x32>
  2404. }
  2405. else
  2406. {
  2407. RCC->APB1ENR &= ~RCC_APB1Periph;
  2408. 8000d34: 4b04 ldr r3, [pc, #16] ; (8000d48 <RCC_APB1PeriphClockCmd+0x38>)
  2409. 8000d36: 4a04 ldr r2, [pc, #16] ; (8000d48 <RCC_APB1PeriphClockCmd+0x38>)
  2410. 8000d38: 69d2 ldr r2, [r2, #28]
  2411. 8000d3a: 6879 ldr r1, [r7, #4]
  2412. 8000d3c: 43c9 mvns r1, r1
  2413. 8000d3e: 400a ands r2, r1
  2414. 8000d40: 61da str r2, [r3, #28]
  2415. }
  2416. }
  2417. 8000d42: 46bd mov sp, r7
  2418. 8000d44: b002 add sp, #8
  2419. 8000d46: bd80 pop {r7, pc}
  2420. 8000d48: 40021000 .word 0x40021000
  2421. 08000d4c <RCC_AHBPeriphResetCmd>:
  2422. * @param NewState: new state of the specified peripheral reset.
  2423. * This parameter can be: ENABLE or DISABLE.
  2424. * @retval None
  2425. */
  2426. void RCC_AHBPeriphResetCmd(uint32_t RCC_AHBPeriph, FunctionalState NewState)
  2427. {
  2428. 8000d4c: b580 push {r7, lr}
  2429. 8000d4e: b082 sub sp, #8
  2430. 8000d50: af00 add r7, sp, #0
  2431. 8000d52: 6078 str r0, [r7, #4]
  2432. 8000d54: 1c0a adds r2, r1, #0
  2433. 8000d56: 1cfb adds r3, r7, #3
  2434. 8000d58: 701a strb r2, [r3, #0]
  2435. /* Check the parameters */
  2436. assert_param(IS_RCC_AHB_RST_PERIPH(RCC_AHBPeriph));
  2437. assert_param(IS_FUNCTIONAL_STATE(NewState));
  2438. if (NewState != DISABLE)
  2439. 8000d5a: 1cfb adds r3, r7, #3
  2440. 8000d5c: 781b ldrb r3, [r3, #0]
  2441. 8000d5e: 2b00 cmp r3, #0
  2442. 8000d60: d006 beq.n 8000d70 <RCC_AHBPeriphResetCmd+0x24>
  2443. {
  2444. RCC->AHBRSTR |= RCC_AHBPeriph;
  2445. 8000d62: 4b08 ldr r3, [pc, #32] ; (8000d84 <RCC_AHBPeriphResetCmd+0x38>)
  2446. 8000d64: 4a07 ldr r2, [pc, #28] ; (8000d84 <RCC_AHBPeriphResetCmd+0x38>)
  2447. 8000d66: 6a91 ldr r1, [r2, #40] ; 0x28
  2448. 8000d68: 687a ldr r2, [r7, #4]
  2449. 8000d6a: 430a orrs r2, r1
  2450. 8000d6c: 629a str r2, [r3, #40] ; 0x28
  2451. 8000d6e: e006 b.n 8000d7e <RCC_AHBPeriphResetCmd+0x32>
  2452. }
  2453. else
  2454. {
  2455. RCC->AHBRSTR &= ~RCC_AHBPeriph;
  2456. 8000d70: 4b04 ldr r3, [pc, #16] ; (8000d84 <RCC_AHBPeriphResetCmd+0x38>)
  2457. 8000d72: 4a04 ldr r2, [pc, #16] ; (8000d84 <RCC_AHBPeriphResetCmd+0x38>)
  2458. 8000d74: 6a92 ldr r2, [r2, #40] ; 0x28
  2459. 8000d76: 6879 ldr r1, [r7, #4]
  2460. 8000d78: 43c9 mvns r1, r1
  2461. 8000d7a: 400a ands r2, r1
  2462. 8000d7c: 629a str r2, [r3, #40] ; 0x28
  2463. }
  2464. }
  2465. 8000d7e: 46bd mov sp, r7
  2466. 8000d80: b002 add sp, #8
  2467. 8000d82: bd80 pop {r7, pc}
  2468. 8000d84: 40021000 .word 0x40021000
  2469. 08000d88 <RCC_APB2PeriphResetCmd>:
  2470. * @param NewState: new state of the specified peripheral reset.
  2471. * This parameter can be: ENABLE or DISABLE.
  2472. * @retval None
  2473. */
  2474. void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState)
  2475. {
  2476. 8000d88: b580 push {r7, lr}
  2477. 8000d8a: b082 sub sp, #8
  2478. 8000d8c: af00 add r7, sp, #0
  2479. 8000d8e: 6078 str r0, [r7, #4]
  2480. 8000d90: 1c0a adds r2, r1, #0
  2481. 8000d92: 1cfb adds r3, r7, #3
  2482. 8000d94: 701a strb r2, [r3, #0]
  2483. /* Check the parameters */
  2484. assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph));
  2485. assert_param(IS_FUNCTIONAL_STATE(NewState));
  2486. if (NewState != DISABLE)
  2487. 8000d96: 1cfb adds r3, r7, #3
  2488. 8000d98: 781b ldrb r3, [r3, #0]
  2489. 8000d9a: 2b00 cmp r3, #0
  2490. 8000d9c: d006 beq.n 8000dac <RCC_APB2PeriphResetCmd+0x24>
  2491. {
  2492. RCC->APB2RSTR |= RCC_APB2Periph;
  2493. 8000d9e: 4b08 ldr r3, [pc, #32] ; (8000dc0 <RCC_APB2PeriphResetCmd+0x38>)
  2494. 8000da0: 4a07 ldr r2, [pc, #28] ; (8000dc0 <RCC_APB2PeriphResetCmd+0x38>)
  2495. 8000da2: 68d1 ldr r1, [r2, #12]
  2496. 8000da4: 687a ldr r2, [r7, #4]
  2497. 8000da6: 430a orrs r2, r1
  2498. 8000da8: 60da str r2, [r3, #12]
  2499. 8000daa: e006 b.n 8000dba <RCC_APB2PeriphResetCmd+0x32>
  2500. }
  2501. else
  2502. {
  2503. RCC->APB2RSTR &= ~RCC_APB2Periph;
  2504. 8000dac: 4b04 ldr r3, [pc, #16] ; (8000dc0 <RCC_APB2PeriphResetCmd+0x38>)
  2505. 8000dae: 4a04 ldr r2, [pc, #16] ; (8000dc0 <RCC_APB2PeriphResetCmd+0x38>)
  2506. 8000db0: 68d2 ldr r2, [r2, #12]
  2507. 8000db2: 6879 ldr r1, [r7, #4]
  2508. 8000db4: 43c9 mvns r1, r1
  2509. 8000db6: 400a ands r2, r1
  2510. 8000db8: 60da str r2, [r3, #12]
  2511. }
  2512. }
  2513. 8000dba: 46bd mov sp, r7
  2514. 8000dbc: b002 add sp, #8
  2515. 8000dbe: bd80 pop {r7, pc}
  2516. 8000dc0: 40021000 .word 0x40021000
  2517. 08000dc4 <RCC_APB1PeriphResetCmd>:
  2518. * @param NewState: new state of the specified peripheral clock.
  2519. * This parameter can be: ENABLE or DISABLE.
  2520. * @retval None
  2521. */
  2522. void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState)
  2523. {
  2524. 8000dc4: b580 push {r7, lr}
  2525. 8000dc6: b082 sub sp, #8
  2526. 8000dc8: af00 add r7, sp, #0
  2527. 8000dca: 6078 str r0, [r7, #4]
  2528. 8000dcc: 1c0a adds r2, r1, #0
  2529. 8000dce: 1cfb adds r3, r7, #3
  2530. 8000dd0: 701a strb r2, [r3, #0]
  2531. /* Check the parameters */
  2532. assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph));
  2533. assert_param(IS_FUNCTIONAL_STATE(NewState));
  2534. if (NewState != DISABLE)
  2535. 8000dd2: 1cfb adds r3, r7, #3
  2536. 8000dd4: 781b ldrb r3, [r3, #0]
  2537. 8000dd6: 2b00 cmp r3, #0
  2538. 8000dd8: d006 beq.n 8000de8 <RCC_APB1PeriphResetCmd+0x24>
  2539. {
  2540. RCC->APB1RSTR |= RCC_APB1Periph;
  2541. 8000dda: 4b08 ldr r3, [pc, #32] ; (8000dfc <RCC_APB1PeriphResetCmd+0x38>)
  2542. 8000ddc: 4a07 ldr r2, [pc, #28] ; (8000dfc <RCC_APB1PeriphResetCmd+0x38>)
  2543. 8000dde: 6911 ldr r1, [r2, #16]
  2544. 8000de0: 687a ldr r2, [r7, #4]
  2545. 8000de2: 430a orrs r2, r1
  2546. 8000de4: 611a str r2, [r3, #16]
  2547. 8000de6: e006 b.n 8000df6 <RCC_APB1PeriphResetCmd+0x32>
  2548. }
  2549. else
  2550. {
  2551. RCC->APB1RSTR &= ~RCC_APB1Periph;
  2552. 8000de8: 4b04 ldr r3, [pc, #16] ; (8000dfc <RCC_APB1PeriphResetCmd+0x38>)
  2553. 8000dea: 4a04 ldr r2, [pc, #16] ; (8000dfc <RCC_APB1PeriphResetCmd+0x38>)
  2554. 8000dec: 6912 ldr r2, [r2, #16]
  2555. 8000dee: 6879 ldr r1, [r7, #4]
  2556. 8000df0: 43c9 mvns r1, r1
  2557. 8000df2: 400a ands r2, r1
  2558. 8000df4: 611a str r2, [r3, #16]
  2559. }
  2560. }
  2561. 8000df6: 46bd mov sp, r7
  2562. 8000df8: b002 add sp, #8
  2563. 8000dfa: bd80 pop {r7, pc}
  2564. 8000dfc: 40021000 .word 0x40021000
  2565. 08000e00 <RCC_ITConfig>:
  2566. * @param NewState: new state of the specified RCC interrupts.
  2567. * This parameter can be: ENABLE or DISABLE.
  2568. * @retval None
  2569. */
  2570. void RCC_ITConfig(uint8_t RCC_IT, FunctionalState NewState)
  2571. {
  2572. 8000e00: b580 push {r7, lr}
  2573. 8000e02: b082 sub sp, #8
  2574. 8000e04: af00 add r7, sp, #0
  2575. 8000e06: 1c02 adds r2, r0, #0
  2576. 8000e08: 1dfb adds r3, r7, #7
  2577. 8000e0a: 701a strb r2, [r3, #0]
  2578. 8000e0c: 1dbb adds r3, r7, #6
  2579. 8000e0e: 1c0a adds r2, r1, #0
  2580. 8000e10: 701a strb r2, [r3, #0]
  2581. /* Check the parameters */
  2582. assert_param(IS_RCC_IT(RCC_IT));
  2583. assert_param(IS_FUNCTIONAL_STATE(NewState));
  2584. if (NewState != DISABLE)
  2585. 8000e12: 1dbb adds r3, r7, #6
  2586. 8000e14: 781b ldrb r3, [r3, #0]
  2587. 8000e16: 2b00 cmp r3, #0
  2588. 8000e18: d009 beq.n 8000e2e <RCC_ITConfig+0x2e>
  2589. {
  2590. /* Perform Byte access to RCC_CIR[13:8] bits to enable the selected interrupts */
  2591. *(__IO uint8_t *) CIR_BYTE1_ADDRESS |= RCC_IT;
  2592. 8000e1a: 490c ldr r1, [pc, #48] ; (8000e4c <RCC_ITConfig+0x4c>)
  2593. 8000e1c: 4b0b ldr r3, [pc, #44] ; (8000e4c <RCC_ITConfig+0x4c>)
  2594. 8000e1e: 781b ldrb r3, [r3, #0]
  2595. 8000e20: b2da uxtb r2, r3
  2596. 8000e22: 1dfb adds r3, r7, #7
  2597. 8000e24: 781b ldrb r3, [r3, #0]
  2598. 8000e26: 4313 orrs r3, r2
  2599. 8000e28: b2db uxtb r3, r3
  2600. 8000e2a: 700b strb r3, [r1, #0]
  2601. 8000e2c: e00a b.n 8000e44 <RCC_ITConfig+0x44>
  2602. }
  2603. else
  2604. {
  2605. /* Perform Byte access to RCC_CIR[13:8] bits to disable the selected interrupts */
  2606. *(__IO uint8_t *) CIR_BYTE1_ADDRESS &= (uint8_t)~RCC_IT;
  2607. 8000e2e: 4907 ldr r1, [pc, #28] ; (8000e4c <RCC_ITConfig+0x4c>)
  2608. 8000e30: 4b06 ldr r3, [pc, #24] ; (8000e4c <RCC_ITConfig+0x4c>)
  2609. 8000e32: 781b ldrb r3, [r3, #0]
  2610. 8000e34: b2db uxtb r3, r3
  2611. 8000e36: 1dfa adds r2, r7, #7
  2612. 8000e38: 7812 ldrb r2, [r2, #0]
  2613. 8000e3a: 43d2 mvns r2, r2
  2614. 8000e3c: b2d2 uxtb r2, r2
  2615. 8000e3e: 4013 ands r3, r2
  2616. 8000e40: b2db uxtb r3, r3
  2617. 8000e42: 700b strb r3, [r1, #0]
  2618. }
  2619. }
  2620. 8000e44: 46bd mov sp, r7
  2621. 8000e46: b002 add sp, #8
  2622. 8000e48: bd80 pop {r7, pc}
  2623. 8000e4a: 46c0 nop ; (mov r8, r8)
  2624. 8000e4c: 40021009 .word 0x40021009
  2625. 08000e50 <RCC_GetFlagStatus>:
  2626. * @arg RCC_FLAG_HSI14RDY: HSI14 oscillator clock ready
  2627. * @arg RCC_FLAG_HSI48RDY: HSI48 oscillator clock ready, applicable only for STM32F072 devices
  2628. * @retval The new state of RCC_FLAG (SET or RESET).
  2629. */
  2630. FlagStatus RCC_GetFlagStatus(uint8_t RCC_FLAG)
  2631. {
  2632. 8000e50: b580 push {r7, lr}
  2633. 8000e52: b086 sub sp, #24
  2634. 8000e54: af00 add r7, sp, #0
  2635. 8000e56: 1c02 adds r2, r0, #0
  2636. 8000e58: 1dfb adds r3, r7, #7
  2637. 8000e5a: 701a strb r2, [r3, #0]
  2638. uint32_t tmp = 0;
  2639. 8000e5c: 2300 movs r3, #0
  2640. 8000e5e: 60fb str r3, [r7, #12]
  2641. uint32_t statusreg = 0;
  2642. 8000e60: 2300 movs r3, #0
  2643. 8000e62: 617b str r3, [r7, #20]
  2644. FlagStatus bitstatus = RESET;
  2645. 8000e64: 2313 movs r3, #19
  2646. 8000e66: 18fb adds r3, r7, r3
  2647. 8000e68: 2200 movs r2, #0
  2648. 8000e6a: 701a strb r2, [r3, #0]
  2649. /* Check the parameters */
  2650. assert_param(IS_RCC_FLAG(RCC_FLAG));
  2651. /* Get the RCC register index */
  2652. tmp = RCC_FLAG >> 5;
  2653. 8000e6c: 1dfb adds r3, r7, #7
  2654. 8000e6e: 781b ldrb r3, [r3, #0]
  2655. 8000e70: 095b lsrs r3, r3, #5
  2656. 8000e72: b2db uxtb r3, r3
  2657. 8000e74: 60fb str r3, [r7, #12]
  2658. if (tmp == 0) /* The flag to check is in CR register */
  2659. 8000e76: 68fb ldr r3, [r7, #12]
  2660. 8000e78: 2b00 cmp r3, #0
  2661. 8000e7a: d103 bne.n 8000e84 <RCC_GetFlagStatus+0x34>
  2662. {
  2663. statusreg = RCC->CR;
  2664. 8000e7c: 4b18 ldr r3, [pc, #96] ; (8000ee0 <RCC_GetFlagStatus+0x90>)
  2665. 8000e7e: 681b ldr r3, [r3, #0]
  2666. 8000e80: 617b str r3, [r7, #20]
  2667. 8000e82: e010 b.n 8000ea6 <RCC_GetFlagStatus+0x56>
  2668. }
  2669. else if (tmp == 1) /* The flag to check is in BDCR register */
  2670. 8000e84: 68fb ldr r3, [r7, #12]
  2671. 8000e86: 2b01 cmp r3, #1
  2672. 8000e88: d103 bne.n 8000e92 <RCC_GetFlagStatus+0x42>
  2673. {
  2674. statusreg = RCC->BDCR;
  2675. 8000e8a: 4b15 ldr r3, [pc, #84] ; (8000ee0 <RCC_GetFlagStatus+0x90>)
  2676. 8000e8c: 6a1b ldr r3, [r3, #32]
  2677. 8000e8e: 617b str r3, [r7, #20]
  2678. 8000e90: e009 b.n 8000ea6 <RCC_GetFlagStatus+0x56>
  2679. }
  2680. else if (tmp == 2) /* The flag to check is in CSR register */
  2681. 8000e92: 68fb ldr r3, [r7, #12]
  2682. 8000e94: 2b02 cmp r3, #2
  2683. 8000e96: d103 bne.n 8000ea0 <RCC_GetFlagStatus+0x50>
  2684. {
  2685. statusreg = RCC->CSR;
  2686. 8000e98: 4b11 ldr r3, [pc, #68] ; (8000ee0 <RCC_GetFlagStatus+0x90>)
  2687. 8000e9a: 6a5b ldr r3, [r3, #36] ; 0x24
  2688. 8000e9c: 617b str r3, [r7, #20]
  2689. 8000e9e: e002 b.n 8000ea6 <RCC_GetFlagStatus+0x56>
  2690. }
  2691. else /* The flag to check is in CR2 register */
  2692. {
  2693. statusreg = RCC->CR2;
  2694. 8000ea0: 4b0f ldr r3, [pc, #60] ; (8000ee0 <RCC_GetFlagStatus+0x90>)
  2695. 8000ea2: 6b5b ldr r3, [r3, #52] ; 0x34
  2696. 8000ea4: 617b str r3, [r7, #20]
  2697. }
  2698. /* Get the flag position */
  2699. tmp = RCC_FLAG & FLAG_MASK;
  2700. 8000ea6: 1dfb adds r3, r7, #7
  2701. 8000ea8: 781b ldrb r3, [r3, #0]
  2702. 8000eaa: 221f movs r2, #31
  2703. 8000eac: 4013 ands r3, r2
  2704. 8000eae: 60fb str r3, [r7, #12]
  2705. if ((statusreg & ((uint32_t)1 << tmp)) != (uint32_t)RESET)
  2706. 8000eb0: 68fb ldr r3, [r7, #12]
  2707. 8000eb2: 697a ldr r2, [r7, #20]
  2708. 8000eb4: 40da lsrs r2, r3
  2709. 8000eb6: 1c13 adds r3, r2, #0
  2710. 8000eb8: 2201 movs r2, #1
  2711. 8000eba: 4013 ands r3, r2
  2712. 8000ebc: d004 beq.n 8000ec8 <RCC_GetFlagStatus+0x78>
  2713. {
  2714. bitstatus = SET;
  2715. 8000ebe: 2313 movs r3, #19
  2716. 8000ec0: 18fb adds r3, r7, r3
  2717. 8000ec2: 2201 movs r2, #1
  2718. 8000ec4: 701a strb r2, [r3, #0]
  2719. 8000ec6: e003 b.n 8000ed0 <RCC_GetFlagStatus+0x80>
  2720. }
  2721. else
  2722. {
  2723. bitstatus = RESET;
  2724. 8000ec8: 2313 movs r3, #19
  2725. 8000eca: 18fb adds r3, r7, r3
  2726. 8000ecc: 2200 movs r2, #0
  2727. 8000ece: 701a strb r2, [r3, #0]
  2728. }
  2729. /* Return the flag status */
  2730. return bitstatus;
  2731. 8000ed0: 2313 movs r3, #19
  2732. 8000ed2: 18fb adds r3, r7, r3
  2733. 8000ed4: 781b ldrb r3, [r3, #0]
  2734. }
  2735. 8000ed6: 1c18 adds r0, r3, #0
  2736. 8000ed8: 46bd mov sp, r7
  2737. 8000eda: b006 add sp, #24
  2738. 8000edc: bd80 pop {r7, pc}
  2739. 8000ede: 46c0 nop ; (mov r8, r8)
  2740. 8000ee0: 40021000 .word 0x40021000
  2741. 08000ee4 <RCC_ClearFlag>:
  2742. * RCC_FLAG_LPWRRST.
  2743. * @param None
  2744. * @retval None
  2745. */
  2746. void RCC_ClearFlag(void)
  2747. {
  2748. 8000ee4: b580 push {r7, lr}
  2749. 8000ee6: af00 add r7, sp, #0
  2750. /* Set RMVF bit to clear the reset flags */
  2751. RCC->CSR |= RCC_CSR_RMVF;
  2752. 8000ee8: 4b04 ldr r3, [pc, #16] ; (8000efc <RCC_ClearFlag+0x18>)
  2753. 8000eea: 4a04 ldr r2, [pc, #16] ; (8000efc <RCC_ClearFlag+0x18>)
  2754. 8000eec: 6a52 ldr r2, [r2, #36] ; 0x24
  2755. 8000eee: 2180 movs r1, #128 ; 0x80
  2756. 8000ef0: 0449 lsls r1, r1, #17
  2757. 8000ef2: 430a orrs r2, r1
  2758. 8000ef4: 625a str r2, [r3, #36] ; 0x24
  2759. }
  2760. 8000ef6: 46bd mov sp, r7
  2761. 8000ef8: bd80 pop {r7, pc}
  2762. 8000efa: 46c0 nop ; (mov r8, r8)
  2763. 8000efc: 40021000 .word 0x40021000
  2764. 08000f00 <RCC_GetITStatus>:
  2765. * @arg RCC_IT_HSI48RDY: HSI48 ready interrupt, applicable only for STM32F072 devices
  2766. * @arg RCC_IT_CSS: Clock Security System interrupt
  2767. * @retval The new state of RCC_IT (SET or RESET).
  2768. */
  2769. ITStatus RCC_GetITStatus(uint8_t RCC_IT)
  2770. {
  2771. 8000f00: b580 push {r7, lr}
  2772. 8000f02: b084 sub sp, #16
  2773. 8000f04: af00 add r7, sp, #0
  2774. 8000f06: 1c02 adds r2, r0, #0
  2775. 8000f08: 1dfb adds r3, r7, #7
  2776. 8000f0a: 701a strb r2, [r3, #0]
  2777. ITStatus bitstatus = RESET;
  2778. 8000f0c: 230f movs r3, #15
  2779. 8000f0e: 18fb adds r3, r7, r3
  2780. 8000f10: 2200 movs r2, #0
  2781. 8000f12: 701a strb r2, [r3, #0]
  2782. /* Check the parameters */
  2783. assert_param(IS_RCC_GET_IT(RCC_IT));
  2784. /* Check the status of the specified RCC interrupt */
  2785. if ((RCC->CIR & RCC_IT) != (uint32_t)RESET)
  2786. 8000f14: 4b0a ldr r3, [pc, #40] ; (8000f40 <RCC_GetITStatus+0x40>)
  2787. 8000f16: 689b ldr r3, [r3, #8]
  2788. 8000f18: 1dfa adds r2, r7, #7
  2789. 8000f1a: 7812 ldrb r2, [r2, #0]
  2790. 8000f1c: 4013 ands r3, r2
  2791. 8000f1e: d004 beq.n 8000f2a <RCC_GetITStatus+0x2a>
  2792. {
  2793. bitstatus = SET;
  2794. 8000f20: 230f movs r3, #15
  2795. 8000f22: 18fb adds r3, r7, r3
  2796. 8000f24: 2201 movs r2, #1
  2797. 8000f26: 701a strb r2, [r3, #0]
  2798. 8000f28: e003 b.n 8000f32 <RCC_GetITStatus+0x32>
  2799. }
  2800. else
  2801. {
  2802. bitstatus = RESET;
  2803. 8000f2a: 230f movs r3, #15
  2804. 8000f2c: 18fb adds r3, r7, r3
  2805. 8000f2e: 2200 movs r2, #0
  2806. 8000f30: 701a strb r2, [r3, #0]
  2807. }
  2808. /* Return the RCC_IT status */
  2809. return bitstatus;
  2810. 8000f32: 230f movs r3, #15
  2811. 8000f34: 18fb adds r3, r7, r3
  2812. 8000f36: 781b ldrb r3, [r3, #0]
  2813. }
  2814. 8000f38: 1c18 adds r0, r3, #0
  2815. 8000f3a: 46bd mov sp, r7
  2816. 8000f3c: b004 add sp, #16
  2817. 8000f3e: bd80 pop {r7, pc}
  2818. 8000f40: 40021000 .word 0x40021000
  2819. 08000f44 <RCC_ClearITPendingBit>:
  2820. * @arg RCC_IT_HSI14RDY: HSI14 ready interrupt
  2821. * @arg RCC_IT_CSS: Clock Security System interrupt
  2822. * @retval None
  2823. */
  2824. void RCC_ClearITPendingBit(uint8_t RCC_IT)
  2825. {
  2826. 8000f44: b580 push {r7, lr}
  2827. 8000f46: b082 sub sp, #8
  2828. 8000f48: af00 add r7, sp, #0
  2829. 8000f4a: 1c02 adds r2, r0, #0
  2830. 8000f4c: 1dfb adds r3, r7, #7
  2831. 8000f4e: 701a strb r2, [r3, #0]
  2832. /* Check the parameters */
  2833. assert_param(IS_RCC_CLEAR_IT(RCC_IT));
  2834. /* Perform Byte access to RCC_CIR[23:16] bits to clear the selected interrupt
  2835. pending bits */
  2836. *(__IO uint8_t *) CIR_BYTE2_ADDRESS = RCC_IT;
  2837. 8000f50: 4a03 ldr r2, [pc, #12] ; (8000f60 <RCC_ClearITPendingBit+0x1c>)
  2838. 8000f52: 1dfb adds r3, r7, #7
  2839. 8000f54: 781b ldrb r3, [r3, #0]
  2840. 8000f56: 7013 strb r3, [r2, #0]
  2841. }
  2842. 8000f58: 46bd mov sp, r7
  2843. 8000f5a: b002 add sp, #8
  2844. 8000f5c: bd80 pop {r7, pc}
  2845. 8000f5e: 46c0 nop ; (mov r8, r8)
  2846. 8000f60: 4002100a .word 0x4002100a
  2847. 08000f64 <GPIO_DeInit>:
  2848. * @note GPIOE is available only for STM32F072.
  2849. * @note GPIOD is not available for STM32F031.
  2850. * @retval None
  2851. */
  2852. void GPIO_DeInit(GPIO_TypeDef* GPIOx)
  2853. {
  2854. 8000f64: b580 push {r7, lr}
  2855. 8000f66: b082 sub sp, #8
  2856. 8000f68: af00 add r7, sp, #0
  2857. 8000f6a: 6078 str r0, [r7, #4]
  2858. /* Check the parameters */
  2859. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  2860. if(GPIOx == GPIOA)
  2861. 8000f6c: 687a ldr r2, [r7, #4]
  2862. 8000f6e: 2390 movs r3, #144 ; 0x90
  2863. 8000f70: 05db lsls r3, r3, #23
  2864. 8000f72: 429a cmp r2, r3
  2865. 8000f74: d10c bne.n 8000f90 <GPIO_DeInit+0x2c>
  2866. {
  2867. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOA, ENABLE);
  2868. 8000f76: 2380 movs r3, #128 ; 0x80
  2869. 8000f78: 029b lsls r3, r3, #10
  2870. 8000f7a: 1c18 adds r0, r3, #0
  2871. 8000f7c: 2101 movs r1, #1
  2872. 8000f7e: f7ff fee5 bl 8000d4c <RCC_AHBPeriphResetCmd>
  2873. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOA, DISABLE);
  2874. 8000f82: 2380 movs r3, #128 ; 0x80
  2875. 8000f84: 029b lsls r3, r3, #10
  2876. 8000f86: 1c18 adds r0, r3, #0
  2877. 8000f88: 2100 movs r1, #0
  2878. 8000f8a: f7ff fedf bl 8000d4c <RCC_AHBPeriphResetCmd>
  2879. 8000f8e: e053 b.n 8001038 <GPIO_DeInit+0xd4>
  2880. }
  2881. else if(GPIOx == GPIOB)
  2882. 8000f90: 687b ldr r3, [r7, #4]
  2883. 8000f92: 4a2b ldr r2, [pc, #172] ; (8001040 <GPIO_DeInit+0xdc>)
  2884. 8000f94: 4293 cmp r3, r2
  2885. 8000f96: d10c bne.n 8000fb2 <GPIO_DeInit+0x4e>
  2886. {
  2887. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOB, ENABLE);
  2888. 8000f98: 2380 movs r3, #128 ; 0x80
  2889. 8000f9a: 02db lsls r3, r3, #11
  2890. 8000f9c: 1c18 adds r0, r3, #0
  2891. 8000f9e: 2101 movs r1, #1
  2892. 8000fa0: f7ff fed4 bl 8000d4c <RCC_AHBPeriphResetCmd>
  2893. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOB, DISABLE);
  2894. 8000fa4: 2380 movs r3, #128 ; 0x80
  2895. 8000fa6: 02db lsls r3, r3, #11
  2896. 8000fa8: 1c18 adds r0, r3, #0
  2897. 8000faa: 2100 movs r1, #0
  2898. 8000fac: f7ff fece bl 8000d4c <RCC_AHBPeriphResetCmd>
  2899. 8000fb0: e042 b.n 8001038 <GPIO_DeInit+0xd4>
  2900. }
  2901. else if(GPIOx == GPIOC)
  2902. 8000fb2: 687b ldr r3, [r7, #4]
  2903. 8000fb4: 4a23 ldr r2, [pc, #140] ; (8001044 <GPIO_DeInit+0xe0>)
  2904. 8000fb6: 4293 cmp r3, r2
  2905. 8000fb8: d10c bne.n 8000fd4 <GPIO_DeInit+0x70>
  2906. {
  2907. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOC, ENABLE);
  2908. 8000fba: 2380 movs r3, #128 ; 0x80
  2909. 8000fbc: 031b lsls r3, r3, #12
  2910. 8000fbe: 1c18 adds r0, r3, #0
  2911. 8000fc0: 2101 movs r1, #1
  2912. 8000fc2: f7ff fec3 bl 8000d4c <RCC_AHBPeriphResetCmd>
  2913. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOC, DISABLE);
  2914. 8000fc6: 2380 movs r3, #128 ; 0x80
  2915. 8000fc8: 031b lsls r3, r3, #12
  2916. 8000fca: 1c18 adds r0, r3, #0
  2917. 8000fcc: 2100 movs r1, #0
  2918. 8000fce: f7ff febd bl 8000d4c <RCC_AHBPeriphResetCmd>
  2919. 8000fd2: e031 b.n 8001038 <GPIO_DeInit+0xd4>
  2920. }
  2921. else if(GPIOx == GPIOD)
  2922. 8000fd4: 687b ldr r3, [r7, #4]
  2923. 8000fd6: 4a1c ldr r2, [pc, #112] ; (8001048 <GPIO_DeInit+0xe4>)
  2924. 8000fd8: 4293 cmp r3, r2
  2925. 8000fda: d10c bne.n 8000ff6 <GPIO_DeInit+0x92>
  2926. {
  2927. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOD, ENABLE);
  2928. 8000fdc: 2380 movs r3, #128 ; 0x80
  2929. 8000fde: 035b lsls r3, r3, #13
  2930. 8000fe0: 1c18 adds r0, r3, #0
  2931. 8000fe2: 2101 movs r1, #1
  2932. 8000fe4: f7ff feb2 bl 8000d4c <RCC_AHBPeriphResetCmd>
  2933. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOD, DISABLE);
  2934. 8000fe8: 2380 movs r3, #128 ; 0x80
  2935. 8000fea: 035b lsls r3, r3, #13
  2936. 8000fec: 1c18 adds r0, r3, #0
  2937. 8000fee: 2100 movs r1, #0
  2938. 8000ff0: f7ff feac bl 8000d4c <RCC_AHBPeriphResetCmd>
  2939. 8000ff4: e020 b.n 8001038 <GPIO_DeInit+0xd4>
  2940. }
  2941. else if(GPIOx == GPIOE)
  2942. 8000ff6: 687b ldr r3, [r7, #4]
  2943. 8000ff8: 4a14 ldr r2, [pc, #80] ; (800104c <GPIO_DeInit+0xe8>)
  2944. 8000ffa: 4293 cmp r3, r2
  2945. 8000ffc: d10c bne.n 8001018 <GPIO_DeInit+0xb4>
  2946. {
  2947. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOE, ENABLE);
  2948. 8000ffe: 2380 movs r3, #128 ; 0x80
  2949. 8001000: 039b lsls r3, r3, #14
  2950. 8001002: 1c18 adds r0, r3, #0
  2951. 8001004: 2101 movs r1, #1
  2952. 8001006: f7ff fea1 bl 8000d4c <RCC_AHBPeriphResetCmd>
  2953. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOE, DISABLE);
  2954. 800100a: 2380 movs r3, #128 ; 0x80
  2955. 800100c: 039b lsls r3, r3, #14
  2956. 800100e: 1c18 adds r0, r3, #0
  2957. 8001010: 2100 movs r1, #0
  2958. 8001012: f7ff fe9b bl 8000d4c <RCC_AHBPeriphResetCmd>
  2959. 8001016: e00f b.n 8001038 <GPIO_DeInit+0xd4>
  2960. }
  2961. else
  2962. {
  2963. if(GPIOx == GPIOF)
  2964. 8001018: 687b ldr r3, [r7, #4]
  2965. 800101a: 4a0d ldr r2, [pc, #52] ; (8001050 <GPIO_DeInit+0xec>)
  2966. 800101c: 4293 cmp r3, r2
  2967. 800101e: d10b bne.n 8001038 <GPIO_DeInit+0xd4>
  2968. {
  2969. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOF, ENABLE);
  2970. 8001020: 2380 movs r3, #128 ; 0x80
  2971. 8001022: 03db lsls r3, r3, #15
  2972. 8001024: 1c18 adds r0, r3, #0
  2973. 8001026: 2101 movs r1, #1
  2974. 8001028: f7ff fe90 bl 8000d4c <RCC_AHBPeriphResetCmd>
  2975. RCC_AHBPeriphResetCmd(RCC_AHBPeriph_GPIOF, DISABLE);
  2976. 800102c: 2380 movs r3, #128 ; 0x80
  2977. 800102e: 03db lsls r3, r3, #15
  2978. 8001030: 1c18 adds r0, r3, #0
  2979. 8001032: 2100 movs r1, #0
  2980. 8001034: f7ff fe8a bl 8000d4c <RCC_AHBPeriphResetCmd>
  2981. }
  2982. }
  2983. }
  2984. 8001038: 46bd mov sp, r7
  2985. 800103a: b002 add sp, #8
  2986. 800103c: bd80 pop {r7, pc}
  2987. 800103e: 46c0 nop ; (mov r8, r8)
  2988. 8001040: 48000400 .word 0x48000400
  2989. 8001044: 48000800 .word 0x48000800
  2990. 8001048: 48000c00 .word 0x48000c00
  2991. 800104c: 48001000 .word 0x48001000
  2992. 8001050: 48001400 .word 0x48001400
  2993. 08001054 <GPIO_Init>:
  2994. * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that contains
  2995. * the configuration information for the specified GPIO peripheral.
  2996. * @retval None
  2997. */
  2998. void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct)
  2999. {
  3000. 8001054: b580 push {r7, lr}
  3001. 8001056: b086 sub sp, #24
  3002. 8001058: af00 add r7, sp, #0
  3003. 800105a: 6078 str r0, [r7, #4]
  3004. 800105c: 6039 str r1, [r7, #0]
  3005. uint32_t pinpos = 0x00, pos = 0x00 , currentpin = 0x00;
  3006. 800105e: 2300 movs r3, #0
  3007. 8001060: 617b str r3, [r7, #20]
  3008. 8001062: 2300 movs r3, #0
  3009. 8001064: 613b str r3, [r7, #16]
  3010. 8001066: 2300 movs r3, #0
  3011. 8001068: 60fb str r3, [r7, #12]
  3012. assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode));
  3013. assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd));
  3014. /*-------------------------- Configure the port pins -----------------------*/
  3015. /*-- GPIO Mode Configuration --*/
  3016. for (pinpos = 0x00; pinpos < 0x10; pinpos++)
  3017. 800106a: 2300 movs r3, #0
  3018. 800106c: 617b str r3, [r7, #20]
  3019. 800106e: e07c b.n 800116a <GPIO_Init+0x116>
  3020. {
  3021. pos = ((uint32_t)0x01) << pinpos;
  3022. 8001070: 697b ldr r3, [r7, #20]
  3023. 8001072: 2201 movs r2, #1
  3024. 8001074: 409a lsls r2, r3
  3025. 8001076: 1c13 adds r3, r2, #0
  3026. 8001078: 613b str r3, [r7, #16]
  3027. /* Get the port pins position */
  3028. currentpin = (GPIO_InitStruct->GPIO_Pin) & pos;
  3029. 800107a: 683b ldr r3, [r7, #0]
  3030. 800107c: 681b ldr r3, [r3, #0]
  3031. 800107e: 693a ldr r2, [r7, #16]
  3032. 8001080: 4013 ands r3, r2
  3033. 8001082: 60fb str r3, [r7, #12]
  3034. if (currentpin == pos)
  3035. 8001084: 68fa ldr r2, [r7, #12]
  3036. 8001086: 693b ldr r3, [r7, #16]
  3037. 8001088: 429a cmp r2, r3
  3038. 800108a: d16b bne.n 8001164 <GPIO_Init+0x110>
  3039. {
  3040. if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF))
  3041. 800108c: 683b ldr r3, [r7, #0]
  3042. 800108e: 791b ldrb r3, [r3, #4]
  3043. 8001090: 2b01 cmp r3, #1
  3044. 8001092: d003 beq.n 800109c <GPIO_Init+0x48>
  3045. 8001094: 683b ldr r3, [r7, #0]
  3046. 8001096: 791b ldrb r3, [r3, #4]
  3047. 8001098: 2b02 cmp r3, #2
  3048. 800109a: d134 bne.n 8001106 <GPIO_Init+0xb2>
  3049. {
  3050. /* Check Speed mode parameters */
  3051. assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed));
  3052. /* Speed mode configuration */
  3053. GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2));
  3054. 800109c: 687b ldr r3, [r7, #4]
  3055. 800109e: 689b ldr r3, [r3, #8]
  3056. 80010a0: 697a ldr r2, [r7, #20]
  3057. 80010a2: 0052 lsls r2, r2, #1
  3058. 80010a4: 1c11 adds r1, r2, #0
  3059. 80010a6: 2203 movs r2, #3
  3060. 80010a8: 408a lsls r2, r1
  3061. 80010aa: 43d2 mvns r2, r2
  3062. 80010ac: 401a ands r2, r3
  3063. 80010ae: 687b ldr r3, [r7, #4]
  3064. 80010b0: 609a str r2, [r3, #8]
  3065. GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2));
  3066. 80010b2: 687b ldr r3, [r7, #4]
  3067. 80010b4: 689a ldr r2, [r3, #8]
  3068. 80010b6: 683b ldr r3, [r7, #0]
  3069. 80010b8: 795b ldrb r3, [r3, #5]
  3070. 80010ba: 1c19 adds r1, r3, #0
  3071. 80010bc: 697b ldr r3, [r7, #20]
  3072. 80010be: 005b lsls r3, r3, #1
  3073. 80010c0: 4099 lsls r1, r3
  3074. 80010c2: 1c0b adds r3, r1, #0
  3075. 80010c4: 431a orrs r2, r3
  3076. 80010c6: 687b ldr r3, [r7, #4]
  3077. 80010c8: 609a str r2, [r3, #8]
  3078. /* Check Output mode parameters */
  3079. assert_param(IS_GPIO_OTYPE(GPIO_InitStruct->GPIO_OType));
  3080. /* Output mode configuration */
  3081. GPIOx->OTYPER &= ~((GPIO_OTYPER_OT_0) << ((uint16_t)pinpos));
  3082. 80010ca: 687b ldr r3, [r7, #4]
  3083. 80010cc: 889b ldrh r3, [r3, #4]
  3084. 80010ce: b29b uxth r3, r3
  3085. 80010d0: 697a ldr r2, [r7, #20]
  3086. 80010d2: b292 uxth r2, r2
  3087. 80010d4: 1c11 adds r1, r2, #0
  3088. 80010d6: 2201 movs r2, #1
  3089. 80010d8: 408a lsls r2, r1
  3090. 80010da: b292 uxth r2, r2
  3091. 80010dc: 43d2 mvns r2, r2
  3092. 80010de: b292 uxth r2, r2
  3093. 80010e0: 4013 ands r3, r2
  3094. 80010e2: b29a uxth r2, r3
  3095. 80010e4: 687b ldr r3, [r7, #4]
  3096. 80010e6: 809a strh r2, [r3, #4]
  3097. GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos));
  3098. 80010e8: 687b ldr r3, [r7, #4]
  3099. 80010ea: 889b ldrh r3, [r3, #4]
  3100. 80010ec: b29a uxth r2, r3
  3101. 80010ee: 683b ldr r3, [r7, #0]
  3102. 80010f0: 799b ldrb r3, [r3, #6]
  3103. 80010f2: 1c19 adds r1, r3, #0
  3104. 80010f4: 697b ldr r3, [r7, #20]
  3105. 80010f6: b29b uxth r3, r3
  3106. 80010f8: 4099 lsls r1, r3
  3107. 80010fa: 1c0b adds r3, r1, #0
  3108. 80010fc: b29b uxth r3, r3
  3109. 80010fe: 4313 orrs r3, r2
  3110. 8001100: b29a uxth r2, r3
  3111. 8001102: 687b ldr r3, [r7, #4]
  3112. 8001104: 809a strh r2, [r3, #4]
  3113. }
  3114. GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2));
  3115. 8001106: 687b ldr r3, [r7, #4]
  3116. 8001108: 681b ldr r3, [r3, #0]
  3117. 800110a: 697a ldr r2, [r7, #20]
  3118. 800110c: 0052 lsls r2, r2, #1
  3119. 800110e: 1c11 adds r1, r2, #0
  3120. 8001110: 2203 movs r2, #3
  3121. 8001112: 408a lsls r2, r1
  3122. 8001114: 43d2 mvns r2, r2
  3123. 8001116: 401a ands r2, r3
  3124. 8001118: 687b ldr r3, [r7, #4]
  3125. 800111a: 601a str r2, [r3, #0]
  3126. GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2));
  3127. 800111c: 687b ldr r3, [r7, #4]
  3128. 800111e: 681a ldr r2, [r3, #0]
  3129. 8001120: 683b ldr r3, [r7, #0]
  3130. 8001122: 791b ldrb r3, [r3, #4]
  3131. 8001124: 1c19 adds r1, r3, #0
  3132. 8001126: 697b ldr r3, [r7, #20]
  3133. 8001128: 005b lsls r3, r3, #1
  3134. 800112a: 4099 lsls r1, r3
  3135. 800112c: 1c0b adds r3, r1, #0
  3136. 800112e: 431a orrs r2, r3
  3137. 8001130: 687b ldr r3, [r7, #4]
  3138. 8001132: 601a str r2, [r3, #0]
  3139. /* Pull-up Pull down resistor configuration */
  3140. GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2));
  3141. 8001134: 687b ldr r3, [r7, #4]
  3142. 8001136: 68db ldr r3, [r3, #12]
  3143. 8001138: 697a ldr r2, [r7, #20]
  3144. 800113a: b292 uxth r2, r2
  3145. 800113c: 0052 lsls r2, r2, #1
  3146. 800113e: 2103 movs r1, #3
  3147. 8001140: 4091 lsls r1, r2
  3148. 8001142: 1c0a adds r2, r1, #0
  3149. 8001144: 43d2 mvns r2, r2
  3150. 8001146: 401a ands r2, r3
  3151. 8001148: 687b ldr r3, [r7, #4]
  3152. 800114a: 60da str r2, [r3, #12]
  3153. GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2));
  3154. 800114c: 687b ldr r3, [r7, #4]
  3155. 800114e: 68da ldr r2, [r3, #12]
  3156. 8001150: 683b ldr r3, [r7, #0]
  3157. 8001152: 79db ldrb r3, [r3, #7]
  3158. 8001154: 1c19 adds r1, r3, #0
  3159. 8001156: 697b ldr r3, [r7, #20]
  3160. 8001158: 005b lsls r3, r3, #1
  3161. 800115a: 4099 lsls r1, r3
  3162. 800115c: 1c0b adds r3, r1, #0
  3163. 800115e: 431a orrs r2, r3
  3164. 8001160: 687b ldr r3, [r7, #4]
  3165. 8001162: 60da str r2, [r3, #12]
  3166. assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode));
  3167. assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd));
  3168. /*-------------------------- Configure the port pins -----------------------*/
  3169. /*-- GPIO Mode Configuration --*/
  3170. for (pinpos = 0x00; pinpos < 0x10; pinpos++)
  3171. 8001164: 697b ldr r3, [r7, #20]
  3172. 8001166: 3301 adds r3, #1
  3173. 8001168: 617b str r3, [r7, #20]
  3174. 800116a: 697b ldr r3, [r7, #20]
  3175. 800116c: 2b0f cmp r3, #15
  3176. 800116e: d800 bhi.n 8001172 <GPIO_Init+0x11e>
  3177. 8001170: e77e b.n 8001070 <GPIO_Init+0x1c>
  3178. /* Pull-up Pull down resistor configuration */
  3179. GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2));
  3180. GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2));
  3181. }
  3182. }
  3183. }
  3184. 8001172: 46bd mov sp, r7
  3185. 8001174: b006 add sp, #24
  3186. 8001176: bd80 pop {r7, pc}
  3187. 08001178 <GPIO_StructInit>:
  3188. * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure which will
  3189. * be initialized.
  3190. * @retval None
  3191. */
  3192. void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct)
  3193. {
  3194. 8001178: b580 push {r7, lr}
  3195. 800117a: b082 sub sp, #8
  3196. 800117c: af00 add r7, sp, #0
  3197. 800117e: 6078 str r0, [r7, #4]
  3198. /* Reset GPIO init structure parameters values */
  3199. GPIO_InitStruct->GPIO_Pin = GPIO_Pin_All;
  3200. 8001180: 687b ldr r3, [r7, #4]
  3201. 8001182: 4a08 ldr r2, [pc, #32] ; (80011a4 <GPIO_StructInit+0x2c>)
  3202. 8001184: 601a str r2, [r3, #0]
  3203. GPIO_InitStruct->GPIO_Mode = GPIO_Mode_IN;
  3204. 8001186: 687b ldr r3, [r7, #4]
  3205. 8001188: 2200 movs r2, #0
  3206. 800118a: 711a strb r2, [r3, #4]
  3207. GPIO_InitStruct->GPIO_Speed = GPIO_Speed_Level_2;
  3208. 800118c: 687b ldr r3, [r7, #4]
  3209. 800118e: 2201 movs r2, #1
  3210. 8001190: 715a strb r2, [r3, #5]
  3211. GPIO_InitStruct->GPIO_OType = GPIO_OType_PP;
  3212. 8001192: 687b ldr r3, [r7, #4]
  3213. 8001194: 2200 movs r2, #0
  3214. 8001196: 719a strb r2, [r3, #6]
  3215. GPIO_InitStruct->GPIO_PuPd = GPIO_PuPd_NOPULL;
  3216. 8001198: 687b ldr r3, [r7, #4]
  3217. 800119a: 2200 movs r2, #0
  3218. 800119c: 71da strb r2, [r3, #7]
  3219. }
  3220. 800119e: 46bd mov sp, r7
  3221. 80011a0: b002 add sp, #8
  3222. 80011a2: bd80 pop {r7, pc}
  3223. 80011a4: 0000ffff .word 0x0000ffff
  3224. 080011a8 <GPIO_PinLockConfig>:
  3225. * @param GPIO_Pin: specifies the port bit to be written.
  3226. * This parameter can be any combination of GPIO_Pin_x where x can be (0..15).
  3227. * @retval None
  3228. */
  3229. void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  3230. {
  3231. 80011a8: b580 push {r7, lr}
  3232. 80011aa: b084 sub sp, #16
  3233. 80011ac: af00 add r7, sp, #0
  3234. 80011ae: 6078 str r0, [r7, #4]
  3235. 80011b0: 1c0a adds r2, r1, #0
  3236. 80011b2: 1cbb adds r3, r7, #2
  3237. 80011b4: 801a strh r2, [r3, #0]
  3238. __IO uint32_t tmp = 0x00010000;
  3239. 80011b6: 2380 movs r3, #128 ; 0x80
  3240. 80011b8: 025b lsls r3, r3, #9
  3241. 80011ba: 60fb str r3, [r7, #12]
  3242. /* Check the parameters */
  3243. assert_param(IS_GPIO_LIST_PERIPH(GPIOx));
  3244. assert_param(IS_GPIO_PIN(GPIO_Pin));
  3245. tmp |= GPIO_Pin;
  3246. 80011bc: 1cbb adds r3, r7, #2
  3247. 80011be: 881a ldrh r2, [r3, #0]
  3248. 80011c0: 68fb ldr r3, [r7, #12]
  3249. 80011c2: 4313 orrs r3, r2
  3250. 80011c4: 60fb str r3, [r7, #12]
  3251. /* Set LCKK bit */
  3252. GPIOx->LCKR = tmp;
  3253. 80011c6: 68fa ldr r2, [r7, #12]
  3254. 80011c8: 687b ldr r3, [r7, #4]
  3255. 80011ca: 61da str r2, [r3, #28]
  3256. /* Reset LCKK bit */
  3257. GPIOx->LCKR = GPIO_Pin;
  3258. 80011cc: 1cbb adds r3, r7, #2
  3259. 80011ce: 881a ldrh r2, [r3, #0]
  3260. 80011d0: 687b ldr r3, [r7, #4]
  3261. 80011d2: 61da str r2, [r3, #28]
  3262. /* Set LCKK bit */
  3263. GPIOx->LCKR = tmp;
  3264. 80011d4: 68fa ldr r2, [r7, #12]
  3265. 80011d6: 687b ldr r3, [r7, #4]
  3266. 80011d8: 61da str r2, [r3, #28]
  3267. /* Read LCKK bit */
  3268. tmp = GPIOx->LCKR;
  3269. 80011da: 687b ldr r3, [r7, #4]
  3270. 80011dc: 69db ldr r3, [r3, #28]
  3271. 80011de: 60fb str r3, [r7, #12]
  3272. /* Read LCKK bit */
  3273. tmp = GPIOx->LCKR;
  3274. 80011e0: 687b ldr r3, [r7, #4]
  3275. 80011e2: 69db ldr r3, [r3, #28]
  3276. 80011e4: 60fb str r3, [r7, #12]
  3277. }
  3278. 80011e6: 46bd mov sp, r7
  3279. 80011e8: b004 add sp, #16
  3280. 80011ea: bd80 pop {r7, pc}
  3281. 080011ec <GPIO_ReadInputDataBit>:
  3282. * For STM32F072: (0..15) for GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, (0..10) for GPIOF.
  3283. * For STM32F031: (0..15) for GPIOA, GPIOB, (13..15) for GPIOC and (0..1, 6..7) for GPIOF.
  3284. * @retval The input port pin value.
  3285. */
  3286. uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  3287. {
  3288. 80011ec: b580 push {r7, lr}
  3289. 80011ee: b084 sub sp, #16
  3290. 80011f0: af00 add r7, sp, #0
  3291. 80011f2: 6078 str r0, [r7, #4]
  3292. 80011f4: 1c0a adds r2, r1, #0
  3293. 80011f6: 1cbb adds r3, r7, #2
  3294. 80011f8: 801a strh r2, [r3, #0]
  3295. uint8_t bitstatus = 0x00;
  3296. 80011fa: 230f movs r3, #15
  3297. 80011fc: 18fb adds r3, r7, r3
  3298. 80011fe: 2200 movs r2, #0
  3299. 8001200: 701a strb r2, [r3, #0]
  3300. /* Check the parameters */
  3301. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  3302. assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
  3303. if ((GPIOx->IDR & GPIO_Pin) != (uint32_t)Bit_RESET)
  3304. 8001202: 687b ldr r3, [r7, #4]
  3305. 8001204: 8a1b ldrh r3, [r3, #16]
  3306. 8001206: b29b uxth r3, r3
  3307. 8001208: 1cba adds r2, r7, #2
  3308. 800120a: 8812 ldrh r2, [r2, #0]
  3309. 800120c: 4013 ands r3, r2
  3310. 800120e: b29b uxth r3, r3
  3311. 8001210: 2b00 cmp r3, #0
  3312. 8001212: d004 beq.n 800121e <GPIO_ReadInputDataBit+0x32>
  3313. {
  3314. bitstatus = (uint8_t)Bit_SET;
  3315. 8001214: 230f movs r3, #15
  3316. 8001216: 18fb adds r3, r7, r3
  3317. 8001218: 2201 movs r2, #1
  3318. 800121a: 701a strb r2, [r3, #0]
  3319. 800121c: e003 b.n 8001226 <GPIO_ReadInputDataBit+0x3a>
  3320. }
  3321. else
  3322. {
  3323. bitstatus = (uint8_t)Bit_RESET;
  3324. 800121e: 230f movs r3, #15
  3325. 8001220: 18fb adds r3, r7, r3
  3326. 8001222: 2200 movs r2, #0
  3327. 8001224: 701a strb r2, [r3, #0]
  3328. }
  3329. return bitstatus;
  3330. 8001226: 230f movs r3, #15
  3331. 8001228: 18fb adds r3, r7, r3
  3332. 800122a: 781b ldrb r3, [r3, #0]
  3333. }
  3334. 800122c: 1c18 adds r0, r3, #0
  3335. 800122e: 46bd mov sp, r7
  3336. 8001230: b004 add sp, #16
  3337. 8001232: bd80 pop {r7, pc}
  3338. 08001234 <GPIO_ReadInputData>:
  3339. * @note GPIOE is available only for STM32F072.
  3340. * @note GPIOD is not available for STM32F031.
  3341. * @retval The input port pin value.
  3342. */
  3343. uint16_t GPIO_ReadInputData(GPIO_TypeDef* GPIOx)
  3344. {
  3345. 8001234: b580 push {r7, lr}
  3346. 8001236: b082 sub sp, #8
  3347. 8001238: af00 add r7, sp, #0
  3348. 800123a: 6078 str r0, [r7, #4]
  3349. /* Check the parameters */
  3350. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  3351. return ((uint16_t)GPIOx->IDR);
  3352. 800123c: 687b ldr r3, [r7, #4]
  3353. 800123e: 8a1b ldrh r3, [r3, #16]
  3354. 8001240: b29b uxth r3, r3
  3355. }
  3356. 8001242: 1c18 adds r0, r3, #0
  3357. 8001244: 46bd mov sp, r7
  3358. 8001246: b002 add sp, #8
  3359. 8001248: bd80 pop {r7, pc}
  3360. 800124a: 46c0 nop ; (mov r8, r8)
  3361. 0800124c <GPIO_ReadOutputDataBit>:
  3362. * For STM32F072: (0..15) for GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, (0..10) for GPIOF.
  3363. * For STM32F031: (0..15) for GPIOA, GPIOB, (13..15) for GPIOC and (0..1, 6..7) for GPIOF.
  3364. * @retval The output port pin value.
  3365. */
  3366. uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  3367. {
  3368. 800124c: b580 push {r7, lr}
  3369. 800124e: b084 sub sp, #16
  3370. 8001250: af00 add r7, sp, #0
  3371. 8001252: 6078 str r0, [r7, #4]
  3372. 8001254: 1c0a adds r2, r1, #0
  3373. 8001256: 1cbb adds r3, r7, #2
  3374. 8001258: 801a strh r2, [r3, #0]
  3375. uint8_t bitstatus = 0x00;
  3376. 800125a: 230f movs r3, #15
  3377. 800125c: 18fb adds r3, r7, r3
  3378. 800125e: 2200 movs r2, #0
  3379. 8001260: 701a strb r2, [r3, #0]
  3380. /* Check the parameters */
  3381. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  3382. assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
  3383. if ((GPIOx->ODR & GPIO_Pin) != (uint32_t)Bit_RESET)
  3384. 8001262: 687b ldr r3, [r7, #4]
  3385. 8001264: 8a9b ldrh r3, [r3, #20]
  3386. 8001266: b29b uxth r3, r3
  3387. 8001268: 1cba adds r2, r7, #2
  3388. 800126a: 8812 ldrh r2, [r2, #0]
  3389. 800126c: 4013 ands r3, r2
  3390. 800126e: b29b uxth r3, r3
  3391. 8001270: 2b00 cmp r3, #0
  3392. 8001272: d004 beq.n 800127e <GPIO_ReadOutputDataBit+0x32>
  3393. {
  3394. bitstatus = (uint8_t)Bit_SET;
  3395. 8001274: 230f movs r3, #15
  3396. 8001276: 18fb adds r3, r7, r3
  3397. 8001278: 2201 movs r2, #1
  3398. 800127a: 701a strb r2, [r3, #0]
  3399. 800127c: e003 b.n 8001286 <GPIO_ReadOutputDataBit+0x3a>
  3400. }
  3401. else
  3402. {
  3403. bitstatus = (uint8_t)Bit_RESET;
  3404. 800127e: 230f movs r3, #15
  3405. 8001280: 18fb adds r3, r7, r3
  3406. 8001282: 2200 movs r2, #0
  3407. 8001284: 701a strb r2, [r3, #0]
  3408. }
  3409. return bitstatus;
  3410. 8001286: 230f movs r3, #15
  3411. 8001288: 18fb adds r3, r7, r3
  3412. 800128a: 781b ldrb r3, [r3, #0]
  3413. }
  3414. 800128c: 1c18 adds r0, r3, #0
  3415. 800128e: 46bd mov sp, r7
  3416. 8001290: b004 add sp, #16
  3417. 8001292: bd80 pop {r7, pc}
  3418. 08001294 <GPIO_ReadOutputData>:
  3419. * @note GPIOE is available only for STM32F072.
  3420. * @note GPIOD is not available for STM32F031.
  3421. * @retval GPIO output data port value.
  3422. */
  3423. uint16_t GPIO_ReadOutputData(GPIO_TypeDef* GPIOx)
  3424. {
  3425. 8001294: b580 push {r7, lr}
  3426. 8001296: b082 sub sp, #8
  3427. 8001298: af00 add r7, sp, #0
  3428. 800129a: 6078 str r0, [r7, #4]
  3429. /* Check the parameters */
  3430. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  3431. return ((uint16_t)GPIOx->ODR);
  3432. 800129c: 687b ldr r3, [r7, #4]
  3433. 800129e: 8a9b ldrh r3, [r3, #20]
  3434. 80012a0: b29b uxth r3, r3
  3435. }
  3436. 80012a2: 1c18 adds r0, r3, #0
  3437. 80012a4: 46bd mov sp, r7
  3438. 80012a6: b002 add sp, #8
  3439. 80012a8: bd80 pop {r7, pc}
  3440. 80012aa: 46c0 nop ; (mov r8, r8)
  3441. 080012ac <GPIO_SetBits>:
  3442. * For STM32F072: (0..15) for GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, (0..10) for GPIOF.
  3443. * For STM32F031: (0..15) for GPIOA, GPIOB, (13..15) for GPIOC and (0..1, 6..7) for GPIOF.
  3444. * @retval None
  3445. */
  3446. void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  3447. {
  3448. 80012ac: b580 push {r7, lr}
  3449. 80012ae: b082 sub sp, #8
  3450. 80012b0: af00 add r7, sp, #0
  3451. 80012b2: 6078 str r0, [r7, #4]
  3452. 80012b4: 1c0a adds r2, r1, #0
  3453. 80012b6: 1cbb adds r3, r7, #2
  3454. 80012b8: 801a strh r2, [r3, #0]
  3455. /* Check the parameters */
  3456. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  3457. assert_param(IS_GPIO_PIN(GPIO_Pin));
  3458. GPIOx->BSRR = GPIO_Pin;
  3459. 80012ba: 1cbb adds r3, r7, #2
  3460. 80012bc: 881a ldrh r2, [r3, #0]
  3461. 80012be: 687b ldr r3, [r7, #4]
  3462. 80012c0: 619a str r2, [r3, #24]
  3463. }
  3464. 80012c2: 46bd mov sp, r7
  3465. 80012c4: b002 add sp, #8
  3466. 80012c6: bd80 pop {r7, pc}
  3467. 080012c8 <GPIO_ResetBits>:
  3468. * For STM32F072: (0..15) for GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, (0..10) for GPIOF.
  3469. * For STM32F031: (0..15) for GPIOA, GPIOB, (13..15) for GPIOC and (0..1, 6..7) for GPIOF.
  3470. * @retval None
  3471. */
  3472. void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
  3473. {
  3474. 80012c8: b580 push {r7, lr}
  3475. 80012ca: b082 sub sp, #8
  3476. 80012cc: af00 add r7, sp, #0
  3477. 80012ce: 6078 str r0, [r7, #4]
  3478. 80012d0: 1c0a adds r2, r1, #0
  3479. 80012d2: 1cbb adds r3, r7, #2
  3480. 80012d4: 801a strh r2, [r3, #0]
  3481. /* Check the parameters */
  3482. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  3483. assert_param(IS_GPIO_PIN(GPIO_Pin));
  3484. GPIOx->BRR = GPIO_Pin;
  3485. 80012d6: 687b ldr r3, [r7, #4]
  3486. 80012d8: 1cba adds r2, r7, #2
  3487. 80012da: 8812 ldrh r2, [r2, #0]
  3488. 80012dc: 851a strh r2, [r3, #40] ; 0x28
  3489. }
  3490. 80012de: 46bd mov sp, r7
  3491. 80012e0: b002 add sp, #8
  3492. 80012e2: bd80 pop {r7, pc}
  3493. 080012e4 <GPIO_WriteBit>:
  3494. * For STM32F072: (0..15) for GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, (0..10) for GPIOF.
  3495. * For STM32F031: (0..15) for GPIOA, GPIOB, (13..15) for GPIOC and (0..1, 6..7) for GPIOF.
  3496. * @retval None
  3497. */
  3498. void GPIO_WriteBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, BitAction BitVal)
  3499. {
  3500. 80012e4: b580 push {r7, lr}
  3501. 80012e6: b082 sub sp, #8
  3502. 80012e8: af00 add r7, sp, #0
  3503. 80012ea: 6078 str r0, [r7, #4]
  3504. 80012ec: 1c08 adds r0, r1, #0
  3505. 80012ee: 1c11 adds r1, r2, #0
  3506. 80012f0: 1cbb adds r3, r7, #2
  3507. 80012f2: 1c02 adds r2, r0, #0
  3508. 80012f4: 801a strh r2, [r3, #0]
  3509. 80012f6: 1c7b adds r3, r7, #1
  3510. 80012f8: 1c0a adds r2, r1, #0
  3511. 80012fa: 701a strb r2, [r3, #0]
  3512. /* Check the parameters */
  3513. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  3514. assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
  3515. assert_param(IS_GPIO_BIT_ACTION(BitVal));
  3516. if (BitVal != Bit_RESET)
  3517. 80012fc: 1c7b adds r3, r7, #1
  3518. 80012fe: 781b ldrb r3, [r3, #0]
  3519. 8001300: 2b00 cmp r3, #0
  3520. 8001302: d004 beq.n 800130e <GPIO_WriteBit+0x2a>
  3521. {
  3522. GPIOx->BSRR = GPIO_Pin;
  3523. 8001304: 1cbb adds r3, r7, #2
  3524. 8001306: 881a ldrh r2, [r3, #0]
  3525. 8001308: 687b ldr r3, [r7, #4]
  3526. 800130a: 619a str r2, [r3, #24]
  3527. 800130c: e003 b.n 8001316 <GPIO_WriteBit+0x32>
  3528. }
  3529. else
  3530. {
  3531. GPIOx->BRR = GPIO_Pin ;
  3532. 800130e: 687b ldr r3, [r7, #4]
  3533. 8001310: 1cba adds r2, r7, #2
  3534. 8001312: 8812 ldrh r2, [r2, #0]
  3535. 8001314: 851a strh r2, [r3, #40] ; 0x28
  3536. }
  3537. }
  3538. 8001316: 46bd mov sp, r7
  3539. 8001318: b002 add sp, #8
  3540. 800131a: bd80 pop {r7, pc}
  3541. 0800131c <GPIO_Write>:
  3542. * @note GPIOD is not available for STM32F031.
  3543. * @param PortVal: specifies the value to be written to the port output data register.
  3544. * @retval None
  3545. */
  3546. void GPIO_Write(GPIO_TypeDef* GPIOx, uint16_t PortVal)
  3547. {
  3548. 800131c: b580 push {r7, lr}
  3549. 800131e: b082 sub sp, #8
  3550. 8001320: af00 add r7, sp, #0
  3551. 8001322: 6078 str r0, [r7, #4]
  3552. 8001324: 1c0a adds r2, r1, #0
  3553. 8001326: 1cbb adds r3, r7, #2
  3554. 8001328: 801a strh r2, [r3, #0]
  3555. /* Check the parameters */
  3556. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  3557. GPIOx->ODR = PortVal;
  3558. 800132a: 687b ldr r3, [r7, #4]
  3559. 800132c: 1cba adds r2, r7, #2
  3560. 800132e: 8812 ldrh r2, [r2, #0]
  3561. 8001330: 829a strh r2, [r3, #20]
  3562. }
  3563. 8001332: 46bd mov sp, r7
  3564. 8001334: b002 add sp, #8
  3565. 8001336: bd80 pop {r7, pc}
  3566. 08001338 <GPIO_PinAFConfig>:
  3567. * for the detailed mapping of the system and peripherals'alternate
  3568. * function I/O pins.
  3569. * @retval None
  3570. */
  3571. void GPIO_PinAFConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF)
  3572. {
  3573. 8001338: b580 push {r7, lr}
  3574. 800133a: b084 sub sp, #16
  3575. 800133c: af00 add r7, sp, #0
  3576. 800133e: 6078 str r0, [r7, #4]
  3577. 8001340: 1c08 adds r0, r1, #0
  3578. 8001342: 1c11 adds r1, r2, #0
  3579. 8001344: 1cbb adds r3, r7, #2
  3580. 8001346: 1c02 adds r2, r0, #0
  3581. 8001348: 801a strh r2, [r3, #0]
  3582. 800134a: 1c7b adds r3, r7, #1
  3583. 800134c: 1c0a adds r2, r1, #0
  3584. 800134e: 701a strb r2, [r3, #0]
  3585. uint32_t temp = 0x00;
  3586. 8001350: 2300 movs r3, #0
  3587. 8001352: 60fb str r3, [r7, #12]
  3588. uint32_t temp_2 = 0x00;
  3589. 8001354: 2300 movs r3, #0
  3590. 8001356: 60bb str r3, [r7, #8]
  3591. /* Check the parameters */
  3592. assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
  3593. assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource));
  3594. assert_param(IS_GPIO_AF(GPIO_AF));
  3595. temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4));
  3596. 8001358: 1c7b adds r3, r7, #1
  3597. 800135a: 781b ldrb r3, [r3, #0]
  3598. 800135c: 1cba adds r2, r7, #2
  3599. 800135e: 8812 ldrh r2, [r2, #0]
  3600. 8001360: 2107 movs r1, #7
  3601. 8001362: 400a ands r2, r1
  3602. 8001364: 0092 lsls r2, r2, #2
  3603. 8001366: 4093 lsls r3, r2
  3604. 8001368: 60fb str r3, [r7, #12]
  3605. GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4));
  3606. 800136a: 1cbb adds r3, r7, #2
  3607. 800136c: 881b ldrh r3, [r3, #0]
  3608. 800136e: 08db lsrs r3, r3, #3
  3609. 8001370: b29b uxth r3, r3
  3610. 8001372: 1c18 adds r0, r3, #0
  3611. 8001374: 1cbb adds r3, r7, #2
  3612. 8001376: 881b ldrh r3, [r3, #0]
  3613. 8001378: 08db lsrs r3, r3, #3
  3614. 800137a: b29b uxth r3, r3
  3615. 800137c: 1c1a adds r2, r3, #0
  3616. 800137e: 687b ldr r3, [r7, #4]
  3617. 8001380: 3208 adds r2, #8
  3618. 8001382: 0092 lsls r2, r2, #2
  3619. 8001384: 58d3 ldr r3, [r2, r3]
  3620. 8001386: 1cba adds r2, r7, #2
  3621. 8001388: 8812 ldrh r2, [r2, #0]
  3622. 800138a: 2107 movs r1, #7
  3623. 800138c: 400a ands r2, r1
  3624. 800138e: 0092 lsls r2, r2, #2
  3625. 8001390: 1c11 adds r1, r2, #0
  3626. 8001392: 220f movs r2, #15
  3627. 8001394: 408a lsls r2, r1
  3628. 8001396: 43d2 mvns r2, r2
  3629. 8001398: 401a ands r2, r3
  3630. 800139a: 1c11 adds r1, r2, #0
  3631. 800139c: 687b ldr r3, [r7, #4]
  3632. 800139e: 1c02 adds r2, r0, #0
  3633. 80013a0: 3208 adds r2, #8
  3634. 80013a2: 0092 lsls r2, r2, #2
  3635. 80013a4: 50d1 str r1, [r2, r3]
  3636. temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp;
  3637. 80013a6: 1cbb adds r3, r7, #2
  3638. 80013a8: 881b ldrh r3, [r3, #0]
  3639. 80013aa: 08db lsrs r3, r3, #3
  3640. 80013ac: b29b uxth r3, r3
  3641. 80013ae: 1c1a adds r2, r3, #0
  3642. 80013b0: 687b ldr r3, [r7, #4]
  3643. 80013b2: 3208 adds r2, #8
  3644. 80013b4: 0092 lsls r2, r2, #2
  3645. 80013b6: 58d2 ldr r2, [r2, r3]
  3646. 80013b8: 68fb ldr r3, [r7, #12]
  3647. 80013ba: 4313 orrs r3, r2
  3648. 80013bc: 60bb str r3, [r7, #8]
  3649. GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2;
  3650. 80013be: 1cbb adds r3, r7, #2
  3651. 80013c0: 881b ldrh r3, [r3, #0]
  3652. 80013c2: 08db lsrs r3, r3, #3
  3653. 80013c4: b29b uxth r3, r3
  3654. 80013c6: 1c1a adds r2, r3, #0
  3655. 80013c8: 687b ldr r3, [r7, #4]
  3656. 80013ca: 3208 adds r2, #8
  3657. 80013cc: 0092 lsls r2, r2, #2
  3658. 80013ce: 68b9 ldr r1, [r7, #8]
  3659. 80013d0: 50d1 str r1, [r2, r3]
  3660. }
  3661. 80013d2: 46bd mov sp, r7
  3662. 80013d4: b004 add sp, #16
  3663. 80013d6: bd80 pop {r7, pc}
  3664. 080013d8 <SPI_I2S_DeInit>:
  3665. * @note SPI2 is not available for STM32F031 devices.
  3666. * I2S mode is not supported for STM32F030 devices.
  3667. * @retval None
  3668. */
  3669. void SPI_I2S_DeInit(SPI_TypeDef* SPIx)
  3670. {
  3671. 80013d8: b580 push {r7, lr}
  3672. 80013da: b082 sub sp, #8
  3673. 80013dc: af00 add r7, sp, #0
  3674. 80013de: 6078 str r0, [r7, #4]
  3675. /* Check the parameters */
  3676. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  3677. if (SPIx == SPI1)
  3678. 80013e0: 687b ldr r3, [r7, #4]
  3679. 80013e2: 4a11 ldr r2, [pc, #68] ; (8001428 <SPI_I2S_DeInit+0x50>)
  3680. 80013e4: 4293 cmp r3, r2
  3681. 80013e6: d10c bne.n 8001402 <SPI_I2S_DeInit+0x2a>
  3682. {
  3683. /* Enable SPI1 reset state */
  3684. RCC_APB2PeriphResetCmd(RCC_APB2Periph_SPI1, ENABLE);
  3685. 80013e8: 2380 movs r3, #128 ; 0x80
  3686. 80013ea: 015b lsls r3, r3, #5
  3687. 80013ec: 1c18 adds r0, r3, #0
  3688. 80013ee: 2101 movs r1, #1
  3689. 80013f0: f7ff fcca bl 8000d88 <RCC_APB2PeriphResetCmd>
  3690. /* Release SPI1 from reset state */
  3691. RCC_APB2PeriphResetCmd(RCC_APB2Periph_SPI1, DISABLE);
  3692. 80013f4: 2380 movs r3, #128 ; 0x80
  3693. 80013f6: 015b lsls r3, r3, #5
  3694. 80013f8: 1c18 adds r0, r3, #0
  3695. 80013fa: 2100 movs r1, #0
  3696. 80013fc: f7ff fcc4 bl 8000d88 <RCC_APB2PeriphResetCmd>
  3697. 8001400: e00f b.n 8001422 <SPI_I2S_DeInit+0x4a>
  3698. }
  3699. else
  3700. {
  3701. if (SPIx == SPI2)
  3702. 8001402: 687b ldr r3, [r7, #4]
  3703. 8001404: 4a09 ldr r2, [pc, #36] ; (800142c <SPI_I2S_DeInit+0x54>)
  3704. 8001406: 4293 cmp r3, r2
  3705. 8001408: d10b bne.n 8001422 <SPI_I2S_DeInit+0x4a>
  3706. {
  3707. /* Enable SPI2 reset state */
  3708. RCC_APB1PeriphResetCmd(RCC_APB1Periph_SPI2, ENABLE);
  3709. 800140a: 2380 movs r3, #128 ; 0x80
  3710. 800140c: 01db lsls r3, r3, #7
  3711. 800140e: 1c18 adds r0, r3, #0
  3712. 8001410: 2101 movs r1, #1
  3713. 8001412: f7ff fcd7 bl 8000dc4 <RCC_APB1PeriphResetCmd>
  3714. /* Release SPI2 from reset state */
  3715. RCC_APB1PeriphResetCmd(RCC_APB1Periph_SPI2, DISABLE);
  3716. 8001416: 2380 movs r3, #128 ; 0x80
  3717. 8001418: 01db lsls r3, r3, #7
  3718. 800141a: 1c18 adds r0, r3, #0
  3719. 800141c: 2100 movs r1, #0
  3720. 800141e: f7ff fcd1 bl 8000dc4 <RCC_APB1PeriphResetCmd>
  3721. }
  3722. }
  3723. }
  3724. 8001422: 46bd mov sp, r7
  3725. 8001424: b002 add sp, #8
  3726. 8001426: bd80 pop {r7, pc}
  3727. 8001428: 40013000 .word 0x40013000
  3728. 800142c: 40003800 .word 0x40003800
  3729. 08001430 <SPI_StructInit>:
  3730. * @brief Fills each SPI_InitStruct member with its default value.
  3731. * @param SPI_InitStruct: pointer to a SPI_InitTypeDef structure which will be initialized.
  3732. * @retval None
  3733. */
  3734. void SPI_StructInit(SPI_InitTypeDef* SPI_InitStruct)
  3735. {
  3736. 8001430: b580 push {r7, lr}
  3737. 8001432: b082 sub sp, #8
  3738. 8001434: af00 add r7, sp, #0
  3739. 8001436: 6078 str r0, [r7, #4]
  3740. /*--------------- Reset SPI init structure parameters values -----------------*/
  3741. /* Initialize the SPI_Direction member */
  3742. SPI_InitStruct->SPI_Direction = SPI_Direction_2Lines_FullDuplex;
  3743. 8001438: 687b ldr r3, [r7, #4]
  3744. 800143a: 2200 movs r2, #0
  3745. 800143c: 801a strh r2, [r3, #0]
  3746. /* Initialize the SPI_Mode member */
  3747. SPI_InitStruct->SPI_Mode = SPI_Mode_Slave;
  3748. 800143e: 687b ldr r3, [r7, #4]
  3749. 8001440: 2200 movs r2, #0
  3750. 8001442: 805a strh r2, [r3, #2]
  3751. /* Initialize the SPI_DataSize member */
  3752. SPI_InitStruct->SPI_DataSize = SPI_DataSize_8b;
  3753. 8001444: 687b ldr r3, [r7, #4]
  3754. 8001446: 22e0 movs r2, #224 ; 0xe0
  3755. 8001448: 00d2 lsls r2, r2, #3
  3756. 800144a: 809a strh r2, [r3, #4]
  3757. /* Initialize the SPI_CPOL member */
  3758. SPI_InitStruct->SPI_CPOL = SPI_CPOL_Low;
  3759. 800144c: 687b ldr r3, [r7, #4]
  3760. 800144e: 2200 movs r2, #0
  3761. 8001450: 80da strh r2, [r3, #6]
  3762. /* Initialize the SPI_CPHA member */
  3763. SPI_InitStruct->SPI_CPHA = SPI_CPHA_1Edge;
  3764. 8001452: 687b ldr r3, [r7, #4]
  3765. 8001454: 2200 movs r2, #0
  3766. 8001456: 811a strh r2, [r3, #8]
  3767. /* Initialize the SPI_NSS member */
  3768. SPI_InitStruct->SPI_NSS = SPI_NSS_Hard;
  3769. 8001458: 687b ldr r3, [r7, #4]
  3770. 800145a: 2200 movs r2, #0
  3771. 800145c: 815a strh r2, [r3, #10]
  3772. /* Initialize the SPI_BaudRatePrescaler member */
  3773. SPI_InitStruct->SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_2;
  3774. 800145e: 687b ldr r3, [r7, #4]
  3775. 8001460: 2200 movs r2, #0
  3776. 8001462: 819a strh r2, [r3, #12]
  3777. /* Initialize the SPI_FirstBit member */
  3778. SPI_InitStruct->SPI_FirstBit = SPI_FirstBit_MSB;
  3779. 8001464: 687b ldr r3, [r7, #4]
  3780. 8001466: 2200 movs r2, #0
  3781. 8001468: 81da strh r2, [r3, #14]
  3782. /* Initialize the SPI_CRCPolynomial member */
  3783. SPI_InitStruct->SPI_CRCPolynomial = 7;
  3784. 800146a: 687b ldr r3, [r7, #4]
  3785. 800146c: 2207 movs r2, #7
  3786. 800146e: 821a strh r2, [r3, #16]
  3787. }
  3788. 8001470: 46bd mov sp, r7
  3789. 8001472: b002 add sp, #8
  3790. 8001474: bd80 pop {r7, pc}
  3791. 8001476: 46c0 nop ; (mov r8, r8)
  3792. 08001478 <SPI_Init>:
  3793. * @param SPI_InitStruct: pointer to a SPI_InitTypeDef structure that
  3794. * contains the configuration information for the specified SPI peripheral.
  3795. * @retval None
  3796. */
  3797. void SPI_Init(SPI_TypeDef* SPIx, SPI_InitTypeDef* SPI_InitStruct)
  3798. {
  3799. 8001478: b580 push {r7, lr}
  3800. 800147a: b084 sub sp, #16
  3801. 800147c: af00 add r7, sp, #0
  3802. 800147e: 6078 str r0, [r7, #4]
  3803. 8001480: 6039 str r1, [r7, #0]
  3804. uint16_t tmpreg = 0;
  3805. 8001482: 230e movs r3, #14
  3806. 8001484: 18fb adds r3, r7, r3
  3807. 8001486: 2200 movs r2, #0
  3808. 8001488: 801a strh r2, [r3, #0]
  3809. assert_param(IS_SPI_FIRST_BIT(SPI_InitStruct->SPI_FirstBit));
  3810. assert_param(IS_SPI_CRC_POLYNOMIAL(SPI_InitStruct->SPI_CRCPolynomial));
  3811. /*---------------------------- SPIx CR1 Configuration ------------------------*/
  3812. /* Get the SPIx CR1 value */
  3813. tmpreg = SPIx->CR1;
  3814. 800148a: 230e movs r3, #14
  3815. 800148c: 18fb adds r3, r7, r3
  3816. 800148e: 687a ldr r2, [r7, #4]
  3817. 8001490: 8812 ldrh r2, [r2, #0]
  3818. 8001492: 801a strh r2, [r3, #0]
  3819. /* Clear BIDIMode, BIDIOE, RxONLY, SSM, SSI, LSBFirst, BR, CPOL and CPHA bits */
  3820. tmpreg &= CR1_CLEAR_MASK;
  3821. 8001494: 230e movs r3, #14
  3822. 8001496: 18fb adds r3, r7, r3
  3823. 8001498: 220e movs r2, #14
  3824. 800149a: 18ba adds r2, r7, r2
  3825. 800149c: 8811 ldrh r1, [r2, #0]
  3826. 800149e: 22c1 movs r2, #193 ; 0xc1
  3827. 80014a0: 0192 lsls r2, r2, #6
  3828. 80014a2: 400a ands r2, r1
  3829. 80014a4: 801a strh r2, [r3, #0]
  3830. /* Set SSM, SSI bit according to SPI_NSS values */
  3831. /* Set LSBFirst bit according to SPI_FirstBit value */
  3832. /* Set BR bits according to SPI_BaudRatePrescaler value */
  3833. /* Set CPOL bit according to SPI_CPOL value */
  3834. /* Set CPHA bit according to SPI_CPHA value */
  3835. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_FirstBit |
  3836. 80014a6: 683b ldr r3, [r7, #0]
  3837. 80014a8: 881a ldrh r2, [r3, #0]
  3838. 80014aa: 683b ldr r3, [r7, #0]
  3839. 80014ac: 89db ldrh r3, [r3, #14]
  3840. 80014ae: 4313 orrs r3, r2
  3841. 80014b0: b29a uxth r2, r3
  3842. SPI_InitStruct->SPI_CPOL | SPI_InitStruct->SPI_CPHA |
  3843. 80014b2: 683b ldr r3, [r7, #0]
  3844. 80014b4: 88db ldrh r3, [r3, #6]
  3845. /* Set SSM, SSI bit according to SPI_NSS values */
  3846. /* Set LSBFirst bit according to SPI_FirstBit value */
  3847. /* Set BR bits according to SPI_BaudRatePrescaler value */
  3848. /* Set CPOL bit according to SPI_CPOL value */
  3849. /* Set CPHA bit according to SPI_CPHA value */
  3850. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_FirstBit |
  3851. 80014b6: 4313 orrs r3, r2
  3852. 80014b8: b29a uxth r2, r3
  3853. SPI_InitStruct->SPI_CPOL | SPI_InitStruct->SPI_CPHA |
  3854. 80014ba: 683b ldr r3, [r7, #0]
  3855. 80014bc: 891b ldrh r3, [r3, #8]
  3856. /* Set SSM, SSI bit according to SPI_NSS values */
  3857. /* Set LSBFirst bit according to SPI_FirstBit value */
  3858. /* Set BR bits according to SPI_BaudRatePrescaler value */
  3859. /* Set CPOL bit according to SPI_CPOL value */
  3860. /* Set CPHA bit according to SPI_CPHA value */
  3861. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_FirstBit |
  3862. 80014be: 4313 orrs r3, r2
  3863. 80014c0: b29a uxth r2, r3
  3864. SPI_InitStruct->SPI_CPOL | SPI_InitStruct->SPI_CPHA |
  3865. SPI_InitStruct->SPI_NSS | SPI_InitStruct->SPI_BaudRatePrescaler);
  3866. 80014c2: 683b ldr r3, [r7, #0]
  3867. 80014c4: 895b ldrh r3, [r3, #10]
  3868. /* Set SSM, SSI bit according to SPI_NSS values */
  3869. /* Set LSBFirst bit according to SPI_FirstBit value */
  3870. /* Set BR bits according to SPI_BaudRatePrescaler value */
  3871. /* Set CPOL bit according to SPI_CPOL value */
  3872. /* Set CPHA bit according to SPI_CPHA value */
  3873. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_FirstBit |
  3874. 80014c6: 4313 orrs r3, r2
  3875. 80014c8: b29a uxth r2, r3
  3876. SPI_InitStruct->SPI_CPOL | SPI_InitStruct->SPI_CPHA |
  3877. SPI_InitStruct->SPI_NSS | SPI_InitStruct->SPI_BaudRatePrescaler);
  3878. 80014ca: 683b ldr r3, [r7, #0]
  3879. 80014cc: 899b ldrh r3, [r3, #12]
  3880. /* Set SSM, SSI bit according to SPI_NSS values */
  3881. /* Set LSBFirst bit according to SPI_FirstBit value */
  3882. /* Set BR bits according to SPI_BaudRatePrescaler value */
  3883. /* Set CPOL bit according to SPI_CPOL value */
  3884. /* Set CPHA bit according to SPI_CPHA value */
  3885. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Direction | SPI_InitStruct->SPI_FirstBit |
  3886. 80014ce: 4313 orrs r3, r2
  3887. 80014d0: b299 uxth r1, r3
  3888. 80014d2: 230e movs r3, #14
  3889. 80014d4: 18fb adds r3, r7, r3
  3890. 80014d6: 220e movs r2, #14
  3891. 80014d8: 18ba adds r2, r7, r2
  3892. 80014da: 8812 ldrh r2, [r2, #0]
  3893. 80014dc: 430a orrs r2, r1
  3894. 80014de: 801a strh r2, [r3, #0]
  3895. SPI_InitStruct->SPI_CPOL | SPI_InitStruct->SPI_CPHA |
  3896. SPI_InitStruct->SPI_NSS | SPI_InitStruct->SPI_BaudRatePrescaler);
  3897. /* Write to SPIx CR1 */
  3898. SPIx->CR1 = tmpreg;
  3899. 80014e0: 687b ldr r3, [r7, #4]
  3900. 80014e2: 220e movs r2, #14
  3901. 80014e4: 18ba adds r2, r7, r2
  3902. 80014e6: 8812 ldrh r2, [r2, #0]
  3903. 80014e8: 801a strh r2, [r3, #0]
  3904. /*-------------------------Data Size Configuration -----------------------*/
  3905. /* Get the SPIx CR2 value */
  3906. tmpreg = SPIx->CR2;
  3907. 80014ea: 230e movs r3, #14
  3908. 80014ec: 18fb adds r3, r7, r3
  3909. 80014ee: 687a ldr r2, [r7, #4]
  3910. 80014f0: 8892 ldrh r2, [r2, #4]
  3911. 80014f2: 801a strh r2, [r3, #0]
  3912. /* Clear DS[3:0] bits */
  3913. tmpreg &=(uint16_t)~SPI_CR2_DS;
  3914. 80014f4: 230e movs r3, #14
  3915. 80014f6: 18fb adds r3, r7, r3
  3916. 80014f8: 220e movs r2, #14
  3917. 80014fa: 18ba adds r2, r7, r2
  3918. 80014fc: 8812 ldrh r2, [r2, #0]
  3919. 80014fe: 491d ldr r1, [pc, #116] ; (8001574 <SPI_Init+0xfc>)
  3920. 8001500: 400a ands r2, r1
  3921. 8001502: 801a strh r2, [r3, #0]
  3922. /* Configure SPIx: Data Size */
  3923. tmpreg |= (uint16_t)(SPI_InitStruct->SPI_DataSize);
  3924. 8001504: 683b ldr r3, [r7, #0]
  3925. 8001506: 8899 ldrh r1, [r3, #4]
  3926. 8001508: 230e movs r3, #14
  3927. 800150a: 18fb adds r3, r7, r3
  3928. 800150c: 220e movs r2, #14
  3929. 800150e: 18ba adds r2, r7, r2
  3930. 8001510: 8812 ldrh r2, [r2, #0]
  3931. 8001512: 430a orrs r2, r1
  3932. 8001514: 801a strh r2, [r3, #0]
  3933. /* Write to SPIx CR2 */
  3934. SPIx->CR2 = tmpreg;
  3935. 8001516: 687b ldr r3, [r7, #4]
  3936. 8001518: 220e movs r2, #14
  3937. 800151a: 18ba adds r2, r7, r2
  3938. 800151c: 8812 ldrh r2, [r2, #0]
  3939. 800151e: 809a strh r2, [r3, #4]
  3940. /*---------------------------- SPIx CRCPOLY Configuration --------------------*/
  3941. /* Write to SPIx CRCPOLY */
  3942. SPIx->CRCPR = SPI_InitStruct->SPI_CRCPolynomial;
  3943. 8001520: 683b ldr r3, [r7, #0]
  3944. 8001522: 8a1a ldrh r2, [r3, #16]
  3945. 8001524: 687b ldr r3, [r7, #4]
  3946. 8001526: 821a strh r2, [r3, #16]
  3947. /*---------------------------- SPIx CR1 Configuration ------------------------*/
  3948. /* Get the SPIx CR1 value */
  3949. tmpreg = SPIx->CR1;
  3950. 8001528: 230e movs r3, #14
  3951. 800152a: 18fb adds r3, r7, r3
  3952. 800152c: 687a ldr r2, [r7, #4]
  3953. 800152e: 8812 ldrh r2, [r2, #0]
  3954. 8001530: 801a strh r2, [r3, #0]
  3955. /* Clear MSTR bit */
  3956. tmpreg &= CR1_CLEAR_MASK2;
  3957. 8001532: 230e movs r3, #14
  3958. 8001534: 18fb adds r3, r7, r3
  3959. 8001536: 220e movs r2, #14
  3960. 8001538: 18ba adds r2, r7, r2
  3961. 800153a: 8812 ldrh r2, [r2, #0]
  3962. 800153c: 2104 movs r1, #4
  3963. 800153e: 438a bics r2, r1
  3964. 8001540: 801a strh r2, [r3, #0]
  3965. /* Configure SPIx: master/slave mode */
  3966. /* Set MSTR bit according to SPI_Mode */
  3967. tmpreg |= (uint16_t)((uint32_t)SPI_InitStruct->SPI_Mode);
  3968. 8001542: 683b ldr r3, [r7, #0]
  3969. 8001544: 8859 ldrh r1, [r3, #2]
  3970. 8001546: 230e movs r3, #14
  3971. 8001548: 18fb adds r3, r7, r3
  3972. 800154a: 220e movs r2, #14
  3973. 800154c: 18ba adds r2, r7, r2
  3974. 800154e: 8812 ldrh r2, [r2, #0]
  3975. 8001550: 430a orrs r2, r1
  3976. 8001552: 801a strh r2, [r3, #0]
  3977. /* Write to SPIx CR1 */
  3978. SPIx->CR1 = tmpreg;
  3979. 8001554: 687b ldr r3, [r7, #4]
  3980. 8001556: 220e movs r2, #14
  3981. 8001558: 18ba adds r2, r7, r2
  3982. 800155a: 8812 ldrh r2, [r2, #0]
  3983. 800155c: 801a strh r2, [r3, #0]
  3984. /* Activate the SPI mode (Reset I2SMOD bit in I2SCFGR register) */
  3985. SPIx->I2SCFGR &= (uint16_t)~((uint16_t)SPI_I2SCFGR_I2SMOD);
  3986. 800155e: 687b ldr r3, [r7, #4]
  3987. 8001560: 8b9b ldrh r3, [r3, #28]
  3988. 8001562: b29b uxth r3, r3
  3989. 8001564: 4a04 ldr r2, [pc, #16] ; (8001578 <SPI_Init+0x100>)
  3990. 8001566: 4013 ands r3, r2
  3991. 8001568: b29a uxth r2, r3
  3992. 800156a: 687b ldr r3, [r7, #4]
  3993. 800156c: 839a strh r2, [r3, #28]
  3994. }
  3995. 800156e: 46bd mov sp, r7
  3996. 8001570: b004 add sp, #16
  3997. 8001572: bd80 pop {r7, pc}
  3998. 8001574: fffff0ff .word 0xfffff0ff
  3999. 8001578: fffff7ff .word 0xfffff7ff
  4000. 0800157c <I2S_StructInit>:
  4001. * @note This mode is not supported for STM32F030 devices.
  4002. * @param I2S_InitStruct: pointer to a I2S_InitTypeDef structure which will be initialized.
  4003. * @retval None
  4004. */
  4005. void I2S_StructInit(I2S_InitTypeDef* I2S_InitStruct)
  4006. {
  4007. 800157c: b580 push {r7, lr}
  4008. 800157e: b082 sub sp, #8
  4009. 8001580: af00 add r7, sp, #0
  4010. 8001582: 6078 str r0, [r7, #4]
  4011. /*--------------- Reset I2S init structure parameters values -----------------*/
  4012. /* Initialize the I2S_Mode member */
  4013. I2S_InitStruct->I2S_Mode = I2S_Mode_SlaveTx;
  4014. 8001584: 687b ldr r3, [r7, #4]
  4015. 8001586: 2200 movs r2, #0
  4016. 8001588: 801a strh r2, [r3, #0]
  4017. /* Initialize the I2S_Standard member */
  4018. I2S_InitStruct->I2S_Standard = I2S_Standard_Phillips;
  4019. 800158a: 687b ldr r3, [r7, #4]
  4020. 800158c: 2200 movs r2, #0
  4021. 800158e: 805a strh r2, [r3, #2]
  4022. /* Initialize the I2S_DataFormat member */
  4023. I2S_InitStruct->I2S_DataFormat = I2S_DataFormat_16b;
  4024. 8001590: 687b ldr r3, [r7, #4]
  4025. 8001592: 2200 movs r2, #0
  4026. 8001594: 809a strh r2, [r3, #4]
  4027. /* Initialize the I2S_MCLKOutput member */
  4028. I2S_InitStruct->I2S_MCLKOutput = I2S_MCLKOutput_Disable;
  4029. 8001596: 687b ldr r3, [r7, #4]
  4030. 8001598: 2200 movs r2, #0
  4031. 800159a: 80da strh r2, [r3, #6]
  4032. /* Initialize the I2S_AudioFreq member */
  4033. I2S_InitStruct->I2S_AudioFreq = I2S_AudioFreq_Default;
  4034. 800159c: 687b ldr r3, [r7, #4]
  4035. 800159e: 2202 movs r2, #2
  4036. 80015a0: 609a str r2, [r3, #8]
  4037. /* Initialize the I2S_CPOL member */
  4038. I2S_InitStruct->I2S_CPOL = I2S_CPOL_Low;
  4039. 80015a2: 687b ldr r3, [r7, #4]
  4040. 80015a4: 2200 movs r2, #0
  4041. 80015a6: 819a strh r2, [r3, #12]
  4042. }
  4043. 80015a8: 46bd mov sp, r7
  4044. 80015aa: b002 add sp, #8
  4045. 80015ac: bd80 pop {r7, pc}
  4046. 80015ae: 46c0 nop ; (mov r8, r8)
  4047. 080015b0 <I2S_Init>:
  4048. * and the product configuration). But in case the prescaler value is greater
  4049. * than 511, the default value (0x02) will be configured instead.
  4050. * @retval None
  4051. */
  4052. void I2S_Init(SPI_TypeDef* SPIx, I2S_InitTypeDef* I2S_InitStruct)
  4053. {
  4054. 80015b0: b580 push {r7, lr}
  4055. 80015b2: b092 sub sp, #72 ; 0x48
  4056. 80015b4: af00 add r7, sp, #0
  4057. 80015b6: 6078 str r0, [r7, #4]
  4058. 80015b8: 6039 str r1, [r7, #0]
  4059. uint16_t tmpreg = 0, i2sdiv = 2, i2sodd = 0, packetlength = 1;
  4060. 80015ba: 233a movs r3, #58 ; 0x3a
  4061. 80015bc: 18fb adds r3, r7, r3
  4062. 80015be: 2200 movs r2, #0
  4063. 80015c0: 801a strh r2, [r3, #0]
  4064. 80015c2: 2346 movs r3, #70 ; 0x46
  4065. 80015c4: 18fb adds r3, r7, r3
  4066. 80015c6: 2202 movs r2, #2
  4067. 80015c8: 801a strh r2, [r3, #0]
  4068. 80015ca: 2344 movs r3, #68 ; 0x44
  4069. 80015cc: 18fb adds r3, r7, r3
  4070. 80015ce: 2200 movs r2, #0
  4071. 80015d0: 801a strh r2, [r3, #0]
  4072. 80015d2: 2342 movs r3, #66 ; 0x42
  4073. 80015d4: 18fb adds r3, r7, r3
  4074. 80015d6: 2201 movs r2, #1
  4075. 80015d8: 801a strh r2, [r3, #0]
  4076. uint32_t tmp = 0;
  4077. 80015da: 2300 movs r3, #0
  4078. 80015dc: 63fb str r3, [r7, #60] ; 0x3c
  4079. RCC_ClocksTypeDef RCC_Clocks;
  4080. uint32_t sourceclock = 0;
  4081. 80015de: 2300 movs r3, #0
  4082. 80015e0: 637b str r3, [r7, #52] ; 0x34
  4083. assert_param(IS_I2S_AUDIO_FREQ(I2S_InitStruct->I2S_AudioFreq));
  4084. assert_param(IS_I2S_CPOL(I2S_InitStruct->I2S_CPOL));
  4085. /*----------------------- SPIx I2SCFGR & I2SPR Configuration -----------------*/
  4086. /* Clear I2SMOD, I2SE, I2SCFG, PCMSYNC, I2SSTD, CKPOL, DATLEN and CHLEN bits */
  4087. SPIx->I2SCFGR &= I2SCFGR_CLEAR_Mask;
  4088. 80015e2: 687b ldr r3, [r7, #4]
  4089. 80015e4: 8b9b ldrh r3, [r3, #28]
  4090. 80015e6: b29b uxth r3, r3
  4091. 80015e8: 4a60 ldr r2, [pc, #384] ; (800176c <I2S_Init+0x1bc>)
  4092. 80015ea: 4013 ands r3, r2
  4093. 80015ec: b29a uxth r2, r3
  4094. 80015ee: 687b ldr r3, [r7, #4]
  4095. 80015f0: 839a strh r2, [r3, #28]
  4096. SPIx->I2SPR = 0x0002;
  4097. 80015f2: 687b ldr r3, [r7, #4]
  4098. 80015f4: 2202 movs r2, #2
  4099. 80015f6: 841a strh r2, [r3, #32]
  4100. /* Get the I2SCFGR register value */
  4101. tmpreg = SPIx->I2SCFGR;
  4102. 80015f8: 233a movs r3, #58 ; 0x3a
  4103. 80015fa: 18fb adds r3, r7, r3
  4104. 80015fc: 687a ldr r2, [r7, #4]
  4105. 80015fe: 8b92 ldrh r2, [r2, #28]
  4106. 8001600: 801a strh r2, [r3, #0]
  4107. /* If the default value has to be written, reinitialize i2sdiv and i2sodd*/
  4108. if(I2S_InitStruct->I2S_AudioFreq == I2S_AudioFreq_Default)
  4109. 8001602: 683b ldr r3, [r7, #0]
  4110. 8001604: 689b ldr r3, [r3, #8]
  4111. 8001606: 2b02 cmp r3, #2
  4112. 8001608: d108 bne.n 800161c <I2S_Init+0x6c>
  4113. {
  4114. i2sodd = (uint16_t)0;
  4115. 800160a: 2344 movs r3, #68 ; 0x44
  4116. 800160c: 18fb adds r3, r7, r3
  4117. 800160e: 2200 movs r2, #0
  4118. 8001610: 801a strh r2, [r3, #0]
  4119. i2sdiv = (uint16_t)2;
  4120. 8001612: 2346 movs r3, #70 ; 0x46
  4121. 8001614: 18fb adds r3, r7, r3
  4122. 8001616: 2202 movs r2, #2
  4123. 8001618: 801a strh r2, [r3, #0]
  4124. 800161a: e066 b.n 80016ea <I2S_Init+0x13a>
  4125. }
  4126. /* If the requested audio frequency is not the default, compute the prescaler */
  4127. else
  4128. {
  4129. /* Check the frame length (For the Prescaler computing) */
  4130. if(I2S_InitStruct->I2S_DataFormat == I2S_DataFormat_16b)
  4131. 800161c: 683b ldr r3, [r7, #0]
  4132. 800161e: 889b ldrh r3, [r3, #4]
  4133. 8001620: 2b00 cmp r3, #0
  4134. 8001622: d104 bne.n 800162e <I2S_Init+0x7e>
  4135. {
  4136. /* Packet length is 16 bits */
  4137. packetlength = 1;
  4138. 8001624: 2342 movs r3, #66 ; 0x42
  4139. 8001626: 18fb adds r3, r7, r3
  4140. 8001628: 2201 movs r2, #1
  4141. 800162a: 801a strh r2, [r3, #0]
  4142. 800162c: e003 b.n 8001636 <I2S_Init+0x86>
  4143. }
  4144. else
  4145. {
  4146. /* Packet length is 32 bits */
  4147. packetlength = 2;
  4148. 800162e: 2342 movs r3, #66 ; 0x42
  4149. 8001630: 18fb adds r3, r7, r3
  4150. 8001632: 2202 movs r2, #2
  4151. 8001634: 801a strh r2, [r3, #0]
  4152. }
  4153. /* I2S Clock source is System clock: Get System Clock frequency */
  4154. RCC_GetClocksFreq(&RCC_Clocks);
  4155. 8001636: 230c movs r3, #12
  4156. 8001638: 18fb adds r3, r7, r3
  4157. 800163a: 1c18 adds r0, r3, #0
  4158. 800163c: f7ff f976 bl 800092c <RCC_GetClocksFreq>
  4159. /* Get the source clock value: based on System Clock value */
  4160. sourceclock = RCC_Clocks.SYSCLK_Frequency;
  4161. 8001640: 230c movs r3, #12
  4162. 8001642: 18fb adds r3, r7, r3
  4163. 8001644: 681b ldr r3, [r3, #0]
  4164. 8001646: 637b str r3, [r7, #52] ; 0x34
  4165. /* Compute the Real divider depending on the MCLK output state with a floating point */
  4166. if(I2S_InitStruct->I2S_MCLKOutput == I2S_MCLKOutput_Enable)
  4167. 8001648: 683b ldr r3, [r7, #0]
  4168. 800164a: 88da ldrh r2, [r3, #6]
  4169. 800164c: 2380 movs r3, #128 ; 0x80
  4170. 800164e: 009b lsls r3, r3, #2
  4171. 8001650: 429a cmp r2, r3
  4172. 8001652: d112 bne.n 800167a <I2S_Init+0xca>
  4173. {
  4174. /* MCLK output is enabled */
  4175. tmp = (uint16_t)(((((sourceclock / 256) * 10) / I2S_InitStruct->I2S_AudioFreq)) + 5);
  4176. 8001654: 6b7b ldr r3, [r7, #52] ; 0x34
  4177. 8001656: 0a1a lsrs r2, r3, #8
  4178. 8001658: 1c13 adds r3, r2, #0
  4179. 800165a: 009b lsls r3, r3, #2
  4180. 800165c: 189b adds r3, r3, r2
  4181. 800165e: 005b lsls r3, r3, #1
  4182. 8001660: 1c1a adds r2, r3, #0
  4183. 8001662: 683b ldr r3, [r7, #0]
  4184. 8001664: 689b ldr r3, [r3, #8]
  4185. 8001666: 1c10 adds r0, r2, #0
  4186. 8001668: 1c19 adds r1, r3, #0
  4187. 800166a: f001 f85d bl 8002728 <____aeabi_uidiv_from_thumb>
  4188. 800166e: 1c03 adds r3, r0, #0
  4189. 8001670: b29b uxth r3, r3
  4190. 8001672: 3305 adds r3, #5
  4191. 8001674: b29b uxth r3, r3
  4192. 8001676: 63fb str r3, [r7, #60] ; 0x3c
  4193. 8001678: e019 b.n 80016ae <I2S_Init+0xfe>
  4194. }
  4195. else
  4196. {
  4197. /* MCLK output is disabled */
  4198. tmp = (uint16_t)(((((sourceclock / (32 * packetlength)) *10 ) / I2S_InitStruct->I2S_AudioFreq)) + 5);
  4199. 800167a: 2342 movs r3, #66 ; 0x42
  4200. 800167c: 18fb adds r3, r7, r3
  4201. 800167e: 881b ldrh r3, [r3, #0]
  4202. 8001680: 015b lsls r3, r3, #5
  4203. 8001682: 6b78 ldr r0, [r7, #52] ; 0x34
  4204. 8001684: 1c19 adds r1, r3, #0
  4205. 8001686: f001 f84f bl 8002728 <____aeabi_uidiv_from_thumb>
  4206. 800168a: 1c03 adds r3, r0, #0
  4207. 800168c: 1c1a adds r2, r3, #0
  4208. 800168e: 1c13 adds r3, r2, #0
  4209. 8001690: 009b lsls r3, r3, #2
  4210. 8001692: 189b adds r3, r3, r2
  4211. 8001694: 005b lsls r3, r3, #1
  4212. 8001696: 1c1a adds r2, r3, #0
  4213. 8001698: 683b ldr r3, [r7, #0]
  4214. 800169a: 689b ldr r3, [r3, #8]
  4215. 800169c: 1c10 adds r0, r2, #0
  4216. 800169e: 1c19 adds r1, r3, #0
  4217. 80016a0: f001 f842 bl 8002728 <____aeabi_uidiv_from_thumb>
  4218. 80016a4: 1c03 adds r3, r0, #0
  4219. 80016a6: b29b uxth r3, r3
  4220. 80016a8: 3305 adds r3, #5
  4221. 80016aa: b29b uxth r3, r3
  4222. 80016ac: 63fb str r3, [r7, #60] ; 0x3c
  4223. }
  4224. /* Remove the floating point */
  4225. tmp = tmp / 10;
  4226. 80016ae: 6bfb ldr r3, [r7, #60] ; 0x3c
  4227. 80016b0: 1c18 adds r0, r3, #0
  4228. 80016b2: 210a movs r1, #10
  4229. 80016b4: f001 f838 bl 8002728 <____aeabi_uidiv_from_thumb>
  4230. 80016b8: 1c03 adds r3, r0, #0
  4231. 80016ba: 63fb str r3, [r7, #60] ; 0x3c
  4232. /* Check the parity of the divider */
  4233. i2sodd = (uint16_t)(tmp & (uint16_t)0x0001);
  4234. 80016bc: 6bfb ldr r3, [r7, #60] ; 0x3c
  4235. 80016be: b29a uxth r2, r3
  4236. 80016c0: 2344 movs r3, #68 ; 0x44
  4237. 80016c2: 18fb adds r3, r7, r3
  4238. 80016c4: 2101 movs r1, #1
  4239. 80016c6: 400a ands r2, r1
  4240. 80016c8: 801a strh r2, [r3, #0]
  4241. /* Compute the i2sdiv prescaler */
  4242. i2sdiv = (uint16_t)((tmp - i2sodd) / 2);
  4243. 80016ca: 2344 movs r3, #68 ; 0x44
  4244. 80016cc: 18fb adds r3, r7, r3
  4245. 80016ce: 881b ldrh r3, [r3, #0]
  4246. 80016d0: 6bfa ldr r2, [r7, #60] ; 0x3c
  4247. 80016d2: 1ad3 subs r3, r2, r3
  4248. 80016d4: 085a lsrs r2, r3, #1
  4249. 80016d6: 2346 movs r3, #70 ; 0x46
  4250. 80016d8: 18fb adds r3, r7, r3
  4251. 80016da: 801a strh r2, [r3, #0]
  4252. /* Get the Mask for the Odd bit (SPI_I2SPR[8]) register */
  4253. i2sodd = (uint16_t) (i2sodd << 8);
  4254. 80016dc: 2344 movs r3, #68 ; 0x44
  4255. 80016de: 18fb adds r3, r7, r3
  4256. 80016e0: 2244 movs r2, #68 ; 0x44
  4257. 80016e2: 18ba adds r2, r7, r2
  4258. 80016e4: 8812 ldrh r2, [r2, #0]
  4259. 80016e6: 0212 lsls r2, r2, #8
  4260. 80016e8: 801a strh r2, [r3, #0]
  4261. }
  4262. /* Test if the divider is 1 or 0 or greater than 0xFF */
  4263. if ((i2sdiv < 2) || (i2sdiv > 0xFF))
  4264. 80016ea: 2346 movs r3, #70 ; 0x46
  4265. 80016ec: 18fb adds r3, r7, r3
  4266. 80016ee: 881b ldrh r3, [r3, #0]
  4267. 80016f0: 2b01 cmp r3, #1
  4268. 80016f2: d904 bls.n 80016fe <I2S_Init+0x14e>
  4269. 80016f4: 2346 movs r3, #70 ; 0x46
  4270. 80016f6: 18fb adds r3, r7, r3
  4271. 80016f8: 881b ldrh r3, [r3, #0]
  4272. 80016fa: 2bff cmp r3, #255 ; 0xff
  4273. 80016fc: d907 bls.n 800170e <I2S_Init+0x15e>
  4274. {
  4275. /* Set the default values */
  4276. i2sdiv = 2;
  4277. 80016fe: 2346 movs r3, #70 ; 0x46
  4278. 8001700: 18fb adds r3, r7, r3
  4279. 8001702: 2202 movs r2, #2
  4280. 8001704: 801a strh r2, [r3, #0]
  4281. i2sodd = 0;
  4282. 8001706: 2344 movs r3, #68 ; 0x44
  4283. 8001708: 18fb adds r3, r7, r3
  4284. 800170a: 2200 movs r2, #0
  4285. 800170c: 801a strh r2, [r3, #0]
  4286. }
  4287. /* Write to SPIx I2SPR register the computed value */
  4288. SPIx->I2SPR = (uint16_t)(i2sdiv | (uint16_t)(i2sodd | (uint16_t)I2S_InitStruct->I2S_MCLKOutput));
  4289. 800170e: 683b ldr r3, [r7, #0]
  4290. 8001710: 88da ldrh r2, [r3, #6]
  4291. 8001712: 2344 movs r3, #68 ; 0x44
  4292. 8001714: 18fb adds r3, r7, r3
  4293. 8001716: 881b ldrh r3, [r3, #0]
  4294. 8001718: 4313 orrs r3, r2
  4295. 800171a: b29a uxth r2, r3
  4296. 800171c: 2346 movs r3, #70 ; 0x46
  4297. 800171e: 18fb adds r3, r7, r3
  4298. 8001720: 881b ldrh r3, [r3, #0]
  4299. 8001722: 4313 orrs r3, r2
  4300. 8001724: b29a uxth r2, r3
  4301. 8001726: 687b ldr r3, [r7, #4]
  4302. 8001728: 841a strh r2, [r3, #32]
  4303. /* Configure the I2S with the SPI_InitStruct values */
  4304. tmpreg |= (uint16_t)(SPI_I2SCFGR_I2SMOD | (uint16_t)(I2S_InitStruct->I2S_Mode | \
  4305. 800172a: 683b ldr r3, [r7, #0]
  4306. 800172c: 881a ldrh r2, [r3, #0]
  4307. (uint16_t)(I2S_InitStruct->I2S_Standard | (uint16_t)(I2S_InitStruct->I2S_DataFormat | \
  4308. 800172e: 683b ldr r3, [r7, #0]
  4309. 8001730: 8859 ldrh r1, [r3, #2]
  4310. 8001732: 683b ldr r3, [r7, #0]
  4311. 8001734: 8898 ldrh r0, [r3, #4]
  4312. (uint16_t)I2S_InitStruct->I2S_CPOL))));
  4313. 8001736: 683b ldr r3, [r7, #0]
  4314. 8001738: 899b ldrh r3, [r3, #12]
  4315. /* Write to SPIx I2SPR register the computed value */
  4316. SPIx->I2SPR = (uint16_t)(i2sdiv | (uint16_t)(i2sodd | (uint16_t)I2S_InitStruct->I2S_MCLKOutput));
  4317. /* Configure the I2S with the SPI_InitStruct values */
  4318. tmpreg |= (uint16_t)(SPI_I2SCFGR_I2SMOD | (uint16_t)(I2S_InitStruct->I2S_Mode | \
  4319. (uint16_t)(I2S_InitStruct->I2S_Standard | (uint16_t)(I2S_InitStruct->I2S_DataFormat | \
  4320. 800173a: 4303 orrs r3, r0
  4321. 800173c: b29b uxth r3, r3
  4322. 800173e: 430b orrs r3, r1
  4323. 8001740: b29b uxth r3, r3
  4324. /* Write to SPIx I2SPR register the computed value */
  4325. SPIx->I2SPR = (uint16_t)(i2sdiv | (uint16_t)(i2sodd | (uint16_t)I2S_InitStruct->I2S_MCLKOutput));
  4326. /* Configure the I2S with the SPI_InitStruct values */
  4327. tmpreg |= (uint16_t)(SPI_I2SCFGR_I2SMOD | (uint16_t)(I2S_InitStruct->I2S_Mode | \
  4328. 8001742: 4313 orrs r3, r2
  4329. 8001744: b29a uxth r2, r3
  4330. 8001746: 233a movs r3, #58 ; 0x3a
  4331. 8001748: 18fb adds r3, r7, r3
  4332. 800174a: 881b ldrh r3, [r3, #0]
  4333. 800174c: 4313 orrs r3, r2
  4334. 800174e: b29a uxth r2, r3
  4335. 8001750: 233a movs r3, #58 ; 0x3a
  4336. 8001752: 18fb adds r3, r7, r3
  4337. 8001754: 2180 movs r1, #128 ; 0x80
  4338. 8001756: 0109 lsls r1, r1, #4
  4339. 8001758: 430a orrs r2, r1
  4340. 800175a: 801a strh r2, [r3, #0]
  4341. (uint16_t)(I2S_InitStruct->I2S_Standard | (uint16_t)(I2S_InitStruct->I2S_DataFormat | \
  4342. (uint16_t)I2S_InitStruct->I2S_CPOL))));
  4343. /* Write to SPIx I2SCFGR */
  4344. SPIx->I2SCFGR = tmpreg;
  4345. 800175c: 687b ldr r3, [r7, #4]
  4346. 800175e: 223a movs r2, #58 ; 0x3a
  4347. 8001760: 18ba adds r2, r7, r2
  4348. 8001762: 8812 ldrh r2, [r2, #0]
  4349. 8001764: 839a strh r2, [r3, #28]
  4350. }
  4351. 8001766: 46bd mov sp, r7
  4352. 8001768: b012 add sp, #72 ; 0x48
  4353. 800176a: bd80 pop {r7, pc}
  4354. 800176c: fffff040 .word 0xfffff040
  4355. 08001770 <SPI_Cmd>:
  4356. * @param NewState: new state of the SPIx peripheral.
  4357. * This parameter can be: ENABLE or DISABLE.
  4358. * @retval None
  4359. */
  4360. void SPI_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState)
  4361. {
  4362. 8001770: b580 push {r7, lr}
  4363. 8001772: b082 sub sp, #8
  4364. 8001774: af00 add r7, sp, #0
  4365. 8001776: 6078 str r0, [r7, #4]
  4366. 8001778: 1c0a adds r2, r1, #0
  4367. 800177a: 1cfb adds r3, r7, #3
  4368. 800177c: 701a strb r2, [r3, #0]
  4369. /* Check the parameters */
  4370. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4371. assert_param(IS_FUNCTIONAL_STATE(NewState));
  4372. if (NewState != DISABLE)
  4373. 800177e: 1cfb adds r3, r7, #3
  4374. 8001780: 781b ldrb r3, [r3, #0]
  4375. 8001782: 2b00 cmp r3, #0
  4376. 8001784: d008 beq.n 8001798 <SPI_Cmd+0x28>
  4377. {
  4378. /* Enable the selected SPI peripheral */
  4379. SPIx->CR1 |= SPI_CR1_SPE;
  4380. 8001786: 687b ldr r3, [r7, #4]
  4381. 8001788: 881b ldrh r3, [r3, #0]
  4382. 800178a: b29b uxth r3, r3
  4383. 800178c: 2240 movs r2, #64 ; 0x40
  4384. 800178e: 4313 orrs r3, r2
  4385. 8001790: b29a uxth r2, r3
  4386. 8001792: 687b ldr r3, [r7, #4]
  4387. 8001794: 801a strh r2, [r3, #0]
  4388. 8001796: e007 b.n 80017a8 <SPI_Cmd+0x38>
  4389. }
  4390. else
  4391. {
  4392. /* Disable the selected SPI peripheral */
  4393. SPIx->CR1 &= (uint16_t)~((uint16_t)SPI_CR1_SPE);
  4394. 8001798: 687b ldr r3, [r7, #4]
  4395. 800179a: 881b ldrh r3, [r3, #0]
  4396. 800179c: b29b uxth r3, r3
  4397. 800179e: 2240 movs r2, #64 ; 0x40
  4398. 80017a0: 4393 bics r3, r2
  4399. 80017a2: b29a uxth r2, r3
  4400. 80017a4: 687b ldr r3, [r7, #4]
  4401. 80017a6: 801a strh r2, [r3, #0]
  4402. }
  4403. }
  4404. 80017a8: 46bd mov sp, r7
  4405. 80017aa: b002 add sp, #8
  4406. 80017ac: bd80 pop {r7, pc}
  4407. 80017ae: 46c0 nop ; (mov r8, r8)
  4408. 080017b0 <SPI_TIModeCmd>:
  4409. * @param NewState: new state of the selected SPI TI communication mode.
  4410. * This parameter can be: ENABLE or DISABLE.
  4411. * @retval None
  4412. */
  4413. void SPI_TIModeCmd(SPI_TypeDef* SPIx, FunctionalState NewState)
  4414. {
  4415. 80017b0: b580 push {r7, lr}
  4416. 80017b2: b082 sub sp, #8
  4417. 80017b4: af00 add r7, sp, #0
  4418. 80017b6: 6078 str r0, [r7, #4]
  4419. 80017b8: 1c0a adds r2, r1, #0
  4420. 80017ba: 1cfb adds r3, r7, #3
  4421. 80017bc: 701a strb r2, [r3, #0]
  4422. /* Check the parameters */
  4423. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4424. assert_param(IS_FUNCTIONAL_STATE(NewState));
  4425. if (NewState != DISABLE)
  4426. 80017be: 1cfb adds r3, r7, #3
  4427. 80017c0: 781b ldrb r3, [r3, #0]
  4428. 80017c2: 2b00 cmp r3, #0
  4429. 80017c4: d008 beq.n 80017d8 <SPI_TIModeCmd+0x28>
  4430. {
  4431. /* Enable the TI mode for the selected SPI peripheral */
  4432. SPIx->CR2 |= SPI_CR2_FRF;
  4433. 80017c6: 687b ldr r3, [r7, #4]
  4434. 80017c8: 889b ldrh r3, [r3, #4]
  4435. 80017ca: b29b uxth r3, r3
  4436. 80017cc: 2210 movs r2, #16
  4437. 80017ce: 4313 orrs r3, r2
  4438. 80017d0: b29a uxth r2, r3
  4439. 80017d2: 687b ldr r3, [r7, #4]
  4440. 80017d4: 809a strh r2, [r3, #4]
  4441. 80017d6: e007 b.n 80017e8 <SPI_TIModeCmd+0x38>
  4442. }
  4443. else
  4444. {
  4445. /* Disable the TI mode for the selected SPI peripheral */
  4446. SPIx->CR2 &= (uint16_t)~((uint16_t)SPI_CR2_FRF);
  4447. 80017d8: 687b ldr r3, [r7, #4]
  4448. 80017da: 889b ldrh r3, [r3, #4]
  4449. 80017dc: b29b uxth r3, r3
  4450. 80017de: 2210 movs r2, #16
  4451. 80017e0: 4393 bics r3, r2
  4452. 80017e2: b29a uxth r2, r3
  4453. 80017e4: 687b ldr r3, [r7, #4]
  4454. 80017e6: 809a strh r2, [r3, #4]
  4455. }
  4456. }
  4457. 80017e8: 46bd mov sp, r7
  4458. 80017ea: b002 add sp, #8
  4459. 80017ec: bd80 pop {r7, pc}
  4460. 80017ee: 46c0 nop ; (mov r8, r8)
  4461. 080017f0 <I2S_Cmd>:
  4462. * @param NewState: new state of the SPIx peripheral.
  4463. * This parameter can be: ENABLE or DISABLE.
  4464. * @retval None
  4465. */
  4466. void I2S_Cmd(SPI_TypeDef* SPIx, FunctionalState NewState)
  4467. {
  4468. 80017f0: b580 push {r7, lr}
  4469. 80017f2: b082 sub sp, #8
  4470. 80017f4: af00 add r7, sp, #0
  4471. 80017f6: 6078 str r0, [r7, #4]
  4472. 80017f8: 1c0a adds r2, r1, #0
  4473. 80017fa: 1cfb adds r3, r7, #3
  4474. 80017fc: 701a strb r2, [r3, #0]
  4475. /* Check the parameters */
  4476. assert_param(IS_SPI_1_PERIPH(SPIx));
  4477. assert_param(IS_FUNCTIONAL_STATE(NewState));
  4478. if (NewState != DISABLE)
  4479. 80017fe: 1cfb adds r3, r7, #3
  4480. 8001800: 781b ldrb r3, [r3, #0]
  4481. 8001802: 2b00 cmp r3, #0
  4482. 8001804: d009 beq.n 800181a <I2S_Cmd+0x2a>
  4483. {
  4484. /* Enable the selected SPI peripheral in I2S mode */
  4485. SPIx->I2SCFGR |= SPI_I2SCFGR_I2SE;
  4486. 8001806: 687b ldr r3, [r7, #4]
  4487. 8001808: 8b9b ldrh r3, [r3, #28]
  4488. 800180a: b29b uxth r3, r3
  4489. 800180c: 2280 movs r2, #128 ; 0x80
  4490. 800180e: 00d2 lsls r2, r2, #3
  4491. 8001810: 4313 orrs r3, r2
  4492. 8001812: b29a uxth r2, r3
  4493. 8001814: 687b ldr r3, [r7, #4]
  4494. 8001816: 839a strh r2, [r3, #28]
  4495. 8001818: e007 b.n 800182a <I2S_Cmd+0x3a>
  4496. }
  4497. else
  4498. {
  4499. /* Disable the selected SPI peripheral in I2S mode */
  4500. SPIx->I2SCFGR &= (uint16_t)~((uint16_t)SPI_I2SCFGR_I2SE);
  4501. 800181a: 687b ldr r3, [r7, #4]
  4502. 800181c: 8b9b ldrh r3, [r3, #28]
  4503. 800181e: b29b uxth r3, r3
  4504. 8001820: 4a03 ldr r2, [pc, #12] ; (8001830 <I2S_Cmd+0x40>)
  4505. 8001822: 4013 ands r3, r2
  4506. 8001824: b29a uxth r2, r3
  4507. 8001826: 687b ldr r3, [r7, #4]
  4508. 8001828: 839a strh r2, [r3, #28]
  4509. }
  4510. }
  4511. 800182a: 46bd mov sp, r7
  4512. 800182c: b002 add sp, #8
  4513. 800182e: bd80 pop {r7, pc}
  4514. 8001830: fffffbff .word 0xfffffbff
  4515. 08001834 <SPI_DataSizeConfig>:
  4516. * @arg SPI_DataSize_15b: Set data size to 15 bits
  4517. * @arg SPI_DataSize_16b: Set data size to 16 bits
  4518. * @retval None
  4519. */
  4520. void SPI_DataSizeConfig(SPI_TypeDef* SPIx, uint16_t SPI_DataSize)
  4521. {
  4522. 8001834: b580 push {r7, lr}
  4523. 8001836: b084 sub sp, #16
  4524. 8001838: af00 add r7, sp, #0
  4525. 800183a: 6078 str r0, [r7, #4]
  4526. 800183c: 1c0a adds r2, r1, #0
  4527. 800183e: 1cbb adds r3, r7, #2
  4528. 8001840: 801a strh r2, [r3, #0]
  4529. uint16_t tmpreg = 0;
  4530. 8001842: 230e movs r3, #14
  4531. 8001844: 18fb adds r3, r7, r3
  4532. 8001846: 2200 movs r2, #0
  4533. 8001848: 801a strh r2, [r3, #0]
  4534. /* Check the parameters */
  4535. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4536. assert_param(IS_SPI_DATA_SIZE(SPI_DataSize));
  4537. /* Read the CR2 register */
  4538. tmpreg = SPIx->CR2;
  4539. 800184a: 230e movs r3, #14
  4540. 800184c: 18fb adds r3, r7, r3
  4541. 800184e: 687a ldr r2, [r7, #4]
  4542. 8001850: 8892 ldrh r2, [r2, #4]
  4543. 8001852: 801a strh r2, [r3, #0]
  4544. /* Clear DS[3:0] bits */
  4545. tmpreg &= (uint16_t)~SPI_CR2_DS;
  4546. 8001854: 230e movs r3, #14
  4547. 8001856: 18fb adds r3, r7, r3
  4548. 8001858: 220e movs r2, #14
  4549. 800185a: 18ba adds r2, r7, r2
  4550. 800185c: 8812 ldrh r2, [r2, #0]
  4551. 800185e: 490a ldr r1, [pc, #40] ; (8001888 <SPI_DataSizeConfig+0x54>)
  4552. 8001860: 400a ands r2, r1
  4553. 8001862: 801a strh r2, [r3, #0]
  4554. /* Set new DS[3:0] bits value */
  4555. tmpreg |= SPI_DataSize;
  4556. 8001864: 230e movs r3, #14
  4557. 8001866: 18fb adds r3, r7, r3
  4558. 8001868: 220e movs r2, #14
  4559. 800186a: 18b9 adds r1, r7, r2
  4560. 800186c: 1cba adds r2, r7, #2
  4561. 800186e: 8809 ldrh r1, [r1, #0]
  4562. 8001870: 8812 ldrh r2, [r2, #0]
  4563. 8001872: 430a orrs r2, r1
  4564. 8001874: 801a strh r2, [r3, #0]
  4565. SPIx->CR2 = tmpreg;
  4566. 8001876: 687b ldr r3, [r7, #4]
  4567. 8001878: 220e movs r2, #14
  4568. 800187a: 18ba adds r2, r7, r2
  4569. 800187c: 8812 ldrh r2, [r2, #0]
  4570. 800187e: 809a strh r2, [r3, #4]
  4571. }
  4572. 8001880: 46bd mov sp, r7
  4573. 8001882: b004 add sp, #16
  4574. 8001884: bd80 pop {r7, pc}
  4575. 8001886: 46c0 nop ; (mov r8, r8)
  4576. 8001888: fffff0ff .word 0xfffff0ff
  4577. 0800188c <SPI_RxFIFOThresholdConfig>:
  4578. * @arg SPI_RxFIFOThreshold_QF: RXNE event is generated if the FIFO
  4579. * level is greater or equal to 1/4.
  4580. * @retval None
  4581. */
  4582. void SPI_RxFIFOThresholdConfig(SPI_TypeDef* SPIx, uint16_t SPI_RxFIFOThreshold)
  4583. {
  4584. 800188c: b580 push {r7, lr}
  4585. 800188e: b082 sub sp, #8
  4586. 8001890: af00 add r7, sp, #0
  4587. 8001892: 6078 str r0, [r7, #4]
  4588. 8001894: 1c0a adds r2, r1, #0
  4589. 8001896: 1cbb adds r3, r7, #2
  4590. 8001898: 801a strh r2, [r3, #0]
  4591. /* Check the parameters */
  4592. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4593. assert_param(IS_SPI_RX_FIFO_THRESHOLD(SPI_RxFIFOThreshold));
  4594. /* Clear FRXTH bit */
  4595. SPIx->CR2 &= (uint16_t)~((uint16_t)SPI_CR2_FRXTH);
  4596. 800189a: 687b ldr r3, [r7, #4]
  4597. 800189c: 889b ldrh r3, [r3, #4]
  4598. 800189e: b29b uxth r3, r3
  4599. 80018a0: 4a08 ldr r2, [pc, #32] ; (80018c4 <SPI_RxFIFOThresholdConfig+0x38>)
  4600. 80018a2: 4013 ands r3, r2
  4601. 80018a4: b29a uxth r2, r3
  4602. 80018a6: 687b ldr r3, [r7, #4]
  4603. 80018a8: 809a strh r2, [r3, #4]
  4604. /* Set new FRXTH bit value */
  4605. SPIx->CR2 |= SPI_RxFIFOThreshold;
  4606. 80018aa: 687b ldr r3, [r7, #4]
  4607. 80018ac: 889b ldrh r3, [r3, #4]
  4608. 80018ae: b29a uxth r2, r3
  4609. 80018b0: 1cbb adds r3, r7, #2
  4610. 80018b2: 881b ldrh r3, [r3, #0]
  4611. 80018b4: 4313 orrs r3, r2
  4612. 80018b6: b29a uxth r2, r3
  4613. 80018b8: 687b ldr r3, [r7, #4]
  4614. 80018ba: 809a strh r2, [r3, #4]
  4615. }
  4616. 80018bc: 46bd mov sp, r7
  4617. 80018be: b002 add sp, #8
  4618. 80018c0: bd80 pop {r7, pc}
  4619. 80018c2: 46c0 nop ; (mov r8, r8)
  4620. 80018c4: ffffefff .word 0xffffefff
  4621. 080018c8 <SPI_BiDirectionalLineConfig>:
  4622. * @arg SPI_Direction_Tx: Selects Tx transmission direction
  4623. * @arg SPI_Direction_Rx: Selects Rx receive direction
  4624. * @retval None
  4625. */
  4626. void SPI_BiDirectionalLineConfig(SPI_TypeDef* SPIx, uint16_t SPI_Direction)
  4627. {
  4628. 80018c8: b580 push {r7, lr}
  4629. 80018ca: b082 sub sp, #8
  4630. 80018cc: af00 add r7, sp, #0
  4631. 80018ce: 6078 str r0, [r7, #4]
  4632. 80018d0: 1c0a adds r2, r1, #0
  4633. 80018d2: 1cbb adds r3, r7, #2
  4634. 80018d4: 801a strh r2, [r3, #0]
  4635. /* Check the parameters */
  4636. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4637. assert_param(IS_SPI_DIRECTION(SPI_Direction));
  4638. if (SPI_Direction == SPI_Direction_Tx)
  4639. 80018d6: 1cbb adds r3, r7, #2
  4640. 80018d8: 881a ldrh r2, [r3, #0]
  4641. 80018da: 2380 movs r3, #128 ; 0x80
  4642. 80018dc: 01db lsls r3, r3, #7
  4643. 80018de: 429a cmp r2, r3
  4644. 80018e0: d109 bne.n 80018f6 <SPI_BiDirectionalLineConfig+0x2e>
  4645. {
  4646. /* Set the Tx only mode */
  4647. SPIx->CR1 |= SPI_Direction_Tx;
  4648. 80018e2: 687b ldr r3, [r7, #4]
  4649. 80018e4: 881b ldrh r3, [r3, #0]
  4650. 80018e6: b29b uxth r3, r3
  4651. 80018e8: 2280 movs r2, #128 ; 0x80
  4652. 80018ea: 01d2 lsls r2, r2, #7
  4653. 80018ec: 4313 orrs r3, r2
  4654. 80018ee: b29a uxth r2, r3
  4655. 80018f0: 687b ldr r3, [r7, #4]
  4656. 80018f2: 801a strh r2, [r3, #0]
  4657. 80018f4: e007 b.n 8001906 <SPI_BiDirectionalLineConfig+0x3e>
  4658. }
  4659. else
  4660. {
  4661. /* Set the Rx only mode */
  4662. SPIx->CR1 &= SPI_Direction_Rx;
  4663. 80018f6: 687b ldr r3, [r7, #4]
  4664. 80018f8: 881b ldrh r3, [r3, #0]
  4665. 80018fa: b29b uxth r3, r3
  4666. 80018fc: 4a03 ldr r2, [pc, #12] ; (800190c <SPI_BiDirectionalLineConfig+0x44>)
  4667. 80018fe: 4013 ands r3, r2
  4668. 8001900: b29a uxth r2, r3
  4669. 8001902: 687b ldr r3, [r7, #4]
  4670. 8001904: 801a strh r2, [r3, #0]
  4671. }
  4672. }
  4673. 8001906: 46bd mov sp, r7
  4674. 8001908: b002 add sp, #8
  4675. 800190a: bd80 pop {r7, pc}
  4676. 800190c: ffffbfff .word 0xffffbfff
  4677. 08001910 <SPI_NSSInternalSoftwareConfig>:
  4678. * @arg SPI_NSSInternalSoft_Set: Set NSS pin internally
  4679. * @arg SPI_NSSInternalSoft_Reset: Reset NSS pin internally
  4680. * @retval None
  4681. */
  4682. void SPI_NSSInternalSoftwareConfig(SPI_TypeDef* SPIx, uint16_t SPI_NSSInternalSoft)
  4683. {
  4684. 8001910: b580 push {r7, lr}
  4685. 8001912: b082 sub sp, #8
  4686. 8001914: af00 add r7, sp, #0
  4687. 8001916: 6078 str r0, [r7, #4]
  4688. 8001918: 1c0a adds r2, r1, #0
  4689. 800191a: 1cbb adds r3, r7, #2
  4690. 800191c: 801a strh r2, [r3, #0]
  4691. /* Check the parameters */
  4692. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4693. assert_param(IS_SPI_NSS_INTERNAL(SPI_NSSInternalSoft));
  4694. if (SPI_NSSInternalSoft != SPI_NSSInternalSoft_Reset)
  4695. 800191e: 1cbb adds r3, r7, #2
  4696. 8001920: 881b ldrh r3, [r3, #0]
  4697. 8001922: 4a0c ldr r2, [pc, #48] ; (8001954 <SPI_NSSInternalSoftwareConfig+0x44>)
  4698. 8001924: 4293 cmp r3, r2
  4699. 8001926: d009 beq.n 800193c <SPI_NSSInternalSoftwareConfig+0x2c>
  4700. {
  4701. /* Set NSS pin internally by software */
  4702. SPIx->CR1 |= SPI_NSSInternalSoft_Set;
  4703. 8001928: 687b ldr r3, [r7, #4]
  4704. 800192a: 881b ldrh r3, [r3, #0]
  4705. 800192c: b29b uxth r3, r3
  4706. 800192e: 2280 movs r2, #128 ; 0x80
  4707. 8001930: 0052 lsls r2, r2, #1
  4708. 8001932: 4313 orrs r3, r2
  4709. 8001934: b29a uxth r2, r3
  4710. 8001936: 687b ldr r3, [r7, #4]
  4711. 8001938: 801a strh r2, [r3, #0]
  4712. 800193a: e007 b.n 800194c <SPI_NSSInternalSoftwareConfig+0x3c>
  4713. }
  4714. else
  4715. {
  4716. /* Reset NSS pin internally by software */
  4717. SPIx->CR1 &= SPI_NSSInternalSoft_Reset;
  4718. 800193c: 687b ldr r3, [r7, #4]
  4719. 800193e: 881b ldrh r3, [r3, #0]
  4720. 8001940: b29b uxth r3, r3
  4721. 8001942: 4a05 ldr r2, [pc, #20] ; (8001958 <SPI_NSSInternalSoftwareConfig+0x48>)
  4722. 8001944: 4013 ands r3, r2
  4723. 8001946: b29a uxth r2, r3
  4724. 8001948: 687b ldr r3, [r7, #4]
  4725. 800194a: 801a strh r2, [r3, #0]
  4726. }
  4727. }
  4728. 800194c: 46bd mov sp, r7
  4729. 800194e: b002 add sp, #8
  4730. 8001950: bd80 pop {r7, pc}
  4731. 8001952: 46c0 nop ; (mov r8, r8)
  4732. 8001954: 0000feff .word 0x0000feff
  4733. 8001958: fffffeff .word 0xfffffeff
  4734. 0800195c <SPI_SSOutputCmd>:
  4735. * @param NewState: new state of the SPIx SS output.
  4736. * This parameter can be: ENABLE or DISABLE.
  4737. * @retval None
  4738. */
  4739. void SPI_SSOutputCmd(SPI_TypeDef* SPIx, FunctionalState NewState)
  4740. {
  4741. 800195c: b580 push {r7, lr}
  4742. 800195e: b082 sub sp, #8
  4743. 8001960: af00 add r7, sp, #0
  4744. 8001962: 6078 str r0, [r7, #4]
  4745. 8001964: 1c0a adds r2, r1, #0
  4746. 8001966: 1cfb adds r3, r7, #3
  4747. 8001968: 701a strb r2, [r3, #0]
  4748. /* Check the parameters */
  4749. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4750. assert_param(IS_FUNCTIONAL_STATE(NewState));
  4751. if (NewState != DISABLE)
  4752. 800196a: 1cfb adds r3, r7, #3
  4753. 800196c: 781b ldrb r3, [r3, #0]
  4754. 800196e: 2b00 cmp r3, #0
  4755. 8001970: d008 beq.n 8001984 <SPI_SSOutputCmd+0x28>
  4756. {
  4757. /* Enable the selected SPI SS output */
  4758. SPIx->CR2 |= SPI_CR2_SSOE;
  4759. 8001972: 687b ldr r3, [r7, #4]
  4760. 8001974: 889b ldrh r3, [r3, #4]
  4761. 8001976: b29b uxth r3, r3
  4762. 8001978: 2204 movs r2, #4
  4763. 800197a: 4313 orrs r3, r2
  4764. 800197c: b29a uxth r2, r3
  4765. 800197e: 687b ldr r3, [r7, #4]
  4766. 8001980: 809a strh r2, [r3, #4]
  4767. 8001982: e007 b.n 8001994 <SPI_SSOutputCmd+0x38>
  4768. }
  4769. else
  4770. {
  4771. /* Disable the selected SPI SS output */
  4772. SPIx->CR2 &= (uint16_t)~((uint16_t)SPI_CR2_SSOE);
  4773. 8001984: 687b ldr r3, [r7, #4]
  4774. 8001986: 889b ldrh r3, [r3, #4]
  4775. 8001988: b29b uxth r3, r3
  4776. 800198a: 2204 movs r2, #4
  4777. 800198c: 4393 bics r3, r2
  4778. 800198e: b29a uxth r2, r3
  4779. 8001990: 687b ldr r3, [r7, #4]
  4780. 8001992: 809a strh r2, [r3, #4]
  4781. }
  4782. }
  4783. 8001994: 46bd mov sp, r7
  4784. 8001996: b002 add sp, #8
  4785. 8001998: bd80 pop {r7, pc}
  4786. 800199a: 46c0 nop ; (mov r8, r8)
  4787. 0800199c <SPI_NSSPulseModeCmd>:
  4788. * @param NewState: new state of the NSS pulse management mode.
  4789. * This parameter can be: ENABLE or DISABLE.
  4790. * @retval None
  4791. */
  4792. void SPI_NSSPulseModeCmd(SPI_TypeDef* SPIx, FunctionalState NewState)
  4793. {
  4794. 800199c: b580 push {r7, lr}
  4795. 800199e: b082 sub sp, #8
  4796. 80019a0: af00 add r7, sp, #0
  4797. 80019a2: 6078 str r0, [r7, #4]
  4798. 80019a4: 1c0a adds r2, r1, #0
  4799. 80019a6: 1cfb adds r3, r7, #3
  4800. 80019a8: 701a strb r2, [r3, #0]
  4801. /* Check the parameters */
  4802. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4803. assert_param(IS_FUNCTIONAL_STATE(NewState));
  4804. if (NewState != DISABLE)
  4805. 80019aa: 1cfb adds r3, r7, #3
  4806. 80019ac: 781b ldrb r3, [r3, #0]
  4807. 80019ae: 2b00 cmp r3, #0
  4808. 80019b0: d008 beq.n 80019c4 <SPI_NSSPulseModeCmd+0x28>
  4809. {
  4810. /* Enable the NSS pulse management mode */
  4811. SPIx->CR2 |= SPI_CR2_NSSP;
  4812. 80019b2: 687b ldr r3, [r7, #4]
  4813. 80019b4: 889b ldrh r3, [r3, #4]
  4814. 80019b6: b29b uxth r3, r3
  4815. 80019b8: 2208 movs r2, #8
  4816. 80019ba: 4313 orrs r3, r2
  4817. 80019bc: b29a uxth r2, r3
  4818. 80019be: 687b ldr r3, [r7, #4]
  4819. 80019c0: 809a strh r2, [r3, #4]
  4820. 80019c2: e007 b.n 80019d4 <SPI_NSSPulseModeCmd+0x38>
  4821. }
  4822. else
  4823. {
  4824. /* Disable the NSS pulse management mode */
  4825. SPIx->CR2 &= (uint16_t)~((uint16_t)SPI_CR2_NSSP);
  4826. 80019c4: 687b ldr r3, [r7, #4]
  4827. 80019c6: 889b ldrh r3, [r3, #4]
  4828. 80019c8: b29b uxth r3, r3
  4829. 80019ca: 2208 movs r2, #8
  4830. 80019cc: 4393 bics r3, r2
  4831. 80019ce: b29a uxth r2, r3
  4832. 80019d0: 687b ldr r3, [r7, #4]
  4833. 80019d2: 809a strh r2, [r3, #4]
  4834. }
  4835. }
  4836. 80019d4: 46bd mov sp, r7
  4837. 80019d6: b002 add sp, #8
  4838. 80019d8: bd80 pop {r7, pc}
  4839. 80019da: 46c0 nop ; (mov r8, r8)
  4840. 080019dc <SPI_SendData8>:
  4841. * @note SPI2 is not available for STM32F031 devices.
  4842. * @param Data: Data to be transmitted.
  4843. * @retval None
  4844. */
  4845. void SPI_SendData8(SPI_TypeDef* SPIx, uint8_t Data)
  4846. {
  4847. 80019dc: b580 push {r7, lr}
  4848. 80019de: b084 sub sp, #16
  4849. 80019e0: af00 add r7, sp, #0
  4850. 80019e2: 6078 str r0, [r7, #4]
  4851. 80019e4: 1c0a adds r2, r1, #0
  4852. 80019e6: 1cfb adds r3, r7, #3
  4853. 80019e8: 701a strb r2, [r3, #0]
  4854. uint32_t spixbase = 0x00;
  4855. 80019ea: 2300 movs r3, #0
  4856. 80019ec: 60fb str r3, [r7, #12]
  4857. /* Check the parameters */
  4858. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4859. spixbase = (uint32_t)SPIx;
  4860. 80019ee: 687b ldr r3, [r7, #4]
  4861. 80019f0: 60fb str r3, [r7, #12]
  4862. spixbase += 0x0C;
  4863. 80019f2: 68fb ldr r3, [r7, #12]
  4864. 80019f4: 330c adds r3, #12
  4865. 80019f6: 60fb str r3, [r7, #12]
  4866. *(__IO uint8_t *) spixbase = Data;
  4867. 80019f8: 68fb ldr r3, [r7, #12]
  4868. 80019fa: 1cfa adds r2, r7, #3
  4869. 80019fc: 7812 ldrb r2, [r2, #0]
  4870. 80019fe: 701a strb r2, [r3, #0]
  4871. }
  4872. 8001a00: 46bd mov sp, r7
  4873. 8001a02: b004 add sp, #16
  4874. 8001a04: bd80 pop {r7, pc}
  4875. 8001a06: 46c0 nop ; (mov r8, r8)
  4876. 08001a08 <SPI_I2S_SendData16>:
  4877. * @note SPI2 is not available for STM32F031 devices.
  4878. * @param Data: Data to be transmitted.
  4879. * @retval None
  4880. */
  4881. void SPI_I2S_SendData16(SPI_TypeDef* SPIx, uint16_t Data)
  4882. {
  4883. 8001a08: b580 push {r7, lr}
  4884. 8001a0a: b082 sub sp, #8
  4885. 8001a0c: af00 add r7, sp, #0
  4886. 8001a0e: 6078 str r0, [r7, #4]
  4887. 8001a10: 1c0a adds r2, r1, #0
  4888. 8001a12: 1cbb adds r3, r7, #2
  4889. 8001a14: 801a strh r2, [r3, #0]
  4890. /* Check the parameters */
  4891. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4892. SPIx->DR = (uint16_t)Data;
  4893. 8001a16: 687b ldr r3, [r7, #4]
  4894. 8001a18: 1cba adds r2, r7, #2
  4895. 8001a1a: 8812 ldrh r2, [r2, #0]
  4896. 8001a1c: 819a strh r2, [r3, #12]
  4897. }
  4898. 8001a1e: 46bd mov sp, r7
  4899. 8001a20: b002 add sp, #8
  4900. 8001a22: bd80 pop {r7, pc}
  4901. 08001a24 <SPI_ReceiveData8>:
  4902. * @param SPIx: where x can be 1 or 2 in SPI mode to select the SPI peripheral.
  4903. * @note SPI2 is not available for STM32F031 devices.
  4904. * @retval The value of the received data.
  4905. */
  4906. uint8_t SPI_ReceiveData8(SPI_TypeDef* SPIx)
  4907. {
  4908. 8001a24: b580 push {r7, lr}
  4909. 8001a26: b084 sub sp, #16
  4910. 8001a28: af00 add r7, sp, #0
  4911. 8001a2a: 6078 str r0, [r7, #4]
  4912. uint32_t spixbase = 0x00;
  4913. 8001a2c: 2300 movs r3, #0
  4914. 8001a2e: 60fb str r3, [r7, #12]
  4915. spixbase = (uint32_t)SPIx;
  4916. 8001a30: 687b ldr r3, [r7, #4]
  4917. 8001a32: 60fb str r3, [r7, #12]
  4918. spixbase += 0x0C;
  4919. 8001a34: 68fb ldr r3, [r7, #12]
  4920. 8001a36: 330c adds r3, #12
  4921. 8001a38: 60fb str r3, [r7, #12]
  4922. return *(__IO uint8_t *) spixbase;
  4923. 8001a3a: 68fb ldr r3, [r7, #12]
  4924. 8001a3c: 781b ldrb r3, [r3, #0]
  4925. 8001a3e: b2db uxtb r3, r3
  4926. }
  4927. 8001a40: 1c18 adds r0, r3, #0
  4928. 8001a42: 46bd mov sp, r7
  4929. 8001a44: b004 add sp, #16
  4930. 8001a46: bd80 pop {r7, pc}
  4931. 08001a48 <SPI_I2S_ReceiveData16>:
  4932. * @note SPI2 is not available for STM32F031 devices.
  4933. * the SPI peripheral.
  4934. * @retval The value of the received data.
  4935. */
  4936. uint16_t SPI_I2S_ReceiveData16(SPI_TypeDef* SPIx)
  4937. {
  4938. 8001a48: b580 push {r7, lr}
  4939. 8001a4a: b082 sub sp, #8
  4940. 8001a4c: af00 add r7, sp, #0
  4941. 8001a4e: 6078 str r0, [r7, #4]
  4942. return SPIx->DR;
  4943. 8001a50: 687b ldr r3, [r7, #4]
  4944. 8001a52: 899b ldrh r3, [r3, #12]
  4945. 8001a54: b29b uxth r3, r3
  4946. }
  4947. 8001a56: 1c18 adds r0, r3, #0
  4948. 8001a58: 46bd mov sp, r7
  4949. 8001a5a: b002 add sp, #8
  4950. 8001a5c: bd80 pop {r7, pc}
  4951. 8001a5e: 46c0 nop ; (mov r8, r8)
  4952. 08001a60 <SPI_CRCLengthConfig>:
  4953. * @arg SPI_CRCLength_8b: Set CRC Calculation to 8 bits
  4954. * @arg SPI_CRCLength_16b: Set CRC Calculation to 16 bits
  4955. * @retval None
  4956. */
  4957. void SPI_CRCLengthConfig(SPI_TypeDef* SPIx, uint16_t SPI_CRCLength)
  4958. {
  4959. 8001a60: b580 push {r7, lr}
  4960. 8001a62: b082 sub sp, #8
  4961. 8001a64: af00 add r7, sp, #0
  4962. 8001a66: 6078 str r0, [r7, #4]
  4963. 8001a68: 1c0a adds r2, r1, #0
  4964. 8001a6a: 1cbb adds r3, r7, #2
  4965. 8001a6c: 801a strh r2, [r3, #0]
  4966. /* Check the parameters */
  4967. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  4968. assert_param(IS_SPI_CRC_LENGTH(SPI_CRCLength));
  4969. /* Clear CRCL bit */
  4970. SPIx->CR1 &= (uint16_t)~((uint16_t)SPI_CR1_CRCL);
  4971. 8001a6e: 687b ldr r3, [r7, #4]
  4972. 8001a70: 881b ldrh r3, [r3, #0]
  4973. 8001a72: b29b uxth r3, r3
  4974. 8001a74: 4a08 ldr r2, [pc, #32] ; (8001a98 <SPI_CRCLengthConfig+0x38>)
  4975. 8001a76: 4013 ands r3, r2
  4976. 8001a78: b29a uxth r2, r3
  4977. 8001a7a: 687b ldr r3, [r7, #4]
  4978. 8001a7c: 801a strh r2, [r3, #0]
  4979. /* Set new CRCL bit value */
  4980. SPIx->CR1 |= SPI_CRCLength;
  4981. 8001a7e: 687b ldr r3, [r7, #4]
  4982. 8001a80: 881b ldrh r3, [r3, #0]
  4983. 8001a82: b29a uxth r2, r3
  4984. 8001a84: 1cbb adds r3, r7, #2
  4985. 8001a86: 881b ldrh r3, [r3, #0]
  4986. 8001a88: 4313 orrs r3, r2
  4987. 8001a8a: b29a uxth r2, r3
  4988. 8001a8c: 687b ldr r3, [r7, #4]
  4989. 8001a8e: 801a strh r2, [r3, #0]
  4990. }
  4991. 8001a90: 46bd mov sp, r7
  4992. 8001a92: b002 add sp, #8
  4993. 8001a94: bd80 pop {r7, pc}
  4994. 8001a96: 46c0 nop ; (mov r8, r8)
  4995. 8001a98: fffff7ff .word 0xfffff7ff
  4996. 08001a9c <SPI_CalculateCRC>:
  4997. * @param NewState: new state of the SPIx CRC value calculation.
  4998. * This parameter can be: ENABLE or DISABLE.
  4999. * @retval None
  5000. */
  5001. void SPI_CalculateCRC(SPI_TypeDef* SPIx, FunctionalState NewState)
  5002. {
  5003. 8001a9c: b580 push {r7, lr}
  5004. 8001a9e: b082 sub sp, #8
  5005. 8001aa0: af00 add r7, sp, #0
  5006. 8001aa2: 6078 str r0, [r7, #4]
  5007. 8001aa4: 1c0a adds r2, r1, #0
  5008. 8001aa6: 1cfb adds r3, r7, #3
  5009. 8001aa8: 701a strb r2, [r3, #0]
  5010. /* Check the parameters */
  5011. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  5012. assert_param(IS_FUNCTIONAL_STATE(NewState));
  5013. if (NewState != DISABLE)
  5014. 8001aaa: 1cfb adds r3, r7, #3
  5015. 8001aac: 781b ldrb r3, [r3, #0]
  5016. 8001aae: 2b00 cmp r3, #0
  5017. 8001ab0: d009 beq.n 8001ac6 <SPI_CalculateCRC+0x2a>
  5018. {
  5019. /* Enable the selected SPI CRC calculation */
  5020. SPIx->CR1 |= SPI_CR1_CRCEN;
  5021. 8001ab2: 687b ldr r3, [r7, #4]
  5022. 8001ab4: 881b ldrh r3, [r3, #0]
  5023. 8001ab6: b29b uxth r3, r3
  5024. 8001ab8: 2280 movs r2, #128 ; 0x80
  5025. 8001aba: 0192 lsls r2, r2, #6
  5026. 8001abc: 4313 orrs r3, r2
  5027. 8001abe: b29a uxth r2, r3
  5028. 8001ac0: 687b ldr r3, [r7, #4]
  5029. 8001ac2: 801a strh r2, [r3, #0]
  5030. 8001ac4: e007 b.n 8001ad6 <SPI_CalculateCRC+0x3a>
  5031. }
  5032. else
  5033. {
  5034. /* Disable the selected SPI CRC calculation */
  5035. SPIx->CR1 &= (uint16_t)~((uint16_t)SPI_CR1_CRCEN);
  5036. 8001ac6: 687b ldr r3, [r7, #4]
  5037. 8001ac8: 881b ldrh r3, [r3, #0]
  5038. 8001aca: b29b uxth r3, r3
  5039. 8001acc: 4a03 ldr r2, [pc, #12] ; (8001adc <SPI_CalculateCRC+0x40>)
  5040. 8001ace: 4013 ands r3, r2
  5041. 8001ad0: b29a uxth r2, r3
  5042. 8001ad2: 687b ldr r3, [r7, #4]
  5043. 8001ad4: 801a strh r2, [r3, #0]
  5044. }
  5045. }
  5046. 8001ad6: 46bd mov sp, r7
  5047. 8001ad8: b002 add sp, #8
  5048. 8001ada: bd80 pop {r7, pc}
  5049. 8001adc: ffffdfff .word 0xffffdfff
  5050. 08001ae0 <SPI_TransmitCRC>:
  5051. * @param SPIx: where x can be 1 or 2 to select the SPI peripheral.
  5052. * @note SPI2 is not available for STM32F031 devices.
  5053. * @retval None
  5054. */
  5055. void SPI_TransmitCRC(SPI_TypeDef* SPIx)
  5056. {
  5057. 8001ae0: b580 push {r7, lr}
  5058. 8001ae2: b082 sub sp, #8
  5059. 8001ae4: af00 add r7, sp, #0
  5060. 8001ae6: 6078 str r0, [r7, #4]
  5061. /* Check the parameters */
  5062. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  5063. /* Enable the selected SPI CRC transmission */
  5064. SPIx->CR1 |= SPI_CR1_CRCNEXT;
  5065. 8001ae8: 687b ldr r3, [r7, #4]
  5066. 8001aea: 881b ldrh r3, [r3, #0]
  5067. 8001aec: b29b uxth r3, r3
  5068. 8001aee: 2280 movs r2, #128 ; 0x80
  5069. 8001af0: 0152 lsls r2, r2, #5
  5070. 8001af2: 4313 orrs r3, r2
  5071. 8001af4: b29a uxth r2, r3
  5072. 8001af6: 687b ldr r3, [r7, #4]
  5073. 8001af8: 801a strh r2, [r3, #0]
  5074. }
  5075. 8001afa: 46bd mov sp, r7
  5076. 8001afc: b002 add sp, #8
  5077. 8001afe: bd80 pop {r7, pc}
  5078. 08001b00 <SPI_GetCRC>:
  5079. * @arg SPI_CRC_Tx: Selects Tx CRC register
  5080. * @arg SPI_CRC_Rx: Selects Rx CRC register
  5081. * @retval The selected CRC register value..
  5082. */
  5083. uint16_t SPI_GetCRC(SPI_TypeDef* SPIx, uint8_t SPI_CRC)
  5084. {
  5085. 8001b00: b580 push {r7, lr}
  5086. 8001b02: b084 sub sp, #16
  5087. 8001b04: af00 add r7, sp, #0
  5088. 8001b06: 6078 str r0, [r7, #4]
  5089. 8001b08: 1c0a adds r2, r1, #0
  5090. 8001b0a: 1cfb adds r3, r7, #3
  5091. 8001b0c: 701a strb r2, [r3, #0]
  5092. uint16_t crcreg = 0;
  5093. 8001b0e: 230e movs r3, #14
  5094. 8001b10: 18fb adds r3, r7, r3
  5095. 8001b12: 2200 movs r2, #0
  5096. 8001b14: 801a strh r2, [r3, #0]
  5097. /* Check the parameters */
  5098. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  5099. assert_param(IS_SPI_CRC(SPI_CRC));
  5100. if (SPI_CRC != SPI_CRC_Rx)
  5101. 8001b16: 1cfb adds r3, r7, #3
  5102. 8001b18: 781b ldrb r3, [r3, #0]
  5103. 8001b1a: 2b01 cmp r3, #1
  5104. 8001b1c: d005 beq.n 8001b2a <SPI_GetCRC+0x2a>
  5105. {
  5106. /* Get the Tx CRC register */
  5107. crcreg = SPIx->TXCRCR;
  5108. 8001b1e: 230e movs r3, #14
  5109. 8001b20: 18fb adds r3, r7, r3
  5110. 8001b22: 687a ldr r2, [r7, #4]
  5111. 8001b24: 8b12 ldrh r2, [r2, #24]
  5112. 8001b26: 801a strh r2, [r3, #0]
  5113. 8001b28: e004 b.n 8001b34 <SPI_GetCRC+0x34>
  5114. }
  5115. else
  5116. {
  5117. /* Get the Rx CRC register */
  5118. crcreg = SPIx->RXCRCR;
  5119. 8001b2a: 230e movs r3, #14
  5120. 8001b2c: 18fb adds r3, r7, r3
  5121. 8001b2e: 687a ldr r2, [r7, #4]
  5122. 8001b30: 8a92 ldrh r2, [r2, #20]
  5123. 8001b32: 801a strh r2, [r3, #0]
  5124. }
  5125. /* Return the selected CRC register */
  5126. return crcreg;
  5127. 8001b34: 230e movs r3, #14
  5128. 8001b36: 18fb adds r3, r7, r3
  5129. 8001b38: 881b ldrh r3, [r3, #0]
  5130. }
  5131. 8001b3a: 1c18 adds r0, r3, #0
  5132. 8001b3c: 46bd mov sp, r7
  5133. 8001b3e: b004 add sp, #16
  5134. 8001b40: bd80 pop {r7, pc}
  5135. 8001b42: 46c0 nop ; (mov r8, r8)
  5136. 08001b44 <SPI_GetCRCPolynomial>:
  5137. * @param SPIx: where x can be 1 or 2 to select the SPI peripheral.
  5138. * @note SPI2 is not available for STM32F031 devices.
  5139. * @retval The CRC Polynomial register value.
  5140. */
  5141. uint16_t SPI_GetCRCPolynomial(SPI_TypeDef* SPIx)
  5142. {
  5143. 8001b44: b580 push {r7, lr}
  5144. 8001b46: b082 sub sp, #8
  5145. 8001b48: af00 add r7, sp, #0
  5146. 8001b4a: 6078 str r0, [r7, #4]
  5147. /* Check the parameters */
  5148. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  5149. /* Return the CRC polynomial register */
  5150. return SPIx->CRCPR;
  5151. 8001b4c: 687b ldr r3, [r7, #4]
  5152. 8001b4e: 8a1b ldrh r3, [r3, #16]
  5153. 8001b50: b29b uxth r3, r3
  5154. }
  5155. 8001b52: 1c18 adds r0, r3, #0
  5156. 8001b54: 46bd mov sp, r7
  5157. 8001b56: b002 add sp, #8
  5158. 8001b58: bd80 pop {r7, pc}
  5159. 8001b5a: 46c0 nop ; (mov r8, r8)
  5160. 08001b5c <SPI_I2S_DMACmd>:
  5161. * @param NewState: new state of the selected SPI DMA transfer request.
  5162. * This parameter can be: ENABLE or DISABLE.
  5163. * @retval None
  5164. */
  5165. void SPI_I2S_DMACmd(SPI_TypeDef* SPIx, uint16_t SPI_I2S_DMAReq, FunctionalState NewState)
  5166. {
  5167. 8001b5c: b580 push {r7, lr}
  5168. 8001b5e: b082 sub sp, #8
  5169. 8001b60: af00 add r7, sp, #0
  5170. 8001b62: 6078 str r0, [r7, #4]
  5171. 8001b64: 1c08 adds r0, r1, #0
  5172. 8001b66: 1c11 adds r1, r2, #0
  5173. 8001b68: 1cbb adds r3, r7, #2
  5174. 8001b6a: 1c02 adds r2, r0, #0
  5175. 8001b6c: 801a strh r2, [r3, #0]
  5176. 8001b6e: 1c7b adds r3, r7, #1
  5177. 8001b70: 1c0a adds r2, r1, #0
  5178. 8001b72: 701a strb r2, [r3, #0]
  5179. /* Check the parameters */
  5180. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  5181. assert_param(IS_FUNCTIONAL_STATE(NewState));
  5182. assert_param(IS_SPI_I2S_DMA_REQ(SPI_I2S_DMAReq));
  5183. if (NewState != DISABLE)
  5184. 8001b74: 1c7b adds r3, r7, #1
  5185. 8001b76: 781b ldrb r3, [r3, #0]
  5186. 8001b78: 2b00 cmp r3, #0
  5187. 8001b7a: d009 beq.n 8001b90 <SPI_I2S_DMACmd+0x34>
  5188. {
  5189. /* Enable the selected SPI DMA requests */
  5190. SPIx->CR2 |= SPI_I2S_DMAReq;
  5191. 8001b7c: 687b ldr r3, [r7, #4]
  5192. 8001b7e: 889b ldrh r3, [r3, #4]
  5193. 8001b80: b29a uxth r2, r3
  5194. 8001b82: 1cbb adds r3, r7, #2
  5195. 8001b84: 881b ldrh r3, [r3, #0]
  5196. 8001b86: 4313 orrs r3, r2
  5197. 8001b88: b29a uxth r2, r3
  5198. 8001b8a: 687b ldr r3, [r7, #4]
  5199. 8001b8c: 809a strh r2, [r3, #4]
  5200. 8001b8e: e00a b.n 8001ba6 <SPI_I2S_DMACmd+0x4a>
  5201. }
  5202. else
  5203. {
  5204. /* Disable the selected SPI DMA requests */
  5205. SPIx->CR2 &= (uint16_t)~SPI_I2S_DMAReq;
  5206. 8001b90: 687b ldr r3, [r7, #4]
  5207. 8001b92: 889b ldrh r3, [r3, #4]
  5208. 8001b94: b29b uxth r3, r3
  5209. 8001b96: 1cba adds r2, r7, #2
  5210. 8001b98: 8812 ldrh r2, [r2, #0]
  5211. 8001b9a: 43d2 mvns r2, r2
  5212. 8001b9c: b292 uxth r2, r2
  5213. 8001b9e: 4013 ands r3, r2
  5214. 8001ba0: b29a uxth r2, r3
  5215. 8001ba2: 687b ldr r3, [r7, #4]
  5216. 8001ba4: 809a strh r2, [r3, #4]
  5217. }
  5218. }
  5219. 8001ba6: 46bd mov sp, r7
  5220. 8001ba8: b002 add sp, #8
  5221. 8001baa: bd80 pop {r7, pc}
  5222. 08001bac <SPI_LastDMATransferCmd>:
  5223. * @arg SPI_LastDMATransfer_TxOddRxOdd: Number of data for transmission Odd
  5224. * and number of data for reception Odd.
  5225. * @retval None
  5226. */
  5227. void SPI_LastDMATransferCmd(SPI_TypeDef* SPIx, uint16_t SPI_LastDMATransfer)
  5228. {
  5229. 8001bac: b580 push {r7, lr}
  5230. 8001bae: b082 sub sp, #8
  5231. 8001bb0: af00 add r7, sp, #0
  5232. 8001bb2: 6078 str r0, [r7, #4]
  5233. 8001bb4: 1c0a adds r2, r1, #0
  5234. 8001bb6: 1cbb adds r3, r7, #2
  5235. 8001bb8: 801a strh r2, [r3, #0]
  5236. /* Check the parameters */
  5237. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  5238. assert_param(IS_SPI_LAST_DMA_TRANSFER(SPI_LastDMATransfer));
  5239. /* Clear LDMA_TX and LDMA_RX bits */
  5240. SPIx->CR2 &= CR2_LDMA_MASK;
  5241. 8001bba: 687b ldr r3, [r7, #4]
  5242. 8001bbc: 889b ldrh r3, [r3, #4]
  5243. 8001bbe: b29b uxth r3, r3
  5244. 8001bc0: 4a08 ldr r2, [pc, #32] ; (8001be4 <SPI_LastDMATransferCmd+0x38>)
  5245. 8001bc2: 4013 ands r3, r2
  5246. 8001bc4: b29a uxth r2, r3
  5247. 8001bc6: 687b ldr r3, [r7, #4]
  5248. 8001bc8: 809a strh r2, [r3, #4]
  5249. /* Set new LDMA_TX and LDMA_RX bits value */
  5250. SPIx->CR2 |= SPI_LastDMATransfer;
  5251. 8001bca: 687b ldr r3, [r7, #4]
  5252. 8001bcc: 889b ldrh r3, [r3, #4]
  5253. 8001bce: b29a uxth r2, r3
  5254. 8001bd0: 1cbb adds r3, r7, #2
  5255. 8001bd2: 881b ldrh r3, [r3, #0]
  5256. 8001bd4: 4313 orrs r3, r2
  5257. 8001bd6: b29a uxth r2, r3
  5258. 8001bd8: 687b ldr r3, [r7, #4]
  5259. 8001bda: 809a strh r2, [r3, #4]
  5260. }
  5261. 8001bdc: 46bd mov sp, r7
  5262. 8001bde: b002 add sp, #8
  5263. 8001be0: bd80 pop {r7, pc}
  5264. 8001be2: 46c0 nop ; (mov r8, r8)
  5265. 8001be4: ffff9fff .word 0xffff9fff
  5266. 08001be8 <SPI_I2S_ITConfig>:
  5267. * @param NewState: new state of the specified SPI interrupt.
  5268. * This parameter can be: ENABLE or DISABLE.
  5269. * @retval None
  5270. */
  5271. void SPI_I2S_ITConfig(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT, FunctionalState NewState)
  5272. {
  5273. 8001be8: b580 push {r7, lr}
  5274. 8001bea: b084 sub sp, #16
  5275. 8001bec: af00 add r7, sp, #0
  5276. 8001bee: 6078 str r0, [r7, #4]
  5277. 8001bf0: 1c08 adds r0, r1, #0
  5278. 8001bf2: 1c11 adds r1, r2, #0
  5279. 8001bf4: 1cfb adds r3, r7, #3
  5280. 8001bf6: 1c02 adds r2, r0, #0
  5281. 8001bf8: 701a strb r2, [r3, #0]
  5282. 8001bfa: 1cbb adds r3, r7, #2
  5283. 8001bfc: 1c0a adds r2, r1, #0
  5284. 8001bfe: 701a strb r2, [r3, #0]
  5285. uint16_t itpos = 0, itmask = 0 ;
  5286. 8001c00: 230e movs r3, #14
  5287. 8001c02: 18fb adds r3, r7, r3
  5288. 8001c04: 2200 movs r2, #0
  5289. 8001c06: 801a strh r2, [r3, #0]
  5290. 8001c08: 230c movs r3, #12
  5291. 8001c0a: 18fb adds r3, r7, r3
  5292. 8001c0c: 2200 movs r2, #0
  5293. 8001c0e: 801a strh r2, [r3, #0]
  5294. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  5295. assert_param(IS_FUNCTIONAL_STATE(NewState));
  5296. assert_param(IS_SPI_I2S_CONFIG_IT(SPI_I2S_IT));
  5297. /* Get the SPI IT index */
  5298. itpos = SPI_I2S_IT >> 4;
  5299. 8001c10: 1cfb adds r3, r7, #3
  5300. 8001c12: 781b ldrb r3, [r3, #0]
  5301. 8001c14: 091b lsrs r3, r3, #4
  5302. 8001c16: b2da uxtb r2, r3
  5303. 8001c18: 230e movs r3, #14
  5304. 8001c1a: 18fb adds r3, r7, r3
  5305. 8001c1c: 801a strh r2, [r3, #0]
  5306. /* Set the IT mask */
  5307. itmask = (uint16_t)1 << (uint16_t)itpos;
  5308. 8001c1e: 230e movs r3, #14
  5309. 8001c20: 18fb adds r3, r7, r3
  5310. 8001c22: 881b ldrh r3, [r3, #0]
  5311. 8001c24: 2201 movs r2, #1
  5312. 8001c26: 409a lsls r2, r3
  5313. 8001c28: 230c movs r3, #12
  5314. 8001c2a: 18fb adds r3, r7, r3
  5315. 8001c2c: 801a strh r2, [r3, #0]
  5316. if (NewState != DISABLE)
  5317. 8001c2e: 1cbb adds r3, r7, #2
  5318. 8001c30: 781b ldrb r3, [r3, #0]
  5319. 8001c32: 2b00 cmp r3, #0
  5320. 8001c34: d00a beq.n 8001c4c <SPI_I2S_ITConfig+0x64>
  5321. {
  5322. /* Enable the selected SPI interrupt */
  5323. SPIx->CR2 |= itmask;
  5324. 8001c36: 687b ldr r3, [r7, #4]
  5325. 8001c38: 889b ldrh r3, [r3, #4]
  5326. 8001c3a: b29a uxth r2, r3
  5327. 8001c3c: 230c movs r3, #12
  5328. 8001c3e: 18fb adds r3, r7, r3
  5329. 8001c40: 881b ldrh r3, [r3, #0]
  5330. 8001c42: 4313 orrs r3, r2
  5331. 8001c44: b29a uxth r2, r3
  5332. 8001c46: 687b ldr r3, [r7, #4]
  5333. 8001c48: 809a strh r2, [r3, #4]
  5334. 8001c4a: e00b b.n 8001c64 <SPI_I2S_ITConfig+0x7c>
  5335. }
  5336. else
  5337. {
  5338. /* Disable the selected SPI interrupt */
  5339. SPIx->CR2 &= (uint16_t)~itmask;
  5340. 8001c4c: 687b ldr r3, [r7, #4]
  5341. 8001c4e: 889b ldrh r3, [r3, #4]
  5342. 8001c50: b29b uxth r3, r3
  5343. 8001c52: 220c movs r2, #12
  5344. 8001c54: 18ba adds r2, r7, r2
  5345. 8001c56: 8812 ldrh r2, [r2, #0]
  5346. 8001c58: 43d2 mvns r2, r2
  5347. 8001c5a: b292 uxth r2, r2
  5348. 8001c5c: 4013 ands r3, r2
  5349. 8001c5e: b29a uxth r2, r3
  5350. 8001c60: 687b ldr r3, [r7, #4]
  5351. 8001c62: 809a strh r2, [r3, #4]
  5352. }
  5353. }
  5354. 8001c64: 46bd mov sp, r7
  5355. 8001c66: b004 add sp, #16
  5356. 8001c68: bd80 pop {r7, pc}
  5357. 8001c6a: 46c0 nop ; (mov r8, r8)
  5358. 08001c6c <SPI_GetTransmissionFIFOStatus>:
  5359. * - SPI_TransmissionFIFOStatus_1QuarterFull: if more than 1 quarter-full.
  5360. * - SPI_TransmissionFIFOStatus_HalfFull: if more than 1 half-full.
  5361. * - SPI_TransmissionFIFOStatus_Full: when FIFO is full.
  5362. */
  5363. uint16_t SPI_GetTransmissionFIFOStatus(SPI_TypeDef* SPIx)
  5364. {
  5365. 8001c6c: b580 push {r7, lr}
  5366. 8001c6e: b082 sub sp, #8
  5367. 8001c70: af00 add r7, sp, #0
  5368. 8001c72: 6078 str r0, [r7, #4]
  5369. /* Get the SPIx Transmission FIFO level bits */
  5370. return (uint16_t)((SPIx->SR & SPI_SR_FTLVL));
  5371. 8001c74: 687b ldr r3, [r7, #4]
  5372. 8001c76: 891b ldrh r3, [r3, #8]
  5373. 8001c78: b29a uxth r2, r3
  5374. 8001c7a: 23c0 movs r3, #192 ; 0xc0
  5375. 8001c7c: 015b lsls r3, r3, #5
  5376. 8001c7e: 4013 ands r3, r2
  5377. 8001c80: b29b uxth r3, r3
  5378. }
  5379. 8001c82: 1c18 adds r0, r3, #0
  5380. 8001c84: 46bd mov sp, r7
  5381. 8001c86: b002 add sp, #8
  5382. 8001c88: bd80 pop {r7, pc}
  5383. 8001c8a: 46c0 nop ; (mov r8, r8)
  5384. 08001c8c <SPI_GetReceptionFIFOStatus>:
  5385. * - SPI_ReceptionFIFOStatus_1QuarterFull: if more than 1 quarter-full.
  5386. * - SPI_ReceptionFIFOStatus_HalfFull: if more than 1 half-full.
  5387. * - SPI_ReceptionFIFOStatus_Full: when FIFO is full.
  5388. */
  5389. uint16_t SPI_GetReceptionFIFOStatus(SPI_TypeDef* SPIx)
  5390. {
  5391. 8001c8c: b580 push {r7, lr}
  5392. 8001c8e: b082 sub sp, #8
  5393. 8001c90: af00 add r7, sp, #0
  5394. 8001c92: 6078 str r0, [r7, #4]
  5395. /* Get the SPIx Reception FIFO level bits */
  5396. return (uint16_t)((SPIx->SR & SPI_SR_FRLVL));
  5397. 8001c94: 687b ldr r3, [r7, #4]
  5398. 8001c96: 891b ldrh r3, [r3, #8]
  5399. 8001c98: b29a uxth r2, r3
  5400. 8001c9a: 23c0 movs r3, #192 ; 0xc0
  5401. 8001c9c: 00db lsls r3, r3, #3
  5402. 8001c9e: 4013 ands r3, r2
  5403. 8001ca0: b29b uxth r3, r3
  5404. }
  5405. 8001ca2: 1c18 adds r0, r3, #0
  5406. 8001ca4: 46bd mov sp, r7
  5407. 8001ca6: b002 add sp, #8
  5408. 8001ca8: bd80 pop {r7, pc}
  5409. 8001caa: 46c0 nop ; (mov r8, r8)
  5410. 08001cac <SPI_I2S_GetFlagStatus>:
  5411. * @arg I2S_FLAG_UDR: Underrun Error flag.
  5412. * @arg I2S_FLAG_CHSIDE: Channel Side flag.
  5413. * @retval The new state of SPI_I2S_FLAG (SET or RESET).
  5414. */
  5415. FlagStatus SPI_I2S_GetFlagStatus(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG)
  5416. {
  5417. 8001cac: b580 push {r7, lr}
  5418. 8001cae: b084 sub sp, #16
  5419. 8001cb0: af00 add r7, sp, #0
  5420. 8001cb2: 6078 str r0, [r7, #4]
  5421. 8001cb4: 1c0a adds r2, r1, #0
  5422. 8001cb6: 1cbb adds r3, r7, #2
  5423. 8001cb8: 801a strh r2, [r3, #0]
  5424. FlagStatus bitstatus = RESET;
  5425. 8001cba: 230f movs r3, #15
  5426. 8001cbc: 18fb adds r3, r7, r3
  5427. 8001cbe: 2200 movs r2, #0
  5428. 8001cc0: 701a strb r2, [r3, #0]
  5429. /* Check the parameters */
  5430. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  5431. assert_param(IS_SPI_I2S_GET_FLAG(SPI_I2S_FLAG));
  5432. /* Check the status of the specified SPI flag */
  5433. if ((SPIx->SR & SPI_I2S_FLAG) != (uint16_t)RESET)
  5434. 8001cc2: 687b ldr r3, [r7, #4]
  5435. 8001cc4: 891b ldrh r3, [r3, #8]
  5436. 8001cc6: b29b uxth r3, r3
  5437. 8001cc8: 1cba adds r2, r7, #2
  5438. 8001cca: 8812 ldrh r2, [r2, #0]
  5439. 8001ccc: 4013 ands r3, r2
  5440. 8001cce: b29b uxth r3, r3
  5441. 8001cd0: 2b00 cmp r3, #0
  5442. 8001cd2: d004 beq.n 8001cde <SPI_I2S_GetFlagStatus+0x32>
  5443. {
  5444. /* SPI_I2S_FLAG is set */
  5445. bitstatus = SET;
  5446. 8001cd4: 230f movs r3, #15
  5447. 8001cd6: 18fb adds r3, r7, r3
  5448. 8001cd8: 2201 movs r2, #1
  5449. 8001cda: 701a strb r2, [r3, #0]
  5450. 8001cdc: e003 b.n 8001ce6 <SPI_I2S_GetFlagStatus+0x3a>
  5451. }
  5452. else
  5453. {
  5454. /* SPI_I2S_FLAG is reset */
  5455. bitstatus = RESET;
  5456. 8001cde: 230f movs r3, #15
  5457. 8001ce0: 18fb adds r3, r7, r3
  5458. 8001ce2: 2200 movs r2, #0
  5459. 8001ce4: 701a strb r2, [r3, #0]
  5460. }
  5461. /* Return the SPI_I2S_FLAG status */
  5462. return bitstatus;
  5463. 8001ce6: 230f movs r3, #15
  5464. 8001ce8: 18fb adds r3, r7, r3
  5465. 8001cea: 781b ldrb r3, [r3, #0]
  5466. }
  5467. 8001cec: 1c18 adds r0, r3, #0
  5468. 8001cee: 46bd mov sp, r7
  5469. 8001cf0: b004 add sp, #16
  5470. 8001cf2: bd80 pop {r7, pc}
  5471. 08001cf4 <SPI_I2S_ClearFlag>:
  5472. * operation to SPI_SR register (SPI_I2S_GetFlagStatus()) followed by
  5473. * a write operation to SPI_CR1 register (SPI_Cmd() to enable the SPI).
  5474. * @retval None
  5475. */
  5476. void SPI_I2S_ClearFlag(SPI_TypeDef* SPIx, uint16_t SPI_I2S_FLAG)
  5477. {
  5478. 8001cf4: b580 push {r7, lr}
  5479. 8001cf6: b082 sub sp, #8
  5480. 8001cf8: af00 add r7, sp, #0
  5481. 8001cfa: 6078 str r0, [r7, #4]
  5482. 8001cfc: 1c0a adds r2, r1, #0
  5483. 8001cfe: 1cbb adds r3, r7, #2
  5484. 8001d00: 801a strh r2, [r3, #0]
  5485. /* Check the parameters */
  5486. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  5487. assert_param(IS_SPI_CLEAR_FLAG(SPI_I2S_FLAG));
  5488. /* Clear the selected SPI CRC Error (CRCERR) flag */
  5489. SPIx->SR = (uint16_t)~SPI_I2S_FLAG;
  5490. 8001d02: 1cbb adds r3, r7, #2
  5491. 8001d04: 881b ldrh r3, [r3, #0]
  5492. 8001d06: 43db mvns r3, r3
  5493. 8001d08: b29a uxth r2, r3
  5494. 8001d0a: 687b ldr r3, [r7, #4]
  5495. 8001d0c: 811a strh r2, [r3, #8]
  5496. }
  5497. 8001d0e: 46bd mov sp, r7
  5498. 8001d10: b002 add sp, #8
  5499. 8001d12: bd80 pop {r7, pc}
  5500. 08001d14 <SPI_I2S_GetITStatus>:
  5501. * @arg I2S_IT_UDR: Underrun interrupt.
  5502. * @arg SPI_I2S_IT_FRE: Format Error interrupt.
  5503. * @retval The new state of SPI_I2S_IT (SET or RESET).
  5504. */
  5505. ITStatus SPI_I2S_GetITStatus(SPI_TypeDef* SPIx, uint8_t SPI_I2S_IT)
  5506. {
  5507. 8001d14: b580 push {r7, lr}
  5508. 8001d16: b084 sub sp, #16
  5509. 8001d18: af00 add r7, sp, #0
  5510. 8001d1a: 6078 str r0, [r7, #4]
  5511. 8001d1c: 1c0a adds r2, r1, #0
  5512. 8001d1e: 1cfb adds r3, r7, #3
  5513. 8001d20: 701a strb r2, [r3, #0]
  5514. ITStatus bitstatus = RESET;
  5515. 8001d22: 230f movs r3, #15
  5516. 8001d24: 18fb adds r3, r7, r3
  5517. 8001d26: 2200 movs r2, #0
  5518. 8001d28: 701a strb r2, [r3, #0]
  5519. uint16_t itpos = 0, itmask = 0, enablestatus = 0;
  5520. 8001d2a: 230c movs r3, #12
  5521. 8001d2c: 18fb adds r3, r7, r3
  5522. 8001d2e: 2200 movs r2, #0
  5523. 8001d30: 801a strh r2, [r3, #0]
  5524. 8001d32: 230a movs r3, #10
  5525. 8001d34: 18fb adds r3, r7, r3
  5526. 8001d36: 2200 movs r2, #0
  5527. 8001d38: 801a strh r2, [r3, #0]
  5528. 8001d3a: 2308 movs r3, #8
  5529. 8001d3c: 18fb adds r3, r7, r3
  5530. 8001d3e: 2200 movs r2, #0
  5531. 8001d40: 801a strh r2, [r3, #0]
  5532. /* Check the parameters */
  5533. assert_param(IS_SPI_ALL_PERIPH(SPIx));
  5534. assert_param(IS_SPI_I2S_GET_IT(SPI_I2S_IT));
  5535. /* Get the SPI_I2S_IT index */
  5536. itpos = 0x01 << (SPI_I2S_IT & 0x0F);
  5537. 8001d42: 1cfb adds r3, r7, #3
  5538. 8001d44: 781b ldrb r3, [r3, #0]
  5539. 8001d46: 220f movs r2, #15
  5540. 8001d48: 4013 ands r3, r2
  5541. 8001d4a: 2201 movs r2, #1
  5542. 8001d4c: 409a lsls r2, r3
  5543. 8001d4e: 230c movs r3, #12
  5544. 8001d50: 18fb adds r3, r7, r3
  5545. 8001d52: 801a strh r2, [r3, #0]
  5546. /* Get the SPI_I2S_IT IT mask */
  5547. itmask = SPI_I2S_IT >> 4;
  5548. 8001d54: 1cfb adds r3, r7, #3
  5549. 8001d56: 781b ldrb r3, [r3, #0]
  5550. 8001d58: 091b lsrs r3, r3, #4
  5551. 8001d5a: b2da uxtb r2, r3
  5552. 8001d5c: 230a movs r3, #10
  5553. 8001d5e: 18fb adds r3, r7, r3
  5554. 8001d60: 801a strh r2, [r3, #0]
  5555. /* Set the IT mask */
  5556. itmask = 0x01 << itmask;
  5557. 8001d62: 230a movs r3, #10
  5558. 8001d64: 18fb adds r3, r7, r3
  5559. 8001d66: 881b ldrh r3, [r3, #0]
  5560. 8001d68: 2201 movs r2, #1
  5561. 8001d6a: 409a lsls r2, r3
  5562. 8001d6c: 230a movs r3, #10
  5563. 8001d6e: 18fb adds r3, r7, r3
  5564. 8001d70: 801a strh r2, [r3, #0]
  5565. /* Get the SPI_I2S_IT enable bit status */
  5566. enablestatus = (SPIx->CR2 & itmask) ;
  5567. 8001d72: 687b ldr r3, [r7, #4]
  5568. 8001d74: 889b ldrh r3, [r3, #4]
  5569. 8001d76: b29a uxth r2, r3
  5570. 8001d78: 2308 movs r3, #8
  5571. 8001d7a: 18fb adds r3, r7, r3
  5572. 8001d7c: 210a movs r1, #10
  5573. 8001d7e: 1879 adds r1, r7, r1
  5574. 8001d80: 8809 ldrh r1, [r1, #0]
  5575. 8001d82: 400a ands r2, r1
  5576. 8001d84: 801a strh r2, [r3, #0]
  5577. /* Check the status of the specified SPI interrupt */
  5578. if (((SPIx->SR & itpos) != (uint16_t)RESET) && enablestatus)
  5579. 8001d86: 687b ldr r3, [r7, #4]
  5580. 8001d88: 891b ldrh r3, [r3, #8]
  5581. 8001d8a: b29b uxth r3, r3
  5582. 8001d8c: 220c movs r2, #12
  5583. 8001d8e: 18ba adds r2, r7, r2
  5584. 8001d90: 8812 ldrh r2, [r2, #0]
  5585. 8001d92: 4013 ands r3, r2
  5586. 8001d94: b29b uxth r3, r3
  5587. 8001d96: 2b00 cmp r3, #0
  5588. 8001d98: d009 beq.n 8001dae <SPI_I2S_GetITStatus+0x9a>
  5589. 8001d9a: 2308 movs r3, #8
  5590. 8001d9c: 18fb adds r3, r7, r3
  5591. 8001d9e: 881b ldrh r3, [r3, #0]
  5592. 8001da0: 2b00 cmp r3, #0
  5593. 8001da2: d004 beq.n 8001dae <SPI_I2S_GetITStatus+0x9a>
  5594. {
  5595. /* SPI_I2S_IT is set */
  5596. bitstatus = SET;
  5597. 8001da4: 230f movs r3, #15
  5598. 8001da6: 18fb adds r3, r7, r3
  5599. 8001da8: 2201 movs r2, #1
  5600. 8001daa: 701a strb r2, [r3, #0]
  5601. 8001dac: e003 b.n 8001db6 <SPI_I2S_GetITStatus+0xa2>
  5602. }
  5603. else
  5604. {
  5605. /* SPI_I2S_IT is reset */
  5606. bitstatus = RESET;
  5607. 8001dae: 230f movs r3, #15
  5608. 8001db0: 18fb adds r3, r7, r3
  5609. 8001db2: 2200 movs r2, #0
  5610. 8001db4: 701a strb r2, [r3, #0]
  5611. }
  5612. /* Return the SPI_I2S_IT status */
  5613. return bitstatus;
  5614. 8001db6: 230f movs r3, #15
  5615. 8001db8: 18fb adds r3, r7, r3
  5616. 8001dba: 781b ldrb r3, [r3, #0]
  5617. }
  5618. 8001dbc: 1c18 adds r0, r3, #0
  5619. 8001dbe: 46bd mov sp, r7
  5620. 8001dc0: b004 add sp, #16
  5621. 8001dc2: bd80 pop {r7, pc}
  5622. 08001dc4 <ADC_DeInit>:
  5623. * @brief Deinitializes ADC1 peripheral registers to their default reset values.
  5624. * @param ADCx: where x can be 1 to select the ADC peripheral.
  5625. * @retval None
  5626. */
  5627. void ADC_DeInit(ADC_TypeDef* ADCx)
  5628. {
  5629. 8001dc4: b580 push {r7, lr}
  5630. 8001dc6: b082 sub sp, #8
  5631. 8001dc8: af00 add r7, sp, #0
  5632. 8001dca: 6078 str r0, [r7, #4]
  5633. /* Check the parameters */
  5634. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  5635. if(ADCx == ADC1)
  5636. 8001dcc: 687b ldr r3, [r7, #4]
  5637. 8001dce: 4a09 ldr r2, [pc, #36] ; (8001df4 <ADC_DeInit+0x30>)
  5638. 8001dd0: 4293 cmp r3, r2
  5639. 8001dd2: d10b bne.n 8001dec <ADC_DeInit+0x28>
  5640. {
  5641. /* Enable ADC1 reset state */
  5642. RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC1, ENABLE);
  5643. 8001dd4: 2380 movs r3, #128 ; 0x80
  5644. 8001dd6: 009b lsls r3, r3, #2
  5645. 8001dd8: 1c18 adds r0, r3, #0
  5646. 8001dda: 2101 movs r1, #1
  5647. 8001ddc: f7fe ffd4 bl 8000d88 <RCC_APB2PeriphResetCmd>
  5648. /* Release ADC1 from reset state */
  5649. RCC_APB2PeriphResetCmd(RCC_APB2Periph_ADC1, DISABLE);
  5650. 8001de0: 2380 movs r3, #128 ; 0x80
  5651. 8001de2: 009b lsls r3, r3, #2
  5652. 8001de4: 1c18 adds r0, r3, #0
  5653. 8001de6: 2100 movs r1, #0
  5654. 8001de8: f7fe ffce bl 8000d88 <RCC_APB2PeriphResetCmd>
  5655. }
  5656. }
  5657. 8001dec: 46bd mov sp, r7
  5658. 8001dee: b002 add sp, #8
  5659. 8001df0: bd80 pop {r7, pc}
  5660. 8001df2: 46c0 nop ; (mov r8, r8)
  5661. 8001df4: 40012400 .word 0x40012400
  5662. 08001df8 <ADC_Init>:
  5663. * @param ADC_InitStruct: pointer to an ADC_InitTypeDef structure that contains
  5664. * the configuration information for the specified ADC peripheral.
  5665. * @retval None
  5666. */
  5667. void ADC_Init(ADC_TypeDef* ADCx, ADC_InitTypeDef* ADC_InitStruct)
  5668. {
  5669. 8001df8: b580 push {r7, lr}
  5670. 8001dfa: b084 sub sp, #16
  5671. 8001dfc: af00 add r7, sp, #0
  5672. 8001dfe: 6078 str r0, [r7, #4]
  5673. 8001e00: 6039 str r1, [r7, #0]
  5674. uint32_t tmpreg = 0;
  5675. 8001e02: 2300 movs r3, #0
  5676. 8001e04: 60fb str r3, [r7, #12]
  5677. assert_param(IS_ADC_EXTERNAL_TRIG_CONV(ADC_InitStruct->ADC_ExternalTrigConv));
  5678. assert_param(IS_ADC_DATA_ALIGN(ADC_InitStruct->ADC_DataAlign));
  5679. assert_param(IS_ADC_SCAN_DIRECTION(ADC_InitStruct->ADC_ScanDirection));
  5680. /* Get the ADCx CFGR value */
  5681. tmpreg = ADCx->CFGR1;
  5682. 8001e06: 687b ldr r3, [r7, #4]
  5683. 8001e08: 68db ldr r3, [r3, #12]
  5684. 8001e0a: 60fb str r3, [r7, #12]
  5685. /* Clear SCANDIR, RES[1:0], ALIGN, EXTSEL[2:0], EXTEN[1:0] and CONT bits */
  5686. tmpreg &= CFGR1_CLEAR_MASK;
  5687. 8001e0c: 68fb ldr r3, [r7, #12]
  5688. 8001e0e: 4a0f ldr r2, [pc, #60] ; (8001e4c <ADC_Init+0x54>)
  5689. 8001e10: 4013 ands r3, r2
  5690. 8001e12: 60fb str r3, [r7, #12]
  5691. /* Set EXTEN[1:0] bits according to ADC_ExternalTrigConvEdge value */
  5692. /* Set EXTSEL[2:0] bits according to ADC_ExternalTrigConv value */
  5693. /* Set ALIGN bit according to ADC_DataAlign value */
  5694. /* Set SCANDIR bit according to ADC_ScanDirection value */
  5695. tmpreg |= (uint32_t)(ADC_InitStruct->ADC_Resolution | ((uint32_t)(ADC_InitStruct->ADC_ContinuousConvMode) << 13) |
  5696. 8001e14: 683b ldr r3, [r7, #0]
  5697. 8001e16: 681a ldr r2, [r3, #0]
  5698. 8001e18: 683b ldr r3, [r7, #0]
  5699. 8001e1a: 791b ldrb r3, [r3, #4]
  5700. 8001e1c: 035b lsls r3, r3, #13
  5701. 8001e1e: 431a orrs r2, r3
  5702. ADC_InitStruct->ADC_ExternalTrigConvEdge | ADC_InitStruct->ADC_ExternalTrigConv |
  5703. 8001e20: 683b ldr r3, [r7, #0]
  5704. 8001e22: 689b ldr r3, [r3, #8]
  5705. /* Set EXTEN[1:0] bits according to ADC_ExternalTrigConvEdge value */
  5706. /* Set EXTSEL[2:0] bits according to ADC_ExternalTrigConv value */
  5707. /* Set ALIGN bit according to ADC_DataAlign value */
  5708. /* Set SCANDIR bit according to ADC_ScanDirection value */
  5709. tmpreg |= (uint32_t)(ADC_InitStruct->ADC_Resolution | ((uint32_t)(ADC_InitStruct->ADC_ContinuousConvMode) << 13) |
  5710. 8001e24: 431a orrs r2, r3
  5711. ADC_InitStruct->ADC_ExternalTrigConvEdge | ADC_InitStruct->ADC_ExternalTrigConv |
  5712. 8001e26: 683b ldr r3, [r7, #0]
  5713. 8001e28: 68db ldr r3, [r3, #12]
  5714. 8001e2a: 431a orrs r2, r3
  5715. ADC_InitStruct->ADC_DataAlign | ADC_InitStruct->ADC_ScanDirection);
  5716. 8001e2c: 683b ldr r3, [r7, #0]
  5717. 8001e2e: 691b ldr r3, [r3, #16]
  5718. /* Set EXTSEL[2:0] bits according to ADC_ExternalTrigConv value */
  5719. /* Set ALIGN bit according to ADC_DataAlign value */
  5720. /* Set SCANDIR bit according to ADC_ScanDirection value */
  5721. tmpreg |= (uint32_t)(ADC_InitStruct->ADC_Resolution | ((uint32_t)(ADC_InitStruct->ADC_ContinuousConvMode) << 13) |
  5722. ADC_InitStruct->ADC_ExternalTrigConvEdge | ADC_InitStruct->ADC_ExternalTrigConv |
  5723. 8001e30: 431a orrs r2, r3
  5724. ADC_InitStruct->ADC_DataAlign | ADC_InitStruct->ADC_ScanDirection);
  5725. 8001e32: 683b ldr r3, [r7, #0]
  5726. 8001e34: 695b ldr r3, [r3, #20]
  5727. /* Set EXTEN[1:0] bits according to ADC_ExternalTrigConvEdge value */
  5728. /* Set EXTSEL[2:0] bits according to ADC_ExternalTrigConv value */
  5729. /* Set ALIGN bit according to ADC_DataAlign value */
  5730. /* Set SCANDIR bit according to ADC_ScanDirection value */
  5731. tmpreg |= (uint32_t)(ADC_InitStruct->ADC_Resolution | ((uint32_t)(ADC_InitStruct->ADC_ContinuousConvMode) << 13) |
  5732. 8001e36: 4313 orrs r3, r2
  5733. 8001e38: 68fa ldr r2, [r7, #12]
  5734. 8001e3a: 4313 orrs r3, r2
  5735. 8001e3c: 60fb str r3, [r7, #12]
  5736. ADC_InitStruct->ADC_ExternalTrigConvEdge | ADC_InitStruct->ADC_ExternalTrigConv |
  5737. ADC_InitStruct->ADC_DataAlign | ADC_InitStruct->ADC_ScanDirection);
  5738. /* Write to ADCx CFGR */
  5739. ADCx->CFGR1 = tmpreg;
  5740. 8001e3e: 687b ldr r3, [r7, #4]
  5741. 8001e40: 68fa ldr r2, [r7, #12]
  5742. 8001e42: 60da str r2, [r3, #12]
  5743. }
  5744. 8001e44: 46bd mov sp, r7
  5745. 8001e46: b004 add sp, #16
  5746. 8001e48: bd80 pop {r7, pc}
  5747. 8001e4a: 46c0 nop ; (mov r8, r8)
  5748. 8001e4c: ffffd203 .word 0xffffd203
  5749. 08001e50 <ADC_StructInit>:
  5750. * @param ADC_InitStruct: pointer to an ADC_InitTypeDef structure which will
  5751. * be initialized.
  5752. * @retval None
  5753. */
  5754. void ADC_StructInit(ADC_InitTypeDef* ADC_InitStruct)
  5755. {
  5756. 8001e50: b580 push {r7, lr}
  5757. 8001e52: b082 sub sp, #8
  5758. 8001e54: af00 add r7, sp, #0
  5759. 8001e56: 6078 str r0, [r7, #4]
  5760. /* Reset ADC init structure parameters values */
  5761. /* Initialize the ADC_Resolution member */
  5762. ADC_InitStruct->ADC_Resolution = ADC_Resolution_12b;
  5763. 8001e58: 687b ldr r3, [r7, #4]
  5764. 8001e5a: 2200 movs r2, #0
  5765. 8001e5c: 601a str r2, [r3, #0]
  5766. /* Initialize the ADC_ContinuousConvMode member */
  5767. ADC_InitStruct->ADC_ContinuousConvMode = DISABLE;
  5768. 8001e5e: 687b ldr r3, [r7, #4]
  5769. 8001e60: 2200 movs r2, #0
  5770. 8001e62: 711a strb r2, [r3, #4]
  5771. /* Initialize the ADC_ExternalTrigConvEdge member */
  5772. ADC_InitStruct->ADC_ExternalTrigConvEdge = ADC_ExternalTrigConvEdge_None;
  5773. 8001e64: 687b ldr r3, [r7, #4]
  5774. 8001e66: 2200 movs r2, #0
  5775. 8001e68: 609a str r2, [r3, #8]
  5776. /* Initialize the ADC_ExternalTrigConv member */
  5777. ADC_InitStruct->ADC_ExternalTrigConv = ADC_ExternalTrigConv_T1_TRGO;
  5778. 8001e6a: 687b ldr r3, [r7, #4]
  5779. 8001e6c: 2200 movs r2, #0
  5780. 8001e6e: 60da str r2, [r3, #12]
  5781. /* Initialize the ADC_DataAlign member */
  5782. ADC_InitStruct->ADC_DataAlign = ADC_DataAlign_Right;
  5783. 8001e70: 687b ldr r3, [r7, #4]
  5784. 8001e72: 2200 movs r2, #0
  5785. 8001e74: 611a str r2, [r3, #16]
  5786. /* Initialize the ADC_ScanDirection member */
  5787. ADC_InitStruct->ADC_ScanDirection = ADC_ScanDirection_Upward;
  5788. 8001e76: 687b ldr r3, [r7, #4]
  5789. 8001e78: 2200 movs r2, #0
  5790. 8001e7a: 615a str r2, [r3, #20]
  5791. }
  5792. 8001e7c: 46bd mov sp, r7
  5793. 8001e7e: b002 add sp, #8
  5794. 8001e80: bd80 pop {r7, pc}
  5795. 8001e82: 46c0 nop ; (mov r8, r8)
  5796. 08001e84 <ADC_Cmd>:
  5797. * @param NewState: new state of the ADCx peripheral.
  5798. * This parameter can be: ENABLE or DISABLE.
  5799. * @retval None
  5800. */
  5801. void ADC_Cmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  5802. {
  5803. 8001e84: b580 push {r7, lr}
  5804. 8001e86: b082 sub sp, #8
  5805. 8001e88: af00 add r7, sp, #0
  5806. 8001e8a: 6078 str r0, [r7, #4]
  5807. 8001e8c: 1c0a adds r2, r1, #0
  5808. 8001e8e: 1cfb adds r3, r7, #3
  5809. 8001e90: 701a strb r2, [r3, #0]
  5810. /* Check the parameters */
  5811. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  5812. assert_param(IS_FUNCTIONAL_STATE(NewState));
  5813. if (NewState != DISABLE)
  5814. 8001e92: 1cfb adds r3, r7, #3
  5815. 8001e94: 781b ldrb r3, [r3, #0]
  5816. 8001e96: 2b00 cmp r3, #0
  5817. 8001e98: d006 beq.n 8001ea8 <ADC_Cmd+0x24>
  5818. {
  5819. /* Set the ADEN bit to Enable the ADC peripheral */
  5820. ADCx->CR |= (uint32_t)ADC_CR_ADEN;
  5821. 8001e9a: 687b ldr r3, [r7, #4]
  5822. 8001e9c: 689b ldr r3, [r3, #8]
  5823. 8001e9e: 2201 movs r2, #1
  5824. 8001ea0: 431a orrs r2, r3
  5825. 8001ea2: 687b ldr r3, [r7, #4]
  5826. 8001ea4: 609a str r2, [r3, #8]
  5827. 8001ea6: e005 b.n 8001eb4 <ADC_Cmd+0x30>
  5828. }
  5829. else
  5830. {
  5831. /* Set the ADDIS to Disable the ADC peripheral */
  5832. ADCx->CR |= (uint32_t)ADC_CR_ADDIS;
  5833. 8001ea8: 687b ldr r3, [r7, #4]
  5834. 8001eaa: 689b ldr r3, [r3, #8]
  5835. 8001eac: 2202 movs r2, #2
  5836. 8001eae: 431a orrs r2, r3
  5837. 8001eb0: 687b ldr r3, [r7, #4]
  5838. 8001eb2: 609a str r2, [r3, #8]
  5839. }
  5840. }
  5841. 8001eb4: 46bd mov sp, r7
  5842. 8001eb6: b002 add sp, #8
  5843. 8001eb8: bd80 pop {r7, pc}
  5844. 8001eba: 46c0 nop ; (mov r8, r8)
  5845. 08001ebc <ADC_ClockModeConfig>:
  5846. * @arg ADC_ClockMode_SynClkDiv2: ADC clocked by PCLK/2
  5847. * @arg ADC_ClockMode_SynClkDiv4: ADC clocked by PCLK/4
  5848. * @retval None
  5849. */
  5850. void ADC_ClockModeConfig(ADC_TypeDef* ADCx, uint32_t ADC_ClockMode)
  5851. {
  5852. 8001ebc: b580 push {r7, lr}
  5853. 8001ebe: b082 sub sp, #8
  5854. 8001ec0: af00 add r7, sp, #0
  5855. 8001ec2: 6078 str r0, [r7, #4]
  5856. 8001ec4: 6039 str r1, [r7, #0]
  5857. /* Check the parameters */
  5858. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  5859. assert_param(IS_ADC_CLOCKMODE(ADC_ClockMode));
  5860. /* Configure the ADC Clock mode according to ADC_ClockMode */
  5861. ADCx->CFGR2 = (uint32_t)ADC_ClockMode;
  5862. 8001ec6: 687b ldr r3, [r7, #4]
  5863. 8001ec8: 683a ldr r2, [r7, #0]
  5864. 8001eca: 611a str r2, [r3, #16]
  5865. }
  5866. 8001ecc: 46bd mov sp, r7
  5867. 8001ece: b002 add sp, #8
  5868. 8001ed0: bd80 pop {r7, pc}
  5869. 8001ed2: 46c0 nop ; (mov r8, r8)
  5870. 08001ed4 <ADC_JitterCmd>:
  5871. * @param NewState: new state of the ADCx jitter.
  5872. * This parameter can be: ENABLE or DISABLE.
  5873. * @retval None
  5874. */
  5875. void ADC_JitterCmd(ADC_TypeDef* ADCx, uint32_t ADC_JitterOff, FunctionalState NewState)
  5876. {
  5877. 8001ed4: b580 push {r7, lr}
  5878. 8001ed6: b084 sub sp, #16
  5879. 8001ed8: af00 add r7, sp, #0
  5880. 8001eda: 60f8 str r0, [r7, #12]
  5881. 8001edc: 60b9 str r1, [r7, #8]
  5882. 8001ede: 1dfb adds r3, r7, #7
  5883. 8001ee0: 701a strb r2, [r3, #0]
  5884. /* Check the parameters */
  5885. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  5886. assert_param(IS_ADC_JITTEROFF(ADC_JitterOff));
  5887. assert_param(IS_FUNCTIONAL_STATE(NewState));
  5888. if (NewState != DISABLE)
  5889. 8001ee2: 1dfb adds r3, r7, #7
  5890. 8001ee4: 781b ldrb r3, [r3, #0]
  5891. 8001ee6: 2b00 cmp r3, #0
  5892. 8001ee8: d006 beq.n 8001ef8 <ADC_JitterCmd+0x24>
  5893. {
  5894. /* Disable Jitter */
  5895. ADCx->CFGR2 |= (uint32_t)ADC_JitterOff;
  5896. 8001eea: 68fb ldr r3, [r7, #12]
  5897. 8001eec: 691a ldr r2, [r3, #16]
  5898. 8001eee: 68bb ldr r3, [r7, #8]
  5899. 8001ef0: 431a orrs r2, r3
  5900. 8001ef2: 68fb ldr r3, [r7, #12]
  5901. 8001ef4: 611a str r2, [r3, #16]
  5902. 8001ef6: e006 b.n 8001f06 <ADC_JitterCmd+0x32>
  5903. }
  5904. else
  5905. {
  5906. /* Enable Jitter */
  5907. ADCx->CFGR2 &= (uint32_t)(~ADC_JitterOff);
  5908. 8001ef8: 68fb ldr r3, [r7, #12]
  5909. 8001efa: 691b ldr r3, [r3, #16]
  5910. 8001efc: 68ba ldr r2, [r7, #8]
  5911. 8001efe: 43d2 mvns r2, r2
  5912. 8001f00: 401a ands r2, r3
  5913. 8001f02: 68fb ldr r3, [r7, #12]
  5914. 8001f04: 611a str r2, [r3, #16]
  5915. }
  5916. }
  5917. 8001f06: 46bd mov sp, r7
  5918. 8001f08: b004 add sp, #16
  5919. 8001f0a: bd80 pop {r7, pc}
  5920. 08001f0c <ADC_AutoPowerOffCmd>:
  5921. * @param NewState: new state of the ADCx power Off.
  5922. * This parameter can be: ENABLE or DISABLE.
  5923. * @retval None
  5924. */
  5925. void ADC_AutoPowerOffCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  5926. {
  5927. 8001f0c: b580 push {r7, lr}
  5928. 8001f0e: b082 sub sp, #8
  5929. 8001f10: af00 add r7, sp, #0
  5930. 8001f12: 6078 str r0, [r7, #4]
  5931. 8001f14: 1c0a adds r2, r1, #0
  5932. 8001f16: 1cfb adds r3, r7, #3
  5933. 8001f18: 701a strb r2, [r3, #0]
  5934. /* Check the parameters */
  5935. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  5936. assert_param(IS_FUNCTIONAL_STATE(NewState));
  5937. if (NewState != DISABLE)
  5938. 8001f1a: 1cfb adds r3, r7, #3
  5939. 8001f1c: 781b ldrb r3, [r3, #0]
  5940. 8001f1e: 2b00 cmp r3, #0
  5941. 8001f20: d007 beq.n 8001f32 <ADC_AutoPowerOffCmd+0x26>
  5942. {
  5943. /* Enable the ADC Automatic Power-Off */
  5944. ADCx->CFGR1 |= ADC_CFGR1_AUTOFF;
  5945. 8001f22: 687b ldr r3, [r7, #4]
  5946. 8001f24: 68db ldr r3, [r3, #12]
  5947. 8001f26: 2280 movs r2, #128 ; 0x80
  5948. 8001f28: 0212 lsls r2, r2, #8
  5949. 8001f2a: 431a orrs r2, r3
  5950. 8001f2c: 687b ldr r3, [r7, #4]
  5951. 8001f2e: 60da str r2, [r3, #12]
  5952. 8001f30: e005 b.n 8001f3e <ADC_AutoPowerOffCmd+0x32>
  5953. }
  5954. else
  5955. {
  5956. /* Disable the ADC Automatic Power-Off */
  5957. ADCx->CFGR1 &= (uint32_t)~ADC_CFGR1_AUTOFF;
  5958. 8001f32: 687b ldr r3, [r7, #4]
  5959. 8001f34: 68db ldr r3, [r3, #12]
  5960. 8001f36: 4a03 ldr r2, [pc, #12] ; (8001f44 <ADC_AutoPowerOffCmd+0x38>)
  5961. 8001f38: 401a ands r2, r3
  5962. 8001f3a: 687b ldr r3, [r7, #4]
  5963. 8001f3c: 60da str r2, [r3, #12]
  5964. }
  5965. }
  5966. 8001f3e: 46bd mov sp, r7
  5967. 8001f40: b002 add sp, #8
  5968. 8001f42: bd80 pop {r7, pc}
  5969. 8001f44: ffff7fff .word 0xffff7fff
  5970. 08001f48 <ADC_WaitModeCmd>:
  5971. * @param NewState: new state of the ADCx Auto-Delay.
  5972. * This parameter can be: ENABLE or DISABLE.
  5973. * @retval None
  5974. */
  5975. void ADC_WaitModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  5976. {
  5977. 8001f48: b580 push {r7, lr}
  5978. 8001f4a: b082 sub sp, #8
  5979. 8001f4c: af00 add r7, sp, #0
  5980. 8001f4e: 6078 str r0, [r7, #4]
  5981. 8001f50: 1c0a adds r2, r1, #0
  5982. 8001f52: 1cfb adds r3, r7, #3
  5983. 8001f54: 701a strb r2, [r3, #0]
  5984. /* Check the parameters */
  5985. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  5986. assert_param(IS_FUNCTIONAL_STATE(NewState));
  5987. if (NewState != DISABLE)
  5988. 8001f56: 1cfb adds r3, r7, #3
  5989. 8001f58: 781b ldrb r3, [r3, #0]
  5990. 8001f5a: 2b00 cmp r3, #0
  5991. 8001f5c: d007 beq.n 8001f6e <ADC_WaitModeCmd+0x26>
  5992. {
  5993. /* Enable the ADC Automatic Delayed conversion */
  5994. ADCx->CFGR1 |= ADC_CFGR1_WAIT;
  5995. 8001f5e: 687b ldr r3, [r7, #4]
  5996. 8001f60: 68db ldr r3, [r3, #12]
  5997. 8001f62: 2280 movs r2, #128 ; 0x80
  5998. 8001f64: 01d2 lsls r2, r2, #7
  5999. 8001f66: 431a orrs r2, r3
  6000. 8001f68: 687b ldr r3, [r7, #4]
  6001. 8001f6a: 60da str r2, [r3, #12]
  6002. 8001f6c: e005 b.n 8001f7a <ADC_WaitModeCmd+0x32>
  6003. }
  6004. else
  6005. {
  6006. /* Disable the ADC Automatic Delayed conversion */
  6007. ADCx->CFGR1 &= (uint32_t)~ADC_CFGR1_WAIT;
  6008. 8001f6e: 687b ldr r3, [r7, #4]
  6009. 8001f70: 68db ldr r3, [r3, #12]
  6010. 8001f72: 4a03 ldr r2, [pc, #12] ; (8001f80 <ADC_WaitModeCmd+0x38>)
  6011. 8001f74: 401a ands r2, r3
  6012. 8001f76: 687b ldr r3, [r7, #4]
  6013. 8001f78: 60da str r2, [r3, #12]
  6014. }
  6015. }
  6016. 8001f7a: 46bd mov sp, r7
  6017. 8001f7c: b002 add sp, #8
  6018. 8001f7e: bd80 pop {r7, pc}
  6019. 8001f80: ffffbfff .word 0xffffbfff
  6020. 08001f84 <ADC_AnalogWatchdogCmd>:
  6021. * @param NewState: new state of the ADCx Analog Watchdog.
  6022. * This parameter can be: ENABLE or DISABLE.
  6023. * @retval None
  6024. */
  6025. void ADC_AnalogWatchdogCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  6026. {
  6027. 8001f84: b580 push {r7, lr}
  6028. 8001f86: b082 sub sp, #8
  6029. 8001f88: af00 add r7, sp, #0
  6030. 8001f8a: 6078 str r0, [r7, #4]
  6031. 8001f8c: 1c0a adds r2, r1, #0
  6032. 8001f8e: 1cfb adds r3, r7, #3
  6033. 8001f90: 701a strb r2, [r3, #0]
  6034. /* Check the parameters */
  6035. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6036. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6037. if (NewState != DISABLE)
  6038. 8001f92: 1cfb adds r3, r7, #3
  6039. 8001f94: 781b ldrb r3, [r3, #0]
  6040. 8001f96: 2b00 cmp r3, #0
  6041. 8001f98: d007 beq.n 8001faa <ADC_AnalogWatchdogCmd+0x26>
  6042. {
  6043. /* Enable the ADC Analog Watchdog */
  6044. ADCx->CFGR1 |= ADC_CFGR1_AWDEN;
  6045. 8001f9a: 687b ldr r3, [r7, #4]
  6046. 8001f9c: 68db ldr r3, [r3, #12]
  6047. 8001f9e: 2280 movs r2, #128 ; 0x80
  6048. 8001fa0: 0412 lsls r2, r2, #16
  6049. 8001fa2: 431a orrs r2, r3
  6050. 8001fa4: 687b ldr r3, [r7, #4]
  6051. 8001fa6: 60da str r2, [r3, #12]
  6052. 8001fa8: e005 b.n 8001fb6 <ADC_AnalogWatchdogCmd+0x32>
  6053. }
  6054. else
  6055. {
  6056. /* Disable the ADC Analog Watchdog */
  6057. ADCx->CFGR1 &= (uint32_t)~ADC_CFGR1_AWDEN;
  6058. 8001faa: 687b ldr r3, [r7, #4]
  6059. 8001fac: 68db ldr r3, [r3, #12]
  6060. 8001fae: 4a03 ldr r2, [pc, #12] ; (8001fbc <ADC_AnalogWatchdogCmd+0x38>)
  6061. 8001fb0: 401a ands r2, r3
  6062. 8001fb2: 687b ldr r3, [r7, #4]
  6063. 8001fb4: 60da str r2, [r3, #12]
  6064. }
  6065. }
  6066. 8001fb6: 46bd mov sp, r7
  6067. 8001fb8: b002 add sp, #8
  6068. 8001fba: bd80 pop {r7, pc}
  6069. 8001fbc: ff7fffff .word 0xff7fffff
  6070. 08001fc0 <ADC_AnalogWatchdogThresholdsConfig>:
  6071. * This parameter must be a 12bit value.
  6072. * @retval None
  6073. */
  6074. void ADC_AnalogWatchdogThresholdsConfig(ADC_TypeDef* ADCx, uint16_t HighThreshold,
  6075. uint16_t LowThreshold)
  6076. {
  6077. 8001fc0: b580 push {r7, lr}
  6078. 8001fc2: b082 sub sp, #8
  6079. 8001fc4: af00 add r7, sp, #0
  6080. 8001fc6: 6078 str r0, [r7, #4]
  6081. 8001fc8: 1c08 adds r0, r1, #0
  6082. 8001fca: 1c11 adds r1, r2, #0
  6083. 8001fcc: 1cbb adds r3, r7, #2
  6084. 8001fce: 1c02 adds r2, r0, #0
  6085. 8001fd0: 801a strh r2, [r3, #0]
  6086. 8001fd2: 1c3b adds r3, r7, #0
  6087. 8001fd4: 1c0a adds r2, r1, #0
  6088. 8001fd6: 801a strh r2, [r3, #0]
  6089. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6090. assert_param(IS_ADC_THRESHOLD(HighThreshold));
  6091. assert_param(IS_ADC_THRESHOLD(LowThreshold));
  6092. /* Set the ADCx high and low threshold */
  6093. ADCx->TR = LowThreshold | ((uint32_t)HighThreshold << 16);
  6094. 8001fd8: 1c3b adds r3, r7, #0
  6095. 8001fda: 881a ldrh r2, [r3, #0]
  6096. 8001fdc: 1cbb adds r3, r7, #2
  6097. 8001fde: 881b ldrh r3, [r3, #0]
  6098. 8001fe0: 041b lsls r3, r3, #16
  6099. 8001fe2: 431a orrs r2, r3
  6100. 8001fe4: 687b ldr r3, [r7, #4]
  6101. 8001fe6: 621a str r2, [r3, #32]
  6102. }
  6103. 8001fe8: 46bd mov sp, r7
  6104. 8001fea: b002 add sp, #8
  6105. 8001fec: bd80 pop {r7, pc}
  6106. 8001fee: 46c0 nop ; (mov r8, r8)
  6107. 08001ff0 <ADC_AnalogWatchdogSingleChannelConfig>:
  6108. * @note The channel selected on the AWDCH must be also set into the CHSELR
  6109. * register
  6110. * @retval None
  6111. */
  6112. void ADC_AnalogWatchdogSingleChannelConfig(ADC_TypeDef* ADCx, uint32_t ADC_AnalogWatchdog_Channel)
  6113. {
  6114. 8001ff0: b580 push {r7, lr}
  6115. 8001ff2: b084 sub sp, #16
  6116. 8001ff4: af00 add r7, sp, #0
  6117. 8001ff6: 6078 str r0, [r7, #4]
  6118. 8001ff8: 6039 str r1, [r7, #0]
  6119. uint32_t tmpreg = 0;
  6120. 8001ffa: 2300 movs r3, #0
  6121. 8001ffc: 60fb str r3, [r7, #12]
  6122. /* Check the parameters */
  6123. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6124. assert_param(IS_ADC_ANALOG_WATCHDOG_CHANNEL(ADC_AnalogWatchdog_Channel));
  6125. /* Get the old register value */
  6126. tmpreg = ADCx->CFGR1;
  6127. 8001ffe: 687b ldr r3, [r7, #4]
  6128. 8002000: 68db ldr r3, [r3, #12]
  6129. 8002002: 60fb str r3, [r7, #12]
  6130. /* Clear the Analog watchdog channel select bits */
  6131. tmpreg &= ~ADC_CFGR1_AWDCH;
  6132. 8002004: 68fb ldr r3, [r7, #12]
  6133. 8002006: 4a06 ldr r2, [pc, #24] ; (8002020 <ADC_AnalogWatchdogSingleChannelConfig+0x30>)
  6134. 8002008: 4013 ands r3, r2
  6135. 800200a: 60fb str r3, [r7, #12]
  6136. /* Set the Analog watchdog channel */
  6137. tmpreg |= ADC_AnalogWatchdog_Channel;
  6138. 800200c: 68fa ldr r2, [r7, #12]
  6139. 800200e: 683b ldr r3, [r7, #0]
  6140. 8002010: 4313 orrs r3, r2
  6141. 8002012: 60fb str r3, [r7, #12]
  6142. /* Store the new register value */
  6143. ADCx->CFGR1 = tmpreg;
  6144. 8002014: 687b ldr r3, [r7, #4]
  6145. 8002016: 68fa ldr r2, [r7, #12]
  6146. 8002018: 60da str r2, [r3, #12]
  6147. }
  6148. 800201a: 46bd mov sp, r7
  6149. 800201c: b004 add sp, #16
  6150. 800201e: bd80 pop {r7, pc}
  6151. 8002020: 83ffffff .word 0x83ffffff
  6152. 08002024 <ADC_AnalogWatchdogSingleChannelCmd>:
  6153. * @param NewState: new state of the ADCx ADC Analog Watchdog Single Channel.
  6154. * This parameter can be: ENABLE or DISABLE.
  6155. * @retval None
  6156. */
  6157. void ADC_AnalogWatchdogSingleChannelCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  6158. {
  6159. 8002024: b580 push {r7, lr}
  6160. 8002026: b082 sub sp, #8
  6161. 8002028: af00 add r7, sp, #0
  6162. 800202a: 6078 str r0, [r7, #4]
  6163. 800202c: 1c0a adds r2, r1, #0
  6164. 800202e: 1cfb adds r3, r7, #3
  6165. 8002030: 701a strb r2, [r3, #0]
  6166. /* Check the parameters */
  6167. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6168. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6169. if (NewState != DISABLE)
  6170. 8002032: 1cfb adds r3, r7, #3
  6171. 8002034: 781b ldrb r3, [r3, #0]
  6172. 8002036: 2b00 cmp r3, #0
  6173. 8002038: d007 beq.n 800204a <ADC_AnalogWatchdogSingleChannelCmd+0x26>
  6174. {
  6175. /* Enable the ADC Analog Watchdog Single Channel */
  6176. ADCx->CFGR1 |= ADC_CFGR1_AWDSGL;
  6177. 800203a: 687b ldr r3, [r7, #4]
  6178. 800203c: 68db ldr r3, [r3, #12]
  6179. 800203e: 2280 movs r2, #128 ; 0x80
  6180. 8002040: 03d2 lsls r2, r2, #15
  6181. 8002042: 431a orrs r2, r3
  6182. 8002044: 687b ldr r3, [r7, #4]
  6183. 8002046: 60da str r2, [r3, #12]
  6184. 8002048: e005 b.n 8002056 <ADC_AnalogWatchdogSingleChannelCmd+0x32>
  6185. }
  6186. else
  6187. {
  6188. /* Disable the ADC Analog Watchdog Single Channel */
  6189. ADCx->CFGR1 &= (uint32_t)~ADC_CFGR1_AWDSGL;
  6190. 800204a: 687b ldr r3, [r7, #4]
  6191. 800204c: 68db ldr r3, [r3, #12]
  6192. 800204e: 4a03 ldr r2, [pc, #12] ; (800205c <ADC_AnalogWatchdogSingleChannelCmd+0x38>)
  6193. 8002050: 401a ands r2, r3
  6194. 8002052: 687b ldr r3, [r7, #4]
  6195. 8002054: 60da str r2, [r3, #12]
  6196. }
  6197. }
  6198. 8002056: 46bd mov sp, r7
  6199. 8002058: b002 add sp, #8
  6200. 800205a: bd80 pop {r7, pc}
  6201. 800205c: ffbfffff .word 0xffbfffff
  6202. 08002060 <ADC_TempSensorCmd>:
  6203. * @param NewState: new state of the temperature sensor input channel.
  6204. * This parameter can be: ENABLE or DISABLE.
  6205. * @retval None
  6206. */
  6207. void ADC_TempSensorCmd(FunctionalState NewState)
  6208. {
  6209. 8002060: b580 push {r7, lr}
  6210. 8002062: b082 sub sp, #8
  6211. 8002064: af00 add r7, sp, #0
  6212. 8002066: 1c02 adds r2, r0, #0
  6213. 8002068: 1dfb adds r3, r7, #7
  6214. 800206a: 701a strb r2, [r3, #0]
  6215. /* Check the parameters */
  6216. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6217. if (NewState != DISABLE)
  6218. 800206c: 1dfb adds r3, r7, #7
  6219. 800206e: 781b ldrb r3, [r3, #0]
  6220. 8002070: 2b00 cmp r3, #0
  6221. 8002072: d007 beq.n 8002084 <ADC_TempSensorCmd+0x24>
  6222. {
  6223. /* Enable the temperature sensor channel*/
  6224. ADC->CCR |= (uint32_t)ADC_CCR_TSEN;
  6225. 8002074: 4b08 ldr r3, [pc, #32] ; (8002098 <ADC_TempSensorCmd+0x38>)
  6226. 8002076: 4a08 ldr r2, [pc, #32] ; (8002098 <ADC_TempSensorCmd+0x38>)
  6227. 8002078: 6812 ldr r2, [r2, #0]
  6228. 800207a: 2180 movs r1, #128 ; 0x80
  6229. 800207c: 0409 lsls r1, r1, #16
  6230. 800207e: 430a orrs r2, r1
  6231. 8002080: 601a str r2, [r3, #0]
  6232. 8002082: e005 b.n 8002090 <ADC_TempSensorCmd+0x30>
  6233. }
  6234. else
  6235. {
  6236. /* Disable the temperature sensor channel*/
  6237. ADC->CCR &= (uint32_t)(~ADC_CCR_TSEN);
  6238. 8002084: 4b04 ldr r3, [pc, #16] ; (8002098 <ADC_TempSensorCmd+0x38>)
  6239. 8002086: 4a04 ldr r2, [pc, #16] ; (8002098 <ADC_TempSensorCmd+0x38>)
  6240. 8002088: 6812 ldr r2, [r2, #0]
  6241. 800208a: 4904 ldr r1, [pc, #16] ; (800209c <ADC_TempSensorCmd+0x3c>)
  6242. 800208c: 400a ands r2, r1
  6243. 800208e: 601a str r2, [r3, #0]
  6244. }
  6245. }
  6246. 8002090: 46bd mov sp, r7
  6247. 8002092: b002 add sp, #8
  6248. 8002094: bd80 pop {r7, pc}
  6249. 8002096: 46c0 nop ; (mov r8, r8)
  6250. 8002098: 40012708 .word 0x40012708
  6251. 800209c: ff7fffff .word 0xff7fffff
  6252. 080020a0 <ADC_VrefintCmd>:
  6253. * @param NewState: new state of the Vref input channel.
  6254. * This parameter can be: ENABLE or DISABLE.
  6255. * @retval None
  6256. */
  6257. void ADC_VrefintCmd(FunctionalState NewState)
  6258. {
  6259. 80020a0: b580 push {r7, lr}
  6260. 80020a2: b082 sub sp, #8
  6261. 80020a4: af00 add r7, sp, #0
  6262. 80020a6: 1c02 adds r2, r0, #0
  6263. 80020a8: 1dfb adds r3, r7, #7
  6264. 80020aa: 701a strb r2, [r3, #0]
  6265. /* Check the parameters */
  6266. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6267. if (NewState != DISABLE)
  6268. 80020ac: 1dfb adds r3, r7, #7
  6269. 80020ae: 781b ldrb r3, [r3, #0]
  6270. 80020b0: 2b00 cmp r3, #0
  6271. 80020b2: d007 beq.n 80020c4 <ADC_VrefintCmd+0x24>
  6272. {
  6273. /* Enable the Vrefint channel*/
  6274. ADC->CCR |= (uint32_t)ADC_CCR_VREFEN;
  6275. 80020b4: 4b08 ldr r3, [pc, #32] ; (80020d8 <ADC_VrefintCmd+0x38>)
  6276. 80020b6: 4a08 ldr r2, [pc, #32] ; (80020d8 <ADC_VrefintCmd+0x38>)
  6277. 80020b8: 6812 ldr r2, [r2, #0]
  6278. 80020ba: 2180 movs r1, #128 ; 0x80
  6279. 80020bc: 03c9 lsls r1, r1, #15
  6280. 80020be: 430a orrs r2, r1
  6281. 80020c0: 601a str r2, [r3, #0]
  6282. 80020c2: e005 b.n 80020d0 <ADC_VrefintCmd+0x30>
  6283. }
  6284. else
  6285. {
  6286. /* Disable the Vrefint channel*/
  6287. ADC->CCR &= (uint32_t)(~ADC_CCR_VREFEN);
  6288. 80020c4: 4b04 ldr r3, [pc, #16] ; (80020d8 <ADC_VrefintCmd+0x38>)
  6289. 80020c6: 4a04 ldr r2, [pc, #16] ; (80020d8 <ADC_VrefintCmd+0x38>)
  6290. 80020c8: 6812 ldr r2, [r2, #0]
  6291. 80020ca: 4904 ldr r1, [pc, #16] ; (80020dc <ADC_VrefintCmd+0x3c>)
  6292. 80020cc: 400a ands r2, r1
  6293. 80020ce: 601a str r2, [r3, #0]
  6294. }
  6295. }
  6296. 80020d0: 46bd mov sp, r7
  6297. 80020d2: b002 add sp, #8
  6298. 80020d4: bd80 pop {r7, pc}
  6299. 80020d6: 46c0 nop ; (mov r8, r8)
  6300. 80020d8: 40012708 .word 0x40012708
  6301. 80020dc: ffbfffff .word 0xffbfffff
  6302. 080020e0 <ADC_VbatCmd>:
  6303. * @param NewState: new state of the Vbat input channel.
  6304. * This parameter can be: ENABLE or DISABLE.
  6305. * @retval None
  6306. */
  6307. void ADC_VbatCmd(FunctionalState NewState)
  6308. {
  6309. 80020e0: b580 push {r7, lr}
  6310. 80020e2: b082 sub sp, #8
  6311. 80020e4: af00 add r7, sp, #0
  6312. 80020e6: 1c02 adds r2, r0, #0
  6313. 80020e8: 1dfb adds r3, r7, #7
  6314. 80020ea: 701a strb r2, [r3, #0]
  6315. /* Check the parameters */
  6316. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6317. if (NewState != DISABLE)
  6318. 80020ec: 1dfb adds r3, r7, #7
  6319. 80020ee: 781b ldrb r3, [r3, #0]
  6320. 80020f0: 2b00 cmp r3, #0
  6321. 80020f2: d007 beq.n 8002104 <ADC_VbatCmd+0x24>
  6322. {
  6323. /* Enable the Vbat channel*/
  6324. ADC->CCR |= (uint32_t)ADC_CCR_VBATEN;
  6325. 80020f4: 4b08 ldr r3, [pc, #32] ; (8002118 <ADC_VbatCmd+0x38>)
  6326. 80020f6: 4a08 ldr r2, [pc, #32] ; (8002118 <ADC_VbatCmd+0x38>)
  6327. 80020f8: 6812 ldr r2, [r2, #0]
  6328. 80020fa: 2180 movs r1, #128 ; 0x80
  6329. 80020fc: 0449 lsls r1, r1, #17
  6330. 80020fe: 430a orrs r2, r1
  6331. 8002100: 601a str r2, [r3, #0]
  6332. 8002102: e005 b.n 8002110 <ADC_VbatCmd+0x30>
  6333. }
  6334. else
  6335. {
  6336. /* Disable the Vbat channel*/
  6337. ADC->CCR &= (uint32_t)(~ADC_CCR_VBATEN);
  6338. 8002104: 4b04 ldr r3, [pc, #16] ; (8002118 <ADC_VbatCmd+0x38>)
  6339. 8002106: 4a04 ldr r2, [pc, #16] ; (8002118 <ADC_VbatCmd+0x38>)
  6340. 8002108: 6812 ldr r2, [r2, #0]
  6341. 800210a: 4904 ldr r1, [pc, #16] ; (800211c <ADC_VbatCmd+0x3c>)
  6342. 800210c: 400a ands r2, r1
  6343. 800210e: 601a str r2, [r3, #0]
  6344. }
  6345. }
  6346. 8002110: 46bd mov sp, r7
  6347. 8002112: b002 add sp, #8
  6348. 8002114: bd80 pop {r7, pc}
  6349. 8002116: 46c0 nop ; (mov r8, r8)
  6350. 8002118: 40012708 .word 0x40012708
  6351. 800211c: feffffff .word 0xfeffffff
  6352. 08002120 <ADC_ChannelConfig>:
  6353. * @arg ADC_SampleTime_71_5Cycles: Sample time equal to 71.5 cycles
  6354. * @arg ADC_SampleTime_239_5Cycles: Sample time equal to 239.5 cycles
  6355. * @retval None
  6356. */
  6357. void ADC_ChannelConfig(ADC_TypeDef* ADCx, uint32_t ADC_Channel, uint32_t ADC_SampleTime)
  6358. {
  6359. 8002120: b580 push {r7, lr}
  6360. 8002122: b086 sub sp, #24
  6361. 8002124: af00 add r7, sp, #0
  6362. 8002126: 60f8 str r0, [r7, #12]
  6363. 8002128: 60b9 str r1, [r7, #8]
  6364. 800212a: 607a str r2, [r7, #4]
  6365. uint32_t tmpreg = 0;
  6366. 800212c: 2300 movs r3, #0
  6367. 800212e: 617b str r3, [r7, #20]
  6368. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6369. assert_param(IS_ADC_CHANNEL(ADC_Channel));
  6370. assert_param(IS_ADC_SAMPLE_TIME(ADC_SampleTime));
  6371. /* Configure the ADC Channel */
  6372. ADCx->CHSELR |= (uint32_t)ADC_Channel;
  6373. 8002130: 68fb ldr r3, [r7, #12]
  6374. 8002132: 6a9a ldr r2, [r3, #40] ; 0x28
  6375. 8002134: 68bb ldr r3, [r7, #8]
  6376. 8002136: 431a orrs r2, r3
  6377. 8002138: 68fb ldr r3, [r7, #12]
  6378. 800213a: 629a str r2, [r3, #40] ; 0x28
  6379. /* Clear the Sampling time Selection bits */
  6380. tmpreg &= ~ADC_SMPR1_SMPR;
  6381. 800213c: 697b ldr r3, [r7, #20]
  6382. 800213e: 2207 movs r2, #7
  6383. 8002140: 4393 bics r3, r2
  6384. 8002142: 617b str r3, [r7, #20]
  6385. /* Set the ADC Sampling Time register */
  6386. tmpreg |= (uint32_t)ADC_SampleTime;
  6387. 8002144: 697a ldr r2, [r7, #20]
  6388. 8002146: 687b ldr r3, [r7, #4]
  6389. 8002148: 4313 orrs r3, r2
  6390. 800214a: 617b str r3, [r7, #20]
  6391. /* Configure the ADC Sample time register */
  6392. ADCx->SMPR = tmpreg ;
  6393. 800214c: 68fb ldr r3, [r7, #12]
  6394. 800214e: 697a ldr r2, [r7, #20]
  6395. 8002150: 615a str r2, [r3, #20]
  6396. }
  6397. 8002152: 46bd mov sp, r7
  6398. 8002154: b006 add sp, #24
  6399. 8002156: bd80 pop {r7, pc}
  6400. 08002158 <ADC_ContinuousModeCmd>:
  6401. * enabled. In this case (If DISCEN and CONT are Set), the ADC behaves
  6402. * as if continuous mode was disabled
  6403. * @retval None
  6404. */
  6405. void ADC_ContinuousModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  6406. {
  6407. 8002158: b580 push {r7, lr}
  6408. 800215a: b082 sub sp, #8
  6409. 800215c: af00 add r7, sp, #0
  6410. 800215e: 6078 str r0, [r7, #4]
  6411. 8002160: 1c0a adds r2, r1, #0
  6412. 8002162: 1cfb adds r3, r7, #3
  6413. 8002164: 701a strb r2, [r3, #0]
  6414. /* Check the parameters */
  6415. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6416. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6417. if (NewState != DISABLE)
  6418. 8002166: 1cfb adds r3, r7, #3
  6419. 8002168: 781b ldrb r3, [r3, #0]
  6420. 800216a: 2b00 cmp r3, #0
  6421. 800216c: d007 beq.n 800217e <ADC_ContinuousModeCmd+0x26>
  6422. {
  6423. /* Enable the Continuous mode*/
  6424. ADCx->CFGR1 |= (uint32_t)ADC_CFGR1_CONT;
  6425. 800216e: 687b ldr r3, [r7, #4]
  6426. 8002170: 68db ldr r3, [r3, #12]
  6427. 8002172: 2280 movs r2, #128 ; 0x80
  6428. 8002174: 0192 lsls r2, r2, #6
  6429. 8002176: 431a orrs r2, r3
  6430. 8002178: 687b ldr r3, [r7, #4]
  6431. 800217a: 60da str r2, [r3, #12]
  6432. 800217c: e005 b.n 800218a <ADC_ContinuousModeCmd+0x32>
  6433. }
  6434. else
  6435. {
  6436. /* Disable the Continuous mode */
  6437. ADCx->CFGR1 &= (uint32_t)(~ADC_CFGR1_CONT);
  6438. 800217e: 687b ldr r3, [r7, #4]
  6439. 8002180: 68db ldr r3, [r3, #12]
  6440. 8002182: 4a03 ldr r2, [pc, #12] ; (8002190 <ADC_ContinuousModeCmd+0x38>)
  6441. 8002184: 401a ands r2, r3
  6442. 8002186: 687b ldr r3, [r7, #4]
  6443. 8002188: 60da str r2, [r3, #12]
  6444. }
  6445. }
  6446. 800218a: 46bd mov sp, r7
  6447. 800218c: b002 add sp, #8
  6448. 800218e: bd80 pop {r7, pc}
  6449. 8002190: ffffdfff .word 0xffffdfff
  6450. 08002194 <ADC_DiscModeCmd>:
  6451. * enabled. In this case (If DISCEN and CONT are Set), the ADC behaves
  6452. * as if continuous mode was disabled
  6453. * @retval None
  6454. */
  6455. void ADC_DiscModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  6456. {
  6457. 8002194: b580 push {r7, lr}
  6458. 8002196: b082 sub sp, #8
  6459. 8002198: af00 add r7, sp, #0
  6460. 800219a: 6078 str r0, [r7, #4]
  6461. 800219c: 1c0a adds r2, r1, #0
  6462. 800219e: 1cfb adds r3, r7, #3
  6463. 80021a0: 701a strb r2, [r3, #0]
  6464. /* Check the parameters */
  6465. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6466. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6467. if (NewState != DISABLE)
  6468. 80021a2: 1cfb adds r3, r7, #3
  6469. 80021a4: 781b ldrb r3, [r3, #0]
  6470. 80021a6: 2b00 cmp r3, #0
  6471. 80021a8: d007 beq.n 80021ba <ADC_DiscModeCmd+0x26>
  6472. {
  6473. /* Enable the Discontinuous mode */
  6474. ADCx->CFGR1 |= (uint32_t)ADC_CFGR1_DISCEN;
  6475. 80021aa: 687b ldr r3, [r7, #4]
  6476. 80021ac: 68db ldr r3, [r3, #12]
  6477. 80021ae: 2280 movs r2, #128 ; 0x80
  6478. 80021b0: 0252 lsls r2, r2, #9
  6479. 80021b2: 431a orrs r2, r3
  6480. 80021b4: 687b ldr r3, [r7, #4]
  6481. 80021b6: 60da str r2, [r3, #12]
  6482. 80021b8: e005 b.n 80021c6 <ADC_DiscModeCmd+0x32>
  6483. }
  6484. else
  6485. {
  6486. /* Disable the Discontinuous mode */
  6487. ADCx->CFGR1 &= (uint32_t)(~ADC_CFGR1_DISCEN);
  6488. 80021ba: 687b ldr r3, [r7, #4]
  6489. 80021bc: 68db ldr r3, [r3, #12]
  6490. 80021be: 4a03 ldr r2, [pc, #12] ; (80021cc <ADC_DiscModeCmd+0x38>)
  6491. 80021c0: 401a ands r2, r3
  6492. 80021c2: 687b ldr r3, [r7, #4]
  6493. 80021c4: 60da str r2, [r3, #12]
  6494. }
  6495. }
  6496. 80021c6: 46bd mov sp, r7
  6497. 80021c8: b002 add sp, #8
  6498. 80021ca: bd80 pop {r7, pc}
  6499. 80021cc: fffeffff .word 0xfffeffff
  6500. 080021d0 <ADC_OverrunModeCmd>:
  6501. * @param NewState: new state of the Overrun mode.
  6502. * This parameter can be: ENABLE or DISABLE.
  6503. * @retval None
  6504. */
  6505. void ADC_OverrunModeCmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  6506. {
  6507. 80021d0: b580 push {r7, lr}
  6508. 80021d2: b082 sub sp, #8
  6509. 80021d4: af00 add r7, sp, #0
  6510. 80021d6: 6078 str r0, [r7, #4]
  6511. 80021d8: 1c0a adds r2, r1, #0
  6512. 80021da: 1cfb adds r3, r7, #3
  6513. 80021dc: 701a strb r2, [r3, #0]
  6514. /* Check the parameters */
  6515. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6516. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6517. if (NewState != DISABLE)
  6518. 80021de: 1cfb adds r3, r7, #3
  6519. 80021e0: 781b ldrb r3, [r3, #0]
  6520. 80021e2: 2b00 cmp r3, #0
  6521. 80021e4: d007 beq.n 80021f6 <ADC_OverrunModeCmd+0x26>
  6522. {
  6523. /* Enable the Overrun mode */
  6524. ADCx->CFGR1 |= (uint32_t)ADC_CFGR1_OVRMOD;
  6525. 80021e6: 687b ldr r3, [r7, #4]
  6526. 80021e8: 68db ldr r3, [r3, #12]
  6527. 80021ea: 2280 movs r2, #128 ; 0x80
  6528. 80021ec: 0152 lsls r2, r2, #5
  6529. 80021ee: 431a orrs r2, r3
  6530. 80021f0: 687b ldr r3, [r7, #4]
  6531. 80021f2: 60da str r2, [r3, #12]
  6532. 80021f4: e005 b.n 8002202 <ADC_OverrunModeCmd+0x32>
  6533. }
  6534. else
  6535. {
  6536. /* Disable the Overrun mode */
  6537. ADCx->CFGR1 &= (uint32_t)(~ADC_CFGR1_OVRMOD);
  6538. 80021f6: 687b ldr r3, [r7, #4]
  6539. 80021f8: 68db ldr r3, [r3, #12]
  6540. 80021fa: 4a03 ldr r2, [pc, #12] ; (8002208 <ADC_OverrunModeCmd+0x38>)
  6541. 80021fc: 401a ands r2, r3
  6542. 80021fe: 687b ldr r3, [r7, #4]
  6543. 8002200: 60da str r2, [r3, #12]
  6544. }
  6545. }
  6546. 8002202: 46bd mov sp, r7
  6547. 8002204: b002 add sp, #8
  6548. 8002206: bd80 pop {r7, pc}
  6549. 8002208: ffffefff .word 0xffffefff
  6550. 0800220c <ADC_GetCalibrationFactor>:
  6551. * reset configuration (ADEN must be equal to 0).
  6552. * @param ADCx: where x can be 1 to select the ADC1 peripheral.
  6553. * @retval ADC Calibration factor
  6554. */
  6555. uint32_t ADC_GetCalibrationFactor(ADC_TypeDef* ADCx)
  6556. {
  6557. 800220c: b580 push {r7, lr}
  6558. 800220e: b086 sub sp, #24
  6559. 8002210: af00 add r7, sp, #0
  6560. 8002212: 6078 str r0, [r7, #4]
  6561. uint32_t tmpreg = 0, calibrationcounter = 0, calibrationstatus = 0;
  6562. 8002214: 2300 movs r3, #0
  6563. 8002216: 617b str r3, [r7, #20]
  6564. 8002218: 2300 movs r3, #0
  6565. 800221a: 613b str r3, [r7, #16]
  6566. 800221c: 2300 movs r3, #0
  6567. 800221e: 60fb str r3, [r7, #12]
  6568. /* Check the parameters */
  6569. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6570. /* Set the ADC calibartion */
  6571. ADCx->CR |= (uint32_t)ADC_CR_ADCAL;
  6572. 8002220: 687b ldr r3, [r7, #4]
  6573. 8002222: 689b ldr r3, [r3, #8]
  6574. 8002224: 2280 movs r2, #128 ; 0x80
  6575. 8002226: 0612 lsls r2, r2, #24
  6576. 8002228: 431a orrs r2, r3
  6577. 800222a: 687b ldr r3, [r7, #4]
  6578. 800222c: 609a str r2, [r3, #8]
  6579. /* Wait until no ADC calibration is completed */
  6580. do
  6581. {
  6582. calibrationstatus = ADCx->CR & ADC_CR_ADCAL;
  6583. 800222e: 687b ldr r3, [r7, #4]
  6584. 8002230: 689b ldr r3, [r3, #8]
  6585. 8002232: 0fdb lsrs r3, r3, #31
  6586. 8002234: 07db lsls r3, r3, #31
  6587. 8002236: 60fb str r3, [r7, #12]
  6588. calibrationcounter++;
  6589. 8002238: 693b ldr r3, [r7, #16]
  6590. 800223a: 3301 adds r3, #1
  6591. 800223c: 613b str r3, [r7, #16]
  6592. } while((calibrationcounter != CALIBRATION_TIMEOUT) && (calibrationstatus != 0x00));
  6593. 800223e: 693a ldr r2, [r7, #16]
  6594. 8002240: 23f0 movs r3, #240 ; 0xf0
  6595. 8002242: 021b lsls r3, r3, #8
  6596. 8002244: 429a cmp r2, r3
  6597. 8002246: d002 beq.n 800224e <ADC_GetCalibrationFactor+0x42>
  6598. 8002248: 68fb ldr r3, [r7, #12]
  6599. 800224a: 2b00 cmp r3, #0
  6600. 800224c: d1ef bne.n 800222e <ADC_GetCalibrationFactor+0x22>
  6601. if((uint32_t)(ADCx->CR & ADC_CR_ADCAL) == RESET)
  6602. 800224e: 687b ldr r3, [r7, #4]
  6603. 8002250: 689b ldr r3, [r3, #8]
  6604. 8002252: 2b00 cmp r3, #0
  6605. 8002254: db03 blt.n 800225e <ADC_GetCalibrationFactor+0x52>
  6606. {
  6607. /*Get the calibration factor from the ADC data register */
  6608. tmpreg = ADCx->DR;
  6609. 8002256: 687b ldr r3, [r7, #4]
  6610. 8002258: 6c1b ldr r3, [r3, #64] ; 0x40
  6611. 800225a: 617b str r3, [r7, #20]
  6612. 800225c: e001 b.n 8002262 <ADC_GetCalibrationFactor+0x56>
  6613. }
  6614. else
  6615. {
  6616. /* Error factor */
  6617. tmpreg = 0x00000000;
  6618. 800225e: 2300 movs r3, #0
  6619. 8002260: 617b str r3, [r7, #20]
  6620. }
  6621. return tmpreg;
  6622. 8002262: 697b ldr r3, [r7, #20]
  6623. }
  6624. 8002264: 1c18 adds r0, r3, #0
  6625. 8002266: 46bd mov sp, r7
  6626. 8002268: b006 add sp, #24
  6627. 800226a: bd80 pop {r7, pc}
  6628. 0800226c <ADC_StopOfConversion>:
  6629. * data register is not updated with current conversion.
  6630. * @param ADCx: where x can be 1 to select the ADC1 peripheral.
  6631. * @retval None
  6632. */
  6633. void ADC_StopOfConversion(ADC_TypeDef* ADCx)
  6634. {
  6635. 800226c: b580 push {r7, lr}
  6636. 800226e: b082 sub sp, #8
  6637. 8002270: af00 add r7, sp, #0
  6638. 8002272: 6078 str r0, [r7, #4]
  6639. /* Check the parameters */
  6640. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6641. ADCx->CR |= (uint32_t)ADC_CR_ADSTP;
  6642. 8002274: 687b ldr r3, [r7, #4]
  6643. 8002276: 689b ldr r3, [r3, #8]
  6644. 8002278: 2210 movs r2, #16
  6645. 800227a: 431a orrs r2, r3
  6646. 800227c: 687b ldr r3, [r7, #4]
  6647. 800227e: 609a str r2, [r3, #8]
  6648. }
  6649. 8002280: 46bd mov sp, r7
  6650. 8002282: b002 add sp, #8
  6651. 8002284: bd80 pop {r7, pc}
  6652. 8002286: 46c0 nop ; (mov r8, r8)
  6653. 08002288 <ADC_StartOfConversion>:
  6654. * assertion of EOSEQ because the sequence is automatic relaunched
  6655. * @param ADCx: where x can be 1 to select the ADC1 peripheral.
  6656. * @retval None
  6657. */
  6658. void ADC_StartOfConversion(ADC_TypeDef* ADCx)
  6659. {
  6660. 8002288: b580 push {r7, lr}
  6661. 800228a: b082 sub sp, #8
  6662. 800228c: af00 add r7, sp, #0
  6663. 800228e: 6078 str r0, [r7, #4]
  6664. /* Check the parameters */
  6665. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6666. ADCx->CR |= (uint32_t)ADC_CR_ADSTART;
  6667. 8002290: 687b ldr r3, [r7, #4]
  6668. 8002292: 689b ldr r3, [r3, #8]
  6669. 8002294: 2204 movs r2, #4
  6670. 8002296: 431a orrs r2, r3
  6671. 8002298: 687b ldr r3, [r7, #4]
  6672. 800229a: 609a str r2, [r3, #8]
  6673. }
  6674. 800229c: 46bd mov sp, r7
  6675. 800229e: b002 add sp, #8
  6676. 80022a0: bd80 pop {r7, pc}
  6677. 80022a2: 46c0 nop ; (mov r8, r8)
  6678. 080022a4 <ADC_GetConversionValue>:
  6679. * @brief Returns the last ADCx conversion result data for ADC channel.
  6680. * @param ADCx: where x can be 1 to select the ADC1 peripheral.
  6681. * @retval The Data conversion value.
  6682. */
  6683. uint16_t ADC_GetConversionValue(ADC_TypeDef* ADCx)
  6684. {
  6685. 80022a4: b580 push {r7, lr}
  6686. 80022a6: b082 sub sp, #8
  6687. 80022a8: af00 add r7, sp, #0
  6688. 80022aa: 6078 str r0, [r7, #4]
  6689. /* Check the parameters */
  6690. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6691. /* Return the selected ADC conversion value */
  6692. return (uint16_t) ADCx->DR;
  6693. 80022ac: 687b ldr r3, [r7, #4]
  6694. 80022ae: 6c1b ldr r3, [r3, #64] ; 0x40
  6695. 80022b0: b29b uxth r3, r3
  6696. }
  6697. 80022b2: 1c18 adds r0, r3, #0
  6698. 80022b4: 46bd mov sp, r7
  6699. 80022b6: b002 add sp, #8
  6700. 80022b8: bd80 pop {r7, pc}
  6701. 80022ba: 46c0 nop ; (mov r8, r8)
  6702. 080022bc <ADC_DMACmd>:
  6703. * @param NewState: new state of the selected ADC DMA transfer.
  6704. * This parameter can be: ENABLE or DISABLE.
  6705. * @retval None
  6706. */
  6707. void ADC_DMACmd(ADC_TypeDef* ADCx, FunctionalState NewState)
  6708. {
  6709. 80022bc: b580 push {r7, lr}
  6710. 80022be: b082 sub sp, #8
  6711. 80022c0: af00 add r7, sp, #0
  6712. 80022c2: 6078 str r0, [r7, #4]
  6713. 80022c4: 1c0a adds r2, r1, #0
  6714. 80022c6: 1cfb adds r3, r7, #3
  6715. 80022c8: 701a strb r2, [r3, #0]
  6716. /* Check the parameters */
  6717. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6718. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6719. if (NewState != DISABLE)
  6720. 80022ca: 1cfb adds r3, r7, #3
  6721. 80022cc: 781b ldrb r3, [r3, #0]
  6722. 80022ce: 2b00 cmp r3, #0
  6723. 80022d0: d006 beq.n 80022e0 <ADC_DMACmd+0x24>
  6724. {
  6725. /* Enable the selected ADC DMA request */
  6726. ADCx->CFGR1 |= (uint32_t)ADC_CFGR1_DMAEN;
  6727. 80022d2: 687b ldr r3, [r7, #4]
  6728. 80022d4: 68db ldr r3, [r3, #12]
  6729. 80022d6: 2201 movs r2, #1
  6730. 80022d8: 431a orrs r2, r3
  6731. 80022da: 687b ldr r3, [r7, #4]
  6732. 80022dc: 60da str r2, [r3, #12]
  6733. 80022de: e006 b.n 80022ee <ADC_DMACmd+0x32>
  6734. }
  6735. else
  6736. {
  6737. /* Disable the selected ADC DMA request */
  6738. ADCx->CFGR1 &= (uint32_t)(~ADC_CFGR1_DMAEN);
  6739. 80022e0: 687b ldr r3, [r7, #4]
  6740. 80022e2: 68db ldr r3, [r3, #12]
  6741. 80022e4: 2201 movs r2, #1
  6742. 80022e6: 4393 bics r3, r2
  6743. 80022e8: 1c1a adds r2, r3, #0
  6744. 80022ea: 687b ldr r3, [r7, #4]
  6745. 80022ec: 60da str r2, [r3, #12]
  6746. }
  6747. }
  6748. 80022ee: 46bd mov sp, r7
  6749. 80022f0: b002 add sp, #8
  6750. 80022f2: bd80 pop {r7, pc}
  6751. 080022f4 <ADC_DMARequestModeConfig>:
  6752. * @arg ADC_DMAMode_OneShot: DMA One Shot Mode
  6753. * @arg ADC_DMAMode_Circular: DMA Circular Mode
  6754. * @retval None
  6755. */
  6756. void ADC_DMARequestModeConfig(ADC_TypeDef* ADCx, uint32_t ADC_DMARequestMode)
  6757. {
  6758. 80022f4: b580 push {r7, lr}
  6759. 80022f6: b082 sub sp, #8
  6760. 80022f8: af00 add r7, sp, #0
  6761. 80022fa: 6078 str r0, [r7, #4]
  6762. 80022fc: 6039 str r1, [r7, #0]
  6763. /* Check the parameters */
  6764. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6765. ADCx->CFGR1 &= (uint32_t)~ADC_CFGR1_DMACFG;
  6766. 80022fe: 687b ldr r3, [r7, #4]
  6767. 8002300: 68db ldr r3, [r3, #12]
  6768. 8002302: 2202 movs r2, #2
  6769. 8002304: 4393 bics r3, r2
  6770. 8002306: 1c1a adds r2, r3, #0
  6771. 8002308: 687b ldr r3, [r7, #4]
  6772. 800230a: 60da str r2, [r3, #12]
  6773. ADCx->CFGR1 |= (uint32_t)ADC_DMARequestMode;
  6774. 800230c: 687b ldr r3, [r7, #4]
  6775. 800230e: 68da ldr r2, [r3, #12]
  6776. 8002310: 683b ldr r3, [r7, #0]
  6777. 8002312: 431a orrs r2, r3
  6778. 8002314: 687b ldr r3, [r7, #4]
  6779. 8002316: 60da str r2, [r3, #12]
  6780. }
  6781. 8002318: 46bd mov sp, r7
  6782. 800231a: b002 add sp, #8
  6783. 800231c: bd80 pop {r7, pc}
  6784. 800231e: 46c0 nop ; (mov r8, r8)
  6785. 08002320 <ADC_ITConfig>:
  6786. * @param NewState: new state of the specified ADC interrupts.
  6787. * This parameter can be: ENABLE or DISABLE.
  6788. * @retval None
  6789. */
  6790. void ADC_ITConfig(ADC_TypeDef* ADCx, uint32_t ADC_IT, FunctionalState NewState)
  6791. {
  6792. 8002320: b580 push {r7, lr}
  6793. 8002322: b084 sub sp, #16
  6794. 8002324: af00 add r7, sp, #0
  6795. 8002326: 60f8 str r0, [r7, #12]
  6796. 8002328: 60b9 str r1, [r7, #8]
  6797. 800232a: 1dfb adds r3, r7, #7
  6798. 800232c: 701a strb r2, [r3, #0]
  6799. /* Check the parameters */
  6800. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6801. assert_param(IS_FUNCTIONAL_STATE(NewState));
  6802. assert_param(IS_ADC_CONFIG_IT(ADC_IT));
  6803. if (NewState != DISABLE)
  6804. 800232e: 1dfb adds r3, r7, #7
  6805. 8002330: 781b ldrb r3, [r3, #0]
  6806. 8002332: 2b00 cmp r3, #0
  6807. 8002334: d006 beq.n 8002344 <ADC_ITConfig+0x24>
  6808. {
  6809. /* Enable the selected ADC interrupts */
  6810. ADCx->IER |= ADC_IT;
  6811. 8002336: 68fb ldr r3, [r7, #12]
  6812. 8002338: 685a ldr r2, [r3, #4]
  6813. 800233a: 68bb ldr r3, [r7, #8]
  6814. 800233c: 431a orrs r2, r3
  6815. 800233e: 68fb ldr r3, [r7, #12]
  6816. 8002340: 605a str r2, [r3, #4]
  6817. 8002342: e006 b.n 8002352 <ADC_ITConfig+0x32>
  6818. }
  6819. else
  6820. {
  6821. /* Disable the selected ADC interrupts */
  6822. ADCx->IER &= (~(uint32_t)ADC_IT);
  6823. 8002344: 68fb ldr r3, [r7, #12]
  6824. 8002346: 685b ldr r3, [r3, #4]
  6825. 8002348: 68ba ldr r2, [r7, #8]
  6826. 800234a: 43d2 mvns r2, r2
  6827. 800234c: 401a ands r2, r3
  6828. 800234e: 68fb ldr r3, [r7, #12]
  6829. 8002350: 605a str r2, [r3, #4]
  6830. }
  6831. }
  6832. 8002352: 46bd mov sp, r7
  6833. 8002354: b004 add sp, #16
  6834. 8002356: bd80 pop {r7, pc}
  6835. 08002358 <ADC_GetFlagStatus>:
  6836. * @arg ADC_FLAG_ADSTP: ADC stop flag
  6837. * @arg ADC_FLAG_ADCAL: ADC Calibration flag
  6838. * @retval The new state of ADC_FLAG (SET or RESET).
  6839. */
  6840. FlagStatus ADC_GetFlagStatus(ADC_TypeDef* ADCx, uint32_t ADC_FLAG)
  6841. {
  6842. 8002358: b580 push {r7, lr}
  6843. 800235a: b084 sub sp, #16
  6844. 800235c: af00 add r7, sp, #0
  6845. 800235e: 6078 str r0, [r7, #4]
  6846. 8002360: 6039 str r1, [r7, #0]
  6847. FlagStatus bitstatus = RESET;
  6848. 8002362: 230f movs r3, #15
  6849. 8002364: 18fb adds r3, r7, r3
  6850. 8002366: 2200 movs r2, #0
  6851. 8002368: 701a strb r2, [r3, #0]
  6852. uint32_t tmpreg = 0;
  6853. 800236a: 2300 movs r3, #0
  6854. 800236c: 60bb str r3, [r7, #8]
  6855. /* Check the parameters */
  6856. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6857. assert_param(IS_ADC_GET_FLAG(ADC_FLAG));
  6858. if((uint32_t)(ADC_FLAG & 0x01000000))
  6859. 800236e: 683a ldr r2, [r7, #0]
  6860. 8002370: 2380 movs r3, #128 ; 0x80
  6861. 8002372: 045b lsls r3, r3, #17
  6862. 8002374: 4013 ands r3, r2
  6863. 8002376: d005 beq.n 8002384 <ADC_GetFlagStatus+0x2c>
  6864. {
  6865. tmpreg = ADCx->CR & 0xFEFFFFFF;
  6866. 8002378: 687b ldr r3, [r7, #4]
  6867. 800237a: 689b ldr r3, [r3, #8]
  6868. 800237c: 4a0d ldr r2, [pc, #52] ; (80023b4 <ADC_GetFlagStatus+0x5c>)
  6869. 800237e: 4013 ands r3, r2
  6870. 8002380: 60bb str r3, [r7, #8]
  6871. 8002382: e002 b.n 800238a <ADC_GetFlagStatus+0x32>
  6872. }
  6873. else
  6874. {
  6875. tmpreg = ADCx->ISR;
  6876. 8002384: 687b ldr r3, [r7, #4]
  6877. 8002386: 681b ldr r3, [r3, #0]
  6878. 8002388: 60bb str r3, [r7, #8]
  6879. }
  6880. /* Check the status of the specified ADC flag */
  6881. if ((tmpreg & ADC_FLAG) != (uint32_t)RESET)
  6882. 800238a: 68bb ldr r3, [r7, #8]
  6883. 800238c: 683a ldr r2, [r7, #0]
  6884. 800238e: 4013 ands r3, r2
  6885. 8002390: d004 beq.n 800239c <ADC_GetFlagStatus+0x44>
  6886. {
  6887. /* ADC_FLAG is set */
  6888. bitstatus = SET;
  6889. 8002392: 230f movs r3, #15
  6890. 8002394: 18fb adds r3, r7, r3
  6891. 8002396: 2201 movs r2, #1
  6892. 8002398: 701a strb r2, [r3, #0]
  6893. 800239a: e003 b.n 80023a4 <ADC_GetFlagStatus+0x4c>
  6894. }
  6895. else
  6896. {
  6897. /* ADC_FLAG is reset */
  6898. bitstatus = RESET;
  6899. 800239c: 230f movs r3, #15
  6900. 800239e: 18fb adds r3, r7, r3
  6901. 80023a0: 2200 movs r2, #0
  6902. 80023a2: 701a strb r2, [r3, #0]
  6903. }
  6904. /* Return the ADC_FLAG status */
  6905. return bitstatus;
  6906. 80023a4: 230f movs r3, #15
  6907. 80023a6: 18fb adds r3, r7, r3
  6908. 80023a8: 781b ldrb r3, [r3, #0]
  6909. }
  6910. 80023aa: 1c18 adds r0, r3, #0
  6911. 80023ac: 46bd mov sp, r7
  6912. 80023ae: b004 add sp, #16
  6913. 80023b0: bd80 pop {r7, pc}
  6914. 80023b2: 46c0 nop ; (mov r8, r8)
  6915. 80023b4: feffffff .word 0xfeffffff
  6916. 080023b8 <ADC_ClearFlag>:
  6917. * @arg ADC_FLAG_EOSEQ: End of Sequence flag
  6918. * @arg ADC_FLAG_OVR: Overrun flag
  6919. * @retval None
  6920. */
  6921. void ADC_ClearFlag(ADC_TypeDef* ADCx, uint32_t ADC_FLAG)
  6922. {
  6923. 80023b8: b580 push {r7, lr}
  6924. 80023ba: b082 sub sp, #8
  6925. 80023bc: af00 add r7, sp, #0
  6926. 80023be: 6078 str r0, [r7, #4]
  6927. 80023c0: 6039 str r1, [r7, #0]
  6928. /* Check the parameters */
  6929. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6930. assert_param(IS_ADC_CLEAR_FLAG(ADC_FLAG));
  6931. /* Clear the selected ADC flags */
  6932. ADCx->ISR = (uint32_t)ADC_FLAG;
  6933. 80023c2: 687b ldr r3, [r7, #4]
  6934. 80023c4: 683a ldr r2, [r7, #0]
  6935. 80023c6: 601a str r2, [r3, #0]
  6936. }
  6937. 80023c8: 46bd mov sp, r7
  6938. 80023ca: b002 add sp, #8
  6939. 80023cc: bd80 pop {r7, pc}
  6940. 80023ce: 46c0 nop ; (mov r8, r8)
  6941. 080023d0 <ADC_GetITStatus>:
  6942. * @arg ADC_IT_OVR: overrun interrupt
  6943. * @arg ADC_IT_AWD: Analog watchdog interrupt
  6944. * @retval The new state of ADC_IT (SET or RESET).
  6945. */
  6946. ITStatus ADC_GetITStatus(ADC_TypeDef* ADCx, uint32_t ADC_IT)
  6947. {
  6948. 80023d0: b580 push {r7, lr}
  6949. 80023d2: b084 sub sp, #16
  6950. 80023d4: af00 add r7, sp, #0
  6951. 80023d6: 6078 str r0, [r7, #4]
  6952. 80023d8: 6039 str r1, [r7, #0]
  6953. ITStatus bitstatus = RESET;
  6954. 80023da: 230f movs r3, #15
  6955. 80023dc: 18fb adds r3, r7, r3
  6956. 80023de: 2200 movs r2, #0
  6957. 80023e0: 701a strb r2, [r3, #0]
  6958. uint32_t enablestatus = 0;
  6959. 80023e2: 2300 movs r3, #0
  6960. 80023e4: 60bb str r3, [r7, #8]
  6961. /* Check the parameters */
  6962. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  6963. assert_param(IS_ADC_GET_IT(ADC_IT));
  6964. /* Get the ADC_IT enable bit status */
  6965. enablestatus = (uint32_t)(ADCx->IER & ADC_IT);
  6966. 80023e6: 687b ldr r3, [r7, #4]
  6967. 80023e8: 685b ldr r3, [r3, #4]
  6968. 80023ea: 683a ldr r2, [r7, #0]
  6969. 80023ec: 4013 ands r3, r2
  6970. 80023ee: 60bb str r3, [r7, #8]
  6971. /* Check the status of the specified ADC interrupt */
  6972. if (((uint32_t)(ADCx->ISR & ADC_IT) != (uint32_t)RESET) && (enablestatus != (uint32_t)RESET))
  6973. 80023f0: 687b ldr r3, [r7, #4]
  6974. 80023f2: 681b ldr r3, [r3, #0]
  6975. 80023f4: 683a ldr r2, [r7, #0]
  6976. 80023f6: 4013 ands r3, r2
  6977. 80023f8: d007 beq.n 800240a <ADC_GetITStatus+0x3a>
  6978. 80023fa: 68bb ldr r3, [r7, #8]
  6979. 80023fc: 2b00 cmp r3, #0
  6980. 80023fe: d004 beq.n 800240a <ADC_GetITStatus+0x3a>
  6981. {
  6982. /* ADC_IT is set */
  6983. bitstatus = SET;
  6984. 8002400: 230f movs r3, #15
  6985. 8002402: 18fb adds r3, r7, r3
  6986. 8002404: 2201 movs r2, #1
  6987. 8002406: 701a strb r2, [r3, #0]
  6988. 8002408: e003 b.n 8002412 <ADC_GetITStatus+0x42>
  6989. }
  6990. else
  6991. {
  6992. /* ADC_IT is reset */
  6993. bitstatus = RESET;
  6994. 800240a: 230f movs r3, #15
  6995. 800240c: 18fb adds r3, r7, r3
  6996. 800240e: 2200 movs r2, #0
  6997. 8002410: 701a strb r2, [r3, #0]
  6998. }
  6999. /* Return the ADC_IT status */
  7000. return bitstatus;
  7001. 8002412: 230f movs r3, #15
  7002. 8002414: 18fb adds r3, r7, r3
  7003. 8002416: 781b ldrb r3, [r3, #0]
  7004. }
  7005. 8002418: 1c18 adds r0, r3, #0
  7006. 800241a: 46bd mov sp, r7
  7007. 800241c: b004 add sp, #16
  7008. 800241e: bd80 pop {r7, pc}
  7009. 08002420 <ADC_ClearITPendingBit>:
  7010. * @arg ADC_IT_OVR: overrun interrupt
  7011. * @arg ADC_IT_AWD: Analog watchdog interrupt
  7012. * @retval None
  7013. */
  7014. void ADC_ClearITPendingBit(ADC_TypeDef* ADCx, uint32_t ADC_IT)
  7015. {
  7016. 8002420: b580 push {r7, lr}
  7017. 8002422: b082 sub sp, #8
  7018. 8002424: af00 add r7, sp, #0
  7019. 8002426: 6078 str r0, [r7, #4]
  7020. 8002428: 6039 str r1, [r7, #0]
  7021. /* Check the parameters */
  7022. assert_param(IS_ADC_ALL_PERIPH(ADCx));
  7023. assert_param(IS_ADC_CLEAR_IT(ADC_IT));
  7024. /* Clear the selected ADC interrupt pending bits */
  7025. ADCx->ISR = (uint32_t)ADC_IT;
  7026. 800242a: 687b ldr r3, [r7, #4]
  7027. 800242c: 683a ldr r2, [r7, #0]
  7028. 800242e: 601a str r2, [r3, #0]
  7029. }
  7030. 8002430: 46bd mov sp, r7
  7031. 8002432: b002 add sp, #8
  7032. 8002434: bd80 pop {r7, pc}
  7033. 8002436: 46c0 nop ; (mov r8, r8)
  7034. 08002438 <initAll>:
  7035. uint8_t sendData;
  7036. uint16_t counter = 0;
  7037. uint16_t data;
  7038. void initAll()
  7039. {
  7040. 8002438: b580 push {r7, lr}
  7041. 800243a: af00 add r7, sp, #0
  7042. RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
  7043. 800243c: 2380 movs r3, #128 ; 0x80
  7044. 800243e: 029b lsls r3, r3, #10
  7045. 8002440: 1c18 adds r0, r3, #0
  7046. 8002442: 2101 movs r1, #1
  7047. 8002444: f7fe fc28 bl 8000c98 <RCC_AHBPeriphClockCmd>
  7048. RCC_APB2PeriphClockCmd(RCC_APB2Periph_SPI1, ENABLE);
  7049. 8002448: 2380 movs r3, #128 ; 0x80
  7050. 800244a: 015b lsls r3, r3, #5
  7051. 800244c: 1c18 adds r0, r3, #0
  7052. 800244e: 2101 movs r1, #1
  7053. 8002450: f7fe fc40 bl 8000cd4 <RCC_APB2PeriphClockCmd>
  7054. RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
  7055. 8002454: 2380 movs r3, #128 ; 0x80
  7056. 8002456: 009b lsls r3, r3, #2
  7057. 8002458: 1c18 adds r0, r3, #0
  7058. 800245a: 2101 movs r1, #1
  7059. 800245c: f7fe fc3a bl 8000cd4 <RCC_APB2PeriphClockCmd>
  7060. port.GPIO_Mode = GPIO_Mode_AF;
  7061. 8002460: 4b30 ldr r3, [pc, #192] ; (8002524 <initAll+0xec>)
  7062. 8002462: 2202 movs r2, #2
  7063. 8002464: 711a strb r2, [r3, #4]
  7064. port.GPIO_OType = GPIO_OType_PP;
  7065. 8002466: 4b2f ldr r3, [pc, #188] ; (8002524 <initAll+0xec>)
  7066. 8002468: 2200 movs r2, #0
  7067. 800246a: 719a strb r2, [r3, #6]
  7068. port.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7;
  7069. 800246c: 4b2d ldr r3, [pc, #180] ; (8002524 <initAll+0xec>)
  7070. 800246e: 22f1 movs r2, #241 ; 0xf1
  7071. 8002470: 601a str r2, [r3, #0]
  7072. port.GPIO_Speed = GPIO_Speed_50MHz;
  7073. 8002472: 4b2c ldr r3, [pc, #176] ; (8002524 <initAll+0xec>)
  7074. 8002474: 2203 movs r2, #3
  7075. 8002476: 715a strb r2, [r3, #5]
  7076. GPIO_Init(GPIOA, &port);
  7077. 8002478: 2390 movs r3, #144 ; 0x90
  7078. 800247a: 05da lsls r2, r3, #23
  7079. 800247c: 4b29 ldr r3, [pc, #164] ; (8002524 <initAll+0xec>)
  7080. 800247e: 1c10 adds r0, r2, #0
  7081. 8002480: 1c19 adds r1, r3, #0
  7082. 8002482: f7fe fde7 bl 8001054 <GPIO_Init>
  7083. ADC_StructInit(&adc);
  7084. 8002486: 4b28 ldr r3, [pc, #160] ; (8002528 <initAll+0xf0>)
  7085. 8002488: 1c18 adds r0, r3, #0
  7086. 800248a: f7ff fce1 bl 8001e50 <ADC_StructInit>
  7087. adc.ADC_ContinuousConvMode = ENABLE;
  7088. 800248e: 4b26 ldr r3, [pc, #152] ; (8002528 <initAll+0xf0>)
  7089. 8002490: 2201 movs r2, #1
  7090. 8002492: 711a strb r2, [r3, #4]
  7091. adc.ADC_ExternalTrigConv = ADC_ExternalTrigConv_T1_TRGO;
  7092. 8002494: 4b24 ldr r3, [pc, #144] ; (8002528 <initAll+0xf0>)
  7093. 8002496: 2200 movs r2, #0
  7094. 8002498: 60da str r2, [r3, #12]
  7095. ADC_Init(ADC1, &adc);
  7096. 800249a: 4a24 ldr r2, [pc, #144] ; (800252c <initAll+0xf4>)
  7097. 800249c: 4b22 ldr r3, [pc, #136] ; (8002528 <initAll+0xf0>)
  7098. 800249e: 1c10 adds r0, r2, #0
  7099. 80024a0: 1c19 adds r1, r3, #0
  7100. 80024a2: f7ff fca9 bl 8001df8 <ADC_Init>
  7101. SPI_StructInit(&spi);
  7102. 80024a6: 4b22 ldr r3, [pc, #136] ; (8002530 <initAll+0xf8>)
  7103. 80024a8: 1c18 adds r0, r3, #0
  7104. 80024aa: f7fe ffc1 bl 8001430 <SPI_StructInit>
  7105. spi.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
  7106. 80024ae: 4b20 ldr r3, [pc, #128] ; (8002530 <initAll+0xf8>)
  7107. 80024b0: 2200 movs r2, #0
  7108. 80024b2: 801a strh r2, [r3, #0]
  7109. spi.SPI_Mode = SPI_Mode_Master;
  7110. 80024b4: 4b1e ldr r3, [pc, #120] ; (8002530 <initAll+0xf8>)
  7111. 80024b6: 2282 movs r2, #130 ; 0x82
  7112. 80024b8: 0052 lsls r2, r2, #1
  7113. 80024ba: 805a strh r2, [r3, #2]
  7114. spi.SPI_DataSize = SPI_DataSize_8b;
  7115. 80024bc: 4b1c ldr r3, [pc, #112] ; (8002530 <initAll+0xf8>)
  7116. 80024be: 22e0 movs r2, #224 ; 0xe0
  7117. 80024c0: 00d2 lsls r2, r2, #3
  7118. 80024c2: 809a strh r2, [r3, #4]
  7119. spi.SPI_CPOL = SPI_CPOL_Low;
  7120. 80024c4: 4b1a ldr r3, [pc, #104] ; (8002530 <initAll+0xf8>)
  7121. 80024c6: 2200 movs r2, #0
  7122. 80024c8: 80da strh r2, [r3, #6]
  7123. spi.SPI_CPHA = SPI_CPHA_2Edge;
  7124. 80024ca: 4b19 ldr r3, [pc, #100] ; (8002530 <initAll+0xf8>)
  7125. 80024cc: 2201 movs r2, #1
  7126. 80024ce: 811a strh r2, [r3, #8]
  7127. spi.SPI_NSS = SPI_NSS_Soft;
  7128. 80024d0: 4b17 ldr r3, [pc, #92] ; (8002530 <initAll+0xf8>)
  7129. 80024d2: 2280 movs r2, #128 ; 0x80
  7130. 80024d4: 0092 lsls r2, r2, #2
  7131. 80024d6: 815a strh r2, [r3, #10]
  7132. spi.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_4;
  7133. 80024d8: 4b15 ldr r3, [pc, #84] ; (8002530 <initAll+0xf8>)
  7134. 80024da: 2208 movs r2, #8
  7135. 80024dc: 819a strh r2, [r3, #12]
  7136. spi.SPI_FirstBit = SPI_FirstBit_MSB;
  7137. 80024de: 4b14 ldr r3, [pc, #80] ; (8002530 <initAll+0xf8>)
  7138. 80024e0: 2200 movs r2, #0
  7139. 80024e2: 81da strh r2, [r3, #14]
  7140. spi.SPI_CRCPolynomial = 7;
  7141. 80024e4: 4b12 ldr r3, [pc, #72] ; (8002530 <initAll+0xf8>)
  7142. 80024e6: 2207 movs r2, #7
  7143. 80024e8: 821a strh r2, [r3, #16]
  7144. SPI_Init(SPI1, &spi);
  7145. 80024ea: 4a12 ldr r2, [pc, #72] ; (8002534 <initAll+0xfc>)
  7146. 80024ec: 4b10 ldr r3, [pc, #64] ; (8002530 <initAll+0xf8>)
  7147. 80024ee: 1c10 adds r0, r2, #0
  7148. 80024f0: 1c19 adds r1, r3, #0
  7149. 80024f2: f7fe ffc1 bl 8001478 <SPI_Init>
  7150. GPIO_StructInit(&port);
  7151. 80024f6: 4b0b ldr r3, [pc, #44] ; (8002524 <initAll+0xec>)
  7152. 80024f8: 1c18 adds r0, r3, #0
  7153. 80024fa: f7fe fe3d bl 8001178 <GPIO_StructInit>
  7154. port.GPIO_PuPd = GPIO_PuPd_DOWN;
  7155. 80024fe: 4b09 ldr r3, [pc, #36] ; (8002524 <initAll+0xec>)
  7156. 8002500: 2202 movs r2, #2
  7157. 8002502: 71da strb r2, [r3, #7]
  7158. port.GPIO_Pin = GPIO_Pin_0;
  7159. 8002504: 4b07 ldr r3, [pc, #28] ; (8002524 <initAll+0xec>)
  7160. 8002506: 2201 movs r2, #1
  7161. 8002508: 601a str r2, [r3, #0]
  7162. port.GPIO_Speed = GPIO_Speed_2MHz;
  7163. 800250a: 4b06 ldr r3, [pc, #24] ; (8002524 <initAll+0xec>)
  7164. 800250c: 2200 movs r2, #0
  7165. 800250e: 715a strb r2, [r3, #5]
  7166. GPIO_Init(GPIOA, &port);
  7167. 8002510: 2390 movs r3, #144 ; 0x90
  7168. 8002512: 05da lsls r2, r3, #23
  7169. 8002514: 4b03 ldr r3, [pc, #12] ; (8002524 <initAll+0xec>)
  7170. 8002516: 1c10 adds r0, r2, #0
  7171. 8002518: 1c19 adds r1, r3, #0
  7172. 800251a: f7fe fd9b bl 8001054 <GPIO_Init>
  7173. }
  7174. 800251e: 46bd mov sp, r7
  7175. 8002520: bd80 pop {r7, pc}
  7176. 8002522: 46c0 nop ; (mov r8, r8)
  7177. 8002524: 20000024 .word 0x20000024
  7178. 8002528: 20000040 .word 0x20000040
  7179. 800252c: 40012400 .word 0x40012400
  7180. 8002530: 2000002c .word 0x2000002c
  7181. 8002534: 40013000 .word 0x40013000
  7182. 08002538 <main>:
  7183. int main()
  7184. {
  7185. 8002538: b580 push {r7, lr}
  7186. 800253a: af00 add r7, sp, #0
  7187. This function enables IRQ interrupts by clearing the I-bit in the CPSR.
  7188. Can only be executed in Privileged modes.
  7189. */
  7190. __attribute__( ( always_inline ) ) static __INLINE void __enable_irq(void)
  7191. {
  7192. __ASM volatile ("cpsie i");
  7193. 800253c: b662 cpsie i
  7194. __enable_irq();
  7195. initAll();
  7196. 800253e: f7ff ff7b bl 8002438 <initAll>
  7197. //Включаем АЦП
  7198. // ADC_Cmd(ADC1, ENABLE);
  7199. // ADC_SoftwareStartConvCmd(ADC1, ENABLE);
  7200. //И конечно же включаем SPI
  7201. SPI_Cmd(SPI1, ENABLE);
  7202. 8002542: 4b20 ldr r3, [pc, #128] ; (80025c4 <main+0x8c>)
  7203. 8002544: 1c18 adds r0, r3, #0
  7204. 8002546: 2101 movs r1, #1
  7205. 8002548: f7ff f912 bl 8001770 <SPI_Cmd>
  7206. while(1)
  7207. {
  7208. //Это просто счетчик, чтобы отсылать на шину данные только когда счетчик
  7209. //досчитает до 15000, число взято абсолютно "от балды" ))
  7210. counter++;
  7211. 800254c: 4b1e ldr r3, [pc, #120] ; (80025c8 <main+0x90>)
  7212. 800254e: 881b ldrh r3, [r3, #0]
  7213. 8002550: 3301 adds r3, #1
  7214. 8002552: b29a uxth r2, r3
  7215. 8002554: 4b1c ldr r3, [pc, #112] ; (80025c8 <main+0x90>)
  7216. 8002556: 801a strh r2, [r3, #0]
  7217. // data = ADC_GetConversionValue(ADC1);
  7218. //Сделали АЦП, анализируем данные
  7219. if (data == 0xFFF)
  7220. 8002558: 4b1c ldr r3, [pc, #112] ; (80025cc <main+0x94>)
  7221. 800255a: 881b ldrh r3, [r3, #0]
  7222. 800255c: 4a1c ldr r2, [pc, #112] ; (80025d0 <main+0x98>)
  7223. 800255e: 4293 cmp r3, r2
  7224. 8002560: d103 bne.n 800256a <main+0x32>
  7225. {
  7226. sendData = 0x04;
  7227. 8002562: 4b1c ldr r3, [pc, #112] ; (80025d4 <main+0x9c>)
  7228. 8002564: 2204 movs r2, #4
  7229. 8002566: 701a strb r2, [r3, #0]
  7230. 8002568: e01d b.n 80025a6 <main+0x6e>
  7231. }
  7232. else if (data > 0xE8B)
  7233. 800256a: 4b18 ldr r3, [pc, #96] ; (80025cc <main+0x94>)
  7234. 800256c: 881b ldrh r3, [r3, #0]
  7235. 800256e: 4a1a ldr r2, [pc, #104] ; (80025d8 <main+0xa0>)
  7236. 8002570: 4293 cmp r3, r2
  7237. 8002572: d903 bls.n 800257c <main+0x44>
  7238. {
  7239. sendData = 0x03;
  7240. 8002574: 4b17 ldr r3, [pc, #92] ; (80025d4 <main+0x9c>)
  7241. 8002576: 2203 movs r2, #3
  7242. 8002578: 701a strb r2, [r3, #0]
  7243. 800257a: e014 b.n 80025a6 <main+0x6e>
  7244. }
  7245. else if (data > 0x9B2)
  7246. 800257c: 4b13 ldr r3, [pc, #76] ; (80025cc <main+0x94>)
  7247. 800257e: 881b ldrh r3, [r3, #0]
  7248. 8002580: 4a16 ldr r2, [pc, #88] ; (80025dc <main+0xa4>)
  7249. 8002582: 4293 cmp r3, r2
  7250. 8002584: d903 bls.n 800258e <main+0x56>
  7251. {
  7252. sendData = 0x02;
  7253. 8002586: 4b13 ldr r3, [pc, #76] ; (80025d4 <main+0x9c>)
  7254. 8002588: 2202 movs r2, #2
  7255. 800258a: 701a strb r2, [r3, #0]
  7256. 800258c: e00b b.n 80025a6 <main+0x6e>
  7257. }
  7258. else if (data > 0x4D9)
  7259. 800258e: 4b0f ldr r3, [pc, #60] ; (80025cc <main+0x94>)
  7260. 8002590: 881b ldrh r3, [r3, #0]
  7261. 8002592: 4a13 ldr r2, [pc, #76] ; (80025e0 <main+0xa8>)
  7262. 8002594: 4293 cmp r3, r2
  7263. 8002596: d903 bls.n 80025a0 <main+0x68>
  7264. {
  7265. sendData = 0x01;
  7266. 8002598: 4b0e ldr r3, [pc, #56] ; (80025d4 <main+0x9c>)
  7267. 800259a: 2201 movs r2, #1
  7268. 800259c: 701a strb r2, [r3, #0]
  7269. 800259e: e002 b.n 80025a6 <main+0x6e>
  7270. }
  7271. else
  7272. {
  7273. sendData = 0x00;
  7274. 80025a0: 4b0c ldr r3, [pc, #48] ; (80025d4 <main+0x9c>)
  7275. 80025a2: 2200 movs r2, #0
  7276. 80025a4: 701a strb r2, [r3, #0]
  7277. }
  7278. if(counter == 15000)
  7279. 80025a6: 4b08 ldr r3, [pc, #32] ; (80025c8 <main+0x90>)
  7280. 80025a8: 881b ldrh r3, [r3, #0]
  7281. 80025aa: 4a0e ldr r2, [pc, #56] ; (80025e4 <main+0xac>)
  7282. 80025ac: 4293 cmp r3, r2
  7283. 80025ae: d107 bne.n 80025c0 <main+0x88>
  7284. {
  7285. //Отсылаем, ради этого все и затеивалось
  7286. SPI_I2S_SendData16(SPI1, sendData);
  7287. 80025b0: 4b08 ldr r3, [pc, #32] ; (80025d4 <main+0x9c>)
  7288. 80025b2: 781b ldrb r3, [r3, #0]
  7289. 80025b4: b29b uxth r3, r3
  7290. 80025b6: 4a03 ldr r2, [pc, #12] ; (80025c4 <main+0x8c>)
  7291. 80025b8: 1c10 adds r0, r2, #0
  7292. 80025ba: 1c19 adds r1, r3, #0
  7293. 80025bc: f7ff fa24 bl 8001a08 <SPI_I2S_SendData16>
  7294. }
  7295. }
  7296. 80025c0: e7c4 b.n 800254c <main+0x14>
  7297. 80025c2: 46c0 nop ; (mov r8, r8)
  7298. 80025c4: 40013000 .word 0x40013000
  7299. 80025c8: 2000005a .word 0x2000005a
  7300. 80025cc: 2000005c .word 0x2000005c
  7301. 80025d0: 00000fff .word 0x00000fff
  7302. 80025d4: 20000058 .word 0x20000058
  7303. 80025d8: 00000e8b .word 0x00000e8b
  7304. 80025dc: 000009b2 .word 0x000009b2
  7305. 80025e0: 000004d9 .word 0x000004d9
  7306. 80025e4: 00003a98 .word 0x00003a98
  7307. 80025e8: 08002730 .word 0x08002730
  7308. 80025ec: 20000000 .word 0x20000000
  7309. 80025f0: 20000024 .word 0x20000024
  7310. 80025f4: 20000024 .word 0x20000024
  7311. 80025f8: 20000060 .word 0x20000060
  7312. 080025fc <__aeabi_uidiv>:
  7313. 80025fc: e2512001 subs r2, r1, #1
  7314. 8002600: 012fff1e bxeq lr
  7315. 8002604: 3a000036 bcc 80026e4 <__aeabi_uidiv+0xe8>
  7316. 8002608: e1500001 cmp r0, r1
  7317. 800260c: 9a000022 bls 800269c <__aeabi_uidiv+0xa0>
  7318. 8002610: e1110002 tst r1, r2
  7319. 8002614: 0a000023 beq 80026a8 <__aeabi_uidiv+0xac>
  7320. 8002618: e311020e tst r1, #-536870912 ; 0xe0000000
  7321. 800261c: 01a01181 lsleq r1, r1, #3
  7322. 8002620: 03a03008 moveq r3, #8
  7323. 8002624: 13a03001 movne r3, #1
  7324. 8002628: e3510201 cmp r1, #268435456 ; 0x10000000
  7325. 800262c: 31510000 cmpcc r1, r0
  7326. 8002630: 31a01201 lslcc r1, r1, #4
  7327. 8002634: 31a03203 lslcc r3, r3, #4
  7328. 8002638: 3afffffa bcc 8002628 <__aeabi_uidiv+0x2c>
  7329. 800263c: e3510102 cmp r1, #-2147483648 ; 0x80000000
  7330. 8002640: 31510000 cmpcc r1, r0
  7331. 8002644: 31a01081 lslcc r1, r1, #1
  7332. 8002648: 31a03083 lslcc r3, r3, #1
  7333. 800264c: 3afffffa bcc 800263c <__aeabi_uidiv+0x40>
  7334. 8002650: e3a02000 mov r2, #0
  7335. 8002654: e1500001 cmp r0, r1
  7336. 8002658: 20400001 subcs r0, r0, r1
  7337. 800265c: 21822003 orrcs r2, r2, r3
  7338. 8002660: e15000a1 cmp r0, r1, lsr #1
  7339. 8002664: 204000a1 subcs r0, r0, r1, lsr #1
  7340. 8002668: 218220a3 orrcs r2, r2, r3, lsr #1
  7341. 800266c: e1500121 cmp r0, r1, lsr #2
  7342. 8002670: 20400121 subcs r0, r0, r1, lsr #2
  7343. 8002674: 21822123 orrcs r2, r2, r3, lsr #2
  7344. 8002678: e15001a1 cmp r0, r1, lsr #3
  7345. 800267c: 204001a1 subcs r0, r0, r1, lsr #3
  7346. 8002680: 218221a3 orrcs r2, r2, r3, lsr #3
  7347. 8002684: e3500000 cmp r0, #0
  7348. 8002688: 11b03223 lsrsne r3, r3, #4
  7349. 800268c: 11a01221 lsrne r1, r1, #4
  7350. 8002690: 1affffef bne 8002654 <__aeabi_uidiv+0x58>
  7351. 8002694: e1a00002 mov r0, r2
  7352. 8002698: e12fff1e bx lr
  7353. 800269c: 03a00001 moveq r0, #1
  7354. 80026a0: 13a00000 movne r0, #0
  7355. 80026a4: e12fff1e bx lr
  7356. 80026a8: e3510801 cmp r1, #65536 ; 0x10000
  7357. 80026ac: 21a01821 lsrcs r1, r1, #16
  7358. 80026b0: 23a02010 movcs r2, #16
  7359. 80026b4: 33a02000 movcc r2, #0
  7360. 80026b8: e3510c01 cmp r1, #256 ; 0x100
  7361. 80026bc: 21a01421 lsrcs r1, r1, #8
  7362. 80026c0: 22822008 addcs r2, r2, #8
  7363. 80026c4: e3510010 cmp r1, #16
  7364. 80026c8: 21a01221 lsrcs r1, r1, #4
  7365. 80026cc: 22822004 addcs r2, r2, #4
  7366. 80026d0: e3510004 cmp r1, #4
  7367. 80026d4: 82822003 addhi r2, r2, #3
  7368. 80026d8: 908220a1 addls r2, r2, r1, lsr #1
  7369. 80026dc: e1a00230 lsr r0, r0, r2
  7370. 80026e0: e12fff1e bx lr
  7371. 80026e4: e3500000 cmp r0, #0
  7372. 80026e8: 13e00000 mvnne r0, #0
  7373. 80026ec: ea000007 b 8002710 <__aeabi_idiv0>
  7374. 080026f0 <__aeabi_uidivmod>:
  7375. 80026f0: e3510000 cmp r1, #0
  7376. 80026f4: 0afffffa beq 80026e4 <__aeabi_uidiv+0xe8>
  7377. 80026f8: e92d4003 push {r0, r1, lr}
  7378. 80026fc: ebffffbe bl 80025fc <__aeabi_uidiv>
  7379. 8002700: e8bd4006 pop {r1, r2, lr}
  7380. 8002704: e0030092 mul r3, r2, r0
  7381. 8002708: e0411003 sub r1, r1, r3
  7382. 800270c: e12fff1e bx lr
  7383. 08002710 <__aeabi_idiv0>:
  7384. 8002710: e12fff1e bx lr
  7385. 08002714 <Reset_Handler>:
  7386. LoopFillZerobss:
  7387. /* ldr r3, = _ebss */
  7388. /* cmp r2, r3 */
  7389. /* bcc FillZerobss */
  7390. nop
  7391. 8002714: 46c0 nop ; (mov r8, r8)
  7392. nop
  7393. 8002716: 46c0 nop ; (mov r8, r8)
  7394. nop
  7395. 8002718: 46c0 nop ; (mov r8, r8)
  7396. /* Call the clock system intitialization function.*/
  7397. bl SystemInit
  7398. 800271a: f7fd fcd5 bl 80000c8 <SystemInit>
  7399. /* Call the application's entry point.*/
  7400. bl main
  7401. 800271e: f7ff ff0b bl 8002538 <main>
  7402. bx lr
  7403. 8002722: 4770 bx lr
  7404. 08002724 <ADC1_COMP_IRQHandler>:
  7405. * @retval None
  7406. */
  7407. .section .text.Default_Handler,"ax",%progbits
  7408. Default_Handler:
  7409. Infinite_Loop:
  7410. b Infinite_Loop
  7411. 8002724: e7fe b.n 8002724 <ADC1_COMP_IRQHandler>
  7412. ...
  7413. 08002728 <____aeabi_uidiv_from_thumb>:
  7414. 8002728: 4778 bx pc
  7415. 800272a: 46c0 nop ; (mov r8, r8)
  7416. 800272c: eaffffb2 b 80025fc <__aeabi_uidiv>